~sircmpwn/sr.ht-packages

sr.ht-pkgbuilds: git.sr.ht: Add periodic job as systemd timer v2 APPLIED

Thorben Günther: 1
 git.sr.ht: Add periodic job as systemd timer

 3 files changed, 25 insertions(+), 3 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/sr.ht-packages/patches/24409/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH sr.ht-pkgbuilds v2] git.sr.ht: Add periodic job as systemd timer Export this patch

---
The first version was missing the actual service file.
 git.sr.ht/PKGBUILD                   | 12 +++++++++---
 git.sr.ht/git.sr.ht-periodic.service |  7 +++++++
 git.sr.ht/git.sr.ht-periodic.timer   |  9 +++++++++
 3 files changed, 25 insertions(+), 3 deletions(-)
 create mode 100644 git.sr.ht/git.sr.ht-periodic.service
 create mode 100644 git.sr.ht/git.sr.ht-periodic.timer

diff --git a/git.sr.ht/PKGBUILD b/git.sr.ht/PKGBUILD
index aff9ae4..b4c5c0e 100644
--- a/git.sr.ht/PKGBUILD
+++ b/git.sr.ht/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=git.sr.ht
pkgver=0.70.4
pkgrel=1
pkgver=0.72.44
pkgrel=2
pkgdesc="sr.ht git services"
arch=("x86_64")
license=("AGPL3")
@@ -20,13 +20,17 @@ source=(
	"git.sr.ht.service"
	"git.sr.ht-api.service"
	"git.sr.ht-webhooks.service"
	"git.sr.ht-periodic.service"
	"git.sr.ht-periodic.timer"
	"sysusers.conf"
	"tmpfiles.conf"
)
sha256sums=('8a0879a717c757a12f36eff8cf2527d752c0e2ea21b335433b0d764e67d6bcb5'
sha256sums=('87108d4e77bb1d2a1f277a1ca5f02f125e5551fa8d88dc93577eb01ddedca15e'
            'fdc573980dce542774229ea9036e99e019ee0a382a271c08ddded9a5077a3e4b'
            'a01bf05bb49ee007d4527fa62dd0050507142d081fdeff22fd9aab85fe9c5230'
            'e19466f6f7430105e4f0cf777b7601bc2cb4ddb13835a3c82b646bc19376090b'
            '0eb513ad5c8753fc5dd352e784ab25a30f9f6310866084133acf0cb7998875f2'
            '9612d15a29539c30935369edb09554e1e54ce91dadfc205bcb9b8caecf3d7f69'
            '7ea576c62c70f7a26f135e8ea7aedc82ab2d670b213d8d8e861819bc84e99802'
            '0049eb8469635888d344599840e26495d225c34b4be5564e1b3e12ba0ac15eb5')
export PKGVER=$pkgver
@@ -51,6 +55,8 @@ package() {
	install -Dm0644 ../git.sr.ht.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../git.sr.ht-api.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../git.sr.ht-webhooks.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../git.sr.ht-periodic.service -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../git.sr.ht-periodic.timer -t "$pkgdir"/usr/lib/systemd/system/
	install -Dm0644 ../sysusers.conf "$pkgdir/usr/lib/sysusers.d/git.sr.ht.conf"
	install -Dm0644 ../tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/git.sr.ht.conf"
	python3 setup.py install --root="${pkgdir}" --optimize=1
diff --git a/git.sr.ht/git.sr.ht-periodic.service b/git.sr.ht/git.sr.ht-periodic.service
new file mode 100644
index 0000000..ce4c4b7
--- /dev/null
+++ b/git.sr.ht/git.sr.ht-periodic.service
@@ -0,0 +1,7 @@
[Unit]
Description=git.sr.ht maintenance tasks

[Service]
Type=oneshot
User=gitsrht
ExecStart=/usr/bin/gitsrht-periodic
diff --git a/git.sr.ht/git.sr.ht-periodic.timer b/git.sr.ht/git.sr.ht-periodic.timer
new file mode 100644
index 0000000..09f86f7
--- /dev/null
+++ b/git.sr.ht/git.sr.ht-periodic.timer
@@ -0,0 +1,9 @@
[Unit]
Description=Periodic git.sr.ht maintenance tasks

[Timer]
OnBootSec=20m
OnUnitActiveSec=20m

[Install]
WantedBy=timers.target
-- 
2.32.0