pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils



Module Name:    pkgsrc
Committed By:   markd
Date:           Thu Feb  7 11:29:32 UTC 2019

Modified Files:
        pkgsrc/sysutils/bacula: Makefile Makefile.common PLIST.common
            PLIST.server distinfo
        pkgsrc/sysutils/bacula-clientonly: Makefile
        pkgsrc/sysutils/bacula-qt-console: Makefile
        pkgsrc/sysutils/bacula-tray-monitor: Makefile
        pkgsrc/sysutils/bacula/patches: patch-configure
            patch-src_console_conio.c patch-src_dird_Makefile.in
            patch-src_filed_Makefile.in patch-src_findlib_attribs.c
            patch-src_stored_Makefile.in patch-src_tools_Makefile.in
Added Files:
        pkgsrc/sysutils/bacula-qt5-console: DESCR Makefile PLIST
        pkgsrc/sysutils/bacula-tray-monitor-qt5: DESCR Makefile PLIST
        pkgsrc/sysutils/bacula/patches: patch-scripts_baculabackupreport.in
            patch-src_console_Makefile.in patch-src_filed_bxattr.c
            patch-src_filed_bxattr__netbsd.c patch-src_filed_bxattr__netbsd.h
            patch-src_qt-console_tray-monitor_tray-monitor.pro.in
Removed Files:
        pkgsrc/sysutils/bacula-wx-console: DESCR Makefile PLIST
        pkgsrc/sysutils/bacula/patches: patch-ah patch-ai patch-am
            patch-src_lib_md5.c patch-src_plugins_fd_fd__common.h

Log Message:
bacula{,-qt*-console,-tray-monitor*}: update to 9.4.1

7 years worth of updates.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 pkgsrc/sysutils/bacula/Makefile
cvs rdiff -u -r1.67 -r1.68 pkgsrc/sysutils/bacula/Makefile.common
cvs rdiff -u -r1.18 -r1.19 pkgsrc/sysutils/bacula/PLIST.common
cvs rdiff -u -r1.13 -r1.14 pkgsrc/sysutils/bacula/PLIST.server
cvs rdiff -u -r1.52 -r1.53 pkgsrc/sysutils/bacula/distinfo
cvs rdiff -u -r1.26 -r1.27 pkgsrc/sysutils/bacula-clientonly/Makefile
cvs rdiff -u -r1.36 -r1.37 pkgsrc/sysutils/bacula-qt-console/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/bacula-qt5-console/DESCR \
    pkgsrc/sysutils/bacula-qt5-console/Makefile \
    pkgsrc/sysutils/bacula-qt5-console/PLIST
cvs rdiff -u -r1.44 -r1.45 pkgsrc/sysutils/bacula-tray-monitor/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/bacula-tray-monitor-qt5/DESCR \
    pkgsrc/sysutils/bacula-tray-monitor-qt5/Makefile \
    pkgsrc/sysutils/bacula-tray-monitor-qt5/PLIST
cvs rdiff -u -r1.1.1.1 -r0 pkgsrc/sysutils/bacula-wx-console/DESCR
cvs rdiff -u -r1.48 -r0 pkgsrc/sysutils/bacula-wx-console/Makefile
cvs rdiff -u -r1.3 -r0 pkgsrc/sysutils/bacula-wx-console/PLIST
cvs rdiff -u -r1.9 -r0 pkgsrc/sysutils/bacula/patches/patch-ah
cvs rdiff -u -r1.6 -r0 pkgsrc/sysutils/bacula/patches/patch-ai
cvs rdiff -u -r1.3 -r0 pkgsrc/sysutils/bacula/patches/patch-am
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/bacula/patches/patch-configure \
    pkgsrc/sysutils/bacula/patches/patch-src_dird_Makefile.in \
    pkgsrc/sysutils/bacula/patches/patch-src_filed_Makefile.in \
    pkgsrc/sysutils/bacula/patches/patch-src_findlib_attribs.c \
    pkgsrc/sysutils/bacula/patches/patch-src_stored_Makefile.in
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/sysutils/bacula/patches/patch-scripts_baculabackupreport.in \
    pkgsrc/sysutils/bacula/patches/patch-src_console_Makefile.in \
    pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr.c \
    pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr__netbsd.c \
    pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr__netbsd.h \
    pkgsrc/sysutils/bacula/patches/patch-src_qt-console_tray-monitor_tray-monitor.pro.in
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/sysutils/bacula/patches/patch-src_console_conio.c
cvs rdiff -u -r1.1 -r0 pkgsrc/sysutils/bacula/patches/patch-src_lib_md5.c \
    pkgsrc/sysutils/bacula/patches/patch-src_plugins_fd_fd__common.h
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/sysutils/bacula/patches/patch-src_tools_Makefile.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/bacula/Makefile
diff -u pkgsrc/sysutils/bacula/Makefile:1.77 pkgsrc/sysutils/bacula/Makefile:1.78
--- pkgsrc/sysutils/bacula/Makefile:1.77        Sun Dec  9 18:52:45 2018
+++ pkgsrc/sysutils/bacula/Makefile     Thu Feb  7 11:29:31 2019
@@ -1,6 +1,4 @@
-# $NetBSD: Makefile,v 1.77 2018/12/09 18:52:45 adam Exp $
-
-PKGREVISION=           21
+# $NetBSD: Makefile,v 1.78 2019/02/07 11:29:31 markd Exp $
 
 CONFLICTS+=            bacula-client-[0-9]* bacula-clientonly-[0-9]*
 

Index: pkgsrc/sysutils/bacula/Makefile.common
diff -u pkgsrc/sysutils/bacula/Makefile.common:1.67 pkgsrc/sysutils/bacula/Makefile.common:1.68
--- pkgsrc/sysutils/bacula/Makefile.common:1.67 Fri Feb 26 10:24:10 2016
+++ pkgsrc/sysutils/bacula/Makefile.common      Thu Feb  7 11:29:31 2019
@@ -1,11 +1,12 @@
-# $NetBSD: Makefile.common,v 1.67 2016/02/26 10:24:10 jperkin Exp $
+# $NetBSD: Makefile.common,v 1.68 2019/02/07 11:29:31 markd Exp $
 #
 # used by sysutils/bacula-clientonly/Makefile
 # used by sysutils/bacula-tray-monitor/Makefile
-# used by sysutils/bacula-wx-console/Makefile
+# used by sysutils/bacula-tray-monitor-qt5/Makefile
 # used by sysutils/bacula-qt-console/Makefile
+# used by sysutils/bacula-qt5-console/Makefile
 
-DISTNAME=      bacula-5.2.13
+DISTNAME=      bacula-9.4.1
 CATEGORIES=    sysutils
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=bacula/}
 
@@ -51,9 +52,6 @@ SUBST_FILES.egdir=    src/dird/Makefile.in
 SUBST_FILES.egdir+=    src/console/Makefile.in
 SUBST_FILES.egdir+=    src/filed/Makefile.in
 SUBST_FILES.egdir+=    src/stored/Makefile.in
-SUBST_FILES.egdir+=    src/gnome2-console/Makefile.in
-SUBST_FILES.egdir+=    src/wx-console/Makefile.in
-SUBST_FILES.egdir+=    src/tray-monitor/Makefile.in
 SUBST_SED.egdir=       -e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g'
 
 SUBST_CLASSES+=                fixwrap
@@ -79,5 +77,6 @@ EXAMPLESDIR=          ${PREFIX}/share/examples/b
 INSTALLATION_DIRS+=    ${EXAMPLESDIR}
 
 .include "../../mk/readline.buildlink3.mk"
+.include "../../archivers/lzo/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"

Index: pkgsrc/sysutils/bacula/PLIST.common
diff -u pkgsrc/sysutils/bacula/PLIST.common:1.18 pkgsrc/sysutils/bacula/PLIST.common:1.19
--- pkgsrc/sysutils/bacula/PLIST.common:1.18    Tue Mar 11 14:05:14 2014
+++ pkgsrc/sysutils/bacula/PLIST.common Thu Feb  7 11:29:31 2019
@@ -1,24 +1,25 @@
-@comment $NetBSD: PLIST.common,v 1.18 2014/03/11 14:05:14 jperkin Exp $
+@comment $NetBSD: PLIST.common,v 1.19 2019/02/07 11:29:31 markd Exp $
 lib/bpipe-fd.la
 lib/libbac.la
 lib/libbaccfg.la
 lib/libbacfind.la
-lib/libbacpy.la
 libexec/bacula/bacula
 libexec/bacula/bacula-ctl-dir
 libexec/bacula/bacula-ctl-fd
 libexec/bacula/bacula-ctl-sd
+libexec/bacula/bacula-tray-monitor.desktop
 libexec/bacula/bacula_config
+libexec/bacula/baculabackupreport
 libexec/bacula/bconsole
 libexec/bacula/btraceback.dbx
 libexec/bacula/btraceback.gdb
 libexec/bacula/btraceback.mdb
 libexec/bacula/disk-changer
+libexec/bacula/isworm
 libexec/bacula/mtx-changer
 libexec/bacula/mtx-changer.conf
 libexec/bacula/query.sql
-man/man1/bacula-bwxconsole.1
-man/man1/bacula-tray-monitor.1
+libexec/bacula/tapealert
 man/man1/bat.1
 man/man1/bsmtp.1
 man/man8/bacula-dir.8
@@ -37,14 +38,17 @@ man/man8/bwild.8
 man/man8/dbcheck.8
 sbin/bacula
 sbin/bacula-fd
+sbin/bbconsjson
 sbin/bconsole
+sbin/bfdjson
 sbin/btraceback
 share/doc/bacula/ChangeLog
 share/doc/bacula/INSTALL
 share/doc/bacula/LICENSE
+share/doc/bacula/LICENSE-FAQ
+share/doc/bacula/LICENSE-FOSS
 share/doc/bacula/README
 share/doc/bacula/ReleaseNotes
 share/doc/bacula/VERIFYING
-share/doc/bacula/technotes
 share/examples/bacula/bacula-fd.conf
 share/examples/bacula/bconsole.conf

Index: pkgsrc/sysutils/bacula/PLIST.server
diff -u pkgsrc/sysutils/bacula/PLIST.server:1.13 pkgsrc/sysutils/bacula/PLIST.server:1.14
--- pkgsrc/sysutils/bacula/PLIST.server:1.13    Tue Mar 11 14:05:14 2014
+++ pkgsrc/sysutils/bacula/PLIST.server Thu Feb  7 11:29:31 2019
@@ -1,6 +1,7 @@
-@comment $NetBSD: PLIST.server,v 1.13 2014/03/11 14:05:14 jperkin Exp $
+@comment $NetBSD: PLIST.server,v 1.14 2019/02/07 11:29:31 markd Exp $
 lib/libbaccats.la
 lib/libbaccats-${BACULA_DB}.la
+lib/libbacsd.la
 lib/libbacsql.la
 libexec/bacula/chio-changer
 libexec/bacula/create_${BACULA_DB}_database
@@ -21,10 +22,12 @@ libexec/bacula/update_bacula_tables
 sbin/bacula-dir
 sbin/bacula-sd
 sbin/bcopy
