Installation failed if systemd isn't installed: /var/lib/dpkg/info/rsyslog.postinst: 28: /var/lib/dpkg/info/rsyslog.postinst: systemd-tmpfiles: not found

Bug #1766574 reported by Björn Tillenius
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cloud-images
Opinion
Undecided
Unassigned
rsyslog (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Ubuntu Bionic docker container missing Priority: Import; Task:minimal package.

--

If you have an image that doesn't have systemd installed, installing rsyslog fails with the following error:

  /var/lib/dpkg/info/rsyslog.postinst: 28: /var/lib/dpkg/info/rsyslog.postinst: systemd-tmpfiles: not found

If I install the systemd package, the rsyslog installation succeeds.

This is with with version 8.32.0-1ubuntu3 in bionic.

A quick way of reproducing this is to grab the latest docker bionic image and try to install rsyslog in there.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in rsyslog (Ubuntu):
status: New → Confirmed
Revision history for this message
Alberto Donato (ack) wrote :

The steps I used to reproduce are:

  docker run --rm -it ubuntu:bionic /bin/bash

then run

  apt update && apt install rsyslog

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

It is concerning that the docker containers does not have systemd package installed.

I'm not saying that systemd-sysv should be installed and/or init present, but certainly many utils shipped by systemd package are useful in general.

For example, rsyslog's logging directories would not be configured correctly with the right permissions.

Why is systemd deb package not installed in the ubuntu docker container?

description: updated
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

So this is two bugs I believe.

Oficial Ubuntu docker images should container Priority: Important packages & Task: minimal packages.

Rsyslog maintainers script may not indeed rely on systemd-tmpfiles.

But both of these things should be fixed, not either/or.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Can you explain in a bit details, why are you installing rsyslog without an init system? and what do you expect the net result of said action to be? Given that it would not result in rsyslog running at all.

I see the minimal reproducer, but what is the actual top-level goal/use-case here?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

After discussion, it seems to be intentional that bionic docker containers are build as ubuntu-base + minimalized plain. Thus bionic docker images are smaller than xenial.

Changed in cloud-images:
status: New → Opinion
Changed in rsyslog (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Björn Tillenius (bjornt) wrote :

Our use case is mostly to get unit tests to pass. Our unit tests depends on the directory structure that rsyslog sets up. So we're not actually running rsyslog, we just want it set up.

Changed in rsyslog (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rsyslog - 8.32.0-1ubuntu4

---------------
rsyslog (8.32.0-1ubuntu4) bionic; urgency=medium

  [ Jamie Strandboge ]
  * debian/usr.sbin.rsyslogd: updates for bionic (LP: #1766600)
    - allow rsyslog modules in multiarch directories
    - allow writing temporary pidfile

  [ Dimitri John Ledkov ]
  * Tolerate installing rsyslog, on systems without systemd installed. LP:
    #1766574

 -- Dimitri John Ledkov <email address hidden> Tue, 24 Apr 2018 15:47:41 +0100

Changed in rsyslog (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Hj Ahmad Rasyid Hj Ismail (ahrasis) wrote :

I ran update and upgrade just now and the new rsyslog (8.32.0-1ubuntu4) caused error on my server affecting initramfs-tools as well. Running "dpkg --configure -a" and "apt install -f" won't fix it. I hope next fix won't cause other error.

--------------------

Setting up rsyslog (8.32.0-1ubuntu4) ...
awk: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory
dpkg: error processing package rsyslog (--configure):
 installed rsyslog package post-installation script subprocess returned error exit status 127
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
 rsyslog
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.