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

makeself: backport megastep/makeself#142 #45285

Merged
merged 1 commit into from Oct 3, 2018
Merged

makeself: backport megastep/makeself#142 #45285

merged 1 commit into from Oct 3, 2018

Conversation

kini
Copy link
Member

@kini kini commented Aug 18, 2018

Currently, a self-extracting archive created by makeself will fail to properly execute on NixOS because the boilerplate Bash code it uses to clean up the temporary directory it extracted its contents into
assumes that the rm command is installed at /bin/rm, which is not the case on NixOS.

This commit, a backport of a pull request I made to the upstream repository at megastep/makeself#142, fixes the issue by causing the boilerplate code to call rm without specifying an absolute path, which allows the version of rm from one's current Nix environment to be used instead.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member

Mic92 commented Oct 1, 2018

@GrahamcOfBorg build makeself

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: makeself

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/0rdb5j2wpjn5vsjjs4rq3hmr6zpxqq2s-makeself-2.4.0
gzipping man pages under /nix/store/0rdb5j2wpjn5vsjjs4rq3hmr6zpxqq2s-makeself-2.4.0/share/man/
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/0rdb5j2wpjn5vsjjs4rq3hmr6zpxqq2s-makeself-2.4.0/bin
patching script interpreter paths in /nix/store/0rdb5j2wpjn5vsjjs4rq3hmr6zpxqq2s-makeself-2.4.0
/nix/store/0rdb5j2wpjn5vsjjs4rq3hmr6zpxqq2s-makeself-2.4.0/bin/makeself: interpreter directive changed from "/bin/sh" to "/nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/0rdb5j2wpjn5vsjjs4rq3hmr6zpxqq2s-makeself-2.4.0...
/nix/store/0rdb5j2wpjn5vsjjs4rq3hmr6zpxqq2s-makeself-2.4.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: makeself

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/i7q2459hmy45xh9nlwrz8js8z4qrzylj-makeself-2.4.0
gzipping man pages under /nix/store/i7q2459hmy45xh9nlwrz8js8z4qrzylj-makeself-2.4.0/share/man/
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/i7q2459hmy45xh9nlwrz8js8z4qrzylj-makeself-2.4.0/bin
patching script interpreter paths in /nix/store/i7q2459hmy45xh9nlwrz8js8z4qrzylj-makeself-2.4.0
/nix/store/i7q2459hmy45xh9nlwrz8js8z4qrzylj-makeself-2.4.0/bin/makeself: interpreter directive changed from "/bin/sh" to "/nix/store/fqm2x6kiay1q4vg7pqp4wp17bdijlyc3-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/i7q2459hmy45xh9nlwrz8js8z4qrzylj-makeself-2.4.0...
/nix/store/i7q2459hmy45xh9nlwrz8js8z4qrzylj-makeself-2.4.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: makeself

Partial log (click to expand)

building
no Makefile, doing nothing
installing
post-installation fixup
gzipping man pages under /nix/store/79dnyl648hv0766fg663bisd1via9gk0-makeself-2.4.0/share/man/
strip is /nix/store/4w56qihlrddav67p7d1vy5qkyayaqw11-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/79dnyl648hv0766fg663bisd1via9gk0-makeself-2.4.0/bin
patching script interpreter paths in /nix/store/79dnyl648hv0766fg663bisd1via9gk0-makeself-2.4.0
/nix/store/79dnyl648hv0766fg663bisd1via9gk0-makeself-2.4.0/bin/makeself: interpreter directive changed from "/bin/sh" to "/nix/store/z2pc6bbx9d1mwwahnds31a7nlvjbi9zr-bash-4.4-p23/bin/sh"
/nix/store/79dnyl648hv0766fg663bisd1via9gk0-makeself-2.4.0

Currently, a self-extracting archive created by makeself will fail to
properly execute on NixOS because the boilerplate Bash code it uses to
clean up the temporary directory it extracted its contents into
assumes that the `rm` command is installed at `/bin/rm`, which is not
the case on NixOS.

This commit, a backport of a pull request I made to the upstream
repository at megastep/makeself#142, fixes the issue by causing the
boilerplate code to call `rm` without specifying an absolute path,
which allows the version of `rm` from one's current Nix environment to
be used instead.
@Mic92
Copy link
Member

Mic92 commented Oct 3, 2018

@GrahamcOfBorg build makeself

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: makeself

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/6vinvl5va09gwd5zi5s7g54xs9ns0l93-makeself-2.4.0
gzipping man pages under /nix/store/6vinvl5va09gwd5zi5s7g54xs9ns0l93-makeself-2.4.0/share/man/
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/6vinvl5va09gwd5zi5s7g54xs9ns0l93-makeself-2.4.0/bin
patching script interpreter paths in /nix/store/6vinvl5va09gwd5zi5s7g54xs9ns0l93-makeself-2.4.0
/nix/store/6vinvl5va09gwd5zi5s7g54xs9ns0l93-makeself-2.4.0/bin/makeself: interpreter directive changed from "/bin/sh" to "/nix/store/nii7pk6pv4x4as7vsxbvwyzjn67vax6r-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/6vinvl5va09gwd5zi5s7g54xs9ns0l93-makeself-2.4.0...
/nix/store/6vinvl5va09gwd5zi5s7g54xs9ns0l93-makeself-2.4.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: makeself

Partial log (click to expand)

building
no Makefile, doing nothing
installing
post-installation fixup
gzipping man pages under /nix/store/wjyafajb8px90z6qcc7vysf5w2w3cgh4-makeself-2.4.0/share/man/
strip is /nix/store/9xjkb4xz0b5lmizij9ppxy7lkxdxhx6b-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/wjyafajb8px90z6qcc7vysf5w2w3cgh4-makeself-2.4.0/bin
patching script interpreter paths in /nix/store/wjyafajb8px90z6qcc7vysf5w2w3cgh4-makeself-2.4.0
/nix/store/wjyafajb8px90z6qcc7vysf5w2w3cgh4-makeself-2.4.0/bin/makeself: interpreter directive changed from "/bin/sh" to "/nix/store/f2lp21azk4w88f17zgf4mji64agb18ga-bash-4.4-p23/bin/sh"
/nix/store/wjyafajb8px90z6qcc7vysf5w2w3cgh4-makeself-2.4.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: makeself

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/c41siiz03raj8m1frql25gq7b8xry4kr-makeself-2.4.0
gzipping man pages under /nix/store/c41siiz03raj8m1frql25gq7b8xry4kr-makeself-2.4.0/share/man/
strip is /nix/store/428gs2z4b8f9byvghzlpbjwjb3a7jwxx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/c41siiz03raj8m1frql25gq7b8xry4kr-makeself-2.4.0/bin
patching script interpreter paths in /nix/store/c41siiz03raj8m1frql25gq7b8xry4kr-makeself-2.4.0
/nix/store/c41siiz03raj8m1frql25gq7b8xry4kr-makeself-2.4.0/bin/makeself: interpreter directive changed from "/bin/sh" to "/nix/store/017xymp5i03qzigafnfx7sgf6602gmzq-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/c41siiz03raj8m1frql25gq7b8xry4kr-makeself-2.4.0...
/nix/store/c41siiz03raj8m1frql25gq7b8xry4kr-makeself-2.4.0

@Mic92 Mic92 merged commit 4e18bc8 into NixOS:master Oct 3, 2018
@Mic92
Copy link
Member

Mic92 commented Oct 3, 2018

backport: 37564578ace

@Mic92
Copy link
Member

Mic92 commented Oct 3, 2018

this one is the actual backport: 536f6e8

@kini kini deleted the makeself branch July 31, 2020 23:47
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