exit immediately if attempting to run the test suite as root
[debian/tar] / debian / rules
index 54246aecdd2afdbe506079dd2f76cae1a49d8951..7344973281f6e6c253d3ec1e61d0d91c6376021d 100755 (executable)
@@ -11,8 +11,11 @@ configure-stamp:
        dh_testdir
        cp -f /usr/share/misc/config.sub build-aux/config.sub
        cp -f /usr/share/misc/config.guess build-aux/config.guess
-       RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall" \
-               ./configure --prefix=/usr --libexecdir=/usr/sbin $(CONFARGS)
+       RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall" ./configure \
+               --prefix=/usr \
+               --libexecdir=/usr/sbin \
+               --with-lzma=xz \
+               $(CONFARGS) 
        touch configure-stamp
 
 build: build-stamp
@@ -22,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