%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Summary: An utility for manipulating storage encryption keys and passphrases Name: volume_key Version: 0.2 Release: 1 License: GPLv2 Group: Applications/System URL: https://fedorahosted.org/volume_key/ Requires: volume_key-libs = %{version}-%{release} Source0: https://fedorahosted.org/releases/v/o/volume_key/volume_key-%{version}.tar.bz2 Source1: http://cryptsetup.googlecode.com/files/cryptsetup-1.0.7-rc1.tar.bz2 # http://code.google.com/p/cryptsetup/issues/detail?id=15 Patch0: https://fedorahosted.org/releases/v/o/volume_key/cryptsetup-svn-r62.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: gettext-devel, glib2-devel, gnupg, gpgme-devel, libblkid-devel BuildRequires: nss-devel, python-devel # For cryptsetup BuildRequires: device-mapper-devel, e2fsprogs-devel, libgcrypt-devel BuildRequires: libgpg-error-devel, libselinux-devel, libsepol-devel, popt-devel %description This package provides a command-line tool for manipulating storage volume encryption keys and storing them separately from volumes. The main goal of the software is to allow restoring access to an encrypted hard drive if the primary user forgets the passphrase. The encryption key back up can also be useful for extracting data after a hardware or software failure that corrupts the header of the encrypted volume, or to access the company data after an employee leaves abruptly. %package devel Summary: A library for manipulating storage encryption keys and passphrases Group: Development/Libraries Requires: volume_key-libs = %{version}-%{release} %description devel This package provides libvolume_key, a library for manipulating storage volume encryption keys and storing them separately from volumes. The main goal of the software is to allow restoring access to an encrypted hard drive if the primary user forgets the passphrase. The encryption key back up can also be useful for extracting data after a hardware or software failure that corrupts the header of the encrypted volume, or to access the company data after an employee leaves abruptly. %package libs Summary: A library for manipulating storage encryption keys and passphrases Group: System Environment/Libraries %description libs This package provides libvolume_key, a library for manipulating storage volume encryption keys and storing them separately from volumes. The main goal of the software is to allow restoring access to an encrypted hard drive if the primary user forgets the passphrase. The encryption key back up can also be useful for extracting data after a hardware or software failure that corrupts the header of the encrypted volume, or to access the company data after an employee leaves abruptly. %package -n python-volume_key Summary: Python bindings for libvolume_key Group: System Environment/Libraries Requires: volume_key-libs = %{version}-%{release} %description -n python-volume_key This package provides Python bindings for libvolume_key, a library for manipulating storage volume encryption keys and storing them separately from volumes. The main goal of the software is to allow restoring access to an encrypted hard drive if the primary user forgets the passphrase. The encryption key back up can also be useful for extracting data after a hardware or software failure that corrupts the header of the encrypted volume, or to access the company data after an employee leaves abruptly. volume_key currently supports only the LUKS volume encryption format. Support for other formats is possible, some formats are planned for future releases. %prep %setup -q -a 1 pushd cryptsetup-1.0.7-rc1 %patch0 -p0 -b .cs-vk popd %build cryptsetup_root=$(pwd)/cryptsetup-root pushd cryptsetup-1.0.7-rc1 %configure --enable-static --disable-shared --with-pic make %{?_smp_mflags} make install "DESTDIR=$cryptsetup_root" INSTALL='install -p' popd %configure "CPPFLAGS=-I$cryptsetup_root"%{_includedir} \ "LDFLAGS=-L$cryptsetup_root"%{_libdir} --disable-static make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT %find_lang volume_key %clean rm -rf $RPM_BUILD_ROOT %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc README %{_bindir}/volume_key %{_mandir}/man8/volume_key.8* %files devel %defattr(-,root,root,-) %{_includedir}/volume_key %exclude %{_libdir}/libvolume_key.la %{_libdir}/libvolume_key.so %files libs -f volume_key.lang %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog NEWS %{_libdir}/libvolume_key.so.* %files -n python-volume_key %defattr(-,root,root,-) %exclude %{python_sitearch}/_volume_key.la %{python_sitearch}/_volume_key.so %{python_sitearch}/volume_key.py* %changelog * Tue Jun 30 2009 Miloslav Trmač - 0.2-1 - Initial build.