Package: release.debian.org Severity: normal Tags: bullseye User: release.debian....@packages.debian.org Usertags: pu X-Debbugs-Cc: ijack...@chiark.greenend.org.uk, matth...@chiark.greenend.org.uk
[ Reason ] I would like to update dgit in buster. This is prompted by yet another user falling foul of #972098 dgit assumes 'master' as main branch But there are quite a few other bugfixes between dgit 9.14 and 9.16 that might warrant an update. In particular, I'd like to highlight: * Tolerate making quilt patches creating +x files (#949675) Without this, dgit cannot handle some libc packages. * pseudomerge_version_check: Check for unfinalised changelog entry This is a safety catch improvement. There are also some forward-compatibility changes that might be useful to users who get some packages from backports/testing/unstable: * Compatibility with git-buildpackage gbp pq 0.9.26 (#1005873) * Avoid use of GZIP environment variable (#975624) [ Impact ] The impact of #972098 is that users who set their default git branch to "main" (which is good practice), or who run a git version later than the one in buster, cannot use dgit without some workaround. The workarounds aren't great. [ Tests ] All the changes are covered by dgit's autopkgtests, including new tests introduced as the changes were made. These pass on buster and sid and I will run a formal test run with autopkgtest and schroot on bullseye before uploading. [ Risks ] The biggest risk is probably the changes to support the new git-buildpackage. Having reviewed the diff I think they make the situation less fragile, rather than more fragile - that is, they make dgit's use of gbp pq look more like normal use; and we control somewhat more of the configuration. On balance, particularly given that the tests all psss with older gbp pq, I think it's best to include this change. [ Options } I propose to rebuild 9.16 for bullseye, without any further code changes. I think this is the lowest risk approach. 9.14, 9.15 and 9.16 were all bugfix releases. The only thing I'm aware that is actually wrong with 9.16 is that it is still affected by #995056, but the fix to that was to fundamentally change an important aspect of dgit's behaviour and is totally unsuitable for a stable update. It would be feasible to upload 9.14 or 9.15 instead, if the changes in 9.15 and (particularly) 9.16 are felt to be undesriable. I don't relish the idea of making a custom release out of cherry picks; I think this is likely to do worse than picking an existing known-working set of code. [ Checklist ] [x] *all* changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in (old)stable [x] the issue is verified as fixed in unstable [ Changes ] The changelog has the best description of the changes. But here's a git log extract too: changelog: finalise 9.16 changelog: Document further changes for 9.16 git-debrebase: convert-from-dgit-view: turn off ignore-new dgit/gdr: playtrees: Provide function for gbp.conf tests: gdr: Provide a way to pass --diagnose dgit/gdr: playtrees: Provide a gbp.conf dgit: Move .pc aside while running gbp pq import Fix typo in changelog for 9.14. changelog: start 9.16 changelog: finalise 9.15 changelog: Document changes tests: Update all using tests/update-db-compat tests/update-db-compat: Call git gc tests/update-db-compat: Adjust worktrees too. tests/update-db-compat: Strip all git-filter-branch original/ refs tests/update-db-compat: Some more refactoring tests/update-db-compat: Add a reassuring message. tests/update-db-compat: Add filtering of git-srcs tests/update-db-compat: Some refactoring tests/update-db-compat: initial script to address dh compat tests: Use t-debchange in some places instead of dch tests: Set FILTER_BRANCH_SQUELCH_WARNING=1 dgit: pseudomerge_version_check: Check for unfinalised changelog entry dgit: pseudomerge_version_check: Move $vclogp scope changelog: start 9.15 changelog: finalise 9.14 changelog: Document fixes dgit: Better message for dirty trees tests: test case for if user has diff.noprefix set git-playtree-setup: Override git config diff.noprefix git-debrebase(1): Clarify -fanchor-treated snag dgit-repos-server: Fix wrong un-mangling of epoch and ~ versions dgit: work around deprecation of GZIP tests: Run even more parallel git-debpush: Add missing perl dependency dgit: tolerate making quilt patches creating +x files tests: Test creation of new symlink is treated as unrepresentable tests: Add init.defaultBranch to two test cases git-playtree-setup: Handle init.defaultBranch tests: Introduce t-debchange and set DEBEMAIL changelog: start 9.14
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 4059e2b02..829725c49 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -84,7 +84,7 @@ BEGIN { gdr_ffq_prev_branchinfo parsecontrolfh parsecontrol parsechangelog getfield parsechangelog_loop - playtree_setup); + playtree_setup playtree_write_gbp_conf); # implicitly uses $main::us %EXPORT_TAGS = ( policyflags => [qw(NOFFCHECK FRESHREPO NOCOMMITCHECK)], playground => [qw(record_maindir $maindir $local_git_cfg @@ -1077,6 +1077,20 @@ sub playtree_setup () { open GA, "> .git/info/attributes" or confess "$!"; print GA "* $negate_harmful_gitattrs\n" or confess "$!"; close GA or confess "$!"; + + playtree_write_gbp_conf(); +} + +sub playtree_write_gbp_conf (;$) { + my ($ignore_new) = @_; + $ignore_new //= 'false'; + + open GC, "> .git/gbp.conf" or confess "$!"; + print GC <<"END" or confess $!; +[pq] +ignore-new = $ignore_new +END + close GC or confess "$!"; } 1; diff --git a/debian/changelog b/debian/changelog index 18bee7f3a..eaf9e34df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,56 @@ +dgit (9.16) unstable; urgency=medium + + Compatibility with git-buildpackage gbp pq 0.9.26 (Closes:#1005873): + * dgit: Move .pc aside while running gbp pq import + * git-debrebase: convert-from-dgit-view: Disable ignore-new where needed + + Other changes: + * Fix typo in changelog for 9.14, noting that we closed #987304. + * playtrees (for dgit and git-debrebase): Provide a gbp.conf. + * tests: gdr: Provide a way to pass --diagnose. + + -- Ian Jackson <ijack...@chiark.greenend.org.uk> Sat, 28 May 2022 22:49:53 +0100 + +dgit (9.15) unstable; urgency=medium + + * dgit: pseudomerge_version_check: Check for unfinalised changelog entry. + * tests: Set FILTER_BRANCH_SQUELCH_WARNING=1 + * tests: Use t-debchange in some places instead of dch + * tests: Update all using tests/update-db-compat. Closes: #1002927. + + -- Ian Jackson <ijack...@chiark.greenend.org.uk> Sun, 02 Jan 2022 12:20:23 +0000 + +dgit (9.14) unstable; urgency=medium + + Bugfixes: + * Tolerate git config init.defaultBranch. Closes:#972098. + Reports from Didier 'OdyX' Raboud, Osamu Aoki. + Diagnosis by Stig Sandbeck Mathisen. + * dgit: Tolerate making quilt patches creating +x files. + Closes:#949675. Report from peter green. + * dgit: Avoid use of GZIP environment variable. + Closes: #975624. Report from Stéphane Glondu. + * Tolerate git config diff.noprefix. + Closes:#973881; report from Didier 'OdyX' Raboud. + + Documentation and diagnostics: + * Clarify git-debrabase --anchor, -fanchor-treated. + Closes:#977426. Report from Wookey <woo...@debian.org>. + * dgit: Better message for dirty trees. Closes:#930930. + Report and suggestions from Sean Whitton. + + git-debpush, tag2upload: + * Add missing dependency. Closes:#940589; report from Andrej Shadura. + * Fix version unmangling. Closes:#987304; report from Wolfgang Silbermayr. + + Tests: + * Introduce t-debchange and set DEBEMAIL. + * Add init.defaultBranch to two test cases and diff.noprefix to one. + * Test creation of new symlink is treated as unrepresentable. + * Increase the nproc -> make -j factor. + + -- Ian Jackson <ijack...@chiark.greenend.org.uk> Wed, 08 Sep 2021 01:30:53 +0100 + dgit (9.13) unstable; urgency=medium * gitattributes defuse: work even if .git/info/attributes missing diff --git a/debian/control b/debian/control index 210c5b73e..4a0f6118a 100644 --- a/debian/control +++ b/debian/control @@ -42,7 +42,8 @@ Description: rebasing git workflow tool for Debian packaging gbp pq, and direct use of quilt patches. Package: git-debpush -Depends: devscripts, git, gnupg, ${misc:Depends} +Depends: devscripts, git, gnupg, libgit-wrapper-perl, + ${misc:Depends} Architecture: all Description: client script for git pushing to Debian-style archives git-debpush is a script to create and push a specially formatted diff --git a/dgit b/dgit index 145fa9bb0..d39dc4b6f 100755 --- a/dgit +++ b/dgit @@ -324,6 +324,16 @@ sub gbp_pq { return opts_opt_multi_cmd [], @gbp_pq; } +sub gbp_pq_pc_aside (&) { + my ($f) = @_; + my $undo = rename ".pc", "../pc-aside"; + confess "$!" unless $undo || $!==ENOENT; + $f->(); + if ($undo) { + rename "../pc-aside", ".pc", or confess $!; + } +} + sub dgit_privdir () { our $dgit_privdir_made //= ensure_a_playground 'dgit'; } @@ -2679,12 +2689,14 @@ END my @showcmd = (gbp_pq, qw(import)); my @realcmd = shell_cmd 'exec >/dev/null 2>>../../gbp-pq-output', @showcmd; - debugcmd "+",@realcmd; - if (system @realcmd) { - die f_ "%s failed: %s\n", - +(shellquote @showcmd), - failedcmd_waitstatus(); - } + gbp_pq_pc_aside(sub { + debugcmd "+",@realcmd; + if (system @realcmd) { + die f_ "%s failed: %s\n", + +(shellquote @showcmd), + failedcmd_waitstatus(); + } + }); my $gapplied = git_rev_parse('HEAD'); my $gappliedtree = cmdoutput @git, qw(rev-parse HEAD:); @@ -4148,9 +4160,10 @@ sub pseudomerge_version_check ($$) { progress f_ "Checking package changelog for archive version %s ...", $v; my $cd; + my $vclogp; eval { my @xa = ("-f$v", "-t$v"); - my $vclogp = parsechangelog @xa; + $vclogp = parsechangelog @xa; my $gf = sub { my ($fn) = @_; [ (getfield $vclogp, $fn), @@ -4172,6 +4185,11 @@ sub pseudomerge_version_check ($$) { Your tree seems to based on earlier (not uploaded) %s. END if $cd->[0] =~ m/UNRELEASED/; + fail f_ <<END, $v, $v +d/changelog entry for %s is unfinalised! +Your tree seems to based on earlier (not uploaded) %s. +END + unless defined $vclogp->{Date}; } } @@ -5435,6 +5453,7 @@ sub quiltify_trees_differ ($$;$$$) { # creation die __ "creation with non-default mode\n" unless $newmode =~ m/^100644$/ or + $newmode =~ m/^100755$/ or $newmode =~ m/^120000$/; } }; @@ -5529,7 +5548,9 @@ ENDU if ($quilt_mode =~ m/gbp|unapplied|baredebian/ && ($diffbits->{O2A} & 01)) { # some patches progress __ "dgit view: creating patches-applied version using gbp pq"; - runcmd shell_cmd 'exec >/dev/null', gbp_pq, qw(import); + gbp_pq_pc_aside(sub { + runcmd shell_cmd 'exec >/dev/null', gbp_pq, qw(import); + }); # gbp pq import creates a fresh branch; push back to dgit-view runcmd @git, qw(update-ref refs/heads/dgit-view HEAD); runcmd @git, qw(checkout -q dgit-view); @@ -6054,10 +6075,11 @@ END push @files, $maybe; } - my $debtar= srcfn $fakeversion,'.debian.tar.gz'; - runcmd qw(env GZIP=-1n tar -zcf), "./$debtar", qw(-C), $maindir, @files; + my $debtar= srcfn $fakeversion,'.debian.tar'; + runcmd qw(tar -cf), "./$debtar", qw(-C), $maindir, @files; + runcmd qw(gzip -1n), "./$debtar"; - $dscaddfile->($debtar); + $dscaddfile->("$debtar.gz"); close $fakedsc or confess "$!"; } @@ -6575,7 +6597,8 @@ sub clean_tree_check () { } elsif ($cleanmode =~ m{^git}) { clean_tree_check_git 1, __ "tree contains uncommited, untracked, unignored files\n". - "You can use --clean=git[-ff],always (-wga/-wgfa) to delete them.", ''; + "You can use --clean=git[-ff],always (-wga/-wgfa) to delete them.\n". + "To include them in the build, it is usually best to just commit them.", ''; } elsif ($cleanmode eq 'none') { } else { confess "$cleanmode ?"; diff --git a/git-debrebase b/git-debrebase index 781435861..08938e21a 100755 --- a/git-debrebase +++ b/git-debrebase @@ -2790,12 +2790,16 @@ END if ($some_patches) { runcmd @git, qw(checkout), $head, qw(-- debian/patches); runcmd @git, qw(reset --quiet); + # We deliberately run with dirty patches, so want --ignore-new + # but it isn't available everywhere + playtree_write_gbp_conf('true'); my @gbp_cmd = (qw(gbp pq import)); if (!$diagnose) { my $gbp_err = "../gbp-pq-err"; @gbp_cmd = shell_cmd "exec >$gbp_err 2>&1", @gbp_cmd; } my $r = system @gbp_cmd; + playtree_write_gbp_conf(); if ($r) { print STDERR f_ " %s: couldn't apply patches: gbp pq %s", diff --git a/git-debrebase.1.pod b/git-debrebase.1.pod index 639b07d2e..17e750a98 100644 --- a/git-debrebase.1.pod +++ b/git-debrebase.1.pod @@ -532,9 +532,12 @@ commits as anchors, pseudomerges, delta queue commits, etc. It also disables some coherency checks which depend on metadata extracted from its commit message, so -it is a snag if <commit-ish> is the anchor +it is a snag (C<-fanchor-treated>) if <commit-ish> is the anchor for the previous upstream version in git-debrebase new-upstream operations. +You have to check yourself that the new upstream +is fast forward from the old one, +and has the right components (as if applicable). =item --dgit=<program> diff --git a/git-playtree-setup b/git-playtree-setup index 184de4d69..61ba3b1e6 100755 --- a/git-playtree-setup +++ b/git-playtree-setup @@ -7,6 +7,8 @@ # mkdir .git/some/play/thing # cd .git/some/play/thing # git-playtree-setup . +# +# Honours GIT_PLAYTREE_DEFAULT_BRANCH, which currently defaults to "master" set -e${GIT_PLAYTREE_SETUP_DEBUG} @@ -26,8 +28,9 @@ case "$gcd" in *) gcd="../$gcd" ;; esac -git init -q +git -c init.defaultBranch=${GIT_PLAYTREE_DEFAULT_BRANCH-master} init -q git config gc.auto 0 +git config diff.noprefix 0 unset_all () { git config --local --unset-all $key || [ $? = 5 ]; } diff --git a/infra/dgit-repos-server b/infra/dgit-repos-server index bbf1aa215..fd199cabe 100755 --- a/infra/dgit-repos-server +++ b/infra/dgit-repos-server @@ -1106,7 +1106,7 @@ sub mode_tag2upload () { or $quit->("tag name not for us"); $version = $1; - $version =~ y/_\%\#/:~/d; + $version =~ y/_\%\#/~:/d; my $work = 'work'; diff --git a/tests/git-srcs/pari-extra_3-1.git.tar b/tests/git-srcs/pari-extra_3-1.git.tar index 6392d8348..7380353ee 100644 Binary files a/tests/git-srcs/pari-extra_3-1.git.tar and b/tests/git-srcs/pari-extra_3-1.git.tar differ diff --git a/tests/lib b/tests/lib index 749509c4f..c8ea771e3 100644 --- a/tests/lib +++ b/tests/lib @@ -58,6 +58,10 @@ export GIT_AUTHOR_DATE='1530000000 +0100' export LC_CTYPE=C.UTF-8 unset CDPATH +# We use git-filter-branch in various tests. +# Nowadays it has a warning with associated sleep. +export FILTER_BRANCH_SQUELCH_WARNING=1 + root=`pwd` troot=$root/tests testname="${DGIT_TEST_TESTNAME-${0##*/}}" @@ -1126,7 +1130,7 @@ t-merge-conflicted-stripping-conflict-markers () { t-commit () { local msg=$1 v=${2:-${majorv:-1}.$revision} - $troot/tstunt/debchange \ + t-debchange \ --force-distribution -v$v --distribution ${3:-unstable} "$1" git add debian/changelog debcommit @@ -1144,10 +1148,14 @@ t-dch-commit-r () { } t-dch-commit () { - $troot/tstunt/debchange "$@" + t-debchange "$@" git commit -m "dch $*" debian/changelog } +t-debchange () { + DEBEMAIL=dgit-te...@example.org $troot/tstunt/debchange "$@" +} + t-git-config () { git config --global "$@" } diff --git a/tests/pkg-srcs/example_1.0-1+absurd.debian.tar.xz b/tests/pkg-srcs/example_1.0-1+absurd.debian.tar.xz index 9a2dd124d..dc1614c29 100644 Binary files a/tests/pkg-srcs/example_1.0-1+absurd.debian.tar.xz and b/tests/pkg-srcs/example_1.0-1+absurd.debian.tar.xz differ diff --git a/tests/pkg-srcs/example_1.0-1+absurd.dsc b/tests/pkg-srcs/example_1.0-1+absurd.dsc index 1ab743ddc..b26fcbe50 100644 --- a/tests/pkg-srcs/example_1.0-1+absurd.dsc +++ b/tests/pkg-srcs/example_1.0-1+absurd.dsc @@ -11,12 +11,12 @@ Package-List: Checksums-Sha1: 2bc730f941db49de57e9678fb0b07bd95507bb44 236 example_1.0.orig-docs.tar.gz 4bff9170ce9b10cb59937195c5ae2c73719fe150 373 example_1.0.orig.tar.gz - dafb6f0db0580179ff246dba1dc2892246e84a2c 1416 example_1.0-1+absurd.debian.tar.xz + c0beeb06befcfbdd5952c6925801ac17c172d29e 1412 example_1.0-1+absurd.debian.tar.xz Checksums-Sha256: ad9671f6b25cdd9f0573f803f702448a45a45183db1d79701aa760bccbeed29c 236 example_1.0.orig-docs.tar.gz a3ef7c951152f3ec754f96fd483457aa88ba06df3084e6f1cc7c25b669567c17 373 example_1.0.orig.tar.gz - 4003c34398894e46823bb3fda69f4351dbd5649e321259cde266a135f0428c51 1416 example_1.0-1+absurd.debian.tar.xz + 673169591a1de79f28da17b08768fd8fb1b1e84721df6f1fd9b4708f33f2c80c 1412 example_1.0-1+absurd.debian.tar.xz Files: cb0cb5487b1e5bcb82547396b4fe93e5 236 example_1.0.orig-docs.tar.gz 599f47808a7754c66aea3cda1b3208d6 373 example_1.0.orig.tar.gz - 0e88c1ed094f09ee7bf57607132d55ee 1416 example_1.0-1+absurd.debian.tar.xz + 27324c0ef68306a4fa9c29ab7ade2492 1412 example_1.0-1+absurd.debian.tar.xz diff --git a/tests/pkg-srcs/example_1.0-1+brokenmeta.debian.tar.xz b/tests/pkg-srcs/example_1.0-1+brokenmeta.debian.tar.xz index caad82023..504bbb603 100644 Binary files a/tests/pkg-srcs/example_1.0-1+brokenmeta.debian.tar.xz and b/tests/pkg-srcs/example_1.0-1+brokenmeta.debian.tar.xz differ diff --git a/tests/pkg-srcs/example_1.0-1+brokenmeta.dsc b/tests/pkg-srcs/example_1.0-1+brokenmeta.dsc index c7c363db3..59d25ce89 100644 --- a/tests/pkg-srcs/example_1.0-1+brokenmeta.dsc +++ b/tests/pkg-srcs/example_1.0-1+brokenmeta.dsc @@ -11,12 +11,12 @@ Package-List: Checksums-Sha1: 2bc730f941db49de57e9678fb0b07bd95507bb44 236 example_1.0.orig-docs.tar.gz 4bff9170ce9b10cb59937195c5ae2c73719fe150 373 example_1.0.orig.tar.gz - 68e0e1e3ec092409652d047e62bd3f0dba5a51f3 1304 example_1.0-1+brokenmeta.debian.tar.xz + 0b7117415e1b3c2e3a9084ef07872c95085ec0aa 1304 example_1.0-1+brokenmeta.debian.tar.xz Checksums-Sha256: ad9671f6b25cdd9f0573f803f702448a45a45183db1d79701aa760bccbeed29c 236 example_1.0.orig-docs.tar.gz a3ef7c951152f3ec754f96fd483457aa88ba06df3084e6f1cc7c25b669567c17 373 example_1.0.orig.tar.gz - 3ef0a50e3c0e025d0facada85d4508469c88150504c079698ae329c0c18bf315 1304 example_1.0-1+brokenmeta.debian.tar.xz + 9383ffabb2a169c252529f2dea098c55d0956fdadba34a8617bfbff47091ac7f 1304 example_1.0-1+brokenmeta.debian.tar.xz Files: cb0cb5487b1e5bcb82547396b4fe93e5 236 example_1.0.orig-docs.tar.gz 599f47808a7754c66aea3cda1b3208d6 373 example_1.0.orig.tar.gz - 2ed3f4310bdda12b58b1b412d1c88dd9 1304 example_1.0-1+brokenmeta.debian.tar.xz + 48308be2bfae98f989e724fb3c52b397 1304 example_1.0-1+brokenmeta.debian.tar.xz diff --git a/tests/pkg-srcs/example_1.0-1.100.debian.tar.xz b/tests/pkg-srcs/example_1.0-1.100.debian.tar.xz index ea8ec34c6..e193d4df8 100644 Binary files a/tests/pkg-srcs/example_1.0-1.100.debian.tar.xz and b/tests/pkg-srcs/example_1.0-1.100.debian.tar.xz differ diff --git a/tests/pkg-srcs/example_1.0-1.100.dsc b/tests/pkg-srcs/example_1.0-1.100.dsc index 5b075b5df..8c7c417a3 100644 --- a/tests/pkg-srcs/example_1.0-1.100.dsc +++ b/tests/pkg-srcs/example_1.0-1.100.dsc @@ -11,12 +11,12 @@ Package-List: Checksums-Sha1: 2bc730f941db49de57e9678fb0b07bd95507bb44 236 example_1.0.orig-docs.tar.gz 4bff9170ce9b10cb59937195c5ae2c73719fe150 373 example_1.0.orig.tar.gz - 86c31eba5e08c1765f8e557b97e59d7e1fd9c208 2108 example_1.0-1.100.debian.tar.xz + 94dbd51291d7534a9e50a2cebfb1f484999e877b 2156 example_1.0-1.100.debian.tar.xz Checksums-Sha256: ad9671f6b25cdd9f0573f803f702448a45a45183db1d79701aa760bccbeed29c 236 example_1.0.orig-docs.tar.gz a3ef7c951152f3ec754f96fd483457aa88ba06df3084e6f1cc7c25b669567c17 373 example_1.0.orig.tar.gz - 163f1a753f0ea382148df8d9553240d503781badf03c600946f1400534da1349 2108 example_1.0-1.100.debian.tar.xz + 1d76c05cc52b1bc517defb336b7d1e8e59651fc19cd6e303b88be45558adca08 2156 example_1.0-1.100.debian.tar.xz Files: cb0cb5487b1e5bcb82547396b4fe93e5 236 example_1.0.orig-docs.tar.gz 599f47808a7754c66aea3cda1b3208d6 373 example_1.0.orig.tar.gz - 4b7f5d286eff2608107c77c96584a01a 2108 example_1.0-1.100.debian.tar.xz + 7f30fd213f0e30613615b2c196c48635 2156 example_1.0-1.100.debian.tar.xz diff --git a/tests/pkg-srcs/example_1.0-1.debian.tar.xz b/tests/pkg-srcs/example_1.0-1.debian.tar.xz index 84ca563dc..4ff8b74f6 100644 Binary files a/tests/pkg-srcs/example_1.0-1.debian.tar.xz and b/tests/pkg-srcs/example_1.0-1.debian.tar.xz differ diff --git a/tests/pkg-srcs/example_1.0-1.dsc b/tests/pkg-srcs/example_1.0-1.dsc index bb65f6ee3..84f0f2e85 100644 --- a/tests/pkg-srcs/example_1.0-1.dsc +++ b/tests/pkg-srcs/example_1.0-1.dsc @@ -11,12 +11,12 @@ Package-List: Checksums-Sha1: 2bc730f941db49de57e9678fb0b07bd95507bb44 236 example_1.0.orig-docs.tar.gz 4bff9170ce9b10cb59937195c5ae2c73719fe150 373 example_1.0.orig.tar.gz - f2398be1e588e10d11b20ee9bc5ca0eb16e4c158 1304 example_1.0-1.debian.tar.xz + 8d131c4fd924859e3462e48a33f669da15684992 1300 example_1.0-1.debian.tar.xz Checksums-Sha256: ad9671f6b25cdd9f0573f803f702448a45a45183db1d79701aa760bccbeed29c 236 example_1.0.orig-docs.tar.gz a3ef7c951152f3ec754f96fd483457aa88ba06df3084e6f1cc7c25b669567c17 373 example_1.0.orig.tar.gz - fd97c0fb879bfa8084f24a0d0f808a56beb533f17d92c808dc293ff297007925 1304 example_1.0-1.debian.tar.xz + 1bc840ae1b76b95ab375c962508a3b14f6958f9766e67c0ef06f5e7dd249d1c7 1300 example_1.0-1.debian.tar.xz Files: cb0cb5487b1e5bcb82547396b4fe93e5 236 example_1.0.orig-docs.tar.gz 599f47808a7754c66aea3cda1b3208d6 373 example_1.0.orig.tar.gz - fd7840d249ee3dba5bdc3dcde7217bbe 1304 example_1.0-1.debian.tar.xz + 593103737fe55b5fafcdc0eda5e7f761 1300 example_1.0-1.debian.tar.xz diff --git a/tests/pkg-srcs/pari-extra_3-1.diff.gz b/tests/pkg-srcs/pari-extra_3-1.diff.gz index 81f7f2ebe..3c3d568e8 100644 Binary files a/tests/pkg-srcs/pari-extra_3-1.diff.gz and b/tests/pkg-srcs/pari-extra_3-1.diff.gz differ diff --git a/tests/pkg-srcs/pari-extra_3-1.dsc b/tests/pkg-srcs/pari-extra_3-1.dsc index 8d67ed0a7..110dbb6cf 100644 --- a/tests/pkg-srcs/pari-extra_3-1.dsc +++ b/tests/pkg-srcs/pari-extra_3-1.dsc @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - Format: 1.0 Source: pari-extra Binary: pari-extra @@ -9,22 +6,14 @@ Version: 3-1 Maintainer: Bill Allombert <ballo...@debian.org> Standards-Version: 3.9.2.0 Build-Depends: debhelper (>= 5) -Package-List: - pari-extra deb math optional -Checksums-Sha1: +Package-List: + pari-extra deb math optional arch=all +Checksums-Sha1: ff281e103ab11681324b0c694dd3514d78436c51 121 pari-extra_3.orig.tar.gz - 080078dbc51e4194d209cb5abe57e2b25705fcaa 2358 pari-extra_3-1.diff.gz -Checksums-Sha256: + ca13e48c1b8e063bd33a8c897c44b2fa54c7b607 2357 pari-extra_3-1.diff.gz +Checksums-Sha256: ac1ef39f9da80b582d1c0b2adfb09b041e3860ed20ddcf57a0e922e3305239df 121 pari-extra_3.orig.tar.gz - bf4672acd5302b9eebee2f3bf5269022279e531204d7172b8761bb10fae3517a 2358 pari-extra_3-1.diff.gz -Files: + 90b5f4bdda25d1bf39530cc14310f51d88c8696eef2589f4a7f5991596fe7b1d 2357 pari-extra_3-1.diff.gz +Files: 76bcf03be979d3331f9051aa88439b8b 121 pari-extra_3.orig.tar.gz - 02a39965adb84da9b3e6b5c5a0a4c378 2358 pari-extra_3-1.diff.gz - ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.10 (GNU/Linux) - -iEYEARECAAYFAk5CvdoACgkQeDPs8bVESBX0mACeK3Yf9y22T2b6tw8eVQ8XSYxH -ix4AoJJ3jrGJ4HXJNv/wbvmvBkkybvYJ -=hkic ------END PGP SIGNATURE----- + 264a508299ea6d57c6a386e26d9d6f49 2357 pari-extra_3-1.diff.gz diff --git a/tests/pkg-srcs/pari-extra_3-2~dummy1.diff.gz b/tests/pkg-srcs/pari-extra_3-2~dummy1.diff.gz index f5dff2b79..a79317238 100644 Binary files a/tests/pkg-srcs/pari-extra_3-2~dummy1.diff.gz and b/tests/pkg-srcs/pari-extra_3-2~dummy1.diff.gz differ diff --git a/tests/pkg-srcs/pari-extra_3-2~dummy1.dsc b/tests/pkg-srcs/pari-extra_3-2~dummy1.dsc index 1042f0904..a55a751f1 100644 --- a/tests/pkg-srcs/pari-extra_3-2~dummy1.dsc +++ b/tests/pkg-srcs/pari-extra_3-2~dummy1.dsc @@ -6,14 +6,14 @@ Version: 3-2~dummy1 Maintainer: Bill Allombert <ballo...@debian.org> Standards-Version: 3.9.2.0 Build-Depends: debhelper (>= 5), package-does-not-exist -Package-List: - pari-extra deb math optional -Checksums-Sha1: +Package-List: + pari-extra deb math optional arch=all +Checksums-Sha1: ff281e103ab11681324b0c694dd3514d78436c51 121 pari-extra_3.orig.tar.gz - 810c43d186ad2552d65949acf4a065fcfc823636 2484 pari-extra_3-2~dummy1.diff.gz -Checksums-Sha256: + 335afa3b9e4b671a67d00e699be080df44fe08fa 2486 pari-extra_3-2~dummy1.diff.gz +Checksums-Sha256: ac1ef39f9da80b582d1c0b2adfb09b041e3860ed20ddcf57a0e922e3305239df 121 pari-extra_3.orig.tar.gz - 41f47f24df7f50555f43549bd8377cce046750d29f69903e04b7fbfe396a0a73 2484 pari-extra_3-2~dummy1.diff.gz -Files: + 2365210b7a21a28659747188464ae1b5869accc714212f6d5d0c6632899c2ca0 2486 pari-extra_3-2~dummy1.diff.gz +Files: 76bcf03be979d3331f9051aa88439b8b 121 pari-extra_3.orig.tar.gz - eff09e2ace409a150646c4994f17f800 2484 pari-extra_3-2~dummy1.diff.gz + 5a4ffde2059a1c4c7280bf63ca99991d 2486 pari-extra_3-2~dummy1.diff.gz diff --git a/tests/pkg-srcs/ruby-rails-3.2_3.2.6-1.debian.tar.gz b/tests/pkg-srcs/ruby-rails-3.2_3.2.6-1.debian.tar.gz deleted file mode 100644 index 633e6db0b..000000000 Binary files a/tests/pkg-srcs/ruby-rails-3.2_3.2.6-1.debian.tar.gz and /dev/null differ diff --git a/tests/pkg-srcs/ruby-rails-3.2_3.2.6-1.debian.tar.xz b/tests/pkg-srcs/ruby-rails-3.2_3.2.6-1.debian.tar.xz new file mode 100644 index 000000000..30a8787a4 Binary files /dev/null and b/tests/pkg-srcs/ruby-rails-3.2_3.2.6-1.debian.tar.xz differ diff --git a/tests/pkg-srcs/ruby-rails-3.2_3.2.6-1.dsc b/tests/pkg-srcs/ruby-rails-3.2_3.2.6-1.dsc index 4f2e29070..f84071815 100644 --- a/tests/pkg-srcs/ruby-rails-3.2_3.2.6-1.dsc +++ b/tests/pkg-srcs/ruby-rails-3.2_3.2.6-1.dsc @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - Format: 3.0 (quilt) Source: ruby-rails-3.2 Binary: ruby-rails-3.2, rails3 @@ -8,30 +5,21 @@ Architecture: all Version: 3.2.6-1 Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintain...@lists.alioth.debian.org> Uploaders: Antonio Terceiro <terce...@debian.org> -Dm-Upload-Allowed: yes Homepage: http://www.rubyonrails.org Standards-Version: 3.9.3 Vcs-Browser: http://git.debian.org/?p=pkg-ruby-extras/ruby-rails.git;a=summary Vcs-Git: git://git.debian.org/pkg-ruby-extras/ruby-rails-3.2.git Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.3.0~) -Package-List: - rails3 deb ruby optional - ruby-rails-3.2 deb ruby optional -Checksums-Sha1: +Package-List: + rails3 deb ruby optional arch=all + ruby-rails-3.2 deb ruby optional arch=all +Checksums-Sha1: f36c3866b22de8ff6875fdbbfbcfb8d18e1f5a89 953 ruby-rails-3.2_3.2.6.orig.tar.gz - 7208250afe7083e258d1fa36cc3a60527608df11 2297 ruby-rails-3.2_3.2.6-1.debian.tar.gz -Checksums-Sha256: + 5a6ca14c46eb4b9297f024675d43002751d560e7 2252 ruby-rails-3.2_3.2.6-1.debian.tar.xz +Checksums-Sha256: 207cfb1ef70aa9458c776deeda8e38ac977cbc852209828793b27d55bebc7bea 953 ruby-rails-3.2_3.2.6.orig.tar.gz - 55decdcdc8248a4153fb7e5688ffdc3c3a2661a95f3870edba3e1eaf40907088 2297 ruby-rails-3.2_3.2.6-1.debian.tar.gz -Files: + ab65b0fe41fff9abb87b538b5d526c2b47af27f784cf4cf2e8c01e399cde7b00 2252 ruby-rails-3.2_3.2.6-1.debian.tar.xz +Files: 05a3954762c2a2101a10dd2efddf7000 953 ruby-rails-3.2_3.2.6.orig.tar.gz - 87bdb28ef5053d825bda80e959e2fd1c 2297 ruby-rails-3.2_3.2.6-1.debian.tar.gz + e1c519bb58a39d01f4dc6828985057fe 2252 ruby-rails-3.2_3.2.6-1.debian.tar.xz Ruby-Versions: all - ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.12 (GNU/Linux) - -iEYEARECAAYFAk/nrgIACgkQDOM8kQ+cso9TjgCfcDl8MvUtKVZP6bPP9IrO93hP -TnAAn1aA67N088u6u/S2VA8UhYjNXhpO -=7sbS ------END PGP SIGNATURE----- diff --git a/tests/pkg-srcs/sunxi-tools_1.2-2.~~dgittest.debian.tar.gz b/tests/pkg-srcs/sunxi-tools_1.2-2.~~dgittest.debian.tar.gz deleted file mode 100644 index c376961d0..000000000 Binary files a/tests/pkg-srcs/sunxi-tools_1.2-2.~~dgittest.debian.tar.gz and /dev/null differ diff --git a/tests/pkg-srcs/sunxi-tools_1.2-2.~~dgittest.debian.tar.xz b/tests/pkg-srcs/sunxi-tools_1.2-2.~~dgittest.debian.tar.xz new file mode 100644 index 000000000..8ac2131e8 Binary files /dev/null and b/tests/pkg-srcs/sunxi-tools_1.2-2.~~dgittest.debian.tar.xz differ diff --git a/tests/pkg-srcs/sunxi-tools_1.2-2.~~dgittest.dsc b/tests/pkg-srcs/sunxi-tools_1.2-2.~~dgittest.dsc index e0161cd78..820022dab 100644 --- a/tests/pkg-srcs/sunxi-tools_1.2-2.~~dgittest.dsc +++ b/tests/pkg-srcs/sunxi-tools_1.2-2.~~dgittest.dsc @@ -9,14 +9,14 @@ Standards-Version: 3.9.5 Vcs-Browser: http://git.debian.org/?p=collab-maint/sunxi-tools.git Vcs-Git: git://git.debian.org/collab-maint/sunxi-tools.git Build-Depends: debhelper (>= 9), pkg-config, libusb-1.0-0-dev, u-boot-tools -Package-List: - sunxi-tools deb utils optional -Checksums-Sha1: +Package-List: + sunxi-tools deb utils optional arch=any +Checksums-Sha1: 2457216dbbf5552c413753f7211f7be3db6aff54 35076 sunxi-tools_1.2.orig.tar.gz - 6f30698cd897b350a4f92b2b5dded69adca6f82e 5182 sunxi-tools_1.2-2.~~dgittest.debian.tar.gz -Checksums-Sha256: + 491322a7e377365cf53104b5dda6a30ede0c01f7 4892 sunxi-tools_1.2-2.~~dgittest.debian.tar.xz +Checksums-Sha256: 03a63203ff79389e728d88ad705e546aa6362a6d08b9901392acb8639998ef95 35076 sunxi-tools_1.2.orig.tar.gz - 0a513f3254d245b59aaffbeb5c43159a6461617c1f6f3c6824646c4259cda406 5182 sunxi-tools_1.2-2.~~dgittest.debian.tar.gz -Files: + 33b627e8958f1bc6d2a9bf1d1a042ac808924d860c09272989067fd57b9fb8e6 4892 sunxi-tools_1.2-2.~~dgittest.debian.tar.xz +Files: dbc55f60559f9db497559176c3c753dd 35076 sunxi-tools_1.2.orig.tar.gz - a6ec0eb0d897b0121dc978fc00db2ea6 5182 sunxi-tools_1.2-2.~~dgittest.debian.tar.gz + 528d6bb421ba55aa1cec176298f8f14c 4892 sunxi-tools_1.2-2.~~dgittest.debian.tar.xz diff --git a/tests/run-all b/tests/run-all index 736e0fe0a..f82705958 100755 --- a/tests/run-all +++ b/tests/run-all @@ -18,7 +18,7 @@ while [ $# != 0 ]; do done ncpus=$(nproc || echo 1) -jcpus=-j$(( ncpus * 134 / 100 )) +jcpus=-j$(( ncpus * 167 / 100 )) if [ "x$DGIT_TESTS_TMPDIR" != x ]; then tmpdir="$PWD" diff --git a/tests/tests/gbp-orig b/tests/tests/gbp-orig index c8436630e..2ac0073a4 100755 --- a/tests/tests/gbp-orig +++ b/tests/tests/gbp-orig @@ -10,6 +10,8 @@ t-tstunt-parsechangelog t-tstunt-debuild t-tstunt-lintian +git config --global diff.noprefix true + : '----- let gbp build a .orig for comparison -----' gbp buildpackage --git-no-sign-tags -us -uc diff --git a/tests/tests/gdr-edits b/tests/tests/gdr-edits index a8b519c7b..c37e9c93a 100755 --- a/tests/tests/gdr-edits +++ b/tests/tests/gdr-edits @@ -7,6 +7,8 @@ t-dependencies GDR t-tstunt-parsechangelog t-setup-import gdr-convert-gbp +git config --global init.defaultBranch trunk + cd $p v=2.0-3 diff --git a/tests/tests/gdr-import-dgitview b/tests/tests/gdr-import-dgitview index 18d06f565..65c87cda0 100755 --- a/tests/tests/gdr-import-dgitview +++ b/tests/tests/gdr-import-dgitview @@ -25,20 +25,20 @@ grep 'bare dgit dsc import with no prior history' ../bare-output git branch before t-expect-fail E:'Could not find or construct a suitable upstream commit' \ -t-git-debrebase convert-from-dgit-view --no-origs +t-git-debrebase convert-from-dgit-view $GDR_DIAGNOSE --no-origs -t-git-debrebase convert-from-dgit-view +t-git-debrebase convert-from-dgit-view $GDR_DIAGNOSE t-gdr-good laundered t-expect-fail E:'already seems to be in git-debrebase format' \ -t-git-debrebase convert-from-dgit-view +t-git-debrebase convert-from-dgit-view $GDR_DIAGNOSE t-refs-same-start t-ref-head -t-git-debrebase --noop-ok convert-from-dgit-view +t-git-debrebase --noop-ok convert-from-dgit-view $GDR_DIAGNOSE t-ref-head -t-git-debrebase -falready-converted convert-from-dgit-view \ +t-git-debrebase -falready-converted convert-from-dgit-view $GDR_DIAGNOSE \ --always-convert-anyway t-expect-fail E:'ref varies' t-ref-head t-gdr-good laundered diff --git a/tests/tests/gdr-merge-conflicts b/tests/tests/gdr-merge-conflicts index 5a3f2432c..05b548049 100755 --- a/tests/tests/gdr-merge-conflicts +++ b/tests/tests/gdr-merge-conflicts @@ -63,8 +63,8 @@ git merge --no-edit -s ours other # we have to do a little dance to make this not a pseudomerge t-git-next-date -dch -a 'Merge, only conflict was in debian/changelog' -t-dch-r-rune dch +t-debchange -a 'Merge, only conflict was in debian/changelog' +t-dch-r-rune t-debchange git commit -a --amend --no-edit wreckage-before diff --git a/tests/tests/mismatches-contents b/tests/tests/mismatches-contents index ea0d72434..e42401656 100755 --- a/tests/tests/mismatches-contents +++ b/tests/tests/mismatches-contents @@ -11,7 +11,7 @@ ln -s $troot/pkg-srcs/${p}_${v%-*}.orig.tar.* . cd $p v=1.0-1 -dch -v $v -D unstable -m 'Make a revision' +t-debchange -v $v -D unstable -m 'Make a revision' echo foo >us-file git add us-file debian/changelog git commit -m "Commit $v" diff --git a/tests/tests/quilt-gbp b/tests/tests/quilt-gbp index e502f6b2b..4dc597d4e 100755 --- a/tests/tests/quilt-gbp +++ b/tests/tests/quilt-gbp @@ -22,6 +22,8 @@ t-tstunt-parsechangelog t-gbp-example-prep +git config --global init.defaultBranch trunk + t-expect-fail 'quilt fixup cannot be linear' \ t-dgit build-source diff --git a/tests/tests/unrepresentable b/tests/tests/unrepresentable index e4b0da85a..fb1cf61ba 100755 --- a/tests/tests/unrepresentable +++ b/tests/tests/unrepresentable @@ -24,11 +24,14 @@ badly-1 () { start } -badly-2 () { +badly-2-raw () { git commit -m "Commit wrongness $wrongfn ($wrongmsg)" - t-expect-fail E:"cannot represent change: $wrongmsg .*: $wrongfn" \ + t-expect-fail "$1" \ attempt } +badly-2 () { + badly-2-raw E:"cannot represent change: $wrongmsg .*: $wrongfn" +} badly-1 orig-symlink 'modified symlink' ln -sf NEWTARGET orig-symlink @@ -39,6 +42,11 @@ badly-1 orig-symlink 'deletion of symlink' git rm -f orig-symlink badly-2 +badly-1 + ln -s hi new + git add new +badly-2-raw 'new version is symlink' + start git rm src.c git commit -m deleted @@ -55,12 +63,6 @@ badly-1 src.c 'mode or type changed' git add src.c badly-2 -badly-1 new 'creation with non-default mode' - echo hi >new - chmod 755 new - git add new -badly-2 - start good diff --git a/tests/update-dh-compat b/tests/update-dh-compat new file mode 100755 index 000000000..6c35c6c70 --- /dev/null +++ b/tests/update-dh-compat @@ -0,0 +1,120 @@ +#!/bin/bash +# dgit +# Integration between git and Debian-style archives +# +# Copyright (C)2013-2021 Ian Jackson +# Copyright (C)2017-2019 Sean Whitton +# Copyright (C)2019 Matthew Vernon / Genome Research Limited +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +set -e + +# This ad-hoc script was wrtten to deal with #1002927. + +export FILTER_BRANCH_SQUELCH_WARNING=1 +toplevel=$PWD + +cd_fresh_d () { + cd "$toplevel" + rm -rf d + mkdir d + cd d +} + +adjust="$toplevel"/tests/update-dh-compat-adjust +adjust () { "$adjust"; } + +git_filter_strip_origs () { + git for-each-ref refs/original \ + --format '%(refname)' | + xargs -rn1 git update-ref -d +} + +adjust_git_filter () { + # this is the dgit origin commit; this check may stop + # us rewriting our normal dgit tree + set +e + git cat-file -e 06fb75074c0bebccdcf86385b8d248fd127ed66d + rc=$? + set -e + test $rc = 1 + + git_filter_strip_origs + + git filter-branch \ + --tree-filter "$adjust" \ + --tag-name-filter cat \ + -- --all + + git_filter_strip_origs + + git gc --aggressive --prune=all +} + +cd "$toplevel" + +for f in tests/pkg-srcs/*.dsc; do + cd_fresh_d + + dpkg-source -x ../$f p + cd p + adjust + dpkg-source -b . + cd .. + dcmd rm ../$f + dcmd mv *.dsc ../tests/pkg-srcs/ + + cd .. +done + +cd "$toplevel" + +for f in tests/git-srcs/*.tar; do + cd_fresh_d + + tar xf ../$f + + p=$(echo *) + cd $p + adjust_git_filter + cd .. + tar cf ../$f $p + + cd .. +done + +cd "$toplevel" + +for f in tests/worktrees/*.tar; do + cd_fresh_d + + tar xf ../$f + + p=$(echo *) + cd $p + adjust_git_filter + adjust + cd .. + + tar cf ../$f $p + + cd .. +done + +cd "$toplevel" + +rm -rf d + +echo ok. diff --git a/tests/update-dh-compat-adjust b/tests/update-dh-compat-adjust new file mode 100755 index 000000000..54305a166 --- /dev/null +++ b/tests/update-dh-compat-adjust @@ -0,0 +1,26 @@ +#!/bin/sh +# dgit +# Integration between git and Debian-style archives +# +# Copyright (C)2013-2021 Ian Jackson +# Copyright (C)2017-2019 Sean Whitton +# Copyright (C)2019 Matthew Vernon / Genome Research Limited +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# See update-dh-compat +# This ad-hoc script was wrtten to deal with #1002927. + +set -e +perl -i -pe 's/^5$/12/' debian/compat diff --git a/tests/worktrees/example_1.0.tar b/tests/worktrees/example_1.0.tar index 11f694f56..658cddc5b 100644 Binary files a/tests/worktrees/example_1.0.tar and b/tests/worktrees/example_1.0.tar differ diff --git a/tests/worktrees/example_1.1.tar b/tests/worktrees/example_1.1.tar index f58c41a81..2c257a359 100644 Binary files a/tests/worktrees/example_1.1.tar and b/tests/worktrees/example_1.1.tar differ diff --git a/tests/worktrees/pari-extra_3-1.tar b/tests/worktrees/pari-extra_3-1.tar index 56b797d65..201f6f51b 100644 Binary files a/tests/worktrees/pari-extra_3-1.tar and b/tests/worktrees/pari-extra_3-1.tar differ diff --git a/tests/worktrees/pari-extra_drs.tar b/tests/worktrees/pari-extra_drs.tar index 94c845544..987b59515 100644 Binary files a/tests/worktrees/pari-extra_drs.tar and b/tests/worktrees/pari-extra_drs.tar differ diff --git a/tests/worktrees/ruby-rails-3.2_test.tar b/tests/worktrees/ruby-rails-3.2_test.tar index 6b0a8243a..eda72b2e3 100644 Binary files a/tests/worktrees/ruby-rails-3.2_test.tar and b/tests/worktrees/ruby-rails-3.2_test.tar differ