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

python3.pkgs.systemd: Fix compatibility with Python 3.10 #178770

Merged
merged 2 commits into from
Jun 25, 2022

Conversation

jtojnar
Copy link
Member

@jtojnar jtojnar commented Jun 23, 2022

Description of changes

Required for fail2ban to start correctly:

systemd/python-systemd#107

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 22.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@jtojnar
Copy link
Member Author

jtojnar commented Jun 23, 2022

Verified that after applying this patch, fail2ban starts without printing the following error on startup:

fail2ban.jail[556855]: INFO Creating new jail 'sshd'
fail2ban.jail[556855]: INFO Jail 'sshd' uses systemd {}
fail2ban.jail[556855]: INFO Initiated 'systemd' backend
fail2ban.filter[556855]: INFO   maxLines: 1
fail2ban.transmitter[556855]: WARNING Command ['server-stream', …] has failed. Received SystemError("PY_SSIZE_T_CLEAN macro must be defined for '#' formats")
fail2ban[556855]: ERROR NOK: ("PY_SSIZE_T_CLEAN macro must be defined for '#' formats",)

@AkechiShiro
Copy link
Contributor

When is this going to be merged ? I'm just having errors with fail2ban due to this I believe, when I just did `nixos-rebuild test --upgrade :

fail2ban-server[64881]: ERROR: cannot import name 'MutableMapping' from 'collections' (/nix/store/6wiycdxh63mk4krdd75db0hshicna6yy-python3-3.10.4/li>

@mweinelt mweinelt merged commit c1c655b into NixOS:master Jun 25, 2022
@jtojnar jtojnar deleted the pysystemd branch June 26, 2022 15:01
@AkechiShiro
Copy link
Contributor

Thanks !

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.

4 participants