Enable criu-devel and criu-libs for RHEL 9

Remove nftables-devel dependency for now

Resolves: rhbz#1955119
This commit is contained in:
Adrian Reber 2021-05-05 12:22:21 -04:00
parent 4e13461dcb
commit eac9989cf0

View File

@ -12,7 +12,7 @@
Name: criu Name: criu
Version: 3.15 Version: 3.15
Release: 4%{?dist} Release: 5%{?dist}
Provides: crtools = %{version}-%{release} Provides: crtools = %{version}-%{release}
Obsoletes: crtools <= 1.0-2 Obsoletes: crtools <= 1.0-2
Summary: Tool for Checkpoint/Restore in User-space Summary: Tool for Checkpoint/Restore in User-space
@ -43,10 +43,10 @@ BuildRequires: asciidoc xmlto
BuildRequires: perl-interpreter BuildRequires: perl-interpreter
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
BuildRequires: gnutls-devel BuildRequires: gnutls-devel
BuildRequires: nftables-devel
# Checkpointing containers with a tmpfs requires tar # Checkpointing containers with a tmpfs requires tar
Recommends: tar Recommends: tar
%if 0%{?fedora} %if 0%{?fedora}
BuildRequires: nftables-devel
BuildRequires: libbsd-devel BuildRequires: libbsd-devel
%endif %endif
%endif %endif
@ -62,7 +62,7 @@ criu is the user-space part of Checkpoint/Restore in User-space
(CRIU), a project to implement checkpoint/restore functionality for (CRIU), a project to implement checkpoint/restore functionality for
Linux in user-space. Linux in user-space.
%if 0%{?fedora} %if 0%{?fedora} || 0%{?rhel} > 8
%package devel %package devel
Summary: Header files and libraries for %{name} Summary: Header files and libraries for %{name}
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -138,11 +138,13 @@ mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf install -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
install -d -m 0755 %{buildroot}/run/%{name}/ install -d -m 0755 %{buildroot}/run/%{name}/
%if 0%{?rhel} %if 0%{?rhel} < 9
# remove devel and libs packages # remove devel and libs packages
rm -rf $RPM_BUILD_ROOT%{_includedir}/criu rm -rf $RPM_BUILD_ROOT%{_includedir}/criu
rm $RPM_BUILD_ROOT%{_libdir}/*.so* rm $RPM_BUILD_ROOT%{_libdir}/*.so*
rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig
%endif
%if 0%{?rhel}
rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name} rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name}
%endif %endif
@ -160,7 +162,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
%{_tmpfilesdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf
%doc README.md COPYING %doc README.md COPYING
%if 0%{?fedora} %if 0%{?fedora} || 0%{?rhel} > 8
%files devel %files devel
%{_includedir}/criu %{_includedir}/criu
%{_libdir}/*.so %{_libdir}/*.so
@ -185,6 +187,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libcriu.a
%changelog %changelog
* Wed May 05 2021 Adrian Reber <areber@redhat.com> - 3.15-5
- Enable criu-devel and criu-libs for RHEL 9
- Remove nftables-devel dependency for now
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.15-4 * Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.15-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937