chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
509a3e2
)
For non-Debian distros, debiantag() uses distro name a la DEP-14.
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 4 Jul 2015 17:06:29 +0000
(18:06 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 4 Jul 2015 18:24:47 +0000
(19:24 +0100)
Debian/Dgit.pm
patch
|
blob
|
history
debian/changelog
patch
|
blob
|
history
dgit
patch
|
blob
|
history
infra/dgit-repos-policy-debian
patch
|
blob
|
history
infra/dgit-repos-server
patch
|
blob
|
history
tests/lib
patch
|
blob
|
history
tests/tests/debpolicy-dbretry
patch
|
blob
|
history
tests/tests/debpolicy-newreject
patch
|
blob
|
history
tests/tests/drs-push-rejects
patch
|
blob
|
history
tests/tests/trustingpolicy-replay
patch
|
blob
|
history
diff --git
a/Debian/Dgit.pm
b/Debian/Dgit.pm
index 37cbc51b68e52116705d1988cf040eef36919bda..2938ae11855b5f48208af630792ec9a37c66b8a9 100644
(file)
--- a/
Debian/Dgit.pm
+++ b/
Debian/Dgit.pm
@@
-101,10
+101,10
@@
sub debugcmd {
printcmd(\*DEBUG,$debugprefix.$extraprefix,@_) if $debuglevel>0;
}
printcmd(\*DEBUG,$debugprefix.$extraprefix,@_) if $debuglevel>0;
}
-sub debiantag ($) {
- my ($v) = @_;
+sub debiantag ($
$
) {
+ my ($v
,$distro
) = @_;
$v =~ y/~:/_%/;
$v =~ y/~:/_%/;
- return "
debian
/$v";
+ return "
$distro
/$v";
}
sub server_branch ($) { return "$branchprefix/$_[0]"; }
}
sub server_branch ($) { return "$branchprefix/$_[0]"; }
diff --git
a/debian/changelog
b/debian/changelog
index 333ad3ddeee5d5fa575dee6de2c8bdeb9c9d437d..ef2c8423d152c079c4a1867711399004de31a815 100644
(file)
--- a/
debian/changelog
+++ b/
debian/changelog
@@
-90,6
+90,7
@@
dgit (0.23~) unstable; urgency=low
* Manpages: Other clarifications and improvements.
* Change realpath dependency to `coreutils (>= 8.23-1~) | realpath'
(Closes:#786955.)
* Manpages: Other clarifications and improvements.
* Change realpath dependency to `coreutils (>= 8.23-1~) | realpath'
(Closes:#786955.)
+ * For non-Debian distros, debiantag() uses distro name a la DEP-14.
--
--
diff --git
a/dgit
b/dgit
index f0f16518f44ba58877ec6b5894ffc3a4136675d0..265978ea53cd0841de791d9aae3e409110caf4ac 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-1570,7
+1570,7
@@
sub push_parse_changelog ($) {
$package = getfield $clogp, 'Source';
my $cversion = getfield $clogp, 'Version';
$package = getfield $clogp, 'Source';
my $cversion = getfield $clogp, 'Version';
- my $tag = debiantag($cversion);
+ my $tag = debiantag($cversion
, access_basedistro
);
runcmd @git, qw(check-ref-format), $tag;
my $dscfn = dscfn($cversion);
runcmd @git, qw(check-ref-format), $tag;
my $dscfn = dscfn($cversion);
diff --git
a/infra/dgit-repos-policy-debian
b/infra/dgit-repos-policy-debian
index b21f797643a76ea27e19c93e6202c103ec644c21..0774f17b9e373947e0dfbd9309ebc6c683acf47a 100755
(executable)
--- a/
infra/dgit-repos-policy-debian
+++ b/
infra/dgit-repos-policy-debian
@@
-106,7
+106,7
@@
sub specific_suite_has_vsn_in_our_history ($) {
foreach my $entry (@$in_suite) {
my $vsn = $entry->{version};
die "$pkg ?" unless defined $vsn;
foreach my $entry (@$in_suite) {
my $vsn = $entry->{version};
die "$pkg ?" unless defined $vsn;
- my $tagref = "refs/tags/".debiantag $vsn;
+ my $tagref = "refs/tags/".debiantag $vsn
, $distro
;
printdebug " checking history suite=$suite vsn=$vsn tagref=$tagref\n";
$?=0; my $r = system qw(git show-ref --verify --quiet), $tagref;
return 1 if !$r;
printdebug " checking history suite=$suite vsn=$vsn tagref=$tagref\n";
$?=0; my $r = system qw(git show-ref --verify --quiet), $tagref;
return 1 if !$r;
diff --git
a/infra/dgit-repos-server
b/infra/dgit-repos-server
index a6f57be64311ba3fea2d84462404b4fd2c16e29b..ae25aaa3bc1c7579fdc4ffcd302b4acf281ebda5 100755
(executable)
--- a/
infra/dgit-repos-server
+++ b/
infra/dgit-repos-server
@@
-62,7
+62,7
@@
$SIG{__WARN__} = sub { die $_[0]; };
# as a result of this the stunt pre-receive hook runs; it does this:
# + understand what refs we are allegedly updating and
# check some correspondences:
# as a result of this the stunt pre-receive hook runs; it does this:
# + understand what refs we are allegedly updating and
# check some correspondences:
-# * we are updating only refs/tags/
debian
/* and refs/dgit/*
+# * we are updating only refs/tags/
DISTRO
/* and refs/dgit/*
# * and only one of each
# * and the tag does not already exist
# and
# * and only one of each
# * and the tag does not already exist
# and
@@
-323,7
+323,7
@@
sub movetogarbage () {
ensuredir "$dgitrepos/_removed-tags";
open PREVIOUS, ">>", removedtagsfile or die removedtagsfile." $!";
ensuredir "$dgitrepos/_removed-tags";
open PREVIOUS, ">>", removedtagsfile or die removedtagsfile." $!";
- git_for_each_ref('refs/tags/'.debiantag('*'), sub {
+ git_for_each_ref('refs/tags/'.debiantag('*'
,$distro
), sub {
my ($objid,$objtype,$fullrefname,$reftail) = @_;
print PREVIOUS "\n$objid $reftail .\n" or die $!;
}, $real);
my ($objid,$objtype,$fullrefname,$reftail) = @_;
print PREVIOUS "\n$objid $reftail .\n" or die $!;
}, $real);
@@
-458,7
+458,7
@@
sub readupdates () {
printdebug " upd.| $_\n";
m/^(\S+) (\S+) (\S+)$/ or die "$_ ?";
my ($old, $sha1, $refname) = ($1, $2, $3);
printdebug " upd.| $_\n";
m/^(\S+) (\S+) (\S+)$/ or die "$_ ?";
my ($old, $sha1, $refname) = ($1, $2, $3);
- if ($refname =~ m{^refs/tags/(?=
debian
/)}) {
+ if ($refname =~ m{^refs/tags/(?=
$distro
/)}) {
reject "pushing multiple tags!" if defined $tagname;
$tagname = $'; #';
$tagval = $sha1;
reject "pushing multiple tags!" if defined $tagname;
$tagname = $'; #';
$tagval = $sha1;
@@
-773,11
+773,9
@@
sub checks () {
tagh1('object') eq $commit or reject "tag refers to wrong commit";
tagh1('tag') eq $tagname or reject "tag name in tag is wrong";
tagh1('object') eq $commit or reject "tag refers to wrong commit";
tagh1('tag') eq $tagname or reject "tag name in tag is wrong";
- my $v = $version;
- $v =~ y/~:/_%/;
-
- printdebug "translated version $v\n";
- $tagname eq "debian/$v" or die;
+ my $expecttagname = debiantag $version, $distro;
+ printdebug "expected tag $expecttagname\n";
+ $tagname eq $expecttagname or die;
lockrealtree();
lockrealtree();
diff --git
a/tests/lib
b/tests/lib
index 055d5fa8f3e0a64334e41088caad10e5e6c0af71..a3974253f733e467f5827d2a6f0af8d4aaa6c764 100644
(file)
--- a/
tests/lib
+++ b/
tests/lib
@@
-370,7
+370,7
@@
t-refs-notexist () {
}
t-v-tag () {
}
t-v-tag () {
- echo refs/tags/
debian
/${v//\~/_}
+ echo refs/tags/
test-dummy
/${v//\~/_}
}
t-pushed-good () {
}
t-pushed-good () {
diff --git
a/tests/tests/debpolicy-dbretry
b/tests/tests/debpolicy-dbretry
index 1b98f764b7eec65e61b96986187aa4de02392252..d9c2ea29c1455c4326c70943bb159404e8d17596 100755
(executable)
--- a/
tests/tests/debpolicy-dbretry
+++ b/
tests/tests/debpolicy-dbretry
@@
-22,7
+22,7
@@
t-commit 'Make something to autotaint'
t-dgit build
t-dgit push --new
t-dgit build
t-dgit push --new
-autotaint=`t-git-get-ref "refs/tags/
debian
/$v"`
+autotaint=`t-git-get-ref "refs/tags/
test-dummy
/$v"`
git reset --hard start
t-commit 'Thing which will autotaint'
git reset --hard start
t-commit 'Thing which will autotaint'
diff --git
a/tests/tests/debpolicy-newreject
b/tests/tests/debpolicy-newreject
index c238a5aa90a05f70182c150340c213d29ea8bcd2..6987ef3a364aab532e869cd4c7343d20f70d4d1d 100755
(executable)
--- a/
tests/tests/debpolicy-newreject
+++ b/
tests/tests/debpolicy-newreject
@@
-50,7
+50,7
@@
t-git-dir-check enoent
t-commit 'should require --deliberately...questionable'
t-dgit build
t-commit 'should require --deliberately...questionable'
t-dgit build
-t-expect-push-fail E:"tag
debian
/${vanished//./\\.} referred to this object.*all previously pushed versions were found to have been removed" \
+t-expect-push-fail E:"tag
test-dummy
/${vanished//./\\.} referred to this object.*all previously pushed versions were found to have been removed" \
t-dgit push --new
t-git-dir-check enoent
t-dgit push --new
t-git-dir-check enoent
@@
-101,7
+101,7
@@
t-commit 'Check taint is no longer there'
t-dgit build
t-dgit push
t-dgit build
t-dgit push
-git checkout -b stoats
debian
/$vanished
+git checkout -b stoats
test-dummy
/$vanished
t-commit 'Simulate accidentally building on rejected version'
t-dgit build
t-expect-push-fail "HEAD is not a descendant of the archive's version" \
t-commit 'Simulate accidentally building on rejected version'
t-dgit build
t-expect-push-fail "HEAD is not a descendant of the archive's version" \
diff --git
a/tests/tests/drs-push-rejects
b/tests/tests/drs-push-rejects
index 3a709472efdb2b3fada31f544cf78eab6db03ee1..3ce1447a9834e3dbcfc73911b117ff72f4c13e09 100755
(executable)
--- a/
tests/tests/drs-push-rejects
+++ b/
tests/tests/drs-push-rejects
@@
-31,7
+31,7
@@
prep () {
cp $tmp/masters/* $tmp/.
tag_signer='-u Senatus'
tag_message="$p release $version for $suite ($csuite) [dgit]"
cp $tmp/masters/* $tmp/.
tag_signer='-u Senatus'
tag_message="$p release $version for $suite ($csuite) [dgit]"
- tag_name=
debian
/$version
+ tag_name=
test-dummy
/$version
push_spec1="HEAD:refs/dgit/$csuite"
push_spec2="refs/tags/$tag_name"
push_spec="$push_spec1 $push_spec2"
push_spec1="HEAD:refs/dgit/$csuite"
push_spec2="refs/tags/$tag_name"
push_spec="$push_spec1 $push_spec2"
@@
-101,7
+101,7
@@
mustfail 'push is missing tag ref update' $push_spec1
mustfail 'push is missing head ref update' +$push_spec2
mustfail 'pushing unexpected ref' $push_spec HEAD:refs/wombat
mustfail 'pushing multiple heads' $push_spec HEAD:refs/dgit/wombat
mustfail 'push is missing head ref update' +$push_spec2
mustfail 'pushing unexpected ref' $push_spec HEAD:refs/wombat
mustfail 'pushing multiple heads' $push_spec HEAD:refs/dgit/wombat
-mustfail 'pushing multiple tags' $push_spec HEAD:refs/tags/
debian
/wombat
+mustfail 'pushing multiple tags' $push_spec HEAD:refs/tags/
test-dummy
/wombat
prep unstable sid
mktag
prep unstable sid
mktag
@@
-128,11
+128,11
@@
mktag HEAD~:
mustfail 'tag refers to wrong kind of object' $push_spec
prep unstable sid
mustfail 'tag refers to wrong kind of object' $push_spec
prep unstable sid
-tag_name=
debian
/wombat
+tag_name=
test-dummy
/wombat
mktag
mktag
-#git update-ref
debian/$version debian
/wombat
+#git update-ref
test-dummy/$version test-dummy
/wombat
mustfail 'tag name in tag is wrong' \
mustfail 'tag name in tag is wrong' \
- refs/tags/
debian/wombat:refs/tags/debian
/$version $push_spec1
+ refs/tags/
test-dummy/wombat:refs/tags/test-dummy
/$version $push_spec1
prep unstable sid
mktag
prep unstable sid
mktag
diff --git
a/tests/tests/trustingpolicy-replay
b/tests/tests/trustingpolicy-replay
index 2736a523de98d05f0b24065af3857bb30bc6c4b5..f2a704317e34154ac2e0e525dfb66af4a8e76d52 100755
(executable)
--- a/
tests/tests/trustingpolicy-replay
+++ b/
tests/tests/trustingpolicy-replay
@@
-20,7
+20,7
@@
t-dgit build
t-dgit push
t-rm-dput-dropping
t-dgit push
t-rm-dput-dropping
-git checkout
debian
/1.0
+git checkout
test-dummy
/1.0
t-dgit build
t-dgit push --deliberately-fresh-repo
t-dgit build
t-dgit push --deliberately-fresh-repo
@@
-28,8
+28,8
@@
remote="`git config dgit-distro.test-dummy.git-url`/$p.git"
t-expect-push-fail 'Replay of previously-rewound upload' \
git push "$remote" \
t-expect-push-fail 'Replay of previously-rewound upload' \
git push "$remote" \
-
debian
/1.1 \
-
debian
/1.1~0:refs/dgit/sid
+
test-dummy
/1.1 \
+
test-dummy
/1.1~0:refs/dgit/sid
git checkout master
git checkout master
@@
-57,11
+57,11
@@
prepare-replay () {
attempt-replay () {
local mpat=$1
attempt-replay () {
local mpat=$1
- git show
debian
/$replayv | grep -e $delib
+ git show
test-dummy
/$replayv | grep -e $delib
t-expect-push-fail "$mpat" \
git push "$remote" \
t-expect-push-fail "$mpat" \
git push "$remote" \
-
debian
/$replayv \
- +
debian
/$replayv~0:refs/dgit/sid
+
test-dummy
/$replayv \
+ +
test-dummy
/$replayv~0:refs/dgit/sid
}
prepare-replay --deliberately-fresh-repo
}
prepare-replay --deliberately-fresh-repo
@@
-77,7
+77,7
@@
t-commit 'later version to stop not fast forward rewinding'
t-dgit build
t-dgit push
t-dgit build
t-dgit push
-attempt-replay "does not declare previously tags/
debian
/$v"
+attempt-replay "does not declare previously tags/
test-dummy
/$v"
echo ok.
echo ok.