Bug 1066666

Summary: plymouth-branding-openSUSE scriptlet error causes Kiwi builds to fail
Product: [openSUSE] openSUSE Tumbleweed Reporter: S. B. <sb56637>
Component: BasesystemAssignee: Stephan Kulow <coolo>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: mchang, sb56637
Version: CurrentFlags: sb56637: needinfo? (mchang)
Target Milestone: ---   
Hardware: Other   
OS: Other   
See Also: https://bugzilla.opensuse.org/show_bug.cgi?id=911580
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description S. B. 2017-11-06 12:36:44 UTC
Hi,

I'm trying to build a Tumbleweed image using Kiwi on a Leap 42.3 system. However, this is currently not possible due to the following code in the installation scriptlet of plymouth-branding-openSUSE:

> if [ ! -e /.buildenv ]; then
>     /usr/sbin/plymouth-set-default-theme -R openSUSE

This command requires the kernel configuration of the chroot Kiwi build environment to be the same as that of the host system. Could this code either be eliminated completely, or else add a more complex check to avoid this error?

Related bug #911580

Thanks a lot.
Comment 1 Michael Chang 2017-11-07 07:36:25 UTC
Hi S.B.

I am not the maintainer of Plymouth, nor ever came across the plymouth-set-default-theme script.

AFAIK, the "-R" will rebuild the initrd, which probably needed by kiwi in chroot environment as well to have the image to boot with graphical boot splash capable initrd. In other words it cannot be disabled completely in kiwi's chroot env.

And you mentioned:
 "This command requires the kernel configuration of the chroot Kiwi build environment to be the same as that of the host system"

Do you have any error related to it, I think it will help in understanding the problem better, before reassigning to anyone take more deep look into it.

Thanks.
Comment 2 S. B. 2017-11-08 01:49:56 UTC
Hi Michael, thanks a lot for the reply. Sorry I assumed you were a maintainer for the package, since I saw your name in the changelog of plymouth-branding-openSUSE a while back.

Basically, the problem is that when it sets the default Plymouth theme it calls dracut, and dracut looks for the kernel module directory of the currently running kernel. Since the host system is running Leap 42.3 it's a much different version than it expects. Here's the relevant part of the Kiwi build log:

-----------------------
linux:/ # rpm -i -v --force plymouth-branding-openSUSE-13.3-8.8.noarch.rpm
warning: plymouth-branding-openSUSE-13.3-8.8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 3dbdc284: NOKEY
Preparing packages...
plymouth-branding-openSUSE-13.3-8.8.noarch
dracut: Cannot find module directory /lib/modules/4.4.76-1-default/

dracut: and --no-kernel was not specified
warning: %post(plymouth-branding-openSUSE-13.3-8.8.noarch) scriptlet failed, exit status 1
-----------------------

I would be happy to leave out the plymouth-branding package since I'm using my own Plymouth theme anyway, but even with a JeOS configuration it still gets pulled in as a dependency for some package, not sure which.

Thanks again for looking into this.
Comment 3 Michael Chang 2017-11-08 07:16:22 UTC
I think plymouth-branding-openSUSE should use %posttrans marcos for initrd creation. The macro should proper handling for the chrooted environment. Also it fixed the problem of calling dracut multiple times.
Comment 4 Michael Chang 2017-11-08 07:25:05 UTC
I've added %posttrans to plymouth-branding-openSUSE in this obs project

 https://build.opensuse.org/package/show/home:michael-chang:branches:Base:System/branding-openSUSE

Would it be possible for you to test the package in the repo ?

 https://download.opensuse.org/repositories/home:/michael-chang:/branches:/Base:/System/openSUSE_Factory/

Thanks.
Comment 5 S. B. 2017-11-09 12:43:07 UTC
Hi Michael, 

Wow, very nice! That fixed it! Thanks very much for your fast handling of this bug.
Comment 6 S. B. 2017-11-11 13:24:32 UTC
Hi there, sorry if I closed this bug prematurely. Will the fix be published to Factory and Tumbleweed?
Comment 7 Michael Chang 2017-11-21 06:49:50 UTC
I just created submit request to Factory.

 https://build.opensuse.org/request/show/544044

Thanks.
Comment 8 Stephan Kulow 2018-02-20 11:53:27 UTC
No idea why the bug is assigned to me - it looks fixed