]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
dist: more forcefully deal with mode 0 directories created by tests. v1.16i
authorkarl <karl@mist.freefriends.org.(none)>
Sun, 17 Dec 2023 16:42:35 +0000 (08:42 -0800)
committerKarl Berry <karl@freefriends.org>
Sun, 17 Dec 2023 16:42:35 +0000 (08:42 -0800)
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
t/local.mk
t/uninstall-fail.sh

index 264713c332e611b9e71df96ee4be422b3b22ef0b..301239de1e38e130da6c173960df3390a574e185 100644 (file)
@@ -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 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"
index 4fa46a071db5be96a7143f1d13c884bc407277d5..51386fd002be6874a1cae36a6806a81bb2ce56c6 100644 (file)
@@ -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
index a1a365d909971777ff1a8d7fb909fbe0204be7ab..60e131fc33c903b0f4b52a5a6d3bdbbdf3a9942b 100644 (file)
@@ -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
+
 :