]> git.pld-linux.org Git - packages/cryptsetup.git/blame - cryptsetup.spec
- -devel R:libargon2-devel
[packages/cryptsetup.git] / cryptsetup.spec
CommitLineData
5eb10616
JB
1#
2# Conditonal build:
3ee30d05 3%bcond_with initrd # don't build initrd version
c2608e02 4%bcond_with dietlibc # build initrd version with static glibc instead of dietlibc
f13756af
JB
5%bcond_with passwdqc # password quality checking via libpasswdqc [conflicts with pwquality]
6%bcond_with pwquality # password quality checking via libpwquality [conflicts with passwdqc]
882a770e 7%bcond_without python # Python binding
2b412273 8%bcond_without tests # "make check" run
ef897fda 9
2488c838 10Summary: LUKS for dm-crypt implemented in cryptsetup
29f5822a 11Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup
ef897fda 12Name: cryptsetup
e13ad7cf 13Version: 2.0.3
de879d31 14Release: 2
d7593791 15License: GPL v2
6351d6a5 16Group: Base
e13ad7cf
AM
17Source0: https://www.kernel.org/pub/linux/utils/cryptsetup/v2.0/%{name}-%{version}.tar.xz
18# Source0-md5: ea1c722f8d4c4e36427628b679b1f819
ef897fda 19Patch0: diet.patch
207d2b78 20URL: https://gitlab.com/cryptsetup/cryptsetup
c905abc3 21BuildRequires: autoconf >= 2.67
d4db5a85
JB
22BuildRequires: automake >= 1:1.12
23BuildRequires: device-mapper-devel >= 1.02.27
069e5a93 24BuildRequires: gettext-tools >= 0.15
e13ad7cf
AM
25BuildRequires: json-c-devel
26BuildRequires: libargon2-devel >= 20171227
15278b5b 27BuildRequires: libgcrypt-devel >= 1.6.1
d4db5a85 28BuildRequires: libgpg-error-devel
196834e2 29%{?with_pwquality:BuildRequires: libpwquality-devel >= 1.0.0}
0b90291e
JB
30BuildRequires: libselinux-devel
31BuildRequires: libsepol-devel
c905abc3 32BuildRequires: libtool >= 2:2.0
0b90291e 33BuildRequires: libuuid-devel
f13756af 34%{?with_passwdqc:BuildRequires: passwdqc-devel}
d4db5a85 35BuildRequires: pkgconfig
79b6c53c 36BuildRequires: popt-devel >= 1.7
882a770e 37%if %{with python}
7dcaf052 38BuildRequires: python-devel >= 1:2.6
882a770e
JB
39BuildRequires: rpm-pythonprov
40%endif
15278b5b
JB
41BuildRequires: tar >= 1:1.22
42BuildRequires: xz
d07d45f7 43%if %{with initrd}
21d48aec
JR
44BuildRequires: libgpg-error-static
45 %if %{with dietlibc}
df4d3321 46BuildRequires: device-mapper-dietlibc >= 1.02.27
ef897fda 47BuildRequires: dietlibc-static
15278b5b 48BuildRequires: libgcrypt-dietlibc >= 1.6.1
21d48aec
JR
49BuildRequires: libuuid-dietlibc
50BuildRequires: popt-dietlibc
51 %else
df4d3321 52BuildRequires: device-mapper-static >= 1.02.27
15278b5b 53BuildRequires: libgcrypt-static >= 1.6.1
a6fd3218 54BuildRequires: libselinux-static
8d9e50de 55BuildRequires: libsepol-static
a6fd3218 56BuildRequires: libuuid-static
57BuildRequires: popt-static
c2608e02 58BuildRequires: udev-static
21d48aec 59 %endif
5eb10616 60%endif
15278b5b 61Requires: libgcrypt >= 1.6.1
196834e2 62%{?with_pwquality:Requires: libpwquality >= 1.0.0}
79b6c53c 63Requires: popt >= 1.7
f96aa109
JR
64Provides: cryptsetup-luks = %{version}-%{release}
65Obsoletes: cryptsetup-luks < 1.4.1-2
3ee30d05 66%{!?with_initrd:Obsoletes: cryptsetup-initrd < %{version}-%{release}}
751c89df
ER
67Conflicts: udev < 1:118-1
68Conflicts: udev-core < 1:115
6351d6a5 69BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71%define _sbindir /sbin
72
73%description
6e98e6fb 74LUKS is the upcoming standard for Linux hard disk encryption. By
75providing a standard on-disk-format, it does not only facilitate
76compatibility among distributions, but also provide secure management
77of multiple user passwords. In contrast to existing solution, LUKS
78stores all setup necessary setup information in the partition header,
79enabling the user to transport or migrate his data seamlessly.
6351d6a5 80
6e98e6fb 81This package contains implementation of LUKS for dm-crypt implemented
82in cryptsetup.
6351d6a5 83
77f30028
JR
84%description -l pl.UTF-8
85LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
86Dostarczając standardowy format danych na dysku nie tylko ułatwia
87utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
88bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
89do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
90informacje o konfiguracji w nagłówku partycji, pozwalając
91użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
12cca230 92
77f30028 93Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
12cca230
JB
94cryptsetup.
95
6351d6a5 96%package devel
97Summary: Header files for cryptsetup library
29f5822a 98Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup
6351d6a5 99Group: Development/Libraries
100Requires: %{name} = %{version}-%{release}
d4db5a85 101Requires: device-mapper-devel >= 1.02.27
de879d31 102Requires: libargon2-devel >= 20171227
15278b5b 103Requires: libgcrypt-devel >= 1.6.1
ef897fda
ER
104Provides: cryptsetup-luks-devel = %{version}-%{release}
105Obsoletes: cryptsetup-luks-devel < 1.4.1-2
6351d6a5 106
107%description devel
108Header files for cryptsetup library.
109
77f30028
JR
110%description devel -l pl.UTF-8
111Pliki nagłówkowe biblioteki cryptsetup.
6351d6a5 112
113%package static
114Summary: Static cryptsetup library
29f5822a 115Summary(pl.UTF-8): Statyczna biblioteka cryptsetup
6351d6a5 116Group: Development/Libraries
117Requires: %{name}-devel = %{version}-%{release}
ef897fda
ER
118Provides: cryptsetup-luks-static = %{version}-%{release}
119Obsoletes: cryptsetup-luks-static < 1.4.1-2
6351d6a5 120
121%description static
122Static version of cryptsetup library.
123
77f30028 124%description static -l pl.UTF-8
6351d6a5 125Statyczna wersja biblioteki cryptsetup.
126
882a770e
JB
127%package -n python-pycryptsetup
128Summary: Python binding for cryptsetup library
129Summary(pl.UTF-8): Wiązanie Pythona do biblioteki cryptsetup
130Group: Libraries/Python
28c8b65f 131Requires: %{name} = %{version}-%{release}
882a770e
JB
132%pyrequires_eq python-libs
133
134%description -n python-pycryptsetup
135Python binding for cryptsetup library.
136
137%description -n python-pycryptsetup -l pl.UTF-8
138Wiązanie Pythona do biblioteki cryptsetup.
139
d07d45f7
ER
140%package initrd
141Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
1c89131c 142Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
d07d45f7 143Group: Base
311e3692 144Requires: udev-initrd >= 1:115
ef897fda
ER
145Provides: cryptsetup-luks-initrd = %{version}-%{release}
146Obsoletes: cryptsetup-luks-initrd < 1.4.1-2
2dd5e1c3 147Conflicts: geninitrd < 10000.10
d07d45f7
ER
148
149%description initrd
150This package contains implementation of LUKS for dm-crypt implemented
1c89131c
JB
151in cryptsetup - statically linked for initrd.
152
153%description initrd -l pl.UTF-8
ef897fda
ER
154Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną w
155cryptsetup - wersję statycznie zlinkowaną dla initrd.
d07d45f7 156
6351d6a5 157%prep
ef897fda 158%setup -q
396f27d3 159%{?with_diet:%patch0 -p1}
6351d6a5 160
c627e74c
JB
161%{__rm} po/stamp-po
162
6351d6a5 163%build
8d9e50de 164%{__gettextize}
d7593791 165%{__libtoolize}
8d9e50de 166%{__aclocal} -I m4
167%{__autoconf}
d7593791 168%{__autoheader}
8d9e50de 169%{__automake}
d07d45f7
ER
170
171%if %{with initrd}
802ed4ef 172CC="%{__cc}"
a6fd3218 173%configure \
21d48aec 174%if %{with dietlibc}
04af2f11 175 CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
8a7a87e4 176 LIBS="-lcompat" \
21d48aec
JR
177 ac_cv_lib_popt_poptConfigFileToString=yes \
178 ac_cv_lib_sepol_sepol_bool_set=no \
179 ac_cv_lib_selinux_is_selinux_enabled=no \
802ed4ef
ER
180%endif
181%if "%{?configure_cache}" == "1"
182 --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
21d48aec 183%endif
196834e2 184 --disable-nls \
d8565a62 185 --disable-silent-rules \
8a7a87e4 186 --disable-shared \
5eb10616 187 --enable-static \
e13ad7cf
AM
188 --enable-static-cryptsetup \
189 --with-tmpfilesdir=%{systemdtmpfilesdir} \
190 --with-luks2-lock-path=/var/run/%{name}
21d48aec 191
21d48aec
JR
192%{__make} -C lib
193
194%if %{with dietlibc}
195# we have to do it by hand cause libtool "know better" and forces
196# static libs from /usr/lib
802ed4ef 197CC="%{__cc}"
04af2f11 198diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
593621cb
JR
199 -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
200 -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
21d48aec
JR
201%else
202%{__make} -C src
d07d45f7 203mv src/cryptsetup cryptsetup-initrd
21d48aec 204%endif
23904b26 205
d07d45f7
ER
206%{__make} clean
207%endif
208
209%configure \
04af2f11 210 --enable-udev \
d8565a62 211 --disable-silent-rules \
882a770e 212 --enable-static \
e13ad7cf 213 --enable-libargon2 \
f13756af
JB
214 %{?with_passwdqc:--enable-passwdqc=/etc/passwdqc.conf} \
215 %{?with_pwquality:--enable-pwquality} \
e13ad7cf
AM
216 %{?with_python:--enable-python} \
217 --with-tmpfilesdir=%{systemdtmpfilesdir} \
218 --with-luks2-lock-path=/var/run/%{name}
6351d6a5 219%{__make}
220
b0d1eeaa
AM
221%{?with_tests:%{__make} check}
222
6351d6a5 223%install
224rm -rf $RPM_BUILD_ROOT
225
e13ad7cf
AM
226install -d $RPM_BUILD_ROOT/var/run/cryptsetup
227
6351d6a5 228%{__make} install \
229 DESTDIR=$RPM_BUILD_ROOT
230
231install -d $RPM_BUILD_ROOT/%{_lib}
d7593791
JB
232mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
233ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
6351d6a5 234 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
235
d07d45f7 236%if %{with initrd}
927d0cdf 237install -d $RPM_BUILD_ROOT%{_libdir}/initrd
802ed4ef 238install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
d07d45f7
ER
239%endif
240
5da1c8e9 241%{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.la}
882a770e 242
ef897fda 243%find_lang %{name}
6351d6a5 244
245%clean
246rm -rf $RPM_BUILD_ROOT
247
248%post -p /sbin/ldconfig
249%postun -p /sbin/ldconfig
250
ef897fda 251%files -f %{name}.lang
6351d6a5 252%defattr(644,root,root,755)
d4db5a85 253%doc AUTHORS ChangeLog FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
6351d6a5 254%attr(755,root,root) %{_sbindir}/cryptsetup
e13ad7cf
AM
255%attr(755,root,root) %{_sbindir}/cryptsetup-reencrypt
256%attr(755,root,root) %{_sbindir}/integritysetup
56c60c79 257%attr(755,root,root) %{_sbindir}/veritysetup
6351d6a5 258%attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
e13ad7cf 259%attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.12
d7593791 260%{_mandir}/man8/cryptsetup.8*
e13ad7cf
AM
261%{_mandir}/man8/cryptsetup-reencrypt.8*
262%{_mandir}/man8/integritysetup.8*
56c60c79 263%{_mandir}/man8/veritysetup.8*
e13ad7cf
AM
264%{systemdtmpfilesdir}/cryptsetup.conf
265%attr(700,root,root) %dir /var/run/cryptsetup
6351d6a5 266
267%files devel
268%defattr(644,root,root,755)
269%attr(755,root,root) %{_libdir}/libcryptsetup.so
270%{_libdir}/libcryptsetup.la
d7593791 271%{_includedir}/libcryptsetup.h
79b6c53c 272%{_pkgconfigdir}/libcryptsetup.pc
6351d6a5 273
a6fd3218 274%files static
275%defattr(644,root,root,755)
276%{_libdir}/libcryptsetup.a
d07d45f7 277
882a770e
JB
278%if %{with python}
279%files -n python-pycryptsetup
280%defattr(644,root,root,755)
281%attr(755,root,root) %{py_sitedir}/pycryptsetup.so
282%endif
283
d07d45f7
ER
284%if %{with initrd}
285%files initrd
286%defattr(644,root,root,755)
927d0cdf 287%attr(755,root,root) %{_libdir}/initrd/cryptsetup
d07d45f7 288%endif
This page took 0.080148 seconds and 4 git commands to generate.