2007-06-05 04:29:16 +02:00
|
|
|
#
|
2011-02-02 01:35:12 +01:00
|
|
|
# spec file for package cryptsetup
|
2007-06-05 04:29:16 +02:00
|
|
|
#
|
2017-03-21 12:44:43 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-06-05 04:29:16 +02:00
|
|
|
#
|
2008-08-08 17:19:08 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-06-05 04:29:16 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2014-08-13 09:59:19 +02:00
|
|
|
%define so_ver 4
|
2007-06-05 04:29:16 +02:00
|
|
|
Name: cryptsetup
|
2017-05-04 11:42:46 +02:00
|
|
|
Version: 1.7.5
|
2013-03-26 12:48:10 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Set Up dm-crypt Based Encrypted Block Devices
|
|
|
|
License: SUSE-GPL-2.0-with-openssl-exception and LGPL-2.0+
|
|
|
|
Group: System/Base
|
2015-10-12 11:14:03 +02:00
|
|
|
Url: https://gitlab.com/cryptsetup/cryptsetup/
|
2016-02-02 12:57:35 +01:00
|
|
|
Source0: https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/cryptsetup-%{version}.tar.xz
|
2014-08-12 15:38:20 +02:00
|
|
|
# GPG signature of the uncompressed tarball.
|
2016-02-02 12:57:35 +01:00
|
|
|
Source1: https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/cryptsetup-%{version}.tar.sign
|
2013-03-26 12:48:10 +01:00
|
|
|
Source2: baselibs.conf
|
|
|
|
Source3: %{name}.keyring
|
2012-07-10 08:28:35 +02:00
|
|
|
BuildRequires: device-mapper-devel
|
2014-07-08 13:55:23 +02:00
|
|
|
BuildRequires: fipscheck
|
|
|
|
BuildRequires: fipscheck-devel
|
2012-07-10 08:28:35 +02:00
|
|
|
BuildRequires: libgcrypt-devel
|
2014-08-13 09:59:19 +02:00
|
|
|
BuildRequires: libpwquality-devel
|
2012-07-10 08:28:35 +02:00
|
|
|
BuildRequires: libselinux-devel
|
2014-08-13 09:59:19 +02:00
|
|
|
BuildRequires: libuuid-devel
|
2013-03-26 12:48:10 +01:00
|
|
|
# 2.6.38 has the required if_alg.h
|
|
|
|
BuildRequires: linux-glibc-devel >= 2.6.38
|
2012-07-10 08:28:35 +02:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: popt-devel
|
2015-04-13 11:46:51 +02:00
|
|
|
BuildRequires: suse-module-tools
|
2015-12-21 12:53:09 +01:00
|
|
|
Requires(post): coreutils
|
|
|
|
Requires(postun): coreutils
|
2007-06-05 04:29:16 +02:00
|
|
|
|
|
|
|
%description
|
2007-08-27 17:34:37 +02:00
|
|
|
cryptsetup is used to conveniently set up dm-crypt based device-mapper
|
|
|
|
targets. It allows to set up targets to read cryptoloop compatible
|
|
|
|
volumes as well as LUKS formatted ones. The package additionally
|
|
|
|
includes support for automatically setting up encrypted volumes at boot
|
2015-04-08 14:54:34 +02:00
|
|
|
time via the config file %{_sysconfdir}/crypttab.
|
2007-06-05 04:29:16 +02:00
|
|
|
|
2014-08-13 09:59:19 +02:00
|
|
|
%package -n libcryptsetup%{so_ver}
|
2007-08-27 17:34:37 +02:00
|
|
|
Summary: Set Up dm-crypt Based Encrypted Block Devices
|
2014-08-13 09:59:19 +02:00
|
|
|
Group: System/Libraries
|
2008-09-15 16:32:21 +02:00
|
|
|
|
2014-08-13 09:59:19 +02:00
|
|
|
%description -n libcryptsetup%{so_ver}
|
2008-09-15 16:32:21 +02:00
|
|
|
cryptsetup is used to conveniently set up dm-crypt based device-mapper
|
|
|
|
targets. It allows to set up targets to read cryptoloop compatible
|
|
|
|
volumes as well as LUKS formatted ones. The package additionally
|
|
|
|
includes support for automatically setting up encrypted volumes at boot
|
2015-04-08 14:54:34 +02:00
|
|
|
time via the config file %{_sysconfdir}/crypttab.
|
2008-09-15 16:32:21 +02:00
|
|
|
|
2015-10-12 11:14:03 +02:00
|
|
|
%package -n libcryptsetup%{so_ver}-hmac
|
2014-08-12 15:38:20 +02:00
|
|
|
Summary: Checksums for libcryptsetup4
|
|
|
|
Group: System/Base
|
|
|
|
|
2015-10-12 11:14:03 +02:00
|
|
|
%description -n libcryptsetup%{so_ver}-hmac
|
2014-08-12 15:38:20 +02:00
|
|
|
This package contains HMAC checksums for integrity checking of libcryptsetup4,
|
|
|
|
used for FIPS.
|
|
|
|
|
2008-09-15 16:32:21 +02:00
|
|
|
%package -n libcryptsetup-devel
|
|
|
|
Summary: Set Up dm-crypt Based Encrypted Block Devices
|
|
|
|
Group: Development/Libraries/C and C++
|
2014-08-13 09:59:19 +02:00
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: libcryptsetup%{so_ver} = %{version}
|
2008-09-15 16:32:21 +02:00
|
|
|
# cryptsetup-devel last used 11.1
|
|
|
|
Provides: cryptsetup-devel = %{version}
|
|
|
|
Obsoletes: cryptsetup-devel < %{version}
|
2007-06-05 04:29:16 +02:00
|
|
|
|
2014-08-13 09:59:19 +02:00
|
|
|
%description -n libcryptsetup-devel
|
2007-08-27 17:34:37 +02:00
|
|
|
cryptsetup is used to conveniently set up dm-crypt based device-mapper
|
|
|
|
targets. It allows to set up targets to read cryptoloop compatible
|
|
|
|
volumes as well as LUKS formatted ones. The package additionally
|
|
|
|
includes support for automatically setting up encrypted volumes at boot
|
2015-04-08 14:54:34 +02:00
|
|
|
time via the config file %{_sysconfdir}/crypttab.
|
2007-06-05 04:29:16 +02:00
|
|
|
|
|
|
|
%prep
|
2013-03-26 12:48:10 +01:00
|
|
|
%setup -q
|
2007-06-05 04:29:16 +02:00
|
|
|
|
|
|
|
%build
|
2017-03-21 12:44:43 +01:00
|
|
|
%configure \
|
|
|
|
--enable-cryptsetup-reencrypt \
|
|
|
|
--enable-selinux \
|
|
|
|
--enable-fips \
|
|
|
|
--enable-pwquality \
|
|
|
|
--enable-gcrypt-pbkdf2
|
2015-04-13 11:46:51 +02:00
|
|
|
make %{?_smp_mflags} V=1
|
2007-06-05 04:29:16 +02:00
|
|
|
|
|
|
|
%install
|
2014-07-08 13:55:23 +02:00
|
|
|
# Generate HMAC checksums (FIPS)
|
|
|
|
%define __spec_install_post \
|
|
|
|
%{?__debug_package:%{__debug_install_post}} \
|
|
|
|
%{__arch_install_post} \
|
|
|
|
%{__os_install_post} \
|
|
|
|
fipshmac %{buildroot}/%{_libdir}/libcryptsetup.so.* \
|
|
|
|
%{nil}
|
|
|
|
|
2017-03-21 12:44:43 +01:00
|
|
|
%make_install
|
2014-08-13 09:59:19 +02:00
|
|
|
install -dm 0755 %{buildroot}/sbin
|
|
|
|
ln -s ..%{_sbindir}/cryptsetup %{buildroot}/sbin
|
2012-02-10 13:56:38 +01:00
|
|
|
# don't want this file in /lib (FHS compat check), and can't move it to /usr/lib
|
2015-04-08 14:54:34 +02:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2007-06-05 04:29:16 +02:00
|
|
|
#
|
2014-08-13 09:59:19 +02:00
|
|
|
%find_lang %{name} --all-name
|
2007-06-05 04:29:16 +02:00
|
|
|
|
|
|
|
%post
|
2012-12-13 14:06:34 +01:00
|
|
|
test -n "$FIRST_ARG" || FIRST_ARG="$1"
|
2011-10-27 17:53:38 +02:00
|
|
|
#
|
|
|
|
# convert noauto to nofail and turn on fsck (bnc#724113)
|
|
|
|
#
|
2015-04-08 14:54:34 +02:00
|
|
|
marker="%{_localstatedir}/adm/crypsetup.fstab.noauto_converted"
|
2011-10-27 17:53:38 +02:00
|
|
|
if [ "$FIRST_ARG" -gt 1 -a ! -e "$marker" ]; then
|
2015-04-08 14:54:34 +02:00
|
|
|
echo "updating %{_sysconfdir}/fstab ... "
|
|
|
|
tmpfstab="%{_sysconfdir}/fstab.cryptsetup.$$"
|
|
|
|
sed -e '/^\/dev\/mapper\/cr_.*,noauto\s/{s/,noauto\(\s\)/,nofail\1/;s/ 0 0$/ 0 2/}' < %{_sysconfdir}/fstab > "$tmpfstab"
|
|
|
|
if diff -u0 %{_sysconfdir}/fstab "$tmpfstab"; then
|
2011-10-27 17:53:38 +02:00
|
|
|
echo "no change"
|
|
|
|
rm -f "$tmpfstab"
|
|
|
|
> "$marker"
|
|
|
|
else
|
|
|
|
cp "$tmpfstab" "$marker"
|
2015-04-08 14:54:34 +02:00
|
|
|
mv "$tmpfstab" %{_sysconfdir}/fstab
|
2011-10-27 17:53:38 +02:00
|
|
|
fi
|
|
|
|
fi
|
2007-06-05 04:29:16 +02:00
|
|
|
|
2015-04-13 11:46:51 +02:00
|
|
|
%{?regenerate_initrd_post}
|
2015-12-21 12:53:09 +01:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%{?regenerate_initrd_post}
|
2015-04-13 11:46:51 +02:00
|
|
|
|
|
|
|
%posttrans
|
|
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
|
2014-08-13 09:59:19 +02:00
|
|
|
%post -n libcryptsetup%{so_ver} -p /sbin/ldconfig
|
|
|
|
%postun -n libcryptsetup%{so_ver} -p /sbin/ldconfig
|
2008-09-15 16:32:21 +02:00
|
|
|
|
2014-08-13 09:59:19 +02:00
|
|
|
%files -f %{name}.lang
|
2007-06-05 04:29:16 +02:00
|
|
|
%defattr(-,root,root)
|
2014-08-13 09:59:19 +02:00
|
|
|
%doc AUTHORS COPYING* FAQ README TODO docs/ChangeLog.old docs/*ReleaseNotes
|
2012-12-13 14:06:34 +01:00
|
|
|
#ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/crypttab
|
|
|
|
#ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/cryptotab
|
2012-02-10 13:56:38 +01:00
|
|
|
/sbin/cryptsetup
|
2012-12-13 14:06:34 +01:00
|
|
|
%{_sbindir}/cryptsetup
|
|
|
|
%{_sbindir}/veritysetup
|
|
|
|
%{_sbindir}/cryptsetup-reencrypt
|
2017-03-21 12:44:43 +01:00
|
|
|
%{_mandir}/man8/cryptsetup.8%{ext_man}
|
|
|
|
%{_mandir}/man8/cryptsetup-reencrypt.8%{ext_man}
|
|
|
|
%{_mandir}/man8/veritysetup.8%{ext_man}
|
2008-09-15 16:32:21 +02:00
|
|
|
|
2014-08-13 09:59:19 +02:00
|
|
|
%files -n libcryptsetup%{so_ver}
|
2008-09-15 16:32:21 +02:00
|
|
|
%defattr(-,root,root)
|
2014-08-13 09:59:19 +02:00
|
|
|
%{_libdir}/libcryptsetup.so.%{so_ver}*
|
2014-08-12 15:38:20 +02:00
|
|
|
|
2014-09-15 11:54:57 +02:00
|
|
|
%files -n libcryptsetup%{so_ver}-hmac
|
2014-08-12 15:38:20 +02:00
|
|
|
%defattr(-,root,root)
|
2014-08-13 09:59:19 +02:00
|
|
|
%{_libdir}/.libcryptsetup.so.%{so_ver}*hmac
|
2007-06-05 04:29:16 +02:00
|
|
|
|
2008-09-15 16:32:21 +02:00
|
|
|
%files -n libcryptsetup-devel
|
2007-06-05 04:29:16 +02:00
|
|
|
%defattr(-,root,root)
|
2014-08-13 09:59:19 +02:00
|
|
|
%doc docs/examples/
|
|
|
|
%{_includedir}/libcryptsetup.h
|
2007-06-05 04:29:16 +02:00
|
|
|
%{_libdir}/libcryptsetup.so
|
2010-01-18 14:07:23 +01:00
|
|
|
%{_libdir}/pkgconfig/*
|
2007-11-29 18:20:01 +01:00
|
|
|
|
2007-06-05 04:29:16 +02:00
|
|
|
%changelog
|