From: <ke...@us...> - 2008-03-21 17:45:41
|
Revision: 6658 http://bacula.svn.sourceforge.net/bacula/?rev=6658&view=rev Author: kerns Date: 2008-03-21 10:45:46 -0700 (Fri, 21 Mar 2008) Log Message: ----------- Implement autostart scripts for Debian Modified Paths: -------------- trunk/bacula/autoconf/bacula-macros/db.m4 trunk/bacula/autoconf/config.h.in trunk/bacula/autoconf/configure.in trunk/bacula/configure trunk/bacula/platforms/Makefile.in trunk/bacula/projects trunk/bacula/src/win32/libwin32/bacula.rc trunk/bacula/technotes-2.3 Added Paths: ----------- trunk/bacula/platforms/debian/Makefile.in trunk/bacula/platforms/debian/bacula-dir.in trunk/bacula/platforms/debian/bacula-fd.in trunk/bacula/platforms/debian/bacula-sd.in Removed Paths: ------------- trunk/bacula/platforms/debian/bacula-director Modified: trunk/bacula/autoconf/bacula-macros/db.m4 =================================================================== --- trunk/bacula/autoconf/bacula-macros/db.m4 2008-03-21 17:44:09 UTC (rev 6657) +++ trunk/bacula/autoconf/bacula-macros/db.m4 2008-03-21 17:45:46 UTC (rev 6658) @@ -98,7 +98,7 @@ SQL_LIB=$DBI_LIBDIR/libdbi.a DBI_DBD_DRIVERDIR="-D DBI_DRIVER_DIR=\\\"$DRIVERDIR\\\"" - AC_DEFINE(HAVE_DBI) + AC_DEFINE(HAVE_DBI, 1, [Set if you have the DBI driver]) AC_MSG_RESULT(yes) db_found=yes support_dbi=yes Modified: trunk/bacula/autoconf/config.h.in =================================================================== --- trunk/bacula/autoconf/config.h.in 2008-03-21 17:44:09 UTC (rev 6657) +++ trunk/bacula/autoconf/config.h.in 2008-03-21 17:45:46 UTC (rev 6658) @@ -21,9 +21,6 @@ /* Define to `int' if <sys/types.h> doesn't define. */ #undef ssize_t -/* Define if you want to use DBI */ -#undef HAVE_DBI - /* Define if you want to use PostgreSQL */ #undef HAVE_POSTGRESQL @@ -305,6 +302,9 @@ /* Define to 1 if you have the <curses.h> header file. */ #undef HAVE_CURSES_H +/* Set if you have the DBI driver */ +#undef HAVE_DBI + /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT @@ -325,10 +325,6 @@ */ #undef HAVE_DECL_TZNAME -/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. - */ -#undef HAVE_DECL_TZNAME - /* Define to 1 if you have the declaration of `_snprintf', and to 0 if you don't. */ #undef HAVE_DECL__SNPRINTF Modified: trunk/bacula/autoconf/configure.in =================================================================== --- trunk/bacula/autoconf/configure.in 2008-03-21 17:44:09 UTC (rev 6657) +++ trunk/bacula/autoconf/configure.in 2008-03-21 17:45:46 UTC (rev 6658) @@ -1945,8 +1945,13 @@ ;; debian) DISTVER=`cat /etc/debian_version` - TAPEDRIVE="/dev/nrst0" + TAPEDRIVE="/dev/nst0" PSCMD="ps -e -o pid,command" + PFILES="${PFILES} \ + platforms/debian/Makefile \ + platforms/debian/bacula-fd \ + platforms/debian/bacula-sd \ + platforms/debian/bacula-dir" ;; freebsd) DISTVER=`uname -a |awk '{print $3}'` Modified: trunk/bacula/configure =================================================================== --- trunk/bacula/configure 2008-03-21 17:44:09 UTC (rev 6657) +++ trunk/bacula/configure 2008-03-21 17:45:46 UTC (rev 6658) @@ -17968,7 +17968,8 @@ SQL_LIB=$DBI_LIBDIR/libdbi.a DBI_DBD_DRIVERDIR="-D DBI_DRIVER_DIR=\\\"$DRIVERDIR\\\"" - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_DBI 1 _ACEOF @@ -30110,8 +30111,13 @@ ;; debian) DISTVER=`cat /etc/debian_version` - TAPEDRIVE="/dev/nrst0" + TAPEDRIVE="/dev/nst0" PSCMD="ps -e -o pid,command" + PFILES="${PFILES} \ + platforms/debian/Makefile \ + platforms/debian/bacula-fd \ + platforms/debian/bacula-sd \ + platforms/debian/bacula-dir" ;; freebsd) DISTVER=`uname -a |awk '{print $3}'` Modified: trunk/bacula/platforms/Makefile.in =================================================================== --- trunk/bacula/platforms/Makefile.in 2008-03-21 17:44:09 UTC (rev 6657) +++ trunk/bacula/platforms/Makefile.in 2008-03-21 17:45:46 UTC (rev 6658) @@ -12,7 +12,7 @@ INSTALL = @INSTALL@ SUBDIRS = freebsd redhat solaris unknown openbsd irix gentoo \ - darwin aix bsdi mandrake slackware alpha + debian darwin aix bsdi mandrake slackware alpha MAKE = make Added: trunk/bacula/platforms/debian/Makefile.in =================================================================== --- trunk/bacula/platforms/debian/Makefile.in (rev 0) +++ trunk/bacula/platforms/debian/Makefile.in 2008-03-21 17:45:46 UTC (rev 6658) @@ -0,0 +1,88 @@ +# +# This file is used as the template to create the +# Makefile for the Debian/Ubuntu/Kubuntu specific installation. +# +# 21 March 2008 -- Kern Sibbald +# +# for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ +# + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 754 + +nothing: + +install: install-autostart + +install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir + +install_logrotate: + @$(INSTALL_PROGRAM) ../../scripts/logrotate $(DESTDIR)/etc/logrotate.d/bacula + +install-autostart-fd: uninstall-autostart-fd + @echo "Installing bacula-fd boot script ..." + @$(INSTALL_PROGRAM) bacula-fd $(DESTDIR)/etc/init.d/bacula-fd + @echo "Installing bacula-fd symlinks ..." + @if test x$(DESTDIR) = x ; then \ + /usr/sbin/update-rc.d bacula-fd start 91 2 3 4 5 . stop 9 0 1 6 .; \ + fi + + +install-autostart-sd: uninstall-autostart-sd + @echo "Installing bacula-sd boot script ..." + @$(INSTALL_PROGRAM) bacula-sd $(DESTDIR)/etc/init.d/bacula-sd + @echo "Installing bacula-sd symlinks ..." + @if test "x$(DESTDIR)" = "x" ; then \ + /usr/sbin/update-rc.d bacula-sd start 91 2 3 4 5 . stop 9 0 1 6 .; \ + fi + + +install-autostart-dir: uninstall-autostart-dir + @echo "Installing bacula-dir boot script ..." + @$(INSTALL_PROGRAM) bacula-dir $(DESTDIR)/etc/init.d/bacula-dir + @echo "Installing bacula-dir symlinks ..." + @if test "x$(DESTDIR)" = "x" ; then \ + /usr/sbin/update-rc.d bacula-dir start 90 2 3 4 5 . stop 9 0 1 6 .; \ + fi + + +uninstall: uninstall-autostart + +uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir + +uninstall-logrotate: + @rm -f $(DESTDIR)/etc/logrotate.d/bacula + +uninstall-autostart-fd: + @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-fd; then \ + /etc/init.d/bacula-fd stop; \ + rm -f $(DESTDIR)/etc/init.d/bacula-fd; \ + /usr/sbin/update-rc.d bacula-fd remove; \ + fi + + +uninstall-autostart-sd: + @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-sd; then \ + /etc/init.d/bacula-sd stop; \ + rm -f $(DESTDIR)/etc/init.d/bacula-sd; \ + /usr/sbin/update-rc.d bacula-sd remove; \ + fi + +uninstall-autostart-dir: + @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-dir; then \ + /etc/init.d/bacula-dir stop; \ + rm -f $(DESTDIR)/etc/init.d/bacula-dir; \ + /usr/sbin/update-rc.d bacula-dir remove; \ + fi + @rm -f $(DESTDIR)/etc/init.d/bacula-dir + +clean: + @rm -f 1 2 3 + +distclean: clean + @rm -f Makefile + @rm -f bacula-sd bacula-fd bacula-dir + +devclean: clean + @rm -f Makefile + @rm -f bacula-sd bacula-fd bacula-dir Added: trunk/bacula/platforms/debian/bacula-dir.in =================================================================== --- trunk/bacula/platforms/debian/bacula-dir.in (rev 0) +++ trunk/bacula/platforms/debian/bacula-dir.in 2008-03-21 17:45:46 UTC (rev 6658) @@ -0,0 +1,58 @@ +#! /bin/sh +# +# bacula This shell script takes care of starting and stopping +# the bacula Director daemon on Debian/Ubuntu/Kubuntu +# systems. +# +# Kern E. Sibbald - 21 March 2008 +# +# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ +# + +NAME="bacula-dir" +DESC="Bacula Director" +DAEMON=@sbindir@/${NAME} +BUSER=@dir_user@ +BGROUP=@dir_group@ +BOPTIONS="-c @sysconfdir@/${NAME}.conf" +BPORT=@dir_port@ + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +test -f $DAEMON || exit 0 + +if [ -n "`getent services ${NAME}`" ]; then + BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'` +fi + +PIDFILE=@piddir@/${NAME}.${BPORT}.pid + +if [ "x${BUSER}" != "x" ]; then + BOPTIONS="${BOPTIONS} -u ${BUSER}" +fi +if [ "x${BGROUP}" != "x" ]; then + BOPTIONS="${BOPTIONS} -g ${BGROUP}" +fi + +case "$1" in + start) + echo -n "Starting ${DESC}: " + start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- ${BOPTIONS} + echo "${NAME}" + ;; + stop) + echo -n "Stopping ${DESC}: " + start-stop-daemon --oknodo --stop --quiet --exec ${DAEMON} -- ${BOPTIONS} + echo "${NAME}" + ;; + restart|force-reload) + $0 stop + sleep 5 + $0 start + ;; + *) + echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac +exit 0 Deleted: trunk/bacula/platforms/debian/bacula-director =================================================================== --- trunk/bacula/platforms/debian/bacula-director 2008-03-21 17:44:09 UTC (rev 6657) +++ trunk/bacula/platforms/debian/bacula-director 2008-03-21 17:45:46 UTC (rev 6658) @@ -1,59 +0,0 @@ -#! /bin/sh -# bacula-director SysV init script for Bacula-FD. -# -# Written by Miquel van Smoorenburg <mi...@ci...>. -# Modified for Debian GNU/Linux by Ian Murdock <imu...@gn...>. -# Customized for Bacula by Jose Luis Tallon <jlt...@ad...> -# Modified RJM 2-12-03 to fix errors with pidfile name -# -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/bacula-dir -NAME="bacula-dir" -PORT=9101 -DESC="Bacula Director" -ARGS="-c /etc/bacula/bacula-dir.conf -u bacula -g bacula" - -test -f $DAEMON || exit 0 - -set -e - -if [ -n "`getent services bacula-dir`" ]; then - PORT=`getent services bacula-dir | awk '{ gsub("/tcp","",$2); print $2; }'` -fi - -PIDFILE=/var/run/bacula/$NAME.$PORT.pid - -case "$1" in - start) - if [ -f /etc/bacula/do_not_run ]; then - echo "Not starting $DESC: disabled via /etc/bacula/do_not_run" - exit 0 - fi - - echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $ARGS - echo "$NAME." - ;; - - stop) - echo -n "Stopping $DESC: " - start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE --exec $DAEMON - echo "$NAME." - ;; - - restart|force-reload) - echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON - sleep 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $ARGS - echo "$NAME." - ;; - *) - N=/etc/init.d/$NAME - # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 Added: trunk/bacula/platforms/debian/bacula-fd.in =================================================================== --- trunk/bacula/platforms/debian/bacula-fd.in (rev 0) +++ trunk/bacula/platforms/debian/bacula-fd.in 2008-03-21 17:45:46 UTC (rev 6658) @@ -0,0 +1,58 @@ +#! /bin/sh +# +# bacula This shell script takes care of starting and stopping +# the bacula Director daemon on Debian/Ubuntu/Kubuntu +# systems. +# +# Kern E. Sibbald - 21 March 2008 +# +# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ +# + +NAME="bacula-fd" +DESC="Bacula File Daemon" +DAEMON=@sbindir@/${NAME} +BUSER=@fd_user@ +BGROUP=@fd_group@ +BOPTIONS="-c @sysconfdir@/${NAME}.conf" +BPORT=@fd_port@ + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +test -f $DAEMON || exit 0 + +if [ -n "`getent services ${NAME}`" ]; then + BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'` +fi + +PIDFILE=@piddir@/${NAME}.${BPORT}.pid + +if [ "x${BUSER}" != "x" ]; then + BOPTIONS="${BOPTIONS} -u ${BUSER}" +fi +if [ "x${BGROUP}" != "x" ]; then + BOPTIONS="${BOPTIONS} -g ${BGROUP}" +fi + +case "$1" in + start) + echo -n "Starting ${DESC}: " + start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- ${BOPTIONS} + echo "${NAME}" + ;; + stop) + echo -n "Stopping ${DESC}: " + start-stop-daemon --oknodo --stop --quiet --exec ${DAEMON} -- ${BOPTIONS} + echo "${NAME}" + ;; + restart|force-reload) + $0 stop + sleep 5 + $0 start + ;; + *) + echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac +exit 0 Added: trunk/bacula/platforms/debian/bacula-sd.in =================================================================== --- trunk/bacula/platforms/debian/bacula-sd.in (rev 0) +++ trunk/bacula/platforms/debian/bacula-sd.in 2008-03-21 17:45:46 UTC (rev 6658) @@ -0,0 +1,58 @@ +#! /bin/sh +# +# bacula This shell script takes care of starting and stopping +# the bacula Director daemon on Debian/Ubuntu/Kubuntu +# systems. +# +# Kern E. Sibbald - 21 March 2008 +# +# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@ +# + +NAME="bacula-sd" +DESC="Bacula Storage Daemon" +DAEMON=@sbindir@/${NAME} +BUSER=@sd_user@ +BGROUP=@sd_group@ +BOPTIONS="-c @sysconfdir@/${NAME}.conf" +BPORT=@sd_port@ + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +test -f $DAEMON || exit 0 + +if [ -n "`getent services ${NAME}`" ]; then + BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'` +fi + +PIDFILE=@piddir@/${NAME}.${BPORT}.pid + +if [ "x${BUSER}" != "x" ]; then + BOPTIONS="${BOPTIONS} -u ${BUSER}" +fi +if [ "x${BGROUP}" != "x" ]; then + BOPTIONS="${BOPTIONS} -g ${BGROUP}" +fi + +case "$1" in + start) + echo -n "Starting ${DESC}: " + start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- ${BOPTIONS} + echo "${NAME}" + ;; + stop) + echo -n "Stopping ${DESC}: " + start-stop-daemon --oknodo --stop --quiet --exec ${DAEMON} -- ${BOPTIONS} + echo "${NAME}" + ;; + restart|force-reload) + $0 stop + sleep 5 + $0 start + ;; + *) + echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac +exit 0 Modified: trunk/bacula/projects =================================================================== --- trunk/bacula/projects 2008-03-21 17:44:09 UTC (rev 6657) +++ trunk/bacula/projects 2008-03-21 17:45:46 UTC (rev 6658) @@ -1274,6 +1274,28 @@ Run = pool=Monthly last Day of the Month at 23:50 + Date: 20 March 2008 + + Origin: Frank Sweetser <fs...@wp...> + + What: Add a new SD directive, "minimum spool size" (or similar). This + directive would specify a minimum level of free space available for + spooling. If the unused spool space is less than this level, any new + spooling requests would be blocked as if the "maximum spool size" + threshold had bee reached. Already spooling jobs would be unaffected + by this directive. + + Why: I've been bitten by this scenario a couple of times: + + Assume a maximum spool size of 100M. Two concurrent jobs, A and B, are + both running. Due to timing quirks and previously running jobs, job A + has used 99.9M of space in the spool directory. While A is busy + despooling to disk, B is happily using the remaining 0.1M of spool + space. This ends up in a spool/despool sequence every 0.1M of data. + In addition to fragmenting the data on the volume far more than was + necessary, in larger data sets (ie, tens or hundreds of gigabytes) it + can easily produce multi-megabyte report emails! + ========== Already implemented ================================ Item n: make changing "spooldata=yes|no" possible for Modified: trunk/bacula/src/win32/libwin32/bacula.rc =================================================================== --- trunk/bacula/src/win32/libwin32/bacula.rc 2008-03-21 17:44:09 UTC (rev 6657) +++ trunk/bacula/src/win32/libwin32/bacula.rc 2008-03-21 17:45:46 UTC (rev 6658) @@ -67,7 +67,7 @@ VALUE "FileDescription", "Bacula File daemon for Win32\0" VALUE "FileVersion", VERSION "\0" VALUE "InternalName", "Bacula\0" - VALUE "LegalCopyright", "Copyright Free Software Foundation Europe e.V., 1999-2007\0" + VALUE "LegalCopyright", "Copyright Free Software Foundation Europe e.V., 1999-2008\0" VALUE "LegalTrademarks", "Licensed under GNU GPL 2.0\0" VALUE "OriginalFilename", "bacula-fd.exe\0" VALUE "PrivateBuild", "\0" @@ -118,7 +118,7 @@ LTEXT " by Kern Sibbald",-1,134,38,78,10 LTEXT "For more information, see:",-1,115,60,100,10 LTEXT " www.bacula.org",-1,115,70,100,10 - LTEXT "Copyright (C) 1999-2007, Free Software Foundation Europe e.V.",-1,7,120,175,10 + LTEXT "Copyright (C) 1999-2008, Free Software Foundation Europe e.V.",-1,7,120,175,10 LTEXT "Licensed under GNU GPL 2.0.",-1,7,130,175,10 RTEXT "Build Date:",-1,108,24,42,8 RTEXT "Bacula Version:",-1,100,9,50,8 Modified: trunk/bacula/technotes-2.3 =================================================================== --- trunk/bacula/technotes-2.3 2008-03-21 17:44:09 UTC (rev 6657) +++ trunk/bacula/technotes-2.3 2008-03-21 17:45:46 UTC (rev 6658) @@ -23,6 +23,7 @@ General: 21Mar08 +kes Implement autostart scripts for Debian. ebl Implement upgrade catalog scripts. 20Mar08 ebl Apply jobstat patch for long term statistics. Have to implement This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |