Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-backup/amanda: amanda-3.2.1.ebuild amanda-2.6.0_p2-r4.ebuild amanda-3.3.0.ebuild amanda-3.2.3.ebuild amanda-3.3.1.ebuild amanda-2.6.1_p2.ebuild amanda-3.3.3.ebuild amanda-3.2.2.ebuild ChangeLog
Date: Tue, 26 Feb 2013 22:38:38
Message-Id: 20130226223834.116442171E@flycatcher.gentoo.org
1 robbat2 13/02/26 22:38:33
2
3 Modified: amanda-3.2.1.ebuild amanda-2.6.0_p2-r4.ebuild
4 amanda-3.3.0.ebuild amanda-3.3.1.ebuild
5 amanda-2.6.1_p2.ebuild amanda-3.2.2.ebuild
6 ChangeLog
7 Added: amanda-3.2.3.ebuild amanda-3.3.3.ebuild
8 Log:
9 Bump of 3.3.3 per bug #428026 (has GLIBC2.16 support). Bump of 3.2.3 per bug #436896 (no GLIBC2.16 support). Bug #455640: virtual/awk.
10
11 (Portage version: 2.2.0_alpha163/cvs/Linux x86_64, unsigned Manifest commit)
12
13 Revision Changes Path
14 1.16 app-backup/amanda/amanda-3.2.1.ebuild
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.2.1.ebuild?rev=1.16&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.2.1.ebuild?rev=1.16&content-type=text/plain
18 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.2.1.ebuild?r1=1.15&r2=1.16
19
20 Index: amanda-3.2.1.ebuild
21 ===================================================================
22 RCS file: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.1.ebuild,v
23 retrieving revision 1.15
24 retrieving revision 1.16
25 diff -p -w -b -B -u -u -r1.15 -r1.16
26 --- amanda-3.2.1.ebuild 14 Dec 2012 11:05:41 -0000 1.15
27 +++ amanda-3.2.1.ebuild 26 Feb 2013 22:38:33 -0000 1.16
28 @@ -1,6 +1,6 @@
29 -# Copyright 1999-2012 Gentoo Foundation
30 +# Copyright 1999-2013 Gentoo Foundation
31 # Distributed under the terms of the GNU General Public License v2
32 -# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.1.ebuild,v 1.15 2012/12/14 11:05:41 ulm Exp $
33 +# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.1.ebuild,v 1.16 2013/02/26 22:38:33 robbat2 Exp $
34
35 EAPI=3
36 inherit autotools eutils perl-module user
37 @@ -14,7 +14,7 @@ SLOT="0"
38 KEYWORDS="amd64 ppc ppc64 ~sparc x86"
39 RDEPEND="sys-libs/readline
40 virtual/inetd
41 - sys-apps/gawk
42 + virtual/awk
43 app-arch/tar
44 >=dev-lang/perl-5.6
45 app-arch/dump
46
47
48
49 1.19 app-backup/amanda/amanda-2.6.0_p2-r4.ebuild
50
51 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-2.6.0_p2-r4.ebuild?rev=1.19&view=markup
52 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-2.6.0_p2-r4.ebuild?rev=1.19&content-type=text/plain
53 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-2.6.0_p2-r4.ebuild?r1=1.18&r2=1.19
54
55 Index: amanda-2.6.0_p2-r4.ebuild
56 ===================================================================
57 RCS file: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.0_p2-r4.ebuild,v
58 retrieving revision 1.18
59 retrieving revision 1.19
60 diff -p -w -b -B -u -u -r1.18 -r1.19
61 --- amanda-2.6.0_p2-r4.ebuild 14 Dec 2012 11:05:41 -0000 1.18
62 +++ amanda-2.6.0_p2-r4.ebuild 26 Feb 2013 22:38:33 -0000 1.19
63 @@ -1,6 +1,6 @@
64 -# Copyright 1999-2012 Gentoo Foundation
65 +# Copyright 1999-2013 Gentoo Foundation
66 # Distributed under the terms of the GNU General Public License v2
67 -# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.0_p2-r4.ebuild,v 1.18 2012/12/14 11:05:41 ulm Exp $
68 +# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.0_p2-r4.ebuild,v 1.19 2013/02/26 22:38:33 robbat2 Exp $
69
70 inherit perl-module autotools eutils user
71
72 @@ -12,7 +12,7 @@ SLOT="0"
73 KEYWORDS="amd64 ppc ppc64 ~sparc x86"
74 RDEPEND="sys-libs/readline
75 virtual/inetd
76 - sys-apps/gawk
77 + virtual/awk
78 app-arch/tar
79 dev-lang/perl
80 app-arch/dump
81
82
83
84 1.6 app-backup/amanda/amanda-3.3.0.ebuild
85
86 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.0.ebuild?rev=1.6&view=markup
87 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.0.ebuild?rev=1.6&content-type=text/plain
88 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.0.ebuild?r1=1.5&r2=1.6
89
90 Index: amanda-3.3.0.ebuild
91 ===================================================================
92 RCS file: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.0.ebuild,v
93 retrieving revision 1.5
94 retrieving revision 1.6
95 diff -p -w -b -B -u -u -r1.5 -r1.6
96 --- amanda-3.3.0.ebuild 14 Dec 2012 11:05:41 -0000 1.5
97 +++ amanda-3.3.0.ebuild 26 Feb 2013 22:38:33 -0000 1.6
98 @@ -1,6 +1,6 @@
99 -# Copyright 1999-2012 Gentoo Foundation
100 +# Copyright 1999-2013 Gentoo Foundation
101 # Distributed under the terms of the GNU General Public License v2
102 -# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.0.ebuild,v 1.5 2012/12/14 11:05:41 ulm Exp $
103 +# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.0.ebuild,v 1.6 2013/02/26 22:38:33 robbat2 Exp $
104
105 EAPI=3
106 inherit autotools eutils perl-module user
107 @@ -14,7 +14,7 @@ SLOT="0"
108 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
109 RDEPEND="sys-libs/readline
110 virtual/inetd
111 - sys-apps/gawk
112 + virtual/awk
113 app-arch/tar
114 >=dev-lang/perl-5.6
115 app-arch/dump
116
117
118
119 1.7 app-backup/amanda/amanda-3.3.1.ebuild
120
121 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.1.ebuild?rev=1.7&view=markup
122 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.1.ebuild?rev=1.7&content-type=text/plain
123 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.1.ebuild?r1=1.6&r2=1.7
124
125 Index: amanda-3.3.1.ebuild
126 ===================================================================
127 RCS file: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.1.ebuild,v
128 retrieving revision 1.6
129 retrieving revision 1.7
130 diff -p -w -b -B -u -u -r1.6 -r1.7
131 --- amanda-3.3.1.ebuild 14 Dec 2012 11:05:41 -0000 1.6
132 +++ amanda-3.3.1.ebuild 26 Feb 2013 22:38:33 -0000 1.7
133 @@ -1,6 +1,6 @@
134 -# Copyright 1999-2012 Gentoo Foundation
135 +# Copyright 1999-2013 Gentoo Foundation
136 # Distributed under the terms of the GNU General Public License v2
137 -# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.1.ebuild,v 1.6 2012/12/14 11:05:41 ulm Exp $
138 +# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.1.ebuild,v 1.7 2013/02/26 22:38:33 robbat2 Exp $
139
140 EAPI=3
141 inherit autotools eutils perl-module user
142 @@ -14,7 +14,7 @@ SLOT="0"
143 KEYWORDS="amd64 ppc ppc64 ~sparc x86"
144 RDEPEND="sys-libs/readline
145 virtual/inetd
146 - sys-apps/gawk
147 + virtual/awk
148 app-arch/tar
149 >=dev-lang/perl-5.6
150 app-arch/dump
151
152
153
154 1.10 app-backup/amanda/amanda-2.6.1_p2.ebuild
155
156 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-2.6.1_p2.ebuild?rev=1.10&view=markup
157 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-2.6.1_p2.ebuild?rev=1.10&content-type=text/plain
158 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-2.6.1_p2.ebuild?r1=1.9&r2=1.10
159
160 Index: amanda-2.6.1_p2.ebuild
161 ===================================================================
162 RCS file: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.1_p2.ebuild,v
163 retrieving revision 1.9
164 retrieving revision 1.10
165 diff -p -w -b -B -u -u -r1.9 -r1.10
166 --- amanda-2.6.1_p2.ebuild 14 Dec 2012 11:05:41 -0000 1.9
167 +++ amanda-2.6.1_p2.ebuild 26 Feb 2013 22:38:33 -0000 1.10
168 @@ -1,6 +1,6 @@
169 -# Copyright 1999-2012 Gentoo Foundation
170 +# Copyright 1999-2013 Gentoo Foundation
171 # Distributed under the terms of the GNU General Public License v2
172 -# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.1_p2.ebuild,v 1.9 2012/12/14 11:05:41 ulm Exp $
173 +# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.1_p2.ebuild,v 1.10 2013/02/26 22:38:33 robbat2 Exp $
174
175 inherit autotools eutils user
176
177 @@ -13,7 +13,7 @@ SLOT="0"
178 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
179 RDEPEND="sys-libs/readline
180 virtual/inetd
181 - sys-apps/gawk
182 + virtual/awk
183 app-arch/tar
184 >=dev-lang/perl-5.6
185 app-arch/dump
186
187
188
189 1.7 app-backup/amanda/amanda-3.2.2.ebuild
190
191 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.2.2.ebuild?rev=1.7&view=markup
192 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.2.2.ebuild?rev=1.7&content-type=text/plain
193 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.2.2.ebuild?r1=1.6&r2=1.7
194
195 Index: amanda-3.2.2.ebuild
196 ===================================================================
197 RCS file: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.2.ebuild,v
198 retrieving revision 1.6
199 retrieving revision 1.7
200 diff -p -w -b -B -u -u -r1.6 -r1.7
201 --- amanda-3.2.2.ebuild 14 Dec 2012 11:05:41 -0000 1.6
202 +++ amanda-3.2.2.ebuild 26 Feb 2013 22:38:33 -0000 1.7
203 @@ -1,6 +1,6 @@
204 -# Copyright 1999-2012 Gentoo Foundation
205 +# Copyright 1999-2013 Gentoo Foundation
206 # Distributed under the terms of the GNU General Public License v2
207 -# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.2.ebuild,v 1.6 2012/12/14 11:05:41 ulm Exp $
208 +# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.2.ebuild,v 1.7 2013/02/26 22:38:33 robbat2 Exp $
209
210 EAPI=3
211 inherit autotools eutils perl-module user
212 @@ -14,7 +14,7 @@ SLOT="0"
213 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
214 RDEPEND="sys-libs/readline
215 virtual/inetd
216 - sys-apps/gawk
217 + virtual/awk
218 app-arch/tar
219 >=dev-lang/perl-5.6
220 app-arch/dump
221
222
223
224 1.95 app-backup/amanda/ChangeLog
225
226 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/ChangeLog?rev=1.95&view=markup
227 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/ChangeLog?rev=1.95&content-type=text/plain
228 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/ChangeLog?r1=1.94&r2=1.95
229
230 Index: ChangeLog
231 ===================================================================
232 RCS file: /var/cvsroot/gentoo-x86/app-backup/amanda/ChangeLog,v
233 retrieving revision 1.94
234 retrieving revision 1.95
235 diff -p -w -b -B -u -u -r1.94 -r1.95
236 --- ChangeLog 14 Dec 2012 11:05:41 -0000 1.94
237 +++ ChangeLog 26 Feb 2013 22:38:33 -0000 1.95
238 @@ -1,6 +1,16 @@
239 # ChangeLog for app-backup/amanda
240 -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
241 -# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/ChangeLog,v 1.94 2012/12/14 11:05:41 ulm Exp $
242 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
243 +# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/ChangeLog,v 1.95 2013/02/26 22:38:33 robbat2 Exp $
244 +
245 +*amanda-3.2.3 (26 Feb 2013)
246 +*amanda-3.3.3 (26 Feb 2013)
247 +
248 + 26 Feb 2013; Robin H. Johnson <robbat2@g.o> +amanda-3.2.3.ebuild,
249 + +amanda-3.3.3.ebuild, +files/amanda.service, +files/amanda.socket,
250 + amanda-2.6.0_p2-r4.ebuild, amanda-2.6.1_p2.ebuild, amanda-3.2.1.ebuild,
251 + amanda-3.2.2.ebuild, amanda-3.3.0.ebuild, amanda-3.3.1.ebuild:
252 + Bump of 3.3.3 per bug #428026 (has GLIBC2.16 support). Bump of 3.2.3 per bug
253 + #436896 (no GLIBC2.16 support). Bug #455640: virtual/awk.
254
255 14 Dec 2012; Ulrich Müller <ulm@g.o> amanda-2.6.0_p2-r4.ebuild,
256 amanda-2.6.1_p2.ebuild, amanda-3.2.1.ebuild, amanda-3.2.2.ebuild,
257
258
259
260 1.1 app-backup/amanda/amanda-3.2.3.ebuild
261
262 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.2.3.ebuild?rev=1.1&view=markup
263 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.2.3.ebuild?rev=1.1&content-type=text/plain
264
265 Index: amanda-3.2.3.ebuild
266 ===================================================================
267 # Copyright 1999-2013 Gentoo Foundation
268 # Distributed under the terms of the GNU General Public License v2
269 # $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.3.ebuild,v 1.1 2013/02/26 22:38:33 robbat2 Exp $
270
271 EAPI=3
272 inherit autotools eutils perl-module user
273
274 MY_P="${P/_}"
275 DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
276 HOMEPAGE="http://www.amanda.org/"
277 SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
278 LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
279 SLOT="0"
280 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
281 RDEPEND="sys-libs/readline
282 virtual/inetd
283 virtual/awk
284 app-arch/tar
285 >=dev-lang/perl-5.6
286 app-arch/dump
287 net-misc/openssh
288 >=dev-libs/glib-2.26.0
289 nls? ( virtual/libintl )
290 s3? ( >=net-misc/curl-7.10.0 )
291 !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
292 samba? ( net-fs/samba )
293 kerberos? ( app-crypt/mit-krb5 )
294 xfs? ( sys-fs/xfsdump )
295 readline? ( sys-libs/readline )
296 !minimal? (
297 virtual/mailx
298 app-arch/mt-st
299 sys-block/mtx
300 gnuplot? ( sci-visualization/gnuplot )
301 app-crypt/aespipe
302 app-crypt/gnupg
303 )"
304
305 DEPEND="${RDEPEND}
306 virtual/pkgconfig
307 nls? ( sys-devel/gettext )
308 >=app-text/docbook-xsl-stylesheets-1.72.0
309 app-text/docbook-xml-dtd
310 dev-libs/libxslt
311 "
312
313 IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba xfs"
314
315 S="${WORKDIR}/${MY_P}"
316
317 MYFILESDIR="${T}/files"
318 ENVDIR="/etc/env.d"
319 ENVDFILE="97amanda"
320 TMPENVFILE="${T}/${ENVDFILE}"
321
322 # This is a complete list of Amanda settings that the ebuild takes from the
323 # build environment. This allows users to alter the behavior of the package as
324 # upstream intended, but keeping with Gentoo style. We store a copy of them in
325 # /etc/env.d/97amanda during the install, so that they are preserved for future
326 # installed. This variable name must not start with AMANDA_, as we do not want
327 # it captured into the env file.
328 ENV_SETTINGS_AMANDA="
329 AMANDA_GROUP_GID AMANDA_GROUP_NAME
330 AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
331 AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
332 AMANDA_TAR_LISTDIR AMANDA_TAR
333 AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
334 AMANDA_CONFIG_NAME AMANDA_TMPDIR"
335
336 amanda_variable_setup() {
337
338 # Setting vars
339 local currentamanda
340
341 # Grab the current settings
342 currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
343
344 # First we set the defaults
345 [ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
346 [ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
347 [ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
348 [ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
349 [ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
350 [ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
351 [ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
352
353 # This installs Amanda, with the server. However, it could be a client,
354 # just specify an alternate server name in AMANDA_SERVER.
355 [ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
356 [ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
357 [ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
358 [ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
359 [ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
360 [ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
361 [ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
362 # These are left empty by default
363 [ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
364 [ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
365 [ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
366 [ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
367
368 # What tar to use
369 [ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
370
371 # Now pull in the old stuff
372 if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
373 # We don't just source it as we don't want everything in there.
374 eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
375 fi
376
377 # Re-apply the new settings if any
378 [ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
379
380 }
381
382 pkg_setup() {
383 amanda_variable_setup
384
385 # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
386 # another host than HOSTNAME.
387 if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
388 elog "You are installing a client-only version of Amanda."
389 elog "You should set the variable \$AMANDA_SERVER to point at your"
390 elog "Amanda-tape-server, otherwise you will have to specify its name"
391 elog "when using amrecover on the client."
392 elog "For example: Use something like"
393 elog "AMANDA_SERVER=\"myserver\" emerge amanda"
394 elog
395 fi
396
397 enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
398 enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
399 }
400
401 src_unpack() {
402 # we do not want the perl src_unpack
403 base_src_unpack
404 }
405
406 src_prepare() {
407 # Fix a fun race condition if you use encryption.
408 # This is one of the reasons you should test your recovery procedures often.
409 #epatch "${FILESDIR}"/${PN}-2.6.0p2-amcrypt-ossl-asym-race-fix.patch
410
411 # gentoo bug 248838, check /sbin stuff before /bin
412 #epatch "${FILESDIR}"/${PN}-2.6.0_p2-syslocpath.patch
413
414 # gentoo bug #331111
415 sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
416 sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
417
418 eautoreconf
419
420 # places for us to work in
421 mkdir -p "${MYFILESDIR}"
422 # Now we store the settings we just created
423 set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
424
425 # Prepare our custom files
426 einfo "Building custom configuration files"
427 local i # our iterator
428 local sedexpr # var for sed expr
429 sedexpr=''
430 for i in ${ENV_SETTINGS_AMANDA} ; do
431 local val
432 eval "val=\"\${${i}}\""
433 sedexpr="${sedexpr}s|__${i}__|${val}|g;"
434 done
435
436 # now apply the sed expr
437 for i in "${FILESDIR}"/amanda-* ; do
438 sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
439 done
440
441 (
442 cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
443 use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
444 ) > "${T}"/amandahosts
445
446 if ! use minimal; then
447 sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
448 server-src/am{addclient,serverconfig}.pl || die
449 fi
450 }
451
452 src_configure() {
453 # fix bug #36316
454 addpredict /var/cache/samba/gencache.tdb
455
456 [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
457 source "${TMPENVFILE}"
458 local myconf
459
460 einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
461 myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
462 einfo "Using ${AMANDA_SERVER_INDEX} for index server."
463 myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
464 einfo "Using ${AMANDA_USER_NAME} for amanda user."
465 myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
466 einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
467 myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
468 einfo "Using ${AMANDA_TAR} as Tar implementation."
469 myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
470 einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
471 myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
472 einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
473 myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
474 einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
475 myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
476
477 if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
478 eerror "If you want _both_ UDP and TCP ports, please use only the"
479 eerror "AMANDA_PORTS environment variable for identical ports, or set"
480 eerror "AMANDA_PORTS_BOTH."
481 die "Bad port setup!"
482 fi
483 if [ -n "${AMANDA_PORTS_UDP}" ]; then
484 einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
485 myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
486 fi
487 if [ -n "${AMANDA_PORTS_TCP}" ]; then
488 einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
489 myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
490 fi
491 if [ -n "${AMANDA_PORTS}" ]; then
492 einfo "Using ports ${AMANDA_PORTS/,/-}"
493 myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
494 fi
495
496 # Extras
497 # Speed option
498 myconf="${myconf} --with-buffered-dump"
499 # "debugging" in the configuration is NOT debug in the conventional sense.
500 # It is actually just useful output in the application, and should remain
501 # enabled. There are some cases of breakage with MTX tape changers as of
502 # 2.5.1p2 that it exposes when turned off as well.
503 myconf="${myconf} --with-debugging"
504 # Where to put our files
505 myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
506
507 # Samba support
508 myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
509
510 # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
511 # default
512 myconf="${myconf} --with-bsd-security"
513 myconf="${myconf} --with-ssh-security"
514 myconf="${myconf} --with-bsdudp-security"
515 myconf="${myconf} --with-bsdtcp-security"
516
517 # kerberos-security mechanism version 5
518 myconf="${myconf} `use_with kerberos krb5-security`"
519
520 # Amazon S3 support
521 myconf="${myconf} `use_enable s3 s3-device`"
522
523 # libcurl is required for S3 but otherwise optional
524 if ! use s3; then
525 myconf="${myconf} $(use_with curl libcurl)"
526 fi
527
528 # Client only, as requested in bug #127725
529 if use minimal ; then
530 myconf="${myconf} --without-server"
531 else
532 # amplot
533 myconf="${myconf} $(use_with gnuplot)"
534 fi
535
536 # IPv6 fun.
537 myconf="${myconf} `use_with ipv6`"
538 # This is to prevent the IPv6-is-working test
539 # As the test fails on binpkg build hosts with no IPv6.
540 use ipv6 && export amanda_cv_working_ipv6=yes
541
542 # I18N
543 myconf="${myconf} `use_enable nls`"
544
545 # Bug #296634: Perl location
546 perlinfo
547 myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
548
549 # Bug 296633: --disable-syntax-checks
550 # Some tests are not safe for production systems
551 myconf="${myconf} --disable-syntax-checks"
552
553 # build manpages
554 myconf="${myconf} --enable-manpage-build"
555
556 econf \
557 $(use_with readline) \
558 ${myconf}
559 }
560
561 src_compile() {
562 # Again, do not want the perl-module src_compile
563 base_src_compile
564 }
565
566 src_install() {
567 [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
568 source ${TMPENVFILE}
569
570 einfo "Doing stock install"
571 # parallel make install b0rked
572 emake -j1 DESTDIR="${D}" install || die
573
574 # Build the envdir file
575 # Don't forget this..
576 einfo "Building environment file"
577 (
578 echo "# These settings are what was present in the environment when this"
579 echo "# Amanda was compiled. Changing anything below this comment will"
580 echo "# have no effect on your application, but it merely exists to"
581 echo "# preserve them for your next emerge of Amanda"
582 cat "${TMPENVFILE}" | sed "s,=\$,='',g"
583 ) >> "${MYFILESDIR}/${ENVDFILE}"
584
585 # Env.d
586 einfo "Installing environment config file"
587 doenvd "${MYFILESDIR}/${ENVDFILE}"
588
589 # Lock down next section (up until docs).
590 insopts -m0640
591 # Installing Amanda Xinetd Services Definition
592 einfo "Installing xinetd service file"
593 insinto /etc/xinetd.d
594 if use minimal ; then
595 newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
596 else
597 newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
598 fi
599
600 if ! use minimal; then
601 einfo "Installing Sample Daily Cron Job for Amanda"
602 insinto /etc/cron.daily
603 newins "${MYFILESDIR}/amanda-cron" amanda
604 fi
605
606 insinto /etc/amanda
607 einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
608 doins "${T}/amandahosts"
609 fperms 600 /etc/amanda/amandahosts
610
611 dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
612 insinto "${AMANDA_USER_HOMEDIR}"
613 einfo "Installing .profile for ${AMANDA_USER_NAME} user"
614 newins "${MYFILESDIR}/amanda-profile" .profile
615
616 insinto /etc/amanda
617 doins "${S}/example/amanda-client.conf"
618 if ! use minimal ; then
619 insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
620 doins "${S}/example/amanda.conf"
621 doins "${S}/example/disklist"
622 keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
623 fi
624
625 keepdir "${AMANDA_TAR_LISTDIR}"
626 keepdir "${AMANDA_USER_HOMEDIR}/amanda"
627 keepdir "${AMANDA_TMPDIR}/dumps"
628 # Just make sure it exists for XFS to work...
629 use xfs && keepdir /var/xfsdump/inventory
630
631 local i
632 for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
633 "${AMANDA_TMPDIR}" /etc/amanda; do
634 einfo "Securing directory (${i})"
635 fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
636 done
637 # Do NOT use -R
638 fperms 0700 \
639 "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
640 "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
641 "${AMANDA_USER_HOMEDIR}/amanda" \
642 "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
643 /etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}
644
645 einfo "Setting setuid permissions"
646 amanda_permissions_fix "${D}"
647
648 # Relax permissions again
649 insopts -m0644
650
651 # docs
652 einfo "Installing documentation"
653 dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
654 # our inetd sample
655 einfo "Installing standard inetd sample"
656 newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
657 # Amanda example configs
658 einfo "Installing example configurations"
659 rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
660 mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
661 docinto example1
662 newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
663 newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
664 newdoc "${FILESDIR}/example_global.conf" global.conf
665
666 einfo "Cleaning up dud .la files"
667 perlinfo
668 find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
669 }
670
671 pkg_postinst() {
672 [ ! -f "${TMPENVFILE}" -a "$EMERGE_FROM" == "binary" ] && \
673 TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
674 [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
675 source "${TMPENVFILE}"
676
677 # Migration of amandates from /etc to $localstatedir/amanda
678 if [ -f "${ROOT}/etc/amandates" -a \
679 ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
680 einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
681 einfo "A backup is also placed at /etc/amandates.orig"
682 cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
683 mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
684 cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
685 fi
686 if [ -f "${ROOT}/etc/amandates" ]; then
687 einfo "If you have migrated safely, please delete /etc/amandates"
688 fi
689
690 einfo "Checking setuid permissions"
691 amanda_permissions_fix "${ROOT}"
692
693 elog "You should configure Amanda in /etc/amanda now."
694 elog
695 elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
696 elog "and restart xinetd afterwards!"
697 elog
698 elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
699 elog "as an example of how to configure your inetd."
700 elog
701 elog "NOTICE: If you need raw access to partitions you need to add the"
702 elog "amanda user to the 'disk' group."
703 elog
704 elog "NOTICE: If you have a tape changer, you need to add the amanda user"
705 elog "to the 'tape' group."
706 elog
707 elog "If you use localhost in your disklist your restores may break."
708 elog "You should replace it with the actual hostname!"
709 elog "Please also see the syntax changes to amandahosts."
710 }
711
712 # We have had reports of amanda file permissions getting screwed up.
713 # Losing setuid, becoming too lax etc.
714 # ONLY root and users in the amanda group should be able to run these binaries!
715 amanda_permissions_fix() {
716 local root="$1"
717 [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
718 local le="/usr/libexec/amanda"
719 for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
720 "${le}"/rundump "${le}"/runtar "${le}"/dumper \
721 "${le}"/planner ; do
722 chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
723 chmod u=srwx,g=rx,o= "${root}"/${i}
724 done
725 }
726
727
728
729 1.1 app-backup/amanda/amanda-3.3.3.ebuild
730
731 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.3.ebuild?rev=1.1&view=markup
732 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.3.ebuild?rev=1.1&content-type=text/plain
733
734 Index: amanda-3.3.3.ebuild
735 ===================================================================
736 # Copyright 1999-2013 Gentoo Foundation
737 # Distributed under the terms of the GNU General Public License v2
738 # $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.3.ebuild,v 1.1 2013/02/26 22:38:33 robbat2 Exp $
739
740 EAPI=3
741 inherit autotools eutils perl-module user systemd
742
743 MY_P="${P/_}"
744 DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
745 HOMEPAGE="http://www.amanda.org/"
746 SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
747 LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
748 SLOT="0"
749 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
750 RDEPEND="sys-libs/readline
751 virtual/awk
752 app-arch/tar
753 >=dev-lang/perl-5.6
754 app-arch/dump
755 net-misc/openssh
756 >=dev-libs/glib-2.26.0
757 nls? ( virtual/libintl )
758 s3? ( >=net-misc/curl-7.10.0 )
759 !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
760 samba? ( net-fs/samba )
761 kerberos? ( app-crypt/mit-krb5 )
762 xfs? ( sys-fs/xfsdump )
763 readline? ( sys-libs/readline )
764 !systemd? ( virtual/inetd )
765 !minimal? (
766 virtual/mailx
767 app-arch/mt-st
768 sys-block/mtx
769 gnuplot? ( sci-visualization/gnuplot )
770 app-crypt/aespipe
771 app-crypt/gnupg
772 )"
773
774 DEPEND="${RDEPEND}
775 virtual/pkgconfig
776 nls? ( sys-devel/gettext )
777 >=app-text/docbook-xsl-stylesheets-1.72.0
778 app-text/docbook-xml-dtd
779 dev-libs/libxslt
780 "
781
782 IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
783
784 S="${WORKDIR}/${MY_P}"
785
786 MYFILESDIR="${T}/files"
787 ENVDIR="/etc/env.d"
788 ENVDFILE="97amanda"
789 TMPENVFILE="${T}/${ENVDFILE}"
790
791 # This is a complete list of Amanda settings that the ebuild takes from the
792 # build environment. This allows users to alter the behavior of the package as
793 # upstream intended, but keeping with Gentoo style. We store a copy of them in
794 # /etc/env.d/97amanda during the install, so that they are preserved for future
795 # installed. This variable name must not start with AMANDA_, as we do not want
796 # it captured into the env file.
797 ENV_SETTINGS_AMANDA="
798 AMANDA_GROUP_GID AMANDA_GROUP_NAME
799 AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
800 AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
801 AMANDA_TAR_LISTDIR AMANDA_TAR
802 AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
803 AMANDA_CONFIG_NAME AMANDA_TMPDIR"
804
805 amanda_variable_setup() {
806
807 # Setting vars
808 local currentamanda
809
810 # Grab the current settings
811 currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
812
813 # First we set the defaults
814 [ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
815 [ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
816 [ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
817 [ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
818 [ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
819 [ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
820 [ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
821
822 # This installs Amanda, with the server. However, it could be a client,
823 # just specify an alternate server name in AMANDA_SERVER.
824 [ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
825 [ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
826 [ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
827 [ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
828 [ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
829 [ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
830 [ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
831 # These are left empty by default
832 [ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
833 [ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
834 [ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
835 [ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
836
837 # What tar to use
838 [ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
839
840 # Now pull in the old stuff
841 if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
842 # We don't just source it as we don't want everything in there.
843 eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
844 fi
845
846 # Re-apply the new settings if any
847 [ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
848
849 }
850
851 pkg_setup() {
852 amanda_variable_setup
853
854 # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
855 # another host than HOSTNAME.
856 if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
857 elog "You are installing a client-only version of Amanda."
858 elog "You should set the variable \$AMANDA_SERVER to point at your"
859 elog "Amanda-tape-server, otherwise you will have to specify its name"
860 elog "when using amrecover on the client."
861 elog "For example: Use something like"
862 elog "AMANDA_SERVER=\"myserver\" emerge amanda"
863 elog
864 fi
865
866 enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
867 enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
868 }
869
870 src_unpack() {
871 # we do not want the perl src_unpack
872 base_src_unpack
873 }
874
875 src_prepare() {
876
877 # gentoo bug #331111
878 sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
879 sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
880
881 # bug with glibc-2.16.0
882 sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h
883
884 eautoreconf
885
886 # places for us to work in
887 mkdir -p "${MYFILESDIR}"
888 # Now we store the settings we just created
889 set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
890
891 # Prepare our custom files
892 einfo "Building custom configuration files"
893 local i # our iterator
894 local sedexpr # var for sed expr
895 sedexpr=''
896 for i in ${ENV_SETTINGS_AMANDA} ; do
897 local val
898 eval "val=\"\${${i}}\""
899 sedexpr="${sedexpr}s|__${i}__|${val}|g;"
900 done
901
902 # now apply the sed expr
903 for i in "${FILESDIR}"/amanda-* ; do
904 sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
905 done
906
907 (
908 cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
909 use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
910 ) > "${T}"/amandahosts
911
912 if ! use minimal; then
913 sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
914 server-src/am{addclient,serverconfig}.pl || die
915 fi
916 }
917
918 src_configure() {
919 # fix bug #36316
920 addpredict /var/cache/samba/gencache.tdb
921
922 [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
923 source "${TMPENVFILE}"
924 local myconf
925
926 einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
927 myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
928 einfo "Using ${AMANDA_SERVER_INDEX} for index server."
929 myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
930 einfo "Using ${AMANDA_USER_NAME} for amanda user."
931 myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
932 einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
933 myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
934 einfo "Using ${AMANDA_TAR} as Tar implementation."
935 myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
936 einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
937 myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
938 einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
939 myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
940 einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
941 myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
942
943 if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
944 eerror "If you want _both_ UDP and TCP ports, please use only the"
945 eerror "AMANDA_PORTS environment variable for identical ports, or set"
946 eerror "AMANDA_PORTS_BOTH."
947 die "Bad port setup!"
948 fi
949 if [ -n "${AMANDA_PORTS_UDP}" ]; then
950 einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
951 myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
952 fi
953 if [ -n "${AMANDA_PORTS_TCP}" ]; then
954 einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
955 myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
956 fi
957 if [ -n "${AMANDA_PORTS}" ]; then
958 einfo "Using ports ${AMANDA_PORTS/,/-}"
959 myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
960 fi
961
962 # Extras
963 # Speed option
964 myconf="${myconf} --with-buffered-dump"
965 # "debugging" in the configuration is NOT debug in the conventional sense.
966 # It is actually just useful output in the application, and should remain
967 # enabled. There are some cases of breakage with MTX tape changers as of
968 # 2.5.1p2 that it exposes when turned off as well.
969 myconf="${myconf} --with-debugging"
970 # Where to put our files
971 myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
972
973 # Samba support
974 myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
975
976 # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
977 # default
978 myconf="${myconf} --with-bsd-security"
979 myconf="${myconf} --with-ssh-security"
980 myconf="${myconf} --with-bsdudp-security"
981 myconf="${myconf} --with-bsdtcp-security"
982
983 # kerberos-security mechanism version 5
984 myconf="${myconf} `use_with kerberos krb5-security`"
985
986 # Amazon S3 support
987 myconf="${myconf} `use_enable s3 s3-device`"
988
989 # libcurl is required for S3 but otherwise optional
990 if ! use s3; then
991 myconf="${myconf} $(use_with curl libcurl)"
992 fi
993
994 # Client only, as requested in bug #127725
995 if use minimal ; then
996 myconf="${myconf} --without-server"
997 else
998 # amplot
999 myconf="${myconf} $(use_with gnuplot)"
1000 fi
1001
1002 # IPv6 fun.
1003 myconf="${myconf} `use_with ipv6`"
1004 # This is to prevent the IPv6-is-working test
1005 # As the test fails on binpkg build hosts with no IPv6.
1006 use ipv6 && export amanda_cv_working_ipv6=yes
1007
1008 # I18N
1009 myconf="${myconf} `use_enable nls`"
1010
1011 # Bug #296634: Perl location
1012 perlinfo
1013 myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
1014
1015 # Bug 296633: --disable-syntax-checks
1016 # Some tests are not safe for production systems
1017 myconf="${myconf} --disable-syntax-checks"
1018
1019 # build manpages
1020 myconf="${myconf} --enable-manpage-build"
1021
1022 econf \
1023 $(use_with readline) \
1024 ${myconf}
1025 }
1026
1027 src_compile() {
1028 # Again, do not want the perl-module src_compile
1029 base_src_compile
1030 }
1031
1032 src_install() {
1033 [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1034 source ${TMPENVFILE}
1035
1036 einfo "Doing stock install"
1037 # parallel make install b0rked
1038 emake -j1 DESTDIR="${D}" install || die
1039
1040 # Build the envdir file
1041 # Don't forget this..
1042 einfo "Building environment file"
1043 (
1044 echo "# These settings are what was present in the environment when this"
1045 echo "# Amanda was compiled. Changing anything below this comment will"
1046 echo "# have no effect on your application, but it merely exists to"
1047 echo "# preserve them for your next emerge of Amanda"
1048 cat "${TMPENVFILE}" | sed "s,=\$,='',g"
1049 ) >> "${MYFILESDIR}/${ENVDFILE}"
1050
1051 # Env.d
1052 einfo "Installing environment config file"
1053 doenvd "${MYFILESDIR}/${ENVDFILE}"
1054
1055 # Lock down next section (up until docs).
1056 insopts -m0640
1057 # Installing Amanda Xinetd Services Definition
1058 einfo "Installing xinetd service file"
1059 insinto /etc/xinetd.d
1060 if use minimal ; then
1061 newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
1062 else
1063 newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
1064 fi
1065
1066 if ! use minimal; then
1067 einfo "Installing Sample Daily Cron Job for Amanda"
1068 insinto /etc/cron.daily
1069 newins "${MYFILESDIR}/amanda-cron" amanda
1070 fi
1071
1072 if use systemd; then
1073 einfo "Installing systemd service and socket files for Amanda"
1074 systemd_dounit "${FILESDIR}"/amanda.socket || die
1075 systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
1076 fi
1077
1078
1079 insinto /etc/amanda
1080 einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
1081 doins "${T}/amandahosts"
1082 fperms 600 /etc/amanda/amandahosts
1083
1084 dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
1085 insinto "${AMANDA_USER_HOMEDIR}"
1086 einfo "Installing .profile for ${AMANDA_USER_NAME} user"
1087 newins "${MYFILESDIR}/amanda-profile" .profile
1088
1089 insinto /etc/amanda
1090 doins "${S}/example/amanda-client.conf"
1091 if ! use minimal ; then
1092 insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
1093 doins "${S}/example/amanda.conf"
1094 doins "${S}/example/disklist"
1095 keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
1096 fi
1097
1098 keepdir "${AMANDA_TAR_LISTDIR}"
1099 keepdir "${AMANDA_USER_HOMEDIR}/amanda"
1100 keepdir "${AMANDA_TMPDIR}/dumps"
1101 # Just make sure it exists for XFS to work...
1102 use xfs && keepdir /var/xfsdump/inventory
1103
1104 local i
1105 for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
1106 "${AMANDA_TMPDIR}" /etc/amanda; do
1107 einfo "Securing directory (${i})"
1108 fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
1109 done
1110 # Do NOT use -R
1111 fperms 0700 \
1112 "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
1113 "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
1114 "${AMANDA_USER_HOMEDIR}/amanda" \
1115 "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
1116 /etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}
1117
1118 einfo "Setting setuid permissions"
1119 amanda_permissions_fix "${D}"
1120
1121 # Relax permissions again
1122 insopts -m0644
1123
1124 # docs
1125 einfo "Installing documentation"
1126 dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
1127 # our inetd sample
1128 einfo "Installing standard inetd sample"
1129 newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
1130 # Amanda example configs
1131 einfo "Installing example configurations"
1132 rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
1133 mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
1134 docinto example1
1135 newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
1136 newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
1137 newdoc "${FILESDIR}/example_global.conf" global.conf
1138
1139 einfo "Cleaning up dud .la files"
1140 perlinfo
1141 find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
1142 }
1143
1144 pkg_postinst() {
1145 [ ! -f "${TMPENVFILE}" -a "$EMERGE_FROM" == "binary" ] && \
1146 TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
1147 [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1148 source "${TMPENVFILE}"
1149
1150 # Migration of amandates from /etc to $localstatedir/amanda
1151 if [ -f "${ROOT}/etc/amandates" -a \
1152 ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
1153 einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
1154 einfo "A backup is also placed at /etc/amandates.orig"
1155 cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
1156 mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
1157 cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
1158 fi
1159 if [ -f "${ROOT}/etc/amandates" ]; then
1160 einfo "If you have migrated safely, please delete /etc/amandates"
1161 fi
1162
1163 einfo "Checking setuid permissions"
1164 amanda_permissions_fix "${ROOT}"
1165
1166 elog "You should configure Amanda in /etc/amanda now."
1167 elog
1168 elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
1169 elog "and restart xinetd afterwards!"
1170 elog
1171 elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
1172 elog "as an example of how to configure your inetd."
1173 elog
1174 elog "NOTICE: If you need raw access to partitions you need to add the"
1175 elog "amanda user to the 'disk' group."
1176 elog
1177 elog "NOTICE: If you have a tape changer, you need to add the amanda user"
1178 elog "to the 'tape' group."
1179 elog
1180 elog "If you use localhost in your disklist your restores may break."
1181 elog "You should replace it with the actual hostname!"
1182 elog "Please also see the syntax changes to amandahosts."
1183 }
1184
1185 # We have had reports of amanda file permissions getting screwed up.
1186 # Losing setuid, becoming too lax etc.
1187 # ONLY root and users in the amanda group should be able to run these binaries!
1188 amanda_permissions_fix() {
1189 local root="$1"
1190 [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
1191 local le="/usr/libexec/amanda"
1192 for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
1193 "${le}"/rundump "${le}"/runtar "${le}"/dumper \
1194 "${le}"/planner ; do
1195 chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
1196 chmod u=srwx,g=rx,o= "${root}"/${i}
1197 done
1198 }