chiark / gitweb /
infrastructure: Cope with new git-receive-pack which has quarantine feature
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Jul 2017 18:59:41 +0000 (19:59 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Jul 2017 18:59:42 +0000 (19:59 +0100)
Ie, work around #867702.  See the bug there for discussion.

(We are perhaps flying a little close to the wind with our wrapper
script location, but it doesn't seem likely to break, to me.)

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

index 3ee2de879c177e8be1c361eb05aa1f37637be092..f25c5d499d632498ed8a0d130b17337090912af6 100644 (file)
@@ -8,6 +8,8 @@ dgit (3.11~) unstable; urgency=medium
     tree.  Closes:#865863.
   * dgit: rpush: Honour local git config from build host working
     tree.
     tree.  Closes:#865863.
   * dgit: rpush: Honour local git config from build host working
     tree.
+  * infrastructure: Cope with new git-receive-pack which has
+    quarantine feature: ie, work around #867702.
   * test suite: Cope with git restricting ext:: protocols.
 
  --
   * test suite: Cope with git restricting ext:: protocols.
 
  --
index 54a63f926116b87673baa22d7b821795cca4cf97..55dc81fff1d16b09ca61413df3927574a0658f86 100755 (executable)
@@ -943,6 +943,17 @@ sub onwardpush () {
     my @cmdbase = (qw(git send-pack), $destrepo);
     push @cmdbase, qw(--force) if $policy & NOFFCHECK;
 
     my @cmdbase = (qw(git send-pack), $destrepo);
     push @cmdbase, qw(--force) if $policy & NOFFCHECK;
 
+    if ($ENV{GIT_QUARANTINE_PATH}) {
+       my $recv_wrapper = "$ENV{GIT_QUARANTINE_PATH}/dgit-recv-wrapper";
+       mkscript $recv_wrapper, <<'END';
+#!/bin/sh
+set -e
+unset GIT_QUARANTINE_PATH
+exec git receive-pack "$@"
+END
+       push @cmdbase, "--receive-pack=$recv_wrapper";
+    }
+
     my @cmd = @cmdbase;
     push @cmd, "$commit:refs/dgit/$suite",
               "$tagval:refs/tags/$tagname";
     my @cmd = @cmdbase;
     push @cmd, "$commit:refs/dgit/$suite",
               "$tagval:refs/tags/$tagname";