net-misc/bird: musl tests patch

This commit is contained in:
Alarig Le Lay 2023-03-06 20:12:10 +01:00
parent 8708579611
commit c9d10d66d7
Signed by: alarig
GPG key ID: 7AFE62C6DF8BCDEC
8 changed files with 112 additions and 0 deletions

View file

@ -0,0 +1,12 @@
DEFINED_PHASES=compile configure install prepare
DEPEND=sys-devel/flex sys-devel/bison sys-devel/m4
DESCRIPTION=A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 or IPv6
EAPI=7
HOMEPAGE=http://bird.network.cz
IUSE=+client debug ipv6
KEYWORDS=~amd64 ~arm64 ~x86 ~x64-macos
LICENSE=GPL-2
RDEPEND=client? ( sys-libs/ncurses ) client? ( sys-libs/readline )
SLOT=0
SRC_URI=ftp://bird.network.cz/pub/bird/bird-1.6.8.tar.gz
_md5_=2084d5ce45fa0da72a03449cdf2085c5

View file

@ -0,0 +1,15 @@
BDEPEND=sys-devel/bison sys-devel/flex sys-devel/m4 sys-devel/gnuconfig >=app-portage/elt-patches-20170815 || ( >=sys-devel/automake-1.16.5:1.16 ) >=sys-devel/autoconf-2.71-r5 >=sys-devel/libtool-2.4.7
DEFINED_PHASES=configure install postinst prepare
DESCRIPTION=A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 & IPv6
EAPI=8
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:= ) client? ( 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.10.tar.gz
_eclasses_=gnuconfig b6b3e92f8b8c996400074b5f61a59256 toolchain-funcs 6001248ef162a5fa2a21ce132a212f6b multilib 5ca4e49abed8e3a2f7b56920eadee157 libtool 241a8f577b9781a42a7421e53448a44e autotools 6dcd6b6a486e79928e1243ff9ba41fcc fcaps da0130200e07aaecee121b85f4b9ea17
_md5_=cb84286c1ceb9b93c646a6ac13d0eb1d

View file

@ -0,0 +1,15 @@
BDEPEND=sys-devel/bison sys-devel/flex sys-devel/m4 sys-devel/gnuconfig >=app-portage/elt-patches-20170815 || ( >=sys-devel/automake-1.16.5:1.16 ) >=sys-devel/autoconf-2.71-r5 >=sys-devel/libtool-2.4.7
DEFINED_PHASES=configure install postinst prepare
DESCRIPTION=A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 & IPv6
EAPI=8
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:= ) client? ( 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.11.tar.gz
_eclasses_=gnuconfig b6b3e92f8b8c996400074b5f61a59256 toolchain-funcs 6001248ef162a5fa2a21ce132a212f6b multilib 5ca4e49abed8e3a2f7b56920eadee157 libtool 241a8f577b9781a42a7421e53448a44e autotools 6dcd6b6a486e79928e1243ff9ba41fcc fcaps da0130200e07aaecee121b85f4b9ea17
_md5_=cb84286c1ceb9b93c646a6ac13d0eb1d

View file

@ -0,0 +1,15 @@
BDEPEND=sys-devel/bison sys-devel/flex sys-devel/m4 sys-devel/gnuconfig >=app-portage/elt-patches-20170815 || ( >=sys-devel/automake-1.16.5:1.16 ) >=sys-devel/autoconf-2.71-r5 >=sys-devel/libtool-2.4.7
DEFINED_PHASES=configure install postinst prepare
DESCRIPTION=A routing daemon implementing OSPF, RIPv2 & BGP for IPv4 & IPv6
EAPI=8
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:= ) client? ( 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.9.tar.gz
_eclasses_=gnuconfig b6b3e92f8b8c996400074b5f61a59256 toolchain-funcs 6001248ef162a5fa2a21ce132a212f6b multilib 5ca4e49abed8e3a2f7b56920eadee157 libtool 241a8f577b9781a42a7421e53448a44e autotools 6dcd6b6a486e79928e1243ff9ba41fcc fcaps da0130200e07aaecee121b85f4b9ea17
_md5_=5c74c8f5171ff8ed667326eba39f1965

View file

@ -34,7 +34,12 @@ FILECAPS=(
CAP_NET_RAW usr/sbin/bird
)
PATCHES=()
src_prepare() {
if use elibc_musl; then
PATCHES += "${FILESDIR}/${PN}-2.0.9-musl-tests.patch"
fi
default
eautoreconf

View file

@ -34,7 +34,12 @@ FILECAPS=(
CAP_NET_RAW usr/sbin/bird
)
PATCHES=()
src_prepare() {
if use elibc_musl; then
PATCHES += "${FILESDIR}/${PN}-2.0.9-musl-tests.patch"
fi
default
eautoreconf

View file

@ -34,7 +34,12 @@ FILECAPS=(
CAP_NET_RAW usr/sbin/bird
)
PATCHES=()
src_prepare() {
if use elibc_musl; then
PATCHES += "${FILESDIR}/${P}-musl-tests.patch"
fi
default
eautoreconf

View file

@ -0,0 +1,40 @@
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