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 URL: https://gitlab.com/cryptsetup/cryptsetup
21 BuildRequires: autoconf >= 2.67
22 BuildRequires: automake >= 1:1.12
23 BuildRequires: device-mapper-devel >= 1.02.27
24 BuildRequires: gettext-tools >= 0.15
25 BuildRequires: libgcrypt-devel >= 1.6.1
26 BuildRequires: libgpg-error-devel
27 %{?with_pwquality:BuildRequires: libpwquality-devel >= 1.0.0}
28 BuildRequires: libselinux-devel
29 BuildRequires: libsepol-devel
30 BuildRequires: libtool >= 2:2.0
31 BuildRequires: libuuid-devel
32 %{?with_passwdqc:BuildRequires: passwdqc-devel}
33 BuildRequires: pkgconfig
34 BuildRequires: popt-devel >= 1.7
36 BuildRequires: python-devel >= 1:2.6
37 BuildRequires: rpm-pythonprov
39 BuildRequires: tar >= 1:1.22
42 BuildRequires: libgpg-error-static
44 BuildRequires: device-mapper-dietlibc >= 1.02.27
45 BuildRequires: dietlibc-static
46 BuildRequires: libgcrypt-dietlibc >= 1.6.1
47 BuildRequires: libuuid-dietlibc
48 BuildRequires: popt-dietlibc
50 BuildRequires: device-mapper-static >= 1.02.27
51 BuildRequires: libgcrypt-static >= 1.6.1
52 BuildRequires: libselinux-static
53 BuildRequires: libsepol-static
54 BuildRequires: libuuid-static
55 BuildRequires: popt-static
56 BuildRequires: udev-static
59 Requires: libgcrypt >= 1.6.1
60 %{?with_pwquality:Requires: libpwquality >= 1.0.0}
62 Provides: cryptsetup-luks = %{version}-%{release}
63 Obsoletes: cryptsetup-luks < 1.4.1-2
64 %{!?with_initrd:Obsoletes: cryptsetup-initrd < %{version}-%{release}}
65 Conflicts: udev < 1:118-1
66 Conflicts: udev-core < 1:115
67 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 %define _sbindir /sbin
72 LUKS is the upcoming standard for Linux hard disk encryption. By
73 providing a standard on-disk-format, it does not only facilitate
74 compatibility among distributions, but also provide secure management
75 of multiple user passwords. In contrast to existing solution, LUKS
76 stores all setup necessary setup information in the partition header,
77 enabling the user to transport or migrate his data seamlessly.
79 This package contains implementation of LUKS for dm-crypt implemented
82 %description -l pl.UTF-8
83 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
84 Dostarczając standardowy format danych na dysku nie tylko ułatwia
85 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
86 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
87 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
88 informacje o konfiguracji w nagłówku partycji, pozwalając
89 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
91 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
95 Summary: Header files for cryptsetup library
96 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup
97 Group: Development/Libraries
98 Requires: %{name} = %{version}-%{release}
99 Requires: device-mapper-devel >= 1.02.27
100 Requires: libgcrypt-devel >= 1.6.1
101 Provides: cryptsetup-luks-devel = %{version}-%{release}
102 Obsoletes: cryptsetup-luks-devel < 1.4.1-2
105 Header files for cryptsetup library.
107 %description devel -l pl.UTF-8
108 Pliki nagłówkowe biblioteki cryptsetup.
111 Summary: Static cryptsetup library
112 Summary(pl.UTF-8): Statyczna biblioteka cryptsetup
113 Group: Development/Libraries
114 Requires: %{name}-devel = %{version}-%{release}
115 Provides: cryptsetup-luks-static = %{version}-%{release}
116 Obsoletes: cryptsetup-luks-static < 1.4.1-2
119 Static version of cryptsetup library.
121 %description static -l pl.UTF-8
122 Statyczna wersja biblioteki cryptsetup.
124 %package -n python-pycryptsetup
125 Summary: Python binding for cryptsetup library
126 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki cryptsetup
127 Group: Libraries/Python
128 Requires: %{name} = %{version}-%{release}
129 %pyrequires_eq python-libs
131 %description -n python-pycryptsetup
132 Python binding for cryptsetup library.
134 %description -n python-pycryptsetup -l pl.UTF-8
135 Wiązanie Pythona do biblioteki cryptsetup.
138 Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
139 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
141 Requires: udev-initrd >= 1:115
142 Provides: cryptsetup-luks-initrd = %{version}-%{release}
143 Obsoletes: cryptsetup-luks-initrd < 1.4.1-2
144 Conflicts: geninitrd < 10000.10
147 This package contains implementation of LUKS for dm-crypt implemented
148 in cryptsetup - statically linked for initrd.
150 %description initrd -l pl.UTF-8
151 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną w
152 cryptsetup - wersję statycznie zlinkowaną dla initrd.
156 %{?with_diet:%patch0 -p1}
172 CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
174 ac_cv_lib_popt_poptConfigFileToString=yes \
175 ac_cv_lib_sepol_sepol_bool_set=no \
176 ac_cv_lib_selinux_is_selinux_enabled=no \
178 %if "%{?configure_cache}" == "1"
179 --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
182 --disable-silent-rules \
185 --enable-static-cryptsetup
190 # we have to do it by hand cause libtool "know better" and forces
191 # static libs from /usr/lib
193 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
194 -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
195 -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
198 mv src/cryptsetup cryptsetup-initrd
206 --disable-silent-rules \
208 %{?with_passwdqc:--enable-passwdqc=/etc/passwdqc.conf} \
209 %{?with_pwquality:--enable-pwquality} \
210 %{?with_python:--enable-python}
213 %{?with_tests:%{__make} check}
216 rm -rf $RPM_BUILD_ROOT
219 DESTDIR=$RPM_BUILD_ROOT
221 install -d $RPM_BUILD_ROOT/%{_lib}
222 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
223 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
224 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
227 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
228 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
231 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.la}
236 rm -rf $RPM_BUILD_ROOT
238 %post -p /sbin/ldconfig
239 %postun -p /sbin/ldconfig
241 %files -f %{name}.lang
242 %defattr(644,root,root,755)
243 %doc AUTHORS ChangeLog FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
244 %attr(755,root,root) %{_sbindir}/cryptsetup
245 %attr(755,root,root) %{_sbindir}/veritysetup
246 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
247 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
248 %{_mandir}/man8/cryptsetup.8*
249 %{_mandir}/man8/veritysetup.8*
252 %defattr(644,root,root,755)
253 %attr(755,root,root) %{_libdir}/libcryptsetup.so
254 %{_libdir}/libcryptsetup.la
255 %{_includedir}/libcryptsetup.h
256 %{_pkgconfigdir}/libcryptsetup.pc
259 %defattr(644,root,root,755)
260 %{_libdir}/libcryptsetup.a
263 %files -n python-pycryptsetup
264 %defattr(644,root,root,755)
265 %attr(755,root,root) %{py_sitedir}/pycryptsetup.so
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{_libdir}/initrd/cryptsetup