Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
## Packaging rules

Every `pkgs/<name>/` recipe must satisfy (enforced by `./check`):

1. **Tracked-upstream source, by suffix.** Every `pkgname` ends in one of:
- `-git` — `source=()` is a `git+` VCS source (built from a clone), or
- `-rel` — `source=()` is a `releases/download/` URL (a published git tag).

Both track upstream git; they differ only in whether we build the clone or
install a published release artifact. No other source suffix is allowed.
A trailing `-sys` may be appended to either (`-git-sys` / `-rel-sys`) — see
rule 2.
2. **No `.install` scriptlets, unless the package is `-sys`.** By default a
recipe may have no `install=` line and no `*.install` file. A package that
genuinely needs pre/post scriptlets (systemd units, user creation, cache
refresh, …) must opt in by appending `-sys` to its `pkgname`
(e.g. `foo-git-sys`). Only `*-sys/` dirs can commit a `*.install` — the
allowlist forbids it everywhere else.
3. **At least one `# Maintainer:` line** in the PKGBUILD.

Run `./check` before committing; CI runs it on every PR.

## Recipe allowlist

Under `pkgs/`, only packaging files are tracked — all source code and build
artifacts are ignored, whatever the language. The `.gitignore` allowlist:

- `PKGBUILD`, `.SRCINFO`, `.nvchecker.toml`, `REUSE.toml`
- `*.patch`, `*.diff`, `*.hook`
- `*.service`, `*.sysusers`, `*.tmpfiles`, `*.desktop`
- `keys/**/*.asc`
- `*.install` — **only** inside a `*-sys/` recipe dir (see rule 2)

Anything else in a recipe dir (`.sh`, `.py`, `.rs`, tests, downloaded
tarballs, `pkg/`, `src/`, built packages) is never committed.

## Version tracking & licensing

Each recipe carries two metadata files, mirroring Arch's packaging repos:

- `.nvchecker.toml` — how to find the latest upstream version. `-rel` packages
track a GitHub release; `-git` packages use the `git` source (`use_commit`)
to follow the built repo/branch. `./bump` consumes this for `-rel`.
- `REUSE.toml` — declares the packaging files themselves as `0BSD` (Arch
convention), independent of the upstream project's own license.

## Tooling

Repo-root helper scripts:

- `./check` — validate every recipe against the package rules above. Exits
non-zero on any violation.
- `./dco [<range>]` — verify every non-merge commit in `<range>` (default
`origin/master..HEAD`) carries a `Signed-off-by:` trailer matching its
author. Homebaked DCO check; CI runs it on every push and PR.
- `./clean` — remove all git-ignored build debris (`pkg/`, `src/`, fetched
sources, built packages) repo-wide, after a confirmation prompt.
- `./bump [pkg...]` — refresh packages to the latest upstream state, by tier:
`*-rel` runs `pkgctl version upgrade` + `updpkgsums`; `*-git` re-clones and
reruns `pkgver()` (no hashes to bump — git's ref is the integrity check).
Both regenerate `.SRCINFO`. With no args, refreshes them all.

`./check` and `./bump` source `acrlib`, the single source of truth for the
suffix scheme (`acr_tier`, `acr_is_sys`) — so the tools can't drift on what
`-git`/`-rel`/`-sys` mean. Both treat `-git-sys`/`-rel-sys` as their base tier.

Packaging you'll want: `nvchecker`, `devtools`, `base-devel` and `pacman-contrib`.

---
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pkgs/**/src/
!pkgs/**/.SRCINFO
!pkgs/**/.gitignore
!pkgs/**/.nvchecker.toml
!pkgs/**/REUSE.toml
!pkgs/**/*.patch
!pkgs/**/*.diff
!pkgs/**/*.hook
Expand Down
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright h8d13

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

23 changes: 23 additions & 0 deletions acrlib
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# acrlib shared ACR helpers, sourced by ./check and ./bump.
# Single source of truth for the package-suffix scheme so the tools can't
# drift apart (e.g. one of them forgetting the -sys variants).
#
# <name>-git[-sys] -> tier "git" (git+ VCS source)
# <name>-rel[-sys] -> tier "rel" (releases/download/ source)
# trailing -sys -> opts in to .install scriptlets
#
# Usage: source "$(dirname "$0")/acrlib"

# acr_tier <pkgname> -> prints "git" | "rel" | "" (unknown), ignoring -sys.
acr_tier() {
case "$1" in
*-git|*-git-sys) echo git ;;
*-rel|*-rel-sys) echo rel ;;
*) echo "" ;;
esac
}

