Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 879229 - sys-apps/systemd-252 with USE -tpm installs services for pcrphase but not the executable
Summary: sys-apps/systemd-252 with USE -tpm installs services for pcrphase but not the...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal trivial (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-02 23:17 UTC by stealth
Modified: 2023-07-22 20:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stealth 2022-11-02 23:17:47 UTC
the following services are installed and enabled by default:
systemd-pcrphase-initrd.service
systemd-pcrphase-sysinit.service
systemd-pcrphase.service

they rely on systemd-pcrphase executable which is understandably not installed because its related to tpm.
Comment 1 David Sardari 2022-11-02 23:29:24 UTC
I have USE="tpm" set, but had to mask the services as a quick fix for my laptop to be able to bootup with measured boot. systemd-pcrphase-initrd.service at least doesn't have a timeout making my laptop wait indefinitely.
Comment 2 stealth 2022-11-03 00:19:24 UTC
(I have merged /usr and enabled the merged-usr profile so not sure if the paths below should be just /lib or /usr/lib)

I copied the 252 ebuild to my local repo and added:

if ! use tpm; then
    # mask systemd-pcrphase services which depend on tpm
    dosym /dev/null /usr/lib/systemd/system/systemd-pcrphase.service
    dosym /dev/null /usr/lib/systemd/system/systemd-pcrphase-initrd.service
    dosym /dev/null /usr/lib/systemd/system/systemd-pcrphase-sysinit.service
fi

below the if use split-usr conditional in multilib_src_install_all function

systemd is no longer in degraded state after that
Comment 3 David Sardari 2022-11-03 07:14:42 UTC
These are the symlinks I have after using "systemctl mask ...":

❯ find / -xdev -name "systemd-pcrphase*.service" -exec ls -ld {} +
lrwxrwxrwx 1 root root   9  2. Nov 14:58 /etc/systemd/system/systemd-pcrphase-initrd.service -> /dev/null
lrwxrwxrwx 1 root root   9  2. Nov 14:58 /etc/systemd/system/systemd-pcrphase-sysinit.service -> /dev/null
lrwxrwxrwx 1 root root   9  2. Nov 14:58 /etc/systemd/system/systemd-pcrphase.service -> /dev/null
lrwxrwxrwx 1 root root  34  2. Nov 12:35 /usr/lib/systemd/system/initrd.target.wants/systemd-pcrphase-initrd.service -> ../systemd-pcrphase-initrd.service
lrwxrwxrwx 1 root root  35  2. Nov 12:35 /usr/lib/systemd/system/sysinit.target.wants/systemd-pcrphase-sysinit.service -> ../systemd-pcrphase-sysinit.service
lrwxrwxrwx 1 root root  27  2. Nov 12:35 /usr/lib/systemd/system/sysinit.target.wants/systemd-pcrphase.service -> ../systemd-pcrphase.service
-rw-r--r-- 1 root root 959  2. Nov 12:34 /usr/lib/systemd/system/systemd-pcrphase-initrd.service
-rw-r--r-- 1 root root 861  2. Nov 12:34 /usr/lib/systemd/system/systemd-pcrphase-sysinit.service
-rw-r--r-- 1 root root 823  2. Nov 12:34 /usr/lib/systemd/system/systemd-pcrphase.service
Comment 4 Mike Gilbert gentoo-dev 2023-07-22 20:43:28 UTC
It looks like recent systemd releases do not install those unit files when USE="-tpm". Please re-open if this is still an issue.