diff options
Diffstat (limited to 'backup/burp/files')
-rw-r--r-- | backup/burp/files/burp-2.0.54-server_user.patch | 13 | ||||
-rw-r--r-- | backup/burp/files/burp-2.1.20-no_mkdir_run.patch | 10 | ||||
-rw-r--r-- | backup/burp/files/burp-2.1.20-protocol1_by_default.patch | 24 | ||||
-rw-r--r-- | backup/burp/files/burp.initd | 45 | ||||
-rw-r--r-- | backup/burp/files/burp.service | 10 |
5 files changed, 102 insertions, 0 deletions
diff --git a/backup/burp/files/burp-2.0.54-server_user.patch b/backup/burp/files/burp-2.0.54-server_user.patch new file mode 100644 index 000000000000..979bb4bd4c91 --- /dev/null +++ b/backup/burp/files/burp-2.0.54-server_user.patch @@ -0,0 +1,13 @@ +--- a/configs/server/burp.conf.in ++++ b/configs/server/burp.conf.in +@@ -68,8 +68,8 @@ + # keep = 6 + + # Run as different user/group. +-# user=graham +-# group=nogroup ++user=burp ++group=burp + + # CA options. + # If you want your server to be a certificate authority and generate its own diff --git a/backup/burp/files/burp-2.1.20-no_mkdir_run.patch b/backup/burp/files/burp-2.1.20-no_mkdir_run.patch new file mode 100644 index 000000000000..5dbdcf9e7c4c --- /dev/null +++ b/backup/burp/files/burp-2.1.20-no_mkdir_run.patch @@ -0,0 +1,10 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -417,7 +417,6 @@ + + install-data-local: + $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(localstatedir)/spool/$(PACKAGE_TARNAME) +- $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(runstatedir) + + clean-local: clean-local-check + diff --git a/backup/burp/files/burp-2.1.20-protocol1_by_default.patch b/backup/burp/files/burp-2.1.20-protocol1_by_default.patch new file mode 100644 index 000000000000..db9e9b6a9de5 --- /dev/null +++ b/backup/burp/files/burp-2.1.20-protocol1_by_default.patch @@ -0,0 +1,24 @@ +--- a/configs/client/burp.conf.in ++++ b/configs/client/burp.conf.in +@@ -10,7 +10,8 @@ + # 0 to decide automatically, 1 to force protocol1 mode (file level granularity + # with a pseudo mirrored storage on the server and optional rsync). 2 forces + # protocol2 mode (inline deduplication with variable length blocks). +-# protocol = 0 ++# WARNING: as of September 2017 protocol2 is still considered experimental. ++protocol = 1 + pidfile = @runstatedir@/@name@.client.pid + syslog = 0 + stdout = 1 +--- a/configs/server/burp.conf.in ++++ b/configs/server/burp.conf.in +@@ -21,7 +21,8 @@ + # protocol2 mode (inline deduplication with variable length blocks). + # Like many other settings, this can be set per client in the clientconfdir + # files. +-# protocol = 0 ++# WARNING: as of September 2017 protocol2 is still considered experimental. ++protocol = 1 + pidfile = @runstatedir@/@name@.server.pid + hardlinked_archive = 0 + working_dir_recovery_method = delete diff --git a/backup/burp/files/burp.initd b/backup/burp/files/burp.initd new file mode 100644 index 000000000000..a0b0dccacbcc --- /dev/null +++ b/backup/burp/files/burp.initd @@ -0,0 +1,45 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +BURP_CONFIG="/etc/burp/burp-server.conf" + +description="Burp is a network backup and restore program" + +command="/usr/sbin/burp" +command_args="-c '${BURP_CONFIG}' -F" +command_background="yes" +pidfile="/run/burp.server.pid" +start_stop_daemon_arg="--wait 500" + +extra_started_commands="reload summary" +description_reload="Reloads configuration" +description_summary="Displays main status monitor summary" + +get_backup_dir() { + grep '^directory = ' "${BURP_CONFIG}" \ + | sed -e 's/^directory = //' +} + +depend() { + need localmount + after bootmisc + use net +} + +start_pre() { + checkpath -o root:burp -m 0775 -d /etc/burp + checkpath -o root:burp -m 0640 -f /etc/burp/burp-server.conf + checkpath -o root:burp -m 0750 -d /etc/burp/clientconfdir + checkpath -o root:burp -m 0770 -d "$(get_backup_dir)" +} + +reload() { + ebegin "Reloading ${SVCNAME} configuration" + start-stop-daemon --exec ${command} --signal HUP + eend $? +} + +summary() { + "${command}" -c "${BURP_CONFIG}" -a S +} diff --git a/backup/burp/files/burp.service b/backup/burp/files/burp.service new file mode 100644 index 000000000000..121753629607 --- /dev/null +++ b/backup/burp/files/burp.service @@ -0,0 +1,10 @@ +[Unit] +Description=BackUp and Restore Program server +After=network.target + +[Service] +Type=simple +ExecStart=/usr/sbin/burp -F -c /etc/burp/burp-server.conf + +[Install] +WantedBy=multi-user.target |