-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
libtool: 2.4.6 -> 2.4.7 #167071
libtool: 2.4.6 -> 2.4.7 #167071
Conversation
@ofborg eval |
@FRidh, this PR is ready to be reviewed and/or merged. |
Squashed SuperSandro2000's recommendations. |
libtool2-macos11.patch has been merged upstream as 9e8c88251 Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
# in libtoolize and ltmain.sh since `dontPatchShebangs` is set: | ||
'' | ||
substituteInPlace libtoolize.in --replace '#! /usr/bin/env sh' '#!${runtimeShell}' | ||
substituteInPlace build-aux/ltmain.in --replace '#! /usr/bin/env sh' '#!${runtimeShell}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
substituteInPlace build-aux/ltmain.in --replace '#! /usr/bin/env sh' '#!${runtimeShell}'
now leaks out /nix/store
paths into tarballs generated under nixpkgs. build-aux/ltmain.sh
gets packaged as part of make dist
in libtool-aware
projects. Encountered it today on ski
. Executable reproducer:
$ git clone https://github.com/trofi/ski && cd ski
$ git checkout v1.4.0
$ nix-shell --pure -p autoconf -p lzip -p automake -p libtool -p pkg-config -p libelf -p ncurses -p gperf -p bison -p flex
$$ ./autogen.sh && ./configure && make dist
$$ tar xf ski-1.4.0.tar.xz
$$ fgrep -R nix/store ski-1.4.0/
ski-1.4.0/build-aux/ltmain.sh:#!/nix/store/3j918i1nbwhby0y38bn2r438rjhh8f4d-bash-5.1-p16/bin/bash
Note how ski-1.4.0/build-aux/ltmain.sh
embeds the path to /nix/store
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for catching this.
I'm investigating a few solutions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the fix is
https://github.com/amjoseph-nixpkgs/nixpkgs/commit/b5aad8addf1d4a84dbf7545965584bd19fb7e42e
Testing now...
Another fallout from When The simpler one is to just
In that old 9af373a If there is no immediate reason to patch |
[when cross-compiling]
It's very suspicious that I never encountered this. My laptop and routers are now 100% cross-compiled, and have been at-least-mostly-cross-compiled for quite some time. Since the code in question is over six months old, and not part of the current release, I'll just take your word for it.
There is: it's explained in the comment above in the code that does the patching. There's a reference to the
Write a PR -- it might look easier than it really is, and that's the only way to find out. |
It required broken binfmt_misc interpreter to expose the bug. No need to take my word for it. We can observe the fact that --- a/pkgs/development/tools/misc/libtool/libtool2.nix
+++ b/pkgs/development/tools/misc/libtool/libtool2.nix
@@ -2,4 +2,5 @@
, runtimeShell
, file
+, help2man
}:
@@ -33,4 +34,13 @@ stdenv.mkDerivation rec {
# avoid help2man run after 'libtoolize.in' update
touch doc/libtoolize.1
+ '' + lib.optionalString stdenv.targetPlatform.isRiscV ''
+ # force help2man run to expose wrong call of libtoolize with
+ # unsupported "host" interpreter.
+
+ # make sure we don't report "No such file or directory" but expose
+ # "broken interpreter". We should not run interpreters anyway.
+ sed -i 'exit 42' libtoolize.in
+ sed -i 'i1 echo "UNSUPPORTED #!${runtimeShell}" interpreter"' libtoolize.in
+ rm doc/libtoolize.1
'';
@@ -39,5 +49,5 @@ stdenv.mkDerivation rec {
# add autoconf and automake or help2man dependencies here. That way we can
# avoid pulling in perl and get away with just an `m4` depend.
- nativeBuildInputs = [ m4 file ];
+ nativeBuildInputs = [ m4 file ] ++ lib.optionals stdenv.targetPlatform.isRiscV [ help2man ];
propagatedBuildInputs = [ m4 file ];
This fails as:
I'll have to decline. Past experience with certain packages shows that there is no agreement on the final solution (usually after hours sunk into preparing and testing the fix). I'll leave the exercise to others. |
Description of changes
Update libtool to 2.4.7
libtool2-macos11.patch has been merged upstream as 9e8c88251
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes