]>
Commit | Line | Data |
---|---|---|
196834e2 | 1 | # TODO: BR libgcrypt >= 1.6.0 when released (to use gcrypt PBKDF2) |
5eb10616 JB |
2 | # |
3 | # Conditonal build: | |
3ee30d05 | 4 | %bcond_with initrd # don't build initrd version |
c2608e02 | 5 | %bcond_with dietlibc # build initrd version with static glibc instead of dietlibc |
196834e2 | 6 | %bcond_with pwquality # password quality checking |
882a770e | 7 | %bcond_without python # Python binding |
2b412273 | 8 | %bcond_without tests # "make check" run |
ef897fda | 9 | |
2488c838 | 10 | Summary: LUKS for dm-crypt implemented in cryptsetup |
29f5822a | 11 | Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup |
ef897fda | 12 | Name: cryptsetup |
b0d1eeaa | 13 | Version: 1.6.1 |
df4d3321 | 14 | Release: 1 |
d7593791 | 15 | License: GPL v2 |
6351d6a5 | 16 | Group: Base |
28c8b65f | 17 | # Source0Download: http://code.google.com/p/cryptsetup/downloads/list |
ef897fda | 18 | Source0: http://cryptsetup.googlecode.com/files/%{name}-%{version}.tar.bz2 |
b0d1eeaa | 19 | # Source0-md5: f374d11e3b0e7ca0f805756fd02e34ff |
ef897fda | 20 | Patch0: diet.patch |
79b6c53c | 21 | URL: http://code.google.com/p/cryptsetup/ |
c905abc3 | 22 | BuildRequires: autoconf >= 2.67 |
5fe93676 | 23 | BuildRequires: automake |
79b6c53c JB |
24 | BuildRequires: device-mapper-devel >= 1.02.03 |
25 | BuildRequires: gettext-devel >= 0.15 | |
0b90291e | 26 | BuildRequires: libgcrypt-devel >= 1.1.42 |
196834e2 | 27 | %{?with_pwquality:BuildRequires: libpwquality-devel >= 1.0.0} |
0b90291e JB |
28 | BuildRequires: libselinux-devel |
29 | BuildRequires: libsepol-devel | |
c905abc3 | 30 | BuildRequires: libtool >= 2:2.0 |
0b90291e | 31 | BuildRequires: libuuid-devel |
79b6c53c | 32 | BuildRequires: popt-devel >= 1.7 |
882a770e JB |
33 | %if %{with python} |
34 | BuildRequires: python-devel >= 1:2.4 | |
35 | BuildRequires: rpm-pythonprov | |
36 | %endif | |
d07d45f7 | 37 | %if %{with initrd} |
21d48aec JR |
38 | BuildRequires: libgpg-error-static |
39 | %if %{with dietlibc} | |
df4d3321 | 40 | BuildRequires: device-mapper-dietlibc >= 1.02.27 |
ef897fda | 41 | BuildRequires: dietlibc-static |
196834e2 | 42 | BuildRequires: libgcrypt-dietlibc >= 1.1.42 |
21d48aec JR |
43 | BuildRequires: libuuid-dietlibc |
44 | BuildRequires: popt-dietlibc | |
45 | %else | |
df4d3321 | 46 | BuildRequires: device-mapper-static >= 1.02.27 |
a6fd3218 | 47 | BuildRequires: libgcrypt-static >= 1.1.42 |
a6fd3218 | 48 | BuildRequires: libselinux-static |
8d9e50de | 49 | BuildRequires: libsepol-static |
a6fd3218 | 50 | BuildRequires: libuuid-static |
51 | BuildRequires: popt-static | |
c2608e02 | 52 | BuildRequires: udev-static |
21d48aec | 53 | %endif |
5eb10616 | 54 | %endif |
196834e2 JB |
55 | Requires: libgcrypt >= 1.1.42 |
56 | %{?with_pwquality:Requires: libpwquality >= 1.0.0} | |
79b6c53c | 57 | Requires: popt >= 1.7 |
f96aa109 JR |
58 | Provides: cryptsetup-luks = %{version}-%{release} |
59 | Obsoletes: cryptsetup-luks < 1.4.1-2 | |
3ee30d05 | 60 | %{!?with_initrd:Obsoletes: cryptsetup-initrd < %{version}-%{release}} |
751c89df ER |
61 | Conflicts: udev < 1:118-1 |
62 | Conflicts: udev-core < 1:115 | |
6351d6a5 | 63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
64 | ||
65 | %define _sbindir /sbin | |
66 | ||
67 | %description | |
6e98e6fb | 68 | LUKS is the upcoming standard for Linux hard disk encryption. By |
69 | providing a standard on-disk-format, it does not only facilitate | |
70 | compatibility among distributions, but also provide secure management | |
71 | of multiple user passwords. In contrast to existing solution, LUKS | |
72 | stores all setup necessary setup information in the partition header, | |
73 | enabling the user to transport or migrate his data seamlessly. | |
6351d6a5 | 74 | |
6e98e6fb | 75 | This package contains implementation of LUKS for dm-crypt implemented |
76 | in cryptsetup. | |
6351d6a5 | 77 | |
77f30028 JR |
78 | %description -l pl.UTF-8 |
79 | LUKS to nadchodzący standard linuksowego szyfrowania twardego dysku. | |
80 | Dostarczając standardowy format danych na dysku nie tylko ułatwia | |
81 | utrzymanie kompatybilności między dystrybucjami, ale także dostarcza | |
82 | bezpieczne zarządzanie wieloma hasłami użytkowników. W przeciwieństwie | |
83 | do istniejącego rozwiązania LUKS przechowuje wszystkie potrzebne | |
84 | informacje o konfiguracji w nagłówku partycji, pozwalając | |
85 | użytkownikowi przenosić lub migrować dane w sposób przezroczysty. | |
12cca230 | 86 | |
77f30028 | 87 | Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w |
12cca230 JB |
88 | cryptsetup. |
89 | ||
6351d6a5 | 90 | %package devel |
91 | Summary: Header files for cryptsetup library | |
29f5822a | 92 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup |
6351d6a5 | 93 | Group: Development/Libraries |
94 | Requires: %{name} = %{version}-%{release} | |
df4d3321 | 95 | Requires: device-mapper-devel >= 1.02.03 |
6351d6a5 | 96 | Requires: libgcrypt-devel >= 1.1.42 |
ef897fda ER |
97 | Provides: cryptsetup-luks-devel = %{version}-%{release} |
98 | Obsoletes: cryptsetup-luks-devel < 1.4.1-2 | |
6351d6a5 | 99 | |
100 | %description devel | |
101 | Header files for cryptsetup library. | |
102 | ||
77f30028 JR |
103 | %description devel -l pl.UTF-8 |
104 | Pliki nagłówkowe biblioteki cryptsetup. | |
6351d6a5 | 105 | |
106 | %package static | |
107 | Summary: Static cryptsetup library | |
29f5822a | 108 | Summary(pl.UTF-8): Statyczna biblioteka cryptsetup |
6351d6a5 | 109 | Group: Development/Libraries |
110 | Requires: %{name}-devel = %{version}-%{release} | |
ef897fda ER |
111 | Provides: cryptsetup-luks-static = %{version}-%{release} |
112 | Obsoletes: cryptsetup-luks-static < 1.4.1-2 | |
6351d6a5 | 113 | |
114 | %description static | |
115 | Static version of cryptsetup library. | |
116 | ||
77f30028 | 117 | %description static -l pl.UTF-8 |
6351d6a5 | 118 | Statyczna wersja biblioteki cryptsetup. |
119 | ||
882a770e JB |
120 | %package -n python-pycryptsetup |
121 | Summary: Python binding for cryptsetup library | |
122 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki cryptsetup | |
123 | Group: Libraries/Python | |
28c8b65f | 124 | Requires: %{name} = %{version}-%{release} |
882a770e JB |
125 | %pyrequires_eq python-libs |
126 | ||
127 | %description -n python-pycryptsetup | |
128 | Python binding for cryptsetup library. | |
129 | ||
130 | %description -n python-pycryptsetup -l pl.UTF-8 | |
131 | Wiązanie Pythona do biblioteki cryptsetup. | |
132 | ||
d07d45f7 ER |
133 | %package initrd |
134 | Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version | |
1c89131c | 135 | Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd |
d07d45f7 | 136 | Group: Base |
311e3692 | 137 | Requires: udev-initrd >= 1:115 |
ef897fda ER |
138 | Provides: cryptsetup-luks-initrd = %{version}-%{release} |
139 | Obsoletes: cryptsetup-luks-initrd < 1.4.1-2 | |
2dd5e1c3 | 140 | Conflicts: geninitrd < 10000.10 |
d07d45f7 ER |
141 | |
142 | %description initrd | |
143 | This package contains implementation of LUKS for dm-crypt implemented | |
1c89131c JB |
144 | in cryptsetup - statically linked for initrd. |
145 | ||
146 | %description initrd -l pl.UTF-8 | |
ef897fda ER |
147 | Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną w |
148 | cryptsetup - wersję statycznie zlinkowaną dla initrd. | |
d07d45f7 | 149 | |
6351d6a5 | 150 | %prep |
ef897fda | 151 | %setup -q |
396f27d3 | 152 | %{?with_diet:%patch0 -p1} |
6351d6a5 | 153 | |
c627e74c JB |
154 | %{__rm} po/stamp-po |
155 | ||
6351d6a5 | 156 | %build |
8d9e50de | 157 | %{__gettextize} |
d7593791 | 158 | %{__libtoolize} |
8d9e50de | 159 | %{__aclocal} -I m4 |
160 | %{__autoconf} | |
d7593791 | 161 | %{__autoheader} |
8d9e50de | 162 | %{__automake} |
d07d45f7 ER |
163 | |
164 | %if %{with initrd} | |
802ed4ef | 165 | CC="%{__cc}" |
a6fd3218 | 166 | %configure \ |
21d48aec | 167 | %if %{with dietlibc} |
04af2f11 | 168 | CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \ |
8a7a87e4 | 169 | LIBS="-lcompat" \ |
21d48aec JR |
170 | ac_cv_lib_popt_poptConfigFileToString=yes \ |
171 | ac_cv_lib_sepol_sepol_bool_set=no \ | |
172 | ac_cv_lib_selinux_is_selinux_enabled=no \ | |
802ed4ef ER |
173 | %endif |
174 | %if "%{?configure_cache}" == "1" | |
175 | --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \ | |
21d48aec | 176 | %endif |
196834e2 | 177 | --disable-nls \ |
8a7a87e4 | 178 | --disable-shared \ |
5eb10616 | 179 | --enable-static \ |
196834e2 | 180 | --enable-static-cryptsetup |
21d48aec | 181 | |
21d48aec JR |
182 | %{__make} -C lib |
183 | ||
184 | %if %{with dietlibc} | |
185 | # we have to do it by hand cause libtool "know better" and forces | |
186 | # static libs from /usr/lib | |
802ed4ef | 187 | CC="%{__cc}" |
04af2f11 | 188 | diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \ |
593621cb JR |
189 | -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \ |
190 | -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat | |
21d48aec JR |
191 | %else |
192 | %{__make} -C src | |
d07d45f7 | 193 | mv src/cryptsetup cryptsetup-initrd |
21d48aec | 194 | %endif |
23904b26 | 195 | |
d07d45f7 ER |
196 | %{__make} clean |
197 | %endif | |
198 | ||
199 | %configure \ | |
04af2f11 | 200 | --enable-udev \ |
882a770e | 201 | --enable-static \ |
196834e2 JB |
202 | %{?with_python:--enable-python} \ |
203 | %{?with_pwquality:--with-pwquality} | |
6351d6a5 | 204 | %{__make} |
205 | ||
b0d1eeaa AM |
206 | %{?with_tests:%{__make} check} |
207 | ||
6351d6a5 | 208 | %install |
209 | rm -rf $RPM_BUILD_ROOT | |
210 | ||
211 | %{__make} install \ | |
212 | DESTDIR=$RPM_BUILD_ROOT | |
213 | ||
214 | install -d $RPM_BUILD_ROOT/%{_lib} | |
d7593791 JB |
215 | mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib} |
216 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \ | |
6351d6a5 | 217 | $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so |
218 | ||
d07d45f7 | 219 | %if %{with initrd} |
927d0cdf | 220 | install -d $RPM_BUILD_ROOT%{_libdir}/initrd |
802ed4ef | 221 | install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup |
d07d45f7 ER |
222 | %endif |
223 | ||
882a770e JB |
224 | %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.{la,a}} |
225 | ||
ef897fda | 226 | %find_lang %{name} |
6351d6a5 | 227 | |
228 | %clean | |
229 | rm -rf $RPM_BUILD_ROOT | |
230 | ||
231 | %post -p /sbin/ldconfig | |
232 | %postun -p /sbin/ldconfig | |
233 | ||
ef897fda | 234 | %files -f %{name}.lang |
6351d6a5 | 235 | %defattr(644,root,root,755) |
d7593791 | 236 | %doc AUTHORS ChangeLog TODO |
6351d6a5 | 237 | %attr(755,root,root) %{_sbindir}/cryptsetup |
56c60c79 | 238 | %attr(755,root,root) %{_sbindir}/veritysetup |
6351d6a5 | 239 | %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.* |
c6c27d69 | 240 | %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4 |
d7593791 | 241 | %{_mandir}/man8/cryptsetup.8* |
56c60c79 | 242 | %{_mandir}/man8/veritysetup.8* |
6351d6a5 | 243 | |
244 | %files devel | |
245 | %defattr(644,root,root,755) | |
246 | %attr(755,root,root) %{_libdir}/libcryptsetup.so | |
247 | %{_libdir}/libcryptsetup.la | |
d7593791 | 248 | %{_includedir}/libcryptsetup.h |
79b6c53c | 249 | %{_pkgconfigdir}/libcryptsetup.pc |
6351d6a5 | 250 | |
a6fd3218 | 251 | %files static |
252 | %defattr(644,root,root,755) | |
253 | %{_libdir}/libcryptsetup.a | |
d07d45f7 | 254 | |
882a770e JB |
255 | %if %{with python} |
256 | %files -n python-pycryptsetup | |
257 | %defattr(644,root,root,755) | |
258 | %attr(755,root,root) %{py_sitedir}/pycryptsetup.so | |
259 | %endif | |
260 | ||
d07d45f7 ER |
261 | %if %{with initrd} |
262 | %files initrd | |
263 | %defattr(644,root,root,755) | |
927d0cdf | 264 | %attr(755,root,root) %{_libdir}/initrd/cryptsetup |
d07d45f7 | 265 | %endif |