[dkms] Skip initramfs/initrd rebuild if not requested (#1109601)
Simone Caronni
slaanesh at fedoraproject.org
Wed Jul 23 15:56:28 UTC 2014
commit 4f9115765deb702dd57085617efada85c1e1d7cf
Author: Simone Caronni <negativo17 at gmail.com>
Date: Wed Jul 23 17:55:50 2014 +0200
Skip initramfs/initrd rebuild if not requested (#1109601)
dkms-skip-initrd-build.patch | 37 +++++++++++++++++++++++++++++++++++++
dkms.spec | 10 ++++++++--
2 files changed, 45 insertions(+), 2 deletions(-)
---
diff --git a/dkms-skip-initrd-build.patch b/dkms-skip-initrd-build.patch
new file mode 100644
index 0000000..d0a0d47
--- /dev/null
+++ b/dkms-skip-initrd-build.patch
@@ -0,0 +1,37 @@
+diff -Naur dkms-2.2.0.3.old/dkms dkms-2.2.0.3/dkms
+--- dkms-2.2.0.3.old/dkms 2014-06-27 16:30:06.479277266 +0200
++++ dkms-2.2.0.3/dkms 2014-07-23 17:50:46.178460521 +0200
+@@ -1432,7 +1432,7 @@
+ # add to kabi-tracking
+ if [[ ${weak_modules} ]]; then
+ echo $"Adding any weak-modules"
+- list_each_installed_module "$module" "$kernelver" "$arch" | ${weak_modules} --add-modules
++ list_each_installed_module "$module" "$kernelver" "$arch" | ${weak_modules} ${weak_modules_no_initrd} --add-modules
+ fi
+
+ # Run the post_install script
+@@ -1613,7 +1613,7 @@
+ if [[ ${weak_modules} ]] && \
+ (module_status_built $module $module_version |grep -q "installed"); then
+ echo $"Removing any linked weak-modules"
+- list_each_installed_module "$module" "$1" "$2" | ${weak_modules} --remove-modules
++ list_each_installed_module "$module" "$1" "$2" | ${weak_modules} ${weak_modules_no_initrd} --remove-modules
+ fi
+
+ for ((count=0; count < ${#built_module_name[@]}; count++)); do
+@@ -3586,6 +3586,15 @@
+ $"--all on the command line."
+ fi
+
++# If initramfs/initrd rebuild is not requested, skip it with Redhat's weak-modules
++if [[ $no_initrd && $weak_modules ]]; then
++ if [[ $running_distribution == el5 ]]; then
++ weak_modules_no_initrd="--no-initrd"
++ else
++ weak_modules_no_initrd="--no-initramfs"
++ fi
++fi
++
+ # Run the specified action
+ if [ -z "$action" ]; then
+ show_usage
diff --git a/dkms.spec b/dkms.spec
index 6b066dc..60b9faa 100644
--- a/dkms.spec
+++ b/dkms.spec
@@ -20,6 +20,7 @@ Patch0: %{name}-git.patch
Patch1: %{name}-force-tarball.patch
Patch2: %{name}-fix-mkrpm.patch
Patch3: %{name}-man.patch
+
# Patches coming from ZFS On Linux project for functionality / bugfixes
# https://github.com/zfsonlinux/dkms/tree/master/ubuntu/saucy/debian/patches
Patch4: %{name}-cleanup-after-removal.patch
@@ -30,8 +31,10 @@ Patch7: %{name}-use-STRIP-0-as-the-default-for-the-STRIP-array.patch
Patch8: %{name}-add-dependency-logic-for-automatic-builds.patch
Patch9: %{name}-fix-zfs-autoinstall-failures-for-kernel-upgrades.patch
Patch10: %{name}-reset-build-dependencies.patch
+
Patch11: %{name}-bash-syntax-fix.patch
Patch12: %{name}-no-parallel-build.patch
+Patch13: %{name}-skip-initrd-build.patch
Requires: coreutils
Requires: cpio
@@ -75,13 +78,12 @@ method for installing module RPMS as originally developed by Dell.
%patch5 -p1
%patch6 -p1
%patch7 -p1
-%if 0%{?fedora} || 0%{?rhel} >= 6
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
-%endif
+%patch13 -p1
%build
@@ -161,6 +163,10 @@ fi
%{_sysconfdir}/bash_completion.d/%{name}
%changelog
+* Fri Jun 27 2014 Simone Caronni <negativo17 at gmail.com> - 2.2.0.3-25
+- Enable all patches also for RHEL 5 builds.
+- Skip initramfs/initrd rebuild if not requested (#1109601).
+
* Fri Jun 27 2014 Julien Floret <julien.floret at 6wind.com> - 2.2.0.3-24
- Prevent parallel depmod failure with autoinstall (#1113946).
More information about the scm-commits
mailing list