]> git.pld-linux.org Git - packages/cryptsetup.git/blobdiff - cryptsetup.spec
extract library to subpackage
[packages/cryptsetup.git] / cryptsetup.spec
index 180dd03065bc6b6145a23e9209676f299bdfee24..b6d8a526f5b0a06c55cd7fe98f1c306ca00c2d31 100644 (file)
@@ -2,38 +2,44 @@
 # Conditonal build:
 %bcond_with    initrd          # don't build initrd version
 %bcond_with    dietlibc        # build initrd version with static glibc instead of dietlibc
-%bcond_with    pwquality       # password quality checking
-%bcond_without python          # Python binding
+%bcond_with    gcrypt          # use gcrypt for crypto (instead of openssl)
+%bcond_with    passwdqc        # password quality checking via libpasswdqc [conflicts with pwquality]
+%bcond_with    pwquality       # password quality checking via libpwquality [conflicts with passwdqc]
 %bcond_without tests           # "make check" run
 
 Summary:       LUKS for dm-crypt implemented in cryptsetup
 Summary(pl.UTF-8):     LUKS dla dm-crypta zaimplementowany w cryptsetup
 Name:          cryptsetup
-Version:       1.6.4
+Version:       2.6.1
 Release:       1
 License:       GPL v2
 Group:         Base
-Source0:       https://www.kernel.org/pub/linux/utils/cryptsetup/v1.6/%{name}-%{version}.tar.xz
-# Source0-md5: f68ce7b7f4be08449f3c8b114ed5accb
+Source0:       https://www.kernel.org/pub/linux/utils/cryptsetup/v2.6/%{name}-%{version}.tar.xz
+# Source0-md5: f9451ea928dc600eb34dd9f4d9ca34e5
 Patch0:                diet.patch
-URL:           http://code.google.com/p/cryptsetup/
+Patch1:                no_pty_tests.patch
+Patch2:                %{name}-sh.patch
+URL:           https://gitlab.com/cryptsetup/cryptsetup
 BuildRequires: autoconf >= 2.67
 BuildRequires: automake >= 1:1.12
 BuildRequires: device-mapper-devel >= 1.02.27
-BuildRequires: gettext-devel >= 0.15
-BuildRequires: libgcrypt-devel >= 1.6.1
+BuildRequires: gettext-tools >= 0.21
+BuildRequires: json-c-devel
+BuildRequires: libargon2-devel >= 20171227
+BuildRequires: libblkid-devel
+%{?with_gcrypt:BuildRequires:  libgcrypt-devel >= 1.6.1}
 BuildRequires: libgpg-error-devel
 %{?with_pwquality:BuildRequires:       libpwquality-devel >= 1.0.0}
 BuildRequires: libselinux-devel
 BuildRequires: libsepol-devel
+BuildRequires: libssh-devel
 BuildRequires: libtool >= 2:2.0
 BuildRequires: libuuid-devel
+%{!?with_gcrypt:BuildRequires: openssl-devel >= 0.9.8}
+%{?with_passwdqc:BuildRequires:        passwdqc-devel}
 BuildRequires: pkgconfig
 BuildRequires: popt-devel >= 1.7
-%if %{with python}
-BuildRequires: python-devel >= 1:2.4
-BuildRequires: rpm-pythonprov
-%endif
+BuildRequires: ruby-asciidoctor
 BuildRequires: tar >= 1:1.22
 BuildRequires: xz
 %if %{with initrd}
@@ -54,12 +60,15 @@ BuildRequires:      popt-static
 BuildRequires: udev-static
        %endif
 %endif
-Requires:      libgcrypt >= 1.6.1
+Requires:      %{name}-libs%{?_isa} = %{version}-%{release}
+Requires:      device-mapper >= 1.02.27
+%{?with_gcrypt:Requires:       libgcrypt >= 1.6.1}
 %{?with_pwquality:Requires:    libpwquality >= 1.0.0}
 Requires:      popt >= 1.7
 Provides:      cryptsetup-luks = %{version}-%{release}
 Obsoletes:     cryptsetup-luks < 1.4.1-2
 %{!?with_initrd:Obsoletes:     cryptsetup-initrd < %{version}-%{release}}
+Obsoletes:     python-pycryptsetup < 2.1.0
 Conflicts:     udev < 1:118-1
 Conflicts:     udev-core < 1:115
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -89,13 +98,29 @@ użytkownikowi przenosić lub migrować dane w sposób przezroczysty.
 Ten pakiet zawiera implementację LUKS dla dm-crytpa zaimplementowaną w
 cryptsetup.
 
+%package libs
+Summary:       cryptsetup shared library
+Summary(pl.UTF-8):     Biblioteka współdzielona cryptsetup
+Group:         Libraries
+
+%description libs
+cryptsetup shared library.
+
+%description libs -l pl.UTF-8
+Biblioteka współdzielona cryptsetup.
+
 %package devel
 Summary:       Header files for cryptsetup library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki cryptsetup
 Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name}-libs%{?_isa} = %{version}-%{release}
 Requires:      device-mapper-devel >= 1.02.27
-Requires:      libgcrypt-devel >= 1.6.1
+Requires:      json-c-devel
+Requires:      libargon2-devel >= 20171227
+Requires:      libblkid-devel
+%{?with_gcrypt:Requires:       libgcrypt-devel >= 1.6.1}
+Requires:      libuuid-devel
+%{!?with_gcrypt:Requires:      openssl-devel >= 0.9.8}
 Provides:      cryptsetup-luks-devel = %{version}-%{release}
 Obsoletes:     cryptsetup-luks-devel < 1.4.1-2
 
