bug-coreutils
[Top][All Lists]
Advanced

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

build: distcheck: do not leave a $TMPDIR/coreutils directory behind


From: Jim Meyering
Subject: build: distcheck: do not leave a $TMPDIR/coreutils directory behind
Date: Mon, 07 Dec 2009 18:58:03 +0100

FYI, I should be pushing these soon, and then making a snapshot
within a couple hours:

>From ae034822c535fa5168069a75fb5e1c58f93a7834 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 5 Dec 2009 22:16:32 +0100
Subject: [PATCH 1/2] build: distcheck: do not leave a $TMPDIR/coreutils 
directory behind

* dist-check.mk (tmpdir): Rename from TMPDIR.  Use ./tests/torture
unconditionally, rather than $TMPDIR-with-default-to-/tmp.
Otherwise, running "make distcheck" could leave an empty /tmp/coreutils
directory behind.
(tp): Simplify, now that it's always in the build-dir.
(taint-distcheck): Set HOME earlier, in case $(MAKE) misbehaves.
(my-instcheck, coreutils-path-check): Add diagnostics, so it's easier
to diagnose when each runs.
(coreutils-path-check): Run configure with --quiet, to reduce output.
Inspired by Ralf Wildenhues' report of /tmp/coreutils being left behind.
---
 dist-check.mk |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/dist-check.mk b/dist-check.mk
index 3a61572..0299f51 100644
--- a/dist-check.mk
+++ b/dist-check.mk
@@ -4,14 +4,15 @@ bin=bin-$$$$

 write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)'

-TMPDIR ?= /tmp
-t=$(TMPDIR)/$(PACKAGE)/test
+tmpdir = $(abs_top_builddir)/tests/torture
+
+t=$(tmpdir)/$(PACKAGE)/test
 pfx=$(t)/i

 # More than once, tainted build and source directory names would
 # have caused at least one "make check" test to apply "chmod 700"
 # to all directories under $HOME.  Make sure it doesn't happen again.
-tp := $(shell echo "$(TMPDIR)/$(PACKAGE)-$$$$")
+tp = $(tmpdir)/taint
 t_prefix = $(tp)/a
 t_taint = '$(t_prefix) b'
 fake_home = $(tp)/home
@@ -30,10 +31,11 @@ taint-distcheck: $(DIST_ARCHIVES)
        touch $(fake_home)/f
        mkdir -p $(fake_home)/d/e
        ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-before
+       HOME=$(fake_home); export HOME;                 \
        cd $(t_taint)/$(distdir)                        \
          && ./configure                                \
          && $(MAKE)                                    \
-         && HOME=$(fake_home) $(MAKE) check            \
+         && $(MAKE) check                              \
          && ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-after \
          && diff $(tp)/.ls-before $(tp)/.ls-after      \
          && test -d $(t_prefix)
@@ -52,6 +54,7 @@ endef
 # Install, then verify that all binaries and man pages are in place.
 # Note that neither the binary, ginstall, nor the ].1 man page is installed.
 define my-instcheck
+  echo running my-instcheck;                           \
   $(MAKE) prefix=$(pfx) install                                \
     && test ! -f $(pfx)/bin/ginstall                   \
     && { fail=0;                                       \
@@ -70,6 +73,7 @@ endef

 define coreutils-path-check
   {                                                    \
+    echo running coreutils-path-check;                 \
     if test -f $(srcdir)/src/true.c; then              \
       fail=1;                                          \
       mkdir $(bin)                                     \
@@ -117,7 +121,7 @@ my-distcheck: $(DIST_ARCHIVES) $(local-check)
        mkdir -p $(t)
        GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
        cd $(t)/$(distdir)                              \
-         && ./configure --enable-gcc-warnings --disable-nls \
+         && ./configure --quiet --enable-gcc-warnings --disable-nls \
          && $(MAKE) AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
          && $(MAKE) dvi                                \
          && $(install-transform-check)                 \
@@ -128,6 +132,7 @@ my-distcheck: $(DIST_ARCHIVES) $(local-check)
          && $(AMTAR) -zxf - ) < $(distdir).tar.gz
        diff -ur $(t)/$(distdir).old $(t)/$(distdir)
        -rm -rf $(t)
+       rmdir $(tmpdir)/$(PACKAGE) $(tmpdir)
        @echo "========================"; \
        echo "$(distdir).tar.gz is ready for distribution"; \
        echo "========================"
--
1.6.6.rc1.297.g8f041


>From 7a2b0b8f660a618aaf15667bf111e7ee177914c9 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 7 Dec 2009 18:56:07 +0100
Subject: [PATCH 2/2] build: update gnulib submodule to latest

---
 gnulib |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gnulib b/gnulib
index 3e035a5..73da5fb 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 3e035a5d686888e5eba0b622dac459b65cdd99d3
+Subproject commit 73da5fb7e129f1fa540e040582cda710b8c2cce4
--
1.6.6.rc1.297.g8f041




reply via email to

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