aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorLars Koeller <lkoeller@FreeBSD.org>2005-03-12 07:28:45 +0000
committerLars Koeller <lkoeller@FreeBSD.org>2005-03-12 07:28:45 +0000
commite69963b304b6547649dadb93cab26c172f65ccbe (patch)
tree1a1541ff6b925e8c07919a4a88286ddbb3f7d490 /sysutils
parent0c3e497931797825eb5106ca1fdfa9cfc505d9b8 (diff)
downloadports-e69963b304b6547649dadb93cab26c172f65ccbe.tar.gz
ports-e69963b304b6547649dadb93cab26c172f65ccbe.zip
Notes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/bacula-server/Makefile31
-rw-r--r--sysutils/bacula-server/distinfo4
-rw-r--r--sysutils/bacula-server/files/chio-bacula87
-rw-r--r--sysutils/bacula-server/files/patch-configure21
-rw-r--r--sysutils/bacula-server/files/patch-src-console-console.c63
5 files changed, 87 insertions, 119 deletions
diff --git a/sysutils/bacula-server/Makefile b/sysutils/bacula-server/Makefile
index 0bbb38cc72cd..fd48235c455f 100644
--- a/sysutils/bacula-server/Makefile
+++ b/sysutils/bacula-server/Makefile
@@ -6,8 +6,8 @@
#
PORTNAME= bacula
-PORTVERSION= 1.36.1
-PORTREVISION= 1
+PORTVERSION= 1.36.2
+PORTREVISION= 0
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= bacula
@@ -37,7 +37,9 @@ CONFIGURE_ARGS= --with-tcp-wrappers=/usr/lib \
--disable-conio
CONFIGURE_ENV+= CPPFLAGS="-I/usr/include/readline -I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
+ LDFLAGS="-L${LOCALBASE}/lib" \
+ PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
+ PTHREAD_LIBS="${PTHREAD_LIBS}"
ALL_OPTIONS= CLIENT_ONLY WXCONSOLE GNOMECONSOLE MYSQL POSTGRESQL MTX
@@ -138,7 +140,7 @@ pre-everything::
@${ECHO_MSG} " WITH_MTX=yes if you want to use mtx instead of chio for autochanger control."
.if !defined(WITH_MYSQL) && !defined(WITH_POSTGRESQL)
@${ECHO_MSG} " WITH_MYSQL=yes if you want MySQL instead of SqLite as the database."
- @${ECHO_MSG} " WITH_POSTGRESQL=yes if you want PostgreSQL instead of SqLite as the database."
+ @${ECHO_MSG} " WITH_POSTGRESQL=yes if you want PostgreSQL instead of SqLite as the database."
@${ECHO_MSG} ""
@${ECHO_MSG} "The default DB is SQLite!"
.endif
@@ -150,26 +152,25 @@ pre-everything::
.endif
post-patch:
- @${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_CFLAGS}|g' ${WRKSRC}/configure
.if defined(WITH_CLIENT_ONLY)
- # In client port only install startup script out of script dir (see below post-install)
- # Dont mkdir ${PREFIX}/share/bacule cause it's empty
+# In client port only install startup script out of script dir (see below post-install)
+# Dont mkdir ${PREFIX}/share/bacule cause it's empty
@${REINPLACE_CMD} -e 's|^\(fd_subdirs = .*\)scripts\(.*\)|\1\2|g' ${WRKSRC}/Makefile.in
${REINPLACE_CMD} -e 's|\(.*$$(MKDIR) $$(DESTDIR)$$(scriptdir)\)|#\1|g' ${WRKSRC}/Makefile.in
.else
- # In server port don't install documentation and filed
+# In server port don't install documentation and filed
@${REINPLACE_CMD} -e 's|^\(fd_subdirs = .*\)doc\(.*\)|\1\2|g' ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|^all_subdirs = .*|all_subdirs = scripts src\/lib src\/findlib $${subdirs}|g' ${WRKSRC}/Makefile.in
.endif
post-install:
.if defined(WITH_CLIENT_ONLY)
- # Install start script
+# Install start script
${INSTALL_SCRIPT} ${WRKSRC}/scripts/bacula ${PREFIX}/etc/rc.d/bacula.sh.sample
- # Extend only /etc/services
+# Extend only /etc/services
@ ${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PORTNAME}
- # Console stuff
+# Console stuff
if [ -f ${PREFIX}/etc/bconsole.conf.new ]; then \
${ECHO_CMD} "etc/bconsole.conf.new" >> ${TMPPLIST}; \
elif [ -f ${PREFIX}/etc/bconsole.conf ]; then \
@@ -201,10 +202,10 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/ReleaseNotes ${DOCSDIR}
.endif
.else
- # Extend /etc/services and install UID/GID
+# Extend /etc/services and install UID/GID
@ ${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
- # Install config files and preserve existing ones
+# Install config files and preserve existing ones
${INSTALL_SCRIPT} ${FILESDIR}/chio-bacula ${PREFIX}/sbin
if [ -f ${PREFIX}/etc/bacula-barcodes ]; then \
${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.new ; \
@@ -213,11 +214,11 @@ post-install:
${INSTALL_DATA} ${FILESDIR}/bacula-barcodes ${PREFIX}/etc/bacula-barcodes.samples ; \
${ECHO_CMD} "etc/bacula-barcodes.samples" >> ${TMPPLIST}; \
fi
- # chmod of bsmtp program so bacula can use it with dropped down permissions
+# chmod of bsmtp program so bacula can use it with dropped down permissions
${CHMOD} o+x ${PREFIX}/sbin/bsmtp
${CHOWN} -R bacula:bacula ${PREFIX}/share/bacula
.endif
- # Install leaves existing conf files untouched. Respect this here!
+# Install leaves existing conf files untouched. Respect this here!
for na in ${CONFFILES}; do \
if [ -f ${PREFIX}/etc/bacula-$$na.conf.new ]; then \
${ECHO_CMD} "etc/bacula-$$na.conf.new" >> ${TMPPLIST}; \
diff --git a/sysutils/bacula-server/distinfo b/sysutils/bacula-server/distinfo
index ebefb511e6a5..17792b54c9c7 100644
--- a/sysutils/bacula-server/distinfo
+++ b/sysutils/bacula-server/distinfo
@@ -1,2 +1,2 @@
-MD5 (bacula-1.36.1.tar.gz) = d09ecce1bc9e3a421f7eaf5ad2de5850
-SIZE (bacula-1.36.1.tar.gz) = 6828844
+MD5 (bacula-1.36.2.tar.gz) = 55a9ab6d211913fa8c73e3d07eabc189
+SIZE (bacula-1.36.2.tar.gz) = 6796181
diff --git a/sysutils/bacula-server/files/chio-bacula b/sysutils/bacula-server/files/chio-bacula
index a586cbd1e914..ca7ec4931581 100644
--- a/sysutils/bacula-server/files/chio-bacula
+++ b/sysutils/bacula-server/files/chio-bacula
@@ -1,7 +1,8 @@
#!/bin/sh
#
-# Bacula interface to mtx autoloader
-# (By Lars Köller, lars+bacula@koellers.net)
+# Bacula interface to FreeBSD chio autoloader command with
+# multiple drive support
+# (By Lars Köller, lars+bacula@koellers.net, 2004)
#
# If you set in your Device resource
#
@@ -24,6 +25,16 @@
# the mtx exit code or a 0. If the script exits with a non-zero
# exit code, Bacula will assume the request failed.
#
+me=$(basename $0)
+
+# Debug output, take care this file is writeable for user bacula!
+#LOG=/var/db/bacula/chio-bacula.log
+#exec 2>>$LOG
+#echo "------------------------- $(date) Start $(basename $0) -------------------------" >> $LOG
+#set -x
+
+# Debug
+logger -p user.err "$me $@"
# This simulates a barcode reader in the changer.
# The labes of the virtual barcode reader are located in the BARCODE_FILE
@@ -33,15 +44,36 @@ MTX=/bin/chio
# Set default values (see case statement below for
# free mapping of drive index and tape device
# We have a double drive Qualstar where drive 1 is the default bacula drive
+#TAPE=/dev/bacula-tape
TAPE=/dev/nrsa0
DRIVE=0
# Time to wait for (un)loading
SLEEP=20
-me=$(basename $0)
-
-# Debug
-logger -p user.err "$me $@"
+usage()
+{
+ echo ""
+ echo "The $me script for bacula"
+ echo "--------------------------------------"
+ echo ""
+ echo "usage: $me <changer-device> <command> [slot] [devicename of tapedrive] [drive index]"
+ echo ""
+ echo "Valid commands:"
+ echo ""
+ echo "unload Unloads a tape into the slot"
+ echo " from where it was loaded."
+ echo "load <slot> Loads a tape from the slot <slot>"
+ echo " (slot-base is calculated to 1 as first slot)"
+ echo "list Lists full storage slots"
+ echo "loaded Gives slot from where the tape was loaded."
+ echo " 0 means the tape drive is empty."
+ echo "slots Gives Number of aviable slots."
+ echo ""
+ echo "Example:"
+ echo " $me /dev/changer load 1 loads a tape from slot 1"
+ echo ""
+ exit 2
+}
# The changer device
if [ -z "$1" ] ; then
@@ -68,49 +100,26 @@ fi
if [ ! -z "$4" ]; then
TAPE=$4
fi
-# Set drive for chio as you need
-# here you can also map to any tape device
-# DRIVE is the chio drive number!
+
+# Here you can map bacula drive number to any tape device
+# DRIVE is the chio drive number used below by chio!
case $5 in
0)
+ # First Drive in Changer is Bacula drive
DRIVE=0
+ #TAPE=/dev/bacula-tape
TAPE=/dev/nrsa0
- #DRIVE=1
- #TAPE=/dev/nrsa2
;;
1)
DRIVE=1
- #DRIVE=0
+ #TAPE=/dev/bacula-tape2
TAPE=/dev/nrsa1
;;
esac
-usage()
-{
- echo ""
- echo "The $me script for bacula"
- echo "--------------------------------------"
- echo ""
- echo "usage: $me <changer-device> <command> [slot] [devicename of tapedrive] [drive index]"
- echo ""
- echo "Valid commands:"
- echo ""
- echo "unload Unloads a tape into the slot"
- echo " from where it was loaded."
- echo "load <slot> Loads a tape from the slot <slot>"
- echo " (slot-base is calculated to 1 as first slot)"
- echo "list Lists full storage slots"
- echo "loaded Gives slot from where the tape was loaded."
- echo " 0 means the tape drive is empty."
- echo "slots Gives Number of aviable slots."
- echo ""
- echo "Example:"
- echo " mtx-changer /dev/changer load 1 loads a tape from slot 1"
- echo ""
- exit 2
-}
-
-
+#
+# Main
+#
case ${COMMAND} in
unload)
# enable the following line if you need to eject the cartridge
@@ -144,7 +153,7 @@ case ${COMMAND} in
list)
if [ "${SIMULATE_BARCODE}" = "true" ]; then
if [ -f "$BARCODE_FILE" ]; then
- cat $BARCODE_FILE | grep -v "^#"
+ cat $BARCODE_FILE | grep -v -e "^#" -e "^$"
exit 0
else
echo "Barcode file $BARCODE_FILE missing ... exiting!"
diff --git a/sysutils/bacula-server/files/patch-configure b/sysutils/bacula-server/files/patch-configure
new file mode 100644
index 000000000000..dcec3abe1f50
--- /dev/null
+++ b/sysutils/bacula-server/files/patch-configure
@@ -0,0 +1,21 @@
+*** configure.org Sun Mar 6 16:46:54 2005
+--- configure Sun Mar 6 16:49:20 2005
+***************
+*** 21037,21044 ****
+ DISTVER=`uname -a |awk '{print $3}'`
+ VER=`echo $DISTVER | cut -c 1`
+ if test x$VER = x4 ; then
+! PTHREAD_LIB="-pthread"
+! CFLAGS="${CFLAGS} -pthread"
+ fi
+ lld="qd"
+ llu="qu"
+--- 21037,21044 ----
+ DISTVER=`uname -a |awk '{print $3}'`
+ VER=`echo $DISTVER | cut -c 1`
+ if test x$VER = x4 ; then
+! PTHREAD_LIB="${PTHREAD_LIBS}"
+! CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
+ fi
+ lld="qd"
+ llu="qu"
diff --git a/sysutils/bacula-server/files/patch-src-console-console.c b/sysutils/bacula-server/files/patch-src-console-console.c
deleted file mode 100644
index bbdf05da6702..000000000000
--- a/sysutils/bacula-server/files/patch-src-console-console.c
+++ /dev/null
@@ -1,63 +0,0 @@
-*** src/console/console.c.orig Sun Jun 20 13:43:02 2004
---- src/console/console.c Sat Jul 3 10:48:13 2004
-***************
-*** 63,69 ****
-
- /* Forward referenced functions */
- static void terminate_console(int sig);
-! int get_cmd(FILE *input, const char *prompt, BSOCK *sock, int sec);
- static int do_outputcmd(FILE *input, BSOCK *UA_sock);
- void senditf(const char *fmt, ...);
- void sendit(const char *buf);
---- 63,69 ----
-
- /* Forward referenced functions */
- static void terminate_console(int sig);
-! int get_cmd(FILE *input, char *prompt, BSOCK *sock, int sec);
- static int do_outputcmd(FILE *input, BSOCK *UA_sock);
- void senditf(const char *fmt, ...);
- void sendit(const char *buf);
-***************
-*** 200,206 ****
-
- static void read_and_process_input(FILE *input, BSOCK *UA_sock)
- {
-! const char *prompt = "*";
- bool at_prompt = false;
- int tty_input = isatty(fileno(input));
- int stat;
---- 200,206 ----
-
- static void read_and_process_input(FILE *input, BSOCK *UA_sock)
- {
-! char *prompt = "*";
- bool at_prompt = false;
- int tty_input = isatty(fileno(input));
- int stat;
-***************
-*** 499,510 ****
- #ifdef HAVE_READLINE
- #define READLINE_LIBRARY 1
- #undef free
- #include "readline.h"
- #include "history.h"
-
--
- int
-! get_cmd(FILE *input, const char *prompt, BSOCK *sock, int sec)
- {
- char *line;
-
---- 499,510 ----
- #ifdef HAVE_READLINE
- #define READLINE_LIBRARY 1
- #undef free
-+ #include <stdio.h>
- #include "readline.h"
- #include "history.h"
-
- int
-! get_cmd(FILE *input, char *prompt, BSOCK *sock, int sec)
- {
- char *line;
-