1 |
commit: 17ad4efd714800f4a068789d679435304c62178b |
2 |
Author: Stefan G. Weichinger <office <AT> oops <DOT> co <DOT> at> |
3 |
AuthorDate: Mon Dec 4 08:21:23 2017 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 6 03:40:13 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17ad4efd |
7 |
|
8 |
app-backup/amanda: version bump to 3.5.1 |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/6433 |
11 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
12 |
|
13 |
app-backup/amanda/Manifest | 1 + |
14 |
app-backup/amanda/amanda-3.5.1.ebuild | 498 ++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 499 insertions(+) |
16 |
|
17 |
diff --git a/app-backup/amanda/Manifest b/app-backup/amanda/Manifest |
18 |
index 1531d6ae2f2..9deacf3ccff 100644 |
19 |
--- a/app-backup/amanda/Manifest |
20 |
+++ b/app-backup/amanda/Manifest |
21 |
@@ -4,4 +4,5 @@ DIST amanda-3.4.2.tar.gz 5353734 SHA256 175c6a2ef57fe480ddeeefc920a93c8d1cde4111 |
22 |
DIST amanda-3.4.3.tar.gz 5355137 SHA256 8ebca59d7b5fc64179fee3d9de4289cd9e8dbb49558e0a21228b06e16105d688 SHA512 5fa7a8c59961f87568d3459e6b5368e50c6cf74e1a6c7599faf5f85d537e72668775acc11009d1d5699ab92d1c21553b5b86e06b804c6a1ae04500889726694a WHIRLPOOL e1c4cd778d5c71994d2c74fef07948476f367fff42e666fb1b516035746c1e9562b9bf4579875e922c44f8dd65924bf9fec5ca7d30bbee0998540c4c319d18b0 |
23 |
DIST amanda-3.4.4.tar.gz 5363929 SHA256 467e44eccd47170cf8ec40e914a2fbc1e6d50966e6a71c46d96091183c54a3d3 SHA512 e73ee29a6074396a885b08d9b1160b1e379423596dde872a14a8c8cf5845c9fcf3ea08038007a99063169a863d8b9f3ca9c23b8f5609d463a5b1f2ddcd44be96 WHIRLPOOL 221848cd608fd3e45b4f172f56ab691dc2a1dd659f3a5f15df6a2e973daae0964d88fd359c9975147b358289feb77779342f26956b0e693f8683da8d621f04ea |
24 |
DIST amanda-3.4.5.tar.gz 5365381 SHA256 bf05ea512676c7520ccff8d711e17176ea2aec47f7c517669cee02e8ab201343 SHA512 441efef6a34a1cb645c8c5d1e909f25230322ceb38d1efa0a104de2d9051640f7032255c8d8c7391a918102aceeb5073048070471fb642e185a2a113c817e00c WHIRLPOOL c21b1cbf276d60fae48c9178b7ae56416c81af4729341e9251b95c50775a3fdaf147c8d1d0e7c33b9477cd215ea4c0c51ac22e16348d2dfd9af20587d53f4b32 |
25 |
+DIST amanda-3.5.1.tar.gz 5402093 BLAKE2B 4c342fb55b2b5fc0d338a1616bf26b1d844b0ecd6627432b849996c0072756090e1f695050605af0a5c3eda2daeb63131fbe16b5ac728af9137699f4d916b8e8 SHA512 8d5451b6b3f18f9a705592ba6baf8ffb7fb4fe62261eac8a4f4fae4eded3f7f447f547ac6f016bcb57ea43f116cf87fdc48f8e77b117bbdecf00d3e37dd0f39f |
26 |
DIST amanda-3.5.tar.gz 5386719 SHA256 099eb36321b1360ebde6156fb1e75f3e0245520b6f886a0e8e0f31a7a6169be4 SHA512 31340eb250972b2d7b2ad5e51c4f3fafb9de15b9f51f688447214174c77ea89d344f50709ca51d6ba965f8ed6977608f22d7bc6811cc97b63207f7a7cec8219c WHIRLPOOL b6d12e046203f3f553e197215c1da8ed610f07a34ac6b8ca7e5b11846308d1ee490aaaaeee8daeae94b8b6b18fcb18bc26e434dc95042d08b443118ccb504801 |
27 |
|
28 |
diff --git a/app-backup/amanda/amanda-3.5.1.ebuild b/app-backup/amanda/amanda-3.5.1.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..058d9b9ccb9 |
31 |
--- /dev/null |
32 |
+++ b/app-backup/amanda/amanda-3.5.1.ebuild |
33 |
@@ -0,0 +1,498 @@ |
34 |
+# Copyright 1999-2017 Gentoo Foundation |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=6 |
38 |
+inherit autotools perl-module user systemd |
39 |
+ |
40 |
+DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver" |
41 |
+HOMEPAGE="http://www.amanda.org/" |
42 |
+SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz" |
43 |
+ |
44 |
+LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+" |
45 |
+SLOT="0" |
46 |
+IUSE="curl gnuplot ipv6 kerberos minimal ndmp nls readline s3 samba systemd xfs" |
47 |
+ |
48 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" |
49 |
+RDEPEND="sys-libs/readline:= |
50 |
+ virtual/awk |
51 |
+ app-arch/tar |
52 |
+ dev-lang/perl:= |
53 |
+ app-arch/dump |
54 |
+ net-misc/openssh |
55 |
+ >=dev-libs/glib-2.26.0 |
56 |
+ dev-perl/JSON |
57 |
+ dev-perl/Encode-Locale |
58 |
+ nls? ( virtual/libintl ) |
59 |
+ s3? ( >=net-misc/curl-7.10.0 ) |
60 |
+ !s3? ( curl? ( >=net-misc/curl-7.10.0 ) ) |
61 |
+ samba? ( net-fs/samba:= ) |
62 |
+ kerberos? ( app-crypt/mit-krb5 ) |
63 |
+ xfs? ( sys-fs/xfsdump ) |
64 |
+ !minimal? ( |
65 |
+ dev-perl/XML-Simple |
66 |
+ virtual/mailx |
67 |
+ app-arch/mt-st:= |
68 |
+ sys-block/mtx |
69 |
+ gnuplot? ( sci-visualization/gnuplot ) |
70 |
+ app-crypt/aespipe |
71 |
+ app-crypt/gnupg |
72 |
+ )" |
73 |
+ |
74 |
+DEPEND="${RDEPEND} |
75 |
+ virtual/pkgconfig |
76 |
+ nls? ( sys-devel/gettext ) |
77 |
+ >=app-text/docbook-xsl-stylesheets-1.72.0 |
78 |
+ app-text/docbook-xml-dtd |
79 |
+ dev-libs/libxslt |
80 |
+ dev-lang/swig |
81 |
+ " |
82 |
+ |
83 |
+MYFILESDIR="${T}/files" |
84 |
+ENVDIR="/etc/env.d" |
85 |
+ENVDFILE="97amanda" |
86 |
+TMPENVFILE="${T}/${ENVDFILE}" |
87 |
+ |
88 |
+# This is a complete list of Amanda settings that the ebuild takes from the |
89 |
+# build environment. This allows users to alter the behavior of the package as |
90 |
+# upstream intended, but keeping with Gentoo style. We store a copy of them in |
91 |
+# /etc/env.d/97amanda during the install, so that they are preserved for future |
92 |
+# installed. This variable name must not start with AMANDA_, as we do not want |
93 |
+# it captured into the env file. |
94 |
+ENV_SETTINGS_AMANDA=" |
95 |
+AMANDA_GROUP_GID AMANDA_GROUP_NAME |
96 |
+AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS |
97 |
+AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX |
98 |
+AMANDA_TAR_LISTDIR AMANDA_TAR |
99 |
+AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS |
100 |
+AMANDA_CONFIG_NAME AMANDA_TMPDIR" |
101 |
+ |
102 |
+amanda_variable_setup() { |
103 |
+ |
104 |
+ # Setting vars |
105 |
+ local currentamanda |
106 |
+ |
107 |
+ # Grab the current settings |
108 |
+ currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)" |
109 |
+ |
110 |
+ # First we set the defaults |
111 |
+ [[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87 |
112 |
+ [[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda |
113 |
+ [[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda |
114 |
+ [[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87 |
115 |
+ [[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash |
116 |
+ [[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda |
117 |
+ [[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}" |
118 |
+ |
119 |
+ # This installs Amanda, with the server. However, it could be a client, |
120 |
+ # just specify an alternate server name in AMANDA_SERVER. |
121 |
+ [[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}" |
122 |
+ [[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}" |
123 |
+ [[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0" |
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 "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then |
140 |
+ # We don't just source it as we don't want everything in there. |
141 |
+ eval $(egrep "^AMANDA_" "${EROOT}${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 #331111 |
175 |
+ sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die |
176 |
+ sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die |
177 |
+ |
178 |
+ # bug with glibc-2.16.0 |
179 |
+ sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die |
180 |
+ |
181 |
+ eautoreconf |
182 |
+ |
183 |
+ # places for us to work in |
184 |
+ mkdir -p "${MYFILESDIR}" || die |
185 |
+ # Now we store the settings we just created |
186 |
+ set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die |
187 |
+ |
188 |
+ # Prepare our custom files |
189 |
+ einfo "Building custom configuration files" |
190 |
+ local i # our iterator |
191 |
+ local sedexpr # var for sed expr |
192 |
+ sedexpr='' |
193 |
+ for i in ${ENV_SETTINGS_AMANDA} ; do |
194 |
+ local val |
195 |
+ eval "val=\"\${${i}}\"" |
196 |
+ sedexpr="${sedexpr}s|__${i}__|${val}|g;" |
197 |
+ done |
198 |
+ |
199 |
+ # now apply the sed expr |
200 |
+ for i in "${FILESDIR}"/amanda-* ; do |
201 |
+ sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die |
202 |
+ done |
203 |
+ |
204 |
+ if use minimal; then |
205 |
+ cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 > "${T}"/amandahosts || die |
206 |
+ else |
207 |
+ sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \ |
208 |
+ server-src/am{addclient,serverconfig}.pl || die |
209 |
+ cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die |
210 |
+ fi |
211 |
+ |
212 |
+ eapply_user |
213 |
+} |
214 |
+ |
215 |
+src_configure() { |
216 |
+ # fix bug #36316 |
217 |
+ addpredict /var/cache/samba/gencache.tdb |
218 |
+ # fix bug #376169 |
219 |
+ addpredict /run/blkid |
220 |
+ addpredict /etc/blkid.tab |
221 |
+ |
222 |
+ [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!" |
223 |
+ source "${TMPENVFILE}" |
224 |
+ local myconf |
225 |
+ |
226 |
+ einfo "Using ${AMANDA_SERVER_TAPE} for tape server." |
227 |
+ myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}" |
228 |
+ einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server." |
229 |
+ myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}" |
230 |
+ einfo "Using ${AMANDA_SERVER_INDEX} for index server." |
231 |
+ myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}" |
232 |
+ einfo "Using ${AMANDA_USER_NAME} for amanda user." |
233 |
+ myconf="${myconf} --with-user=${AMANDA_USER_NAME}" |
234 |
+ einfo "Using ${AMANDA_GROUP_NAME} for amanda group." |
235 |
+ myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}" |
236 |
+ einfo "Using ${AMANDA_TAR} as Tar implementation." |
237 |
+ myconf="${myconf} --with-gnutar=${AMANDA_TAR}" |
238 |
+ einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir." |
239 |
+ myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}" |
240 |
+ einfo "Using ${AMANDA_CONFIG_NAME} as default config name." |
241 |
+ myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}" |
242 |
+ einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory." |
243 |
+ myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}" |
244 |
+ |
245 |
+ if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then |
246 |
+ eerror "If you want _both_ UDP and TCP ports, please use only the" |
247 |
+ eerror "AMANDA_PORTS environment variable for identical ports, or set" |
248 |
+ eerror "AMANDA_PORTS_BOTH." |
249 |
+ die "Bad port setup!" |
250 |
+ fi |
251 |
+ if [ -n "${AMANDA_PORTS_UDP}" ]; then |
252 |
+ einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}" |
253 |
+ myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}" |
254 |
+ fi |
255 |
+ if [ -n "${AMANDA_PORTS_TCP}" ]; then |
256 |
+ einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}" |
257 |
+ myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}" |
258 |
+ fi |
259 |
+ if [ -n "${AMANDA_PORTS}" ]; then |
260 |
+ einfo "Using ports ${AMANDA_PORTS/,/-}" |
261 |
+ myconf="${myconf} --with-portrange=${AMANDA_PORTS}" |
262 |
+ fi |
263 |
+ |
264 |
+ # Extras |
265 |
+ # Speed option |
266 |
+ myconf="${myconf} --with-buffered-dump" |
267 |
+ # "debugging" in the configuration is NOT debug in the conventional sense. |
268 |
+ # It is actually just useful output in the application, and should remain |
269 |
+ # enabled. There are some cases of breakage with MTX tape changers as of |
270 |
+ # 2.5.1p2 that it exposes when turned off as well. |
271 |
+ myconf="${myconf} --with-debugging" |
272 |
+ # Where to put our files |
273 |
+ myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}" |
274 |
+ |
275 |
+ # Samba support |
276 |
+ myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)" |
277 |
+ |
278 |
+ # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by |
279 |
+ # default |
280 |
+ myconf="${myconf} --with-bsd-security" |
281 |
+ myconf="${myconf} --with-ssh-security" |
282 |
+ myconf="${myconf} --with-bsdudp-security" |
283 |
+ myconf="${myconf} --with-bsdtcp-security" |
284 |
+ |
285 |
+ # kerberos-security mechanism version 5 |
286 |
+ myconf="${myconf} $(use_with kerberos krb5-security)" |
287 |
+ |
288 |
+ # Amazon S3 support |
289 |
+ myconf="${myconf} `use_enable s3 s3-device`" |
290 |
+ |
291 |
+ # libcurl is required for S3 but otherwise optional |
292 |
+ if ! use s3; then |
293 |
+ myconf="${myconf} $(use_with curl libcurl)" |
294 |
+ fi |
295 |
+ |
296 |
+ # Client only, as requested in bug #127725 |
297 |
+ if use minimal ; then |
298 |
+ myconf="${myconf} --without-server" |
299 |
+ else |
300 |
+ # amplot |
301 |
+ myconf="${myconf} $(use_with gnuplot)" |
302 |
+ fi |
303 |
+ |
304 |
+ # IPv6 fun. |
305 |
+ myconf="${myconf} `use_with ipv6`" |
306 |
+ # This is to prevent the IPv6-is-working test |
307 |
+ # As the test fails on binpkg build hosts with no IPv6. |
308 |
+ use ipv6 && export amanda_cv_working_ipv6=yes |
309 |
+ |
310 |
+ # I18N |
311 |
+ myconf="${myconf} `use_enable nls`" |
312 |
+ |
313 |
+ # Bug #296634: Perl location |
314 |
+ perl_set_version |
315 |
+ myconf="${myconf} --with-amperldir=${VENDOR_LIB}" |
316 |
+ |
317 |
+ # Bug 296633: --disable-syntax-checks |
318 |
+ # Some tests are not safe for production systems |
319 |
+ myconf="${myconf} --disable-syntax-checks" |
320 |
+ |
321 |
+ # build manpages |
322 |
+ myconf="${myconf} --enable-manpage-build" |
323 |
+ |
324 |
+ # Bug #636262 |
325 |
+ myconf="${myconf} $(use_with ndmp ndmp)" |
326 |
+ |
327 |
+ # bug #483120 |
328 |
+ tc-export AR |
329 |
+ |
330 |
+ econf \ |
331 |
+ $(use_with readline) \ |
332 |
+ ${myconf} |
333 |
+} |
334 |
+ |
335 |
+src_compile() { |
336 |
+ # Again, do not want the perl-module src_compile |
337 |
+ default_src_compile |
338 |
+} |
339 |
+ |
340 |
+src_install() { |
341 |
+ [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!" |
342 |
+ source ${TMPENVFILE} |
343 |
+ |
344 |
+ einfo "Doing stock install" |
345 |
+ emake DESTDIR="${D}" install |
346 |
+ |
347 |
+ # Build the envdir file |
348 |
+ # Don't forget this.. |
349 |
+ einfo "Building environment file" |
350 |
+ ( |
351 |
+ echo "# These settings are what was present in the environment when this" |
352 |
+ echo "# Amanda was compiled. Changing anything below this comment will" |
353 |
+ echo "# have no effect on your application, but it merely exists to" |
354 |
+ echo "# preserve them for your next emerge of Amanda" |
355 |
+ cat "${TMPENVFILE}" | sed "s,=\$,='',g" |
356 |
+ ) >> "${MYFILESDIR}/${ENVDFILE}" |
357 |
+ |
358 |
+ # Env.d |
359 |
+ einfo "Installing environment config file" |
360 |
+ doenvd "${MYFILESDIR}/${ENVDFILE}" |
361 |
+ |
362 |
+ einfo "Installing systemd service and socket files for Amanda" |
363 |
+ systemd_dounit "${FILESDIR}"/amanda.socket |
364 |
+ systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' |
365 |
+ |
366 |
+ # Lock down next section (up until docs). |
367 |
+ insopts -m0640 |
368 |
+ # Installing Amanda Xinetd Services Definition |
369 |
+ einfo "Installing xinetd service file" |
370 |
+ insinto /etc/xinetd.d |
371 |
+ if use minimal ; then |
372 |
+ newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda |
373 |
+ else |
374 |
+ newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda |
375 |
+ fi |
376 |
+ |
377 |
+ if ! use minimal; then |
378 |
+ einfo "Installing Sample Daily Cron Job for Amanda" |
379 |
+ insinto /etc/cron.daily |
380 |
+ newins "${MYFILESDIR}/amanda-cron" amanda |
381 |
+ fi |
382 |
+ |
383 |
+ insinto /etc/amanda |
384 |
+ einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user" |
385 |
+ doins "${T}/amandahosts" |
386 |
+ fperms 600 /etc/amanda/amandahosts |
387 |
+ |
388 |
+ dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts" |
389 |
+ insinto "${AMANDA_USER_HOMEDIR}" |
390 |
+ einfo "Installing .profile for ${AMANDA_USER_NAME} user" |
391 |
+ newins "${MYFILESDIR}/amanda-profile" .profile |
392 |
+ |
393 |
+ insinto /etc/amanda |
394 |
+ doins "${S}/example/amanda-client.conf" |
395 |
+ if ! use minimal ; then |
396 |
+ insinto "/etc/amanda/${AMANDA_CONFIG_NAME}" |
397 |
+ doins "${S}/example/amanda.conf" |
398 |
+ doins "${S}/example/disklist" |
399 |
+ keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index" |
400 |
+ fi |
401 |
+ |
402 |
+ keepdir "${AMANDA_TAR_LISTDIR}" |
403 |
+ keepdir "${AMANDA_USER_HOMEDIR}/amanda" |
404 |
+ keepdir "${AMANDA_TMPDIR}/dumps" |
405 |
+ # Just make sure it exists for XFS to work... |
406 |
+ use xfs && keepdir /var/xfsdump/inventory |
407 |
+ |
408 |
+ local i |
409 |
+ for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \ |
410 |
+ "${AMANDA_TMPDIR}" /etc/amanda; do |
411 |
+ einfo "Securing directory (${i})" |
412 |
+ fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i} |
413 |
+ done |
414 |
+ # Do NOT use -R |
415 |
+ fperms 0700 \ |
416 |
+ "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \ |
417 |
+ "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \ |
418 |
+ "${AMANDA_USER_HOMEDIR}/amanda" \ |
419 |
+ /etc/amanda |
420 |
+ |
421 |
+ if ! use minimal ; then |
422 |
+ fperms 0700 \ |
423 |
+ "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \ |
424 |
+ /etc/amanda/${AMANDA_CONFIG_NAME} |
425 |
+ fi |
426 |
+ |
427 |
+ einfo "Setting setuid permissions" |
428 |
+ amanda_permissions_fix "${D}" |
429 |
+ |
430 |
+ # Relax permissions again |
431 |
+ insopts -m0644 |
432 |
+ |
433 |
+ # docs |
434 |
+ einfo "Installing documentation" |
435 |
+ dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING |
436 |
+ # our inetd sample |
437 |
+ einfo "Installing standard inetd sample" |
438 |
+ newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample |
439 |
+ # Amanda example configs |
440 |
+ einfo "Installing example configurations" |
441 |
+ rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes} || die |
442 |
+ mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/" || die |
443 |
+ docinto example1 |
444 |
+ newdoc "${FILESDIR}/example_amanda.conf" amanda.conf |
445 |
+ newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist |
446 |
+ newdoc "${FILESDIR}/example_global.conf" global.conf |
447 |
+ |
448 |
+ einfo "Cleaning up dud .la files" |
449 |
+ perl_set_version |
450 |
+ find "${D}"/"${VENDOR_LIB}" -name '*.la' -delete || die |
451 |
+} |
452 |
+ |
453 |
+pkg_postinst() { |
454 |
+ [ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \ |
455 |
+ TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}" |
456 |
+ [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!" |
457 |
+ source "${TMPENVFILE}" |
458 |
+ |
459 |
+ # Migration of amandates from /etc to $localstatedir/amanda |
460 |
+ if [ -f "${ROOT}/etc/amandates" -a \ |
461 |
+ ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then |
462 |
+ einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda" |
463 |
+ einfo "A backup is also placed at /etc/amandates.orig" |
464 |
+ cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig" || die |
465 |
+ mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/" || die |
466 |
+ cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" || die |
467 |
+ fi |
468 |
+ if [ -f "${ROOT}/etc/amandates" ]; then |
469 |
+ einfo "If you have migrated safely, please delete /etc/amandates" |
470 |
+ fi |
471 |
+ |
472 |
+ einfo "Checking setuid permissions" |
473 |
+ amanda_permissions_fix "${ROOT}" |
474 |
+ |
475 |
+ elog "You should configure Amanda in /etc/amanda now." |
476 |
+ elog |
477 |
+ elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda" |
478 |
+ elog "and restart xinetd afterwards!" |
479 |
+ elog |
480 |
+ elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample" |
481 |
+ elog "as an example of how to configure your inetd." |
482 |
+ elog |
483 |
+ elog "systemd-users: enable and start amanda.socket or the relevant services" |
484 |
+ elog "regarding what auth method you use." |
485 |
+ elog |
486 |
+ elog "NOTICE: If you need raw access to partitions you need to add the" |
487 |
+ elog "amanda user to the 'disk' group." |
488 |
+ elog |
489 |
+ elog "NOTICE: If you have a tape changer, you need to add the amanda user" |
490 |
+ elog "to the 'tape' group." |
491 |
+ elog |
492 |
+ elog "If you use localhost in your disklist your restores may break." |
493 |
+ elog "You should replace it with the actual hostname!" |
494 |
+ elog "Please also see the syntax changes to amandahosts." |
495 |
+ elog "The only exception is when you use the authentication method 'local'." |
496 |
+ elog |
497 |
+ elog "Please note that this package no longer explicitly depends on" |
498 |
+ elog "virtual/inetd, as it supports modes where an inetd is not needed" |
499 |
+ elog "(see bug #506028 for details)." |
500 |
+} |
501 |
+ |
502 |
+# We have had reports of amanda file permissions getting screwed up. |
503 |
+# Losing setuid, becoming too lax etc. |
504 |
+# ONLY root and users in the amanda group should be able to run these binaries! |
505 |
+amanda_permissions_fix() { |
506 |
+ local root="$1" |
507 |
+ [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!" |
508 |
+ local le="/usr/libexec/amanda" |
509 |
+ local i |
510 |
+ for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \ |
511 |
+ "${le}"/rundump "${le}"/runtar "${le}"/dumper \ |
512 |
+ "${le}"/planner ; do |
513 |
+ [ -e "${root}"/${i} ] || continue |
514 |
+ chown root:${AMANDA_GROUP_NAME} "${root}"/${i} || die |
515 |
+ chmod u=srwx,g=rx,o= "${root}"/${i} || die |
516 |
+ done |
517 |
+ |
518 |
+ # amanda-security.conf is a config file with similar requirements: |
519 |
+ # writable only by root |
520 |
+ # world-readable |
521 |
+ # 3.3.9: introduced in /etc/amanda-security.conf |
522 |
+ # 3.4.2: moved to /etc/amanda/amanda-security.conf |
523 |
+ f=/etc/amanda/amanda-security.conf |
524 |
+ chown root:root "${root}""${f}" || die |
525 |
+ chmod u=rw,go=r "${root}""${f}" || die |
526 |
+} |
527 |
+ |
528 |
+# We do not want the perl-module tests. |
529 |
+src_test() { |
530 |
+ default_src_test |
531 |
+} |