From 9981ac3346ff9e87d20ce744f1703f4ee4ad2248 Mon Sep 17 00:00:00 2001 From: Nicolas Geniteau Date: Sat, 5 Oct 2013 15:58:46 +0200 Subject: [PATCH 1/3] Fix long tag name for testsuite --- hooks/subjects.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/subjects.pl b/hooks/subjects.pl index 32bb8ff..4bdfa99 100755 --- a/hooks/subjects.pl +++ b/hooks/subjects.pl @@ -602,7 +602,7 @@ sub tag_tests $rendu = $_[2]; } else { - $rendu = "*"; + $rendu = ""; } my $year; From b126a0400a063eb1a2894d1ba645136e97ffff20 Mon Sep 17 00:00:00 2001 From: Mercier Pierre-Olivier Date: Sat, 5 Oct 2013 22:00:54 +0200 Subject: [PATCH 2/3] Fix scripts for FreeBSD --- commands/first-install.sh | 5 +++++ process/view_log.sh | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/commands/first-install.sh b/commands/first-install.sh index 7de5fff..ca42951 100755 --- a/commands/first-install.sh +++ b/commands/first-install.sh @@ -23,6 +23,11 @@ then fi done + if ! getent passwd | grep "intradmin:" > /dev/null 2> /dev/null + then + pw useradd intradmin -u 942 -d /data -s /bin/false + fi + elif [ "$KERNEL" = "Linux" ] then diff --git a/process/view_log.sh b/process/view_log.sh index 8b75f6e..dbb9fe9 100755 --- a/process/view_log.sh +++ b/process/view_log.sh @@ -19,8 +19,6 @@ else CMD="tail -n 50" fi -TMP=`mktemp` - DIRS="./" if [ -d "/var/log/hooks/" ] then @@ -40,9 +38,14 @@ then else - LIST=`mktemp` + if [ `uname -s` = "FreeBSD" ] + then + LIST=`mktemp lerdorf_log_XXXXX` + else + LIST=`mktemp` + fi - find $DIRS -name '*.log' > $LIST + find $DIRS -name '*.log' > "$LIST" while [ $# -gt 0 ] do From ad9c91497c8e16bf2be2523e6e56da2c99f93223 Mon Sep 17 00:00:00 2001 From: Mercier Pierre-Olivier Date: Mon, 7 Oct 2013 16:42:02 +0200 Subject: [PATCH 3/3] Install gl-pre-git at the right place --- Makefile | 5 ++++- hooks/gl-pre-git | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4dc640e..1d62a40 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,9 @@ install: $(MAKEDIR) -p $(DEST) $(COPY) -r ACU/ $(DEST) ! test -d $(GITOLITE_DEST) || $(MAKEDIR) -p $(GITOLITE_DEST)/update.secondary.d - ! test -d $(GITOLITE_DEST) || $(COPY) hooks/* $(GITOLITE_DEST)/update.secondary.d/ + ! test -d $(GITOLITE_DEST) || $(COPY) hooks/gl-pre-git $(GITOLITE_DEST)/ + ! test -d $(GITOLITE_DEST) || $(COPY) hooks/subjects.pl $(GITOLITE_DEST)/update.secondary.d/ + ! test -d $(GITOLITE_DEST) || $(COPY) hooks/submissions.pl $(GITOLITE_DEST)/update.secondary.d/ update: $(GIT) pull @@ -26,6 +28,7 @@ upgrade: install unstall: $(RM) -r $(DEST)/ACU/ + ! test -d $(GITOLITE_DEST) || $(RM) -rf $(GITOLITE_DEST)/gl-pre-git ! test -d $(GITOLITE_DEST) || $(RM) -rf $(GITOLITE_DEST)/update.secondary.d ! test -d $(GITOLITE_DEST) || $(MAKEDIR) -p $(GITOLITE_DEST)/update.secondary.d diff --git a/hooks/gl-pre-git b/hooks/gl-pre-git index 62d352e..2a2b69f 100755 --- a/hooks/gl-pre-git +++ b/hooks/gl-pre-git @@ -11,6 +11,8 @@ $ACU::Log::log_file = "/var/log/hooks/" . basename($0) . ".log"; my $ip = $1 if ($ENV{'SSH_CLIENT'} =~ m/([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/); +exit 0 if (!$ip); + log DEBUG, "Connection to $ENV{GL_REPO} from $ip"; # First, check if the repository is in the YYYY/ directory