summaryrefslogtreecommitdiff
path: root/infra/dgit-repos-server
diff options
context:
space:
mode:
Diffstat (limited to 'infra/dgit-repos-server')
-rwxr-xr-xinfra/dgit-repos-server28
1 files changed, 25 insertions, 3 deletions
diff --git a/infra/dgit-repos-server b/infra/dgit-repos-server
index f94315a..9c7e36d 100755
--- a/infra/dgit-repos-server
+++ b/infra/dgit-repos-server
@@ -154,8 +154,10 @@ setup_sigwarn();
# VERSION SUITE TAGNAME DELIBERATELIES [...]
# POLICY-HOOK-SCRIPT ... push-confirm PACKAGE \
# VERSION SUITE TAGNAME DELIBERATELIES FRESH-REPO|'' [...]
+# POLICY-HOOK-SCRIPT ... policy-client-query PACKAGE POL-CL-QUERY [...]
#
# DELIBERATELIES is like this: --deliberately-foo,--deliberately-bar,...
+# POL-CL-QUERY is in the syntax of a package name
#
# Exit status of policy hook is a bitmask.
# Bit weight constants are defined in Dgit.pm.
@@ -200,6 +202,26 @@ setup_sigwarn();
# package), it should use DGIT-LIVE-DIR/dgit (etc.), or if that is
# ENOENT, use the installed version.
#
+# POL-CL-QUERY is one of the following:
+#
+# tainted-objects SUITE
+# => [ { "gitobjid": "sha",
+# "comment": $string, # in server"s native language, UTF-8
+# "overrides": [ "--deliberately-include-q-h", ... ],
+# # optional (may be absent, not null):
+# "gitobjtype": "commit", # as from git-cat-file -t
+# "time": $time_t,
+# "hint": $string, # client should translate if it can
+# } }
+#
+# Arguments after POL-CL-QUERY cannot contain `;` or whitespace;
+# they are obtained by dgit-ssh-dispatch by naive whitespace-splitting
+# a string from SSH_ORIGINAL_COMMAND.
+#
+# (Response value is JSON unless otherwise specified.)
+# If POL-CL-QUERY is not supported, the server will exit successfully
+# producing no output.
+#
# Mirror hook scripts are invoked like this:
# MIRROR-HOOK-SCRIPT DISTRO-DIR ACTION...
# and currently there is only one action invoked by dgit-repos-server:
@@ -784,7 +806,7 @@ sub checktagnoreplay () {
# current head for the suite (there must be at least one).
#
# This prevents any tag implying a NOFFCHECK push being
- # replayed to rewind from a different head.
+ # replayed to overwrite a different head.
#
# The possibility of an earlier ff-only push being replayed is
# eliminated as follows: the tag from such a push would still
@@ -1106,7 +1128,7 @@ sub mode_tag2upload () {
or $quit->("tag name not for us");
$version = $1;
- $version =~ y/_\%\#/:~/d;
+ $version =~ y/_\%\#/~:/d;
my $work = 'work';
@@ -1288,7 +1310,7 @@ END
push @dgitcmd, "--upstream-commitish=refs/tags/$upstreamt";
}
}
- push @dgitcmd, qw(push-source --new --overwrite), $suite;
+ push @dgitcmd, qw(push-source --new --trust-changelog), $suite;
runcmd @dgitcmd;