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 pwquality # password quality checking
6 %bcond_without python # Python binding
7 %bcond_without tests # "make check" run
9 Summary: LUKS for dm-crypt implemented in cryptsetup
10 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup
16 Source0: https://www.kernel.org/pub/linux/utils/cryptsetup/v1.6/%{name}-%{version}.tar.xz
17 # Source0-md5: 179c0781de59838a4e39f61b2df5ea48
19 URL: http://code.google.com/p/cryptsetup/
20 BuildRequires: autoconf >= 2.67
21 BuildRequires: automake >= 1:1.12
22 BuildRequires: device-mapper-devel >= 1.02.27
23 BuildRequires: gettext-tools >= 0.15
24 BuildRequires: libgcrypt-devel >= 1.6.1
25 BuildRequires: libgpg-error-devel
26 %{?with_pwquality:BuildRequires: libpwquality-devel >= 1.0.0}
27 BuildRequires: libselinux-devel
28 BuildRequires: libsepol-devel
29 BuildRequires: libtool >= 2:2.0
30 BuildRequires: libuuid-devel
31 BuildRequires: pkgconfig
32 BuildRequires: popt-devel >= 1.7
34 BuildRequires: python-devel >= 1:2.6
35 BuildRequires: rpm-pythonprov
37 BuildRequires: tar >= 1:1.22
40 BuildRequires: libgpg-error-static
42 BuildRequires: device-mapper-dietlibc >= 1.02.27
43 BuildRequires: dietlibc-static
44 BuildRequires: libgcrypt-dietlibc >= 1.6.1
45 BuildRequires: libuuid-dietlibc
46 BuildRequires: popt-dietlibc
48 BuildRequires: device-mapper-static >= 1.02.27
49 BuildRequires: libgcrypt-static >= 1.6.1
50 BuildRequires: libselinux-static
51 BuildRequires: libsepol-static
52 BuildRequires: libuuid-static
53 BuildRequires: popt-static
54 BuildRequires: udev-static
57 Requires: libgcrypt >= 1.6.1
58 %{?with_pwquality:Requires: libpwquality >= 1.0.0}
60 Provides: cryptsetup-luks = %{version}-%{release}
61 Obsoletes: cryptsetup-luks < 1.4.1-2
62 %{!?with_initrd:Obsoletes: cryptsetup-initrd < %{version}-%{release}}
63 Conflicts: udev < 1:118-1
64 Conflicts: udev-core < 1:115
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 %define _sbindir /sbin
70 LUKS is the upcoming standard for Linux hard disk encryption. By
71 providing a standard on-disk-format, it does not only facilitate
72 compatibility among distributions, but also provide secure management
73 of multiple user passwords. In contrast to existing solution, LUKS
74 stores all setup necessary setup information in the partition header,
75 enabling the user to transport or migrate his data seamlessly.
77 This package contains implementation of LUKS for dm-crypt implemented
80 %description -l pl.UTF-8
81 LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku.
82 Dostarczając standardowy format danych na dysku nie tylko ułatwia
83 utrzymanie kompatybilności między dystrybucjami, ale także dostarcza
84 bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie
85 do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne
86 informacje o konfiguracji w nagłówku partycji, pozwalając
87 użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
89 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
93 Summary: Header files for cryptsetup library
94 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup
95 Group: Development/Libraries
96 Requires: %{name} = %{version}-%{release}
97 Requires: device-mapper-devel >= 1.02.27
98 Requires: libgcrypt-devel >= 1.6.1
99 Provides: cryptsetup-luks-devel = %{version}-%{release}
100 Obsoletes: cryptsetup-luks-devel < 1.4.1-2
103 Header files for cryptsetup library.
105 %description devel -l pl.UTF-8
106 Pliki nagłówkowe biblioteki cryptsetup.
109 Summary: Static cryptsetup library
110 Summary(pl.UTF-8): Statyczna biblioteka cryptsetup
111 Group: Development/Libraries
112 Requires: %{name}-devel = %{version}-%{release}
113 Provides: cryptsetup-luks-static = %{version}-%{release}
114 Obsoletes: cryptsetup-luks-static < 1.4.1-2
117 Static version of cryptsetup library.
119 %description static -l pl.UTF-8
120 Statyczna wersja biblioteki cryptsetup.
122 %package -n python-pycryptsetup
123 Summary: Python binding for cryptsetup library
124 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki cryptsetup
125 Group: Libraries/Python
126 Requires: %{name} = %{version}-%{release}
127 %pyrequires_eq python-libs
129 %description -n python-pycryptsetup
130 Python binding for cryptsetup library.
132 %description -n python-pycryptsetup -l pl.UTF-8
133 Wiązanie Pythona do biblioteki cryptsetup.
136 Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version
137 Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
139 Requires: udev-initrd >= 1:115
140 Provides: cryptsetup-luks-initrd = %{version}-%{release}
141 Obsoletes: cryptsetup-luks-initrd < 1.4.1-2
142 Conflicts: geninitrd < 10000.10
145 This package contains implementation of LUKS for dm-crypt implemented
146 in cryptsetup - statically linked for initrd.
148 %description initrd -l pl.UTF-8
149 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną w
150 cryptsetup - wersję statycznie zlinkowaną dla initrd.
154 %{?with_diet:%patch0 -p1}
170 CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
172 ac_cv_lib_popt_poptConfigFileToString=yes \
173 ac_cv_lib_sepol_sepol_bool_set=no \
174 ac_cv_lib_selinux_is_selinux_enabled=no \
176 %if "%{?configure_cache}" == "1"
177 --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
182 --enable-static-cryptsetup
187 # we have to do it by hand cause libtool "know better" and forces
188 # static libs from /usr/lib
190 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
191 -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
192 -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
195 mv src/cryptsetup cryptsetup-initrd
204 %{?with_python:--enable-python} \
205 %{?with_pwquality:--with-pwquality}
208 %{?with_tests:%{__make} check}
211 rm -rf $RPM_BUILD_ROOT
214 DESTDIR=$RPM_BUILD_ROOT
216 install -d $RPM_BUILD_ROOT/%{_lib}
217 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
218 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
219 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
222 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
223 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
226 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.la}
231 rm -rf $RPM_BUILD_ROOT
233 %post -p /sbin/ldconfig
234 %postun -p /sbin/ldconfig
236 %files -f %{name}.lang
237 %defattr(644,root,root,755)
238 %doc AUTHORS ChangeLog FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
239 %attr(755,root,root) %{_sbindir}/cryptsetup
240 %attr(755,root,root) %{_sbindir}/veritysetup
241 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
242 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
243 %{_mandir}/man8/cryptsetup.8*
244 %{_mandir}/man8/veritysetup.8*
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_libdir}/libcryptsetup.so
249 %{_libdir}/libcryptsetup.la
250 %{_includedir}/libcryptsetup.h
251 %{_pkgconfigdir}/libcryptsetup.pc
254 %defattr(644,root,root,755)
255 %{_libdir}/libcryptsetup.a
258 %files -n python-pycryptsetup
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{py_sitedir}/pycryptsetup.so
265 %defattr(644,root,root,755)
266 %attr(755,root,root) %{_libdir}/initrd/cryptsetup