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