From 0b3cb443e70b46ec61455255c3ddfc2a26997613 Mon Sep 17 00:00:00 2001 From: aur-build Date: Wed, 18 Nov 2026 07:16:36 +0000 Subject: =?UTF-8?q?watch:=20two-stage=20VCS=20watcher=20=E2=80=94=20ls-rem?= =?UTF-8?q?ote=20probe,=20pkgver()=20resolution,=20pin=20capture=20(=C2=A7?= =?UTF-8?q?5.2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stage A probes every VCS source in source=() with git ls-remote, respecting #commit/#tag/#branch fragments, and returns one UpstreamPin per source. If the tip set equals the accepted release's pins, nothing can have changed and Stage B never runs — the common case costs one round trip per source and no clone. svn/hg have no cheap universal probe, so they are reported as unprobed and force Stage B rather than being silently treated as unchanged. Stage B runs only on movement: it fetches into a persistent vcs_cache (rather than re-cloning a multi-gigabyte upstream daily), runs makepkg --vercheck, and captures the pins from the clone it already has. Results are cached on (pkgbase, recipe_hash, upstream_tip) with a per-pkgbase cooldown, and a process-wide slot cap bounds concurrent resolutions. The resolved epoch:pkgver-pkgrel plus the pins go into identity_hash, so a different commit is a different thing to approve. Also fixes a misclassification the new path exposed: a VCS source's digest is its pin, so upstream movement showed up as an integrity_alert. Integrity events are now restricted to fixed downloads; VCS movement under a frozen pkgver is pin_drift, as §5.2 specifies. New fixtures git-multi (two upstreams) and git-tagged (#tag pin). 10 tests in tests/vcs.rs. --- testcorpus/git-multi/PKGBUILD | 19 +++++++++++++++++++ testcorpus/git-multi/manifest.json | 12 ++++++++++++ testcorpus/git-tagged/PKGBUILD | 15 +++++++++++++++ testcorpus/git-tagged/manifest.json | 12 ++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 testcorpus/git-multi/PKGBUILD create mode 100644 testcorpus/git-multi/manifest.json create mode 100644 testcorpus/git-tagged/PKGBUILD create mode 100644 testcorpus/git-tagged/manifest.json (limited to 'testcorpus') diff --git a/testcorpus/git-multi/PKGBUILD b/testcorpus/git-multi/PKGBUILD new file mode 100644 index 0000000..3f55f20 --- /dev/null +++ b/testcorpus/git-multi/PKGBUILD @@ -0,0 +1,19 @@ +pkgbase=git-multi +pkgver=r1.0 +pkgrel=1 +pkgdesc="synthetic fixture with two upstream repos" +url="https://example.invalid/git-multi" +license=(MIT) +arch=(x86_64) +source=("git+file://@UPSTREAM_DIR@" "git+file://@UPSTREAM2_DIR@") +sha256sums=("SKIP" "SKIP") +makedepends=("git") +build() { + echo building git-multi +} +package_git-multi() { + echo packaging git-multi +} +pkgver() { + printf "r%s" "$(git -C @UPSTREAM_DIR@ rev-list --count HEAD)" +} diff --git a/testcorpus/git-multi/manifest.json b/testcorpus/git-multi/manifest.json new file mode 100644 index 0000000..bedfd29 --- /dev/null +++ b/testcorpus/git-multi/manifest.json @@ -0,0 +1,12 @@ +{ + "name": "git-multi", + "build": "succeed", + "sig": true, + "packages": [], + "installed": [ + { "name": "glibc", "version": "2.39-1", "arch": "x86_64" } + ], + "log_lines": ["==> Making package."], + "vercheck": "r1-1", + "expect": { "notes": "two VCS sources, two pin entries (§5.2: probe every source, not just the first)" } +} diff --git a/testcorpus/git-tagged/PKGBUILD b/testcorpus/git-tagged/PKGBUILD new file mode 100644 index 0000000..aed4c58 --- /dev/null +++ b/testcorpus/git-tagged/PKGBUILD @@ -0,0 +1,15 @@ +pkgbase=git-tagged +pkgver=1.0 +pkgrel=1 +pkgdesc="synthetic fixture pinned to a tag" +url="https://example.invalid/git-tagged" +license=(MIT) +arch=(x86_64) +source=("git+file://@UPSTREAM_DIR@#tag=v1") +sha256sums=("SKIP") +build() { + echo building git-tagged +} +package_git-tagged() { + echo packaging git-tagged +} diff --git a/testcorpus/git-tagged/manifest.json b/testcorpus/git-tagged/manifest.json new file mode 100644 index 0000000..9c6b890 --- /dev/null +++ b/testcorpus/git-tagged/manifest.json @@ -0,0 +1,12 @@ +{ + "name": "git-tagged", + "build": "succeed", + "sig": true, + "packages": [], + "installed": [ + { "name": "glibc", "version": "2.39-1", "arch": "x86_64" } + ], + "log_lines": ["==> Making package."], + "vercheck": "1.0-1", + "expect": { "notes": "#tag=v1 respected: upstream movement must not move this pin" } +} -- cgit v1.2.3