# acr_is_sys <pkgname> -> exit 0 if the package opts in to install scriptlets.
acr_is_sys() {
[[ "$1" == *-sys ]]
}
8 changes: 5 additions & 3 deletions bump
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
set -u
shopt -s nullglob

source "$(dirname "$0")/acrlib"

targets=()
if (( $# > 0 )); then
for n in "$@"; do targets+=("pkgs/$n"); done
Expand All @@ -29,13 +31,13 @@ for dir in "${targets[@]}"; do

old=$(sed -n "s/^pkgver=//p" "$dir/PKGBUILD" | head -1)
echo "==> $name (current $old)"
case "$name" in
*-rel)
case "$(acr_tier "$name")" in
rel)
( cd "$dir" && pkgctl version upgrade && updpkgsums \
&& makepkg --printsrcinfo > .SRCINFO )
ok=$?
;;
*-git)
git)
( cd "$dir" && makepkg -od --noprepare \
&& makepkg --printsrcinfo > .SRCINFO )
ok=$?
Expand Down
10 changes: 6 additions & 4 deletions check
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
set -u
shopt -s nullglob

source "$(dirname "$0")/acrlib"

fail=0
checked=0

Expand All @@ -22,14 +24,14 @@ for pkgbuild in pkgs/*/PKGBUILD; do

# Rule 1: tracked-upstream source, validated against the pkgname suffix
pkgname=$(sed -n "s/^pkgname=//p" "$pkgbuild" | tr -d "'\"" | head -1)
case "$pkgname" in
*-git|*-git-sys)
case "$(acr_tier "$pkgname")" in
git)
if ! grep -qE '^[[:space:]]*source.*=.*git\+' "$pkgbuild"; then
echo "FAIL [$name]: -git package has no git+ VCS source"
fail=1
fi
;;
*-rel|*-rel-sys)
rel)
if ! grep -qE '^[[:space:]]*source.*=.*releases/download/' "$pkgbuild"; then
echo "FAIL [$name]: -rel package has no releases/download/ source"
fail=1
Expand All @@ -42,7 +44,7 @@ for pkgbuild in pkgs/*/PKGBUILD; do
esac

# Rule 2: no install scriptlets, unless the pkgname opts in with a -sys suffix
if [[ "$pkgname" != *-sys ]]; then
if ! acr_is_sys "$pkgname"; then
if grep -qE '^[[:space:]]*install=' "$pkgbuild"; then
echo "FAIL [$name]: install= scriptlet declared in PKGBUILD (use a -sys suffix to allow)"
fail=1
Expand Down
4 changes: 4 additions & 0 deletions pkgs/apc-git/.nvchecker.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[apc-git]
source = "git"
git = "https://github.com/h8d13/apc.git"
use_commit = true
9 changes: 9 additions & 0 deletions pkgs/apc-git/REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version = 1

# Packaging files in this recipe are licensed 0BSD (Arch convention),
# independent of the upstream project's own license.
[[annotations]]
path = "**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 Eihdran Lego <hadean-eon-dev@proton.me>"
SPDX-License-Identifier = "0BSD"
5 changes: 5 additions & 0 deletions pkgs/grimoire-git/.nvchecker.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[grimoire-git]
source = "git"
git = "https://github.com/h8d13/grimoire.git"
use_commit = true
branch = "dot-cache"
9 changes: 9 additions & 0 deletions pkgs/grimoire-git/REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version = 1

