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
3 changes: 1 addition & 2 deletions docs/adr/0052-apt-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ packages, built and tested here and attached to each release.
| NuGet | .NET users | `dotnet tool install -g ivi-cli` |
| GitHub Releases | downloading a file by hand, and mise | archives, and from this ADR `.deb` files |
| APT repository | Debian and Ubuntu | `apt install ivicli` |
| AUR | Arch Linux | `ivi-cli-bin` or `ivi-cli`, from `packaging/aur` |

The container image (ADR 0018) keeps its own role as a mock instrument.
`packaging/aur` holds AUR build files, but nothing is published to the
AUR yet.

### 2. The package

Expand Down
13 changes: 6 additions & 7 deletions docs/guides/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,15 @@ the smaller download.

## Arch Linux

The packages are to be published to the AUR as
Two packages are on the AUR,
[`ivi-cli-bin`](https://aur.archlinux.org/packages/ivi-cli-bin) and
[`ivi-cli`](https://aur.archlinux.org/packages/ivi-cli), and are not there
yet. Their PKGBUILDs are in this repository, and `makepkg` builds and
installs either one:
[`ivi-cli`](https://aur.archlinux.org/packages/ivi-cli). An AUR helper
installs either one, or `makepkg` builds it from the AUR's git repository:

```sh
git clone https://github.com/ShortArrow/ivi-cli.git
cd ivi-cli/packaging/aur/ivi-cli-bin # prebuilt, carries its own runtime, no .NET needed
# or: cd ivi-cli/packaging/aur/ivi-cli # built from source against the system .NET
git clone https://aur.archlinux.org/ivi-cli-bin.git # prebuilt, carries its own runtime, no .NET needed
# or: git clone https://aur.archlinux.org/ivi-cli.git # built from source against the system .NET
cd ivi-cli-bin
makepkg -si
```

Expand Down
21 changes: 13 additions & 8 deletions packaging/aur/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# AUR packaging

`ivi-cli-bin/` holds the PKGBUILD to be published to the AUR as
[`ivi-cli-bin`](https://aur.archlinux.org/packages/ivi-cli-bin). Nothing is
published there yet; until it is, `makepkg -si` in either directory builds
and installs the package locally. It repackages
`ivi-cli-bin/` holds the PKGBUILD published to the AUR as
[`ivi-cli-bin`](https://aur.archlinux.org/packages/ivi-cli-bin), and
`ivi-cli/` the one published as
[`ivi-cli`](https://aur.archlinux.org/packages/ivi-cli). `makepkg -si` in
either directory also builds and installs the package locally.
`ivi-cli-bin` repackages
the self-contained `ivicli-<version>-linux-x64.zip` asset from the matching
GitHub Release, so the package installs a working `ivicli` on a machine with no
.NET at all. Releases up to v0.3.1 named that asset
Expand Down Expand Up @@ -111,21 +113,24 @@ Pushing needs an AUR account with a registered SSH public key, so it is a
maintainer action and cannot run from CI — the release workflow deliberately
stops at uploading assets.

First time, clone the (possibly empty) AUR repo:
Clone the AUR repo once:

```sh
git clone ssh://aur@aur.archlinux.org/ivi-cli-bin.git aur-ivi-cli-bin
```

Then, for each release, copy the two files across and push:
Then, for each release, copy the two files across and push. The AUR accepts
only its `master` branch, so the push names it:

```sh
cp packaging/aur/ivi-cli-bin/{PKGBUILD,.SRCINFO} aur-ivi-cli-bin/
cd aur-ivi-cli-bin
git add PKGBUILD .SRCINFO
git commit -m "upgpkg: ivi-cli-bin 0.4.0-1"
git push
git commit -m "upgpkg: ivi-cli-bin 0.5.0beta.1-1"
git push origin HEAD:master
```

`ivi-cli` is published the same way from `ssh://aur@aur.archlinux.org/ivi-cli.git`.

The AUR runs a server-side hook that parses `.SRCINFO`; a push that fails there
is rejected outright rather than landing half-applied.
Loading