chiark / gitweb /
infrastructure: Run git gc --auto before mirroring. Closes:#841414.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 14 Jul 2018 16:23:37 +0000 (17:23 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 14 Jul 2018 16:23:40 +0000 (17:23 +0100)
This would not have avoided the trouble reported here
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=841414#74

Empirically, I managed to work around the problem by running `git gc'
(rather than `git gc --auto') and then rsyncing the result to the
mirror.  I will request that DSA increase the RAM (or swap) size on
the relevant host.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
infra/dgit-mirror-rsync

index b1e6792e637c8dc1a8481f0f97e46b4eff226b78..83016f48955256af17e0d7ee8955b6aa6a510c25 100644 (file)
@@ -2,6 +2,7 @@ dgit (5.10~) unstable; urgency=medium
  
   * Merge the experimental branch.
   * test suite: Drop a couple of useless test log output lines.
+  * infrastructure: Run git gc --auto before mirroring.  Closes:#841414.
  
  --
  
index 93464892e54137c496f56548ef450d6581c8cb94..2d912c8ad1dd30f335c2f52d8e4f6011a718a22c 100755 (executable)
@@ -54,6 +54,7 @@ rsync=(rsync -rltH --safe-links --delete)
 hooktimeout=30
 rsynctimeout=900
 rsyncssh='ssh -o batchmode=yes'
+mirror_gc_cmd='git gc --auto'
 
 . $distrodir/mirror-settings
 
@@ -74,6 +75,12 @@ case "$remoterepos" in
 esac
 
 actually () {
+       if [ "x$mirror_gc_cmd" != x ]; then
+               (
+                       cd "$repos/$package.git"
+                       $mirror_gc_cmd
+               )
+       fi
        "${rsync[@]}" \
                --timeout=$rsynctimeout                         \
                -e "$rsyncssh"                                  \