From 54198dd2aff5221e32a56054c5abed63fd54890a Mon Sep 17 00:00:00 2001 From: James Antill Date: Wed, 29 Jun 2022 13:15:59 -0400 Subject: [PATCH] Auto sync2gitlab import of kpatch-0.9.4-2.el8.src.rpm --- ...o-not-rm-selinux-rpm-owned-directory.patch | 28 ------------------- kpatch.spec | 8 +----- 2 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 0003-do-not-rm-selinux-rpm-owned-directory.patch diff --git a/0003-do-not-rm-selinux-rpm-owned-directory.patch b/0003-do-not-rm-selinux-rpm-owned-directory.patch deleted file mode 100644 index a38e831..0000000 --- a/0003-do-not-rm-selinux-rpm-owned-directory.patch +++ /dev/null @@ -1,28 +0,0 @@ -kpatch: do not rm selinux rpm owned directory - -As part of the kpatch rpm package installation, the /var/lib/kpatch directory -gets created and is set to be selinux owned by the kpatch rpm package. - -There is a problem where uninstalling the last kpatch-patch will also remove -this directory. When another kpatch-patch installation occurs, the -/var/lib/kpatch get recreated but withtout the selinux context which triggers a -policy error. - -Since /var/lib/kpatch is now created by the rpm spec file, do not remove it -from the uinstall target of the kpatch script. This insures selinux context -consistency. - -RHEL-only. - -Signed-off-by: Yannick Cote -diff -Nupr kpatch-0.9.4.old/kpatch/kpatch kpatch-0.9.4/kpatch/kpatch ---- kpatch-0.9.4.old/kpatch/kpatch 2021-08-26 15:31:07.000000000 -0400 -+++ kpatch-0.9.4/kpatch/kpatch 2022-06-10 12:19:55.791538218 -0400 -@@ -584,7 +584,6 @@ case "$1" in - 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" - - ;; - diff --git a/kpatch.spec b/kpatch.spec index 552155e..9657f70 100644 --- a/kpatch.spec +++ b/kpatch.spec @@ -2,7 +2,7 @@ Name: kpatch Version: 0.9.4 -Release: 3%{?dist} +Release: 2%{?dist} Summary: Dynamic kernel patch manager Group: System Environment/Kernel @@ -14,7 +14,6 @@ Source1: kpatch-dnf-v%{kpatch_dnf_ver}.tar.gz # RHEL-only Patch0: 0001-contrib-disable-upstart-kpatch.conf-install.patch Patch1: 0002-kpatch-clarify-unload-unsupport.patch -Patch2: 0003-do-not-rm-selinux-rpm-owned-directory.patch # Upstream backports #Patch100: 0100-xxx.patch @@ -50,7 +49,6 @@ kpatch-patch packages updates. %setup -q %patch0 -p1 %patch1 -p1 -%patch2 -p1 %setup -D -T -a 1 cd kpatch-dnf-%{kpatch_dnf_ver} @@ -87,10 +85,6 @@ echo "To enable automatic kpatch-patch subscription, run:" echo -e "\t$ dnf kpatch auto" %changelog - -* Fri Jun 10 2022 Yannick Cote 0.9.4-3 -- Do not rm selinux rpm owned directory (rhbz#2065609) - * Fri Jan 14 2022 Yannick Cote 0.9.4-2 - Add /usr/lib/kpatch to install and files list to appease SELinux (rhbz#2022123)