1 |
robbat2 14/06/23 15:49:43 |
2 |
|
3 |
Modified: amanda-3.3.3.ebuild amanda-3.3.3-r1.ebuild |
4 |
ChangeLog |
5 |
Added: amanda-3.3.5.ebuild |
6 |
Log: |
7 |
Bump per bug #510936. Drop virtual/inetd dep per bug #506028. |
8 |
|
9 |
(Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit) |
10 |
|
11 |
Revision Changes Path |
12 |
1.11 app-backup/amanda/amanda-3.3.3.ebuild |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.3.ebuild?rev=1.11&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.3.ebuild?rev=1.11&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.3.ebuild?r1=1.10&r2=1.11 |
17 |
|
18 |
Index: amanda-3.3.3.ebuild |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.3.ebuild,v |
21 |
retrieving revision 1.10 |
22 |
retrieving revision 1.11 |
23 |
diff -p -w -b -B -u -u -r1.10 -r1.11 |
24 |
--- amanda-3.3.3.ebuild 21 May 2014 12:07:27 -0000 1.10 |
25 |
+++ amanda-3.3.3.ebuild 23 Jun 2014 15:49:43 -0000 1.11 |
26 |
@@ -1,6 +1,6 @@ |
27 |
# Copyright 1999-2014 Gentoo Foundation |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.3.ebuild,v 1.10 2014/05/21 12:07:27 pinkbyte Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.3.ebuild,v 1.11 2014/06/23 15:49:43 robbat2 Exp $ |
31 |
|
32 |
EAPI=5 |
33 |
inherit autotools eutils perl-module user systemd |
34 |
@@ -25,7 +25,6 @@ RDEPEND="sys-libs/readline |
35 |
kerberos? ( app-crypt/mit-krb5 ) |
36 |
xfs? ( sys-fs/xfsdump ) |
37 |
readline? ( sys-libs/readline ) |
38 |
- !systemd? ( virtual/inetd ) |
39 |
!minimal? ( |
40 |
dev-perl/XML-Simple |
41 |
virtual/mailx |
42 |
@@ -447,6 +446,11 @@ pkg_postinst() { |
43 |
elog "If you use localhost in your disklist your restores may break." |
44 |
elog "You should replace it with the actual hostname!" |
45 |
elog "Please also see the syntax changes to amandahosts." |
46 |
+ elog |
47 |
+ elog "Please note that this package no longer explicitly depends on" |
48 |
+ elog "virtual/inetd, as it supports modes where an inetd is not needed" |
49 |
+ elog "(see bug #506028 for details)." |
50 |
+ |
51 |
} |
52 |
|
53 |
# We have had reports of amanda file permissions getting screwed up. |
54 |
|
55 |
|
56 |
|
57 |
1.8 app-backup/amanda/amanda-3.3.3-r1.ebuild |
58 |
|
59 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.3-r1.ebuild?rev=1.8&view=markup |
60 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.3-r1.ebuild?rev=1.8&content-type=text/plain |
61 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.3-r1.ebuild?r1=1.7&r2=1.8 |
62 |
|
63 |
Index: amanda-3.3.3-r1.ebuild |
64 |
=================================================================== |
65 |
RCS file: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.3-r1.ebuild,v |
66 |
retrieving revision 1.7 |
67 |
retrieving revision 1.8 |
68 |
diff -p -w -b -B -u -u -r1.7 -r1.8 |
69 |
--- amanda-3.3.3-r1.ebuild 21 May 2014 12:07:27 -0000 1.7 |
70 |
+++ amanda-3.3.3-r1.ebuild 23 Jun 2014 15:49:43 -0000 1.8 |
71 |
@@ -1,6 +1,6 @@ |
72 |
# Copyright 1999-2014 Gentoo Foundation |
73 |
# Distributed under the terms of the GNU General Public License v2 |
74 |
-# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.3-r1.ebuild,v 1.7 2014/05/21 12:07:27 pinkbyte Exp $ |
75 |
+# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.3-r1.ebuild,v 1.8 2014/06/23 15:49:43 robbat2 Exp $ |
76 |
|
77 |
EAPI=5 |
78 |
inherit autotools eutils perl-module user systemd |
79 |
@@ -25,7 +25,6 @@ RDEPEND="sys-libs/readline |
80 |
kerberos? ( app-crypt/mit-krb5 ) |
81 |
xfs? ( sys-fs/xfsdump ) |
82 |
readline? ( sys-libs/readline ) |
83 |
- !systemd? ( virtual/inetd ) |
84 |
!minimal? ( |
85 |
dev-perl/XML-Simple |
86 |
virtual/mailx |
87 |
@@ -450,6 +449,11 @@ pkg_postinst() { |
88 |
elog "If you use localhost in your disklist your restores may break." |
89 |
elog "You should replace it with the actual hostname!" |
90 |
elog "Please also see the syntax changes to amandahosts." |
91 |
+ elog |
92 |
+ elog "Please note that this package no longer explicitly depends on" |
93 |
+ elog "virtual/inetd, as it supports modes where an inetd is not needed" |
94 |
+ elog "(see bug #506028 for details)." |
95 |
+ |
96 |
} |
97 |
|
98 |
# We have had reports of amanda file permissions getting screwed up. |
99 |
|
100 |
|
101 |
|
102 |
1.112 app-backup/amanda/ChangeLog |
103 |
|
104 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/ChangeLog?rev=1.112&view=markup |
105 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/ChangeLog?rev=1.112&content-type=text/plain |
106 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/ChangeLog?r1=1.111&r2=1.112 |
107 |
|
108 |
Index: ChangeLog |
109 |
=================================================================== |
110 |
RCS file: /var/cvsroot/gentoo-x86/app-backup/amanda/ChangeLog,v |
111 |
retrieving revision 1.111 |
112 |
retrieving revision 1.112 |
113 |
diff -p -w -b -B -u -u -r1.111 -r1.112 |
114 |
--- ChangeLog 21 May 2014 12:07:27 -0000 1.111 |
115 |
+++ ChangeLog 23 Jun 2014 15:49:43 -0000 1.112 |
116 |
@@ -1,6 +1,12 @@ |
117 |
# ChangeLog for app-backup/amanda |
118 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
119 |
-# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/ChangeLog,v 1.111 2014/05/21 12:07:27 pinkbyte Exp $ |
120 |
+# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/ChangeLog,v 1.112 2014/06/23 15:49:43 robbat2 Exp $ |
121 |
+ |
122 |
+*amanda-3.3.5 (23 Jun 2014) |
123 |
+ |
124 |
+ 23 Jun 2014; Robin H. Johnson <robbat2@g.o> +amanda-3.3.5.ebuild, |
125 |
+ amanda-3.3.3-r1.ebuild, amanda-3.3.3.ebuild: |
126 |
+ Bump per bug #510936. Drop virtual/inetd dep per bug #506028. |
127 |
|
128 |
21 May 2014; Sergey Popov <pinkbyte@g.o> amanda-3.3.3.ebuild, |
129 |
amanda-3.3.3-r1.ebuild: |
130 |
|
131 |
|
132 |
|
133 |
1.1 app-backup/amanda/amanda-3.3.5.ebuild |
134 |
|
135 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.5.ebuild?rev=1.1&view=markup |
136 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-backup/amanda/amanda-3.3.5.ebuild?rev=1.1&content-type=text/plain |
137 |
|
138 |
Index: amanda-3.3.5.ebuild |
139 |
=================================================================== |
140 |
# Copyright 1999-2014 Gentoo Foundation |
141 |
# Distributed under the terms of the GNU General Public License v2 |
142 |
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.5.ebuild,v 1.1 2014/06/23 15:49:43 robbat2 Exp $ |
143 |
|
144 |
EAPI=5 |
145 |
inherit autotools eutils perl-module user systemd |
146 |
|
147 |
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver" |
148 |
HOMEPAGE="http://www.amanda.org/" |
149 |
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz" |
150 |
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+" |
151 |
SLOT="0" |
152 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" |
153 |
RDEPEND="sys-libs/readline |
154 |
virtual/awk |
155 |
app-arch/tar |
156 |
>=dev-lang/perl-5.6 |
157 |
app-arch/dump |
158 |
net-misc/openssh |
159 |
>=dev-libs/glib-2.26.0 |
160 |
nls? ( virtual/libintl ) |
161 |
s3? ( >=net-misc/curl-7.10.0 ) |
162 |
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) ) |
163 |
samba? ( net-fs/samba ) |
164 |
kerberos? ( app-crypt/mit-krb5 ) |
165 |
xfs? ( sys-fs/xfsdump ) |
166 |
readline? ( sys-libs/readline ) |
167 |
!minimal? ( |
168 |
dev-perl/XML-Simple |
169 |
virtual/mailx |
170 |
app-arch/mt-st |
171 |
sys-block/mtx |
172 |
gnuplot? ( sci-visualization/gnuplot ) |
173 |
app-crypt/aespipe |
174 |
app-crypt/gnupg |
175 |
)" |
176 |
|
177 |
DEPEND="${RDEPEND} |
178 |
virtual/pkgconfig |
179 |
nls? ( sys-devel/gettext ) |
180 |
>=app-text/docbook-xsl-stylesheets-1.72.0 |
181 |
app-text/docbook-xml-dtd |
182 |
dev-libs/libxslt |
183 |
" |
184 |
|
185 |
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs" |
186 |
|
187 |
MYFILESDIR="${T}/files" |
188 |
ENVDIR="/etc/env.d" |
189 |
ENVDFILE="97amanda" |
190 |
TMPENVFILE="${T}/${ENVDFILE}" |
191 |
|
192 |
# This is a complete list of Amanda settings that the ebuild takes from the |
193 |
# build environment. This allows users to alter the behavior of the package as |
194 |
# upstream intended, but keeping with Gentoo style. We store a copy of them in |
195 |
# /etc/env.d/97amanda during the install, so that they are preserved for future |
196 |
# installed. This variable name must not start with AMANDA_, as we do not want |
197 |
# it captured into the env file. |
198 |
ENV_SETTINGS_AMANDA=" |
199 |
AMANDA_GROUP_GID AMANDA_GROUP_NAME |
200 |
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS |
201 |
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX |
202 |
AMANDA_TAR_LISTDIR AMANDA_TAR |
203 |
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS |
204 |
AMANDA_CONFIG_NAME AMANDA_TMPDIR" |
205 |
|
206 |
amanda_variable_setup() { |
207 |
|
208 |
# Setting vars |
209 |
local currentamanda |
210 |
|
211 |
# Grab the current settings |
212 |
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)" |
213 |
|
214 |
# First we set the defaults |
215 |
[ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87 |
216 |
[ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda |
217 |
[ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda |
218 |
[ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87 |
219 |
[ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash |
220 |
[ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda |
221 |
[ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}" |
222 |
|
223 |
# This installs Amanda, with the server. However, it could be a client, |
224 |
# just specify an alternate server name in AMANDA_SERVER. |
225 |
[ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}" |
226 |
[ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}" |
227 |
[ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}" |
228 |
[ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists |
229 |
[ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1 |
230 |
[ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda |
231 |
[ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR" |
232 |
# These are left empty by default |
233 |
[ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP= |
234 |
[ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP= |
235 |
[ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH= |
236 |
[ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS= |
237 |
|
238 |
# What tar to use |
239 |
[ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar |
240 |
|
241 |
# Now pull in the old stuff |
242 |
if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then |
243 |
# We don't just source it as we don't want everything in there. |
244 |
eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS') |
245 |
fi |
246 |
|
247 |
# Re-apply the new settings if any |
248 |
[ -n "${currentamanda}" ] && eval `echo "${currentamanda}"` |
249 |
|
250 |
} |
251 |
|
252 |
pkg_setup() { |
253 |
amanda_variable_setup |
254 |
|
255 |
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to |
256 |
# another host than HOSTNAME. |
257 |
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then |
258 |
elog "You are installing a client-only version of Amanda." |
259 |
elog "You should set the variable \$AMANDA_SERVER to point at your" |
260 |
elog "Amanda-tape-server, otherwise you will have to specify its name" |
261 |
elog "when using amrecover on the client." |
262 |
elog "For example: Use something like" |
263 |
elog "AMANDA_SERVER=\"myserver\" emerge amanda" |
264 |
elog |
265 |
fi |
266 |
|
267 |
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}" |
268 |
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}" |
269 |
} |
270 |
|
271 |
src_unpack() { |
272 |
# we do not want the perl src_unpack |
273 |
default_src_unpack |
274 |
} |
275 |
|
276 |
src_prepare() { |
277 |
|
278 |
# gentoo bug #331111 |
279 |
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am |
280 |
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am |
281 |
|
282 |
# bug with glibc-2.16.0 |
283 |
sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h |
284 |
|
285 |
eautoreconf |
286 |
|
287 |
# places for us to work in |
288 |
mkdir -p "${MYFILESDIR}" |
289 |
# Now we store the settings we just created |
290 |
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" |
291 |
|
292 |
# Prepare our custom files |
293 |
einfo "Building custom configuration files" |
294 |
local i # our iterator |
295 |
local sedexpr # var for sed expr |
296 |
sedexpr='' |
297 |
for i in ${ENV_SETTINGS_AMANDA} ; do |
298 |
local val |
299 |
eval "val=\"\${${i}}\"" |
300 |
sedexpr="${sedexpr}s|__${i}__|${val}|g;" |
301 |
done |
302 |
|
303 |
# now apply the sed expr |
304 |
for i in "${FILESDIR}"/amanda-* ; do |
305 |
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" |
306 |
done |
307 |
|
308 |
( |
309 |
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 |
310 |
use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 |
311 |
) > "${T}"/amandahosts |
312 |
|
313 |
if ! use minimal; then |
314 |
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \ |
315 |
server-src/am{addclient,serverconfig}.pl || die |
316 |
fi |
317 |
} |
318 |
|
319 |
src_configure() { |
320 |
# fix bug #36316 |
321 |
addpredict /var/cache/samba/gencache.tdb |
322 |
# fix bug #376169 |
323 |
addpredict /run/blkid |
324 |
addpredict /etc/blkid.tab |
325 |
|
326 |
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!" |
327 |
source "${TMPENVFILE}" |
328 |
local myconf |
329 |
|
330 |
einfo "Using ${AMANDA_SERVER_TAPE} for tape server." |
331 |
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}" |
332 |
einfo "Using ${AMANDA_SERVER_INDEX} for index server." |
333 |
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}" |
334 |
einfo "Using ${AMANDA_USER_NAME} for amanda user." |
335 |
myconf="${myconf} --with-user=${AMANDA_USER_NAME}" |
336 |
einfo "Using ${AMANDA_GROUP_NAME} for amanda group." |
337 |
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}" |
338 |
einfo "Using ${AMANDA_TAR} as Tar implementation." |
339 |
myconf="${myconf} --with-gnutar=${AMANDA_TAR}" |
340 |
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir." |
341 |
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}" |
342 |
einfo "Using ${AMANDA_CONFIG_NAME} as default config name." |
343 |
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}" |
344 |
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory." |
345 |
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}" |
346 |
|
347 |
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then |
348 |
eerror "If you want _both_ UDP and TCP ports, please use only the" |
349 |
eerror "AMANDA_PORTS environment variable for identical ports, or set" |
350 |
eerror "AMANDA_PORTS_BOTH." |
351 |
die "Bad port setup!" |
352 |
fi |
353 |
if [ -n "${AMANDA_PORTS_UDP}" ]; then |
354 |
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}" |
355 |
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}" |
356 |
fi |
357 |
if [ -n "${AMANDA_PORTS_TCP}" ]; then |
358 |
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}" |
359 |
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}" |
360 |
fi |
361 |
if [ -n "${AMANDA_PORTS}" ]; then |
362 |
einfo "Using ports ${AMANDA_PORTS/,/-}" |
363 |
myconf="${myconf} --with-portrange=${AMANDA_PORTS}" |
364 |
fi |
365 |
|
366 |
# Extras |
367 |
# Speed option |
368 |
myconf="${myconf} --with-buffered-dump" |
369 |
# "debugging" in the configuration is NOT debug in the conventional sense. |
370 |
# It is actually just useful output in the application, and should remain |
371 |
# enabled. There are some cases of breakage with MTX tape changers as of |
372 |
# 2.5.1p2 that it exposes when turned off as well. |
373 |
myconf="${myconf} --with-debugging" |
374 |
# Where to put our files |
375 |
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}" |
376 |
|
377 |
# Samba support |
378 |
myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`" |
379 |
|
380 |
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by |
381 |
# default |
382 |
myconf="${myconf} --with-bsd-security" |
383 |
myconf="${myconf} --with-ssh-security" |
384 |
myconf="${myconf} --with-bsdudp-security" |
385 |
myconf="${myconf} --with-bsdtcp-security" |
386 |
|
387 |
# kerberos-security mechanism version 5 |
388 |
myconf="${myconf} `use_with kerberos krb5-security`" |
389 |
|
390 |
# Amazon S3 support |
391 |
myconf="${myconf} `use_enable s3 s3-device`" |
392 |
|
393 |
# libcurl is required for S3 but otherwise optional |
394 |
if ! use s3; then |
395 |
myconf="${myconf} $(use_with curl libcurl)" |
396 |
fi |
397 |
|
398 |
# Client only, as requested in bug #127725 |
399 |
if use minimal ; then |
400 |
myconf="${myconf} --without-server" |
401 |
else |
402 |
# amplot |
403 |
myconf="${myconf} $(use_with gnuplot)" |
404 |
fi |
405 |
|
406 |
# IPv6 fun. |
407 |
myconf="${myconf} `use_with ipv6`" |
408 |
# This is to prevent the IPv6-is-working test |
409 |
# As the test fails on binpkg build hosts with no IPv6. |
410 |
use ipv6 && export amanda_cv_working_ipv6=yes |
411 |
|
412 |
# I18N |
413 |
myconf="${myconf} `use_enable nls`" |
414 |
|
415 |
# Bug #296634: Perl location |
416 |
perlinfo |
417 |
myconf="${myconf} --with-amperldir=${VENDOR_LIB}" |
418 |
|
419 |
# Bug 296633: --disable-syntax-checks |
420 |
# Some tests are not safe for production systems |
421 |
myconf="${myconf} --disable-syntax-checks" |
422 |
|
423 |
# build manpages |
424 |
myconf="${myconf} --enable-manpage-build" |
425 |
|
426 |
# bug #483120 |
427 |
tc-export AR |
428 |
|
429 |
econf \ |
430 |
$(use_with readline) \ |
431 |
${myconf} |
432 |
} |
433 |
|
434 |
src_compile() { |
435 |
# Again, do not want the perl-module src_compile |
436 |
default_src_compile |
437 |
} |
438 |
|
439 |
src_install() { |
440 |
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!" |
441 |
source ${TMPENVFILE} |
442 |
|
443 |
einfo "Doing stock install" |
444 |
emake DESTDIR="${D}" install || die |
445 |
|
446 |
# Build the envdir file |
447 |
# Don't forget this.. |
448 |
einfo "Building environment file" |
449 |
( |
450 |
echo "# These settings are what was present in the environment when this" |
451 |
echo "# Amanda was compiled. Changing anything below this comment will" |
452 |
echo "# have no effect on your application, but it merely exists to" |
453 |
echo "# preserve them for your next emerge of Amanda" |
454 |
cat "${TMPENVFILE}" | sed "s,=\$,='',g" |
455 |
) >> "${MYFILESDIR}/${ENVDFILE}" |
456 |
|
457 |
# Env.d |
458 |
einfo "Installing environment config file" |
459 |
doenvd "${MYFILESDIR}/${ENVDFILE}" |
460 |
|
461 |
# Lock down next section (up until docs). |
462 |
insopts -m0640 |
463 |
# Installing Amanda Xinetd Services Definition |
464 |
einfo "Installing xinetd service file" |
465 |
insinto /etc/xinetd.d |
466 |
if use minimal ; then |
467 |
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda |
468 |
else |
469 |
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda |
470 |
fi |
471 |
|
472 |
if ! use minimal; then |
473 |
einfo "Installing Sample Daily Cron Job for Amanda" |
474 |
insinto /etc/cron.daily |
475 |
newins "${MYFILESDIR}/amanda-cron" amanda |
476 |
fi |
477 |
|
478 |
einfo "Installing systemd service and socket files for Amanda" |
479 |
systemd_dounit "${FILESDIR}"/amanda.socket || die |
480 |
systemd_newunit "${FILESDIR}"/amanda.service-r1 'amanda@.service' || die |
481 |
|
482 |
insinto /etc/amanda |
483 |
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user" |
484 |
doins "${T}/amandahosts" |
485 |
fperms 600 /etc/amanda/amandahosts |
486 |
|
487 |
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts" |
488 |
insinto "${AMANDA_USER_HOMEDIR}" |
489 |
einfo "Installing .profile for ${AMANDA_USER_NAME} user" |
490 |
newins "${MYFILESDIR}/amanda-profile" .profile |
491 |
|
492 |
insinto /etc/amanda |
493 |
doins "${S}/example/amanda-client.conf" |
494 |
if ! use minimal ; then |
495 |
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}" |
496 |
doins "${S}/example/amanda.conf" |
497 |
doins "${S}/example/disklist" |
498 |
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index" |
499 |
fi |
500 |
|
501 |
keepdir "${AMANDA_TAR_LISTDIR}" |
502 |
keepdir "${AMANDA_USER_HOMEDIR}/amanda" |
503 |
keepdir "${AMANDA_TMPDIR}/dumps" |
504 |
# Just make sure it exists for XFS to work... |
505 |
use xfs && keepdir /var/xfsdump/inventory |
506 |
|
507 |
local i |
508 |
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \ |
509 |
"${AMANDA_TMPDIR}" /etc/amanda; do |
510 |
einfo "Securing directory (${i})" |
511 |
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i} |
512 |
done |
513 |
# Do NOT use -R |
514 |
fperms 0700 \ |
515 |
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \ |
516 |
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \ |
517 |
"${AMANDA_USER_HOMEDIR}/amanda" \ |
518 |
/etc/amanda |
519 |
|
520 |
if ! use minimal ; then |
521 |
fperms 0700 \ |
522 |
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \ |
523 |
/etc/amanda/${AMANDA_CONFIG_NAME} |
524 |
fi |
525 |
|
526 |
einfo "Setting setuid permissions" |
527 |
amanda_permissions_fix "${D}" |
528 |
|
529 |
# Relax permissions again |
530 |
insopts -m0644 |
531 |
|
532 |
# docs |
533 |
einfo "Installing documentation" |
534 |
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING |
535 |
# our inetd sample |
536 |
einfo "Installing standard inetd sample" |
537 |
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample |
538 |
# Amanda example configs |
539 |
einfo "Installing example configurations" |
540 |
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes} |
541 |
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/" |
542 |
docinto example1 |
543 |
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf |
544 |
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist |
545 |
newdoc "${FILESDIR}/example_global.conf" global.conf |
546 |
|
547 |
einfo "Cleaning up dud .la files" |
548 |
perlinfo |
549 |
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f |
550 |
} |
551 |
|
552 |
pkg_postinst() { |
553 |
[ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \ |
554 |
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}" |
555 |
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!" |
556 |
source "${TMPENVFILE}" |
557 |
|
558 |
# Migration of amandates from /etc to $localstatedir/amanda |
559 |
if [ -f "${ROOT}/etc/amandates" -a \ |
560 |
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then |
561 |
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda" |
562 |
einfo "A backup is also placed at /etc/amandates.orig" |
563 |
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig" |
564 |
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/" |
565 |
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" |
566 |
fi |
567 |
if [ -f "${ROOT}/etc/amandates" ]; then |
568 |
einfo "If you have migrated safely, please delete /etc/amandates" |
569 |
fi |
570 |
|
571 |
einfo "Checking setuid permissions" |
572 |
amanda_permissions_fix "${ROOT}" |
573 |
|
574 |
elog "You should configure Amanda in /etc/amanda now." |
575 |
elog |
576 |
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda" |
577 |
elog "and restart xinetd afterwards!" |
578 |
elog |
579 |
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample" |
580 |
elog "as an example of how to configure your inetd." |
581 |
elog |
582 |
elog "NOTICE: If you need raw access to partitions you need to add the" |
583 |
elog "amanda user to the 'disk' group." |
584 |
elog |
585 |
elog "NOTICE: If you have a tape changer, you need to add the amanda user" |
586 |
elog "to the 'tape' group." |
587 |
elog |
588 |
elog "If you use localhost in your disklist your restores may break." |
589 |
elog "You should replace it with the actual hostname!" |
590 |
elog "Please also see the syntax changes to amandahosts." |
591 |
elog |
592 |
elog "Please note that this package no longer explicitly depends on" |
593 |
elog "virtual/inetd, as it supports modes where an inetd is not needed" |
594 |
elog "(see bug #506028 for details)." |
595 |
|
596 |
} |
597 |
|
598 |
# We have had reports of amanda file permissions getting screwed up. |
599 |
# Losing setuid, becoming too lax etc. |
600 |
# ONLY root and users in the amanda group should be able to run these binaries! |
601 |
amanda_permissions_fix() { |
602 |
local root="$1" |
603 |
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!" |
604 |
local le="/usr/libexec/amanda" |
605 |
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \ |
606 |
"${le}"/rundump "${le}"/runtar "${le}"/dumper \ |
607 |
"${le}"/planner ; do |
608 |
chown root:${AMANDA_GROUP_NAME} "${root}"/${i} |
609 |
chmod u=srwx,g=rx,o= "${root}"/${i} |
610 |
done |
611 |
} |