SEANK.H.LIAO

cloudbuild arch pkgbuild

building arch PKGBUILDs in cloudbuild

What?

I wanted a private private arch repository My thinking was:

Infra

git

Easy.

Triger build on push

Mostly reliable build triggers

Building

Arch uses makepkg

makepkg doesn't run as root, so sudo -u nobody makepkg --needed --noconfirm

but makepkg needs pacman to resolve dependencies, so first echo 'nobody ALL=(ALL) NOPASSWD: /bin/pacman' >> /etc/sudoers

also as nobody you don't have write permissions for the mounted /workspace, copy to/from /tmp

Deploying

Remember to pull in your repo.db.tar, update with repo-add and push both the new database files and packages to hosting

and firgure out a way to clean up old packages

Notes

Arch with base and base-devel installed is 1.6GB, even with GCP's network and caching, it is still a pain to download it onto build workers