access tests: fix test failure when run as root

2019-10-06 Thread Bruno Haible
One of the gnulib tests, test-access, fails when running as root.
This patch fixes it.


2019-10-06  Bruno Haible  

access tests: Fix test failure when run as root.
* tests/test-access.c: Include root-uid.h.
(geteuid): Define fallback.
(main): Don't expect that writing to a read-only file would fail when
running as root. Also, remove the created files at the end.
* modules/access-tests (Depends-on): Add root-uid.
(configure.ac): Test whether geteuid exists.

diff --git a/modules/access-tests b/modules/access-tests
index 082aeb5..4b35c21 100644
--- a/modules/access-tests
+++ b/modules/access-tests
@@ -5,8 +5,10 @@ tests/macros.h
 
 Depends-on:
 creat
+root-uid
 
 configure.ac:
+AC_CHECK_FUNCS_ONCE([geteuid])
 
 Makefile.am:
 TESTS += test-access
diff --git a/tests/test-access.c b/tests/test-access.c
index 7af7f9a..1488d55 100644
--- a/tests/test-access.c
+++ b/tests/test-access.c
@@ -24,8 +24,14 @@ SIGNATURE_CHECK (access, int, (const char *, int));
 #include 
 #include 
 #include 
+#include "root-uid.h"
 #include "macros.h"
 
+/* mingw and MSVC 9 lack geteuid, so setup a dummy value.  */
+#if !HAVE_GETEUID
+# define geteuid() ROOT_UID
+#endif
+
 #define BASE "test-access.t"
 
 int
@@ -62,9 +68,12 @@ main ()
 
 ASSERT (access (BASE "f2", R_OK) == 0);
 
-errno = 0;
-ASSERT (access (BASE "f2", W_OK) == -1);
-ASSERT (errno == EACCES);
+if (geteuid () != ROOT_UID)
+  {
+errno = 0;
+ASSERT (access (BASE "f2", W_OK) == -1);
+ASSERT (errno == EACCES);
+  }
 
 #if defined _WIN32 && !defined __CYGWIN__
 /* X_OK works like R_OK.  */
@@ -76,5 +85,9 @@ main ()
 #endif
   }
 
+  /* Cleanup.  */
+  unlink (BASE "f1");
+  unlink (BASE "f2");
+
   return 0;
 }




Re: [PATCH] users.txt: Fix URL for libidn2

2019-10-06 Thread Bruno Haible
Thanks, applied.




[PATCH] users.txt: Fix URL for libidn2

2019-10-06 Thread Tim Rühsen
From 3bde5ad266986687ad38a8742244099970ed7cc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim=20R=C3=BChsen?= 
Date: Sun, 6 Oct 2019 16:52:23 +0200
Subject: [PATCH] users.txt: Fix URL for libidn2

---
 users.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/users.txt b/users.txt
index 84863c449..004875bad 100644
--- a/users.txt
+++ b/users.txt
@@ -50,7 +50,7 @@ The following packages appear to be using gnulib and gnulib-tool:
   libguestfs  https://github.com/libguestfs/libguestfs
   libiconvhttps://git.sv.gnu.org/gitweb/?p=libiconv.git
   libidn  https://git.sv.gnu.org/gitweb/?p=libidn.git
-  libidn2 https://josefsson.org/libidn2/
+  libidn2 https://gitlab.com/libidn/libidn2
   libksba https://www.gnupg.org/related_software/libksba/index.html
   libntlm https://git.savannah.nongnu.org/gitweb/?p=libntlm.git;a=tree
   libprelude  https://trac.prelude-ids.org/browser/trunk/libprelude/
-- 
2.23.0



signature.asc
Description: OpenPGP digital signature


Re: wget -q in bootstrap is too silent

2019-10-06 Thread Tim Rühsen
Thank you, Paul !

On 06.10.19 06:38, Paul Eggert wrote:
> On 10/4/19 8:34 AM, Tim Rühsen wrote:
>> Instead of -q we could use -nv to avoid disguising the real error.
>> But there will be some diagnostic noice...
> 
> At this point the bootstrap script is so noisy that a bit more won't
> hurt, especially if it's in a good cause. Thanks for reporting the
> problem; I installed the attached.



signature.asc
Description: OpenPGP digital signature


Re: [PATCH] users.txt: add GNU nano

2019-10-06 Thread Bruno Haible
Benno Schulenberg wrote:
> +2019-10-06  Benno Schulenberg(tiny change)
> +
> + users.txt: add GNU nano
> + Nano has been making use of gnulib since March 2017, version 2.8.0.
> +

Thanks. Applied.

Bruno