summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Michael <fedora.dm0@gmail.com>2021-03-11 12:49:45 -0500
committerMike Gilbert <floppym@gentoo.org>2021-03-11 13:26:42 -0500
commit61124b721f9dfd990b1f58fc31fec2f3c4eadff4 (patch)
tree838c95a33dcf4f538c6801f8ac86d10aa9823967
parentdev-db/mysql-connector-c: disable debug options (diff)
downloadgentoo-61124b721f9dfd990b1f58fc31fec2f3c4eadff4.tar.gz
gentoo-61124b721f9dfd990b1f58fc31fec2f3c4eadff4.tar.bz2
gentoo-61124b721f9dfd990b1f58fc31fec2f3c4eadff4.zip
app-crypt/pesign: EAPI 7, fix GCC 10, drop libressl
Closes: https://bugs.gentoo.org/721934 Closes: https://bugs.gentoo.org/775503 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: David Michael <fedora.dm0@gmail.com> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
-rw-r--r--app-crypt/pesign/files/pesign-113-enum-conversion.patch46
-rw-r--r--app-crypt/pesign/pesign-113.ebuild26
2 files changed, 62 insertions, 10 deletions
diff --git a/app-crypt/pesign/files/pesign-113-enum-conversion.patch b/app-crypt/pesign/files/pesign-113-enum-conversion.patch
new file mode 100644
index 000000000000..89a57e460fbe
--- /dev/null
+++ b/app-crypt/pesign/files/pesign-113-enum-conversion.patch
@@ -0,0 +1,46 @@
+From c555fd74c009242c3864576bd5f17a1f8f4fdffd Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Tue, 18 Feb 2020 16:28:56 -0500
+Subject: [PATCH] pesigcheck: Fix a wrong assignment
+
+gcc says:
+
+ pesigcheck.c: In function 'check_signature':
+ pesigcheck.c:321:17: error: implicit conversion from 'enum <anonymous>' to 'enum <anonymous>' [-Werror=enum-conversion]
+ 321 | reason->type = siBuffer;
+ | ^
+ pesigcheck.c:333:17: error: implicit conversion from 'enum <anonymous>' to 'enum <anonymous>' [-Werror=enum-conversion]
+ 333 | reason->type = siBuffer;
+ | ^
+ cc1: all warnings being treated as errors
+
+And indeed, that line of code makes no sense at all - it was supposed to
+be reason->sig.type.
+
+Signed-off-by: Peter Jones <pjones@redhat.com>
+---
+ src/pesigcheck.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/pesigcheck.c b/src/pesigcheck.c
+index 524cce3..8fa0f1a 100644
+--- a/src/pesigcheck.c
++++ b/src/pesigcheck.c
+@@ -318,7 +318,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons,
+ reason->type = SIGNATURE;
+ reason->sig.data = data;
+ reason->sig.len = datalen;
+- reason->type = siBuffer;
++ reason->sig.type = siBuffer;
+ nreason += 1;
+ is_invalid = true;
+ }
+@@ -330,7 +330,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons,
+ reason->type = SIGNATURE;
+ reason->sig.data = data;
+ reason->sig.len = datalen;
+- reason->type = siBuffer;
++ reason->sig.type = siBuffer;
+ nreason += 1;
+ has_valid_cert = true;
+ }
diff --git a/app-crypt/pesign/pesign-113.ebuild b/app-crypt/pesign/pesign-113.ebuild
index fcb4a4ab3809..a4d067978175 100644
--- a/app-crypt/pesign/pesign-113.ebuild
+++ b/app-crypt/pesign/pesign-113.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-inherit eutils toolchain-funcs
+inherit flag-o-matic toolchain-funcs
DESCRIPTION="Tools for manipulating signed PE-COFF binaries"
HOMEPAGE="https://github.com/rhboot/pesign"
@@ -12,24 +12,31 @@ SRC_URI="https://github.com/rhboot/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="libressl"
RDEPEND="
dev-libs/nspr
dev-libs/nss
+ dev-libs/openssl:0=
dev-libs/popt
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
sys-apps/util-linux
sys-libs/efivar
"
-DEPEND="${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
sys-apps/help2man
sys-boot/gnu-efi
virtual/pkgconfig
"
-PATCHES=( "${FILESDIR}"/${PN}-113-nss.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-113-nss.patch
+ "${FILESDIR}"/${PN}-113-enum-conversion.patch
+)
+
+src_configure() {
+ append-cflags -O1 #721934
+ default
+}
src_compile() {
emake AR="$(tc-getAR)" \
@@ -47,6 +54,5 @@ src_install() {
einstalldocs
# remove some files that don't make sense for Gentoo installs
- rm -rf "${ED%/}/etc/" "${ED%/}/var/" \
- "${ED%/}/usr/share/doc/${PF}/COPYING" || die
+ rm -rf "${ED}/etc" "${ED}/var" "${ED}/usr/share/doc/${PF}/COPYING" || die
}