net-misc/bird: 2.0.12 updating musl patch for test

This commit is contained in:
Alarig Le Lay 2023-03-07 13:48:29 +01:00
parent c8a6a65fa6
commit d4b113d3b8
Signed by: alarig
GPG Key ID: 7AFE62C6DF8BCDEC
3 changed files with 46 additions and 2 deletions

View File

@ -6,9 +6,10 @@ HOMEPAGE=https://bird.network.cz
IDEPEND=filecaps? ( sys-libs/libcap )
INHERIT=autotools fcaps
IUSE=+client debug libssh +filecaps
KEYWORDS=amd64 ~arm64 ~x86 ~x64-macos
LICENSE=GPL-2
RDEPEND=client? ( sys-libs/ncurses:= sys-libs/readline:= ) filecaps? ( acct-group/bird acct-user/bird ) libssh? ( net-libs/libssh:= )
SLOT=0
SRC_URI=ftp://bird.network.cz/pub/bird/bird-2.0.12.tar.gz
_eclasses_=gnuconfig b6b3e92f8b8c996400074b5f61a59256 toolchain-funcs 6001248ef162a5fa2a21ce132a212f6b multilib 5ca4e49abed8e3a2f7b56920eadee157 libtool 241a8f577b9781a42a7421e53448a44e autotools 6dcd6b6a486e79928e1243ff9ba41fcc fcaps da0130200e07aaecee121b85f4b9ea17
_md5_=c2b0f07c72a6ce8c603a6e1a499e7c8e
_md5_=b544916e3a7742cbc19b5e880c77cb02

View File

@ -37,7 +37,7 @@ FILECAPS=(
)
PATCHES=(
"${FILESDIR}/${PN}-2.0.9-musl-tests.patch"
"${FILESDIR}/${P}-musl-tests.patch"
)
src_prepare() {

View File

@ -0,0 +1,43 @@
https://bird.network.cz/pipermail/bird-users/2023-March/016743.html
https://gitlab.nic.cz/labs/bird/-/commit/0f679438f36d8c2a31dfe490007e983b085caef6
From 0f679438f36d8c2a31dfe490007e983b085caef6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
Date: Mon, 6 Mar 2023 11:19:30 +0100
Subject: [PATCH] Printf test suite fails on systems with musl libc because
tests for "%m" and "%M" formats expect "Input/output error" message but musl
returns "I/O error". Proposed change compares the printf output with string
returned from strerror function for EIO constant.
See-also: https://bugs.gentoo.org/836713
Minor change from committer.
---
lib/printf_test.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/printf_test.c b/lib/printf_test.c
index 47ea905d..88ecf05e 100644
--- a/lib/printf_test.c
+++ b/lib/printf_test.c
@@ -32,11 +32,14 @@ t_simple(void)
BSPRINTF(1, "@", buf, "@", 64);
BSPRINTF(1, "\xff", buf, "%c", 0xff);
- errno = 5;
- BSPRINTF(18, "Input/output error", buf, "%m");
+ const char *io_error_str = lp_strdup(tmp_linpool, strerror(EIO));
+ const int io_error_len = strlen(io_error_str);
+
+ errno = EIO;
+ BSPRINTF(io_error_len, io_error_str, buf, "%m");
errno = 0;
- BSPRINTF(18, "Input/output error", buf, "%M", 5);
+ BSPRINTF(io_error_len, io_error_str, buf, "%M", EIO);
BSPRINTF(11, "TeSt%StRiNg", buf, "%s", "TeSt%StRiNg");
--
GitLab