summaryrefslogtreecommitdiff
path: root/borg-family-0.2/debian
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2021-06-15 16:45:20 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2021-06-15 16:45:20 +0200
commitb9601cf46a75b373f6b6b902d7ac2be38ab2ffe8 (patch)
treedaa3ef109d6f0b1dd7884622a2b2fba8c10e32cb /borg-family-0.2/debian
parent1ada10f44e2baf28823156c006c82a076c52f530 (diff)
downloadborg-family-b9601cf46a75b373f6b6b902d7ac2be38ab2ffe8.tar.gz
borg-family-b9601cf46a75b373f6b6b902d7ac2be38ab2ffe8.tar.bz2
borg-family-b9601cf46a75b373f6b6b902d7ac2be38ab2ffe8.zip
borg-family_0.2-1
Diffstat (limited to 'borg-family-0.2/debian')
-rw-r--r--borg-family-0.2/debian/borg-family.config5
-rw-r--r--borg-family-0.2/debian/borg-family.cron.daily5
-rw-r--r--borg-family-0.2/debian/borg-family.docs1
-rw-r--r--borg-family-0.2/debian/borg-family.examples1
-rw-r--r--borg-family-0.2/debian/borg-family.init17
-rw-r--r--borg-family-0.2/debian/borg-family.manpages3
-rw-r--r--borg-family-0.2/debian/borg-family.postinst17
-rw-r--r--borg-family-0.2/debian/borg-family.postrm10
-rw-r--r--borg-family-0.2/debian/borg-family.service14
-rw-r--r--borg-family-0.2/debian/borg-family.substvars2
-rw-r--r--borg-family-0.2/debian/borg-family.templates16
-rw-r--r--borg-family-0.2/debian/changelog5
-rw-r--r--borg-family-0.2/debian/compat1
-rw-r--r--borg-family-0.2/debian/control14
-rw-r--r--borg-family-0.2/debian/debhelper-build-stamp1
-rw-r--r--borg-family-0.2/debian/files2
-rwxr-xr-xborg-family-0.2/debian/rules3
-rw-r--r--borg-family-0.2/debian/source/format1
18 files changed, 118 insertions, 0 deletions
diff --git a/borg-family-0.2/debian/borg-family.config b/borg-family-0.2/debian/borg-family.config
new file mode 100644
index 0000000..7483dd7
--- /dev/null
+++ b/borg-family-0.2/debian/borg-family.config
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+. /usr/share/debconf/confmodule
+db_input critical borg-family/borg-repo || true
+db_input critical borg-family/borg-repo2 || true
+db_go
diff --git a/borg-family-0.2/debian/borg-family.cron.daily b/borg-family-0.2/debian/borg-family.cron.daily
new file mode 100644
index 0000000..d08f88a
--- /dev/null
+++ b/borg-family-0.2/debian/borg-family.cron.daily
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+if [ -x /usr/sbin/bfrun ]; then
+ /usr/bin/systemd-inhibit --why="Prevent interrupting backup" /usr/sbin/bfrun
+fi
diff --git a/borg-family-0.2/debian/borg-family.docs b/borg-family-0.2/debian/borg-family.docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/borg-family-0.2/debian/borg-family.docs
@@ -0,0 +1 @@
+README
diff --git a/borg-family-0.2/debian/borg-family.examples b/borg-family-0.2/debian/borg-family.examples
new file mode 100644
index 0000000..e002ac5
--- /dev/null
+++ b/borg-family-0.2/debian/borg-family.examples
@@ -0,0 +1 @@
+doc/examples/envvars
diff --git a/borg-family-0.2/debian/borg-family.init b/borg-family-0.2/debian/borg-family.init
new file mode 100644
index 0000000..3b7b326
--- /dev/null
+++ b/borg-family-0.2/debian/borg-family.init
@@ -0,0 +1,17 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: borg-family
+# Required-Start: $network $local_fs $syslog
+# Required-Stop: $local_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: borg-family backup scripts
+# Description: Makes Borg running periodically to backup computers to a remote server
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+case "$1" in
+ start|stop|restart|reload|status|force-reload)
+ log_action_msg "This is a stub, you should run bfrun from cron if not using systemd borg-family.timer" ;;
+esac
diff --git a/borg-family-0.2/debian/borg-family.manpages b/borg-family-0.2/debian/borg-family.manpages
new file mode 100644
index 0000000..160e2fa
--- /dev/null
+++ b/borg-family-0.2/debian/borg-family.manpages
@@ -0,0 +1,3 @@
+doc/man/bfenv.1
+doc/man/bfrun.1
+doc/man/bfwhat.1
diff --git a/borg-family-0.2/debian/borg-family.postinst b/borg-family-0.2/debian/borg-family.postinst
new file mode 100644
index 0000000..e900217
--- /dev/null
+++ b/borg-family-0.2/debian/borg-family.postinst
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = configure ]; then
+ . /usr/share/debconf/confmodule
+ unset BORG_REPO
+ for i in "" 2
+ do
+ db_get borg-family/borg-repo$i && BORG_REPO="$RET"
+ ENVFILE=/etc/borg-family/envvars$i
+ [ -f "$ENVFILE" ] || install -m 644 /usr/share/doc/borg-family/examples/envvars "$ENVFILE"
+ [ -n "$BORG_REPO" ] && sed --in-place -e 's#^export BORG_REPO=.*$#export BORG_REPO="'$BORG_REPO'"#' -- "$ENVFILE"
+ done
+ db_stop
+fi
+
+#DEBHELPER#
diff --git a/borg-family-0.2/debian/borg-family.postrm b/borg-family-0.2/debian/borg-family.postrm
new file mode 100644
index 0000000..cf11e70
--- /dev/null
+++ b/borg-family-0.2/debian/borg-family.postrm
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "purge" ]; then
+ . /usr/share/debconf/confmodule
+ db_purge
+ rm -f /etc/borg-family/envvars /etc/borg-family/envvars2
+fi
+
+#DEBHELPER#
diff --git a/borg-family-0.2/debian/borg-family.service b/borg-family-0.2/debian/borg-family.service
new file mode 100644
index 0000000..f6aab42
--- /dev/null
+++ b/borg-family-0.2/debian/borg-family.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Makes Borg running periodically to backup computers to a remote server
+Wants=default.target network-online.target
+ConditionACPower=true
+
+[Service]
+ExecStart=/usr/bin/systemd-inhibit --why="Prevent interrupting backup" /usr/sbin/bfrun
+Restart=no
+# Lower CPU and I/O priority.
+Nice=19
+CPUSchedulingPolicy=batch
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
+IOWeight=100
diff --git a/borg-family-0.2/debian/borg-family.substvars b/borg-family-0.2/debian/borg-family.substvars
new file mode 100644
index 0000000..a595723
--- /dev/null
+++ b/borg-family-0.2/debian/borg-family.substvars
@@ -0,0 +1,2 @@
+misc:Depends=debconf (>= 0.5) | debconf-2.0
+misc:Pre-Depends=
diff --git a/borg-family-0.2/debian/borg-family.templates b/borg-family-0.2/debian/borg-family.templates
new file mode 100644
index 0000000..4c1a6c9
--- /dev/null
+++ b/borg-family-0.2/debian/borg-family.templates
@@ -0,0 +1,16 @@
+Template: borg-family/borg-repo
+Type: string
+Description: Borg repository URL:
+ Please set the backup destination.
+ .
+ It will be exported to BORG_REPO by bfrun for borg commands.
+ Could be 'ssh://user@host:port/abspath/to/repo', or 'user@host:relpath/to/repo', see man borg.
+
+Template: borg-family/borg-repo2
+Type: string
+Description: Second Borg repository URL:
+ Please set the second backup destination.
+ .
+ It will be exported to BORG_REPO by bfrun for borg commands.
+ Could be 'ssh://user@host:port/abspath/to/repo', or 'user@host:relpath/to/repo', see man borg.
+
diff --git a/borg-family-0.2/debian/changelog b/borg-family-0.2/debian/changelog
new file mode 100644
index 0000000..b88eba1
--- /dev/null
+++ b/borg-family-0.2/debian/changelog
@@ -0,0 +1,5 @@
+borg-family (0.2-1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+
+ -- Ludovic Pouzenc <ludovic@pouzenc.fr> Tue, 15 Jun 2021 15:59:45 +0200
diff --git a/borg-family-0.2/debian/compat b/borg-family-0.2/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/borg-family-0.2/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/borg-family-0.2/debian/control b/borg-family-0.2/debian/control
new file mode 100644
index 0000000..3ca323f
--- /dev/null
+++ b/borg-family-0.2/debian/control
@@ -0,0 +1,14 @@
+Source: borg-family
+Maintainer: Ludovic Pouzenc <ludovic@pouzenc.fr>
+Section: admin
+Priority: optional
+Standards-Version: 4.3.0
+Build-Depends: debhelper (>= 10)
+
+Package: borg-family
+Architecture: all
+Depends: bash (>= 2.0), borgbackup (>= 1.0), coreutils (>= 4.0), debconf, gawk, openssh-client, pwgen (>= 2.0), sed (>= 4.0), util-linux (>= 2.0), ${misc:Depends}
+Description: Makes Borg running periodically to backup computers to a remote server
+ borg-family ease the backup automation configuration around Borg
+ in small environnements, like backuping some computers to a remote
+ family server.
diff --git a/borg-family-0.2/debian/debhelper-build-stamp b/borg-family-0.2/debian/debhelper-build-stamp
new file mode 100644
index 0000000..e8dd97e
--- /dev/null
+++ b/borg-family-0.2/debian/debhelper-build-stamp
@@ -0,0 +1 @@
+borg-family
diff --git a/borg-family-0.2/debian/files b/borg-family-0.2/debian/files
new file mode 100644
index 0000000..120b6c0
--- /dev/null
+++ b/borg-family-0.2/debian/files
@@ -0,0 +1,2 @@
+borg-family_0.2-1_all.deb admin optional
+borg-family_0.2-1_amd64.buildinfo admin optional
diff --git a/borg-family-0.2/debian/rules b/borg-family-0.2/debian/rules
new file mode 100755
index 0000000..cbe925d
--- /dev/null
+++ b/borg-family-0.2/debian/rules
@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+%:
+ dh $@
diff --git a/borg-family-0.2/debian/source/format b/borg-family-0.2/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/borg-family-0.2/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)