Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/burp/, app-backup/burp/files/
Date: Wed, 26 Apr 2017 11:55:08
Message-Id: 1493207647.8262cee470aafbef23da9a6c618d5c4c45b7e8e6.marecki@gentoo
1 commit: 8262cee470aafbef23da9a6c618d5c4c45b7e8e6
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 20 09:33:27 2017 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 26 11:54:07 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8262cee4
7
8 app-backup/burp: bump to 2.0.54
9
10 Gentoo-Bug: 615666
11 Package-Manager: Portage-2.3.3, Repoman-2.3.1
12
13 app-backup/burp/Manifest | 1 +
14 app-backup/burp/burp-2.0.54.ebuild | 109 +++++++++++++++++++++
15 .../burp/files/burp-2.0.54-no_mkdir_run.patch | 10 ++
16 .../files/burp-2.0.54-protocol1_by_default.patch | 24 +++++
17 .../burp/files/burp-2.0.54-server_user.patch | 13 +++
18 app-backup/burp/files/burp.service | 11 +++
19 app-backup/burp/files/burp.tmpfiles | 1 +
20 app-backup/burp/files/burp2.initd | 45 +++++++++
21 app-backup/burp/metadata.xml | 1 +
22 9 files changed, 215 insertions(+)
23
24 diff --git a/app-backup/burp/Manifest b/app-backup/burp/Manifest
25 index 220be5c99b6..0e3e690104e 100644
26 --- a/app-backup/burp/Manifest
27 +++ b/app-backup/burp/Manifest
28 @@ -1 +1,2 @@
29 DIST burp-1.4.40.tar.bz2 712937 SHA256 4108eb45e14740de990d918a2adbb661d88f90de48d6e2e3a6b54fd12b16fa5e SHA512 b44ba3a63d3b75f6fee55bbfef70ac07fa87e78ddb22a398e31a86670dfa3f2db1c9dbc58de3d0038cdc409bd5ae52c8e901cb26975fd7dbe0f773c4841af10c WHIRLPOOL 636120b3fa2d4a3217567177f3c8abbdeb562d298043fd6bd685842287964d835f2a369e36db0bc32ce908ce8f96e4e2677569e6ca4bac80f8d9958a2364a62d
30 +DIST burp-2.0.54.tar.gz 558845 SHA256 26130da9791c57b1e194973ef1ea292dec57468bf4291a4d0eae880d192c1fd1 SHA512 dccc4d3679dd759028cd6b71d09ae4e49a511e5d94b4df2f112ad974abb507bbc8fffaf63ef85c847b0f9363b20a9e817179ab556c5a788acacb7a25e7600fa4 WHIRLPOOL 60e9bec56c08bc7ebc4700824eab34cf8cefdc5871140471eec5e05dbff4f4b83c2f7c6d5554d33dbb918f46e2c60159ba99a5da599938acd40b9d5b7b582978
31
32 diff --git a/app-backup/burp/burp-2.0.54.ebuild b/app-backup/burp/burp-2.0.54.ebuild
33 new file mode 100644
34 index 00000000000..cf7dee17673
35 --- /dev/null
36 +++ b/app-backup/burp/burp-2.0.54.ebuild
37 @@ -0,0 +1,109 @@
38 +# Copyright 1999-2017 Gentoo Foundation
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=6
42 +
43 +inherit autotools systemd tmpfiles user versionator
44 +
45 +DESCRIPTION="Network backup and restore client and server for Unix and Windows"
46 +HOMEPAGE="http://burp.grke.org/"
47 +SRC_URI="https://github.com/grke/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
48 +
49 +LICENSE="AGPL-3"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86"
52 +IUSE="acl ipv6 libressl test xattr"
53 +
54 +CDEPEND="dev-libs/uthash
55 + net-libs/librsync
56 + sys-libs/ncurses:0=
57 + sys-libs/zlib
58 + !libressl? ( dev-libs/openssl:0= )
59 + libressl? ( dev-libs/libressl:0= )
60 + acl? ( sys-apps/acl )
61 + xattr? ( sys-apps/attr )"
62 +DEPEND="${CDEPEND}
63 + test? ( dev-libs/check )"
64 +RDEPEND="${CDEPEND}
65 + virtual/logger"
66 +
67 +PATCHES=(
68 + "${FILESDIR}"/${PN}-2.0.54-no_mkdir_run.patch
69 + "${FILESDIR}"/${PN}-2.0.54-protocol1_by_default.patch
70 + "${FILESDIR}"/${PN}-2.0.54-server_user.patch
71 +)
72 +
73 +pkg_setup() {
74 + enewgroup "${PN}"
75 + enewuser "${PN}" -1 "" "" "${PN}"
76 +}
77 +
78 +src_prepare() {
79 + default
80 +
81 + eautoreconf
82 +}
83 +
84 +src_configure() {
85 + local myeconfargs=(
86 + --localstatedir=/var
87 + --sysconfdir=/etc/burp
88 + --enable-largefile
89 + $(use_enable acl)
90 + $(use_enable ipv6)
91 + $(use_enable xattr)
92 + )
93 + # --runstatedir option will only work from autoconf-2.70 onwards
94 + runstatedir='/run/burp' \
95 + econf "${myeconfargs[@]}"
96 +}
97 +
98 +src_install() {
99 + default
100 + fowners -R root:${PN} /var/spool/burp
101 + fperms 0770 /var/spool/burp
102 +
103 + emake DESTDIR="${D}" install-configs
104 + fowners -R root:${PN} /etc/burp
105 + fperms 0775 /etc/burp
106 + fperms 0640 /etc/burp/burp-server.conf
107 + fperms 0750 /etc/burp/clientconfdir
108 +
109 + newinitd "${FILESDIR}"/${PN}2.initd ${PN}
110 + systemd_dounit "${FILESDIR}"/${PN}.service
111 +
112 + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
113 +}
114 +
115 +pkg_postinst() {
116 + elog "Burp ebuilds now support the autoupgrade mechanism in both"
117 + elog "client and server mode. In both cases it is disabled by"
118 + elog "default. You almost certainly do NOT want to enable it in"
119 + elog "client mode because upgrades obtained this way will not be"
120 + elog "managed by Portage."
121 +
122 + if [[ ! -e /etc/burp/CA/index.txt ]]; then
123 + elog ""
124 + elog "At first run burp server will generate DH parameters and SSL"
125 + elog "certificates. You should adjust configuration before."
126 + elog "Server configuration is located at"
127 + elog ""
128 + elog " /etc/burp/burp-server.conf"
129 + elog ""
130 + fi
131 +
132 + # According to PMS this can be a space-separated list of version
133 + # numbers, even though in practice it is typically just one.
134 + for oldver in ${REPLACING_VERSIONS}; do
135 + if [[ $(get_major_version ${oldver}) -lt 2 ]]; then
136 + ewarn "Starting with version 2.0.54 we no longer patch bedup to use"
137 + ewarn "the server config file by default. If you use bedup, please"
138 + ewarn "update your scripts to invoke it as"
139 + ewarn ""
140 + ewarn " bedup -c /etc/burp/burp-server.conf"
141 + ewarn ""
142 + ewarn "Otherwise deduplication will not work!"
143 + break
144 + fi
145 + done
146 +}
147
148 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
149 new file mode 100644
150 index 00000000000..8d1cdc0a062
151 --- /dev/null
152 +++ b/app-backup/burp/files/burp-2.0.54-no_mkdir_run.patch
153 @@ -0,0 +1,10 @@
154 +--- a/Makefile.am
155 ++++ b/Makefile.am
156 +@@ -405,7 +405,6 @@
157 +
158 + install-data-local:
159 + $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(localstatedir)/spool/burp
160 +- $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(runstatedir)
161 +
162 + clean-local: clean-local-check
163 +
164
165 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
166 new file mode 100644
167 index 00000000000..391c68a5f74
168 --- /dev/null
169 +++ b/app-backup/burp/files/burp-2.0.54-protocol1_by_default.patch
170 @@ -0,0 +1,24 @@
171 +--- a/configs/client/burp.conf.in
172 ++++ b/configs/client/burp.conf.in
173 +@@ -10,7 +10,8 @@
174 + # 0 to decide automatically, 1 to force protocol1 mode (file level granularity
175 + # with a pseudo mirrored storage on the server and optional rsync). 2 forces
176 + # protocol2 mode (inline deduplication with variable length blocks).
177 +-# protocol = 0
178 ++# WARNING: as of April 2017 protocol2 is still considered experimental.
179 ++protocol = 1
180 + pidfile = @runstatedir@/burp.client.pid
181 + syslog = 0
182 + stdout = 1
183 +--- a/configs/server/burp.conf.in
184 ++++ b/configs/server/burp.conf.in
185 +@@ -21,7 +21,8 @@
186 + # protocol2 mode (inline deduplication with variable length blocks).
187 + # Like many other settings, this can be set per client in the clientconfdir
188 + # files.
189 +-# protocol = 0
190 ++# WARNING: as of April 2017 protocol2 is still considered experimental.
191 ++protocol = 1
192 + pidfile = @runstatedir@/burp.server.pid
193 + hardlinked_archive = 0
194 + working_dir_recovery_method = delete
195
196 diff --git a/app-backup/burp/files/burp-2.0.54-server_user.patch b/app-backup/burp/files/burp-2.0.54-server_user.patch
197 new file mode 100644
198 index 00000000000..979bb4bd4c9
199 --- /dev/null
200 +++ b/app-backup/burp/files/burp-2.0.54-server_user.patch
201 @@ -0,0 +1,13 @@
202 +--- a/configs/server/burp.conf.in
203 ++++ b/configs/server/burp.conf.in
204 +@@ -68,8 +68,8 @@
205 + # keep = 6
206 +
207 + # Run as different user/group.
208 +-# user=graham
209 +-# group=nogroup
210 ++user=burp
211 ++group=burp
212 +
213 + # CA options.
214 + # If you want your server to be a certificate authority and generate its own
215
216 diff --git a/app-backup/burp/files/burp.service b/app-backup/burp/files/burp.service
217 new file mode 100644
218 index 00000000000..5a40b5e3678
219 --- /dev/null
220 +++ b/app-backup/burp/files/burp.service
221 @@ -0,0 +1,11 @@
222 +[Unit]
223 +Description=BackUp and Restore Program server
224 +After=network.target
225 +
226 +[Service]
227 +Type=simple
228 +PIDFile=/run/burp/burp.server.pid
229 +ExecStart=/usr/sbin/burp -F -c /etc/burp/burp-server.conf
230 +
231 +[Install]
232 +WantedBy=multi-user.target
233
234 diff --git a/app-backup/burp/files/burp.tmpfiles b/app-backup/burp/files/burp.tmpfiles
235 new file mode 100644
236 index 00000000000..2f04960f230
237 --- /dev/null
238 +++ b/app-backup/burp/files/burp.tmpfiles
239 @@ -0,0 +1 @@
240 +d /run/burp 0755 burp burp -
241
242 diff --git a/app-backup/burp/files/burp2.initd b/app-backup/burp/files/burp2.initd
243 new file mode 100644
244 index 00000000000..4aa07ac43fe
245 --- /dev/null
246 +++ b/app-backup/burp/files/burp2.initd
247 @@ -0,0 +1,45 @@
248 +#!/sbin/openrc-run
249 +# Copyright 1999-2016 Gentoo Foundation
250 +# Distributed under the terms of the GNU General Public License v2
251 +
252 +BURP_CONFIG="/etc/burp/burp-server.conf"
253 +
254 +description="Burp is a network backup and restore program"
255 +
256 +command="/usr/sbin/burp"
257 +command_args="-c '${BURP_CONFIG}' -F"
258 +command_background="yes"
259 +pidfile="/run/burp/burp.server.pid"
260 +start_stop_daemon_arg="--make-pidfile --wait 500"
261 +
262 +extra_started_commands="reload summary"
263 +description_reload="Reloads configuration"
264 +description_summary="Displays main status monitor summary"
265 +
266 +get_backup_dir() {
267 + grep '^directory = ' "${BURP_CONFIG}" \
268 + | sed -e 's/^directory = //'
269 +}
270 +
271 +depend() {
272 + need localmount
273 + after bootmisc
274 + use net
275 +}
276 +
277 +start_pre() {
278 + checkpath -o root:burp -m 0775 -d /etc/burp
279 + checkpath -o root:burp -m 0640 -f /etc/burp/burp-server.conf
280 + checkpath -o root:burp -m 0750 -d /etc/burp/clientconfdir
281 + checkpath -o root:burp -m 0770 -d "$(get_backup_dir)"
282 +}
283 +
284 +reload() {
285 + ebegin "Reloading ${SVCNAME} configuration"
286 + start-stop-daemon --exec ${command} --signal HUP
287 + eend $?
288 +}
289 +
290 +summary() {
291 + "${command}" -c "${BURP_CONFIG}" -a S
292 +}
293
294 diff --git a/app-backup/burp/metadata.xml b/app-backup/burp/metadata.xml
295 index a002889edbe..2887b871ddd 100644
296 --- a/app-backup/burp/metadata.xml
297 +++ b/app-backup/burp/metadata.xml
298 @@ -12,6 +12,7 @@
299 snapshots when backing up Windows computers.
300 </longdescription>
301 <upstream>
302 + <remote-id type="github">grke/burp</remote-id>
303 <remote-id type="sourceforge">burp</remote-id>
304 </upstream>
305 </pkgmetadata>