@@ -119,19 +144,6 @@ Static version of cryptsetup library.
 %description static -l pl.UTF-8
 Statyczna wersja biblioteki cryptsetup.
 
-%package -n python-pycryptsetup
-Summary:       Python binding for cryptsetup library
-Summary(pl.UTF-8):     Wiązanie Pythona do biblioteki cryptsetup
-Group:         Libraries/Python
-Requires:      %{name} = %{version}-%{release}
-%pyrequires_eq python-libs
-
-%description -n python-pycryptsetup
-Python binding for cryptsetup library.
-
-%description -n python-pycryptsetup -l pl.UTF-8
-Wiązanie Pythona do biblioteki cryptsetup.
-
 %package initrd
 Summary:       LUKS for dm-crypt implemented in cryptsetup - initrd version
 Summary(pl.UTF-8):     LUKS dla dm-crypta zaimplementowany w cryptsetup - wersja initrd
@@ -152,6 +164,8 @@ cryptsetup - wersję statycznie zlinkowaną dla initrd.
 %prep
 %setup -q
 %{?with_diet:%patch0 -p1}
+%patch1 -p1
+%patch2 -p1
 
 %{__rm} po/stamp-po
 
@@ -178,8 +192,12 @@ CC="%{__cc}"
 %endif
        --disable-nls \
        --disable-shared \
+       --disable-silent-rules \
        --enable-static \
-       --enable-static-cryptsetup
+       --enable-static-cryptsetup \
+       --with-crypto-backend=gcrypt \
+       --with-luks2-lock-path=/var/run/%{name} \
+       --with-tmpfilesdir=%{systemdtmpfilesdir}
 
 %{__make} -C lib
 
@@ -192,17 +210,22 @@ diet ${CC#ccache } %{rpmcppflags} %{rpmcflags} %{rpmldflags} -Os -I. -I./lib -st
        -lpopt -lgcrypt -lgpg-error -ldevmapper -luuid -lcompat
 %else
 %{__make} -C src
-mv src/cryptsetup cryptsetup-initrd
+%{__mv} src/cryptsetup cryptsetup-initrd
 %endif
 
 %{__make} clean
 %endif
 
 %configure \
-       --enable-udev \
+       --enable-libargon2 \
+       %{?with_passwdqc:--enable-passwdqc=/etc/passwdqc.conf} \
+       %{?with_pwquality:--enable-pwquality} \
+       --disable-silent-rules \
        --enable-static \
-       %{?with_python:--enable-python} \
-       %{?with_pwquality:--with-pwquality}
+       --enable-udev \
+       %{?with_gcrypt:--with-crypto-backend=gcrypt} \
+       --with-luks2-lock-path=/var/run/%{name} \
+       --with-tmpfilesdir=%{systemdtmpfilesdir}
 %{__make}
 
 %{?with_tests:%{__make} check}
@@ -210,38 +233,51 @@ mv src/cryptsetup cryptsetup-initrd
 %install
 rm -rf $RPM_BUILD_ROOT
 
+install -d $RPM_BUILD_ROOT/var/run/cryptsetup
+
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT/%{_lib}
-mv -f $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so.* $RPM_BUILD_ROOT/%{_lib}
 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so.*.*.*) \
        $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
 
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/cryptsetup/libcryptsetup-*.{la,a}
+
 %if %{with initrd}
 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
 install -p cryptsetup-initrd $RPM_BUILD_ROOT%{_libdir}/initrd/cryptsetup
 %endif
 
-%{?with_python:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pycryptsetup.la}
-
 %find_lang %{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post  -p /sbin/ldconfig
-%postun        -p /sbin/ldconfig
+%post  libs -p /sbin/ldconfig
+%postun        libs -p /sbin/ldconfig
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog FAQ README TODO docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
+%doc AUTHORS FAQ.md README.md docs/{ChangeLog.old,v*-ReleaseNotes,on-disk-format.pdf}
 %attr(755,root,root) %{_sbindir}/cryptsetup
+%attr(755,root,root) %{_sbindir}/cryptsetup-ssh
+%attr(755,root,root) %{_sbindir}/integritysetup
 %attr(755,root,root) %{_sbindir}/veritysetup
-%attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
-%attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.4
+%dir %{_libdir}/cryptsetup
+%attr(755,root,root) %{_libdir}/cryptsetup/libcryptsetup-token-ssh.so
 %{_mandir}/man8/cryptsetup.8*
+%{_mandir}/man8/cryptsetup-*.8*
+%{_mandir}/man8/integritysetup.8*
 %{_mandir}/man8/veritysetup.8*
+%{systemdtmpfilesdir}/cryptsetup.conf
+%attr(700,root,root) %dir /var/run/cryptsetup
+
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) /%{_lib}/libcryptsetup.so.*.*.*
+%attr(755,root,root) %ghost /%{_lib}/libcryptsetup.so.12
 
 %files devel
 %defattr(644,root,root,755)
@@ -254,12 +290,6 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_libdir}/libcryptsetup.a
 
-%if %{with python}
-%files -n python-pycryptsetup
-%defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/pycryptsetup.so
-%endif
-
 %if %{with initrd}
 %files initrd
 %defattr(644,root,root,755)
This page took 0.094745 seconds and 4 git commands to generate.