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