+sbin/bdirjson
 sbin/bextract
 sbin/bls
 sbin/bregex
 sbin/bscan
+sbin/bsdjson
 sbin/bsmtp
 sbin/btape
 sbin/bwild

Index: pkgsrc/sysutils/bacula/distinfo
diff -u pkgsrc/sysutils/bacula/distinfo:1.52 pkgsrc/sysutils/bacula/distinfo:1.53
--- pkgsrc/sysutils/bacula/distinfo:1.52        Wed Nov  4 01:32:06 2015
+++ pkgsrc/sysutils/bacula/distinfo     Thu Feb  7 11:29:31 2019
@@ -1,25 +1,25 @@
-$NetBSD: distinfo,v 1.52 2015/11/04 01:32:06 agc Exp $
+$NetBSD: distinfo,v 1.53 2019/02/07 11:29:31 markd Exp $
 
-SHA1 (bacula-5.2.13.tar.gz) = 30b1eb2efb515138807163d046f675eaa29fad1c
-RMD160 (bacula-5.2.13.tar.gz) = bcc168143c0eec5cb5e983f765935534379f4fcf
-SHA512 (bacula-5.2.13.tar.gz) = dfdff353f5b6ed4d85013dc292526706bbd67066f7057a114012172926c819c8df1eb8779166d5a90db3a49a5584f0a8daf7566cc93cf4fa3f1bdda245b55cf0
-Size (bacula-5.2.13.tar.gz) = 4243395 bytes
-SHA1 (patch-ac) = 4ba89bcf49ce82b527edc789e2b17a781cb8622e
+SHA1 (bacula-9.4.1.tar.gz) = a8094933d081b63cf8d9781c930d70200375fc04
+RMD160 (bacula-9.4.1.tar.gz) = 64851aada491ea13e4e1b6a08466a6360621a95c
+SHA512 (bacula-9.4.1.tar.gz) = 5e05a939c5f457a121879a6108ce2ac6403dde556b415af4e5013e4f100cf4d878f3d468fd680fa1633a4c8d6ce3d7a6ed351a1600ef780166cd4be9b70191ee
+Size (bacula-9.4.1.tar.gz) = 4162956 bytes
 SHA1 (patch-ad) = ce6bc29858d13dff1a0301db95f9bfedf3e66b01
-SHA1 (patch-ah) = 06452df1449ed6f06af00ed2cf9d736c40044dfb
-SHA1 (patch-ai) = 388e075e7ec54fb377ee9dbe8338c667efb256ee
 SHA1 (patch-aj) = 125d1503406474fec32e737068328cdfa718f5c2
-SHA1 (patch-am) = 28536d3f0de81940773749c3704ad7aca86d374d
-SHA1 (patch-configure) = 710d6e4370099a5d6d23d1297864af01abcdae83
+SHA1 (patch-configure) = 94e6714a6d19ae07c1141c59702b546e595e0bb1
+SHA1 (patch-scripts_baculabackupreport.in) = 58047124ad82dd5d0f2aa786251ba012ae7f07b0
 SHA1 (patch-src_bacula.h) = 74fed45f9d441a132f113fdfd783b8f5bb077885
-SHA1 (patch-src_console_conio.c) = bfec27296d145ab94c305cc5ffca7f892c14303e
-SHA1 (patch-src_dird_Makefile.in) = fdce18aca972f26f16af90283756cd5bf5ad5831
-SHA1 (patch-src_filed_Makefile.in) = c88ee648ef33c3f7c3a02b77b1d3fc3da8da088d
-SHA1 (patch-src_findlib_attribs.c) = a0917e500d7e937164cf59917cabd992512acd1d
+SHA1 (patch-src_console_Makefile.in) = f997b8f8bc8c7cca5b06a8f046558951caa14094
+SHA1 (patch-src_console_conio.c) = 92445b01e2ad17de5215315df916f1f1bd45108b
+SHA1 (patch-src_dird_Makefile.in) = 0f088f3af4bcacb260fb50124723babd69f5caee
+SHA1 (patch-src_filed_Makefile.in) = 237c8ccf0750ef33223664e316a0533fc260371a
+SHA1 (patch-src_filed_bxattr.c) = 2689b8bb6f5ddf14d7253e45353c5a40e5e9867e
+SHA1 (patch-src_filed_bxattr__netbsd.c) = bc2a0417c852b76ddc4324c39ae5f6ec0387ab30
+SHA1 (patch-src_filed_bxattr__netbsd.h) = 791a2da696da049a6091c4c460aec0bd00dfa5ff
+SHA1 (patch-src_findlib_attribs.c) = f3665a012e3a0cc06ff2c9ab922324b1df3b2819
 SHA1 (patch-src_lib_attr.c) = 287851ff2ce2a0868d597cf1d7471a6766f6f7c1
-SHA1 (patch-src_lib_md5.c) = a359bb9988538f02d5a14bf3ddac23f7ea64bea6
 SHA1 (patch-src_plugins_fd_Makefile.in) = f1316cdbb66d9bc55d8adbd4b0bbde01443ccd2e
-SHA1 (patch-src_plugins_fd_fd__common.h) = 7c8419d4fa7f1fe8a07e2bc2720a4903ff324135
 SHA1 (patch-src_qt-console_bat.pro.in) = 8df9381c0b35b5a3dcd237f8c017ae21d88c79ad
-SHA1 (patch-src_stored_Makefile.in) = 5bee8ea8a7c288a1e4baf372ef79da34c9e35284
-SHA1 (patch-src_tools_Makefile.in) = dca0472c31ced76b8d5a357ef968ddc3f93faf5b
+SHA1 (patch-src_qt-console_tray-monitor_tray-monitor.pro.in) = 83b48b321de88aa766aa2fc082c95a3a8665981d
+SHA1 (patch-src_stored_Makefile.in) = 2c1a2b095593f88649bd0dc21f03cfbd24894fb5
+SHA1 (patch-src_tools_Makefile.in) = f53379b99b11b673ac1d0b8ed7ff64614def49b5

Index: pkgsrc/sysutils/bacula-clientonly/Makefile
diff -u pkgsrc/sysutils/bacula-clientonly/Makefile:1.26 pkgsrc/sysutils/bacula-clientonly/Makefile:1.27
--- pkgsrc/sysutils/bacula-clientonly/Makefile:1.26     Sat Mar  5 11:29:28 2016
+++ pkgsrc/sysutils/bacula-clientonly/Makefile  Thu Feb  7 11:29:31 2019
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.26 2016/03/05 11:29:28 jperkin Exp $
+# $NetBSD: Makefile,v 1.27 2019/02/07 11:29:31 markd Exp $
 
 PKGNAME=               ${DISTNAME:S/-/-clientonly-/}
-PKGREVISION=           3
 COMMENT=               The Network Backup Solution (client only)
 
 CONFLICTS=             bacula-[0-9]* bacula-client-[0-9]*

Index: pkgsrc/sysutils/bacula-qt-console/Makefile
diff -u pkgsrc/sysutils/bacula-qt-console/Makefile:1.36 pkgsrc/sysutils/bacula-qt-console/Makefile:1.37
--- pkgsrc/sysutils/bacula-qt-console/Makefile:1.36     Mon Mar 12 11:17:31 2018
+++ pkgsrc/sysutils/bacula-qt-console/Makefile  Thu Feb  7 11:29:31 2019
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.36 2018/03/12 11:17:31 wiz Exp $
+# $NetBSD: Makefile,v 1.37 2019/02/07 11:29:31 markd Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-qt-console-/}
-PKGREVISION=   4
 COMMENT=       Qt-based console for Bacula - The Network Backup Solution
 
 DISTINFO_FILE=         ${.CURDIR}/../../sysutils/bacula/distinfo
@@ -11,6 +10,8 @@ USE_TOOLS+=           gmake pkg-config
 CONFIGURE_ARGS+=       --enable-client-only
 CONFIGURE_ARGS+=       --enable-bat
 
+BUILDLINK_TRANSFORM+=  opt:-std=c++98:-std=gnu++98 # typeof
+
 BUILD_DIRS=            src/qt-console
 
 INSTALLATION_DIRS=     bin share/examples/bacula

Index: pkgsrc/sysutils/bacula-tray-monitor/Makefile
diff -u pkgsrc/sysutils/bacula-tray-monitor/Makefile:1.44 pkgsrc/sysutils/bacula-tray-monitor/Makefile:1.45
--- pkgsrc/sysutils/bacula-tray-monitor/Makefile:1.44   Wed Nov 14 22:22:22 2018
+++ pkgsrc/sysutils/bacula-tray-monitor/Makefile        Thu Feb  7 11:29:31 2019
@@ -1,23 +1,28 @@
-# $NetBSD: Makefile,v 1.44 2018/11/14 22:22:22 kleink Exp $
+# $NetBSD: Makefile,v 1.45 2019/02/07 11:29:31 markd Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-tray-monitor-/}
-PKGREVISION=   10
 COMMENT=       System tray monitor for Bacula - The Network Backup Solution
 
 DISTINFO_FILE=         ${.CURDIR}/../../sysutils/bacula/distinfo
 PATCHDIR=              ${.CURDIR}/../../sysutils/bacula/patches
 
-USE_TOOLS+=            pkg-config
+USE_TOOLS+=            gmake pkg-config
 CONFIGURE_ARGS+=       --enable-client-only
-CONFIGURE_ARGS+=       --enable-tray-monitor
+CONFIGURE_ARGS+=       --enable-bat
 
-BUILD_DIRS=            src/lib
-BUILD_DIRS+=           src/tray-monitor
-INSTALL_DIRS=          src/tray-monitor
+BUILDLINK_TRANSFORM+=  opt:-std=c++98:-std=gnu++98 # typeof
 
-INSTALLATION_DIRS=     sbin share/examples/bacula
+BUILD_DIRS=            src/qt-console/tray-monitor
+
+INSTALLATION_DIRS=     bin share/examples/bacula
+
+CONF_FILES+=           ${EXAMPLESDIR}/tray-monitor.conf ${PKG_SYSCONFDIR}/tray-monitor.conf
+
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/src/qt-console/tray-monitor/tray-monitor.conf ${DESTDIR}${EXAMPLESDIR}
 
 .include "../../sysutils/bacula/Makefile.common"
 .include "../../sysutils/bacula/buildlink3.mk"
-.include "../../x11/gtk2/buildlink3.mk"
+.include "../../x11/qt4-libs/buildlink3.mk"
+.include "../../x11/qt4-tools/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/sysutils/bacula/patches/patch-configure
diff -u pkgsrc/sysutils/bacula/patches/patch-configure:1.1 pkgsrc/sysutils/bacula/patches/patch-configure:1.2
--- pkgsrc/sysutils/bacula/patches/patch-configure:1.1  Sat Oct  6 17:54:53 2012
+++ pkgsrc/sysutils/bacula/patches/patch-configure      Thu Feb  7 11:29:31 2019
@@ -1,17 +1,16 @@
-$NetBSD: patch-configure,v 1.1 2012/10/06 17:54:53 christos Exp $
+$NetBSD: patch-configure,v 1.2 2019/02/07 11:29:31 markd Exp $
 
-use ${PREFIX} and ${PYVERSSUFFIX} instead of hunting down possible installs
+NetBSD has xattr
 
