From df9f3bd75b32406fa7c34376af5ef97e230361bc Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 17 Jul 2023 00:16:48 +0200 Subject: readme, file structure --- PKGBUILD | 34 --------------------------------- Readme.md | 46 +++++++++++++++++---------------------------- aurbuilder.install | 18 ------------------ pkgbuild/PKGBUILD | 32 +++++++++++++++++++++++++++++++ pkgbuild/aurbuilder.install | 18 ++++++++++++++++++ 5 files changed, 67 insertions(+), 81 deletions(-) delete mode 100644 PKGBUILD delete mode 100644 aurbuilder.install create mode 100644 pkgbuild/PKGBUILD create mode 100644 pkgbuild/aurbuilder.install diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index e5f4d71..0000000 --- a/PKGBUILD +++ /dev/null @@ -1,34 +0,0 @@ -# Maintainer: Your Name -pkgname=aurbuilder -pkgver=0.0 -pkgrel=1 -pkgdesc="AUR Package builder" -arch=( any ) -url="https://gitea.lauch.link/jonas/aurbuilder" -license=('CUSTOM') -groups=() -depends=( podman bash ) -makedepends=() -optdepends=() -source=(git+$url.git) -sha256sums=( SKIP ) #autofill using updpkgsums -install=$pkgname.install - -pkgver() { - date +%Y%m%d -} - -build() { - cd "$pkgname" -} - -package() { - cd "$srcdir/$pkgname" - install -Dt $pkgdir/usr/share/aurbuilder container/{Dockerfile,sudoers} - install -Dt $pkgdir/usr/share/aurbuilder/bin container/bin/* - install -Dt $pkgdir/usr/lib/aurbuilder scripts/* - install -Dt $pkgdir/usr/lib/systemd/system unitfiles/* - install -Dt $pkgdir/etc/aurbuilder configs/* - -} - diff --git a/Readme.md b/Readme.md index 1b8c027..46b4284 100644 --- a/Readme.md +++ b/Readme.md @@ -1,12 +1,27 @@ # AUR PKG Builder -Docker base AUR Package builder for local arch repo +Automated AUR package buildsystem. +## Installation + +aurbuilder is designed to be run on Arch Linux. +Use the `PKGBUILD` in `pkgbuild/` to install with `makepkg -si`. + +Enable the systemd timers to activate the automated builds: +`systemctl enable aurbuilder-container.timer` and +`systemctl enable aurbuilder-package.timer`. + +## Usage + +Add packages to build in `/etc/aurbuilder/packages` (one per line). + +Builds can be manually triggered by `systemctl start aurbuilder-package.service`. +This requires a `aurbuilder-container.service` run to have completed beforehand. ## Locations -| localtion | description | +| location | description | | --- | --- | | `/srv/pkg` | Package output directory | | `/etc/aurbuilder` | Configuration files | @@ -14,30 +29,3 @@ Docker base AUR Package builder for local arch repo | `/usr/share/aurbuilder` | Container buildfiles | | `/usr/lib/aurbuilder` | Executables | | `/usr/lib/systemd/system` | Systemd Unitfiles | - -* Output, db and webroot `/srv/pkg/` -* Dockerfile and scripts for the Container `` -* Scripts `` - -## nginx - -Config in `nginx.conf` - -```nginx -# in http block - -include /etc/nginx/arch.conf; -#include /etc/nginx/arch_ssl.conf; -``` - -## Workflow - -Provided: Package name - -* search AUR for package (exact match only!) -* build dependency tree (also search with provided, then there is no exact match) -* prioritize packages in official repos. Don't build them. -* Add all AUR-PKGs in tree to to-build-list -* MAKEPKG ur way thourhg - - diff --git a/aurbuilder.install b/aurbuilder.install deleted file mode 100644 index c8f383c..0000000 --- a/aurbuilder.install +++ /dev/null @@ -1,18 +0,0 @@ -pre_install() { - pkgname=aurbuilder - - if ! id -u $pkgname > /dev/null 2>&1; then - useradd -r -U $pkgname -d /var/lib/$pkgname -m -s /usr/bin/nologin - uid=$(id -u $pkgname) - gid=$(id -g $pkgname) - - usermod --add-subuids "${uid}000-${uid}999" \ - --add-subgids "${gid}000-${gid}999" \ - $pkgname - - loginctl enable-linger "$uid" - fi - - mkdir -p /srv/pkg - chown $pkgname:$pkgname /srv/pkg -} diff --git a/pkgbuild/PKGBUILD b/pkgbuild/PKGBUILD new file mode 100644 index 0000000..93d4710 --- /dev/null +++ b/pkgbuild/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Your Name +pkgname=aurbuilder +pkgver=0.0 +pkgrel=1 +pkgdesc="AUR Package builder" +arch=( any ) +url="https://gitea.lauch.link/jonas/aurbuilder" +license=('CUSTOM') +groups=() +depends=( podman bash ) +makedepends=() +optdepends=() +source=(git+$url.git) +sha256sums=( SKIP ) +install=$pkgname.install + +pkgver() { + date +%Y%m%d +} + +build() { + cd "$pkgname" +} + +package() { + cd "$srcdir/$pkgname" + install -Dt $pkgdir/usr/share/aurbuilder container/{Dockerfile,sudoers} + install -Dt $pkgdir/usr/share/aurbuilder/bin container/bin/* + install -Dt $pkgdir/usr/lib/aurbuilder scripts/* + install -Dt $pkgdir/usr/lib/systemd/system unitfiles/* + install -Dt $pkgdir/etc/aurbuilder configs/* +} diff --git a/pkgbuild/aurbuilder.install b/pkgbuild/aurbuilder.install new file mode 100644 index 0000000..c8f383c --- /dev/null +++ b/pkgbuild/aurbuilder.install @@ -0,0 +1,18 @@ +pre_install() { + pkgname=aurbuilder + + if ! id -u $pkgname > /dev/null 2>&1; then + useradd -r -U $pkgname -d /var/lib/$pkgname -m -s /usr/bin/nologin + uid=$(id -u $pkgname) + gid=$(id -g $pkgname) + + usermod --add-subuids "${uid}000-${uid}999" \ + --add-subgids "${gid}000-${gid}999" \ + $pkgname + + loginctl enable-linger "$uid" + fi + + mkdir -p /srv/pkg + chown $pkgname:$pkgname /srv/pkg +} -- cgit v1.2.3