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

pacman: substitute paths in repo-add #46462

Merged
merged 1 commit into from Sep 11, 2018
Merged

Conversation

lopsided98
Copy link
Contributor

Motivation for this change

The repo-add script assumes bsdtar and openssl are in the path, causing it to fail on NixOS.

Things done

This PR substitutes those instances with the absolute paths.

  • 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 Sep 10, 2018

@GrahamcOfBorg build pacman

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: pacman

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pacman

Partial log (click to expand)

shrinking /nix/store/dg8ywsk71zxza90pgx3vha147y1y813g-pacman-5.1.1/bin/pacman
shrinking /nix/store/dg8ywsk71zxza90pgx3vha147y1y813g-pacman-5.1.1/bin/pacman-conf
shrinking /nix/store/dg8ywsk71zxza90pgx3vha147y1y813g-pacman-5.1.1/bin/cleanupdelta
shrinking /nix/store/dg8ywsk71zxza90pgx3vha147y1y813g-pacman-5.1.1/lib/libalpm.so.11.0.1
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/dg8ywsk71zxza90pgx3vha147y1y813g-pacman-5.1.1/lib  /nix/store/dg8ywsk71zxza90pgx3vha147y1y813g-pacman-5.1.1/bin
patching script interpreter paths in /nix/store/dg8ywsk71zxza90pgx3vha147y1y813g-pacman-5.1.1
/nix/store/dg8ywsk71zxza90pgx3vha147y1y813g-pacman-5.1.1/share/makepkg/lint_config.sh: interpreter directive changed from "/usr/bin/bash" to "/nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/bash"
/nix/store/dg8ywsk71zxza90pgx3vha147y1y813g-pacman-5.1.1/bin/makepkg-template: interpreter directive changed from "/usr/bin/perl" to "/nix/store/q9ajsngf2w3r10dg7b1148wzq1avp4gj-perl-5.28.0/bin/perl"
checking for references to /build in /nix/store/dg8ywsk71zxza90pgx3vha147y1y813g-pacman-5.1.1...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pacman

Partial log (click to expand)

shrinking /nix/store/i5qvmw5mq30lfhsq4gnfv8rh5yfdq63f-pacman-5.1.1/bin/testpkg
shrinking /nix/store/i5qvmw5mq30lfhsq4gnfv8rh5yfdq63f-pacman-5.1.1/bin/vercmp
shrinking /nix/store/i5qvmw5mq30lfhsq4gnfv8rh5yfdq63f-pacman-5.1.1/lib/libalpm.so.11.0.1
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/i5qvmw5mq30lfhsq4gnfv8rh5yfdq63f-pacman-5.1.1/lib  /nix/store/i5qvmw5mq30lfhsq4gnfv8rh5yfdq63f-pacman-5.1.1/bin
patching script interpreter paths in /nix/store/i5qvmw5mq30lfhsq4gnfv8rh5yfdq63f-pacman-5.1.1
/nix/store/i5qvmw5mq30lfhsq4gnfv8rh5yfdq63f-pacman-5.1.1/bin/makepkg-template: interpreter directive changed from "/usr/bin/perl" to "/nix/store/p3cg3qswdvq6vdjigs83did8km5dlqk7-perl-5.28.0/bin/perl"
/nix/store/i5qvmw5mq30lfhsq4gnfv8rh5yfdq63f-pacman-5.1.1/share/makepkg/lint_config.sh: interpreter directive changed from "/usr/bin/bash" to "/nix/store/fqm2x6kiay1q4vg7pqp4wp17bdijlyc3-bash-4.4-p23/bin/bash"
checking for references to /build in /nix/store/i5qvmw5mq30lfhsq4gnfv8rh5yfdq63f-pacman-5.1.1...
/nix/store/i5qvmw5mq30lfhsq4gnfv8rh5yfdq63f-pacman-5.1.1

postFixup = ''
substituteInPlace $out/bin/repo-add \
--replace bsdtar "${libarchive}/bin/bsdtar" \
--replace openssl "${openssl}/bin/openssl" \
Copy link
Member

Choose a reason for hiding this comment

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

I have not found any openssl reference in any file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It used to use openssl for checksums, but switched to coreutils a while ago. We don't need to substitute coreutils programs, right?

Copy link
Member

Choose a reason for hiding this comment

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

It does not not hurt though.

@Mic92 Mic92 merged commit 188314c into NixOS:master Sep 11, 2018
@lopsided98 lopsided98 deleted the pacman-substitute branch September 23, 2018 19:57
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