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/
Date: Wed, 30 Dec 2020 10:26:13
Message-Id: 1609323961.32620cc5b62c287abc06cc551f564f37a7f9942e.soap@gentoo
1 commit: 32620cc5b62c287abc06cc551f564f37a7f9942e
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 30 10:26:01 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 30 10:26:01 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32620cc5
7
8 app-backup/amanda: Clean up ebuild
9
10 Closes: https://github.com/gentoo/gentoo/pull/18872
11 Closes: https://bugs.gentoo.org/762448
12 Package-Manager: Portage-3.0.12, Repoman-3.0.2
13 Signed-off-by: David Seifert <soap <AT> gentoo.org>
14
15 ...anda-3.5.1-r2.ebuild => amanda-3.5.1-r3.ebuild} | 240 ++++++++++-----------
16 1 file changed, 116 insertions(+), 124 deletions(-)
17
18 diff --git a/app-backup/amanda/amanda-3.5.1-r2.ebuild b/app-backup/amanda/amanda-3.5.1-r3.ebuild
19 similarity index 70%
20 rename from app-backup/amanda/amanda-3.5.1-r2.ebuild
21 rename to app-backup/amanda/amanda-3.5.1-r3.ebuild
22 index 98bcf0c20ae..81acd43577d 100644
23 --- a/app-backup/amanda/amanda-3.5.1-r2.ebuild
24 +++ b/app-backup/amanda/amanda-3.5.1-r3.ebuild
25 @@ -72,7 +72,6 @@ AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
26 AMANDA_CONFIG_NAME AMANDA_TMPDIR"
27
28 amanda_variable_setup() {
29 -
30 # Setting vars
31 local currentamanda
32
33 @@ -86,32 +85,31 @@ amanda_variable_setup() {
34
35 # This installs Amanda, with the server. However, it could be a client,
36 # just specify an alternate server name in AMANDA_SERVER.
37 - [[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
38 - [[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
39 - [[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
40 - [[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
41 - [[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
42 - [[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
43 - [[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
44 - [[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
45 + : ${AMANDA_SERVER:=${HOSTNAME}}
46 + : ${AMANDA_SERVER_TAPE:=${AMANDA_SERVER}}
47 + : ${AMANDA_SERVER_TAPE_DEVICE:="${EPREFIX}"/dev/nst0}
48 + : ${AMANDA_SERVER_INDEX:=${AMANDA_SERVER}}
49 + : ${AMANDA_TAR_LISTDIR:=${AMANDA_USER_HOMEDIR}/tar-lists}
50 + : ${AMANDA_CONFIG_NAME:=DailySet1}
51 + : ${AMANDA_TMPDIR:="${EPREFIX}"/var/tmp/amanda}
52 + : ${AMANDA_DBGDIR:=${AMANDA_TMPDIR}}
53 # These are left empty by default
54 - [[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
55 - [[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
56 - [[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
57 - [[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
58 + : ${AMANDA_PORTS_UDP:=""}
59 + : ${AMANDA_PORTS_TCP:=""}
60 + : ${AMANDA_PORTS_BOTH:=""}
61 + : ${AMANDA_PORTS:=""}
62
63 # What tar to use
64 - [[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
65 + : ${AMANDA_TAR:=/bin/tar}
66
67 # Now pull in the old stuff
68 - if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
69 + if [[ -f ${EROOT}${ENVDIR}/${ENVDFILE} ]]; then
70 # We don't just source it as we don't want everything in there.
71 eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
72 fi
73
74 # Re-apply the new settings if any
75 - [ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
76 -
77 + [[ -n ${currentamanda} ]] && eval $(echo "${currentamanda}")
78 }
79
80 pkg_setup() {
81 @@ -119,7 +117,7 @@ pkg_setup() {
82
83 # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
84 # another host than HOSTNAME.
85 - if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
86 + if use minimal && [[ ${AMANDA_SERVER} == ${HOSTNAME} ]]; then
87 elog "You are installing a client-only version of Amanda."
88 elog "You should set the variable \$AMANDA_SERVER to point at your"
89 elog "Amanda-tape-server, otherwise you will have to specify its name"
90 @@ -132,7 +130,7 @@ pkg_setup() {
91
92 src_unpack() {
93 # we do not want the perl src_unpack
94 - default_src_unpack
95 + default
96 }
97
98 src_prepare() {
99 @@ -159,14 +157,14 @@ src_prepare() {
100 local i # our iterator
101 local sedexpr # var for sed expr
102 sedexpr=''
103 - for i in ${ENV_SETTINGS_AMANDA} ; do
104 + for i in ${ENV_SETTINGS_AMANDA}; do
105 local val
106 eval "val=\"\${${i}}\""
107 sedexpr="${sedexpr}s|__${i}__|${val}|g;"
108 done
109
110 # now apply the sed expr
111 - for i in "${FILESDIR}"/amanda-* ; do
112 + for i in "${FILESDIR}"/amanda-*; do
113 sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
114 done
115
116 @@ -188,126 +186,155 @@ src_configure() {
117 addpredict /run/blkid
118 addpredict /etc/blkid.tab
119
120 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
121 + [[ ! -f ${TMPENVFILE} ]] && die "Variable setting file (${TMPENVFILE}) should exist!"
122 source "${TMPENVFILE}"
123 - local myconf
124 + local myconf=()
125
126 einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
127 - myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
128 + myconf+=( --with-tape-server="${AMANDA_SERVER_TAPE}" )
129 einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
130 - myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
131 + myconf+=( --with-tape-device="${AMANDA_SERVER_TAPE_DEVICE}" )
132 einfo "Using ${AMANDA_SERVER_INDEX} for index server."
133 - myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
134 + myconf+=( --with-index-server="${AMANDA_SERVER_INDEX}" )
135 einfo "Using ${AMANDA_USER_NAME} for amanda user."
136 - myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
137 + myconf+=( --with-user="${AMANDA_USER_NAME}" )
138 einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
139 - myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
140 + myconf+=( --with-group="${AMANDA_GROUP_NAME}" )
141 einfo "Using ${AMANDA_TAR} as Tar implementation."
142 - myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
143 + myconf+=( --with-gnutar="${AMANDA_TAR}" )
144 einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
145 - myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
146 + myconf+=( --with-gnutar-listdir="${AMANDA_TAR_LISTDIR}" )
147 einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
148 - myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
149 + myconf+=( --with-config="${AMANDA_CONFIG_NAME}" )
150 einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
151 - myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
152 + myconf+=( --with-tmpdir="${AMANDA_TMPDIR}" )
153
154 - if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
155 + if [[ -n ${AMANDA_PORTS_UDP} && -n ${AMANDA_PORTS_TCP} && -z ${AMANDA_PORTS_BOTH} ]]; then
156 eerror "If you want _both_ UDP and TCP ports, please use only the"
157 eerror "AMANDA_PORTS environment variable for identical ports, or set"
158 eerror "AMANDA_PORTS_BOTH."
159 die "Bad port setup!"
160 fi
161 - if [ -n "${AMANDA_PORTS_UDP}" ]; then
162 + if [[ -n ${AMANDA_PORTS_UDP} ]]; then
163 einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
164 - myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
165 + myconf+=( --with-udpportrange="${AMANDA_PORTS_UDP}" )
166 fi
167 - if [ -n "${AMANDA_PORTS_TCP}" ]; then
168 + if [[ -n ${AMANDA_PORTS_TCP} ]]; then
169 einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
170 - myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
171 + myconf+=( --with-tcpportrange="${AMANDA_PORTS_TCP}" )
172 fi
173 - if [ -n "${AMANDA_PORTS}" ]; then
174 + if [[ -n ${AMANDA_PORTS} ]]; then
175 einfo "Using ports ${AMANDA_PORTS/,/-}"
176 - myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
177 + myconf+=( --with-portrange="${AMANDA_PORTS}" )
178 fi
179
180 # Extras
181 # Speed option
182 - myconf="${myconf} --with-buffered-dump"
183 + myconf+=( --with-buffered-dump )
184 # "debugging" in the configuration is NOT debug in the conventional sense.
185 # It is actually just useful output in the application, and should remain
186 # enabled. There are some cases of breakage with MTX tape changers as of
187 # 2.5.1p2 that it exposes when turned off as well.
188 - myconf="${myconf} --with-debugging"
189 + myconf+=( --with-debugging )
190 # Where to put our files
191 - myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
192 + myconf+=( --localstatedir="${AMANDA_USER_HOMEDIR}" )
193
194 # Samba support
195 - myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
196 + myconf+=( $(use_with samba smbclient /usr/bin/smbclient) )
197
198 # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
199 # default
200 - myconf="${myconf} --with-bsd-security"
201 - myconf="${myconf} --with-ssh-security"
202 - myconf="${myconf} --with-bsdudp-security"
203 - myconf="${myconf} --with-bsdtcp-security"
204 + myconf+=( --with-bsd-security )
205 + myconf+=( --with-ssh-security )
206 + myconf+=( --with-bsdudp-security )
207 + myconf+=( --with-bsdtcp-security )
208
209 # kerberos-security mechanism version 5
210 - myconf="${myconf} $(use_with kerberos krb5-security)"
211 + myconf+=( $(use_with kerberos krb5-security) )
212
213 # Amazon S3 support
214 - myconf="${myconf} `use_enable s3 s3-device`"
215 + myconf+=( $(use_enable s3 s3-device) )
216
217 # libcurl is required for S3 but otherwise optional
218 if ! use s3; then
219 - myconf="${myconf} $(use_with curl libcurl)"
220 + myconf+=( $(use_with curl libcurl) )
221 fi
222
223 # Client only, as requested in bug #127725
224 - if use minimal ; then
225 - myconf="${myconf} --without-server"
226 + if use minimal; then
227 + myconf+=( --without-server )
228 else
229 # amplot
230 - myconf="${myconf} $(use_with gnuplot)"
231 + myconf+=( $(use_with gnuplot) )
232 fi
233
234 # IPv6 fun.
235 - myconf="${myconf} `use_with ipv6`"
236 + myconf+=( $(use_with ipv6) )
237 # This is to prevent the IPv6-is-working test
238 # As the test fails on binpkg build hosts with no IPv6.
239 use ipv6 && export amanda_cv_working_ipv6=yes
240
241 # I18N
242 - myconf="${myconf} `use_enable nls`"
243 + myconf+=( $(use_enable nls) )
244
245 # Bug #296634: Perl location
246 perl_set_version
247 - myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
248 + myconf+=( --with-amperldir="${VENDOR_LIB}" )
249
250 # Bug 296633: --disable-syntax-checks
251 # Some tests are not safe for production systems
252 - myconf="${myconf} --disable-syntax-checks"
253 + myconf+=( --disable-syntax-checks )
254
255 # build manpages
256 - myconf="${myconf} --enable-manpage-build"
257 + myconf+=( --enable-manpage-build )
258
259 # Bug #636262
260 - myconf="${myconf} $(use_with ndmp ndmp)"
261 + myconf+=( $(use_with ndmp ndmp) )
262
263 # bug #483120
264 tc-export AR
265
266 econf \
267 + --disable-static \
268 $(use_with readline) \
269 - ${myconf}
270 + "${myconf[@]}"
271 }
272
273 src_compile() {
274 # Again, do not want the perl-module src_compile
275 - default_src_compile
276 + default
277 +}
278 +
279 +# We do not want the perl-module tests.
280 +src_test() {
281 + default
282 +}
283 +
284 +# We have had reports of amanda file permissions getting screwed up.
285 +# Losing setuid, becoming too lax etc.
286 +# ONLY root and users in the amanda group should be able to run these binaries!
287 +amanda_permissions_fix() {
288 + local root="$1"
289 + [[ -z ${root} ]] && die "Failed to pass root argument to amanda_permissions_fix!"
290 + local i le=/usr/libexec/amanda
291 + for i in "${le}"/calcsize "${le}"/killpgrp "${le}"/rundump "${le}"/runtar; do
292 + [[ -e ${root}/${i} ]] || continue
293 + chown root:${AMANDA_GROUP_NAME} "${root}"/${i} || die
294 + chmod u=srwx,g=rx,o= "${root}"/${i} || die
295 + done
296 +
297 + # amanda-security.conf is a config file with similar requirements:
298 + # writable only by root
299 + # world-readable
300 + # 3.3.9: introduced in /etc/amanda-security.conf
301 + # 3.4.2: moved to /etc/amanda/amanda-security.conf
302 + f=/etc/amanda/amanda-security.conf
303 + chown root:root "${root}""${f}" || die
304 + chmod u=rw,go=r "${root}""${f}" || die
305 }
306
307 src_install() {
308 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
309 + [[ ! -f ${TMPENVFILE} ]] && die "Variable setting file (${TMPENVFILE}) should exist!"
310 source ${TMPENVFILE}
311
312 einfo "Doing stock install"
313 @@ -315,18 +342,14 @@ src_install() {
314
315 # Build the envdir file
316 # Don't forget this..
317 - einfo "Building environment file"
318 - (
319 - echo "# These settings are what was present in the environment when this"
320 - echo "# Amanda was compiled. Changing anything below this comment will"
321 - echo "# have no effect on your application, but it merely exists to"
322 - echo "# preserve them for your next emerge of Amanda"
323 - cat "${TMPENVFILE}" | sed "s,=\$,='',g"
324 - ) >> "${MYFILESDIR}/${ENVDFILE}"
325 -
326 - # Env.d
327 einfo "Installing environment config file"
328 - doenvd "${MYFILESDIR}/${ENVDFILE}"
329 + newenvd - "${ENVDFILE}" <<- _EOF_
330 + # These settings are what was present in the environment when this
331 + # Amanda was compiled. Changing anything below this comment will
332 + # have no effect on your application, but it merely exists to
333 + # preserve them for your next emerge of Amanda
334 + $(cat "${TMPENVFILE}" | sed "s,=\$,='',g")
335 + _EOF_
336
337 einfo "Installing systemd service and socket files for Amanda"
338 systemd_dounit "${FILESDIR}"/amanda.socket
339 @@ -337,7 +360,7 @@ src_install() {
340 # Installing Amanda Xinetd Services Definition
341 einfo "Installing xinetd service file"
342 insinto /etc/xinetd.d
343 - if use minimal ; then
344 + if use minimal; then
345 newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
346 else
347 newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
348 @@ -360,11 +383,11 @@ src_install() {
349 newins "${MYFILESDIR}"/amanda-profile .profile
350
351 insinto /etc/amanda
352 - doins "${S}/example/amanda-client.conf"
353 - if ! use minimal ; then
354 + doins example/amanda-client.conf
355 + if ! use minimal; then
356 insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
357 - doins "${S}/example/amanda.conf"
358 - doins "${S}/example/disklist"
359 + doins example/amanda.conf
360 + doins example/disklist
361 keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
362 fi
363
364 @@ -386,14 +409,14 @@ src_install() {
365 "${AMANDA_USER_HOMEDIR}/amanda" \
366 /etc/amanda
367
368 - if ! use minimal ; then
369 + if ! use minimal; then
370 fperms 0700 \
371 "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
372 /etc/amanda/${AMANDA_CONFIG_NAME}
373 fi
374
375 einfo "Setting setuid permissions"
376 - amanda_permissions_fix "${D}"
377 + amanda_permissions_fix "${ED}"
378
379 # Relax permissions again
380 insopts -m0644
381 @@ -403,11 +426,11 @@ src_install() {
382 dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
383 # our inetd sample
384 einfo "Installing standard inetd sample"
385 - newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
386 + newdoc "${MYFILESDIR}"/amanda-inetd.amanda.sample-2.6.0_p2-r2 amanda-inetd.amanda.sample
387 # Amanda example configs
388 einfo "Installing example configurations"
389 - rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes} || die
390 - mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/" || die
391 + rm "${ED}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes} || die
392 + mv "${ED}"/usr/share/amanda/example "${ED}"/usr/share/doc/${PF}/ || die
393 docinto example1
394 newdoc "${FILESDIR}"/example_amanda.conf amanda.conf
395 newdoc "${FILESDIR}"/example_disklist-2.5.1_p3-r1 disklist
396 @@ -415,30 +438,29 @@ src_install() {
397
398 einfo "Cleaning up dud .la files"
399 perl_set_version
400 - find "${D}"/"${VENDOR_LIB}" -name '*.la' -delete || die
401 +
402 + find "${ED}" -name '*.la' -delete || die
403 }
404
405 pkg_postinst() {
406 - [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
407 - TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
408 - [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
409 + [[ ! -f ${TMPENVFILE} && ${MERGE_TYPE} == "binary" ]] && TMPENVFILE="${EROOT}${ENVDIR}/${ENVDFILE}"
410 + [[ ! -f ${TMPENVFILE} ]] && die "Variable setting file (${TMPENVFILE}) should exist!"
411 source "${TMPENVFILE}"
412
413 # Migration of amandates from /etc to $localstatedir/amanda
414 - if [ -f "${ROOT}/etc/amandates" -a \
415 - ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
416 + if [[ -f ${EROOT}/etc/amandates && ! -f ${EROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates ]]; then
417 einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
418 einfo "A backup is also placed at /etc/amandates.orig"
419 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig" || die
420 - mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/" || die
421 - cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" || die
422 + cp -dp "${EROOT}"/etc/amandates "${EROOT}"/etc/amandates.orig || die
423 + mkdir -p "${EROOT}/${AMANDA_USER_HOMEDIR}/amanda/" || die
424 + cp -dp "${EROOT}"/etc/amandates "${EROOT}"/${AMANDA_USER_HOMEDIR}/amanda/amandates || die
425 fi
426 - if [ -f "${ROOT}/etc/amandates" ]; then
427 + if [[ -f ${EROOT}/etc/amandates ]]; then
428 einfo "If you have migrated safely, please delete /etc/amandates"
429 fi
430
431 einfo "Checking setuid permissions"
432 - amanda_permissions_fix "${ROOT}"
433 + amanda_permissions_fix "${EROOT}"/
434
435 elog "You should configure Amanda in /etc/amanda now."
436 elog
437 @@ -466,33 +488,3 @@ pkg_postinst() {
438 elog "virtual/inetd, as it supports modes where an inetd is not needed"
439 elog "(see bug #506028 for details)."
440 }
441 -
442 -# We have had reports of amanda file permissions getting screwed up.
443 -# Losing setuid, becoming too lax etc.
444 -# ONLY root and users in the amanda group should be able to run these binaries!
445 -amanda_permissions_fix() {
446 - local root="$1"
447 - [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
448 - local le="/usr/libexec/amanda"
449 - local i
450 - for i in "${le}"/calcsize "${le}"/killpgrp \
451 - "${le}"/rundump "${le}"/runtar ; do
452 - [ -e "${root}"/${i} ] || continue
453 - chown root:${AMANDA_GROUP_NAME} "${root}"/${i} || die
454 - chmod u=srwx,g=rx,o= "${root}"/${i} || die
455 - done
456 -
457 - # amanda-security.conf is a config file with similar requirements:
458 - # writable only by root
459 - # world-readable
460 - # 3.3.9: introduced in /etc/amanda-security.conf
461 - # 3.4.2: moved to /etc/amanda/amanda-security.conf
462 - f=/etc/amanda/amanda-security.conf
463 - chown root:root "${root}""${f}" || die
464 - chmod u=rw,go=r "${root}""${f}" || die
465 -}
466 -
467 -# We do not want the perl-module tests.
468 -src_test() {
469 - default_src_test
470 -}