Can't rpm-ostree install rpm package to fedora silverblue

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 :frowning:

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 .

@hannu_t

I had a conversation with my team member about this.

I owe you and all RPM-Docker users an apology.

I did fail to understand the need.

I need to add the bypass into the package where:

  1. If it detects “docker” in the cgroup list, it will not perform any other validation.
  2. If it detexts s6-svscan, binhex, or tiny, it will not perform any other validation.
  3. It will silently exit %pre and %post without performing any further validation – placing its trust in the container to have a valid configuration.
  4. This ensures that it won’t try to force systemd in the container where it clearly can’t exist.

If I’ve missed anything, please say so now so I may get it done in one step.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.