Bug 7204

Summary: When using systemd, rpm postinstall scripts are not run on the target
Product: [Runtime] Package Management Issues Reporter: Saul Wold <sgw>
Component: RPMAssignee: Markus Lehtonen <markus.lehtonen>
Status: VERIFIED WORKSFORME QA Contact: Alexandru Georgescu <alexandru.c.georgescu>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, randy.macleod, ross.burton
Version: 1.8   
Target Milestone: 2.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Saul Wold 2015-01-20 16:29:59 UTC
When systemd is in DISTRO_FEATURES and package management is enabled the postinstall scripts that did not run during the rootfs creation time are not getting run on the target at first boot.  This was seen when the rootfs was being created and the depmodwrapper was not run during creation, and then on the target depmod was not run either, leaving modules uninstalled.
Comment 1 Ross Burton 2015-10-01 15:19:32 UTC
*Definitely* need something in oe-selftest for this.
Comment 2 Markus Lehtonen 2015-10-02 09:25:23 UTC
I was not able to reproduce this. I used openembedded-core, core-image-minimal with the following lines added to local.conf:
IMAGE_FEATURES_append = " package-management"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

I also tried without the two latter lines.
Comment 3 Ross Burton 2015-10-02 10:01:58 UTC
IIRC, in the usual case there are no postinst scripts that need to be deferred.  Pick a random postinst (or write a new recipe) and have it just echo something and exit 1, that should make it run on first boot.
Comment 4 Markus Lehtonen 2015-10-02 10:59:10 UTC
That's exactly what I did.
Comment 5 Ross Burton 2015-10-02 11:02:08 UTC
Awesome.  Closing then.
Comment 6 Alexandru Georgescu 2015-10-23 07:01:22 UTC
verified as per above comments.