chiark / gitweb /
dgit.git
4 years agoTest suite: Test that trying to reintroduce tainted history fails
Ian Jackson [Sat, 13 Jun 2015 17:45:46 +0000 (18:45 +0100)]
Test suite: Test that trying to reintroduce tainted history fails

4 years agoTest suite: Provide t-prep-mergechangelogs and use it in debpolicy-newreject
Ian Jackson [Sat, 13 Jun 2015 17:08:24 +0000 (18:08 +0100)]
Test suite: Provide t-prep-mergechangelogs and use it in debpolicy-newreject

4 years agoTest suite: Test that taints get auto removed
Ian Jackson [Sat, 13 Jun 2015 16:48:34 +0000 (17:48 +0100)]
Test suite: Test that taints get auto removed

4 years agoInfra: dgit-repos-server-debian: Run check_package on push
Ian Jackson [Sat, 13 Jun 2015 16:47:31 +0000 (17:47 +0100)]
Infra: dgit-repos-server-debian: Run check_package on push

4 years agoInfra: dgit-repos-server-debian: check_package looks in good suites, before consideri...
Ian Jackson [Sat, 13 Jun 2015 16:47:18 +0000 (17:47 +0100)]
Infra: dgit-repos-server-debian: check_package looks in good suites, before considering age

4 years agoInfra: dgit-repos-server-debian: Break out check_package core
Ian Jackson [Sat, 13 Jun 2015 16:46:59 +0000 (17:46 +0100)]
Infra: dgit-repos-server-debian: Break out check_package core

4 years agoTest suite: Wrap a line (nfc)
Ian Jackson [Wed, 10 Jun 2015 20:30:50 +0000 (21:30 +0100)]
Test suite: Wrap a line (nfc)

4 years agoTest suite: t-expect-push-fail checks HEAD object did not arrive
Ian Jackson [Wed, 10 Jun 2015 20:29:52 +0000 (21:29 +0100)]
Test suite: t-expect-push-fail checks HEAD object did not arrive

4 years agoTest suite: test forbidden objects not present
Ian Jackson [Wed, 10 Jun 2015 20:24:40 +0000 (21:24 +0100)]
Test suite: test forbidden objects not present

4 years agoTest suite: Use t-expect-push-fail everywhere
Ian Jackson [Wed, 10 Jun 2015 17:32:44 +0000 (18:32 +0100)]
Test suite: Use t-expect-push-fail everywhere

4 years agoTest suite: Make t-expect-push-fail out of the remains of mustfail
Ian Jackson [Sun, 7 Jun 2015 13:24:19 +0000 (14:24 +0100)]
Test suite: Make t-expect-push-fail out of the remains of mustfail

4 years agoTest suite: Move most of mustfail into t-expect-fail
Ian Jackson [Wed, 10 Jun 2015 17:25:12 +0000 (18:25 +0100)]
Test suite: Move most of mustfail into t-expect-fail

4 years agoTest suite: Make t-expect-fail flexible wrt which grep to run
Ian Jackson [Wed, 10 Jun 2015 17:11:24 +0000 (18:11 +0100)]
Test suite: Make t-expect-fail flexible wrt which grep to run

Change the default to fgrep, and override it in the places where this
is needed.

Also use shell substitution to quote .s in tag name in
debpolicy-newreject.

4 years agoTest suite: Make t-reporefs stash the output
Ian Jackson [Sun, 7 Jun 2015 13:23:52 +0000 (14:23 +0100)]
Test suite: Make t-reporefs stash the output

4 years agoTest suite: drs-push-rejects: use set +o pipefail, not set +e
Ian Jackson [Sun, 7 Jun 2015 13:01:48 +0000 (14:01 +0100)]
Test suite: drs-push-rejects: use set +o pipefail, not set +e

4 years agoTest suite: Move t-reporefs into lib
Ian Jackson [Sun, 31 May 2015 16:37:57 +0000 (17:37 +0100)]
Test suite: Move t-reporefs into lib

4 years agoTest suite: set -o pipefail, in lib
Ian Jackson [Sun, 31 May 2015 16:37:33 +0000 (17:37 +0100)]
Test suite: set -o pipefail, in lib

