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

pgadmin4: fix service start issue #353092

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

andrevmatos
Copy link
Member

systemd service unit currently fails with requiring pkg_resources to be available:

systemd[1]: Starting pgadmin.service...
pgadmin-pre-start[2114]: Traceback (most recent call last):
pgadmin-pre-start[2114]:   File "/nix/store/11clxms2cwnz31wvdfpadmkpqs843q2z-pgadmin-8.12/bin/.pgadmin4-cli-wrapped", line 6, in <module>
pgadmin-pre-start[2114]:     from pgadmin4.setup import app
pgadmin-pre-start[2114]:   File "/nix/store/11clxms2cwnz31wvdfpadmkpqs843q2z-pgadmin-8.12/lib/python3.12/site-packages/pgadmin4/setup.py", line 32, in <module>
pgadmin-pre-start[2114]:     import config
pgadmin-pre-start[2114]:   File "/nix/store/11clxms2cwnz31wvdfpadmkpqs843q2z-pgadmin-8.12/lib/python3.12/site-packages/pgadmin4/config.py", line 33, in <module>
pgadmin-pre-start[2114]:     from pgadmin.utils import env, IS_WIN, fs_short_path
pgadmin-pre-start[2114]:   File "/nix/store/11clxms2cwnz31wvdfpadmkpqs843q2z-pgadmin-8.12/lib/python3.12/site-packages/pgadmin4/pgadmin/__init__.py", line 32, in <module>
pgadmin-pre-start[2114]:     from flask_security import Security, SQLAlchemyUserDatastore, current_user
pgadmin-pre-start[2114]:   File "/nix/store/rpp6k594x68s4w50vngfbg069pyq49lf-python3.12-flask-security-5.5.2/lib/python3.12/site-packages/flask_security/__init__.py", line 16, in <module>
pgadmin-pre-start[2114]:     from .core import (
pgadmin-pre-start[2114]:   File "/nix/store/rpp6k594x68s4w50vngfbg069pyq49lf-python3.12-flask-security-5.5.2/lib/python3.12/site-packages/flask_security/core.py", line 88, in <module>
pgadmin-pre-start[2114]:     from .totp import Totp
pgadmin-pre-start[2114]:   File "/nix/store/rpp6k594x68s4w50vngfbg069pyq49lf-python3.12-flask-security-5.5.2/lib/python3.12/site-packages/flask_security/totp.py", line 18, in <module>
pgadmin-pre-start[2114]:     from passlib.pwd import genword
pgadmin-pre-start[2114]:   File "/nix/store/a920dbsqj9v3qmxlzr8z5qdgaqyfjlk0-python3.12-passlib-1.7.4/lib/python3.12/site-packages/passlib/pwd.py", line 16, in <module>
pgadmin-pre-start[2114]:     import pkg_resources
pgadmin-pre-start[2114]: ModuleNotFoundError: No module named 'pkg_resources'
systemd[1]: pgadmin.service: Control process exited, code=exited, status=1/FAILURE
systemd[1]: pgadmin.service: Failed with result 'exit-code'.
systemd[1]: Failed to start pgadmin.service.

Adding setuptools to propagatedBuildInputs fixes this.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

systemd service unit currently fails with requiring `pkg_resources` to
be available
Copy link
Member

@gador gador left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@gador gador merged commit 988ad2b into NixOS:master Nov 3, 2024
29 of 30 checks passed
@andrevmatos andrevmatos deleted the pgadmin4/fix_pgk_resources branch November 3, 2024 16:11
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.

2 participants