9ecd4f
%define kpatch_dnf_ver	0.4
685deb
685deb
Name:		kpatch
9ecd4f
Version:	0.9.4
058681
Release:	3%{?dist}
685deb
Summary:	Dynamic kernel patch manager
685deb
685deb
Group:		System Environment/Kernel
685deb
License:	GPLv2
685deb
URL:		https://github.com/dynup/kpatch
685deb
Source0:	https://github.com/dynup/kpatch/archive/v%{version}.tar.gz
685deb
Source1:	kpatch-dnf-v%{kpatch_dnf_ver}.tar.gz
685deb
685deb
# RHEL-only
685deb
Patch0:		0001-contrib-disable-upstart-kpatch.conf-install.patch
685deb
Patch1:		0002-kpatch-clarify-unload-unsupport.patch
058681
Patch2:		0003-do-not-rm-selinux-rpm-owned-directory.patch
685deb
685deb
# Upstream backports (inactive -- for future reference)
9ecd4f
#Patch100:	0100-xxx.patch
685deb
685deb
# kpatch-dnf backports (inactive -- for future reference)
685deb
#Patch200:	0200-foo-bar-etcetera.patch
685deb
685deb
Requires:	bash kmod binutils
685deb
Recommends:	kpatch-dnf
685deb
685deb
BuildArch:	noarch
685deb
685deb
685deb
%description
685deb
kpatch is a live kernel patch module manager.  It allows the user to manage
685deb
a collection of binary kernel patch modules which can be used to dynamically
685deb
patch the kernel without rebooting.
685deb
685deb
685deb
%package -n kpatch-dnf
685deb
Summary:	kpatch-patch manager plugin for DNF
685deb
Version:	%kpatch_dnf_ver
685deb
BuildRequires:	python3-devel python3-dnf
685deb
Requires:	python3-dnf python3-hawkey
685deb
Provides:	kpatch-dnf
685deb
685deb
%description -n kpatch-dnf
685deb
kpatch-dnf is a DNF plugin that manages subscription to kpatch-patch updates.
685deb
When enabled, kernel packages are automatically subscribed to corresponding
685deb
kpatch-patch packages updates.
685deb
685deb
%prep
685deb
%setup -q
685deb
%patch0 -p1
685deb
%patch1 -p1
058681
%patch2 -p1
685deb
# Use this to apply upstream patches to kpatch
9ecd4f
#%patch100 -p1
685deb
685deb
%setup -D -T -a 1
685deb
685deb
# Use this to apply patches to kpatch-dnf (inactive)
685deb
#cd kpatch-dnf-%{kpatch_dnf_ver}
685deb
#%patch200 -p1
685deb
#cd ..
685deb
685deb
%build
685deb
make -C man
685deb
685deb
make -C kpatch-dnf-%{kpatch_dnf_ver}
685deb
685deb
%install
685deb
make install PREFIX=/usr DESTDIR=%{buildroot} -C kpatch
685deb
make install PREFIX=/usr DESTDIR=%{buildroot} -C man
685deb
make install PREFIX=/usr DESTDIR=%{buildroot} -C contrib
dc92e6
mkdir -p %{buildroot}/%{_sharedstatedir}/kpatch
685deb
rm -f %{buildroot}/usr/share/man/man1/kpatch-build.1.gz
685deb
685deb
make install PREFIX=/usr DESTDIR=%{buildroot} PYTHONSITES=%{python3_sitelib} -C kpatch-dnf-%{kpatch_dnf_ver}
685deb
685deb
%files
685deb
%{_sbindir}/kpatch
685deb
%{_usr}/lib/systemd/system/kpatch.service
dc92e6
%{_sharedstatedir}/kpatch
685deb
%doc %{_mandir}/man1/kpatch.1.gz
685deb
685deb
%files -n kpatch-dnf
685deb
%{python3_sitelib}/dnf-plugins/kpatch.py
685deb
%{python3_sitelib}/dnf-plugins/__pycache__
685deb
%config(noreplace) %{_sysconfdir}/dnf/plugins/kpatch.conf
685deb
%doc %{_mandir}/man8/dnf.kpatch.8.gz
685deb
685deb
%post -n kpatch-dnf
685deb
echo "To enable automatic kpatch-patch subscription, run:"
685deb
echo -e "\t$ dnf kpatch auto"
685deb
685deb
%changelog
058681
* Fri Jun 10 2022 Yannick Cote <ycote@redhat.com> 0.9.4-3
058681
- Do not rm selinux rpm owned directory (rhbz#2053413)
058681
dc92e6
* Thu Jan 27 2022 Yannick Cote <ycote@redhat.com> 0.9.4-2
dc92e6
- Add /usr/lib/kpatch to install and files list to appease SELinux (rhbz#2030004)
dc92e6
9ecd4f
* Wed Sep 29 2021 Artem Savkov <asavkov@redhat.com> - 0.9.4-1
9ecd4f
- Rebase to 0.9.4
9ecd4f
685deb
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.9.3-3
685deb
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
685deb
  Related: rhbz#1991688
685deb
685deb
* Thu Jun 10 2021 Joe Lawrence <joe.lawrence@redhat.com> - 0.9.3-2
685deb
- Rebase to latest upstream (via backport patch)
685deb
685deb
* Tue May 18 2021 Joel Savitz <jsavitz@redhat.com> - 0.9.3-1
685deb
- Rebase to latest upstream
685deb
685deb
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.9.2-5
685deb
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
685deb
685deb
* Fri Mar 05 2021 Joe Lawrence <joe.lawrence@redhat.com> 0.9.2-4
685deb
- Fix kpatch-dnf package description typos (rhbz#1934292)
685deb
685deb
* Mon Jan 04 2021 Julien Thierry <jthierry@redhat.com> 0.9.2-2
685deb
- Remove kpatch-dnf dependency on python3 (rhbz#1912457)
685deb
685deb
* Wed Dec 2 2020 Joe Lawrence <joe.lawrence@redhat.com> 0.9.2-1
685deb
- initial kpatch utility build for rhel-9.0.0 (rhbz#1901593)