chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dgit-repos-server: Further fixes to locking; rename acquiretree to acquirermtree
[dgit.git]
/
infra
/
dgit-ssh-dispatch
diff --git
a/infra/dgit-ssh-dispatch
b/infra/dgit-ssh-dispatch
index 88311ee37bf6cac0df28c0ab8a3fb1bdd424d2ca..4769d895830f5aa154e49fc0cc94f069a9e68bb4 100755
(executable)
--- a/
infra/dgit-ssh-dispatch
+++ b/
infra/dgit-ssh-dispatch
@@
-3,6
+3,8
@@
use strict;
use POSIX;
use strict;
use POSIX;
+use Debian::Dgit;
+
open DEBUG, '>/dev/null' or die $!;
if (@ARGV && $ARGV[0] eq '-D') {
shift @ARGV;
open DEBUG, '>/dev/null' or die $!;
if (@ARGV && $ARGV[0] eq '-D') {
shift @ARGV;
@@
-16,7
+18,7
@@
$authrune //= join ':',
'@/keyrings/debian-keyring.gpg,a',
'@/keyrings/debian-maintainers.gpg,m@/dm.txt';
'@/keyrings/debian-keyring.gpg,a',
'@/keyrings/debian-maintainers.gpg,m@/dm.txt';
-our $lre =
'[0-9a-z][-+.0-9a-z]*'
;
+our $lre =
$package_re
;
our $qre = '["'."']?";
# $dispatchdir should contain
our $qre = '["'."']?";
# $dispatchdir should contain
@@
-24,6
+26,7
@@
our $qre = '["'."']?";
# repos/
# suites
# diverts
# repos/
# suites
# diverts
+# policy-hook
# plus files required by the authrune (by default, keyrings/ and dm.txt)
#
# diverts should be list of
# plus files required by the authrune (by default, keyrings/ and dm.txt)
#
# diverts should be list of
@@
-31,7
+34,7
@@
our $qre = '["'."']?";
# where <pat> is a package name pattern which may contain * or literals.
our ($distro,$pkg);
# where <pat> is a package name pattern which may contain * or literals.
our ($distro,$pkg);
-our ($dgitlive,$repos,$suites,$diverts,$repo);
+our ($dgitlive,$repos,$suites,$diverts,$
policyhook,$
repo);
sub checkdivert ($) {
my ($df) = @_;
sub checkdivert ($) {
my ($df) = @_;
@@
-80,6
+83,7
@@
sub selectpackage ($$;$) {
$dgitlive= "$d/dgit-live";
$repos= "$d/repos";
$suites= "$d/suites";
$dgitlive= "$d/dgit-live";
$repos= "$d/repos";
$suites= "$d/suites";
+ $policyhook= "$d/policy-hook";
$authrune =~ s/\@/$d/g;
$authrune =~ s/\@/$d/g;
@@
-121,7
+125,8
@@
sub dispatch () {
selectpackage $2,$3;
if ($cmd eq 'receive-pack') {
my $s = "$dgitlive/infra/dgit-repos-server";
selectpackage $2,$3;
if ($cmd eq 'receive-pack') {
my $s = "$dgitlive/infra/dgit-repos-server";
- exec $s, $distro, $suites, $authrune, $repos, qw(--ssh);
+ exec $s, $distro, $suites, $authrune, $repos,
+ $policyhook, qw(--ssh);
die "exec $s: $!";
} elsif ($cmd eq 'upload-pack') {
$repo='$repos/_empty' unless hasrepo;
die "exec $s: $!";
} elsif ($cmd eq 'upload-pack') {
$repo='$repos/_empty' unless hasrepo;