9c477d
%define kpatch_dnf_ver	0.4
707f0e
8a3e3e
Name:		kpatch
9c477d
Version:	0.9.4
6ede18
Release:	3%{?dist}
8a3e3e
Summary:	Dynamic kernel patch manager
8a3e3e
8a3e3e
Group:		System Environment/Kernel
8a3e3e
License:	GPLv2
8a3e3e
URL:		https://github.com/dynup/kpatch
8a3e3e
Source0:	https://github.com/dynup/kpatch/archive/v%{version}.tar.gz
707f0e
Source1:	kpatch-dnf-v%{kpatch_dnf_ver}.tar.gz
707f0e
707f0e
# RHEL-only
8a3e3e
Patch0:		0001-contrib-disable-upstart-kpatch.conf-install.patch
707f0e
Patch1:		0002-kpatch-clarify-unload-unsupport.patch
6ede18
Patch2:		0003-do-not-rm-selinux-rpm-owned-directory.patch
707f0e
707f0e
# Upstream backports
9c477d
#Patch100:	0100-xxx.patch
707f0e
707f0e
# kpatch-dnf backports
9c477d
#Patch200:	0200-xxx.patch
8a3e3e
8a3e3e
Requires:	bash kmod binutils
707f0e
Recommends:	kpatch-dnf
8a3e3e
8a3e3e
BuildArch:	noarch
8a3e3e
8a3e3e
8a3e3e
%description
fa8c55
kpatch is a live kernel patch module manager.  It allows the user to manage
8a3e3e
a collection of binary kernel patch modules which can be used to dynamically
8a3e3e
patch the kernel without rebooting.
8a3e3e
8a3e3e
707f0e
%package -n kpatch-dnf
707f0e
Summary:	kpatch-patch manager plugin for DNF
707f0e
Version:	%kpatch_dnf_ver
707f0e
BuildRequires:	python3-devel python3-dnf
707f0e
Requires:	python3-dnf python3-hawkey
707f0e
Provides:	kpatch-dnf
707f0e
707f0e
%description -n kpatch-dnf
46fc8c
kpatch-dnf is a DNF plugin that manages subscription to kpatch-patch updates.
707f0e
When enabled, kernel packages are automatically subscribed to corresponding
707f0e
kpatch-patch packages updates.
707f0e
8a3e3e
%prep
8a3e3e
%setup -q
8a3e3e
%patch0 -p1
fa8c55
%patch1 -p1
6ede18
%patch2 -p1
8a3e3e
707f0e
%setup -D -T -a 1
707f0e
cd kpatch-dnf-%{kpatch_dnf_ver}
707f0e
cd ..
8a3e3e
8a3e3e
%build
8a3e3e
make -C man
8a3e3e
707f0e
make -C kpatch-dnf-%{kpatch_dnf_ver}
8a3e3e
8a3e3e
%install
8a3e3e
make install PREFIX=/usr DESTDIR=%{buildroot} -C kpatch
8a3e3e
make install PREFIX=/usr DESTDIR=%{buildroot} -C man
8a3e3e
make install PREFIX=/usr DESTDIR=%{buildroot} -C contrib
9c477d
mkdir -p %{buildroot}/%{_sharedstatedir}/kpatch
8a3e3e
rm -f %{buildroot}/usr/share/man/man1/kpatch-build.1.gz
8a3e3e
707f0e
make install PREFIX=/usr DESTDIR=%{buildroot} PYTHONSITES=%{python3_sitelib} -C kpatch-dnf-%{kpatch_dnf_ver}
8a3e3e
8a3e3e
%files
8a3e3e
%{_sbindir}/kpatch
8a3e3e
%{_usr}/lib/systemd/system/kpatch.service
9c477d
%{_sharedstatedir}/kpatch
8a3e3e
%doc %{_mandir}/man1/kpatch.1.gz
8a3e3e
707f0e
%files -n kpatch-dnf
707f0e
%{python3_sitelib}/dnf-plugins/kpatch.py
707f0e
%{python3_sitelib}/dnf-plugins/__pycache__
707f0e
%config(noreplace) %{_sysconfdir}/dnf/plugins/kpatch.conf
707f0e
%doc %{_mandir}/man8/dnf.kpatch.8.gz
707f0e
707f0e
%post -n kpatch-dnf
707f0e
echo "To enable automatic kpatch-patch subscription, run:"
707f0e
echo -e "\t$ dnf kpatch auto"
8a3e3e
8a3e3e
%changelog
6ede18
6ede18
* Fri Jun 10 2022 Yannick Cote <ycote@redhat.com> 0.9.4-3
6ede18
- Do not rm selinux rpm owned directory (rhbz#2065609)
6ede18
9c477d
* Fri Jan 14 2022 Yannick Cote <ycote@redhat.com> 0.9.4-2
9c477d
- Add /usr/lib/kpatch to install and files list to appease SELinux (rhbz#2022123)
9c477d
9c477d
* Thu Sep 23 2021 Artem Savkov <asavkov@redhat.com> 0.9.4-1
9c477d
- Update kpatch utility to 0.9.4 and kpatch-dnf to 0.4 (rhbz#2006841)
9c477d
46fc8c
* Mon Mar 15 2021 Artem Savkov <asavkov@redhat.com> 0.9.2-5
46fc8c
- Cleanup /var/lib/kpatch directory on uninstall (rhbz#1930108)
46fc8c
46fc8c
* Thu Mar 11 2021 Joe Lawrence <joe.lawrence@redhat.com> 0.9.2-4
46fc8c
- Fix kpatch-dnf package description typos (rhbz#1934293)
46fc8c
707f0e
* Mon Jan 04 2021 Julien Thierry <jthierry@redhat.com> 0.9.2-3
707f0e
- Remove kpatch-dnf dependency on python3 (rhbz#1912224)
707f0e
707f0e
* Fri Nov 20 2020 Julien Thierry <jthierry@redhat.com> 0.9.2-2
707f0e
- Fix unload issue under stress (rhbz#1883238)
707f0e
- Fix dnf-kpatch man file permissions (rhbz#1899341)
707f0e
- Do not replace dnf kpatch configuration file when reinstalling (rhbz#1898191)
707f0e
707f0e
* Thu Sep 24 2020 Julien Thierry <jthierry@redhat.com> 0.9.2-1
707f0e
- Add kpatch-dnf subpackage (rhbz#1798711)
707f0e
707f0e
* Thu Sep 24 2020 Julien Thierry <jthierry@redhat.com> 0.9.2-1
707f0e
- update to 0.9.2 (rhbz#1877857)
707f0e
546788
* Tue Oct 22 2019 Yannick Cote <ycote@redhat.com> 0.6.1-6
546788
- fix patch loading issue caused by recent kernel rebase (rhbz#1754679)
546788
fa8c55
* Wed Aug 28 2019 Joe Lawrence <joe.lawrence@redhat.com> 0.6.1-5
fa8c55
- kpatch: clarify that "kpatch unload" isn't supported (rhbz#1746461)
fa8c55
fa8c55
* Sun Jun 23 2019 Joe Lawrence <joe.lawrence@redhat.com> 0.6.1-4
fa8c55
- kpatch script: don't fail if module already loaded+enabled (rhbz#1719305)
fa8c55
fa8c55
* Wed Jun 12 2019 Joe Lawrence <joe.lawrence@redhat.com> 0.6.1-3
fa8c55
- kpatch: patches shouldn't be unloaded on system shutdown (rhbz#1719305)
fa8c55
fa8c55
* Wed Jun 5 2019 Josh Poimboeuf <jpoimboe@redhat.com> 0.6.1-2
fa8c55
- CI gating test (rhbz#1717417)
fa8c55
8a3e3e
* Tue Aug 14 2018 Joe Lawrence <joe.lawrence@redhat.com> 0.6.1-1
8a3e3e
- update to 0.6.1 (rhbz#1615880)
8a3e3e
8a3e3e
* Mon Aug 13 2018 Troy Dawson <tdawson@redhat.com> - 0.4.0-4
8a3e3e
- Release Bumped for el8 Mass Rebuild
8a3e3e
8a3e3e
* Thu Nov 16 2017 Joe Lawrence <joe.lawrence@redhat.com> 0.4.0-3
8a3e3e
- kpatch: better livepatch module support (rhbz#1504066)
8a3e3e
8a3e3e
* Wed Oct 18 2017 Josh Poimboeuf <jpoimboe@redhat.com> 0.4.0-2
8a3e3e
- fix backwards compatibility with RHEL 7.3 patches (rhbz#1497735)
8a3e3e
8a3e3e
* Mon Mar 13 2017 Josh Poimboeuf <jpoimboe@redhat.com> 0.4.0-1
8a3e3e
- update to 0.4.0 (rhbz#1427642)
8a3e3e
8a3e3e
* Wed Jun 15 2016 Josh Poimboeuf <jpoimboe@redhat.com> 0.3.2-1
8a3e3e
- update to 0.3.2 (rhbz#1282508)
8a3e3e
8a3e3e
* Wed Nov 18 2015 Josh Poimboeuf <jpoimboe@redhat.com> 0.3.1-1
8a3e3e
- update to 0.3.1 (rhbz#1282508)
8a3e3e
8a3e3e
* Tue Sep 16 2014 Seth Jennings <sjenning@redhat.com> 0.1.10-4
8a3e3e
- fix dracut dependencies (rhbz#1170369)
8a3e3e
8a3e3e
* Tue Sep 16 2014 Seth Jennings <sjenning@redhat.com> 0.1.10-3
8a3e3e
- support re-enabling forced modules (rhbz#1140268)
8a3e3e
8a3e3e
* Thu Sep 11 2014 Seth Jennings <sjenning@redhat.com> 0.1.10-2
8a3e3e
- support modprobe format names (rhbz#1133045)
8a3e3e
8a3e3e
* Thu Jul 31 2014 Josh Poimboeuf <jpoimboe@redhat.com> 0.1.10-1
8a3e3e
- update to kpatch 0.1.10
8a3e3e
8a3e3e
* Wed Jul 23 2014 Josh Poimboeuf <jpoimboe@redhat.com> 0.1.9-1
8a3e3e
- update to kpatch 0.1.9
8a3e3e
8a3e3e
* Tue Jul 15 2014 Josh Poimboeuf <jpoimboe@redhat.com> 0.1.8-1
8a3e3e
- update to kpatch 0.1.8
8a3e3e
8a3e3e
* Wed May 21 2014 Josh Poimboeuf <jpoimboe@redhat.com> 0.1.2-1
8a3e3e
- update to kpatch 0.1.2
8a3e3e
8a3e3e
* Mon May 19 2014 Josh Poimboeuf <jpoimboe@redhat.com> 0.1.1-2
8a3e3e
- fix initramfs core module path
8a3e3e
8a3e3e
* Mon May 19 2014 Josh Poimboeuf <jpoimboe@redhat.com> 0.1.1-1
8a3e3e
- rebase to kpatch 0.1.1
8a3e3e
8a3e3e
* Fri May 9 2014 Josh Poimboeuf <jpoimboe@redhat.com> 0.1.0-2
8a3e3e
- modprobe core module
8a3e3e
8a3e3e
* Tue May 6 2014 Josh Poimboeuf <jpoimboe@redhat.com> 0.1.0-1
8a3e3e
- Initial kpatch release 0.1.0
8a3e3e
8a3e3e
* Thu Jan 30 2014 Josh Poimboeuf <jpoimboe@redhat.com> 0.0-1
8a3e3e
- Initial build