From df6b07743b599493c161e6993a14ccfa377673b4 Mon Sep 17 00:00:00 2001 From: syui Date: Sat, 28 Feb 2026 15:25:54 +0900 Subject: [PATCH] fix pacman pkg --- .github/workflows/release.yml | 2 +- .gitignore | 1 + build.zsh | 19 +++++++++++-------- cfg/mcp.json | 17 ----------------- cfg/pkg.sh | 17 ----------------- cfg/zshrc | 13 +++++++++++-- pkg/aigpt/PKGBUILD | 24 ++++++++++++++++++++++++ pkg/ailog/PKGBUILD | 24 ++++++++++++++++++++++++ pkg/aishell/PKGBUILD | 24 ++++++++++++++++++++++++ 9 files changed, 96 insertions(+), 45 deletions(-) delete mode 100644 cfg/mcp.json delete mode 100755 cfg/pkg.sh create mode 100644 pkg/aigpt/PKGBUILD create mode 100644 pkg/ailog/PKGBUILD create mode 100644 pkg/aishell/PKGBUILD diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f27be0..c7b8e35 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,4 +46,4 @@ jobs: gh release delete latest --yes --cleanup-tag || true git tag -f latest git push -f origin latest - gh release create latest aios.tar.gz --title "latest" --notes "build $(date +%Y.%m.%d)" + gh release create latest aios.tar.gz --title "latest" --notes "build $(date +%Y.%m.%d)" --target main diff --git a/.gitignore b/.gitignore index ed6daf4..ff8707e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ root.x86_64/ archiso/ build.log .claude +/cfg/repo.sh diff --git a/build.zsh b/build.zsh index 9f13dbc..659f271 100755 --- a/build.zsh +++ b/build.zsh @@ -20,12 +20,19 @@ if [[ ! -f $ROOTFS/etc/pacman.conf ]]; then cp /etc/pacman.conf $ROOTFS/etc/pacman.conf fi -echo 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch -Server = http://mirrors.cat.net/archlinux/$repo/os/$arch' > $ROOTFS/etc/pacman.d/mirrorlist +echo 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch' > $ROOTFS/etc/pacman.d/mirrorlist sed -i 's/CheckSpace/#CheckSpace/' $ROOTFS/etc/pacman.conf +sed -i '/\[options\]/a NoUpgrade = etc/os-release' $ROOTFS/etc/pacman.conf + +cat >> $ROOTFS/etc/pacman.conf <<'EOF' + +[aios] +SigLevel = Optional TrustAll +Server = https://git.syui.ai/ai/repo/raw/branch/main/$arch +EOF 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 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' if [[ "$BUILD_MODE" == "image" ]]; then arch-chroot $ROOTFS /bin/sh -c 'pacman -S --noconfirm linux linux-firmware mkinitcpio' @@ -33,7 +40,7 @@ fi arch-chroot $ROOTFS /bin/sh -c 'npm i -g @anthropic-ai/claude-code' -bash cfg/pkg.sh $ROOTFS +arch-chroot $ROOTFS /bin/sh -c 'pacman -Sy --noconfirm ailog aigpt aishell' arch-chroot $ROOTFS /bin/sh -c 'chsh -s /bin/zsh' arch-chroot $ROOTFS /bin/sh -c 'useradd -m -G wheel -s /bin/zsh ai' @@ -50,10 +57,6 @@ EOF cp cfg/zshrc $ROOTFS/home/ai/.zshrc arch-chroot $ROOTFS /bin/sh -c 'chown ai:ai /home/ai/.zshrc' -mkdir -p $ROOTFS/home/ai/.config/claude -cp cfg/mcp.json $ROOTFS/home/ai/.config/claude/mcp.json -arch-chroot $ROOTFS /bin/sh -c 'chown -R ai:ai /home/ai/.config' - cat > $ROOTFS/etc/os-release </dev/null; then exec aishell fi + +function setup() { + ailog setup + ailog gpt core -d + ailog gpt memory -d + aigpt setup + # --- login --- + # ailog oauth $handle + # ailog oauth $handle_bot --bot + # claude +} diff --git a/pkg/aigpt/PKGBUILD b/pkg/aigpt/PKGBUILD new file mode 100644 index 0000000..51d5cb0 --- /dev/null +++ b/pkg/aigpt/PKGBUILD @@ -0,0 +1,24 @@ +pkgname=aigpt +pkgver=0.0.1 +pkgrel=1 +pkgdesc='ai memory and personality system for aios' +arch=('x86_64') +url='https://git.syui.ai/ai/gpt' +license=('MIT') +depends=('gcc-libs') +makedepends=('rust' 'cargo' 'git') +options=('!lto') +source=("git+https://git.syui.ai/ai/gpt.git#branch=main") +sha256sums=('SKIP') + +build() { + cd gpt + export CC=gcc + export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=gcc + cargo build --release +} + +package() { + cd gpt + install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" +} diff --git a/pkg/ailog/PKGBUILD b/pkg/ailog/PKGBUILD new file mode 100644 index 0000000..c2f0fb3 --- /dev/null +++ b/pkg/ailog/PKGBUILD @@ -0,0 +1,24 @@ +pkgname=ailog +pkgver=0.0.1 +pkgrel=1 +pkgdesc='atproto blog cli for aios' +arch=('x86_64') +url='https://git.syui.ai/ai/log' +license=('MIT') +depends=('gcc-libs') +makedepends=('rust' 'cargo' 'git') +options=('!lto') +source=("git+https://git.syui.ai/ai/log.git#branch=main") +sha256sums=('SKIP') + +build() { + cd log + export CC=gcc + export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=gcc + cargo build --release +} + +package() { + cd log + install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" +} diff --git a/pkg/aishell/PKGBUILD b/pkg/aishell/PKGBUILD new file mode 100644 index 0000000..235b031 --- /dev/null +++ b/pkg/aishell/PKGBUILD @@ -0,0 +1,24 @@ +pkgname=aishell +pkgver=0.0.1 +pkgrel=1 +pkgdesc='custom shell for aios' +arch=('x86_64') +url='https://git.syui.ai/ai/shell' +license=('MIT') +depends=('gcc-libs') +makedepends=('rust' 'cargo' 'git') +options=('!lto') +source=("git+https://git.syui.ai/ai/shell.git#branch=main") +sha256sums=('SKIP') + +build() { + cd shell + export CC=gcc + export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=gcc + cargo build --release +} + +package() { + cd shell + install -Dm755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" +}