diff options
author | Drew Nutter | 2022-03-16 19:01:26 -0400 |
---|---|---|
committer | Drew Nutter | 2022-03-16 19:01:26 -0400 |
commit | ec3df8f14540c032953a2986731cc86480da5f2a (patch) | |
tree | 91c2a8e79e97b84451db51afc46de1a1c778078f | |
download | aur-ec3df8f14540c032953a2986731cc86480da5f2a.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 32 | ||||
-rw-r--r-- | upgrade.install | 14 |
3 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3320dd83b38e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = upgrade + pkgdesc = Automate system upgrades + pkgver = 0.1.0 + pkgrel = 0 + url = https://github.com/dnut/upgrade + install = upgrade.install + arch = i686 + arch = pentium4 + arch = x86_64 + arch = arm + arch = armv7h + arch = armv6h + arch = aarch64 + license = GPL3 + depends = paru + depends = kernel-modules-hook + backup = etc/upgrade.conf + source = git+https://github.com/dnut/upgrade + sha256sums = SKIP + +pkgname = upgrade diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c2fca4dff2b3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Drew Nutter <dnut@users.noreply.github.com> +pkgname=upgrade +pkgver=0.1.0 +pkgrel=0 +pkgdesc='Automate system upgrades' +url='https://github.com/dnut/upgrade' +source=("git+https://github.com/dnut/upgrade#tag=$pkgver") +backup=("etc/upgrade.ini") +arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64') +license=('GPL3') +makedepends=() +depends=('paru' 'kernel-modules-hook') +optdepends=() +sha256sums=('SKIP') +install=$pkgname.install +backup=etc/upgrade.conf + +build() { + echo +} + +package() { + cd "$srcdir/$pkgname" + + install -Dm755 upgrade "${pkgdir}/usr/bin/upgrade" + install -Dm755 clearpkgcache "${pkgdir}/usr/bin/clearpkgcache" + + install -Dm644 upgrade.service "${pkgdir}/etc/systemd/system/upgrade.service" + install -Dm644 upgrade.timer "${pkgdir}/etc/systemd/system/upgrade.timer" + + install -Dm644 upgrade.conf "${pkgdir}/etc/upgrade.conf" +} diff --git a/upgrade.install b/upgrade.install new file mode 100644 index 000000000000..59878868af80 --- /dev/null +++ b/upgrade.install @@ -0,0 +1,14 @@ + +post_install() { + groupadd upgraders + useradd -mG upgraders upgrade + echo 'upgrade ALL=(ALL) NOPASSWD: /usr/bin/pacman' >> /etc/sudoers + echo '%upgraders ALL=(ALL) /usr/bin/upgrade' >> /etc/sudoers + systemctl enable --now upgrade.timer +} + +post_remove() { + userdel upgrade + sed -i '/^upgrade /d' /etc/sudoers + sed -i '/^%upgraders /d' /etc/sudoers +} |