summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_maintenance.sh
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-08 22:36:21 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-09 17:31:52 +0200
commitef2d4975ae9b7572a777faea97fec4f5e5a63903 (patch)
treebdf833ae8acc4a877539ec1ca727ad52b92a6587 /bin/reproducible_maintenance.sh
parentdf16b9ac9be65f172cf2118a3e24d9dd4b86432c (diff)
downloadjenkins.debian.net-ef2d4975ae9b7572a777faea97fec4f5e5a63903.tar.xz
reproducible: maintenance: check for files with bad permissions (!=644) and chmod them. currently unknown the cause of these bad perms (only for very few files
Diffstat (limited to 'bin/reproducible_maintenance.sh')
-rwxr-xr-xbin/reproducible_maintenance.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index efdd9985..01c5f885 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -218,6 +218,17 @@ if [ ! -z "$ARTIFACTS" ] ; then
echo
fi
+# find + chmod files with bad permissions
+BADPERMS=$(find /var/lib/jenkins/userContent/{buildinfo,dbd,rbuild,artifacts,unstable,experimental,testing,rb-pkg} ! -perm 644 -type f)
+if [ ! -x "$BADPERMS" ] ; then
+ DIRTY=true
+ echo
+ echo "Warning: Found files with bad permissions (!=644):"
+ echo "Please fix permission manually"
+ echo "$BADPERMS" | xargs echo chmod -v 644
+ echo
+fi
+
if ! $DIRTY ; then
echo "Everything seems to be fine."
echo