4 years agoTest suite: Prepare for pipefail in t-git-get-ref
Ian Jackson [Sun, 7 Jun 2015 12:43:15 +0000 (13:43 +0100)]
Test suite: Prepare for pipefail in t-git-get-ref

4 years agoTest suite: Prepare for pipefail in t-apply-diff
Ian Jackson [Sun, 7 Jun 2015 12:42:50 +0000 (13:42 +0100)]
Test suite: Prepare for pipefail in t-apply-diff

4 years agoTest suite: t-git-get-ref: check that argument starts with ref/
Ian Jackson [Sun, 7 Jun 2015 11:17:22 +0000 (12:17 +0100)]
Test suite: t-git-get-ref: check that argument starts with ref/

4 years agoTest suite: Fix call to t-refs-notexist to have refs/
Ian Jackson [Sun, 7 Jun 2015 11:12:31 +0000 (12:12 +0100)]
Test suite: Fix call to t-refs-notexist to have refs/

4 years agoTest suite: Fully test replay attack prevention
Ian Jackson [Sun, 31 May 2015 16:28:31 +0000 (17:28 +0100)]
Test suite: Fully test replay attack prevention

4 years agoTest suite: Make it possible to call t-policy more than once (moving t-dsd out of it)
Ian Jackson [Sun, 31 May 2015 17:31:22 +0000 (18:31 +0100)]
Test suite: Make it possible to call t-policy more than once (moving t-dsd out of it)

4 years agoInfra: dgit-repos-server; In NOFFCHECK but not FRESHREPO case, do not request wrong...
Ian Jackson [Sun, 31 May 2015 17:30:40 +0000 (18:30 +0100)]
Infra: dgit-repos-server; In NOFFCHECK but not FRESHREPO case, do not request wrong ref name

4 years agodgit: Gate sending "previously" on deliberately_not_fast_forward not $forceflag
Ian Jackson [Sun, 31 May 2015 16:45:28 +0000 (17:45 +0100)]
dgit: Gate sending "previously" on deliberately_not_fast_forward not $forceflag

$forceflag will only be set if we actually think the ref is not fast
forwarding.  But the --deliberately flags may cause a repo reset which
will require us to mention the previous state, even if the push
appears to be ff.

4 years agoPush replay prevention protocol: Rename "supersedes" to "previously", as not necessar...
Ian Jackson [Sun, 31 May 2015 16:04:44 +0000 (17:04 +0100)]
Push replay prevention protocol: Rename "supersedes" to "previously", as not necessarily actually superseded

4 years agoTest suite: add some replay prevention tests
Ian Jackson [Sun, 31 May 2015 14:37:30 +0000 (15:37 +0100)]
Test suite: add some replay prevention tests

4 years agoInfra: Document dgit-repos-policy-trusting a bit
Ian Jackson [Sun, 31 May 2015 14:36:16 +0000 (15:36 +0100)]
Infra: Document dgit-repos-policy-trusting a bit

4 years agoInfra: Add dgit-repos-policy-trusting
Ian Jackson [Sun, 31 May 2015 14:36:04 +0000 (15:36 +0100)]
Infra: Add dgit-repos-policy-trusting

Also add the --deliberately-fresh-repo deliberately, both to the
manpage and to dgit's idea of non-fast-forward-ness.

Rename the dgit test only deliberatelies to start with TEST-dgit-only-
rather than having the -dgit-only at the end.

4 years agoTest suite: move t-commit and break out t-policy (nfc)
Ian Jackson [Sun, 31 May 2015 14:33:46 +0000 (15:33 +0100)]
Test suite: move t-commit and break out t-policy (nfc)

4 years agoInfra: Allow FRESHREPO to override "tag already exists"
Ian Jackson [Sun, 31 May 2015 14:32:43 +0000 (15:32 +0100)]
Infra: Allow FRESHREPO to override "tag already exists"

drs-push-rejects test needs updating too.

4 years agoInfra: dgit-repos-server: Fix some typos in debug messages
Ian Jackson [Sun, 31 May 2015 14:32:12 +0000 (15:32 +0100)]
Infra: dgit-repos-server: Fix some typos in debug messages

4 years agoInfra: Make replay prevention file contain tags (by searching for right ref names)
Ian Jackson [Sun, 31 May 2015 14:31:53 +0000 (15:31 +0100)]
Infra: Make replay prevention file contain tags (by searching for right ref names)

