summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD25
-rw-r--r--sanoid.service6
-rw-r--r--sanoid.timer12
4 files changed, 17 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9dabb2af6d2..d3cdc3425a0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = sanoid
pkgdesc = A policy-driven snapshot management tool for ZFS filesystems.
pkgver = 2.0.3
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/jimsalterjrs/sanoid
arch = any
license = GPL3
@@ -12,11 +12,7 @@ pkgbase = sanoid
optdepends = mbuffer: stream buffering
backup = etc/sanoid/sanoid.conf
source = sanoid-2.0.3.tar.gz::https://github.com/jimsalterjrs/sanoid/archive/v2.0.3.tar.gz
- source = sanoid.service
- source = sanoid.timer
sha256sums = 63115326695a00dc925d3ec8c307ed2543bb0a2479f2b15be3192bf2c7d50037
- sha256sums = a1f53363c2814a797ed4b19533b31db87e36bf9ffd41487c036570e80f498f76
- sha256sums = 73f17479b9fa5ee69e959f390945b3d4f56e615227ccb9770ad10eac05141f1c
pkgname = sanoid
diff --git a/PKGBUILD b/PKGBUILD
index 797b62aff25..69a44ad6361 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=sanoid
pkgver=2.0.3
-pkgrel=2
+pkgrel=3
pkgdesc="A policy-driven snapshot management tool for ZFS filesystems."
arch=('any')
url='https://github.com/jimsalterjrs/sanoid'
@@ -15,13 +15,19 @@ depends=(
optdepends=('pv: progress bars'
'lzop: compression'
'mbuffer: stream buffering')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/jimsalterjrs/sanoid/archive/v$pkgver.tar.gz"
- 'sanoid.service'
- 'sanoid.timer')
+source=(
+ "$pkgname-$pkgver.tar.gz::https://github.com/jimsalterjrs/sanoid/archive/v$pkgver.tar.gz"
+)
+
+sha256sums=('63115326695a00dc925d3ec8c307ed2543bb0a2479f2b15be3192bf2c7d50037')
-sha256sums=('63115326695a00dc925d3ec8c307ed2543bb0a2479f2b15be3192bf2c7d50037'
- 'a1f53363c2814a797ed4b19533b31db87e36bf9ffd41487c036570e80f498f76'
- '73f17479b9fa5ee69e959f390945b3d4f56e615227ccb9770ad10eac05141f1c')
+prepare() {
+ # Change /usr/sbin to /usr/bin
+ sed -i 's|/usr/sbin|/usr/bin|g' \
+ "${srcdir}/sanoid-${pkgver}/packages/debian/sanoid.timer" \
+ "${srcdir}/sanoid-${pkgver}/packages/debian/sanoid.service" \
+ "${srcdir}/sanoid-${pkgver}/packages/debian/sanoid-prune.service"
+}
package() {
cd "${pkgname}-${pkgver}"
@@ -40,6 +46,7 @@ package() {
install -Dm755 findoid "${pkgdir}/usr/bin/findoid"
# systemd
- install -D -m 644 "${srcdir}/sanoid.timer" "${pkgdir}/usr/lib/systemd/system/sanoid.timer"
- install -D -m 644 "${srcdir}/sanoid.service" "${pkgdir}/usr/lib/systemd/system/sanoid.service"
+ install -D -m 644 "${srcdir}/sanoid-${pkgver}/packages/debian/sanoid.timer" "${pkgdir}/usr/lib/systemd/system/sanoid.timer"
+ install -D -m 644 "${srcdir}/sanoid-${pkgver}/packages/debian/sanoid.service" "${pkgdir}/usr/lib/systemd/system/sanoid.service"
+ install -D -m 644 "${srcdir}/sanoid-${pkgver}/packages/debian/sanoid-prune.service" "${pkgdir}/usr/lib/systemd/system/sanoid-prune.service"
}
diff --git a/sanoid.service b/sanoid.service
deleted file mode 100644
index 7395501e5f4..00000000000
--- a/sanoid.service
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Sanoid
-
-[Service]
-Type=oneshot
-ExecStart=/usr/bin/sanoid --cron --verbose
diff --git a/sanoid.timer b/sanoid.timer
deleted file mode 100644
index a41239df111..00000000000
--- a/sanoid.timer
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Sanoid timer
-
-[Timer]
-OnBootSec=0min
-# Every minute, watch out for "frequently" snapshots.
-#OnCalendar=minutely
-# Every 15 minutes, more sane w/ "frequently" snapshots.
-OnCalendar=*:0/15
-
-[Install]
-WantedBy=timers.target