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