From 1ada10f44e2baf28823156c006c82a076c52f530 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Fri, 15 Jan 2021 23:17:34 +0100 Subject: borg-family_0.1-1 --- borg-family-0.1/debian/borg-family.config | 4 ++++ borg-family-0.1/debian/borg-family.docs | 1 + borg-family-0.1/debian/borg-family.examples | 1 + borg-family-0.1/debian/borg-family.init | 17 +++++++++++++++++ borg-family-0.1/debian/borg-family.manpages | 3 +++ borg-family-0.1/debian/borg-family.postinst | 15 +++++++++++++++ borg-family-0.1/debian/borg-family.postrm | 10 ++++++++++ borg-family-0.1/debian/borg-family.service | 14 ++++++++++++++ borg-family-0.1/debian/borg-family.substvars | 2 ++ borg-family-0.1/debian/borg-family.templates | 8 ++++++++ borg-family-0.1/debian/borg-family.timer | 10 ++++++++++ borg-family-0.1/debian/changelog | 5 +++++ borg-family-0.1/debian/compat | 1 + borg-family-0.1/debian/control | 14 ++++++++++++++ borg-family-0.1/debian/debhelper-build-stamp | 1 + borg-family-0.1/debian/files | 2 ++ borg-family-0.1/debian/rules | 3 +++ borg-family-0.1/debian/source/format | 1 + 18 files changed, 112 insertions(+) create mode 100644 borg-family-0.1/debian/borg-family.config create mode 100644 borg-family-0.1/debian/borg-family.docs create mode 100644 borg-family-0.1/debian/borg-family.examples create mode 100644 borg-family-0.1/debian/borg-family.init create mode 100644 borg-family-0.1/debian/borg-family.manpages create mode 100644 borg-family-0.1/debian/borg-family.postinst create mode 100644 borg-family-0.1/debian/borg-family.postrm create mode 100644 borg-family-0.1/debian/borg-family.service create mode 100644 borg-family-0.1/debian/borg-family.substvars create mode 100644 borg-family-0.1/debian/borg-family.templates create mode 100644 borg-family-0.1/debian/borg-family.timer create mode 100644 borg-family-0.1/debian/changelog create mode 100644 borg-family-0.1/debian/compat create mode 100644 borg-family-0.1/debian/control create mode 100644 borg-family-0.1/debian/debhelper-build-stamp create mode 100644 borg-family-0.1/debian/files create mode 100755 borg-family-0.1/debian/rules create mode 100644 borg-family-0.1/debian/source/format (limited to 'borg-family-0.1/debian') diff --git a/borg-family-0.1/debian/borg-family.config b/borg-family-0.1/debian/borg-family.config new file mode 100644 index 0000000..d0e4f26 --- /dev/null +++ b/borg-family-0.1/debian/borg-family.config @@ -0,0 +1,4 @@ +#!/bin/sh -e +. /usr/share/debconf/confmodule +db_input critical borg-family/borg-repo || true +db_go diff --git a/borg-family-0.1/debian/borg-family.docs b/borg-family-0.1/debian/borg-family.docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/borg-family-0.1/debian/borg-family.docs @@ -0,0 +1 @@ +README diff --git a/borg-family-0.1/debian/borg-family.examples b/borg-family-0.1/debian/borg-family.examples new file mode 100644 index 0000000..e002ac5 --- /dev/null +++ b/borg-family-0.1/debian/borg-family.examples @@ -0,0 +1 @@ +doc/examples/envvars diff --git a/borg-family-0.1/debian/borg-family.init b/borg-family-0.1/debian/borg-family.init new file mode 100644 index 0000000..72e9267 --- /dev/null +++ b/borg-family-0.1/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 shuld run bfrun from cron if not using systemd borg-family.timer" ;; +esac diff --git a/borg-family-0.1/debian/borg-family.manpages b/borg-family-0.1/debian/borg-family.manpages new file mode 100644 index 0000000..160e2fa --- /dev/null +++ b/borg-family-0.1/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.1/debian/borg-family.postinst b/borg-family-0.1/debian/borg-family.postinst new file mode 100644 index 0000000..5bf8c69 --- /dev/null +++ b/borg-family-0.1/debian/borg-family.postinst @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +EVFILE=/etc/borg-family/envvars + +if [ "$1" = configure ]; then + . /usr/share/debconf/confmodule + unset BORG_REPO + db_get borg-family/borg-repo && BORG_REPO="$RET" + db_stop + [ -f "$EVFILE" ] || install -m 644 /usr/share/doc/borg-family/examples/envvars "$EVFILE" + [ -n "$BORG_REPO" ] && sed --in-place -e 's#^export BORG_REPO=.*$#export BORG_REPO="'$BORG_REPO'"#' -- "$EVFILE" +fi + +#DEBHELPER# diff --git a/borg-family-0.1/debian/borg-family.postrm b/borg-family-0.1/debian/borg-family.postrm new file mode 100644 index 0000000..5ae54c6 --- /dev/null +++ b/borg-family-0.1/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 +fi + +#DEBHELPER# diff --git a/borg-family-0.1/debian/borg-family.service b/borg-family-0.1/debian/borg-family.service new file mode 100644 index 0000000..f6aab42 --- /dev/null +++ b/borg-family-0.1/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.1/debian/borg-family.substvars b/borg-family-0.1/debian/borg-family.substvars new file mode 100644 index 0000000..a595723 --- /dev/null +++ b/borg-family-0.1/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.1/debian/borg-family.templates b/borg-family-0.1/debian/borg-family.templates new file mode 100644 index 0000000..b17ce60 --- /dev/null +++ b/borg-family-0.1/debian/borg-family.templates @@ -0,0 +1,8 @@ +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. + diff --git a/borg-family-0.1/debian/borg-family.timer b/borg-family-0.1/debian/borg-family.timer new file mode 100644 index 0000000..14a848a --- /dev/null +++ b/borg-family-0.1/debian/borg-family.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Run borg-family backup + +[Timer] +OnCalendar=daily +Persistent=true + +[Install] +WantedBy=timers.target + diff --git a/borg-family-0.1/debian/changelog b/borg-family-0.1/debian/changelog new file mode 100644 index 0000000..e2329ed --- /dev/null +++ b/borg-family-0.1/debian/changelog @@ -0,0 +1,5 @@ +borg-family (0.1-1) UNRELEASED; urgency=medium + + * Initial release. + + -- Ludovic Pouzenc Sat, 28 Nov 2020 17:07:53 +0100 diff --git a/borg-family-0.1/debian/compat b/borg-family-0.1/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/borg-family-0.1/debian/compat @@ -0,0 +1 @@ +10 diff --git a/borg-family-0.1/debian/control b/borg-family-0.1/debian/control new file mode 100644 index 0000000..3ca323f --- /dev/null +++ b/borg-family-0.1/debian/control @@ -0,0 +1,14 @@ +Source: borg-family +Maintainer: Ludovic Pouzenc +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.1/debian/debhelper-build-stamp b/borg-family-0.1/debian/debhelper-build-stamp new file mode 100644 index 0000000..e8dd97e --- /dev/null +++ b/borg-family-0.1/debian/debhelper-build-stamp @@ -0,0 +1 @@ +borg-family diff --git a/borg-family-0.1/debian/files b/borg-family-0.1/debian/files new file mode 100644 index 0000000..225c048 --- /dev/null +++ b/borg-family-0.1/debian/files @@ -0,0 +1,2 @@ +borg-family_0.1-1_all.deb admin optional +borg-family_0.1-1_amd64.buildinfo admin optional diff --git a/borg-family-0.1/debian/rules b/borg-family-0.1/debian/rules new file mode 100755 index 0000000..cbe925d --- /dev/null +++ b/borg-family-0.1/debian/rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +%: + dh $@ diff --git a/borg-family-0.1/debian/source/format b/borg-family-0.1/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/borg-family-0.1/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) -- cgit v1.2.3