FS#54701 - [systemd] post_install scripts fail on FRESH install due to cryptsetup dependency cycle

Attached to Project: Arch Linux
Opened by AMM (amish) - Wednesday, 05 July 2017, 06:56 GMT
Last edited by Christian Hesse (eworm) - Wednesday, 05 July 2017, 08:21 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Christian Hesse (eworm)
Architecture All
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
While installing fresh Arch linux, pacman reports dependency cycle between systemd and cryptsetup.

Pacman decides to install systemd first, but the commands used inside post_install scripts require libcryptsetup.so.4

Since cryptsetup is not yet installed these 4 commands DO NOT run at all during fresh installation:
systemd-machine-id-setup
systemd-sysusers
journalctl --update-catalog
systemctl enable getty@tty1.service remote-fs.target

Additional info:
* package version(s)
systemd 233-7

* config and/or log files etc.
post_install script can also be found at:
/var/lib/pacman/local/systemd-233-7/install

Steps to reproduce:
Install FRESH Arch linux and see output of pacstrap.

Detailed information can be found at:
https://bbs.archlinux.org/viewtopic.php?id=227939

Setting severity as critical as it breaks FRESH Arch linux installation. (leaves it incomplete)
This task depends upon

Closed by  Christian Hesse (eworm)
Wednesday, 05 July 2017, 08:21 GMT
Reason for closing:  Fixed
Additional comments about closing:  lvm2 2.02.172-2 (and device-mapper 2.02.172-2) in [testing]
Comment by Christian Hesse (eworm) - Wednesday, 05 July 2017, 07:25 GMT
We have:
systemd -> cryptsetup -> device-mapper -> systemd

So where to break the cycle?
Comment by AMM (amish) - Wednesday, 05 July 2017, 07:48 GMT
As far as this case is concerned, in this case cryptsetup should be installed first.(atleast before systemd)

May be device-mapper -> cryptsetup -> systemd in that order?

Because cryptsetup does not have any postinstall scripts which depend on systemd.

But systemd has post_install scripts which depends on libcryptsetup.so.4 and breaks many things. And FRESH installation remain incomplete.

I do not know how pacman decides what will be installed first. I tried looking at pacman code - but could not understand vertex and ancestor thing.(as it required more understanding of other function and variables)
Comment by Christian Hesse (eworm) - Wednesday, 05 July 2017, 08:02 GMT
We can not just change the order, pacman decides that on its own.

This needs to be resolved on packaging. Perhaps making device-mapper depend on libsystemd. But we have to take care nothing else breaks.

Loading...