From 26e98ee46c47a1304a9e39010b32b7a846191ed9 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 2 Oct 2022 20:00:00 +0200 Subject: net-ftp/atftp: update EAPI 7 -> 8, drop BDEPEND, add fix for test.sh Signed-off-by: Florian Schmaus --- net-ftp/atftp/atftp-0.8.0.ebuild | 7 ++++--- .../files/atftp-0.8.0-test-sh-declare-local.patch | 18 ++++++++++++++++++ net-ftp/atftp/files/atftp-fix-test.patch | 12 +++++++++--- 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 net-ftp/atftp/files/atftp-0.8.0-test-sh-declare-local.patch (limited to 'net-ftp') diff --git a/net-ftp/atftp/atftp-0.8.0.ebuild b/net-ftp/atftp/atftp-0.8.0.ebuild index 7f0f4082403c..aab4115beae9 100644 --- a/net-ftp/atftp/atftp-0.8.0.ebuild +++ b/net-ftp/atftp/atftp-0.8.0.ebuild @@ -1,7 +1,8 @@ # Copyright 2021-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 + inherit autotools flag-o-matic systemd DESCRIPTION="Advanced TFTP implementation client/server" @@ -20,11 +21,11 @@ RDEPEND="${DEPEND} !net-ftp/tftp-hpa !net-ftp/uftpd selinux? ( sec-policy/selinux-tftp )" -BDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/${PN}-0.7.5-CFLAGS.patch" - "${FILESDIR}/atftp-fix-test.patch" + "${FILESDIR}/${PN}-0.8.0-test-sh-declare-local.patch" # https://sourceforge.net/p/atftp/bugs/12/ + "${FILESDIR}/${PN}-fix-test.patch" # https://sourceforge.net/p/atftp/bugs/11/ ) src_prepare() { diff --git a/net-ftp/atftp/files/atftp-0.8.0-test-sh-declare-local.patch b/net-ftp/atftp/files/atftp-0.8.0-test-sh-declare-local.patch new file mode 100644 index 000000000000..de63fc03a626 --- /dev/null +++ b/net-ftp/atftp/files/atftp-0.8.0-test-sh-declare-local.patch @@ -0,0 +1,18 @@ +From a718243fe78fe9002b4145a158e02801e907399b Mon Sep 17 00:00:00 2001 +From: Florian Schmaus +Date: Sun, 2 Oct 2022 19:47:47 +0200 +Subject: [PATCH 1/2] Declare variable D as local in stop_and_clean + +This also fixes tests in Gentoo, where src_test() has already declare +a variable D, containing the path of the temporary install +directory (aka. DESTDIR). +--- a/test/test.sh ++++ b/test/test.sh +@@ -576,6 +576,7 @@ stop_and_clean(){ + ## +3 is for "Test tsize option ..." and "Test PCRE mapped download ... " + ## +2 for diskspace tests: + local M=$(grep "/tmp/" "$TDIR"/multicast*.log | wc -l) ++ local D + $INTERACTIVE && D=2 + cat < +Date: Sun, 2 Oct 2022 19:49:44 +0200 +Subject: [PATCH 2/2] test.sh: redirect stderr to /dev/null when counting lines + +To avoid counting stderr lines, redirect the output to /dev/null. --- a/test/test.sh +++ b/test/test.sh -@@ -575,7 +575,7 @@ +@@ -575,7 +575,7 @@ stop_and_clean(){ echo ## +3 is for "Test tsize option ..." and "Test PCRE mapped download ... " ## +2 for diskspace tests: - local M=$(grep "/tmp/" "$TDIR"/multicast*.log | wc -l) -+ local M=$(grep "/tmp/" "$TDIR"/multicast*.log 2>/dev/null | wc -l) ++ local M=$(grep "/tmp/" "$TDIR"/multicast*.log 2> /dev/null | wc -l) + local D $INTERACTIVE && D=2 cat <