exit immediately if attempting to run the test suite as root
authorBdale Garbee <bdale@gag.com>
Tue, 16 Aug 2011 23:47:55 +0000 (16:47 -0700)
committerBdale Garbee <bdale@gag.com>
Tue, 16 Aug 2011 23:47:55 +0000 (16:47 -0700)
debian/changelog
debian/copyright
debian/rules

index 25edf3b6303b7f82a5f02d0508c32a6cfdcec814..1baf11bbc1464c42576c1978851660ff7ae59392 100644 (file)
@@ -1,3 +1,10 @@
+tar (1.25-4) UNRELEASED; urgency=low
+
+  * add a check to the rules file to ensure test suite is no attempted while
+    building as root, closes: #596268
+
+ -- Bdale Garbee <bdale@gag.com>  Tue, 16 Aug 2011 16:46:49 -0700
+
 tar (1.25-3) unstable; urgency=low
 
   * cherry-pick some upstream commits that appear to address open bugs
index ecf69f1e483b9b35ea31c716735b431733902b70..cc3b20b5fbf9bd87dc6554cc8e43c3faf8b75cf8 100644 (file)
@@ -8,6 +8,10 @@ was built from the sources found at:
 
        ftp://ftp.gnu.org/gnu/tar/
 
+More recently, I'm directly using the upstream source repository at 
+
+       http://git.savannah.gnu.org/cgit/tar.git
+
 GNU tar is 
 
    Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
index 3d6913c625fa3bedbbf5594d54d497de1341374a..7344973281f6e6c253d3ec1e61d0d91c6376021d 100755 (executable)
@@ -25,6 +25,12 @@ build-stamp: configure-stamp
 
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+       @runas=`whoami` ; \
+       if test $$runas = "root" ; \
+       then \
+         echo "Sorry, but the test suite is not designed to be run as root."; \
+         exit 1 ;\
+       fi
        (cd tests ; $(MAKE) clean)
        $(MAKE) check
 endif