Bug 1375658 - [PATCH] post: Honor KERNEL_INSTALL_NOOP [NEEDINFO]
Summary: [PATCH] post: Honor KERNEL_INSTALL_NOOP
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-13 15:38 UTC by Colin Walters
Modified: 2020-01-17 22:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
labbott: needinfo? (walters)


Attachments (Terms of Use)

Description Colin Walters 2016-09-13 15:38:24 UTC
From d606b2059db56ff448cb6d6cafa2525f694b4ae6 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters>
Date: Tue, 13 Sep 2016 09:24:32 -0400
Subject: [PATCH] post: Honor KERNEL_INSTALL_NOOP

This can be used by system imaging tools like rpm-ostree and
lorax which want to control generation of the initramfs,
bootloader configuration, etc.

See
https://github.com/systemd/systemd/pull/4103
for some more information.
---
 kernel.spec | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel.spec b/kernel.spec
index a15cc45..aca502e 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1932,10 +1932,12 @@ fi\
 # This macro defines a %%posttrans script for a kernel package.
 #      %%kernel_variant_posttrans [<subpackage>]
 # More text can follow to go at the end of this variant's %%post.
+# KERNEL_INSTALL_NOOP may be used by programs like lorax and rpm-ostree
+# which want to install a kernel, but control generation of the initramfs.
 #
 %define kernel_variant_posttrans() \
 %{expand:%%posttrans %{?1:%{1}-}core}\
-/bin/kernel-install add %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $?\
+if test -z "${KERNEL_INSTALL_NOOP:-}";then /bin/kernel-install add %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $?; fi\
 %{nil}
 
 #
-- 
2.7.4

Comment 1 Laura Abbott 2016-09-13 17:53:38 UTC
The patch seems fine. Once the systemd part gets acked/merged we can apply the patch.

Comment 2 Colin Walters 2016-10-03 15:15:31 UTC
Something like this was merged upstream, but I'd still like to have this patch merged here since the systemd fix requires a new systemd version, but having it here will avoid having to depend on a bleeding edge systemd propagating to Fedora stable branches.

Comment 3 Laura Abbott 2018-04-06 18:16:13 UTC
It looks like this got missed somewhere, is this still something relevant?


Note You need to log in before you can comment on or make changes to this bug.