Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lua5.1: fix broken source fetch #40748

Merged
merged 1 commit into from May 19, 2018
Merged

lua5.1: fix broken source fetch #40748

merged 1 commit into from May 19, 2018

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented May 19, 2018

The upstream src URL for the patch appears to no longer exist; moved to a
different debian location.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

url = "http://anonscm.debian.org/cgit/pkg-lua/lua5.1.git/plain/debian/patches/"
+ "0004-Fix-stack-overflow-in-vararg-functions.patch?id=b75a2014db2ad65683521f7bb295bfa37b48b389";
url = "https://sources.debian.org/data/main/l/lua5.1/5.1.5-8.1/debian/patches/"
+ "0004-Fix-stack-overflow-in-vararg-functions.patch";
sha256 = "05i5vh53d9i6dy11ibg9i9qpwz5hdm0s8bkx1d9cfcvy80cm4c7f";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to build fine, but nix-prefetch-url https://sources.debian.org/data/main/l/lua5.1/5.1.5-8.1/debian/patches/0004-Fix-stack-overflow-in-vararg-functions.patch returns a different sha256. Since the old URL doesn't exist anymore I'm not sure if I'm doing something wrong with my command or if this is a different patch, with the same filename, though the pkg seems to build. Any hints?

Copy link
Contributor

@xeji xeji May 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anonscm.debian.org was moved and restructured, see #39927. You can try to find the original patch somewhere in salsa.debian.org. Unfortunately the sources.debian.org Debian URLs are not under version control, so they're not stable either and should not be used with fetchpatch.

Currently the best solution for these Debian patches is to download the correct patch manually and add it to nixpkgs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, thanks for the context; I've downloaded the file and inlined it now so that it won't go stale again.

@bhipple
Copy link
Contributor Author

bhipple commented May 19, 2018

@GrahamcOfBorg build lua5_1

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: lua5_1

Partial log (click to expand)

