Skip to content

Commit 0a89aff

Browse files
author
Brahmajit Das
committed
app-crypt/signify: Fix call to undeclared function b64_pton
Upstream PR: aperezdc/signify#43 Closes: https://bugs.gentoo.org/894354 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
1 parent d662313 commit 0a89aff

2 files changed

Lines changed: 89 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Upstream PR: https://github.com/aperezdc/signify/pull/43
2+
From: Brahmajit Das <brahmajit.xyz@gmail.com>
3+
Date: Sat, 29 Jul 2023 20:07:48 +0000
4+
Subject: [PATCH] Fix build with clang 16
5+
6+
Bug: https://bugs.gentoo.org/894354
7+
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
8+
--- a/base64.c
9+
+++ b/base64.c
10+
@@ -52,6 +52,7 @@
11+
12+
#include <stdlib.h>
13+
#include <string.h>
14+
+#include "base64.h"
15+
16+
static const char Base64[] =
17+
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
18+
--- /dev/null
19+
+++ b/base64.h
20+
@@ -0,0 +1,2 @@
21+
+int b64_pton(char const *, unsigned char *, size_t);
22+
+int b64_ntop(unsigned char const *, size_t , char *, size_t);
23+
--- a/signify.c
24+
+++ b/signify.c
25+
@@ -34,6 +34,7 @@
26+
#include "sha2.h"
27+
28+
#include "crypto_api.h"
29+
+#include "base64.h"
30+
#include "signify.h"
31+
32+
#define SIGBYTES crypto_sign_ed25519_BYTES
33+
--
34+
2.41.0
35+
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 1999-2023 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=8
5+
6+
VERIFY_SIG_METHOD="signify"
7+
inherit toolchain-funcs verify-sig
8+
9+
DESCRIPTION="Cryptographically sign and verify files"
10+
HOMEPAGE="
11+
https://www.openbsd.org/
12+
https://github.com/aperezdc/signify/
13+
"
14+
SRC_URI="
15+
https://github.com/aperezdc/${PN}/releases/download/v${PV}/${P}.tar.xz
16+
verify-sig? (
17+
https://github.com/aperezdc/${PN}/releases/download/v${PV}/SHA256.sig
18+
-> ${P}.sha.sig
19+
)"
20+
21+
LICENSE="BSD-1"
22+
SLOT="0"
23+
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
24+
25+
RDEPEND="!net-mail/signify
26+
>=dev-libs/libbsd-0.7"
27+
DEPEND="${RDEPEND}"
28+
BDEPEND="verify-sig? ( sec-keys/signify-keys-signify )"
29+
30+
PATCHES=(
31+
"${FILESDIR}"/${PN}-30-man_compress.patch
32+
"${FILESDIR}"/${PN}-31-fix-build-clang-16.patch
33+
)
34+
35+
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/signify-keys/${PN}-30.pub"
36+
37+
src_unpack() {
38+
if use verify-sig; then
39+
# Too many levels of symbolic links
40+
cp "${DISTDIR}"/${P}.{sha.sig,tar.xz} "${WORKDIR}" || die
41+
verify-sig_verify_signed_checksums \
42+
${P}.sha.sig sha256 ${P}.tar.xz
43+
fi
44+
default
45+
}
46+
47+
src_configure() {
48+
tc-export CC
49+
}
50+
51+
src_install() {
52+
emake DESTDIR="${ED}" PREFIX="/usr" install
53+
einstalldocs
54+
}

0 commit comments

Comments
 (0)