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

pgmanage: fix build #36164

Merged
merged 1 commit into from Mar 1, 2018
Merged

pgmanage: fix build #36164

merged 1 commit into from Mar 1, 2018

Conversation

lsix
Copy link
Member

@lsix lsix commented Mar 1, 2018

Motivation for this change

Recent backport of postgresql to 17.09 broke few things, including pgmanage (https://hydra.nixos.org/eval/1437029). While I do not see why this is related, this fixes pgmanage. I’ll check later how this is affecting master.

The configure script uses the command builtin command which is bash
specific[1] while having a "#!/bin/sh" head.

This forces the use nix default shell (bash)

[1] https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html#Bash-Builtins

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.

@Mic92
Copy link
Member

Mic92 commented Mar 1, 2018

/bin/sh is at the moment an awkward busybox sh in nix 2.0, that's why.

@Mic92
Copy link
Member

Mic92 commented Mar 1, 2018

@GrahamcOfBorg test pgmanage

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

one: exit status 1
syncing
one: running command: sync
one: exit status 0
test script finished in 18.25s
cleaning up
killing one (pid 140)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/tmp/nix-build-vm-test-run-pgmanage.drv-0/vde1.ctl': Directory not empty
/nix/store/2m0bbvby2rbxzq0nwcflk5kq4l96mxd5-vm-test-run-pgmanage

@lsix
Copy link
Member Author

lsix commented Mar 1, 2018

There is a similar problem for pgadmin3. Does it makes sense I spent some time fixing this (for 17.09) or do we just wait for this root error to be fixed?

@Mic92
Copy link
Member

Mic92 commented Mar 1, 2018

@lsix yes, I don't think it will be changed back.

@@ -11,6 +11,10 @@ stdenv.mkDerivation rec {
sha256 = "0g9kvhs9b6kc1s7j90fqv71amiy9v0w5p906yfvl0j7pf3ayq35a";
};

patchPhase = ''
sed -e "s~#!/bin/sh~#!$SHELL ~" -i src/configure
Copy link
Member

Choose a reason for hiding this comment

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

patchShebangs maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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

I did not know of patch Shebangs, I’ll look into it. Based on its name, it should do exactly what I expect it to do.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

Installation Successful
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/badk522ww4jagql7gr1hh0h4ppqp8y4b-pgmanage-10.0.2
shrinking /nix/store/badk522ww4jagql7gr1hh0h4ppqp8y4b-pgmanage-10.0.2/sbin/pgmanage
gzipping man pages under /nix/store/badk522ww4jagql7gr1hh0h4ppqp8y4b-pgmanage-10.0.2/share/man/
stripping (with flags -S) in /nix/store/badk522ww4jagql7gr1hh0h4ppqp8y4b-pgmanage-10.0.2/sbin 
patching script interpreter paths in /nix/store/badk522ww4jagql7gr1hh0h4ppqp8y4b-pgmanage-10.0.2
checking for references to /tmp/nix-build-pgmanage-10.0.2.drv-0 in /nix/store/badk522ww4jagql7gr1hh0h4ppqp8y4b-pgmanage-10.0.2...
moving /nix/store/badk522ww4jagql7gr1hh0h4ppqp8y4b-pgmanage-10.0.2/sbin/* to /nix/store/badk522ww4jagql7gr1hh0h4ppqp8y4b-pgmanage-10.0.2/bin
/nix/store/badk522ww4jagql7gr1hh0h4ppqp8y4b-pgmanage-10.0.2

The configure script uses the `command` builtin command which is bash
specific while having a "#!/bin/sh" head.

This forces the use nix default shell (bash)
@lsix lsix mentioned this pull request Mar 1, 2018
8 tasks
@lsix
Copy link
Member Author

lsix commented Mar 1, 2018

@Mic92 I just fixed it.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

Installation Successful
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/lr706ndfnifdfh65kmhlrf2v2afgrggc-pgmanage-10.0.2
shrinking /nix/store/lr706ndfnifdfh65kmhlrf2v2afgrggc-pgmanage-10.0.2/sbin/pgmanage
gzipping man pages under /nix/store/lr706ndfnifdfh65kmhlrf2v2afgrggc-pgmanage-10.0.2/share/man/
stripping (with flags -S) in /nix/store/lr706ndfnifdfh65kmhlrf2v2afgrggc-pgmanage-10.0.2/sbin
patching script interpreter paths in /nix/store/lr706ndfnifdfh65kmhlrf2v2afgrggc-pgmanage-10.0.2
checking for references to /build in /nix/store/lr706ndfnifdfh65kmhlrf2v2afgrggc-pgmanage-10.0.2...
moving /nix/store/lr706ndfnifdfh65kmhlrf2v2afgrggc-pgmanage-10.0.2/sbin/* to /nix/store/lr706ndfnifdfh65kmhlrf2v2afgrggc-pgmanage-10.0.2/bin
/nix/store/lr706ndfnifdfh65kmhlrf2v2afgrggc-pgmanage-10.0.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

Installation Successful
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/5hj3mnh7jkh3jv5ggz3b884wdfa0672a-pgmanage-10.0.2
shrinking /nix/store/5hj3mnh7jkh3jv5ggz3b884wdfa0672a-pgmanage-10.0.2/sbin/pgmanage
gzipping man pages under /nix/store/5hj3mnh7jkh3jv5ggz3b884wdfa0672a-pgmanage-10.0.2/share/man/
stripping (with flags -S) in /nix/store/5hj3mnh7jkh3jv5ggz3b884wdfa0672a-pgmanage-10.0.2/sbin
patching script interpreter paths in /nix/store/5hj3mnh7jkh3jv5ggz3b884wdfa0672a-pgmanage-10.0.2
checking for references to /build in /nix/store/5hj3mnh7jkh3jv5ggz3b884wdfa0672a-pgmanage-10.0.2...
moving /nix/store/5hj3mnh7jkh3jv5ggz3b884wdfa0672a-pgmanage-10.0.2/sbin/* to /nix/store/5hj3mnh7jkh3jv5ggz3b884wdfa0672a-pgmanage-10.0.2/bin
/nix/store/5hj3mnh7jkh3jv5ggz3b884wdfa0672a-pgmanage-10.0.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

Installation Successful
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/i6j445ngsfsd4vslpj8445086l7smqcy-pgmanage-10.0.2
shrinking /nix/store/i6j445ngsfsd4vslpj8445086l7smqcy-pgmanage-10.0.2/sbin/pgmanage
gzipping man pages under /nix/store/i6j445ngsfsd4vslpj8445086l7smqcy-pgmanage-10.0.2/share/man/
stripping (with flags -S) in /nix/store/i6j445ngsfsd4vslpj8445086l7smqcy-pgmanage-10.0.2/sbin 
patching script interpreter paths in /nix/store/i6j445ngsfsd4vslpj8445086l7smqcy-pgmanage-10.0.2
checking for references to /tmp/nix-build-pgmanage-10.0.2.drv-0 in /nix/store/i6j445ngsfsd4vslpj8445086l7smqcy-pgmanage-10.0.2...
moving /nix/store/i6j445ngsfsd4vslpj8445086l7smqcy-pgmanage-10.0.2/sbin/* to /nix/store/i6j445ngsfsd4vslpj8445086l7smqcy-pgmanage-10.0.2/bin
/nix/store/i6j445ngsfsd4vslpj8445086l7smqcy-pgmanage-10.0.2

@Mic92
Copy link
Member

Mic92 commented Mar 1, 2018

@GrahamcOfBorg test pgmanage

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

one: exit status 1
syncing
one: running command: sync
one: exit status 0
test script finished in 198.48s
cleaning up
killing one (pid 143)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/tmp/nix-build-vm-test-run-pgmanage.drv-0/vde1.ctl': Directory not empty
/nix/store/7lphrmm9sdmd2w7pyg7hh9qzl4d2a5nm-vm-test-run-pgmanage

@globin globin merged commit 159a021 into NixOS:release-17.09 Mar 1, 2018
@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/qi7xks1hdbik3kjl44cdcsw54p1bpyy3-nixos-test-driver
stripping (with flags -S) in /nix/store/qi7xks1hdbik3kjl44cdcsw54p1bpyy3-nixos-test-driver/lib  /nix/store/qi7xks1hdbik3kjl44cdcsw54p1bpyy3-nixos-test-driver/bin
patching script interpreter paths in /nix/store/qi7xks1hdbik3kjl44cdcsw54p1bpyy3-nixos-test-driver
/nix/store/qi7xks1hdbik3kjl44cdcsw54p1bpyy3-nixos-test-driver/bin/.nixos-test-driver-wrapped: interpreter directive changed from " /somewhere/perl -w" to "/nix/store/b5a764yzqpgx03xyhd4kayipzpy84a6m-perl-5.24.3/bin/perl -w"
checking for references to /build in /nix/store/qi7xks1hdbik3kjl44cdcsw54p1bpyy3-nixos-test-driver...
cannot build derivation '/nix/store/mjmh60i2xnr4fv92x6q48rrvy1c60n3i-nixos-test-driver-pgmanage.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/d4h9vhn5rgs835v0rddkga3gh07z4qfr-vm-test-run-pgmanage.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/d4h9vhn5rgs835v0rddkga3gh07z4qfr-vm-test-run-pgmanage.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

cannot build derivation '/nix/store/vxmpamlfmpd1jiir2qa5sr5dlnw7yslf-system-units.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/yavhjwwbyrbb58bgwws0x03q12jwb76f-user-units.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/37m9yhm89lybxxgn3kg5bpivv67jf3ck-etc.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/v73ld84grd10krmgbissq3yxi04kji2h-nixos-system-one-17.09.git.db3b01b.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/lr5dkagf4l8yqf52swz1vxjf5jvah0jc-reginfo.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/53i07qpzkjjnpax7cqzlz30r6icgkr3v-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/k4f24xzacfc09cd0h68pa7s0z4g2viac-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/hi45x31kc3yhfgs55r4rrzvrxb1z93m1-nixos-test-driver-pgmanage.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/49dwvy6l3m7gnh2i6cjksrp0n7402l2s-vm-test-run-pgmanage.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/49dwvy6l3m7gnh2i6cjksrp0n7402l2s-vm-test-run-pgmanage.drv' failed

@lsix lsix deleted the fix-pgmanage branch August 22, 2019 07:50
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

4 participants