fix pkg ver
All checks were successful
release / Release (push) Successful in 6m33s

This commit is contained in:
2026-03-03 16:03:02 +09:00
parent 69b933586f
commit 3a58b8243d
6 changed files with 106 additions and 5 deletions

2
.gitignore vendored
View File

@@ -7,4 +7,4 @@ root.x86_64/
archiso/ archiso/
build.log build.log
.claude .claude
/cfg/repo.sh /.env

View File

@@ -26,7 +26,7 @@ sed -i 's/CheckSpace/#CheckSpace/' $ROOTFS/etc/pacman.conf
sed -i '/\[options\]/a NoUpgrade = etc/os-release' $ROOTFS/etc/pacman.conf sed -i '/\[options\]/a NoUpgrade = etc/os-release' $ROOTFS/etc/pacman.conf
arch-chroot $ROOTFS /bin/sh -c 'pacman-key --init && pacman-key --populate archlinux' arch-chroot $ROOTFS /bin/sh -c 'pacman-key --init && pacman-key --populate archlinux'
arch-chroot $ROOTFS /bin/sh -c 'pacman -Syu --noconfirm base-devel vim git zsh rust clang openssh jq nodejs npm zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search' arch-chroot $ROOTFS /bin/sh -c 'pacman -Syu --noconfirm base-devel vim git zsh rust clang openssh jq nodejs npm zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search jq'
if [[ "$BUILD_MODE" == "image" ]]; then if [[ "$BUILD_MODE" == "image" ]]; then
arch-chroot $ROOTFS /bin/sh -c 'pacman -S --noconfirm linux linux-firmware mkinitcpio' arch-chroot $ROOTFS /bin/sh -c 'pacman -S --noconfirm linux linux-firmware mkinitcpio'

74
cfg/repo.sh Executable file
View File

