]> git.pld-linux.org Git - packages/cryptsetup.git/blob - cryptsetup.spec
- rel 3; adopt to kernel API changes; seems needed for all stable kernel lines (ie...
[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:        1.7.0
14 Release:        3
15 License:        GPL v2
16 Group:          Base
17 Source0:        https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/%{name}-%{version}.tar.xz
18 # Source0-md5:  56c385fe87fc2b6873df4b7f89202d0f
19 Patch0:         diet.patch
20 Patch1:         0001-Set-skcipher-key-before-accept-call-in-kernel-crypto.patch
21 Patch2:         0002-Fix-kernel-crypto-backend-to-set-key-before-accept-c.patch
22 URL:            https://gitlab.com/cryptsetup/cryptsetup
23 BuildRequires:  autoconf >= 2.67
24 BuildRequires:  automake >= 1:1.12
25 BuildRequires:  device-mapper-devel >= 1.02.27
26 BuildRequires:  gettext-tools >= 0.15
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 %patch1 -p1
160 %patch2 -p1
161
162 %{__rm} po/stamp-po
163
164 %build
165 %{__gettextize}
166 %{__libtoolize}
167 %{__aclocal} -I m4
168 %{__autoconf}
169 %{__autoheader}
170 %{__automake}
171
172 %if %{with initrd}
173 CC="%{__cc}"
174 %configure \
175 %if %{with dietlibc}
176         CC="diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os" \
177         LIBS="-lcompat" \
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 \
181 %endif
182 %if "%{?configure_cache}" == "1"
183         --cache-file=%{?configure_cache_file}%{!?configure_cache_file:configure}-initrd.cache \
184 %endif
185         --disable-nls \
186         --disable-silent-rules \
187         --disable-shared \
188         --enable-static \
189         --enable-static-cryptsetup
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         %{?with_passwdqc:--enable-passwdqc=/etc/passwdqc.conf} \
213         %{?with_pwquality:--enable-pwquality} \
214         %{?with_python:--enable-python}
215 %{__make}
216
217 %{?with_tests:%{__make} check}
218
219 %install
220 rm -rf $RPM_BUILD_ROOT
221
222 %{__make} install \
223         DESTDIR=$RPM_BUILD_ROOT
224
225 install -d $RPM_BUILD_ROOT/%{_lib}
226 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
227 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
228         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
229
230 %if %{with initrd}
231 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
232 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
233 %endif
234
235 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.la}
236
237 %find_lang %{name}
238
239 %clean
240 rm -rf $RPM_BUILD_ROOT
241
242 %post   -p /sbin/ldconfig
243 %postun -p /sbin/ldconfig
244
245 %files -f %{name}.lang
246 %defattr(644,root,root,755)
247 %doc AUTHORS ChangeLog FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
248 %attr(755,root,root) %{_sbindir}/cryptsetup
249 %attr(755,root,root) %{_sbindir}/veritysetup
250 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
251 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
252 %{_mandir}/man8/cryptsetup.8*
253 %{_mandir}/man8/veritysetup.8*
254
255 %files devel
256 %defattr(644,root,root,755)
257 %attr(755,root,root) %{_libdir}/libcryptsetup.so
258 %{_libdir}/libcryptsetup.la
259 %{_includedir}/libcryptsetup.h
260 %{_pkgconfigdir}/libcryptsetup.pc
261
262 %files static
263 %defattr(644,root,root,755)
264 %{_libdir}/libcryptsetup.a
265
266 %if %{with python}
267 %files -n python-pycryptsetup
268 %defattr(644,root,root,755)
269 %attr(755,root,root) %{py_sitedir}/pycryptsetup.so
270 %endif
271
272 %if %{with initrd}
273 %files initrd
274 %defattr(644,root,root,755)
275 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
276 %endif
This page took 0.071233 seconds and 3 git commands to generate.