# Packaging files in this recipe are licensed 0BSD (Arch convention),
# independent of the upstream project's own license.
[[annotations]]
path = "**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 Eihdran Lego <hadean-eon-dev@proton.me>"
SPDX-License-Identifier = "0BSD"
4 changes: 4 additions & 0 deletions pkgs/speedtest-cli-git/.nvchecker.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[speedtest-cli-git]
source = "git"
git = "https://github.com/h8d13/speedtest-cli.git"
use_commit = true
9 changes: 9 additions & 0 deletions pkgs/speedtest-cli-git/REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version = 1

# Packaging files in this recipe are licensed 0BSD (Arch convention),
# independent of the upstream project's own license.
[[annotations]]
path = "**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 Eihdran Lego <hadean-eon-dev@proton.me>"
SPDX-License-Identifier = "0BSD"
9 changes: 9 additions & 0 deletions pkgs/vscodium-rel/REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version = 1

# Packaging files in this recipe are licensed 0BSD (Arch convention),
# independent of the upstream project's own license.
[[annotations]]
path = "**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2026 Eihdran Lego <hadean-eon-dev@proton.me>"
SPDX-License-Identifier = "0BSD"
57 changes: 1 addition & 56 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,69 +4,14 @@
- A valid `GPG` key to sign all commits + SSH setup _(pure web commits will not be accepted)_
- A valid DCO trailer: using `--signoff` or `-s` with `git`
- Any web commits require an email linked and verified
- A valid review from the dictator himself

- All commits on `master`:
- Require linear history
- Only through PRs with a valid review

## Package rules

Every `pkgs/<name>/` recipe must satisfy (enforced by `./check`):

1. **Tracked-upstream source, by suffix.** Every `pkgname` ends in one of:
- `-git` — `source=()` is a `git+` VCS source (built from a clone), or
- `-rel` — `source=()` is a `releases/download/` URL (a published git tag).

Both track upstream git; they differ only in whether we build the clone or
install a published release artifact. No other source suffix is allowed.
A trailing `-sys` may be appended to either (`-git-sys` / `-rel-sys`) — see
rule 2.
2. **No `.install` scriptlets, unless the package is `-sys`.** By default a
recipe may have no `install=` line and no `*.install` file. A package that
genuinely needs pre/post scriptlets (systemd units, user creation, cache
refresh, …) must opt in by appending `-sys` to its `pkgname`
(e.g. `foo-git-sys`). Only `*-sys/` dirs can commit a `*.install` — the
allowlist forbids it everywhere else.
3. **At least one `# Maintainer:` line** in the PKGBUILD.

Run `./check` before committing; CI runs it on every PR.

## Recipe allowlist

Under `pkgs/`, only packaging files are tracked — all source code and build
artifacts are ignored, whatever the language. The `.gitignore` allowlist:

- `PKGBUILD`, `.SRCINFO`, `.nvchecker.toml`
- `*.patch`, `*.diff`, `*.hook`
- `*.service`, `*.sysusers`, `*.tmpfiles`, `*.desktop`
- `keys/**/*.asc`

Anything else in a recipe dir (`.sh`, `.py`, `.rs`, tests, downloaded
tarballs, `pkg/`, `src/`, built packages) is never committed.

## Tooling

Repo-root helper scripts:

- `./check` — validate every recipe against the package rules above. Exits
non-zero on any violation.
- `./dco [<range>]` — verify every non-merge commit in `<range>` (default
`origin/master..HEAD`) carries a `Signed-off-by:` trailer matching its
author. Homebaked DCO check; CI runs it on every push and PR.
- `./clean` — remove all git-ignored build debris (`pkg/`, `src/`, fetched
sources, built packages) repo-wide, after a confirmation prompt.
- `./bump [pkg...]` — refresh packages to the latest upstream state, by tier:
`*-rel` runs `pkgctl version upgrade` + `updpkgsums`; `*-git` re-clones and
reruns `pkgver()` (no hashes to bump — git's ref is the integrity check).
Both regenerate `.SRCINFO`. With no args, refreshes them all.

Packaging you'll want: `nvchecker`, `devtools`, `base-devel` and `pacman-contrib`.

---

## Ruleset

The current GitHub ruleset can be freely consulted through this [file](./ruleset.json)
The full packaging guidelines, tools, can also be seen here [CONTRIB](./.github/CONTRIBUTING.md)

---
Loading