[pkg-bacula-commits] [bacula] 01/01: Imported upstream version 7.2.0+git20151117

Carsten Leonhardt leo at moszumanska.debian.org
Tue Dec 8 11:57:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

leo pushed a commit to annotated tag upstream/7.2.0+dfsg+git20151117
in repository bacula.

commit 1fae63e78ad5a7b1a1c1d2066e0b04be1fbca273
Author: Carsten Leonhardt <leo at debian.org>
Date:   Tue Dec 8 12:52:03 2015 +0100

    Imported upstream version 7.2.0+git20151117
    
    Corresponds to upstream git up to commit
    5e3fbc2f79f9b21bc7d162330c3132bacb2a2a4d
    
    Changes from upstream:
    src/lib/sha1.{h,c}: (#658326) remove, DFSG-nonfree, RFC 3174
---
 autoconf/config.guess                        |   3 +
 autoconf/configure.in                        |   4 +-
 configure                                    |  24 +-
 examples/devices/DVD.conf                    |  22 -
 manpages/Makefile.in                         |   2 +-
 manpages/bconsole.8                          |   2 +-
 platforms/rpms/redhat/bacula.spec.in         | 126 ++++--
 platforms/systemd/Makefile.in                | 112 ++---
 src/cats/bvfs.c                              |  15 +-
 src/cats/update_mysql_tables.in              |   4 +-
 src/cats/update_postgresql_tables.in         |   8 +-
 src/filed/acl.c                              |  62 +--
 src/filed/backup.h                           |   4 +-
 src/findlib/bfile.c                          |  10 +-
 src/findlib/fstype.c                         |  15 +-
 src/findlib/protos.h                         |   2 +-
 src/lib/address_conf.c                       |  17 +-
 src/qt-console/tray-monitor/authenticate.cpp |   2 +-
 src/qt-console/tray-monitor/tray-ui.h        |   2 +-
 src/stored/block.h                           |   1 -
 src/stored/block_util.c                      |   2 -
 src/stored/mount.c                           |   2 +-
 src/tools/bpluginfo.c                        | 625 +++++++++++++++++++++++++++
 src/version.h                                |  10 +-
 updatedb/update_mysql_tables.in              |   8 +-
 updatedb/update_postgresql_tables.in         |   8 +-
 26 files changed, 909 insertions(+), 183 deletions(-)

diff --git a/autoconf/config.guess b/autoconf/config.guess
index b79252d..981c376 100755
--- a/autoconf/config.guess
+++ b/autoconf/config.guess
@@ -1001,6 +1001,9 @@ EOF
     ppcle:Linux:*:*)
 	echo powerpcle-unknown-linux-${LIBC}
 	exit ;;
+    ppc64el:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
 	exit ;;
