rpm-ostree install fails because of expicit test on installation script.
$ journalctl -t 'rpm-ostree(plexmediaserver.prein)'
-- Journal begins at Tue 2021-09-07 08:10:56 EEST, ends at Sun 2021-10-31 16:47:28 EET. --
loka 31 11:38:15 hannu-xps rpm-ostree(plexmediaserver.prein)[109382]: Plex Media Server requires systemd. Please upgrade the Operating Sytem version
$ rpm -qp --scripts ~/Lataukset/plexmediaserver-1.24.5.5173-8dcc73a59.x86_64.rpm
varoitus: /var/home/hannu/Lataukset/plexmediaserver-1.24.5.5173-8dcc73a59.x86_64.rpm: Otsikko V4 RSA/SHA1 Signature, key ID 3adca79d: NOKEY
preinstall scriptlet (using /bin/sh):
# Make sure this system is systemd-based. If not, stop here and fail with error code 1.
if [ "$(cat /proc/1/comm)" != "systemd" ]; then
echo "Plex Media Server requires systemd. Please upgrade the Operating Sytem version"
exit 1
fi
This problem has been there for some time and reported before. It’s quite common to install packages to environments which are not running at the time of installing the rpm. If you really want to check systemd; do it at runtime, not like this and definetly not on package installation.
2 years old thread and I’m still sorry for the previous reporter. The team member seemed to intentionally steer the argument off from the problem that the preinstall script should not test systemd this way
Hi,
That “Team Member” is me. It’s perfectly ok to call me out or ask me directly if/when you feel there’s a problem.
The reason for the enforcement of systemd was based on the removal of init which was driven by the incompatibilities of OpenSuSE and that none of the compatible Centos or Fedora distros had “init” capability anymore .
The decision logic in %pre and %post was significantly reduced in complexity by asserting that one test,
Since that time, the DEB packaging has become much more intelligent in that it knows when installing in Docker and suppresses both pre and post install processing upon detecting it’s in a Docker container and defers to trusting the existing Docker environment as valid.
I have always wanted to update the RPM packaging to match that of the DEB packaging but was directed not to as RPM packaging was in maintenance mode (based on the IBM acquisition)
In your opinion, would it be acceptable to upgrade the entire RPM package to be like what I’ve crafted for DEB where it does pre-installation configuration validation based on the host’s configuration ?
That packaging does support being installed/upgraded .