@@ -0,0 +1,74 @@
#!/bin/zsh
set -e
d=${0:a:h:h}
source $d/.env
echo "=== Building and publishing packages on $HOST ==="
ssh "$HOST" zsh -s -- "$GPG_KEY" <<'REMOTE'
set -e
setopt nonomatch 2>/dev/null || true
GPG_KEY="$1"
REPO_NAME="aios"
REPO_DIR="${HOME}/ai/repo"
WORK="${HOME}/aios-pkg"
if [ ! -d "$REPO_DIR/.git" ]; then
git clone git@git.syui.ai:ai/repo.git "$REPO_DIR"
cd "$REPO_DIR"
git config user.email 'syui@syui.ai'
git config user.name 'syui'
fi
cd "$REPO_DIR"
git config user.signingkey "$GPG_KEY"
git config commit.gpgsign true
rm -rf "$WORK"
mkdir -p "$WORK"
cd "$WORK"
git clone --depth 1 https://git.syui.ai/ai/os.git
for pkg in ailog aigpt aishell; do
echo "=== Building $pkg ==="
cp -r "$WORK/os/pkg/$pkg" "$WORK/$pkg"
cd "$WORK/$pkg"
makepkg -sf --noconfirm --sign --key "$GPG_KEY"
cd "$WORK"
done
mkdir -p "$REPO_DIR/x86_64"
for pkg in ailog aigpt aishell; do
rm -f "$REPO_DIR/x86_64/${pkg}"-*.pkg.tar.zst
rm -f "$REPO_DIR/x86_64/${pkg}"-*.pkg.tar.zst.sig
rm -f "$REPO_DIR/x86_64/${pkg}-debug"-*.pkg.tar.zst
rm -f "$REPO_DIR/x86_64/${pkg}-debug"-*.pkg.tar.zst.sig
cp "$WORK"/"$pkg"/*.pkg.tar.zst "$REPO_DIR/x86_64/"
cp "$WORK"/"$pkg"/*.pkg.tar.zst.sig "$REPO_DIR/x86_64/" 2>/dev/null || true
done
cd "$REPO_DIR/x86_64"
rm -f "${REPO_NAME}".{db,files}*
repo-add --sign --key "$GPG_KEY" "${REPO_NAME}.db.tar.gz" *.pkg.tar.zst
gpg --export "$GPG_KEY" > "$REPO_DIR/aios.gpg"
for f in "${REPO_NAME}.db" "${REPO_NAME}.files" "${REPO_NAME}.db.sig" "${REPO_NAME}.files.sig"; do
if [ -L "$f" ]; then
target=$(readlink "$f")
rm "$f"
cp "$target" "$f"
fi
done
rm -f *.old *.old.sig
cd "$REPO_DIR"
git add -A
git commit -m "update $(date +%Y.%m.%d)" || true
git push
rm -rf "$WORK"
echo "=== Done ==="
REMOTE

View File

@@ -1,16 +1,25 @@
pkgname=aigpt pkgname=aigpt
pkgver=0.0.1 pkgver=0.0.1
pkgrel=1 pkgrel=1
pkgdesc='ai memory and personality system for aios' pkgdesc='ai memory and personality system for aios'
arch=('x86_64') arch=('x86_64')
url='https://git.syui.ai/ai/gpt' url='https://git.syui.ai/ai/gpt'
license=('MIT') license=('MIT')
depends=('gcc-libs') depends=('gcc-libs')
makedepends=('rust' 'cargo' 'git') makedepends=('rust' 'cargo' 'git')
options=('!lto') options=('!lto' '!debug')
source=("git+https://git.syui.ai/ai/gpt.git#branch=main") source=("git+https://git.syui.ai/ai/gpt.git#branch=main")
sha256sums=('SKIP') sha256sums=('SKIP')
pkgver() {
cd gpt
printf "%s.r%s.g%s" \
"$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')" \
"$(git rev-list --count HEAD)" \
"$(git rev-parse --short HEAD)"
}
build() { build() {
cd gpt cd gpt
export CC=gcc export CC=gcc

View File

@@ -1,16 +1,25 @@
pkgname=ailog pkgname=ailog
pkgver=0.0.1 pkgver=0.0.1
pkgrel=1 pkgrel=1
pkgdesc='atproto blog cli for aios' pkgdesc='atproto blog cli for aios'
arch=('x86_64') arch=('x86_64')
url='https://git.syui.ai/ai/log' url='https://git.syui.ai/ai/log'
license=('MIT') license=('MIT')
depends=('gcc-libs') depends=('gcc-libs')
makedepends=('rust' 'cargo' 'git') makedepends=('rust' 'cargo' 'git')
options=('!lto') options=('!lto' '!debug')
source=("git+https://git.syui.ai/ai/log.git#branch=main") source=("git+https://git.syui.ai/ai/log.git#branch=main")
sha256sums=('SKIP') sha256sums=('SKIP')
pkgver() {
cd log
printf "%s.r%s.g%s" \
"$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')" \
"$(git rev-list --count HEAD)" \
"$(git rev-parse --short HEAD)"
}
build() { build() {
cd log cd log
export CC=gcc export CC=gcc

View File

@@ -1,16 +1,25 @@
pkgname=aishell pkgname=aishell
pkgver=0.0.1 pkgver=0.0.1
pkgrel=1 pkgrel=1
pkgdesc='custom shell for aios' pkgdesc='custom shell for aios'
arch=('x86_64') arch=('x86_64')
url='https://git.syui.ai/ai/shell' url='https://git.syui.ai/ai/shell'
license=('MIT') license=('MIT')
depends=('gcc-libs') depends=('gcc-libs')
makedepends=('rust' 'cargo' 'git') makedepends=('rust' 'cargo' 'git')
options=('!lto') options=('!lto' '!debug')
source=("git+https://git.syui.ai/ai/shell.git#branch=main") source=("git+https://git.syui.ai/ai/shell.git#branch=main")
sha256sums=('SKIP') sha256sums=('SKIP')
pkgver() {
cd shell
printf "%s.r%s.g%s" \
"$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')" \
"$(git rev-list --count HEAD)" \
"$(git rev-parse --short HEAD)"
}
build() { build() {
cd shell cd shell
export CC=gcc export CC=gcc