summaryrefslogtreecommitdiff
path: root/app-backup/burp/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-06-02 17:13:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-06-02 17:13:10 +0100
commit0bff53119f08d677db6c1a991bd30741682a8a08 (patch)
tree6ec8d4c38152bb4f2bb4b93277236ebd9fbbd21d /app-backup/burp/files
parent6c14fa2586d9e9c4427b5f727dc6c8ab77587cec (diff)
Revert "gentoo resync : 02.06.2018"
This reverts commit 6c14fa2586d9e9c4427b5f727dc6c8ab77587cec.
Diffstat (limited to 'app-backup/burp/files')
-rw-r--r--app-backup/burp/files/burp-2.0.54-chuser_after_getting_lock.patch38
-rw-r--r--app-backup/burp/files/burp-2.0.54-ncurses_pkg-config.patch37
-rw-r--r--app-backup/burp/files/burp-2.0.54-no_mkdir_run.patch10
-rw-r--r--app-backup/burp/files/burp-2.0.54-protocol1_by_default.patch24
-rw-r--r--app-backup/burp/files/burp.tmpfiles1
-rw-r--r--app-backup/burp/files/burp2.initd45
6 files changed, 155 insertions, 0 deletions
diff --git a/app-backup/burp/files/burp-2.0.54-chuser_after_getting_lock.patch b/app-backup/burp/files/burp-2.0.54-chuser_after_getting_lock.patch
new file mode 100644
index 000000000000..3f75c878d5bb
--- /dev/null
+++ b/app-backup/burp/files/burp-2.0.54-chuser_after_getting_lock.patch
@@ -0,0 +1,38 @@
+From f765ad2c9f421eefcd3afc447ed45fa3fd2d17a0 Mon Sep 17 00:00:00 2001
+From: Graham Keeling <grke@grke.net>
+Date: Sun, 13 Aug 2017 11:50:54 +0000
+Subject: [PATCH] Drop privileges after main pidfile creation.
+
+Change-Id: I762541db55e7884531e4d869e1a86533df71b5b8
+---
+ src/prog.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/prog.c b/src/prog.c
+index 244590d3..b94df6d3 100644
+--- a/src/prog.c
++++ b/src/prog.c
+@@ -111,11 +111,6 @@ int reload(struct conf **confs, const char *conffile, bool firsttime)
+ setup_signals();
+ #endif
+
+- // Do not try to change user or group after the first time.
+- if(firsttime && chuser_and_or_chgrp(
+- get_string(confs[OPT_USER]), get_string(confs[OPT_GROUP])))
+- return -1;
+-
+ return 0;
+ }
+
+@@ -486,6 +481,11 @@ int real_main(int argc, char *argv[])
+ }
+ }
+
++ // Change privileges after having got the lock, for convenience.
++ if(chuser_and_or_chgrp(
++ get_string(confs[OPT_USER]), get_string(confs[OPT_GROUP])))
++ return -1;
++
+ set_int(confs[OPT_OVERWRITE], forceoverwrite);
+ set_int(confs[OPT_STRIP], strip);
+ set_int(confs[OPT_FORK], forking);
diff --git a/app-backup/burp/files/burp-2.0.54-ncurses_pkg-config.patch b/app-backup/burp/files/burp-2.0.54-ncurses_pkg-config.patch
new file mode 100644
index 000000000000..07310d66b204
--- /dev/null
+++ b/app-backup/burp/files/burp-2.0.54-ncurses_pkg-config.patch
@@ -0,0 +1,37 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,3 +1,4 @@
++
+ dnl Process this file with autoconf to produce a configure script.
+
+ dnl require a recent autoconf
+@@ -276,21 +277,22 @@
+ dnl -----------------------------------------------------------
+
+ have_ncurses=no
+-AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h],
++m4_ifdef([PKG_CHECK_MODULES],
+ [
+- AC_CHECK_LIB([ncurses], [curs_set],
++ PKG_CHECK_MODULES([ncurses], [ncurses],
+ [
+- NCURSES_LIBS="-lncurses"
+- have_ncurses=yes
+- AC_DEFINE([HAVE_NCURSES], [1], [Set to 1 if we have ncurses])
+- ]
++ have_ncurses=yes
++ NCURSES_LIBS="$ncurses_LIBS"
++ CFLAGS="$CFLAGS $ncurses_CFLAGS -DHAVE_NCURSES_H=1"
++ AC_DEFINE([HAVE_NCURSES], [1], [Set to 1 if we have ncurses])
++ ],
++ []
+ )
+ ]
+ )
+
+ AC_SUBST([NCURSES_LIBS])
+
+-
+ dnl -----------------------------------------------------------
+ dnl Check whether libcheck ('Check') is available
+ dnl -----------------------------------------------------------
diff --git a/app-backup/burp/files/burp-2.0.54-no_mkdir_run.patch b/app-backup/burp/files/burp-2.0.54-no_mkdir_run.patch
new file mode 100644
index 000000000000..8d1cdc0a0628
--- /dev/null
+++ b/app-backup/burp/files/burp-2.0.54-no_mkdir_run.patch
@@ -0,0 +1,10 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -405,7 +405,6 @@
+
+ install-data-local:
+ $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(localstatedir)/spool/burp
+- $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(runstatedir)
+
+ clean-local: clean-local-check
+
diff --git a/app-backup/burp/files/burp-2.0.54-protocol1_by_default.patch b/app-backup/burp/files/burp-2.0.54-protocol1_by_default.patch
new file mode 100644
index 000000000000..391c68a5f74b
--- /dev/null
+++ b/app-backup/burp/files/burp-2.0.54-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 April 2017 protocol2 is still considered experimental.
++protocol = 1
+ pidfile = @runstatedir@/burp.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 April 2017 protocol2 is still considered experimental.
++protocol = 1
+ pidfile = @runstatedir@/burp.server.pid
+ hardlinked_archive = 0
+ working_dir_recovery_method = delete
diff --git a/app-backup/burp/files/burp.tmpfiles b/app-backup/burp/files/burp.tmpfiles
new file mode 100644
index 000000000000..2f04960f230e
--- /dev/null
+++ b/app-backup/burp/files/burp.tmpfiles
@@ -0,0 +1 @@
+d /run/burp 0755 burp burp -
diff --git a/app-backup/burp/files/burp2.initd b/app-backup/burp/files/burp2.initd
new file mode 100644
index 000000000000..02a7ea856c42
--- /dev/null
+++ b/app-backup/burp/files/burp2.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/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
+}