import kpatch-0.9.2-5.el8
This commit is contained in:
parent
c705a1dd08
commit
ce537c59a7
36
SOURCES/0003-kpatch-cleanup-install-directory.patch
Normal file
36
SOURCES/0003-kpatch-cleanup-install-directory.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 47c1bd435a498e736a6fd3f41655c05279560bb1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Artem Savkov <artem.savkov@gmail.com>
|
||||||
|
Date: Thu, 25 Feb 2021 13:24:30 +0100
|
||||||
|
Subject: [PATCH] kpatch: cleanup install directory
|
||||||
|
|
||||||
|
On module installation kpatch utility creates a directory with kernel
|
||||||
|
version as a name in /var/lib/kpatch which is never removed. To address
|
||||||
|
this check if any files are left in this directory after each
|
||||||
|
'uninstall' call and if not - remove it.
|
||||||
|
|
||||||
|
Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
|
||||||
|
---
|
||||||
|
kpatch/kpatch | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/kpatch/kpatch b/kpatch/kpatch
|
||||||
|
index ccb6914..8c34ed4 100755
|
||||||
|
--- a/kpatch/kpatch
|
||||||
|
+++ b/kpatch/kpatch
|
||||||
|
@@ -575,10 +575,12 @@ case "$1" in
|
||||||
|
fi
|
||||||
|
|
||||||
|
[[ ! -e "$MODULE" ]] && die "$PATCH is not installed for kernel $KVER"
|
||||||
|
-
|
||||||
|
|
||||||
|
echo "uninstalling $PATCH ($KVER)"
|
||||||
|
rm -f "$MODULE" || die "failed to uninstall module $PATCH"
|
||||||
|
+ rmdir --ignore-fail-on-non-empty "$INSTALLDIR/$KVER" || die "failed to remove directory $INSTALLDIR/$KVER"
|
||||||
|
+ rmdir --ignore-fail-on-non-empty "$INSTALLDIR" || die "failed to remove directory $INSTALLDIR"
|
||||||
|
+
|
||||||
|
;;
|
||||||
|
|
||||||
|
"list")
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: kpatch
|
Name: kpatch
|
||||||
Version: 0.9.2
|
Version: 0.9.2
|
||||||
Release: 3%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: Dynamic kernel patch manager
|
Summary: Dynamic kernel patch manager
|
||||||
|
|
||||||
Group: System Environment/Kernel
|
Group: System Environment/Kernel
|
||||||
@ -14,6 +14,7 @@ Source1: kpatch-dnf-v%{kpatch_dnf_ver}.tar.gz
|
|||||||
# RHEL-only
|
# RHEL-only
|
||||||
Patch0: 0001-contrib-disable-upstart-kpatch.conf-install.patch
|
Patch0: 0001-contrib-disable-upstart-kpatch.conf-install.patch
|
||||||
Patch1: 0002-kpatch-clarify-unload-unsupport.patch
|
Patch1: 0002-kpatch-clarify-unload-unsupport.patch
|
||||||
|
Patch2: 0003-kpatch-cleanup-install-directory.patch
|
||||||
|
|
||||||
# Upstream backports
|
# Upstream backports
|
||||||
Patch100: 0100-kpatch-wait-for-module-ref-counts-on-unload.patch
|
Patch100: 0100-kpatch-wait-for-module-ref-counts-on-unload.patch
|
||||||
@ -36,13 +37,12 @@ patch the kernel without rebooting.
|
|||||||
%package -n kpatch-dnf
|
%package -n kpatch-dnf
|
||||||
Summary: kpatch-patch manager plugin for DNF
|
Summary: kpatch-patch manager plugin for DNF
|
||||||
Version: %kpatch_dnf_ver
|
Version: %kpatch_dnf_ver
|
||||||
Release: 3%{?dist}
|
|
||||||
BuildRequires: python3-devel python3-dnf
|
BuildRequires: python3-devel python3-dnf
|
||||||
Requires: python3-dnf python3-hawkey
|
Requires: python3-dnf python3-hawkey
|
||||||
Provides: kpatch-dnf
|
Provides: kpatch-dnf
|
||||||
|
|
||||||
%description -n kpatch-dnf
|
%description -n kpatch-dnf
|
||||||
kpatch-dnf is a DNF plugin than manages subcription to kpatch-patch updates.
|
kpatch-dnf is a DNF plugin that manages subscription to kpatch-patch updates.
|
||||||
When enabled, kernel packages are automatically subscribed to corresponding
|
When enabled, kernel packages are automatically subscribed to corresponding
|
||||||
kpatch-patch packages updates.
|
kpatch-patch packages updates.
|
||||||
|
|
||||||
@ -50,6 +50,7 @@ kpatch-patch packages updates.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
|
|
||||||
%setup -D -T -a 1
|
%setup -D -T -a 1
|
||||||
@ -86,6 +87,12 @@ echo "To enable automatic kpatch-patch subscription, run:"
|
|||||||
echo -e "\t$ dnf kpatch auto"
|
echo -e "\t$ dnf kpatch auto"
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 15 2021 Artem Savkov <asavkov@redhat.com> 0.9.2-5
|
||||||
|
- Cleanup /var/lib/kpatch directory on uninstall (rhbz#1930108)
|
||||||
|
|
||||||
|
* Thu Mar 11 2021 Joe Lawrence <joe.lawrence@redhat.com> 0.9.2-4
|
||||||
|
- Fix kpatch-dnf package description typos (rhbz#1934293)
|
||||||
|
|
||||||
* Mon Jan 04 2021 Julien Thierry <jthierry@redhat.com> 0.9.2-3
|
* Mon Jan 04 2021 Julien Thierry <jthierry@redhat.com> 0.9.2-3
|
||||||
- Remove kpatch-dnf dependency on python3 (rhbz#1912224)
|
- Remove kpatch-dnf dependency on python3 (rhbz#1912224)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user