3 %bcond_with initrd # don't build initrd version
4 %bcond_with dietlibc # build initrd version with static glibc instead of dietlibc
5 %bcond_with passwdqc # password quality checking via libpasswdqc [conflicts with pwquality]
6 %bcond_with pwquality # password quality checking via libpwquality [conflicts with passwdqc]
7 %bcond_without python # Python binding
8 %bcond_without tests # "make check" run
10 Summary: LUKS for dm-crypt implemented in cryptsetup
11 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup
17 Source0: https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/%{name}-%{version}.tar.xz
18 # Source0-md5: 56c385fe87fc2b6873df4b7f89202d0f
20 Patch1: 0001-Set-skcipher-key-before-accept-call-in-kernel-crypto.patch
21 Patch2: 0002-Fix-kernel-crypto-backend-to-set-key-before-accept-c.patch
22 URL: https://gitlab.com/cryptsetup/cryptsetup
23 BuildRequires: autoconf >= 2.67
24 BuildRequires: automake >= 1:1.12
25 BuildRequires: device-mapper-devel >= 1.02.27
26 BuildRequires: gettext-tools >= 0.15
27 BuildRequires: libgcrypt-devel >= 1.6.1
28 BuildRequires: libgpg-error-devel
29 %{?with_pwquality:BuildRequires: libpwquality-devel >= 1.0.0}
30 BuildRequires: libselinux-devel
31 BuildRequires: libsepol-devel
32 BuildRequires: libtool >= 2:2.0
33 BuildRequires: libuuid-devel
34 %{?with_passwdqc:BuildRequires: passwdqc-devel}
35 BuildRequires: pkgconfig
36 BuildRequires: popt-devel >= 1.7
38 BuildRequires: python-devel >= 1:2.6
39 BuildRequires: rpm-pythonprov
41 BuildRequires: tar >= 1:1.22
44 BuildRequires: libgpg-error-static
46 BuildRequires: device-mapper-dietlibc >= 1.02.27
47 BuildRequires: dietlibc-static
48 BuildRequires: libgcrypt-dietlibc >= 1.6.1
49 BuildRequires: libuuid-dietlibc
50 BuildRequires: popt-dietlibc
52 BuildRequires: device-mapper-static >= 1.02.27
53 BuildRequires: libgcrypt-static >= 1.6.1
54 BuildRequires: libselinux-static
55 BuildRequires: libsepol-static
56 BuildRequires: libuuid-static
57 BuildRequires: popt-static
58 BuildRequires: udev-static
61 Requires: libgcrypt >= 1.6.1
62 %{?with_pwquality:Requires: libpwquality >= 1.0.0}
64 Provides: cryptsetup-luks = %{version}-%{release}
65 Obsoletes: cryptsetup-luks < 1.4.1-2
66 %{!?with_initrd:Obsoletes: cryptsetup-initrd < %{version}-%{release}}
67 Conflicts: udev < 1:118-1
68 Conflicts: udev-core < 1:115
69 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71 %define _sbindir /sbin
74 LUKS is the upcoming standard for Linux hard disk encryption. By
75 providing a standard on-disk-format, it does not only facilitate
76 compatibility among distributions, but also provide secure management
77 of multiple user passwords. In contrast to existing solution, LUKS
78 stores all setup necessary setup information in the partition header,
79 enabling the user to transport or migrate his data seamlessly.
81 This package contains implementation of LUKS for dm-crypt implemented
84 %description -l pl.UTF-8
85 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
86 Dostarczając standardowy format danych na dysku nie tylko ułatwia
87 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
88 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
89 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
90 informacje o konfiguracji w nagłówku partycji, pozwalając
91 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
93 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
97 Summary: Header files for cryptsetup library
98 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup
99 Group: Development/Libraries
100 Requires: %{name} = %{version}-%{release}
101 Requires: device-mapper-devel >= 1.02.27
102 Requires: libgcrypt-devel >= 1.6.1
103 Provides: cryptsetup-luks-devel = %{version}-%{release}
104 Obsoletes: cryptsetup-luks-devel < 1.4.1-2
107 Header files for cryptsetup library.
109 %description devel -l pl.UTF-8
110 Pliki nagłówkowe biblioteki cryptsetup.
113 Summary: Static cryptsetup library
114 Summary(pl.UTF-8): Statyczna biblioteka cryptsetup
115 Group: Development/Libraries
116 Requires: %{name}-devel = %{version}-%{release}
117 Provides: cryptsetup-luks-static = %{version}-%{release}
118 Obsoletes: cryptsetup-luks-static < 1.4.1-2
121 Static version of cryptsetup library.
123 %description static -l pl.UTF-8
124 Statyczna wersja biblioteki cryptsetup.
126 %package -n python-pycryptsetup
127 Summary: Python binding for cryptsetup library
128 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki cryptsetup
129 Group: Libraries/Python
130 Requires: %{name} = %{version}-%{release}
131 %pyrequires_eq python-libs
133 %description -n python-pycryptsetup
134 Python binding for cryptsetup library.
136 %description -n python-pycryptsetup -l pl.UTF-8
137 Wiązanie Pythona do biblioteki cryptsetup.
140 Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
141 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
143 Requires: udev-initrd >= 1:115
144 Provides: cryptsetup-luks-initrd = %{version}-%{release}
145 Obsoletes: cryptsetup-luks-initrd < 1.4.1-2
146 Conflicts: geninitrd < 10000.10
149 This package contains implementation of LUKS for dm-crypt implemented
150 in cryptsetup - statically linked for initrd.
152 %description initrd -l pl.UTF-8
153 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną w
154 cryptsetup - wersję statycznie zlinkowaną dla initrd.
158 %{?with_diet:%patch0 -p1}
176 CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
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 \
182 %if "%{?configure_cache}" == "1"
183 --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
186 --disable-silent-rules \
189 --enable-static-cryptsetup
194 # we have to do it by hand cause libtool "know better" and forces
195 # static libs from /usr/lib
197 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
198 -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
199 -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
202 mv src/cryptsetup cryptsetup-initrd
210 --disable-silent-rules \
212 %{?with_passwdqc:--enable-passwdqc=/etc/passwdqc.conf} \
213 %{?with_pwquality:--enable-pwquality} \
214 %{?with_python:--enable-python}
217 %{?with_tests:%{__make} check}
220 rm -rf $RPM_BUILD_ROOT
223 DESTDIR=$RPM_BUILD_ROOT
225 install -d $RPM_BUILD_ROOT/%{_lib}
226 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
227 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
228 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
231 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
232 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
235 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.la}
240 rm -rf $RPM_BUILD_ROOT
242 %post -p /sbin/ldconfig
243 %postun -p /sbin/ldconfig
245 %files -f %{name}.lang
246 %defattr(644,root,root,755)
247 %doc AUTHORS ChangeLog FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
248 %attr(755,root,root) %{_sbindir}/cryptsetup
249 %attr(755,root,root) %{_sbindir}/veritysetup
250 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
251 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
252 %{_mandir}/man8/cryptsetup.8*
253 %{_mandir}/man8/veritysetup.8*
256 %defattr(644,root,root,755)
257 %attr(755,root,root) %{_libdir}/libcryptsetup.so
258 %{_libdir}/libcryptsetup.la
259 %{_includedir}/libcryptsetup.h
260 %{_pkgconfigdir}/libcryptsetup.pc
263 %defattr(644,root,root,755)
264 %{_libdir}/libcryptsetup.a
267 %files -n python-pycryptsetup
268 %defattr(644,root,root,755)
269 %attr(755,root,root) %{py_sitedir}/pycryptsetup.so
274 %defattr(644,root,root,755)
275 %attr(755,root,root) %{_libdir}/initrd/cryptsetup