Auto sync2gitlab import of kpatch-0.9.7-2.el8.src.rpm

This commit is contained in:
CentOS Sources 2022-12-06 08:11:32 +00:00
parent 54198dd2af
commit 4b37a32657
4 changed files with 43 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/kpatch-dnf-v0.4.tar.gz
/v0.9.4.tar.gz
/v0.9.7.tar.gz

View File

@ -0,0 +1,28 @@
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 <ycote@redhat.com>
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"
;;

View File

@ -1,7 +1,7 @@
%define kpatch_dnf_ver 0.4
Name: kpatch
Version: 0.9.4
Version: 0.9.7
Release: 2%{?dist}
Summary: Dynamic kernel patch manager
@ -14,6 +14,7 @@ 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
@ -35,7 +36,7 @@ patch the kernel without rebooting.
%package -n kpatch-dnf
Summary: kpatch-patch manager plugin for DNF
Version: %kpatch_dnf_ver
Version: %{version}_%{kpatch_dnf_ver}
BuildRequires: python3-devel python3-dnf
Requires: python3-dnf python3-hawkey
Provides: kpatch-dnf
@ -49,6 +50,7 @@ kpatch-patch packages updates.
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%setup -D -T -a 1
cd kpatch-dnf-%{kpatch_dnf_ver}
@ -85,6 +87,15 @@ echo "To enable automatic kpatch-patch subscription, run:"
echo -e "\t$ dnf kpatch auto"
%changelog
* Wed Nov 16 2022 Yannick Cote <ycote@redhat.com> 0.9.7-2
- augment kpatch-dnf package versioning to satisfy build (rhbz#2121211)
* Wed Nov 09 2022 Yannick Cote <ycote@redhat.com> 0.9.7-1
- rebase kpatch user utility code to v0.9.7 (rhbz#2121211)
* Fri Jun 10 2022 Yannick Cote <ycote@redhat.com> 0.9.4-3
- Do not rm selinux rpm owned directory (rhbz#2065609)
* Fri Jan 14 2022 Yannick Cote <ycote@redhat.com> 0.9.4-2
- Add /usr/lib/kpatch to install and files list to appease SELinux (rhbz#2022123)

View File

@ -1,2 +1,2 @@
SHA512 (kpatch-dnf-v0.4.tar.gz) = d76b2ec5595e06fd560ae928f43ad275b4ce07574a1fc829d184d56c5f09a88ce0cb1d1b05e58eb53e6d934a879886b7f0149f782950d7856fbb99c61ce436c3
SHA512 (v0.9.4.tar.gz) = 647509fb9772b7564c0533ea043a15a66e29d413e045258036e78890c1d9cb072622bf458dda9bd4a87fe0855522c9b6ec3761f9bb4ab7e08157a179abfbaa62
SHA512 (v0.9.7.tar.gz) = c876d9b1e5f6e6ab858fa6f302e78152beb3e50cedd93f3c61ab6f747e32199b0601ad4a36d426d43d0e9a37d9bf1d6bbfddccc86df4b31d5e3e6edead6cded3