Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/amanda/files/, app-backup/amanda/
Date: Mon, 28 Dec 2020 14:48:32
Message-Id: 1609166868.de823e0f51a753e2fea951f6a4a79bbfda9b78f2.soap@gentoo
1 commit: de823e0f51a753e2fea951f6a4a79bbfda9b78f2
2 Author: Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
3 AuthorDate: Mon Dec 28 14:47:48 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 28 14:47:48 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de823e0f
7
8 app-backup/amanda: Cleanup obsolete versions
9
10 Package-Manager: Portage-3.0.9, Repoman-3.0.1
11 Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 app-backup/amanda/Manifest | 6 -
15 app-backup/amanda/amanda-3.4.1.ebuild | 487 --------------------
16 app-backup/amanda/amanda-3.4.2.ebuild | 484 --------------------
17 app-backup/amanda/amanda-3.4.3.ebuild | 484 --------------------
18 app-backup/amanda/amanda-3.4.4.ebuild | 484 --------------------
19 app-backup/amanda/amanda-3.4.5.ebuild | 484 --------------------
20 app-backup/amanda/amanda-3.5-r1.ebuild | 498 ---------------------
21 .../amanda/files/amanda-3.4.1-labelstr.patch | 164 -------
22 app-backup/amanda/files/amanda-3.4.1-slots.patch | 16 -
23 9 files changed, 3107 deletions(-)
24
25 diff --git a/app-backup/amanda/Manifest b/app-backup/amanda/Manifest
26 index b2a1971bce9..95116b4ada6 100644
27 --- a/app-backup/amanda/Manifest
28 +++ b/app-backup/amanda/Manifest
29 @@ -1,8 +1,2 @@
30 DIST amanda-3.3.9.tar.gz 4673301 BLAKE2B 8123a4f0d1fd961562a1ae6b97c2bddc4d9cb735b994c3c5f2359fa8a475a20658fc7e94c86307ab11710f23989a98c77b320e34d881b38d56a51ab0ab2f1bbd SHA512 345670a20cff335453e8dcbf457d1fcdb9f266e4a03d729c2b1ba762f4fac323de4a87713d0fd54c11ca244a08dc97fb8c641625f7fa81cb241b3c17748b1b7e
31 -DIST amanda-3.4.1.tar.gz 5338575 BLAKE2B 286ca826cf80253fd4491b4e94db08cdeea9b13d115021859398ac940b55fb452561baa7545a5c8f3f973a0d595a220056e383a79577d1e9113a00960c9ba038 SHA512 245bf334e36fe8b4361d9fc27ea7e7ef5bd2ecec74719caa16cc94d1ebb3abbef058e28d9afd85851654aaae0984531593a35c079d1ba4aed0fc5177e907ec16
32 -DIST amanda-3.4.2.tar.gz 5353734 BLAKE2B b7c2bc78a1900d0c87f93ff9eea5cd8a9cb5ad8484475424a6a05d951d9ea543e936bec2fab1624f8ee512dc0a3f87228e07c1720b9a6ddf37f5525ca54260c4 SHA512 dea44ffa5eb30318336395ccbd582df2f83da9a4cf91def2834a2e65b2e0f36cafc1911f6b73c3afb63be256484a78b006bdeb1db5b3ecf87dc59d34754987fd
33 -DIST amanda-3.4.3.tar.gz 5355137 BLAKE2B 920e34c50a624aeab8ed1e6a4555d6b6e34ede45a8d896892a562a5b82ebf4be17acc49ba688238bae0e374bed0c2be8e683974de574038565cf1e7ad1cb65f0 SHA512 5fa7a8c59961f87568d3459e6b5368e50c6cf74e1a6c7599faf5f85d537e72668775acc11009d1d5699ab92d1c21553b5b86e06b804c6a1ae04500889726694a
34 -DIST amanda-3.4.4.tar.gz 5363929 BLAKE2B a3da69f63c43ba4821a28d380262b99444c45dbfaa5ff748c6e4d0d452c1ad3e1d6a254dd27fec7afc7f4f8ba0a56c56d90192f1a5ba714ed83e26e52700f397 SHA512 e73ee29a6074396a885b08d9b1160b1e379423596dde872a14a8c8cf5845c9fcf3ea08038007a99063169a863d8b9f3ca9c23b8f5609d463a5b1f2ddcd44be96
35 -DIST amanda-3.4.5.tar.gz 5365381 BLAKE2B 61c18603d48c4e9c647cfc7e185292e8764d62bd1ea9212da04958029cc87472872fa2e4a45ec52bb15f6342d2f3e41e486a6618024f775dbedffcc762190ae4 SHA512 441efef6a34a1cb645c8c5d1e909f25230322ceb38d1efa0a104de2d9051640f7032255c8d8c7391a918102aceeb5073048070471fb642e185a2a113c817e00c
36 DIST amanda-3.5.1.tar.gz 5402093 BLAKE2B 4c342fb55b2b5fc0d338a1616bf26b1d844b0ecd6627432b849996c0072756090e1f695050605af0a5c3eda2daeb63131fbe16b5ac728af9137699f4d916b8e8 SHA512 8d5451b6b3f18f9a705592ba6baf8ffb7fb4fe62261eac8a4f4fae4eded3f7f447f547ac6f016bcb57ea43f116cf87fdc48f8e77b117bbdecf00d3e37dd0f39f
37 -DIST amanda-3.5.tar.gz 5386719 BLAKE2B 93a382a9091ec7cfc5f21fe7131a6bf0c1aceb169a2274ce66c1f77a08b594beeca430687a6a28403d8cc35e85beecce99fde9c2d7d34c8460999a3ca63937f1 SHA512 31340eb250972b2d7b2ad5e51c4f3fafb9de15b9f51f688447214174c77ea89d344f50709ca51d6ba965f8ed6977608f22d7bc6811cc97b63207f7a7cec8219c
38
39 diff --git a/app-backup/amanda/amanda-3.4.1.ebuild b/app-backup/amanda/amanda-3.4.1.ebuild
40 deleted file mode 100644
41 index dd358b4cf73..00000000000
42 --- a/app-backup/amanda/amanda-3.4.1.ebuild
43 +++ /dev/null
44 @@ -1,487 +0,0 @@
45 -# Copyright 1999-2020 Gentoo Authors
46 -# Distributed under the terms of the GNU General Public License v2
47 -
48 -EAPI=6
49 -inherit autotools perl-module user systemd toolchain-funcs
50 -
51 -DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
52 -HOMEPAGE="http://www.amanda.org/"
53 -SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
54 -
55 -LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
56 -SLOT="0"
57 -IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
58 -
59 -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
60 -RDEPEND="sys-libs/readline:=
61 - virtual/awk
62 - app-arch/tar
63 - dev-lang/perl:=
64 - app-arch/dump
65 - net-misc/openssh
66 - >=dev-libs/glib-2.26.0
67 - dev-perl/JSON
68 - dev-perl/Encode-Locale
69 - nls? ( virtual/libintl )
70 - s3? ( >=net-misc/curl-7.10.0 )
71 - !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
72 - samba? ( net-fs/samba:= )
73 - kerberos? ( app-crypt/mit-krb5 )
74 - xfs? ( sys-fs/xfsdump )
75 - !minimal? (
76 - dev-perl/XML-Simple
77 - virtual/mailx
78 - app-arch/mt-st:=
79 - sys-block/mtx
80 - gnuplot? ( sci-visualization/gnuplot )
81 - app-crypt/aespipe
82 - app-crypt/gnupg
83 - )"
84 -
85 -DEPEND="${RDEPEND}
86 - virtual/pkgconfig
87 - nls? ( sys-devel/gettext )
88 - >=app-text/docbook-xsl-stylesheets-1.72.0
89 - app-text/docbook-xml-dtd
90 - dev-libs/libxslt
91 - dev-lang/swig
92 - "
93 -
94 -MYFILESDIR="${T}/files"
95 -ENVDIR="/etc/env.d"
96 -ENVDFILE="97amanda"
97 -TMPENVFILE="${T}/${ENVDFILE}"
98 -
99 -# This is a complete list of Amanda settings that the ebuild takes from the
100 -# build environment. This allows users to alter the behavior of the package as
101 -# upstream intended, but keeping with Gentoo style. We store a copy of them in
102 -# /etc/env.d/97amanda during the install, so that they are preserved for future
103 -# installed. This variable name must not start with AMANDA_, as we do not want
104 -# it captured into the env file.
105 -ENV_SETTINGS_AMANDA="
106 -AMANDA_GROUP_GID AMANDA_GROUP_NAME
107 -AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
108 -AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
109 -AMANDA_TAR_LISTDIR AMANDA_TAR
110 -AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
111 -AMANDA_CONFIG_NAME AMANDA_TMPDIR"
112 -
113 -amanda_variable_setup() {
114 -
115 - # Setting vars
116 - local currentamanda
117 -
118 - # Grab the current settings
119 - currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
120 -
121 - # First we set the defaults
122 - [[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
123 - [[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
124 - [[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
125 - [[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
126 - [[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
127 - [[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
128 - [[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
129 -
130 - # This installs Amanda, with the server. However, it could be a client,
131 - # just specify an alternate server name in AMANDA_SERVER.
132 - [[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
133 - [[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
134 - [[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
135 - [[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
136 - [[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
137 - [[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
138 - [[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
139 - [[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
140 - # These are left empty by default
141 - [[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
142 - [[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
143 - [[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
144 - [[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
145 -
146 - # What tar to use
147 - [[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
148 -
149 - # Now pull in the old stuff
150 - if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
151 - # We don't just source it as we don't want everything in there.
152 - eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
153 - fi
154 -
155 - # Re-apply the new settings if any
156 - [ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
157 -
158 -}
159 -
160 -pkg_setup() {
161 - amanda_variable_setup
162 -
163 - # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
164 - # another host than HOSTNAME.
165 - if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
166 - elog "You are installing a client-only version of Amanda."
167 - elog "You should set the variable \$AMANDA_SERVER to point at your"
168 - elog "Amanda-tape-server, otherwise you will have to specify its name"
169 - elog "when using amrecover on the client."
170 - elog "For example: Use something like"
171 - elog "AMANDA_SERVER=\"myserver\" emerge amanda"
172 - elog
173 - fi
174 -
175 - enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
176 - enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
177 -}
178 -
179 -src_unpack() {
180 - # we do not want the perl src_unpack
181 - default_src_unpack
182 -}
183 -
184 -src_prepare() {
185 - # gentoo bug #331111
186 - sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
187 - sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
188 -
189 - # bug with glibc-2.16.0
190 - sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
191 -
192 - eautoreconf
193 -
194 - # places for us to work in
195 - mkdir -p "${MYFILESDIR}" || die
196 - # Now we store the settings we just created
197 - set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
198 -
199 - # Prepare our custom files
200 - einfo "Building custom configuration files"
201 - local i # our iterator
202 - local sedexpr # var for sed expr
203 - sedexpr=''
204 - for i in ${ENV_SETTINGS_AMANDA} ; do
205 - local val
206 - eval "val=\"\${${i}}\""
207 - sedexpr="${sedexpr}s|__${i}__|${val}|g;"
208 - done
209 -
210 - # now apply the sed expr
211 - for i in "${FILESDIR}"/amanda-* ; do
212 - sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
213 - done
214 -
215 - if use minimal; then
216 - cat "${MYFILESDIR}"/amanda-amandahosts-server.5.1_p3-r1 > "${T}"/amandahosts || die
217 - else
218 - sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
219 - server-src/am{addclient,serverconfig}.pl || die
220 - cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
221 - fi
222 -
223 - eapply "${FILESDIR}"/${P}-slots.patch || die
224 - eapply "${FILESDIR}"/${P}-labelstr.patch || die
225 -
226 - eapply_user
227 -}
228 -
229 -src_configure() {
230 - # fix bug #36316
231 - addpredict /var/cache/samba/gencache.tdb
232 - # fix bug #376169
233 - addpredict /run/blkid
234 - addpredict /etc/blkid.tab
235 -
236 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
237 - source "${TMPENVFILE}"
238 - local myconf
239 -
240 - einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
241 - myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
242 - einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
243 - myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
244 - einfo "Using ${AMANDA_SERVER_INDEX} for index server."
245 - myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
246 - einfo "Using ${AMANDA_USER_NAME} for amanda user."
247 - myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
248 - einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
249 - myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
250 - einfo "Using ${AMANDA_TAR} as Tar implementation."
251 - myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
252 - einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
253 - myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
254 - einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
255 - myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
256 - einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
257 - myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
258 -
259 - if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
260 - eerror "If you want _both_ UDP and TCP ports, please use only the"
261 - eerror "AMANDA_PORTS environment variable for identical ports, or set"
262 - eerror "AMANDA_PORTS_BOTH."
263 - die "Bad port setup!"
264 - fi
265 - if [ -n "${AMANDA_PORTS_UDP}" ]; then
266 - einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
267 - myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
268 - fi
269 - if [ -n "${AMANDA_PORTS_TCP}" ]; then
270 - einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
271 - myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
272 - fi
273 - if [ -n "${AMANDA_PORTS}" ]; then
274 - einfo "Using ports ${AMANDA_PORTS/,/-}"
275 - myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
276 - fi
277 -
278 - # Extras
279 - # Speed option
280 - myconf="${myconf} --with-buffered-dump"
281 - # "debugging" in the configuration is NOT debug in the conventional sense.
282 - # It is actually just useful output in the application, and should remain
283 - # enabled. There are some cases of breakage with MTX tape changers as of
284 - # 2.5.1p2 that it exposes when turned off as well.
285 - myconf="${myconf} --with-debugging"
286 - # Where to put our files
287 - myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
288 -
289 - # Samba support
290 - myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
291 -
292 - # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
293 - # default
294 - myconf="${myconf} --with-bsd-security"
295 - myconf="${myconf} --with-ssh-security"
296 - myconf="${myconf} --with-bsdudp-security"
297 - myconf="${myconf} --with-bsdtcp-security"
298 -
299 - # kerberos-security mechanism version 5
300 - myconf="${myconf} $(use_with kerberos krb5-security)"
301 -
302 - # Amazon S3 support
303 - myconf="${myconf} `use_enable s3 s3-device`"
304 -
305 - # libcurl is required for S3 but otherwise optional
306 - if ! use s3; then
307 - myconf="${myconf} $(use_with curl libcurl)"
308 - fi
309 -
310 - # Client only, as requested in bug #127725
311 - if use minimal ; then
312 - myconf="${myconf} --without-server"
313 - else
314 - # amplot
315 - myconf="${myconf} $(use_with gnuplot)"
316 - fi
317 -
318 - # IPv6 fun.
319 - myconf="${myconf} `use_with ipv6`"
320 - # This is to prevent the IPv6-is-working test
321 - # As the test fails on binpkg build hosts with no IPv6.
322 - use ipv6 && export amanda_cv_working_ipv6=yes
323 -
324 - # I18N
325 - myconf="${myconf} `use_enable nls`"
326 -
327 - # Bug #296634: Perl location
328 - perl_set_version
329 - myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
330 -
331 - # Bug 296633: --disable-syntax-checks
332 - # Some tests are not safe for production systems
333 - myconf="${myconf} --disable-syntax-checks"
334 -
335 - # build manpages
336 - myconf="${myconf} --enable-manpage-build"
337 -
338 - # bug #483120
339 - tc-export AR
340 -
341 - econf \
342 - $(use_with readline) \
343 - ${myconf}
344 -}
345 -
346 -src_compile() {
347 - # Again, do not want the perl-module src_compile
348 - default_src_compile
349 -}
350 -
351 -src_install() {
352 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
353 - source ${TMPENVFILE}
354 -
355 - einfo "Doing stock install"
356 - emake DESTDIR="${D}" install
357 -
358 - # Build the envdir file
359 - # Don't forget this..
360 - einfo "Building environment file"
361 - (
362 - echo "# These settings are what was present in the environment when this"
363 - echo "# Amanda was compiled. Changing anything below this comment will"
364 - echo "# have no effect on your application, but it merely exists to"
365 - echo "# preserve them for your next emerge of Amanda"
366 - cat "${TMPENVFILE}" | sed "s,=\$,='',g"
367 - ) >> "${MYFILESDIR}/${ENVDFILE}"
368 -
369 - # Env.d
370 - einfo "Installing environment config file"
371 - doenvd "${MYFILESDIR}/${ENVDFILE}"
372 -
373 - # Lock down next section (up until docs).
374 - insopts -m0640
375 - # Installing Amanda Xinetd Services Definition
376 - einfo "Installing xinetd service file"
377 - insinto /etc/xinetd.d
378 - if use minimal ; then
379 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
380 - else
381 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
382 - fi
383 -
384 - if ! use minimal; then
385 - einfo "Installing Sample Daily Cron Job for Amanda"
386 - insinto /etc/cron.daily
387 - newins "${MYFILESDIR}/amanda-cron" amanda
388 - fi
389 -
390 - einfo "Installing systemd service and socket files for Amanda"
391 - systemd_dounit "${FILESDIR}"/amanda.socket || die
392 - systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
393 -
394 - insinto /etc/amanda
395 - einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
396 - doins "${T}/amandahosts"
397 - fperms 600 /etc/amanda/amandahosts
398 -
399 - dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
400 - insinto "${AMANDA_USER_HOMEDIR}"
401 - einfo "Installing .profile for ${AMANDA_USER_NAME} user"
402 - newins "${MYFILESDIR}/amanda-profile" .profile
403 -
404 - insinto /etc/amanda
405 - doins "${S}/example/amanda-client.conf"
406 - if ! use minimal ; then
407 - insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
408 - doins "${S}/example/amanda.conf"
409 - doins "${S}/example/disklist"
410 - keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
411 - fi
412 -
413 - keepdir "${AMANDA_TAR_LISTDIR}"
414 - keepdir "${AMANDA_USER_HOMEDIR}/amanda"
415 - keepdir "${AMANDA_TMPDIR}/dumps"
416 - # Just make sure it exists for XFS to work...
417 - use xfs && keepdir /var/xfsdump/inventory
418 -
419 - local i
420 - for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
421 - "${AMANDA_TMPDIR}" /etc/amanda; do
422 - einfo "Securing directory (${i})"
423 - fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
424 - done
425 - # Do NOT use -R
426 - fperms 0700 \
427 - "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
428 - "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
429 - "${AMANDA_USER_HOMEDIR}/amanda" \
430 - /etc/amanda
431 -
432 - if ! use minimal ; then
433 - fperms 0700 \
434 - "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
435 - /etc/amanda/${AMANDA_CONFIG_NAME}
436 - fi
437 -
438 - einfo "Setting setuid permissions"
439 - amanda_permissions_fix "${D}"
440 -
441 - # Relax permissions again
442 - insopts -m0644
443 -
444 - # docs
445 - einfo "Installing documentation"
446 - dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
447 - # our inetd sample
448 - einfo "Installing standard inetd sample"
449 - newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
450 - # Amanda example configs
451 - einfo "Installing example configurations"
452 - rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
453 - mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
454 - docinto example1
455 - newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
456 - newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
457 - newdoc "${FILESDIR}/example_global.conf" global.conf
458 -
459 - einfo "Cleaning up dud .la files"
460 - perl_set_version
461 - find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
462 -}
463 -
464 -pkg_postinst() {
465 - [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
466 - TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
467 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
468 - source "${TMPENVFILE}"
469 -
470 - # Migration of amandates from /etc to $localstatedir/amanda
471 - if [ -f "${ROOT}/etc/amandates" -a \
472 - ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
473 - einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
474 - einfo "A backup is also placed at /etc/amandates.orig"
475 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
476 - mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
477 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
478 - fi
479 - if [ -f "${ROOT}/etc/amandates" ]; then
480 - einfo "If you have migrated safely, please delete /etc/amandates"
481 - fi
482 -
483 - einfo "Checking setuid permissions"
484 - amanda_permissions_fix "${ROOT}"
485 -
486 - elog "You should configure Amanda in /etc/amanda now."
487 - elog
488 - elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
489 - elog "and restart xinetd afterwards!"
490 - elog
491 - elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
492 - elog "as an example of how to configure your inetd."
493 - elog
494 - elog "systemd-users: enable and start amanda.socket or the relevant services"
495 - elog "regarding what auth method you use."
496 - elog
497 - elog "NOTICE: If you need raw access to partitions you need to add the"
498 - elog "amanda user to the 'disk' group."
499 - elog
500 - elog "NOTICE: If you have a tape changer, you need to add the amanda user"
501 - elog "to the 'tape' group."
502 - elog
503 - elog "If you use localhost in your disklist your restores may break."
504 - elog "You should replace it with the actual hostname!"
505 - elog "Please also see the syntax changes to amandahosts."
506 - elog "The only exception is when you use the authentication method 'local'."
507 - elog
508 - elog "Please note that this package no longer explicitly depends on"
509 - elog "virtual/inetd, as it supports modes where an inetd is not needed"
510 - elog "(see bug #506028 for details)."
511 -}
512 -
513 -# We have had reports of amanda file permissions getting screwed up.
514 -# Losing setuid, becoming too lax etc.
515 -# ONLY root and users in the amanda group should be able to run these binaries!
516 -amanda_permissions_fix() {
517 - local root="$1"
518 - [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
519 - local le="/usr/libexec/amanda"
520 - for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
521 - "${le}"/rundump "${le}"/runtar "${le}"/dumper \
522 - "${le}"/planner ; do
523 - chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
524 - chmod u=srwx,g=rx,o= "${root}"/${i}
525 - done
526 -}
527 -
528 -# We do not want the perl-module tests.
529 -src_test() {
530 - default_src_test
531 -}
532
533 diff --git a/app-backup/amanda/amanda-3.4.2.ebuild b/app-backup/amanda/amanda-3.4.2.ebuild
534 deleted file mode 100644
535 index a6f09df6878..00000000000
536 --- a/app-backup/amanda/amanda-3.4.2.ebuild
537 +++ /dev/null
538 @@ -1,484 +0,0 @@
539 -# Copyright 1999-2020 Gentoo Authors
540 -# Distributed under the terms of the GNU General Public License v2
541 -
542 -EAPI=6
543 -inherit autotools perl-module user systemd toolchain-funcs
544 -
545 -DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
546 -HOMEPAGE="http://www.amanda.org/"
547 -SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
548 -
549 -LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
550 -SLOT="0"
551 -IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
552 -
553 -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
554 -RDEPEND="sys-libs/readline:=
555 - virtual/awk
556 - app-arch/tar
557 - dev-lang/perl:=
558 - app-arch/dump
559 - net-misc/openssh
560 - >=dev-libs/glib-2.26.0
561 - dev-perl/JSON
562 - dev-perl/Encode-Locale
563 - nls? ( virtual/libintl )
564 - s3? ( >=net-misc/curl-7.10.0 )
565 - !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
566 - samba? ( net-fs/samba:= )
567 - kerberos? ( app-crypt/mit-krb5 )
568 - xfs? ( sys-fs/xfsdump )
569 - !minimal? (
570 - dev-perl/XML-Simple
571 - virtual/mailx
572 - app-arch/mt-st:=
573 - sys-block/mtx
574 - gnuplot? ( sci-visualization/gnuplot )
575 - app-crypt/aespipe
576 - app-crypt/gnupg
577 - )"
578 -
579 -DEPEND="${RDEPEND}
580 - virtual/pkgconfig
581 - nls? ( sys-devel/gettext )
582 - >=app-text/docbook-xsl-stylesheets-1.72.0
583 - app-text/docbook-xml-dtd
584 - dev-libs/libxslt
585 - dev-lang/swig
586 - "
587 -
588 -MYFILESDIR="${T}/files"
589 -ENVDIR="/etc/env.d"
590 -ENVDFILE="97amanda"
591 -TMPENVFILE="${T}/${ENVDFILE}"
592 -
593 -# This is a complete list of Amanda settings that the ebuild takes from the
594 -# build environment. This allows users to alter the behavior of the package as
595 -# upstream intended, but keeping with Gentoo style. We store a copy of them in
596 -# /etc/env.d/97amanda during the install, so that they are preserved for future
597 -# installed. This variable name must not start with AMANDA_, as we do not want
598 -# it captured into the env file.
599 -ENV_SETTINGS_AMANDA="
600 -AMANDA_GROUP_GID AMANDA_GROUP_NAME
601 -AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
602 -AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
603 -AMANDA_TAR_LISTDIR AMANDA_TAR
604 -AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
605 -AMANDA_CONFIG_NAME AMANDA_TMPDIR"
606 -
607 -amanda_variable_setup() {
608 -
609 - # Setting vars
610 - local currentamanda
611 -
612 - # Grab the current settings
613 - currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
614 -
615 - # First we set the defaults
616 - [[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
617 - [[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
618 - [[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
619 - [[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
620 - [[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
621 - [[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
622 - [[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
623 -
624 - # This installs Amanda, with the server. However, it could be a client,
625 - # just specify an alternate server name in AMANDA_SERVER.
626 - [[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
627 - [[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
628 - [[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
629 - [[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
630 - [[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
631 - [[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
632 - [[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
633 - [[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
634 - # These are left empty by default
635 - [[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
636 - [[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
637 - [[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
638 - [[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
639 -
640 - # What tar to use
641 - [[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
642 -
643 - # Now pull in the old stuff
644 - if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
645 - # We don't just source it as we don't want everything in there.
646 - eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
647 - fi
648 -
649 - # Re-apply the new settings if any
650 - [ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
651 -
652 -}
653 -
654 -pkg_setup() {
655 - amanda_variable_setup
656 -
657 - # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
658 - # another host than HOSTNAME.
659 - if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
660 - elog "You are installing a client-only version of Amanda."
661 - elog "You should set the variable \$AMANDA_SERVER to point at your"
662 - elog "Amanda-tape-server, otherwise you will have to specify its name"
663 - elog "when using amrecover on the client."
664 - elog "For example: Use something like"
665 - elog "AMANDA_SERVER=\"myserver\" emerge amanda"
666 - elog
667 - fi
668 -
669 - enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
670 - enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
671 -}
672 -
673 -src_unpack() {
674 - # we do not want the perl src_unpack
675 - default_src_unpack
676 -}
677 -
678 -src_prepare() {
679 - # gentoo bug #331111
680 - sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
681 - sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
682 -
683 - # bug with glibc-2.16.0
684 - sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
685 -
686 - eautoreconf
687 -
688 - # places for us to work in
689 - mkdir -p "${MYFILESDIR}" || die
690 - # Now we store the settings we just created
691 - set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
692 -
693 - # Prepare our custom files
694 - einfo "Building custom configuration files"
695 - local i # our iterator
696 - local sedexpr # var for sed expr
697 - sedexpr=''
698 - for i in ${ENV_SETTINGS_AMANDA} ; do
699 - local val
700 - eval "val=\"\${${i}}\""
701 - sedexpr="${sedexpr}s|__${i}__|${val}|g;"
702 - done
703 -
704 - # now apply the sed expr
705 - for i in "${FILESDIR}"/amanda-* ; do
706 - sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
707 - done
708 -
709 - if use minimal; then
710 - cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 > "${T}"/amandahosts || die
711 - else
712 - sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
713 - server-src/am{addclient,serverconfig}.pl || die
714 - cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
715 - fi
716 -
717 - eapply_user
718 -}
719 -
720 -src_configure() {
721 - # fix bug #36316
722 - addpredict /var/cache/samba/gencache.tdb
723 - # fix bug #376169
724 - addpredict /run/blkid
725 - addpredict /etc/blkid.tab
726 -
727 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
728 - source "${TMPENVFILE}"
729 - local myconf
730 -
731 - einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
732 - myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
733 - einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
734 - myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
735 - einfo "Using ${AMANDA_SERVER_INDEX} for index server."
736 - myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
737 - einfo "Using ${AMANDA_USER_NAME} for amanda user."
738 - myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
739 - einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
740 - myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
741 - einfo "Using ${AMANDA_TAR} as Tar implementation."
742 - myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
743 - einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
744 - myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
745 - einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
746 - myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
747 - einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
748 - myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
749 -
750 - if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
751 - eerror "If you want _both_ UDP and TCP ports, please use only the"
752 - eerror "AMANDA_PORTS environment variable for identical ports, or set"
753 - eerror "AMANDA_PORTS_BOTH."
754 - die "Bad port setup!"
755 - fi
756 - if [ -n "${AMANDA_PORTS_UDP}" ]; then
757 - einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
758 - myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
759 - fi
760 - if [ -n "${AMANDA_PORTS_TCP}" ]; then
761 - einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
762 - myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
763 - fi
764 - if [ -n "${AMANDA_PORTS}" ]; then
765 - einfo "Using ports ${AMANDA_PORTS/,/-}"
766 - myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
767 - fi
768 -
769 - # Extras
770 - # Speed option
771 - myconf="${myconf} --with-buffered-dump"
772 - # "debugging" in the configuration is NOT debug in the conventional sense.
773 - # It is actually just useful output in the application, and should remain
774 - # enabled. There are some cases of breakage with MTX tape changers as of
775 - # 2.5.1p2 that it exposes when turned off as well.
776 - myconf="${myconf} --with-debugging"
777 - # Where to put our files
778 - myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
779 -
780 - # Samba support
781 - myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
782 -
783 - # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
784 - # default
785 - myconf="${myconf} --with-bsd-security"
786 - myconf="${myconf} --with-ssh-security"
787 - myconf="${myconf} --with-bsdudp-security"
788 - myconf="${myconf} --with-bsdtcp-security"
789 -
790 - # kerberos-security mechanism version 5
791 - myconf="${myconf} $(use_with kerberos krb5-security)"
792 -
793 - # Amazon S3 support
794 - myconf="${myconf} `use_enable s3 s3-device`"
795 -
796 - # libcurl is required for S3 but otherwise optional
797 - if ! use s3; then
798 - myconf="${myconf} $(use_with curl libcurl)"
799 - fi
800 -
801 - # Client only, as requested in bug #127725
802 - if use minimal ; then
803 - myconf="${myconf} --without-server"
804 - else
805 - # amplot
806 - myconf="${myconf} $(use_with gnuplot)"
807 - fi
808 -
809 - # IPv6 fun.
810 - myconf="${myconf} `use_with ipv6`"
811 - # This is to prevent the IPv6-is-working test
812 - # As the test fails on binpkg build hosts with no IPv6.
813 - use ipv6 && export amanda_cv_working_ipv6=yes
814 -
815 - # I18N
816 - myconf="${myconf} `use_enable nls`"
817 -
818 - # Bug #296634: Perl location
819 - perl_set_version
820 - myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
821 -
822 - # Bug 296633: --disable-syntax-checks
823 - # Some tests are not safe for production systems
824 - myconf="${myconf} --disable-syntax-checks"
825 -
826 - # build manpages
827 - myconf="${myconf} --enable-manpage-build"
828 -
829 - # bug #483120
830 - tc-export AR
831 -
832 - econf \
833 - $(use_with readline) \
834 - ${myconf}
835 -}
836 -
837 -src_compile() {
838 - # Again, do not want the perl-module src_compile
839 - default_src_compile
840 -}
841 -
842 -src_install() {
843 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
844 - source ${TMPENVFILE}
845 -
846 - einfo "Doing stock install"
847 - emake DESTDIR="${D}" install
848 -
849 - # Build the envdir file
850 - # Don't forget this..
851 - einfo "Building environment file"
852 - (
853 - echo "# These settings are what was present in the environment when this"
854 - echo "# Amanda was compiled. Changing anything below this comment will"
855 - echo "# have no effect on your application, but it merely exists to"
856 - echo "# preserve them for your next emerge of Amanda"
857 - cat "${TMPENVFILE}" | sed "s,=\$,='',g"
858 - ) >> "${MYFILESDIR}/${ENVDFILE}"
859 -
860 - # Env.d
861 - einfo "Installing environment config file"
862 - doenvd "${MYFILESDIR}/${ENVDFILE}"
863 -
864 - # Lock down next section (up until docs).
865 - insopts -m0640
866 - # Installing Amanda Xinetd Services Definition
867 - einfo "Installing xinetd service file"
868 - insinto /etc/xinetd.d
869 - if use minimal ; then
870 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
871 - else
872 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
873 - fi
874 -
875 - if ! use minimal; then
876 - einfo "Installing Sample Daily Cron Job for Amanda"
877 - insinto /etc/cron.daily
878 - newins "${MYFILESDIR}/amanda-cron" amanda
879 - fi
880 -
881 - einfo "Installing systemd service and socket files for Amanda"
882 - systemd_dounit "${FILESDIR}"/amanda.socket || die
883 - systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
884 -
885 - insinto /etc/amanda
886 - einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
887 - doins "${T}/amandahosts"
888 - fperms 600 /etc/amanda/amandahosts
889 -
890 - dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
891 - insinto "${AMANDA_USER_HOMEDIR}"
892 - einfo "Installing .profile for ${AMANDA_USER_NAME} user"
893 - newins "${MYFILESDIR}/amanda-profile" .profile
894 -
895 - insinto /etc/amanda
896 - doins "${S}/example/amanda-client.conf"
897 - if ! use minimal ; then
898 - insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
899 - doins "${S}/example/amanda.conf"
900 - doins "${S}/example/disklist"
901 - keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
902 - fi
903 -
904 - keepdir "${AMANDA_TAR_LISTDIR}"
905 - keepdir "${AMANDA_USER_HOMEDIR}/amanda"
906 - keepdir "${AMANDA_TMPDIR}/dumps"
907 - # Just make sure it exists for XFS to work...
908 - use xfs && keepdir /var/xfsdump/inventory
909 -
910 - local i
911 - for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
912 - "${AMANDA_TMPDIR}" /etc/amanda; do
913 - einfo "Securing directory (${i})"
914 - fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
915 - done
916 - # Do NOT use -R
917 - fperms 0700 \
918 - "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
919 - "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
920 - "${AMANDA_USER_HOMEDIR}/amanda" \
921 - /etc/amanda
922 -
923 - if ! use minimal ; then
924 - fperms 0700 \
925 - "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
926 - /etc/amanda/${AMANDA_CONFIG_NAME}
927 - fi
928 -
929 - einfo "Setting setuid permissions"
930 - amanda_permissions_fix "${D}"
931 -
932 - # Relax permissions again
933 - insopts -m0644
934 -
935 - # docs
936 - einfo "Installing documentation"
937 - dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
938 - # our inetd sample
939 - einfo "Installing standard inetd sample"
940 - newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
941 - # Amanda example configs
942 - einfo "Installing example configurations"
943 - rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
944 - mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
945 - docinto example1
946 - newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
947 - newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
948 - newdoc "${FILESDIR}/example_global.conf" global.conf
949 -
950 - einfo "Cleaning up dud .la files"
951 - perl_set_version
952 - find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
953 -}
954 -
955 -pkg_postinst() {
956 - [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
957 - TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
958 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
959 - source "${TMPENVFILE}"
960 -
961 - # Migration of amandates from /etc to $localstatedir/amanda
962 - if [ -f "${ROOT}/etc/amandates" -a \
963 - ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
964 - einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
965 - einfo "A backup is also placed at /etc/amandates.orig"
966 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
967 - mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
968 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
969 - fi
970 - if [ -f "${ROOT}/etc/amandates" ]; then
971 - einfo "If you have migrated safely, please delete /etc/amandates"
972 - fi
973 -
974 - einfo "Checking setuid permissions"
975 - amanda_permissions_fix "${ROOT}"
976 -
977 - elog "You should configure Amanda in /etc/amanda now."
978 - elog
979 - elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
980 - elog "and restart xinetd afterwards!"
981 - elog
982 - elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
983 - elog "as an example of how to configure your inetd."
984 - elog
985 - elog "systemd-users: enable and start amanda.socket or the relevant services"
986 - elog "regarding what auth method you use."
987 - elog
988 - elog "NOTICE: If you need raw access to partitions you need to add the"
989 - elog "amanda user to the 'disk' group."
990 - elog
991 - elog "NOTICE: If you have a tape changer, you need to add the amanda user"
992 - elog "to the 'tape' group."
993 - elog
994 - elog "If you use localhost in your disklist your restores may break."
995 - elog "You should replace it with the actual hostname!"
996 - elog "Please also see the syntax changes to amandahosts."
997 - elog "The only exception is when you use the authentication method 'local'."
998 - elog
999 - elog "Please note that this package no longer explicitly depends on"
1000 - elog "virtual/inetd, as it supports modes where an inetd is not needed"
1001 - elog "(see bug #506028 for details)."
1002 -}
1003 -
1004 -# We have had reports of amanda file permissions getting screwed up.
1005 -# Losing setuid, becoming too lax etc.
1006 -# ONLY root and users in the amanda group should be able to run these binaries!
1007 -amanda_permissions_fix() {
1008 - local root="$1"
1009 - [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
1010 - local le="/usr/libexec/amanda"
1011 - for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
1012 - "${le}"/rundump "${le}"/runtar "${le}"/dumper \
1013 - "${le}"/planner ; do
1014 - chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
1015 - chmod u=srwx,g=rx,o= "${root}"/${i}
1016 - done
1017 -}
1018 -
1019 -# We do not want the perl-module tests.
1020 -src_test() {
1021 - default_src_test
1022 -}
1023
1024 diff --git a/app-backup/amanda/amanda-3.4.3.ebuild b/app-backup/amanda/amanda-3.4.3.ebuild
1025 deleted file mode 100644
1026 index a6f09df6878..00000000000
1027 --- a/app-backup/amanda/amanda-3.4.3.ebuild
1028 +++ /dev/null
1029 @@ -1,484 +0,0 @@
1030 -# Copyright 1999-2020 Gentoo Authors
1031 -# Distributed under the terms of the GNU General Public License v2
1032 -
1033 -EAPI=6
1034 -inherit autotools perl-module user systemd toolchain-funcs
1035 -
1036 -DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
1037 -HOMEPAGE="http://www.amanda.org/"
1038 -SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
1039 -
1040 -LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
1041 -SLOT="0"
1042 -IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
1043 -
1044 -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
1045 -RDEPEND="sys-libs/readline:=
1046 - virtual/awk
1047 - app-arch/tar
1048 - dev-lang/perl:=
1049 - app-arch/dump
1050 - net-misc/openssh
1051 - >=dev-libs/glib-2.26.0
1052 - dev-perl/JSON
1053 - dev-perl/Encode-Locale
1054 - nls? ( virtual/libintl )
1055 - s3? ( >=net-misc/curl-7.10.0 )
1056 - !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
1057 - samba? ( net-fs/samba:= )
1058 - kerberos? ( app-crypt/mit-krb5 )
1059 - xfs? ( sys-fs/xfsdump )
1060 - !minimal? (
1061 - dev-perl/XML-Simple
1062 - virtual/mailx
1063 - app-arch/mt-st:=
1064 - sys-block/mtx
1065 - gnuplot? ( sci-visualization/gnuplot )
1066 - app-crypt/aespipe
1067 - app-crypt/gnupg
1068 - )"
1069 -
1070 -DEPEND="${RDEPEND}
1071 - virtual/pkgconfig
1072 - nls? ( sys-devel/gettext )
1073 - >=app-text/docbook-xsl-stylesheets-1.72.0
1074 - app-text/docbook-xml-dtd
1075 - dev-libs/libxslt
1076 - dev-lang/swig
1077 - "
1078 -
1079 -MYFILESDIR="${T}/files"
1080 -ENVDIR="/etc/env.d"
1081 -ENVDFILE="97amanda"
1082 -TMPENVFILE="${T}/${ENVDFILE}"
1083 -
1084 -# This is a complete list of Amanda settings that the ebuild takes from the
1085 -# build environment. This allows users to alter the behavior of the package as
1086 -# upstream intended, but keeping with Gentoo style. We store a copy of them in
1087 -# /etc/env.d/97amanda during the install, so that they are preserved for future
1088 -# installed. This variable name must not start with AMANDA_, as we do not want
1089 -# it captured into the env file.
1090 -ENV_SETTINGS_AMANDA="
1091 -AMANDA_GROUP_GID AMANDA_GROUP_NAME
1092 -AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
1093 -AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
1094 -AMANDA_TAR_LISTDIR AMANDA_TAR
1095 -AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
1096 -AMANDA_CONFIG_NAME AMANDA_TMPDIR"
1097 -
1098 -amanda_variable_setup() {
1099 -
1100 - # Setting vars
1101 - local currentamanda
1102 -
1103 - # Grab the current settings
1104 - currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
1105 -
1106 - # First we set the defaults
1107 - [[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
1108 - [[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
1109 - [[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
1110 - [[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
1111 - [[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
1112 - [[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
1113 - [[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
1114 -
1115 - # This installs Amanda, with the server. However, it could be a client,
1116 - # just specify an alternate server name in AMANDA_SERVER.
1117 - [[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
1118 - [[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
1119 - [[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
1120 - [[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
1121 - [[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
1122 - [[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
1123 - [[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
1124 - [[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
1125 - # These are left empty by default
1126 - [[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
1127 - [[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
1128 - [[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
1129 - [[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
1130 -
1131 - # What tar to use
1132 - [[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
1133 -
1134 - # Now pull in the old stuff
1135 - if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
1136 - # We don't just source it as we don't want everything in there.
1137 - eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
1138 - fi
1139 -
1140 - # Re-apply the new settings if any
1141 - [ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
1142 -
1143 -}
1144 -
1145 -pkg_setup() {
1146 - amanda_variable_setup
1147 -
1148 - # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
1149 - # another host than HOSTNAME.
1150 - if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
1151 - elog "You are installing a client-only version of Amanda."
1152 - elog "You should set the variable \$AMANDA_SERVER to point at your"
1153 - elog "Amanda-tape-server, otherwise you will have to specify its name"
1154 - elog "when using amrecover on the client."
1155 - elog "For example: Use something like"
1156 - elog "AMANDA_SERVER=\"myserver\" emerge amanda"
1157 - elog
1158 - fi
1159 -
1160 - enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
1161 - enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
1162 -}
1163 -
1164 -src_unpack() {
1165 - # we do not want the perl src_unpack
1166 - default_src_unpack
1167 -}
1168 -
1169 -src_prepare() {
1170 - # gentoo bug #331111
1171 - sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
1172 - sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
1173 -
1174 - # bug with glibc-2.16.0
1175 - sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
1176 -
1177 - eautoreconf
1178 -
1179 - # places for us to work in
1180 - mkdir -p "${MYFILESDIR}" || die
1181 - # Now we store the settings we just created
1182 - set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
1183 -
1184 - # Prepare our custom files
1185 - einfo "Building custom configuration files"
1186 - local i # our iterator
1187 - local sedexpr # var for sed expr
1188 - sedexpr=''
1189 - for i in ${ENV_SETTINGS_AMANDA} ; do
1190 - local val
1191 - eval "val=\"\${${i}}\""
1192 - sedexpr="${sedexpr}s|__${i}__|${val}|g;"
1193 - done
1194 -
1195 - # now apply the sed expr
1196 - for i in "${FILESDIR}"/amanda-* ; do
1197 - sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
1198 - done
1199 -
1200 - if use minimal; then
1201 - cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 > "${T}"/amandahosts || die
1202 - else
1203 - sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
1204 - server-src/am{addclient,serverconfig}.pl || die
1205 - cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
1206 - fi
1207 -
1208 - eapply_user
1209 -}
1210 -
1211 -src_configure() {
1212 - # fix bug #36316
1213 - addpredict /var/cache/samba/gencache.tdb
1214 - # fix bug #376169
1215 - addpredict /run/blkid
1216 - addpredict /etc/blkid.tab
1217 -
1218 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1219 - source "${TMPENVFILE}"
1220 - local myconf
1221 -
1222 - einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
1223 - myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
1224 - einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
1225 - myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
1226 - einfo "Using ${AMANDA_SERVER_INDEX} for index server."
1227 - myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
1228 - einfo "Using ${AMANDA_USER_NAME} for amanda user."
1229 - myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
1230 - einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
1231 - myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
1232 - einfo "Using ${AMANDA_TAR} as Tar implementation."
1233 - myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
1234 - einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
1235 - myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
1236 - einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
1237 - myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
1238 - einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
1239 - myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
1240 -
1241 - if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
1242 - eerror "If you want _both_ UDP and TCP ports, please use only the"
1243 - eerror "AMANDA_PORTS environment variable for identical ports, or set"
1244 - eerror "AMANDA_PORTS_BOTH."
1245 - die "Bad port setup!"
1246 - fi
1247 - if [ -n "${AMANDA_PORTS_UDP}" ]; then
1248 - einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
1249 - myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
1250 - fi
1251 - if [ -n "${AMANDA_PORTS_TCP}" ]; then
1252 - einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
1253 - myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
1254 - fi
1255 - if [ -n "${AMANDA_PORTS}" ]; then
1256 - einfo "Using ports ${AMANDA_PORTS/,/-}"
1257 - myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
1258 - fi
1259 -
1260 - # Extras
1261 - # Speed option
1262 - myconf="${myconf} --with-buffered-dump"
1263 - # "debugging" in the configuration is NOT debug in the conventional sense.
1264 - # It is actually just useful output in the application, and should remain
1265 - # enabled. There are some cases of breakage with MTX tape changers as of
1266 - # 2.5.1p2 that it exposes when turned off as well.
1267 - myconf="${myconf} --with-debugging"
1268 - # Where to put our files
1269 - myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
1270 -
1271 - # Samba support
1272 - myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
1273 -
1274 - # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
1275 - # default
1276 - myconf="${myconf} --with-bsd-security"
1277 - myconf="${myconf} --with-ssh-security"
1278 - myconf="${myconf} --with-bsdudp-security"
1279 - myconf="${myconf} --with-bsdtcp-security"
1280 -
1281 - # kerberos-security mechanism version 5
1282 - myconf="${myconf} $(use_with kerberos krb5-security)"
1283 -
1284 - # Amazon S3 support
1285 - myconf="${myconf} `use_enable s3 s3-device`"
1286 -
1287 - # libcurl is required for S3 but otherwise optional
1288 - if ! use s3; then
1289 - myconf="${myconf} $(use_with curl libcurl)"
1290 - fi
1291 -
1292 - # Client only, as requested in bug #127725
1293 - if use minimal ; then
1294 - myconf="${myconf} --without-server"
1295 - else
1296 - # amplot
1297 - myconf="${myconf} $(use_with gnuplot)"
1298 - fi
1299 -
1300 - # IPv6 fun.
1301 - myconf="${myconf} `use_with ipv6`"
1302 - # This is to prevent the IPv6-is-working test
1303 - # As the test fails on binpkg build hosts with no IPv6.
1304 - use ipv6 && export amanda_cv_working_ipv6=yes
1305 -
1306 - # I18N
1307 - myconf="${myconf} `use_enable nls`"
1308 -
1309 - # Bug #296634: Perl location
1310 - perl_set_version
1311 - myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
1312 -
1313 - # Bug 296633: --disable-syntax-checks
1314 - # Some tests are not safe for production systems
1315 - myconf="${myconf} --disable-syntax-checks"
1316 -
1317 - # build manpages
1318 - myconf="${myconf} --enable-manpage-build"
1319 -
1320 - # bug #483120
1321 - tc-export AR
1322 -
1323 - econf \
1324 - $(use_with readline) \
1325 - ${myconf}
1326 -}
1327 -
1328 -src_compile() {
1329 - # Again, do not want the perl-module src_compile
1330 - default_src_compile
1331 -}
1332 -
1333 -src_install() {
1334 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1335 - source ${TMPENVFILE}
1336 -
1337 - einfo "Doing stock install"
1338 - emake DESTDIR="${D}" install
1339 -
1340 - # Build the envdir file
1341 - # Don't forget this..
1342 - einfo "Building environment file"
1343 - (
1344 - echo "# These settings are what was present in the environment when this"
1345 - echo "# Amanda was compiled. Changing anything below this comment will"
1346 - echo "# have no effect on your application, but it merely exists to"
1347 - echo "# preserve them for your next emerge of Amanda"
1348 - cat "${TMPENVFILE}" | sed "s,=\$,='',g"
1349 - ) >> "${MYFILESDIR}/${ENVDFILE}"
1350 -
1351 - # Env.d
1352 - einfo "Installing environment config file"
1353 - doenvd "${MYFILESDIR}/${ENVDFILE}"
1354 -
1355 - # Lock down next section (up until docs).
1356 - insopts -m0640
1357 - # Installing Amanda Xinetd Services Definition
1358 - einfo "Installing xinetd service file"
1359 - insinto /etc/xinetd.d
1360 - if use minimal ; then
1361 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
1362 - else
1363 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
1364 - fi
1365 -
1366 - if ! use minimal; then
1367 - einfo "Installing Sample Daily Cron Job for Amanda"
1368 - insinto /etc/cron.daily
1369 - newins "${MYFILESDIR}/amanda-cron" amanda
1370 - fi
1371 -
1372 - einfo "Installing systemd service and socket files for Amanda"
1373 - systemd_dounit "${FILESDIR}"/amanda.socket || die
1374 - systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
1375 -
1376 - insinto /etc/amanda
1377 - einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
1378 - doins "${T}/amandahosts"
1379 - fperms 600 /etc/amanda/amandahosts
1380 -
1381 - dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
1382 - insinto "${AMANDA_USER_HOMEDIR}"
1383 - einfo "Installing .profile for ${AMANDA_USER_NAME} user"
1384 - newins "${MYFILESDIR}/amanda-profile" .profile
1385 -
1386 - insinto /etc/amanda
1387 - doins "${S}/example/amanda-client.conf"
1388 - if ! use minimal ; then
1389 - insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
1390 - doins "${S}/example/amanda.conf"
1391 - doins "${S}/example/disklist"
1392 - keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
1393 - fi
1394 -
1395 - keepdir "${AMANDA_TAR_LISTDIR}"
1396 - keepdir "${AMANDA_USER_HOMEDIR}/amanda"
1397 - keepdir "${AMANDA_TMPDIR}/dumps"
1398 - # Just make sure it exists for XFS to work...
1399 - use xfs && keepdir /var/xfsdump/inventory
1400 -
1401 - local i
1402 - for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
1403 - "${AMANDA_TMPDIR}" /etc/amanda; do
1404 - einfo "Securing directory (${i})"
1405 - fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
1406 - done
1407 - # Do NOT use -R
1408 - fperms 0700 \
1409 - "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
1410 - "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
1411 - "${AMANDA_USER_HOMEDIR}/amanda" \
1412 - /etc/amanda
1413 -
1414 - if ! use minimal ; then
1415 - fperms 0700 \
1416 - "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
1417 - /etc/amanda/${AMANDA_CONFIG_NAME}
1418 - fi
1419 -
1420 - einfo "Setting setuid permissions"
1421 - amanda_permissions_fix "${D}"
1422 -
1423 - # Relax permissions again
1424 - insopts -m0644
1425 -
1426 - # docs
1427 - einfo "Installing documentation"
1428 - dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
1429 - # our inetd sample
1430 - einfo "Installing standard inetd sample"
1431 - newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
1432 - # Amanda example configs
1433 - einfo "Installing example configurations"
1434 - rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
1435 - mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
1436 - docinto example1
1437 - newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
1438 - newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
1439 - newdoc "${FILESDIR}/example_global.conf" global.conf
1440 -
1441 - einfo "Cleaning up dud .la files"
1442 - perl_set_version
1443 - find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
1444 -}
1445 -
1446 -pkg_postinst() {
1447 - [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
1448 - TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
1449 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1450 - source "${TMPENVFILE}"
1451 -
1452 - # Migration of amandates from /etc to $localstatedir/amanda
1453 - if [ -f "${ROOT}/etc/amandates" -a \
1454 - ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
1455 - einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
1456 - einfo "A backup is also placed at /etc/amandates.orig"
1457 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
1458 - mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
1459 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
1460 - fi
1461 - if [ -f "${ROOT}/etc/amandates" ]; then
1462 - einfo "If you have migrated safely, please delete /etc/amandates"
1463 - fi
1464 -
1465 - einfo "Checking setuid permissions"
1466 - amanda_permissions_fix "${ROOT}"
1467 -
1468 - elog "You should configure Amanda in /etc/amanda now."
1469 - elog
1470 - elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
1471 - elog "and restart xinetd afterwards!"
1472 - elog
1473 - elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
1474 - elog "as an example of how to configure your inetd."
1475 - elog
1476 - elog "systemd-users: enable and start amanda.socket or the relevant services"
1477 - elog "regarding what auth method you use."
1478 - elog
1479 - elog "NOTICE: If you need raw access to partitions you need to add the"
1480 - elog "amanda user to the 'disk' group."
1481 - elog
1482 - elog "NOTICE: If you have a tape changer, you need to add the amanda user"
1483 - elog "to the 'tape' group."
1484 - elog
1485 - elog "If you use localhost in your disklist your restores may break."
1486 - elog "You should replace it with the actual hostname!"
1487 - elog "Please also see the syntax changes to amandahosts."
1488 - elog "The only exception is when you use the authentication method 'local'."
1489 - elog
1490 - elog "Please note that this package no longer explicitly depends on"
1491 - elog "virtual/inetd, as it supports modes where an inetd is not needed"
1492 - elog "(see bug #506028 for details)."
1493 -}
1494 -
1495 -# We have had reports of amanda file permissions getting screwed up.
1496 -# Losing setuid, becoming too lax etc.
1497 -# ONLY root and users in the amanda group should be able to run these binaries!
1498 -amanda_permissions_fix() {
1499 - local root="$1"
1500 - [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
1501 - local le="/usr/libexec/amanda"
1502 - for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
1503 - "${le}"/rundump "${le}"/runtar "${le}"/dumper \
1504 - "${le}"/planner ; do
1505 - chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
1506 - chmod u=srwx,g=rx,o= "${root}"/${i}
1507 - done
1508 -}
1509 -
1510 -# We do not want the perl-module tests.
1511 -src_test() {
1512 - default_src_test
1513 -}
1514
1515 diff --git a/app-backup/amanda/amanda-3.4.4.ebuild b/app-backup/amanda/amanda-3.4.4.ebuild
1516 deleted file mode 100644
1517 index a6f09df6878..00000000000
1518 --- a/app-backup/amanda/amanda-3.4.4.ebuild
1519 +++ /dev/null
1520 @@ -1,484 +0,0 @@
1521 -# Copyright 1999-2020 Gentoo Authors
1522 -# Distributed under the terms of the GNU General Public License v2
1523 -
1524 -EAPI=6
1525 -inherit autotools perl-module user systemd toolchain-funcs
1526 -
1527 -DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
1528 -HOMEPAGE="http://www.amanda.org/"
1529 -SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
1530 -
1531 -LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
1532 -SLOT="0"
1533 -IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
1534 -
1535 -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
1536 -RDEPEND="sys-libs/readline:=
1537 - virtual/awk
1538 - app-arch/tar
1539 - dev-lang/perl:=
1540 - app-arch/dump
1541 - net-misc/openssh
1542 - >=dev-libs/glib-2.26.0
1543 - dev-perl/JSON
1544 - dev-perl/Encode-Locale
1545 - nls? ( virtual/libintl )
1546 - s3? ( >=net-misc/curl-7.10.0 )
1547 - !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
1548 - samba? ( net-fs/samba:= )
1549 - kerberos? ( app-crypt/mit-krb5 )
1550 - xfs? ( sys-fs/xfsdump )
1551 - !minimal? (
1552 - dev-perl/XML-Simple
1553 - virtual/mailx
1554 - app-arch/mt-st:=
1555 - sys-block/mtx
1556 - gnuplot? ( sci-visualization/gnuplot )
1557 - app-crypt/aespipe
1558 - app-crypt/gnupg
1559 - )"
1560 -
1561 -DEPEND="${RDEPEND}
1562 - virtual/pkgconfig
1563 - nls? ( sys-devel/gettext )
1564 - >=app-text/docbook-xsl-stylesheets-1.72.0
1565 - app-text/docbook-xml-dtd
1566 - dev-libs/libxslt
1567 - dev-lang/swig
1568 - "
1569 -
1570 -MYFILESDIR="${T}/files"
1571 -ENVDIR="/etc/env.d"
1572 -ENVDFILE="97amanda"
1573 -TMPENVFILE="${T}/${ENVDFILE}"
1574 -
1575 -# This is a complete list of Amanda settings that the ebuild takes from the
1576 -# build environment. This allows users to alter the behavior of the package as
1577 -# upstream intended, but keeping with Gentoo style. We store a copy of them in
1578 -# /etc/env.d/97amanda during the install, so that they are preserved for future
1579 -# installed. This variable name must not start with AMANDA_, as we do not want
1580 -# it captured into the env file.
1581 -ENV_SETTINGS_AMANDA="
1582 -AMANDA_GROUP_GID AMANDA_GROUP_NAME
1583 -AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
1584 -AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
1585 -AMANDA_TAR_LISTDIR AMANDA_TAR
1586 -AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
1587 -AMANDA_CONFIG_NAME AMANDA_TMPDIR"
1588 -
1589 -amanda_variable_setup() {
1590 -
1591 - # Setting vars
1592 - local currentamanda
1593 -
1594 - # Grab the current settings
1595 - currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
1596 -
1597 - # First we set the defaults
1598 - [[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
1599 - [[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
1600 - [[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
1601 - [[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
1602 - [[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
1603 - [[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
1604 - [[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
1605 -
1606 - # This installs Amanda, with the server. However, it could be a client,
1607 - # just specify an alternate server name in AMANDA_SERVER.
1608 - [[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
1609 - [[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
1610 - [[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
1611 - [[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
1612 - [[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
1613 - [[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
1614 - [[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
1615 - [[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
1616 - # These are left empty by default
1617 - [[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
1618 - [[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
1619 - [[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
1620 - [[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
1621 -
1622 - # What tar to use
1623 - [[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
1624 -
1625 - # Now pull in the old stuff
1626 - if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
1627 - # We don't just source it as we don't want everything in there.
1628 - eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
1629 - fi
1630 -
1631 - # Re-apply the new settings if any
1632 - [ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
1633 -
1634 -}
1635 -
1636 -pkg_setup() {
1637 - amanda_variable_setup
1638 -
1639 - # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
1640 - # another host than HOSTNAME.
1641 - if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
1642 - elog "You are installing a client-only version of Amanda."
1643 - elog "You should set the variable \$AMANDA_SERVER to point at your"
1644 - elog "Amanda-tape-server, otherwise you will have to specify its name"
1645 - elog "when using amrecover on the client."
1646 - elog "For example: Use something like"
1647 - elog "AMANDA_SERVER=\"myserver\" emerge amanda"
1648 - elog
1649 - fi
1650 -
1651 - enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
1652 - enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
1653 -}
1654 -
1655 -src_unpack() {
1656 - # we do not want the perl src_unpack
1657 - default_src_unpack
1658 -}
1659 -
1660 -src_prepare() {
1661 - # gentoo bug #331111
1662 - sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
1663 - sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
1664 -
1665 - # bug with glibc-2.16.0
1666 - sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
1667 -
1668 - eautoreconf
1669 -
1670 - # places for us to work in
1671 - mkdir -p "${MYFILESDIR}" || die
1672 - # Now we store the settings we just created
1673 - set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
1674 -
1675 - # Prepare our custom files
1676 - einfo "Building custom configuration files"
1677 - local i # our iterator
1678 - local sedexpr # var for sed expr
1679 - sedexpr=''
1680 - for i in ${ENV_SETTINGS_AMANDA} ; do
1681 - local val
1682 - eval "val=\"\${${i}}\""
1683 - sedexpr="${sedexpr}s|__${i}__|${val}|g;"
1684 - done
1685 -
1686 - # now apply the sed expr
1687 - for i in "${FILESDIR}"/amanda-* ; do
1688 - sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
1689 - done
1690 -
1691 - if use minimal; then
1692 - cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 > "${T}"/amandahosts || die
1693 - else
1694 - sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
1695 - server-src/am{addclient,serverconfig}.pl || die
1696 - cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
1697 - fi
1698 -
1699 - eapply_user
1700 -}
1701 -
1702 -src_configure() {
1703 - # fix bug #36316
1704 - addpredict /var/cache/samba/gencache.tdb
1705 - # fix bug #376169
1706 - addpredict /run/blkid
1707 - addpredict /etc/blkid.tab
1708 -
1709 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1710 - source "${TMPENVFILE}"
1711 - local myconf
1712 -
1713 - einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
1714 - myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
1715 - einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
1716 - myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
1717 - einfo "Using ${AMANDA_SERVER_INDEX} for index server."
1718 - myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
1719 - einfo "Using ${AMANDA_USER_NAME} for amanda user."
1720 - myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
1721 - einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
1722 - myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
1723 - einfo "Using ${AMANDA_TAR} as Tar implementation."
1724 - myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
1725 - einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
1726 - myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
1727 - einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
1728 - myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
1729 - einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
1730 - myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
1731 -
1732 - if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
1733 - eerror "If you want _both_ UDP and TCP ports, please use only the"
1734 - eerror "AMANDA_PORTS environment variable for identical ports, or set"
1735 - eerror "AMANDA_PORTS_BOTH."
1736 - die "Bad port setup!"
1737 - fi
1738 - if [ -n "${AMANDA_PORTS_UDP}" ]; then
1739 - einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
1740 - myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
1741 - fi
1742 - if [ -n "${AMANDA_PORTS_TCP}" ]; then
1743 - einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
1744 - myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
1745 - fi
1746 - if [ -n "${AMANDA_PORTS}" ]; then
1747 - einfo "Using ports ${AMANDA_PORTS/,/-}"
1748 - myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
1749 - fi
1750 -
1751 - # Extras
1752 - # Speed option
1753 - myconf="${myconf} --with-buffered-dump"
1754 - # "debugging" in the configuration is NOT debug in the conventional sense.
1755 - # It is actually just useful output in the application, and should remain
1756 - # enabled. There are some cases of breakage with MTX tape changers as of
1757 - # 2.5.1p2 that it exposes when turned off as well.
1758 - myconf="${myconf} --with-debugging"
1759 - # Where to put our files
1760 - myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
1761 -
1762 - # Samba support
1763 - myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
1764 -
1765 - # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
1766 - # default
1767 - myconf="${myconf} --with-bsd-security"
1768 - myconf="${myconf} --with-ssh-security"
1769 - myconf="${myconf} --with-bsdudp-security"
1770 - myconf="${myconf} --with-bsdtcp-security"
1771 -
1772 - # kerberos-security mechanism version 5
1773 - myconf="${myconf} $(use_with kerberos krb5-security)"
1774 -
1775 - # Amazon S3 support
1776 - myconf="${myconf} `use_enable s3 s3-device`"
1777 -
1778 - # libcurl is required for S3 but otherwise optional
1779 - if ! use s3; then
1780 - myconf="${myconf} $(use_with curl libcurl)"
1781 - fi
1782 -
1783 - # Client only, as requested in bug #127725
1784 - if use minimal ; then
1785 - myconf="${myconf} --without-server"
1786 - else
1787 - # amplot
1788 - myconf="${myconf} $(use_with gnuplot)"
1789 - fi
1790 -
1791 - # IPv6 fun.
1792 - myconf="${myconf} `use_with ipv6`"
1793 - # This is to prevent the IPv6-is-working test
1794 - # As the test fails on binpkg build hosts with no IPv6.
1795 - use ipv6 && export amanda_cv_working_ipv6=yes
1796 -
1797 - # I18N
1798 - myconf="${myconf} `use_enable nls`"
1799 -
1800 - # Bug #296634: Perl location
1801 - perl_set_version
1802 - myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
1803 -
1804 - # Bug 296633: --disable-syntax-checks
1805 - # Some tests are not safe for production systems
1806 - myconf="${myconf} --disable-syntax-checks"
1807 -
1808 - # build manpages
1809 - myconf="${myconf} --enable-manpage-build"
1810 -
1811 - # bug #483120
1812 - tc-export AR
1813 -
1814 - econf \
1815 - $(use_with readline) \
1816 - ${myconf}
1817 -}
1818 -
1819 -src_compile() {
1820 - # Again, do not want the perl-module src_compile
1821 - default_src_compile
1822 -}
1823 -
1824 -src_install() {
1825 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1826 - source ${TMPENVFILE}
1827 -
1828 - einfo "Doing stock install"
1829 - emake DESTDIR="${D}" install
1830 -
1831 - # Build the envdir file
1832 - # Don't forget this..
1833 - einfo "Building environment file"
1834 - (
1835 - echo "# These settings are what was present in the environment when this"
1836 - echo "# Amanda was compiled. Changing anything below this comment will"
1837 - echo "# have no effect on your application, but it merely exists to"
1838 - echo "# preserve them for your next emerge of Amanda"
1839 - cat "${TMPENVFILE}" | sed "s,=\$,='',g"
1840 - ) >> "${MYFILESDIR}/${ENVDFILE}"
1841 -
1842 - # Env.d
1843 - einfo "Installing environment config file"
1844 - doenvd "${MYFILESDIR}/${ENVDFILE}"
1845 -
1846 - # Lock down next section (up until docs).
1847 - insopts -m0640
1848 - # Installing Amanda Xinetd Services Definition
1849 - einfo "Installing xinetd service file"
1850 - insinto /etc/xinetd.d
1851 - if use minimal ; then
1852 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
1853 - else
1854 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
1855 - fi
1856 -
1857 - if ! use minimal; then
1858 - einfo "Installing Sample Daily Cron Job for Amanda"
1859 - insinto /etc/cron.daily
1860 - newins "${MYFILESDIR}/amanda-cron" amanda
1861 - fi
1862 -
1863 - einfo "Installing systemd service and socket files for Amanda"
1864 - systemd_dounit "${FILESDIR}"/amanda.socket || die
1865 - systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
1866 -
1867 - insinto /etc/amanda
1868 - einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
1869 - doins "${T}/amandahosts"
1870 - fperms 600 /etc/amanda/amandahosts
1871 -
1872 - dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
1873 - insinto "${AMANDA_USER_HOMEDIR}"
1874 - einfo "Installing .profile for ${AMANDA_USER_NAME} user"
1875 - newins "${MYFILESDIR}/amanda-profile" .profile
1876 -
1877 - insinto /etc/amanda
1878 - doins "${S}/example/amanda-client.conf"
1879 - if ! use minimal ; then
1880 - insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
1881 - doins "${S}/example/amanda.conf"
1882 - doins "${S}/example/disklist"
1883 - keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
1884 - fi
1885 -
1886 - keepdir "${AMANDA_TAR_LISTDIR}"
1887 - keepdir "${AMANDA_USER_HOMEDIR}/amanda"
1888 - keepdir "${AMANDA_TMPDIR}/dumps"
1889 - # Just make sure it exists for XFS to work...
1890 - use xfs && keepdir /var/xfsdump/inventory
1891 -
1892 - local i
1893 - for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
1894 - "${AMANDA_TMPDIR}" /etc/amanda; do
1895 - einfo "Securing directory (${i})"
1896 - fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
1897 - done
1898 - # Do NOT use -R
1899 - fperms 0700 \
1900 - "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
1901 - "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
1902 - "${AMANDA_USER_HOMEDIR}/amanda" \
1903 - /etc/amanda
1904 -
1905 - if ! use minimal ; then
1906 - fperms 0700 \
1907 - "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
1908 - /etc/amanda/${AMANDA_CONFIG_NAME}
1909 - fi
1910 -
1911 - einfo "Setting setuid permissions"
1912 - amanda_permissions_fix "${D}"
1913 -
1914 - # Relax permissions again
1915 - insopts -m0644
1916 -
1917 - # docs
1918 - einfo "Installing documentation"
1919 - dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
1920 - # our inetd sample
1921 - einfo "Installing standard inetd sample"
1922 - newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
1923 - # Amanda example configs
1924 - einfo "Installing example configurations"
1925 - rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
1926 - mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
1927 - docinto example1
1928 - newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
1929 - newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
1930 - newdoc "${FILESDIR}/example_global.conf" global.conf
1931 -
1932 - einfo "Cleaning up dud .la files"
1933 - perl_set_version
1934 - find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
1935 -}
1936 -
1937 -pkg_postinst() {
1938 - [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
1939 - TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
1940 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1941 - source "${TMPENVFILE}"
1942 -
1943 - # Migration of amandates from /etc to $localstatedir/amanda
1944 - if [ -f "${ROOT}/etc/amandates" -a \
1945 - ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
1946 - einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
1947 - einfo "A backup is also placed at /etc/amandates.orig"
1948 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
1949 - mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
1950 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
1951 - fi
1952 - if [ -f "${ROOT}/etc/amandates" ]; then
1953 - einfo "If you have migrated safely, please delete /etc/amandates"
1954 - fi
1955 -
1956 - einfo "Checking setuid permissions"
1957 - amanda_permissions_fix "${ROOT}"
1958 -
1959 - elog "You should configure Amanda in /etc/amanda now."
1960 - elog
1961 - elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
1962 - elog "and restart xinetd afterwards!"
1963 - elog
1964 - elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
1965 - elog "as an example of how to configure your inetd."
1966 - elog
1967 - elog "systemd-users: enable and start amanda.socket or the relevant services"
1968 - elog "regarding what auth method you use."
1969 - elog
1970 - elog "NOTICE: If you need raw access to partitions you need to add the"
1971 - elog "amanda user to the 'disk' group."
1972 - elog
1973 - elog "NOTICE: If you have a tape changer, you need to add the amanda user"
1974 - elog "to the 'tape' group."
1975 - elog
1976 - elog "If you use localhost in your disklist your restores may break."
1977 - elog "You should replace it with the actual hostname!"
1978 - elog "Please also see the syntax changes to amandahosts."
1979 - elog "The only exception is when you use the authentication method 'local'."
1980 - elog
1981 - elog "Please note that this package no longer explicitly depends on"
1982 - elog "virtual/inetd, as it supports modes where an inetd is not needed"
1983 - elog "(see bug #506028 for details)."
1984 -}
1985 -
1986 -# We have had reports of amanda file permissions getting screwed up.
1987 -# Losing setuid, becoming too lax etc.
1988 -# ONLY root and users in the amanda group should be able to run these binaries!
1989 -amanda_permissions_fix() {
1990 - local root="$1"
1991 - [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
1992 - local le="/usr/libexec/amanda"
1993 - for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
1994 - "${le}"/rundump "${le}"/runtar "${le}"/dumper \
1995 - "${le}"/planner ; do
1996 - chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
1997 - chmod u=srwx,g=rx,o= "${root}"/${i}
1998 - done
1999 -}
2000 -
2001 -# We do not want the perl-module tests.
2002 -src_test() {
2003 - default_src_test
2004 -}
2005
2006 diff --git a/app-backup/amanda/amanda-3.4.5.ebuild b/app-backup/amanda/amanda-3.4.5.ebuild
2007 deleted file mode 100644
2008 index a6f09df6878..00000000000
2009 --- a/app-backup/amanda/amanda-3.4.5.ebuild
2010 +++ /dev/null
2011 @@ -1,484 +0,0 @@
2012 -# Copyright 1999-2020 Gentoo Authors
2013 -# Distributed under the terms of the GNU General Public License v2
2014 -
2015 -EAPI=6
2016 -inherit autotools perl-module user systemd toolchain-funcs
2017 -
2018 -DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
2019 -HOMEPAGE="http://www.amanda.org/"
2020 -SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
2021 -
2022 -LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
2023 -SLOT="0"
2024 -IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
2025 -
2026 -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
2027 -RDEPEND="sys-libs/readline:=
2028 - virtual/awk
2029 - app-arch/tar
2030 - dev-lang/perl:=
2031 - app-arch/dump
2032 - net-misc/openssh
2033 - >=dev-libs/glib-2.26.0
2034 - dev-perl/JSON
2035 - dev-perl/Encode-Locale
2036 - nls? ( virtual/libintl )
2037 - s3? ( >=net-misc/curl-7.10.0 )
2038 - !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
2039 - samba? ( net-fs/samba:= )
2040 - kerberos? ( app-crypt/mit-krb5 )
2041 - xfs? ( sys-fs/xfsdump )
2042 - !minimal? (
2043 - dev-perl/XML-Simple
2044 - virtual/mailx
2045 - app-arch/mt-st:=
2046 - sys-block/mtx
2047 - gnuplot? ( sci-visualization/gnuplot )
2048 - app-crypt/aespipe
2049 - app-crypt/gnupg
2050 - )"
2051 -
2052 -DEPEND="${RDEPEND}
2053 - virtual/pkgconfig
2054 - nls? ( sys-devel/gettext )
2055 - >=app-text/docbook-xsl-stylesheets-1.72.0
2056 - app-text/docbook-xml-dtd
2057 - dev-libs/libxslt
2058 - dev-lang/swig
2059 - "
2060 -
2061 -MYFILESDIR="${T}/files"
2062 -ENVDIR="/etc/env.d"
2063 -ENVDFILE="97amanda"
2064 -TMPENVFILE="${T}/${ENVDFILE}"
2065 -
2066 -# This is a complete list of Amanda settings that the ebuild takes from the
2067 -# build environment. This allows users to alter the behavior of the package as
2068 -# upstream intended, but keeping with Gentoo style. We store a copy of them in
2069 -# /etc/env.d/97amanda during the install, so that they are preserved for future
2070 -# installed. This variable name must not start with AMANDA_, as we do not want
2071 -# it captured into the env file.
2072 -ENV_SETTINGS_AMANDA="
2073 -AMANDA_GROUP_GID AMANDA_GROUP_NAME
2074 -AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
2075 -AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
2076 -AMANDA_TAR_LISTDIR AMANDA_TAR
2077 -AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
2078 -AMANDA_CONFIG_NAME AMANDA_TMPDIR"
2079 -
2080 -amanda_variable_setup() {
2081 -
2082 - # Setting vars
2083 - local currentamanda
2084 -
2085 - # Grab the current settings
2086 - currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
2087 -
2088 - # First we set the defaults
2089 - [[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
2090 - [[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
2091 - [[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
2092 - [[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
2093 - [[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
2094 - [[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
2095 - [[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
2096 -
2097 - # This installs Amanda, with the server. However, it could be a client,
2098 - # just specify an alternate server name in AMANDA_SERVER.
2099 - [[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
2100 - [[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
2101 - [[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
2102 - [[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
2103 - [[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
2104 - [[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
2105 - [[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
2106 - [[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
2107 - # These are left empty by default
2108 - [[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
2109 - [[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
2110 - [[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
2111 - [[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
2112 -
2113 - # What tar to use
2114 - [[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
2115 -
2116 - # Now pull in the old stuff
2117 - if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
2118 - # We don't just source it as we don't want everything in there.
2119 - eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
2120 - fi
2121 -
2122 - # Re-apply the new settings if any
2123 - [ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
2124 -
2125 -}
2126 -
2127 -pkg_setup() {
2128 - amanda_variable_setup
2129 -
2130 - # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
2131 - # another host than HOSTNAME.
2132 - if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
2133 - elog "You are installing a client-only version of Amanda."
2134 - elog "You should set the variable \$AMANDA_SERVER to point at your"
2135 - elog "Amanda-tape-server, otherwise you will have to specify its name"
2136 - elog "when using amrecover on the client."
2137 - elog "For example: Use something like"
2138 - elog "AMANDA_SERVER=\"myserver\" emerge amanda"
2139 - elog
2140 - fi
2141 -
2142 - enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
2143 - enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
2144 -}
2145 -
2146 -src_unpack() {
2147 - # we do not want the perl src_unpack
2148 - default_src_unpack
2149 -}
2150 -
2151 -src_prepare() {
2152 - # gentoo bug #331111
2153 - sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
2154 - sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
2155 -
2156 - # bug with glibc-2.16.0
2157 - sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
2158 -
2159 - eautoreconf
2160 -
2161 - # places for us to work in
2162 - mkdir -p "${MYFILESDIR}" || die
2163 - # Now we store the settings we just created
2164 - set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
2165 -
2166 - # Prepare our custom files
2167 - einfo "Building custom configuration files"
2168 - local i # our iterator
2169 - local sedexpr # var for sed expr
2170 - sedexpr=''
2171 - for i in ${ENV_SETTINGS_AMANDA} ; do
2172 - local val
2173 - eval "val=\"\${${i}}\""
2174 - sedexpr="${sedexpr}s|__${i}__|${val}|g;"
2175 - done
2176 -
2177 - # now apply the sed expr
2178 - for i in "${FILESDIR}"/amanda-* ; do
2179 - sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
2180 - done
2181 -
2182 - if use minimal; then
2183 - cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 > "${T}"/amandahosts || die
2184 - else
2185 - sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
2186 - server-src/am{addclient,serverconfig}.pl || die
2187 - cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
2188 - fi
2189 -
2190 - eapply_user
2191 -}
2192 -
2193 -src_configure() {
2194 - # fix bug #36316
2195 - addpredict /var/cache/samba/gencache.tdb
2196 - # fix bug #376169
2197 - addpredict /run/blkid
2198 - addpredict /etc/blkid.tab
2199 -
2200 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
2201 - source "${TMPENVFILE}"
2202 - local myconf
2203 -
2204 - einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
2205 - myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
2206 - einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
2207 - myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
2208 - einfo "Using ${AMANDA_SERVER_INDEX} for index server."
2209 - myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
2210 - einfo "Using ${AMANDA_USER_NAME} for amanda user."
2211 - myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
2212 - einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
2213 - myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
2214 - einfo "Using ${AMANDA_TAR} as Tar implementation."
2215 - myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
2216 - einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
2217 - myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
2218 - einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
2219 - myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
2220 - einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
2221 - myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
2222 -
2223 - if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
2224 - eerror "If you want _both_ UDP and TCP ports, please use only the"
2225 - eerror "AMANDA_PORTS environment variable for identical ports, or set"
2226 - eerror "AMANDA_PORTS_BOTH."
2227 - die "Bad port setup!"
2228 - fi
2229 - if [ -n "${AMANDA_PORTS_UDP}" ]; then
2230 - einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
2231 - myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
2232 - fi
2233 - if [ -n "${AMANDA_PORTS_TCP}" ]; then
2234 - einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
2235 - myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
2236 - fi
2237 - if [ -n "${AMANDA_PORTS}" ]; then
2238 - einfo "Using ports ${AMANDA_PORTS/,/-}"
2239 - myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
2240 - fi
2241 -
2242 - # Extras
2243 - # Speed option
2244 - myconf="${myconf} --with-buffered-dump"
2245 - # "debugging" in the configuration is NOT debug in the conventional sense.
2246 - # It is actually just useful output in the application, and should remain
2247 - # enabled. There are some cases of breakage with MTX tape changers as of
2248 - # 2.5.1p2 that it exposes when turned off as well.
2249 - myconf="${myconf} --with-debugging"
2250 - # Where to put our files
2251 - myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
2252 -
2253 - # Samba support
2254 - myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
2255 -
2256 - # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
2257 - # default
2258 - myconf="${myconf} --with-bsd-security"
2259 - myconf="${myconf} --with-ssh-security"
2260 - myconf="${myconf} --with-bsdudp-security"
2261 - myconf="${myconf} --with-bsdtcp-security"
2262 -
2263 - # kerberos-security mechanism version 5
2264 - myconf="${myconf} $(use_with kerberos krb5-security)"
2265 -
2266 - # Amazon S3 support
2267 - myconf="${myconf} `use_enable s3 s3-device`"
2268 -
2269 - # libcurl is required for S3 but otherwise optional
2270 - if ! use s3; then
2271 - myconf="${myconf} $(use_with curl libcurl)"
2272 - fi
2273 -
2274 - # Client only, as requested in bug #127725
2275 - if use minimal ; then
2276 - myconf="${myconf} --without-server"
2277 - else
2278 - # amplot
2279 - myconf="${myconf} $(use_with gnuplot)"
2280 - fi
2281 -
2282 - # IPv6 fun.
2283 - myconf="${myconf} `use_with ipv6`"
2284 - # This is to prevent the IPv6-is-working test
2285 - # As the test fails on binpkg build hosts with no IPv6.
2286 - use ipv6 && export amanda_cv_working_ipv6=yes
2287 -
2288 - # I18N
2289 - myconf="${myconf} `use_enable nls`"
2290 -
2291 - # Bug #296634: Perl location
2292 - perl_set_version
2293 - myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
2294 -
2295 - # Bug 296633: --disable-syntax-checks
2296 - # Some tests are not safe for production systems
2297 - myconf="${myconf} --disable-syntax-checks"
2298 -
2299 - # build manpages
2300 - myconf="${myconf} --enable-manpage-build"
2301 -
2302 - # bug #483120
2303 - tc-export AR
2304 -
2305 - econf \
2306 - $(use_with readline) \
2307 - ${myconf}
2308 -}
2309 -
2310 -src_compile() {
2311 - # Again, do not want the perl-module src_compile
2312 - default_src_compile
2313 -}
2314 -
2315 -src_install() {
2316 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
2317 - source ${TMPENVFILE}
2318 -
2319 - einfo "Doing stock install"
2320 - emake DESTDIR="${D}" install
2321 -
2322 - # Build the envdir file
2323 - # Don't forget this..
2324 - einfo "Building environment file"
2325 - (
2326 - echo "# These settings are what was present in the environment when this"
2327 - echo "# Amanda was compiled. Changing anything below this comment will"
2328 - echo "# have no effect on your application, but it merely exists to"
2329 - echo "# preserve them for your next emerge of Amanda"
2330 - cat "${TMPENVFILE}" | sed "s,=\$,='',g"
2331 - ) >> "${MYFILESDIR}/${ENVDFILE}"
2332 -
2333 - # Env.d
2334 - einfo "Installing environment config file"
2335 - doenvd "${MYFILESDIR}/${ENVDFILE}"
2336 -
2337 - # Lock down next section (up until docs).
2338 - insopts -m0640
2339 - # Installing Amanda Xinetd Services Definition
2340 - einfo "Installing xinetd service file"
2341 - insinto /etc/xinetd.d
2342 - if use minimal ; then
2343 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
2344 - else
2345 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
2346 - fi
2347 -
2348 - if ! use minimal; then
2349 - einfo "Installing Sample Daily Cron Job for Amanda"
2350 - insinto /etc/cron.daily
2351 - newins "${MYFILESDIR}/amanda-cron" amanda
2352 - fi
2353 -
2354 - einfo "Installing systemd service and socket files for Amanda"
2355 - systemd_dounit "${FILESDIR}"/amanda.socket || die
2356 - systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
2357 -
2358 - insinto /etc/amanda
2359 - einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
2360 - doins "${T}/amandahosts"
2361 - fperms 600 /etc/amanda/amandahosts
2362 -
2363 - dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
2364 - insinto "${AMANDA_USER_HOMEDIR}"
2365 - einfo "Installing .profile for ${AMANDA_USER_NAME} user"
2366 - newins "${MYFILESDIR}/amanda-profile" .profile
2367 -
2368 - insinto /etc/amanda
2369 - doins "${S}/example/amanda-client.conf"
2370 - if ! use minimal ; then
2371 - insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
2372 - doins "${S}/example/amanda.conf"
2373 - doins "${S}/example/disklist"
2374 - keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
2375 - fi
2376 -
2377 - keepdir "${AMANDA_TAR_LISTDIR}"
2378 - keepdir "${AMANDA_USER_HOMEDIR}/amanda"
2379 - keepdir "${AMANDA_TMPDIR}/dumps"
2380 - # Just make sure it exists for XFS to work...
2381 - use xfs && keepdir /var/xfsdump/inventory
2382 -
2383 - local i
2384 - for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
2385 - "${AMANDA_TMPDIR}" /etc/amanda; do
2386 - einfo "Securing directory (${i})"
2387 - fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
2388 - done
2389 - # Do NOT use -R
2390 - fperms 0700 \
2391 - "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
2392 - "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
2393 - "${AMANDA_USER_HOMEDIR}/amanda" \
2394 - /etc/amanda
2395 -
2396 - if ! use minimal ; then
2397 - fperms 0700 \
2398 - "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
2399 - /etc/amanda/${AMANDA_CONFIG_NAME}
2400 - fi
2401 -
2402 - einfo "Setting setuid permissions"
2403 - amanda_permissions_fix "${D}"
2404 -
2405 - # Relax permissions again
2406 - insopts -m0644
2407 -
2408 - # docs
2409 - einfo "Installing documentation"
2410 - dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
2411 - # our inetd sample
2412 - einfo "Installing standard inetd sample"
2413 - newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
2414 - # Amanda example configs
2415 - einfo "Installing example configurations"
2416 - rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
2417 - mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
2418 - docinto example1
2419 - newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
2420 - newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
2421 - newdoc "${FILESDIR}/example_global.conf" global.conf
2422 -
2423 - einfo "Cleaning up dud .la files"
2424 - perl_set_version
2425 - find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
2426 -}
2427 -
2428 -pkg_postinst() {
2429 - [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
2430 - TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
2431 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
2432 - source "${TMPENVFILE}"
2433 -
2434 - # Migration of amandates from /etc to $localstatedir/amanda
2435 - if [ -f "${ROOT}/etc/amandates" -a \
2436 - ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
2437 - einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
2438 - einfo "A backup is also placed at /etc/amandates.orig"
2439 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
2440 - mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
2441 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
2442 - fi
2443 - if [ -f "${ROOT}/etc/amandates" ]; then
2444 - einfo "If you have migrated safely, please delete /etc/amandates"
2445 - fi
2446 -
2447 - einfo "Checking setuid permissions"
2448 - amanda_permissions_fix "${ROOT}"
2449 -
2450 - elog "You should configure Amanda in /etc/amanda now."
2451 - elog
2452 - elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
2453 - elog "and restart xinetd afterwards!"
2454 - elog
2455 - elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
2456 - elog "as an example of how to configure your inetd."
2457 - elog
2458 - elog "systemd-users: enable and start amanda.socket or the relevant services"
2459 - elog "regarding what auth method you use."
2460 - elog
2461 - elog "NOTICE: If you need raw access to partitions you need to add the"
2462 - elog "amanda user to the 'disk' group."
2463 - elog
2464 - elog "NOTICE: If you have a tape changer, you need to add the amanda user"
2465 - elog "to the 'tape' group."
2466 - elog
2467 - elog "If you use localhost in your disklist your restores may break."
2468 - elog "You should replace it with the actual hostname!"
2469 - elog "Please also see the syntax changes to amandahosts."
2470 - elog "The only exception is when you use the authentication method 'local'."
2471 - elog
2472 - elog "Please note that this package no longer explicitly depends on"
2473 - elog "virtual/inetd, as it supports modes where an inetd is not needed"
2474 - elog "(see bug #506028 for details)."
2475 -}
2476 -
2477 -# We have had reports of amanda file permissions getting screwed up.
2478 -# Losing setuid, becoming too lax etc.
2479 -# ONLY root and users in the amanda group should be able to run these binaries!
2480 -amanda_permissions_fix() {
2481 - local root="$1"
2482 - [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
2483 - local le="/usr/libexec/amanda"
2484 - for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
2485 - "${le}"/rundump "${le}"/runtar "${le}"/dumper \
2486 - "${le}"/planner ; do
2487 - chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
2488 - chmod u=srwx,g=rx,o= "${root}"/${i}
2489 - done
2490 -}
2491 -
2492 -# We do not want the perl-module tests.
2493 -src_test() {
2494 - default_src_test
2495 -}
2496
2497 diff --git a/app-backup/amanda/amanda-3.5-r1.ebuild b/app-backup/amanda/amanda-3.5-r1.ebuild
2498 deleted file mode 100644
2499 index 9d5d9a365d9..00000000000
2500 --- a/app-backup/amanda/amanda-3.5-r1.ebuild
2501 +++ /dev/null
2502 @@ -1,498 +0,0 @@
2503 -# Copyright 1999-2020 Gentoo Authors
2504 -# Distributed under the terms of the GNU General Public License v2
2505 -
2506 -EAPI=6
2507 -inherit autotools perl-module user systemd toolchain-funcs
2508 -
2509 -DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
2510 -HOMEPAGE="http://www.amanda.org/"
2511 -SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
2512 -
2513 -LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
2514 -SLOT="0"
2515 -IUSE="curl gnuplot ipv6 kerberos minimal ndmp nls readline s3 samba systemd xfs"
2516 -
2517 -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
2518 -RDEPEND="sys-libs/readline:=
2519 - virtual/awk
2520 - app-arch/tar
2521 - dev-lang/perl:=
2522 - app-arch/dump
2523 - net-misc/openssh
2524 - >=dev-libs/glib-2.26.0
2525 - dev-perl/JSON
2526 - dev-perl/Encode-Locale
2527 - nls? ( virtual/libintl )
2528 - s3? ( >=net-misc/curl-7.10.0 )
2529 - !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
2530 - samba? ( net-fs/samba:= )
2531 - kerberos? ( app-crypt/mit-krb5 )
2532 - xfs? ( sys-fs/xfsdump )
2533 - !minimal? (
2534 - dev-perl/XML-Simple
2535 - virtual/mailx
2536 - app-arch/mt-st:=
2537 - sys-block/mtx
2538 - gnuplot? ( sci-visualization/gnuplot )
2539 - app-crypt/aespipe
2540 - app-crypt/gnupg
2541 - )"
2542 -
2543 -DEPEND="${RDEPEND}
2544 - virtual/pkgconfig
2545 - nls? ( sys-devel/gettext )
2546 - >=app-text/docbook-xsl-stylesheets-1.72.0
2547 - app-text/docbook-xml-dtd
2548 - dev-libs/libxslt
2549 - dev-lang/swig
2550 - "
2551 -
2552 -MYFILESDIR="${T}/files"
2553 -ENVDIR="/etc/env.d"
2554 -ENVDFILE="97amanda"
2555 -TMPENVFILE="${T}/${ENVDFILE}"
2556 -
2557 -# This is a complete list of Amanda settings that the ebuild takes from the
2558 -# build environment. This allows users to alter the behavior of the package as
2559 -# upstream intended, but keeping with Gentoo style. We store a copy of them in
2560 -# /etc/env.d/97amanda during the install, so that they are preserved for future
2561 -# installed. This variable name must not start with AMANDA_, as we do not want
2562 -# it captured into the env file.
2563 -ENV_SETTINGS_AMANDA="
2564 -AMANDA_GROUP_GID AMANDA_GROUP_NAME
2565 -AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
2566 -AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
2567 -AMANDA_TAR_LISTDIR AMANDA_TAR
2568 -AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
2569 -AMANDA_CONFIG_NAME AMANDA_TMPDIR"
2570 -
2571 -amanda_variable_setup() {
2572 -
2573 - # Setting vars
2574 - local currentamanda
2575 -
2576 - # Grab the current settings
2577 - currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
2578 -
2579 - # First we set the defaults
2580 - [[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
2581 - [[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
2582 - [[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
2583 - [[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
2584 - [[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
2585 - [[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
2586 - [[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
2587 -
2588 - # This installs Amanda, with the server. However, it could be a client,
2589 - # just specify an alternate server name in AMANDA_SERVER.
2590 - [[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
2591 - [[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
2592 - [[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
2593 - [[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
2594 - [[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
2595 - [[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
2596 - [[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
2597 - [[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
2598 - # These are left empty by default
2599 - [[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
2600 - [[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
2601 - [[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
2602 - [[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
2603 -
2604 - # What tar to use
2605 - [[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
2606 -
2607 - # Now pull in the old stuff
2608 - if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
2609 - # We don't just source it as we don't want everything in there.
2610 - eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
2611 - fi
2612 -
2613 - # Re-apply the new settings if any
2614 - [ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
2615 -
2616 -}
2617 -
2618 -pkg_setup() {
2619 - amanda_variable_setup
2620 -
2621 - # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
2622 - # another host than HOSTNAME.
2623 - if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
2624 - elog "You are installing a client-only version of Amanda."
2625 - elog "You should set the variable \$AMANDA_SERVER to point at your"
2626 - elog "Amanda-tape-server, otherwise you will have to specify its name"
2627 - elog "when using amrecover on the client."
2628 - elog "For example: Use something like"
2629 - elog "AMANDA_SERVER=\"myserver\" emerge amanda"
2630 - elog
2631 - fi
2632 -
2633 - enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
2634 - enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
2635 -}
2636 -
2637 -src_unpack() {
2638 - # we do not want the perl src_unpack
2639 - default_src_unpack
2640 -}
2641 -
2642 -src_prepare() {
2643 - # gentoo bug #331111
2644 - sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
2645 - sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
2646 -
2647 - # bug with glibc-2.16.0
2648 - sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
2649 -
2650 - eautoreconf
2651 -
2652 - # places for us to work in
2653 - mkdir -p "${MYFILESDIR}" || die
2654 - # Now we store the settings we just created
2655 - set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
2656 -
2657 - # Prepare our custom files
2658 - einfo "Building custom configuration files"
2659 - local i # our iterator
2660 - local sedexpr # var for sed expr
2661 - sedexpr=''
2662 - for i in ${ENV_SETTINGS_AMANDA} ; do
2663 - local val
2664 - eval "val=\"\${${i}}\""
2665 - sedexpr="${sedexpr}s|__${i}__|${val}|g;"
2666 - done
2667 -
2668 - # now apply the sed expr
2669 - for i in "${FILESDIR}"/amanda-* ; do
2670 - sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
2671 - done
2672 -
2673 - if use minimal; then
2674 - cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 > "${T}"/amandahosts || die
2675 - else
2676 - sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
2677 - server-src/am{addclient,serverconfig}.pl || die
2678 - cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
2679 - fi
2680 -
2681 - eapply_user
2682 -}
2683 -
2684 -src_configure() {
2685 - # fix bug #36316
2686 - addpredict /var/cache/samba/gencache.tdb
2687 - # fix bug #376169
2688 - addpredict /run/blkid
2689 - addpredict /etc/blkid.tab
2690 -
2691 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
2692 - source "${TMPENVFILE}"
2693 - local myconf
2694 -
2695 - einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
2696 - myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
2697 - einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
2698 - myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
2699 - einfo "Using ${AMANDA_SERVER_INDEX} for index server."
2700 - myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
2701 - einfo "Using ${AMANDA_USER_NAME} for amanda user."
2702 - myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
2703 - einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
2704 - myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
2705 - einfo "Using ${AMANDA_TAR} as Tar implementation."
2706 - myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
2707 - einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
2708 - myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
2709 - einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
2710 - myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
2711 - einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
2712 - myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
2713 -
2714 - if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
2715 - eerror "If you want _both_ UDP and TCP ports, please use only the"
2716 - eerror "AMANDA_PORTS environment variable for identical ports, or set"
2717 - eerror "AMANDA_PORTS_BOTH."
2718 - die "Bad port setup!"
2719 - fi
2720 - if [ -n "${AMANDA_PORTS_UDP}" ]; then
2721 - einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
2722 - myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
2723 - fi
2724 - if [ -n "${AMANDA_PORTS_TCP}" ]; then
2725 - einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
2726 - myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
2727 - fi
2728 - if [ -n "${AMANDA_PORTS}" ]; then
2729 - einfo "Using ports ${AMANDA_PORTS/,/-}"
2730 - myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
2731 - fi
2732 -
2733 - # Extras
2734 - # Speed option
2735 - myconf="${myconf} --with-buffered-dump"
2736 - # "debugging" in the configuration is NOT debug in the conventional sense.
2737 - # It is actually just useful output in the application, and should remain
2738 - # enabled. There are some cases of breakage with MTX tape changers as of
2739 - # 2.5.1p2 that it exposes when turned off as well.
2740 - myconf="${myconf} --with-debugging"
2741 - # Where to put our files
2742 - myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
2743 -
2744 - # Samba support
2745 - myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
2746 -
2747 - # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
2748 - # default
2749 - myconf="${myconf} --with-bsd-security"
2750 - myconf="${myconf} --with-ssh-security"
2751 - myconf="${myconf} --with-bsdudp-security"
2752 - myconf="${myconf} --with-bsdtcp-security"
2753 -
2754 - # kerberos-security mechanism version 5
2755 - myconf="${myconf} $(use_with kerberos krb5-security)"
2756 -
2757 - # Amazon S3 support
2758 - myconf="${myconf} `use_enable s3 s3-device`"
2759 -
2760 - # libcurl is required for S3 but otherwise optional
2761 - if ! use s3; then
2762 - myconf="${myconf} $(use_with curl libcurl)"
2763 - fi
2764 -
2765 - # Client only, as requested in bug #127725
2766 - if use minimal ; then
2767 - myconf="${myconf} --without-server"
2768 - else
2769 - # amplot
2770 - myconf="${myconf} $(use_with gnuplot)"
2771 - fi
2772 -
2773 - # IPv6 fun.
2774 - myconf="${myconf} `use_with ipv6`"
2775 - # This is to prevent the IPv6-is-working test
2776 - # As the test fails on binpkg build hosts with no IPv6.
2777 - use ipv6 && export amanda_cv_working_ipv6=yes
2778 -
2779 - # I18N
2780 - myconf="${myconf} `use_enable nls`"
2781 -
2782 - # Bug #296634: Perl location
2783 - perl_set_version
2784 - myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
2785 -
2786 - # Bug 296633: --disable-syntax-checks
2787 - # Some tests are not safe for production systems
2788 - myconf="${myconf} --disable-syntax-checks"
2789 -
2790 - # build manpages
2791 - myconf="${myconf} --enable-manpage-build"
2792 -
2793 - # Bug #636262
2794 - myconf="${myconf} $(use_with ndmp ndmp)"
2795 -
2796 - # bug #483120
2797 - tc-export AR
2798 -
2799 - econf \
2800 - $(use_with readline) \
2801 - ${myconf}
2802 -}
2803 -
2804 -src_compile() {
2805 - # Again, do not want the perl-module src_compile
2806 - default_src_compile
2807 -}
2808 -
2809 -src_install() {
2810 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
2811 - source ${TMPENVFILE}
2812 -
2813 - einfo "Doing stock install"
2814 - emake DESTDIR="${D}" install
2815 -
2816 - # Build the envdir file
2817 - # Don't forget this..
2818 - einfo "Building environment file"
2819 - (
2820 - echo "# These settings are what was present in the environment when this"
2821 - echo "# Amanda was compiled. Changing anything below this comment will"
2822 - echo "# have no effect on your application, but it merely exists to"
2823 - echo "# preserve them for your next emerge of Amanda"
2824 - cat "${TMPENVFILE}" | sed "s,=\$,='',g"
2825 - ) >> "${MYFILESDIR}/${ENVDFILE}"
2826 -
2827 - # Env.d
2828 - einfo "Installing environment config file"
2829 - doenvd "${MYFILESDIR}/${ENVDFILE}"
2830 -
2831 - einfo "Installing systemd service and socket files for Amanda"
2832 - systemd_dounit "${FILESDIR}"/amanda.socket
2833 - systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service'
2834 -
2835 - # Lock down next section (up until docs).
2836 - insopts -m0640
2837 - # Installing Amanda Xinetd Services Definition
2838 - einfo "Installing xinetd service file"
2839 - insinto /etc/xinetd.d
2840 - if use minimal ; then
2841 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
2842 - else
2843 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
2844 - fi
2845 -
2846 - if ! use minimal; then
2847 - einfo "Installing Sample Daily Cron Job for Amanda"
2848 - insinto /etc/cron.daily
2849 - newins "${MYFILESDIR}/amanda-cron" amanda
2850 - fi
2851 -
2852 - insinto /etc/amanda
2853 - einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
2854 - doins "${T}/amandahosts"
2855 - fperms 600 /etc/amanda/amandahosts
2856 -
2857 - dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
2858 - insinto "${AMANDA_USER_HOMEDIR}"
2859 - einfo "Installing .profile for ${AMANDA_USER_NAME} user"
2860 - newins "${MYFILESDIR}/amanda-profile" .profile
2861 -
2862 - insinto /etc/amanda
2863 - doins "${S}/example/amanda-client.conf"
2864 - if ! use minimal ; then
2865 - insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
2866 - doins "${S}/example/amanda.conf"
2867 - doins "${S}/example/disklist"
2868 - keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
2869 - fi
2870 -
2871 - keepdir "${AMANDA_TAR_LISTDIR}"
2872 - keepdir "${AMANDA_USER_HOMEDIR}/amanda"
2873 - keepdir "${AMANDA_TMPDIR}/dumps"
2874 - # Just make sure it exists for XFS to work...
2875 - use xfs && keepdir /var/xfsdump/inventory
2876 -
2877 - local i
2878 - for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
2879 - "${AMANDA_TMPDIR}" /etc/amanda; do
2880 - einfo "Securing directory (${i})"
2881 - fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
2882 - done
2883 - # Do NOT use -R
2884 - fperms 0700 \
2885 - "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
2886 - "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
2887 - "${AMANDA_USER_HOMEDIR}/amanda" \
2888 - /etc/amanda
2889 -
2890 - if ! use minimal ; then
2891 - fperms 0700 \
2892 - "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
2893 - /etc/amanda/${AMANDA_CONFIG_NAME}
2894 - fi
2895 -
2896 - einfo "Setting setuid permissions"
2897 - amanda_permissions_fix "${D}"
2898 -
2899 - # Relax permissions again
2900 - insopts -m0644
2901 -
2902 - # docs
2903 - einfo "Installing documentation"
2904 - dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
2905 - # our inetd sample
2906 - einfo "Installing standard inetd sample"
2907 - newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
2908 - # Amanda example configs
2909 - einfo "Installing example configurations"
2910 - rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes} || die
2911 - mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/" || die
2912 - docinto example1
2913 - newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
2914 - newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
2915 - newdoc "${FILESDIR}/example_global.conf" global.conf
2916 -
2917 - einfo "Cleaning up dud .la files"
2918 - perl_set_version
2919 - find "${D}"/"${VENDOR_LIB}" -name '*.la' -delete || die
2920 -}
2921 -
2922 -pkg_postinst() {
2923 - [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
2924 - TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
2925 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
2926 - source "${TMPENVFILE}"
2927 -
2928 - # Migration of amandates from /etc to $localstatedir/amanda
2929 - if [ -f "${ROOT}/etc/amandates" -a \
2930 - ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
2931 - einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
2932 - einfo "A backup is also placed at /etc/amandates.orig"
2933 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig" || die
2934 - mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/" || die
2935 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" || die
2936 - fi
2937 - if [ -f "${ROOT}/etc/amandates" ]; then
2938 - einfo "If you have migrated safely, please delete /etc/amandates"
2939 - fi
2940 -
2941 - einfo "Checking setuid permissions"
2942 - amanda_permissions_fix "${ROOT}"
2943 -
2944 - elog "You should configure Amanda in /etc/amanda now."
2945 - elog
2946 - elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
2947 - elog "and restart xinetd afterwards!"
2948 - elog
2949 - elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
2950 - elog "as an example of how to configure your inetd."
2951 - elog
2952 - elog "systemd-users: enable and start amanda.socket or the relevant services"
2953 - elog "regarding what auth method you use."
2954 - elog
2955 - elog "NOTICE: If you need raw access to partitions you need to add the"
2956 - elog "amanda user to the 'disk' group."
2957 - elog
2958 - elog "NOTICE: If you have a tape changer, you need to add the amanda user"
2959 - elog "to the 'tape' group."
2960 - elog
2961 - elog "If you use localhost in your disklist your restores may break."
2962 - elog "You should replace it with the actual hostname!"
2963 - elog "Please also see the syntax changes to amandahosts."
2964 - elog "The only exception is when you use the authentication method 'local'."
2965 - elog
2966 - elog "Please note that this package no longer explicitly depends on"
2967 - elog "virtual/inetd, as it supports modes where an inetd is not needed"
2968 - elog "(see bug #506028 for details)."
2969 -}
2970 -
2971 -# We have had reports of amanda file permissions getting screwed up.
2972 -# Losing setuid, becoming too lax etc.
2973 -# ONLY root and users in the amanda group should be able to run these binaries!
2974 -amanda_permissions_fix() {
2975 - local root="$1"
2976 - [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
2977 - local le="/usr/libexec/amanda"
2978 - local i
2979 - for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
2980 - "${le}"/rundump "${le}"/runtar "${le}"/dumper \
2981 - "${le}"/planner ; do
2982 - [ -e "${root}"/${i} ] || continue
2983 - chown root:${AMANDA_GROUP_NAME} "${root}"/${i} || die
2984 - chmod u=srwx,g=rx,o= "${root}"/${i} || die
2985 - done
2986 -
2987 - # amanda-security.conf is a config file with similar requirements:
2988 - # writable only by root
2989 - # world-readable
2990 - # 3.3.9: introduced in /etc/amanda-security.conf
2991 - # 3.4.2: moved to /etc/amanda/amanda-security.conf
2992 - f=/etc/amanda/amanda-security.conf
2993 - chown root:root "${root}""${f}" || die
2994 - chmod u=rw,go=r "${root}""${f}" || die
2995 -}
2996 -
2997 -# We do not want the perl-module tests.
2998 -src_test() {
2999 - default_src_test
3000 -}
3001
3002 diff --git a/app-backup/amanda/files/amanda-3.4.1-labelstr.patch b/app-backup/amanda/files/amanda-3.4.1-labelstr.patch
3003 deleted file mode 100644
3004 index b169c8ae647..00000000000
3005 --- a/app-backup/amanda/files/amanda-3.4.1-labelstr.patch
3006 +++ /dev/null
3007 @@ -1,164 +0,0 @@
3008 -diff --git a/installcheck/Amanda_Rest_Storages.pl b/installcheck/Amanda_Rest_Storages.pl
3009 -index f3c699b..3e4e889 100644
3010 ---- a/installcheck/Amanda_Rest_Storages.pl
3011 -+++ b/installcheck/Amanda_Rest_Storages.pl
3012 -@@ -308,6 +308,7 @@ is_deeply (Installcheck::Rest::remove_source_line($reply),
3013 - 'inventory' => [
3014 - {'current' => 1,
3015 - 'label' => "DISKFLAT-001",
3016 -+ 'label_match' => '1',
3017 - 'device_status' => '0',
3018 - 'reserved' => 0,
3019 - 'f_type' => '1',
3020 -@@ -467,6 +468,7 @@ is_deeply (Installcheck::Rest::remove_source_line($reply),
3021 - 'label' => 'DISKFLAT-001',
3022 - 'datestamp' => '20140509113436',
3023 - 'write_protected' => '',
3024 -+ 'label_match' => '1',
3025 - 'process' => 'Amanda::Rest::Storages',
3026 - 'running_on' => 'amanda-server',
3027 - 'component' => 'rest-server',
3028 -diff --git a/installcheck/amtape.pl b/installcheck/amtape.pl
3029 -index 1a3527f..700c5a2 100644
3030 ---- a/installcheck/amtape.pl
3031 -+++ b/installcheck/amtape.pl
3032 -@@ -177,13 +177,13 @@ like($Installcheck::Run::stderr,
3033 - ok(run('amtape', 'TESTCONF', 'show'),
3034 - "'amtape TESTCONF show'");
3035 - like($Installcheck::Run::stderr,
3036 -- qr/slot +2:.*label MyTape\nslot +3/,
3037 -+ qr/slot +2:.*label MyTape \(label do not match labelstr\)\nslot +3/,
3038 - "'amtape TESTCONF show' ..result correct");
3039 -
3040 - ok(run('amtape', 'TESTCONF', 'show', '2'),
3041 - "'amtape TESTCONF show'");
3042 - like($Installcheck::Run::stderr,
3043 -- qr/^slot +2:.*label MyTape$/,
3044 -+ qr/^slot +2:.*label MyTape \(label do not match labelstr\)$/,
3045 - "'amtape TESTCONF show 2' ..result correct");
3046 -
3047 - ok(run('amtape', 'TESTCONF', 'show', '1,3'),
3048 -@@ -252,13 +252,13 @@ like(run_err('amtape', 'TESTCONF', 'update'),
3049 - ok(run('amtape', 'TESTCONF', 'show'),
3050 - "'amtape TESTCONF show'");
3051 - like($Installcheck::Run::stderr,
3052 -- qr/slot +2:.*label MyTape\nslot +3/,
3053 -+ qr/slot +2:.*label MyTape \(label do not match labelstr\)\nslot +3/,
3054 - "..result correct");
3055 -
3056 - ok(run('amtape', 'TESTCONF', 'inventory'),
3057 - "'amtape TESTCONF inventory'");
3058 - like($Installcheck::Run::stdout,
3059 -- qr/slot +1: blank\nslot +2: label MyTape \(current\)\nslot +3/,
3060 -+ qr/slot +1: blank\nslot +2: label MyTape \(current\) \(label do not match labelstr\)\nslot +3/,
3061 - "..result correct");
3062 -
3063 - ok(run('amtape', 'TESTCONF', 'taper'),
3064 -diff --git a/perl/Amanda/Changer.pm b/perl/Amanda/Changer.pm
3065 -index 92ed9b6..4b4aad4 100644
3066 ---- a/perl/Amanda/Changer.pm
3067 -+++ b/perl/Amanda/Changer.pm
3068 -@@ -60,9 +60,10 @@ sub local_message {
3069 - } elsif ($self->{'code'} == 1100014) {
3070 - return "$self->{'err'}";
3071 - } elsif ($self->{'code'} == 1100015) {
3072 -- return sprintf("slot %3s: date %-14s label %s%s", $self->{'slot'},
3073 -+ return sprintf("slot %3s: date %-14s label %s%s%s", $self->{'slot'},
3074 - $self->{'datestamp'}, $self->{'label'},
3075 -- $self->{'write_protected'}?" (Write protected)":"");
3076 -+ $self->{'write_protected'}?" (Write protected)":"",
3077 -+ $self->{'label_match'}?"":" (label do not match labelstr)");
3078 - } elsif ($self->{'code'} == 1100016) {
3079 - return sprintf("slot %3s: unlabeled volume%s", $self->{'slot'},
3080 - $self->{'write_protected'}?" (Write protected)":"");
3081 -@@ -2014,6 +2015,13 @@ sub show {
3082 - my $st = $dev->read_label();
3083 - my $write_protected = !$dev->check_writable();
3084 - if ($st == $DEVICE_STATUS_SUCCESS) {
3085 -+ my $label_match = match_labelstr(
3086 -+ $self->{'storage'}->{'labelstr'},
3087 -+ $self->{'storage'}->{'autolabel'},
3088 -+ $dev->volume_label(),
3089 -+ $res->{'barcode'},
3090 -+ $res->{'meta'},
3091 -+ $self->{'storage'}->{'storage_name'});
3092 - $params{'user_msg'}->(Amanda::Changer::Message->new(
3093 - source_filename => __FILE__,
3094 - source_line => __LINE__,
3095 -@@ -2022,7 +2030,8 @@ sub show {
3096 - slot => $last_slot,
3097 - datestamp => $dev->volume_time(),
3098 - label => $dev->volume_label(),
3099 -- write_protected => $write_protected));
3100 -+ write_protected => $write_protected,
3101 -+ label_match => $label_match));
3102 - } elsif ($st == $DEVICE_STATUS_VOLUME_UNLABELED) {
3103 - $params{'user_msg'}->(Amanda::Changer::Message->new(
3104 - source_filename => __FILE__,
3105 -diff --git a/perl/Amanda/Rest/Storages.pm b/perl/Amanda/Rest/Storages.pm
3106 -index 680115b..b1b59d2 100644
3107 ---- a/perl/Amanda/Rest/Storages.pm
3108 -+++ b/perl/Amanda/Rest/Storages.pm
3109 -@@ -436,6 +436,17 @@ sub inventory {
3110 - $inv->{'retention_type'} = $tl->get_retention_name($retention_type);
3111 - }
3112 - }
3113 -+ for my $inv (@$inventory) {
3114 -+ if ($inv->{label}) {
3115 -+ $inv->{'label_match'} = Amanda::Util::match_labelstr(
3116 -+ $storage->{'labelstr'},
3117 -+ $storage->{'autolabel'},
3118 -+ $inv->{'label'},
3119 -+ $inv->{'barcode'},
3120 -+ $inv->{'metae'},
3121 -+ $storage->{'storage_name'});
3122 -+ }
3123 -+ }
3124 - push @result_messages, Amanda::Changer::Message->new(
3125 - source_filename => __FILE__,
3126 - source_line => __LINE__,
3127 -diff --git a/server-src/amtape.pl b/server-src/amtape.pl
3128 -index b63607e..d06eefe 100644
3129 ---- a/server-src/amtape.pl
3130 -+++ b/server-src/amtape.pl
3131 -@@ -30,7 +30,7 @@ use Text::Wrap;
3132 - use Amanda::Device qw( :constants );
3133 - use Amanda::Debug qw( :logging );
3134 - use Amanda::Config qw( :init :getconf config_dir_relative );
3135 --use Amanda::Util qw( :constants );
3136 -+use Amanda::Util qw( :constants match_labelstr );
3137 - use Amanda::Storage;
3138 - use Amanda::Changer;
3139 - use Amanda::Constants;
3140 -@@ -219,6 +219,7 @@ sub {
3141 - for my $sl (@$inv) {
3142 - my $line = "slot $sl->{slot}:";
3143 - my $tle;
3144 -+ my $meta;
3145 - if ($sl->{'state'} == Amanda::Changer::SLOT_EMPTY) {
3146 - $line .= " empty";
3147 - } elsif (!defined($sl->{device_status}) && !defined($sl->{label})) {
3148 -@@ -230,6 +231,7 @@ sub {
3149 - if (defined $tle) {
3150 - if ($tle->{'meta'}) {
3151 - $line .= " ($tle->{'meta'})";
3152 -+ $meta = $tle->{'meta'};
3153 - }
3154 - }
3155 - } elsif ($sl->{'device_status'} == $DEVICE_STATUS_VOLUME_UNLABELED) {
3156 -@@ -263,6 +265,15 @@ sub {
3157 - $line .= " [device error]";
3158 - }
3159 - }
3160 -+ if ($sl->{'label'}) {
3161 -+ if (!match_labelstr($storage->{'labelstr'},
3162 -+ $storage->{'autolabel'},
3163 -+ $sl->{label},
3164 -+ $sl->{'barcode'}, $meta,
3165 -+ $storage->{'storage_name'})) {
3166 -+ $line .= " (label do not match labelstr)";
3167 -+ }
3168 -+ }
3169 - if (defined $tle) {
3170 - my $retention_type = Amanda::Tapelist::get_retention_type($tle->{pool}, $tle->{label});
3171 - $line .= " [" . $tl->get_retention_name($retention_type) . "]";
3172
3173 diff --git a/app-backup/amanda/files/amanda-3.4.1-slots.patch b/app-backup/amanda/files/amanda-3.4.1-slots.patch
3174 deleted file mode 100644
3175 index 1e4e583ecc2..00000000000
3176 --- a/app-backup/amanda/files/amanda-3.4.1-slots.patch
3177 +++ /dev/null
3178 @@ -1,16 +0,0 @@
3179 -diff --git a/perl/Amanda/Changer/aggregate.pm b/perl/Amanda/Changer/aggregate.pm
3180 -index a2bd962..ecf9d28 100644
3181 ---- a/perl/Amanda/Changer/aggregate.pm
3182 -+++ b/perl/Amanda/Changer/aggregate.pm
3183 -@@ -391,7 +391,10 @@ sub info_key {
3184 - my $kid = 0;
3185 - for (@$kid_results) {
3186 - my ($err, %kid_info) = @$_;
3187 -- next unless exists($kid_info{'slots'});
3188 -+ if (!exists($kid_info{'slots'})){
3189 -+ $kid++;
3190 -+ next;
3191 -+ }
3192 - my $kid_slots = $kid_info{'slots'};
3193 - push @slots, map "$kid:$_", @{$kid_slots};
3194 - $kid++;