]>
Commit | Line | Data |
---|---|---|
63f40716 JP |
1 | # TODO |
2 | # - package static libs | |
da2cfa44 | 3 | # /usr/lib/compel/fds.lib.a |
63f40716 JP |
4 | # /usr/lib/compel/scripts/compel-pack.lds.S |
5 | # /usr/lib/compel/std.lib.a | |
6 | # /usr/lib64/libcompel.a | |
7 | # /usr/lib64/libcriu.a | |
a9349246 ER |
8 | # |
9 | # Conditional build: | |
10 | %bcond_with tests # build and run tests (requires root) | |
11 | ||
e769518e JB |
12 | Summary: Checkpoint/restore functionality for Linux in userspace |
13 | Summary(pl.UTF-8): Funkcja checkpoint/restore w przestrzeni użytkownika dla Linuksa | |
6be8c1d2 | 14 | Name: criu |
2123b457 | 15 | Version: 3.17.1 |
4077352a | 16 | Release: 2 |
1d80f334 | 17 | License: GPL v2 (tools), LGPL v2.1 (library) |
6be8c1d2 | 18 | Group: Applications/System |
2123b457 JP |
19 | Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/%{name}-%{version}.tar.gz |
20 | # Source0-md5: f3a5e3c3809177fbd4f543b68b563f5a | |
1d80f334 | 21 | Patch0: %{name}-python.patch |
a9349246 | 22 | Patch1: tests.patch |
2123b457 | 23 | Patch2: glibc2.36.patch |
6be8c1d2 | 24 | URL: http://criu.org/ |
6e51e7f7 | 25 | BuildRequires: asciidoc |
9f1a25f7 JP |
26 | BuildRequires: gnutls-devel |
27 | BuildRequires: libbpf-devel | |
28 | BuildRequires: libbsd-devel | |
6e51e7f7 | 29 | BuildRequires: libcap-devel |
63f40716 | 30 | BuildRequires: libnet-devel |
6e51e7f7 | 31 | BuildRequires: libnl-devel >= 1:3.2 |
9f1a25f7 JP |
32 | BuildRequires: libselinux-devel |
33 | BuildRequires: nftables-devel | |
6e51e7f7 | 34 | BuildRequires: pkgconfig |
6e51e7f7 | 35 | BuildRequires: protobuf |
7a48cad9 | 36 | BuildRequires: protobuf-c-devel |
6e51e7f7 | 37 | BuildRequires: protobuf-devel |
9f1a25f7 JP |
38 | BuildRequires: python3 |
39 | BuildRequires: python3-modules | |
6e51e7f7 | 40 | BuildRequires: rpm-pythonprov |
151b49e7 | 41 | BuildRequires: rpmbuild(macros) >= 2.007 |
7a8067bd | 42 | BuildRequires: sed >= 4.0 |
aa51aa10 | 43 | Requires: %{name}-libs = %{version}-%{release} |
db5fa3a6 ER |
44 | Requires: iproute2 >= 3.5 |
45 | Requires: uname(release) >= 3.11 | |
24ceb328 | 46 | ExclusiveArch: %{x8664} %{armv7} %{armv8} aarch64 ppc64 |
6be8c1d2 AM |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
a27aad5c ER |
49 | %define _libexecdir %{_prefix}/lib |
50 | ||
6be8c1d2 | 51 | %description |
7a8067bd ER |
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. | |
58 | ||
59 | %description -l en.UTF-8 | |
6be8c1d2 AM |
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. | |
67 | ||
e769518e JB |
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. | |
76 | ||
aa51aa10 AM |
77 | %package libs |
78 | Summary: CRIU shared library | |
79 | Summary(pl.UTF-8): Biblioteka współdzielona CRIU | |
1d80f334 | 80 | License: LGPL v2.1 |
aa51aa10 AM |
81 | Group: Libraries |
82 | ||
83 | %description libs | |
84 | CRIU shared library. | |
85 | ||
86 | %description libs -l pl.UTF-8 | |
87 | Biblioteka współdzielona CRIU. | |
88 | ||
89 | %package devel | |
1d80f334 JB |
90 | Summary: Header files for CRIU library |
91 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki CRIU | |
92 | License: LGPL v2.1 | |
aa51aa10 AM |
93 | Group: Development/Libraries |
94 | Requires: %{name}-libs = %{version}-%{release} | |
b7894ca3 | 95 | Requires: protobuf-c-devel |
aa51aa10 AM |
96 | |
97 | %description devel | |
1d80f334 | 98 | Header files for CRIU library. |
aa51aa10 AM |
99 | |
100 | %description devel -l pl.UTF-8 | |
1d80f334 JB |
101 | Pliki nagłówkowe biblioteki CRIU. |
102 | ||
9f1a25f7 | 103 | %package -n python3-pycriu |
1d80f334 JB |
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} | |
9f1a25f7 | 108 | Obsoletes: python-pycriu < 3.16 |
1d80f334 | 109 | |
9f1a25f7 | 110 | %description -n python3-pycriu |
1d80f334 JB |
111 | Python interface to CRIU. This package contains also crit utility. |
112 | ||
9f1a25f7 | 113 | %description -n python3-pycriu -l pl.UTF-8 |
1d80f334 | 114 | Pythonowy interfejs do CRIU. Ten pakiet zawiera także narzędzie crit. |
aa51aa10 | 115 | |
6be8c1d2 AM |
116 | %prep |
117 | %setup -q | |
1d80f334 | 118 | %patch0 -p1 |
a9349246 | 119 | %patch1 -p1 |
2123b457 | 120 | %patch2 -p1 |
1d80f334 | 121 | |
83bc7f40 | 122 | %{__sed} -i -e 's#-O2 -g#$(OPT)#g' Makefile |
6be8c1d2 | 123 | |
9f1a25f7 JP |
124 | %{__sed} -i -e '1 s,#!.*env python.*,#!%{__python3},' scripts/criu-ns |
125 | ||
3c3b1936 JP |
126 | %{__ln_s} scripts/crit-setup.py setup.py |
127 | ||
6be8c1d2 | 128 | %build |
7a48cad9 ER |
129 | %define _make_opts \\\ |
130 | DEB_HOST_MULTIARCH= \\\ | |
131 | CC="%{__cc}" \\\ | |
132 | OPT="%{rpmcppflags} %{rpmcflags}" \\\ | |
133 | PREFIX=%{_prefix} \\\ | |
134 | LIBDIR=%{_libdir} \\\ | |
135 | LOGROTATEDIR=%{_sysconfdir}/logrotate.d \\\ | |
a27aad5c | 136 | LIBEXECDIR=%{_libexecdir} \\\ |
7a48cad9 ER |
137 | MANDIR=%{_mandir} \\\ |
138 | WERROR=0 \\\ | |
9cf3d42a | 139 | SUBARCH=%{_target_cpu} \\\ |
2123b457 | 140 | CONFIG_AMDGPU=n \\\ |
7a48cad9 ER |
141 | V=1 |
142 | %{__make} | |
6be8c1d2 | 143 | |
3c3b1936 JP |
144 | %py3_build |
145 | ||
a9349246 ER |
146 | %if %{with tests} |
147 | %{__make} test | |
148 | %endif | |
149 | ||
6be8c1d2 AM |
150 | %install |
151 | rm -rf $RPM_BUILD_ROOT | |
6be8c1d2 | 152 | %{__make} install \ |
6be8c1d2 | 153 | DESTDIR=$RPM_BUILD_ROOT |
7a8067bd | 154 | |
3c3b1936 JP |
155 | %py3_install |
156 | ||
59290952 ER |
157 | install -p contrib/docker_cr.sh $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts |
158 | ||
159 | # optional scripts, do not autogenerate bash dep | |
160 | chmod -x $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts/*.sh | |
a27aad5c | 161 | |
6be8c1d2 AM |
162 | %clean |
163 | rm -rf $RPM_BUILD_ROOT | |
164 | ||
af06864b | 165 | %post libs -p /sbin/ldconfig |
aa51aa10 AM |
166 | %postun libs -p /sbin/ldconfig |
167 | ||
6be8c1d2 AM |
168 | %files |
169 | %defattr(644,root,root,755) | |
59290952 | 170 | %doc CREDITS README.md |
63f40716 | 171 | %attr(755,root,root) %{_bindir}/compel |
aa51aa10 | 172 | %attr(755,root,root) %{_sbindir}/criu |
9f1a25f7 | 173 | %attr(755,root,root) %{_sbindir}/criu-ns |
63f40716 JP |
174 | %{_mandir}/man1/compel.1* |
175 | %{_mandir}/man1/crit.1* | |
9f1a25f7 | 176 | %{_mandir}/man1/criu-ns.1* |
6be8c1d2 | 177 | %{_mandir}/man8/criu.8* |
a27aad5c ER |
178 | %dir %{_libexecdir}/%{name} |
179 | %dir %{_libexecdir}/%{name}/scripts | |
59290952 ER |
180 | %attr(755,root,root) %{_libexecdir}/%{name}/scripts/systemd-autofs-restart.sh |
181 | %attr(755,root,root) %{_libexecdir}/%{name}/scripts/docker_cr.sh | |
aa51aa10 AM |
182 | |
183 | %files libs | |
184 | %defattr(644,root,root,755) | |
63f40716 JP |
185 | %attr(755,root,root) %{_libdir}/libcompel.so.*.* |
186 | %attr(755,root,root) %ghost %{_libdir}/libcompel.so.1 | |
aa51aa10 | 187 | %attr(755,root,root) %{_libdir}/libcriu.so.*.* |
63f40716 | 188 | %attr(755,root,root) %ghost %{_libdir}/libcriu.so.2 |
aa51aa10 AM |
189 | |
190 | %files devel | |
191 | %defattr(644,root,root,755) | |
63f40716 | 192 | %attr(755,root,root) %{_libdir}/libcompel.so |
aa51aa10 | 193 | %attr(755,root,root) %{_libdir}/libcriu.so |
63f40716 | 194 | %{_includedir}/compel |
aa51aa10 AM |
195 | %{_includedir}/criu |
196 | %{_pkgconfigdir}/criu.pc | |
1d80f334 | 197 | |
9f1a25f7 | 198 | %files -n python3-pycriu |
1d80f334 JB |
199 | %defattr(644,root,root,755) |
200 | %attr(755,root,root) %{_bindir}/crit | |
9f1a25f7 JP |
201 | %{py3_sitescriptdir}/pycriu |
202 | %{py3_sitescriptdir}/crit-0.0.1-py*.egg-info |