From 11555941d16c9b13e2f8198f00ec5132ff7eb0ad Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Sun, 14 Mar 2021 17:14:09 -0500 Subject: [PATCH] Moved several small packages to split package packages moved into this project: - tl-dmesg-unrestrict - tl-pacdiff-hook - tl-reflector-hook - tl-steamdummy --- PKGBUILD | 54 ++++++++++++++++++++++++++++++ tl-dmesg-unrestrict.conf | 1 + tl-pacdiff.hook | 10 ++++++ tl-reflector.conf | 12 +++++++ tl-reflector.hook | 12 +++++++ tl-reflector.service.override.conf | 3 ++ 6 files changed, 92 insertions(+) create mode 100644 PKGBUILD create mode 100644 tl-dmesg-unrestrict.conf create mode 100644 tl-pacdiff.hook create mode 100644 tl-reflector.conf create mode 100644 tl-reflector.hook create mode 100644 tl-reflector.service.override.conf diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..48b3ada --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: David Thurstenson +pkgbase=tl-archconfig +pkgname=("tl-dmesg-unrestrict" "tl-pacdiff-hook" "tl-reflector-hook" "tl-steamdummy") +pkgver=1 +pkgrel=1 +pkgdesc="Thurstylark's system-level tweaks for Arch Linux" +arch=(any) +url="https://git.thurstylark.com/tl-archconfig.git" +license=('GPL') +groups=(tlconfig) +source=("tl-dmesg-unrestrict.conf" + "tl-pacdiff.hook" + "tl-reflector.hook" + "tl-reflector.service.override.conf" + "tl-reflector.conf" +) +sha256sums=('0ccede1887575ae52e57824dd53cd9f65cf13b249a3757097e9c06dc16ac535e' + 'fa4010aefe4ed06d623d5915ed70442c263c41a5eb72014b1084210d4db33ed5' + '167201c316f9cfabd84fb375c7ee21dcf9c211895b6693053def8c87e27508e1' + '7801aaf6d28d0bf5f7b8c0e35e04af7201f3178b3b4af07a48a36ab4d1e8d7f1' + 'ffe8c4f0928ffd70d05b3ca04d87f8181aa21214cc62fb4dd71a3753c2a788d0') + +package_tl-dmesg-unrestrict() { + pkgdesc="Set kernel.dmesg)unrestrict=0" + + install -Dm644 tl-dmesg-unrestrict.conf \ + ${pkgdir}/usr/lib/sysctl.d/99-tl-dmesg-unrestrict.conf +} + +package_tl-pacdiff-hook() { + pkgdesc="A hook to run pacdiff after any run of pacman" + depends=('pacman-contrib' 'vim') + + install -Dm644 tl-pacdiff.hook ${pkgdir}/usr/share/libalpm/hooks/pacdiff.hook +} + +package_tl-reflector-hook() { + pkgdesc="A hook to run reflector after an upgrade to pacman-mirrorlist, plus reflector config" + depends=('reflector') + + install -Dm644 tl-reflector.hook \ + ${pkgdir}/usr/share/libalpm/hooks/tl-reflector.hook + + install -Dm644 tl-reflector.service.override.conf \ + ${pkgdir}/etc/systemd/system/reflector.service.d/override.conf + + install -Dm644 tl-reflector.conf \ + ${pkgdir}/etc/xdg/reflector/tl-reflector.conf +} + +package_tl-steamdummy() { + pkgdesc="Dummy package to satisfy a req for steam" + provides=(steam) +} diff --git a/tl-dmesg-unrestrict.conf b/tl-dmesg-unrestrict.conf new file mode 100644 index 0000000..bbf2472 --- /dev/null +++ b/tl-dmesg-unrestrict.conf @@ -0,0 +1 @@ +kernel.dmesg_restrict = 0 diff --git a/tl-pacdiff.hook b/tl-pacdiff.hook new file mode 100644 index 0000000..1cadbf9 --- /dev/null +++ b/tl-pacdiff.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Operation = Remove +Type = Package +Target = * +[Action] +Description = The following pacdiffs were found: +When = PostTransaction +Exec = /usr/bin/pacdiff -o diff --git a/tl-reflector.conf b/tl-reflector.conf new file mode 100644 index 0000000..c70aeac --- /dev/null +++ b/tl-reflector.conf @@ -0,0 +1,12 @@ +# Thurstylark's reflector config + +--save /etc/pacman.d/mirrorlist + +--sort rate + + +# Filters (inclusive) + +--protocol https +--country "United States" +--latest 10 diff --git a/tl-reflector.hook b/tl-reflector.hook new file mode 100644 index 0000000..f642850 --- /dev/null +++ b/tl-reflector.hook @@ -0,0 +1,12 @@ +# Shamelessly copied from https://wiki.archlinux.org/index.php/Reflector#pacman_hook +[Trigger] +Operation = Upgrade +Type = Package +Target = pacman-mirrorlist +Target = tl-reflector-hook + +[Action] +Description = Updating pacman-mirrorlist with reflector and removing pacnew... +When = PostTransaction +Depends = reflector +Exec = /bin/sh -c 'systemctl start reflector.service; if [ -f /etc/pacman.d/mirrorlist.pacnew ]; then rm /etc/pacman.d/mirrorlist.pacnew; fi' diff --git a/tl-reflector.service.override.conf b/tl-reflector.service.override.conf new file mode 100644 index 0000000..fb1d27d --- /dev/null +++ b/tl-reflector.service.override.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=/usr/bin/reflector @/etc/xdg/reflector/tl-reflector.conf