diff --git a/SPECS/kpatch.spec b/SPECS/kpatch.spec index 6143475..c6e6b2a 100644 --- a/SPECS/kpatch.spec +++ b/SPECS/kpatch.spec @@ -1,19 +1,28 @@ +%define kpatch_dnf_ver 0.2 + Name: kpatch -Version: 0.6.1 -Release: 6%{?dist} +Version: 0.9.2 +Release: 2%{?dist} Summary: Dynamic kernel patch manager Group: System Environment/Kernel License: GPLv2 URL: https://github.com/dynup/kpatch Source0: https://github.com/dynup/kpatch/archive/v%{version}.tar.gz +Source1: kpatch-dnf-v%{kpatch_dnf_ver}.tar.gz + +# RHEL-only Patch0: 0001-contrib-disable-upstart-kpatch.conf-install.patch -Patch1: 0002-contrib-service-don-t-unload-modules-on-stop.patch -Patch2: 0003-kpatch-script-don-t-fail-if-module-already-loaded-en.patch -Patch3: 0004-kpatch-clarify-unload-unsupport.patch -Patch4: 0005-Fix-livepatch-enabled-kernel-detection-in-kpatch-scr.patch +Patch1: 0002-kpatch-clarify-unload-unsupport.patch + +# Upstream backports +Patch100: 0100-kpatch-wait-for-module-ref-counts-on-unload.patch + +# kpatch-dnf backports +Patch200: 0200-Makefile-set-install-permission-modes.patch Requires: bash kmod binutils +Recommends: kpatch-dnf BuildArch: noarch @@ -24,18 +33,34 @@ a collection of binary kernel patch modules which can be used to dynamically patch the kernel without rebooting. +%package -n kpatch-dnf +Summary: kpatch-patch manager plugin for DNF +Version: %kpatch_dnf_ver +Release: 2%{?dist} +BuildRequires: python3-devel python3-dnf +Requires: python3 python3-dnf python3-hawkey +Provides: kpatch-dnf + +%description -n kpatch-dnf +kpatch-dnf is a DNF plugin than manages subcription to kpatch-patch updates. +When enabled, kernel packages are automatically subscribed to corresponding +kpatch-patch packages updates. + %prep %setup -q %patch0 -p1 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +%patch100 -p1 +%setup -D -T -a 1 +cd kpatch-dnf-%{kpatch_dnf_ver} +%patch200 -p1 +cd .. %build make -C man +make -C kpatch-dnf-%{kpatch_dnf_ver} %install make install PREFIX=/usr DESTDIR=%{buildroot} -C kpatch @@ -43,14 +68,35 @@ make install PREFIX=/usr DESTDIR=%{buildroot} -C man make install PREFIX=/usr DESTDIR=%{buildroot} -C contrib rm -f %{buildroot}/usr/share/man/man1/kpatch-build.1.gz +make install PREFIX=/usr DESTDIR=%{buildroot} PYTHONSITES=%{python3_sitelib} -C kpatch-dnf-%{kpatch_dnf_ver} %files %{_sbindir}/kpatch %{_usr}/lib/systemd/system/kpatch.service %doc %{_mandir}/man1/kpatch.1.gz +%files -n kpatch-dnf +%{python3_sitelib}/dnf-plugins/kpatch.py +%{python3_sitelib}/dnf-plugins/__pycache__ +%config(noreplace) %{_sysconfdir}/dnf/plugins/kpatch.conf +%doc %{_mandir}/man8/dnf.kpatch.8.gz + +%post -n kpatch-dnf +echo "To enable automatic kpatch-patch subscription, run:" +echo -e "\t$ dnf kpatch auto" %changelog +* Fri Nov 20 2020 Julien Thierry 0.9.2-2 +- Fix unload issue under stress (rhbz#1883238) +- Fix dnf-kpatch man file permissions (rhbz#1899341) +- Do not replace dnf kpatch configuration file when reinstalling (rhbz#1898191) + +* Thu Sep 24 2020 Julien Thierry 0.9.2-1 +- Add kpatch-dnf subpackage (rhbz#1798711) + +* Thu Sep 24 2020 Julien Thierry 0.9.2-1 +- update to 0.9.2 (rhbz#1877857) + * Tue Oct 22 2019 Yannick Cote 0.6.1-6 - fix patch loading issue caused by recent kernel rebase (rhbz#1754679)