Skip to content

x-cmd/apk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

x-cmd apk Repository

https://www.x-cmd.com/apk/ — an Alpine (apk) package repository hosting the official x-cmd package.

This repository is published verbatim under https://www.x-cmd.com/apk/. Add that URL to /etc/apk/repositories and apk can install x-cmd natively on Alpine Linux.

The package is built and released upstream at x-cmd/release; this repo only mirrors the .apk artifact and maintains the APKINDEX.tar.gz indices.


Install (Alpine)

# 1. Enable the repository (unsigned for now → use --allow-untrusted)
echo "https://www.x-cmd.com/apk/" | sudo tee -a /etc/apk/repositories

# 2. Install x-cmd
sudo apk update
sudo apk add --allow-untrusted x-cmd

Verify:

x --version

--allow-untrusted is needed until the signing key is published to /etc/apk/keys (see Notes).


Repository layout

apk fetches the index from <repo>/<client-arch>/APKINDEX.tar.gz and the package from <repo>/<package-arch>/<file>. The x-cmd package is Architecture: noarch, so:

  • the package file lives once under noarch/ (every client downloads it from there), and
  • the same index is placed under each client architecture so any client can discover it.
.
├── noarch/
│   ├── x-cmd-0.9.9-r0.apk     # the package (single copy)
│   └── APKINDEX.tar.gz         # canonical index generated from it
├── x86_64/APKINDEX.tar.gz      # ┐
├── aarch64/APKINDEX.tar.gz     # │
├── armhf/APKINDEX.tar.gz       # │ same index, copied per client arch
├── armv7/APKINDEX.tar.gz       # │ so x86_64 / aarch64 / ... clients all find it
├── x86/APKINDEX.tar.gz         # │
├── ppc64le/APKINDEX.tar.gz     # │
├── s390x/APKINDEX.tar.gz       # │
└── riscv64/APKINDEX.tar.gz     # ┘

Filename matters. apk reconstructs the download name as <pkgname>-<pkgver>.apk (x-cmd-0.9.9-r0.apk), regardless of the source filename. The file in noarch/ must use that name.


Adding a new release

  1. Drop the new .apk at the repo root (the upstream artifact is named x-cmd_<ver>_all.apk). Regenerate the index with apk index. macOS has no apk tooling, so run it through an Alpine container (image already cached locally):

    docker run --rm -v "$PWD:/repo" alpine:latest sh -c '
      set -e; cd /repo
      apk add --no-cache alpine-sdk >/dev/null 2>&1 || true
      # upstream artifact name -> apk-convention name (pkgname-pkgver.apk)
      src=$(ls x-cmd_*_all.apk | head -1)
      ver=$(tar -xOzf "$src" .PKGINFO | sed -n "s/^pkgver = //p")
      rm -rf noarch x86_64 x86 armhf armv7 aarch64 ppc64le s390x riscv64
      mkdir -p noarch
      mv "$src" "noarch/x-cmd-${ver}.apk"
      apk index --allow-untrusted -o noarch/APKINDEX.tar.gz noarch/x-cmd-*.apk
      for a in x86_64 x86 armhf armv7 aarch64 ppc64le s390x riscv64; do
        mkdir -p "$a"; cp noarch/APKINDEX.tar.gz "$a"/APKINDEX.tar.gz
      done'

    --allow-untrusted is required while indexing because the apk is signed with a key not present in the indexer's keychain.

  2. Commit noarch/ and the per-arch APKINDEX.tar.gz, then push. The site refreshes from this branch.


Notes

  • Unsigned phase. Both the index and the package are signed with x-cmd's key, which is not yet published; clients therefore need --allow-untrusted. Once the public key is shipped (drop it in /etc/apk/keys/ and sign APKINDEX.tar.gzAPKINDEX.tar.gz.sig), the --allow-untrusted can be dropped.
  • Architectures served: x86_64, x86, armhf, armv7, aarch64, ppc64le, s390x, riscv64 (all read the same noarch package). Add a new client arch by copying APKINDEX.tar.gz into a new <arch>/ directory.
  • Build provenance and source live in x-cmd/release.
  • Companion repositories: x-cmd/rpm (/rpm/), x-cmd/deb (/deb/), x-cmd/pacman (/pacman/).

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors