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

src/libpriv: Add kernel-install-integration #5209

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile-rpm-ostree.am
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ install-rpmostree-hook:
ln -Tsr -f $(DESTDIR)$(bindir)/rpm-ostree $(ostreeextdir)/ostree-ima-sign
ln -Tsr -f $(DESTDIR)$(bindir)/rpm-ostree $(ostreeextdir)/ostree-provisional-repair
ln -Tsr -f $(DESTDIR)$(bindir)/rpm-ostree $(ostreeextdir)/ostree-container
install -D -m 0755 -t $(DESTDIR)/usr/lib/kernel/install.d $(srcdir)/src/libpriv/05-rpmostree.install
INSTALL_EXEC_HOOKS += install-rpmostree-hook

# Wraps `cargo test`. This is always a debug non-release build;
Expand Down
1 change: 1 addition & 0 deletions packaging/rpm-ostree.spec
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ $PYTHON autofiles.py > files \
'%{_datadir}/dbus-1/system.d/*' \
'%{_sysconfdir}/rpm-ostreed.conf' \
'%{_prefix}/lib/systemd/system/*' \
'%{_prefix}/lib/kernel/install.d/*' \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this is wrong:

[2025-01-10T22:15:10.770Z] error: Installed (but unpackaged) file(s) found:
[2025-01-10T22:15:10.770Z]    /lib/kernel/install.d/05-rpmostree.install

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because it was installed to /lib, not /usr/lib (it's a symlink in the real system, but not in the RPM). IMO we should always prefer writing to /usr/lib so change the Makefile.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why this resolves the container build failing and I double checked and the file is in the correct place. Will do more manual testing before merging this. Because is weird that now even the container-integration tests has no issue removing the old kernel.

'%{_libexecdir}/rpm-ostree*' \
%if %{with ostree_ext}
'%{_libexecdir}/libostree/ext/*' \
Expand Down
3 changes: 3 additions & 0 deletions src/libpriv/05-rpmostree.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/bash
# This is the hook that has kernel-install call into rpm-ostree kernel-install
exec /usr/bin/rpm-ostree kernel-install "$@"
Loading