]> git.pld-linux.org Git - packages/criu.git/blame - criu.spec
- release 2 (libbpf 1.0.x)
[packages/criu.git] / criu.spec
CommitLineData
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
12Summary: Checkpoint/restore functionality for Linux in userspace
13Summary(pl.UTF-8): Funkcja checkpoint/restore w przestrzeni użytkownika dla Linuksa
6be8c1d2 14Name: criu
2123b457 15Version: 3.17.1
4077352a 16Release: 2
1d80f334 17License: GPL v2 (tools), LGPL v2.1 (library)
6be8c1d2 18Group: Applications/System
2123b457
JP
19Source0: https://github.com/checkpoint-restore/criu/archive/v%{version}/%{name}-%{version}.tar.gz
20# Source0-md5: f3a5e3c3809177fbd4f543b68b563f5a
1d80f334 21Patch0: %{name}-python.patch
a9349246 22Patch1: tests.patch
2123b457 23Patch2: glibc2.36.patch
6be8c1d2 24URL: http://criu.org/
6e51e7f7 25BuildRequires: asciidoc
9f1a25f7
JP
26BuildRequires: gnutls-devel
27BuildRequires: libbpf-devel
28BuildRequires: libbsd-devel
6e51e7f7 29BuildRequires: libcap-devel
63f40716 30BuildRequires: libnet-devel
6e51e7f7 31BuildRequires: libnl-devel >= 1:3.2
9f1a25f7
JP
32BuildRequires: libselinux-devel
33BuildRequires: nftables-devel
6e51e7f7 34BuildRequires: pkgconfig
6e51e7f7 35BuildRequires: protobuf
7a48cad9 36BuildRequires: protobuf-c-devel
6e51e7f7 37BuildRequires: protobuf-devel
9f1a25f7
JP
38BuildRequires: python3
39BuildRequires: python3-modules
6e51e7f7 40BuildRequires: rpm-pythonprov
151b49e7 41BuildRequires: rpmbuild(macros) >= 2.007
7a8067bd 42BuildRequires: sed >= 4.0
aa51aa10 43Requires: %{name}-libs = %{version}-%{release}
db5fa3a6
ER
44Requires: iproute2 >= 3.5
45Requires: uname(release) >= 3.11
24ceb328 46ExclusiveArch: %{x8664} %{armv7} %{armv8} aarch64 ppc64
6be8c1d2
AM
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
a27aad5c
ER
49%define _libexecdir %{_prefix}/lib
50
6be8c1d2 51%description
7a8067bd
ER
52Checkpoint/Restore In Userspace, or CRIU, is a software tool for Linux
53operating system. Using this tool, you can freeze a running
54application (or part of it) and checkpoint it to a hard drive as a
55collection of files. You can then use the files to restore and run the
56application from the point it was frozen at. The distinctive feature
57of the CRIU project is that it is mainly implemented in user space.
58
59%description -l en.UTF-8
6be8c1d2
AM
60Checkpoint/Restore In Userspace, or CRIU (pronounced kree-oo, IPA:
61/krɪʊ/, Russian: криу), is a software tool for Linux operating system.
62Using this tool, you can freeze a running application (or part of it)
63and checkpoint it to a hard drive as a collection of files. You can
64then use the files to restore and run the application from the point
65it was frozen at. The distinctive feature of the CRIU project is that
66it is mainly implemented in user space.
67
e769518e
JB
68%description -l pl.UTF-8
69CRIU (Checkpoint/Restore In Userspace) to narzędzie programowe dla
70systemu operacyjnego Linux. Przy jego użyciu można zamrozić działającą
71aplikację (lub jej część) i zapisać migawkę na twardym dysku jako
72zestaw plików. Następnie można użyć tych plików do odtworzenia i
73uruchomienia aplikacji od miejsca, w którym została zamrożona.
74Wyróżnikiem projektu CRIU jest to, że został zaimplementowany głównie
75w przestrzeni użytkownika.
76
aa51aa10
AM
77%package libs
78Summary: CRIU shared library
79Summary(pl.UTF-8): Biblioteka współdzielona CRIU
1d80f334 80License: LGPL v2.1
aa51aa10
AM
81Group: Libraries
82
83%description libs
84CRIU shared library.
85
86%description libs -l pl.UTF-8
87Biblioteka współdzielona CRIU.
88
89%package devel
1d80f334
JB
90Summary: Header files for CRIU library
91Summary(pl.UTF-8): Pliki nagłówkowe biblioteki CRIU
92License: LGPL v2.1
aa51aa10
AM
93Group: Development/Libraries
94Requires: %{name}-libs = %{version}-%{release}
b7894ca3 95Requires: protobuf-c-devel
aa51aa10
AM
96
97%description devel
1d80f334 98Header files for CRIU library.
aa51aa10
AM
99
100%description devel -l pl.UTF-8
1d80f334
JB
101Pliki nagłówkowe biblioteki CRIU.
102
9f1a25f7 103%package -n python3-pycriu
1d80f334
JB
104Summary: Python interface to CRIU
105Summary(pl.UTF-8): Pythonowy interfejs do CRIU
106Group: Libraries/Python
107Requires: %{name}-libs = %{version}-%{release}
9f1a25f7 108Obsoletes: python-pycriu < 3.16
1d80f334 109
9f1a25f7 110%description -n python3-pycriu
1d80f334
JB
111Python interface to CRIU. This package contains also crit utility.
112
9f1a25f7 113%description -n python3-pycriu -l pl.UTF-8
1d80f334 114Pythonowy 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
151rm -rf $RPM_BUILD_ROOT
6be8c1d2 152%{__make} install \
6be8c1d2 153 DESTDIR=$RPM_BUILD_ROOT
7a8067bd 154
3c3b1936
JP
155%py3_install
156
59290952
ER
157install -p contrib/docker_cr.sh $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts
158
159# optional scripts, do not autogenerate bash dep
160chmod -x $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts/*.sh
a27aad5c 161
6be8c1d2
AM
162%clean
163rm -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
This page took 0.199109 seconds and 4 git commands to generate.