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