From a7622c3887e22c11125637a71760ffe7e9470ea8 Mon Sep 17 00:00:00 2001 From: Christopher Walker Date: Tue, 11 May 2010 20:01:52 +0200 Subject: system/amanda: Added to 12.0 repository --- system/amanda/README | 14 ++++++ system/amanda/README-SLACKWARE | 16 +++++++ system/amanda/amanda.SlackBuild | 104 ++++++++++++++++++++++++++++++++++++++++ system/amanda/amanda.info | 8 ++++ system/amanda/doinst.sh | 26 ++++++++++ system/amanda/slack-desc | 19 ++++++++ 6 files changed, 187 insertions(+) create mode 100644 system/amanda/README create mode 100644 system/amanda/README-SLACKWARE create mode 100644 system/amanda/amanda.SlackBuild create mode 100644 system/amanda/amanda.info create mode 100644 system/amanda/doinst.sh create mode 100644 system/amanda/slack-desc (limited to 'system/amanda') diff --git a/system/amanda/README b/system/amanda/README new file mode 100644 index 0000000000..be93970494 --- /dev/null +++ b/system/amanda/README @@ -0,0 +1,14 @@ +AMANDA, the Advanced Maryland Autoamatic Network Disk Archiver, is a backup +system that allows the administrator of a LAN to set up a single master backup +server to back up multiple hosts to a single large capacity tape drive. +AMANDA uses native dump and/or GNU tar facilities and can back up a large +number of workstations running multiple versions of Unix. Recent versions +can also use SAMBA to back up Microsoft Windows hosts. + +You will need to have a special user and group created for AMANDA to use; +this defaults to user and group of "amanda" but you can specify whatever +group you wish - see the build script for more information. + +After installing, see the /usr/doc/amanda-2.5.2p1/README-SLACKWARE for more +information on how to modify inetd.conf to start the the Amanda daemons +automatically at boot. diff --git a/system/amanda/README-SLACKWARE b/system/amanda/README-SLACKWARE new file mode 100644 index 0000000000..e58e92e4b7 --- /dev/null +++ b/system/amanda/README-SLACKWARE @@ -0,0 +1,16 @@ +README-SLACKWARE +Written by Christopher Walker + +You'll need to start the Amanda indexing services at boot. +The recommended way of doing this is to add the following to your /etc/inetd.conf +file (note that lines below may be wrapped): + + amandaidx stream tcp nowait amanda /usr/libexec/amindexd amindexd -auth=bsdtcp amdump amindexd amidxtaped + amidxtape stream tcp nowait amanda /usr/libexec/amidxtaped amidxtaped -auth=bsdtcp amdump amindexd amidxtaped + +You'll also need to start the Amanda client services at boot. +The recommended way of doing this is to add the following to /etc/inetd.conf +(note that the line may be wrapped): + + amanda stream tcp nowait amanda /usr/libexec/amandad amandad -auth=bsdtcp amdump amindexd amidxtaped + diff --git a/system/amanda/amanda.SlackBuild b/system/amanda/amanda.SlackBuild new file mode 100644 index 0000000000..bb6af9177a --- /dev/null +++ b/system/amanda/amanda.SlackBuild @@ -0,0 +1,104 @@ +#!/bin/sh + +# Slackware build script for amanda +# Written by Christopher Walker + +PRGNAM=amanda +VERSION=${VERSION:-2.5.2p1} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAB:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +AMANDAUSR=${AMANDAUSR:-amanda} +AMANDAGRP=${AMANDAGRP:-amanda} +AMANDAUID=${AMANDAUID:-211} +AMANDAGID=${AMANDAGID:-211} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +do_exit() { + echo ; echo "You must have the ${AMANDAUSR} user and ${AMANDAGRP} group in" + echo "order to build amanda. Sample lines to do so are below:" + echo "# groupadd -g ${AMANDAGID} ${AMANDAGRP}" + echo "# useradd -u ${AMANDAUID} -d /var/lib/amanda -s /bin/false -g ${AMANDAGRP} ${AMANDAUSR}" + echo "Exiting..." ; echo ; exit 1 +} + +# Check for Amanada user and group availability +if ! grep -q ^${AMANDAGRP}: /etc/group 2>/dev/null ; then + do_exit ; +elif ! grep -q ^${AMANDAUSR}: /etc/passwd 2>/dev/null ; then + do_exit ; +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --mandir=/usr/man \ + --sysconfdir=/etc \ + --localstatedir=/var/lib \ + --with-user=$AMANDAUSR \ + --with-group=$AMANDAGRP\ + --with-owner=root \ + --with-bsdudp-security \ + --with-ssh-security \ + --with-bsdtcp-security \ + --disable-static + +make || exit 1 +make install DESTDIR=$PKG || exit 1 + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +chown -R root:root $PKG/usr/man +find $PKG/usr/man -type f -exec gzip -9 {} \; + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYRIGHT COPYRIGHT-APACHE COPYRIGHT-REGEX ChangeLog INSTALL \ + NEWS README ReleaseNotes $CWD/README-SLACKWARE $PKG/usr/doc/$PRGNAM-$VERSION +# Move documentation to Slackware'esque location +mv $PKG/usr/share/amanda/* $PKG/usr/doc/$PRGNAM-$VERSION +rm -rf $PKG/usr/share +chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION +chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/* + +mkdir -p $PKG/etc/$PRGNAM +for i in 3hole.ps 8.5x11.ps DIN-A4.ps DLT.ps EXB-8500.ps \ + HP-DAT.ps amanda-client.conf amanda.conf chg-mcutil.conf \ + chg-multi.conf chg-scsi.conf disklist ; do + cp -a example/$i $PKG/etc/$PRGNAM/$i.new; +done + +chown -R root.root $PKG/etc/$PRGNAM +chmod 644 $PKG/etc/$PRGNAM/* + +mkdir -p $PKG/var/lib/amanda +chown -R $AMANDAUSR:$AMANDAGRP $PKG/var/lib/amanda + +mkdir $PKG/install +cp $CWD/doinst.sh $CWD/slack-desc $PKG/install + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/system/amanda/amanda.info b/system/amanda/amanda.info new file mode 100644 index 0000000000..b5314603d1 --- /dev/null +++ b/system/amanda/amanda.info @@ -0,0 +1,8 @@ +PRGNAM="amanda" +VERSION="2.5.2p1" +HOMEPAGE="http://www.amanda.org/" +DOWNLOAD="http://downloads.sourceforge.net/amanda/amanda-2.5.2p1.tar.gz" +MD5SUM="c2f6cc56d75091ef06d8c43c8b407b69" +MAINTAINER="Christopher Walker" +EMAIL="kris240376@gmail.com" +APPROVED="rworkman" diff --git a/system/amanda/doinst.sh b/system/amanda/doinst.sh new file mode 100644 index 0000000000..6910610d70 --- /dev/null +++ b/system/amanda/doinst.sh @@ -0,0 +1,26 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/amanda/3hole.ps.new +config etc/amanda/8.5x11.ps.new +config etc/amanda/DIN-A4.ps.new +config etc/amanda/DLT.ps.new +config etc/amanda/EXB-8500.ps.new +config etc/amanda/HP-DAT.ps.new +config etc/amanda/amanda-client.conf.new +config etc/amanda/amanda.conf.new +config etc/amanda/chg-mcutil.conf.new +config etc/amanda/chg-multi.conf.new +config etc/amanda/chg-scsi.conf.new +config etc/amanda/disklist.new + diff --git a/system/amanda/slack-desc b/system/amanda/slack-desc new file mode 100644 index 0000000000..3912407eb4 --- /dev/null +++ b/system/amanda/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +amanda: amanda (Advanced Maryland Autoamatic Network Disk Archiver) +amanda: +amanda: AMANDA, the Advanced Maryland Autoamatic Network Disk Archiver, +amanda: is a backup system that allows the administrator of a LAN to set +amanda: up a single master backup server to back up multiple hosts to a +amanda: single large capacity tape drive. AMANDA uses native dump +amanda: and/or GNU tar facilities and can back up a large number of +amanda: workstations running multiple versions of Unix. Recent versions +amanda: can also use SAMBA to back up Microsoft Windows hosts. +amanda: +amanda: -- cgit v1.2.3