summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Butler2020-10-09 09:49:48 +0100
committerAlex Butler2020-10-09 09:49:48 +0100
commite6007f463cccbd408250186d4d18d4a27386edca (patch)
treecb0dcf181cd938f435424ba5e3f1f8c3bfc6b82a
parent3ba1afb7bb92deb21cdecddbf5383ea04fd4aac1 (diff)
downloadaur-e6007f463cccbd408250186d4d18d4a27386edca.tar.gz
0.10.0-1
Remove installation script logic, replaced by `aurto init` Add dependency less
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD8
-rw-r--r--aurto.install75
3 files changed, 13 insertions, 80 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 63962239318..359d80b7d1f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = aurto
pkgdesc = An AUR tool for managing an auto-updating local 'aurto' package repository using aurutils.
- pkgver = 0.9.10
- pkgrel = 2
+ pkgver = 0.10.0
+ pkgrel = 1
url = https://github.com/alexheretic/aurto
install = aurto.install
arch = any
@@ -13,12 +13,14 @@ pkgbase = aurto
depends = pacutils
depends = pacman-contrib
depends = curl
+ depends = less
depends = sudo
backup = usr/lib/systemd/system/check-aurto-git-trigger.timer
backup = usr/lib/systemd/system/update-aurto.timer
+ backup = usr/lib/systemd/system/update-aurto-startup.timer
backup = etc/aurto/makepkg-chroot.conf
- source = https://github.com/alexheretic/aurto/archive/v0.9.10.tar.gz
- sha256sums = 14626c27c63f68da11945d8d2da8cbea2201dffa065fe3111df642baf62c6489
+ source = https://github.com/alexheretic/aurto/archive/v0.10.0.tar.gz
+ sha256sums = 136955537ff2847e18c49bfece5dfe0041f85e87134470c49a98aaabbb405d7d
pkgname = aurto
diff --git a/PKGBUILD b/PKGBUILD
index 3002f967a26..c1a66f69734 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Alex Butler <alexheretic@gmail.com>
pkgname=aurto
-pkgver=0.9.10
-pkgrel=2
+pkgver=0.10.0
+pkgrel=1
pkgdesc="An AUR tool for managing an auto-updating local 'aurto' package repository using aurutils."
arch=('any')
url="https://github.com/alexheretic/aurto"
@@ -12,14 +12,16 @@ depends=('aurutils'
'pacutils'
'pacman-contrib'
'curl'
+ 'less'
'sudo')
optdepends=()
makedepends=('cargo')
install="aurto.install"
source=("https://github.com/alexheretic/$pkgname/archive/v$pkgver.tar.gz")
-sha256sums=('14626c27c63f68da11945d8d2da8cbea2201dffa065fe3111df642baf62c6489')
+sha256sums=('136955537ff2847e18c49bfece5dfe0041f85e87134470c49a98aaabbb405d7d')
backup=('usr/lib/systemd/system/check-aurto-git-trigger.timer'
'usr/lib/systemd/system/update-aurto.timer'
+ 'usr/lib/systemd/system/update-aurto-startup.timer'
'etc/aurto/makepkg-chroot.conf')
build() {
diff --git a/aurto.install b/aurto.install
index f991b5cfe53..f4a4818c4d6 100644
--- a/aurto.install
+++ b/aurto.install
@@ -1,78 +1,7 @@
#!/usr/bin/env bash
-
set -eu
-user="${SUDO_USER:-$USER}"
-
-function initialised {
- grep -q '^Include = /etc/pacman.d/aurto$' /etc/pacman.conf
-}
-
-post_install() {
- if initialised; then
- echo 'Already initialised' >&2
- exit 0
- fi
-
- echo "aurto: Initialising for user: $user"
- echo "$user" > /usr/lib/aurto/user
- chmod 700 /usr/lib/aurto/user
-
- install -d /var/cache/pacman/aurto -o "$user"
- sudo -u "$user" repo-add /var/cache/pacman/aurto/aurto.db.tar 2>/dev/null
-
- echo 'aurto: Adding include /etc/pacman.d/aurto >> pacman.conf' >&2
- if ! test -f /etc/pacman.conf.aurto-backup; then
- cp /etc/pacman.conf /etc/pacman.conf.aurto-backup
- fi
- echo -e "# aurto repo\\nInclude = /etc/pacman.d/aurto" >> /etc/pacman.conf
-
- if ! test -f /etc/aurto/trusted-users; then
- echo 'aurto: Adding default trusted users -> /etc/aurto/trusted-users' >&2
- install -Dm640 -o "$user" /usr/lib/aurto/default-trusted-users.txt /etc/aurto/trusted-users
- fi
-
- echo 'aurto: Adding & enabling systemd timer update tasks' >&2
- systemctl enable --now /usr/lib/systemd/system/check-aurto-git-trigger.timer
- systemctl enable --now /usr/lib/systemd/system/update-aurto.timer
- systemctl enable /usr/lib/systemd/system/update-aurto-startup.timer
-
- echo "aurto: Passwordless usage available for \`wheel\` group"
-}
-
-post_upgrade() {
- old_version=$2
- update_from_before_0_7_8_1=$(vercmp "$old_version" "0.7.8-1")
- if [ "$update_from_before_0_7_8_1" = "-1" ] \
- && ! systemctl is-enabled /usr/lib/systemd/system/update-aurto-startup.timer 2>/dev/null
- then
- systemctl enable /usr/lib/systemd/system/update-aurto-startup.timer
- fi
-}
pre_remove() {
- if ! initialised; then
- exit 0
- fi
-
- echo 'aurto: Removing systemd timer update tasks' >&2
- systemctl disable --now check-aurto-git-trigger.timer || true
- systemctl disable --now update-aurto.timer || true
- systemctl disable update-aurto-startup.timer || true
-}
-
-post_remove() {
- if ! initialised; then
- exit 0
- fi
-
- echo 'aurto: Removing include from pacman.conf' >&2
- sed -i '/^Include = \/etc\/pacman.d\/aurto$/d' /etc/pacman.conf
- sed -i '/^# aurto repo$/d' /etc/pacman.conf
-
- echo 'aurto: Removing /var/cache/pacman/aurto' >&2
- rm -rf /var/cache/pacman/aurto 2>/dev/null || true
-
- rm -f /usr/lib/aurto/user 2>/dev/null || true
- rm -f /etc/aurto/trusted-users 2>/dev/null || true
- rm -d /etc/aurto 2>/dev/null || true
+ # aurto self cleanup
+ /usr/lib/aurto/install remove
}