From 0d5213a047e53eaac40f6f96518db07eab1dcd36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Wed, 23 Sep 2026 10:47:57 +0200 Subject: [PATCH] Remove Arch Linux packaging from release scripts --- .github/workflows/check-arch-package.yaml | 53 -------------------- .prettierignore | 2 - arch/.gitignore | 1 - arch/README.md | 37 -------------- arch/generate-srcinfo.sh | 12 ----- arch/publish.sh | 43 ---------------- arch/radicle-desktop/.SRCINFO | 32 ------------ arch/radicle-desktop/.gitignore | 3 -- arch/radicle-desktop/PKGBUILD | 56 --------------------- crates/radicle-tauri/main.desktop | 4 +- eslint.config.js | 1 - scripts/release | 61 +++-------------------- 12 files changed, 10 insertions(+), 295 deletions(-) delete mode 100644 .github/workflows/check-arch-package.yaml delete mode 100644 arch/.gitignore delete mode 100644 arch/README.md delete mode 100755 arch/generate-srcinfo.sh delete mode 100755 arch/publish.sh delete mode 100644 arch/radicle-desktop/.SRCINFO delete mode 100644 arch/radicle-desktop/.gitignore delete mode 100644 arch/radicle-desktop/PKGBUILD diff --git a/.github/workflows/check-arch-package.yaml b/.github/workflows/check-arch-package.yaml deleted file mode 100644 index 388987896..000000000 --- a/.github/workflows/check-arch-package.yaml +++ /dev/null @@ -1,53 +0,0 @@ -on: - pull_request: - paths: - - "arch/**" - push: - paths: - - "arch/**" - workflow_dispatch: - -env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true - -jobs: - build-arch: - runs-on: ubuntu-latest - container: - image: archlinux:base-devel - options: --user root - - steps: - - name: Install pre-requisites - run: pacman -Sy --noconfirm git radicle - - - uses: actions/checkout@v6 - - - name: Set up builder user - run: | - useradd -m builder - echo 'builder ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/builder - chown -R builder:builder "$GITHUB_WORKSPACE" - - - name: Cache cargo registry - uses: actions/cache@v5 - with: - path: /home/builder/.cargo/registry - key: arch-cargo-${{ hashFiles('arch/radicle-desktop/PKGBUILD') }} - restore-keys: arch-cargo- - - - name: Check .SRCINFO is up-to-date - run: | - cd arch/radicle-desktop - sudo -u builder makepkg --printsrcinfo > .SRCINFO - sudo -u builder git -C "$GITHUB_WORKSPACE" diff --exit-code arch/radicle-desktop/.SRCINFO - - - name: Build package - run: | - sudo -u builder env \ - CI=true \ - BUILDDIR=/home/builder/build \ - PKGDEST=/home/builder \ - SRCDEST=/home/builder \ - makepkg --dir "$GITHUB_WORKSPACE/arch/radicle-desktop" \ - --syncdeps --noconfirm --force diff --git a/.prettierignore b/.prettierignore index 3cec97328..51e75c117 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,3 @@ -arch/radicle-desktop -arch/radicle-desktop.git crates *.md *.lock diff --git a/arch/.gitignore b/arch/.gitignore deleted file mode 100644 index 76f0167e7..000000000 --- a/arch/.gitignore +++ /dev/null @@ -1 +0,0 @@ -radicle-desktop.git diff --git a/arch/README.md b/arch/README.md deleted file mode 100644 index 8d91c66ef..000000000 --- a/arch/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Packaging for Arch Linux - -This folder contains the `PKGBUILD` script for building the `radicle-desktop` -Arch Linux package. - -## Arch User Repository - -This folder is mirrored to the Arch User Repository as -[`radicle-desktop`][aur-pkg] so user can install it from there. - -Whenever a change is made to the `radicle-desktop` folder it can be synched to -the AUR using the `./publish.sh ` script. - -Before you push any changes, make sure that the package builds properly, see -“Build QA” below. - -You need to be a maintainer of the `radicle-desktop` to be allowed to push -changes. To become a maintainer ask one of the existing maintainers to add you. - -## Build QA - -There is a [Woodpecker CI workflow][workflow] to ensure that the package builds -correctly on Arch Linux. - -You can run the workflow locally. - -```bash -woodpecker-cli \ - exec .woodpecker/build-arch.yaml \ - --repo-path . \ - --volumes paccache:/var/cache/pacman,builder:/home/builder -``` - -Using `--volumes` is optional and improves caching between multiple runs. - -[aur-pkg]: https://aur.archlinux.org/packages/radicle-desktop -[workflow]: ../.woodpecker/build-arch.yaml diff --git a/arch/generate-srcinfo.sh b/arch/generate-srcinfo.sh deleted file mode 100755 index a6e190cb1..000000000 --- a/arch/generate-srcinfo.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -exec docker run \ - --user 1000 \ - --rm --volume "$(pwd)/radicle-desktop:/workdir:ro" \ - --env BUILDDIR=/tmp \ - --env PKGDEST=/tmp \ - --env SRCDEST=/tmp \ - --workdir /workdir \ - --platform linux/amd64 \ - archlinux:base-devel makepkg --printsrcinfo > radicle-desktop/.SRCINFO - diff --git a/arch/publish.sh b/arch/publish.sh deleted file mode 100755 index 6f99d8e1b..000000000 --- a/arch/publish.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -push=true - -while [[ $# -gt 0 ]]; do - case "$1" in - --no-push) - push=false - shift - ;; - *) - commit_message="$1" - shift - ;; - esac -done - -if [[ -z "${commit_message:-}" ]]; then - echo "Please provide a commit message as an argument: $0 [--no-push] \"Release vX.Y.Z\"" - exit 1 -fi - -if [[ ! -d radicle-desktop.git ]]; then - git clone ssh://aur@aur.archlinux.org/radicle-desktop.git radicle-desktop.git -fi - -pushd radicle-desktop.git >/dev/null -export GIT_PAGER="" -git checkout master --force -git pull -cp -a \ - ../radicle-desktop/PKGBUILD \ - ../radicle-desktop/.SRCINFO \ - ../radicle-desktop/.gitignore \ - . -git diff -git commit --all --message "$commit_message" -if [[ "$push" == true ]]; then - git push -fi -popd >/dev/null diff --git a/arch/radicle-desktop/.SRCINFO b/arch/radicle-desktop/.SRCINFO deleted file mode 100644 index 2e956de2b..000000000 --- a/arch/radicle-desktop/.SRCINFO +++ /dev/null @@ -1,32 +0,0 @@ -pkgbase = radicle-desktop - pkgdesc = Radicle desktop app - pkgver = 0.16.0 - pkgrel = 1 - url = https://radicle.dev/ - arch = x86_64 - license = GPL-3.0-only - makedepends = git - makedepends = openssl - makedepends = appmenu-gtk-module - makedepends = libappindicator-gtk3 - makedepends = librsvg - makedepends = cargo - makedepends = npm - makedepends = nodejs - depends = radicle-node - depends = cairo - depends = desktop-file-utils - depends = gdk-pixbuf2 - depends = glib2 - depends = gtk3 - depends = hicolor-icon-theme - depends = libsoup3 - depends = pango - depends = webkit2gtk-4.1 - options = !strip - options = !emptydirs - options = !lto - source = radicle-desktop::git+https://seed.radicle.dev/z4D5UCArafTzTQpDZNQRuqswh3ury.git#commit=06a84ebc14feed96243797ab219d9ac85d05d9c7 - sha256sums = SKIP - -pkgname = radicle-desktop diff --git a/arch/radicle-desktop/.gitignore b/arch/radicle-desktop/.gitignore deleted file mode 100644 index 929ea1d61..000000000 --- a/arch/radicle-desktop/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/src -/pkg -/radicle-desktop diff --git a/arch/radicle-desktop/PKGBUILD b/arch/radicle-desktop/PKGBUILD deleted file mode 100644 index 7abae955d..000000000 --- a/arch/radicle-desktop/PKGBUILD +++ /dev/null @@ -1,56 +0,0 @@ -# Maintainer: Thomas Scholtes -# -# shellcheck shell=bash disable=SC2034 disable=SC2154 disable=SC2164 - -_commit=06a84ebc14feed96243797ab219d9ac85d05d9c7 -pkgname=radicle-desktop -pkgver='0.16.0' -pkgrel='1' -pkgdesc='Radicle desktop app' -arch=('x86_64') -url='https://radicle.dev/' -license=('GPL-3.0-only') -depends=( - 'radicle-node' - # See https://v2.tauri.app/distribute/aur/#building-from-source - 'cairo' - 'desktop-file-utils' - 'gdk-pixbuf2' - 'glib2' - 'gtk3' - 'hicolor-icon-theme' - 'libsoup3' - 'pango' - 'webkit2gtk-4.1' -) -makedepends=( - # See https://v2.tauri.app/distribute/aur/#building-from-source - 'git' - 'openssl' - 'appmenu-gtk-module' - 'libappindicator-gtk3' - 'librsvg' - 'cargo' - 'npm' - 'nodejs' -) -options=('!strip' '!emptydirs' '!lto') -source=("$pkgname::git+https://seed.radicle.dev/z4D5UCArafTzTQpDZNQRuqswh3ury.git#commit=$_commit") -sha256sums=('SKIP') - -prepare() { - cd "$pkgname" - - npm install - cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" -} - -build() { - cd "$pkgname" - - npx tauri build --bundles deb -} - -package() { - cp -a $pkgname/target/release/bundle/deb/${pkgname}_${pkgver}_*/data/* "${pkgdir}" -} diff --git a/crates/radicle-tauri/main.desktop b/crates/radicle-tauri/main.desktop index 8f0024e5d..7a95d7911 100644 --- a/crates/radicle-tauri/main.desktop +++ b/crates/radicle-tauri/main.desktop @@ -6,8 +6,8 @@ no way to set the two independently (https://github.com/tauri-apps/tauri/issues/13999, still open). We override `productName` to "radicle-desktop" in tauri.linux.conf.json so the package and its artifacts are named - "radicle-desktop" (the Arch PKGBUILD also globs on that name). The cost is - that the launcher/menu entry would otherwise read "radicle-desktop" too. + "radicle-desktop". The cost is that the launcher/menu entry would otherwise + read "radicle-desktop" too. This template is Tauri's built-in default with a single change: `Name` is hardcoded to "Radicle" instead of `{{name}}`, so the app shows as "Radicle" diff --git a/eslint.config.js b/eslint.config.js index 99a9a2676..39454c39b 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -160,7 +160,6 @@ export default [ }, { ignores: [ - "arch", "build/*", "isolation/*", "node_modules/**/*", diff --git a/scripts/release b/scripts/release index 18ae0bf93..b07f40ced 100755 --- a/scripts/release +++ b/scripts/release @@ -13,7 +13,6 @@ # scripts/release --phase build # scripts/release --phase apt # scripts/release --phase publish -# scripts/release --phase arch # scripts/release --phase tag # # scripts/release --list List the phases in order @@ -39,11 +38,10 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" TAURI_CONF="$PROJECT_DIR/crates/radicle-tauri/tauri.conf.json" -PKGBUILD="$PROJECT_DIR/arch/radicle-desktop/PKGBUILD" CHANGELOG="$PROJECT_DIR/CHANGELOG.md" APT_REPO_DIR="$(cd "$PROJECT_DIR/../radicle-apt-repo" 2>/dev/null && pwd || true)" -PHASES=(prep build apt publish arch tag) +PHASES=(prep build apt publish tag) # ---- Output helpers ---- @@ -86,36 +84,14 @@ run() { fi } -# Like run(), but for a command that must run in directory $1. -run_sh() { - if [[ "$DRY_RUN" == true ]]; then - printf ' [dry-run] (cd %s && %s)\n' "$1" "${*:2}" - else - ( cd "$1" && "${@:2}" ) - fi -} - # Abort on a missing prerequisite — but only warn under --dry-run, so later # phases can still be previewed without their inputs present. fail() { if [[ "$DRY_RUN" == true ]]; then warn "$*"; else die "$*"; fi } -# generate-srcinfo.sh needs a running Docker daemon. Check it before prep -# mutates anything, so a docker-down situation fails cleanly. Skipped under -# --dry-run, where the Docker step only prints. -docker_available() { command -v docker >/dev/null 2>&1 && docker info >/dev/null 2>&1; } podman_available() { command -v podman >/dev/null 2>&1 && podman info >/dev/null 2>&1; } -require_docker() { - if [[ "$DRY_RUN" == true ]]; then - docker_available || warn "Docker is not available (a real run needs it to regenerate .SRCINFO)" - return 0 - fi - command -v docker >/dev/null 2>&1 || die "docker not found (needed to regenerate .SRCINFO)" - docker info >/dev/null 2>&1 || die "Docker daemon is not running — start Docker and re-run" -} - # build-artifacts enforces a running Podman itself on a real build. This mirror # only surfaces it under --dry-run (build-artifacts isn't executed then), so the # preview reports a down/absent Podman too. @@ -168,10 +144,9 @@ conf_version() { jq -r '.version' "$TAURI_CONF" } -# The SHA of the arch-package commit for $1, looked up by its commit subject. -# This is the second commit of the release patch (its tip) and the one we tag. -arch_commit_sha() { - git -C "$PROJECT_DIR" log --grep="^Update arch package to v$1\$" -1 --format=%H +# The SHA of the release commit for $1, looked up by its commit subject. +release_commit_sha() { + git -C "$PROJECT_DIR" log --grep="^Release v$1\$" -1 --format=%H } # ---- Phases ---- @@ -179,7 +154,6 @@ arch_commit_sha() { phase_prep() { local version="$1" [[ -n "$version" ]] || die "prep requires --version X.Y.Z" - require_docker step "Preparing release v$version" @@ -226,13 +200,6 @@ phase_prep() { sha="$(git -C "$PROJECT_DIR" rev-parse HEAD)" info "Release commit: $sha" - step "Updating Arch package to v$version" - run sed -i '' -E "s/^_commit=.*/_commit=$sha/" "$PKGBUILD" - run sed -i '' -E "s/^pkgver=.*/pkgver='$version'/" "$PKGBUILD" - run_sh "$PROJECT_DIR/arch" ./generate-srcinfo.sh - run git -C "$PROJECT_DIR" add arch/radicle-desktop/.SRCINFO arch/radicle-desktop/PKGBUILD - run git -C "$PROJECT_DIR" commit -m "Update arch package to v$version" - step "Pushing Release Patch" if confirm "Push the Release Patch now (git push rad HEAD:refs/patches)?"; then run git -C "$PROJECT_DIR" push rad HEAD:refs/patches @@ -328,17 +295,6 @@ phase_publish() { step "Published" info "https://$FILES_HOST/releases/radicle-desktop/$version/" info "latest now resolves to $version (update checker reads latest/latest.json)." - next "scripts/release --phase arch" -} - -phase_arch() { - local version - version="$(conf_version)" - step "Publishing the Arch package to the AUR" - run_sh "$PROJECT_DIR/arch" ./publish.sh "Release v$version" - - step "AUR package pushed" - info "Verify the version at https://aur.archlinux.org/packages/radicle-desktop" next "scripts/release --phase tag" } @@ -348,11 +304,11 @@ phase_tag() { step "Tagging canonical release v$version" local sha - sha="$(arch_commit_sha "$version")" - [[ -n "$sha" ]] || fail "could not find the 'Update arch package to v$version' commit (is the patch merged into main?)" - info "Tagging commit: ${sha:-}" + sha="$(release_commit_sha "$version")" + [[ -n "$sha" ]] || fail "could not find the 'Release v$version' commit (is the patch merged into main?)" + info "Tagging commit: ${sha:-}" - run git -C "$PROJECT_DIR" tag "releases/$version" "${sha:-}" -m "Release $version" + run git -C "$PROJECT_DIR" tag "releases/$version" "${sha:-}" -m "Release $version" run git -C "$PROJECT_DIR" push rad --tags run rad sync @@ -426,7 +382,6 @@ main() { build) phase_build ;; apt) phase_apt ;; publish) phase_publish ;; - arch) phase_arch ;; tag) phase_tag ;; *) die "Unknown phase: $phase (try --list)" ;; esac