---- configure.orig     2012-09-13 04:51:19.000000000 -0400
-+++ configure  2012-10-04 23:54:29.000000000 -0400
-@@ -22717,8 +22717,8 @@
-               PYTHON_INCDIR=`/usr/bin/python-config --includes`
-               PYTHON_LIBS=`/usr/bin/python-config --libs`
-            else
--              for python_root in /usr /usr/local /usr/sfw; do
--                 for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python2.7 python3; do
-+              for python_root in ${PREFIX}; do
-+                 for ver in python${PYVERSSUFFIX}; do
-                     if test -f $python_root/include/${ver}/Python.h; then
-                        PYTHON_INCDIR=-I$python_root/include/${ver}
-                        if test -d $python_root/lib64/${ver}/config; then
+--- configure.orig     2018-12-21 08:40:51.000000000 +0000
++++ configure
+@@ -30658,6 +30658,9 @@ $as_echo "#define HAVE_XATTR 1" >>confde
+        if test x${HAVE_FREEBSD_OS_TRUE} = x; then
+           XATTROBJS="bxattr.c bxattr_freebsd.c"
+        fi
++       if test x${HAVE_NETBSD_OS_TRUE} = x; then
++          XATTROBJS="bxattr.c bxattr_netbsd.c"
++       fi
+        if test x${HAVE_DARWIN_OS_TRUE} = x; then
+           XATTROBJS="bxattr.c bxattr_osx.c"
+        fi
Index: pkgsrc/sysutils/bacula/patches/patch-src_dird_Makefile.in
diff -u pkgsrc/sysutils/bacula/patches/patch-src_dird_Makefile.in:1.1 pkgsrc/sysutils/bacula/patches/patch-src_dird_Makefile.in:1.2
--- pkgsrc/sysutils/bacula/patches/patch-src_dird_Makefile.in:1.1       Sat Oct  6 17:54:53 2012
+++ pkgsrc/sysutils/bacula/patches/patch-src_dird_Makefile.in   Thu Feb  7 11:29:31 2019
@@ -1,33 +1,41 @@
-$NetBSD: patch-src_dird_Makefile.in,v 1.1 2012/10/06 17:54:53 christos Exp $
+$NetBSD: patch-src_dird_Makefile.in,v 1.2 2019/02/07 11:29:31 markd Exp $
 
 - use %%EXAMPLESDIR%% instead of sysconfdir
 - use the .la files for linking
 
---- src/dird/Makefile.in.orig  2012-09-13 04:51:19.000000000 -0400
-+++ src/dird/Makefile.in       2012-10-05 11:02:06.000000000 -0400
-@@ -69,14 +69,14 @@
+--- src/dird/Makefile.in.orig  2018-12-21 08:40:51.000000000 +0000
++++ src/dird/Makefile.in
+@@ -70,21 +70,21 @@ bacula-dir: Makefile $(SVROBJS) ../lib/l
            ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
        @echo "Linking $@ ..."
-       $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
--            -lbacfind -lbacsql -lbaccats -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \
-+            ../findlib/libbacfind.la ../cats/libbacsql.la ../cats/libbaccats.la ../lib/libbacpy.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \
+       $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) $(ZLIBS) \
+-            -lbacfind -lbacsql -lbaccats -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
++            ../findlib/libbacfind.la ../cats/libbacsql.la ../cats/libbaccats.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(DLIB) $(DB_LIBS) $(LIBS) \
              $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
  
  static-bacula-dir:  Makefile $(SVROBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
-                  ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
+                  ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
                   ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
-       $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
--            -lbacfind -lbacsql -lbaccats -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \
-+            ../findlib/libbacfind.la ../cats/libbacsql.la ../cats/libbaccats.la ../lib/libbacpy.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \
+       $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) $(ZLIBS) \
+-            -lbacfind -lbacsql -lbaccats -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
++            ../findlib/libbacfind.la ../cats/libbacsql.la ../cats/libbaccats.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(DLIB) $(DB_LIBS) $(LIBS) \
              $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
        strip $@
  
-@@ -105,16 +105,16 @@
- install: all
+ bdirjson: Makefile $(JSONOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+       @echo "Linking $@ ..."
+       $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib  -o $@ $(JSONOBJS) \
+-            -lbaccfg -lbac -lm $(DLIB) $(DB_LIBS) $(LIBS) \
++            ../lib/libbaccfg.la ../lib/libbac.la -lm $(DLIB) $(DB_LIBS) $(LIBS) \
+             $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
+ 
+ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
+@@ -113,16 +113,16 @@ install: all
        $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
+       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bdirjson $(DESTDIR)$(sbindir)/bdirjson
        @srcconf=bacula-dir.conf; \
--         if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
-+         if  test -f ${DESTDIR}%%EXAMPLESDIR%%/$$srcconf; then \
+-         if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
++         if test -f ${DESTDIR}%%EXAMPLESDIR%%/$$srcconf; then \
              destconf=$$srcconf.new; \
              echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
           else \
@@ -37,16 +45,16 @@ $NetBSD: patch-src_dird_Makefile.in,v 1.
 -         ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
 +         echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}%%EXAMPLESDIR%%/$$destconf"; \
 +         ${INSTALL_CONFIG} $$srcconf ${DESTDIR}%%EXAMPLESDIR%%/$$destconf
-          @if test "x${dir_group}" != "x"; then \
+          @if test "x${dir_group}" != "x" -a "x${DESTDIR}" = "x" ; then \
 -            chgrp -f ${dir_group} ${DESTDIR}${sysconfdir}/$$destconf ; \
 +            chgrp -f ${dir_group} ${DESTDIR}%%EXAMPLESDIR%%/$$destconf ; \
           fi
-       @if  test -f ${DESTDIR}${scriptdir}/query.sql; then \
+       @if test -f ${DESTDIR}${scriptdir}/query.sql; then \
           echo "  ==> Saving existing query.sql to query.sql.old"; \
-@@ -128,7 +128,7 @@
+@@ -136,7 +136,7 @@ install: all
  
  uninstall:
-       (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir)
+       (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir bdirjson)
 -      (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf bacula-dir.conf.new)
 +      (cd $(DESTDIR)%%EXAMPLESDIR%%; $(RMF) bacula-dir.conf bacula-dir.conf.new)
        (cd $(DESTDIR)$(scriptdir); $(RMF) query.sql)
Index: pkgsrc/sysutils/bacula/patches/patch-src_filed_Makefile.in
diff -u pkgsrc/sysutils/bacula/patches/patch-src_filed_Makefile.in:1.1 pkgsrc/sysutils/bacula/patches/patch-src_filed_Makefile.in:1.2
--- pkgsrc/sysutils/bacula/patches/patch-src_filed_Makefile.in:1.1      Sat Oct  6 17:54:53 2012
+++ pkgsrc/sysutils/bacula/patches/patch-src_filed_Makefile.in  Thu Feb  7 11:29:31 2019
@@ -1,28 +1,35 @@
-$NetBSD: patch-src_filed_Makefile.in,v 1.1 2012/10/06 17:54:53 christos Exp $
+$NetBSD: patch-src_filed_Makefile.in,v 1.2 2019/02/07 11:29:31 markd Exp $
 
 - use %%EXAMPLESDIR%% instead of sysconfdir
 - use the .la files for linking
 
---- src/filed/Makefile.in.orig 2012-09-13 04:51:19.000000000 -0400
-+++ src/filed/Makefile.in      2012-10-05 11:15:25.000000000 -0400
-@@ -96,12 +96,12 @@
- bacula-fd:  Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) 
@WIN32@
+--- src/filed/Makefile.in.orig 2018-12-21 08:40:51.000000000 +0000
++++ src/filed/Makefile.in
+@@ -103,18 +103,18 @@ win32:   $(WIN32OBJS)
+ bacula-fd:  Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
        @echo "Linking $@ ..."
        $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
--        $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(LIBS) \
-+        $(WIN32LIBS) $(FDLIBS) $(ZLIBS) ../findlib/libbacfind.la ../lib/libbacpy.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(PYTHON_LIBS) $(LIBS) \
-         $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZOLIBS)
+-        $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
++        $(WIN32LIBS) $(FDLIBS) $(ZLIBS) ../findlib/libbacfind.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(LIBS) \
+         $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
  
- static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
+ bfdjson:  Makefile $(JSONOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
+       @echo "Linking $@ ..."
+       $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(JSONOBJS) \
+-        $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
++        $(WIN32LIBS) $(FDLIBS) $(ZLIBS) ../findlib/libbacfind.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(LIBS) \
+         $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
+ 
+ static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
        $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
--         $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(LIBS) \
-+        $(WIN32LIBS) $(FDLIBS) $(ZLIBS) ../findlib/libbacfind.la ../lib/libbacpy.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(PYTHON_LIBS) $(LIBS) \
-          $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZOLIBS)
+-         $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
++         $(WIN32LIBS) $(FDLIBS) $(ZLIBS) ../findlib/libbacfind.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(LIBS) \
+          $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
        strip $@
  
-@@ -139,16 +139,16 @@
- install: all
-       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd 
+@@ -153,16 +153,16 @@ install: all
+       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd
+       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bfdjson $(DESTDIR)$(sbindir)/bfdjson
        @srcconf=bacula-fd.conf; \
 -      if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
 +      if  test -f ${DESTDIR}%%EXAMPLESDIR%%/$$srcconf; then \
@@ -35,7 +42,7 @@ $NetBSD: patch-src_filed_Makefile.in,v 1
 -      ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
 +      echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}%%EXAMPLESDIR%%/$$destconf"; \
 +      ${INSTALL_CONFIG} $$srcconf ${DESTDIR}%%EXAMPLESDIR%%/$$destconf
-       @if test "x${fd_group}" != "x"; then \
+       @if test "x${fd_group}" != "x" -a "x${DESTDIR}" = "x" ; then \
 -         chgrp -f ${fd_group} ${DESTDIR}${sysconfdir}/$$destconf ; \
 +         chgrp -f ${fd_group} ${DESTDIR}%%EXAMPLESDIR%%/$$destconf ; \
        fi
Index: pkgsrc/sysutils/bacula/patches/patch-src_findlib_attribs.c
diff -u pkgsrc/sysutils/bacula/patches/patch-src_findlib_attribs.c:1.1 pkgsrc/sysutils/bacula/patches/patch-src_findlib_attribs.c:1.2
--- pkgsrc/sysutils/bacula/patches/patch-src_findlib_attribs.c:1.1      Sat Oct  6 17:54:53 2012
+++ pkgsrc/sysutils/bacula/patches/patch-src_findlib_attribs.c  Thu Feb  7 11:29:31 2019
@@ -1,19 +1,19 @@
-$NetBSD: patch-src_findlib_attribs.c,v 1.1 2012/10/06 17:54:53 christos Exp $
+$NetBSD: patch-src_findlib_attribs.c,v 1.2 2019/02/07 11:29:31 markd Exp $
 
 use intmax_t instead of int64_t
 
