commit:     fc83ede26c54c93ff0cab79f3973814b6820db3c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  4 00:48:11 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul  4 00:48:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc83ede2

sys-apps/coreutils: skip test-readutmp

It reads the host entries.

Closes: https://bugs.gentoo.org/935367
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/coreutils/coreutils-9.5.ebuild                     |  5 ++++-
 .../coreutils/files/coreutils-9.5-skip-readutmp-test.patch  | 13 +++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/sys-apps/coreutils/coreutils-9.5.ebuild 
b/sys-apps/coreutils/coreutils-9.5.ebuild
index 16a041e4cbde..4d92094067f1 100644
--- a/sys-apps/coreutils/coreutils-9.5.ebuild
+++ b/sys-apps/coreutils/coreutils-9.5.ebuild
@@ -121,7 +121,10 @@ src_prepare() {
        )
 
        if ! use vanilla && [[ -d "${WORKDIR}"/${MY_PATCH} ]] ; then
-               PATCHES+=( "${WORKDIR}"/${MY_PATCH} )
+               PATCHES+=(
+                       "${WORKDIR}"/${MY_PATCH}
+                       "${FILESDIR}"/${PN}-9.5-skip-readutmp-test.patch
+               )
        fi
 
        default

diff --git a/sys-apps/coreutils/files/coreutils-9.5-skip-readutmp-test.patch 
b/sys-apps/coreutils/files/coreutils-9.5-skip-readutmp-test.patch
new file mode 100644
index 000000000000..3e7c9cf420c0
--- /dev/null
+++ b/sys-apps/coreutils/files/coreutils-9.5-skip-readutmp-test.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/935367
+--- a/gnulib-tests/test-readutmp.c
++++ b/gnulib-tests/test-readutmp.c
+@@ -43,6 +43,9 @@ main (int argc, char *argv[])
+   STRUCT_UTMP *entries;
+   idx_t num_entries;
+ 
++  fprintf (stderr, "Skipping test: Gentoo: examines host entries, so 
unreliable in ebuild\n");
++  return 77;
++
+   if (read_utmp (UTMP_FILE, &num_entries, &entries, 0) < 0)
+     {
+       #if READ_UTMP_SUPPORTED

Reply via email to