3 %bcond_with tests # build and run tests (requires root)
5 Summary: Checkpoint/restore functionality for Linux in userspace
6 Summary(pl.UTF-8): Funkcja checkpoint/restore w przestrzeni użytkownika dla Linuksa
10 License: GPL v2 (tools), LGPL v2.1 (library)
11 Group: Applications/System
12 Source0: http://download.openvz.org/criu/%{name}-%{version}.tar.bz2
13 # Source0-md5: 5d5115454d110adb744e885d82d2c1f6
14 Patch0: %{name}-python.patch
17 BuildRequires: asciidoc
18 BuildRequires: libcap-devel
19 BuildRequires: libnl-devel >= 1:3.2
20 BuildRequires: pkgconfig
21 BuildRequires: protobuf
22 BuildRequires: protobuf-c-devel
23 BuildRequires: protobuf-devel
24 BuildRequires: python >= 2
25 BuildRequires: python-modules
26 BuildRequires: rpm-pythonprov
27 BuildRequires: rpmbuild(macros) >= 1.697
28 BuildRequires: sed >= 4.0
29 Requires: %{name}-libs = %{version}-%{release}
30 Requires: iproute2 >= 3.5
31 Requires: uname(release) >= 3.11
32 ExclusiveArch: %{x8664} %{arm} aarch64 ppc64
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define _libexecdir %{_prefix}/lib
38 Checkpoint/Restore In Userspace, or CRIU, is a software tool for Linux
39 operating system. Using this tool, you can freeze a running
40 application (or part of it) and checkpoint it to a hard drive as a
41 collection of files. You can then use the files to restore and run the
42 application from the point it was frozen at. The distinctive feature
43 of the CRIU project is that it is mainly implemented in user space.
45 %description -l en.UTF-8
46 Checkpoint/Restore In Userspace, or CRIU (pronounced kree-oo, IPA:
47 /krɪʊ/, Russian: криу), is a software tool for Linux operating system.
48 Using this tool, you can freeze a running application (or part of it)
49 and checkpoint it to a hard drive as a collection of files. You can
50 then use the files to restore and run the application from the point
51 it was frozen at. The distinctive feature of the CRIU project is that
52 it is mainly implemented in user space.
54 %description -l pl.UTF-8
55 CRIU (Checkpoint/Restore In Userspace) to narzędzie programowe dla
56 systemu operacyjnego Linux. Przy jego użyciu można zamrozić działającą
57 aplikację (lub jej część) i zapisać migawkę na twardym dysku jako
58 zestaw plików. Następnie można użyć tych plików do odtworzenia i
59 uruchomienia aplikacji od miejsca, w którym została zamrożona.
60 Wyróżnikiem projektu CRIU jest to, że został zaimplementowany głównie
61 w przestrzeni użytkownika.
64 Summary: CRIU shared library
65 Summary(pl.UTF-8): Biblioteka współdzielona CRIU
72 %description libs -l pl.UTF-8
73 Biblioteka współdzielona CRIU.
76 Summary: Header files for CRIU library
77 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki CRIU
79 Group: Development/Libraries
80 Requires: %{name}-libs = %{version}-%{release}
83 Header files for CRIU library.
85 %description devel -l pl.UTF-8
86 Pliki nagłówkowe biblioteki CRIU.
88 %package -n python-pycriu
89 Summary: Python interface to CRIU
90 Summary(pl.UTF-8): Pythonowy interfejs do CRIU
91 Group: Libraries/Python
92 Requires: %{name}-libs = %{version}-%{release}
94 %description -n python-pycriu
95 Python interface to CRIU. This package contains also crit utility.
97 %description -n python-pycriu -l pl.UTF-8
98 Pythonowy interfejs do CRIU. Ten pakiet zawiera także narzędzie crit.
105 %{__sed} -i -e 's#-O2 -g#$(OPT)#g' Makefile
108 %define _make_opts \\\
109 DEB_HOST_MULTIARCH= \\\
111 OPT="%{rpmcppflags} %{rpmcflags}" \\\
112 PREFIX=%{_prefix} \\\
113 LIBDIR=%{_libdir} \\\
114 LOGROTATEDIR=%{_sysconfdir}/logrotate.d \\\
115 LIBEXECDIR=%{_libexecdir} \\\
116 PYSITESCRIPTDIR=%{py_sitescriptdir} \\\
117 MANDIR=%{_mandir} \\\
127 rm -rf $RPM_BUILD_ROOT
129 DESTDIR=$RPM_BUILD_ROOT
131 install -p contrib/docker_cr.sh $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts
133 # optional scripts, do not autogenerate bash dep
134 chmod -x $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts/*.sh
139 rm -rf $RPM_BUILD_ROOT
141 %post libs -p /sbin/ldconfig
142 %postun libs -p /sbin/ldconfig
145 %defattr(644,root,root,755)
146 %doc CREDITS README.md
147 %attr(755,root,root) %{_sbindir}/criu
148 %{_mandir}/man8/criu.8*
149 %dir %{_libexecdir}/%{name}
150 %dir %{_libexecdir}/%{name}/scripts
151 %attr(755,root,root) %{_libexecdir}/%{name}/scripts/systemd-autofs-restart.sh
152 %attr(755,root,root) %{_libexecdir}/%{name}/scripts/docker_cr.sh
155 %defattr(644,root,root,755)
156 %attr(755,root,root) %{_libdir}/libcriu.so.*.*
157 %attr(755,root,root) %ghost %{_libdir}/libcriu.so.1
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_libdir}/libcriu.so
163 %{_pkgconfigdir}/criu.pc
165 %files -n python-pycriu
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_bindir}/crit
168 %{py_sitescriptdir}/pycriu
169 %{py_sitescriptdir}/crit-0.0.1-py*.egg-info