summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-03-17 22:22:44 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-03-22 15:19:27 +0000
commiteab588a83905122af678182876c2f800e4b6fa77 (patch)
tree56ffb61f5da7d717869c21794441d499cd43c505
parent379f4be6fc6ce15641bd7412dce3e71ca11ece00 (diff)
dgit: Introduce "deliberatelies"
No underlying recipient of this info yet - just plumbing.
-rwxr-xr-xdgit11
-rw-r--r--dgit.123
-rwxr-xr-xinfra/dgit-repos-server6
3 files changed, 38 insertions, 2 deletions
diff --git a/dgit b/dgit
index d2ca495..7e642c0 100755
--- a/dgit
+++ b/dgit
@@ -51,6 +51,7 @@ our $buildproductsdir = '..';
our $new_package = 0;
our $ignoredirty = 0;
our $rmonerror = 1;
+our @deliberatelies;
our $existing_package = 'dpkg';
our $cleanmode = 'dpkg-source';
our $changes_since_version;
@@ -192,6 +193,10 @@ sub stat_exists ($) {
die "stat $f: $!";
}
+sub deliberately ($) {
+ return !!grep { $_[0] eq $_ } @deliberatelies;
+}
+
#---------- remote protocol support, common ----------
# remote push initiator/responder protocol:
@@ -1564,6 +1569,7 @@ sub push_mktag ($$$$$$$) {
# We make the git tag by hand because (a) that makes it easier
# to control the "tagger" (b) we can do remote signing
my $authline = clogp_authline $clogp;
+ my $delibs = join(" ", "",@deliberatelies);
open TO, '>', $tfn->('.tmp') or die $!;
print TO <<END or die $!;
object $head
@@ -1572,7 +1578,7 @@ tag $tag
tagger $authline
$package release $cversion for $clogsuite ($csuite) [dgit]
-[dgit distro=$distro]
+[dgit distro=$distro$delibs]
END
close TO or die $!;
@@ -2716,6 +2722,9 @@ sub parseopts () {
} elsif (m/^--no-rm-on-error$/s) {
push @ropts, $_;
$rmonerror = 0;
+ } elsif (m/^--deliberately-($suite_re)$/s) {
+ push @ropts, $_;
+ push @deliberatelies, $&;
} else {
badusage "unknown long option \`$_'";
}
diff --git a/dgit.1 b/dgit.1
index 260b742..35a0922 100644
--- a/dgit.1
+++ b/dgit.1
@@ -255,6 +255,29 @@ This can be useful with build, if you plan to commit later. (dgit
push will still ensure that the .dsc you upload and the git tree
you push are identical, so this option won't make broken pushes.)
.TP
+.BI --deliberately- something
+Declare that you are deliberately doing
+.IR something .
+This can be used to override safety catches, including safety catches
+which relate to distro-specific policies. The meanings of
+.IR something s
+understood in the context of Debian are discussed below:
+.TP
+.BR --deliberately-not-fast-forward
+Declare that you are deliberately rewinding history. When pushing to
+Debian, use this when you are making a renewed upload of an entirely
+new source package whose previous version was not accepted for release
+from NEW because of problems with copyright or redistributibility.
+.TP
+.BR --deliberately-include-questionable-history
+Declare that you are deliberately including, in the git history of
+your current push, history which contains a previously-submitted
+version of this package which was not approved (or has not yet been
+approved) by the ftpmasters. When pushing to Debian, only use this
+option after verifying that: none of the rejected-from-NEW (or
+never-accepted) versions in the git history of your current push, were
+rejected by ftpmaster for copyright or redistributability reasons.
+.TP
.BR --quilt=linear
When fixing up source format `3.0 (quilt)' metadata, insist on
generating a linear patch stack. If such a stack cannot be generated,
diff --git a/infra/dgit-repos-server b/infra/dgit-repos-server
index 22e6ea7..56fc4fd 100755
--- a/infra/dgit-repos-server
+++ b/infra/dgit-repos-server
@@ -100,6 +100,8 @@ our $workrepo;
our $keyrings;
our @lockfhs;
our $debug='';
+our @deliberatelies;
+our $policy;
#----- utilities -----
@@ -336,7 +338,9 @@ sub parsetag () {
for (;;) {
if (s/^distro\=(\S+) //) {
die "$1 != $distro" unless $1 eq $distro;
- } elsif (s/^[-+.=0-9a-z]+ //) {
+ } elsif (s/^(--deliberately-$package_re) //) {
+ push @deliberatelies, $1;
+ } elsif (s/^[-+.=0-9a-z]\S* //) {
} else {
die "unknown dgit info in tag";
}