]> git.pld-linux.org Git - packages/volume_key.git/commitdiff
Initial release (with upstream patches) auto/th/volume_key-0.3.9-1
authorMarcin Banasiak <marcin.banasiak@gmail.com>
Thu, 2 Nov 2017 21:08:20 +0000 (22:08 +0100)
committerMarcin Banasiak <marcin.banasiak@gmail.com>
Thu, 2 Nov 2017 21:08:20 +0000 (22:08 +0100)
volume_key-config.h.patch [new file with mode: 0644]
volume_key-fips-crash.patch [new file with mode: 0644]
volume_key.spec [new file with mode: 0644]

diff --git a/volume_key-config.h.patch b/volume_key-config.h.patch
new file mode 100644 (file)
index 0000000..98a70f9
--- /dev/null
@@ -0,0 +1,25 @@
+The library's header file distributed in the devel package cannot include\r
+the config.h file that is only available during build otherwise it's not\r
+possible to use the library outside of the volume_key build process.\r
+\r
+Signed-off-by: Vratislav Podzimek <vpodzime@redhat.com>\r
+---\r
+ lib/libvolume_key.h | 2 --\r
+ 1 file changed, 2 deletions(-)\r
+\r
+diff --git a/lib/libvolume_key.h b/lib/libvolume_key.h\r
+index 657b626..513f923 100644\r
+--- a/lib/libvolume_key.h\r
++++ b/lib/libvolume_key.h\r
+@@ -18,8 +18,6 @@ Author: Miloslav Trmač <mitr@redhat.com> */\r
+ #ifndef LIBVOLUME_KEY_H__\r
+ #define LIBVOLUME_KEY_H__\r
\r
+-#include <config.h>\r
+-\r
+ #include <cert.h>\r
+ #include <glib.h>\r
\r
+-- \r
+2.1.0\r
+\r
diff --git a/volume_key-fips-crash.patch b/volume_key-fips-crash.patch
new file mode 100644 (file)
index 0000000..0f79d4e
--- /dev/null
@@ -0,0 +1,33 @@
+This case can be triggered by encrypting in FIPS mode, where the default
+algorithm is unsupported and gpg crashes in response.
+
+diff --git a/lib/crypto.c b/lib/crypto.c
+index 06eb482..905d583 100644
+--- a/lib/crypto.c
++++ b/lib/crypto.c
+@@ -709,6 +709,12 @@ encrypt_with_passphrase (size_t *res_size, const void *data, size_t size,
+     }
+   gpgme_data_release (src_data);
+   gpgme_res = gpgme_data_release_and_get_mem (dest_data, res_size);
++  if (gpgme_res == NULL)
++    {
++      g_set_error (error, LIBVK_ERROR, LIBVK_ERROR_CRYPTO,
++                 _("Unknown error getting encryption result"));
++      goto err_ctx;
++    }
+   res = g_memdup (gpgme_res, *res_size);
+   gpgme_free (gpgme_res);
+@@ -759,6 +765,12 @@ decrypt_with_passphrase (size_t *res_size, const void *data, size_t size,
+     }
+   gpgme_data_release (src_data);
+   gpgme_res = gpgme_data_release_and_get_mem (dest_data, res_size);
++  if (gpgme_res == NULL)
++    {
++      g_set_error (error, LIBVK_ERROR, LIBVK_ERROR_CRYPTO,
++                 _("Unknown error getting decryption result"));
++      goto err_ctx;
++    }
+   res = g_memdup (gpgme_res, *res_size);
+   gpgme_free (gpgme_res);
diff --git a/volume_key.spec b/volume_key.spec
new file mode 100644 (file)
index 0000000..f3018c8
--- /dev/null
@@ -0,0 +1,120 @@
+Summary:       An utility for manipulating storage encryption keys and passphrases
+Name:          volume_key
+Version:       0.3.9
+Release:       1
+License:       GPL v2
+Group:         Applications/System
+Source0:       https://releases.pagure.org/volume_key/%{name}-%{version}.tar.xz
+# Source0-md5: a2d14931177c660e1f3ebbcf5f47d8e2
+Patch0:                %{name}-config.h.patch
+Patch1:                %{name}-fips-crash.patch
+URL:           https://pagure.io/volume_key/
+BuildRequires: autoconf >= 2.64
+BuildRequires: automake
+BuildRequires: cryptsetup-devel
+BuildRequires: gettext-tools >= 0.17
+BuildRequires: glib2-devel
+BuildRequires: gnupg
+BuildRequires: libblkid-devel
+BuildRequires: libtool
+BuildRequires: nss-devel
+BuildRequires: pkgconfig
+BuildRequires: xz
+Requires:      %{name}-libs = %{version}-%{release}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%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 libs
+Summary:       A library for manipulating storage encryption keys and passphrases
+Group:         Libraries
+
+%description libs
+This package provides libvolume_key, a library for manipulating
+storage volume encryption keys and storing them separately from
+volumes.
+
+%package devel
+Summary:       Header files for volume_key library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki volume_key
+Group:         Development/Libraries
+Requires:      %{name}-libs = %{version}-%{release}
+
+%description devel
+Header files for volume_key library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki volume_key.
+
+%package -n python-%{name}
+Summary:       Python bindings for volume_key library
+Group:         Libraries
+Requires:      %{name}-libs = %{version}-%{release}
+
+%description -n python-%{name}
+This package provides Python bindings for libvolume_key, a library for
+manipulating storage volume encryption keys and storing them
+separately from volumes.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%{__rm} -f $RPM_BUILD_ROOT%{py_sitedir}/*.la
+
+%py_postclean
+
+%find_lang %{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post libs -p /sbin/ldconfig
+%postun        libs -p /sbin/ldconfig
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog NEWS README
+%attr(755,root,root) %{_bindir}/volume_key
+%{_mandir}/man8/volume_key.8*
+
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libvolume_key.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libvolume_key.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libvolume_key.so
+%{_libdir}/libvolume_key.la
+%{_includedir}/volume_key
+
+%files -n python-%{name}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/_volume_key.so
+%{py_sitedir}/*.py[co]
This page took 0.14295 seconds and 4 git commands to generate.