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

pyslurm: bump to unbreak #33640

Merged
merged 1 commit into from Jan 9, 2018
Merged

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Jan 9, 2018

Fixes: bd9512f ('slurm: 17.02.6 -> 17.02.9 for CVE-2017-15566')

Motivation for this change

Update is needed to make pyslurm work with never slurm.

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.

@@ -6,12 +6,10 @@ buildPythonPackage rec {
src = fetchFromGitHub {
repo = "pyslurm";
owner = "PySlurm";
rev = "69e4f4fd66003b98ddb7da25613fe641d4ae160d";
sha256 = "051kafkndbniklxyf0drb360aiblnqcf9rqjbvmqh66zrfya1m28";
rev = "a2acbc820da419e308c5817998d2abe78a7b75e6";
Copy link
Member

Choose a reason for hiding this comment

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

There was a version bump in the upstream repo just yesterday (PySlurm/pyslurm@f717492). Can't you use that?

Also adding the version to the name attribute would probably be good.

Copy link
Member Author

Choose a reason for hiding this comment

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

@andir No I can’t. The version I chose matching slurm 17.02. The latest pyslurm will require slurm 17.11

Also note that this targets stable.

Copy link
Member

Choose a reason for hiding this comment

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

ok, makes sense.

@andir
Copy link
Member

andir commented Jan 9, 2018

@GrahamcOfBorg build python3Packages.pyslurm python2Packages.pyslurm

@andir
Copy link
Member

andir commented Jan 9, 2018

@veprbl Are you able to get the package tests working? It seems like you have to add nose to checkInputs and define checkPhase = "cd ..; nose pyslurm-${src.rev}-src/tests"but then the tests fail. I haven't used pyslurm or slurm before so maybe you have an idea.

We will also need this patch or a bump (of both packges) on master.

@veprbl
Copy link
Member Author

veprbl commented Jan 9, 2018

@andir I don't think you can test this in checkPhase as it requires a running server.

Fixes: bd9512f ('slurm: 17.02.6 -> 17.02.9 for CVE-2017-15566')
@veprbl
Copy link
Member Author

veprbl commented Jan 9, 2018

@GrahamcOfBorg build python3Packages.pyslurm python2Packages.pyslurm

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: aarch64-linux

error: while evaluating the attribute 'buildInputs' of the derivation 'python3.6-pyslurm-20171102' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/stdenv/generic/make-derivation.nix:98:11:
while evaluating the attribute 'nativeBuildInputs' of the derivation 'python3.6-Cython-0.26.1' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/stdenv/generic/make-derivation.nix:98:11:
while evaluating the attribute 'buildInputs' of the derivation 'python3.6-numpy-1.13.3' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/stdenv/generic/make-derivation.nix:98:11:
while evaluating the attribute 'makeFlags' of the derivation 'openblas-0.2.20' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/stdenv/generic/make-derivation.nix:98:11:
while evaluating 'mapAttrsToList' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/lib/attrsets.nix:223:23, called from /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/development/libraries/science/math/openblas/default.nix:103:8:
unsupported system: aarch64-linux

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: x86_64-darwin

Package ‘slurm-17.02.9’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/servers/computing/slurm/default.nix:45 is not supported on ‘x86_64-darwin’, refusing to evaluate.

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

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

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Success for system: x86_64-linux

gcc -pthread -shared build/temp.linux-x86_64-3.6/pyslurm/pyslurm.o -L -L/slurm -L/nix/store/cwxxbpfz2i2j34f3sgmd6vdl6wv98c2s-python3-3.6.4/lib -Wl,--enable-new-dtags,-R/ -Wl,--enable-new-dtags,-R/slurm -lslurmdb -lslurm -lpython3.6m -o /tmp/nix-build-python3.6-pyslurm-20171102.drv-0/pyslurm-a2acbc820da419e308c5817998d2abe78a7b75e6-src/pyslurm/pyslurm.cpython-36m-x86_64-linux-gnu.so
/nix/store/2bsghmis6hrkykcwpkarbk6g4vs7gfck-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/dist.py:351: UserWarning: Normalizing '17.02.0' to '17.2.0'
  normalized_version,

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/z7vvv0524r9zr37d25s2chhnwl7yi67a-python3.6-pyslurm-20171102
/nix/store/418jy3gcafhfx4ms656dbgj36yr43zzj-python2.7-pyslurm-20171102

@veprbl
Copy link
Member Author

veprbl commented Jan 9, 2018

The fix for master: #33656

@andir andir merged commit 95a00e6 into NixOS:release-17.09 Jan 9, 2018
@veprbl
Copy link
Member Author

veprbl commented Jan 9, 2018

@andir Thanks!

@veprbl veprbl deleted the 17.09_pyslurm_fix branch January 9, 2018 17:34
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