From 41869b9c269393778bd072c04d369091f41c10d0 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Tue, 16 Aug 2011 16:47:55 -0700 Subject: [PATCH] exit immediately if attempting to run the test suite as root --- debian/changelog | 7 +++++++ debian/copyright | 4 ++++ debian/rules | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/debian/changelog b/debian/changelog index 25edf3b6..1baf11bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 diff --git a/debian/copyright b/debian/copyright index ecf69f1e..cc3b20b5 100644 --- a/debian/copyright +++ b/debian/copyright @@ -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, diff --git a/debian/rules b/debian/rules index 3d6913c6..73449732 100755 --- a/debian/rules +++ b/debian/rules @@ -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 -- 2.30.2