4 years agoInfra: document DELIBERATELIES parameter to policy hook
Ian Jackson [Sun, 31 May 2015 14:31:18 +0000 (15:31 +0100)]
Infra: document DELIBERATELIES parameter to policy hook

4 years agoTest suite: Provide t-rm-dput-dropping
Ian Jackson [Sat, 16 May 2015 23:57:56 +0000 (00:57 +0100)]
Test suite: Provide t-rm-dput-dropping

This is needed if tests reuse versions, which we are perhaps going to
have to do to test out the replay prevention.

4 years agoTest suite: finalise replay prevention
Ian Jackson [Thu, 21 May 2015 06:43:38 +0000 (07:43 +0100)]
Test suite: finalise replay prevention

4 years agoinfra: Finish replay prevention
Ian Jackson [Sun, 31 May 2015 10:49:42 +0000 (11:49 +0100)]
infra: Finish replay prevention

4 years agoDgit.pm: git_for_each_ref: Provide optional $git_dir argument
Ian Jackson [Sun, 31 May 2015 10:47:18 +0000 (11:47 +0100)]
Dgit.pm: git_for_each_ref: Provide optional $git_dir argument

4 years agoInfra: New approach to reply prevention hhen NOFFCHECK, involving removed tags file
Ian Jackson [Wed, 27 May 2015 20:39:07 +0000 (21:39 +0100)]
Infra: New approach to reply prevention hhen NOFFCHECK, involving removed tags file

4 years agodgit: Declare a "supersedes" in the signed tag for all previous refs/heads and refs...
Ian Jackson [Wed, 27 May 2015 20:36:15 +0000 (21:36 +0100)]
dgit: Declare a "supersedes" in the signed tag for all previous refs/heads and refs/tags in the repo, when deliberately_not_fast_forward

4 years agodgit: Break out deliberately_not_fast_forward (nfc)
Ian Jackson [Wed, 27 May 2015 20:35:15 +0000 (21:35 +0100)]
dgit: Break out deliberately_not_fast_forward (nfc)

4 years agodgit-repos-policy-debian: better debugging for tainted object checking
Ian Jackson [Wed, 27 May 2015 20:33:17 +0000 (21:33 +0100)]
dgit-repos-policy-debian: better debugging for tainted object checking

4 years agoNew approach to replay prevention - WIP
Ian Jackson [Thu, 21 May 2015 09:12:23 +0000 (10:12 +0100)]
New approach to replay prevention - WIP

4 years agoNew approach to replay prevention - WIP
Ian Jackson [Sun, 31 May 2015 11:15:45 +0000 (12:15 +0100)]
New approach to replay prevention - WIP

4 years agoTest suite: Abstract t-tstunt-parsechangelog
Ian Jackson [Sat, 30 May 2015 12:52:43 +0000 (13:52 +0100)]
Test suite: Abstract t-tstunt-parsechangelog

4 years agoTest suite: Use stunt Dpkg::Changelog::Parse
Ian Jackson [Sat, 30 May 2015 12:50:54 +0000 (13:50 +0100)]
Test suite: Use stunt Dpkg::Changelog::Parse

This saves a further 13s.  Overalll the stunt changelog machinery
saves 28s out of 100s (in my example case, the current
debpolicy-newreject).

4 years agoTest suite: Allow for t-stunt to override Perl modules
Ian Jackson [Sat, 30 May 2015 12:50:36 +0000 (13:50 +0100)]
Test suite: Allow for t-stunt to override Perl modules

4 years agoTest suite: Use stunt dpkg-parsechangelog
Ian Jackson [Sat, 30 May 2015 12:28:21 +0000 (13:28 +0100)]
Test suite: Use stunt dpkg-parsechangelog

This program takes 16ms instead of ~700ms on my computer.  This saves
15s out of 100s for the debpolicy-newreject test (in its current
state).

Currently this is only used by various things in devscripts because
dpkg-source uses /usr/lib/dpkg/parsechangelog/debian directly via a
Perl module Dpkg::Changelog::Parse.

4 years agoTest suite: Provide new t-stunt facility
Ian Jackson [Sat, 30 May 2015 12:27:45 +0000 (13:27 +0100)]
Test suite: Provide new t-stunt facility

