Expand declarative upstream providers

This commit is contained in:
Ryan Hughes committed 2026-09-03 22:13:59 -04:00
1 parent d9705d0e2f
commit b89770c1da
17 files changed
+372 -209

No files matched your search

@@ -1,4 +1,13 @@
{
"source": "local",
"release_ring": "fast"
"release_ring": "fast",
"upstream": {
"npm": "@github/copilot",
"sources": {
"any": [
"{npm_tarball}",
"https://raw.githubusercontent.com/github/copilot-cli/v{pkgver}/changelog.md"
]
}
}
}
@@ -1,34 +0,0 @@
#!/bin/bash
# GitHub Copilot CLI is published to npm. Track npm's stable `latest` tag,
# then hash both inputs the PKGBUILD downloads. AUR is deliberately not part
# of this update path: Omarchy owns the multi-architecture recipe.
set -euo pipefail
REGISTRY_URL="https://registry.npmjs.org/@github%2Fcopilot"
CHANGELOG_BASE="https://raw.githubusercontent.com/github/copilot-cli"
metadata=$(curl -fsSL "$REGISTRY_URL")
version=$(jq -r '."dist-tags".latest // ""' <<<"$metadata")
tarball=$(jq -r --arg version "$version" '.versions[$version].dist.tarball // ""' <<<"$metadata")
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ || ! $tarball =~ ^https://registry\.npmjs\.org/ ]]; then
echo "npm returned an unusable Copilot release: version='$version' tarball='$tarball'" >&2
exit 1
fi
current=$(grep -m1 '^pkgver=' PKGBUILD | cut -d= -f2- | tr -d "\"'")
if [[ $(vercmp "$version" "$current") -le 0 ]]; then
echo '{}'
exit 0
fi
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
curl -fsSL -o "$work/copilot.tgz" "$tarball"
curl -fsSL -o "$work/changelog.md" "$CHANGELOG_BASE/v${version}/changelog.md"
jq -n \
--arg pkgver "$version" \
--arg package_sum "$(sha256sum "$work/copilot.tgz" | cut -d' ' -f1)" \
--arg changelog_sum "$(sha256sum "$work/changelog.md" | cut -d' ' -f1)" \
'{pkgver: $pkgver, sha256sums: {any: [$package_sum, $changelog_sum]}}'
+8 -1
View File
@@ -1,3 +1,10 @@
{
"source": "local"
"source": "local",
"upstream": {
"git_tags": "https://github.com/FrameworkComputer/qmk_hid.git",
"tag_pattern": "v{pkgver}",
"sources": {
"any": ["https://github.com/FrameworkComputer/qmk_hid/archive/refs/tags/{tag}.tar.gz"]
}
}
}
-27
View File
@@ -1,27 +0,0 @@
#!/bin/bash
# qmk_hid marks every GitHub Release as a prerelease, including the versions
# it considers current. Track its semver tags instead and hash the tagged
# source archive only when a newer version appears.
set -euo pipefail
REPO="https://github.com/FrameworkComputer/qmk_hid.git"
best=""
while read -r tag; do
tag=${tag%\^\{\}}
[[ $tag =~ ^v([0-9]+\.[0-9]+\.[0-9]+)$ ]] || continue
version=${BASH_REMATCH[1]}
if [[ -z $best || $(vercmp "$version" "$best") -gt 0 ]]; then
best=$version
fi
done < <(git ls-remote --tags "$REPO" | sed 's#^.*refs/tags/##')
[[ -n $best ]] || { echo "No usable qmk_hid version tag found" >&2; exit 1; }
current=$(grep -m1 '^pkgver=' PKGBUILD | cut -d= -f2- | tr -d "\"'")
if [[ $(vercmp "$best" "$current") -le 0 ]]; then
echo '{}'
exit 0
fi
sum=$(curl -fsSL "https://github.com/FrameworkComputer/qmk_hid/archive/refs/tags/v${best}.tar.gz" | sha256sum | cut -d' ' -f1)
jq -n --arg pkgver "$best" --arg sha256 "$sum" \
'{pkgver: $pkgver, sha256sums: {any: [$sha256]}}'
+8 -1
View File
@@ -1,4 +1,11 @@
{
"source": "local",
"release_ring": "fast"
"release_ring": "fast",
"upstream": {
"github": "symfony-cli/symfony-cli",
"checksums": "checksums.txt",
"assets": {
"any": "symfony-cli-{pkgver}.tar.gz"
}
}
}
@@ -1,30 +0,0 @@
#!/bin/bash
# Symfony publishes a checksum manifest with every stable GitHub release.
# The `latest` URL is its vendor-maintained stable feed, so no GitHub API or
# AUR state is involved in selecting and verifying the source tarball.
set -euo pipefail
CHECKSUMS_URL="https://github.com/symfony-cli/symfony-cli/releases/latest/download/checksums.txt"
checksums=$(curl -fsSL "$CHECKSUMS_URL")
best=""
best_sum=""
while read -r sum filename; do
[[ $filename =~ ^symfony-cli-([0-9]+\.[0-9]+\.[0-9]+)\.tar\.gz$ ]] || continue
version=${BASH_REMATCH[1]}
[[ $sum =~ ^[0-9a-f]{64}$ ]] || continue
if [[ -z $best || $(vercmp "$version" "$best") -gt 0 ]]; then
best=$version
best_sum=$sum
fi
done <<<"$checksums"
[[ -n $best ]] || { echo "Symfony's latest checksum manifest names no source tarball" >&2; exit 1; }
current=$(grep -m1 '^pkgver=' PKGBUILD | cut -d= -f2- | tr -d "\"'")
if [[ $(vercmp "$best" "$current") -le 0 ]]; then
echo '{}'
exit 0
fi
jq -n --arg pkgver "$best" --arg sha256 "$best_sum" \
'{pkgver: $pkgver, sha256sums: {any: [$sha256]}}'
+8 -1
View File
@@ -1,3 +1,10 @@
{
"source": "local"
"source": "local",
"upstream": {
"git_tags": "https://github.com/jondkinney/tensaku.git",
"tag_pattern": "v{pkgver}",
"sources": {
"any": ["https://github.com/jondkinney/tensaku/archive/refs/tags/{tag}.tar.gz"]
}
}
}
-26
View File
@@ -1,26 +0,0 @@
#!/bin/bash
# Tensaku publishes semver tags but no source checksum manifest. Select the
# newest tag using pacman's ordering and hash its source archive.
set -euo pipefail
REPO="https://github.com/jondkinney/tensaku.git"
version=""
while read -r tag; do
tag=${tag%\^\{\}}
[[ $tag =~ ^v([0-9]+\.[0-9]+\.[0-9]+)$ ]] || continue
candidate=${BASH_REMATCH[1]}
if [[ -z $version || $(vercmp "$candidate" "$version") -gt 0 ]]; then
version=$candidate
fi
done < <(git ls-remote --tags "$REPO" | sed 's#^.*refs/tags/##')
[[ -n $version ]] || { echo "No usable Tensaku version tag found" >&2; exit 1; }
current=$(grep -m1 '^pkgver=' PKGBUILD | cut -d= -f2- | tr -d "\"'")
if [[ $(vercmp "$version" "$current") -le 0 ]]; then
echo '{}'
exit 0
fi
sum=$(curl -fsSL "https://github.com/jondkinney/tensaku/archive/refs/tags/v${version}.tar.gz" | sha256sum | cut -d' ' -f1)
jq -n --arg pkgver "$version" --arg sha256 "$sum" \
'{pkgver: $pkgver, sha256sums: {any: [$sha256]}}'
+8 -1
View File
@@ -1,3 +1,10 @@
{
"source": "local"
"source": "local",
"upstream": {
"git_tags": "https://github.com/cdown/tzupdate.git",
"tag_pattern": "{pkgver}",
"sources": {
"any": ["https://github.com/cdown/tzupdate/archive/refs/tags/{tag}.tar.gz"]
}
}
}
-26
View File
@@ -1,26 +0,0 @@
#!/bin/bash
# tzupdate publishes version tags but no GitHub Releases. Track its semver
# tags and hash the tagged source archive when a new version appears.
set -euo pipefail
REPO="https://github.com/cdown/tzupdate.git"
best=""
while read -r tag; do
tag=${tag%\^\{\}}
[[ $tag =~ ^v?([0-9]+\.[0-9]+\.[0-9]+)$ ]] || continue
version=${BASH_REMATCH[1]}
if [[ -z $best || $(vercmp "$version" "$best") -gt 0 ]]; then
best=$version
fi
done < <(git ls-remote --tags "$REPO" | sed 's#^.*refs/tags/##')
[[ -n $best ]] || { echo "No usable tzupdate version tag found" >&2; exit 1; }
current=$(grep -m1 '^pkgver=' PKGBUILD | cut -d= -f2- | tr -d "\"'")
if [[ $(vercmp "$best" "$current") -le 0 ]]; then
echo '{}'
exit 0
fi
sum=$(curl -fsSL "https://github.com/cdown/tzupdate/archive/refs/tags/${best}.tar.gz" | sha256sum | cut -d' ' -f1)
jq -n --arg pkgver "$best" --arg sha256 "$sum" \
'{pkgver: $pkgver, sha256sums: {any: [$sha256]}}'
+12 -1
View File
@@ -1,3 +1,14 @@
{
"source": "local"
"source": "local",
"upstream": {
"git_tags": "https://gitlab.com/vicamo/v4l2-relayd.git",
"tag_pattern": "upstream/{pkgver}",
"sources": {
"any": [
"https://gitlab.com/vicamo/v4l2-relayd/-/archive/upstream/{pkgver}/v4l2-relayd-upstream-{pkgver}.tar.gz",
"file:0001-reset-output-on-idle.patch",
"file:0002-escape-optional-splashsrc-expansion.patch"
]
}
}
}
@@ -1,26 +0,0 @@
#!/bin/bash
# v4l2-relayd uses GitLab tags named upstream/<version>. Keep Omarchy's local
# patches and follow that authoritative tag stream directly.
set -euo pipefail
REPO="https://gitlab.com/vicamo/v4l2-relayd.git"
best=""
while read -r tag; do
tag=${tag%\^\{\}}
[[ $tag =~ ^upstream/([0-9]+\.[0-9]+\.[0-9]+)$ ]] || continue
version=${BASH_REMATCH[1]}
if [[ -z $best || $(vercmp "$version" "$best") -gt 0 ]]; then
best=$version
fi
done < <(git ls-remote --tags "$REPO" | sed 's#^.*refs/tags/##')
[[ -n $best ]] || { echo "No usable v4l2-relayd upstream tag found" >&2; exit 1; }
current=$(grep -m1 '^pkgver=' PKGBUILD | cut -d= -f2- | tr -d "\"'")
if [[ $(vercmp "$best" "$current") -le 0 ]]; then
echo '{}'
exit 0
fi
sum=$(curl -fsSL "https://gitlab.com/vicamo/v4l2-relayd/-/archive/upstream/${best}/v4l2-relayd-upstream-${best}.tar.gz" | sha256sum | cut -d' ' -f1)
jq -n --arg pkgver "$best" --arg sha256 "$sum" \
'{pkgver: $pkgver, sha256sums: {any: [$sha256, "SKIP", "SKIP"]}}'
+2 -2
View File
@@ -19,8 +19,8 @@ source=("https://gitlab.com/vicamo/v4l2-relayd/-/archive/upstream/${pkgver}/v4l2
"0001-reset-output-on-idle.patch"
"0002-escape-optional-splashsrc-expansion.patch")
sha256sums=('0c063edf18dcc6edcdef46e695128cfc2b2d60964ea8538c7e79a2454310c53d'
'SKIP'
'SKIP')
'07722a8708ced48d2db9575f3eae5b1266868d259d260635e06e9a10baddec78'
'3cb89056af276eed7a45dfc96435e8e48558e4e11c96560360d46d631b1c0b6c')
prepare() {
cd "$srcdir/${pkgname}-upstream-${pkgver}"