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

zerobin: update to v1.0.5 #98734

Merged
merged 3 commits into from Mar 29, 2021
Merged

zerobin: update to v1.0.5 #98734

merged 3 commits into from Mar 29, 2021

Conversation

ju1m
Copy link
Contributor

@ju1m ju1m commented Sep 25, 2020

Update zerobin and dependencies which require an update for this.

Motivation for this change

Use latest zerobin.

Things done
  • Update zerobin to latest release: 20160108 => v1.0.5
  • Use buildPythonApplication instead of buildPythonPackage, and replace references in services.zerobin and documentation.
  • Update Beaker: 1.10.1 => 1.11.0
  • Update Paste: 3.4.1 => 3.4.3
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@ento ento left a comment

Choose a reason for hiding this comment

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

(I'm following the PR template's suggestion to review open PRs to pay back/forward the work of reviewing, and this is my first time reviewing a nixpkgs PR. I'll defer to experienced reviewers regarding best practices followed in this repo.)

Reviewed points:

  • Ensure that the commit text fits the guidelines.
  • Built the package locally on Debian/x86_64.
  • Executable runs on Debian/x86_64. (Failed with an error; commented with a diff that made it run)

pkgs/development/python-modules/zerobin/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/zerobin/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/zerobin/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/beaker/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/zerobin/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/zerobin/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/zerobin/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/zerobin/default.nix Outdated Show resolved Hide resolved
@ju1m
Copy link
Contributor Author

ju1m commented Sep 27, 2020

@ento thanks a lot for you extensive reviewing, I wasn't expecting so much help :) I've tried to incorporate all your suggestions in my last push.

doc/languages-frameworks/python.section.md Show resolved Hide resolved
doc/languages-frameworks/python.section.md Show resolved Hide resolved
nixos/modules/services/networking/zerobin.nix Show resolved Hide resolved
pkgs/applications/misc/zerobin/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/beaker/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/zerobin/default.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@ento ento left a comment

Choose a reason for hiding this comment

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

@ju1m Thanks for the updates!

@jonringer @domenkozar @FRidh Could one of you pick up the rest of the review process? As an apprentice reviewer, here's the farthest I'm equipped to contribute :)

Reviewed points so far:

  • Ensure that the commit text fits the guidelines.
  • Built the package locally on Debian/x86_64.
  • Executable runs on Debian/x86_64.

doc/languages-frameworks/python.section.md Outdated Show resolved Hide resolved
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/385

@ju1m
Copy link
Contributor Author

ju1m commented Jan 18, 2021

Removed the commit updating pythonPackages.paste since it has been done in 77fc15d

@ju1m ju1m requested a review from jonringer January 18, 2021 15:44
Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

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

Other then that and the merge conflicts, LGTM.

pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

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

Eval fails currently due to these.

pkgs/applications/networking/zerobin/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/zerobin/default.nix Outdated Show resolved Hide resolved
@ju1m
Copy link
Contributor Author

ju1m commented Mar 4, 2021

Rebased on master, I had to:

  1. disable pyScss's checkPhase.
  2. patch setup.cfg to relax versions of some dependencies.
  3. replace stdenv.lib by lib.

@doronbehar
Copy link
Contributor

Result of nixpkgs-review pr 98734 run on x86_64-linux 1

7 packages built:
  • python38Packages.beaker
  • python38Packages.pyramid_beaker
  • python38Packages.pyscss
  • python39Packages.beaker
  • python39Packages.pyramid_beaker
  • python39Packages.pyscss
  • zerobin

@doronbehar
Copy link
Contributor

doronbehar commented Mar 13, 2021

This is not OK right?

