forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gentoo-Bug: 615666 Package-Manager: Portage-2.3.3, Repoman-2.3.1
- Loading branch information
Marek Szuba
committed
Apr 26, 2017
1 parent
9b2646f
commit 8262cee
Showing
9 changed files
with
215 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST burp-1.4.40.tar.bz2 712937 SHA256 4108eb45e14740de990d918a2adbb661d88f90de48d6e2e3a6b54fd12b16fa5e SHA512 b44ba3a63d3b75f6fee55bbfef70ac07fa87e78ddb22a398e31a86670dfa3f2db1c9dbc58de3d0038cdc409bd5ae52c8e901cb26975fd7dbe0f773c4841af10c WHIRLPOOL 636120b3fa2d4a3217567177f3c8abbdeb562d298043fd6bd685842287964d835f2a369e36db0bc32ce908ce8f96e4e2677569e6ca4bac80f8d9958a2364a62d | ||
DIST burp-2.0.54.tar.gz 558845 SHA256 26130da9791c57b1e194973ef1ea292dec57468bf4291a4d0eae880d192c1fd1 SHA512 dccc4d3679dd759028cd6b71d09ae4e49a511e5d94b4df2f112ad974abb507bbc8fffaf63ef85c847b0f9363b20a9e817179ab556c5a788acacb7a25e7600fa4 WHIRLPOOL 60e9bec56c08bc7ebc4700824eab34cf8cefdc5871140471eec5e05dbff4f4b83c2f7c6d5554d33dbb918f46e2c60159ba99a5da599938acd40b9d5b7b582978 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
|
||
inherit autotools systemd tmpfiles user versionator | ||
|
||
DESCRIPTION="Network backup and restore client and server for Unix and Windows" | ||
HOMEPAGE="http://burp.grke.org/" | ||
SRC_URI="https://github.com/grke/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="AGPL-3" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~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} | ||
test? ( dev-libs/check )" | ||
RDEPEND="${CDEPEND} | ||
virtual/logger" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${PN}-2.0.54-no_mkdir_run.patch | ||
"${FILESDIR}"/${PN}-2.0.54-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/burp' \ | ||
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 0775 /etc/burp | ||
fperms 0640 /etc/burp/burp-server.conf | ||
fperms 0750 /etc/burp/clientconfdir | ||
|
||
newinitd "${FILESDIR}"/${PN}2.initd ${PN} | ||
systemd_dounit "${FILESDIR}"/${PN}.service | ||
|
||
newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf | ||
} | ||
|
||
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. | ||
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
24 changes: 24 additions & 0 deletions
24
app-backup/burp/files/burp-2.0.54-protocol1_by_default.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=BackUp and Restore Program server | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
PIDFile=/run/burp/burp.server.pid | ||
ExecStart=/usr/sbin/burp -F -c /etc/burp/burp-server.conf | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
d /run/burp 0755 burp burp - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 1999-2016 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="--make-pidfile --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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters