d3d9a8
Name: criu
d3d9a8
Version: 1.6.1
d3d9a8
Release: 3%{?dist}
d3d9a8
Provides: crtools = %{version}-%{release}
d3d9a8
Obsoletes: crtools <= 1.0-2
d3d9a8
Summary: Tool for Checkpoint/Restore in User-space
d3d9a8
Group: System Environment/Base
d3d9a8
License: GPLv2
d3d9a8
URL: http://criu.org/
d3d9a8
Source0: http://download.openvz.org/criu/criu-%{version}.tar.bz2
d3d9a8
# The patch aio-fix.patch is needed as RHEL7
d3d9a8
# doesn't do "nr_events *= 2" in ioctx_alloc().
d3d9a8
Patch0: aio-fix.patch
d3d9a8
# This patch fixes criu check to correctly detect if
d3d9a8
# the kernel supports all required clone arguments.
d3d9a8
Patch1: criu-check-for-CLONE_NEWUSER-CLONE_NEWPID.patch
d3d9a8
# This patches prints to the console and syslog
d3d9a8
# that criu is still a tech preview and unsupported.
d3d9a8
# https://bugzilla.redhat.com/show_bug.cgi?id=1243521
d3d9a8
Patch2: tech-preview-info-bz1243521.patch
d3d9a8
Patch3: 98c8e44f749dd7ed0aa8c540f566bda54d7adfa1.patch
d3d9a8
d3d9a8
BuildRequires: systemd
d3d9a8
d3d9a8
BuildRequires: protobuf-devel protobuf-c-devel python2-devel
d3d9a8
%if 0%{?fedora}
d3d9a8
BuildRequires: asciidoc xmlto
d3d9a8
%endif
d3d9a8
d3d9a8
# user-space and kernel changes are only available for x86_64 and ARM
d3d9a8
# code is very architecture specific
d3d9a8
# once imported in RCS it needs a bug openend explaining the ExclusiveArch
d3d9a8
# https://bugzilla.redhat.com/show_bug.cgi?id=902875
d3d9a8
ExclusiveArch: x86_64 %{arm}
d3d9a8
d3d9a8
%description
d3d9a8
criu is the user-space part of Checkpoint/Restore in User-space
d3d9a8
(CRIU), a project to implement checkpoint/restore functionality for
d3d9a8
Linux in user-space.
d3d9a8
d3d9a8
%if 0%{?fedora}
d3d9a8
%package devel
d3d9a8
Summary: Header files and libraries for %{name}
d3d9a8
Group: Development/Libraries
d3d9a8
Requires: %{name} = %{version}-%{release}
d3d9a8
d3d9a8
%description devel
d3d9a8
This package contains header files and libraries for %{name}.
d3d9a8
%endif
d3d9a8
d3d9a8
%package -n python-%{name}
d3d9a8
Summary: Python bindings for %{name}
d3d9a8
Group: Development/Languages
d3d9a8
Requires: %{name} = %{version}-%{release} python-ipaddr protobuf-python
d3d9a8
d3d9a8
%description -n python-%{name}
d3d9a8
python-%{name} contains Python bindings for %{name}.
d3d9a8
d3d9a8
%package -n crit
d3d9a8
Summary: CRIU image tool
d3d9a8
Requires: python-%{name} = %{version}-%{release}
d3d9a8
d3d9a8
%description -n crit
d3d9a8
crit is a tool designed to decode CRIU binary dump files and show
d3d9a8
their content in human-readable form.
d3d9a8
d3d9a8
d3d9a8
%prep
d3d9a8
%setup -q -n criu-%{version}
d3d9a8
%patch0 -p1
d3d9a8
%patch1 -p1
d3d9a8
%patch2 -p1
d3d9a8
%patch3 -p1
d3d9a8
d3d9a8
%build
d3d9a8
# %{?_smp_mflags} does not work
d3d9a8
# -fstack-protector breaks build
d3d9a8
CFLAGS+=`echo %{optflags} | sed -e 's,-fstack-protector\S*,,g'` make V=1 WERROR=0 PREFIX=%{_prefix}
d3d9a8
%if 0%{?fedora}
d3d9a8
make docs V=1
d3d9a8
%endif
d3d9a8
d3d9a8
d3d9a8
%install
d3d9a8
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
d3d9a8
%if 0%{?rhel}
d3d9a8
# disable documentation as it requires asciidoc (which is not available on RHEL7)
d3d9a8
sed -i -e 's,$(CRIU-LIB) install-man,$(CRIU-LIB),g' Makefile
d3d9a8
%endif
d3d9a8
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} LOGROTATEDIR=%{_sysconfdir}/logrotate.d
d3d9a8
d3d9a8
%if 0%{?rhel}
d3d9a8
# remove criu daemon related files
d3d9a8
rm $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/criu-service
d3d9a8
rm $RPM_BUILD_ROOT%{_unitdir}/criu.service
d3d9a8
rm $RPM_BUILD_ROOT%{_unitdir}/criu.socket
d3d9a8
# remove devel package
d3d9a8
rm -rf $RPM_BUILD_ROOT%{_includedir}/criu
d3d9a8
rm $RPM_BUILD_ROOT%{_libdir}/*.so*
d3d9a8
rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig
d3d9a8
%endif
d3d9a8
d3d9a8
%if 0%{?fedora}
d3d9a8
# upstream renamed to binary to criu
d3d9a8
ln -s %{_sbindir}/criu $RPM_BUILD_ROOT%{_sbindir}/crtools
d3d9a8
%endif
d3d9a8
d3d9a8
%post -p /sbin/ldconfig
d3d9a8
%postun -p /sbin/ldconfig
d3d9a8
d3d9a8
%files
d3d9a8
%{_sbindir}/%{name}
d3d9a8
%if 0%{?fedora}
d3d9a8
%{_sbindir}/crtools
d3d9a8
%doc %{_mandir}/man8/criu.8*
d3d9a8
%{_unitdir}/criu.service
d3d9a8
%{_unitdir}/criu.socket
d3d9a8
%{_sysconfdir}/logrotate.d/%{name}-service
d3d9a8
%{_libdir}/*.so.*
d3d9a8
%endif
d3d9a8
%doc README.md COPYING
d3d9a8
d3d9a8
%if 0%{?fedora}
d3d9a8
%files devel
d3d9a8
%{_includedir}/criu
d3d9a8
%{_libdir}/*.so
d3d9a8
%{_libdir}/pkgconfig/*.pc
d3d9a8
%endif
d3d9a8
d3d9a8
%files -n python-%{name}
d3d9a8
%{python2_sitelib}/pycriu/*
d3d9a8
%{python2_sitelib}/*egg-info
d3d9a8
d3d9a8
%files -n crit
d3d9a8
%{_bindir}/crit
d3d9a8
d3d9a8
d3d9a8
%changelog
d3d9a8
* Mon Aug 31 2015 Adrian Reber <areber@redhat.com> - 1.6.1-3
d3d9a8
- added patch to fix broken docker checkpoint/restore (#1258539)
d3d9a8
d3d9a8
* Fri Aug 28 2015 Adrian Reber <areber@redhat.com> - 1.6.1-2
d3d9a8
- removed criu.service (CVE-2015-5228, CVE-2015-5231)
d3d9a8
- removed devel sub-package (related to above CVEs)
d3d9a8
d3d9a8
* Wed Aug 19 2015 Adrian Reber <areber@redhat.com> - 1.6.1-1.1
d3d9a8
- fix release version number
d3d9a8
d3d9a8
* Thu Aug 13 2015 Adrian Reber <adrian@lisas.de> - 1.6.1-1
d3d9a8
- Update to 1.6.1
d3d9a8
- Merge changes for RHEL packaging
d3d9a8
d3d9a8
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-2
d3d9a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d3d9a8
d3d9a8
* Tue Jun 09 2015 Adrian Reber <areber@redhat.com> - 1.6-1.1
d3d9a8
- adapt to RHEL7
d3d9a8
d3d9a8
* Mon Jun 01 2015 Andrew Vagin <avagin@openvz.org> - 1.6-1
d3d9a8
- Update to 1.6
d3d9a8
d3d9a8
* Thu Apr 30 2015 Andrew Vagin <avagin@openvz.org> - 1.5.2-2
d3d9a8
- Require protobuf-python and python-ipaddr for python-criu
d3d9a8
d3d9a8
* Tue Apr 28 2015 Andrew Vagin <avagin@openvz.org> - 1.5.2
d3d9a8
- Update to 1.5.2
d3d9a8
d3d9a8
* Sun Apr 19 2015 Nikita Spiridonov <nspiridonov@odin.com> - 1.5.1-2
d3d9a8
- Create python-criu and crit subpackages
d3d9a8
d3d9a8
* Tue Mar 31 2015 Andrew Vagin <avagin@openvz.org> - 1.5.1
d3d9a8
- Update to 1.5.1
d3d9a8
d3d9a8
* Sat Dec 06 2014 Adrian Reber <adrian@lisas.de> - 1.4-1
d3d9a8
- Update to 1.4
d3d9a8
d3d9a8
* Tue Sep 23 2014 Adrian Reber <adrian@lisas.de> - 1.3.1-1
d3d9a8
- Update to 1.3.1 (#1142896)
d3d9a8
d3d9a8
* Tue Sep 02 2014 Adrian Reber <adrian@lisas.de> - 1.3-1
d3d9a8
- Update to 1.3
d3d9a8
- Dropped all upstreamed patches
d3d9a8
- included pkgconfig file in -devel
d3d9a8
d3d9a8
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-5
d3d9a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
d3d9a8
d3d9a8
* Thu Aug 07 2014 Andrew Vagin <avagin@openvz.org> - 1.2-4
d3d9a8
- Include inttypes.h for PRI helpers
d3d9a8
d3d9a8
* Thu Aug 07 2014 Andrew Vagin <avagin@openvz.org> - 1.2-3
d3d9a8
- Rebuilt for https://bugzilla.redhat.com/show_bug.cgi?id=1126751
d3d9a8
d3d9a8
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2
d3d9a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d3d9a8
d3d9a8
* Fri Feb 28 2014 Adrian Reber <adrian@lisas.de> - 1.2-1
d3d9a8
- Update to 1.2
d3d9a8
- Dropped all upstreamed patches
d3d9a8
d3d9a8
* Tue Feb 04 2014 Adrian Reber <adrian@lisas.de> - 1.1-4
d3d9a8
- Create -devel subpackage
d3d9a8
d3d9a8
* Wed Dec 11 2013 Andrew Vagin <avagin@openvz.org> - 1.0-3
d3d9a8
- Fix the epoch of crtools
d3d9a8
d3d9a8
* Tue Dec 10 2013 Andrew Vagin <avagin@openvz.org> - 1.0-2
d3d9a8
- Rename crtools to criu #1034677
d3d9a8
d3d9a8
* Wed Nov 27 2013 Andrew Vagin <avagin@openvz.org> - 1.0-1
d3d9a8
- Update to 1.0
d3d9a8
d3d9a8
* Thu Oct 24 2013 Andrew Vagin <avagin@openvz.org> - 0.8-1
d3d9a8
- Update to 0.8
d3d9a8
d3d9a8
* Tue Sep 10 2013 Andrew Vagin <avagin@openvz.org> - 0.7-1
d3d9a8
- Update to 0.7
d3d9a8
d3d9a8
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-5
d3d9a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
d3d9a8
d3d9a8
* Wed Jul 24 2013 Andrew Vagin <avagin@openvz.org> - 0.6-3
d3d9a8
- Delete all kind of -fstack-protector gcc options
d3d9a8
d3d9a8
* Wed Jul 24 2013 Andrew Vagin <avagin@openvz.org> - 0.6-3
d3d9a8
- Added arm macro to ExclusiveArch
d3d9a8
d3d9a8
* Wed Jul 03 2013 Andrew Vagin <avagin@openvz.org> - 0.6-2
d3d9a8
- fix building on ARM
d3d9a8
- fix null pointer dereference
d3d9a8
d3d9a8
* Tue Jul 02 2013 Adrian Reber <adrian@lisas.de> - 0.6-1
d3d9a8
- updated to 0.6
d3d9a8
- upstream moved binaries to sbin
d3d9a8
- using upstream's make install
d3d9a8
d3d9a8
* Tue May 14 2013 Adrian Reber <adrian@lisas.de> - 0.5-1
d3d9a8
- updated to 0.5
d3d9a8
d3d9a8
* Fri Feb 22 2013 Adrian Reber <adrian@lisas.de> - 0.4-1
d3d9a8
- updated to 0.4
d3d9a8
d3d9a8
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4
d3d9a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
d3d9a8
d3d9a8
* Tue Jan 22 2013 Adrian Reber <adrian@lisas.de> - 0.3-3
d3d9a8
- added ExclusiveArch blocker bug
d3d9a8
d3d9a8
* Fri Jan 18 2013 Adrian Reber <adrian@lisas.de> - 0.3-2
d3d9a8
- improved Summary and Description
d3d9a8
d3d9a8
* Mon Jan 14 2013 Adrian Reber <adrian@lisas.de> - 0.3-1
d3d9a8
- updated to 0.3
d3d9a8
- fix building Documentation/
d3d9a8
d3d9a8
* Tue Aug 21 2012 Adrian Reber <adrian@lisas.de> - 0.2-2
d3d9a8
- remove macros like %%{__mkdir_p} and %%{__install}
d3d9a8
- add comment why it is only x86_64
d3d9a8
d3d9a8
* Tue Aug 21 2012 Adrian Reber <adrian@lisas.de> - 0.2-1
d3d9a8
- initial release