]> git.pld-linux.org Git - packages/cryptsetup.git/blob - cryptsetup.spec
- updated to 2.0.4
[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.4
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:  ed42b31f67d05b05e392d1943d467b8d
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.18.3
25 BuildRequires:  json-c-devel
26 BuildRequires:  libargon2-devel >= 20171227
27 BuildRequires:  libblkid-devel
28 BuildRequires:  libgcrypt-devel >= 1.6.1
29 BuildRequires:  libgpg-error-devel
30 %{?with_pwquality:BuildRequires:        libpwquality-devel >= 1.0.0}
31 BuildRequires:  libselinux-devel
32 BuildRequires:  libsepol-devel
33 BuildRequires:  libtool >= 2:2.0
34 BuildRequires:  libuuid-devel
35 %{?with_passwdqc:BuildRequires: passwdqc-devel}
36 BuildRequires:  pkgconfig
37 BuildRequires:  popt-devel >= 1.7
38 %if %{with python}
39 BuildRequires:  python-devel >= 1:2.6
40 BuildRequires:  rpm-pythonprov
41 %endif
42 BuildRequires:  tar >= 1:1.22
43 BuildRequires:  xz
44 %if %{with initrd}
45 BuildRequires:  libgpg-error-static
46         %if %{with dietlibc}
47 BuildRequires:  device-mapper-dietlibc >= 1.02.27
48 BuildRequires:  dietlibc-static
49 BuildRequires:  libgcrypt-dietlibc >= 1.6.1
50 BuildRequires:  libuuid-dietlibc
51 BuildRequires:  popt-dietlibc
52         %else
53 BuildRequires:  device-mapper-static >= 1.02.27
54 BuildRequires:  libgcrypt-static >= 1.6.1
55 BuildRequires:  libselinux-static
56 BuildRequires:  libsepol-static
57 BuildRequires:  libuuid-static
58 BuildRequires:  popt-static
59 BuildRequires:  udev-static
60         %endif
61 %endif
62 Requires:       libgcrypt >= 1.6.1
63 %{?with_pwquality:Requires:     libpwquality >= 1.0.0}
64 Requires:       popt >= 1.7
65 Provides:       cryptsetup-luks = %{version}-%{release}
66 Obsoletes:      cryptsetup-luks < 1.4.1-2
67 %{!?with_initrd:Obsoletes:      cryptsetup-initrd < %{version}-%{release}}
68 Conflicts:      udev < 1:118-1
69 Conflicts:      udev-core < 1:115
70 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71
72 %define         _sbindir        /sbin
73
74 %description
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.
81
82 This package contains implementation of LUKS for dm-crypt implemented
83 in cryptsetup.
84
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.
93
94 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
95 cryptsetup.
96
97 %package devel
98 Summary:        Header files for cryptsetup library
99 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki cryptsetup
100 Group:          Development/Libraries
101 Requires:       %{name} = %{version}-%{release}
102 Requires:       device-mapper-devel >= 1.02.27
103 Requires:       libargon2-devel >= 20171227
104 Requires:       libgcrypt-devel >= 1.6.1
105 Provides:       cryptsetup-luks-devel = %{version}-%{release}
106 Obsoletes:      cryptsetup-luks-devel < 1.4.1-2
107
108 %description devel
109 Header files for cryptsetup library.
110
111 %description devel -l pl.UTF-8
112 Pliki nagłówkowe biblioteki cryptsetup.
113
114 %package static
115 Summary:        Static cryptsetup library
116 Summary(pl.UTF-8):      Statyczna biblioteka cryptsetup
117 Group:          Development/Libraries
118 Requires:       %{name}-devel = %{version}-%{release}
119 Provides:       cryptsetup-luks-static = %{version}-%{release}
120 Obsoletes:      cryptsetup-luks-static < 1.4.1-2
121
122 %description static
123 Static version of cryptsetup library.
124
125 %description static -l pl.UTF-8
126 Statyczna wersja biblioteki cryptsetup.
127
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
132 Requires:       %{name} = %{version}-%{release}
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
141 %package initrd
142 Summary:        LUKS for dm-crypt implemented in cryptsetup - initrd version
143 Summary(pl.UTF-8):      LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
144 Group:          Base
145 Requires:       udev-initrd >= 1:115
146 Provides:       cryptsetup-luks-initrd = %{version}-%{release}
147 Obsoletes:      cryptsetup-luks-initrd < 1.4.1-2
148 Conflicts:      geninitrd < 10000.10
149
150 %description initrd
151 This package contains implementation of LUKS for dm-crypt implemented
152 in cryptsetup - statically linked for initrd.
153
154 %description initrd -l pl.UTF-8
155 Ten pakiet zawiera implementację LUKS dla dm-crypta zaimplementowaną w
156 cryptsetup - wersję statycznie zlinkowaną dla initrd.
157
158 %prep
159 %setup -q
160 %{?with_diet:%patch0 -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         --with-tmpfilesdir=%{systemdtmpfilesdir} \
191         --with-luks2-lock-path=/var/run/%{name}
192
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
198 CC="%{__cc}"
199 diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -static \
200         -o cryptsetup-initrd src/cryptsetup.c ./lib/.libs/libcryptsetup.a \
201         -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
202 %else
203 %{__make} -C src
204 mv src/cryptsetup cryptsetup-initrd
205 %endif
206
207 %{__make} clean
208 %endif
209
210 %configure \
211         --enable-libargon2 \
212         %{?with_passwdqc:--enable-passwdqc=/etc/passwdqc.conf} \
213         %{?with_pwquality:--enable-pwquality} \
214         %{?with_python:--enable-python} \
215         --disable-silent-rules \
216         --enable-static \
217         --enable-udev \
218         --with-tmpfilesdir=%{systemdtmpfilesdir} \
219         --with-luks2-lock-path=/var/run/%{name}
220 %{__make}
221
222 %{?with_tests:%{__make} check}
223
224 %install
225 rm -rf $RPM_BUILD_ROOT
226
227 install -d $RPM_BUILD_ROOT/var/run/cryptsetup
228
229 %{__make} install \
230         DESTDIR=$RPM_BUILD_ROOT
231
232 install -d $RPM_BUILD_ROOT/%{_lib}
233 mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
234 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
235         $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
236
237 %if %{with initrd}
238 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
239 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
240 %endif
241
242 %{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.la}
243
244 %find_lang %{name}
245
246 %clean
247 rm -rf $RPM_BUILD_ROOT
248
249 %post   -p /sbin/ldconfig
250 %postun -p /sbin/ldconfig
251
252 %files -f %{name}.lang
253 %defattr(644,root,root,755)
254 %doc AUTHORS FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
255 %attr(755,root,root) %{_sbindir}/cryptsetup
256 %attr(755,root,root) %{_sbindir}/cryptsetup-reencrypt
257 %attr(755,root,root) %{_sbindir}/integritysetup
258 %attr(755,root,root) %{_sbindir}/veritysetup
259 %attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
260 %attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.12
261 %{_mandir}/man8/cryptsetup.8*
262 %{_mandir}/man8/cryptsetup-reencrypt.8*
263 %{_mandir}/man8/integritysetup.8*
264 %{_mandir}/man8/veritysetup.8*
265 %{systemdtmpfilesdir}/cryptsetup.conf
266 %attr(700,root,root) %dir /var/run/cryptsetup
267
268 %files devel
269 %defattr(644,root,root,755)
270 %attr(755,root,root) %{_libdir}/libcryptsetup.so
271 %{_libdir}/libcryptsetup.la
272 %{_includedir}/libcryptsetup.h
273 %{_pkgconfigdir}/libcryptsetup.pc
274
275 %files static
276 %defattr(644,root,root,755)
277 %{_libdir}/libcryptsetup.a
278
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
285 %if %{with initrd}
286 %files initrd
287 %defattr(644,root,root,755)
288 %attr(755,root,root) %{_libdir}/initrd/cryptsetup
289 %endif
This page took 0.046031 seconds and 4 git commands to generate.