public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Amadeusz Piotr Żołnowski" <aidecoe@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/burp/files/, app-backup/burp/
Date: Sat,  2 Jul 2016 20:49:53 +0000 (UTC)	[thread overview]
Message-ID: <1467492581.9f367ab90f56e5dbcfde65a1cf3ef97498fd7cae.aidecoe@gentoo> (raw)

commit:     9f367ab90f56e5dbcfde65a1cf3ef97498fd7cae
Author:     Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  2 20:46:24 2016 +0000
Commit:     Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
CommitDate: Sat Jul  2 20:49:41 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f367ab9

app-backup/burp: Correct permissions

Remove autoupgrade configuration.

Package-Manager: portage-2.3.0

 app-backup/burp/burp-1.4.40-r3.ebuild | 116 ++++++++++++++++++++++++++++++++++
 app-backup/burp/files/burp.initd      |   7 +-
 2 files changed, 122 insertions(+), 1 deletion(-)

diff --git a/app-backup/burp/burp-1.4.40-r3.ebuild b/app-backup/burp/burp-1.4.40-r3.ebuild
new file mode 100644
index 0000000..f7cbc66
--- /dev/null
+++ b/app-backup/burp/burp-1.4.40-r3.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils user
+
+DESCRIPTION="Network backup and restore client and server for Unix and Windows"
+HOMEPAGE="http://burp.grke.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
+	http://burp.grke.org/downloads/${P}/${P}.tar.bz2"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="acl afs ipv6 libressl nls tcpd xattr"
+
+DEPEND="
+	!libressl? ( dev-libs/openssl:0= )
+	libressl? ( dev-libs/libressl:0= )
+	dev-libs/uthash
+	sys-libs/libcap
+	<net-libs/librsync-2.0
+	sys-libs/ncurses:0=
+	sys-libs/zlib
+	acl? ( sys-apps/acl )
+	afs? ( net-fs/openafs )
+	nls? ( sys-devel/gettext )
+	tcpd? ( sys-apps/tcp-wrappers )
+	xattr? ( sys-apps/attr )
+	"
+RDEPEND="${DEPEND}
+	virtual/logger
+	"
+
+DOCS=( CONTRIBUTORS DONATIONS UPGRADING )
+PATCHES=(
+	"${FILESDIR}/${PV}-non-zero-or-build-failure.patch"
+	"${FILESDIR}/${PV}-bedup-conf-path.patch"
+	"${FILESDIR}/${PV}-tinfo.patch"
+	)
+
+pkg_setup() {
+	enewgroup "${PN}"
+	enewuser "${PN}" -1 "" "" "${PN}"
+}
+
+src_prepare() {
+	epatch "${PATCHES[@]}"
+	eautoreconf
+	sed -e '/autoupgrade/d' -i "${S}"/Makefile.in || die
+	rm "${S}"/docs/autoupgrade.txt || die
+}
+
+src_configure() {
+	local myeconfargs=(
+		--sbindir=/usr/sbin
+		--sysconfdir=/etc/burp
+		--enable-largefile
+		$(use_enable acl)
+		$(use_enable afs)
+		$(use_enable ipv6)
+		$(use_enable nls)
+		$(use_enable xattr)
+		$(use_with tcpd tcp-wrappers)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+
+	fowners root:burp /etc/burp
+	fperms 0775 /etc/burp
+	fowners root:burp /etc/burp/burp-server.conf
+	fperms 0640 /etc/burp/burp-server.conf
+	fowners root:burp /etc/burp/clientconfdir
+	fperms 0750 /etc/burp/clientconfdir
+	fowners root:burp /var/spool/burp
+	fperms 0770 /var/spool/burp
+
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	dodoc docs/*
+
+	local scripts_dir=/usr/share/burp/scripts
+	dodir "${scripts_dir}"
+	local script
+	for script in notify_script ssl_extra_checks_script summary_script \
+			timer_script; do
+		mv "${D}etc/burp/${script}" "${D}${scripts_dir}/" || die
+		sed -r \
+			-e "s|(=\\s*)/etc/burp/${script}\\s*$|\1${scripts_dir}/${script}|" \
+			-i "${D}etc/burp/burp-server.conf" \
+			|| die
+	done
+
+	sed -e '/autoupgrade/d' -i "${D}etc/burp/burp.conf" || die
+	sed -e '/autoupgrade/,+1d' -i "${D}etc/burp/burp-server.conf" || die
+
+	sed -e 's|^# user=graham|user = burp|' \
+		-e 's|^# group=nogroup|group = burp|' \
+		-e 's|^pidfile = .*|lockfile = /run/lock/burp/server.lock|' \
+		-i "${D}etc/burp/burp-server.conf" || die
+}
+
+pkg_postinst() {
+	if [[ ! -e /etc/burp/CA/index.txt ]]; then
+		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
+}

diff --git a/app-backup/burp/files/burp.initd b/app-backup/burp/files/burp.initd
index fda1a75..d88af55 100644
--- a/app-backup/burp/files/burp.initd
+++ b/app-backup/burp/files/burp.initd
@@ -17,6 +17,11 @@ 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
@@ -28,7 +33,7 @@ start_pre() {
 	checkpath -o root:burp -m 0640 -f /etc/burp/burp-server.conf
 	checkpath -o root:burp -m 0750 -d /etc/burp/clientconfdir
 	checkpath -o burp:burp -m 0775 -d /run/lock/burp
-	checkpath -o root:burp -m 0750 -d /var/spool/burp
+	checkpath -o root:burp -m 0770 -d "$(get_backup_dir)"
 }
 
 reload() {


             reply	other threads:[~2016-07-02 20:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-02 20:49 Amadeusz Piotr Żołnowski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-08-10  4:10 [gentoo-commits] repo/gentoo:master commit in: app-backup/burp/files/, app-backup/burp/ Sam James
2018-05-29  9:26 Marek Szuba
2017-12-20 16:31 Marek Szuba
2017-12-20 12:49 Marek Szuba
2017-10-07 22:13 Marek Szuba
2017-07-10 12:20 Marek Szuba
2016-12-29 21:39 Amadeusz Piotr Żołnowski
2016-06-17 21:16 Amadeusz Piotr Żołnowski
2016-01-17 14:46 Amadeusz Piotr Żołnowski
2015-08-30 16:34 Amadeusz Żołnowski
2015-08-17 21:48 Amadeusz Żołnowski
2015-08-16 23:53 Amadeusz Żołnowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467492581.9f367ab90f56e5dbcfde65a1cf3ef97498fd7cae.aidecoe@gentoo \
    --to=aidecoe@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox