[sysadmin-bin] refs/heads contains files that are owned by users != git, sudo needed



commit a24b219c7ddfa6d2f583517732a114ec3477ce98
Author: Andrea Veri <averi redhat com>
Date:   Tue Nov 21 13:52:27 2017 +0100

    refs/heads contains files that are owned by users != git, sudo needed

 git/gnome-pre-receive |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/git/gnome-pre-receive b/git/gnome-pre-receive
index cfbd6f2..c9d3655 100755
--- a/git/gnome-pre-receive
+++ b/git/gnome-pre-receive
@@ -66,23 +66,25 @@ fi
 if [[ $(hostname) =~ gitlab(\-test|)\.gnome\.org$ ]]; then 
   if [ $basedir = '/var/opt/gitlab/git-data/repositories/GNOME' ]; then
     cd $GIT_DIR
-    git config hooks.emailprefix
+    git config hooks.emailprefix 1>/dev/null
     if [ "$?" -eq 1 ]; then
       git config hooks.emailprefix ""
     fi
-    git config hooks.mailinglist
+    git config hooks.mailinglist 1>/dev/null
     if [ "$?" -eq 1 ]; then
       git config hooks.mailinglist commits-list gnome org
     fi
-    git config gnome.gitlabrepo
+    git config gnome.gitlabrepo 1>/dev/null
     if [ "$?" -eq 1 ]; then
       git config gnome.gitlabrepo true 
     fi
 
-    sudo setfacl -d -R -m g:gnomecvs:rwx $GIT_DIR/objects/
-    sudo setfacl -R -m g:gnomecvs:rwx $GIT_DIR/objects/
-    setfacl -d -R -m g:gnomecvs:rwx $GIT_DIR/
-    setfacl -R -m g:gnomecvs:rwx $GIT_DIR/
+    sudo setfacl -d -R -m g:gnomecvs:rwx $GIT_DIR/objects
+    sudo setfacl -R -m g:gnomecvs:rwx $GIT_DIR/objects
+    sudo setfacl -d -R -m g:gnomecvs:rwx $GIT_DIR/refs/heads
+    sudo setfacl -R -m g:gnomecvs:rwx $GIT_DIR/refs/heads
+    setfacl -d -R -m g:gnomecvs:rwx $GIT_DIR
+    setfacl -R -m g:gnomecvs:rwx $GIT_DIR
   fi
 elif [ $(hostname) == 'git.gnome.org' ]; then
   cd $GIT_DIR  


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]