]> git.pld-linux.org Git - packages/criu.git/blame - criu.spec
up to 3.16
[packages/criu.git] / criu.spec
CommitLineData
63f40716
JP
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
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
9f1a25f7 15Version: 3.16
83bc7f40 16Release: 1
1d80f334 17License: GPL v2 (tools), LGPL v2.1 (library)
6be8c1d2
AM
18Group: Applications/System
19Source0: http://download.openvz.org/criu/%{name}-%{version}.tar.bz2
9f1a25f7 20# Source0-md5: f355b7eb8f4037d6b87b201815df7d7a
1d80f334 21Patch0: %{name}-python.patch
a9349246 22Patch1: tests.patch
6be8c1d2 23URL: http://criu.org/
6e51e7f7 24BuildRequires: asciidoc
9f1a25f7
JP
25BuildRequires: gnutls-devel
26BuildRequires: libbpf-devel
27BuildRequires: libbsd-devel
6e51e7f7 28BuildRequires: libcap-devel
63f40716 29BuildRequires: libnet-devel
6e51e7f7 30BuildRequires: libnl-devel >= 1:3.2
9f1a25f7
JP
31BuildRequires: libselinux-devel
32BuildRequires: nftables-devel
6e51e7f7 33BuildRequires: pkgconfig
6e51e7f7 34BuildRequires: protobuf
7a48cad9 35BuildRequires: protobuf-c-devel
6e51e7f7 36BuildRequires: protobuf-devel
9f1a25f7
JP
37BuildRequires: python3
38BuildRequires: python3-modules
6e51e7f7 39BuildRequires: rpm-pythonprov
151b49e7 40BuildRequires: rpmbuild(macros) >= 2.007
7a8067bd 41BuildRequires: sed >= 4.0
aa51aa10 42Requires: %{name}-libs = %{version}-%{release}
db5fa3a6
ER
43Requires: iproute2 >= 3.5
44Requires: uname(release) >= 3.11
151b49e7 45ExclusiveArch: %{x8664} %{armv7} %{armv8} aarch64 ppc64
6be8c1d2
AM
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
a27aad5c
ER
48%define _libexecdir %{_prefix}/lib
49
6be8c1d2 50%description
7a8067bd
ER
51Checkpoint/Restore In Userspace, or CRIU, is a software tool for Linux
52operating system. Using this tool, you can freeze a running
53application (or part of it) and checkpoint it to a hard drive as a
54collection of files. You can then use the files to restore and run the
55application from the point it was frozen at. The distinctive feature
56of the CRIU project is that it is mainly implemented in user space.
57
58%description -l en.UTF-8
6be8c1d2
AM
59Checkpoint/Restore In Userspace, or CRIU (pronounced kree-oo, IPA:
60/krɪʊ/, Russian: криу), is a software tool for Linux operating system.
61Using this tool, you can freeze a running application (or part of it)
62and checkpoint it to a hard drive as a collection of files. You can
63then use the files to restore and run the application from the point
64it was frozen at. The distinctive feature of the CRIU project is that
65it is mainly implemented in user space.
66
e769518e
JB
67%description -l pl.UTF-8
68CRIU (Checkpoint/Restore In Userspace) to narzędzie programowe dla
69systemu operacyjnego Linux. Przy jego użyciu można zamrozić działającą
70aplikację (lub jej część) i zapisać migawkę na twardym dysku jako
71zestaw plików. Następnie można użyć tych plików do odtworzenia i
72uruchomienia aplikacji od miejsca, w którym została zamrożona.
73Wyróżnikiem projektu CRIU jest to, że został zaimplementowany głównie
74w przestrzeni użytkownika.
75
aa51aa10
AM
76%package libs
77Summary: CRIU shared library
78Summary(pl.UTF-8): Biblioteka współdzielona CRIU
1d80f334 79License: LGPL v2.1
aa51aa10
AM
80Group: Libraries
81
82%description libs
83CRIU shared library.
84
85%description libs -l pl.UTF-8
86Biblioteka współdzielona CRIU.
87
88%package devel
1d80f334
JB
89Summary: Header files for CRIU library
90Summary(pl.UTF-8): Pliki nagłówkowe biblioteki CRIU
91License: LGPL v2.1
aa51aa10
AM
92Group: Development/Libraries
93Requires: %{name}-libs = %{version}-%{release}
94
95%description devel
1d80f334 96Header files for CRIU library.
aa51aa10
AM
97
98%description devel -l pl.UTF-8
1d80f334
JB
99Pliki nagłówkowe biblioteki CRIU.
100
9f1a25f7 101%package -n python3-pycriu
1d80f334
JB
102Summary: Python interface to CRIU
103Summary(pl.UTF-8): Pythonowy interfejs do CRIU
104Group: Libraries/Python
105Requires: %{name}-libs = %{version}-%{release}
9f1a25f7 106Obsoletes: python-pycriu < 3.16
1d80f334 107
9f1a25f7 108%description -n python3-pycriu
1d80f334
JB
109Python interface to CRIU. This package contains also crit utility.
110
9f1a25f7 111%description -n python3-pycriu -l pl.UTF-8
1d80f334 112Pythonowy interfejs do CRIU. Ten pakiet zawiera także narzędzie crit.
aa51aa10 113
6be8c1d2
AM
114%prep
115%setup -q
1d80f334 116%patch0 -p1
a9349246 117%patch1 -p1
1d80f334 118
83bc7f40 119%{__sed} -i -e 's#-O2 -g#$(OPT)#g' Makefile
6be8c1d2 120
9f1a25f7
JP
121%{__sed} -i -e '1 s,#!.*env python.*,#!%{__python3},' scripts/criu-ns
122
6be8c1d2 123%build
7a48cad9
ER
124%define _make_opts \\\
125 DEB_HOST_MULTIARCH= \\\
126 CC="%{__cc}" \\\
127 OPT="%{rpmcppflags} %{rpmcflags}" \\\
128 PREFIX=%{_prefix} \\\
129 LIBDIR=%{_libdir} \\\
130 LOGROTATEDIR=%{_sysconfdir}/logrotate.d \\\
a27aad5c 131 LIBEXECDIR=%{_libexecdir} \\\
9f1a25f7 132 PYSITESCRIPTDIR=%{py3_sitescriptdir} \\\
7a48cad9
ER
133 MANDIR=%{_mandir} \\\
134 WERROR=0 \\\
9cf3d42a 135 SUBARCH=%{_target_cpu} \\\
7a48cad9
ER
136 V=1
137%{__make}
6be8c1d2 138
a9349246
ER
139%if %{with tests}
140%{__make} test
141%endif
142
6be8c1d2
AM
143%install
144rm -rf $RPM_BUILD_ROOT
6be8c1d2 145%{__make} install \
6be8c1d2 146 DESTDIR=$RPM_BUILD_ROOT
7a8067bd 147
59290952
ER
148install -p contrib/docker_cr.sh $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts
149
150# optional scripts, do not autogenerate bash dep
151chmod -x $RPM_BUILD_ROOT%{_libexecdir}/%{name}/scripts/*.sh
a27aad5c 152
6be8c1d2
AM
153%clean
154rm -rf $RPM_BUILD_ROOT
155
af06864b 156%post libs -p /sbin/ldconfig
aa51aa10
AM
157%postun libs -p /sbin/ldconfig
158
6be8c1d2
AM
159%files
160%defattr(644,root,root,755)
59290952 161%doc CREDITS README.md
63f40716 162%attr(755,root,root) %{_bindir}/compel
aa51aa10 163%attr(755,root,root) %{_sbindir}/criu
9f1a25f7 164%attr(755,root,root) %{_sbindir}/criu-ns
63f40716
JP
165%{_mandir}/man1/compel.1*
166%{_mandir}/man1/crit.1*
9f1a25f7 167%{_mandir}/man1/criu-ns.1*
6be8c1d2 168%{_mandir}/man8/criu.8*
a27aad5c
ER
169%dir %{_libexecdir}/%{name}
170%dir %{_libexecdir}/%{name}/scripts
59290952
ER
171%attr(755,root,root) %{_libexecdir}/%{name}/scripts/systemd-autofs-restart.sh
172%attr(755,root,root) %{_libexecdir}/%{name}/scripts/docker_cr.sh
aa51aa10
AM
173
174%files libs
175%defattr(644,root,root,755)
63f40716
JP
176%attr(755,root,root) %{_libdir}/libcompel.so.*.*
177%attr(755,root,root) %ghost %{_libdir}/libcompel.so.1
aa51aa10 178%attr(755,root,root) %{_libdir}/libcriu.so.*.*
63f40716 179%attr(755,root,root) %ghost %{_libdir}/libcriu.so.2
aa51aa10
AM
180
181%files devel
182%defattr(644,root,root,755)
63f40716 183%attr(755,root,root) %{_libdir}/libcompel.so
aa51aa10 184%attr(755,root,root) %{_libdir}/libcriu.so
63f40716 185%{_includedir}/compel
aa51aa10
AM
186%{_includedir}/criu
187%{_pkgconfigdir}/criu.pc
1d80f334 188
9f1a25f7 189%files -n python3-pycriu
1d80f334
JB
190%defattr(644,root,root,755)
191%attr(755,root,root) %{_bindir}/crit
9f1a25f7
JP
192%{py3_sitescriptdir}/pycriu
193%{py3_sitescriptdir}/crit-0.0.1-py*.egg-info
This page took 0.088153 seconds and 4 git commands to generate.