summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Solano Gómez <gentoo@sattvik.com>2010-06-18 20:13:39 -0500
committerDaniel Solano Gómez <gentoo@sattvik.com>2010-06-18 20:13:39 -0500
commit603f76991ec7b759c0c46d713dbe4707e452bba8 (patch)
treec8b3cb95bc07be7bfb8cc0f1bc6e7ac528b3edf4 /app-backup
parentVersion bump of rxvt-unicode (diff)
downloadsattvik-603f76991ec7b759c0c46d713dbe4707e452bba8.tar.gz
sattvik-603f76991ec7b759c0c46d713dbe4707e452bba8.tar.bz2
sattvik-603f76991ec7b759c0c46d713dbe4707e452bba8.zip
Add Amanda with glib thread fix.
Diffstat (limited to 'app-backup')
-rw-r--r--app-backup/amanda/ChangeLog24
-rw-r--r--app-backup/amanda/Manifest28
-rw-r--r--app-backup/amanda/amanda-2.6.1_p2.ebuild415
-rw-r--r--app-backup/amanda/files/amanda-2.6.0_p2-syslocpath.patch19
-rw-r--r--app-backup/amanda/files/amanda-2.6.0p2-amcrypt-ossl-asym-race-fix.patch75
-rw-r--r--app-backup/amanda/files/amanda-2.6.1_p2-glib-2.24.1-thread-fix.patch51
-rw-r--r--app-backup/amanda/files/amanda-amandahosts8
-rw-r--r--app-backup/amanda/files/amanda-amandahosts-client-2.5.1_p3-r18
-rw-r--r--app-backup/amanda/files/amanda-amandahosts-server-2.5.1_p3-r18
-rw-r--r--app-backup/amanda/files/amanda-cron13
-rw-r--r--app-backup/amanda/files/amanda-devfs7
-rw-r--r--app-backup/amanda/files/amanda-inetd.amanda.sample3
-rw-r--r--app-backup/amanda/files/amanda-inetd.amanda.sample-2.5.1_p3-r13
-rw-r--r--app-backup/amanda/files/amanda-inetd.amanda.sample-2.6.0_p2-r23
-rw-r--r--app-backup/amanda/files/amanda-profile1
-rw-r--r--app-backup/amanda/files/amanda-xinetd48
-rw-r--r--app-backup/amanda/files/amanda-xinetd-2.5.1_p3-r149
-rw-r--r--app-backup/amanda/files/amanda-xinetd-2.6.0_p2-r248
-rw-r--r--app-backup/amanda/files/amanda-xinetd-2.6.1_p1-client19
-rw-r--r--app-backup/amanda/files/amanda-xinetd-2.6.1_p1-server19
-rw-r--r--app-backup/amanda/files/example_amanda.conf44
-rw-r--r--app-backup/amanda/files/example_disklist2
-rw-r--r--app-backup/amanda/files/example_disklist-2.5.1_p3-r14
-rw-r--r--app-backup/amanda/files/example_global.conf78
-rw-r--r--app-backup/amanda/files/patch-tar-1.14.9026
-rw-r--r--app-backup/amanda/files/s3-list-keys.diff61
-rw-r--r--app-backup/amanda/files/s3.c.part2.diff15
-rw-r--r--app-backup/amanda/metadata.xml25
28 files changed, 1104 insertions, 0 deletions
diff --git a/app-backup/amanda/ChangeLog b/app-backup/amanda/ChangeLog
new file mode 100644
index 0000000..98b0572
--- /dev/null
+++ b/app-backup/amanda/ChangeLog
@@ -0,0 +1,24 @@
+# ChangeLog for app-backup/amanda
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*amanda-2.6.1_p2 (19 Jun 2010)
+
+ 19 Jun 2010; Daniel Solano Gómez <gentoo@sattvik.com>
+ +files/patch-tar-1.14.90, +files/amanda-amandahosts-client-2.5.1_p3-r1,
+ +files/amanda-amandahosts-server-2.5.1_p3-r1,
+ +files/amanda-inetd.amanda.sample-2.5.1_p3-r1,
+ +files/amanda-xinetd-2.5.1_p3-r1, +files/example_disklist-2.5.1_p3-r1,
+ +files/amanda-inetd.amanda.sample-2.6.0_p2-r2,
+ +files/amanda-xinetd-2.6.0_p2-r2, +files/amanda-2.6.0_p2-syslocpath.patch,
+ +files/amanda-2.6.0p2-amcrypt-ossl-asym-race-fix.patch,
+ +amanda-2.6.1_p2.ebuild, +files/amanda-xinetd-2.6.1_p1-client,
+ +files/amanda-xinetd-2.6.1_p1-server,
+ +files/amanda-2.6.1_p2-glib-2.24.1-thread-fix.patch,
+ +files/amanda-amandahosts, +files/amanda-cron, +files/amanda-devfs,
+ +files/amanda-inetd.amanda.sample, +files/amanda-profile,
+ +files/amanda-xinetd, +files/example_amanda.conf, +files/example_disklist,
+ +files/example_global.conf, +files/s3-list-keys.diff,
+ +files/s3.c.part2.diff, +metadata.xml:
+ Amanda 2.6.1_p2 with glib 2.24.1 fix
+
diff --git a/app-backup/amanda/Manifest b/app-backup/amanda/Manifest
new file mode 100644
index 0000000..247a5ae
--- /dev/null
+++ b/app-backup/amanda/Manifest
@@ -0,0 +1,28 @@
+AUX amanda-2.6.0_p2-syslocpath.patch 965 RMD160 16b4ee50822a0c97d717dcf0c8c2644c984d1076 SHA1 442f40c16acaf0d48c3b3d615329c1389a9b0e2b SHA256 70f19629852cb02876bac21a119acc30b94822126f5828d4e453af1ae47bc398
+AUX amanda-2.6.0p2-amcrypt-ossl-asym-race-fix.patch 2713 RMD160 012e4a323de90f6fc266ba39df1e24184f891194 SHA1 7035280b3f89f652ab5d18b0062f07ee3990329d SHA256 4ef8b55a79f1dc7ccd604bf308afbe3949baf55f9eab9ef2556f9c0f4f48a6e8
+AUX amanda-2.6.1_p2-glib-2.24.1-thread-fix.patch 1270 RMD160 cbd38017bb3fc7fff147900c5294f5b850131f26 SHA1 276c756a85de5fb02905e3312dcd1538cc3a9e26 SHA256 83640d98ffb244ff67c5a26810887a08e9b36483d8060c3dc68432a1d0e7ef30
+AUX amanda-amandahosts 339 RMD160 534c47134ff53faac312ee21c4b5f27752452cce SHA1 8b8a3245681f6a203f2b60a64ee0ece2d4405c11 SHA256 52825d4feba9a74d42740e9807c2a563e52e08ae5c55092a54033dc6d49f517c
+AUX amanda-amandahosts-client-2.5.1_p3-r1 343 RMD160 f5526644c7c9ec517f648b374d35dcbecd73de97 SHA1 c3e1e6a800b5b9ae26e218730d60817f8ddd8847 SHA256 26a446ae74aafcb90a05bb66430b70e35c5536ee9e42137abc7925bf1175e84e
+AUX amanda-amandahosts-server-2.5.1_p3-r1 340 RMD160 0680e414089f5bec2540404f8d74708602d703b1 SHA1 8920c2adb0a9a0e55eb15238630d93e9d54433a2 SHA256 9e07c28b344ff42c6a8f31af2d9dac780a00ff28e40850a0b115e26990ecc0e7
+AUX amanda-cron 419 RMD160 97b13e25afc88d64f0320a08189b4e7b4c7fa054 SHA1 ff4835e78c7a9abd10b8cd79c1d9d744a2782af1 SHA256 17e1a36c21264a9b254e64e9b7529d70402acd40772d158795490ac5fc08b01a
+AUX amanda-devfs 349 RMD160 8ea1eb8f64c9e8238e95b92b5f6524e3170165d9 SHA1 f280b06b7a3ad205637daedaf170bf38f83918f0 SHA256 f21584bc65947e3ac671f89af04966aafd751360ef0465ce8ca1a249b0ee253a
+AUX amanda-inetd.amanda.sample 194 RMD160 070aea45f4be953906ba8e91e9144bec8f78aad7 SHA1 67848d531fe7280375d10bd8bd12d00ab333a70f SHA256 a08952b4468ecc80fb8e140aca5d4fb8b849c7d5da24a2b1c550551b50fbee15
+AUX amanda-inetd.amanda.sample-2.5.1_p3-r1 305 RMD160 72306e99703218b2b304c024e3bd624a7ea6aa7e SHA1 8bbdcee99527ec9ab5b4e7bd7afbc5b9a39d8199 SHA256 49bf1548ca8e3e640151b79a5c827ea3211bafb4036aa67572b7096b46ac6014
+AUX amanda-inetd.amanda.sample-2.6.0_p2-r2 326 RMD160 ea21b25849158eae590a6689132fe29f95d0fb40 SHA1 8a66d3f6428032a1fa92bcb4d385190bdd3f7266 SHA256 4056a53e1a6f3dd5527da9fd85e810e21ebab0fe9100043b2ac165743d5a9b79
+AUX amanda-profile 49 RMD160 2958487df40529f0d692f02f2343b633d34853a6 SHA1 80da3900ace9b4069b7cae11cfc5da5a6670f010 SHA256 5781459910f0f72b1bfe15d758f17e7d6c8e33b5856b62a8d5cedf64a2917e76
+AUX amanda-xinetd 1502 RMD160 d09e925fce9a8a61be12735dd6d3fa0abd7129f5 SHA1 1f33fc86553b4c5434725cf736620dbaee9f25ac SHA256 d6f411ab0bfaadf03060a48bf29d68a7a039db6cea8f25b8b28ca9d01168a6aa
+AUX amanda-xinetd-2.5.1_p3-r1 1558 RMD160 c23a1a86062dbe8d55b891c1bd7bba9186ba3036 SHA1 dbe41cf8a7969f77ba87e9125a2e87f719532988 SHA256 4952a00d0ece67da7cfb648baa2c758aebcebf5303e326e5aa30e04a57db8b6d
+AUX amanda-xinetd-2.6.0_p2-r2 1523 RMD160 2c1cff435afbe4959361255b9fc848930a641358 SHA1 5f8d64892254dc18913838640e09de18fb438257 SHA256 eab5ab7ae44f8ad32c3e6e42f74aad0f618b8149339f63604aae167213748bc1
+AUX amanda-xinetd-2.6.1_p1-client 640 RMD160 26305ff81f68b52ea46cc3d9449966baa8ec8148 SHA1 8f480b1ddebfe4764df38bdec2d0ab01d14302ea SHA256 1581e772a0c7fccc29bd4b19b3e1c8a04942c7d683dc269b4de16826a362a259
+AUX amanda-xinetd-2.6.1_p1-server 660 RMD160 b08eb2c295819ade8e20fedcfbbcec88e09d58c2 SHA1 69b8d4fc9ab00ec0aa0ed9d2c906dbb181c24dcc SHA256 a43edca3dcd152cd886d13c4ceb963b1e450909bbec257c9e7ac4382de616ac8
+AUX example_amanda.conf 635 RMD160 1214396161457bb71cd6a31e23d6cb78482e20e7 SHA1 4368b8d7908e49963bc144c68119a32c047877ff SHA256 a1b0520fb0fca0f4146c59589987fffa637a0ce643a91d6d71dde6f538faf325
+AUX example_disklist 55 RMD160 42e25ba19c331578cb6472926048defc7196ab2c SHA1 3d8ae2e4c17c16e216c6a9a5401dc87947ab24df SHA256 ce5fe7642fe0cbca7968007fb6fce393500eee3525aed97465d0b8b529941ef8
+AUX example_disklist-2.5.1_p3-r1 177 RMD160 e9f8f4dda3d7f022e1e60b556a713a9b891b5845 SHA1 8d35a5fe8ba9f3f30659684e17bae0e69d51196b SHA256 bc0388e7de0cc36888d3b27430b4a6b138dd39c77263fdc53dfee9f0b93142f8
+AUX example_global.conf 1377 RMD160 009e5039f94938c8521e58236da6027d7ec33766 SHA1 2e75914f18ed478c5cd1cd1bb9b0570fa2d20e82 SHA256 5223d061cd160b241e0d1fad1e328d241387fecb753e797d2e216f77d97a8808
+AUX patch-tar-1.14.90 984 RMD160 8b5fdfbd84450a0b462ca64b4ff3cfaf0d697beb SHA1 2c88f1ddff0c2efce109894d046ec419c1da5c84 SHA256 9aa5da6b3ee484daf2d762ec51a5e3c6f329d545b225c3ee088265d4efdddda2
+AUX s3-list-keys.diff 2561 RMD160 e94eebd3a1a564477cb3aa9961287d24c1fed601 SHA1 f1a932d768a8711004e6e6eabedbbcaf4fce5fc7 SHA256 29d1586d690de8651185571255ad5902047bd624f847ceb10d0f4008c062ed37
+AUX s3.c.part2.diff 528 RMD160 6c142a8f875891c6ec7b1f9b0cabe14ddca907fe SHA1 da1924176ec9c760f453382b886af251f9269586 SHA256 67f005f371f6e205ccd1ffb7214c688c9538ee04e4e6a63211c167a6ce639513
+DIST amanda-2.6.1p2.tar.gz 2868102 RMD160 76553416becdd223d742b953c810130359d6e4fa SHA1 42881825f8cc3d932d729ddc72309e8ab9a50992 SHA256 828c71040f1ccf69f9996907a3575b7dc27890ea7a5fae5eac77183125eda195
+EBUILD amanda-2.6.1_p2.ebuild 14490 RMD160 cf9d70b24b324ddedacf4c03724a16ec14a28c65 SHA1 2ae85aa4f16ece4d8adf36a5c5b0d0c54aac0422 SHA256 8ae1a181b4dba0772a117dc7eab324c80c0b1a9709eae2abae066cfc7d024433
+MISC ChangeLog 1139 RMD160 dc6dd827fedae93e70186683067d60f1b03dfb04 SHA1 a0d2d7ca86e8904eecf951f6b27c5a0476b9a907 SHA256 de9fe40871cd432e237959c5f9439fec524b4924746435fd28fb05fb6974f0b4
+MISC metadata.xml 872 RMD160 c60c5710afe93d37ab8191567caa8a76a88cca79 SHA1 21a4cfba94d34049cb1aa5f050c95dcd57df23e1 SHA256 49c9bd35daf9a54ec69df97b8bad021faf3afed88632577e2a673fa4c6ce8934
diff --git a/app-backup/amanda/amanda-2.6.1_p2.ebuild b/app-backup/amanda/amanda-2.6.1_p2.ebuild
new file mode 100644
index 0000000..7177ebf
--- /dev/null
+++ b/app-backup/amanda/amanda-2.6.1_p2.ebuild
@@ -0,0 +1,415 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.1_p2.ebuild,v 1.4 2010/05/08 19:48:53 robbat2 Exp $
+
+inherit autotools eutils
+
+MY_P="${P/_}"
+DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
+HOMEPAGE="http://www.amanda.org/"
+SRC_URI="mirror://sourceforge/amanda/${MY_P}.tar.gz"
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+RDEPEND="sys-libs/readline
+ virtual/inetd
+ sys-apps/gawk
+ app-arch/tar
+ >=dev-lang/perl-5.6
+ app-arch/dump
+ net-misc/openssh
+ >=dev-libs/glib-2.2
+ nls? ( virtual/libintl )
+ s3? ( >=net-misc/curl-7.10.0 )
+ samba? ( net-fs/samba )
+ kerberos? ( app-crypt/mit-krb5 )
+ xfs? ( sys-fs/xfsdump )
+ !minimal? (
+ virtual/mailx
+ app-arch/mt-st
+ sys-block/mtx
+ gnuplot? ( sci-visualization/gnuplot )
+ app-crypt/aespipe
+ app-crypt/gnupg
+ )"
+
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+IUSE="gnuplot ipv6 kerberos minimal nls s3 samba xfs"
+
+S="${WORKDIR}/${MY_P}"
+
+MYFILESDIR="${T}/files"
+ENVDIR="/etc/env.d"
+ENVDFILE="97amanda"
+TMPENVFILE="${T}/${ENVDFILE}"
+
+# This is a complete list of Amanda settings that the ebuild takes from the
+# build environment. This allows users to alter the behavior of the package as
+# upstream intended, but keeping with Gentoo style. We store a copy of them in
+# /etc/env.d/97amanda during the install, so that they are preserved for future
+# installed. This variable name must not start with AMANDA_, as we do not want
+# it captured into the env file.
+ENV_SETTINGS_AMANDA="
+AMANDA_GROUP_GID AMANDA_GROUP_NAME
+AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
+AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
+AMANDA_TAR_LISTDIR AMANDA_TAR
+AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
+AMANDA_CONFIG_NAME AMANDA_TMPDIR"
+
+amanda_variable_setup() {
+
+ # Setting vars
+ local currentamanda
+
+ # Grab the current settings
+ currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
+
+ # First we set the defaults
+ [ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
+ [ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
+ [ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
+ [ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
+ [ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
+ [ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
+ [ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
+
+ # This installs Amanda, with the server. However, it could be a client,
+ # just specify an alternate server name in AMANDA_SERVER.
+ [ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
+ [ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
+ [ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
+ [ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
+ [ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
+ [ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
+ [ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
+ # These are left empty by default
+ [ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
+ [ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
+ [ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
+ [ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
+
+ # What tar to use
+ [ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
+
+ # Now pull in the old stuff
+ if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
+ # We don't just source it as we don't want everything in there.
+ eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
+ fi
+
+ # Re-apply the new settings if any
+ [ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
+
+}
+
+pkg_setup() {
+ amanda_variable_setup
+ enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
+ enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Fix a fun race condition if you use encryption.
+ # This is one of the reasons you should test your recovery procedures often.
+ epatch "${FILESDIR}"/${PN}-2.6.0p2-amcrypt-ossl-asym-race-fix.patch
+
+ # gentoo bug 248838, check /sbin stuff before /bin
+ epatch "${FILESDIR}"/${PN}-2.6.0_p2-syslocpath.patch
+
+ epatch "${FILESDIR}"/${PN}-2.6.1_p2-glib-2.24.1-thread-fix.patch
+
+ eautoreconf
+
+ # places for us to work in
+ mkdir -p "${MYFILESDIR}"
+ # Now we store the settings we just created
+ set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
+
+ # Prepare our custom files
+ einfo "Building custom configuration files"
+ local i # our iterator
+ local sedexpr # var for sed expr
+ sedexpr=''
+ for i in ${ENV_SETTINGS_AMANDA} ; do
+ local val
+ eval "val=\"\${${i}}\""
+ sedexpr="${sedexpr}s|__${i}__|${val}|g;"
+ done
+
+ # now apply the sed expr
+ for i in "${FILESDIR}"/amanda-* ; do
+ sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
+ done
+
+ (
+ cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
+ use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
+ ) > "${T}"/amandahosts
+}
+
+src_compile() {
+ # fix bug #36316
+ addpredict /var/cache/samba/gencache.tdb
+
+ [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
+ source "${TMPENVFILE}"
+ local myconf
+
+ einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
+ myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
+ einfo "Using ${AMANDA_SERVER_INDEX} for index server."
+ myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
+ einfo "Using ${AMANDA_USER_NAME} for amanda user."
+ myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
+ einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
+ myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
+ einfo "Using ${AMANDA_TAR} as Tar implementation."
+ myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
+ einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
+ myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
+ einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
+ myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
+ einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
+ myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
+
+ if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
+ eerror "If you want _both_ UDP and TCP ports, please use only the"
+ eerror "AMANDA_PORTS environment variable for identical ports, or set"
+ eerror "AMANDA_PORTS_BOTH."
+ die "Bad port setup!"
+ fi
+ if [ -n "${AMANDA_PORTS_UDP}" ]; then
+ einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
+ myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
+ fi
+ if [ -n "${AMANDA_PORTS_TCP}" ]; then
+ einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
+ myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
+ fi
+ if [ -n "${AMANDA_PORTS}" ]; then
+ einfo "Using ports ${AMANDA_PORTS/,/-}"
+ myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
+ fi
+
+ # Extras
+ # Speed option
+ myconf="${myconf} --with-buffered-dump"
+ # "debugging" in the configuration is NOT debug in the conventional sense.
+ # It is actually just useful output in the application, and should remain
+ # enabled. There are some cases of breakage with MTX tape changers as of
+ # 2.5.1p2 that it exposes when turned off as well.
+ myconf="${myconf} --with-debugging"
+ # Where to put our files
+ myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
+
+ # Samba support
+ myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
+
+ # Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
+ # default
+ myconf="${myconf} --with-bsd-security"
+ myconf="${myconf} --with-ssh-security"
+ myconf="${myconf} --with-bsdudp-security"
+ myconf="${myconf} --with-bsdtcp-security"
+
+ # kerberos-security mechanism version 4
+ # always disable, per bug #173354
+ myconf="${myconf} --without-krb4-security"
+
+ # kerberos-security mechanism version 5
+ myconf="${myconf} `use_with kerberos krb5-security`"
+
+ # Amazon S3 support
+ myconf="${myconf} `use_enable s3 s3-device`"
+
+ # Client only, as requested in bug #127725
+ if use minimal ; then
+ myconf="${myconf} --without-server"
+ else
+ # amplot
+ myconf="${myconf} $(use_with gnuplot)"
+ fi
+
+ # IPv6 fun.
+ myconf="${myconf} `use_with ipv6`"
+
+ # I18N
+ myconf="${myconf} `use_enable nls`"
+
+ econf ${myconf} || die "econf failed!"
+ emake || die "emake failed!"
+}
+
+src_install() {
+ [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
+ source ${TMPENVFILE}
+
+ einfo "Doing stock install"
+ # parallel make install b0rked
+ emake -j1 DESTDIR="${D}" install || die
+
+ # Build the envdir file
+ # Don't forget this..
+ einfo "Building environment file"
+ (
+ echo "# These settings are what was present in the environment when this"
+ echo "# Amanda was compiled. Changing anything below this comment will"
+ echo "# have no effect on your application, but it merely exists to"
+ echo "# preserve them for your next emerge of Amanda"
+ cat "${TMPENVFILE}" | sed "s,=\$,='',g"
+ ) >> "${MYFILESDIR}/${ENVDFILE}"
+
+ # Env.d
+ einfo "Installing environment config file"
+ doenvd "${MYFILESDIR}/${ENVDFILE}"
+
+ # Lock down next section (up until docs).
+ insopts -m0640
+ # Installing Amanda Xinetd Services Definition
+ einfo "Installing xinetd service file"
+ insinto /etc/xinetd.d
+ if use minimal ; then
+ newins "${MYFILESDIR}"/amanda-xinetd-${PV}-client amanda
+ else
+ newins "${MYFILESDIR}"/amanda-xinetd-${PV}-server amanda
+ fi
+
+ einfo "Installing Sample Daily Cron Job for Amanda"
+ insinto /etc/cron.daily
+ newins "${MYFILESDIR}/amanda-cron" amanda
+
+ insinto /etc/amanda
+ einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
+ doins "${T}/amandahosts"
+ fperms 600 /etc/amanda/amandahosts
+
+ dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
+ insinto "${AMANDA_USER_HOMEDIR}"
+ einfo "Installing .profile for ${AMANDA_USER_NAME} user"
+ newins "${MYFILESDIR}/amanda-profile" .profile
+
+ insinto /etc/amanda
+ doins "${S}/example/amanda-client.conf"
+ if ! use minimal ; then
+ insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
+ doins "${S}/example/amanda.conf"
+ doins "${S}/example/disklist"
+ keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
+ fi
+
+ keepdir "${AMANDA_TAR_LISTDIR}"
+ keepdir "${AMANDA_USER_HOMEDIR}/amanda"
+ keepdir "${AMANDA_TMPDIR}/dumps"
+ # Just make sure it exists for XFS to work...
+ use xfs && keepdir /var/xfsdump/inventory
+
+ local i
+ for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
+ "${AMANDA_TMPDIR}" /etc/amanda; do
+ einfo "Securing directory (${i})"
+ fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
+ done
+ # Do NOT use -R
+ fperms 0700 \
+ "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
+ "${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
+ "${AMANDA_USER_HOMEDIR}/amanda" \
+ "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
+ /etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}
+
+ einfo "Setting setuid permissions"
+ amanda_permissions_fix "${D}"
+
+ # Relax permissions again
+ insopts -m0644
+
+ # docs
+ einfo "Installing documentation"
+ dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
+ # our inetd sample
+ einfo "Installing standard inetd sample"
+ newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
+ # Amanda example configs
+ einfo "Installing example configurations"
+ rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
+ mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
+ docinto example1
+ newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
+ newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
+ newdoc "${FILESDIR}/example_global.conf" global.conf
+}
+
+pkg_postinst() {
+ [ ! -f "${TMPENVFILE}" -a "$EMERGE_FROM" == "binary" ] && \
+ TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
+ [ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
+ source "${TMPENVFILE}"
+
+ # Migration of amandates from /etc to $localstatedir/amanda
+ if [ -f "${ROOT}/etc/amandates" -a \
+ ! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
+ einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
+ einfo "A backup is also placed at /etc/amandates.orig"
+ cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
+ mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
+ cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
+ fi
+ if [ -f "${ROOT}/etc/amandates" ]; then
+ einfo "If you have migrated safely, please delete /etc/amandates"
+ fi
+
+ # If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
+ # another host than HOSTNAME.
+ if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
+ elog "You are installing a client-only version of Amanda."
+ elog "You should set the variable \$AMANDA_SERVER to point at your"
+ elog "Amanda-tape-server, otherwise you will have to specify its name"
+ elog "when using amrecover on the client."
+ elog "For example: Use something like"
+ elog "AMANDA_SERVER=\"myserver\" emerge amanda"
+ elog
+ fi
+
+ einfo "Checking setuid permissions"
+ amanda_permissions_fix "${ROOT}"
+
+ elog "You should configure Amanda in /etc/amanda now."
+ elog
+ elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
+ elog "and restart xinetd afterwards!"
+ elog
+ elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
+ elog "as an example of how to configure your inetd."
+ elog
+ elog "NOTICE: If you need raw access to partitions you need to add the"
+ elog "amanda user to the 'disk' group."
+ elog
+ elog "NOTICE: If you have a tape changer, you need to add the amanda user"
+ elog "to the 'tape' group."
+ elog
+ elog "If you use localhost in your disklist your restores may break."
+ elog "You should replace it with the actual hostname!"
+ elog "Please also see the syntax changes to amandahosts."
+}
+
+# We have had reports of amanda file permissions getting screwed up.
+# Losing setuid, becoming too lax etc.
+# ONLY root and users in the amanda group should be able to run these binaries!
+amanda_permissions_fix() {
+ local root="$1"
+ [ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
+ local le="/usr/libexec/amanda"
+ for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
+ "${le}"/rundump "${le}"/runtar "${le}"/dumper \
+ "${le}"/planner ; do
+ chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
+ chmod u=srwx,g=rx,o= "${root}"/${i}
+ done
+}
diff --git a/app-backup/amanda/files/amanda-2.6.0_p2-syslocpath.patch b/app-backup/amanda/files/amanda-2.6.0_p2-syslocpath.patch
new file mode 100644
index 0000000..ecd3fd1
--- /dev/null
+++ b/app-backup/amanda/files/amanda-2.6.0_p2-syslocpath.patch
@@ -0,0 +1,19 @@
+We should check /sbin and /usr/sbin earlier in the configure process.
+If there is a binary named 'dump' that is not a filesystem dump command (which
+is normally found in /usr/sbin) that occurs in the /usr/bin, then configure can
+hang.
+
+Gentoo-bug: 248838
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+diff -Nuar --exclude '*~' amanda-2.6.0p2.orig/config/amanda/progs.m4 amanda-2.6.0p2/config/amanda/progs.m4
+--- amanda-2.6.0p2.orig/config/amanda/progs.m4 2008-02-15 13:35:57.000000000 -0800
++++ amanda-2.6.0p2/config/amanda/progs.m4 2008-11-25 17:46:56.879917150 -0800
+@@ -24,7 +24,7 @@
+ #
+ AC_DEFUN([AMANDA_INIT_PROGS],
+ [
+- SYSPATH="/bin:/usr/bin:/sbin:/usr/sbin:/opt/SUNWspro/bin:/usr/ucb:/usr/sfw/bin:/usr/bsd:/etc:/usr/etc"
++ SYSPATH="/sbin:/bin:/usr/sbin:/usr/bin:/opt/SUNWspro/bin:/usr/ucb:/usr/sfw/bin:/usr/bsd:/etc:/usr/etc"
+ # expand prefix or exec_prefix in LOCPATH
+ LOCPATH=`(
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
diff --git a/app-backup/amanda/files/amanda-2.6.0p2-amcrypt-ossl-asym-race-fix.patch b/app-backup/amanda/files/amanda-2.6.0p2-amcrypt-ossl-asym-race-fix.patch
new file mode 100644
index 0000000..2aa6625
--- /dev/null
+++ b/app-backup/amanda/files/amanda-2.6.0p2-amcrypt-ossl-asym-race-fix.patch
@@ -0,0 +1,75 @@
+There is a race condition inside the client-side sendbackup. The short version
+is that any output from the compression or encryption pipes that gets send
+before the "sendbackup:" headers gets discarded by the server on receipt.
+
+For any pipe command that outputs headers, a sufficiently fast machine will
+allow this to happen.
+
+As a solution, we buffer the header from amcrypt-ossl-asym, and only output it
+after we have started receiving real data. At the time of writing this patch,
+amaespipe looks to suffer from the same problem.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+(Forward ported from the 2.5.2p1 patch)
+
+diff -Nuar --exclude '*~' --exclude '*.orig' --exclude '*.rej' amanda-2.6.0p2.orig/common-src/amcrypt-ossl-asym.sh amanda-2.6.0p2/common-src/amcrypt-ossl-asym.sh
+--- amanda-2.6.0p2.orig/common-src/amcrypt-ossl-asym.sh 2008-01-17 16:31:41.000000000 -0800
++++ amanda-2.6.0p2/common-src/amcrypt-ossl-asym.sh 2008-09-21 22:32:21.265609630 -0700
+@@ -95,7 +95,7 @@
+ perl -pe 'BEGIN { $bs = 96; $/ = \8192 } $nbytes = ($nbytes + length) % $bs; END { print "\0" x ($bs - $nbytes) }'
+ }
+
+-encrypt() {
++encrypt_setup() {
+ # generate a random printable cipher key (on one line)
+ echo `"${OPENSSL}" rand -base64 80` >"${WORKDIR}/pass"
+
+@@ -105,11 +105,20 @@
+
+ # print magic
+ printf "%s" "${MAGIC}"
++ [ $? -eq 0 ] || return 1
+
+ # print the encrypted cipher key, preceded by size
+ ls -l "${WORKDIR}/pass.ciphertext" | awk '{ printf("%-10d", $5) }'
++ [ $? -eq 0 ] || return 1
+ cat "${WORKDIR}/pass.ciphertext"
++ [ $? -eq 0 ] || return 1
+
++ # Do a test encryption to see that it will work and we will not lose data
++ echo "foo" | encrypt >/dev/null
++ [ $? -eq 0 ] || return 1
++}
++
++encrypt() {
+ # encrypt data using the cipher key and print
+ pad | "${OPENSSL}" enc "-${CIPHER}" -nopad -e -pass "file:${WORKDIR}/pass" -nosalt
+ [ $? -eq 0 ] || return 1
+@@ -180,7 +189,26 @@
+ exit 1
+ fi
+
+- encrypt
++ # we must perform the encryption setup, but not produce any output until we start getting input
++ encrypt_setup >"${WORKDIR}/encryption-header"
++ if [ $? -ne 0 ]; then
++ echo "${ME}: encryption setup failed" >&2
++ exit 1
++ fi
++ # block until the first of the input
++ dd of="${WORKDIR}/data.buffer" bs=4 count=1 2>/dev/null
++ if [ $? -ne 0 ]; then
++ echo "${ME}: encryption failed to get input data" >&2
++ exit 1
++ fi
++ # now spit out the encryption header
++ cat "${WORKDIR}/encryption-header"
++ if [ $? -ne 0 ]; then
++ echo "${ME}: encryption failed to output encryption header" >&2
++ exit 1
++ fi
++ # followed by our first bit of input, then the rest
++ cat "${WORKDIR}/data.buffer" - | encrypt
+ if [ $? -ne 0 ]; then
+ echo `_ '%s: encryption failed' "${ME}"` >&2
+ exit 1
diff --git a/app-backup/amanda/files/amanda-2.6.1_p2-glib-2.24.1-thread-fix.patch b/app-backup/amanda/files/amanda-2.6.1_p2-glib-2.24.1-thread-fix.patch
new file mode 100644
index 0000000..c7450c7
--- /dev/null
+++ b/app-backup/amanda/files/amanda-2.6.1_p2-glib-2.24.1-thread-fix.patch
@@ -0,0 +1,51 @@
+
+--- common-src/glib-util.c.orig 2010-05-20 13:19:58.000000000 -0400
++++ common-src/glib-util.c 2010-05-20 13:24:40.000000000 -0400
+@@ -38,26 +38,15 @@
+ if (did_glib_init) return;
+ did_glib_init = TRUE;
+
+- /* Initialize glib's type system */
+- g_type_init();
+-
+ /* set up libcurl (this must happen before threading
+ * is initialized) */
+ #ifdef HAVE_LIBCURL
+ # ifdef G_THREADS_ENABLED
+- g_assert(!g_thread_supported());
++ g_assert(!g_thread_supported()); /* assert threads aren't initialized yet */
+ # endif
+ g_assert(curl_global_init(CURL_GLOBAL_ALL) == 0);
+ #endif
+
+- /* And set up glib's threads */
+-#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE)
+- if (g_thread_supported()) {
+- return;
+- }
+- g_thread_init(NULL);
+-#endif
+-
+ /* do a version check */
+ #if GLIB_CHECK_VERSION(2,6,0)
+ {
+@@ -71,6 +60,17 @@
+ }
+ }
+ #endif
++
++ /* Initialize glib's type system. On glib >= 2.24, this will initialize
++ * threads, so it must be done after curl is initialized. */
++ g_type_init();
++
++ /* And set up glib's threads */
++#if defined(G_THREADS_ENABLED) && !defined(G_THREADS_IMPL_NONE)
++ if (!g_thread_supported())
++ g_thread_init(NULL);
++#endif
++
+ }
+
+ typedef enum {
+
+
diff --git a/app-backup/amanda/files/amanda-amandahosts b/app-backup/amanda/files/amanda-amandahosts
new file mode 100644
index 0000000..a86ab8a
--- /dev/null
+++ b/app-backup/amanda/files/amanda-amandahosts
@@ -0,0 +1,8 @@
+# vim: ts=4 sts=4 sw=4 noexpandtab:
+# Machine-name for those hosts which are permitted to back up (fully-qualified
+# is best). An entry in /etc/hosts adds fail-safe against DNS death :-)
+# |
+# | permitted user-name
+# | |
+
+__AMANDA_SERVER__ __AMANDA_USER_NAME__
diff --git a/app-backup/amanda/files/amanda-amandahosts-client-2.5.1_p3-r1 b/app-backup/amanda/files/amanda-amandahosts-client-2.5.1_p3-r1
new file mode 100644
index 0000000..570a710
--- /dev/null
+++ b/app-backup/amanda/files/amanda-amandahosts-client-2.5.1_p3-r1
@@ -0,0 +1,8 @@
+# vim: ts=4 sts=4 sw=4 noexpandtab:
+# Machine-name for those hosts which are permitted to back up (fully-qualified
+# is best). An entry in /etc/hosts adds fail-safe against DNS death :-)
+# |
+# | permitted user-name
+# | |
+
+__AMANDA_SERVER__ __AMANDA_USER_NAME__ amdump
diff --git a/app-backup/amanda/files/amanda-amandahosts-server-2.5.1_p3-r1 b/app-backup/amanda/files/amanda-amandahosts-server-2.5.1_p3-r1
new file mode 100644
index 0000000..4951d4a
--- /dev/null
+++ b/app-backup/amanda/files/amanda-amandahosts-server-2.5.1_p3-r1
@@ -0,0 +1,8 @@
+# vim: ts=4 sts=4 sw=4 noexpandtab:
+# Machine-name for those hosts which are permitted to back up (fully-qualified
+# is best). An entry in /etc/hosts adds fail-safe against DNS death :-)
+# |
+# | permitted user-name
+# | |
+
+__AMANDA_SERVER__ root amindexd amidxtaped
diff --git a/app-backup/amanda/files/amanda-cron b/app-backup/amanda/files/amanda-cron
new file mode 100644
index 0000000..a5524dc
--- /dev/null
+++ b/app-backup/amanda/files/amanda-cron
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# This is a sample cron job to kick off backups with amanda.
+
+# Run the tape tests on DailySet first, and if ok, then kick off backups
+# Mail error reports to root
+
+# Ensure TAPE is set to your tape drive for mt to work, ie. TAPE="/dev/st0"
+
+ADMIN_EMAIL="root@localhost"
+
+/usr/sbin/amcheck -t -m -M"${ADMIN_EMAIL}" __AMANDA_CONFIG_NAME__ && \
+( /usr/sbin/amdump __AMANDA_CONFIG_NAME__ ; /usr/sbin/mt eject )
diff --git a/app-backup/amanda/files/amanda-devfs b/app-backup/amanda/files/amanda-devfs
new file mode 100644
index 0000000..f02eb3f
--- /dev/null
+++ b/app-backup/amanda/files/amanda-devfs
@@ -0,0 +1,7 @@
+# raw access to partitions for amanda
+#REGISTER ^scsi/host.*/bus.*/target.*/lun.*/part[0-9] PERMISSIONS root.disk 660"
+#REGISTER ^ide/host.*/bus.*/target.*/lun.*/part[0-9] PERMISSIONS root.disk 660"
+
+# allow amanda to have access to tape changers
+#REGISTER ^scsi/host.*/bus.*/target.*/lun.*/generic PERMISSIONS root.disk 660
+
diff --git a/app-backup/amanda/files/amanda-inetd.amanda.sample b/app-backup/amanda/files/amanda-inetd.amanda.sample
new file mode 100644
index 0000000..0314e9b
--- /dev/null
+++ b/app-backup/amanda/files/amanda-inetd.amanda.sample
@@ -0,0 +1,3 @@
+amanda dgram udp wait amanda /usr/libexec/amandad amandad
+amandaidx stream tcp nowait amanda /usr/libexec/amindexd amindexd
+amidxtape stream tcp nowait amanda /usr/libexec/amidxtaped amidxtaped
diff --git a/app-backup/amanda/files/amanda-inetd.amanda.sample-2.5.1_p3-r1 b/app-backup/amanda/files/amanda-inetd.amanda.sample-2.5.1_p3-r1
new file mode 100644
index 0000000..9026132
--- /dev/null
+++ b/app-backup/amanda/files/amanda-inetd.amanda.sample-2.5.1_p3-r1
@@ -0,0 +1,3 @@
+amanda dgram udp wait amanda /usr/libexec/amandad amandad -auth=bsd amdump amindexd amidxtaped
+amandaidx stream tcp nowait amanda /usr/libexec/amindexd amindexd -auth=bsd amdump amindexd amidxtaped
+amidxtape stream tcp nowait amanda /usr/libexec/amidxtaped amidxtaped -auth=bsd amdump amindexd amidxtaped
diff --git a/app-backup/amanda/files/amanda-inetd.amanda.sample-2.6.0_p2-r2 b/app-backup/amanda/files/amanda-inetd.amanda.sample-2.6.0_p2-r2
new file mode 100644
index 0000000..e2aa342
--- /dev/null
+++ b/app-backup/amanda/files/amanda-inetd.amanda.sample-2.6.0_p2-r2
@@ -0,0 +1,3 @@
+amanda dgram udp wait amanda /usr/libexec/amanda/amandad amandad -auth=bsd amdump amindexd amidxtaped
+amandaidx stream tcp nowait amanda /usr/libexec/amanda/amindexd amindexd -auth=bsd amdump amindexd amidxtaped
+amidxtape stream tcp nowait amanda /usr/libexec/amanda/amidxtaped amidxtaped -auth=bsd amdump amindexd amidxtaped
diff --git a/app-backup/amanda/files/amanda-profile b/app-backup/amanda/files/amanda-profile
new file mode 100644
index 0000000..d8e132b
--- /dev/null
+++ b/app-backup/amanda/files/amanda-profile
@@ -0,0 +1 @@
+export PATH=/sbin:/usr/sbin:/usr/libexec:${PATH}
diff --git a/app-backup/amanda/files/amanda-xinetd b/app-backup/amanda/files/amanda-xinetd
new file mode 100644
index 0000000..2a52e59
--- /dev/null
+++ b/app-backup/amanda/files/amanda-xinetd
@@ -0,0 +1,48 @@
+# These are the services needed for amanda.
+# Default is to talk to localhost only unless
+# AMANDA_SERVER was specified at build time.
+
+service amanda
+{
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = __AMANDA_USER_NAME__
+ group = __AMANDA_GROUP_NAME__
+ groups = yes
+ server = /usr/libexec/amandad
+ # You need to ensure this points to your Amanda server!
+ # Don't just remove it!
+ only_from = __AMANDA_SERVER__
+ disable = yes
+}
+
+service amandaidx
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = __AMANDA_USER_NAME__
+ group = __AMANDA_GROUP_NAME__
+ groups = yes
+ server = /usr/libexec/amindexd
+ # You need to ensure this points to your Amanda server!
+ # Don't just remove it!
+ only_from = __AMANDA_SERVER__
+ disable = yes
+}
+
+service amidxtape
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = __AMANDA_USER_NAME__
+ group = __AMANDA_GROUP_NAME__
+ groups = yes
+ server = /usr/libexec/amidxtaped
+ # You need to ensure this points to your Amanda server!
+ # Don't just remove it!
+ only_from = __AMANDA_SERVER__
+ disable = yes
+}
diff --git a/app-backup/amanda/files/amanda-xinetd-2.5.1_p3-r1 b/app-backup/amanda/files/amanda-xinetd-2.5.1_p3-r1
new file mode 100644
index 0000000..8010060
--- /dev/null
+++ b/app-backup/amanda/files/amanda-xinetd-2.5.1_p3-r1
@@ -0,0 +1,49 @@
+# These are the services needed for amanda.
+# Default is to talk to localhost only unless
+# AMANDA_SERVER was specified at build time.
+
+service amanda
+{
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = __AMANDA_USER_NAME__
+ group = __AMANDA_GROUP_NAME__
+ groups = yes
+ server = /usr/libexec/amandad
+ server_args = -auth=bsd amdump amindexd amidxtaped
+ # You need to ensure this points to your Amanda server!
+ # Don't just remove it!
+ only_from = __AMANDA_SERVER__
+ disable = yes
+}
+
+service amandaidx
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = __AMANDA_USER_NAME__
+ group = __AMANDA_GROUP_NAME__
+ groups = yes
+ server = /usr/libexec/amindexd
+ # You need to ensure this points to your Amanda server!
+ # Don't just remove it!
+ only_from = __AMANDA_SERVER__
+ disable = yes
+}
+
+service amidxtape
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = __AMANDA_USER_NAME__
+ group = __AMANDA_GROUP_NAME__
+ groups = yes
+ server = /usr/libexec/amidxtaped
+ # You need to ensure this points to your Amanda server!
+ # Don't just remove it!
+ only_from = __AMANDA_SERVER__
+ disable = yes
+}
diff --git a/app-backup/amanda/files/amanda-xinetd-2.6.0_p2-r2 b/app-backup/amanda/files/amanda-xinetd-2.6.0_p2-r2
new file mode 100644
index 0000000..fdc5ee9
--- /dev/null
+++ b/app-backup/amanda/files/amanda-xinetd-2.6.0_p2-r2
@@ -0,0 +1,48 @@
+# These are the services needed for amanda.
+# Default is to talk to localhost only unless
+# AMANDA_SERVER was specified at build time.
+
+service amanda
+{
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = __AMANDA_USER_NAME__
+ group = __AMANDA_GROUP_NAME__
+ groups = yes
+ server = /usr/libexec/amanda/amandad
+ # You need to ensure this points to your Amanda server!
+ # Don't just remove it!
+ only_from = __AMANDA_SERVER__
+ disable = yes
+}
+
+service amandaidx
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = __AMANDA_USER_NAME__
+ group = __AMANDA_GROUP_NAME__
+ groups = yes
+ server = /usr/libexec/amanda/amindexd
+ # You need to ensure this points to your Amanda server!
+ # Don't just remove it!
+ only_from = __AMANDA_SERVER__
+ disable = yes
+}
+
+service amidxtape
+{
+ socket_type = stream
+ protocol = tcp
+ wait = no
+ user = __AMANDA_USER_NAME__
+ group = __AMANDA_GROUP_NAME__
+ groups = yes
+ server = /usr/libexec/amanda/amidxtaped
+ # You need to ensure this points to your Amanda server!
+ # Don't just remove it!
+ only_from = __AMANDA_SERVER__
+ disable = yes
+}
diff --git a/app-backup/amanda/files/amanda-xinetd-2.6.1_p1-client b/app-backup/amanda/files/amanda-xinetd-2.6.1_p1-client
new file mode 100644
index 0000000..ed73c03
--- /dev/null
+++ b/app-backup/amanda/files/amanda-xinetd-2.6.1_p1-client
@@ -0,0 +1,19 @@
+# These are the services needed for amanda.
+# Default is to talk to localhost only unless
+# AMANDA_SERVER was specified at build time.
+
+service amanda
+{
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = __AMANDA_USER_NAME__
+ group = __AMANDA_GROUP_NAME__
+ groups = yes
+ server = /usr/libexec/amanda/amandad
+ server_args = -auth=bsd amdump
+ # You need to ensure this points to your Amanda server!
+ # Don't just remove it!
+ only_from = __AMANDA_SERVER__
+ disable = yes
+}
diff --git a/app-backup/amanda/files/amanda-xinetd-2.6.1_p1-server b/app-backup/amanda/files/amanda-xinetd-2.6.1_p1-server
new file mode 100644
index 0000000..269198e
--- /dev/null
+++ b/app-backup/amanda/files/amanda-xinetd-2.6.1_p1-server
@@ -0,0 +1,19 @@
+# These are the services needed for amanda.
+# Default is to talk to localhost only unless
+# AMANDA_SERVER was specified at build time.
+
+service amanda
+{
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = __AMANDA_USER_NAME__
+ group = __AMANDA_GROUP_NAME__
+ groups = yes
+ server = /usr/libexec/amanda/amandad
+ server_args = -auth=bsd amdump amindexd amidxtaped
+ # You need to ensure this points to your Amanda server!
+ # Don't just remove it!
+ only_from = __AMANDA_SERVER__
+ disable = yes
+}
diff --git a/app-backup/amanda/files/example_amanda.conf b/app-backup/amanda/files/example_amanda.conf
new file mode 100644
index 0000000..947625e
--- /dev/null
+++ b/app-backup/amanda/files/example_amanda.conf
@@ -0,0 +1,44 @@
+# type "man amanda"
+
+org "example"
+mailto "root@localhost"
+
+dumpcycle 7
+runspercycle -1
+tapecycle 7
+
+dumpuser "amanda"
+printer "lp"
+
+#tpchanger "chg-manual"
+tapedev "/dev/nst0"
+
+runtapes 1
+labelstr "^EXAMPLE-[0-9][0-9]*$"
+tapetype DDS4-PRINT
+
+ctimeout 60
+dtimeout 3600
+etimeout 600
+
+netusage 2000
+inparallel 10
+
+dumporder "tttTTTTTTT"
+maxdumps 10
+bumpsize 10
+bumpmult 1.5
+bumpdays 1
+
+diskfile "/etc/amanda/example/disklist"
+infofile "/etc/amanda/example/curinfo"
+logdir "/etc/amanda/example"
+indexdir "/etc/amanda/example/index"
+tapelist "tapelist"
+
+tapebufs 20
+reserve 100
+autoflush off
+
+includefile "/etc/amanda/global.conf"
+
diff --git a/app-backup/amanda/files/example_disklist b/app-backup/amanda/files/example_disklist
new file mode 100644
index 0000000..7606251
--- /dev/null
+++ b/app-backup/amanda/files/example_disklist
@@ -0,0 +1,2 @@
+localhost hda1 normal local
+localhost hda3 normal local \ No newline at end of file
diff --git a/app-backup/amanda/files/example_disklist-2.5.1_p3-r1 b/app-backup/amanda/files/example_disklist-2.5.1_p3-r1
new file mode 100644
index 0000000..73bf017
--- /dev/null
+++ b/app-backup/amanda/files/example_disklist-2.5.1_p3-r1
@@ -0,0 +1,4 @@
+# Substitute <HOSTNAME> with the FQDN of your Amanda-client here.
+# The usage of localhost will *break* your restores.
+<HOSTNAME> hda1 normal local
+<HOSTNAME> hda3 normal local
diff --git a/app-backup/amanda/files/example_global.conf b/app-backup/amanda/files/example_global.conf
new file mode 100644
index 0000000..7287398
--- /dev/null
+++ b/app-backup/amanda/files/example_global.conf
@@ -0,0 +1,78 @@
+holdingdisk hd1 {
+ comment "main holding disk"
+ directory "/tmp/amanda/dumps"
+ use -1 Gb
+ chunksize 500 Mb
+}
+
+define dumptype normal {
+ auth BSD
+ comment "Normal backup, compression"
+ comprate 0.50, 0.50
+ compress client best
+ index yes
+ priority high
+ program "GNUTAR"
+ record yes
+ strategy STANDARD
+ holdingdisk yes
+}
+
+define dumptype compress-server {
+ auth BSD
+ comment "Normal backup, compression"
+ comprate 0.50, 0.50
+ compress server best
+ index yes
+ priority high
+ program "GNUTAR"
+ record yes
+ strategy STANDARD
+ holdingdisk yes
+}
+
+define dumptype normal-no_hold {
+ normal
+ holdingdisk no
+}
+
+define tapetype DDS4 {
+ comment "Seagate Scorpion 40"
+ length 16432 mbytes
+ filemark 0 kbytes
+ speed 2267 kps
+}
+
+define tapetype DDS4-PRINT {
+ comment "Seagate Scorpion 40 with printer"
+ length 16432 mbytes
+ filemark 0 kbytes
+ speed 2267 kps
+ lbl-templ "/etc/amanda/lbl/DIN-A4.ps"
+}
+
+define tapetype DDS2 {
+ comment "HP DAT C1533A"
+ length 1845 mbytes
+ filemark 0 kbytes
+ speed 480 kps
+}
+
+define tapetype DDS1 {
+ comment "HP DAT HP35480A"
+ length 1845 mbytes
+ filemark 32 kbytes
+ speed 174 kps
+}
+
+define interface local {
+ comment "local disk"
+ use 4000 kbps
+}
+
+define interface eth1 {
+ comment "100 Mbps ethernet"
+ use 1000 kbps
+}
+
+
diff --git a/app-backup/amanda/files/patch-tar-1.14.90 b/app-backup/amanda/files/patch-tar-1.14.90
new file mode 100644
index 0000000..2d7bd53
--- /dev/null
+++ b/app-backup/amanda/files/patch-tar-1.14.90
@@ -0,0 +1,26 @@
+diff -ru amanda-2.4.4p3/configure amanda-2.4.4p3-new/configure
+--- amanda-2.4.4p3/configure 2004-06-22 07:41:55.000000000 -0500
++++ amanda-2.4.4p3-new/configure 2004-11-20 12:49:12.998686008 -0600
+@@ -8802,7 +8802,7 @@
+
+ if test ! -z "$GNUTAR"; then
+ case "`\"$GNUTAR\" --version 2>&1`" in
+- *GNU*tar* | *Free*paxutils* )
++ *GNU*tar* | *Free*paxutils* | *tar\ \(tar\)\ 1.14.90* )
+
+ cat >>confdefs.h <<_ACEOF
+ #define GNUTAR "$GNUTAR"
+diff -ru amanda-2.4.4p3/configure.in amanda-2.4.4p3-new/configure.in
+--- amanda-2.4.4p3/configure.in 2004-06-22 07:41:30.000000000 -0500
++++ amanda-2.4.4p3-new/configure.in 2004-11-20 12:50:15.082247872 -0600
+@@ -1284,7 +1284,7 @@
+ AC_PATH_PROGS(GNUTAR,gtar gnutar tar,,$LOCSYSPATH)
+ if test ! -z "$GNUTAR"; then
+ case "`\"$GNUTAR\" --version 2>&1`" in
+- *GNU*tar* | *Free*paxutils* )
++ *GNU*tar* | *Free*paxutils* | *tar\ \(tar\)\ 1.14.90* )
+ AC_DEFINE_UNQUOTED(GNUTAR,"$GNUTAR",[Define to the location of Gnu tar. ])
+ ;;
+ *)
+
+
diff --git a/app-backup/amanda/files/s3-list-keys.diff b/app-backup/amanda/files/s3-list-keys.diff
new file mode 100644
index 0000000..c75da26
--- /dev/null
+++ b/app-backup/amanda/files/s3-list-keys.diff
@@ -0,0 +1,61 @@
+diff --git a/device-src/s3.c b/device-src/s3.c
+index dfd29dc..7a3b7d3 100644
+--- a/device-src/s3.c
++++ b/device-src/s3.c
+@@ -605,8 +605,10 @@ buffer_writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
+ guint bytes_needed = data->buffer_pos + new_bytes;
+
+ /* error out if the new size is greater than the maximum allowed */
+- if (data->max_buffer_size && bytes_needed > data->max_buffer_size)
+- return 0;
++ if (data->max_buffer_size && bytes_needed > data->max_buffer_size) {
++ g_warning("S3 request exceeded %d bytes; CURL error follows.", data->max_buffer_size);
++ return 0; /* returning zero signals an error to libcurl */
++ }
+
+ /* reallocate if necessary. We use exponential sizing to make this
+ * happen less often. */
+@@ -618,7 +620,7 @@ buffer_writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
+ data->buffer = g_realloc(data->buffer, new_size);
+ data->buffer_len = new_size;
+ }
+- g_return_val_if_fail(data->buffer, 0); /* returning zero signals an error to libcurl */
++ g_return_val_if_fail(data->buffer, 0);
+
+ /* actually copy the data to the buffer */
+ memcpy(data->buffer + data->buffer_pos, ptr, new_bytes);
+@@ -1186,8 +1188,7 @@ list_fetch(S3Handle *hdl,
+ const char *resource,
+ const char *prefix,
+ const char *delimiter,
+- const char *marker,
+- const char *max_keys)
++ const char *marker)
+ {
+ char *urldelim = "?";
+ char *uri = g_strdup(resource);
+@@ -1212,13 +1213,13 @@ list_fetch(S3Handle *hdl,
+ urldelim = "&";
+ }
+ if (max_keys) {
+- if (!list_build_url_component(&uri, urldelim, "max-keys", max_keys)) goto cleanup;
++ if (!list_build_url_component(&uri, urldelim, "max-keys", "1024")) goto cleanup;
+ urldelim = "&";
+ }
+
+ /* and perform the request on that URI */
+ result = perform_request(hdl, resource, uri, "GET", NULL,
+- 0, MAX_ERROR_RESPONSE_LEN, 0, result_handling);
++ 0, 0, 0, result_handling);
+
+ cleanup:
+ if (uri) g_free(uri);
+@@ -1251,7 +1252,7 @@ s3_list_keys(S3Handle *hdl,
+ /* Loop until S3 has given us the entire picture */
+ do {
+ /* get some data from S3 */
+- result = list_fetch(hdl, resource, prefix, delimiter, thunk.next_marker, NULL);
++ result = list_fetch(hdl, resource, prefix, delimiter, thunk.next_marker);
+ if (result != S3_RESULT_OK) goto cleanup;
+
+ /* run the parser over it */
diff --git a/app-backup/amanda/files/s3.c.part2.diff b/app-backup/amanda/files/s3.c.part2.diff
new file mode 100644
index 0000000..2141f92
--- /dev/null
+++ b/app-backup/amanda/files/s3.c.part2.diff
@@ -0,0 +1,15 @@
+--- s3.c.orig 2008-09-12 13:20:26.000000000 -0400
++++ s3.c 2008-09-12 13:20:36.000000000 -0400
+@@ -1212,10 +1212,10 @@
+ if (!list_build_url_component(&uri, urldelim, "marker", marker)) goto cleanup;
+ urldelim = "&";
+ }
+- if (max_keys) {
++ // if (max_keys) {
+ if (!list_build_url_component(&uri, urldelim, "max-keys", "1024")) goto cleanup;
+ urldelim = "&";
+- }
++ // }
+
+ /* and perform the request on that URI */
+ result = perform_request(hdl, resource, uri, "GET", NULL,
diff --git a/app-backup/amanda/metadata.xml b/app-backup/amanda/metadata.xml
new file mode 100644
index 0000000..99fefef
--- /dev/null
+++ b/app-backup/amanda/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>app-backup</herd>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ <description>Primary maintainer</description>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <maintainer>
+ <email>monitor@oops.co.at</email>
+ <description>Proxied developer. Please CC on bugs.</description>
+ <name>Stefan G. Weichinger</name>
+ </maintainer>
+ <maintainer>
+ <email>dustin@v.igoro.us</email>
+ <description>Upstream. Please CC on bugs.</description>
+ <name>Dustin J. Mitchell</name>
+ </maintainer>
+ <use>
+ <flag name='xfs'>Support for backing up raw XFS filesystems using xfsdump</flag>
+ <flag name='s3'>Support for backing up to the Amazon S3 system</flag>
+ <flag name='devpay'>Support for using Amazon DevPay with S3</flag>
+ </use>
+</pkgmetadata>