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
|
|
|
#
|
2011-02-02 01:35:12 +01:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2011-04-11 16:45:23 +02:00
|
|
|
#define beta rc1
|
|
|
|
%define ver %version%{?beta:-%beta}
|
2010-01-21 11:33:50 +01:00
|
|
|
|
2007-06-05 04:29:16 +02:00
|
|
|
Name: cryptsetup
|
2009-03-04 15:29:07 +01:00
|
|
|
Url: http://code.google.com/p/cryptsetup/
|
2007-06-05 04:29:16 +02:00
|
|
|
BuildRequires: device-mapper-devel e2fsprogs-devel libgcrypt-devel popt-devel
|
2010-05-31 18:14:50 +02:00
|
|
|
BuildRequires: libselinux-devel pkgconfig
|
2011-10-02 17:40:14 +02:00
|
|
|
BuildRequires: libtool
|
2007-06-05 04:29:16 +02:00
|
|
|
# hashalot version
|
|
|
|
%define haver 0.3
|
2008-01-09 21:57:24 +01:00
|
|
|
# boot.crypto version
|
2011-10-10 11:36:11 +02:00
|
|
|
%define bcver 0_201110101134
|
2010-05-31 18:14:50 +02:00
|
|
|
License: GPLv2+
|
2007-06-05 04:29:16 +02:00
|
|
|
Group: System/Base
|
2011-05-25 13:15:26 +02:00
|
|
|
Version: 1.3.1
|
2011-05-30 09:29:48 +02:00
|
|
|
Release: 2
|
2011-04-11 16:45:23 +02:00
|
|
|
#Release: %{?beta:0.}<CI_CNT>.<B_CNT>%{?beta:.}%{?beta}
|
2007-08-27 17:34:37 +02:00
|
|
|
Summary: Set Up dm-crypt Based Encrypted Block Devices
|
2011-04-11 16:45:23 +02:00
|
|
|
Source: http://cryptsetup.googlecode.com/files/cryptsetup-%{ver}.tar.bz2
|
|
|
|
Source1: http://cryptsetup.googlecode.com/files/cryptsetup-%{ver}.tar.bz2.asc
|
2010-01-18 14:07:23 +01:00
|
|
|
Source2: baselibs.conf
|
2010-01-21 11:33:50 +01:00
|
|
|
Source10: hashalot-%haver.tar.bz2
|
2010-01-18 14:07:23 +01:00
|
|
|
# git://gitorious.org/opensuse/boot_crypto.git
|
2010-01-21 11:33:50 +01:00
|
|
|
Source20: boot.crypto-%{bcver}.tar.bz2
|
2007-06-05 04:29:16 +02:00
|
|
|
# use this to create the tarball from svn
|
|
|
|
Source99: cryptsetup-mktar
|
2010-01-18 14:07:23 +01:00
|
|
|
#Patch0: cryptsetup-svn131-noascii.diff
|
2007-06-05 04:29:16 +02:00
|
|
|
Patch10: hashalot-fixes.diff
|
|
|
|
Patch11: hashalot-libgcrypt.diff
|
|
|
|
Patch12: hashalot-ctrl-d.diff
|
|
|
|
Patch13: hashalot-timeout.diff
|
|
|
|
Patch14: hashalot-manpage.diff
|
2009-02-26 16:43:32 +01:00
|
|
|
Patch15: bug-476290_hashalot-hashlen.diff
|
2009-06-12 17:58:59 +02:00
|
|
|
Patch16: hashalot-glibc210.diff
|
2007-06-05 04:29:16 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Provides: aaa_base:/etc/init.d/boot.crypto
|
|
|
|
Obsoletes: util-linux-crypto <= 2.12r
|
|
|
|
# we need losetup
|
|
|
|
Requires: util-linux
|
2007-11-09 22:12:45 +01:00
|
|
|
PreReq: %fillup_prereq %insserv_prereq
|
2011-10-27 17:53:38 +02:00
|
|
|
PreReq: coreutils diffutils
|
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
|
|
|
|
time via the config file /etc/crypttab.
|
2007-06-05 04:29:16 +02:00
|
|
|
|
2010-01-18 14:07:23 +01:00
|
|
|
%package -n libcryptsetup1
|
2010-01-21 11:33:50 +01:00
|
|
|
License: GPLv2+
|
2007-08-27 17:34:37 +02:00
|
|
|
Summary: Set Up dm-crypt Based Encrypted Block Devices
|
2007-06-05 04:29:16 +02:00
|
|
|
Group: System/Base
|
2008-09-15 16:32:21 +02:00
|
|
|
|
2010-01-18 14:07:23 +01:00
|
|
|
%description -n libcryptsetup1
|
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
|
|
|
|
time via the config file /etc/crypttab.
|
|
|
|
|
|
|
|
%package -n libcryptsetup-devel
|
2010-01-21 11:33:50 +01:00
|
|
|
License: GPLv2+
|
2008-09-15 16:32:21 +02:00
|
|
|
Summary: Set Up dm-crypt Based Encrypted Block Devices
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
# cryptsetup-devel last used 11.1
|
|
|
|
Provides: cryptsetup-devel = %{version}
|
|
|
|
Obsoletes: cryptsetup-devel < %{version}
|
2010-01-18 14:07:23 +01:00
|
|
|
Requires: libcryptsetup1 = %{version}
|
2007-06-05 04:29:16 +02:00
|
|
|
Requires: device-mapper-devel libgcrypt-devel libgpg-error-devel e2fsprogs-devel glibc-devel
|
|
|
|
|
2008-09-15 16:32:21 +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
|
|
|
|
time via the config file /etc/crypttab.
|
2007-06-05 04:29:16 +02:00
|
|
|
|
|
|
|
%prep
|
2011-04-11 16:45:23 +02:00
|
|
|
%setup -n %name-%ver -q -b 10 -b 20
|
2010-01-18 14:07:23 +01:00
|
|
|
#patch0 -p1
|
2007-06-05 04:29:16 +02:00
|
|
|
pushd ../hashalot-%haver
|
|
|
|
%patch10 -p1
|
|
|
|
%patch11 -p1
|
|
|
|
%patch12 -p1
|
|
|
|
%patch13 -p1
|
|
|
|
%patch14 -p1
|
2009-02-26 16:43:32 +01:00
|
|
|
%patch15 -p1
|
2009-06-12 17:58:59 +02:00
|
|
|
%patch16 -p1
|
2007-06-05 04:29:16 +02:00
|
|
|
popd
|
2010-07-01 16:26:39 +02:00
|
|
|
pushd ../boot.crypto-%bcver
|
2010-11-16 15:06:15 +01:00
|
|
|
#patch20 -p1
|
2010-07-01 16:26:39 +02:00
|
|
|
popd
|
2007-06-05 04:29:16 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
# cryptsetup build
|
|
|
|
%{?suse_update_config:%{suse_update_config}}
|
|
|
|
autoreconf -f -i
|
2010-01-18 14:07:23 +01:00
|
|
|
test -e po/Makevars || cp po/Makevars.template po/Makevars
|
2011-09-26 09:42:42 +02:00
|
|
|
%configure \
|
2007-06-05 04:29:16 +02:00
|
|
|
--libdir=/%_lib \
|
|
|
|
--bindir=/sbin --sbindir=/sbin \
|
2008-08-21 22:35:25 +02:00
|
|
|
--disable-static --enable-shared \
|
|
|
|
--enable-selinux
|
2010-06-26 21:08:28 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-06-05 04:29:16 +02:00
|
|
|
#
|
|
|
|
# hashalot build
|
|
|
|
pushd ../hashalot-%haver
|
|
|
|
autoreconf -f -i
|
|
|
|
%{?suse_update_config:%{suse_update_config}}
|
2011-09-26 09:42:42 +02:00
|
|
|
%configure --sbindir=/sbin
|
2010-06-26 21:08:28 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-06-05 04:29:16 +02:00
|
|
|
popd
|
|
|
|
|
|
|
|
%install
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
2010-12-20 14:44:02 +01:00
|
|
|
# move devel stuff to %%{libdir}
|
2007-06-05 04:29:16 +02:00
|
|
|
rm -f $RPM_BUILD_ROOT/%{_lib}/libcryptsetup.so
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
2010-01-18 14:07:23 +01:00
|
|
|
ln -s /%{_lib}/libcryptsetup.so.1 $RPM_BUILD_ROOT%{_libdir}/libcryptsetup.so
|
|
|
|
mv $RPM_BUILD_ROOT/%_lib/pkgconfig $RPM_BUILD_ROOT/%_libdir
|
2007-06-05 04:29:16 +02:00
|
|
|
# don't want this file in /lib (FHS compat check), and can't move it to /usr/lib
|
|
|
|
rm -f $RPM_BUILD_ROOT/%_lib/*.la
|
|
|
|
#
|
|
|
|
# hashalot install
|
|
|
|
pushd ../hashalot-%haver
|
|
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
popd
|
|
|
|
# remove unwanted symlinks
|
|
|
|
rm -f $RPM_BUILD_ROOT/sbin/{rmd160,sha256,sha384,sha512}
|
|
|
|
#
|
|
|
|
# boot.crypto
|
2008-01-09 21:57:24 +01:00
|
|
|
make -C ../boot.crypto-* install DESTDIR=$RPM_BUILD_ROOT
|
2009-03-09 00:18:36 +01:00
|
|
|
ln -s /etc/init.d/boot.crypto $RPM_BUILD_ROOT/sbin/rccrypto
|
2007-06-05 04:29:16 +02:00
|
|
|
#
|
|
|
|
%find_lang %name --all-name
|
|
|
|
|
|
|
|
%pre
|
|
|
|
# hack to catch update case from aaa_base/util-linux-crypto
|
|
|
|
if [ -f /etc/init.d/boot.d/S??boot.crypto ]; then
|
|
|
|
touch /var/run/cryptsetup.boot.crypto.enabled
|
|
|
|
fi
|
|
|
|
|
|
|
|
%post
|
2008-09-05 22:19:55 +02:00
|
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
2007-06-05 04:29:16 +02:00
|
|
|
%{fillup_and_insserv boot.crypto}
|
|
|
|
if [ -e /var/run/cryptsetup.boot.crypto.enabled ]; then
|
|
|
|
rm -f /var/run/cryptsetup.boot.crypto.enabled
|
|
|
|
%{fillup_and_insserv -fY boot.crypto}
|
|
|
|
fi
|
2008-04-09 21:36:47 +02:00
|
|
|
%{fillup_and_insserv boot.crypto-early}
|
2011-10-27 17:53:38 +02:00
|
|
|
#
|
|
|
|
# convert noauto to nofail and turn on fsck (bnc#724113)
|
|
|
|
#
|
|
|
|
marker="/var/adm/crypsetup.fstab.noauto_converted"
|
|
|
|
if [ "$FIRST_ARG" -gt 1 -a ! -e "$marker" ]; then
|
|
|
|
echo "updating /etc/fstab ... "
|
|
|
|
tmpfstab="/etc/fstab.cryptsetup.$$"
|
|
|
|
sed -e '/^\/dev\/mapper\/cr_.*,noauto\s/{s/,noauto\(\s\)/,nofail\1/;s/ 0 0$/ 0 2/}' < /etc/fstab > "$tmpfstab"
|
|
|
|
if diff -u0 /etc/fstab "$tmpfstab"; then
|
|
|
|
echo "no change"
|
|
|
|
rm -f "$tmpfstab"
|
|
|
|
> "$marker"
|
|
|
|
else
|
|
|
|
cp "$tmpfstab" "$marker"
|
|
|
|
mv "$tmpfstab" /etc/fstab
|
|
|
|
fi
|
|
|
|
fi
|
2007-06-05 04:29:16 +02:00
|
|
|
|
|
|
|
%postun
|
2008-09-05 22:19:55 +02:00
|
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
2007-06-05 04:29:16 +02:00
|
|
|
%{insserv_cleanup}
|
|
|
|
|
2010-01-18 14:07:23 +01:00
|
|
|
%post -n libcryptsetup1 -p /sbin/ldconfig
|
2008-09-15 16:32:21 +02:00
|
|
|
|
2010-01-18 14:07:23 +01:00
|
|
|
%postun -n libcryptsetup1 -p /sbin/ldconfig
|
2008-09-15 16:32:21 +02:00
|
|
|
|
2007-06-05 04:29:16 +02:00
|
|
|
%files -f %name.lang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/crypttab
|
|
|
|
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/cryptotab
|
|
|
|
/etc/init.d/boot.crypto
|
2008-04-09 21:36:47 +02:00
|
|
|
/etc/init.d/boot.crypto-early
|
2008-07-24 23:06:32 +02:00
|
|
|
%dir /lib/mkinitrd
|
|
|
|
%dir /lib/mkinitrd/scripts
|
|
|
|
/lib/mkinitrd/scripts/setup-luks.sh
|
|
|
|
/lib/mkinitrd/scripts/boot-luks.sh
|
2010-01-18 14:07:23 +01:00
|
|
|
/lib/mkinitrd/scripts/setup-luks2.sh
|
|
|
|
/lib/mkinitrd/scripts/setup-luks_final.sh
|
2010-11-30 16:07:41 +01:00
|
|
|
/usr/sbin/convert_cryptotab
|
2007-06-05 04:29:16 +02:00
|
|
|
/sbin/cryptsetup
|
|
|
|
/sbin/hashalot
|
2009-03-09 00:18:36 +01:00
|
|
|
/sbin/rccrypto
|
2007-06-05 04:29:16 +02:00
|
|
|
%_mandir/man1/hashalot.1.gz
|
|
|
|
%_mandir/man8/cryptsetup.8.gz
|
|
|
|
%_mandir/man5/crypttab.5.gz
|
2008-02-04 17:35:21 +01:00
|
|
|
%_mandir/man5/cryptotab.5.gz
|
2008-09-15 16:32:21 +02:00
|
|
|
/lib/cryptsetup
|
|
|
|
|
2010-01-18 14:07:23 +01:00
|
|
|
%files -n libcryptsetup1
|
2008-09-15 16:32:21 +02:00
|
|
|
%defattr(-,root,root)
|
2010-12-20 14:44:02 +01:00
|
|
|
/%_lib/libcryptsetup.so.1*
|
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)
|
|
|
|
%_includedir/libcryptsetup.h
|
|
|
|
%{_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
|