Gentoo Archives: gentoo-commits

From: "Amadeusz Piotr Żołnowski" <aidecoe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/burp/files/, app-backup/burp/
Date: Sat, 02 Jul 2016 20:50:03
Message-Id: 1467492581.9f367ab90f56e5dbcfde65a1cf3ef97498fd7cae.aidecoe@gentoo
1 commit: 9f367ab90f56e5dbcfde65a1cf3ef97498fd7cae
2 Author: Amadeusz Żołnowski <aidecoe <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 2 20:46:24 2016 +0000
4 Commit: Amadeusz Piotr Żołnowski <aidecoe <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 2 20:49:41 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f367ab9
7
8 app-backup/burp: Correct permissions
9
10 Remove autoupgrade configuration.
11
12 Package-Manager: portage-2.3.0
13
14 app-backup/burp/burp-1.4.40-r3.ebuild | 116 ++++++++++++++++++++++++++++++++++
15 app-backup/burp/files/burp.initd | 7 +-
16 2 files changed, 122 insertions(+), 1 deletion(-)
17
18 diff --git a/app-backup/burp/burp-1.4.40-r3.ebuild b/app-backup/burp/burp-1.4.40-r3.ebuild
19 new file mode 100644
20 index 0000000..f7cbc66
21 --- /dev/null
22 +++ b/app-backup/burp/burp-1.4.40-r3.ebuild
23 @@ -0,0 +1,116 @@
24 +# Copyright 1999-2016 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +# $Id$
27 +
28 +EAPI=5
29 +
30 +inherit autotools eutils user
31 +
32 +DESCRIPTION="Network backup and restore client and server for Unix and Windows"
33 +HOMEPAGE="http://burp.grke.org/"
34 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
35 + http://burp.grke.org/downloads/${P}/${P}.tar.bz2"
36 +
37 +LICENSE="AGPL-3"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~x86"
40 +IUSE="acl afs ipv6 libressl nls tcpd xattr"
41 +
42 +DEPEND="
43 + !libressl? ( dev-libs/openssl:0= )
44 + libressl? ( dev-libs/libressl:0= )
45 + dev-libs/uthash
46 + sys-libs/libcap
47 + <net-libs/librsync-2.0
48 + sys-libs/ncurses:0=
49 + sys-libs/zlib
50 + acl? ( sys-apps/acl )
51 + afs? ( net-fs/openafs )
52 + nls? ( sys-devel/gettext )
53 + tcpd? ( sys-apps/tcp-wrappers )
54 + xattr? ( sys-apps/attr )
55 + "
56 +RDEPEND="${DEPEND}
57 + virtual/logger
58 + "
59 +
60 +DOCS=( CONTRIBUTORS DONATIONS UPGRADING )
61 +PATCHES=(
62 + "${FILESDIR}/${PV}-non-zero-or-build-failure.patch"
63 + "${FILESDIR}/${PV}-bedup-conf-path.patch"
64 + "${FILESDIR}/${PV}-tinfo.patch"
65 + )
66 +
67 +pkg_setup() {
68 + enewgroup "${PN}"
69 + enewuser "${PN}" -1 "" "" "${PN}"
70 +}
71 +
72 +src_prepare() {
73 + epatch "${PATCHES[@]}"
74 + eautoreconf
75 + sed -e '/autoupgrade/d' -i "${S}"/Makefile.in || die
76 + rm "${S}"/docs/autoupgrade.txt || die
77 +}
78 +
79 +src_configure() {
80 + local myeconfargs=(
81 + --sbindir=/usr/sbin
82 + --sysconfdir=/etc/burp
83 + --enable-largefile
84 + $(use_enable acl)
85 + $(use_enable afs)
86 + $(use_enable ipv6)
87 + $(use_enable nls)
88 + $(use_enable xattr)
89 + $(use_with tcpd tcp-wrappers)
90 + )
91 + econf "${myeconfargs[@]}"
92 +}
93 +
94 +src_install() {
95 + default
96 +
97 + fowners root:burp /etc/burp
98 + fperms 0775 /etc/burp
99 + fowners root:burp /etc/burp/burp-server.conf
100 + fperms 0640 /etc/burp/burp-server.conf
101 + fowners root:burp /etc/burp/clientconfdir
102 + fperms 0750 /etc/burp/clientconfdir
103 + fowners root:burp /var/spool/burp
104 + fperms 0770 /var/spool/burp
105 +
106 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
107 + dodoc docs/*
108 +
109 + local scripts_dir=/usr/share/burp/scripts
110 + dodir "${scripts_dir}"
111 + local script
112 + for script in notify_script ssl_extra_checks_script summary_script \
113 + timer_script; do
114 + mv "${D}etc/burp/${script}" "${D}${scripts_dir}/" || die
115 + sed -r \
116 + -e "s|(=\\s*)/etc/burp/${script}\\s*$|\1${scripts_dir}/${script}|" \
117 + -i "${D}etc/burp/burp-server.conf" \
118 + || die
119 + done
120 +
121 + sed -e '/autoupgrade/d' -i "${D}etc/burp/burp.conf" || die
122 + sed -e '/autoupgrade/,+1d' -i "${D}etc/burp/burp-server.conf" || die
123 +
124 + sed -e 's|^# user=graham|user = burp|' \
125 + -e 's|^# group=nogroup|group = burp|' \
126 + -e 's|^pidfile = .*|lockfile = /run/lock/burp/server.lock|' \
127 + -i "${D}etc/burp/burp-server.conf" || die
128 +}
129 +
130 +pkg_postinst() {
131 + if [[ ! -e /etc/burp/CA/index.txt ]]; then
132 + elog "At first run burp server will generate DH parameters and SSL"
133 + elog "certificates. You should adjust configuration before."
134 + elog "Server configuration is located at"
135 + elog ""
136 + elog " /etc/burp/burp-server.conf"
137 + elog ""
138 + fi
139 +}
140
141 diff --git a/app-backup/burp/files/burp.initd b/app-backup/burp/files/burp.initd
142 index fda1a75..d88af55 100644
143 --- a/app-backup/burp/files/burp.initd
144 +++ b/app-backup/burp/files/burp.initd
145 @@ -17,6 +17,11 @@ extra_started_commands="reload summary"
146 description_reload="Reloads configuration"
147 description_summary="Displays main status monitor summary"
148
149 +get_backup_dir() {
150 + grep '^directory = ' "${BURP_CONFIG}" \
151 + | sed -e 's/^directory = //'
152 +}
153 +
154 depend() {
155 need localmount
156 after bootmisc
157 @@ -28,7 +33,7 @@ start_pre() {
158 checkpath -o root:burp -m 0640 -f /etc/burp/burp-server.conf
159 checkpath -o root:burp -m 0750 -d /etc/burp/clientconfdir
160 checkpath -o burp:burp -m 0775 -d /run/lock/burp
161 - checkpath -o root:burp -m 0750 -d /var/spool/burp
162 + checkpath -o root:burp -m 0770 -d "$(get_backup_dir)"
163 }
164
165 reload() {