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