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