commit:     f47895050be6398fb90fc0b9e16886e1628606d2
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 26 08:22:30 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Nov 26 08:24:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4789505

dev-libs/volume_key: Revbump for python3_9 support

added support for higher LUKS versions

Package-Manager: Portage-3.0.10, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 ...e_key-0.3.12-support_higher_LUKS_versions.patch | 33 +++++++++++++
 dev-libs/volume_key/volume_key-0.3.12-r2.ebuild    | 55 ++++++++++++++++++++++
 2 files changed, 88 insertions(+)

diff --git 
a/dev-libs/volume_key/files/volume_key-0.3.12-support_higher_LUKS_versions.patch
 
b/dev-libs/volume_key/files/volume_key-0.3.12-support_higher_LUKS_versions.patch
new file mode 100644
index 00000000000..6f5aec1dfe5
--- /dev/null
+++ 
b/dev-libs/volume_key/files/volume_key-0.3.12-support_higher_LUKS_versions.patch
@@ -0,0 +1,33 @@
+From 26c09768662d8958debe8c9410dae9fda02292c3 Mon Sep 17 00:00:00 2001
+From: Jiri Kucera <jkuc...@redhat.com>
+Date: Jan 23 2019 13:35:52 +0000
+Subject: Add support for higher versions of LUKS
+
+
+---
+
+diff --git a/lib/volume_luks.c b/lib/volume_luks.c
+index f4bf2c8..d1c5d47 100644
+--- a/lib/volume_luks.c
++++ b/lib/volume_luks.c
+@@ -30,6 +30,10 @@ Author: Miloslav Trmač <m...@redhat.com> */
+ #include "volume.h"
+ #include "volume_luks.h"
+ 
++#ifndef CRYPT_LUKS
++#define CRYPT_LUKS NULL
++#endif
++
+ /* LUKS - specific code */
+ 
+ /* Return an error message for ERR_NO, for g_free (). */
+@@ -105,7 +109,7 @@ open_crypt_device (const char *path, char 
**last_log_entry, GError **error)
+   if (r < 0)
+     goto err;
+   crypt_set_log_callback(cd, record_cryptsetup_log_entry, last_log_entry);
+-  r = crypt_load (cd, CRYPT_LUKS1, NULL);
++  r = crypt_load (cd, CRYPT_LUKS, NULL);
+   if (r < 0)
+     goto err_cd;
+   return cd;
+

diff --git a/dev-libs/volume_key/volume_key-0.3.12-r2.ebuild 
b/dev-libs/volume_key/volume_key-0.3.12-r2.ebuild
new file mode 100644
index 00000000000..90c67ed022e
--- /dev/null
+++ b/dev-libs/volume_key/volume_key-0.3.12-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+
+inherit python-single-r1
+
+DESCRIPTION="Library for manipulating and storing storage volume encryption 
keys"
+HOMEPAGE="https://pagure.io/volume_key";
+SRC_URI="http://releases.pagure.org/${PN}/${P}.tar.xz";
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+       ${PYTHON_DEPS}
+       app-crypt/gpgme
+       dev-libs/glib:2
+       dev-libs/nspr
+       dev-libs/nss
+       sys-apps/util-linux
+       sys-fs/cryptsetup:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       sys-devel/gettext
+       test? ( dev-libs/nss[utils] )
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-support_higher_LUKS_versions.patch"
+)
+
+pkg_setup() {
+       python-single-r1_pkg_setup
+}
+
+src_configure() {
+       # --without-python disables python2
+       econf --without-python --with-python3
+}
+
+src_install() {
+       default
+       find "${ED}" -type f -name "*.la" -delete || die
+
+       python_optimize
+}

Reply via email to