(ins)[nix-shell:~/.cache/nixpkgs-review/pr-98734]$ ./results/zerobin/bin/zerobin --help
Traceback (most recent call last):
  File "/nix/store/44745hzps8f24gch6jx461kilbwk5jc6-zerobin-1.0.5/bin/.zerobin-wrapped", line 6, in <module>
    from zerobin.cli import main
  File "/nix/store/44745hzps8f24gch6jx461kilbwk5jc6-zerobin-1.0.5/lib/python3.8/site-packages/zerobin/cli.py", line 22, in <module>
    from zerobin.routes import get_app
  File "/nix/store/44745hzps8f24gch6jx461kilbwk5jc6-zerobin-1.0.5/lib/python3.8/site-packages/zerobin/routes.py", line 23, in <module>
    from beaker.middleware import SessionMiddleware
  File "/nix/store/jrcqj6iap1565drvcr0b8b3r2fpczfz5-python3.9-Beaker-1.11.0/lib/python3.9/site-packages/beaker/middleware.py", line 11, in <module>
    from beaker.cache import CacheManager
  File "/nix/store/jrcqj6iap1565drvcr0b8b3r2fpczfz5-python3.9-Beaker-1.11.0/lib/python3.9/site-packages/beaker/cache.py", line 15, in <module>
    from beaker.crypto.util import sha1
  File "/nix/store/jrcqj6iap1565drvcr0b8b3r2fpczfz5-python3.9-Beaker-1.11.0/lib/python3.9/site-packages/beaker/crypto/__init__.py", line 5, in <module>
    from beaker.crypto.util import hmac, sha1, hmac_sha1, md5
  File "/nix/store/jrcqj6iap1565drvcr0b8b3r2fpczfz5-python3.9-Beaker-1.11.0/lib/python3.9/site-packages/beaker/crypto/util.py", line 5, in <module>
    from Crypto.Hash import HMAC as hmac, SHA as hmac_sha1
  File "/nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Hash/HMAC.py", line 38, in <module>
    from Crypto.Hash import MD5
  File "/nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Hash/MD5.py", line 29, in <module>
    _raw_md5_lib = load_pycryptodome_raw_lib("Crypto.Hash._MD5",
  File "/nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Util/_raw_api.py", line 308, in load_pycryptodome_raw_lib
    raise OSError("Cannot load native module '%s': %s" % (name, ", ".join(attempts)))
OSError: Cannot load native module 'Crypto.Hash._MD5': Trying '_MD5.cpython-38-x86_64-linux-gnu.so': cannot load library '/nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Util/../Hash/_MD5.cpython-38-x86_64-linux-gnu.so': /nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Util/../Hash/_MD5.cpython-38-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory.  Additionally, ctypes.util.find_library() did not manage to locate a library called '/nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Util/../Hash/_MD5.cpython-38-x86_64-linux-gnu.so', Trying '_MD5.abi3.so': cannot load library '/nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Util/../Hash/_MD5.abi3.so': /nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Util/../Hash/_MD5.abi3.so: cannot open shared object file: No such file or directory.  Additionally, ctypes.util.find_library() did not manage to locate a library called '/nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Util/../Hash/_MD5.abi3.so', Trying '_MD5.so': cannot load library '/nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Util/../Hash/_MD5.so': /nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Util/../Hash/_MD5.so: cannot open shared object file: No such file or directory.  Additionally, ctypes.util.find_library() did not manage to locate a library called '/nix/store/igpkzdypdjfzzj8iz960pcgik51b6mms-python3.9-pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Util/../Hash/_MD5.so'

@ju1m
Copy link
Contributor Author

ju1m commented Mar 13, 2021

@doronbehar , hmm, I cannot reproduce, it works for me. For you it looks like beaker is importing pycryptodome but it then fails to load pycryptodome-3.9.9/lib/python3.9/site-packages/Crypto/Util/../Hash/_MD5.cpython-38-x86_64-linux-gnu.so.
Maybe pycryptodome should be added to the propagatedBuildInputs of beaker, I don't know.
I cannot reproduce even when using python39Packages :/

@ju1m
Copy link
Contributor Author

ju1m commented Mar 13, 2021

@doronbehar, I can reproduce when using nixpkgs-review pr 98734.

@doronbehar
Copy link
Contributor

@doronbehar, I can reproduce when using nixpkgs-review pr 98734.

Then it means you need to rebase this on top of latest master and fix it then.

@doronbehar
Copy link
Contributor

@ju1m I noticed now that the stacktrace I quoted previously had mixed versions of Python used together, and that's probably why it failed. Now I rebased your branch and checked everything once more and zerobin runs fine. Merging.

@doronbehar doronbehar merged commit c2b66f2 into NixOS:master Mar 29, 2021
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