Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-backup/amanda/
Date: Sat, 01 Jul 2017 18:59:27
Message-Id: 1498935535.2de09cceadfb09723764102c55a920429fe02c98.robbat2@gentoo
1 commit: 2de09cceadfb09723764102c55a920429fe02c98
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 1 18:58:37 2017 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 1 18:58:55 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2de09cce
7
8 app-backup/amanda: cleanup, per bug #537248.
9
10 Package-Manager: portage-2.3.6
11
12 app-backup/amanda/Manifest | 3 -
13 app-backup/amanda/amanda-3.3.3-r1.ebuild | 477 -------------------------------
14 app-backup/amanda/amanda-3.3.3.ebuild | 468 ------------------------------
15 app-backup/amanda/amanda-3.3.5.ebuild | 477 -------------------------------
16 app-backup/amanda/amanda-3.3.7.ebuild | 474 ------------------------------
17 5 files changed, 1899 deletions(-)
18
19 diff --git a/app-backup/amanda/Manifest b/app-backup/amanda/Manifest
20 index 8f28f5f72ec..3813e4aaff5 100644
21 --- a/app-backup/amanda/Manifest
22 +++ b/app-backup/amanda/Manifest
23 @@ -1,6 +1,3 @@
24 -DIST amanda-3.3.3.tar.gz 4394935 SHA256 c36c9cd61dc62a7824abb7ba74cc4b09527bd82a930d691cf207b60b4bb15b72 SHA512 42af74a9e3b3fd92600e78d98eb4cdcf9d260bd9bbd016dde4133db346374deb41e4893159205336b35521c36f737c2877fd5030028531e1c09a0a6ac2931ba9 WHIRLPOOL 730deda1d85e645e658500a01ea72895f836a3dd99209314a65161674da24fed5aad98313a8ef66ef76176c6c7b1a60e62d30d692cfe2121eb429d9cb37f5636
25 -DIST amanda-3.3.5.tar.gz 4530463 SHA256 17d14cdc64e5b98270a2ad6c1b58a5e317ab2fe0d518a4212f82f7e3d13d231b SHA512 bef1f5271939e804387424924e6423537efa3ac1a722fe68f3afd77677e5974d8325f1a32a2a22d510344ee3d7b8f480a969611388fcb632c0f3cd640315f812 WHIRLPOOL 5ba8c2734cbd3a7e771b9fc7f9561596e5cda3dce1ea60b7192893fcca401e1c5da6154dcac18084ce6ef5ccacdf4899a65e255424f1bbbdafc219e8405669e4
26 -DIST amanda-3.3.7.tar.gz 4618547 SHA256 cd1534c7d9c5b97afcb52b189f05fb158972fadb2cf46249847ae8bc5ad8a78a SHA512 33066a34f5da5a37f4e8b18a365c2e5ae9cd9105a1ed05f74df95d03937bddee25167960e3daf519d3cf04b1580d9e617e48ba1a695fe683823a27ec298582f4 WHIRLPOOL 21c1c70d04bf8f503158d3facdf4dd479ae26d69bcbc89a9ee2812cc97667cc0c9109a7357971c0d43620cd949ea195c1affb23b754afa81438a56aad247e15d
27 DIST amanda-3.3.9.tar.gz 4673301 SHA256 2520b95ca96f1d521d582b7c94bd631486e7029eda1de8e1887d74b323549a41 SHA512 345670a20cff335453e8dcbf457d1fcdb9f266e4a03d729c2b1ba762f4fac323de4a87713d0fd54c11ca244a08dc97fb8c641625f7fa81cb241b3c17748b1b7e WHIRLPOOL e149ab7dbc30cf3585e41d9fb338dd96ab4dd440e31723be51b8ccc9e5841f8dda31d3b89418474e31c7c2498f40177c646f03713c256a4d9341152e2ce2c8e4
28 DIST amanda-3.4.1.tar.gz 5338575 SHA256 1f69e9bdae774ac2394297dd9d7f98ccbce44ca9199317ada764ca173909d2ac SHA512 245bf334e36fe8b4361d9fc27ea7e7ef5bd2ecec74719caa16cc94d1ebb3abbef058e28d9afd85851654aaae0984531593a35c079d1ba4aed0fc5177e907ec16 WHIRLPOOL b9608456f28fb35137276f16ec24d79ae397a44450b42ec4fa28256763798dee623ab560ba0db147ff41d2abc57810e2318ae64741ea0a054a8ff853f4ad9c59
29 DIST amanda-3.4.2.tar.gz 5353734 SHA256 175c6a2ef57fe480ddeeefc920a93c8d1cde4111eec76d76e088101a53eeafac SHA512 dea44ffa5eb30318336395ccbd582df2f83da9a4cf91def2834a2e65b2e0f36cafc1911f6b73c3afb63be256484a78b006bdeb1db5b3ecf87dc59d34754987fd WHIRLPOOL af08e2b7b42cead569b69edfa264c1439d21d455e36ba5d346a74631e037773f20cd0563c6cdf95eeea0ee0e1e45328e553a5490ef4c66545acc1a3bd85570d0
30
31 diff --git a/app-backup/amanda/amanda-3.3.3-r1.ebuild b/app-backup/amanda/amanda-3.3.3-r1.ebuild
32 deleted file mode 100644
33 index 375e15d4bcb..00000000000
34 --- a/app-backup/amanda/amanda-3.3.3-r1.ebuild
35 +++ /dev/null
36 @@ -1,477 +0,0 @@
37 -# Copyright 1999-2015 Gentoo Foundation
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=5
41 -inherit autotools eutils perl-module user systemd
42 -
43 -DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
44 -HOMEPAGE="http://www.amanda.org/"
45 -SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
46 -
47 -LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
48 -SLOT="0"
49 -IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
50 -
51 -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
52 -RDEPEND="sys-libs/readline
53 - virtual/awk
54 - app-arch/tar
55 - >=dev-lang/perl-5.6
56 - app-arch/dump
57 - net-misc/openssh
58 - >=dev-libs/glib-2.26.0
59 - nls? ( virtual/libintl )
60 - s3? ( >=net-misc/curl-7.10.0 )
61 - !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
62 - samba? ( net-fs/samba )
63 - kerberos? ( app-crypt/mit-krb5 )
64 - xfs? ( sys-fs/xfsdump )
65 - readline? ( sys-libs/readline )
66 - !minimal? (
67 - dev-perl/XML-Simple
68 - virtual/mailx
69 - app-arch/mt-st
70 - sys-block/mtx
71 - gnuplot? ( sci-visualization/gnuplot )
72 - app-crypt/aespipe
73 - app-crypt/gnupg
74 - )"
75 -
76 -DEPEND="${RDEPEND}
77 - virtual/pkgconfig
78 - nls? ( sys-devel/gettext )
79 - >=app-text/docbook-xsl-stylesheets-1.72.0
80 - app-text/docbook-xml-dtd
81 - dev-libs/libxslt
82 - "
83 -
84 -MYFILESDIR="${T}/files"
85 -ENVDIR="/etc/env.d"
86 -ENVDFILE="97amanda"
87 -TMPENVFILE="${T}/${ENVDFILE}"
88 -
89 -# This is a complete list of Amanda settings that the ebuild takes from the
90 -# build environment. This allows users to alter the behavior of the package as
91 -# upstream intended, but keeping with Gentoo style. We store a copy of them in
92 -# /etc/env.d/97amanda during the install, so that they are preserved for future
93 -# installed. This variable name must not start with AMANDA_, as we do not want
94 -# it captured into the env file.
95 -ENV_SETTINGS_AMANDA="
96 -AMANDA_GROUP_GID AMANDA_GROUP_NAME
97 -AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
98 -AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
99 -AMANDA_TAR_LISTDIR AMANDA_TAR
100 -AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
101 -AMANDA_CONFIG_NAME AMANDA_TMPDIR"
102 -
103 -amanda_variable_setup() {
104 -
105 - # Setting vars
106 - local currentamanda
107 -
108 - # Grab the current settings
109 - currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
110 -
111 - # First we set the defaults
112 - [ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
113 - [ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
114 - [ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
115 - [ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
116 - [ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
117 - [ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
118 - [ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
119 -
120 - # This installs Amanda, with the server. However, it could be a client,
121 - # just specify an alternate server name in AMANDA_SERVER.
122 - [ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
123 - [ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
124 - [ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
125 - [ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
126 - [ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
127 - [ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
128 - [ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
129 - # These are left empty by default
130 - [ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
131 - [ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
132 - [ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
133 - [ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
134 -
135 - # What tar to use
136 - [ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
137 -
138 - # Now pull in the old stuff
139 - if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
140 - # We don't just source it as we don't want everything in there.
141 - eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
142 - fi
143 -
144 - # Re-apply the new settings if any
145 - [ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
146 -
147 -}
148 -
149 -pkg_setup() {
150 - amanda_variable_setup
151 -
152 - # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
153 - # another host than HOSTNAME.
154 - if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
155 - elog "You are installing a client-only version of Amanda."
156 - elog "You should set the variable \$AMANDA_SERVER to point at your"
157 - elog "Amanda-tape-server, otherwise you will have to specify its name"
158 - elog "when using amrecover on the client."
159 - elog "For example: Use something like"
160 - elog "AMANDA_SERVER=\"myserver\" emerge amanda"
161 - elog
162 - fi
163 -
164 - enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
165 - enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
166 -}
167 -
168 -src_unpack() {
169 - # we do not want the perl src_unpack
170 - default_src_unpack
171 -}
172 -
173 -src_prepare() {
174 - # gentoo bug #537248
175 - epatch "${FILESDIR}/local-amanda-perl5.20.patch"
176 -
177 - # gentoo bug #331111
178 - sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
179 - sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
180 -
181 - # bug with glibc-2.16.0
182 - sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h
183 -
184 - eautoreconf
185 -
186 - # places for us to work in
187 - mkdir -p "${MYFILESDIR}"
188 - # Now we store the settings we just created
189 - set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
190 -
191 - # Prepare our custom files
192 - einfo "Building custom configuration files"
193 - local i # our iterator
194 - local sedexpr # var for sed expr
195 - sedexpr=''
196 - for i in ${ENV_SETTINGS_AMANDA} ; do
197 - local val
198 - eval "val=\"\${${i}}\""
199 - sedexpr="${sedexpr}s|__${i}__|${val}|g;"
200 - done
201 -
202 - # now apply the sed expr
203 - for i in "${FILESDIR}"/amanda-* ; do
204 - sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
205 - done
206 -
207 - (
208 - cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
209 - use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
210 - ) > "${T}"/amandahosts
211 -
212 - if ! use minimal; then
213 - sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
214 - server-src/am{addclient,serverconfig}.pl || die
215 - fi
216 -}
217 -
218 -src_configure() {
219 - # fix bug #36316
220 - addpredict /var/cache/samba/gencache.tdb
221 - # fix bug #376169
222 - addpredict /run/blkid
223 - addpredict /etc/blkid.tab
224 -
225 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
226 - source "${TMPENVFILE}"
227 - local myconf
228 -
229 - einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
230 - myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
231 - einfo "Using ${AMANDA_SERVER_INDEX} for index server."
232 - myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
233 - einfo "Using ${AMANDA_USER_NAME} for amanda user."
234 - myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
235 - einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
236 - myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
237 - einfo "Using ${AMANDA_TAR} as Tar implementation."
238 - myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
239 - einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
240 - myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
241 - einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
242 - myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
243 - einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
244 - myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
245 -
246 - if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
247 - eerror "If you want _both_ UDP and TCP ports, please use only the"
248 - eerror "AMANDA_PORTS environment variable for identical ports, or set"
249 - eerror "AMANDA_PORTS_BOTH."
250 - die "Bad port setup!"
251 - fi
252 - if [ -n "${AMANDA_PORTS_UDP}" ]; then
253 - einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
254 - myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
255 - fi
256 - if [ -n "${AMANDA_PORTS_TCP}" ]; then
257 - einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
258 - myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
259 - fi
260 - if [ -n "${AMANDA_PORTS}" ]; then
261 - einfo "Using ports ${AMANDA_PORTS/,/-}"
262 - myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
263 - fi
264 -
265 - # Extras
266 - # Speed option
267 - myconf="${myconf} --with-buffered-dump"
268 - # "debugging" in the configuration is NOT debug in the conventional sense.
269 - # It is actually just useful output in the application, and should remain
270 - # enabled. There are some cases of breakage with MTX tape changers as of
271 - # 2.5.1p2 that it exposes when turned off as well.
272 - myconf="${myconf} --with-debugging"
273 - # Where to put our files
274 - myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
275 -
276 - # Samba support
277 - myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
278 -
279 - # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
280 - # default
281 - myconf="${myconf} --with-bsd-security"
282 - myconf="${myconf} --with-ssh-security"
283 - myconf="${myconf} --with-bsdudp-security"
284 - myconf="${myconf} --with-bsdtcp-security"
285 -
286 - # kerberos-security mechanism version 5
287 - myconf="${myconf} `use_with kerberos krb5-security`"
288 -
289 - # Amazon S3 support
290 - myconf="${myconf} `use_enable s3 s3-device`"
291 -
292 - # libcurl is required for S3 but otherwise optional
293 - if ! use s3; then
294 - myconf="${myconf} $(use_with curl libcurl)"
295 - fi
296 -
297 - # Client only, as requested in bug #127725
298 - if use minimal ; then
299 - myconf="${myconf} --without-server"
300 - else
301 - # amplot
302 - myconf="${myconf} $(use_with gnuplot)"
303 - fi
304 -
305 - # IPv6 fun.
306 - myconf="${myconf} `use_with ipv6`"
307 - # This is to prevent the IPv6-is-working test
308 - # As the test fails on binpkg build hosts with no IPv6.
309 - use ipv6 && export amanda_cv_working_ipv6=yes
310 -
311 - # I18N
312 - myconf="${myconf} `use_enable nls`"
313 -
314 - # Bug #296634: Perl location
315 - perl_set_version
316 - myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
317 -
318 - # Bug 296633: --disable-syntax-checks
319 - # Some tests are not safe for production systems
320 - myconf="${myconf} --disable-syntax-checks"
321 -
322 - # build manpages
323 - myconf="${myconf} --enable-manpage-build"
324 -
325 - # bug #483120
326 - tc-export AR
327 -
328 - econf \
329 - $(use_with readline) \
330 - ${myconf}
331 -}
332 -
333 -src_compile() {
334 - # Again, do not want the perl-module src_compile
335 - default_src_compile
336 -}
337 -
338 -src_install() {
339 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
340 - source ${TMPENVFILE}
341 -
342 - einfo "Doing stock install"
343 - emake DESTDIR="${D}" install || die
344 -
345 - # Build the envdir file
346 - # Don't forget this..
347 - einfo "Building environment file"
348 - (
349 - echo "# These settings are what was present in the environment when this"
350 - echo "# Amanda was compiled. Changing anything below this comment will"
351 - echo "# have no effect on your application, but it merely exists to"
352 - echo "# preserve them for your next emerge of Amanda"
353 - cat "${TMPENVFILE}" | sed "s,=\$,='',g"
354 - ) >> "${MYFILESDIR}/${ENVDFILE}"
355 -
356 - # Env.d
357 - einfo "Installing environment config file"
358 - doenvd "${MYFILESDIR}/${ENVDFILE}"
359 -
360 - # Lock down next section (up until docs).
361 - insopts -m0640
362 - # Installing Amanda Xinetd Services Definition
363 - einfo "Installing xinetd service file"
364 - insinto /etc/xinetd.d
365 - if use minimal ; then
366 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
367 - else
368 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
369 - fi
370 -
371 - if ! use minimal; then
372 - einfo "Installing Sample Daily Cron Job for Amanda"
373 - insinto /etc/cron.daily
374 - newins "${MYFILESDIR}/amanda-cron" amanda
375 - fi
376 -
377 - einfo "Installing systemd service and socket files for Amanda"
378 - systemd_dounit "${FILESDIR}"/amanda.socket || die
379 - systemd_newunit "${FILESDIR}"/amanda.service-r1 'amanda@.service' || die
380 -
381 - insinto /etc/amanda
382 - einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
383 - doins "${T}/amandahosts"
384 - fperms 600 /etc/amanda/amandahosts
385 -
386 - dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
387 - insinto "${AMANDA_USER_HOMEDIR}"
388 - einfo "Installing .profile for ${AMANDA_USER_NAME} user"
389 - newins "${MYFILESDIR}/amanda-profile" .profile
390 -
391 - insinto /etc/amanda
392 - doins "${S}/example/amanda-client.conf"
393 - if ! use minimal ; then
394 - insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
395 - doins "${S}/example/amanda.conf"
396 - doins "${S}/example/disklist"
397 - keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
398 - fi
399 -
400 - keepdir "${AMANDA_TAR_LISTDIR}"
401 - keepdir "${AMANDA_USER_HOMEDIR}/amanda"
402 - keepdir "${AMANDA_TMPDIR}/dumps"
403 - # Just make sure it exists for XFS to work...
404 - use xfs && keepdir /var/xfsdump/inventory
405 -
406 - local i
407 - for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
408 - "${AMANDA_TMPDIR}" /etc/amanda; do
409 - einfo "Securing directory (${i})"
410 - fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
411 - done
412 - # Do NOT use -R
413 - fperms 0700 \
414 - "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
415 - "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
416 - "${AMANDA_USER_HOMEDIR}/amanda" \
417 - /etc/amanda
418 -
419 - if ! use minimal ; then
420 - fperms 0700 \
421 - "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
422 - /etc/amanda/${AMANDA_CONFIG_NAME}
423 - fi
424 -
425 - einfo "Setting setuid permissions"
426 - amanda_permissions_fix "${D}"
427 -
428 - # Relax permissions again
429 - insopts -m0644
430 -
431 - # docs
432 - einfo "Installing documentation"
433 - dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
434 - # our inetd sample
435 - einfo "Installing standard inetd sample"
436 - newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
437 - # Amanda example configs
438 - einfo "Installing example configurations"
439 - rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
440 - mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
441 - docinto example1
442 - newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
443 - newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
444 - newdoc "${FILESDIR}/example_global.conf" global.conf
445 -
446 - einfo "Cleaning up dud .la files"
447 - perl_set_version
448 - find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
449 -}
450 -
451 -pkg_postinst() {
452 - [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
453 - TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
454 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
455 - source "${TMPENVFILE}"
456 -
457 - # Migration of amandates from /etc to $localstatedir/amanda
458 - if [ -f "${ROOT}/etc/amandates" -a \
459 - ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
460 - einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
461 - einfo "A backup is also placed at /etc/amandates.orig"
462 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
463 - mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
464 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
465 - fi
466 - if [ -f "${ROOT}/etc/amandates" ]; then
467 - einfo "If you have migrated safely, please delete /etc/amandates"
468 - fi
469 -
470 - einfo "Checking setuid permissions"
471 - amanda_permissions_fix "${ROOT}"
472 -
473 - elog "You should configure Amanda in /etc/amanda now."
474 - elog
475 - elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
476 - elog "and restart xinetd afterwards!"
477 - elog
478 - elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
479 - elog "as an example of how to configure your inetd."
480 - elog
481 - elog "systemd-users: enable and start amanda.socket or the relevant services"
482 - elog "regarding what auth method you use."
483 - elog
484 - elog "NOTICE: If you need raw access to partitions you need to add the"
485 - elog "amanda user to the 'disk' group."
486 - elog
487 - elog "NOTICE: If you have a tape changer, you need to add the amanda user"
488 - elog "to the 'tape' group."
489 - elog
490 - elog "If you use localhost in your disklist your restores may break."
491 - elog "You should replace it with the actual hostname!"
492 - elog "Please also see the syntax changes to amandahosts."
493 - elog
494 - elog "Please note that this package no longer explicitly depends on"
495 - elog "virtual/inetd, as it supports modes where an inetd is not needed"
496 - elog "(see bug #506028 for details)."
497 - elog "The only exception is when you use the authentication method 'local'."
498 -}
499 -
500 -# We have had reports of amanda file permissions getting screwed up.
501 -# Losing setuid, becoming too lax etc.
502 -# ONLY root and users in the amanda group should be able to run these binaries!
503 -amanda_permissions_fix() {
504 - local root="$1"
505 - [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
506 - local le="/usr/libexec/amanda"
507 - for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
508 - "${le}"/rundump "${le}"/runtar "${le}"/dumper \
509 - "${le}"/planner ; do
510 - chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
511 - chmod u=srwx,g=rx,o= "${root}"/${i}
512 - done
513 -}
514
515 diff --git a/app-backup/amanda/amanda-3.3.3.ebuild b/app-backup/amanda/amanda-3.3.3.ebuild
516 deleted file mode 100644
517 index a0615c70412..00000000000
518 --- a/app-backup/amanda/amanda-3.3.3.ebuild
519 +++ /dev/null
520 @@ -1,468 +0,0 @@
521 -# Copyright 1999-2014 Gentoo Foundation
522 -# Distributed under the terms of the GNU General Public License v2
523 -
524 -EAPI=5
525 -inherit autotools eutils perl-module user systemd
526 -
527 -DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
528 -HOMEPAGE="http://www.amanda.org/"
529 -SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
530 -LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
531 -SLOT="0"
532 -KEYWORDS="amd64 ppc ppc64 ~sparc x86"
533 -RDEPEND="sys-libs/readline
534 - virtual/awk
535 - app-arch/tar
536 - >=dev-lang/perl-5.6
537 - app-arch/dump
538 - net-misc/openssh
539 - >=dev-libs/glib-2.26.0
540 - nls? ( virtual/libintl )
541 - s3? ( >=net-misc/curl-7.10.0 )
542 - !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
543 - samba? ( net-fs/samba )
544 - kerberos? ( app-crypt/mit-krb5 )
545 - xfs? ( sys-fs/xfsdump )
546 - readline? ( sys-libs/readline )
547 - !minimal? (
548 - dev-perl/XML-Simple
549 - virtual/mailx
550 - app-arch/mt-st
551 - sys-block/mtx
552 - gnuplot? ( sci-visualization/gnuplot )
553 - app-crypt/aespipe
554 - app-crypt/gnupg
555 - )"
556 -
557 -DEPEND="${RDEPEND}
558 - virtual/pkgconfig
559 - nls? ( sys-devel/gettext )
560 - >=app-text/docbook-xsl-stylesheets-1.72.0
561 - app-text/docbook-xml-dtd
562 - dev-libs/libxslt
563 - "
564 -
565 -IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
566 -
567 -MYFILESDIR="${T}/files"
568 -ENVDIR="/etc/env.d"
569 -ENVDFILE="97amanda"
570 -TMPENVFILE="${T}/${ENVDFILE}"
571 -
572 -# This is a complete list of Amanda settings that the ebuild takes from the
573 -# build environment. This allows users to alter the behavior of the package as
574 -# upstream intended, but keeping with Gentoo style. We store a copy of them in
575 -# /etc/env.d/97amanda during the install, so that they are preserved for future
576 -# installed. This variable name must not start with AMANDA_, as we do not want
577 -# it captured into the env file.
578 -ENV_SETTINGS_AMANDA="
579 -AMANDA_GROUP_GID AMANDA_GROUP_NAME
580 -AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
581 -AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
582 -AMANDA_TAR_LISTDIR AMANDA_TAR
583 -AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
584 -AMANDA_CONFIG_NAME AMANDA_TMPDIR"
585 -
586 -amanda_variable_setup() {
587 -
588 - # Setting vars
589 - local currentamanda
590 -
591 - # Grab the current settings
592 - currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
593 -
594 - # First we set the defaults
595 - [ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
596 - [ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
597 - [ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
598 - [ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
599 - [ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
600 - [ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
601 - [ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
602 -
603 - # This installs Amanda, with the server. However, it could be a client,
604 - # just specify an alternate server name in AMANDA_SERVER.
605 - [ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
606 - [ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
607 - [ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
608 - [ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
609 - [ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
610 - [ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
611 - [ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
612 - # These are left empty by default
613 - [ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
614 - [ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
615 - [ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
616 - [ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
617 -
618 - # What tar to use
619 - [ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
620 -
621 - # Now pull in the old stuff
622 - if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
623 - # We don't just source it as we don't want everything in there.
624 - eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
625 - fi
626 -
627 - # Re-apply the new settings if any
628 - [ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
629 -
630 -}
631 -
632 -pkg_setup() {
633 - amanda_variable_setup
634 -
635 - # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
636 - # another host than HOSTNAME.
637 - if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
638 - elog "You are installing a client-only version of Amanda."
639 - elog "You should set the variable \$AMANDA_SERVER to point at your"
640 - elog "Amanda-tape-server, otherwise you will have to specify its name"
641 - elog "when using amrecover on the client."
642 - elog "For example: Use something like"
643 - elog "AMANDA_SERVER=\"myserver\" emerge amanda"
644 - elog
645 - fi
646 -
647 - enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
648 - enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
649 -}
650 -
651 -src_unpack() {
652 - # we do not want the perl src_unpack
653 - default_src_unpack
654 -}
655 -
656 -src_prepare() {
657 -
658 - # gentoo bug #331111
659 - sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
660 - sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
661 -
662 - # bug with glibc-2.16.0
663 - sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h
664 -
665 - eautoreconf
666 -
667 - # places for us to work in
668 - mkdir -p "${MYFILESDIR}"
669 - # Now we store the settings we just created
670 - set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
671 -
672 - # Prepare our custom files
673 - einfo "Building custom configuration files"
674 - local i # our iterator
675 - local sedexpr # var for sed expr
676 - sedexpr=''
677 - for i in ${ENV_SETTINGS_AMANDA} ; do
678 - local val
679 - eval "val=\"\${${i}}\""
680 - sedexpr="${sedexpr}s|__${i}__|${val}|g;"
681 - done
682 -
683 - # now apply the sed expr
684 - for i in "${FILESDIR}"/amanda-* ; do
685 - sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
686 - done
687 -
688 - (
689 - cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
690 - use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
691 - ) > "${T}"/amandahosts
692 -
693 - if ! use minimal; then
694 - sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
695 - server-src/am{addclient,serverconfig}.pl || die
696 - fi
697 -}
698 -
699 -src_configure() {
700 - # fix bug #36316
701 - addpredict /var/cache/samba/gencache.tdb
702 - # fix bug #376169
703 - addpredict /run/blkid
704 - addpredict /etc/blkid.tab
705 -
706 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
707 - source "${TMPENVFILE}"
708 - local myconf
709 -
710 - einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
711 - myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
712 - einfo "Using ${AMANDA_SERVER_INDEX} for index server."
713 - myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
714 - einfo "Using ${AMANDA_USER_NAME} for amanda user."
715 - myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
716 - einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
717 - myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
718 - einfo "Using ${AMANDA_TAR} as Tar implementation."
719 - myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
720 - einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
721 - myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
722 - einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
723 - myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
724 - einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
725 - myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
726 -
727 - if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
728 - eerror "If you want _both_ UDP and TCP ports, please use only the"
729 - eerror "AMANDA_PORTS environment variable for identical ports, or set"
730 - eerror "AMANDA_PORTS_BOTH."
731 - die "Bad port setup!"
732 - fi
733 - if [ -n "${AMANDA_PORTS_UDP}" ]; then
734 - einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
735 - myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
736 - fi
737 - if [ -n "${AMANDA_PORTS_TCP}" ]; then
738 - einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
739 - myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
740 - fi
741 - if [ -n "${AMANDA_PORTS}" ]; then
742 - einfo "Using ports ${AMANDA_PORTS/,/-}"
743 - myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
744 - fi
745 -
746 - # Extras
747 - # Speed option
748 - myconf="${myconf} --with-buffered-dump"
749 - # "debugging" in the configuration is NOT debug in the conventional sense.
750 - # It is actually just useful output in the application, and should remain
751 - # enabled. There are some cases of breakage with MTX tape changers as of
752 - # 2.5.1p2 that it exposes when turned off as well.
753 - myconf="${myconf} --with-debugging"
754 - # Where to put our files
755 - myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
756 -
757 - # Samba support
758 - myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
759 -
760 - # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
761 - # default
762 - myconf="${myconf} --with-bsd-security"
763 - myconf="${myconf} --with-ssh-security"
764 - myconf="${myconf} --with-bsdudp-security"
765 - myconf="${myconf} --with-bsdtcp-security"
766 -
767 - # kerberos-security mechanism version 5
768 - myconf="${myconf} `use_with kerberos krb5-security`"
769 -
770 - # Amazon S3 support
771 - myconf="${myconf} `use_enable s3 s3-device`"
772 -
773 - # libcurl is required for S3 but otherwise optional
774 - if ! use s3; then
775 - myconf="${myconf} $(use_with curl libcurl)"
776 - fi
777 -
778 - # Client only, as requested in bug #127725
779 - if use minimal ; then
780 - myconf="${myconf} --without-server"
781 - else
782 - # amplot
783 - myconf="${myconf} $(use_with gnuplot)"
784 - fi
785 -
786 - # IPv6 fun.
787 - myconf="${myconf} `use_with ipv6`"
788 - # This is to prevent the IPv6-is-working test
789 - # As the test fails on binpkg build hosts with no IPv6.
790 - use ipv6 && export amanda_cv_working_ipv6=yes
791 -
792 - # I18N
793 - myconf="${myconf} `use_enable nls`"
794 -
795 - # Bug #296634: Perl location
796 - perl_set_version
797 - myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
798 -
799 - # Bug 296633: --disable-syntax-checks
800 - # Some tests are not safe for production systems
801 - myconf="${myconf} --disable-syntax-checks"
802 -
803 - # build manpages
804 - myconf="${myconf} --enable-manpage-build"
805 -
806 - econf \
807 - $(use_with readline) \
808 - ${myconf}
809 -}
810 -
811 -src_compile() {
812 - # Again, do not want the perl-module src_compile
813 - default_src_compile
814 -}
815 -
816 -src_install() {
817 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
818 - source ${TMPENVFILE}
819 -
820 - einfo "Doing stock install"
821 - emake DESTDIR="${D}" install || die
822 -
823 - # Build the envdir file
824 - # Don't forget this..
825 - einfo "Building environment file"
826 - (
827 - echo "# These settings are what was present in the environment when this"
828 - echo "# Amanda was compiled. Changing anything below this comment will"
829 - echo "# have no effect on your application, but it merely exists to"
830 - echo "# preserve them for your next emerge of Amanda"
831 - cat "${TMPENVFILE}" | sed "s,=\$,='',g"
832 - ) >> "${MYFILESDIR}/${ENVDFILE}"
833 -
834 - # Env.d
835 - einfo "Installing environment config file"
836 - doenvd "${MYFILESDIR}/${ENVDFILE}"
837 -
838 - # Lock down next section (up until docs).
839 - insopts -m0640
840 - # Installing Amanda Xinetd Services Definition
841 - einfo "Installing xinetd service file"
842 - insinto /etc/xinetd.d
843 - if use minimal ; then
844 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
845 - else
846 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
847 - fi
848 -
849 - if ! use minimal; then
850 - einfo "Installing Sample Daily Cron Job for Amanda"
851 - insinto /etc/cron.daily
852 - newins "${MYFILESDIR}/amanda-cron" amanda
853 - fi
854 -
855 - einfo "Installing systemd service and socket files for Amanda"
856 - systemd_dounit "${FILESDIR}"/amanda.socket || die
857 - systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
858 -
859 - insinto /etc/amanda
860 - einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
861 - doins "${T}/amandahosts"
862 - fperms 600 /etc/amanda/amandahosts
863 -
864 - dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
865 - insinto "${AMANDA_USER_HOMEDIR}"
866 - einfo "Installing .profile for ${AMANDA_USER_NAME} user"
867 - newins "${MYFILESDIR}/amanda-profile" .profile
868 -
869 - insinto /etc/amanda
870 - doins "${S}/example/amanda-client.conf"
871 - if ! use minimal ; then
872 - insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
873 - doins "${S}/example/amanda.conf"
874 - doins "${S}/example/disklist"
875 - keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
876 - fi
877 -
878 - keepdir "${AMANDA_TAR_LISTDIR}"
879 - keepdir "${AMANDA_USER_HOMEDIR}/amanda"
880 - keepdir "${AMANDA_TMPDIR}/dumps"
881 - # Just make sure it exists for XFS to work...
882 - use xfs && keepdir /var/xfsdump/inventory
883 -
884 - local i
885 - for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
886 - "${AMANDA_TMPDIR}" /etc/amanda; do
887 - einfo "Securing directory (${i})"
888 - fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
889 - done
890 - # Do NOT use -R
891 - fperms 0700 \
892 - "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
893 - "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
894 - "${AMANDA_USER_HOMEDIR}/amanda" \
895 - /etc/amanda
896 -
897 - if ! use minimal ; then
898 - fperms 0700 \
899 - "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
900 - /etc/amanda/${AMANDA_CONFIG_NAME}
901 - fi
902 -
903 - einfo "Setting setuid permissions"
904 - amanda_permissions_fix "${D}"
905 -
906 - # Relax permissions again
907 - insopts -m0644
908 -
909 - # docs
910 - einfo "Installing documentation"
911 - dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
912 - # our inetd sample
913 - einfo "Installing standard inetd sample"
914 - newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
915 - # Amanda example configs
916 - einfo "Installing example configurations"
917 - rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
918 - mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
919 - docinto example1
920 - newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
921 - newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
922 - newdoc "${FILESDIR}/example_global.conf" global.conf
923 -
924 - einfo "Cleaning up dud .la files"
925 - perl_set_version
926 - find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
927 -}
928 -
929 -pkg_postinst() {
930 - [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
931 - TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
932 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
933 - source "${TMPENVFILE}"
934 -
935 - # Migration of amandates from /etc to $localstatedir/amanda
936 - if [ -f "${ROOT}/etc/amandates" -a \
937 - ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
938 - einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
939 - einfo "A backup is also placed at /etc/amandates.orig"
940 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
941 - mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
942 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
943 - fi
944 - if [ -f "${ROOT}/etc/amandates" ]; then
945 - einfo "If you have migrated safely, please delete /etc/amandates"
946 - fi
947 -
948 - einfo "Checking setuid permissions"
949 - amanda_permissions_fix "${ROOT}"
950 -
951 - elog "You should configure Amanda in /etc/amanda now."
952 - elog
953 - elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
954 - elog "and restart xinetd afterwards!"
955 - elog
956 - elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
957 - elog "as an example of how to configure your inetd."
958 - elog
959 - elog "NOTICE: If you need raw access to partitions you need to add the"
960 - elog "amanda user to the 'disk' group."
961 - elog
962 - elog "NOTICE: If you have a tape changer, you need to add the amanda user"
963 - elog "to the 'tape' group."
964 - elog
965 - elog "If you use localhost in your disklist your restores may break."
966 - elog "You should replace it with the actual hostname!"
967 - elog "Please also see the syntax changes to amandahosts."
968 - elog
969 - elog "Please note that this package no longer explicitly depends on"
970 - elog "virtual/inetd, as it supports modes where an inetd is not needed"
971 - elog "(see bug #506028 for details)."
972 -
973 -}
974 -
975 -# We have had reports of amanda file permissions getting screwed up.
976 -# Losing setuid, becoming too lax etc.
977 -# ONLY root and users in the amanda group should be able to run these binaries!
978 -amanda_permissions_fix() {
979 - local root="$1"
980 - [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
981 - local le="/usr/libexec/amanda"
982 - for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
983 - "${le}"/rundump "${le}"/runtar "${le}"/dumper \
984 - "${le}"/planner ; do
985 - chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
986 - chmod u=srwx,g=rx,o= "${root}"/${i}
987 - done
988 -}
989
990 diff --git a/app-backup/amanda/amanda-3.3.5.ebuild b/app-backup/amanda/amanda-3.3.5.ebuild
991 deleted file mode 100644
992 index 02ad41d9591..00000000000
993 --- a/app-backup/amanda/amanda-3.3.5.ebuild
994 +++ /dev/null
995 @@ -1,477 +0,0 @@
996 -# Copyright 1999-2015 Gentoo Foundation
997 -# Distributed under the terms of the GNU General Public License v2
998 -
999 -EAPI=5
1000 -inherit autotools eutils perl-module user systemd
1001 -
1002 -DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
1003 -HOMEPAGE="http://www.amanda.org/"
1004 -SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
1005 -
1006 -LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
1007 -SLOT="0"
1008 -IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
1009 -
1010 -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
1011 -RDEPEND="sys-libs/readline
1012 - virtual/awk
1013 - app-arch/tar
1014 - dev-lang/perl:=
1015 - app-arch/dump
1016 - net-misc/openssh
1017 - >=dev-libs/glib-2.26.0
1018 - nls? ( virtual/libintl )
1019 - s3? ( >=net-misc/curl-7.10.0 )
1020 - !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
1021 - samba? ( net-fs/samba )
1022 - kerberos? ( app-crypt/mit-krb5 )
1023 - xfs? ( sys-fs/xfsdump )
1024 - readline? ( sys-libs/readline )
1025 - !minimal? (
1026 - dev-perl/XML-Simple
1027 - virtual/mailx
1028 - app-arch/mt-st
1029 - sys-block/mtx
1030 - gnuplot? ( sci-visualization/gnuplot )
1031 - app-crypt/aespipe
1032 - app-crypt/gnupg
1033 - )"
1034 -
1035 -DEPEND="${RDEPEND}
1036 - virtual/pkgconfig
1037 - nls? ( sys-devel/gettext )
1038 - >=app-text/docbook-xsl-stylesheets-1.72.0
1039 - app-text/docbook-xml-dtd
1040 - dev-libs/libxslt
1041 - "
1042 -
1043 -MYFILESDIR="${T}/files"
1044 -ENVDIR="/etc/env.d"
1045 -ENVDFILE="97amanda"
1046 -TMPENVFILE="${T}/${ENVDFILE}"
1047 -
1048 -# This is a complete list of Amanda settings that the ebuild takes from the
1049 -# build environment. This allows users to alter the behavior of the package as
1050 -# upstream intended, but keeping with Gentoo style. We store a copy of them in
1051 -# /etc/env.d/97amanda during the install, so that they are preserved for future
1052 -# installed. This variable name must not start with AMANDA_, as we do not want
1053 -# it captured into the env file.
1054 -ENV_SETTINGS_AMANDA="
1055 -AMANDA_GROUP_GID AMANDA_GROUP_NAME
1056 -AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
1057 -AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
1058 -AMANDA_TAR_LISTDIR AMANDA_TAR
1059 -AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
1060 -AMANDA_CONFIG_NAME AMANDA_TMPDIR"
1061 -
1062 -amanda_variable_setup() {
1063 -
1064 - # Setting vars
1065 - local currentamanda
1066 -
1067 - # Grab the current settings
1068 - currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
1069 -
1070 - # First we set the defaults
1071 - [ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
1072 - [ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
1073 - [ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
1074 - [ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
1075 - [ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
1076 - [ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
1077 - [ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
1078 -
1079 - # This installs Amanda, with the server. However, it could be a client,
1080 - # just specify an alternate server name in AMANDA_SERVER.
1081 - [ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
1082 - [ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
1083 - [ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
1084 - [ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
1085 - [ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
1086 - [ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
1087 - [ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
1088 - # These are left empty by default
1089 - [ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
1090 - [ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
1091 - [ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
1092 - [ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
1093 -
1094 - # What tar to use
1095 - [ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
1096 -
1097 - # Now pull in the old stuff
1098 - if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
1099 - # We don't just source it as we don't want everything in there.
1100 - eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
1101 - fi
1102 -
1103 - # Re-apply the new settings if any
1104 - [ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
1105 -
1106 -}
1107 -
1108 -pkg_setup() {
1109 - amanda_variable_setup
1110 -
1111 - # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
1112 - # another host than HOSTNAME.
1113 - if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
1114 - elog "You are installing a client-only version of Amanda."
1115 - elog "You should set the variable \$AMANDA_SERVER to point at your"
1116 - elog "Amanda-tape-server, otherwise you will have to specify its name"
1117 - elog "when using amrecover on the client."
1118 - elog "For example: Use something like"
1119 - elog "AMANDA_SERVER=\"myserver\" emerge amanda"
1120 - elog
1121 - fi
1122 -
1123 - enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
1124 - enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
1125 -}
1126 -
1127 -src_unpack() {
1128 - # we do not want the perl src_unpack
1129 - default_src_unpack
1130 -}
1131 -
1132 -src_prepare() {
1133 - # gentoo bug #537248
1134 - epatch "${FILESDIR}/local-amanda-perl5.20.patch"
1135 -
1136 - # gentoo bug #331111
1137 - sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
1138 - sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
1139 -
1140 - # bug with glibc-2.16.0
1141 - sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h
1142 -
1143 - eautoreconf
1144 -
1145 - # places for us to work in
1146 - mkdir -p "${MYFILESDIR}"
1147 - # Now we store the settings we just created
1148 - set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
1149 -
1150 - # Prepare our custom files
1151 - einfo "Building custom configuration files"
1152 - local i # our iterator
1153 - local sedexpr # var for sed expr
1154 - sedexpr=''
1155 - for i in ${ENV_SETTINGS_AMANDA} ; do
1156 - local val
1157 - eval "val=\"\${${i}}\""
1158 - sedexpr="${sedexpr}s|__${i}__|${val}|g;"
1159 - done
1160 -
1161 - # now apply the sed expr
1162 - for i in "${FILESDIR}"/amanda-* ; do
1163 - sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
1164 - done
1165 -
1166 - (
1167 - cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
1168 - use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
1169 - ) > "${T}"/amandahosts
1170 -
1171 - if ! use minimal; then
1172 - sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
1173 - server-src/am{addclient,serverconfig}.pl || die
1174 - fi
1175 -}
1176 -
1177 -src_configure() {
1178 - # fix bug #36316
1179 - addpredict /var/cache/samba/gencache.tdb
1180 - # fix bug #376169
1181 - addpredict /run/blkid
1182 - addpredict /etc/blkid.tab
1183 -
1184 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1185 - source "${TMPENVFILE}"
1186 - local myconf
1187 -
1188 - einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
1189 - myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
1190 - einfo "Using ${AMANDA_SERVER_INDEX} for index server."
1191 - myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
1192 - einfo "Using ${AMANDA_USER_NAME} for amanda user."
1193 - myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
1194 - einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
1195 - myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
1196 - einfo "Using ${AMANDA_TAR} as Tar implementation."
1197 - myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
1198 - einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
1199 - myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
1200 - einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
1201 - myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
1202 - einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
1203 - myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
1204 -
1205 - if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
1206 - eerror "If you want _both_ UDP and TCP ports, please use only the"
1207 - eerror "AMANDA_PORTS environment variable for identical ports, or set"
1208 - eerror "AMANDA_PORTS_BOTH."
1209 - die "Bad port setup!"
1210 - fi
1211 - if [ -n "${AMANDA_PORTS_UDP}" ]; then
1212 - einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
1213 - myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
1214 - fi
1215 - if [ -n "${AMANDA_PORTS_TCP}" ]; then
1216 - einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
1217 - myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
1218 - fi
1219 - if [ -n "${AMANDA_PORTS}" ]; then
1220 - einfo "Using ports ${AMANDA_PORTS/,/-}"
1221 - myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
1222 - fi
1223 -
1224 - # Extras
1225 - # Speed option
1226 - myconf="${myconf} --with-buffered-dump"
1227 - # "debugging" in the configuration is NOT debug in the conventional sense.
1228 - # It is actually just useful output in the application, and should remain
1229 - # enabled. There are some cases of breakage with MTX tape changers as of
1230 - # 2.5.1p2 that it exposes when turned off as well.
1231 - myconf="${myconf} --with-debugging"
1232 - # Where to put our files
1233 - myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
1234 -
1235 - # Samba support
1236 - myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
1237 -
1238 - # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
1239 - # default
1240 - myconf="${myconf} --with-bsd-security"
1241 - myconf="${myconf} --with-ssh-security"
1242 - myconf="${myconf} --with-bsdudp-security"
1243 - myconf="${myconf} --with-bsdtcp-security"
1244 -
1245 - # kerberos-security mechanism version 5
1246 - myconf="${myconf} `use_with kerberos krb5-security`"
1247 -
1248 - # Amazon S3 support
1249 - myconf="${myconf} `use_enable s3 s3-device`"
1250 -
1251 - # libcurl is required for S3 but otherwise optional
1252 - if ! use s3; then
1253 - myconf="${myconf} $(use_with curl libcurl)"
1254 - fi
1255 -
1256 - # Client only, as requested in bug #127725
1257 - if use minimal ; then
1258 - myconf="${myconf} --without-server"
1259 - else
1260 - # amplot
1261 - myconf="${myconf} $(use_with gnuplot)"
1262 - fi
1263 -
1264 - # IPv6 fun.
1265 - myconf="${myconf} `use_with ipv6`"
1266 - # This is to prevent the IPv6-is-working test
1267 - # As the test fails on binpkg build hosts with no IPv6.
1268 - use ipv6 && export amanda_cv_working_ipv6=yes
1269 -
1270 - # I18N
1271 - myconf="${myconf} `use_enable nls`"
1272 -
1273 - # Bug #296634: Perl location
1274 - perl_set_version
1275 - myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
1276 -
1277 - # Bug 296633: --disable-syntax-checks
1278 - # Some tests are not safe for production systems
1279 - myconf="${myconf} --disable-syntax-checks"
1280 -
1281 - # build manpages
1282 - myconf="${myconf} --enable-manpage-build"
1283 -
1284 - # bug #483120
1285 - tc-export AR
1286 -
1287 - econf \
1288 - $(use_with readline) \
1289 - ${myconf}
1290 -}
1291 -
1292 -src_compile() {
1293 - # Again, do not want the perl-module src_compile
1294 - default_src_compile
1295 -}
1296 -
1297 -src_install() {
1298 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1299 - source ${TMPENVFILE}
1300 -
1301 - einfo "Doing stock install"
1302 - emake DESTDIR="${D}" install || die
1303 -
1304 - # Build the envdir file
1305 - # Don't forget this..
1306 - einfo "Building environment file"
1307 - (
1308 - echo "# These settings are what was present in the environment when this"
1309 - echo "# Amanda was compiled. Changing anything below this comment will"
1310 - echo "# have no effect on your application, but it merely exists to"
1311 - echo "# preserve them for your next emerge of Amanda"
1312 - cat "${TMPENVFILE}" | sed "s,=\$,='',g"
1313 - ) >> "${MYFILESDIR}/${ENVDFILE}"
1314 -
1315 - # Env.d
1316 - einfo "Installing environment config file"
1317 - doenvd "${MYFILESDIR}/${ENVDFILE}"
1318 -
1319 - # Lock down next section (up until docs).
1320 - insopts -m0640
1321 - # Installing Amanda Xinetd Services Definition
1322 - einfo "Installing xinetd service file"
1323 - insinto /etc/xinetd.d
1324 - if use minimal ; then
1325 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
1326 - else
1327 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
1328 - fi
1329 -
1330 - if ! use minimal; then
1331 - einfo "Installing Sample Daily Cron Job for Amanda"
1332 - insinto /etc/cron.daily
1333 - newins "${MYFILESDIR}/amanda-cron" amanda
1334 - fi
1335 -
1336 - einfo "Installing systemd service and socket files for Amanda"
1337 - systemd_dounit "${FILESDIR}"/amanda.socket || die
1338 - systemd_newunit "${FILESDIR}"/amanda.service-r1 'amanda@.service' || die
1339 -
1340 - insinto /etc/amanda
1341 - einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
1342 - doins "${T}/amandahosts"
1343 - fperms 600 /etc/amanda/amandahosts
1344 -
1345 - dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
1346 - insinto "${AMANDA_USER_HOMEDIR}"
1347 - einfo "Installing .profile for ${AMANDA_USER_NAME} user"
1348 - newins "${MYFILESDIR}/amanda-profile" .profile
1349 -
1350 - insinto /etc/amanda
1351 - doins "${S}/example/amanda-client.conf"
1352 - if ! use minimal ; then
1353 - insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
1354 - doins "${S}/example/amanda.conf"
1355 - doins "${S}/example/disklist"
1356 - keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
1357 - fi
1358 -
1359 - keepdir "${AMANDA_TAR_LISTDIR}"
1360 - keepdir "${AMANDA_USER_HOMEDIR}/amanda"
1361 - keepdir "${AMANDA_TMPDIR}/dumps"
1362 - # Just make sure it exists for XFS to work...
1363 - use xfs && keepdir /var/xfsdump/inventory
1364 -
1365 - local i
1366 - for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
1367 - "${AMANDA_TMPDIR}" /etc/amanda; do
1368 - einfo "Securing directory (${i})"
1369 - fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
1370 - done
1371 - # Do NOT use -R
1372 - fperms 0700 \
1373 - "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
1374 - "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
1375 - "${AMANDA_USER_HOMEDIR}/amanda" \
1376 - /etc/amanda
1377 -
1378 - if ! use minimal ; then
1379 - fperms 0700 \
1380 - "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
1381 - /etc/amanda/${AMANDA_CONFIG_NAME}
1382 - fi
1383 -
1384 - einfo "Setting setuid permissions"
1385 - amanda_permissions_fix "${D}"
1386 -
1387 - # Relax permissions again
1388 - insopts -m0644
1389 -
1390 - # docs
1391 - einfo "Installing documentation"
1392 - dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
1393 - # our inetd sample
1394 - einfo "Installing standard inetd sample"
1395 - newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
1396 - # Amanda example configs
1397 - einfo "Installing example configurations"
1398 - rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
1399 - mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
1400 - docinto example1
1401 - newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
1402 - newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
1403 - newdoc "${FILESDIR}/example_global.conf" global.conf
1404 -
1405 - einfo "Cleaning up dud .la files"
1406 - perl_set_version
1407 - find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
1408 -}
1409 -
1410 -pkg_postinst() {
1411 - [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
1412 - TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
1413 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1414 - source "${TMPENVFILE}"
1415 -
1416 - # Migration of amandates from /etc to $localstatedir/amanda
1417 - if [ -f "${ROOT}/etc/amandates" -a \
1418 - ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
1419 - einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
1420 - einfo "A backup is also placed at /etc/amandates.orig"
1421 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
1422 - mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
1423 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
1424 - fi
1425 - if [ -f "${ROOT}/etc/amandates" ]; then
1426 - einfo "If you have migrated safely, please delete /etc/amandates"
1427 - fi
1428 -
1429 - einfo "Checking setuid permissions"
1430 - amanda_permissions_fix "${ROOT}"
1431 -
1432 - elog "You should configure Amanda in /etc/amanda now."
1433 - elog
1434 - elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
1435 - elog "and restart xinetd afterwards!"
1436 - elog
1437 - elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
1438 - elog "as an example of how to configure your inetd."
1439 - elog
1440 - elog "systemd-users: enable and start amanda.socket or the relevant services"
1441 - elog "regarding what auth method you use."
1442 - elog
1443 - elog "NOTICE: If you need raw access to partitions you need to add the"
1444 - elog "amanda user to the 'disk' group."
1445 - elog
1446 - elog "NOTICE: If you have a tape changer, you need to add the amanda user"
1447 - elog "to the 'tape' group."
1448 - elog
1449 - elog "If you use localhost in your disklist your restores may break."
1450 - elog "You should replace it with the actual hostname!"
1451 - elog "Please also see the syntax changes to amandahosts."
1452 - elog
1453 - elog "Please note that this package no longer explicitly depends on"
1454 - elog "virtual/inetd, as it supports modes where an inetd is not needed"
1455 - elog "(see bug #506028 for details)."
1456 - elog "The only exception is when you use the authentication method 'local'."
1457 -}
1458 -
1459 -# We have had reports of amanda file permissions getting screwed up.
1460 -# Losing setuid, becoming too lax etc.
1461 -# ONLY root and users in the amanda group should be able to run these binaries!
1462 -amanda_permissions_fix() {
1463 - local root="$1"
1464 - [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
1465 - local le="/usr/libexec/amanda"
1466 - for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
1467 - "${le}"/rundump "${le}"/runtar "${le}"/dumper \
1468 - "${le}"/planner ; do
1469 - chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
1470 - chmod u=srwx,g=rx,o= "${root}"/${i}
1471 - done
1472 -}
1473
1474 diff --git a/app-backup/amanda/amanda-3.3.7.ebuild b/app-backup/amanda/amanda-3.3.7.ebuild
1475 deleted file mode 100644
1476 index 0a2e3ed3f5e..00000000000
1477 --- a/app-backup/amanda/amanda-3.3.7.ebuild
1478 +++ /dev/null
1479 @@ -1,474 +0,0 @@
1480 -# Copyright 1999-2015 Gentoo Foundation
1481 -# Distributed under the terms of the GNU General Public License v2
1482 -
1483 -EAPI=5
1484 -inherit autotools eutils perl-module user systemd
1485 -
1486 -DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
1487 -HOMEPAGE="http://www.amanda.org/"
1488 -SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
1489 -
1490 -LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
1491 -SLOT="0"
1492 -IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
1493 -
1494 -KEYWORDS="amd64 ~ppc ppc64 ~sparc ~x86"
1495 -RDEPEND="sys-libs/readline
1496 - virtual/awk
1497 - app-arch/tar
1498 - dev-lang/perl:=
1499 - app-arch/dump
1500 - net-misc/openssh
1501 - >=dev-libs/glib-2.26.0
1502 - nls? ( virtual/libintl )
1503 - s3? ( >=net-misc/curl-7.10.0 )
1504 - !s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
1505 - samba? ( net-fs/samba )
1506 - kerberos? ( app-crypt/mit-krb5 )
1507 - xfs? ( sys-fs/xfsdump )
1508 - readline? ( sys-libs/readline )
1509 - !minimal? (
1510 - dev-perl/XML-Simple
1511 - virtual/mailx
1512 - app-arch/mt-st
1513 - sys-block/mtx
1514 - gnuplot? ( sci-visualization/gnuplot )
1515 - app-crypt/aespipe
1516 - app-crypt/gnupg
1517 - )"
1518 -
1519 -DEPEND="${RDEPEND}
1520 - virtual/pkgconfig
1521 - nls? ( sys-devel/gettext )
1522 - >=app-text/docbook-xsl-stylesheets-1.72.0
1523 - app-text/docbook-xml-dtd
1524 - dev-libs/libxslt
1525 - "
1526 -
1527 -MYFILESDIR="${T}/files"
1528 -ENVDIR="/etc/env.d"
1529 -ENVDFILE="97amanda"
1530 -TMPENVFILE="${T}/${ENVDFILE}"
1531 -
1532 -# This is a complete list of Amanda settings that the ebuild takes from the
1533 -# build environment. This allows users to alter the behavior of the package as
1534 -# upstream intended, but keeping with Gentoo style. We store a copy of them in
1535 -# /etc/env.d/97amanda during the install, so that they are preserved for future
1536 -# installed. This variable name must not start with AMANDA_, as we do not want
1537 -# it captured into the env file.
1538 -ENV_SETTINGS_AMANDA="
1539 -AMANDA_GROUP_GID AMANDA_GROUP_NAME
1540 -AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
1541 -AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
1542 -AMANDA_TAR_LISTDIR AMANDA_TAR
1543 -AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
1544 -AMANDA_CONFIG_NAME AMANDA_TMPDIR"
1545 -
1546 -amanda_variable_setup() {
1547 -
1548 - # Setting vars
1549 - local currentamanda
1550 -
1551 - # Grab the current settings
1552 - currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
1553 -
1554 - # First we set the defaults
1555 - [ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
1556 - [ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
1557 - [ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
1558 - [ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
1559 - [ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
1560 - [ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
1561 - [ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
1562 -
1563 - # This installs Amanda, with the server. However, it could be a client,
1564 - # just specify an alternate server name in AMANDA_SERVER.
1565 - [ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
1566 - [ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
1567 - [ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
1568 - [ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
1569 - [ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
1570 - [ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
1571 - [ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
1572 - # These are left empty by default
1573 - [ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
1574 - [ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
1575 - [ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
1576 - [ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
1577 -
1578 - # What tar to use
1579 - [ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
1580 -
1581 - # Now pull in the old stuff
1582 - if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
1583 - # We don't just source it as we don't want everything in there.
1584 - eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
1585 - fi
1586 -
1587 - # Re-apply the new settings if any
1588 - [ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
1589 -
1590 -}
1591 -
1592 -pkg_setup() {
1593 - amanda_variable_setup
1594 -
1595 - # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
1596 - # another host than HOSTNAME.
1597 - if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
1598 - elog "You are installing a client-only version of Amanda."
1599 - elog "You should set the variable \$AMANDA_SERVER to point at your"
1600 - elog "Amanda-tape-server, otherwise you will have to specify its name"
1601 - elog "when using amrecover on the client."
1602 - elog "For example: Use something like"
1603 - elog "AMANDA_SERVER=\"myserver\" emerge amanda"
1604 - elog
1605 - fi
1606 -
1607 - enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
1608 - enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
1609 -}
1610 -
1611 -src_unpack() {
1612 - # we do not want the perl src_unpack
1613 - default_src_unpack
1614 -}
1615 -
1616 -src_prepare() {
1617 - # gentoo bug #331111
1618 - sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
1619 - sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
1620 -
1621 - # bug with glibc-2.16.0
1622 - sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h
1623 -
1624 - eautoreconf
1625 -
1626 - # places for us to work in
1627 - mkdir -p "${MYFILESDIR}"
1628 - # Now we store the settings we just created
1629 - set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
1630 -
1631 - # Prepare our custom files
1632 - einfo "Building custom configuration files"
1633 - local i # our iterator
1634 - local sedexpr # var for sed expr
1635 - sedexpr=''
1636 - for i in ${ENV_SETTINGS_AMANDA} ; do
1637 - local val
1638 - eval "val=\"\${${i}}\""
1639 - sedexpr="${sedexpr}s|__${i}__|${val}|g;"
1640 - done
1641 -
1642 - # now apply the sed expr
1643 - for i in "${FILESDIR}"/amanda-* ; do
1644 - sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
1645 - done
1646 -
1647 - (
1648 - cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
1649 - use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
1650 - ) > "${T}"/amandahosts
1651 -
1652 - if ! use minimal; then
1653 - sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
1654 - server-src/am{addclient,serverconfig}.pl || die
1655 - fi
1656 -}
1657 -
1658 -src_configure() {
1659 - # fix bug #36316
1660 - addpredict /var/cache/samba/gencache.tdb
1661 - # fix bug #376169
1662 - addpredict /run/blkid
1663 - addpredict /etc/blkid.tab
1664 -
1665 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1666 - source "${TMPENVFILE}"
1667 - local myconf
1668 -
1669 - einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
1670 - myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
1671 - einfo "Using ${AMANDA_SERVER_INDEX} for index server."
1672 - myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
1673 - einfo "Using ${AMANDA_USER_NAME} for amanda user."
1674 - myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
1675 - einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
1676 - myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
1677 - einfo "Using ${AMANDA_TAR} as Tar implementation."
1678 - myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
1679 - einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
1680 - myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
1681 - einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
1682 - myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
1683 - einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
1684 - myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
1685 -
1686 - if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
1687 - eerror "If you want _both_ UDP and TCP ports, please use only the"
1688 - eerror "AMANDA_PORTS environment variable for identical ports, or set"
1689 - eerror "AMANDA_PORTS_BOTH."
1690 - die "Bad port setup!"
1691 - fi
1692 - if [ -n "${AMANDA_PORTS_UDP}" ]; then
1693 - einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
1694 - myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
1695 - fi
1696 - if [ -n "${AMANDA_PORTS_TCP}" ]; then
1697 - einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
1698 - myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
1699 - fi
1700 - if [ -n "${AMANDA_PORTS}" ]; then
1701 - einfo "Using ports ${AMANDA_PORTS/,/-}"
1702 - myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
1703 - fi
1704 -
1705 - # Extras
1706 - # Speed option
1707 - myconf="${myconf} --with-buffered-dump"
1708 - # "debugging" in the configuration is NOT debug in the conventional sense.
1709 - # It is actually just useful output in the application, and should remain
1710 - # enabled. There are some cases of breakage with MTX tape changers as of
1711 - # 2.5.1p2 that it exposes when turned off as well.
1712 - myconf="${myconf} --with-debugging"
1713 - # Where to put our files
1714 - myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
1715 -
1716 - # Samba support
1717 - myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
1718 -
1719 - # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
1720 - # default
1721 - myconf="${myconf} --with-bsd-security"
1722 - myconf="${myconf} --with-ssh-security"
1723 - myconf="${myconf} --with-bsdudp-security"
1724 - myconf="${myconf} --with-bsdtcp-security"
1725 -
1726 - # kerberos-security mechanism version 5
1727 - myconf="${myconf} `use_with kerberos krb5-security`"
1728 -
1729 - # Amazon S3 support
1730 - myconf="${myconf} `use_enable s3 s3-device`"
1731 -
1732 - # libcurl is required for S3 but otherwise optional
1733 - if ! use s3; then
1734 - myconf="${myconf} $(use_with curl libcurl)"
1735 - fi
1736 -
1737 - # Client only, as requested in bug #127725
1738 - if use minimal ; then
1739 - myconf="${myconf} --without-server"
1740 - else
1741 - # amplot
1742 - myconf="${myconf} $(use_with gnuplot)"
1743 - fi
1744 -
1745 - # IPv6 fun.
1746 - myconf="${myconf} `use_with ipv6`"
1747 - # This is to prevent the IPv6-is-working test
1748 - # As the test fails on binpkg build hosts with no IPv6.
1749 - use ipv6 && export amanda_cv_working_ipv6=yes
1750 -
1751 - # I18N
1752 - myconf="${myconf} `use_enable nls`"
1753 -
1754 - # Bug #296634: Perl location
1755 - perl_set_version
1756 - myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
1757 -
1758 - # Bug 296633: --disable-syntax-checks
1759 - # Some tests are not safe for production systems
1760 - myconf="${myconf} --disable-syntax-checks"
1761 -
1762 - # build manpages
1763 - myconf="${myconf} --enable-manpage-build"
1764 -
1765 - # bug #483120
1766 - tc-export AR
1767 -
1768 - econf \
1769 - $(use_with readline) \
1770 - ${myconf}
1771 -}
1772 -
1773 -src_compile() {
1774 - # Again, do not want the perl-module src_compile
1775 - default_src_compile
1776 -}
1777 -
1778 -src_install() {
1779 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1780 - source ${TMPENVFILE}
1781 -
1782 - einfo "Doing stock install"
1783 - emake DESTDIR="${D}" install || die
1784 -
1785 - # Build the envdir file
1786 - # Don't forget this..
1787 - einfo "Building environment file"
1788 - (
1789 - echo "# These settings are what was present in the environment when this"
1790 - echo "# Amanda was compiled. Changing anything below this comment will"
1791 - echo "# have no effect on your application, but it merely exists to"
1792 - echo "# preserve them for your next emerge of Amanda"
1793 - cat "${TMPENVFILE}" | sed "s,=\$,='',g"
1794 - ) >> "${MYFILESDIR}/${ENVDFILE}"
1795 -
1796 - # Env.d
1797 - einfo "Installing environment config file"
1798 - doenvd "${MYFILESDIR}/${ENVDFILE}"
1799 -
1800 - # Lock down next section (up until docs).
1801 - insopts -m0640
1802 - # Installing Amanda Xinetd Services Definition
1803 - einfo "Installing xinetd service file"
1804 - insinto /etc/xinetd.d
1805 - if use minimal ; then
1806 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
1807 - else
1808 - newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
1809 - fi
1810 -
1811 - if ! use minimal; then
1812 - einfo "Installing Sample Daily Cron Job for Amanda"
1813 - insinto /etc/cron.daily
1814 - newins "${MYFILESDIR}/amanda-cron" amanda
1815 - fi
1816 -
1817 - einfo "Installing systemd service and socket files for Amanda"
1818 - systemd_dounit "${FILESDIR}"/amanda.socket || die
1819 - systemd_newunit "${FILESDIR}"/amanda.service-r1 'amanda@.service' || die
1820 -
1821 - insinto /etc/amanda
1822 - einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
1823 - doins "${T}/amandahosts"
1824 - fperms 600 /etc/amanda/amandahosts
1825 -
1826 - dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
1827 - insinto "${AMANDA_USER_HOMEDIR}"
1828 - einfo "Installing .profile for ${AMANDA_USER_NAME} user"
1829 - newins "${MYFILESDIR}/amanda-profile" .profile
1830 -
1831 - insinto /etc/amanda
1832 - doins "${S}/example/amanda-client.conf"
1833 - if ! use minimal ; then
1834 - insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
1835 - doins "${S}/example/amanda.conf"
1836 - doins "${S}/example/disklist"
1837 - keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
1838 - fi
1839 -
1840 - keepdir "${AMANDA_TAR_LISTDIR}"
1841 - keepdir "${AMANDA_USER_HOMEDIR}/amanda"
1842 - keepdir "${AMANDA_TMPDIR}/dumps"
1843 - # Just make sure it exists for XFS to work...
1844 - use xfs && keepdir /var/xfsdump/inventory
1845 -
1846 - local i
1847 - for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
1848 - "${AMANDA_TMPDIR}" /etc/amanda; do
1849 - einfo "Securing directory (${i})"
1850 - fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
1851 - done
1852 - # Do NOT use -R
1853 - fperms 0700 \
1854 - "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
1855 - "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
1856 - "${AMANDA_USER_HOMEDIR}/amanda" \
1857 - /etc/amanda
1858 -
1859 - if ! use minimal ; then
1860 - fperms 0700 \
1861 - "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
1862 - /etc/amanda/${AMANDA_CONFIG_NAME}
1863 - fi
1864 -
1865 - einfo "Setting setuid permissions"
1866 - amanda_permissions_fix "${D}"
1867 -
1868 - # Relax permissions again
1869 - insopts -m0644
1870 -
1871 - # docs
1872 - einfo "Installing documentation"
1873 - dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
1874 - # our inetd sample
1875 - einfo "Installing standard inetd sample"
1876 - newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
1877 - # Amanda example configs
1878 - einfo "Installing example configurations"
1879 - rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
1880 - mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
1881 - docinto example1
1882 - newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
1883 - newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
1884 - newdoc "${FILESDIR}/example_global.conf" global.conf
1885 -
1886 - einfo "Cleaning up dud .la files"
1887 - perl_set_version
1888 - find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
1889 -}
1890 -
1891 -pkg_postinst() {
1892 - [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
1893 - TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
1894 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
1895 - source "${TMPENVFILE}"
1896 -
1897 - # Migration of amandates from /etc to $localstatedir/amanda
1898 - if [ -f "${ROOT}/etc/amandates" -a \
1899 - ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
1900 - einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
1901 - einfo "A backup is also placed at /etc/amandates.orig"
1902 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
1903 - mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
1904 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
1905 - fi
1906 - if [ -f "${ROOT}/etc/amandates" ]; then
1907 - einfo "If you have migrated safely, please delete /etc/amandates"
1908 - fi
1909 -
1910 - einfo "Checking setuid permissions"
1911 - amanda_permissions_fix "${ROOT}"
1912 -
1913 - elog "You should configure Amanda in /etc/amanda now."
1914 - elog
1915 - elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
1916 - elog "and restart xinetd afterwards!"
1917 - elog
1918 - elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
1919 - elog "as an example of how to configure your inetd."
1920 - elog
1921 - elog "systemd-users: enable and start amanda.socket or the relevant services"
1922 - elog "regarding what auth method you use."
1923 - elog
1924 - elog "NOTICE: If you need raw access to partitions you need to add the"
1925 - elog "amanda user to the 'disk' group."
1926 - elog
1927 - elog "NOTICE: If you have a tape changer, you need to add the amanda user"
1928 - elog "to the 'tape' group."
1929 - elog
1930 - elog "If you use localhost in your disklist your restores may break."
1931 - elog "You should replace it with the actual hostname!"
1932 - elog "Please also see the syntax changes to amandahosts."
1933 - elog
1934 - elog "Please note that this package no longer explicitly depends on"
1935 - elog "virtual/inetd, as it supports modes where an inetd is not needed"
1936 - elog "(see bug #506028 for details)."
1937 - elog "The only exception is when you use the authentication method 'local'."
1938 -}
1939 -
1940 -# We have had reports of amanda file permissions getting screwed up.
1941 -# Losing setuid, becoming too lax etc.
1942 -# ONLY root and users in the amanda group should be able to run these binaries!
1943 -amanda_permissions_fix() {
1944 - local root="$1"
1945 - [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
1946 - local le="/usr/libexec/amanda"
1947 - for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
1948 - "${le}"/rundump "${le}"/runtar "${le}"/dumper \
1949 - "${le}"/planner ; do
1950 - chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
1951 - chmod u=srwx,g=rx,o= "${root}"/${i}
1952 - done
1953 -}