4 years agopolicy: Improve taint message recorded in db by --deliberately-not-fast-forward
Ian Jackson [Wed, 27 May 2015 20:32:30 +0000 (21:32 +0100)]
policy: Improve taint message recorded in db by --deliberately-not-fast-forward

4 years agogit_get_ref: Move to Dgit.pm and reimplement
Ian Jackson [Wed, 27 May 2015 20:28:39 +0000 (21:28 +0100)]
git_get_ref: Move to Dgit.pm and reimplement

Use
  git for-each-ref --format=%(objectname) [r]efs/whatever

This pattern won't match literally as a prefix because a ref name
cannot contain [, so it must match according to fnmatch.  whatever
cannot contain fnmatch metacharacters because they're not valid in ref
names.

This is a better idiom because it might directly look up the ref in
question (although currently it probably doesn't).

4 years agoDgit.pm: git_for_each_ref: do not insist that first component after refs/ matches \w+
Ian Jackson [Wed, 27 May 2015 20:28:05 +0000 (21:28 +0100)]
Dgit.pm: git_for_each_ref: do not insist that first component after refs/ matches \w+

4 years agoBreak out ensuredir and make mkrepotmp use it
Ian Jackson [Wed, 27 May 2015 20:24:04 +0000 (21:24 +0100)]
Break out ensuredir and make mkrepotmp use it

4 years agoDgit.pm: git_for_each_tag_referring provides referred-to object id too
Ian Jackson [Sun, 31 May 2015 10:59:48 +0000 (11:59 +0100)]
Dgit.pm: git_for_each_tag_referring provides referred-to object id too

4 years agoMove is_fast_fwd into Dgit.pm
Ian Jackson [Thu, 21 May 2015 06:40:46 +0000 (07:40 +0100)]
Move is_fast_fwd into Dgit.pm

4 years agoMove git_rev_parse into Dgit.pm (renaming it from rev_parse
Ian Jackson [Sun, 17 May 2015 13:45:39 +0000 (14:45 +0100)]
Move git_rev_parse into Dgit.pm (renaming it from rev_parse

4 years agoMove various useful functions into Dgit.pm. Necessitates some slightly fancy footwor...
Ian Jackson [Sun, 17 May 2015 13:45:04 +0000 (14:45 +0100)]
Move various useful functions into Dgit.pm.  Necessitates some slightly fancy footwork with $::us

4 years agoDgit.pm: Move debugging earlier in file (pure code motion)
Ian Jackson [Sun, 17 May 2015 13:42:40 +0000 (14:42 +0100)]
Dgit.pm: Move debugging earlier in file (pure code motion)

4 years agoTests: debpolicy-newreject: Attempt push while still in new
Ian Jackson [Sun, 17 May 2015 13:24:39 +0000 (14:24 +0100)]
Tests: debpolicy-newreject: Attempt push while still in new

4 years agoTests: Introduce t-set-using-tmp and use it in lib and adhoc
Ian Jackson [Sun, 17 May 2015 13:17:37 +0000 (14:17 +0100)]
Tests: Introduce t-set-using-tmp and use it in lib and adhoc

4 years agodgit: Allow --deliberately-not-fast-forward to override dgit's fast forward check
Ian Jackson [Sun, 17 May 2015 13:16:23 +0000 (14:16 +0100)]
dgit: Allow --deliberately-not-fast-forward to override dgit's fast forward check

4 years agoCheck for deliberatelies correctly (in-memory data structures have full name)
Ian Jackson [Sun, 17 May 2015 13:15:34 +0000 (14:15 +0100)]
Check for deliberatelies correctly (in-memory data structures have full name)

4 years agoDgit.pm: Fix next's in git_for_each_tag_referring which should be returns
Ian Jackson [Sun, 17 May 2015 13:14:52 +0000 (14:14 +0100)]
Dgit.pm: Fix next's in git_for_each_tag_referring which should be returns

4 years agoDgit.pm: Add debugging to git_for_each_...
Ian Jackson [Sun, 17 May 2015 13:14:32 +0000 (14:14 +0100)]
Dgit.pm: Add debugging to git_for_each_...

4 years agoInfra: Exit statuses: work around bizarre behaviour of perl die wrt $?, and de-reserv...
Ian Jackson [Sun, 17 May 2015 13:13:25 +0000 (14:13 +0100)]
Infra: Exit statuses: work around bizarre behaviour of perl die wrt $?, and de-reserve policy hook status flag 0x80

4 years agoDgit.pm: Introduce $deliberately_re and use it everywhere
Ian Jackson [Sun, 17 May 2015 13:11:43 +0000 (14:11 +0100)]
Dgit.pm: Introduce $deliberately_re and use it everywhere

4 years agoDgit.pm: export git_for_each_tag_referring
Ian Jackson [Sun, 17 May 2015 13:09:11 +0000 (14:09 +0100)]
Dgit.pm: export git_for_each_tag_referring

4 years agoTests: debpolicy-newreject: Make and use a tag at the start
Ian Jackson [Sun, 17 May 2015 09:59:28 +0000 (10:59 +0100)]
Tests: debpolicy-newreject: Make and use a tag at the start

4 years agoTests: Debian policy: check incoming processing and subsequent cron
Ian Jackson [Sun, 17 May 2015 00:12:19 +0000 (01:12 +0100)]
Tests: Debian policy: check incoming processing and subsequent cron

4 years agoInfra: in dgit-repos-policy-debian, fix history tagg lookup
Ian Jackson [Sun, 17 May 2015 00:11:59 +0000 (01:11 +0100)]
Infra: in dgit-repos-policy-debian, fix history tagg lookup

4 years agoInfra: in dgit-repos-policy-debian, pass dgit api-query query specs with no leading /
Ian Jackson [Sun, 17 May 2015 00:11:39 +0000 (01:11 +0100)]
Infra: in dgit-repos-policy-debian, pass dgit api-query query specs with no leading /

4 years agoTests: debpolicy-newreject: Make each tree a new version (with dch and debcommit)
Ian Jackson [Sat, 16 May 2015 23:58:51 +0000 (00:58 +0100)]
Tests: debpolicy-newreject: Make each tree a new version (with dch and debcommit)

4 years agoTests: Make some t-archive* functions take a suite
Ian Jackson [Sat, 16 May 2015 23:46:32 +0000 (00:46 +0100)]
Tests: Make some t-archive* functions take a suite

4 years agoTests: debpolicy-newreject: Explicitly check the state of the repo after each operation
Ian Jackson [Sat, 16 May 2015 23:30:46 +0000 (00:30 +0100)]
Tests: debpolicy-newreject: Explicitly check the state of the repo after each operation

4 years agoTests: break out t-git-dir-time-passes
Ian Jackson [Sat, 16 May 2015 23:29:54 +0000 (00:29 +0100)]
Tests: break out t-git-dir-time-passes

4 years agoTests: Check that --deliberately-include-questionable-history actually works
Ian Jackson [Sat, 16 May 2015 23:10:58 +0000 (00:10 +0100)]
Tests: Check that --deliberately-include-questionable-history actually works

4 years agoTests: Fix a typo
Ian Jackson [Sat, 16 May 2015 23:10:41 +0000 (00:10 +0100)]
Tests: Fix a typo

4 years agoInfra: in dgit-repos-server, produce less verbose message when policy hook rejects
Ian Jackson [Sat, 16 May 2015 23:10:33 +0000 (00:10 +0100)]
Infra: in dgit-repos-server, produce less verbose message when policy hook rejects

4 years agoInfra: in dgit-repos-policy-debian actually call getpushinfo
Ian Jackson [Sat, 16 May 2015 23:10:11 +0000 (00:10 +0100)]
Infra: in dgit-repos-policy-debian actually call getpushinfo

4 years agoInfra: Put correct value into taintoverrides for questionable history; document the...
Ian Jackson [Sat, 16 May 2015 23:09:44 +0000 (00:09 +0100)]
Infra: Put correct value into taintoverrides for questionable history; document the field contents in a comment

4 years agoTests: Test rejection of removed NEW package
Ian Jackson [Wed, 13 May 2015 17:27:41 +0000 (18:27 +0100)]
Tests: Test rejection of removed NEW package

4 years agoTests: Exercise policy periodic hook
Ian Jackson [Sun, 3 May 2015 10:31:58 +0000 (11:31 +0100)]
Tests: Exercise policy periodic hook

4 years agoTests: Provide minimal test package (which is much faster), and use it in debpolicy...
Ian Jackson [Sat, 16 May 2015 22:28:25 +0000 (23:28 +0100)]
Tests: Provide minimal test package (which is much faster), and use it in debpolicy-newreject

4 years agodgit-repos-policy-debian: Fix taint overrides sql (and print it out for debugging)
Ian Jackson [Sat, 16 May 2015 22:23:37 +0000 (23:23 +0100)]
dgit-repos-policy-debian: Fix taint overrides sql (and print it out for debugging)

4 years agoTests: t-prep-newpackage: Cope with source git which has a master already
Ian Jackson [Sat, 16 May 2015 22:22:55 +0000 (23:22 +0100)]
Tests: t-prep-newpackage: Cope with source git which has a master already

4 years agoTests: t-prep-newpackage: don't brokenly set v=3-1
Ian Jackson [Sat, 16 May 2015 22:22:33 +0000 (23:22 +0100)]
Tests: t-prep-newpackage: don't brokenly set v=3-1

4 years agodgit-repos-server: Remove obsolete duplicate settings of some ENVs for stunt hook
Ian Jackson [Mon, 11 May 2015 08:35:40 +0000 (09:35 +0100)]
dgit-repos-server: Remove obsolete duplicate settings of some ENVs for stunt hook

4 years agoInfra: pass $distrodir to policy hook (as yet unused, intended for config)
Ian Jackson [Mon, 11 May 2015 08:35:16 +0000 (09:35 +0100)]
Infra: pass $distrodir to policy hook (as yet unused, intended for config)

4 years agodgit-repos-policy-debian: Fix new repo checks
Ian Jackson [Mon, 11 May 2015 08:21:12 +0000 (09:21 +0100)]
dgit-repos-policy-debian: Fix new repo checks

4 years agodgit-repos-policy-debian: Move time check (nfc, apart from debugging)
Ian Jackson [Mon, 11 May 2015 08:06:12 +0000 (09:06 +0100)]
dgit-repos-policy-debian: Move time check (nfc, apart from debugging)

4 years agodgit-repos-server: Debug when we movetogarbage
Ian Jackson [Mon, 11 May 2015 07:58:06 +0000 (08:58 +0100)]
dgit-repos-server: Debug when we movetogarbage

4 years agodgit-repos-policy-debian: Fix add_taint
Ian Jackson [Mon, 11 May 2015 07:57:52 +0000 (08:57 +0100)]
dgit-repos-policy-debian: Fix add_taint

4 years agogit_for_each_ref: Fix FH handling
Ian Jackson [Mon, 11 May 2015 07:57:33 +0000 (08:57 +0100)]
git_for_each_ref: Fix FH handling

4 years agodgit-repos-policy-debian: Fix error handling, and test fixes
Ian Jackson [Mon, 11 May 2015 06:59:00 +0000 (07:59 +0100)]
dgit-repos-policy-debian: Fix error handling, and test fixes

4 years agodgit-repos-policy-debian: Fix check-list printing
Ian Jackson [Mon, 4 May 2015 16:50:55 +0000 (17:50 +0100)]
dgit-repos-policy-debian: Fix check-list printing

4 years agodgit: Print curl command for archive api query action
Ian Jackson [Mon, 4 May 2015 16:50:36 +0000 (17:50 +0100)]
dgit: Print curl command for archive api query action

4 years agodgit-repos-policy-debian: WIP bugfixes to debugging
Ian Jackson [Mon, 4 May 2015 16:42:44 +0000 (17:42 +0100)]
dgit-repos-policy-debian: WIP bugfixes to debugging

4 years agodgit-repos-policy-debian: WIP bugfixes to debugging
Ian Jackson [Mon, 4 May 2015 16:35:40 +0000 (17:35 +0100)]
dgit-repos-policy-debian: WIP bugfixes to debugging

4 years agoShow git config queries only with debuglevel 3 (-DDD) and higher.
Ian Jackson [Mon, 4 May 2015 16:35:21 +0000 (17:35 +0100)]
Show git config queries only with debuglevel 3 (-DDD) and higher.

4 years agodgit-repos-policy-debian: Fix mode calculation
Ian Jackson [Mon, 4 May 2015 16:23:37 +0000 (17:23 +0100)]
dgit-repos-policy-debian: Fix mode calculation