Bug 7204 - When using systemd, rpm postinstall scripts are not run on the target
Summary: When using systemd, rpm postinstall scripts are not run on the target
Status: VERIFIED WORKSFORME
Alias: None
Product: Package Management Issues
Classification: Runtime
Component: RPM (show other bugs)
Version: 1.8
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.0
Assignee: Markus Lehtonen
QA Contact: Alexandru Georgescu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-01-20 16:29 UTC by Saul Wold
Modified: 2015-10-23 07:01 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.