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

pythonPackages.capstone: 3.0.4 -> 3.0.5 #64930

Merged
merged 1 commit into from Aug 17, 2019

Conversation

Pamplemousse
Copy link
Member

@Pamplemousse Pamplemousse commented Jul 16, 2019

  • Added setupPyBuildFlags to avoid the error
    ERROR: capstone-3.0.5.post1-py3-none-manylinux1_x86_64.whl is not a supported wheel on this platform.

Motivation for this change

There is an updated version of Capstone available: https://github.com/aquynh/capstone/releases/tag/3.0.5 .

Things done
  • Tested using sandboxing (nix.useSandbox on 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)
    There does not seem to be any for this package
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
    I think... not sure how to interpret the output (see bottom of this comment)
  • Tested execution of all binary files (usually in ./result/bin/)
    Ha, I do not have a ./result/bin... :/
  • Determined the impact on package closure size (by running nix path-info -S before and after)
    This command returns the following: error: Please be informed that this pseudo-package is not the only part of Nixpkgs that fails to evaluate. [...]
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

the log of `nix-shell -p nix-review --run "nix-review wip"`
nix-shell -p nix-review --run "nix-review wip"                            
these paths will be fetched (0.03 MiB download, 0.10 MiB unpacked):
  /nix/store/syhnxfx4i3rl2bfxj3hlmhsrkd8vv36a-nix-review-2.0.1                                                                             
copying path '/nix/store/syhnxfx4i3rl2bfxj3hlmhsrkd8vv36a-nix-review-2.0.1' from 'https://cache.nixos.org'...                              
$ git fetch --force https://github.com/NixOS/nixpkgs master:refs/nix-review/0                                                              
remote: Enumerating objects: 1350, done. 
remote: Counting objects: 100% (1350/1350), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 2267 (delta 1326), reused 1334 (delta 1320), pack-reused 917                                                                 
Receiving objects: 100% (2267/2267), 998.49 KiB | 19.97 MiB/s, done.
Resolving deltas: 100% (1642/1642), completed with 566 local objects.
From https://github.com/NixOS/nixpkgs     
 * [new branch]              master     -> refs/nix-review/0
$ git worktree add /home/pamplemousse/.cache/nix-review/rev-ac58f318bc3ec864fe060dc1462f55526e69c262-dirty/nixpkgs 5bf68e1354d2a6ad3663c8296
75ddf90b6996e24                                                                                                                            
Preparing worktree (detached HEAD 5bf68e1354d)                                                                                             
Checking out files: 100% (19281/19281), done.                                                                                              
HEAD is now at 5bf68e1354d Merge #64742: firefox 67 -> 68, and related updates                                                             
$ nix-env -f /home/pamplemousse/.cache/nix-review/rev-ac58f318bc3ec864fe060dc1462f55526e69c262-dirty/nixpkgs -qaP --xml --out-path --show-tr
ace                                           
No diff detected, stopping review...   
$ git worktree prune 

  * Tested the package build
    - *NOT* tested the packages relying on capstone...
  * Added `setupPyBuildFlags` to avoid the error
  "ERROR: capstone-3.0.5.post1-py3-none-manylinux1_x86_64.whl is not a
  supported wheel on this platform."
@Pamplemousse
Copy link
Member Author

Oh, the Nixpkgs Contributors Guide propose another command to test the compilation of packages depending on the changes than the one in the PR template:

nix-shell -p nox --run "nox-review pr 64930"
VS
nix-shell -p nix-review --run "nix-review wip"
The former one gives me the following error.
these derivations will be built:
  /nix/store/w2zqlsd8kwlpv0nbn30zvq7czrclpnai-python2.7-capstone-3.0.5.post1.drv
  /nix/store/7rhlv137jw1iry4g5997qig4zkpb7y76-python2.7-ROPGadget-5.4.drv
  /nix/store/0q1567qkngldrsvm2yrq2l1gvi9hli3l-python2.7-pwntools-3.12.0.drv
  /nix/store/ghbi23wjv6qxflwqdjd4v8lzl058wfcx-python2.7-filebytes-0.9.20.drv
  /nix/store/206rh39s3fai92n7mqnhaglr0cl59mlz-ropper-1.12.1.drv
  /nix/store/yaj6jnzmhnp65kbbd93853mzkvlnq02k-python3.7-capstone-3.0.5.post1.drv
  /nix/store/l0cj2k5ir73r8cwm0q9lf65nby96szmm-python3.7-ROPGadget-5.4.drv
  /nix/store/pi6s5jq83l74s2mhid8d79bfhli1zna2-ropper-1.12.1.drv
  /nix/store/v5afqybqy5iav9ip416nx23hiksz777l-pwndbg-2019.01.25.drv
