|
| 1 | +# SHPIT Arch Packages |
| 2 | + |
| 3 | +Arch Linux package definitions for SHPIT-maintained command-line tools. |
| 4 | + |
| 5 | +## Packages |
| 6 | + |
| 7 | +| Package | Upstream | Notes | |
| 8 | +|---|---|---| |
| 9 | +| `tabex-bin` | `shpitdev/tabex` GitHub Releases | Private release assets. The PKGBUILD is public, but `makepkg` needs GitHub access to the `shpitdev` org to download the release tarball. | |
| 10 | +| `osyrra-bin` | `shpitdev/osyrra` GitHub Releases | Private release assets. Same auth model as `tabex-bin`. | |
| 11 | + |
| 12 | +## Automation |
| 13 | + |
| 14 | +- `.github/workflows/version-bumps.yml` runs on a schedule or manual dispatch, updates package versions/checksums via repo-owned scripts, regenerates `.SRCINFO`, and opens or updates a PR. |
| 15 | +- `.github/workflows/validate.yml` is non-mutating PR validation. It checks PKGBUILD syntax and confirms `.SRCINFO` is in sync. |
| 16 | +- `.github/workflows/publish.yml` publishes every changed package directory to the AUR after changes land on `main`, but cleanly skips publishing until AUR secrets exist. |
| 17 | + |
| 18 | +## Local Usage |
| 19 | + |
| 20 | +Update all packages: |
| 21 | + |
| 22 | +```bash |
| 23 | +./scripts/update-packages.sh auto |
| 24 | +``` |
| 25 | + |
| 26 | +Validate package metadata: |
| 27 | + |
| 28 | +```bash |
| 29 | +./scripts/validate-packages.sh |
| 30 | +``` |
| 31 | + |
| 32 | +Build a package locally: |
| 33 | + |
| 34 | +```bash |
| 35 | +cd <package-dir> |
| 36 | +makepkg -si |
| 37 | +``` |
| 38 | + |
| 39 | +`gh auth login` must be configured with access to the `shpitdev` org before `makepkg` can download the private release assets. |
| 40 | + |
| 41 | +## Temporary Mode |
| 42 | + |
| 43 | +- You can use this repo immediately without creating the AUR repositories or AUR secrets. |
| 44 | +- The scheduled/manual bump workflow uses the repository `GITHUB_TOKEN` for branch and PR operations in this repo. |
| 45 | +- Without `SHPIT_GH_TOKEN`, the workflow skips the private package updates (both `tabex-bin` and `osyrra-bin` need it). |
| 46 | +- Without AUR secrets, the publish workflow exits successfully without pushing anywhere. |
| 47 | + |
| 48 | +## Secrets |
| 49 | + |
| 50 | +- `SHPIT_GH_TOKEN` — required for GitHub Actions to refresh private SHPIT packages from their GitHub releases. |
| 51 | +- `AUR_USERNAME`, `AUR_EMAIL`, `AUR_SSH_PRIVATE_KEY` — optional until you actually want to publish to AUR. |
| 52 | + |
| 53 | +## Local Auth |
| 54 | + |
| 55 | +- Local scripts use your normal `gh auth login` session when you run them from your machine. |
| 56 | +- GitHub-hosted Actions cannot reuse your personal interactive `gh` login session. They only get the repository `GITHUB_TOKEN` plus any secrets you explicitly configure. |
| 57 | + |
| 58 | +## Adding a New Package |
| 59 | + |
| 60 | +1. Create a directory with the package name and add a `PKGBUILD`. |
| 61 | +2. Add a dedicated updater script in `scripts/` if the package needs live version discovery. |
| 62 | +3. Regenerate `.SRCINFO` with `./scripts/render-srcinfo.sh <package-dir>`. |
| 63 | +4. Extend `./scripts/update-packages.sh` if the package should be included in automated bump PRs. |
| 64 | + |
| 65 | +## Ultimate Setup |
| 66 | + |
| 67 | +1. Create the GitHub repository and enable Actions. |
| 68 | +2. In `Settings -> Actions -> General`, set workflow permissions to read and write, and enable GitHub Actions to create pull requests. |
| 69 | +3. Attach the `SHPIT_GH_TOKEN` secret (org-level or repo-level) to this repo so the bump workflow can read the private release assets. |
| 70 | +4. When the AUR repos exist, add `AUR_USERNAME`, `AUR_EMAIL`, and `AUR_SSH_PRIVATE_KEY`. |
| 71 | +5. Run `version-bumps` manually once, confirm the PR output, then merge. |
| 72 | +6. After the first merge, `publish.yml` will start pushing package updates to AUR only if those AUR secrets are present. |
0 commit comments