]> git.sur5r.net Git - bacula/bacula/commitdiff
Cleanup old patches
authorKern Sibbald <kern@sibbald.com>
Thu, 10 Jan 2008 09:56:11 +0000 (09:56 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 10 Jan 2008 09:56:11 +0000 (09:56 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6269 91ce42f0-d328-0410-95d8-f526ca767f89

22 files changed:
bacula/patches/2.2.6-add.patch [deleted file]
bacula/patches/2.2.6-backup-restore-socket.patch [deleted file]
bacula/patches/2.2.6-bcopy.patch [deleted file]
bacula/patches/2.2.6-dvdwrite_trialfix.patch [deleted file]
bacula/patches/2.2.6-mac-build.patch [deleted file]
bacula/patches/2.2.6-maxconcurrentjobs.patch [deleted file]
bacula/patches/2.2.6-maxruntime.patch [deleted file]
bacula/patches/2.2.6-queued-msg.patch [deleted file]
bacula/patches/2.2.6-scratch.patch [deleted file]
bacula/patches/2.2.6-status.patch [deleted file]
bacula/patches/2.2.6-verify-vol.patch [deleted file]
bacula/patches/2.2.x/2.2.6-add.patch [new file with mode: 0644]
bacula/patches/2.2.x/2.2.6-backup-restore-socket.patch [new file with mode: 0644]
bacula/patches/2.2.x/2.2.6-bcopy.patch [new file with mode: 0644]
bacula/patches/2.2.x/2.2.6-dvdwrite_trialfix.patch [new file with mode: 0644]
bacula/patches/2.2.x/2.2.6-mac-build.patch [new file with mode: 0644]
bacula/patches/2.2.x/2.2.6-maxconcurrentjobs.patch [new file with mode: 0644]
bacula/patches/2.2.x/2.2.6-maxruntime.patch [new file with mode: 0644]
bacula/patches/2.2.x/2.2.6-queued-msg.patch [new file with mode: 0644]
bacula/patches/2.2.x/2.2.6-scratch.patch [new file with mode: 0644]
bacula/patches/2.2.x/2.2.6-status.patch [new file with mode: 0644]
bacula/patches/2.2.x/2.2.6-verify-vol.patch [new file with mode: 0644]

diff --git a/bacula/patches/2.2.6-add.patch b/bacula/patches/2.2.6-add.patch
deleted file mode 100644 (file)
index 67e53bd..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-
- This patch fixes the infinite loop when trying to increase the
- maximum number of volumes in a Pool during the add command.
- This patch fixes bug #1008. 
-
- It can be applied to Bacula version 2.2.6 (and probably earlier
- 2.2.x versions) with:
-
- cd <bacula-source>
- ./configure <your options>
- patch -p0 <2.2.6-add.patch
- make
- ...
- make install
-
-Index: src/dird/ua_cmds.c
-===================================================================
---- src/dird/ua_cmds.c (revision 5901)
-+++ src/dird/ua_cmds.c (working copy)
-@@ -244,12 +244,10 @@
-    while (pr.MaxVols > 0 && pr.NumVols >= pr.MaxVols) {
-       ua->warning_msg(_("Pool already has maximum volumes=%d\n"), pr.MaxVols);
--      for (;;) {
--         if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
--            return 1;
--         }
--         pr.MaxVols = ua->pint32_val;
-+      if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
-+         return 1;
-       }
-+      pr.MaxVols = ua->pint32_val;
-    }
-    /* Get media type */
diff --git a/bacula/patches/2.2.6-backup-restore-socket.patch b/bacula/patches/2.2.6-backup-restore-socket.patch
deleted file mode 100644 (file)
index fb9156b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-
- This patch fixes bug #1015 where bacula failed to restore acl to a socket
- because Bacula no longer restores sockets.
-
- This fix will tell to bacula-fd to skip all socket file.
-
- Apply it to version 2.2.6 (or probably any previous 2.2.x version) with
-
- cd <bacula-source>
- ./configure <your-options>  not necessary if already configured
- patch -p0 < 2.2.6-backup-restore-socket.patch
- make
- ...
- make install
-
-Index: src/filed/backup.c
-===================================================================
---- src/filed/backup.c  (révision 5882)
-+++ src/filed/backup.c  (copie de travail)
-@@ -279,6 +279,10 @@
-       break;
-    case FT_SPEC:
-       Dmsg1(130, "FT_SPEC saving: %s\n", ff_pkt->fname);
-+      if (S_ISSOCK(ff_pkt->statp.st_mode)) {
-+        Jmsg(jcr, M_SKIPPED, 1, _("     Socket file skipped: %s\n"), ff_pkt->fname);
-+        return 1;
-+      }
-       break;
-    case FT_RAW:
-       Dmsg1(130, "FT_RAW saving: %s\n", ff_pkt->fname);
diff --git a/bacula/patches/2.2.6-bcopy.patch b/bacula/patches/2.2.6-bcopy.patch
deleted file mode 100644 (file)
index a02dec4..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-
- This patch fixes bcopy so that it produces correct Volumes.
- It fixes bug #1022.
-
- Apply this patch to version 2.2.6 and possibly any 2.2.x version with:
-
- cd <bacula-source>
- patch -p0 2.2.6-bcopy.patch
- ./configure <your-options>
- make
- ...
- make install
-
-
-Index: src/stored/bcopy.c
-===================================================================
---- src/stored/bcopy.c (revision 6010)
-+++ src/stored/bcopy.c (working copy)
-@@ -89,6 +89,7 @@
-    char *iVolumeName = NULL;
-    char *oVolumeName = NULL;
-    bool ignore_label_errors = false;
-+   bool ok;
-    setlocale(LC_ALL, "");
-    bindtextdomain("bacula", LOCALEDIR);
-@@ -199,9 +200,11 @@
-    }
-    out_block = out_jcr->dcr->block;
--   read_records(in_jcr->dcr, record_cb, mount_next_read_volume);
--   if (!write_block_to_device(out_jcr->dcr)) {
--      Pmsg0(000, _("Write of last block failed.\n"));
-+   ok = read_records(in_jcr->dcr, record_cb, mount_next_read_volume);
-+   if (ok || out_dev->can_write()) {
-+      if (!write_block_to_device(out_jcr->dcr)) {
-+         Pmsg0(000, _("Write of last block failed.\n"));
-+      }
-    }
-    Pmsg2(000, _("%u Jobs copied. %u records copied.\n"), jobs, records);
-@@ -253,6 +256,7 @@
-                   out_dev->print_name(), out_dev->bstrerror());
-                Jmsg(out_jcr, M_FATAL, 0, _("Cannot fixup device error. %s\n"),
-                      out_dev->bstrerror());
-+               return false;
-             }
-          }
-          if (!write_block_to_device(out_jcr->dcr)) {
-@@ -260,8 +264,9 @@
-                out_dev->print_name(), out_dev->bstrerror());
-             Jmsg(out_jcr, M_FATAL, 0, _("Cannot fixup device error. %s\n"),
-                   out_dev->bstrerror());
-+            return false;
-          }
--         break;
-+         return true;
-       case EOM_LABEL:
-          Pmsg0(000, _("EOM label not copied.\n"));
-          return true;
-@@ -269,7 +274,7 @@
-          Pmsg0(000, _("EOT label not copied.\n"));
-          return true;
-       default:
--         break;
-+         return true;
-       }
-    }
-@@ -283,7 +288,7 @@
-             out_dev->print_name(), out_dev->bstrerror());
-          Jmsg(out_jcr, M_FATAL, 0, _("Cannot fixup device error. %s\n"),
-                out_dev->bstrerror());
--         break;
-+         return false;
-       }
-    }
-    return true;
diff --git a/bacula/patches/2.2.6-dvdwrite_trialfix.patch b/bacula/patches/2.2.6-dvdwrite_trialfix.patch
deleted file mode 100644 (file)
index 044d09e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-  This patch should fix #1016 when there are more than one "part" to write.
-  Instead of each part being stored on disk, written to DVD, then deleted from
-  disk, all parts are written to disk, and only the last is written and deleted
-  from disk.
-
-  Apply it to 2.2.6 (and possibly previous 2.2.x versions) with:
-
-  cd <bacula-source>
-  patch -p0 <2.2.6-dvdwrite_trialfix.patch
-  ./configure <your-options>
-  make
-  ...
-  make install
-
-
-Index: src/stored/dev.c
-===================================================================
---- src/stored/dev.c   (revision 5996)
-+++ src/stored/dev.c   (working copy)
-@@ -1856,7 +1856,7 @@
-    /* Clean up device packet so it can be reused */
-    clear_opened();
-    state &= ~(ST_LABEL|ST_READ|ST_APPEND|ST_EOT|ST_WEOT|ST_EOF|
--              ST_MOUNTED|ST_MEDIA|ST_SHORT|ST_FREESPACE_OK|ST_PART_SPOOLED);
-+              ST_MOUNTED|ST_MEDIA|ST_SHORT);
-    label_type = B_BACULA_LABEL;
-    file = block_num = 0;
-    file_size = 0;
diff --git a/bacula/patches/2.2.6-mac-build.patch b/bacula/patches/2.2.6-mac-build.patch
deleted file mode 100644 (file)
index a1b95c7..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-  This patch should fix the Mac OS X build problem on the latest
-  Darwin, where sys/types.h was not included correctly (apparently
-  due to a change in the Mac headers).  The solution was to explicitly
-  ensure that it is defined for the ./configure.
-  This patch fixes bug #1020.
-
-  This patch also has a rebuild of configure that includes the Debian
-  qt4 kludge (look for alternate qt4 names).
-
-  Apply it to 2.2.6 (and possibly previous 2.2.x versions) with:
-
-  cd <bacula-source>
-  patch -p0 <2.2.6-mac-build.patch
-  ./configure <your-options>
-  make
-  ...
-  make install
-
-
-Index: configure
-===================================================================
---- configure  (revision 5979)
-+++ configure  (working copy)
-@@ -309,7 +309,7 @@
- # include <unistd.h>
- #endif"
--ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir archivedir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BUILD_DIR TOP_DIR TRUEPRG FALSEPRG VERSION DATE LSMDATE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB MV RM CP SED ECHO CMP TBL AR OPENSSL MTX DD MKISOFS PYTHON GROWISOFS DVDRWMEDIAINFO DVDRWFORMAT PKGCONFIG WXCONFIG WXFLAGS CDRECORD PIDOF AWK ARFLAGS MAKE_SHELL LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os HAVE_SUN_OS_TRUE HAVE_SUN_OS_FALSE HAVE_OSF1_OS_TRUE HAVE_OSF1_OS_FALSE HAVE_AIX_OS_TRUE HAVE_AIX_OS_FALSE HAVE_HPUX_OS_TRUE HAVE_HPUX_OS_FALSE HAVE_LINUX_OS_TRUE HAVE_LINUX_OS_FALSE HAVE_FREEBSD_OS_TRUE HAVE_FREEBSD_OS_FALSE HAVE_NETBSD_OS_TRUE HAVE_NETBSD_OS_FALSE HAVE_OPENBSD_OS_TRUE HAVE_OPENBSD_OS_FALSE HAVE_BSDI_OS_TRUE HAVE_BSDI_OS_FALSE HAVE_SGI_OS_TRUE HAVE_SGI_OS_FALSE HAVE_IRIX_OS_TRUE HAVE_IRIX_OS_FALSE HAVE_DARWIN_OS_TRUE HAVE_DARWIN_OS_FALSE SET_MAKE MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE INTL_MACOSX_LIBS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB GLIBC2 ALLOCA GLIBC21 HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX GNOME_INCLUDEDIR GNOMEUI_LIBS GNOME_LIBDIR GNOME_LIBS GNOME_DIR BAT_DIR QWT_INC QWT_LDFLAGS WXCONS_CPPFLAGS WXCONS_LDFLAGS WX_DIR TRAY_MONITOR_CPPFLAGS TRAY_MONITOR_LDFLAGS TRAY_MONITOR_DIR TTOOL_LDFLAGS STATIC_FD STATIC_SD STATIC_DIR STATIC_CONS STATIC_GNOME_CONS STATIC_WX_CONS ALL_DIRS DIRD_DIR DIR_TOOLS STORED_DIR CONS_INC CONS_OBJ CONS_SRC CONS_LIBS CONS_LDFLAGS READLINE_SRC PYTHON_LIBS PYTHON_INCDIR OPENSSL_LIBS OPENSSL_INC working_dir scriptdir dump_email job_email smtp_host piddir subsysdir baseport dir_port fd_port sd_port dir_password fd_password sd_password mon_dir_password mon_fd_password mon_sd_password db_name db_user dir_user dir_group sd_user sd_group fd_user fd_group SBINPERM SQL_LFLAGS SQL_INCLUDE SQL_BINDIR cats DB_TYPE GETCONF ac_ct_GETCONF X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LIBOBJS FDLIBS DEBUG DINCLUDE DLIB DB_LIBS WCFLAGS WLDFLAGS WRAPLIBS OBJLIST hostname TAPEDRIVE PSCMD WIN32 MACOSX DISTNAME DISTVER LTLIBOBJS'
-+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BUILD_DIR TOP_DIR TRUEPRG FALSEPRG VERSION DATE LSMDATE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB MV RM CP SED ECHO CMP TBL AR OPENSSL MTX DD MKISOFS PYTHON GROWISOFS DVDRWMEDIAINFO DVDRWFORMAT PKGCONFIG QMAKE QMAKEQT4 WXCONFIG WXFLAGS CDRECORD PIDOF AWK ARFLAGS MAKE_SHELL LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os HAVE_SUN_OS_TRUE HAVE_SUN_OS_FALSE HAVE_OSF1_OS_TRUE HAVE_OSF1_OS_FALSE HAVE_AIX_OS_TRUE HAVE_AIX_OS_FALSE HAVE_HPUX_OS_TRUE HAVE_HPUX_OS_FALSE HAVE_LINUX_OS_TRUE HAVE_LINUX_OS_FALSE HAVE_FREEBSD_OS_TRUE HAVE_FREEBSD_OS_FALSE HAVE_NETBSD_OS_TRUE HAVE_NETBSD_OS_FALSE HAVE_OPENBSD_OS_TRUE HAVE_OPENBSD_OS_FALSE HAVE_BSDI_OS_TRUE HAVE_BSDI_OS_FALSE HAVE_SGI_OS_TRUE HAVE_SGI_OS_FALSE HAVE_IRIX_OS_TRUE HAVE_IRIX_OS_FALSE HAVE_DARWIN_OS_TRUE HAVE_DARWIN_OS_FALSE SET_MAKE MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE INTL_MACOSX_LIBS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB GLIBC2 ALLOCA GLIBC21 HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX GNOME_INCLUDEDIR GNOMEUI_LIBS GNOME_LIBDIR GNOME_LIBS GNOME_DIR BAT_DIR QWT_INC QWT_LDFLAGS WXCONS_CPPFLAGS WXCONS_LDFLAGS WX_DIR TRAY_MONITOR_CPPFLAGS TRAY_MONITOR_LDFLAGS TRAY_MONITOR_DIR TTOOL_LDFLAGS STATIC_FD STATIC_SD STATIC_DIR STATIC_CONS STATIC_GNOME_CONS STATIC_WX_CONS ALL_DIRS DIRD_DIR DIR_TOOLS STORED_DIR CONS_INC CONS_OBJ CONS_SRC CONS_LIBS CONS_LDFLAGS READLINE_SRC PYTHON_LIBS PYTHON_INCDIR OPENSSL_LIBS OPENSSL_INC working_dir scriptdir dump_email job_email smtp_host piddir subsysdir baseport dir_port fd_port sd_port dir_password fd_password sd_password mon_dir_password mon_fd_password mon_sd_password db_name db_user dir_user dir_group sd_user sd_group fd_user fd_group SBINPERM SQL_LFLAGS SQL_INCLUDE SQL_BINDIR cats DB_TYPE GETCONF ac_ct_GETCONF X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LIBOBJS FDLIBS DEBUG DINCLUDE DLIB DB_LIBS WCFLAGS WLDFLAGS WRAPLIBS OBJLIST hostname TAPEDRIVE PSCMD WIN32 MACOSX DISTNAME DISTVER LTLIBOBJS'
- ac_subst_files='MCOMMON'
- # Initialize some variables set by options.
-@@ -350,8 +350,6 @@
- infodir='${prefix}/info'
- mandir='${prefix}/man'
--archivedir='/tmp'
--
- ac_prev=
- for ac_option
- do
-@@ -546,13 +544,6 @@
-   | --sbi=* | --sb=*)
-     sbindir=$ac_optarg ;;
--  -archivedir | --archivedir | --archivedi | --archived | --archive | --archiv \
--  | --archi | --arch | --arc | --ar | --a)
--    ac_prev=archivedir ;;
--  -archivedir=* | --archivedir=* | --archivedi=* | --archived=* | --archive=* \
--  | --archiv=* | --archi=* | --arch=* | --arc=* | --ar=* | --a=*)
--    archivedir=$ac_optarg ;;
--
-   -sharedstatedir | --sharedstatedir | --sharedstatedi \
-   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-   | --sharedst | --shareds | --shared | --share | --shar \
-@@ -676,7 +667,7 @@
- done
- # Be sure to have absolute paths.
--for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir archivedir \
-+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-             localstatedir libdir includedir oldincludedir infodir mandir
- do
-   eval ac_val=$`echo $ac_var`
-@@ -852,7 +843,6 @@
-   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-   --infodir=DIR          info documentation [PREFIX/info]
-   --mandir=DIR           man documentation [PREFIX/man]
--  --archivedir=DIR       archive destination for disk-based backups [/tmp]
- _ACEOF
-   cat <<\_ACEOF
-@@ -4116,7 +4106,87 @@
- echo "${ECHO_T}no" >&6
- fi
-+# Extract the first word of "qmake", so it can be a program name with args.
-+set dummy qmake; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_path_QMAKE+set}" = set; then
-+  echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+  case $QMAKE in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_QMAKE="$QMAKE" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+  for ac_exec_ext in '' $ac_executable_extensions; do
-+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+    ac_cv_path_QMAKE="$as_dir/$ac_word$ac_exec_ext"
-+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+done
-+  test -z "$ac_cv_path_QMAKE" && ac_cv_path_QMAKE="none"
-+  ;;
-+esac
-+fi
-+QMAKE=$ac_cv_path_QMAKE
-+
-+if test -n "$QMAKE"; then
-+  echo "$as_me:$LINENO: result: $QMAKE" >&5
-+echo "${ECHO_T}$QMAKE" >&6
-+else
-+  echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+# Extract the first word of "qmake-qt4", so it can be a program name with args.
-+set dummy qmake-qt4; ac_word=$2
-+echo "$as_me:$LINENO: checking for $ac_word" >&5
-+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-+if test "${ac_cv_path_QMAKEQT4+set}" = set; then
-+  echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+  case $QMAKEQT4 in
-+  [\\/]* | ?:[\\/]*)
-+  ac_cv_path_QMAKEQT4="$QMAKEQT4" # Let the user override the test with a path.
-+  ;;
-+  *)
-+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+  for ac_exec_ext in '' $ac_executable_extensions; do
-+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+    ac_cv_path_QMAKEQT4="$as_dir/$ac_word$ac_exec_ext"
-+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+done
-+
-+  test -z "$ac_cv_path_QMAKEQT4" && ac_cv_path_QMAKEQT4="none"
-+  ;;
-+esac
-+fi
-+QMAKEQT4=$ac_cv_path_QMAKEQT4
-+
-+if test -n "$QMAKEQT4"; then
-+  echo "$as_me:$LINENO: result: $QMAKEQT4" >&5
-+echo "${ECHO_T}$QMAKEQT4" >&6
-+else
-+  echo "$as_me:$LINENO: result: no" >&5
-+echo "${ECHO_T}no" >&6
-+fi
-+
-+
- if test "x$WXCONFIG" = x; then
-   WXCONFIG=wx-config
- fi
-@@ -6776,8 +6846,8 @@
- # ------------------------------------------------------------------
- # If the user has not set --archivedir, we set our default as /tmp
- # ------------------------------------------------------------------
--if test x$archivedir = x'/tmp' ; then
--    archivedir=/tmp
-+if test x$archivedir = x'${archivedir}' ; then
-+    archivedir=${archivedir}
- fi
- archivedir=`eval echo ${archivedir}`
-@@ -19273,6 +19343,9 @@
-+
-+
-+
- for ac_header in \
-       assert.h \
-       fcntl.h \
-@@ -19284,6 +19357,7 @@
-       stdlib.h \
-       stdint.h \
-       string.h \
-+      strings.h \
-       termios.h \
-       termcap.h \
-       term.h \
-@@ -19292,9 +19366,11 @@
-       sys/byteorder.h \
-       sys/ioctl.h \
-       sys/select.h \
-+      sys/socket.h \
-       sys/sockio.h \
-+      sys/stat.h \
-       sys/time.h \
--      sys/socket.h \
-+      sys/types.h \
-       arpa/nameser.h \
-       resolv.h \
-       mtio.h \
-@@ -31173,7 +31249,6 @@
- s,@program_transform_name@,$program_transform_name,;t t
- s,@bindir@,$bindir,;t t
- s,@sbindir@,$sbindir,;t t
--s,@archivedir@,$archivedir,;t t
- s,@libexecdir@,$libexecdir,;t t
- s,@datadir@,$datadir,;t t
- s,@sysconfdir@,$sysconfdir,;t t
-@@ -31233,6 +31308,8 @@
- s,@DVDRWMEDIAINFO@,$DVDRWMEDIAINFO,;t t
- s,@DVDRWFORMAT@,$DVDRWFORMAT,;t t
- s,@PKGCONFIG@,$PKGCONFIG,;t t
-+s,@QMAKE@,$QMAKE,;t t
-+s,@QMAKEQT4@,$QMAKEQT4,;t t
- s,@WXCONFIG@,$WXCONFIG,;t t
- s,@WXFLAGS@,$WXFLAGS,;t t
- s,@CDRECORD@,$CDRECORD,;t t
-@@ -32122,10 +32199,23 @@
- if test "${support_bat}" = "yes" ; then
-+  if test "x$QMAKE" = "xnone" && test "x$QMAKEQT4" = "xnone"; then
-+  echo "Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation"
-+  exit 1
-+  fi
-+
-+  QMAKEBIN="qmake"
-+
-+  if test "x$QMAKEQT4" != "xnone"; then
-+    QMAKEBIN=qmake-qt4
-+  fi
-+
-+
-+
-   cd src/qt-console
-   chmod 755 install_conf_file build-depkgs-qt-console
-   echo "Creating bat Makefile"
--  qmake
-+  $QMAKEBIN
-   cd ${BUILD_DIR}
- fi
-Index: src/bc_types.h
-===================================================================
---- src/bc_types.h     (revision 5979)
-+++ src/bc_types.h     (working copy)
-@@ -62,7 +62,7 @@
- #ifndef HAVE_INTXX_T
- # if (SIZEOF_CHAR == 1)
--typedef char int8_t;
-+typedef signed char int8_t;
- # else
- #  error "8 bit int type not found."
- # endif
-Index: patches/2.2.6-queued-msg.patch
-===================================================================
---- patches/2.2.6-queued-msg.patch     (revision 0)
-+++ patches/2.2.6-queued-msg.patch     (revision 0)
-@@ -0,0 +1,25 @@
-+ This patch should ensure that queued messages to the console are
-+ displayed as soon as possible.  It should fix bug 1007, but has been
-+ reported not to work.
-+
-+ Apply it to version 2.2.6 (or any prior 2.2.x) with:
-+
-+ cd <bacula-source>
-+ ./configure <your-options>
-+ patch -p0 <2.2.6-queued-msg.patch
-+ make
-+ ...
-+ make install
-+
-+Index: src/dird/ua_server.c
-+===================================================================
-+--- src/dird/ua_server.c      (revision 5979)
-++++ src/dird/ua_server.c      (working copy)
-+@@ -146,6 +146,7 @@
-+          } else {
-+             do_a_command(ua, ua->cmd);
-+          }
-++         dequeue_messages(ua->jcr);
-+          if (!ua->quit) {
-+             if (console_msg_pending && acl_access_ok(ua, Command_ACL, "messages", 8)) {
-+                if (ua->auto_display_messages) {
-Index: autoconf/configure.in
-===================================================================
---- autoconf/configure.in      (revision 5979)
-+++ autoconf/configure.in      (working copy)
-@@ -1394,6 +1394,7 @@
-       stdlib.h \
-       stdint.h \
-       string.h \
-+      strings.h \
-       termios.h \
-       termcap.h \
-       term.h \
-@@ -1402,9 +1403,11 @@
-       sys/byteorder.h \
-       sys/ioctl.h \
-       sys/select.h \
-+      sys/socket.h \
-       sys/sockio.h \
-+      sys/stat.h \
-       sys/time.h \
--      sys/socket.h \
-+      sys/types.h \
-       arpa/nameser.h \
-       resolv.h \
-       mtio.h \
diff --git a/bacula/patches/2.2.6-maxconcurrentjobs.patch b/bacula/patches/2.2.6-maxconcurrentjobs.patch
deleted file mode 100644 (file)
index fa8f04a..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-
- This patch corrects a problem where the maximum concurrent storage
- jobs counter gets out of sync during restore jobs causing jobs to
- "wait on max Storage jobs".  This patch fixes bug #1009.
-
- Apply this patch to 2.2.6 and probably any 2.2.x version with the
- following:
-
- cd <bacula-source>
- patch -p0 <2.2.6-maxconcurrentjobs.patch
- ./configure <your-options>
- make
- ...
- make install
-
-
-Index: src/dird/jobq.c
-===================================================================
---- src/dird/jobq.c    (revision 6019)
-+++ src/dird/jobq.c    (working copy)
-@@ -1,23 +1,4 @@
- /*
-- * Bacula job queue routines.
-- *
-- *  This code consists of three queues, the waiting_jobs
-- *  queue, where jobs are initially queued, the ready_jobs
-- *  queue, where jobs are placed when all the resources are
-- *  allocated and they can immediately be run, and the
-- *  running queue where jobs are placed when they are
-- *  running.
-- *
-- *  Kern Sibbald, July MMIII
-- *
-- *   Version $Id$
-- *
-- *  This code was adapted from the Bacula workq, which was
-- *    adapted from "Programming with POSIX Threads", by
-- *    David R. Butenhof
-- *
-- */
--/*
-    Bacula® - The Network Backup Solution
-    Copyright (C) 2003-2007 Free Software Foundation Europe e.V.
-@@ -44,6 +25,25 @@
-    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
-    Switzerland, email:ftf@fsfeurope.org.
- */
-+/*
-+ * Bacula job queue routines.
-+ *
-+ *  This code consists of three queues, the waiting_jobs
-+ *  queue, where jobs are initially queued, the ready_jobs
-+ *  queue, where jobs are placed when all the resources are
-+ *  allocated and they can immediately be run, and the
-+ *  running queue where jobs are placed when they are
-+ *  running.
-+ *
-+ *  Kern Sibbald, July MMIII
-+ *
-+ *   Version $Id$
-+ *
-+ *  This code was adapted from the Bacula workq, which was
-+ *    adapted from "Programming with POSIX Threads", by
-+ *    David R. Butenhof
-+ *
-+ */
- #include "bacula.h"
- #include "dird.h"
-@@ -453,6 +453,7 @@
-             }
-          }
-          jq->running_jobs->append(je);
-+//       set_jcr_in_tsd(jcr);
-          Dmsg1(2300, "Took jobid=%d from ready and appended to run\n", jcr->JobId);
-          /* Release job queue lock */
-@@ -682,14 +683,13 @@
-    jcr->acquired_resource_locks = false;
-    if (jcr->rstore) {
-       Dmsg1(200, "Rstore=%s\n", jcr->rstore->name());
--      if (jcr->rstore->NumConcurrentJobs == 0 &&
--          jcr->rstore->NumConcurrentJobs < jcr->rstore->MaxConcurrentJobs) {
--         /* Simple case, first job */
-+      /*
-+       * Let only one Restore/Verify job run at a time regardless
-+       *  of MaxConcurrentjobs.
-+       */
-+      if (jcr->rstore->NumConcurrentJobs == 0) {
-          jcr->rstore->NumConcurrentJobs = 1;
-          Dmsg0(200, "Set rncj=1\n");
--      } else if (jcr->rstore->NumConcurrentJobs < jcr->rstore->MaxConcurrentJobs) {
--         jcr->rstore->NumConcurrentJobs++;
--         Dmsg1(200, "Inc rncj=%d\n", jcr->rstore->NumConcurrentJobs);
-       } else {
-          Dmsg1(200, "Fail rncj=%d\n", jcr->rstore->NumConcurrentJobs);
-          set_jcr_job_status(jcr, JS_WaitStoreRes);
-@@ -700,7 +700,7 @@
-    if (jcr->wstore) {
-       Dmsg1(200, "Wstore=%s\n", jcr->wstore->name());
-       if (jcr->rstore == jcr->wstore) {           /* deadlock */
--         jcr->rstore->NumConcurrentJobs--;        /* back out rstore */
-+         jcr->rstore->NumConcurrentJobs = 0;      /* back out rstore */
-          Jmsg(jcr, M_FATAL, 0, _("Job canceled. Attempt to read and write same device.\n"
-             "    Read storage \"%s\" (From %s) -- Write storage \"%s\" (From %s)\n"), 
-             jcr->rstore->name(), jcr->rstore_source, jcr->wstore->name(), jcr->wstore_source);
-@@ -716,7 +716,7 @@
-          jcr->wstore->NumConcurrentJobs++;
-          Dmsg1(200, "Inc wncj=%d\n", jcr->wstore->NumConcurrentJobs);
-       } else if (jcr->rstore) {
--         jcr->rstore->NumConcurrentJobs--;        /* back out rstore */
-+         jcr->rstore->NumConcurrentJobs = 0;      /* back out rstore */
-          Dmsg1(200, "Fail wncj=%d\n", jcr->wstore->NumConcurrentJobs);
-          skip_this_jcr = true;
-       } else {
-@@ -738,7 +738,7 @@
-          Dmsg1(200, "Dec wncj=%d\n", jcr->wstore->NumConcurrentJobs);
-       }
-       if (jcr->rstore) {
--         jcr->rstore->NumConcurrentJobs--;  
-+         jcr->rstore->NumConcurrentJobs = 0;
-          Dmsg1(200, "Dec rncj=%d\n", jcr->rstore->NumConcurrentJobs);
-       }
-       set_jcr_job_status(jcr, JS_WaitClientRes);
-@@ -753,7 +753,7 @@
-          Dmsg1(200, "Dec wncj=%d\n", jcr->wstore->NumConcurrentJobs);
-       }
-       if (jcr->rstore) {
--         jcr->rstore->NumConcurrentJobs--;
-+         jcr->rstore->NumConcurrentJobs = 0;
-          Dmsg1(200, "Dec rncj=%d\n", jcr->rstore->NumConcurrentJobs);
-       }
-       jcr->client->NumConcurrentJobs--;
diff --git a/bacula/patches/2.2.6-maxruntime.patch b/bacula/patches/2.2.6-maxruntime.patch
deleted file mode 100644 (file)
index decd466..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-  This patch fixes bug #1012 where the job is canceled because
-  of Max Run Time exceeded when the job has not yet started.
-
-  Apply it to 2.2.6 or any prior 2.2.x version with:
-
-  cd <bacula-source>
-  patch -p0 <2.2.6-maxruntime.patch
-  ./configure <your-options>
-  make
-  ...
-  make install
-
-
-Index: src/dird/job.c
-===================================================================
---- src/dird/job.c     (revision 5979)
-+++ src/dird/job.c     (working copy)
-@@ -556,7 +556,7 @@
-  */
- static bool job_check_maxruntime(JCR *control_jcr, JCR *jcr)
- {
--   if (jcr->job->MaxRunTime == 0 || job_canceled(jcr)) {
-+   if (jcr->job->MaxRunTime == 0 || job_canceled(jcr) || jcr->JobStatus == JS_Created) {
-       return false;
-    }
-    if ((watchdog_time - jcr->start_time) < jcr->job->MaxRunTime) {
-@@ -931,6 +931,7 @@
- {
-    jcr->job = job;
-    jcr->JobType = job->JobType;
-+   jcr->JobStatus = JS_Created;
-    switch (jcr->JobType) {
-    case JT_ADMIN:
-    case JT_RESTORE:
diff --git a/bacula/patches/2.2.6-queued-msg.patch b/bacula/patches/2.2.6-queued-msg.patch
deleted file mode 100644 (file)
index 1a51e97..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
- This patch should ensure that queued messages to the console are
- displayed as soon as possible.  It should fix bug 1007, but has been
- reported not to work.
-
- Apply it to version 2.2.6 (or any prior 2.2.x) with:
-
- cd <bacula-source>
- ./configure <your-options>
- patch -p0 <2.2.6-queued-msg.patch
- make
- ...
- make install
-
-Index: src/dird/ua_server.c
-===================================================================
---- src/dird/ua_server.c       (revision 5979)
-+++ src/dird/ua_server.c       (working copy)
-@@ -146,6 +146,7 @@
-          } else {
-             do_a_command(ua, ua->cmd);
-          }
-+         dequeue_messages(ua->jcr);
-          if (!ua->quit) {
-             if (console_msg_pending && acl_access_ok(ua, Command_ACL, "messages", 8)) {
-                if (ua->auto_display_messages) {
diff --git a/bacula/patches/2.2.6-scratch.patch b/bacula/patches/2.2.6-scratch.patch
deleted file mode 100644 (file)
index d6da1cd..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
- This patch prevents the "status dir" command from trying to use a scratch
- volume and possibly moving it from one pool to another.  This patch fixes
- bug #1019.
-
- Apply the patch to 2.2.6 (and possibly any 2.2.x version with):
-
- cd <bacula-source>
- patch -p0 <2.2.6-scratch.patch
- ./configure <your-options>
- make
- ...
- make install
-
-
-
-Index: src/dird/next_vol.c
-===================================================================
---- src/dird/next_vol.c        (revision 5999)
-+++ src/dird/next_vol.c        (working copy)
-@@ -97,7 +97,7 @@
-                   prune_volumes(jcr, InChanger, mr);
-                }
-                ok = recycle_oldest_purged_volume(jcr, InChanger, mr);
--               if (!ok) {
-+               if (!ok && create) {
-                   Dmsg4(050, "after prune volumes_vol ok=%d index=%d InChanger=%d Vstat=%s\n",
-                         ok, index, InChanger, mr->VolStatus);
-                   /*
diff --git a/bacula/patches/2.2.6-status.patch b/bacula/patches/2.2.6-status.patch
deleted file mode 100644 (file)
index 9618463..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-  This patch fixes the status command to include the formating string for
-  JS_AttrInsterting.  It fixes bug #1021.
-
-  Apply it to version 2.2.6 (and possibly earlier versions) with:
-
-  cd <bacula-source>
-  patch -p0 <2.2.6-status.patch
-  ./configure <your-options>
-  make
-  ...
-  make install
-
-
-Index: src/dird/ua_status.c
-===================================================================
---- src/dird/ua_status.c       (revision 5979)
-+++ src/dird/ua_status.c       (working copy)
-@@ -636,6 +636,12 @@
-       case JS_WaitPriority:
-          msg = _("is waiting for higher priority jobs to finish");
-          break;
-+      case JS_AttrDespooling:
-+         msg = _("SD despooling Attributes");
-+         break;
-+      case JS_AttrInserting:
-+         msg = _("Dir inserting Attributes");
-+         break;
-       default:
-          emsg = (char *)get_pool_memory(PM_FNAME);
-@@ -673,8 +679,14 @@
-             Mmsg(emsg, _("is waiting for Client %s to connect to Storage %s"),
-                  jcr->client->name(), jcr->wstore->name());
-         }
--         msg = emsg;
-+        msg = emsg;
-+        break;
-+      case JS_AttrDespooling:
-+         msg = _("SD despooling Attributes");
-          break;
-+      case JS_AttrInserting:
-+         msg = _("Dir inserting Attributes");
-+         break;
-       }
-       switch (jcr->JobType) {
-       case JT_ADMIN:
diff --git a/bacula/patches/2.2.6-verify-vol.patch b/bacula/patches/2.2.6-verify-vol.patch
deleted file mode 100644 (file)
index 264d108..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-
- This patch eliminates spurious output to the console during a VerifyVolume
- job that contains encrypted data.  
- It fixes bug #1024.
-
- Apply this patch to Bacula version 2.2.6 and previous 2.2.x versions with:
-
- cd <bacula-source>
- patch -p0 <2.2.6-verify-vol.patch
- ./configure <your-options>
- make
- ...
- make install
-
-
-Index: src/filed/verify_vol.c
-===================================================================
---- src/filed/verify_vol.c     (revision 6010)
-+++ src/filed/verify_vol.c     (working copy)
-@@ -211,19 +211,6 @@
-          }
-          break;
--      /* Data streams to ignore */
--      case STREAM_ENCRYPTED_SESSION_DATA:
--      case STREAM_FILE_DATA:
--      case STREAM_SPARSE_DATA:
--      case STREAM_WIN32_DATA:
--      case STREAM_WIN32_GZIP_DATA:
--      case STREAM_GZIP_DATA:
--      case STREAM_SPARSE_GZIP_DATA:
--      case STREAM_SIGNED_DIGEST:
--
--        /* Do nothing */
--        break;
--
-       case STREAM_MD5_DIGEST:
-          bin_to_base64(digest, sizeof(digest), (char *)sd->msg, CRYPTO_DIGEST_MD5_SIZE, true);
-          Dmsg2(400, "send inx=%d MD5=%s\n", jcr->JobFiles, digest);
-@@ -256,9 +243,10 @@
-          Dmsg2(20, "bfiled>bdird: SHA512 len=%d: msg=%s\n", dir->msglen, dir->msg);
-          break;
-+      /* Ignore everything else */
-       default:
--         Pmsg2(0, "None of above!!! stream=%d data=%s\n", stream,sd->msg);
-          break;
-+
-       } /* end switch */
-    } /* end while bnet_get */
-    set_jcr_job_status(jcr, JS_Terminated);
diff --git a/bacula/patches/2.2.x/2.2.6-add.patch b/bacula/patches/2.2.x/2.2.6-add.patch
new file mode 100644 (file)
index 0000000..67e53bd
--- /dev/null
@@ -0,0 +1,35 @@
+
+ This patch fixes the infinite loop when trying to increase the
+ maximum number of volumes in a Pool during the add command.
+ This patch fixes bug #1008. 
+
+ It can be applied to Bacula version 2.2.6 (and probably earlier
+ 2.2.x versions) with:
+
+ cd <bacula-source>
+ ./configure <your options>
+ patch -p0 <2.2.6-add.patch
+ make
+ ...
+ make install
+
+Index: src/dird/ua_cmds.c
+===================================================================
+--- src/dird/ua_cmds.c (revision 5901)
++++ src/dird/ua_cmds.c (working copy)
+@@ -244,12 +244,10 @@
+    while (pr.MaxVols > 0 && pr.NumVols >= pr.MaxVols) {
+       ua->warning_msg(_("Pool already has maximum volumes=%d\n"), pr.MaxVols);
+-      for (;;) {
+-         if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
+-            return 1;
+-         }
+-         pr.MaxVols = ua->pint32_val;
++      if (!get_pint(ua, _("Enter new maximum (zero for unlimited): "))) {
++         return 1;
+       }
++      pr.MaxVols = ua->pint32_val;
+    }
+    /* Get media type */
diff --git a/bacula/patches/2.2.x/2.2.6-backup-restore-socket.patch b/bacula/patches/2.2.x/2.2.6-backup-restore-socket.patch
new file mode 100644 (file)
index 0000000..fb9156b
--- /dev/null
@@ -0,0 +1,30 @@
+
+ This patch fixes bug #1015 where bacula failed to restore acl to a socket
+ because Bacula no longer restores sockets.
+
+ This fix will tell to bacula-fd to skip all socket file.
+
+ Apply it to version 2.2.6 (or probably any previous 2.2.x version) with
+
+ cd <bacula-source>
+ ./configure <your-options>  not necessary if already configured
+ patch -p0 < 2.2.6-backup-restore-socket.patch
+ make
+ ...
+ make install
+
+Index: src/filed/backup.c
+===================================================================
+--- src/filed/backup.c  (révision 5882)
++++ src/filed/backup.c  (copie de travail)
+@@ -279,6 +279,10 @@
+       break;
+    case FT_SPEC:
+       Dmsg1(130, "FT_SPEC saving: %s\n", ff_pkt->fname);
++      if (S_ISSOCK(ff_pkt->statp.st_mode)) {
++        Jmsg(jcr, M_SKIPPED, 1, _("     Socket file skipped: %s\n"), ff_pkt->fname);
++        return 1;
++      }
+       break;
+    case FT_RAW:
+       Dmsg1(130, "FT_RAW saving: %s\n", ff_pkt->fname);
diff --git a/bacula/patches/2.2.x/2.2.6-bcopy.patch b/bacula/patches/2.2.x/2.2.6-bcopy.patch
new file mode 100644 (file)
index 0000000..a02dec4
--- /dev/null
@@ -0,0 +1,78 @@
+
+ This patch fixes bcopy so that it produces correct Volumes.
+ It fixes bug #1022.
+
+ Apply this patch to version 2.2.6 and possibly any 2.2.x version with:
+
+ cd <bacula-source>
+ patch -p0 2.2.6-bcopy.patch
+ ./configure <your-options>
+ make
+ ...
+ make install
+
+
+Index: src/stored/bcopy.c
+===================================================================
+--- src/stored/bcopy.c (revision 6010)
++++ src/stored/bcopy.c (working copy)
+@@ -89,6 +89,7 @@
+    char *iVolumeName = NULL;
+    char *oVolumeName = NULL;
+    bool ignore_label_errors = false;
++   bool ok;
+    setlocale(LC_ALL, "");
+    bindtextdomain("bacula", LOCALEDIR);
+@@ -199,9 +200,11 @@
+    }
+    out_block = out_jcr->dcr->block;
+-   read_records(in_jcr->dcr, record_cb, mount_next_read_volume);
+-   if (!write_block_to_device(out_jcr->dcr)) {
+-      Pmsg0(000, _("Write of last block failed.\n"));
++   ok = read_records(in_jcr->dcr, record_cb, mount_next_read_volume);
++   if (ok || out_dev->can_write()) {
++      if (!write_block_to_device(out_jcr->dcr)) {
++         Pmsg0(000, _("Write of last block failed.\n"));
++      }
+    }
+    Pmsg2(000, _("%u Jobs copied. %u records copied.\n"), jobs, records);
+@@ -253,6 +256,7 @@
+                   out_dev->print_name(), out_dev->bstrerror());
+                Jmsg(out_jcr, M_FATAL, 0, _("Cannot fixup device error. %s\n"),
+                      out_dev->bstrerror());
++               return false;
+             }
+          }
+          if (!write_block_to_device(out_jcr->dcr)) {
+@@ -260,8 +264,9 @@
+                out_dev->print_name(), out_dev->bstrerror());
+             Jmsg(out_jcr, M_FATAL, 0, _("Cannot fixup device error. %s\n"),
+                   out_dev->bstrerror());
++            return false;
+          }
+-         break;
++         return true;
+       case EOM_LABEL:
+          Pmsg0(000, _("EOM label not copied.\n"));
+          return true;
+@@ -269,7 +274,7 @@
+          Pmsg0(000, _("EOT label not copied.\n"));
+          return true;
+       default:
+-         break;
++         return true;
+       }
+    }
+@@ -283,7 +288,7 @@
+             out_dev->print_name(), out_dev->bstrerror());
+          Jmsg(out_jcr, M_FATAL, 0, _("Cannot fixup device error. %s\n"),
+                out_dev->bstrerror());
+-         break;
++         return false;
+       }
+    }
+    return true;
diff --git a/bacula/patches/2.2.x/2.2.6-dvdwrite_trialfix.patch b/bacula/patches/2.2.x/2.2.6-dvdwrite_trialfix.patch
new file mode 100644 (file)
index 0000000..044d09e
--- /dev/null
@@ -0,0 +1,28 @@
+  This patch should fix #1016 when there are more than one "part" to write.
+  Instead of each part being stored on disk, written to DVD, then deleted from
+  disk, all parts are written to disk, and only the last is written and deleted
+  from disk.
+
+  Apply it to 2.2.6 (and possibly previous 2.2.x versions) with:
+
+  cd <bacula-source>
+  patch -p0 <2.2.6-dvdwrite_trialfix.patch
+  ./configure <your-options>
+  make
+  ...
+  make install
+
+
+Index: src/stored/dev.c
+===================================================================
+--- src/stored/dev.c   (revision 5996)
++++ src/stored/dev.c   (working copy)
+@@ -1856,7 +1856,7 @@
+    /* Clean up device packet so it can be reused */
+    clear_opened();
+    state &= ~(ST_LABEL|ST_READ|ST_APPEND|ST_EOT|ST_WEOT|ST_EOF|
+-              ST_MOUNTED|ST_MEDIA|ST_SHORT|ST_FREESPACE_OK|ST_PART_SPOOLED);
++              ST_MOUNTED|ST_MEDIA|ST_SHORT);
+    label_type = B_BACULA_LABEL;
+    file = block_num = 0;
+    file_size = 0;
diff --git a/bacula/patches/2.2.x/2.2.6-mac-build.patch b/bacula/patches/2.2.x/2.2.6-mac-build.patch
new file mode 100644 (file)
index 0000000..a1b95c7
--- /dev/null
@@ -0,0 +1,312 @@
+  This patch should fix the Mac OS X build problem on the latest
+  Darwin, where sys/types.h was not included correctly (apparently
+  due to a change in the Mac headers).  The solution was to explicitly
+  ensure that it is defined for the ./configure.
+  This patch fixes bug #1020.
+
+  This patch also has a rebuild of configure that includes the Debian
+  qt4 kludge (look for alternate qt4 names).
+
+  Apply it to 2.2.6 (and possibly previous 2.2.x versions) with:
+
+  cd <bacula-source>
+  patch -p0 <2.2.6-mac-build.patch
+  ./configure <your-options>
+  make
+  ...
+  make install
+
+
+Index: configure
+===================================================================
+--- configure  (revision 5979)
++++ configure  (working copy)
+@@ -309,7 +309,7 @@
+ # include <unistd.h>
+ #endif"
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir archivedir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BUILD_DIR TOP_DIR TRUEPRG FALSEPRG VERSION DATE LSMDATE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB MV RM CP SED ECHO CMP TBL AR OPENSSL MTX DD MKISOFS PYTHON GROWISOFS DVDRWMEDIAINFO DVDRWFORMAT PKGCONFIG WXCONFIG WXFLAGS CDRECORD PIDOF AWK ARFLAGS MAKE_SHELL LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os HAVE_SUN_OS_TRUE HAVE_SUN_OS_FALSE HAVE_OSF1_OS_TRUE HAVE_OSF1_OS_FALSE HAVE_AIX_OS_TRUE HAVE_AIX_OS_FALSE HAVE_HPUX_OS_TRUE HAVE_HPUX_OS_FALSE HAVE_LINUX_OS_TRUE HAVE_LINUX_OS_FALSE HAVE_FREEBSD_OS_TRUE HAVE_FREEBSD_OS_FALSE HAVE_NETBSD_OS_TRUE HAVE_NETBSD_OS_FALSE HAVE_OPENBSD_OS_TRUE HAVE_OPENBSD_OS_FALSE HAVE_BSDI_OS_TRUE HAVE_BSDI_OS_FALSE HAVE_SGI_OS_TRUE HAVE_SGI_OS_FALSE HAVE_IRIX_OS_TRUE HAVE_IRIX_OS_FALSE HAVE_DARWIN_OS_TRUE HAVE_DARWIN_OS_FALSE SET_MAKE MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE INTL_MACOSX_LIBS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB GLIBC2 ALLOCA GLIBC21 HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX GNOME_INCLUDEDIR GNOMEUI_LIBS GNOME_LIBDIR GNOME_LIBS GNOME_DIR BAT_DIR QWT_INC QWT_LDFLAGS WXCONS_CPPFLAGS WXCONS_LDFLAGS WX_DIR TRAY_MONITOR_CPPFLAGS TRAY_MONITOR_LDFLAGS TRAY_MONITOR_DIR TTOOL_LDFLAGS STATIC_FD STATIC_SD STATIC_DIR STATIC_CONS STATIC_GNOME_CONS STATIC_WX_CONS ALL_DIRS DIRD_DIR DIR_TOOLS STORED_DIR CONS_INC CONS_OBJ CONS_SRC CONS_LIBS CONS_LDFLAGS READLINE_SRC PYTHON_LIBS PYTHON_INCDIR OPENSSL_LIBS OPENSSL_INC working_dir scriptdir dump_email job_email smtp_host piddir subsysdir baseport dir_port fd_port sd_port dir_password fd_password sd_password mon_dir_password mon_fd_password mon_sd_password db_name db_user dir_user dir_group sd_user sd_group fd_user fd_group SBINPERM SQL_LFLAGS SQL_INCLUDE SQL_BINDIR cats DB_TYPE GETCONF ac_ct_GETCONF X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LIBOBJS FDLIBS DEBUG DINCLUDE DLIB DB_LIBS WCFLAGS WLDFLAGS WRAPLIBS OBJLIST hostname TAPEDRIVE PSCMD WIN32 MACOSX DISTNAME DISTVER LTLIBOBJS'
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BUILD_DIR TOP_DIR TRUEPRG FALSEPRG VERSION DATE LSMDATE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB MV RM CP SED ECHO CMP TBL AR OPENSSL MTX DD MKISOFS PYTHON GROWISOFS DVDRWMEDIAINFO DVDRWFORMAT PKGCONFIG QMAKE QMAKEQT4 WXCONFIG WXFLAGS CDRECORD PIDOF AWK ARFLAGS MAKE_SHELL LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS build build_cpu build_vendor build_os host host_cpu host_vendor host_os HAVE_SUN_OS_TRUE HAVE_SUN_OS_FALSE HAVE_OSF1_OS_TRUE HAVE_OSF1_OS_FALSE HAVE_AIX_OS_TRUE HAVE_AIX_OS_FALSE HAVE_HPUX_OS_TRUE HAVE_HPUX_OS_FALSE HAVE_LINUX_OS_TRUE HAVE_LINUX_OS_FALSE HAVE_FREEBSD_OS_TRUE HAVE_FREEBSD_OS_FALSE HAVE_NETBSD_OS_TRUE HAVE_NETBSD_OS_FALSE HAVE_OPENBSD_OS_TRUE HAVE_OPENBSD_OS_FALSE HAVE_BSDI_OS_TRUE HAVE_BSDI_OS_FALSE HAVE_SGI_OS_TRUE HAVE_SGI_OS_FALSE HAVE_IRIX_OS_TRUE HAVE_IRIX_OS_FALSE HAVE_DARWIN_OS_TRUE HAVE_DARWIN_OS_FALSE SET_MAKE MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE INTL_MACOSX_LIBS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB GLIBC2 ALLOCA GLIBC21 HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX GNOME_INCLUDEDIR GNOMEUI_LIBS GNOME_LIBDIR GNOME_LIBS GNOME_DIR BAT_DIR QWT_INC QWT_LDFLAGS WXCONS_CPPFLAGS WXCONS_LDFLAGS WX_DIR TRAY_MONITOR_CPPFLAGS TRAY_MONITOR_LDFLAGS TRAY_MONITOR_DIR TTOOL_LDFLAGS STATIC_FD STATIC_SD STATIC_DIR STATIC_CONS STATIC_GNOME_CONS STATIC_WX_CONS ALL_DIRS DIRD_DIR DIR_TOOLS STORED_DIR CONS_INC CONS_OBJ CONS_SRC CONS_LIBS CONS_LDFLAGS READLINE_SRC PYTHON_LIBS PYTHON_INCDIR OPENSSL_LIBS OPENSSL_INC working_dir scriptdir dump_email job_email smtp_host piddir subsysdir baseport dir_port fd_port sd_port dir_password fd_password sd_password mon_dir_password mon_fd_password mon_sd_password db_name db_user dir_user dir_group sd_user sd_group fd_user fd_group SBINPERM SQL_LFLAGS SQL_INCLUDE SQL_BINDIR cats DB_TYPE GETCONF ac_ct_GETCONF X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LIBOBJS FDLIBS DEBUG DINCLUDE DLIB DB_LIBS WCFLAGS WLDFLAGS WRAPLIBS OBJLIST hostname TAPEDRIVE PSCMD WIN32 MACOSX DISTNAME DISTVER LTLIBOBJS'
+ ac_subst_files='MCOMMON'
+ # Initialize some variables set by options.
+@@ -350,8 +350,6 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+-archivedir='/tmp'
+-
+ ac_prev=
+ for ac_option
+ do
+@@ -546,13 +544,6 @@
+   | --sbi=* | --sb=*)
+     sbindir=$ac_optarg ;;
+-  -archivedir | --archivedir | --archivedi | --archived | --archive | --archiv \
+-  | --archi | --arch | --arc | --ar | --a)
+-    ac_prev=archivedir ;;
+-  -archivedir=* | --archivedir=* | --archivedi=* | --archived=* | --archive=* \
+-  | --archiv=* | --archi=* | --arch=* | --arc=* | --ar=* | --a=*)
+-    archivedir=$ac_optarg ;;
+-
+   -sharedstatedir | --sharedstatedir | --sharedstatedi \
+   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+   | --sharedst | --shareds | --shared | --share | --shar \
+@@ -676,7 +667,7 @@
+ done
+ # Be sure to have absolute paths.
+-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir archivedir \
++for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+             localstatedir libdir includedir oldincludedir infodir mandir
+ do
+   eval ac_val=$`echo $ac_var`
+@@ -852,7 +843,6 @@
+   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+   --infodir=DIR          info documentation [PREFIX/info]
+   --mandir=DIR           man documentation [PREFIX/man]
+-  --archivedir=DIR       archive destination for disk-based backups [/tmp]
+ _ACEOF
+   cat <<\_ACEOF
+@@ -4116,7 +4106,87 @@
+ echo "${ECHO_T}no" >&6
+ fi
++# Extract the first word of "qmake", so it can be a program name with args.
++set dummy qmake; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_path_QMAKE+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  case $QMAKE in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_QMAKE="$QMAKE" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++  for ac_exec_ext in '' $ac_executable_extensions; do
++  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_path_QMAKE="$as_dir/$ac_word$ac_exec_ext"
++    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++done
++  test -z "$ac_cv_path_QMAKE" && ac_cv_path_QMAKE="none"
++  ;;
++esac
++fi
++QMAKE=$ac_cv_path_QMAKE
++
++if test -n "$QMAKE"; then
++  echo "$as_me:$LINENO: result: $QMAKE" >&5
++echo "${ECHO_T}$QMAKE" >&6
++else
++  echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++# Extract the first word of "qmake-qt4", so it can be a program name with args.
++set dummy qmake-qt4; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_path_QMAKEQT4+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  case $QMAKEQT4 in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_QMAKEQT4="$QMAKEQT4" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++  for ac_exec_ext in '' $ac_executable_extensions; do
++  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++    ac_cv_path_QMAKEQT4="$as_dir/$ac_word$ac_exec_ext"
++    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++done
++
++  test -z "$ac_cv_path_QMAKEQT4" && ac_cv_path_QMAKEQT4="none"
++  ;;
++esac
++fi
++QMAKEQT4=$ac_cv_path_QMAKEQT4
++
++if test -n "$QMAKEQT4"; then
++  echo "$as_me:$LINENO: result: $QMAKEQT4" >&5
++echo "${ECHO_T}$QMAKEQT4" >&6
++else
++  echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++
+ if test "x$WXCONFIG" = x; then
+   WXCONFIG=wx-config
+ fi
+@@ -6776,8 +6846,8 @@
+ # ------------------------------------------------------------------
+ # If the user has not set --archivedir, we set our default as /tmp
+ # ------------------------------------------------------------------
+-if test x$archivedir = x'/tmp' ; then
+-    archivedir=/tmp
++if test x$archivedir = x'${archivedir}' ; then
++    archivedir=${archivedir}
+ fi
+ archivedir=`eval echo ${archivedir}`
+@@ -19273,6 +19343,9 @@
++
++
++
+ for ac_header in \
+       assert.h \
+       fcntl.h \
+@@ -19284,6 +19357,7 @@
+       stdlib.h \
+       stdint.h \
+       string.h \
++      strings.h \
+       termios.h \
+       termcap.h \
+       term.h \
+@@ -19292,9 +19366,11 @@
+       sys/byteorder.h \
+       sys/ioctl.h \
+       sys/select.h \
++      sys/socket.h \
+       sys/sockio.h \
++      sys/stat.h \
+       sys/time.h \
+-      sys/socket.h \
++      sys/types.h \
+       arpa/nameser.h \
+       resolv.h \
+       mtio.h \
+@@ -31173,7 +31249,6 @@
+ s,@program_transform_name@,$program_transform_name,;t t
+ s,@bindir@,$bindir,;t t
+ s,@sbindir@,$sbindir,;t t
+-s,@archivedir@,$archivedir,;t t
+ s,@libexecdir@,$libexecdir,;t t
+ s,@datadir@,$datadir,;t t
+ s,@sysconfdir@,$sysconfdir,;t t
+@@ -31233,6 +31308,8 @@
+ s,@DVDRWMEDIAINFO@,$DVDRWMEDIAINFO,;t t
+ s,@DVDRWFORMAT@,$DVDRWFORMAT,;t t
+ s,@PKGCONFIG@,$PKGCONFIG,;t t
++s,@QMAKE@,$QMAKE,;t t
++s,@QMAKEQT4@,$QMAKEQT4,;t t
+ s,@WXCONFIG@,$WXCONFIG,;t t
+ s,@WXFLAGS@,$WXFLAGS,;t t
+ s,@CDRECORD@,$CDRECORD,;t t
+@@ -32122,10 +32199,23 @@
+ if test "${support_bat}" = "yes" ; then
++  if test "x$QMAKE" = "xnone" && test "x$QMAKEQT4" = "xnone"; then
++  echo "Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation"
++  exit 1
++  fi
++
++  QMAKEBIN="qmake"
++
++  if test "x$QMAKEQT4" != "xnone"; then
++    QMAKEBIN=qmake-qt4
++  fi
++
++
++
+   cd src/qt-console
+   chmod 755 install_conf_file build-depkgs-qt-console
+   echo "Creating bat Makefile"
+-  qmake
++  $QMAKEBIN
+   cd ${BUILD_DIR}
+ fi
+Index: src/bc_types.h
+===================================================================
+--- src/bc_types.h     (revision 5979)
++++ src/bc_types.h     (working copy)
+@@ -62,7 +62,7 @@
+ #ifndef HAVE_INTXX_T
+ # if (SIZEOF_CHAR == 1)
+-typedef char int8_t;
++typedef signed char int8_t;
+ # else
+ #  error "8 bit int type not found."
+ # endif
+Index: patches/2.2.6-queued-msg.patch
+===================================================================
+--- patches/2.2.6-queued-msg.patch     (revision 0)
++++ patches/2.2.6-queued-msg.patch     (revision 0)
+@@ -0,0 +1,25 @@
++ This patch should ensure that queued messages to the console are
++ displayed as soon as possible.  It should fix bug 1007, but has been
++ reported not to work.
++
++ Apply it to version 2.2.6 (or any prior 2.2.x) with:
++
++ cd <bacula-source>
++ ./configure <your-options>
++ patch -p0 <2.2.6-queued-msg.patch
++ make
++ ...
++ make install
++
++Index: src/dird/ua_server.c
++===================================================================
++--- src/dird/ua_server.c      (revision 5979)
+++++ src/dird/ua_server.c      (working copy)
++@@ -146,6 +146,7 @@
++          } else {
++             do_a_command(ua, ua->cmd);
++          }
+++         dequeue_messages(ua->jcr);
++          if (!ua->quit) {
++             if (console_msg_pending && acl_access_ok(ua, Command_ACL, "messages", 8)) {
++                if (ua->auto_display_messages) {
+Index: autoconf/configure.in
+===================================================================
+--- autoconf/configure.in      (revision 5979)
++++ autoconf/configure.in      (working copy)
+@@ -1394,6 +1394,7 @@
+       stdlib.h \
+       stdint.h \
+       string.h \
++      strings.h \
+       termios.h \
+       termcap.h \
+       term.h \
+@@ -1402,9 +1403,11 @@
+       sys/byteorder.h \
+       sys/ioctl.h \
+       sys/select.h \
++      sys/socket.h \
+       sys/sockio.h \
++      sys/stat.h \
+       sys/time.h \
+-      sys/socket.h \
++      sys/types.h \
+       arpa/nameser.h \
+       resolv.h \
+       mtio.h \
diff --git a/bacula/patches/2.2.x/2.2.6-maxconcurrentjobs.patch b/bacula/patches/2.2.x/2.2.6-maxconcurrentjobs.patch
new file mode 100644 (file)
index 0000000..fa8f04a
--- /dev/null
@@ -0,0 +1,134 @@
+
+ This patch corrects a problem where the maximum concurrent storage
+ jobs counter gets out of sync during restore jobs causing jobs to
+ "wait on max Storage jobs".  This patch fixes bug #1009.
+
+ Apply this patch to 2.2.6 and probably any 2.2.x version with the
+ following:
+
+ cd <bacula-source>
+ patch -p0 <2.2.6-maxconcurrentjobs.patch
+ ./configure <your-options>
+ make
+ ...
+ make install
+
+
+Index: src/dird/jobq.c
+===================================================================
+--- src/dird/jobq.c    (revision 6019)
++++ src/dird/jobq.c    (working copy)
+@@ -1,23 +1,4 @@
+ /*
+- * Bacula job queue routines.
+- *
+- *  This code consists of three queues, the waiting_jobs
+- *  queue, where jobs are initially queued, the ready_jobs
+- *  queue, where jobs are placed when all the resources are
+- *  allocated and they can immediately be run, and the
+- *  running queue where jobs are placed when they are
+- *  running.
+- *
+- *  Kern Sibbald, July MMIII
+- *
+- *   Version $Id$
+- *
+- *  This code was adapted from the Bacula workq, which was
+- *    adapted from "Programming with POSIX Threads", by
+- *    David R. Butenhof
+- *
+- */
+-/*
+    Bacula® - The Network Backup Solution
+    Copyright (C) 2003-2007 Free Software Foundation Europe e.V.
+@@ -44,6 +25,25 @@
+    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+    Switzerland, email:ftf@fsfeurope.org.
+ */
++/*
++ * Bacula job queue routines.
++ *
++ *  This code consists of three queues, the waiting_jobs
++ *  queue, where jobs are initially queued, the ready_jobs
++ *  queue, where jobs are placed when all the resources are
++ *  allocated and they can immediately be run, and the
++ *  running queue where jobs are placed when they are
++ *  running.
++ *
++ *  Kern Sibbald, July MMIII
++ *
++ *   Version $Id$
++ *
++ *  This code was adapted from the Bacula workq, which was
++ *    adapted from "Programming with POSIX Threads", by
++ *    David R. Butenhof
++ *
++ */
+ #include "bacula.h"
+ #include "dird.h"
+@@ -453,6 +453,7 @@
+             }
+          }
+          jq->running_jobs->append(je);
++//       set_jcr_in_tsd(jcr);
+          Dmsg1(2300, "Took jobid=%d from ready and appended to run\n", jcr->JobId);
+          /* Release job queue lock */
+@@ -682,14 +683,13 @@
+    jcr->acquired_resource_locks = false;
+    if (jcr->rstore) {
+       Dmsg1(200, "Rstore=%s\n", jcr->rstore->name());
+-      if (jcr->rstore->NumConcurrentJobs == 0 &&
+-          jcr->rstore->NumConcurrentJobs < jcr->rstore->MaxConcurrentJobs) {
+-         /* Simple case, first job */
++      /*
++       * Let only one Restore/Verify job run at a time regardless
++       *  of MaxConcurrentjobs.
++       */
++      if (jcr->rstore->NumConcurrentJobs == 0) {
+          jcr->rstore->NumConcurrentJobs = 1;
+          Dmsg0(200, "Set rncj=1\n");
+-      } else if (jcr->rstore->NumConcurrentJobs < jcr->rstore->MaxConcurrentJobs) {
+-         jcr->rstore->NumConcurrentJobs++;
+-         Dmsg1(200, "Inc rncj=%d\n", jcr->rstore->NumConcurrentJobs);
+       } else {
+          Dmsg1(200, "Fail rncj=%d\n", jcr->rstore->NumConcurrentJobs);
+          set_jcr_job_status(jcr, JS_WaitStoreRes);
+@@ -700,7 +700,7 @@
+    if (jcr->wstore) {
+       Dmsg1(200, "Wstore=%s\n", jcr->wstore->name());
+       if (jcr->rstore == jcr->wstore) {           /* deadlock */
+-         jcr->rstore->NumConcurrentJobs--;        /* back out rstore */
++         jcr->rstore->NumConcurrentJobs = 0;      /* back out rstore */
+          Jmsg(jcr, M_FATAL, 0, _("Job canceled. Attempt to read and write same device.\n"
+             "    Read storage \"%s\" (From %s) -- Write storage \"%s\" (From %s)\n"), 
+             jcr->rstore->name(), jcr->rstore_source, jcr->wstore->name(), jcr->wstore_source);
+@@ -716,7 +716,7 @@
+          jcr->wstore->NumConcurrentJobs++;
+          Dmsg1(200, "Inc wncj=%d\n", jcr->wstore->NumConcurrentJobs);
+       } else if (jcr->rstore) {
+-         jcr->rstore->NumConcurrentJobs--;        /* back out rstore */
++         jcr->rstore->NumConcurrentJobs = 0;      /* back out rstore */
+          Dmsg1(200, "Fail wncj=%d\n", jcr->wstore->NumConcurrentJobs);
+          skip_this_jcr = true;
+       } else {
+@@ -738,7 +738,7 @@
+          Dmsg1(200, "Dec wncj=%d\n", jcr->wstore->NumConcurrentJobs);
+       }
+       if (jcr->rstore) {
+-         jcr->rstore->NumConcurrentJobs--;  
++         jcr->rstore->NumConcurrentJobs = 0;
+          Dmsg1(200, "Dec rncj=%d\n", jcr->rstore->NumConcurrentJobs);
+       }
+       set_jcr_job_status(jcr, JS_WaitClientRes);
+@@ -753,7 +753,7 @@
+          Dmsg1(200, "Dec wncj=%d\n", jcr->wstore->NumConcurrentJobs);
+       }
+       if (jcr->rstore) {
+-         jcr->rstore->NumConcurrentJobs--;
++         jcr->rstore->NumConcurrentJobs = 0;
+          Dmsg1(200, "Dec rncj=%d\n", jcr->rstore->NumConcurrentJobs);
+       }
+       jcr->client->NumConcurrentJobs--;
diff --git a/bacula/patches/2.2.x/2.2.6-maxruntime.patch b/bacula/patches/2.2.x/2.2.6-maxruntime.patch
new file mode 100644 (file)
index 0000000..decd466
--- /dev/null
@@ -0,0 +1,34 @@
+  This patch fixes bug #1012 where the job is canceled because
+  of Max Run Time exceeded when the job has not yet started.
+
+  Apply it to 2.2.6 or any prior 2.2.x version with:
+
+  cd <bacula-source>
+  patch -p0 <2.2.6-maxruntime.patch
+  ./configure <your-options>
+  make
+  ...
+  make install
+
+
+Index: src/dird/job.c
+===================================================================
+--- src/dird/job.c     (revision 5979)
++++ src/dird/job.c     (working copy)
+@@ -556,7 +556,7 @@
+  */
+ static bool job_check_maxruntime(JCR *control_jcr, JCR *jcr)
+ {
+-   if (jcr->job->MaxRunTime == 0 || job_canceled(jcr)) {
++   if (jcr->job->MaxRunTime == 0 || job_canceled(jcr) || jcr->JobStatus == JS_Created) {
+       return false;
+    }
+    if ((watchdog_time - jcr->start_time) < jcr->job->MaxRunTime) {
+@@ -931,6 +931,7 @@
+ {
+    jcr->job = job;
+    jcr->JobType = job->JobType;
++   jcr->JobStatus = JS_Created;
+    switch (jcr->JobType) {
+    case JT_ADMIN:
+    case JT_RESTORE:
diff --git a/bacula/patches/2.2.x/2.2.6-queued-msg.patch b/bacula/patches/2.2.x/2.2.6-queued-msg.patch
new file mode 100644 (file)
index 0000000..1a51e97
--- /dev/null
@@ -0,0 +1,25 @@
+ This patch should ensure that queued messages to the console are
+ displayed as soon as possible.  It should fix bug 1007, but has been
+ reported not to work.
+
+ Apply it to version 2.2.6 (or any prior 2.2.x) with:
+
+ cd <bacula-source>
+ ./configure <your-options>
+ patch -p0 <2.2.6-queued-msg.patch
+ make
+ ...
+ make install
+
+Index: src/dird/ua_server.c
+===================================================================
+--- src/dird/ua_server.c       (revision 5979)
++++ src/dird/ua_server.c       (working copy)
+@@ -146,6 +146,7 @@
+          } else {
+             do_a_command(ua, ua->cmd);
+          }
++         dequeue_messages(ua->jcr);
+          if (!ua->quit) {
+             if (console_msg_pending && acl_access_ok(ua, Command_ACL, "messages", 8)) {
+                if (ua->auto_display_messages) {
diff --git a/bacula/patches/2.2.x/2.2.6-scratch.patch b/bacula/patches/2.2.x/2.2.6-scratch.patch
new file mode 100644 (file)
index 0000000..d6da1cd
--- /dev/null
@@ -0,0 +1,29 @@
+
+ This patch prevents the "status dir" command from trying to use a scratch
+ volume and possibly moving it from one pool to another.  This patch fixes
+ bug #1019.
+
+ Apply the patch to 2.2.6 (and possibly any 2.2.x version with):
+
+ cd <bacula-source>
+ patch -p0 <2.2.6-scratch.patch
+ ./configure <your-options>
+ make
+ ...
+ make install
+
+
+
+Index: src/dird/next_vol.c
+===================================================================
+--- src/dird/next_vol.c        (revision 5999)
++++ src/dird/next_vol.c        (working copy)
+@@ -97,7 +97,7 @@
+                   prune_volumes(jcr, InChanger, mr);
+                }
+                ok = recycle_oldest_purged_volume(jcr, InChanger, mr);
+-               if (!ok) {
++               if (!ok && create) {
+                   Dmsg4(050, "after prune volumes_vol ok=%d index=%d InChanger=%d Vstat=%s\n",
+                         ok, index, InChanger, mr->VolStatus);
+                   /*
diff --git a/bacula/patches/2.2.x/2.2.6-status.patch b/bacula/patches/2.2.x/2.2.6-status.patch
new file mode 100644 (file)
index 0000000..9618463
--- /dev/null
@@ -0,0 +1,46 @@
+  This patch fixes the status command to include the formating string for
+  JS_AttrInsterting.  It fixes bug #1021.
+
+  Apply it to version 2.2.6 (and possibly earlier versions) with:
+
+  cd <bacula-source>
+  patch -p0 <2.2.6-status.patch
+  ./configure <your-options>
+  make
+  ...
+  make install
+
+
+Index: src/dird/ua_status.c
+===================================================================
+--- src/dird/ua_status.c       (revision 5979)
++++ src/dird/ua_status.c       (working copy)
+@@ -636,6 +636,12 @@
+       case JS_WaitPriority:
+          msg = _("is waiting for higher priority jobs to finish");
+          break;
++      case JS_AttrDespooling:
++         msg = _("SD despooling Attributes");
++         break;
++      case JS_AttrInserting:
++         msg = _("Dir inserting Attributes");
++         break;
+       default:
+          emsg = (char *)get_pool_memory(PM_FNAME);
+@@ -673,8 +679,14 @@
+             Mmsg(emsg, _("is waiting for Client %s to connect to Storage %s"),
+                  jcr->client->name(), jcr->wstore->name());
+         }
+-         msg = emsg;
++        msg = emsg;
++        break;
++      case JS_AttrDespooling:
++         msg = _("SD despooling Attributes");
+          break;
++      case JS_AttrInserting:
++         msg = _("Dir inserting Attributes");
++         break;
+       }
+       switch (jcr->JobType) {
+       case JT_ADMIN:
diff --git a/bacula/patches/2.2.x/2.2.6-verify-vol.patch b/bacula/patches/2.2.x/2.2.6-verify-vol.patch
new file mode 100644 (file)
index 0000000..264d108
--- /dev/null
@@ -0,0 +1,51 @@
+
+ This patch eliminates spurious output to the console during a VerifyVolume
+ job that contains encrypted data.  
+ It fixes bug #1024.
+
+ Apply this patch to Bacula version 2.2.6 and previous 2.2.x versions with:
+
+ cd <bacula-source>
+ patch -p0 <2.2.6-verify-vol.patch
+ ./configure <your-options>
+ make
+ ...
+ make install
+
+
+Index: src/filed/verify_vol.c
+===================================================================
+--- src/filed/verify_vol.c     (revision 6010)
++++ src/filed/verify_vol.c     (working copy)
+@@ -211,19 +211,6 @@
+          }
+          break;
+-      /* Data streams to ignore */
+-      case STREAM_ENCRYPTED_SESSION_DATA:
+-      case STREAM_FILE_DATA:
+-      case STREAM_SPARSE_DATA:
+-      case STREAM_WIN32_DATA:
+-      case STREAM_WIN32_GZIP_DATA:
+-      case STREAM_GZIP_DATA:
+-      case STREAM_SPARSE_GZIP_DATA:
+-      case STREAM_SIGNED_DIGEST:
+-
+-        /* Do nothing */
+-        break;
+-
+       case STREAM_MD5_DIGEST:
+          bin_to_base64(digest, sizeof(digest), (char *)sd->msg, CRYPTO_DIGEST_MD5_SIZE, true);
+          Dmsg2(400, "send inx=%d MD5=%s\n", jcr->JobFiles, digest);
+@@ -256,9 +243,10 @@
+          Dmsg2(20, "bfiled>bdird: SHA512 len=%d: msg=%s\n", dir->msglen, dir->msg);
+          break;
++      /* Ignore everything else */
+       default:
+-         Pmsg2(0, "None of above!!! stream=%d data=%s\n", stream,sd->msg);
+          break;
++
+       } /* end switch */
+    } /* end while bnet_get */
+    set_jcr_job_status(jcr, JS_Terminated);