kpatch.spec: fix errors and supress warnings

- Escape inactive Patch100/Patch200 lines to avoid parser errors
- Version the Provides: kpatch-dnf entry
- Add -q to %setup for quiet unpack
- Escape macros in comments with %%
- Add a %check section placeholder

Resolves: RHEL-114912

Signed-off-by: Radomir Vrbovsky <rvrbovsk@redhat.com>
This commit is contained in:
Radomir Vrbovsky 2025-09-15 23:49:41 +02:00
parent 04d905b5ff
commit feec399674

View File

@ -18,10 +18,10 @@ Patch2: 0003-do-not-rm-selinux-rpm-owned-directory.patch
Patch3: 0004-kpatch-List-CVEs-for-loaded-livepatch-modules.patch
# Upstream backports (inactive -- for future reference)
#Patch100: 0100-xxx.patch
# %%Patch100: 0100-xxx.patch
# kpatch-dnf backports (inactive -- for future reference)
#Patch200: 0200-foo-bar-etcetera.patch
# %%Patch200: 0200-foo-bar-etcetera.patch
Requires: bash kmod binutils
Recommends: kpatch-dnf
@ -40,7 +40,7 @@ Summary: kpatch-patch manager plugin for DNF
Version: %{version}_%{kpatch_dnf_ver}
BuildRequires: python3-devel python3-dnf
Requires: python3-dnf python3-hawkey
Provides: kpatch-dnf
Provides: kpatch-dnf = %{version}-%{release}
%description -n kpatch-dnf
kpatch-dnf is a DNF plugin that manages subscription to kpatch-patch updates.
@ -49,19 +49,19 @@ kpatch-patch packages updates.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
# Use this to apply upstream patches to kpatch
#%patch100 -p1
# %%patch100 -p1
%setup -D -T -a 1
%setup -D -T -a 1 -q
# Use this to apply patches to kpatch-dnf (inactive)
#cd kpatch-dnf-%{kpatch_dnf_ver}
#%patch200 -p1
#cd ..
# cd kpatch-dnf-%%{kpatch_dnf_ver}
# %%patch200 -p1
# cd ..
%build
make -C man
@ -77,6 +77,9 @@ 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}
%check
# No check available
%files
%{_sbindir}/kpatch
%{_usr}/lib/systemd/system/kpatch.service