Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing kernel-automotive with kernel-automotive-debug package fails during %posttrans #4057

Closed
BeeGrech opened this issue Sep 27, 2022 · 6 comments

Comments

@BeeGrech
Copy link

BeeGrech commented Sep 27, 2022

Host system details
this is applicable to both x86_64 and aarch64

# rpm-ostree status
State: idle
Deployments:
● auto-sig:rhel9/x86_64/qemu-qa
                  Version: $distro_version (2022-09-27T08:00:44Z)
                   Commit: 93159dfbeaf358c7d044d60fa4ad734a6934bba2cc4d7c493029291aeb1da5f8
[root@localhost ~]# rpm -q rpm-ostree
rpm-ostree-2022.13-1.el9.x86_64

Actual behavior

# rpm-ostree override remove kernel-automotive kernel-automotive-core kernel-automotive-modules --install kernel-automotive-debug-5.14.0-168.130.el9iv.x86_64.rpm --install kernel-automotive-debug-core-5.14.0-168.130.el9iv.x86_64.rpm --install kernel-automotive-debug-modules-5.14.0-168.130.el9iv.x86_64.rpm
...
error: Running %posttrans for kernel-automotive-debug-modules: bwrap(/bin/sh): Child process killed by signal 1; run `journalctl -t 'rpm-ostree(kernel-automotive-debug-modules.posttrans)'` for more information

Expected:

one note here it would be nice to support wildcard calling of local directory packages with override replace like
# rpm-ostree override remove kernel-automotive kernel-automotive-core kernel-automotive-modules --install ./kernel-automotive-debug*

however, initial command provided in actual output above expected would be successful replacement of the default kernel with the new debug kernel
...
Success!

Additional log info

Sep 27 13:38:32 localhost.localdomain rpm-ostree(kernel-automotive-debug-modules.posttrans)[9778]: Running: dracut -f --kver 5.14.0-168.130.el9iv.x86_64+debug
Sep 27 13:38:32 localhost.localdomain rpm-ostree(kernel-automotive-debug-modules.posttrans)[9799]: /usr/bin/dracut: line 1054: /sys/module/firmware_class/parameters/path: No such file or directory
Sep 27 13:38:32 localhost.localdomain rpm-ostree(kernel-automotive-debug-modules.posttrans)[9782]: dracut: Can't write to /boot: Directory /boot does not exist or is not accessible.

Would you like to work on the issue?

someone else

@BeeGrech
Copy link
Author

# rpm -q kernel-automotive*
kernel-automotive-debug-5.14.0-168.130.el9iv.aarch64
kernel-automotive-debug-core-5.14.0-168.130.el9iv.aarch64
kernel-automotive-debug-modules-5.14.0-168.130.el9iv.aarch64

# uname -r
5.14.0-168.130.el9iv.aarch64

Image appears to be left in a bad state as uname -r should return {version} + debug

@jlebon
Copy link
Member

jlebon commented Sep 28, 2022

Is kernel-automotive-debug-modules doing something different in its scriptlet than e.g. kernel-debug-modules? I don't think we've encountered that issue for other modules kernel subpackages, include their debug versions.

@BeeGrech
Copy link
Author

BeeGrech commented Sep 29, 2022

this is what I got back from dev team on kernel-automotive...
In other words, we should expect the same package from RT. A low probability of significant differences.
Have you tested RT at all?

@jlebon
Copy link
Member

jlebon commented Oct 12, 2022

@jlebon
Copy link
Member

jlebon commented Oct 13, 2022

The proper fix for this is in kernel packaging. I added a more detailed explanation in https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2097#note_1134727559. That said, we should probably consider in rpm-ostree also neutering dracut like we do systemctl (though ideally, we'd detect that it was attempted to be run, and automatically enable the initramfs regeneration bits in the upgrader).

@travier
Copy link
Member

travier commented Oct 10, 2023

As this has been fixed upstream and is one year old now, I think it should be safe to close. Let us know if this is still an issue. Thanks

@travier travier closed this as completed Oct 10, 2023
bella485 pushed a commit to bella485/centos-stream-9 that referenced this issue May 1, 2024
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/1494

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2134215  
Upstream Status: RHEL-only

The other scriptlets which inspect or delete this file expect it to have
the `+SUBPKG` suffix. Looking at the original patch introducing this
line, I think that was the intent, but here we need to use `%{?-v}`
instead of `%{?1}` since unlike in the other places the file is
referenced, the subpackage is a flagged macro parameter rather than
positional.

Fixes e815131473e4 ("redhat: spec: trigger dracut when modules are
installed separately").

Fixes: coreos/rpm-ostree#4057

Signed-off-by: Scott Weaver <scweaver@redhat.com>

Approved-by: Jan Stancek <jstancek@redhat.com>
Approved-by: Herton R. Krzesinski <herton@redhat.com>

Signed-off-by: Scott Weaver <scweaver@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants