From 3ca3b1c92b778f855f35430f00f984c2d72156a5 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Fri, 30 Oct 2009 02:23:22 +0100 Subject: [PATCH] Remove gccheck, updatecheck cronjobs, instead recommend repod -q --all-once as a cronjob --- INSTALL | 9 ++++++--- install.sh | 6 +++--- jobs/README | 6 +++--- jobs/gccheck.sh | 18 ------------------ jobs/updatecheck.sh | 21 --------------------- 5 files changed, 12 insertions(+), 48 deletions(-) delete mode 100755 jobs/gccheck.sh delete mode 100755 jobs/updatecheck.sh diff --git a/INSTALL b/INSTALL index f578395..2476437 100644 --- a/INSTALL +++ b/INSTALL @@ -21,6 +21,9 @@ will then install Girocco according to Girocco::Config (you might need to be root, depending on the exact settings). If you use the mirror mode, you must make sure cloned.pl is kept running. -At any rate, you should make sure repod.sh is kept running, it takes care -of updating mirrored repositories and keeping all repositories neat and -packed. + +At any rate, you will need to periodically call repod maintenance job that +will refresh mirrored repositories, but also repack all repositories. You +can either just keep repod.sh running (good if you have large amount +of repositories), or add a special invocation (advised by make install) +to your crontab. diff --git a/install.sh b/install.sh index 437a565..ac08513 100755 --- a/install.sh +++ b/install.sh @@ -28,15 +28,15 @@ perl -I. -M$GIROCCO_CONF -i -pe 's/\@basedir\@/"$Girocco::Config::basedir"/g' "$ if [ -n "$cfg_mirror" ]; then - echo "--- Recommended crontab for $cfg_mirror_user:" - echo "*/10 * * * * /usr/bin/nice -n 18 $cfg_basedir/jobs/updatecheck.sh # adjust frequency based on number of repos" echo "--- Remember to start $cfg_basedir/daemons/cloned.pl" fi if [ -n "$cfg_push" -a "$cfg_permission_control" = "Group" ]; then echo "--- Recommended crontab for root:" echo "*/2 * * * * /usr/bin/nice -n 18 /root/fixupcheck.sh # adjust frequency based on number of repos" fi -echo "--- Also remember to start $cfg_basedir/daemons/repod.sh" +echo "--- Also remember to either start $cfg_basedir/daemons/repod.sh, or add this" +echo "--- to the crontab of $cfg_mirror_user (adjust frequency on number of repos):" +echo "*/30 * * * * /usr/bin/nice -n 18 $cfg_basedir/daemons/repod.sh -q --all-once" echo "*** Setting up repository root..." diff --git a/jobs/README b/jobs/README index 0474415..60aabea 100644 --- a/jobs/README +++ b/jobs/README @@ -2,10 +2,10 @@ This is a home of all the cronjobs that are being ran periodically to handle various maintenance tasks. The *check scripts belong to crontab and usually run the main scripts iteratively per-repository. -* updatecheck.sh: You DO NOT NEED this if you have mirroring turned off. * fixupcheck.sh: You DO NOT NEED these if you have pushing turned off OR use different permission control than Group. Otherwise, you need to copy fixup* over to ~root and run them from root's crontab. (They are completely self-contained so that you can easily review them.) -* gccheck.sh: You should enable this to avoid infinitely growing - repositories. +* daemons/repod.sh -q --all-once: You should call this to avoid + infinitely growing repositories and refresh mirrored projects if you + are not running repod all the time. diff --git a/jobs/gccheck.sh b/jobs/gccheck.sh deleted file mode 100755 index 6665ae9..0000000 --- a/jobs/gccheck.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -. @basedir@/shlib.sh - -if [ -e /tmp/gitupdatelock ]; then - echo "Locked!" >&2 - exit 1 -fi -touch /tmp/gitupdatelock - -rootdir="$cfg_reporoot" - -get_repo_list | - while read dir; do - "$cfg_basedir"/jobs/gc.sh "$dir" - done 2>&1 | grep -v '^Pack.*created\.$' - -rm /tmp/gitupdatelock diff --git a/jobs/updatecheck.sh b/jobs/updatecheck.sh deleted file mode 100755 index 7b8abf6..0000000 --- a/jobs/updatecheck.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -. @basedir@/shlib.sh - -if [ -e /tmp/gitupdatelock ]; then - echo "Locked!" >&2 - exit 1 -fi -touch /tmp/gitupdatelock - -cd "$cfg_reporoot" -get_repo_list | - while read dir; do - progress "+ `date` $dir" - if [ ! -e "$dir.git"/.nofetch ]; then - "$cfg_basedir"/daemons/update.sh "${dir}" - fi - progress "- `date` $dir" - done 2>&1 - -rm /tmp/gitupdatelock -- 2.11.4.GIT