Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 775503
Collapse All | Expand All

(-)a/app-crypt/pesign/files/pesign-113-enum-conversion.patch (+46 lines)
Line 0 Link Here
1
From c555fd74c009242c3864576bd5f17a1f8f4fdffd Mon Sep 17 00:00:00 2001
2
From: Peter Jones <pjones@redhat.com>
3
Date: Tue, 18 Feb 2020 16:28:56 -0500
4
Subject: [PATCH] pesigcheck: Fix a wrong assignment
5
6
gcc says:
7
8
  pesigcheck.c: In function 'check_signature':
9
  pesigcheck.c:321:17: error: implicit conversion from 'enum <anonymous>' to 'enum <anonymous>' [-Werror=enum-conversion]
10
  321 |    reason->type = siBuffer;
11
      |                 ^
12
  pesigcheck.c:333:17: error: implicit conversion from 'enum <anonymous>' to 'enum <anonymous>' [-Werror=enum-conversion]
13
  333 |    reason->type = siBuffer;
14
      |                 ^
15
  cc1: all warnings being treated as errors
16
17
And indeed, that line of code makes no sense at all - it was supposed to
18
be reason->sig.type.
19
20
Signed-off-by: Peter Jones <pjones@redhat.com>
21
---
22
 src/pesigcheck.c | 4 ++--
23
 1 file changed, 2 insertions(+), 2 deletions(-)
24
25
diff --git a/src/pesigcheck.c b/src/pesigcheck.c
26
index 524cce3..8fa0f1a 100644
27
--- a/src/pesigcheck.c
28
+++ b/src/pesigcheck.c
29
@@ -318,7 +318,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons,
30
 			reason->type = SIGNATURE;
31
 			reason->sig.data = data;
32
 			reason->sig.len = datalen;
33
-			reason->type = siBuffer;
34
+			reason->sig.type = siBuffer;
35
 			nreason += 1;
36
 			is_invalid = true;
37
 		}
38
@@ -330,7 +330,7 @@ check_signature(pesigcheck_context *ctx, int *nreasons,
39
 			reason->type = SIGNATURE;
40
 			reason->sig.data = data;
41
 			reason->sig.len = datalen;
42
-			reason->type = siBuffer;
43
+			reason->sig.type = siBuffer;
44
 			nreason += 1;
45
 			has_valid_cert = true;
46
 		}
(-)a/app-crypt/pesign/pesign-113.ebuild (-11 / +16 lines)
Lines 1-9 Link Here
1
# Copyright 1999-2019 Gentoo Authors
1
# Copyright 1999-2021 Gentoo Authors
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
3
4
EAPI=6
4
EAPI=7
5
5
6
inherit eutils toolchain-funcs
6
inherit flag-o-matic toolchain-funcs
7
7
8
DESCRIPTION="Tools for manipulating signed PE-COFF binaries"
8
DESCRIPTION="Tools for manipulating signed PE-COFF binaries"
9
HOMEPAGE="https://github.com/rhboot/pesign"
9
HOMEPAGE="https://github.com/rhboot/pesign"
Lines 12-35 SRC_URI="https://github.com/rhboot/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" Link Here
12
LICENSE="GPL-2"
12
LICENSE="GPL-2"
13
SLOT="0"
13
SLOT="0"
14
KEYWORDS="~amd64 ~x86"
14
KEYWORDS="~amd64 ~x86"
15
IUSE="libressl"
16
15
17
RDEPEND="
16
RDEPEND="
18
	dev-libs/nspr
17
	dev-libs/nspr
19
	dev-libs/nss
18
	dev-libs/nss
19
	dev-libs/openssl:0=
20
	dev-libs/popt
20
	dev-libs/popt
21
	!libressl? ( dev-libs/openssl:0= )
22
	libressl? ( dev-libs/libressl:0= )
23
	sys-apps/util-linux
21
	sys-apps/util-linux
24
	sys-libs/efivar
22
	sys-libs/efivar
25
"
23
"
26
DEPEND="${RDEPEND}
24
DEPEND="${RDEPEND}"
25
BDEPEND="
27
	sys-apps/help2man
26
	sys-apps/help2man
28
	sys-boot/gnu-efi
27
	sys-boot/gnu-efi
29
	virtual/pkgconfig
28
	virtual/pkgconfig
30
"
29
"
31
30
32
PATCHES=( "${FILESDIR}"/${PN}-113-nss.patch )
31
PATCHES=(
32
	"${FILESDIR}"/${PN}-113-nss.patch
33
	"${FILESDIR}"/${PN}-113-enum-conversion.patch
34
)
35
36
src_configure() {
37
	append-cflags -O1 #721934
38
	default
39
}
33
40
34
src_compile() {
41
src_compile() {
35
	emake AR="$(tc-getAR)" \
42
	emake AR="$(tc-getAR)" \
Lines 47-52 src_install() { Link Here
47
	einstalldocs
54
	einstalldocs
48
55
49
	# remove some files that don't make sense for Gentoo installs
56
	# remove some files that don't make sense for Gentoo installs
50
	rm -rf "${ED%/}/etc/" "${ED%/}/var/" \
57
	rm -rf "${ED}/etc" "${ED}/var" "${ED}/usr/share/doc/${PF}/COPYING" || die
51
		"${ED%/}/usr/share/doc/${PF}/COPYING" || die
52
}
58
}
53
- 

Return to bug 775503