[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Arch Linux: use sudo to cleanup after the build

Holger Levsen holger at layer-acht.org
Fri Dec 15 18:54:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 555e5b70c0d8d7915b4f13c6c9edda09447f7020
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Dec 15 18:53:39 2017 +0000

    reproducible Arch Linux: use sudo to cleanup after the build
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_build_archlinux_pkg.sh               | 4 ++--
 hosts/jenkins/etc/sudoers.d/jenkins                   | 1 +
 hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins | 1 +
 hosts/profitbricks-build4-amd64/etc/sudoers.d/jenkins | 1 +
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index abce91f..7352e81 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -21,7 +21,7 @@ cleanup_all() {
 	fi
 	# delete makepkg build dir
 	if [ ! -z $SRCPACKAGE ] && [ -d /tmp/$SRCPACKAGE-$(basename $TMPDIR) ] ; then
-		rm -r /tmp/$SRCPACKAGE-$(basename $TMPDIR)
+		sudo rm -rf --one-file-system /tmp/$SRCPACKAGE-$(basename $TMPDIR)
 	fi
 	# delete main work dir (only on master)
 	if [ "$MODE" = "master" ] ; then
@@ -356,7 +356,7 @@ elif [ "$1" = "1" ] || [ "$1" = "2" ] ; then
 		ls -Rl
 	fi
 
-	rm -r /tmp/$SRCPACKAGE-$(basename $TMPDIR)/
+	sudo rm -rf --one-file-system /tmp/$SRCPACKAGE-$(basename $TMPDIR)
 	echo "$(date -u) - build #$MODE for $SRCPACKAGE on $HOSTNAME done."
 	exit 0
 fi
diff --git a/hosts/jenkins/etc/sudoers.d/jenkins b/hosts/jenkins/etc/sudoers.d/jenkins
index a6dcf2d..cbaf43a 100644
--- a/hosts/jenkins/etc/sudoers.d/jenkins
+++ b/hosts/jenkins/etc/sudoers.d/jenkins
@@ -13,6 +13,7 @@ jenkins ALL=  \
 	/bin/rm -rf --one-file-system /schroots/*, \
 	/bin/rm -rf --one-file-system /srv/live-build/*, \
 	/bin/rm -rf --one-file-system /srv/workspace/pbuilder/*, \
+	/bin/rm -rf --one-file-system /tmp/*, \
 	/bin/cp -v *.iso /srv/live-build/results/*, \
 	/bin/mv /chroots/* /schroots/*, \
 	/bin/mv /schroots/* /schroots/*, \
diff --git a/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins b/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins
index c222665..3570efc 100644
--- a/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins
+++ b/hosts/profitbricks-build3-amd64/etc/sudoers.d/jenkins
@@ -8,6 +8,7 @@ jenkins ALL=  \
 	/usr/sbin/chroot /schroots/*, \
 	/bin/rm -rf --one-file-system /schroots/*, \
 	/bin/rm -rf --one-file-system /srv/live-build/*, \
+	/bin/rm -rf --one-file-system /tmp/*, \
 	/bin/mv /schroots/* /schroots/*, \
 	/bin/umount -l /schroots/*, \
 	/bin/mount --bind *, \
diff --git a/hosts/profitbricks-build4-amd64/etc/sudoers.d/jenkins b/hosts/profitbricks-build4-amd64/etc/sudoers.d/jenkins
index c222665..3570efc 100644
--- a/hosts/profitbricks-build4-amd64/etc/sudoers.d/jenkins
+++ b/hosts/profitbricks-build4-amd64/etc/sudoers.d/jenkins
@@ -8,6 +8,7 @@ jenkins ALL=  \
 	/usr/sbin/chroot /schroots/*, \
 	/bin/rm -rf --one-file-system /schroots/*, \
 	/bin/rm -rf --one-file-system /srv/live-build/*, \
+	/bin/rm -rf --one-file-system /tmp/*, \
 	/bin/mv /schroots/* /schroots/*, \
 	/bin/umount -l /schroots/*, \
 	/bin/mount --bind *, \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list