Install systemd-python from distribution package

CentOS 8 support start to fail because of an issue [1]
compiling systemd python binding modules.
Let install it from distribution packages as documented by
python-systemd project Web page [2]

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1862714
[2] https://github.com/systemd/python-systemd

Closes-Bug: #1908386
Change-Id: Ic7cfd72ce1b875e75b1cdbdd44a902b25d51abb8
This commit is contained in:
Federico Ressi 2020-12-11 15:40:32 +01:00
parent a9afdb18b4
commit 7e3428b987
5 changed files with 3 additions and 28 deletions

View File

@ -196,31 +196,6 @@ See the `remote-pdb`_ home page for more options.
.. _`remote-pdb`: https://pypi.org/project/remote-pdb/
Known Issues
============
Be careful about systemd python libraries. There are 3 of them on
pypi, and they are all very different. They unfortunately all install
into the ``systemd`` namespace, which can cause some issues.
- ``systemd-python`` - this is the upstream maintained library, it has
a version number like systemd itself (currently ``234``). This is
the one you want.
- ``systemd`` - a python 3 only library, not what you want.
- ``python-systemd`` - another library you don't want. Installing it
on a system will break ansible's ability to run. The package has now
been renamed to ``cysystemd``, which avoids the namespace collision.
If we were using user units, the ``[Service]`` - ``Group=`` parameter
doesn't seem to work with user units, even though the documentation
says that it should. This means that we will need to do an explicit
``/usr/bin/sg``. This has the downside of making the SYSLOG_IDENTIFIER
be ``sg``. We can explicitly set that with ``SyslogIdentifier=``, but
it's really unfortunate that we're going to need this work
around. This is currently not a problem because we're only using
system units.
Future Work
===========

View File

@ -28,6 +28,7 @@ pkg-config
psmisc
python3-dev
python3-pip
python3-systemd
python3-venv
tar
tcpdump

View File

@ -20,10 +20,10 @@ openssl
pcre-devel # python-pcre
postgresql-devel # psycopg2
psmisc
python3-systemd
python-cmd2 # dist:opensuse-12.3
python-devel # pyOpenSSL
python-xml
systemd-devel # for systemd-python
tar
tcpdump
unzip

View File

@ -25,8 +25,8 @@ postgresql-devel # psycopg2
psmisc
python3-devel
python3-pip
python3-systemd
redhat-rpm-config # missing dep for gcc hardening flags, see rhbz#1217376
systemd-devel # for systemd-python
tar
tcpdump
unzip

View File

@ -761,7 +761,6 @@ fixup_all
# Install subunit for the subunit output stream
pip_install -U os-testr
pip_install_gr systemd-python
# the default rate limit of 1000 messages / 30 seconds is not
# sufficient given how verbose our logging is.
iniset -sudo /etc/systemd/journald.conf "Journal" "RateLimitBurst" "0"