diff --git a/autoconf/configure.in b/autoconf/configure.in
index db86e4d..0843981 100644
--- a/autoconf/configure.in
+++ b/autoconf/configure.in
@@ -2479,7 +2479,7 @@ if test x$support_lzo = xyes; then
 	     AC_CHECK_HEADER(${with_lzo}/lzo/lzoconf.h,
 		[
 		    AC_DEFINE(HAVE_LZO, 1, [Define to 1 if you have LZO compression])
-		    LZO_LIBS="${LZO_LDFLAGS} -lzo2"
+		    LZO_LIBS="${LZO_LDFLAGS} -llzo2"
 		    have_lzo="yes"	
 		], [
 		    echo " "
@@ -3294,6 +3294,8 @@ AC_OUTPUT([autoconf/Make.common \
 	   src/qt-console/bat.pro.mingw32 \
 	   src/qt-console/bat.pro.mingw64 \
 	   src/qt-console/install_conf_file \
+	   src/qt-console/tray-monitor/tray-monitor.conf \
+	   src/qt-console/tray-monitor/tray-monitor.pro \
 	   src/qt-console/tray-monitor/tray-monitor.pro.mingw32 \
 	   src/qt-console/tray-monitor/tray-monitor.pro.mingw64 \
 	   src/dird/Makefile \
diff --git a/configure b/configure
index ba59ba1..e476645 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for bacula 7.1.0.
+# Generated by GNU Autoconf 2.69 for bacula 7.2.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='bacula'
 PACKAGE_TARNAME='bacula'
-PACKAGE_VERSION='7.1.0'
-PACKAGE_STRING='bacula 7.1.0'
+PACKAGE_VERSION='7.2.0'
+PACKAGE_STRING='bacula 7.2.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1562,7 +1562,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures bacula 7.1.0 to adapt to many kinds of systems.
+\`configure' configures bacula 7.2.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1631,7 +1631,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of bacula 7.1.0:";;
+     short | recursive ) echo "Configuration of bacula 7.2.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1826,7 +1826,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-bacula configure 7.1.0
+bacula configure 7.2.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2761,7 +2761,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by bacula $as_me 7.1.0, which was
+It was created by bacula $as_me 7.2.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -29417,7 +29417,7 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
 
 $as_echo "#define HAVE_LZO 1" >>confdefs.h
 
-		    LZO_LIBS="${LZO_LDFLAGS} -lzo2"
+		    LZO_LIBS="${LZO_LDFLAGS} -llzo2"
 		    have_lzo="yes"
 
 else
@@ -30881,7 +30881,7 @@ if test "x${subsysdir}" = "x${sbindir}" ; then
 fi
 
 
-ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/btraceback scripts/bconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat. [...]
+ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/btraceback scripts/bconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat. [...]
 
 ac_config_commands="$ac_config_commands default"
 
@@ -31392,7 +31392,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by bacula $as_me 7.1.0, which was
+This file was extended by bacula $as_me 7.2.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -31458,7 +31458,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-bacula config.status 7.1.0
+bacula config.status 7.2.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -32001,6 +32001,8 @@ do
     "src/qt-console/bat.pro.mingw32") CONFIG_FILES="$CONFIG_FILES src/qt-console/bat.pro.mingw32" ;;
     "src/qt-console/bat.pro.mingw64") CONFIG_FILES="$CONFIG_FILES src/qt-console/bat.pro.mingw64" ;;
     "src/qt-console/install_conf_file") CONFIG_FILES="$CONFIG_FILES src/qt-console/install_conf_file" ;;
+    "src/qt-console/tray-monitor/tray-monitor.conf") CONFIG_FILES="$CONFIG_FILES src/qt-console/tray-monitor/tray-monitor.conf" ;;
+    "src/qt-console/tray-monitor/tray-monitor.pro") CONFIG_FILES="$CONFIG_FILES src/qt-console/tray-monitor/tray-monitor.pro" ;;
     "src/qt-console/tray-monitor/tray-monitor.pro.mingw32") CONFIG_FILES="$CONFIG_FILES src/qt-console/tray-monitor/tray-monitor.pro.mingw32" ;;
     "src/qt-console/tray-monitor/tray-monitor.pro.mingw64") CONFIG_FILES="$CONFIG_FILES src/qt-console/tray-monitor/tray-monitor.pro.mingw64" ;;
     "src/dird/Makefile") CONFIG_FILES="$CONFIG_FILES src/dird/Makefile" ;;
diff --git a/examples/devices/DVD.conf b/examples/devices/DVD.conf
deleted file mode 100644
index 8c6552a..0000000
--- a/examples/devices/DVD.conf
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# A DVD device
-#
-Device {
-  Name = "DVD Writer"
-  Media Type = DVD
-  Device Type = DVD
-  Archive Device = /dev/hdc
-  LabelMedia = yes;                   # lets Bacula label unlabeled media
-  Random Access = Yes;
-  AutomaticMount = yes;               # when device opened, read it
-  RemovableMedia = yes;
-  AlwaysOpen = no;
-  MaximumPartSize = 800M;
-  RequiresMount = yes;
-  MountPoint = /mnt/cdrom;
-  MountCommand = "/bin/mount -t iso9660 -o ro %a %m";
-  UnmountCommand = "/bin/umount %m";
-  SpoolDirectory = /tmp/backup;
-  WritePartCommand = "@scriptdir@/dvd-handler %a write %e %v"
-  FreeSpaceCommand = "@scriptdir@/dvd-handler %a free"
-}
diff --git a/manpages/Makefile.in b/manpages/Makefile.in
index e4d107a..db38f64 100644
--- a/manpages/Makefile.in
+++ b/manpages/Makefile.in
@@ -8,7 +8,7 @@
 
 MAN8 = bacula.8 bacula-dir.8 bacula-fd.8 bacula-sd.8 \
        bconsole.8 bcopy.8 bextract.8 bls.8 bscan.8 btape.8 \
-       btraceback.8 dbcheck.8 bwild.8 bregex.8 bpluginfo.8
+       btraceback.8 dbcheck.8 bwild.8 bregex.8
 
 MAN1 = bsmtp.1 bat.1
       
diff --git a/manpages/bconsole.8 b/manpages/bconsole.8
index 7bce096..478f02c 100644
--- a/manpages/bconsole.8
+++ b/manpages/bconsole.8
@@ -39,7 +39,7 @@ No conio (for scripting).
 .B \-s
 No signals (for debugging).
 .TP
-.b \-u\  nn
+.B \-u\  nn
 Set command execution timeout to \fInn\fP seconds.
 .TP
 .B \-t
diff --git a/platforms/rpms/redhat/bacula.spec.in b/platforms/rpms/redhat/bacula.spec.in
index 8f59a8f..5d3c231 100644
--- a/platforms/rpms/redhat/bacula.spec.in
+++ b/platforms/rpms/redhat/bacula.spec.in
@@ -65,6 +65,8 @@
 %define log_dir        %_libdir/bacula/log
 %endif
 
+%define systemd_dir    /lib/systemd/system
+
 # Daemon user:group Don't change them unless you know what you are doing
 %define director_daemon_user    bacula
 %define storage_daemon_user     bacula
@@ -75,7 +77,7 @@
 
 %define depkgs ../depkgs
 
-# probems with mandriva build:
+# problems with mandriva build:
 # nothing provides libbonobo2_0-devel, nothing provides libbonoboui2_0-devel
 
 #--------------------------------------------------------------------------
@@ -142,6 +144,8 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz
 %{?build_fc17:%define fc17 1}
 %define fc18 0
 %{?build_fc18:%define fc18 1}
+%define fc22 0
+%{?build_fc22:%define fc22 1}
 # Whitebox Enterprise build
 %define wb3 0
 %{?build_wb3:%define wb3 1}
@@ -162,6 +166,9 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz
 %define rhel6 0
 %{?build_rhel6:%define rhel6 1}
 %{?build_el6:%define rhel6 1}
+%define rhel7 0
+%{?build_rhel7:%define rhel7 1}
+%{?build_el7:%define rhel7 1}
 # CentOS build
 %define centos3 0
 %{?build_centos3:%define centos3 1}
@@ -199,6 +206,8 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz
 %{?build_su111:%define su111 1}
 %define su112 0
 %{?build_su112:%define su112 1}
+%define su113 0
+%{?build_su113:%define su113 1}
 %define su120 0
 %{?build_su120:%define su120 1}
 %define su131 0
@@ -214,13 +223,29 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz
 %define client_only 0
 %{?build_client_only:%define client_only 1}
 
+# if the platform is using systemd
+%define usesystemd 0
+
+%if %{rhel7} || %{fc22}
+%define usesystemd 1
+%endif
+
+# depending if we use systemd or not, we use chkconfig or systemctl
+%if %{usesystemd}
+%define service_enable    systemctl enable
+%define service_disable   systemctl disable
+%else
+%define service_enable    /sbin/chkconfig --add
+%define service_disable   /sbin/chkconfig --del
+%endif
+
 # Setup some short cuts
 %define rhat 0
 %if %{rh7} || %{rh8} || %{rh9}
 %define rhat 1
 %endif
 %define fed 0
-%if %{fc16} || %{fc17} || %{fc18}
+%if %{fc16} || %{fc17} || %{fc18} || %{fc22}
 %define fed 1
 %endif
 %define suse 0
@@ -228,7 +253,7 @@ Source2: Release_Notes-%{version}-%{release}.tar.gz
 %define suse 1
 %endif
 %define rhel 0
-%if %{rhel3} || %{rhel4} || %{rhel5} || %{rhel6} || %{centos3} || %{centos4} || %{centos5} || %{centos6}
+%if %{rhel3} || %{rhel4} || %{rhel5} || %{rhel6} || %{rhel7} || %{centos3} || %{centos4} || %{centos5} || %{centos6}
 %define rhel 1
 %endif
 %define scil 0
@@ -283,7 +308,7 @@ exit 1
 %{?build_x86_64:%define x86_64 1}
 
 # check what distribution we are
-%if %{fc16} || %{fc17} || %{fc18}
+%if %{fc16} || %{fc17} || %{fc18} || %{fc22}
 %define _dist %(grep Fedora /etc/redhat-release)
 %endif
 %if %{centos5} || %{centos4} || %{centos3}
@@ -361,6 +386,7 @@ BuildRequires: libstdc++-devel, zlib-devel
 BuildRequires: openssl-devel
 BuildRequires: libacl-devel
 BuildRequires: pkgconfig
+BuildRequires: bzip2-devel
 %if ! %{rh7}
 BuildRequires: libxml2-devel
 %endif
@@ -486,7 +512,7 @@ Provides: %{product}
 Provides: %{product}-libs
 %endif
 
-Requires: libstdc++, zlib, openssl
+Requires: libstdc++, zlib, openssl, bzip2-libs
 Requires: glibc, readline, %{name}-libs
 
 %if %{python}
@@ -656,6 +682,9 @@ export BACULA="Bacula"
 %if %{rh7} || %{rh8} || %{rh9}
         --disable-batch-insert \
 %endif
+%if %{usesystemd}
+        --with-systemd=%{systemd_dir} \
+%endif
         --with-tcp-wrappers  \
         --with-dir-user=%{director_daemon_user} \
         --with-dir-group=%{daemon_group} \
@@ -696,10 +725,22 @@ mkdir -p $RPM_BUILD_ROOT%{sqlite_bindir}
 
 make DESTDIR=$RPM_BUILD_ROOT install
 
+# bsnapshot
+make DESTDIR=$RPM_BUILD_ROOT -C ../bacula-%{_version}/src/tools/ install-bsnapshot
+
+%if %{usesystemd}
+make DESTDIR=$RPM_BUILD_ROOT -C platforms/systemd install-dir install-service
+%endif
+
 # Remove docs for programs that are depreciated
 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bgnome-console.1.%{manpage_ext}
 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-bwxconsole.1.%{manpage_ext}
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bacula-tray-monitor.1.%{manpage_ext}
 rm -f $RPM_BUILD_ROOT%{script_dir}/gconsole
+
+# Remove docs for programs only included in bee
+rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bpluginfo.8.%{manpage_ext}
+
 # Storage-ctl packaged in shstore rpm
 rm -f $RPM_BUILD_ROOT%{script_dir}/storage-ctl
 rm -f $RPM_BUILD_ROOT%{script_dir}/storage-ctl.conf
@@ -718,25 +759,32 @@ rm -f $RPM_BUILD_ROOT%{script_dir}/stopmysql
 %endif
 
 # install the init scripts
+%if !%{usesystemd}
 %if %{suse}
 cp -p platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
 cp -p platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
 cp -p platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
-%endif
+%endif				 # suse
 %if %{mdk}
 cp -p platforms/mandrake/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
 cp -p platforms/mandrake/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
 cp -p platforms/mandrake/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
-%endif
+%endif				 # mdk
 %if ! %{suse} && ! %{mdk}
 cp -p platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
 cp -p platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
 cp -p platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
-%endif
+%endif				 # !suse && !mdk
 chmod 0754 $RPM_BUILD_ROOT/etc/init.d/*
+%endif				 # ! usesystemd
+
 %if %{client_only}
 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-dir
 rm -f $RPM_BUILD_ROOT/etc/init.d/bacula-sd
+rm -f $RPM_BUILD_ROOT%{script_dir}/breload
+rm -f $RPM_BUILD_ROOT%{script_dir}/manual_prune.pl
+rm -f $RPM_BUILD_ROOT%{systemd_dir}/bacula-dir.service
+rm -f $RPM_BUILD_ROOT%{systemd_dir}/bacula-sd.service
 %endif
 
 # install sqlite
@@ -756,6 +804,8 @@ cp -p updatedb/* $RPM_BUILD_ROOT%{script_dir}/updatedb/
 # install specific scripts
 
 # install special upgrade script, except for sqlite3
+%if ! %{sqlite}
+%endif
 
 %if ! %{client_only}
 # install the sample-query.sql file
@@ -789,7 +839,6 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man8/dbcheck.8.%{manpage_ext}
 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bregex.8.%{manpage_ext}
 rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bwild.8.%{manpage_ext}
 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/bsmtp.1.%{manpage_ext}
-rm -f $RPM_BUILD_ROOT%{_mandir}/man8/bpluginfo.8.gz
 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula
 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula_config
 rm -f $RPM_BUILD_ROOT%{script_dir}/bacula-ctl-dir
@@ -803,7 +852,6 @@ rm -rf $RPM_BUILD_ROOT%{script_dir}/updatedb
 rm -f $RPM_BUILD_ROOT%{script_dir}/bconsole
 rm -f $RPM_BUILD_ROOT%{script_dir}/mtx-changer.conf
 rm -f $RPM_BUILD_ROOT%{_sbindir}/bacula
-rm -f $RPM_BUILD_ROOT%{_sbindir}/bpluginfo
 
 %endif
 
@@ -887,15 +935,24 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
 %attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-sd
 %attr(-, root, %{daemon_group}) %{plugin_dir}/bpipe-fd.so
-%attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
-%attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
+#%attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
+#%attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
 %attr(-, root, %{daemon_group}) %{_sbindir}/dbcheck
-%attr(-, root, %{daemon_group}) %{_sbindir}/bpluginfo
 %attr(-, root, %{storage_daemon_group}) %{script_dir}/dvd-handler
-%attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
+#%attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
 %attr(-, root, %{storage_daemon_group}) %{script_dir}/mtx-changer
 %attr(-, root, %{storage_daemon_group}) %config(noreplace) %{script_dir}/mtx-changer.conf
 
+%if %{usesystemd}
+%attr(-, root, %{daemon_group}) %{systemd_dir}/bacula-dir.service
+%attr(-, root, %{daemon_group}) %{systemd_dir}/bacula-fd.service
+%attr(-, root, %{daemon_group}) %{systemd_dir}/bacula-sd.service
+%else
+%attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
+%attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
+%attr(-, root, %{storage_daemon_group}) /etc/init.d/bacula-sd
+%endif
+
 /etc/logrotate.d/bacula
 %{logwatch_dir}/scripts/services/bacula
 %{logwatch_dir}/scripts/shared/applybaculadate
@@ -917,6 +974,8 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 %attr(-, root, %{daemon_group}) %{_sbindir}/bscan
 %attr(-, root, %{daemon_group}) %{_sbindir}/btape
 
+%attr(755, root, root) %{_sbindir}/bsnapshot
+
 %{_sbindir}/bacula-fd
 %{_sbindir}/bacula
 %{_sbindir}/bcopy
@@ -940,7 +999,6 @@ rm -f $RPM_BUILD_DIR/Release_Notes-%{version}-%{release}.txt
 %{_mandir}/man8/bwild.8.%{manpage_ext}
 %{_mandir}/man1/bsmtp.1.%{manpage_ext}
 %{_mandir}/man1/bat.1.%{manpage_ext}
-%{_mandir}/man8/bpluginfo.8.gz
 
 %_prefix/share/doc/*
 
@@ -1079,14 +1137,14 @@ fi
 # add our links
 if [ "$1" -ge 1 ] ; then
 %if %{suse} && %{mysql}
-  /sbin/chkconfig --add mysql
+  %{service_enable} mysql
 %endif
 %if %{suse} && %{postgresql}
-  /sbin/chkconfig --add postgresql
+  %{service_enable} postgresql
 %endif
-  /sbin/chkconfig --add bacula-dir
-  /sbin/chkconfig --add bacula-fd
-  /sbin/chkconfig --add bacula-sd
+  %{service_enable} bacula-dir
+  %{service_enable} bacula-fd
+  %{service_enable} bacula-sd
 fi
 %endif
 
@@ -1103,6 +1161,9 @@ if [ -d %{sysconf_dir} ]; then
        done
    fi
    host=`hostname -s`
+   if [ "$host" = "" ]; then
+       host=localhost
+   fi
    for file in *.conf; do
       sed -f .rpm.sed $file > $file.new
       sed "s at XXX_HOSTNAME_XXX@${host}@g" $file.new > $file
@@ -1212,6 +1273,9 @@ if [ -d %{sysconf_dir} ]; then
        done
    fi
    host=`hostname -s`
+   if [ "$host" = "" ]; then
+       host=localhost
+   fi
    for file in *.conf; do
       sed -f .rpm.sed $file > $file.new
       sed "s at XXX_HOSTNAME_XXX@${host}@g" $file.new > $file
@@ -1234,9 +1298,9 @@ fi
 %if ! %{client_only}
 # delete our links
 if [ $1 = 0 ]; then
-  /sbin/chkconfig --del bacula-dir
-  /sbin/chkconfig --del bacula-fd
-  /sbin/chkconfig --del bacula-sd
+  %{service_disable} bacula-dir
+  %{service_disable} bacula-fd
+  %{service_disable} bacula-sd
 fi
 %endif
 
@@ -1246,8 +1310,17 @@ fi
 %attr(-, root, %{daemon_group}) %dir %{plugin_dir}
 #%attr(-, root, %{daemon_group}) %dir %{log_dir}
 %attr(-, root, %{daemon_group}) %dir %{sysconf_dir}
+
+# SD/DIR might write here
+%attr(-, %{storage_daemon_user}, %{daemon_group}) %dir %{log_dir}
+#%attr(-, root, %{daemon_group}) %{script_dir}/bacula-ctl-fd
+
+%if %{usesystemd}
+%attr(-, root, %{daemon_group})  %{systemd_dir}/bacula-fd.service
+%else
 %{script_dir}/bacula-ctl-fd
 /etc/init.d/bacula-fd
+%endif
 
 /etc/logrotate.d/bacula
 
@@ -1295,7 +1368,7 @@ fi
 %post client
 # add our link
 if [ "$1" -ge 1 ] ; then
-   /sbin/chkconfig --add bacula-fd
+   %{service_enable} bacula-fd
 fi
 
 if [ -d %{sysconf_dir} ]; then
@@ -1311,6 +1384,9 @@ if [ -d %{sysconf_dir} ]; then
        done
    fi
    host=`hostname -s`
+   if [ "$host" = "" ]; then
+       host=localhost
+   fi
    for file in *.conf; do
       sed -f .rpm.sed $file > $file.new
       sed "s at XXX_HOSTNAME_XXX@${host}@g" $file.new > $file
@@ -1321,7 +1397,7 @@ fi
 %preun client
 # delete our link
 if [ $1 = 0 ]; then
-   /sbin/chkconfig --del bacula-fd
+   %{service_disable} bacula-fd
 fi
 
 %files libs
diff --git a/platforms/systemd/Makefile.in b/platforms/systemd/Makefile.in
index 37c257d..2c3ddba 100644
--- a/platforms/systemd/Makefile.in
+++ b/platforms/systemd/Makefile.in
@@ -21,55 +21,55 @@ nothing:
 install: install-dir install-conf install-autostart
 
 install-dir:
-        mkdir -p $(DESTDIR)/$(SYSTEMD_UNITDIR) $(DESTDIR)/$(SYSTEMD_TMPFILES)
+	mkdir -p $(DESTDIR)/$(SYSTEMD_UNITDIR) $(DESTDIR)/$(SYSTEMD_TMPFILES)
 
 install-conf:
-        @$(INSTALL_PROGRAM) -m 644 bacula.conf $(DESTDIR)/$(SYSTEMD_TMPFILES)/bacula.conf
+	@$(INSTALL_PROGRAM) -m 644 bacula.conf $(DESTDIR)/$(SYSTEMD_TMPFILES)/bacula.conf
 
 install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
 
 install-service:
-        @$(INSTALL_PROGRAM) -m 644 bacula-fd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
-        @$(INSTALL_PROGRAM) -m 644 bacula-dir.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
-        @$(INSTALL_PROGRAM) -m 644 bacula-sd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
+	@$(INSTALL_PROGRAM) -m 644 bacula-fd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
+	@$(INSTALL_PROGRAM) -m 644 bacula-dir.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
+	@$(INSTALL_PROGRAM) -m 644 bacula-sd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)
 
 install-autostart-fd:
-        @if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-fd.service; then \
-           /bin/systemctl stop bacula-fd.service; \
-           /bin/systemctl disable bacula-fd.service; \
-        fi
-        @$(INSTALL_PROGRAM) -m 644 bacula-fd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)/bacula-fd.service
-        # set symlinks for script at startup and shutdown
-        @if test x$(DESTDIR) = x ; then \
-           /bin/systemctl enable bacula-fd.service; \
-           /bin/systemctl start bacula-fd.service; \
-        fi
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-fd.service; then \
+	   /bin/systemctl stop bacula-fd.service; \
+	   /bin/systemctl disable bacula-fd.service; \
+	fi
+	@$(INSTALL_PROGRAM) -m 644 bacula-fd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)/bacula-fd.service
+	# set symlinks for script at startup and shutdown
+	@if test x$(DESTDIR) = x ; then \
+	   /bin/systemctl enable bacula-fd.service; \
+	   /bin/systemctl start bacula-fd.service; \
+	fi
 
 
 install-autostart-sd:
-        @if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-sd.service; then \
-           /bin/systemctl stop bacula-sd.service; \
-           /bin/systemctl disable bacula-sd.service; \
-        fi
-        @$(INSTALL_PROGRAM) -m 644 bacula-sd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)/bacula-sd.service
-        # set symlinks for script at startup and shutdown
-        @if test x$(DESTDIR) = x ; then \
-           /bin/systemctl enable bacula-sd.service; \
-           /bin/systemctl start bacula-sd.service; \
-        fi
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-sd.service; then \
+	   /bin/systemctl stop bacula-sd.service; \
+	   /bin/systemctl disable bacula-sd.service; \
+	fi
+	@$(INSTALL_PROGRAM) -m 644 bacula-sd.service $(DESTDIR)/$(SYSTEMD_UNITDIR)/bacula-sd.service
+	# set symlinks for script at startup and shutdown
+	@if test x$(DESTDIR) = x ; then \
+	   /bin/systemctl enable bacula-sd.service; \
+	   /bin/systemctl start bacula-sd.service; \
+	fi
 
 
 install-autostart-dir:
-        @if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-dir.service; then \
-           /bin/systemctl stop bacula-dir.service; \
-           /bin/systemctl disable bacula-dir.service; \
-        fi
-        @$(INSTALL_PROGRAM) -m 644 bacula-dir.service $(DESTDIR)/$(SYSTEMD_UNITDIR)/bacula-dir.service
-        # set symlinks for script at startup and shutdown
-        @if test x$(DESTDIR) = x ; then \
-           /bin/systemctl enable bacula-dir.service; \
-           /bin/systemctl start bacula-dir.service; \
-        fi
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-dir.service; then \
+	   /bin/systemctl stop bacula-dir.service; \
+	   /bin/systemctl disable bacula-dir.service; \
+	fi
+	@$(INSTALL_PROGRAM) -m 644 bacula-dir.service $(DESTDIR)/$(SYSTEMD_UNITDIR)/bacula-dir.service
+	# set symlinks for script at startup and shutdown
+	@if test x$(DESTDIR) = x ; then \
+	   /bin/systemctl enable bacula-dir.service; \
+	   /bin/systemctl start bacula-dir.service; \
+	fi
 
 
 uninstall: uninstall-autostart uninstall-conf
@@ -77,37 +77,37 @@ uninstall: uninstall-autostart uninstall-conf
 uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
 
 uninstall-autostart-fd:
-        @if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-fd.service; then \
-           /bin/systemctl stop bacula-fd.service; \
-           /bin/systemctl disable bacula-fd.service; \
-        fi
-        @rm -f  $(DESTDIR)$(SYSTEMD_UNITDIR)/bacula-fd.service
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-fd.service; then \
+	   /bin/systemctl stop bacula-fd.service; \
+	   /bin/systemctl disable bacula-fd.service; \
+	fi
+	@rm -f	$(DESTDIR)$(SYSTEMD_UNITDIR)/bacula-fd.service
 
 
 uninstall-autostart-sd:
-        @if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-sd.service; then \
-           /bin/systemctl stop bacula-fd.service; \
-           /bin/systemctl disable bacula-fd.service; \
-        fi
-        @rm -f  $(DESTDIR)$(SYSTEMD_UNITDIR)/bacula-sd.service
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD_UNITDIR)/bacula-sd.service; then \
+	   /bin/systemctl stop bacula-fd.service; \
+	   /bin/systemctl disable bacula-fd.service; \
+	fi
+	@rm -f	$(DESTDIR)$(SYSTEMD_UNITDIR)/bacula-sd.service
 
 uninstall-autostart-dir:
-        @if test x$(DESTDIR) = x -a  -f $(SYSTEMD)/bacula-dir.service; then \
-           /bin/systemctl stop bacula-dir.service; \
-           /bin/systemctl disable bacula-dir.service; \
-        fi
-        @rm -f  $(DESTDIR)$(SYSTEMD_UNITDIR)/bacula-dir.service
+	@if test x$(DESTDIR) = x -a  -f $(SYSTEMD)/bacula-dir.service; then \
+	   /bin/systemctl stop bacula-dir.service; \
+	   /bin/systemctl disable bacula-dir.service; \
+	fi
+	@rm -f	$(DESTDIR)$(SYSTEMD_UNITDIR)/bacula-dir.service
 
 uninstall-conf:
-        @rm -f  $(DESTDIR)/$(SYSTEMD_TMPFILES)/bacula.conf
+	@rm -f	$(DESTDIR)/$(SYSTEMD_TMPFILES)/bacula.conf
 
 clean:
-        @rm -f 1 2 3
+	@rm -f 1 2 3
 
 distclean: clean
-        @rm -f Makefile bacula-*.spec bacula.*.spec bacula.spec
-        @rm -f bacula.conf bacula-sd.service bacula-fd.service bacula-dir.service
+	@rm -f Makefile bacula-*.spec bacula.*.spec bacula.spec
+	@rm -f bacula.conf bacula-sd.service bacula-fd.service bacula-dir.service
 
 devclean: clean
-        @rm -f Makefile bacula-*.spec bacula.*.spec bacula.spec
-        @rm -f bacula.conf bacula-sd.service bacula-fd.service bacula-dir.service
+	@rm -f Makefile bacula-*.spec bacula.*.spec bacula.spec
+	@rm -f bacula.conf bacula-sd.service bacula-fd.service bacula-dir.service
diff --git a/src/cats/bvfs.c b/src/cats/bvfs.c
index d73a49b..1d4619d 100644
--- a/src/cats/bvfs.c
+++ b/src/cats/bvfs.c
@@ -472,6 +472,7 @@ static int update_path_hierarchy_cache(JCR *jcr,
       free(result);
    }
 
+   
    if (mdb->bdb_get_type_index() == SQL_TYPE_SQLITE3) {
       Mmsg(mdb->cmd,
  "INSERT INTO PathVisibility (PathId, JobId) "
@@ -481,7 +482,19 @@ static int update_path_hierarchy_cache(JCR *jcr,
       "AND h.PPathId NOT IN (SELECT PathId FROM PathVisibility WHERE JobId=%s)",
            jobid, jobid, jobid );
 
-   } else {
+   }  else if (mdb->bdb_get_type_index() == SQL_TYPE_MYSQL) {
+      Mmsg(mdb->cmd,
+  "INSERT INTO PathVisibility (PathId, JobId)  "
+   "SELECT a.PathId,%s "
+   "FROM ( "
+     "SELECT DISTINCT h.PPathId AS PathId "
+       "FROM PathHierarchy AS h "
+       "JOIN  PathVisibility AS p ON (h.PathId=p.PathId) "
+      "WHERE p.JobId=%s) AS a "
+      "LEFT JOIN PathVisibility AS b ON (b.JobId=%s and a.PathId = b.PathId) "
+      "WHERE b.PathId IS NULL",  jobid, jobid, jobid);
+
+   } else {                     /* TODO: Test the MYSQL Query with PostgreSQL */
       Mmsg(mdb->cmd,
   "INSERT INTO PathVisibility (PathId, JobId)  "
    "SELECT a.PathId,%s "
diff --git a/src/cats/update_mysql_tables.in b/src/cats/update_mysql_tables.in
index f2862fe..4ae0513 100644
--- a/src/cats/update_mysql_tables.in
+++ b/src/cats/update_mysql_tables.in
@@ -9,8 +9,8 @@
 echo " "
 echo "This script will update a Bacula MySQL database from version 12-14 to 15"
 echo " "
-echo "Depending on the current version of your catalog, you may have to run this script"
-echo "	multiple times"
+echo "Depending on the current version of your catalog,"
+echo "you may have to run this script multiple times."
 echo " "
 
 bindir=@MYSQL_BINDIR@
diff --git a/src/cats/update_postgresql_tables.in b/src/cats/update_postgresql_tables.in
index 6681046..c3db92a 100644
--- a/src/cats/update_postgresql_tables.in
+++ b/src/cats/update_postgresql_tables.in
@@ -3,14 +3,14 @@
 # Copyright (C) 2000-2015 Kern Sibbald
 # License: BSD 2-Clause; see file LICENSE-FOSS
 #
-# Shell script to update MySQL tables from Bacula Community version 
+# Shell script to update PostgreSQL tables from Bacula Community version 
 #  5.0.x, 5.2.x, 7.0.x
 #
 echo " "
-echo "This script will update a Bacula MySQL database from version 12-14 to 15"
+echo "This script will update a Bacula PostgreSQL database from version 12-14 to 15"
 echo " "
-echo "Depending on the current version of your catalog, you may have to run this script"
-echo "	multiple times"
+echo "Depending on the current version of your catalog,"
+echo "you may have to run this script multiple times."
 echo " "
 
 bindir=@POSTGRESQL_BINDIR@
diff --git a/src/filed/acl.c b/src/filed/acl.c
index 8a63b6b..f8c3dd8 100644
--- a/src/filed/acl.c
+++ b/src/filed/acl.c
@@ -927,7 +927,7 @@ static bacl_rtn_code generic_set_acl_on_os(JCR *jcr,
  * Define the supported ACL streams for this OS
  */
 static int os_access_acl_streams[1] = {
-   STREAM_ACL_DARWIN_ACCESS_ACL
+   STREAM_ACL_DARWIN_ACCESS
 };
 static int os_default_acl_streams[1] = {
    -1
@@ -956,7 +956,7 @@ static bacl_rtn_code darwin_backup_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
 #endif
 
    if (jcr->acl_ctx->content_length > 0) {
-      return send_acl_stream(jcr, STREAM_ACL_DARWIN_ACCESS_ACL);
+      return send_acl_stream(jcr, STREAM_ACL_DARWIN_ACCESS);
    }
    return bacl_rtn_ok;
 }
@@ -988,11 +988,11 @@ static bacl_rtn_code (*os_restore_acl_streams)
  * Define the supported ACL streams for these OSes
  */
 static int os_access_acl_streams[2] = {
-   STREAM_ACL_FREEBSD_ACCESS_ACL,
-   STREAM_ACL_FREEBSD_NFS4_ACL
+   STREAM_ACL_FREEBSD_ACCESS,
+   STREAM_ACL_FREEBSD_NFS4
 };
 static int os_default_acl_streams[1] = {
-   STREAM_ACL_FREEBSD_DEFAULT_ACL
+   STREAM_ACL_FREEBSD_DEFAULT
 };
 
 static bacl_rtn_code freebsd_backup_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
@@ -1065,7 +1065,7 @@ static bacl_rtn_code freebsd_backup_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
          return bacl_rtn_fatal;
 
       if (jcr->acl_ctx->content_length > 0) {
-         if (send_acl_stream(jcr, STREAM_ACL_FREEBSD_NFS4_ACL) == bacl_rtn_fatal)
+         if (send_acl_stream(jcr, STREAM_ACL_FREEBSD_NFS4) == bacl_rtn_fatal)
             return bacl_rtn_fatal;
       }
       break;
@@ -1077,7 +1077,7 @@ static bacl_rtn_code freebsd_backup_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
          return bacl_rtn_fatal;
 
       if (jcr->acl_ctx->content_length > 0) {
-         if (send_acl_stream(jcr, STREAM_ACL_FREEBSD_ACCESS_ACL) == bacl_rtn_fatal)
+         if (send_acl_stream(jcr, STREAM_ACL_FREEBSD_ACCESS) == bacl_rtn_fatal)
             return bacl_rtn_fatal;
       }
 
@@ -1088,7 +1088,7 @@ static bacl_rtn_code freebsd_backup_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
          if (generic_get_acl_from_os(jcr, BACL_TYPE_DEFAULT) == bacl_rtn_fatal)
             return bacl_rtn_fatal;
          if (jcr->acl_ctx->content_length > 0) {
-            if (send_acl_stream(jcr, STREAM_ACL_FREEBSD_DEFAULT_ACL) == bacl_rtn_fatal)
+            if (send_acl_stream(jcr, STREAM_ACL_FREEBSD_DEFAULT) == bacl_rtn_fatal)
                return bacl_rtn_fatal;
          }
       }
@@ -1113,13 +1113,13 @@ static bacl_rtn_code freebsd_restore_acl_streams(JCR *jcr,
     */
    switch (stream) {
    case STREAM_UNIX_ACCESS_ACL:
-   case STREAM_ACL_FREEBSD_ACCESS_ACL:
+   case STREAM_ACL_FREEBSD_ACCESS:
    case STREAM_UNIX_DEFAULT_ACL:
-   case STREAM_ACL_FREEBSD_DEFAULT_ACL:
+   case STREAM_ACL_FREEBSD_DEFAULT:
       acl_enabled = pathconf(jcr->last_fname, _PC_ACL_EXTENDED);
       acl_type_name = "POSIX";
       break;
-   case STREAM_ACL_FREEBSD_NFS4_ACL:
+   case STREAM_ACL_FREEBSD_NFS4:
 #if defined(_PC_ACL_NFS4)
       acl_enabled = pathconf(jcr->last_fname, _PC_ACL_NFS4);
 #endif
@@ -1159,12 +1159,12 @@ static bacl_rtn_code freebsd_restore_acl_streams(JCR *jcr,
     */
    switch (stream) {
    case STREAM_UNIX_ACCESS_ACL:
-   case STREAM_ACL_FREEBSD_ACCESS_ACL:
+   case STREAM_ACL_FREEBSD_ACCESS:
       return generic_set_acl_on_os(jcr, BACL_TYPE_ACCESS, content, content_length);
    case STREAM_UNIX_DEFAULT_ACL:
-   case STREAM_ACL_FREEBSD_DEFAULT_ACL:
+   case STREAM_ACL_FREEBSD_DEFAULT:
       return generic_set_acl_on_os(jcr, BACL_TYPE_DEFAULT, content, content_length);
-   case STREAM_ACL_FREEBSD_NFS4_ACL:
+   case STREAM_ACL_FREEBSD_NFS4:
       return generic_set_acl_on_os(jcr, BACL_TYPE_NFS4, content, content_length);
    default:
       break;
@@ -1273,11 +1273,11 @@ static bacl_rtn_code (*os_restore_acl_streams)
  * Define the supported ACL streams for this OS
  */
 static int os_access_acl_streams[1] = {
-   STREAM_ACL_TRU64_ACCESS_ACL
+   STREAM_ACL_TRU64_ACCESS
 };
 static int os_default_acl_streams[2] = {
-   STREAM_ACL_TRU64_DEFAULT_ACL,
-   STREAM_ACL_TRU64_DEFAULT_DIR_ACL
+   STREAM_ACL_TRU64_DEFAULT,
+   STREAM_ACL_TRU64_DEFAULT_DIR
 };
 
 static bacl_rtn_code tru64_backup_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
@@ -1564,8 +1564,8 @@ char *acl_strerror(int);
  * Define the supported ACL streams for this OS
  */
 static int os_access_acl_streams[2] = {
-   STREAM_ACL_SOLARIS_ACLENT,
-   STREAM_ACL_SOLARIS_ACE
+   STREAM_ACL_SOLARIS_POSIX,
+   STREAM_ACL_SOLARIS_NFS4
 };
 static int os_default_acl_streams[1] = {
    -1
@@ -1653,10 +1653,10 @@ static bacl_rtn_code solaris_backup_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
 
       switch (acl_type(aclp)) {
       case ACLENT_T:
-         stream_status = send_acl_stream(jcr, STREAM_ACL_SOLARIS_ACLENT);
+         stream_status = send_acl_stream(jcr, STREAM_ACL_SOLARIS_POSIX);
          break;
       case ACE_T:
-         stream_status = send_acl_stream(jcr, STREAM_ACL_SOLARIS_ACE);
+         stream_status = send_acl_stream(jcr, STREAM_ACL_SOLARIS_NFS4);
          break;
       default:
          break;
@@ -1673,8 +1673,8 @@ static bacl_rtn_code solaris_restore_acl_streams(JCR *jcr, int stream, char *con
    acl_t *aclp;
    int acl_enabled, error;
 
-   if (stream != STREAM_UNIX_ACCESS_ACL || stream != STREAM_ACL_SOLARIS_ACLENT ||
-       stream != STREAM_ACL_SOLARIS_ACE) {
+   if (stream != STREAM_UNIX_ACCESS_ACL || stream != STREAM_ACL_SOLARIS_POSIX ||
+       stream != STREAM_ACL_SOLARIS_NFS4) {
       return bacl_rtn_error;
    }
 
@@ -1709,7 +1709,7 @@ static bacl_rtn_code solaris_restore_acl_streams(JCR *jcr, int stream, char *con
     * On a filesystem with ACL support make sure this particular ACL type can be restored.
     */
    switch (stream) {
-   case STREAM_ACL_SOLARIS_ACLENT:
+   case STREAM_ACL_SOLARIS_POSIX:
       /*
        * An aclent can be restored on filesystems with _ACL_ACLENT_ENABLED or _ACL_ACE_ENABLED support.
        */
@@ -1720,7 +1720,7 @@ static bacl_rtn_code solaris_restore_acl_streams(JCR *jcr, int stream, char *con
          return bacl_rtn_error;
       }
       break;
-   case STREAM_ACL_SOLARIS_ACE:
+   case STREAM_ACL_SOLARIS_NFS4:
       /*
        * An ace can only be restored on a filesystem with _ACL_ACE_ENABLED support.
        */
@@ -1750,7 +1750,7 @@ static bacl_rtn_code solaris_restore_acl_streams(JCR *jcr, int stream, char *con
     * Validate that the conversion gave us the correct acl type.
     */
    switch (stream) {
-   case STREAM_ACL_SOLARIS_ACLENT:
+   case STREAM_ACL_SOLARIS_POSIX:
       if (acl_type(aclp) != ACLENT_T) {
          Mmsg1(jcr->errmsg,
                _("wrong encoding of acl type in acl stream on file \"%s\"\n"),
@@ -1758,7 +1758,7 @@ static bacl_rtn_code solaris_restore_acl_streams(JCR *jcr, int stream, char *con
          return bacl_rtn_error;
       }
       break;
-   case STREAM_ACL_SOLARIS_ACE:
+   case STREAM_ACL_SOLARIS_NFS4:
       if (acl_type(aclp) != ACE_T) {
          Mmsg1(jcr->errmsg,
                _("wrong encoding of acl type in acl stream on file \"%s\"\n"),
@@ -1802,7 +1802,7 @@ static bacl_rtn_code solaris_restore_acl_streams(JCR *jcr, int stream, char *con
  * Define the supported ACL streams for this OS
  */
 static int os_access_acl_streams[1] = {
-   STREAM_ACL_SOLARIS_ACLENT
+   STREAM_ACL_SOLARIS_POSIX
 };
 static int os_default_acl_streams[1] = {
    -1
@@ -1861,7 +1861,7 @@ static bacl_rtn_code solaris_backup_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
             pm_strcpy(jcr->acl_ctx->content, acl_text);
          actuallyfree(acl_text);
          free(acls);
-         return send_acl_stream(jcr, STREAM_ACL_SOLARIS_ACLENT);
+         return send_acl_stream(jcr, STREAM_ACL_SOLARIS_POSIX);
       }
 
       berrno be;
@@ -2027,7 +2027,7 @@ bool backup_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
        * AFS is a non OS specific filesystem so see if this path is on an AFS filesystem
        * Set the BACL_FLAG_SAVE_AFS flag if it is. If not set the BACL_FLAG_SAVE_NATIVE flag.
        */
-      if (fstype_equals(jcr->last_fname, "afs")) {
+      if (fstype_cmp(ff_pkt, "afs")) {
          jcr->acl_ctx->flags |= BACL_FLAG_SAVE_AFS;
       } else {
          jcr->acl_ctx->flags |= BACL_FLAG_SAVE_NATIVE;
@@ -2128,7 +2128,7 @@ bacl_rtn_code restore_acl_streams(JCR *jcr, int stream,
        * AFS is a non OS specific filesystem so see if this path is on an AFS filesystem
        * Set the BACL_FLAG_RESTORE_AFS flag if it is. If not set the BACL_FLAG_RETORE_NATIVE flag.
        */
-      if (fstype_equals(jcr->last_fname, "afs")) {
+      if (fstype_cmp(ff_pkt, "afs")) {
          jcr->acl_ctx->flags |= BACL_FLAG_RESTORE_AFS;
       } else {
          jcr->acl_ctx->flags |= BACL_FLAG_RESTORE_NATIVE;
diff --git a/src/filed/backup.h b/src/filed/backup.h
index 4ce8c1c..2cf0223 100644
--- a/src/filed/backup.h
+++ b/src/filed/backup.h
@@ -50,10 +50,12 @@ struct bctx_t {
 
    /* Compression variables */
 #if defined(HAVE_LIBZ) || defined(HAVE_LZO)
-   uLong compress_len;
    uLong max_compress_len;
+   uLong compress_len;
    Bytef *cbuf;
    Bytef *cbuf2;
+#else
+   uint64_t max_compress_len;
 #endif
 #ifdef HAVE_LZO
    comp_stream_header ch;
diff --git a/src/findlib/bfile.c b/src/findlib/bfile.c
index 92d6286..99b3a5f 100644
--- a/src/findlib/bfile.c
+++ b/src/findlib/bfile.c
@@ -537,9 +537,10 @@ int bopen(BFILE *bfd, const char *fname, uint64_t flags, mode_t mode)
    bfd->win32DecompContext.liNextHeader = 0;
 
 #if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_WILLNEED)
-   if (bfd->fid != -1 && flags & O_RDONLY) {
+   /* If not RDWR or WRONLY must be Read Only */
+   if (bfd->fid != -1 && !(flags & (O_RDWR|O_WRONLY))) {
       int stat = posix_fadvise(bfd->fid, 0, 0, POSIX_FADV_WILLNEED);
-      Dmsg2(400, "Did posix_fadvise on %s stat=%d\n", fname, stat);
+      Dmsg3(400, "Did posix_fadvise WILLNEED on %s fid=%d stat=%d\n", fname, bfd->fid, stat);
    }
 #endif
 
@@ -585,10 +586,12 @@ int bclose(BFILE *bfd)
    }
 
 #if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_DONTNEED)
-   if (bfd->m_flags & O_RDONLY) {
+   /* If not RDWR or WRONLY must be Read Only */
+   if (!(bfd->m_flags & (O_RDWR|O_WRONLY))) {
       fdatasync(bfd->fid);            /* sync the file */
       /* Tell OS we don't need it any more */
       posix_fadvise(bfd->fid, 0, 0, POSIX_FADV_DONTNEED);
+      Dmsg1(400, "Did posix_fadvise DONTNEED on fid=%d\n", bfd->fid);
    }
 #endif
 
@@ -653,4 +656,3 @@ boffset_t blseek(BFILE *bfd, boffset_t offset, int whence)
    bfd->berrno = errno;
    return pos;
 }
-
diff --git a/src/findlib/fstype.c b/src/findlib/fstype.c
index 3ed575d..c2bc83d 100644
--- a/src/findlib/fstype.c
+++ b/src/findlib/fstype.c
@@ -31,7 +31,9 @@
 #include "find.h"
 #include <sys/types.h>
 #include <sys/stat.h>
-
+#ifdef HAVE_SUN_OS
+  #include <sys/mnttab.h>
+#endif
 #else /* Set up for testing a stand alone program */
 
 #include <stdio.h>
@@ -84,6 +86,15 @@ void add_mtab_item(void *user_ctx, struct stat *st, const char *fstype,
    }
 }
 
+/* Compare directly the FS from a fname with a string */
+bool fstype_cmp(FF_PKT *ff_pkt, const char *fsname)
+{
+   char buf[256];
+   if (fstype(ff_pkt, buf, sizeof(buf))) {
+      return (strcmp(buf, fsname) == 0);
+   }
+   return false;
+}
 
 /*
  * These functions should be implemented for each OS
@@ -373,7 +384,7 @@ bool read_mtab(mtab_handler_t *mtab_handler, void *user_ctx)
       mtab_handler(user_ctx, &st, mnt.mnt_fstype, mnt.mnt_mountp,
          mnt.mnt_mntopts, mnt.mnt_special);
    }
-   fclose(fp);
+   fclose(mntfp);
    V(mutex);
 #endif
 
diff --git a/src/findlib/protos.h b/src/findlib/protos.h
index 7291ee8..12514ad 100644
--- a/src/findlib/protos.h
+++ b/src/findlib/protos.h
@@ -81,7 +81,7 @@ bool path_list_add(JCR *jcr, uint32_t len, char *fname);
 
 /* from fstype.c */
 bool fstype(FF_PKT *ff_pkt, char *fs, int fslen);
-bool fstype_equals(const char *fname, const char *fstype_name);
+bool fstype_cmp(FF_PKT *ff_pkt, const char *fstype_name);
 
 /* from drivetype.c */
 bool drivetype(const char *fname, char *fs, int fslen);
diff --git a/src/lib/address_conf.c b/src/lib/address_conf.c
index 59dbd0f..66a49d2 100644
--- a/src/lib/address_conf.c
+++ b/src/lib/address_conf.c
@@ -613,10 +613,19 @@ char *sockaddr_to_ascii(const struct sockaddr *sa, int socklen, char *buf, int b
   /* This is the more modern way of doing it */
   char clienthost[NI_MAXHOST];
   char clientservice[NI_MAXSERV];
-  int status;
-  status = getnameinfo(sa, socklen, clienthost, sizeof(clienthost),
-                       clientservice, sizeof(clientservice),
-                       NI_NUMERICHOST | NI_NUMERICSERV);
+  int status = 1;
+  if (sa->sa_family == AF_INET) {
+     status = getnameinfo(sa, socklen, clienthost, sizeof(clienthost),
+                 clientservice, sizeof(clientservice),
+                 NI_NUMERICHOST | NI_NUMERICSERV);
+  }
+#ifdef HAVE_IPV6
+  else {
+     status = getnameinfo(sa, sizeof(sockaddr_in6), clienthost, sizeof(clienthost),
+                 clientservice, sizeof(clientservice),
+                 NI_NUMERICHOST | NI_NUMERICSERV);
+  }
+#endif
   if (status == 0) {
      /* Enclose IPv6 in [] */
      if (strchr(clienthost, ':') != NULL) {
diff --git a/src/qt-console/tray-monitor/authenticate.cpp b/src/qt-console/tray-monitor/authenticate.cpp
index 16f78dd..dde4682 100644
--- a/src/qt-console/tray-monitor/authenticate.cpp
+++ b/src/qt-console/tray-monitor/authenticate.cpp
@@ -30,7 +30,7 @@
  *
  */
 
-#include "winhdrs.h"
+//#include "winhdrs.h"
 #include "tray-monitor.h"
 
 void senditf(const char *fmt, ...);
diff --git a/src/qt-console/tray-monitor/tray-ui.h b/src/qt-console/tray-monitor/tray-ui.h
index e4e5dfc..ce2b22f 100644
--- a/src/qt-console/tray-monitor/tray-ui.h
+++ b/src/qt-console/tray-monitor/tray-ui.h
@@ -27,7 +27,7 @@
 # endif
 #endif
 
-#include "winhdrs.h"
+//#include "winhdrs.h"
 #include <QAction>
 #include <QApplication>
 #include <QButtonGroup>
diff --git a/src/stored/block.h b/src/stored/block.h
index ff8f085..a8552b0 100644
--- a/src/stored/block.h
+++ b/src/stored/block.h
@@ -127,7 +127,6 @@ struct DEV_BLOCK {
    int32_t  rechdr_items;             /* number of items in rechdr queue */
    char    *bufp;                     /* pointer into buffer */
    char     ser_buf[BLKHDR2_LENGTH];  /* Serial buffer for data */
-   POOLMEM *rechdr_queue;             /* record header queue */
    POOLMEM *buf;                      /* actual data buffer */
 };
 
diff --git a/src/stored/block_util.c b/src/stored/block_util.c
index 7fc45d2..86e097d 100644
--- a/src/stored/block_util.c
+++ b/src/stored/block_util.c
@@ -135,7 +135,6 @@ DEV_BLOCK *new_block(DEVICE *dev)
     */
    block->buf_len = len;
    block->buf = get_memory(block->buf_len);
-   block->rechdr_queue = get_memory(block->buf_len);
    block->rechdr_items = 0;
    empty_block(block);
    block->BlockVer = BLOCK_VER;       /* default write version */
@@ -187,7 +186,6 @@ void free_block(DEV_BLOCK *block)
    if (block) {
       Dmsg1(999, "free_block buffer %x\n", block->buf);
       free_memory(block->buf);
-      free_memory(block->rechdr_queue);
       Dmsg1(999, "free_block block %x\n", block);
       free_memory((POOLMEM *)block);
    }
diff --git a/src/stored/mount.c b/src/stored/mount.c
index 0aae19a..a93e0e7 100644
--- a/src/stored/mount.c
+++ b/src/stored/mount.c
@@ -620,7 +620,7 @@ void DCR::do_swapping(bool is_writing)
       if (dev->vol) {
          dev->vol->clear_swapping();
          Dmsg1(100, "=== set in_use vol=%s\n", dev->vol->vol_name);
-         dev->vol->set_in_use();
+         dev->vol->clear_in_use();
          dev->VolHdr.VolumeName[0] = 0;  /* don't yet have right Volume */
       } else {
          Dmsg1(100, "No vol on dev=%s\n", dev->print_name());
diff --git a/src/tools/bpluginfo.c b/src/tools/bpluginfo.c
new file mode 100644
index 0000000..1655bd5
--- /dev/null
+++ b/src/tools/bpluginfo.c
@@ -0,0 +1,625 @@
+/*
+ * Contributed in 2012 by Inteos sp. z o.o.
+ *
+ * Utility tool display various information about Bacula plugin,
+ * including but not limited to:
+ * - Name and Author of the plugin
+ * - Plugin License
+ * - Description
+ * - API version
+ * - Enabled functions, etc.
+ */
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2006-2014 Free Software Foundation Europe e.V.
+
+   The main author of Bacula is Kern Sibbald, with contributions from many
+   others, a complete list can be found in the file AUTHORS.
+
+   You may use this file and others of this release according to the
+   license defined in the LICENSE file, which includes the Affero General
+   Public License, v3.0 ("AGPLv3") and some additional permissions and
+   terms pursuant to its AGPLv3 Section 7.
+
+   Bacula® is a registered trademark of Kern Sibbald.
+*/
+
+#include <stdio.h>
+#include <unistd.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+#ifndef __WIN32__
+#include <dlfcn.h>
+#endif
+#include "bacula.h"
+#include "../filed/fd_plugins.h"
+#include "../dird/dir_plugins.h"
+// I can't include sd_plugins.h here ...
+#include "../stored/stored.h"
+#include "assert_macro.h"
+
+extern "C" {
+   typedef int (*loadPlugin) (void *binfo, void *bfuncs, void **pinfo,
+               void **pfuncs);
+   typedef int (*unloadPlugin) (void);
+}
+#define DEFAULT_API_VERSION   1
+enum plugintype {
+   DIRPLUGIN,
+   FDPLUGIN,
+   SDPLUGIN,
+   ERRORPLUGIN,
+};
+
+/*
+ * pDirInfo
+ * pInfo
+ * psdInfo
+ */
+typedef union _pluginfo pluginfo;
+union _pluginfo {
+   pDirInfo pdirinfo;
+   pInfo pfdinfo;
+   psdInfo psdinfo;
+};
+
+/*
+ * pDirFuncs
+ * pFuncs
+ * psdFuncs
+ */
+typedef union _plugfuncs plugfuncs;
+union _plugfuncs {
+   pDirFuncs pdirfuncs;
+   pFuncs pfdfuncs;
+   psdFuncs psdfuncs;
+};
+
+/*
+ * bDirFuncs
+ * bFuncs
+ * bsdFuncs
+ */
+/*
+ * TODO: change to union
+ *
+typedef union _baculafuncs baculafuncs;
+union _baculafuncs {
+   bDirFuncs bdirfuncs;
+   bFuncs bfdfuncs;
+   bsdFuncs bsdfuncs;
+};
+*/
+typedef struct _baculafuncs baculafuncs;
+struct _baculafuncs {
+   uint32_t size;
+   uint32_t version;
+   int (*registerBaculaEvents) (void *ctx, ...);
+   int (*getBaculaValue) (void *ctx, int var, void *value);
+   int (*setBaculaValue) (void *ctx, int var, void *value);
+   int (*JobMessage) (void *ctx, const char *file, int line, int type, int64_t mtime,
+            const char *fmt, ...);
+   int (*DebugMessage) (void *ctx, const char *file, int line, int level,
+         const char *fmt, ...);
+   void *(*baculaMalloc) (void *ctx, const char *file, int line, size_t size);
+   void (*baculaFree) (void *ctx, const char *file, int line, void *mem);
+};
+
+/*
+ * bDirInfo
+ * bInfo
+ * bsdInfo
+ */
+typedef union _baculainfos baculainfos;
+union _baculainfos {
+   bDirInfo bdirinfo;
+   bInfo bfdinfo;
+   bsdInfo bsdinfo;
+};
+
+/*
+typedef struct _baculainfos baculainfos;
+struct _baculainfos {
+   uint32_t size;
+   uint32_t version;
+};
+*/
+
+typedef struct _progdata progdata;
+struct _progdata {
+   int verbose;
+   int listinfo;
+   int listfunc;
+   char *pluginfile;
+   void *pluginhandle;
+   int bapiversion;
+   int bplugtype;
+   pluginfo *pinfo;
+   plugfuncs *pfuncs;
+};
+
+/* memory allocation/deallocation */
+#define MALLOC(size) \
+   (char *) bmalloc ( size );
+
+#define ASSERT_MEMORY(m) \
+   if ( m == NULL ){ \
+      printf ( "Error: memory allocation error!\n" ); \
+      exit (10); \
+   }
+
+#define FREE(ptr) \
+   if ( ptr != NULL ){ \
+      bfree ( ptr ); \
+      ptr = NULL; \
+   }
+
+int registerBaculaEvents(void *ctx, ...)
+{
+   return 0;
+};
+
+int getBaculaValue(void *ctx, int var, void *value)
+{
+   return 0;
+};
+
+int setBaculaValue(void *ctx, int var, void *value)
+{
+   return 0;
+};
+
+int DebugMessage(void *ctx, const char *file, int line, int level, const char *fmt, ...)
+{
+#ifdef DEBUGMSG
+   printf("DG: %s:%d %s\n", file, line, fmt);
+#endif
+   return 0;
+};
+
+int JobMessage(void *ctx, const char *file, int line, int type, int64_t mtime,
+          const char *fmt, ...)
+{
+#ifdef DEBUGMSG
+   printf("JM: %s:%d <%d> %s\n", file, line, type, fmt);
+#endif
+   return 0;
+};
+
+void *baculaMalloc(void *ctx, const char *file, int line, size_t size)
+{
+   return MALLOC(size);
+};
+
+void baculaFree(void *ctx, const char *file, int line, void *mem)
+{
+   FREE(mem);
+};
+
+/*
+ * displays a short help
+ */
+void print_help(int argc, char *argv[])
+{
+
+   printf("\n"
+     "Usage: bpluginfo [options] <plugin_file.so>\n"
+     "       -v          verbose\n"
+     "       -i          list plugin header information only (default)\n"
+     "       -f          list plugin functions information only\n"
+     "       -a <api>    bacula api version (default %d)\n"
+     "       -h          help screen\n" "\n", DEFAULT_API_VERSION);
+}
+
+/* allocates and resets a main program data variable */
+progdata *allocpdata(void)
+{
+
+   progdata *pdata;
+
+   pdata = (progdata *) bmalloc(sizeof(progdata));
+   ASSERT_MEMORY(pdata);
+   memset(pdata, 0, sizeof(progdata));
+
+   return pdata;
+}
+
+/* releases all allocated program data resources */
+void freepdata(progdata * pdata)
+{
+
+   if (pdata->pluginfile) {
+      FREE(pdata->pluginfile);
+   }
+   FREE(pdata);
+}
+
+/*
+ * parse execution arguments and fills required pdata structure fields
+ *
+ * input:
+ *    pdata - pointer to program data structure
+ *    argc, argv - execution envinroment variables
+ * output:
+ *    pdata - required structure fields
+ *
+ * supported options:
+ * -v    verbose flag
+ * -i    list plugin header info only (default)
+ * -f    list implemented functions only
+ * -a    bacula api version (default 1)
+ * -h    help screen
+ */
+void parse_args(progdata * pdata, int argc, char *argv[])
+{
+
+   int i;
+   char *dirtmp;
+   char *progdir;
+   int api;
+   int s;
+
+   if (argc < 2) {
+      /* TODO - add a real help screen */
+      printf("\nNot enough parameters!\n");
+      print_help(argc, argv);
+      exit(1);
+   }
+
+   if (argc > 5) {
+      /* TODO - add a real help screen */
+      printf("\nToo many parameters!\n");
+      print_help(argc, argv);
+      exit(1);
+   }
+
+   for (i = 1; i < argc; i++) {
+      if (strcmp(argv[i], "-h") == 0) {
+         /* help screen */
+         print_help(argc, argv);
+         exit(0);
+      }
+      if (strcmp(argv[i], "-v") == 0) {
+          /* verbose option */
+          pdata->verbose = 1;
+          continue;
+      }
+      if (strcmp(argv[i], "-f") == 0) {
+         /* functions list */
+         pdata->listfunc = 1;
+         continue;
+      }
+      if (strcmp(argv[i], "-i") == 0) {
+         /* header list */
+         pdata->listinfo = 1;
+         continue;
+      }
+      if (strcmp(argv[i], "-a") == 0) {
+         /* bacula api version */
+         if (i < argc - 1) {
+            s = sscanf(argv[i + 1], "%d", &api);
+            if (s == 1) {
+               pdata->bapiversion = api;
+               i++;
+               continue;
+            }
+         }
+         printf("\nAPI version number required!\n");
+         print_help(argc, argv);
+         exit(1);
+      }
+      if (!pdata->pluginfile) {
+          if (argv[i][0] != '/') {
+             dirtmp = MALLOC(PATH_MAX);
+             ASSERT_MEMORY(dirtmp);
+             progdir = MALLOC(PATH_MAX);
+             ASSERT_MEMORY(progdir);
+             dirtmp = getcwd(dirtmp, PATH_MAX);
+
+             strcat(dirtmp, "/");
+             strcat(dirtmp, argv[i]);
+
+             if (realpath(dirtmp, progdir) == NULL) {
+                /* error in resolving path */
+                FREE(progdir);
+                progdir = bstrdup(argv[i]);
+             }
+             pdata->pluginfile = bstrdup(progdir);
+             FREE(dirtmp);
+             FREE(progdir);
+          } else {
+             pdata->pluginfile = bstrdup(argv[i]);
+          }
+    continue;
+      }
+   }
+}
+
+/*
+ * checks a plugin type based on a plugin magic string
+ *
+ * input:
+ *    pdata - program data with plugin info structure
+ * output:
+ *    int - enum plugintype
+ */
+int getplugintype(progdata * pdata)
+{
+
+   ASSERT_NVAL_RET_V(pdata, ERRORPLUGIN);
+
+   pluginfo *pinfo = pdata->pinfo;
+
+   ASSERT_NVAL_RET_V(pinfo, ERRORPLUGIN);
+
+   if (pinfo->pdirinfo.plugin_magic &&
+       strcmp(pinfo->pdirinfo.plugin_magic, DIR_PLUGIN_MAGIC) == 0) {
+      return DIRPLUGIN;
+   } else
+      if (pinfo->pfdinfo.plugin_magic &&
+     strcmp(pinfo->pfdinfo.plugin_magic, FD_PLUGIN_MAGIC) == 0) {
+      return FDPLUGIN;
+   } else
+      if (pinfo->psdinfo.plugin_magic &&
+     strcmp(pinfo->psdinfo.plugin_magic, SD_PLUGIN_MAGIC) == 0) {
+      return SDPLUGIN;
+   } else {
+      return ERRORPLUGIN;
+   }
+}
+
+/*
+ * prints any available information about a plugin
+ *
+ * input:
+ *    pdata - program data with plugin info structure
+ * output:
+ *    printed info
+ */
+void dump_pluginfo(progdata * pdata)
+{
+
+   ASSERT_NVAL_RET(pdata);
+
+   pluginfo *pinfo = pdata->pinfo;
+
+   ASSERT_NVAL_RET(pinfo);
+
+   plugfuncs *pfuncs = pdata->pfuncs;
+
+   ASSERT_NVAL_RET(pfuncs);
+
+   switch (pdata->bplugtype) {
+   case DIRPLUGIN:
+      printf("\nPlugin type:\t\tBacula Director plugin\n");
+      if (pdata->verbose) {
+         printf("Plugin magic:\t\t%s\n", NPRT(pinfo->pdirinfo.plugin_magic));
+      }
+      printf("Plugin version:\t\t%s\n", pinfo->pdirinfo.plugin_version);
+      printf("Plugin release date:\t%s\n", NPRT(pinfo->pdirinfo.plugin_date));
+      printf("Plugin author:\t\t%s\n", NPRT(pinfo->pdirinfo.plugin_author));
+      printf("Plugin licence:\t\t%s\n", NPRT(pinfo->pdirinfo.plugin_license));
+      printf("Plugin description:\t%s\n", NPRT(pinfo->pdirinfo.plugin_description));
+      printf("Plugin API version:\t%d\n", pinfo->pdirinfo.version);
+      break;
+   case FDPLUGIN:
+      printf("\nPlugin type:\t\tFile Daemon plugin\n");
+      if (pdata->verbose) {
+         printf("Plugin magic:\t\t%s\n", NPRT(pinfo->pfdinfo.plugin_magic));
+      }
+      printf("Plugin version:\t\t%s\n", pinfo->pfdinfo.plugin_version);
+      printf("Plugin release date:\t%s\n", NPRT(pinfo->pfdinfo.plugin_date));
+      printf("Plugin author:\t\t%s\n", NPRT(pinfo->pfdinfo.plugin_author));
+      printf("Plugin licence:\t\t%s\n", NPRT(pinfo->pfdinfo.plugin_license));
+      printf("Plugin description:\t%s\n", NPRT(pinfo->pfdinfo.plugin_description));
+      printf("Plugin API version:\t%d\n", pinfo->pfdinfo.version);
+      break;
+   case SDPLUGIN:
+      printf("\nPlugin type:\t\tBacula Storage plugin\n");
+      if (pdata->verbose) {
+         printf("Plugin magic:\t\t%s\n", NPRT(pinfo->psdinfo.plugin_magic));
+      }
+      printf("Plugin version:\t\t%s\n", pinfo->psdinfo.plugin_version);
+      printf("Plugin release date:\t%s\n", NPRT(pinfo->psdinfo.plugin_date));
+      printf("Plugin author:\t\t%s\n", NPRT(pinfo->psdinfo.plugin_author));
+      printf("Plugin licence:\t\t%s\n", NPRT(pinfo->psdinfo.plugin_license));
+      printf("Plugin description:\t%s\n", NPRT(pinfo->psdinfo.plugin_description));
+      printf("Plugin API version:\t%d\n", pinfo->psdinfo.version);
+      break;
+   default:
+      printf("\nUnknown plugin type or other Error\n\n");
+   }
+}
+
+/*
+ * prints any available information about plugin' functions
+ *
+ * input:
+ *    pdata - program data with plugin info structure
+ * output:
+ *    printed info
+ */
+void dump_plugfuncs(progdata * pdata)
+{
+
+   ASSERT_NVAL_RET(pdata);
+
+   plugfuncs *pfuncs = pdata->pfuncs;
+
+   ASSERT_NVAL_RET(pfuncs);
+
+   printf("\nPlugin functions:\n");
+
+   switch (pdata->bplugtype) {
+   case DIRPLUGIN:
+      if (pdata->verbose) {
+          if (pfuncs->pdirfuncs.newPlugin) {
+             printf(" newPlugin()\n");
+          }
+          if (pfuncs->pdirfuncs.freePlugin) {
+             printf(" freePlugin()\n");
+          }
+      }
+      if (pfuncs->pdirfuncs.getPluginValue) {
+         printf(" getPluginValue()\n");
+      }
+      if (pfuncs->pdirfuncs.setPluginValue) {
+         printf(" setPluginValue()\n");
+      }
+      if (pfuncs->pdirfuncs.handlePluginEvent) {
+         printf(" handlePluginEvent()\n");
+      }
+      break;
+   case FDPLUGIN:
+      if (pdata->verbose) {
+          if (pfuncs->pfdfuncs.newPlugin) {
+             printf(" newPlugin()\n");
+          }
+          if (pfuncs->pfdfuncs.freePlugin) {
+             printf(" freePlugin()\n");
+          }
+      }
+      if (pfuncs->pfdfuncs.getPluginValue) {
+         printf(" getPluginValue()\n");
+      }
+      if (pfuncs->pfdfuncs.setPluginValue) {
+         printf(" setPluginValue()\n");
+      }
+      if (pfuncs->pfdfuncs.handlePluginEvent) {
+         printf(" handlePluginEvent()\n");
+      }
+      if (pfuncs->pfdfuncs.startBackupFile) {
+         printf(" startBackupFile()\n");
+      }
+      if (pfuncs->pfdfuncs.endBackupFile) {
+         printf(" endBackupFile()\n");
+      }
+      if (pfuncs->pfdfuncs.startRestoreFile) {
+         printf(" startRestoreFile()\n");
+      }
+      if (pfuncs->pfdfuncs.endRestoreFile) {
+         printf(" endRestoreFile()\n");
+      }
+      if (pfuncs->pfdfuncs.pluginIO) {
+         printf(" pluginIO()\n");
+      }
+      if (pfuncs->pfdfuncs.createFile) {
+         printf(" createFile()\n");
+      }
+      if (pfuncs->pfdfuncs.setFileAttributes) {
+         printf(" setFileAttributes()\n");
+      }
+      if (pfuncs->pfdfuncs.checkFile) {
+         printf(" checkFile()\n");
+      }
+      break;
+   case SDPLUGIN:
+      if (pdata->verbose) {
+          if (pfuncs->psdfuncs.newPlugin) {
+             printf(" newPlugin()\n");
+          }
+          if (pfuncs->psdfuncs.freePlugin) {
+             printf(" freePlugin()\n");
+          }
+      }
+      if (pfuncs->psdfuncs.getPluginValue) {
+         printf(" getPluginValue()\n");
+      }
+      if (pfuncs->psdfuncs.setPluginValue) {
+         printf(" setPluginValue()\n");
+      }
+      if (pfuncs->psdfuncs.handlePluginEvent) {
+         printf(" handlePluginEvent()\n");
+      }
+      break;
+   default:
+      printf("\nUnknown plugin type or other Error\n\n");
+   }
+}
+
+/*
+ * input parameters:
+ *    argv[0] [options] <plugin_filename.so>
+ *
+ * exit codes:
+ *    0 - success
+ *    1 - cannot load a plugin
+ *    2 - cannot find a loadPlugin function
+ *    3 - cannot find an unloadPlugin function
+ *    10 - not enough memory
+ */
+int main(int argc, char *argv[])
+{
+
+   progdata *pdata;
+   loadPlugin loadplugfunc;
+   unloadPlugin unloadplugfunc;
+   baculafuncs bfuncs = {
+      sizeof(bfuncs),
+      1,
+      registerBaculaEvents,
+      getBaculaValue,
+      setBaculaValue,
+      JobMessage,
+      DebugMessage,
+      baculaMalloc,
+      baculaFree,
+   };
+   baculainfos binfos;
+
+   pdata = allocpdata();
+   parse_args(pdata, argc, argv);
+
+   binfos.bfdinfo.size = sizeof(binfos);
+   binfos.bfdinfo.version = DEFAULT_API_VERSION;
+
+   pdata->pluginhandle = dlopen(pdata->pluginfile, RTLD_LAZY);
+   if (pdata->pluginhandle == NULL) {
+      printf("\nCannot load a plugin: %s\n\n", dlerror());
+      freepdata(pdata);
+      exit(1);
+   }
+
+   loadplugfunc = (loadPlugin) dlsym(pdata->pluginhandle, "loadPlugin");
+   if (loadplugfunc == NULL) {
+      printf("\nCannot find loadPlugin function: %s\n", dlerror());
+      printf("\nWhether the file is a really Bacula plugin?\n\n");
+      freepdata(pdata);
+      exit(2);
+   }
+
+   unloadplugfunc = (unloadPlugin) dlsym(pdata->pluginhandle, "unloadPlugin");
+   if (unloadplugfunc == NULL) {
+      printf("\nCannot find unloadPlugin function: %s\n", dlerror());
+      printf("\nWhether the file is a really Bacula plugin?\n\n");
+      freepdata(pdata);
+      exit(3);
+   }
+
+   if (pdata->bapiversion > 0) {
+      binfos.bdirinfo.version = pdata->bapiversion;
+   }
+
+   loadplugfunc(&binfos, &bfuncs, (void **)&pdata->pinfo, (void **)&pdata->pfuncs);
+
+   pdata->bplugtype = getplugintype(pdata);
+
+   if (!pdata->listfunc) {
+      dump_pluginfo(pdata);
+   }
+   if ((!pdata->listinfo && pdata->listfunc) || pdata->verbose) {
+      dump_plugfuncs(pdata);
+   }
+   printf("\n");
+
+   unloadplugfunc();
+
+   dlclose(pdata->pluginhandle);
+
+   freepdata(pdata);
+
+   return 0;
+}
diff --git a/src/version.h b/src/version.h
index 48265be..677a81f 100644
--- a/src/version.h
+++ b/src/version.h
@@ -6,8 +6,8 @@
 
 /* Note: there can be only *one* VERSION in this file */
 #define VERSION "7.2.0"
-#define BDATE   "14 August 2015"
-#define LSMDATE "14Aug15"
+#define BDATE   "17 November 2015"
+#define LSMDATE "17Nov15"
 
 #define RELEASE 1   /* Use ONLY in rpms */
 
@@ -15,6 +15,12 @@
 #define BYEAR "2015"       /* year for copyright messages in progs */
 
 /*
+ * Versions of packages needed to build Bacula components
+ */
+#define DEPKGS_QT_VERSION  "01Jan13"
+#define DEPKGS_VERSION     "26Jun14"
+
+/*
    Bacula(R) - The Network Backup Solution
 
    Copyright (C) 2000-2015 Kern Sibbald
diff --git a/updatedb/update_mysql_tables.in b/updatedb/update_mysql_tables.in
index a800011..4ae0513 100644
--- a/updatedb/update_mysql_tables.in
+++ b/updatedb/update_mysql_tables.in
@@ -9,8 +9,8 @@
 echo " "
 echo "This script will update a Bacula MySQL database from version 12-14 to 15"
 echo " "
-echo "Depending on the current version of your catalog, you may have to run this script"
-echo "	multiple times"
+echo "Depending on the current version of your catalog,"
+echo "you may have to run this script multiple times."
 echo " "
 
 bindir=@MYSQL_BINDIR@
@@ -116,10 +116,10 @@ CREATE TABLE Snapshot (
   SnapshotId	  INTEGER UNSIGNED AUTO_INCREMENT,
   Name		  TINYBLOB NOT NULL,
   JobId 	  INTEGER UNSIGNED DEFAULT 0,
-  FileSetId INTEGER UNSIGNED DEFAULT 0;
+  FileSetId	  INTEGER UNSIGNED DEFAULT 0,
   CreateTDate	  BIGINT   NOT NULL,
   CreateDate	  DATETIME NOT NULL,
-  ClientId	  INTEGER DEFAULT 0,
+  ClientId	  INTEGER UNSIGNED DEFAULT 0,
   Volume	  TINYBLOB NOT NULL,
   Device	  TINYBLOB NOT NULL,
   Type		  TINYBLOB NOT NULL,
diff --git a/updatedb/update_postgresql_tables.in b/updatedb/update_postgresql_tables.in
index 6681046..c3db92a 100644
--- a/updatedb/update_postgresql_tables.in
+++ b/updatedb/update_postgresql_tables.in
@@ -3,14 +3,14 @@
 # Copyright (C) 2000-2015 Kern Sibbald
 # License: BSD 2-Clause; see file LICENSE-FOSS
 #
-# Shell script to update MySQL tables from Bacula Community version 
+# Shell script to update PostgreSQL tables from Bacula Community version 
 #  5.0.x, 5.2.x, 7.0.x
 #
 echo " "
-echo "This script will update a Bacula MySQL database from version 12-14 to 15"
+echo "This script will update a Bacula PostgreSQL database from version 12-14 to 15"
 echo " "
-echo "Depending on the current version of your catalog, you may have to run this script"
-echo "	multiple times"
+echo "Depending on the current version of your catalog,"
+echo "you may have to run this script multiple times."
 echo " "
 
 bindir=@POSTGRESQL_BINDIR@

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git



More information about the pkg-bacula-commits mailing list