]>
Commit | Line | Data |
---|---|---|
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 |
196834e2 | 5 | %bcond_with pwquality # password quality checking |
882a770e | 6 | %bcond_without python # Python binding |
2b412273 | 7 | %bcond_without tests # "make check" run |
ef897fda | 8 | |
2488c838 | 9 | Summary: LUKS for dm-crypt implemented in cryptsetup |
29f5822a | 10 | Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup |
ef897fda | 11 | Name: cryptsetup |
c5a5ecb1 | 12 | Version: 1.6.5 |
15278b5b | 13 | Release: 1 |
d7593791 | 14 | License: GPL v2 |
6351d6a5 | 15 | Group: Base |
15278b5b | 16 | Source0: https://www.kernel.org/pub/linux/utils/cryptsetup/v1.6/%{name}-%{version}.tar.xz |
c5a5ecb1 | 17 | # Source0-md5: 128a5f63284ca3a26b4d4ffe821fa235 |
ef897fda | 18 | Patch0: diet.patch |
79b6c53c | 19 | URL: http://code.google.com/p/cryptsetup/ |
c905abc3 | 20 | BuildRequires: autoconf >= 2.67 |
d4db5a85 JB |
21 | BuildRequires: automake >= 1:1.12 |
22 | BuildRequires: device-mapper-devel >= 1.02.27 | |
79b6c53c | 23 | BuildRequires: gettext-devel >= 0.15 |
15278b5b | 24 | BuildRequires: libgcrypt-devel >= 1.6.1 |
d4db5a85 | 25 | BuildRequires: libgpg-error-devel |
196834e2 | 26 | %{?with_pwquality:BuildRequires: libpwquality-devel >= 1.0.0} |
0b90291e JB |
27 | BuildRequires: libselinux-devel |
28 | BuildRequires: libsepol-devel | |
c905abc3 | 29 | BuildRequires: libtool >= 2:2.0 |
0b90291e | 30 | BuildRequires: libuuid-devel |
d4db5a85 | 31 | BuildRequires: pkgconfig |
79b6c53c | 32 | BuildRequires: popt-devel >= 1.7 |
882a770e | 33 | %if %{with python} |
7dcaf052 | 34 | BuildRequires: python-devel >= 1:2.6 |
882a770e JB |
35 | BuildRequires: rpm-pythonprov |
36 | %endif | |
15278b5b JB |
37 | BuildRequires: tar >= 1:1.22 |
38 | BuildRequires: xz | |
d07d45f7 | 39 | %if %{with initrd} |
21d48aec JR |
40 | BuildRequires: libgpg-error-static |
41 | %if %{with dietlibc} | |
df4d3321 | 42 | BuildRequires: device-mapper-dietlibc >= 1.02.27 |
ef897fda | 43 | BuildRequires: dietlibc-static |
15278b5b | 44 | BuildRequires: libgcrypt-dietlibc >= 1.6.1 |
21d48aec JR |
45 | BuildRequires: libuuid-dietlibc |
46 | BuildRequires: popt-dietlibc | |
47 | %else | |
df4d3321 | 48 | BuildRequires: device-mapper-static >= 1.02.27 |
15278b5b | 49 | BuildRequires: libgcrypt-static >= 1.6.1 |
a6fd3218 | 50 | BuildRequires: libselinux-static |
8d9e50de | 51 | BuildRequires: libsepol-static |
a6fd3218 | 52 | BuildRequires: libuuid-static |
53 | BuildRequires: popt-static | |
c2608e02 | 54 | BuildRequires: udev-static |
21d48aec | 55 | %endif |
5eb10616 | 56 | %endif |
15278b5b | 57 | Requires: libgcrypt >= 1.6.1 |
196834e2 | 58 | %{?with_pwquality:Requires: libpwquality >= 1.0.0} |
79b6c53c | 59 | Requires: popt >= 1.7 |
f96aa109 JR |
60 | Provides: cryptsetup-luks = %{version}-%{release} |
61 | Obsoletes: cryptsetup-luks < 1.4.1-2 | |
3ee30d05 | 62 | %{!?with_initrd:Obsoletes: cryptsetup-initrd < %{version}-%{release}} |
751c89df ER |
63 | Conflicts: udev < 1:118-1 |
64 | Conflicts: udev-core < 1:115 | |
6351d6a5 | 65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
66 | ||
67 | %define _sbindir /sbin | |
68 | ||
69 | %description | |
6e98e6fb | 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. | |
6351d6a5 | 76 | |
6e98e6fb | 77 | This package contains implementation of LUKS for dm-crypt implemented |
78 | in cryptsetup. | |
6351d6a5 | 79 | |
77f30028 JR |
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. | |
12cca230 | 88 | |
77f30028 | 89 | Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w |
12cca230 JB |
90 | cryptsetup. |
91 | ||
6351d6a5 | 92 | %package devel |
93 | Summary: Header files for cryptsetup library | |
29f5822a | 94 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cryptsetup |
6351d6a5 | 95 | Group: Development/Libraries |
96 | Requires: %{name} = %{version}-%{release} | |
d4db5a85 | 97 | Requires: device-mapper-devel >= 1.02.27 |
15278b5b | 98 | Requires: libgcrypt-devel >= 1.6.1 |
ef897fda ER |
99 | Provides: cryptsetup-luks-devel = %{version}-%{release} |
100 | Obsoletes: cryptsetup-luks-devel < 1.4.1-2 | |
6351d6a5 | 101 | |
102 | %description devel | |
103 | Header files for cryptsetup library. | |
104 | ||
77f30028 JR |
105 | %description devel -l pl.UTF-8 |
106 | Pliki nagłówkowe biblioteki cryptsetup. | |
6351d6a5 | 107 | |
108 | %package static | |
109 | Summary: Static cryptsetup library | |
29f5822a | 110 | Summary(pl.UTF-8): Statyczna biblioteka cryptsetup |
6351d6a5 | 111 | Group: Development/Libraries |
112 | Requires: %{name}-devel = %{version}-%{release} | |
ef897fda ER |
113 | Provides: cryptsetup-luks-static = %{version}-%{release} |
114 | Obsoletes: cryptsetup-luks-static < 1.4.1-2 | |
6351d6a5 | 115 | |
116 | %description static | |
117 | Static version of cryptsetup library. | |
118 | ||
77f30028 | 119 | %description static -l pl.UTF-8 |
6351d6a5 | 120 | Statyczna wersja biblioteki cryptsetup. |
121 | ||
882a770e JB |
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 | |
28c8b65f | 126 | Requires: %{name} = %{version}-%{release} |
882a770e JB |
127 | %pyrequires_eq python-libs |
128 | ||
129 | %description -n python-pycryptsetup | |
130 | Python binding for cryptsetup library. | |
131 | ||
132 | %description -n python-pycryptsetup -l pl.UTF-8 | |
133 | Wiązanie Pythona do biblioteki cryptsetup. | |
134 | ||
d07d45f7 ER |
135 | %package initrd |
136 | Summary: LUKS for dm-crypt implemented in cryptsetup - initrd version | |
1c89131c | 137 | Summary(pl.UTF-8): LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd |
d07d45f7 | 138 | Group: Base |
311e3692 | 139 | Requires: udev-initrd >= 1:115 |
ef897fda ER |
140 | Provides: cryptsetup-luks-initrd = %{version}-%{release} |
141 | Obsoletes: cryptsetup-luks-initrd < 1.4.1-2 | |
2dd5e1c3 | 142 | Conflicts: geninitrd < 10000.10 |
d07d45f7 ER |
143 | |
144 | %description initrd | |
145 | This package contains implementation of LUKS for dm-crypt implemented | |
1c89131c JB |
146 | in cryptsetup - statically linked for initrd. |
147 | ||
148 | %description initrd -l pl.UTF-8 | |
ef897fda ER |
149 | Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną w |
150 | cryptsetup - wersję statycznie zlinkowaną dla initrd. | |
d07d45f7 | 151 | |
6351d6a5 | 152 | %prep |
ef897fda | 153 | %setup -q |
396f27d3 | 154 | %{?with_diet:%patch0 -p1} |
6351d6a5 | 155 | |
c627e74c JB |
156 | %{__rm} po/stamp-po |
157 | ||
6351d6a5 | 158 | %build |
8d9e50de | 159 | %{__gettextize} |
d7593791 | 160 | %{__libtoolize} |
8d9e50de | 161 | %{__aclocal} -I m4 |
162 | %{__autoconf} | |
d7593791 | 163 | %{__autoheader} |
8d9e50de | 164 | %{__automake} |
d07d45f7 ER |
165 | |
166 | %if %{with initrd} | |
802ed4ef | 167 | CC="%{__cc}" |
a6fd3218 | 168 | %configure \ |
21d48aec | 169 | %if %{with dietlibc} |
04af2f11 | 170 | CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \ |
8a7a87e4 | 171 | LIBS="-lcompat" \ |
21d48aec JR |
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 \ | |
802ed4ef ER |
175 | %endif |
176 | %if "%{?configure_cache}" == "1" | |
177 | --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \ | |
21d48aec | 178 | %endif |
196834e2 | 179 | --disable-nls \ |
8a7a87e4 | 180 | --disable-shared \ |
5eb10616 | 181 | --enable-static \ |
196834e2 | 182 | --enable-static-cryptsetup |
21d48aec | 183 | |
21d48aec JR |
184 | %{__make} -C lib |
185 | ||
186 | %if %{with dietlibc} | |
187 | # we have to do it by hand cause libtool "know better" and forces | |
188 | # static libs from /usr/lib | |
802ed4ef | 189 | CC="%{__cc}" |
04af2f11 | 190 | diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \ |
593621cb JR |
191 | -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \ |
192 | -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat | |
21d48aec JR |
193 | %else |
194 | %{__make} -C src | |
d07d45f7 | 195 | mv src/cryptsetup cryptsetup-initrd |
21d48aec | 196 | %endif |
23904b26 | 197 | |
d07d45f7 ER |
198 | %{__make} clean |
199 | %endif | |
200 | ||
201 | %configure \ | |
04af2f11 | 202 | --enable-udev \ |
882a770e | 203 | --enable-static \ |
196834e2 JB |
204 | %{?with_python:--enable-python} \ |
205 | %{?with_pwquality:--with-pwquality} | |
6351d6a5 | 206 | %{__make} |
207 | ||
b0d1eeaa AM |
208 | %{?with_tests:%{__make} check} |
209 | ||
6351d6a5 | 210 | %install |
211 | rm -rf $RPM_BUILD_ROOT | |
212 | ||
213 | %{__make} install \ | |
214 | DESTDIR=$RPM_BUILD_ROOT | |
215 | ||
216 | install -d $RPM_BUILD_ROOT/%{_lib} | |
d7593791 JB |
217 | mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib} |
218 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \ | |
6351d6a5 | 219 | $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so |
220 | ||
d07d45f7 | 221 | %if %{with initrd} |
927d0cdf | 222 | install -d $RPM_BUILD_ROOT%{_libdir}/initrd |
802ed4ef | 223 | install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup |
d07d45f7 ER |
224 | %endif |
225 | ||
5da1c8e9 | 226 | %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.la} |
882a770e | 227 | |
ef897fda | 228 | %find_lang %{name} |
6351d6a5 | 229 | |
230 | %clean | |
231 | rm -rf $RPM_BUILD_ROOT | |
232 | ||
233 | %post -p /sbin/ldconfig | |
234 | %postun -p /sbin/ldconfig | |
235 | ||
ef897fda | 236 | %files -f %{name}.lang |
6351d6a5 | 237 | %defattr(644,root,root,755) |
d4db5a85 | 238 | %doc AUTHORS ChangeLog FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf} |
6351d6a5 | 239 | %attr(755,root,root) %{_sbindir}/cryptsetup |
56c60c79 | 240 | %attr(755,root,root) %{_sbindir}/veritysetup |
6351d6a5 | 241 | %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.* |
c6c27d69 | 242 | %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4 |
d7593791 | 243 | %{_mandir}/man8/cryptsetup.8* |
56c60c79 | 244 | %{_mandir}/man8/veritysetup.8* |
6351d6a5 | 245 | |
246 | %files devel | |
247 | %defattr(644,root,root,755) | |
248 | %attr(755,root,root) %{_libdir}/libcryptsetup.so | |
249 | %{_libdir}/libcryptsetup.la | |
d7593791 | 250 | %{_includedir}/libcryptsetup.h |
79b6c53c | 251 | %{_pkgconfigdir}/libcryptsetup.pc |
6351d6a5 | 252 | |
a6fd3218 | 253 | %files static |
254 | %defattr(644,root,root,755) | |
255 | %{_libdir}/libcryptsetup.a | |
d07d45f7 | 256 | |
882a770e JB |
257 | %if %{with python} |
258 | %files -n python-pycryptsetup | |
259 | %defattr(644,root,root,755) | |
260 | %attr(755,root,root) %{py_sitedir}/pycryptsetup.so | |
261 | %endif | |
262 | ||
d07d45f7 ER |
263 | %if %{with initrd} |
264 | %files initrd | |
265 | %defattr(644,root,root,755) | |
927d0cdf | 266 | %attr(755,root,root) %{_libdir}/initrd/cryptsetup |
d07d45f7 | 267 | %endif |