]> git.pld-linux.org Git - packages/criu.git/blob - criu.spec
- release 2 (libbpf 1.0.x)
[packages/criu.git] / criu.spec
1 # TODO
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
7 #       /usr/lib64/libcriu.a
8 #
9 # Conditional build:
10 %bcond_with     tests           # build and run tests (requires root)
11
12 Summary:        Checkpoint/restore functionality for Linux in userspace
13 Summary(pl.UTF-8):      Funkcja checkpoint/restore w przestrzeni użytkownika dla Linuksa
14 Name:           criu
15 Version:        3.17.1
16 Release:        2
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
22 Patch1:         tests.patch
23 Patch2:         glibc2.36.patch
24 URL:            http://criu.org/
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)
48
49 %define         _libexecdir     %{_prefix}/lib
50
51 %description
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
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
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
77 %package libs
78 Summary:        CRIU shared library
79 Summary(pl.UTF-8):      Biblioteka współdzielona CRIU
80 License:        LGPL v2.1
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
90 Summary:        Header files for CRIU library
91 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki CRIU
92 License:        LGPL v2.1
93 Group:          Development/Libraries
94 Requires:       %{name}-libs = %{version}-%{release}
95 Requires:       protobuf-c-devel
96
97 %description devel
98 Header files for CRIU library.
99
100 %description devel -l pl.UTF-8
101 Pliki nagłówkowe biblioteki CRIU.
102
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
109
110 %description -n python3-pycriu
111 Python interface to CRIU. This package contains also crit utility.
112
113 %description -n python3-pycriu -l pl.UTF-8
114 Pythonowy interfejs do CRIU. Ten pakiet zawiera także narzędzie crit.
115
116 %prep
117 %setup -q
118 %patch0 -p1
119 %patch1 -p1
120 %patch2 -p1
121
122 %{__sed} -i -e 's#-O2 -g#$(OPT)#g' Makefile
123
124 %{__sed} -i -e '1 s,#!.*env python.*,#!%{__python3},' scripts/criu-ns
125
126 %{__ln_s} scripts/crit-setup.py setup.py
127
128 %build
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 \\\
136         LIBEXECDIR=%{_libexecdir} \\\
137         MANDIR=%{_mandir} \\\
138         WERROR=0 \\\
139         SUBARCH=%{_target_cpu} \\\
140         CONFIG_AMDGPU=n \\\
141         V=1
142 %{__make}
143
144 %py3_build
145
146 %if %{with tests}
147 %{__make} test
148 %endif
149
150 %install
151 rm -rf $RPM_BUILD_ROOT
152 %{__make} install \
153         DESTDIR=$RPM_BUILD_ROOT
154
155 %py3_install
156
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
161
162 %clean
163 rm -rf $RPM_BUILD_ROOT
164
165 %post   libs -p /sbin/ldconfig
166 %postun libs -p /sbin/ldconfig
167
168 %files
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
182
183 %files libs
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
189
190 %files devel
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
195 %{_includedir}/criu
196 %{_pkgconfigdir}/criu.pc
197
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
This page took 0.185874 seconds and 3 git commands to generate.