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
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: pnpm check

validate-aur-source:
name: Build source AUR package on Arch Linux
name: Build source AUR packages on Arch Linux
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
Expand All @@ -71,12 +71,20 @@ jobs:
fetch-depth: 0

- name: Build and inspect source package
env:
LOOPWIRE_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
set -euo pipefail
release_tag="$(git describe --tags --abbrev=0 --match 'v[0-9]*')"
export LOOPWIRE_AUR_VERSION="${release_tag#v}"
export LOOPWIRE_AUR_GIT_VERSION="$(
git describe --long --tags --abbrev=7 "origin/$LOOPWIRE_DEFAULT_BRANCH" |
sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
)"
docker run --rm \
--env LOOPWIRE_AUR_VERSION \
--env LOOPWIRE_AUR_GIT_VERSION \
--env LOOPWIRE_DEFAULT_BRANCH \
--volume "$GITHUB_WORKSPACE:/workspace:ro" \
archlinux@sha256:84cd9ef000b3cff245ec028e87965b84724f4bf1cc63fc2741ba927b88515ed6 \
bash -ceu '
Expand All @@ -86,4 +94,8 @@ jobs:
runuser -u aur-builder -- env HOME=/home/aur-builder \
bash /workspace/scripts/verify-aur-source-package.sh \
--version "$LOOPWIRE_AUR_VERSION"
runuser -u aur-builder -- env HOME=/home/aur-builder \
bash /workspace/scripts/verify-aur-git-package.sh \
--version "$LOOPWIRE_AUR_GIT_VERSION" \
--default-branch "$LOOPWIRE_DEFAULT_BRANCH"
'
4 changes: 4 additions & 0 deletions .github/workflows/publish-aur.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- all
- loopwire
- loopwire-bin
- loopwire-git

permissions:
contents: read
Expand Down Expand Up @@ -81,13 +82,15 @@ jobs:
env:
LOOPWIRE_AUR_PACKAGE: ${{ inputs.package }}
LOOPWIRE_AUR_TAG: ${{ inputs.tag }}
LOOPWIRE_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
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 \
--env LOOPWIRE_DEFAULT_BRANCH \
--volume "$GITHUB_WORKSPACE:/workspace:ro" \
--volume "$RUNNER_TEMP/aur-key:/run/secrets/aur-key:ro" \
--volume "$checkout_root:/aur" \
Expand All @@ -107,6 +110,7 @@ jobs:
bash /workspace/scripts/deploy-aur-package.sh \
--package "$LOOPWIRE_AUR_PACKAGE" \
--tag "$LOOPWIRE_AUR_TAG" \
--default-branch "$LOOPWIRE_DEFAULT_BRANCH" \
--checkout-root /aur \
--key /home/aur-builder/.ssh/aur
'
3 changes: 2 additions & 1 deletion apps/docs/docs/developer/github-actions-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ gh secret set AUR_SSH_PRIVATE_KEY --repo OWNER/REPO --env aur < ~/.ssh/loopwire-
```

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.
approved manual dispatch can publish `loopwire`, `loopwire-bin`, `loopwire-git`, or all three. Stable variants remain
bound to an already-public release tag; the VCS variant resolves the current protected default branch.

## Input integrity and secrecy

Expand Down
7 changes: 6 additions & 1 deletion apps/docs/docs/developer/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -780,18 +780,23 @@ configured and readiness passes.
```bash
pnpm verify:aur
pnpm verify:aur:source -- --version 0.1.0
pnpm verify:aur:git
```

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.
installs or submits anything. `verify:aur:git` separately builds the current default branch and checks its VCS-derived
package version plus complete installed payload.
Run that VCS build proof before publication and without an AUR key in its environment. The publisher handles
`loopwire-git` as metadata-only so moving default-branch code never executes while the signing key is reachable.

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
pnpm deploy:aur -- --package loopwire-git --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`
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/docs/guide/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ 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.
For the faster prebuilt release-artifact package, use `loopwire-bin`. To follow the current default branch, use the
rolling `loopwire-git` package. The three variants conflict because they install the same commands; install only one.

## Source Install

Expand Down Expand Up @@ -90,6 +89,7 @@ Package metadata templates now exist under `packaging/`:

- `packaging/aur/loopwire/PKGBUILD.in` for stable tagged source builds.
- `packaging/aur/loopwire-bin/PKGBUILD.in` for signed prebuilt release artifacts.
- `packaging/aur/loopwire-git/PKGBUILD.in` for the rolling default-branch source build.
- `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
1 change: 1 addition & 0 deletions apps/docs/docs/guide/support-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ the Tauri shell command bridge.
| Fedora 44 / openSUSE Tumbleweed RPM | Verified in matching KVM guests at commit `70eee4e`; review snapshot in `vm/native-package-proof/` | Published as direct downloads; no COPR/OBS repository. |
| 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. |
| AUR `loopwire-git` | Rolling default-branch build through `pnpm verify:aur:git` | Published; development snapshots are not stable releases. |
| 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
2 changes: 2 additions & 0 deletions apps/docs/docs/release-notes/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ These notes describe source-tree progress. They are not a public release announc
- 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.
- A third `loopwire-git` AUR recipe follows the protected default branch, derives a monotonic VCS package version, and
remains explicitly separate from the stable source and binary package bases.

## Desktop UI Rebuild

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,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:git": "bash scripts/verify-aur-git-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",
Expand Down
22 changes: 14 additions & 8 deletions packaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,19 @@ verify the key pair without placing the private key under the repository.

## AUR

The two stable AUR recipes are deliberately separate:
The stable and rolling AUR recipes are deliberately separate:

- `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`.
- `packaging/aur/loopwire-git/PKGBUILD.in` builds the current default branch, derives `pkgver` from Git history, and
owns `loopwire-git`.

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.
one variant can own the installed `loopwire` files. The VCS recipe uses `SKIP` only for its moving Git source; the
packager-supplied MIT license remains checksum-bound.

Every generated `PKGBUILD` must be tested with `makepkg` against its published tag or release artifacts before AUR
submission.
Expand All @@ -52,21 +54,25 @@ For local release-shaped smoke, render the template against generated artifacts
```bash
pnpm verify:aur
pnpm verify:aur:source -- --version 0.1.0
pnpm verify:aur:git
```

`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.
`verify:aur` builds the binary recipe and checks stable plus VCS source metadata. `verify:aur:source` and
`verify:aur:git` perform the heavier stable-tag and rolling-branch compilations. None installs or submits a package.
The VCS build intentionally runs without any AUR key. Its key-bearing publication path revalidates and pushes only
the reviewed `PKGBUILD`, `.SRCINFO`, and license metadata; it never executes the moving branch source.

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
pnpm deploy:aur -- --package loopwire-git --tag v0.1.0 --key ~/.ssh/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
The helper downloads checksum-bound stable inputs, builds and inspects stable packages, generates `.SRCINFO`, and
increments `pkgrel` when same-version metadata changes. It commits `PKGBUILD`, `.SRCINFO`, and `LICENSE-MIT`, then
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.
Expand Down
77 changes: 77 additions & 0 deletions packaging/aur/loopwire-git/PKGBUILD.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Maintainer: Loopwire contributors
pkgname=loopwire-git
pkgver=@VERSION@
pkgrel=@PKGREL@
pkgdesc="Linux virtual audio routing application (development version)"
arch=("x86_64" "aarch64")
url="https://github.com/sandwichfarm/loopwire"
license=("MIT" "Apache-2.0")
provides=("loopwire=${pkgver}")
conflicts=("loopwire")
depends=("webkit2gtk-4.1" "nodejs>=22.12.0" "pipewire" "wireplumber")
makedepends=("git" "pnpm" "rust")
optdepends=(
"pipewire-pulse: PulseAudio compatibility"
"jack2: JACK bridge diagnostics"
"alsa-utils: ALSA diagnostics"
)
source=(
"loopwire::git+${url}.git#branch=@DEFAULT_BRANCH@"
"LICENSE-MIT"
)
sha256sums=(
"SKIP"
"@SHA256_LICENSE@"
)

pkgver() {
cd loopwire
git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
cd loopwire
pnpm install --frozen-lockfile
}

build() {
cd loopwire
pnpm --filter @loopwire/core build
pnpm --filter @loopwire/audio-host build

local app_version source_epoch
app_version="${pkgver/.r/-dev.}"
source_epoch="$(git log -1 --format=%ct)"
pnpm --filter @loopwire/desktop exec tauri build --no-bundle \
--config "$(printf '{"version":"%s"}' "${app_version}")"

SOURCE_DATE_EPOCH="${source_epoch}" bash scripts/package-release.sh \
--binary apps/desktop/src-tauri/target/release/loopwire \
--version "${pkgver}" \
--arch "${CARCH}" \
--output-dir "${srcdir}/release"
}

package() {
local release_root="${srcdir}/release-root"
mkdir -p "${release_root}"
tar -xzf "${srcdir}/release/loopwire-linux-${CARCH}.tar.gz" -C "${release_root}"

install -Dm755 "${release_root}/loopwire" "${pkgdir}/usr/bin/loopwire"
install -Dm755 "${release_root}/loopwire-dsp-provider" "${pkgdir}/usr/bin/loopwire-dsp-provider"
install -Dm755 "${release_root}/loopwire-jack-ports" "${pkgdir}/usr/bin/loopwire-jack-ports"
install -Dm755 "${release_root}/loopwire-detect-audio" "${pkgdir}/usr/bin/loopwire-detect-audio"
install -dm755 "${pkgdir}/usr/lib/loopwire"
cp -R "${release_root}/libexec/loopwire/." "${pkgdir}/usr/lib/loopwire/"
find "${pkgdir}/usr/lib/loopwire" -type d -exec chmod 0755 {} +
find "${pkgdir}/usr/lib/loopwire" -type f -exec chmod 0644 {} +
chmod 0755 "${pkgdir}/usr/lib/loopwire/loopwire-gui"

cd "${srcdir}/loopwire"
install -Dm644 packaging/common/loopwire.desktop \
"${pkgdir}/usr/share/applications/loopwire.desktop"
install -Dm644 apps/desktop/src-tauri/icons/icon.svg \
"${pkgdir}/usr/share/icons/hicolor/scalable/apps/loopwire.svg"
install -Dm644 "${srcdir}/LICENSE-MIT" \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-MIT"
}
Loading