summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-backup')
-rw-r--r--app-backup/bacula/ChangeLog6
-rw-r--r--app-backup/bacula/Manifest13
-rw-r--r--app-backup/bacula/bacula-1.36.3-r2.ebuild5
-rw-r--r--app-backup/bacula/files/bacula-1.36.3-mtxtmpfile.patch164
4 files changed, 174 insertions, 14 deletions
diff --git a/app-backup/bacula/ChangeLog b/app-backup/bacula/ChangeLog
index b1b2c3fa26aa..dbb8b384c7a0 100644
--- a/app-backup/bacula/ChangeLog
+++ b/app-backup/bacula/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-backup/bacula
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/ChangeLog,v 1.3 2005/10/06 21:10:25 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/ChangeLog,v 1.4 2005/10/06 21:44:43 dragonheart Exp $
+
+ 06 Oct 2005; Daniel Black <dragonheart@gentoo.org>
+ +files/bacula-1.36.3-mtxtmpfile.patch, bacula-1.36.3-r2.ebuild:
+ opps last minute patch
*bacula-1.36.3-r2 (06 Oct 2005)
diff --git a/app-backup/bacula/Manifest b/app-backup/bacula/Manifest
index 854a11ac63bc..70a3a5112319 100644
--- a/app-backup/bacula/Manifest
+++ b/app-backup/bacula/Manifest
@@ -1,10 +1,8 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 7f12f075604d5cb31a4aad38242435e4 ChangeLog 9006
MD5 9f1f576d172e849915f36c885efce3c3 bacula-1.34.4.ebuild 4245
-MD5 8412f4072f383568ad25561db00048d2 bacula-1.36.3-r2.ebuild 5503
+MD5 67bd6bc42986fdfb91d16d3ab8693c0f bacula-1.36.3-r2.ebuild 5523
MD5 42374b055f69dd5eb5eebe2b17542c03 files/bacula-1.36.3-cdrecord-configure.patch 616
+MD5 fe57162ed61541abf89399917742d94b files/bacula-1.36.3-mtxtmpfile.patch 4935
MD5 c8ead9a2d0974cccce147e7c1780dc60 files/bacula-conf 562
MD5 4afbdd1c49e65b66baf46a935480a186 files/bacula-init 1916
MD5 03ffd8d0949fd8fd22690ecfbadce1df files/bacula-init3 1479
@@ -12,10 +10,3 @@ MD5 0b9309406bd6631e14ba47c132ef3b33 files/digest-bacula-1.34.4 66
MD5 100b7479b58ce6c2f62473914b12c02d files/digest-bacula-1.36.3-r2 67
MD5 48a955f044c868aefad5bf4ff3991deb files/randpass-1.37.40 682
MD5 7ab3ac8b0c5f4bcb03495c99dcbec0b0 metadata.xml 290
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2-ecc0.1.6 (GNU/Linux)
-
-iD8DBQFDRZLPmdTrptrqvGERAlSFAJwJV3rfTiTpavxWp9MGVUVtLvHJlACeLxVr
-le8/t/MSvenxCUv/vOGhMgw=
-=9rpH
------END PGP SIGNATURE-----
diff --git a/app-backup/bacula/bacula-1.36.3-r2.ebuild b/app-backup/bacula/bacula-1.36.3-r2.ebuild
index eafc82fc21a1..cb3aa57f0998 100644
--- a/app-backup/bacula/bacula-1.36.3-r2.ebuild
+++ b/app-backup/bacula/bacula-1.36.3-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/bacula-1.36.3-r2.ebuild,v 1.1 2005/10/06 21:10:25 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-backup/bacula/bacula-1.36.3-r2.ebuild,v 1.2 2005/10/06 21:44:43 dragonheart Exp $
inherit eutils
@@ -52,7 +52,8 @@ pkg_setup() {
src_unpack() {
unpack ${A}
cd ${S}
- epatch ${FILESDIR}/${P}-cdrecord-configure.patch || die "Patch failed"
+ epatch ${FILESDIR}/${P}-cdrecord-configure.patch
+ epatch ${FILESDIR}/${P}-mtxtmpfile.patch
cp ${FILESDIR}/randpass-1.37.40 ${S}/autoconf/randpass
# This changes the default conf files to /etc/bacula files
diff --git a/app-backup/bacula/files/bacula-1.36.3-mtxtmpfile.patch b/app-backup/bacula/files/bacula-1.36.3-mtxtmpfile.patch
new file mode 100644
index 000000000000..8080fe9f6f79
--- /dev/null
+++ b/app-backup/bacula/files/bacula-1.36.3-mtxtmpfile.patch
@@ -0,0 +1,164 @@
+--- scripts/mtx-changer.in.orig 2005-10-07 07:41:38.000000000 +1000
++++ scripts/mtx-changer.in 2005-10-07 07:41:52.000000000 +1000
+@@ -2,19 +2,26 @@
+ #
+ # Bacula interface to mtx autoloader
+ #
+-# $Id: bacula-1.36.3-mtxtmpfile.patch,v 1.1 2005/10/06 21:44:43 dragonheart Exp $
++# $Id: bacula-1.36.3-mtxtmpfile.patch,v 1.1 2005/10/06 21:44:43 dragonheart Exp $
+ #
+ # If you set in your Device resource
+ #
+ # Changer Command = "path-to-this-script/mtx-changer" %c %o %S %a %d
+ # you will have the following input to this script:
+ #
++# So Bacula will always call with all the following arguments, even though
++# in come cases, not all are used.
++
+ # mtx-changer "changer-device" "command" "slot" "archive-device" "drive-index"
+ # $1 $2 $3 $4 $5
+ #
+ # for example:
+ #
+ # mtx-changer /dev/sg0 load 1 /dev/nst0 0 (on a Linux system)
++#
++# will request to load the first cartidge into drive 0, where
++# the SCSI control channel is /dev/sg0, and the read/write device
++# is /dev/nst0.
+ #
+ # If you need to an offline, refer to the drive as $4
+ # e.g. mt -f $4 offline
+@@ -30,24 +37,37 @@
+ MTX=@MTX@
+
+ #
++# Create a temporary file
++#
++make_temp_file() {
++ TMPFILE=`mktemp -t mtx.XXXXXXXXXX`
++ if test x${TMPFILE} = x; then
++ TMPFILE="@working_dir@/mtx.$$"
++ if test -f ${TMPFILE}; then
++ echo "Temp file security problem on: ${TMPFILE}"
++ exit 1
++ fi
++ fi
++}
++
++#
+ # The purpose of this function to wait a maximum
+ # time for the drive. It will
+ # return as soon as the drive is ready, or after
+-# waiting a maximum of 180 seconds.
++# waiting a maximum of 300 seconds.
+ # Note, this is very system dependent, so if you are
+ # not running on Linux, you will probably need to
+-# re-write it.
+-#
+-# If you have a FreeBSD system, you might want to change
+-# the $(seq 180) to $(jot 180) -- tip from Brian McDonald
++# re-write it, or at least change the grep target.
+ #
+ wait_for_drive() {
+- for i in $(seq 180); do # Wait max 180 seconds
++ i=0
++ while [ $i -le 300 ]; do # Wait max 300 seconds
+ if mt -f $1 status | grep ONLINE >/dev/null 2>&1; then
+ break
+ fi
+ # echo "Device $1 - not ready, retrying..."
+ sleep 1
++ i=`expr $i + 1`
+ done
+ }
+
+@@ -64,30 +84,21 @@
+ cmd="$2"
+ slot=$3
+ device=$4
+-# If drive not given, default to 0
+-if test $# = 5 ; then
+- drive=$5
+-else
+- drive=0
+-fi
++drive=$5
++
+
+ #
+ # Check for special cases where only 2 arguments are needed,
+ # all others are a minimum of 3
+ case $cmd in
+- loaded)
+- ;;
+- unload)
+- ;;
+ list)
+ ;;
+ slots)
+ ;;
+ *)
+- if test $# -lt 3; then
++ if test $# -lt 5; then
+ echo "usage: mtx-changer ctl-device command slot archive-device drive"
+ echo " Insufficient number of arguments arguments given."
+- echo " Mimimum usage is first three arguments ..."
+ exit 1
+ fi
+ ;;
+@@ -100,11 +111,7 @@
+ #
+ # enable the following line if you need to eject the cartridge
+ # mt -f $device offline
+- if test x$slot = x; then
+- ${MTX} -f $ctl unload
+- else
+- ${MTX} -f $ctl unload $slot $drive
+- fi
++ ${MTX} -f $ctl unload $slot $drive
+ ;;
+
+ load)
+@@ -120,27 +127,33 @@
+ ;;
+
+ list)
+-# echo "Requested list"
+- ${MTX} -f $ctl status | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//"
+-# Comment out the previous line and add a line here
+-# to print "fake" barcodes.
++# echo "Doing mtx -f $ctl -- to list volumes"
++ make_temp_file
++ ${MTX} -f $ctl status >${TMPFILE}
++ rtn=$?
++ cat ${TMPFILE} | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//"
++ cat ${TMPFILE} | grep "^Data Transfer Element [0-9]*:Full (Storage Element [0-9]" | awk '{printf "%s:%s\n",$7,$10}'
++ rm -f ${TMPFILE} 2>&1 >/dev/null
+ #
+ # If you have a VXA PacketLoader and the above does not work, try
+ # turning it off and enabling the following line.
+ # ${MTX} -f $ctl status | grep " *Storage Element [0-9]*:.*Full" | sed "s/*Storage Element //" | sed "s/Full :VolumeTag=//"
++ exit $rtn
+ ;;
+
+ loaded)
+- ${MTX} -f $ctl status >/tmp/mtx.$$
++# echo "Doing mtx -f $ctl $drive -- to find what is loaded"
++ make_temp_file
++ ${MTX} -f $ctl status >${TMPFILE}
+ rtn=$?
+- cat /tmp/mtx.$$ | grep "^Data Transfer Element $drive:Full" | awk "{print \$7}"
+- cat /tmp/mtx.$$ | grep "^Data Transfer Element $drive:Empty" | awk "{print 0}"
+- rm -f /tmp/mtx.$$
++ cat ${TMPFILE} | grep "^Data Transfer Element $drive:Full" | awk "{print \$7}"
++ cat ${TMPFILE} | grep "^Data Transfer Element $drive:Empty" | awk "{print 0}"
++ rm -f ${TMPFILE} 2>&1 >/dev/null
+ exit $rtn
+ ;;
+
+ slots)
+-# echo "Request slots"
++# echo "Doing mtx -f $ctl -- to get count of slots"
+ ${MTX} -f $ctl status | grep " *Storage Changer" | awk "{print \$5}"
+ ;;
+ esac