2 # - package static libs
3 # /usr/lib/compel/fds.lib.a
4 # /usr/lib/compel/scripts/compel-pack.lds.S
5 # /usr/lib/compel/std.lib.a
6 # /usr/lib64/libcompel.a
10 %bcond_with tests # build and run tests (requires root)
12 Summary: Checkpoint/restore functionality for Linux in userspace
13 Summary(pl.UTF-8): Funkcja checkpoint/restore w przestrzeni użytkownika dla Linuksa
17 License: GPL v2 (tools), LGPL v2.1 (library)
18 Group: Applications/System
19 Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/%{name}-%{version}.tar.gz
20 # Source0-md5: f3a5e3c3809177fbd4f543b68b563f5a
21 Patch0: %{name}-python.patch
23 Patch2: glibc2.36.patch
25 BuildRequires: asciidoc
26 BuildRequires: gnutls-devel
27 BuildRequires: libbpf-devel
28 BuildRequires: libbsd-devel
29 BuildRequires: libcap-devel
30 BuildRequires: libnet-devel
31 BuildRequires: libnl-devel >= 1:3.2
32 BuildRequires: libselinux-devel
33 BuildRequires: nftables-devel
34 BuildRequires: pkgconfig
35 BuildRequires: protobuf
36 BuildRequires: protobuf-c-devel
37 BuildRequires: protobuf-devel
38 BuildRequires: python3
39 BuildRequires: python3-modules
40 BuildRequires: rpm-pythonprov
41 BuildRequires: rpmbuild(macros) >= 2.007
42 BuildRequires: sed >= 4.0
43 Requires: %{name}-libs = %{version}-%{release}
44 Requires: iproute2 >= 3.5
45 Requires: uname(release) >= 3.11
46 ExclusiveArch: %{x8664} %{armv7} %{armv8} aarch64 ppc64
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 %define _libexecdir %{_prefix}/lib
52 Checkpoint/Restore In Userspace, or CRIU, is a software tool for Linux
53 operating system. Using this tool, you can freeze a running
54 application (or part of it) and checkpoint it to a hard drive as a
55 collection of files. You can then use the files to restore and run the
56 application from the point it was frozen at. The distinctive feature
57 of the CRIU project is that it is mainly implemented in user space.
59 %description -l en.UTF-8
60 Checkpoint/Restore In Userspace, or CRIU (pronounced kree-oo, IPA:
61 /krɪʊ/, Russian: криу), is a software tool for Linux operating system.
62 Using this tool, you can freeze a running application (or part of it)
63 and checkpoint it to a hard drive as a collection of files. You can
64 then use the files to restore and run the application from the point
65 it was frozen at. The distinctive feature of the CRIU project is that
66 it is mainly implemented in user space.
68 %description -l pl.UTF-8
69 CRIU (Checkpoint/Restore In Userspace) to narzędzie programowe dla
70 systemu operacyjnego Linux. Przy jego użyciu można zamrozić działającą
71 aplikację (lub jej część) i zapisać migawkę na twardym dysku jako
72 zestaw plików. Następnie można użyć tych plików do odtworzenia i
73 uruchomienia aplikacji od miejsca, w którym została zamrożona.
74 Wyróżnikiem projektu CRIU jest to, że został zaimplementowany głównie
75 w przestrzeni użytkownika.
78 Summary: CRIU shared library
79 Summary(pl.UTF-8): Biblioteka współdzielona CRIU
86 %description libs -l pl.UTF-8
87 Biblioteka współdzielona CRIU.
90 Summary: Header files for CRIU library
91 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki CRIU
93 Group: Development/Libraries
94 Requires: %{name}-libs = %{version}-%{release}
95 Requires: protobuf-c-devel
98 Header files for CRIU library.
100 %description devel -l pl.UTF-8
101 Pliki nagłówkowe biblioteki CRIU.
103 %package -n python3-pycriu
104 Summary: Python interface to CRIU
105 Summary(pl.UTF-8): Pythonowy interfejs do CRIU
106 Group: Libraries/Python
107 Requires: %{name}-libs = %{version}-%{release}
108 Obsoletes: python-pycriu < 3.16
110 %description -n python3-pycriu
111 Python interface to CRIU. This package contains also crit utility.
113 %description -n python3-pycriu -l pl.UTF-8
114 Pythonowy interfejs do CRIU. Ten pakiet zawiera także narzędzie crit.
122 %{__sed} -i -e 's#-O2 -g#$(OPT)#g' Makefile
124 %{__sed} -i -e '1 s,#!.*env python.*,#!%{__python3},' scripts/criu-ns
126 %{__ln_s} scripts/crit-setup.py setup.py
129 %define _make_opts \\\
130 DEB_HOST_MULTIARCH= \\\
132 OPT="%{rpmcppflags} %{rpmcflags}" \\\
133 PREFIX=%{_prefix} \\\
134 LIBDIR=%{_libdir} \\\
135 LOGROTATEDIR=%{_sysconfdir}/logrotate.d \\\
136 LIBEXECDIR=%{_libexecdir} \\\
137 MANDIR=%{_mandir} \\\
139 SUBARCH=%{_target_cpu} \\\
151 rm -rf $RPM_BUILD_ROOT
153 DESTDIR=$RPM_BUILD_ROOT
157 install -p contrib/docker_cr.sh $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts
159 # optional scripts, do not autogenerate bash dep
160 chmod -x $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts/*.sh
163 rm -rf $RPM_BUILD_ROOT
165 %post libs -p /sbin/ldconfig
166 %postun libs -p /sbin/ldconfig
169 %defattr(644,root,root,755)
170 %doc CREDITS README.md
171 %attr(755,root,root) %{_bindir}/compel
172 %attr(755,root,root) %{_sbindir}/criu
173 %attr(755,root,root) %{_sbindir}/criu-ns
174 %{_mandir}/man1/compel.1*
175 %{_mandir}/man1/crit.1*
176 %{_mandir}/man1/criu-ns.1*
177 %{_mandir}/man8/criu.8*
178 %dir %{_libexecdir}/%{name}
179 %dir %{_libexecdir}/%{name}/scripts
180 %attr(755,root,root) %{_libexecdir}/%{name}/scripts/systemd-autofs-restart.sh
181 %attr(755,root,root) %{_libexecdir}/%{name}/scripts/docker_cr.sh
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_libdir}/libcompel.so.*.*
186 %attr(755,root,root) %ghost %{_libdir}/libcompel.so.1
187 %attr(755,root,root) %{_libdir}/libcriu.so.*.*
188 %attr(755,root,root) %ghost %{_libdir}/libcriu.so.2
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_libdir}/libcompel.so
193 %attr(755,root,root) %{_libdir}/libcriu.so
194 %{_includedir}/compel
196 %{_pkgconfigdir}/criu.pc
198 %files -n python3-pycriu
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_bindir}/crit
201 %{py3_sitescriptdir}/pycriu
202 %{py3_sitescriptdir}/crit-0.0.1-py*.egg-info