chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Include canonicalised suite name in signed tag message.
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index 0a5de292378470888b334e3d5dd3cf9785a8112d..2d2c0f19fe7dc60ca90c0c50f6b8d55f77d38cb1 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-52,6
+52,8
@@
our $initiator_tempdir;
our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
+our $suite_re = '[-+.0-9a-z]+';
+
our (@git) = qw(git);
our (@dget) = qw(dget);
our (@dput) = qw(dput);
our (@git) = qw(git);
our (@dget) = qw(dget);
our (@dput) = qw(dput);
@@
-448,11
+450,12
@@
our %defcfg = ('dgit.default.distro' => 'debian',
'dgit.default.username' => '',
'dgit.default.archive-query-default-component' => 'main',
'dgit.default.ssh' => 'ssh',
'dgit.default.username' => '',
'dgit.default.archive-query-default-component' => 'main',
'dgit.default.ssh' => 'ssh',
+ 'dgit-distro.debian.git-user' => 'dgit',
'dgit-distro.debian.git-host' => 'git.debian.org',
'dgit-distro.debian.git-proto' => 'git+ssh://',
'dgit-distro.debian.git-host' => 'git.debian.org',
'dgit-distro.debian.git-proto' => 'git+ssh://',
- 'dgit-distro.debian.git-path' => '/
git/dgit-repos/repos
',
- 'dgit-distro.debian.git-check' => '
ssh-cmd
',
- 'dgit-distro.debian.git-create' => '
ssh-cmd
',
+ 'dgit-distro.debian.git-path' => '/
dgit-repos/
',
+ 'dgit-distro.debian.git-check' => '
true
',
+ 'dgit-distro.debian.git-create' => '
true
',
'dgit-distro.debian.sshpsql-host' => 'coccia.debian.org',
'dgit-distro.debian.sshpsql-dbname' => 'service=projectb',
'dgit-distro.debian.upload-host' => 'ftp-master', # for dput
'dgit-distro.debian.sshpsql-host' => 'coccia.debian.org',
'dgit-distro.debian.sshpsql-dbname' => 'service=projectb',
'dgit-distro.debian.upload-host' => 'ftp-master', # for dput
@@
-1304,7
+1307,7
@@
type commit
tag $tag
tagger $authline
tag $tag
tagger $authline
-$package release $cversion for $clogsuite [dgit]
+$package release $cversion for $clogsuite
($csuite)
[dgit]
END
close TO or die $!;
END
close TO or die $!;
@@
-1411,6
+1414,7
@@
sub dopush () {
responder_send_file('changes',$changesfile);
responder_send_command("param head $head");
responder_send_file('changes',$changesfile);
responder_send_command("param head $head");
+ responder_send_command("param csuite $csuite");
my $tfn = sub { ".git/dgit/tag$_[0]"; };
my $tagobjfn;
my $tfn = sub { ".git/dgit/tag$_[0]"; };
my $tagobjfn;
@@
-1434,24
+1438,21
@@
sub dopush () {
if (!check_for_git()) {
create_remote_git_repo();
}
if (!check_for_git()) {
create_remote_git_repo();
}
- runcmd_ordryrun @git, qw(push),access_giturl(),
"HEAD:".rrref();
-
runcmd_ordryrun @git, qw(push),access_giturl(),
"refs/tags/$tag";
+ runcmd_ordryrun @git, qw(push),access_giturl(),
+
"HEAD:".rrref(),
"refs/tags/$tag";
runcmd_ordryrun @git, qw(update-ref -m), 'dgit push', lrref(), 'HEAD';
runcmd_ordryrun @git, qw(update-ref -m), 'dgit push', lrref(), 'HEAD';
- if (!$we_are_responder) {
- if (act_local()) {
- rename "$dscpath.tmp",$dscpath or die "$dscfn $!";
- } else {
- progress "[new .dsc left in $dscpath.tmp]";
- }
- }
-
if ($we_are_responder) {
my $dryrunsuffix = act_local() ? "" : ".tmp";
responder_receive_files('signed-dsc-changes',
"$dscpath$dryrunsuffix",
"$changesfile$dryrunsuffix");
} else {
if ($we_are_responder) {
my $dryrunsuffix = act_local() ? "" : ".tmp";
responder_receive_files('signed-dsc-changes',
"$dscpath$dryrunsuffix",
"$changesfile$dryrunsuffix");
} else {
+ if (act_local()) {
+ rename "$dscpath.tmp",$dscpath or die "$dscfn $!";
+ } else {
+ progress "[new .dsc left in $dscpath.tmp]";
+ }
sign_changes $changesfile;
}
sign_changes $changesfile;
}
@@
-1726,10
+1727,13
@@
sub i_file_changes { }
sub i_want_signed_tag {
printdebug Dumper(\%i_param, $i_dscfn);
defined $i_param{'head'} && defined $i_dscfn && defined $i_clogp
sub i_want_signed_tag {
printdebug Dumper(\%i_param, $i_dscfn);
defined $i_param{'head'} && defined $i_dscfn && defined $i_clogp
+ && defined $i_param{'csuite'}
or badproto \*RO, "premature desire for signed-tag";
my $head = $i_param{'head'};
die if $head =~ m/[^0-9a-f]/ || $head !~ m/^../;
or badproto \*RO, "premature desire for signed-tag";
my $head = $i_param{'head'};
die if $head =~ m/[^0-9a-f]/ || $head !~ m/^../;
+ die unless $i_param{'csuite'} =~ m/^$suite_re$/;
+ $csuite = $&;
push_parse_dsc $i_dscfn, 'remote dsc', $i_version;
my $tagobjfn =
push_parse_dsc $i_dscfn, 'remote dsc', $i_version;
my $tagobjfn =