diff options
Diffstat (limited to 'backup/burp')
-rw-r--r-- | backup/burp/Manifest | 8 | ||||
-rw-r--r-- | backup/burp/burp-2.1.32.ebuild | 109 | ||||
-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 | ||||
-rw-r--r-- | backup/burp/metadata.xml | 18 |
8 files changed, 237 insertions, 0 deletions
diff --git a/backup/burp/Manifest b/backup/burp/Manifest new file mode 100644 index 000000000000..4c8fd685632f --- /dev/null +++ b/backup/burp/Manifest @@ -0,0 +1,8 @@ +AUX burp-2.0.54-server_user.patch 282 BLAKE2B b949a5f1b8d73048145a5efd62bcee605f77f272fe3d4759958092e0c37b14b7077e01b9c55a865728a856293b7acdae494f8583e4451cd02b9242807b05ed72 SHA512 a4cd302967deed776b663f037e509e354dcb5958d6a4c33770062e5455d2ff641d62604779d25c6bb542aa547548c39d8b529fa7787ab1b42dba262f1439fcea +AUX burp-2.1.20-no_mkdir_run.patch 238 BLAKE2B 44ba927f8ca97386d70d52411f2fe5ca233160e85de56d58e33c9a038c542e6d8cc5a96f1e6eb60fefd5677c201a5416949742d1ba725575021cb28b0afae254 SHA512 b25ce17b66988cdcdb67d847160d7a80a8daf8470cbc5ece066a70dfae34b369e175a2ee2cf10b0e68f51b8fd99f52762dc4c429d6abbc4411fd09a8500c067c +AUX burp-2.1.20-protocol1_by_default.patch 943 BLAKE2B 430c1c13deabab35731f2610dd918b583455fda6d13eef6292a7eeaac0d14266bf21f97caf6dba65f0a46b1534695e7b72b91c6958d86f70ac63e356b5e05691 SHA512 249a426a76a81a2582f824d2d767695bfd848a04190ee9a2f1d4296bed03f93d4eaa86c13b4b755700b1b552bb584f9b0031ec60a705f2b27b20d62eb58aef8c +AUX burp.initd 1086 BLAKE2B 7946355a6de36f956e953e59b216ea1807eabcee1a1631fc4f0e3d1bb7165adfba99c2d3c1c47631a5d4fdccca81171106583ba3a994263e08ff73a7b5d7125c SHA512 cb78acab82a919d9dd9eb21dc525f62d3443a690efbf77a695f7d3bc9e2245aafd025977a6f08084c6db545f460ee3d32d83b6f7f5641eae19e2e92d4e0d0850 +AUX burp.service 193 BLAKE2B fa9a00f32999834afaf84db9d28f2e8b65688e784e32f78bc019069649c50b4c17f1cc48db3b0a62e2e269db801182321e5daccc169eaa560677bd3ff52b5ffe SHA512 5ccb7fc0535d15afca1afe21b3bb937f53203b8a893730a2745e88a5effb1add73c0f109c3419e22244def1bf978378889d47953e68586a7da8909286ccf5dcd +DIST burp-2.1.32.tar.gz 591737 BLAKE2B fd525bff32348f1dbc37b1c065d262ff8af1d999d19f63711ebcff3fb55e90a7440cc6cfc0b7eefe6f8e250672c799d86e65ed599f0b8d7dd80bebcb99888987 SHA512 2477b7a9a2123b227a27519f7f3d9facca7173a9e63d66f6a8fb2ae5408d8af4ad5bfdd0a14efd6cf80e7bc8e91907f7c293a3d621b86bafdbf163bfa08d0c81 +EBUILD burp-2.1.32.ebuild 2844 BLAKE2B b8c61593b365e83955e09ed19d220c497c3df2cb07ecc4a42a1e5fdef79a9723e96129c156acff9be20b2064c2f6a08bad5930db2f924188f3934e783d30cfa1 SHA512 d9b034f9c1885b9ce00a9428d263b99d71a2676478cc25f52e5167600a926c9bb61b7012e204ef0f3b12a17d7d659b5a8f161b349d03f2617a24646fcf3b4e47 +MISC metadata.xml 684 BLAKE2B 3b4511a62d65ec23ef3b1311f57d703154f08e8d82d189a5ea0b555b5d7d686c54365d2992b85c6e5dffa0ee93f7331367925766ea1bfe349446c23d73dba392 SHA512 3752a2b8e2fb49d44d8fe431768ab1b4bc9995099e9bbe4f957677b39ca038a75874bfb0781b1cd1bd4bd79186c0994f2ce5654921a58c9645ffd6dc553f3c9f diff --git a/backup/burp/burp-2.1.32.ebuild b/backup/burp/burp-2.1.32.ebuild new file mode 100644 index 000000000000..9f8399e8ca19 --- /dev/null +++ b/backup/burp/burp-2.1.32.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools systemd user versionator + +DESCRIPTION="Network backup and restore client and server for Unix and Windows" +HOMEPAGE="https://burp.grke.org/" +SRC_URI="https://github.com/grke/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="amd64 ~arm x86" +IUSE="acl ipv6 libressl test xattr" + +CDEPEND="dev-libs/uthash + net-libs/librsync + sys-libs/ncurses:0= + sys-libs/zlib + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + acl? ( sys-apps/acl ) + xattr? ( sys-apps/attr )" +DEPEND="${CDEPEND} + virtual/pkgconfig + test? ( dev-libs/check )" +RDEPEND="${CDEPEND} + virtual/logger" + +PATCHES=( + "${FILESDIR}"/${PN}-2.1.20-no_mkdir_run.patch + "${FILESDIR}"/${PN}-2.1.20-protocol1_by_default.patch + "${FILESDIR}"/${PN}-2.0.54-server_user.patch +) + +pkg_setup() { + enewgroup "${PN}" + enewuser "${PN}" -1 "" "" "${PN}" +} + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + local myeconfargs=( + --localstatedir=/var + --sysconfdir=/etc/burp + --enable-largefile + $(use_enable acl) + $(use_enable ipv6) + $(use_enable xattr) + ) + # --runstatedir option will only work from autoconf-2.70 onwards + runstatedir='/run' \ + econf "${myeconfargs[@]}" +} + +src_install() { + default + fowners -R root:${PN} /var/spool/burp + fperms 0770 /var/spool/burp + + emake DESTDIR="${D}" install-configs + fowners -R root:${PN} /etc/burp + fperms 0750 /etc/burp + fperms 0640 /etc/burp/burp-server.conf + fperms 0750 /etc/burp/clientconfdir + + newinitd "${FILESDIR}"/${PN}.initd ${PN} + systemd_dounit "${FILESDIR}"/${PN}.service +} + +pkg_postinst() { + elog "Burp ebuilds now support the autoupgrade mechanism in both" + elog "client and server mode. In both cases it is disabled by" + elog "default. You almost certainly do NOT want to enable it in" + elog "client mode because upgrades obtained this way will not be" + elog "managed by Portage." + + if [[ ! -e /etc/burp/CA/index.txt ]]; then + elog "" + elog "At first run burp server will generate DH parameters and SSL" + elog "certificates. You should adjust configuration before." + elog "Server configuration is located at" + elog "" + elog " /etc/burp/burp-server.conf" + elog "" + fi + + # According to PMS this can be a space-separated list of version + # numbers, even though in practice it is typically just one. + local oldver + for oldver in ${REPLACING_VERSIONS}; do + if [[ $(get_major_version ${oldver}) -lt 2 ]]; then + ewarn "Starting with version 2.0.54 we no longer patch bedup to use" + ewarn "the server config file by default. If you use bedup, please" + ewarn "update your scripts to invoke it as" + ewarn "" + ewarn " bedup -c /etc/burp/burp-server.conf" + ewarn "" + ewarn "Otherwise deduplication will not work!" + break + fi + done +} 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 diff --git a/backup/burp/metadata.xml b/backup/burp/metadata.xml new file mode 100644 index 000000000000..2887b871ddd0 --- /dev/null +++ b/backup/burp/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>marecki@gentoo.org</email> + <name>Marek Szuba</name> + </maintainer> + <longdescription lang="en"> + Burp is a network backup and restore program. It uses librsync in order + to save network traffic and to save on the amount of space that is used + by each backup. It also uses VSS (Volume Shadow Copy Service) to make + snapshots when backing up Windows computers. + </longdescription> + <upstream> + <remote-id type="github">grke/burp</remote-id> + <remote-id type="sourceforge">burp</remote-id> + </upstream> +</pkgmetadata> |