building '/nix/store/w2zqlsd8kwlpv0nbn30zvq7czrclpnai-python2.7-capstone-3.0.5.post1.drv'...
building '/nix/store/yaj6jnzmhnp65kbbd93853mzkvlnq02k-python3.7-capstone-3.0.5.post1.drv'...
building '/nix/store/ghbi23wjv6qxflwqdjd4v8lzl058wfcx-python2.7-filebytes-0.9.20.drv'...
unpacking sources
unpacking source archive /nix/store/ni49ql51av3igv00aydd6ic1xyiy2f1w-capstone-3.0.5.post1.tar.gz
unpacking sources
unpacking source archive /nix/store/ni49ql51av3igv00aydd6ic1xyiy2f1w-capstone-3.0.5.post1.tar.gz
unpacking sources
unpacking source archive /nix/store/gii4liab875vm4hknd60liw8i5558va1-filebytes-0.9.20.tar.gz
source root is filebytes-0.9.20
setting SOURCE_DATE_EPOCH to timestamp 1554497721 of file filebytes-0.9.20/setup.cfg
patching sources
configuring
building
source root is capstone-3.0.5.post1
setting SOURCE_DATE_EPOCH to timestamp 1537994740 of file capstone-3.0.5.post1/src/pkgconfig.mk
patching sources
applying patch /nix/store/jvzqbfqbz88bwg4wib1y30qzr3x34iaj-23fe9f36622573c747e2bab6119ff245437bf276.patch
patching file setup.py
Hunk #1 succeeded at 146 with fuzz 2 (offset 113 lines).
patching script interpreter paths in src/make.sh
source root is capstone-3.0.5.post1
src/make.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/xfghy8ixrhz3kyy6p724iv3cxji088dx-bash-4.4-p23/bin/bash"
setting SOURCE_DATE_EPOCH to timestamp 1537994740 of file capstone-3.0.5.post1/src/pkgconfig.mk
patching sources
applying patch /nix/store/jvzqbfqbz88bwg4wib1y30qzr3x34iaj-23fe9f36622573c747e2bab6119ff245437bf276.patch
patching file setup.py
Hunk #1 succeeded at 146 with fuzz 2 (offset 113 lines).
patching script interpreter paths in src/make.sh
configuring
building
src/make.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/xfghy8ixrhz3kyy6p724iv3cxji088dx-bash-4.4-p23/bin/bash"
configuring
building
Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 3, in <module>
    from pathlib import Path
ImportError: No module named pathlib
builder for '/nix/store/ghbi23wjv6qxflwqdjd4v8lzl058wfcx-python2.7-filebytes-0.9.20.drv' failed with exit code 1
cannot build derivation '/nix/store/206rh39s3fai92n7mqnhaglr0cl59mlz-ropper-1.12.1.drv': 1 dependencies couldn't be built
error: build of '/nix/store/0q1567qkngldrsvm2yrq2l1gvi9hli3l-python2.7-pwntools-3.12.0.drv', '/nix/store/206rh39s3fai92n7mqnhaglr0cl59mlz-ropper-1.12.1.drv', '/nix/store/7rhlv137jw1iry4g5997qig4zkpb7y76-python2.7-ROPGadget-5.4.drv', '/nix/store/l0cj2k5ir73r8cwm0q9lf65nby96szmm-python3.7-ROPGadget-5.4.drv', '/nix/store/pi6s5jq83l74s2mhid8d79bfhli1zna2-ropper-1.12.1.drv', '/nix/store/v5afqybqy5iav9ip416nx23hiksz777l-pwndbg-2019.01.25.drv', '/nix/store/w2zqlsd8kwlpv0nbn30zvq7czrclpnai-python2.7-capstone-3.0.5.post1.drv', '/nix/store/yaj6jnzmhnp65kbbd93853mzkvlnq02k-python3.7-capstone-3.0.5.post1.drv' failed
The invocation of "nix-build -A python27Packages.pwntools -A python37Packages.capstone -A python27Packages.ropper -A pwndbg -A python27Packages.ROPGadget -A python37Packages.ropper -A python37Packages.ROPGadget -A python27Packages.capstone /home/pamplemousse/.nox/nixpkgs" failed

Investigating :)

@Pamplemousse
Copy link
Member Author

It seems that ropper is the one failing to build for me.
But that's already the case for the latest change in ropper...

@artemist @FRidh: Shouldn't the ropper declaration specify a build dependency on pathlib?

@Pamplemousse
Copy link
Member Author

Pamplemousse commented Jul 16, 2019

This seems to be an issue in ropper's chain of dependencies.
Indeed, ropper relies on filebytes, that has been updated to remove its dependency to pathlib...

Working on a patch to bump its nixpkgs version to 0.9.21 .

@Pamplemousse
Copy link
Member Author

CC @bennofs .

@FRidh FRidh merged commit 4edfccc into NixOS:master Aug 17, 2019
@Pamplemousse Pamplemousse deleted the update_capstone branch November 14, 2019 22:23
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