---- src/findlib/attribs.c.orig 2012-09-13 04:51:19.000000000 -0400
-+++ src/findlib/attribs.c      2012-10-04 23:52:49.000000000 -0400
-@@ -288,7 +288,7 @@
+--- src/findlib/attribs.c.orig 2018-12-21 08:40:51.000000000 +0000
++++ src/findlib/attribs.c
+@@ -410,7 +410,7 @@ void encode_stat(char *buf, struct stat 
  int decode_stat(char *buf, struct stat *statp, int stat_size, int32_t *LinkFI)
  {
     char *p = buf;
 -   int64_t val;
 +   intmax_t val;
+    int data_stream;
  
     /*
-     * We store into the stat packet so make sure the caller's conception
-@@ -380,7 +380,7 @@
+@@ -514,7 +514,7 @@ int decode_stat(char *buf, struct stat *
  int32_t decode_LinkFI(char *buf, struct stat *statp, int stat_size)
  {
     char *p = buf;
@@ -22,7 +22,7 @@ use intmax_t instead of int64_t
     /*
      * We store into the stat packet so make sure the caller's conception
      *  is the same as ours.  They can be different if LARGEFILE is not
-@@ -694,7 +694,7 @@
+@@ -822,7 +822,7 @@ int encode_attribsEx(JCR *jcr, char *att
  static bool set_win32_attributes(JCR *jcr, ATTR *attr, BFILE *ofd)
  {
     char *p = attr->attrEx;
Index: pkgsrc/sysutils/bacula/patches/patch-src_stored_Makefile.in
diff -u pkgsrc/sysutils/bacula/patches/patch-src_stored_Makefile.in:1.1 pkgsrc/sysutils/bacula/patches/patch-src_stored_Makefile.in:1.2
--- pkgsrc/sysutils/bacula/patches/patch-src_stored_Makefile.in:1.1     Sat Oct  6 17:54:53 2012
+++ pkgsrc/sysutils/bacula/patches/patch-src_stored_Makefile.in Thu Feb  7 11:29:31 2019
@@ -1,73 +1,67 @@
-$NetBSD: patch-src_stored_Makefile.in,v 1.1 2012/10/06 17:54:53 christos Exp $
+$NetBSD: patch-src_stored_Makefile.in,v 1.2 2019/02/07 11:29:31 markd Exp $
 
 - use %%EXAMPLESDIR%% instead of sysconfdir
 - use the .la files for linking
 
---- src/stored/Makefile.in.orig        2012-09-13 04:51:19.000000000 -0400
-+++ src/stored/Makefile.in     2012-10-05 11:07:09.000000000 -0400
-@@ -96,12 +96,12 @@
- bacula-sd: Makefile $(SDOBJS) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
-       @echo "Linking $@ ..."
-       $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -o $@ $(SDOBJS) $(ZLIBS) \
--         -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(DLIB) $(LIBS) $(WRAPLIBS) \
-+         ../lib/libbacpy.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(PYTHON_LIBS) $(DLIB) $(LIBS) $(WRAPLIBS) \
-       $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
- 
- static-bacula-sd: Makefile $(SDOBJS) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
-       $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -o $@ $(SDOBJS) $(ZLIBS) \
--         -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(DLIB) $(LIBS) $(WRAPLIBS) \
-+         ../lib/libbacpy.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(PYTHON_LIBS) $(DLIB) $(LIBS) $(WRAPLIBS) \
-       $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
-       strip $@
- 
-@@ -112,7 +112,7 @@
- 
- btape: Makefile  $(TAPEOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
-       $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -o $@ $(TAPEOBJS) \
--         -lbaccfg -lbac $(DLIB) -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+         ../lib/libbaccfg.la ../lib/libbac.la $(DLIB) -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+--- src/stored/Makefile.in.orig        2018-12-21 08:40:51.000000000 +0000
++++ src/stored/Makefile.in
+@@ -94,7 +94,7 @@ ZLIBS=@ZLIBS@
+ LZO_LIBS= @LZO_LIBS@
+ LZO_INC= @LZO_INC@
+ 
+-SD_LIBS = -lbacsd -lbaccfg -lbac
++SD_LIBS = libbacsd.la ../lib/libbaccfg.la ../lib/libbac.la
  
- bls.o:        bls.c
-       @echo "Compiling $<"
-@@ -122,7 +122,7 @@
- bls:  Makefile $(BLSOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+ 
+ .SUFFIXES:    .c .o .lo
+@@ -154,7 +154,7 @@ bacula-sd-aligned-driver.la: Makefile $(
+ bsdjson: Makefile $(JSONOBJS) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+       @echo "Linking $@ ..."
+       $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -o $@ $(JSONOBJS) $(ZLIBS) \
+-         -lbaccfg -lbac -lm $(DLIB) $(LIBS) $(WRAPLIBS) \
++         ../lib/libbaccfg.la ../lib/libbac.la -lm $(DLIB) $(LIBS) $(WRAPLIBS) \
+          $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS)
+ 
+ static-bacula-sd: Makefile $(SDOBJS) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+@@ -190,7 +190,7 @@ bls.o:     bls.c
+ bls:  Makefile $(BLSOBJS) libbacsd.la drivers  ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
        @echo "Compiling $<"
        $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BLSOBJS) $(DLIB) \
--         -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+         ../findlib/libbacfind.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+-         $(SD_LIBS) -lbacfind -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++         $(SD_LIBS) ../findlib/libbacfind.la -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  bextract.o: bextract.c
        @echo "Compiling $<"
-@@ -132,7 +132,7 @@
- bextract: Makefile $(BEXTOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+@@ -200,7 +200,7 @@ bextract.o: bextract.c
+ bextract: Makefile $(BEXTOBJS) libbacsd.la drivers ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
        @echo "Compiling $<"
-       $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(DLIB) $(ZLIBS) $(LZOLIBS) \
--         -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+         ../findlib/libbacfind.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+       $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(DLIB) $(ZLIBS) $(LZO_LIBS) \
+-         $(SD_LIBS) -lbacfind -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++         $(SD_LIBS) ../findlib/libbacfind.la -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  bscan.o: bscan.c
        @echo "Compiling $<"
-@@ -142,7 +142,7 @@
- bscan:        Makefile $(SCNOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
+@@ -210,7 +210,7 @@ bscan.o: bscan.c
+ bscan:        Makefile $(SCNOBJS) libbacsd.la drivers ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
        ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE)
        $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) \
--         -lbacsql -lbaccats $(DB_LIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+         ../cats/libbacsql.la ../cats/libbaccats.la $(DB_LIBS) $(ZLIBS) ../findlib/libbacfind.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+-         $(SD_LIBS) -lbacsql -lbaccats $(DB_LIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++         $(SD_LIBS) ../cats/libbacsql.la ../cats/libbaccats.la $(DB_LIBS) $(ZLIBS) ../findlib/libbacfind.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  bcopy.o: bcopy.c
        @echo "Compiling $<"
-@@ -151,7 +151,7 @@
+@@ -224,7 +224,7 @@ bcopy:     Makefile $(COPYOBJS) libbacsd.la 
+ cloud_parts_test: Makefile cloud_parts.c
+       $(RMF) cloud_parts.o
+       $(CXX) -DTEST_PROGRAM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE)  $(CFLAGS) cloud_parts.c
+-      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ cloud_parts.o $(DLIB) -lbac -lm $(LIBS) $(OPENSSL_LIBS)
++      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ cloud_parts.o $(DLIB) ../lib/libbac.la -lm $(LIBS) $(OPENSSL_LIBS)
+       rm -f cloud_parts.o
+       $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) cloud_parts.c
  
- bcopy:        Makefile $(COPYOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
-       $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -o $@ $(COPYOBJS) \
--         -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+         ../lib/libbaccfg.la ../lib/libbac.la -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
- 
- Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
-       cd $(topdir) \
-@@ -165,16 +165,16 @@
-       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bscan $(DESTDIR)$(sbindir)/bscan
-       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) btape $(DESTDIR)$(sbindir)/btape
+@@ -253,16 +253,16 @@ install: all @LIBTOOL_INSTALL_TARGET@
+          $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-sd $(DESTDIR)$(sbindir)/static-bacula-sd; \
+       fi
        @srcconf=bacula-sd.conf; \
 -      if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
 +      if  test -f ${DESTDIR}%%EXAMPLESDIR%%/$$srcconf; then \
@@ -80,9 +74,9 @@ $NetBSD: patch-src_stored_Makefile.in,v 
 -      ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
 +      echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}%%EXAMPLESDIR%%/$$destconf"; \
 +      ${INSTALL_CONFIG} $$srcconf ${DESTDIR}%%EXAMPLESDIR%%/$$destconf
-       @if test "x${sd_group}" != "x"; then \
+       @if test "x${sd_group}" != "x" -a "x${DESTDIR}" = "x" ; then \
 -         chgrp -f ${sd_group} ${DESTDIR}${sysconfdir}/$$destconf; \
 +         chgrp -f ${sd_group} ${DESTDIR}%%EXAMPLESDIR%%/$$destconf; \
        fi
-       @if test -f static-bacula-sd; then \
-          $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-sd $(DESTDIR)$(sbindir)/static-bacula-sd; \
+ 
+ install-cloud: bacula-sd-cloud-driver.la

Index: pkgsrc/sysutils/bacula/patches/patch-src_console_conio.c
diff -u pkgsrc/sysutils/bacula/patches/patch-src_console_conio.c:1.3 pkgsrc/sysutils/bacula/patches/patch-src_console_conio.c:1.4
--- pkgsrc/sysutils/bacula/patches/patch-src_console_conio.c:1.3        Wed Jan 22 10:45:21 2014
+++ pkgsrc/sysutils/bacula/patches/patch-src_console_conio.c    Thu Feb  7 11:29:31 2019
@@ -1,12 +1,12 @@
-$NetBSD: patch-src_console_conio.c,v 1.3 2014/01/22 10:45:21 jperkin Exp $
+$NetBSD: patch-src_console_conio.c,v 1.4 2019/02/07 11:29:31 markd Exp $
 
 - need termios.h, our term.h does not include it
 - t_insert_line and t_delete_line are macros in term.h; undef them
 - spell HAVE_TERM_H correctly
 
---- src/console/conio.c.orig   2013-02-19 19:21:35.000000000 +0000
+--- src/console/conio.c.orig   2018-12-21 08:40:51.000000000 +0000
 +++ src/console/conio.c
-@@ -64,11 +64,12 @@
+@@ -54,11 +54,12 @@
  
  #ifdef HAVE_CONIO
  
@@ -14,13 +14,13 @@ $NetBSD: patch-src_console_conio.c,v 1.3
  #include <curses.h>
  #include <term.h>
  
- #if defined(HAVE_SUN_OS)
--#if !defined(_TERM_H)
-+#if !defined(HAVE_TERM_H)
+ #ifdef HAVE_SUN_OS
+-#ifndef _TERM_H
++#ifndef HAVE_TERM_H
  extern "C" int tgetent(void *, const char *);
  extern "C" int tgetnum(const char *);
  extern "C" char *tgetstr (const char*, char**);
-@@ -250,7 +251,9 @@ static char * getnext(void);
+@@ -235,7 +236,9 @@ static char * getnext(void);
  static char * getprev(void);
  static void putline(char *newl, int newlen);
  static void t_honk_horn(void);

Index: pkgsrc/sysutils/bacula/patches/patch-src_tools_Makefile.in
diff -u pkgsrc/sysutils/bacula/patches/patch-src_tools_Makefile.in:1.2 pkgsrc/sysutils/bacula/patches/patch-src_tools_Makefile.in:1.3
--- pkgsrc/sysutils/bacula/patches/patch-src_tools_Makefile.in:1.2      Tue Jan 14 10:58:17 2014
+++ pkgsrc/sysutils/bacula/patches/patch-src_tools_Makefile.in  Thu Feb  7 11:29:31 2019
@@ -1,35 +1,32 @@
-$NetBSD: patch-src_tools_Makefile.in,v 1.2 2014/01/14 10:58:17 markd Exp $
+$NetBSD: patch-src_tools_Makefile.in,v 1.3 2019/02/07 11:29:31 markd Exp $
 
 - use the .la files for linking
 - remove tests that don't link (using functions not in libraries)
 
---- src/tools/Makefile.in.orig 2013-02-19 19:21:35.000000000 +0000
+--- src/tools/Makefile.in.orig 2018-12-21 08:40:51.000000000 +0000
 +++ src/tools/Makefile.in
-@@ -35,7 +35,7 @@ EXTRAOBJS = @OBJLIST@
- DIRCONFOBJS = ../dird/dird_conf.o ../dird/ua_acl.o ../dird/run_conf.o ../dird/inc_conf.o
- 
- NODIRTOOLS = bsmtp
--DIRTOOLS = bsmtp dbcheck drivetype fstype testfind testls bregex bwild bbatch bregtest bvfs_test ing_test bpluginfo timelimit
-+DIRTOOLS = bsmtp dbcheck drivetype fstype testfind bregex bwild bbatch bregtest ing_test bpluginfo timelimit
- TOOLS = $(@DIR_TOOLS@)
- 
- INSNODIRTOOLS = bsmtp
-@@ -56,22 +56,22 @@ all: Makefile $(TOOLS) gigaslam grow
+@@ -58,27 +58,27 @@ all: Makefile $(TOOLS) gigaslam grow
        @echo " "
  
  bsmtp: Makefile bsmtp.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)      
 -      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bsmtp.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
 +      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bsmtp.o ../lib/libbac.la -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
+ bsnapshot: Makefile bsnapshot.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+-      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bsnapshot.o ../lib/ini$(DEFAULT_OBJECT_TYPE) -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS)
++      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bsnapshot.o ../lib/ini$(DEFAULT_OBJECT_TYPE) ../lib/libbac.la -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS)
+ 
+ 
  bregtest: Makefile bregtest.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)       
 -      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bregtest.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
 +      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bregtest.o ../lib/libbac.la -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  dbcheck: Makefile dbcheck.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
-        ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) $(DIRCONFOBJS)
-       $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ dbcheck.o $(DIRCONFOBJS) \
--        -lbaccats -lbacsql -lbaccfg -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+        ../cats/libbaccats.la ../cats/libbacsql.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+        ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) $(DIRCONFOBJS) \
+        ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
+       $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L. -L../lib -L../findlib -L../cats -o $@ dbcheck.o $(DIRCONFOBJS) \
+-        $(DLIB) -lbaccats -lbacsql -lbacfind -lbaccfg -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++        $(DLIB) ../cats/libbaccats.la ../cats/libbacsql.la ../findlib/libbacfind.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  fstype: Makefile fstype.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE)
 -      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ fstype.o -lbacfind -lbac -lm \
@@ -42,7 +39,7 @@ $NetBSD: patch-src_tools_Makefile.in,v 1
          $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  dird_conf.o: ../dird/dird_conf.c
-@@ -93,34 +93,34 @@ timelimit: timelimit.o
+@@ -97,29 +97,29 @@ timelimit: timelimit.o
  testfind: Makefile ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
          ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) $(FINDOBJS)
        $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -o $@ $(FINDOBJS) -L. -L../lib -L../findlib \
@@ -52,7 +49,7 @@ $NetBSD: patch-src_tools_Makefile.in,v 1
  testls: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) testls.o
        $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L. -L../lib -L../findlib -o $@ testls.o \
 -        $(DLIB) -lbacfind -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+        $(DLIB) ../findlib/libbacfind.la ../lib/libbaccfg.la ../lib/libbac.la -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++        $(DLIB) ../findlib/libbacfind.la ../lib/libbac.la -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  bregex: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) bregex.o
        $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L. -L../lib -o $@ bregex.o \
@@ -65,26 +62,20 @@ $NetBSD: patch-src_tools_Makefile.in,v 1
 +        $(DLIB) ../lib/libbac.la -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  bbatch: Makefile ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) \
-       ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) bbatch.o
-       $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L../cats -L. -L../lib -o $@ bbatch.o \
--        -lbaccats -lbacsql -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+        ../cats/libbaccats.la ../cats/libbacsql.la ../lib/libbac.la -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+       ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) bbatch.o
+       $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L../cats -L. -L../lib -L../findlib -o $@ bbatch.o \
+-        $(DLIB) -lbaccats -lbacsql -lbacfind -lbac -lm $(ZLIBS) $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++        $(DLIB) ../cats/libbaccats.la ../cats/libbacsql.la ../findlib/libbacfind.la ../lib/libbac.la -lm $(ZLIBS) $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  bvfs_test: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) \
           ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) bvfs_test.o
        $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L../cats -L. -L../lib -L../findlib -o $@ bvfs_test.o  \
--        -lbaccats -lbacsql -lbacfind -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+        ../cats/libbaccats.la ../cats/libbacsql.la ../lib/libbac.la -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
- 
- ing_test: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) \
-         ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) ../cats/libbaccats$(DEFAULT_ARCHIVE_TYPE) ing_test.o
-       $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L../cats -L. -L../lib -L../findlib -o $@ ing_test.o  \
--        -lbaccats -lbacsql -lbacfind -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
-+        ../cats/libbaccats.la ../cats/libbacsql.la ../findlib/libbacfind.la ../lib/libbac.la -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+-        -lbaccats -lbacsql -lbacfind -lbac -lm $(ZLIBS) $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++        ../cats/libbaccats.la ../cats/libbacsql.la ../findlib/libbacfind.la ../lib/libbac.la -lm $(ZLIBS) $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  cats_test.o: cats_test.c
        echo "Compiling $<"
-@@ -128,7 +128,7 @@ cats_test.o: cats_test.c
+@@ -127,7 +127,7 @@ cats_test.o: cats_test.c
  
  cats_test: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) cats_test.o
        $(LIBTOOL_LINK) $(CXX) -g $(LDFLAGS) -L../cats -L. -L../lib -L../findlib -o $@ cats_test.o  \
@@ -92,8 +83,8 @@ $NetBSD: patch-src_tools_Makefile.in,v 1
 +        ../cats/libbaccats.la ../cats/libbacsql.la ../findlib/libbacfind.la ../lib/libbac.la -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  gigaslam.o: gigaslam.c
-       $(CXX) $(CFLAGS) -c $<  
-@@ -137,13 +137,13 @@ gigaslam: gigaslam.o
+       $(CXX) $(CFLAGS) -c $<
+@@ -136,13 +136,13 @@ gigaslam: gigaslam.o
        $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -o $@ gigaslam.o
  
  grow: Makefile grow.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
@@ -104,8 +95,8 @@ $NetBSD: patch-src_tools_Makefile.in,v 1
        $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) -I../filed -I../dird -I../stored $(DINCLUDE) $(CFLAGS) $<
  
  bpluginfo: Makefile bpluginfo.o
--      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bpluginfo.o -lbac $(GETTEXT_LIBS)
-+      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bpluginfo.o ../lib/libbac.la $(GETTEXT_LIBS)
+-      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bpluginfo.o -lbac $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
++      $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ bpluginfo.o ../lib/libbac.la $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
  
  Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
        cd $(topdir) \

Added files:

Index: pkgsrc/sysutils/bacula-qt5-console/DESCR
diff -u /dev/null pkgsrc/sysutils/bacula-qt5-console/DESCR:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula-qt5-console/DESCR    Thu Feb  7 11:29:31 2019
@@ -0,0 +1 @@
+Qt-based console for Bacula - The Network Backup Solution
Index: pkgsrc/sysutils/bacula-qt5-console/Makefile
diff -u /dev/null pkgsrc/sysutils/bacula-qt5-console/Makefile:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula-qt5-console/Makefile Thu Feb  7 11:29:31 2019
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1 2019/02/07 11:29:31 markd Exp $
+
+PKGNAME=       ${DISTNAME:S/-/-qt5-console-/}
+COMMENT=       Qt5-based console for Bacula - The Network Backup Solution
+
+DISTINFO_FILE=         ${.CURDIR}/../../sysutils/bacula/distinfo
+PATCHDIR=              ${.CURDIR}/../../sysutils/bacula/patches
+
+USE_TOOLS+=            gmake pkg-config
+CONFIGURE_ARGS+=       --enable-client-only
+CONFIGURE_ARGS+=       --enable-bat
+
+BUILDLINK_TRANSFORM+=  opt:-std=c++98:-std=gnu++98 # typeof
+
+BUILD_DIRS=            src/qt-console
+
+INSTALLATION_DIRS=     bin share/examples/bacula
+
+CONF_FILES+=           ${EXAMPLESDIR}/bat.conf ${PKG_SYSCONFDIR}/bat.conf
+
+pre-configure:
+       ${LN} -sf ${QTDIR}/bin/qmake ${BUILDLINK_DIR}/bin/
+
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/src/qt-console/bat.conf ${DESTDIR}${EXAMPLESDIR}
+
+.include "../../sysutils/bacula/Makefile.common"
+.include "../../sysutils/bacula/buildlink3.mk"
+.include "../../x11/qt5-qtbase/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/sysutils/bacula-qt5-console/PLIST
diff -u /dev/null pkgsrc/sysutils/bacula-qt5-console/PLIST:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula-qt5-console/PLIST    Thu Feb  7 11:29:31 2019
@@ -0,0 +1,15 @@
+@comment $NetBSD: PLIST,v 1.1 2019/02/07 11:29:31 markd Exp $
+sbin/bat
+share/doc/bacula/clients.html
+share/doc/bacula/console.html
+share/doc/bacula/filesets.html
+share/doc/bacula/index.html
+share/doc/bacula/joblist.html
+share/doc/bacula/jobplot.html
+share/doc/bacula/jobs.html
+share/doc/bacula/mail-message-new.png
+share/doc/bacula/media.html
+share/doc/bacula/restore.html
+share/doc/bacula/status.png
+share/doc/bacula/storage.html
+share/examples/bacula/bat.conf

Index: pkgsrc/sysutils/bacula-tray-monitor-qt5/DESCR
diff -u /dev/null pkgsrc/sysutils/bacula-tray-monitor-qt5/DESCR:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula-tray-monitor-qt5/DESCR       Thu Feb  7 11:29:32 2019
@@ -0,0 +1 @@
+System tray monitor for Bacula - The Network Backup Solution
Index: pkgsrc/sysutils/bacula-tray-monitor-qt5/Makefile
diff -u /dev/null pkgsrc/sysutils/bacula-tray-monitor-qt5/Makefile:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula-tray-monitor-qt5/Makefile    Thu Feb  7 11:29:32 2019
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1 2019/02/07 11:29:32 markd Exp $
+
+PKGNAME=       ${DISTNAME:S/-/-tray-monitor-qt5-/}
+COMMENT=       System tray monitor for Bacula - The Network Backup Solution
+
+DISTINFO_FILE=         ${.CURDIR}/../../sysutils/bacula/distinfo
+PATCHDIR=              ${.CURDIR}/../../sysutils/bacula/patches
+
+USE_TOOLS+=            gmake pkg-config
+CONFIGURE_ARGS+=       --enable-client-only
+CONFIGURE_ARGS+=       --enable-bat
+
+BUILDLINK_TRANSFORM+=  opt:-std=c++98:-std=gnu++98 # typeof
+
+BUILD_DIRS=            src/qt-console/tray-monitor
+
+INSTALLATION_DIRS=     bin share/examples/bacula
+
+CONF_FILES+=           ${EXAMPLESDIR}/tray-monitor.conf ${PKG_SYSCONFDIR}/tray-monitor.conf
+
+pre-configure:
+       ${LN} -sf ${QTDIR}/bin/qmake ${BUILDLINK_DIR}/bin/
+
+post-install:
+       ${INSTALL_DATA} ${WRKSRC}/src/qt-console/tray-monitor/tray-monitor.conf ${DESTDIR}${EXAMPLESDIR}
+
+.include "../../sysutils/bacula/Makefile.common"
+.include "../../sysutils/bacula/buildlink3.mk"
+.include "../../x11/qt5-qtbase/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/sysutils/bacula-tray-monitor-qt5/PLIST
diff -u /dev/null pkgsrc/sysutils/bacula-tray-monitor-qt5/PLIST:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula-tray-monitor-qt5/PLIST       Thu Feb  7 11:29:32 2019
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2019/02/07 11:29:32 markd Exp $
+sbin/bacula-tray-monitor
+share/examples/bacula/tray-monitor.conf

Index: pkgsrc/sysutils/bacula/patches/patch-scripts_baculabackupreport.in
diff -u /dev/null pkgsrc/sysutils/bacula/patches/patch-scripts_baculabackupreport.in:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula/patches/patch-scripts_baculabackupreport.in  Thu Feb  7 11:29:31 2019
@@ -0,0 +1,84 @@
+$NetBSD: patch-scripts_baculabackupreport.in,v 1.1 2019/02/07 11:29:31 markd Exp $
+
+fixup "test =="
+
+--- scripts/baculabackupreport.in.orig 2018-12-21 08:40:51.000000000 +0000
++++ scripts/baculabackupreport.in
+@@ -544,7 +544,7 @@ numbadjobs=$?
+ 
+ # Do we email the job summaries?
+ # ------------------------------
+-if [ ${emailsummaries} == "yes" ]; then
++if [ ${emailsummaries} = "yes" ]; then
+         # Get all of the jobids from the query results, but
+         # skip any running jobs because they will not have
+         # a summary in the DB until the job has terminated
+@@ -560,7 +560,7 @@ if [ ${emailsummaries} == "yes" ]; then
+                 # Generate the header
+                 # -------------------
+                 msg="${msg}"$(
+-                if [ ${html} == "yes" ]; then
++                if [ ${html} = "yes" ]; then
+                         echo "<pre>====================================="
+                                 else
+                                         echo -e "\n\n\n====================================="
+@@ -581,7 +581,7 @@ if [ ${emailsummaries} == "yes" ]; then
+                                 echo "======================================================================"
+                         )
+                 done
+-                if [ ${html} == "yes" ]; then
++                if [ ${html} = "yes" ]; then
+                         msg=${msg}$(echo "</pre>")
+                 fi
+         fi
+@@ -590,7 +590,7 @@ fi
+ 
+ # Do we email the bad job logs with the report?
+ # ---------------------------------------------
+-if [ ${emailbadlogs} == "yes" ]; then
++if [ ${emailbadlogs} = "yes" ]; then
+         # Get the badjobs, or the good jobs with
+         # JobErrors != 0 from the query results
+         # --------------------------------------
+@@ -605,7 +605,7 @@ if [ ${emailbadlogs} == "yes" ]; then
+                 # Generate the header
+                 # -------------------
+                 msg="${msg}"$(
+-                if [ ${html} == "yes" ]; then
++                if [ ${html} = "yes" ]; then
+                         echo "<pre>=========================================================="
+                                 else
+                                         echo -e "\n\n\n=========================================================="
+@@ -626,7 +626,7 @@ if [ ${emailbadlogs} == "yes" ]; then
+                                 echo "======================================================================"
+                         )
+                 done
+-                if [ ${html} == "yes" ]; then
++                if [ ${html} = "yes" ]; then
+                         msg=${msg}$(echo "</pre>")
+                 fi
+         fi
+@@ -635,7 +635,7 @@ fi
+ 
+ # Prepend the header to the $msg output
+ # -------------------------------------
+-if [ ${html} == "yes" ]; then
++if [ ${html} = "yes" ]; then
+         msg="<html>
+         <head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
+                 <style>
+@@ -711,12 +711,12 @@ fi
+ (
+ echo "To: ${admin}"
+ echo "From: ${admin}"
+-if [ ${addsubjecticon} == "yes" ]; then
++if [ ${addsubjecticon} = "yes" ]; then
+         echo "Subject: ${subjecticon} ${server} - ${status} in the Past ${hist} ${hour}"
+                 else
+                         echo "Subject: ${server} - ${status} in the Past ${hist} ${hour}"
+ fi
+-if [ ${html} == "yes" ]  &&  [ ${results} -ne 0 ]; then
++if [ ${html} = "yes" ]  &&  [ ${results} -ne 0 ]; then
+  echo "Content-Type: text/html"
+  echo "MIME-Version: 1.0"
+ fi
Index: pkgsrc/sysutils/bacula/patches/patch-src_console_Makefile.in
diff -u /dev/null pkgsrc/sysutils/bacula/patches/patch-src_console_Makefile.in:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula/patches/patch-src_console_Makefile.in        Thu Feb  7 11:29:31 2019
@@ -0,0 +1,47 @@
+$NetBSD: patch-src_console_Makefile.in,v 1.1 2019/02/07 11:29:31 markd Exp $
+
+- use %%EXAMPLESDIR%% instead of sysconfdir
+- use the .la files for linking
+
+--- src/console/Makefile.in.orig       2018-12-21 08:40:51.000000000 +0000
++++ src/console/Makefile.in
+@@ -50,12 +50,12 @@ all: Makefile bconsole @STATIC_CONS@ bbc
+ 
+ bconsole: Makefile $(CONSOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+       $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
+-            $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
++            $(DLIB) $(CONS_LIBS) ../lib/libbaccfg.la ../lib/libbac.la -lm $(LIBS) $(GETTEXT_LIBS) \
+             $(OPENSSL_LIBS)
+ 
+ bbconsjson: Makefile $(JSONOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+       $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(JSONOBJS) \
+-            $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
++            $(DLIB) $(CONS_LIBS) ../lib/libbaccfg.la ../lib/libbac.la -lm $(LIBS) $(GETTEXT_LIBS) \
+             $(OPENSSL_LIBS)
+ 
+ static-bconsole: Makefile $(CONSOBJS) ../lib/libbac.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+@@ -98,19 +98,19 @@ install: all
+       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM_ALL) bconsole $(DESTDIR)$(sbindir)/bconsole
+       $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bbconsjson $(DESTDIR)$(sbindir)/bbconsjson
+       @srcconf=bconsole.conf; \
+-      if  test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
++      if  test -f ${DESTDIR}%%EXAMPLESDIR%%/$$srcconf; then \
+          destconf=$$srcconf.new; \
+          echo "  ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
+       else \
+          destconf=$$srcconf; \
+-         if  test -f ${DESTDIR}${sysconfdir}/console.conf; then \
++         if  test -f ${DESTDIR}%%EXAMPLESDIR%%/console.conf; then \
+             echo "Existing console.conf moved to bconsole.conf"; \
+-            @$(MV) ${DESTDIR}${sysconfdir}/console.conf ${DESTDIR}${sysconfdir}/bconsole.conf; \
++            @$(MV) ${DESTDIR}%%EXAMPLESDIR%%/console.conf ${DESTDIR}%%EXAMPLESDIR%%/bconsole.conf; \
+             destconf=$$srcconf.new; \
+          fi; \
+       fi; \
+-      echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
+-      ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
++      echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}%%EXAMPLESDIR%%/$$destconf"; \
++      ${INSTALL_CONFIG} $$srcconf ${DESTDIR}%%EXAMPLESDIR%%/$$destconf
+       if test -f static-bconsole; then \
+          $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bconsole $(DESTDIR)$(sbindir)/static-bconsole; \
+       fi
Index: pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr.c
diff -u /dev/null pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr.c:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr.c     Thu Feb  7 11:29:31 2019
@@ -0,0 +1,23 @@
+$NetBSD: patch-src_filed_bxattr.c,v 1.1 2019/02/07 11:29:31 markd Exp $
+
+NetBSD has xattr
+
+--- src/filed/bxattr.c.orig    2018-12-21 08:40:51.000000000 +0000
++++ src/filed/bxattr.c
+@@ -922,6 +922,7 @@ bRC_BXATTR BXATTR::unserialize_xattr_str
+ #include "bxattr_osx.h"
+ #include "bxattr_linux.h"
+ #include "bxattr_freebsd.h"
++#include "bxattr_netbsd.h"
+ #include "bxattr_solaris.h"
+ // #include "bxattr_aix.h"
+ 
+@@ -936,6 +937,8 @@ void *new_bxattr()
+    return new BXATTR_Linux();
+ #elif defined(HAVE_FREEBSD_OS)
+    return new BXATTR_FreeBSD();
++#elif defined(HAVE_NETBSD_OS)
++   return new BXATTR_NetBSD();
+ #elif defined(HAVE_HURD_OS)
+    return new BXATTR_Hurd();
+ #elif defined(HAVE_AIX_OS)
Index: pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr__netbsd.c
diff -u /dev/null pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr__netbsd.c:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr__netbsd.c     Thu Feb  7 11:29:31 2019
@@ -0,0 +1,472 @@
+$NetBSD: patch-src_filed_bxattr__netbsd.c,v 1.1 2019/02/07 11:29:31 markd Exp $
+
+NetBSD has xattr.
+
+--- /dev/null  2019-02-04 11:43:19.480511265 +0000
++++ src/filed/bxattr_netbsd.c
+@@ -0,0 +1,465 @@
++/*
++   Bacula(R) - The Network Backup Solution
++
++   Copyright (C) 2000-2016 Kern Sibbald
++
++   The original 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.
++
++   This notice must be preserved when any source code is
++   conveyed and/or propagated.
++
++   Bacula(R) is a registered trademark of Kern Sibbald.
++ */
++/**
++ * Major refactoring of XATTR code written by:
++ *
++ *  Radosław Korzeniewski, MMXVI
++ *  radoslaw%korzeniewski.net@localhost, radekk%inteos.pl@localhost
++ *  Inteos Sp. z o.o. http://www.inteos.pl/
++ *
++ */
++
++#include "bacula.h"
++#include "filed.h"
++#include "bxattr_netbsd.h"
++
++#if defined(HAVE_NETBSD_OS)
++
++/* check if XATTR support is enabled */
++#if defined(HAVE_XATTR)
++
++/*
++ * Define the supported XATTR streams for this OS
++ */
++static const int os_xattr_streams[] = {
++   STREAM_XACL_NETBSD_XATTR,
++   0
++};
++
++static const int os_xattr_namespaces[] = {
++   EXTATTR_NAMESPACE_USER,
++   EXTATTR_NAMESPACE_SYSTEM,
++   -1
++};
++
++static const char *os_xattr_acl_skiplist[] = {
++   "system.posix1e.acl_access",
++   "system.posix1e.acl_default",
++   "system.nfs4.acl",
++   NULL
++};
++
++static const char *os_xattr_skiplist[] = {
++   NULL
++};
++
++/*
++ * OS specific constructor
++ */
++BXATTR_NetBSD::BXATTR_NetBSD()
++{
++   set_xattr_streams(os_xattr_streams);
++   set_xattr_skiplists(os_xattr_skiplist, os_xattr_acl_skiplist);
++};
++
++/*
++ * Perform OS specific extended attribute backup
++ *
++ * in/out - check API at bxattr.h
++ */
++bRC_BXATTR BXATTR_NetBSD::os_backup_xattr (JCR *jcr, FF_PKT *ff_pkt){
++
++   bRC_BXATTR rc;
++   POOLMEM *xlist;
++   uint32_t xlen;
++   char *name;
++   uint32_t name_len;
++   POOLMEM *value;
++   uint32_t value_len;
++   POOLMEM *name_gen;
++   uint32_t name_gen_len;
++   char * namespace_str;
++   int namespace_len;
++   bool skip;
++   alist *xattr_list = NULL;
++   int xattr_count = 0;
++   uint32_t len = 0;
++   BXATTR_xattr *xattr;
++   int a;
++
++   for (a = 0; os_xattr_namespaces[a] != -1; a++){ // loop through all available namespaces
++      /* xlist is allocated as POOLMEM by os_get_xattr_names_local */
++      rc = os_get_xattr_names_local(jcr, os_xattr_namespaces[a], &xlist, &xlen);
++      switch (rc){
++         case bRC_BXATTR_ok:
++            /* it's ok, so go further */
++            break;
++         case bRC_BXATTR_skip:
++         case bRC_BXATTR_cont:
++            /* no xattr available, so skip rest of it */
++            return bRC_BXATTR_ok;
++         default:
++            return rc;
++      }
++
++      /* get a string representation of the namespace */
++      if (extattr_namespace_to_string(os_xattr_namespaces[a], &namespace_str) != 0){
++         Mmsg2(jcr->errmsg, _("Failed to convert %d into namespace on file \"%s\"\n"), os_xattr_namespaces[a], jcr->last_fname);
++         Dmsg2(100, "Failed to convert %d into namespace on file \"%s\"\n", os_xattr_namespaces[a], jcr->last_fname);
++         goto bail_out;
++      }
++      namespace_len = strlen(namespace_str);
++
++      /* follow the list of xattr names and get the values */
++      for (name = xlist; (name - xlist) + 1 < xlen; name = strchr(name, '\0') + 1){
++         name_len = strlen(name);
++         name_gen = get_pool_memory(PM_FNAME);
++         name_gen = check_pool_memory_size(name_gen, name_len + namespace_len + 2);
++         bsnprintf(name_gen, name_len + namespace_len + 2, "%s.%s", namespace_str, name);
++         name_gen_len = strlen(name_gen);
++
++         skip =  check_xattr_skiplists(jcr, ff_pkt, name_gen);
++         if (skip || name_len == 0){
++            Dmsg1(100, "Skipping xattr named %s\n", name_gen);
++            continue;
++         }
++
++         /* value is allocated as POOLMEM by os_get_xattr_value_local */
++         rc = os_get_xattr_value_local(jcr, os_xattr_namespaces[a], name, &value, &value_len);
++         switch (rc){
++            case bRC_BXATTR_ok:
++               /* it's ok, so go further */
++               break;
++            case bRC_BXATTR_skip:
++               /* no xattr available, so skip rest of it */
++               rc = bRC_BXATTR_ok;
++               goto bail_out;
++            default:
++               /* error / fatal */
++               goto bail_out;
++         }
++
++         /*
++          * we have a name of the extended attribute in the name variable
++          * and value of the extended attribute in the value variable
++          * so we need to build a list
++          */
++         xattr = (BXATTR_xattr*)malloc(sizeof(BXATTR_xattr));
++         xattr->name_len = name_gen_len;
++         xattr->name = name_gen;
++         xattr->value_len = value_len;
++         xattr->value = value;
++         /*       magic              name_len          name        value_len       value */
++         len += sizeof(uint32_t) + sizeof(uint32_t) + name_gen_len + sizeof(uint32_t) + value_len;
++
++         if (xattr_list == NULL){
++            xattr_list = New(alist(10, not_owned_by_alist));
++         }
++         xattr_list->append(xattr);
++         xattr_count++;
++      }
++      if (xattr_count > 0){
++         /* serialize the stream */
++         rc = serialize_xattr_stream(jcr, len, xattr_list);
++         if (rc != bRC_BXATTR_ok){
++            Mmsg(jcr->errmsg, _("Failed to serialize extended attributes on file \"%s\"\n"), jcr->last_fname);
++            Dmsg1(100, "Failed to serialize extended attributes on file \"%s\"\n", jcr->last_fname);
++            goto bail_out;
++         } else {
++            /* send data to SD */
++            rc = send_xattr_stream(jcr, STREAM_XACL_NETBSD_XATTR);
++         }
++      } else {
++         rc = bRC_BXATTR_ok;
++      }
++   }
++bail_out:
++   /* free allocated data */
++   if (xattr_list != NULL){
++      foreach_alist(xattr, xattr_list){
++         if (xattr == NULL){
++            break;
++         }
++         if (xattr->name){
++            free_pool_memory(name_gen);
++         }
++         if (xattr->value){
++            free(xattr->value);
++         }
++         free(xattr);
++      }
++      delete xattr_list;
++   }
++   if (xlist != NULL){
++      free(xlist);
++   }
++
++   return rc;
++};
++
++/*
++ * Perform OS specific XATTR restore. Runtime is called only when stream is supported by OS.
++ *
++ * in/out - check API at bxattr.h
++ */
++bRC_BXATTR BXATTR_NetBSD::os_restore_xattr (JCR *jcr, int stream, char *content, uint32_t length){
++   return generic_restore_xattr(jcr, stream);
++};
++
++/*
++ * Return a list of xattr names in newly allocated pool memory and a length of the allocated buffer.
++ * It allocates a memory with poolmem subroutines every time a function is called, so it must be freed
++ * when not needed.
++ *
++ * in/out - check API at bxattr.h
++ *
++ * As a FreeBSD uses a different attributes name schema/format then this method is a very different
++ * from a standard generic method because it uses a namespace (ns) value for os dependent optimization.
++ */
++bRC_BXATTR BXATTR_NetBSD::os_get_xattr_names_local (JCR *jcr, int ns, POOLMEM ** pxlist, uint32_t * xlen){
++
++   int len;
++   POOLMEM * list;
++   int a;
++   int stra;
++   POOLMEM * genlist;
++
++   /* check input data */
++   if (jcr == NULL || xlen == NULL || pxlist == NULL){
++      return bRC_BXATTR_inval;
++   }
++   /* get the length of the extended attributes */
++   len = extattr_list_link(jcr->last_fname, ns, NULL, 0);
++   switch (len){
++      case -1: {
++         berrno be;
++
++         switch (errno){
++            case ENOENT:
++               /* no file available, skip it */
++               return bRC_BXATTR_skip;
++            case EOPNOTSUPP:
++               /* no xattr supported on filesystem, clear a flag and skip it */
++               clear_flag(BXATTR_FLAG_NATIVE);
++               set_content(NULL);
++               return bRC_BXATTR_skip;
++            case EPERM:
++               if (ns == EXTATTR_NAMESPACE_SYSTEM){
++                  return bRC_BXATTR_cont;
++               } /* else show error */
++            default:
++               Mmsg2(jcr->errmsg, _("extattr_list_link error on file \"%s\": ERR=%s\n"), jcr->last_fname, be.bstrerror());
++               Dmsg2(100, "extattr_list_link error file=%s ERR=%s\n", jcr->last_fname, be.bstrerror());
++               return bRC_BXATTR_error;
++         }
++         break;
++      }
++      case 0:
++         /* xattr available but empty, skip it */
++         return bRC_BXATTR_skip;
++      default:
++         break;
++   }
++
++   /*
++    * allocate memory for the extented attribute list
++    * default size is a 4k for PM_BSOCK, which should be sufficient on almost all
++    * Linux system where xattrs a limited in size to single filesystem block ~4kB
++    * so we need to check required size
++    */
++   list = get_pool_memory(PM_BSOCK);
++   list = check_pool_memory_size(list, len + 1);
++   memset(list, 0, len + 1);
++
++   /* get the list of extended attributes names for a file */
++   len = extattr_list_link(jcr->last_fname, ns, list, len);
++   switch (len){
++   case -1: {
++      berrno be;
++
++      switch (errno){
++      case ENOENT:
++         /* no file available, skip it, first release allocated memory */
++         free_pool_memory(list);
++         return bRC_BXATTR_skip;
++         case EPERM:
++            if (ns == EXTATTR_NAMESPACE_SYSTEM){
++               return bRC_BXATTR_cont;
++            } /* else show error */
++      default:
++         Mmsg2(jcr->errmsg, _("extattr_list_link error on file \"%s\": ERR=%s\n"), jcr->last_fname, be.bstrerror());
++         Dmsg2(100, "extattr_list_link error file=%s ERR=%s\n", jcr->last_fname, be.bstrerror());
++         free_pool_memory(list);
++         return bRC_BXATTR_error;
++      }
++      break;
++   }
++   default:
++      break;
++   }
++   /* convert FreeBSD list type to the generic one */
++   genlist = get_pool_memory(PM_BSOCK);
++   genlist = check_pool_memory_size(genlist, len + 1);
++   memset(genlist, 0, len + 1);
++   for (a = 0; a < len; a += list[a] + 1){
++      stra = list[a];
++      memcpy(genlist + a, list + a + 1, stra);
++      genlist[a + stra] = '\0';
++   }
++   free_pool_memory(list);
++   /* setup return data */
++   *pxlist = genlist;
++   *xlen = len;
++   return bRC_BXATTR_ok;
++};
++
++/*
++ * Return a value of the requested attribute name and a length of the allocated buffer.
++ * It allocates a memory with poolmem subroutines every time a function is called, so it must be freed
++ * when not needed.
++ *
++ * in/out - check API at bxattr.h
++ *
++ * As a FreeBSD uses a different attributes name schema/format then this method is a very different
++ * from a standard generic method because it uses a namespace (ns) value for os dependent optimization.
++ */
++bRC_BXATTR BXATTR_NetBSD::os_get_xattr_value_local (JCR *jcr, int ns, char * name, char ** pvalue, uint32_t * plen){
++
++   int len;
++   POOLMEM * value;
++
++   /* check input data */
++   if (jcr == NULL || name == NULL || plen == NULL || pvalue == NULL){
++      return bRC_BXATTR_inval;
++   }
++   /* get the length of the value for extended attribute */
++   len = extattr_get_link(jcr->last_fname, ns, name, NULL, 0);
++   switch (len){
++      case -1: {
++         berrno be;
++
++         switch (errno){
++            case ENOENT:
++               /* no file available, skip it */
++               return bRC_BXATTR_skip;
++            default:
++               /* XXX: what about ENOATTR error value? */
++               Mmsg2(jcr->errmsg, _("extattr_get_link error on file \"%s\": ERR=%s\n"), jcr->last_fname, be.bstrerror());
++               Dmsg2(100, "extattr_get_link error file=%s ERR=%s\n", jcr->last_fname, be.bstrerror());
++               return bRC_BXATTR_error;
++         }
++         break;
++      }
++      default:
++         break;
++   }
++
++   if (len > 0){
++      /*
++       * allocate memory for the extented attribute value
++       * default size is a 256B for PM_MESSAGE, so we need to check required size
++       */
++      value = get_pool_memory(PM_MESSAGE);
++      value = check_pool_memory_size(value, len + 1);
++      memset(value, 0, len + 1);
++      /* value is not empty, get a data */
++      len = extattr_get_link(jcr->last_fname, ns, name, value, len);
++      switch (len){
++      case -1: {
++         berrno be;
++
++         switch (errno){
++         case ENOENT:
++            /* no file available, skip it, first release allocated memory */
++            free_pool_memory(value);
++            return bRC_BXATTR_skip;
++         default:
++            Mmsg2(jcr->errmsg, _("extattr_get_link error on file \"%s\": ERR=%s\n"), jcr->last_fname, be.bstrerror());
++            Dmsg2(100, "extattr_get_link error file=%s ERR=%s\n", jcr->last_fname, be.bstrerror());
++            free_pool_memory(value);
++            return bRC_BXATTR_error;
++         }
++         break;
++      }
++      default:
++         break;
++      }
++      /* ensure a value is nul terminated */
++      value[len] = '\0';
++   } else {
++      /* empty value */
++      value = NULL;
++      len = 0;
++   }
++   /* setup return data */
++   *pvalue = value;
++   *plen = len;
++   return bRC_BXATTR_ok;
++};
++
++/*
++ * Low level OS specific runtime to set extended attribute on file
++ *
++ * in/out - check API at bxattr.h
++ *
++ * xattr->name should be in '<namespace>.<name>' format which
++ * function handle without problem, otherwise it returns an error
++ * TODO: it is possible to handle a different attributes name format
++ * for OS portability where default namespace 'user' can be used
++ */
++bRC_BXATTR BXATTR_NetBSD::os_set_xattr (JCR *jcr, BXATTR_xattr *xattr){
++
++   char * name;
++   char * nspace;
++   int ns;
++   int rc;
++
++   /* check input data */
++   if (jcr == NULL || xattr == NULL){
++      return bRC_BXATTR_inval;
++   }
++
++   /* search for attribute namespace which is distinguished from attribute name by a dot '.' character */
++   if ((name = strchr(xattr->name, '.')) == (char *)NULL){
++      Mmsg2(jcr->errmsg, _("Failed to split %s into namespace and name part on file \"%s\"\n"), xattr->name, jcr->last_fname);
++      Dmsg2(100, "Failed to split %s into namespace and name part on file \"%s\"\n", xattr->name, jcr->last_fname);
++      return bRC_BXATTR_error;
++   }
++
++   /* split namespace and name of the attribute */
++   nspace = xattr->name;
++   *name++ = '\0';
++
++   /* check if namespace is valid on this system */
++   if (extattr_string_to_namespace(nspace, &ns) != 0){
++      Mmsg2(jcr->errmsg, _("Failed to convert %s into namespace on file \"%s\"\n"), nspace, jcr->last_fname);
++      Dmsg2(100, "Failed to convert %s into namespace on file \"%s\"\n", nspace, jcr->last_fname);
++      return bRC_BXATTR_error;
++   }
++
++   /* set extattr on file */
++   rc = extattr_set_link(jcr->last_fname, ns, name, xattr->value, xattr->value_len);
++   if (rc < 0 || rc != (int)xattr->value_len){
++      berrno be;
++
++      switch (errno){
++      case ENOENT:
++         break;
++      default:
++         Mmsg2(jcr->errmsg, _("extattr_set_link error on file \"%s\": ERR=%s\n"), jcr->last_fname, be.bstrerror());
++         Dmsg2(100, "extattr_set_link error file=%s ERR=%s\n", jcr->last_fname, be.bstrerror());
++         return bRC_BXATTR_error;
++      }
++   }
++   return bRC_BXATTR_ok;
++};
++
++#endif /* HAVE_XATTR */
++
++#endif /* HAVE_NETBSD_OS */
Index: pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr__netbsd.h
diff -u /dev/null pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr__netbsd.h:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula/patches/patch-src_filed_bxattr__netbsd.h     Thu Feb  7 11:29:31 2019
@@ -0,0 +1,92 @@
+$NetBSD: patch-src_filed_bxattr__netbsd.h,v 1.1 2019/02/07 11:29:31 markd Exp $
+
+NetBSD has xattr.
+
+--- /dev/null  2019-02-04 11:33:03.884708092 +0000
++++ src/filed/bxattr_netbsd.h
+@@ -0,0 +1,85 @@
++/*
++   Bacula(R) - The Network Backup Solution
++
++   Copyright (C) 2000-2016 Kern Sibbald
++
++   The original 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.
++
++   This notice must be preserved when any source code is
++   conveyed and/or propagated.
++
++   Bacula(R) is a registered trademark of Kern Sibbald.
++ */
++/**
++ * Major refactoring of XATTR code written by:
++ *
++ *  Radosław Korzeniewski, MMXVI
++ *  radoslaw%korzeniewski.net@localhost, radekk%inteos.pl@localhost
++ *  Inteos Sp. z o.o. http://www.inteos.pl/
++ *
++ */
++
++#ifndef __BXATTR_NetBSD_H_
++#define __BXATTR_NetBSD_H_
++
++#if defined(HAVE_NETBSD_OS)
++#include <sys/types.h>
++
++/* check if XATTR support is enabled */
++#if defined(HAVE_XATTR)
++
++#if (!defined(HAVE_EXTATTR_GET_LINK) && !defined(HAVE_EXTATTR_GET_FILE)) || \
++    (!defined(HAVE_EXTATTR_SET_LINK) && !defined(HAVE_EXTATTR_SET_FILE)) || \
++    (!defined(HAVE_EXTATTR_LIST_LINK) && !defined(HAVE_EXTATTR_LIST_FILE)) || \
++    !defined(HAVE_EXTATTR_NAMESPACE_TO_STRING) || \
++    !defined(HAVE_EXTATTR_STRING_TO_NAMESPACE)
++#error "Missing full support for the extattr functions."
++#endif
++
++#ifdef HAVE_SYS_EXTATTR_H
++#include <sys/types.h>
++#include <sys/extattr.h>
++#else
++#error "Missing sys/extattr.h header file"
++#endif
++
++#ifdef HAVE_LIBUTIL_H
++#include <libutil.h>
++#endif
++
++#if !defined(HAVE_EXTATTR_GET_LINK) && defined(HAVE_EXTATTR_GET_FILE)
++#define extattr_get_link extattr_get_file
++#endif
++#if !defined(HAVE_EXTATTR_SET_LINK) && defined(HAVE_EXTATTR_SET_FILE)
++#define extattr_set_link extattr_set_file
++#endif
++#if !defined(HAVE_EXTATTR_LIST_LINK) && defined(HAVE_EXTATTR_LIST_FILE)
++#define extattr_list_link extattr_list_file
++#endif
++
++/*
++ *
++ *
++ */
++class BXATTR_NetBSD : public BXATTR {
++private:
++   bRC_BXATTR os_backup_xattr (JCR *jcr, FF_PKT *ff_pkt);
++   bRC_BXATTR os_restore_xattr (JCR *jcr, int stream, char *content, uint32_t length);
++   bRC_BXATTR os_get_xattr_names_local (JCR *jcr, const int ns, POOLMEM **list, uint32_t *length);
++   bRC_BXATTR os_get_xattr_value_local (JCR *jcr, const int ns, char * name, char ** pvalue, uint32_t * plen);
++   bRC_BXATTR os_set_xattr (JCR *jcr, BXATTR_xattr *xattr);
++public:
++   BXATTR_NetBSD ();
++};
++
++#endif /* HAVE_XATTR */
++
++#endif /* HAVE_NETBSD_OS */
++
++#endif /* __BXATTR_NetBSD_H_ */
Index: pkgsrc/sysutils/bacula/patches/patch-src_qt-console_tray-monitor_tray-monitor.pro.in
diff -u /dev/null pkgsrc/sysutils/bacula/patches/patch-src_qt-console_tray-monitor_tray-monitor.pro.in:1.1
--- /dev/null   Thu Feb  7 11:29:32 2019
+++ pkgsrc/sysutils/bacula/patches/patch-src_qt-console_tray-monitor_tray-monitor.pro.in        Thu Feb  7 11:29:31 2019
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_qt-console_tray-monitor_tray-monitor.pro.in,v 1.1 2019/02/07 11:29:31 markd Exp $
+
+- comment out the confs paths and command
+- use just the compiler not libtool for QMAKE_LINK
+
+--- src/qt-console/tray-monitor/tray-monitor.pro.in.orig       2018-12-21 08:40:51.000000000 +0000
++++ src/qt-console/tray-monitor/tray-monitor.pro.in
+@@ -27,8 +27,8 @@ cross-win32 {
+ 
+ bins.path = /$(DESTDIR)@sbindir@
+ bins.files = bacula-tray-monitor
+-confs.path = /$(DESTDIR)@sysconfdir@
+-confs.commands = ./install_conf_file
++#confs.path = /$(DESTDIR)@sysconfdir@
++#confs.commands = ./install_conf_file
+ 
+ TEMPLATE     = app
+ TARGET       = bacula-tray-monitor
+@@ -37,7 +37,7 @@ DEPENDPATH  += .
+ INCLUDEPATH += ../.. . 
+ LIBTOOL_LINK = @QMAKE_LIBTOOL@ --silent --tag=CXX --mode=link
+ LIBTOOL_INSTALL = @QMAKE_LIBTOOL@ --silent --mode=install
+-QMAKE_LINK   = $${LIBTOOL_LINK} $(CXX)
++QMAKE_LINK   = $(CXX)
+ QMAKE_INSTALL_PROGRAM = $${LIBTOOL_INSTALL} install -m @SBINPERM@ -p
+ QMAKE_CLEAN += obj/* .libs/* bacula-tray-monitor release/bacula-tray-monitor
+ QMAKE_CXXFLAGS += -DTRAY_MONITOR



Home | Main Index | Thread Index | Old Index