summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-10-28 00:50:51 +0100
committerSam James <sam@gentoo.org>2023-10-28 00:50:51 +0100
commit4798ad6134c3978c821512fc7850c64514b1f373 (patch)
tree6e6d49b6b09cd3fd5439a786a0fae2f7b8e48a54 /app-crypt
parentsys-devel/gcc: update insn-emit split patch for 14.x (fixes hppa build) (diff)
downloadgentoo-4798ad6134c3978c821512fc7850c64514b1f373.tar.gz
gentoo-4798ad6134c3978c821512fc7850c64514b1f373.tar.bz2
gentoo-4798ad6134c3978c821512fc7850c64514b1f373.zip
app-crypt/p11-kit: backport tty fix; drop castxml dep
* Backport tty fix * Drop castxml dep, as it's not required, and castxml needs Clang. If we used it only if installed, we'd get a non-deterministic build. Closes: https://bugs.gentoo.org/916376 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch22
-rw-r--r--app-crypt/p11-kit/p11-kit-0.25.1-r1.ebuild (renamed from app-crypt/p11-kit/p11-kit-0.25.1.ebuild)16
2 files changed, 37 insertions, 1 deletions
diff --git a/app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch b/app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch
new file mode 100644
index 000000000000..b97a71396e26
--- /dev/null
+++ b/app-crypt/p11-kit/files/p11-kit-0.25.1-fix-tty-comparison.patch
@@ -0,0 +1,22 @@
+https://github.com/p11-glue/p11-kit/commit/cdc4720d29466e717aa694a85a7aee86ebb94172
+
+From cdc4720d29466e717aa694a85a7aee86ebb94172 Mon Sep 17 00:00:00 2001
+From: Erdem Meydanli <meydanli@amazon.com>
+Date: Thu, 26 Oct 2023 15:18:24 +0000
+Subject: [PATCH] fix: improper comparison
+
+Compare the return value of the readpassphrase function to NULL.
+
+Signed-off-by: Erdem Meydanli <meydanli@amazon.com>
+--- a/p11-kit/tty.c
++++ b/p11-kit/tty.c
+@@ -66,7 +66,7 @@ p11_pin_tty_callback (const char *pin_source,
+ if (asprintf (&prompt, "%s: ", pin_description) < 0)
+ return NULL;
+
+- if (readpassphrase (prompt, buf, sizeof(buf), 0) < 0)
++ if (readpassphrase (prompt, buf, sizeof(buf), 0) == NULL)
+ goto cleanup;
+
+ pin = p11_kit_pin_new_for_string (buf);
+
diff --git a/app-crypt/p11-kit/p11-kit-0.25.1.ebuild b/app-crypt/p11-kit/p11-kit-0.25.1-r1.ebuild
index be3e638e329e..ed2b437d4844 100644
--- a/app-crypt/p11-kit/p11-kit-0.25.1.ebuild
+++ b/app-crypt/p11-kit/p11-kit-0.25.1-r1.ebuild
@@ -26,12 +26,15 @@ DEPEND="${RDEPEND}"
BDEPEND="
${PYTHON_DEPS}
app-text/docbook-xsl-stylesheets
- dev-libs/castxml
virtual/pkgconfig
gtk-doc? ( dev-util/gtk-doc )
nls? ( sys-devel/gettext )
"
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-tty-comparison.patch
+)
+
src_prepare() {
default
@@ -46,7 +49,18 @@ multilib_src_configure() {
# Disable unsafe tests, bug#502088
export FAKED_MODE=1
+ local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
+
+ # p11-kit doesn't need this to build and castxml needs Clang. To get
+ # a deterministic non-automagic build, always disable the search for
+ # castxml.
+ cat >> ${native_file} <<-EOF || die
+ [binaries]
+ castxml='castxml-falseified'
+ EOF
+
local emesonargs=(
+ --native-file "${native_file}"
-Dbashcompdir="$(get_bashcompdir)"
-Dtrust_module=enabled
-Dtrust_paths="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt