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
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,31 @@ jobs:

- name: Run workspace checks
run: pnpm check

validate-aur-source:
name: Build source AUR package on Arch Linux
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout
uses: actions/checkout@v7.0.0
with:
fetch-depth: 0

- name: Build and inspect source package
run: |
set -euo pipefail
release_tag="$(git describe --tags --abbrev=0 --match 'v[0-9]*')"
export LOOPWIRE_AUR_VERSION="${release_tag#v}"
docker run --rm \
--env LOOPWIRE_AUR_VERSION \
--volume "$GITHUB_WORKSPACE:/workspace:ro" \
archlinux@sha256:84cd9ef000b3cff245ec028e87965b84724f4bf1cc63fc2741ba927b88515ed6 \
bash -ceu '
pacman -Syu --noconfirm --needed \
curl git namcap nodejs pipewire pnpm rust webkit2gtk-4.1 wireplumber
useradd --create-home aur-builder
runuser -u aur-builder -- env HOME=/home/aur-builder \
bash /workspace/scripts/verify-aur-source-package.sh \
--version "$LOOPWIRE_AUR_VERSION"
'
112 changes: 112 additions & 0 deletions .github/workflows/publish-aur.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Publish AUR
run-name: Publish AUR ${{ inputs.package }} from ${{ inputs.tag }}

on:
workflow_dispatch:
inputs:
tag:
description: Published v-prefixed release tag
required: true
type: string
package:
description: AUR package base to publish
required: true
default: all
type: choice
options:
- all
- loopwire
- loopwire-bin

permissions:
contents: read

concurrency:
group: aur-${{ inputs.tag }}-${{ inputs.package }}
cancel-in-progress: false

jobs:
publish:
name: Build and publish AUR metadata
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: ubuntu-latest
timeout-minutes: 90
environment: aur
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
ref: ${{ github.event.repository.default_branch }}

- name: Verify published release tag
env:
GH_TOKEN: ${{ github.token }}
LOOPWIRE_AUR_TAG: ${{ inputs.tag }}
run: |
set -euo pipefail
tag_pattern='^v[0-9]+[.][0-9]+[.][0-9]+$'
if [[ ! "$LOOPWIRE_AUR_TAG" =~ $tag_pattern ]]; then
echo "AUR publication requires a stable v-prefixed semver tag." >&2
exit 1
fi
git rev-parse --verify "refs/tags/${LOOPWIRE_AUR_TAG}^{commit}"
release_state="$(
gh release view "$LOOPWIRE_AUR_TAG" --repo "$GITHUB_REPOSITORY" \
--json isDraft,isPrerelease \
--jq '"\(.isDraft) \(.isPrerelease)"'
)"
if [ "$release_state" != "false false" ]; then
echo "AUR publication requires a non-draft, non-prerelease GitHub release." >&2
exit 1
fi

- name: Prepare ephemeral AUR key
env:
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
run: |
set -euo pipefail
if [ -z "${AUR_SSH_PRIVATE_KEY:-}" ]; then
echo "The aur environment is missing AUR_SSH_PRIVATE_KEY." >&2
exit 1
fi
key_dir="$RUNNER_TEMP/aur-key"
mkdir -p "$key_dir"
printf '%s\n' "$AUR_SSH_PRIVATE_KEY" >"$key_dir/aur"
chmod 0600 "$key_dir/aur"
ssh-keygen -y -f "$key_dir/aur" >"$key_dir/aur.pub"
chmod 0644 "$key_dir/aur.pub"

- name: Build and publish selected recipes from Arch Linux
env:
LOOPWIRE_AUR_PACKAGE: ${{ inputs.package }}
LOOPWIRE_AUR_TAG: ${{ inputs.tag }}
run: |
set -euo pipefail
checkout_root="$RUNNER_TEMP/aur-checkouts"
mkdir -p "$checkout_root"
docker run --rm \
--env LOOPWIRE_AUR_PACKAGE \
--env LOOPWIRE_AUR_TAG \
--volume "$GITHUB_WORKSPACE:/workspace:ro" \
--volume "$RUNNER_TEMP/aur-key:/run/secrets/aur-key:ro" \
--volume "$checkout_root:/aur" \
archlinux@sha256:84cd9ef000b3cff245ec028e87965b84724f4bf1cc63fc2741ba927b88515ed6 \
bash -ceu '
pacman -Syu --noconfirm --needed \
curl git namcap nodejs openssh pipewire pnpm rust webkit2gtk-4.1 wireplumber
useradd --create-home aur-builder
chown -R aur-builder:aur-builder /aur
install -d -m 0700 -o aur-builder -g aur-builder /home/aur-builder/.ssh
cp /run/secrets/aur-key/aur /home/aur-builder/.ssh/aur
cp /run/secrets/aur-key/aur.pub /home/aur-builder/.ssh/aur.pub
chown aur-builder:aur-builder /home/aur-builder/.ssh/aur*
chmod 0600 /home/aur-builder/.ssh/aur
chmod 0644 /home/aur-builder/.ssh/aur.pub
runuser -u aur-builder -- env HOME=/home/aur-builder \
bash /workspace/scripts/deploy-aur-package.sh \
--package "$LOOPWIRE_AUR_PACKAGE" \
--tag "$LOOPWIRE_AUR_TAG" \
--checkout-root /aur \
--key /home/aur-builder/.ssh/aur
'
15 changes: 15 additions & 0 deletions apps/docs/docs/developer/github-actions-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,21 @@ repository, variable, and secret preflight. Review the displayed names and type
Public configuration uses the GitHub `vars` context. Credentials and signing material use the `secrets` context. During
migration, workflows still fall back to older repository secrets when the matching Actions variable is absent.

## AUR publication environment

The manually dispatched `Publish AUR` workflow uses a separate GitHub environment named `aur`. Configure required
reviewers on that environment, then add one environment secret named `AUR_SSH_PRIVATE_KEY`. Use a dedicated
passphrase-free automation key whose public half is registered on the maintainer's AUR account; do not reuse the
interactive, passphrase-protected local key and never commit either private key.

```bash
gh api --method PUT repos/OWNER/REPO/environments/aur
gh secret set AUR_SSH_PRIVATE_KEY --repo OWNER/REPO --env aur < ~/.ssh/loopwire-aur-actions
```

The environment gate is the authority boundary: pull requests and ordinary pushes only build the recipes, while an
approved manual dispatch can publish `loopwire`, `loopwire-bin`, or both from an already-public stable release tag.

## Input integrity and secrecy

- The command never accepts sensitive values as CLI flags or environment variables.
Expand Down
18 changes: 15 additions & 3 deletions apps/docs/docs/developer/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -779,11 +779,23 @@ configured and readiness passes.

```bash
pnpm verify:aur
pnpm verify:aur:source -- --version 0.1.0
```

The AUR smoke renders `packaging/aur/PKGBUILD.in` against generated local artifacts, runs `makepkg --nodeps` in a temp
directory when `makepkg` is available, and checks the resulting package archive contains `usr/bin/loopwire`. It does not
install the package or submit anything to AUR.
The lightweight AUR smoke renders both `packaging/aur/loopwire-bin/PKGBUILD.in` and
`packaging/aur/loopwire/PKGBUILD.in`, builds the binary recipe, and validates the source recipe metadata.
`verify:aur:source` performs the full tagged-source compilation and package-content inspection on Arch. Neither command
installs or submits anything.

After the GitHub release is public, publish one or both package bases from a clean Arch checkout:

```bash
pnpm deploy:aur -- --package loopwire --tag v0.1.0 --key ~/.ssh/aur
pnpm deploy:aur -- --package loopwire-bin --tag v0.1.0 --key ~/.ssh/aur
```

The manual `Publish AUR` workflow uses the same helper inside an Arch container. It is isolated behind the `aur`
GitHub environment and never runs on a pull request or ordinary branch push.

## Documentation Ceremony

Expand Down
24 changes: 20 additions & 4 deletions apps/docs/docs/guide/install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Install

Loopwire is not released yet. The current install path is for contributors and early testers working from source.
Loopwire 0.1.0 is published for early testers. Arch users can choose the stable source-built `loopwire` package or
the prebuilt `loopwire-bin` package; contributors can still work directly from a source checkout.

## Arch User Repository

Build the stable tagged source package:

```bash
git clone https://aur.archlinux.org/loopwire.git
cd loopwire
makepkg -si
```

For the faster prebuilt release-artifact package, use the separate `loopwire-bin` package base instead. The variants
conflict because they install the same commands; do not install both at once. A future live-VCS package, if added,
will use the `loopwire-git` name.

## Source Install

Expand Down Expand Up @@ -75,7 +90,8 @@ paths declare or wrap that dependency for you.

Package metadata templates now exist under `packaging/`:

- `packaging/aur/PKGBUILD.in` for future AUR `loopwire-bin`.
- `packaging/aur/loopwire/PKGBUILD.in` for stable tagged source builds.
- `packaging/aur/loopwire-bin/PKGBUILD.in` for signed prebuilt release artifacts.
- `flake.nix` exposes `packages.<system>.loopwire-bin` from `packaging/nix/loopwire-bin.nix`, currently with fake
hashes until the first public release provides real artifact hashes.
- Repository-owned deb recipes for Ubuntu 24.04 and Debian 13, plus RPM recipes for Fedora 44 and openSUSE
Expand Down Expand Up @@ -133,5 +149,5 @@ pnpm verify:nix-release -- \
Non-Nix CI and local machines may use `--skip-build-if-missing-nix` only to check wiring. Release evidence and final
release proof must not use that skip as Nix package proof.

These channels are not published yet. Do not submit AUR metadata or expose a release-ready Nix package until versioned
artifacts and real checksums exist.
The AUR recipes are published as separate package bases. The Nix package remains a template; do not expose it as
release-ready until real hashes and non-skipped Nix build proof exist.
3 changes: 2 additions & 1 deletion apps/docs/docs/guide/support-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ the Tauri shell command bridge.
| AppImage | Local Tauri bundle smoke | Blocked on release publishing. |
| Ubuntu 24.04 / Debian 13 deb | Verified in matching KVM guests at commit `70eee4e`; review snapshot in `vm/native-package-proof/` | Blocked on release publishing. |
| Fedora 44 / openSUSE Tumbleweed RPM | Verified in matching KVM guests at commit `70eee4e`; review snapshot in `vm/native-package-proof/` | Blocked on release publishing. |
| AUR `loopwire-bin` | `pnpm verify:aur` on Arch with `makepkg` | Blocked on tagged artifacts. |
| AUR `loopwire` | Tagged source build through `pnpm verify:aur:source` | Published for 0.1.0. |
| AUR `loopwire-bin` | Signed release-artifact build through `pnpm verify:aur` | Published for 0.1.0. |
| Nix flake package template | `pnpm verify:packaging` | Blocked on real release hashes and Nix build proof. |

The flake package output is `packages.<system>.loopwire-bin`; it uses fake hashes until published artifacts exist.
Expand Down
6 changes: 6 additions & 0 deletions apps/docs/docs/release-notes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

These notes describe source-tree progress. They are not a public release announcement.

## Packaging

- The AUR now keeps two honest stable recipes: `loopwire` compiles the immutable tagged source archive, while
`loopwire-bin` continues to consume signed prebuilt release artifacts. Both are built and inspected before a manual,
environment-protected AUR publication workflow may push their separate package repositories.

## Desktop UI Rebuild

- GitHub Actions setup now has a cross-platform guided command that separates public variables from secrets, explains
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"dsp:plan": "pnpm --filter @loopwire/core build && pnpm --filter @loopwire/audio-host build && node scripts/describe-dsp-provider.mjs",
"dsp:verify": "pnpm dsp:plan -- --execute",
"deploy:docs:bunny": "bash scripts/deploy-docs-bunny.sh",
"deploy:aur": "bash scripts/deploy-aur-package.sh",
"e2e:ui": "node scripts/e2e-desktop-ui.mjs",
"e2e:shell": "node scripts/e2e-desktop-shell.mjs",
"detect:audio": "pnpm --filter @loopwire/audio-host build && node scripts/detect-audio-backends.mjs --pretty",
Expand All @@ -55,6 +56,7 @@
"nix:render-release": "bash scripts/render-nix-release-package.sh",
"verify:nix-release": "bash scripts/verify-nix-release-package.sh",
"verify:aur": "bash scripts/verify-aur-package.sh",
"verify:aur:source": "bash scripts/verify-aur-source-package.sh",
"verify:docs": "bash scripts/verify-docs.sh",
"verify:site": "node scripts/verify-static-site.mjs",
"verify:desktop-binary-launch": "bash scripts/verify-desktop-binary-launch.sh",
Expand Down
47 changes: 35 additions & 12 deletions packaging/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Packaging

Loopwire package metadata is release-artifact-first. AUR, Nix, curl installer, and native distro packages consume
the same release artifacts:
Loopwire binary package metadata is release-artifact-first. `loopwire-bin`, Nix, the curl installer, and native
distro packages consume the same release artifacts, while the unsuffixed AUR `loopwire` recipe compiles the immutable
tagged source archive:

- `loopwire-linux-x86_64.tar.gz`
- `loopwire-linux-aarch64.tar.gz`
Expand Down Expand Up @@ -31,22 +32,44 @@ verify the key pair without placing the private key under the repository.

## AUR

`packaging/aur/PKGBUILD.in` is a template for `loopwire-bin`. Replace:
The two stable AUR recipes are deliberately separate:

- `@VERSION@`,
- `@SHA256_X86_64@`,
- `@SHA256_AARCH64@`.
- `packaging/aur/loopwire/PKGBUILD.in` builds the immutable tagged source archive and owns the exact `loopwire`
package base.
- `packaging/aur/loopwire-bin/PKGBUILD.in` consumes the signed architecture-specific release tarballs and owns
`loopwire-bin`.

The generated `PKGBUILD` must be tested with `makepkg` against published artifacts before any AUR submission.
The source template replaces `@VERSION@`, `@PKGREL@`, and `@SHA256_SOURCE@`. The binary template replaces
`@VERSION@`, `@PKGREL@`, `@SHA256_X86_64@`, and `@SHA256_AARCH64@`. The recipes declare conflicts/provides so only
one variant can own the installed `loopwire` files; a future live-VCS recipe must use the separate `loopwire-git`
package base.

Every generated `PKGBUILD` must be tested with `makepkg` against its published tag or release artifacts before AUR
submission.

For local release-shaped smoke, render the template against generated artifacts and build without installing:

```bash
pnpm verify:aur
pnpm verify:aur:source -- --version 0.1.0
```

`verify:aur` builds the binary recipe and checks the source recipe metadata. `verify:aur:source` performs the heavier
tagged source compilation and package-content inspection. Neither command installs or submits a package.

Publish from a clean Arch checkout with the AUR key loaded or available for an interactive passphrase prompt:

```bash
pnpm deploy:aur -- --package loopwire --tag v0.1.0 --key ~/.ssh/aur
pnpm deploy:aur -- --package loopwire-bin --tag v0.1.0 --key ~/.ssh/aur
```

That command uses `makepkg --nodeps` in a temp directory when `makepkg` is available. It does not install the package or
submit anything to AUR.
The helper downloads checksum-bound inputs, builds and inspects the package, generates `.SRCINFO`, increments `pkgrel`
when same-version metadata changes, commits `PKGBUILD`, `.SRCINFO`, and `LICENSE-MIT`, pushes the package-aligned AUR
Git repo, and verifies the remote commit. `.github/workflows/publish-aur.yml` exposes the same path as an
environment-protected
manual dispatch after its dedicated `AUR_SSH_PRIVATE_KEY` secret is configured. The workflow pins the AUR Ed25519 host
key in `packaging/aur/known_hosts`; verify any future key rotation against the official AUR homepage before updating it.

## Nix

Expand Down Expand Up @@ -197,9 +220,9 @@ verifies multi-architecture checksum entries, signs the manifest, installs the g
through `scripts/install.sh`, and proves `loopwire --background --help` works from the extracted and installed
launcher.

`verify:aur` renders the AUR template from generated local artifacts, runs `makepkg --nodeps` in a temp directory, and
checks the package archive contains `usr/bin/loopwire`, `usr/bin/loopwire-dsp-provider`, and
`usr/bin/loopwire-jack-ports`. It skips cleanly on hosts without `makepkg`.
`verify:aur` renders both AUR templates, runs a `makepkg --nodeps` binary-package build, checks the package archive,
and validates source-package `.SRCINFO`. It skips cleanly on hosts without `makepkg`. `verify:aur:source` separately
builds the tagged source recipe and checks the complete runtime, desktop entry, and icon.

`verify:packaging` statically checks that package metadata points at the same release artifact names as the installer
and that the flake exposes the binary package template without replacing fake hashes with unverified values. It also
Expand Down
21 changes: 21 additions & 0 deletions packaging/aur/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Loopwire contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions packaging/aur/known_hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aur.archlinux.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuBKrPzbawxA/k2g6NcyV5jmqwJ2s+zpgZGZ7tpLIcN
Loading