#23 Postinst scripts for dpkg fail on Silverblue (rpm-ostree)
Closed 2 years ago by tpopela. Opened 4 years ago by kxra.

Also reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1817258

Description of problem:

Installation of dpkg (or packages which depend on it) fails on dpkg postinst:

$ rpm-ostree install debootstrap
Checking out tree d439acf... done
Enabled rpm-md repositories: fedora-cisco-openh264 jkonecny-kakoune fedora-modular updates-modular updates code fedora
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2020-03-17T20:10:45Z
rpm-md repo 'jkonecny-kakoune' (cached); generated: 2020-03-25T05:30:03Z
rpm-md repo 'fedora-modular' (cached); generated: 2020-03-24T09:52:57Z
rpm-md repo 'updates-modular' (cached); generated: 2018-02-20T19:18:14Z
rpm-md repo 'updates' (cached); generated: 2018-02-20T19:18:14Z
rpm-md repo 'code' (cached); generated: 2020-03-24T19:34:14Z
rpm-md repo 'fedora' (cached); generated: 2020-03-24T11:21:48Z
Importing rpm-md... done
Resolving dependencies... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
error: Running %post for dpkg: Executing bwrap(/bin/sh): Child process killed by signal 1; run journalctl -t 'rpm-ostree(dpkg.post)' for more information

$ journalctl -t 'rpm-ostree(dpkg.post)'
rpm-ostree(dpkg.post)[14711]: touch: cannot touch '/var/lib/dpkg/diversions': No such file or directory
rpm-ostree(dpkg.post)[14713]: touch: cannot touch '/var/lib/dpkg/statoverride': No such file or directory
rpm-ostree(dpkg.post)[14714]: touch: cannot touch '/var/lib/dpkg/status': No such file or directory
rpm-ostree(dpkg.post)[14715]: touch: cannot touch '/var/log/dpkg.log': No such file or directory
rpm-ostree(dpkg.post)[14716]: chmod: cannot access '/var/log/dpkg.log': No such file or directory
rpm-ostree(dpkg.post)[14719]: chown: cannot access '/var/log/dpkg.log': No such file or directory

How reproducible:
$ rpm-ostree install dpkg

Steps to Reproduce:
1. Install dpkg on Fedora Silverblue

Actual results:
postinst scripts are incompatible with rpm-ostree.
Error

Expected results:
postinst stcripts are compatible with rpm-ostree.
Success!

Additional info:


seems /var/lib/ and '/var/log doesn't exist , should require filesystem-3.12 ?

$ rpm -q filesystem
filesystem-3.14-2.fc32.x86_64

/var/lib and /var/log exist, and I was able to touch the specific files myself, but my understanding was that the issue is that packages don't have direct access to those directories under Silverblue.

rpm-ostree(dpkg.post)[14715]: touch: cannot touch '/var/log/dpkg.log': No such file or directory

Why ? script is here : https://src.fedoraproject.org/rpms/dpkg/blob/master/f/dpkg.spec#_244

Thanks, linked my report there

I see a similar issue with trying to install light, I've since switched to brightnessctl, which seems to work for my needs. But still see an issue.

❯ rpm-ostree install light
Checking out tree 5b934fe... done
Enabled rpm-md repositories: rpmfusion-free-updates rpmfusion-nonfree fedora tlp-updates rpmfusion-nonfree-updates tlp updates copr:copr.fedorainfracloud.org:alwaysrookie:sway rpmfusion-free copr:copr.fedorainfracloud.org:pschyska:alacritty
rpm-md repo 'rpmfusion-free-updates' (cached); generated: 2020-03-27T11:20:07Z
rpm-md repo 'rpmfusion-nonfree' (cached); generated: 2019-10-22T10:43:47Z
rpm-md repo 'fedora' (cached); generated: 2019-10-23T22:52:47Z
rpm-md repo 'tlp-updates' (cached); generated: 2019-10-31T04:01:54Z
rpm-md repo 'rpmfusion-nonfree-updates' (cached); generated: 2020-03-27T11:52:35Z
rpm-md repo 'tlp' (cached); generated: 2019-10-31T04:01:46Z
rpm-md repo 'updates' (cached); generated: 2020-04-01T01:37:45Z
rpm-md repo 'copr:copr.fedorainfracloud.org:alwaysrookie:sway' (cached); generated: 2020-04-01T05:54:01Z
rpm-md repo 'rpmfusion-free' (cached); generated: 2019-10-22T10:21:36Z
rpm-md repo 'copr:copr.fedorainfracloud.org:pschyska:alacritty' (cached); generated: 2020-04-01T11:35:26Z
Importing rpm-md... done
Resolving dependencies... done
Will download: 1 package (41.8 kB)
Downloading from 'updates'... done
Importing packages... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
error: Running %post for light: Executing bwrap(/bin/sh): Child process killed by signal 1; run `journalctl -t 'rpm-ostree(light.post)'` for more information
❯ journalctl -t 'rpm-ostree(light.post)'
Apr 01 10:53:39 bx1-ack rpm-ostree(light.post)[6283]: chown: cannot access '/etc/light': No such file or directory

Different pathing, so maybe this needs it's own issue?

Metadata Update from @tpopela:
- Issue status updated to: Closed (was: Open)

2 years ago

Done: https://github.com/fedora-silverblue/issue-tracker/issues/157

On Thu, Apr 29, 2021 at 12:42 PM Tomas Popela pagure@pagure.io wrote:

The status of the issue: Postinst scripts for dpkg fail on Silverblue (rpm-ostree) of project: fedora-silverblue has been updated to: Closed
by tpopela.

https://pagure.io/fedora-silverblue/issue/23

Login to comment on this ticket.

Metadata