Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upmakeWrapper: Remove unused extraFlagsArray feature #69370
Conversation
This comment has been minimized.
This comment has been minimized.
The feature in question was introduced in e01be47 |
This comment has been minimized.
This comment has been minimized.
Fixed commit description: "seven years" -> "ten years". |
This comment has been minimized.
This comment has been minimized.
Could you base this on the staging branch, please. |
There is a bug in this feature: It allows extra arguments to leak in from the environment. For example: $ export extraFlagsArray=date $ man ls Note that you get the man page for date rather than for ls. This happens because 'man' happens to use a wrapper (to add groff to its PATH). An attempt to fix this was made in 5ae1857 in PR #19328 for issue #2537, but 1. That change didn't actually fix the problem because it addressed makeWrapper's environment during the build process, not the constructed wrapper script's environment after installation, and 2. That change was apparently accidentally lost when merged with 7ff6eec. Rather than trying to fix the bug again, we remove the extraFlagsArray feature, since it has never been used in the public repo in the ten years it has been available. wrapAclocal continues to use its own, separate flavor of extraFlagsArray in a more limited context. The analogous bug there was fixed in 4d7d10d in 2011.
This comment has been minimized.
This comment has been minimized.
Switched to staging. |
This comment has been minimized.
This comment has been minimized.
@GrahamcOfBorg eval |
This comment has been minimized.
This comment has been minimized.
Eval issue should be resolved now |
3564643
into
NixOS:staging
This comment has been minimized.
This comment has been minimized.
This just hit unstable yesterday and I use this pretty frequently, what is the recommended replacement? Something like |
This comment has been minimized.
This comment has been minimized.
@arcnmx - Can you share an example of how you use it? |
This comment has been minimized.
This comment has been minimized.
Hm mostly things like this and |
This comment has been minimized.
This comment has been minimized.
Cool, looks like you found a way to proceed. Sorry to cause you some churn. Yes, it looks like It looks like your wrappers end up coming out something like:
This allows Thanks for sharing your impact & fix! |
chkno commentedSep 24, 2019
•
edited
Motivation for this change
There is a bug in this feature: It allows extra arguments to leak in
from the environment. For example:
$ export extraFlagsArray=date
$ man ls
Note that you get the man page for
date
rather than forls
. This happensbecause
man
happens to use a wrapper (to add groff to its PATH).An attempt to fix this was made in 5ae1857 in PR #19328 for
issue #2537, but 1. That change didn't actually fix the problem because
it addressed makeWrapper's environment during the build process, not the
constructed wrapper script's environment after installation, and 2. That
change was apparently accidentally lost when merged with 7ff6eec.
Rather than trying to fix the bug again, we remove the extraFlagsArray
feature, since it has never been used in the public repo in the ten
years it has been available.
wrapAclocal continues to use its own, separate flavor of extraFlagsArray
in a more limited context. The analogous bug there was fixed in
4d7d10d in 2011.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)