automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[automake-commit] branch master updated: dist: more forcefully deal with


From: Karl Berry
Subject: [automake-commit] branch master updated: dist: more forcefully deal with mode 0 directories created by tests.
Date: Sun, 17 Dec 2023 11:42:45 -0500

This is an automated email from the git hooks/post-receive script.

karl pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=31a4eb47a80942f88f5342edccb1ca7e7cc34881

The following commit(s) were added to refs/heads/master by this push:
     new 31a4eb47a dist: more forcefully deal with mode 0 directories created 
by tests.
31a4eb47a is described below

commit 31a4eb47a80942f88f5342edccb1ca7e7cc34881
Author: karl <karl@mist.freefriends.org.(none)>
AuthorDate: Sun Dec 17 08:42:35 2023 -0800

    dist: more forcefully deal with mode 0 directories created by tests.
    
    From https://bugs.gnu.org/67868.
    
    * lib/am/distdir.am (am__remove_distdir): make directories
    readable and searchable, not just writable. (Also typo.)
    * t/local.mk (clean-local-check): ensure directories are
    at least mode 700
    * t/uninstall-fail.sh: restore reasonable permissions of
    the mode 0 $inst/share directory at the end.
---
 lib/am/distdir.am   | 4 ++--
 t/local.mk          | 1 +
 t/uninstall-fail.sh | 3 +++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 264713c33..301239de1 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -23,7 +23,7 @@ top_distdir = $(distdir)
 
 am__remove_distdir = \
   if test -d "$(distdir)"; then \
-    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+    find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \
       && rm -rf "$(distdir)" \
 ## On MSYS (1.0.17) it is not possible to remove a directory that is in
 ## use; so, if the first rm fails, we sleep some seconds and retry, to
@@ -213,7 +213,7 @@ endif %?TOPDIR_P%
          fi; \
        done
 ##
-## Test for directory existence here because previous automake
+## Test for directory existence here because a previous automake
 ## invocation might have created some directories.  Note that we
 ## explicitly set distdir for the subdir make; that lets us mix-n-match
 ## many automake-using packages into one large package, and have "dist"
diff --git a/t/local.mk b/t/local.mk
index 4fa46a071..51386fd00 100644
--- a/t/local.mk
+++ b/t/local.mk
@@ -278,6 +278,7 @@ EXTRA_DIST += $(perf_TESTS)
 clean-local: clean-local-check
 .PHONY: clean-local-check
 clean-local-check:
+       find . -type d ! -perm -700 -exec chmod u+rwx {} ';'
        $(AM_V_GEN)$(PERL) $(srcdir)/t/ax/deltree.pl t/*.dir t/*/*.dir */t/*.dir
 
 # vim: ft=automake noet
diff --git a/t/uninstall-fail.sh b/t/uninstall-fail.sh
index a1a365d90..60e131fc3 100644
--- a/t/uninstall-fail.sh
+++ b/t/uninstall-fail.sh
@@ -98,4 +98,7 @@ run_make -M -e FAIL uninstall
 
 $EGREP "(cd|sh)(\[[0-9]*[0-9]\])?: .*$inst/share" output
 
+# restore reasonable permissions so the rest of the world doesn't have to deal.
+chmod u+rwx $inst/share
+
 :



reply via email to

[Prev in Thread] Current Thread [Next in Thread]