Cannot nix-instantiate `lua5_1' because:
error: while evaluating the attribute 'patches' of the derivation 'lua-5.1.5' at /var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/pkgs/stdenv/generic/make-derivation.nix:148:11:
getting status of '/var/lib/gc-of-borg/nix-root/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/gleber-bastion/pkgs/development/interpreters/lua-5/5.1.0004-Fix-stack-overflow-in-vararg-functions.patch': No such file or directory

@bhipple bhipple changed the title lua 5.1: fix broken source fetch lua5.1: fix broken source fetch May 19, 2018
@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: lua5_1

Partial log (click to expand)

Cannot nix-instantiate `lua5_1' because:
�[31;1merror:�[0m while evaluating the attribute 'patches' of the derivation 'lua-5.1.5' at �[1m/var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/pkgs/stdenv/generic/make-derivation.nix�[0m:148:11:
getting status of '/var/lib/gc-of-borg/nix-test-rs-20/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-20/pkgs/development/interpreters/lua-5/5.1.0004-Fix-stack-overflow-in-vararg-functions.patch': No such file or directory

The upstream src URL for the patch appears to no longer exist. Per discussion in
NixOS#39927, the upstream URL is not stable,
so this commit inlines the patch in the nixpkgs src tree.
@xeji
Copy link
Contributor

xeji commented May 19, 2018

@GrahamcOfBorg build lua5_1

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: lua5_1

Partial log (click to expand)

cd src && cp -d liblua.5.1.5.dylib /nix/store/q3vw2sx959alnsh8bl467sf3xnj49qp4-lua-5.1.5/lib
cd doc && cp -d lua.1 luac.1 /nix/store/q3vw2sx959alnsh8bl467sf3xnj49qp4-lua-5.1.5/share/man/man1
ln -s -f liblua.5.1.5.dylib /nix/store/q3vw2sx959alnsh8bl467sf3xnj49qp4-lua-5.1.5/lib/liblua.5.1.dylib
ln -s -f liblua.5.1.dylib /nix/store/q3vw2sx959alnsh8bl467sf3xnj49qp4-lua-5.1.5/lib/liblua.dylib
post-installation fixup
gzipping man pages under /nix/store/q3vw2sx959alnsh8bl467sf3xnj49qp4-lua-5.1.5/share/man/
strip is /nix/store/kdff2gim6417493yha769kh00n63lnrw-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/q3vw2sx959alnsh8bl467sf3xnj49qp4-lua-5.1.5/lib  /nix/store/q3vw2sx959alnsh8bl467sf3xnj49qp4-lua-5.1.5/bin
patching script interpreter paths in /nix/store/q3vw2sx959alnsh8bl467sf3xnj49qp4-lua-5.1.5
/nix/store/q3vw2sx959alnsh8bl467sf3xnj49qp4-lua-5.1.5

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: lua5_1

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/jwwmxyz174sjia9p01h3mxql8pqvdq1s-lua-5.1.5
shrinking /nix/store/jwwmxyz174sjia9p01h3mxql8pqvdq1s-lua-5.1.5/bin/lua
shrinking /nix/store/jwwmxyz174sjia9p01h3mxql8pqvdq1s-lua-5.1.5/bin/luac
shrinking /nix/store/jwwmxyz174sjia9p01h3mxql8pqvdq1s-lua-5.1.5/lib/liblua.so.5.1.5
gzipping man pages under /nix/store/jwwmxyz174sjia9p01h3mxql8pqvdq1s-lua-5.1.5/share/man/
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/jwwmxyz174sjia9p01h3mxql8pqvdq1s-lua-5.1.5/lib  /nix/store/jwwmxyz174sjia9p01h3mxql8pqvdq1s-lua-5.1.5/bin
patching script interpreter paths in /nix/store/jwwmxyz174sjia9p01h3mxql8pqvdq1s-lua-5.1.5
checking for references to /build in /nix/store/jwwmxyz174sjia9p01h3mxql8pqvdq1s-lua-5.1.5...
/nix/store/jwwmxyz174sjia9p01h3mxql8pqvdq1s-lua-5.1.5

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: lua5_1

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/imlzs9rhjrcdh3m623yxnq8h28yvizzj-lua-5.1.5
shrinking /nix/store/imlzs9rhjrcdh3m623yxnq8h28yvizzj-lua-5.1.5/lib/liblua.so.5.1.5
shrinking /nix/store/imlzs9rhjrcdh3m623yxnq8h28yvizzj-lua-5.1.5/bin/luac
shrinking /nix/store/imlzs9rhjrcdh3m623yxnq8h28yvizzj-lua-5.1.5/bin/lua
gzipping man pages under /nix/store/imlzs9rhjrcdh3m623yxnq8h28yvizzj-lua-5.1.5/share/man/
strip is /nix/store/jk6j4lh9v5mvjdbdc35sj0zffhhf6s56-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/imlzs9rhjrcdh3m623yxnq8h28yvizzj-lua-5.1.5/lib  /nix/store/imlzs9rhjrcdh3m623yxnq8h28yvizzj-lua-5.1.5/bin
patching script interpreter paths in /nix/store/imlzs9rhjrcdh3m623yxnq8h28yvizzj-lua-5.1.5
checking for references to /build in /nix/store/imlzs9rhjrcdh3m623yxnq8h28yvizzj-lua-5.1.5...
/nix/store/imlzs9rhjrcdh3m623yxnq8h28yvizzj-lua-5.1.5

@xeji
Copy link
Contributor

xeji commented May 19, 2018

Thanks!

@xeji xeji merged commit 17f5001 into NixOS:master May 19, 2018
candeira pushed a commit to candeira/nixpkgs that referenced this pull request Sep 6, 2018
The upstream src URL for the patch appears to no longer exist. Per discussion in
NixOS#39927, the upstream URL is not stable,
so this commit inlines the patch in the nixpkgs src tree.

(cherry picked from commit 17f5001)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants