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

opensm: 3.3.20 -> 3.3.21 #47732

Merged
merged 2 commits into from Oct 13, 2018
Merged

opensm: 3.3.20 -> 3.3.21 #47732

merged 2 commits into from Oct 13, 2018

Conversation

markuskowa
Copy link
Member

Motivation for this change

Old git source repository was dead. Switched to GitHub. Update to new version.

CC @aij

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.

Old git source repository was dead. Switched to GitHub
@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: opensm

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: opensm

Partial log (click to expand)

shrinking /nix/store/fpldjfpxrzal0cpdgnf6vrp9r4asb1r6-opensm-3.3.21/sbin/osmtest
shrinking /nix/store/fpldjfpxrzal0cpdgnf6vrp9r4asb1r6-opensm-3.3.21/sbin/opensm
gzipping man pages under /nix/store/fpldjfpxrzal0cpdgnf6vrp9r4asb1r6-opensm-3.3.21/share/man/
/nix/store/fpldjfpxrzal0cpdgnf6vrp9r4asb1r6-opensm-3.3.21
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/fpldjfpxrzal0cpdgnf6vrp9r4asb1r6-opensm-3.3.21/lib  /nix/store/fpldjfpxrzal0cpdgnf6vrp9r4asb1r6-opensm-3.3.21/sbin
patching script interpreter paths in /nix/store/fpldjfpxrzal0cpdgnf6vrp9r4asb1r6-opensm-3.3.21
/nix/store/fpldjfpxrzal0cpdgnf6vrp9r4asb1r6-opensm-3.3.21/etc/init.d/opensmd: interpreter directive changed from "/bin/bash" to "/nix/store/nii7pk6pv4x4as7vsxbvwyzjn67vax6r-bash-4.4-p23/bin/bash"
checking for references to /build in /nix/store/fpldjfpxrzal0cpdgnf6vrp9r4asb1r6-opensm-3.3.21...
moving /nix/store/fpldjfpxrzal0cpdgnf6vrp9r4asb1r6-opensm-3.3.21/sbin/* to /nix/store/fpldjfpxrzal0cpdgnf6vrp9r4asb1r6-opensm-3.3.21/bin

@@ -16,6 +17,8 @@ stdenv.mkDerivation rec {

preConfigure = "bash ./autogen.sh";
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this might be a source of problems but this could be simpler:

preConfigure = "./autogen.sh"

Let it be run in the current build env (sandboxed) with the current shell.

Copy link
Member Author

Choose a reason for hiding this comment

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

It should not cause problems but I agree that it is unnecessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

Won't patchShebangs patch it to use bash from the target env instead of the build/native env?

I would expect the bash on the path during the build (preConfigure) to be the one from the build env. Is it not?

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean in a cross compilation environment? That is a good point. I am not sure how that would be handled. The manual does not mention this case (?) Using patchShebangs to patch the build environment is rather common though. In some cases there are bunch of scripts, such that patchShebangs seems to be the obvious choice to fix the build env.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes it's done in plenty of packages.
At the moment the source states:

This setup hook [...] rewrite(s) all script interpreter file names to paths found in $PATH

Seems safe to use it that way.

Copy link
Member Author

Choose a reason for hiding this comment

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

@c0bw3b I am still curious what would actually happen in a cross environment. nativeBuildInputs and buildInputs determine what should be run time and what should be pure build time dependency. These parts should be clear then. However, bash is part of the build env, such that the fixupPhase would write a bash into scripts that belongs to the build env instead the target env?
I am sure nix has some magic going on that fixes it correctly but it is not obvious to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

The build env is sandboxed but still using a bash from the nix store, I'm guessing?

I'm not well-versed in cross-compilation matters but I see that one commit on patch-shebangs.sh to address cross-compile was then reverted.
In any way the nix function patchShebangs will "mask" the complexity and decide what to do when cross-compiling or not.

Copy link
Contributor

Choose a reason for hiding this comment

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

Aha

This setup hook causes the fixup phase to rewrite all script

[...]
`newPath="$(command -v "$(basename "$oldPath")" || true)"

So, as is, it should be fine to use for patching build scripts.

When executed during the fixup phase (in the target env), it will patch to use the target env, but when executed during preConfigure (in the build env), it will actually patch to use the build env.

Copy link
Member Author

Choose a reason for hiding this comment

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

There is the nix magic! Thanks for digging into it.

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: opensm

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

Failure on x86_64-linux (full log)

Attempted: opensm

Partial log (click to expand)

copying path '/nix/store/6xyhmj341yd2182977g9j17jr5nhfg4j-rdma-core-20' from 'https://cache.nixos.org'...
building '/nix/store/7667vpk28h7lakp9lrdhw4q26s8mvb6p-opensm-3.3.21.drv'...
unpacking sources
unpacking source archive /nix/store/108rk5hb9w44rrmb0aizn1fmylg3a4b1-source
source root is source
patching sources
configuring
/nix/store/2hjlb5wim3ghl2p1r65bb49y06ckd3g1-stdenv-linux/setup: ./autogen.sh: /bin/bash: bad interpreter: No such file or directory
builder for '/nix/store/7667vpk28h7lakp9lrdhw4q26s8mvb6p-opensm-3.3.21.drv' failed with exit code 126
error: build of '/nix/store/7667vpk28h7lakp9lrdhw4q26s8mvb6p-opensm-3.3.21.drv' failed

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: opensm

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: opensm

Partial log (click to expand)

shrinking /nix/store/304m5agfr9971g1zp69kkgz1sjkk0yx9-opensm-3.3.21/sbin/opensm
shrinking /nix/store/304m5agfr9971g1zp69kkgz1sjkk0yx9-opensm-3.3.21/sbin/osmtest
gzipping man pages under /nix/store/304m5agfr9971g1zp69kkgz1sjkk0yx9-opensm-3.3.21/share/man/
strip is /nix/store/dxf1m7dhc4qb655bdljc1fsd74v1nag3-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/304m5agfr9971g1zp69kkgz1sjkk0yx9-opensm-3.3.21/lib  /nix/store/304m5agfr9971g1zp69kkgz1sjkk0yx9-opensm-3.3.21/sbin
patching script interpreter paths in /nix/store/304m5agfr9971g1zp69kkgz1sjkk0yx9-opensm-3.3.21
/nix/store/304m5agfr9971g1zp69kkgz1sjkk0yx9-opensm-3.3.21/etc/init.d/opensmd: interpreter directive changed from "/bin/bash" to "/nix/store/nii7pk6pv4x4as7vsxbvwyzjn67vax6r-bash-4.4-p23/bin/bash"
checking for references to /build in /nix/store/304m5agfr9971g1zp69kkgz1sjkk0yx9-opensm-3.3.21...
moving /nix/store/304m5agfr9971g1zp69kkgz1sjkk0yx9-opensm-3.3.21/sbin/* to /nix/store/304m5agfr9971g1zp69kkgz1sjkk0yx9-opensm-3.3.21/bin
/nix/store/304m5agfr9971g1zp69kkgz1sjkk0yx9-opensm-3.3.21

Copy link
Contributor

@c0bw3b c0bw3b left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@aij aij left a comment

Choose a reason for hiding this comment

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

LGTM

@7c6f434c 7c6f434c merged commit c60e8f4 into NixOS:master Oct 13, 2018
@7c6f434c
Copy link
Member

@domenkozar @rbvermaa @edolstra https://discourse.nixos.org/t/the-best-way-to-attract-attention-to-issues-and-pull-requests/1130/14 — giving @markuskowa commit access is indeed a good idea.

@markuskowa markuskowa deleted the opensm-up branch October 13, 2018 07:14
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

5 participants