pkgsrc-WIP-changes archive

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

Update to version Bareos 19.7.2



Module Name:	pkgsrc-wip
Committed By:	Frank Kardel <kardel%netbsd.org@localhost>
Pushed By:	kardel
Date:		Thu Jun 25 16:27:13 2020 +0200
Changeset:	40e045c2b404e037d9538a4eff7aa5c9587c147f

Modified Files:
	bareos-clientonly/PLIST.client
	bareos-clientonly/distinfo
	bareos/MESSAGE
	bareos/Makefile
	bareos/Makefile.common
	bareos/PLIST.common
	bareos/distinfo
	bareos/patches/patch-core_CMakeLists.txt
	bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake
	bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake
	bareos/patches/patch-core_scripts_CMakeLists.txt
	bareos/patches/patch-core_src_CMakeLists.txt
	bareos/patches/patch-core_src_dird_admin.cc
	bareos/patches/patch-core_src_dird_archive.cc
	bareos/patches/patch-core_src_dird_authenticate__console.cc
	bareos/patches/patch-core_src_dird_backup.cc
	bareos/patches/patch-core_src_dird_consolidate.cc
	bareos/patches/patch-core_src_dird_dird__conf.cc
	bareos/patches/patch-core_src_dird_migrate.cc
	bareos/patches/patch-core_src_dird_restore.cc
	bareos/patches/patch-core_src_dird_verify.cc
	bareos/patches/patch-core_src_findlib_find__one.cc
	bareos/patches/patch-core_src_lib_scsi__lli.cc
	bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc
	bareos/patches/patch-core_src_plugins_stored_scsitapealert-sd.cc
	bareos/patches/patch-core_src_stored_acquire.cc
	bareos/patches/patch-core_src_stored_btape.cc
	bareos/patches/patch-core_src_stored_dir__cmd.cc
	bareos/patches/patch-core_src_stored_label.cc
Added Files:
	bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake
	bareos/patches/patch-core_cmake_BareosTimeFunctions.cmake
	bareos/patches/patch-core_src_findlib_acl.cc
	bareos/patches/patch-core_src_lib_version.c
	bareos/patches/patch-core_src_stored_bscan.cc
	bareos/patches/patch-core_src_stored_device.cc
	bareos/patches/patch-core_src_stored_mount.cc
Removed Files:
	bareos/patches/patch-core_src_include_version.h
	bareos/patches/patch-core_src_ndmp_CMakeLists.txt
	bareos/patches/patch-core_src_ndmp_ndmos.h

Log Message:
Update to version Bareos 19.7.2

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=40e045c2b404e037d9538a4eff7aa5c9587c147f

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

diffstat:
 bareos-clientonly/PLIST.client                     | 13 +++-
 bareos-clientonly/distinfo                         | 63 +++++++++---------
 bareos/MESSAGE                                     |  2 +-
 bareos/Makefile                                    |  2 +-
 bareos/Makefile.common                             | 10 ++-
 bareos/PLIST.common                                | 32 ++++++---
 bareos/distinfo                                    | 62 +++++++++---------
 bareos/patches/patch-core_CMakeLists.txt           | 35 ++++++----
 .../patch-core_cmake_BareosCheckIncludes.cmake     | 36 +++++------
 .../patch-core_cmake_BareosFindAllLibraries.cmake  | 17 +++++
 ...atch-core_cmake_BareosSetVariableDefaults.cmake | 24 ++++---
 .../patch-core_cmake_BareosTimeFunctions.cmake     | 17 +++++
 bareos/patches/patch-core_scripts_CMakeLists.txt   | 75 +++++++++++-----------
 bareos/patches/patch-core_src_CMakeLists.txt       | 22 +++----
 bareos/patches/patch-core_src_dird_admin.cc        | 29 ++++-----
 bareos/patches/patch-core_src_dird_archive.cc      | 30 ++++-----
 .../patch-core_src_dird_authenticate__console.cc   | 10 +--
 bareos/patches/patch-core_src_dird_backup.cc       | 14 ++--
 bareos/patches/patch-core_src_dird_consolidate.cc  | 30 ++++-----
 bareos/patches/patch-core_src_dird_dird__conf.cc   | 22 +++----
 bareos/patches/patch-core_src_dird_migrate.cc      | 49 +++++++-------
 bareos/patches/patch-core_src_dird_restore.cc      | 65 ++++++++++---------
 bareos/patches/patch-core_src_dird_verify.cc       | 62 +++++++++---------
 bareos/patches/patch-core_src_findlib_acl.cc       | 61 ++++++++++++++++++
 bareos/patches/patch-core_src_findlib_find__one.cc | 12 ++--
 bareos/patches/patch-core_src_include_version.h    | 47 --------------
 bareos/patches/patch-core_src_lib_scsi__lli.cc     | 35 +++++-----
 bareos/patches/patch-core_src_lib_version.c        | 28 ++++++++
 bareos/patches/patch-core_src_ndmp_CMakeLists.txt  | 20 ------
 bareos/patches/patch-core_src_ndmp_ndmos.h         | 35 ----------
 .../patch-core_src_plugins_stored_scsicrypto-sd.cc | 60 ++++++++---------
 ...tch-core_src_plugins_stored_scsitapealert-sd.cc | 33 ++++++----
 bareos/patches/patch-core_src_stored_acquire.cc    | 20 +++---
 bareos/patches/patch-core_src_stored_bscan.cc      | 27 ++++++++
 bareos/patches/patch-core_src_stored_btape.cc      | 36 +++++++----
 bareos/patches/patch-core_src_stored_device.cc     | 29 +++++++++
 bareos/patches/patch-core_src_stored_dir__cmd.cc   | 32 ++++-----
 bareos/patches/patch-core_src_stored_label.cc      | 18 +++---
 bareos/patches/patch-core_src_stored_mount.cc      | 27 ++++++++
 39 files changed, 703 insertions(+), 538 deletions(-)

diffs:
diff --git a/bareos-clientonly/PLIST.client b/bareos-clientonly/PLIST.client
index f2797ab801..1a333c115f 100644
--- a/bareos-clientonly/PLIST.client
+++ b/bareos-clientonly/PLIST.client
@@ -3,10 +3,14 @@ bin/bconsole
 lib/bareos/plugins/BareosFdPluginBaseclass.py
 lib/bareos/plugins/BareosFdPluginLDAP.py
 lib/bareos/plugins/BareosFdPluginLocalFileset.py
+lib/bareos/plugins/BareosFdPluginOvirt.py
+lib/bareos/plugins/BareosFdPluginPerconaXtraBackup.py
 lib/bareos/plugins/BareosFdWrapper.py
 lib/bareos/plugins/bareos-fd-ldap.py
 lib/bareos/plugins/bareos-fd-local-fileset.py
 lib/bareos/plugins/bareos-fd-mock-test.py
+lib/bareos/plugins/bareos-fd-ovirt.py
+lib/bareos/plugins/bareos-fd-percona-xtrabackup.py
 lib/bareos/plugins/bareos-fd.py.template
 lib/bareos/plugins/bareos_fd_consts.py
 lib/bareos/plugins/bpipe-fd.so
@@ -20,13 +24,16 @@ lib/bareos/scripts/btraceback.dbx
 lib/bareos/scripts/btraceback.gdb
 lib/bareos/scripts/btraceback.mdb
 lib/libbareos.so
-lib/libbareos.so.18
+lib/libbareos.so.19
 lib/libbareos.so.${PKGVERSION}
+lib/libbareosfastlz.so
+lib/libbareosfastlz.so.19
+lib/libbareosfastlz.so.${PKGVERSION}
 lib/libbareosfind.so
-lib/libbareosfind.so.18
+lib/libbareosfind.so.19
 lib/libbareosfind.so.${PKGVERSION}
 lib/libbareoslmdb.so
-lib/libbareoslmdb.so.18
+lib/libbareoslmdb.so.19
 lib/libbareoslmdb.so.${PKGVERSION}
 man/man1/bconsole.1
 man/man8/bareos-fd.8
diff --git a/bareos-clientonly/distinfo b/bareos-clientonly/distinfo
index 64d8131bb1..f83da20854 100644
--- a/bareos-clientonly/distinfo
+++ b/bareos-clientonly/distinfo
@@ -1,37 +1,40 @@
 $NetBSD$
 
-SHA1 (bareos-18.2.6.zip) = e09f283a19a1d7fb28f2a587755f9780e9006718
-RMD160 (bareos-18.2.6.zip) = b6174f3eb40c6916238d9546cb59aca82c1aa510
-SHA512 (bareos-18.2.6.zip) = 8e92cbfc463a521c6dc48bd2aa9e0d2ad9814062a69f0c4553f9a65d6663cea9062f082bd755df85732002cc4de4ecb2480e81639a4984b6e2e32688867cf21f
-Size (bareos-18.2.6.zip) = 12919274 bytes
-SHA1 (patch-core_CMakeLists.txt) = a4a5075c40d8019bc0ee2b6af805c019575e22f6
-SHA1 (patch-core_cmake_BareosCheckIncludes.cmake) = a0433a45c9e4795ceb744b8c0589d3dc07a3f97f
-SHA1 (patch-core_cmake_BareosSetVariableDefaults.cmake) = 0fd711f91b369a68a48fb06c279834edcf87451a
+SHA1 (bareos-19.2.7.zip) = 25b07f234de7a2d51e8e2d96b4be07ffc22481c0
+RMD160 (bareos-19.2.7.zip) = a06461cbf4744b94f523a7144e966cf95f11a8ee
+SHA512 (bareos-19.2.7.zip) = d0bf5742e2e19cd340468a26e913a3cb6661f1ee4b4db5d93ac31499d1b67f0368fd651a274c33a9ee3acfea822124cd1021f25cb8303a7a9d63a548fb3223b8
+Size (bareos-19.2.7.zip) = 16666039 bytes
+SHA1 (patch-core_CMakeLists.txt) = a08c50bd2449120cb2c4161aa39a842eab0c230c
+SHA1 (patch-core_cmake_BareosCheckIncludes.cmake) = 8f2a88768acdbe9adf94939ae1dabd3edf40144b
+SHA1 (patch-core_cmake_BareosFindAllLibraries.cmake) = eb33f59f616a5d265a6371dcc028a3031b5dbab5
+SHA1 (patch-core_cmake_BareosSetVariableDefaults.cmake) = a0ff2802d0583fca2685250bd4a5e0c8259837b2
+SHA1 (patch-core_cmake_BareosTimeFunctions.cmake) = aafa1dd9652ae8cc57414a405f03247242100ba9
 SHA1 (patch-core_platforms_netbsd_CMakeLists.txt) = dd6a54bac7e4b51e3f564f83cc7f78a8826a0d8e
 SHA1 (patch-core_platforms_netbsd_chio-changer) = 123f2fd2ec0cddcf4339cf7b0bc28a9f00ba9a06
-SHA1 (patch-core_scripts_CMakeLists.txt) = 844ecbcd8f67f5320cf181bd39b8b67d96abeada
-SHA1 (patch-core_src_CMakeLists.txt) = 6291bb32473cb26ff819f847b9b78d198b53d876
-SHA1 (patch-core_src_cats_CMakeLists.txt) = 628388998e934aa672fc11a027707d394634060b
+SHA1 (patch-core_scripts_CMakeLists.txt) = 421198b1bc6cf0570051c018bf1a22024904412a
+SHA1 (patch-core_src_CMakeLists.txt) = 3db708e8ece43b1087773470a19ea3362aec3d79
 SHA1 (patch-core_src_cats_make__catalog__backup.pl.in) = 0753f31201df7406bf95ef95d420f66f27f8f0e8
 SHA1 (patch-core_src_cats_postgresql__queries.inc) = d255a93a039d671d9dad7b7b096dfff97095aa6e
-SHA1 (patch-core_src_dird_admin.cc) = 409e60dc07d7d6868f108ca05273ddacf166a54c
-SHA1 (patch-core_src_dird_archive.cc) = 62646c9d7ef1bc41a28c346c6c43262e70b189b0
-SHA1 (patch-core_src_dird_authenticate__console.cc) = 09ea4ab585690577fc15e4ccf157808355f80c92
-SHA1 (patch-core_src_dird_backup.cc) = e1b98f38942243dcb050b324577085ed84e2c1f7
-SHA1 (patch-core_src_dird_consolidate.cc) = fa60258e0c383e7a7f85b40501fff414bd123738
-SHA1 (patch-core_src_dird_dird__conf.cc) = 363f1eae9120bb6ed75c7ce1d7f9b0fe5e7f1a9e
-SHA1 (patch-core_src_dird_migrate.cc) = 0983dd880ed3529d162cb7cc28e8589844545899
-SHA1 (patch-core_src_dird_restore.cc) = 964a88c4c9096dfba71daef26cc0accf333f4e76
-SHA1 (patch-core_src_dird_verify.cc) = 5d8d7f0be52c18fbe657ce8dfbf0cf9550bc11b1
-SHA1 (patch-core_src_findlib_find__one.cc) = 3aaf8f0c2c88497a3e91da6ae753aea7197d7012
-SHA1 (patch-core_src_include_version.h) = a3b5ebe76ffc69c488b5fe80742b60800f728f13
-SHA1 (patch-core_src_lib_scsi__lli.cc) = d56c4824168b1f1a14b9207eecf849902fc6b550
+SHA1 (patch-core_src_dird_admin.cc) = 0e361de94ff0763c8ac17f32ccb0115c998a7ec2
+SHA1 (patch-core_src_dird_archive.cc) = fa383d6edb8aec942b6c44a35acf50d5ebe5c888
+SHA1 (patch-core_src_dird_authenticate__console.cc) = c5339303583edda8fc9d0c7e741aa6e6b8fc4306
+SHA1 (patch-core_src_dird_backup.cc) = a416a9342d695aaaf438af87113e34a1c4016ebd
+SHA1 (patch-core_src_dird_consolidate.cc) = 934a87e8e799585c4a5bf53c30b0e670b01f3372
+SHA1 (patch-core_src_dird_dird__conf.cc) = b2d619d164acfa8949e8d10d45972dbce7f3b258
+SHA1 (patch-core_src_dird_migrate.cc) = 694f86a15f532f9c13c387f1617be79342ba6e84
+SHA1 (patch-core_src_dird_restore.cc) = ab2243457a788b963ab2dfc6b03046539ee5d06a
+SHA1 (patch-core_src_dird_verify.cc) = b4f346a62358bffc09d5247d1636e352a2318eb0
+SHA1 (patch-core_src_findlib_acl.cc) = 135b306204ff7bc65216bca3904676707c2cd9af
+SHA1 (patch-core_src_findlib_find__one.cc) = 50eb6d289b7b2a7b33ee5828db31d03169833d9c
+SHA1 (patch-core_src_lib_scsi__lli.cc) = 09aa887d71009baa2ce2203c46c88a89097d6546
+SHA1 (patch-core_src_lib_version.c) = e5b54042969a6e2a9348abf0357730c3ba31b668
 SHA1 (patch-core_src_lmdb_mdb.c) = 70c76d7ecf610edb47afbb91f3c4d500d85583fe
-SHA1 (patch-core_src_ndmp_CMakeLists.txt) = 931815a6cb7c04b540d2299b0cc09e63b7962e27
-SHA1 (patch-core_src_ndmp_ndmos.h) = 9e301b997b591cd487f73028f9386c5992c7ec50
-SHA1 (patch-core_src_plugins_stored_scsicrypto-sd.cc) = 910e270e3613e40fc3b746626dc6aa22710cc767
-SHA1 (patch-core_src_plugins_stored_scsitapealert-sd.cc) = 9bc6d866f819dcff888ae722003fe04bb0d06fcc
-SHA1 (patch-core_src_stored_acquire.cc) = cbdd662743e958df2530c854755ab6cf6fa95740
-SHA1 (patch-core_src_stored_btape.cc) = bae76b268e12e21be4d67aa338ebf60b9e65eeb9
-SHA1 (patch-core_src_stored_dir__cmd.cc) = dc6c2b4644274cab2db2a59005ca05e8cf165c3f
-SHA1 (patch-core_src_stored_label.cc) = 4839b2fbb829de0aa9836e9ac92be5c8592c5b7e
+SHA1 (patch-core_src_plugins_stored_scsicrypto-sd.cc) = d59125fd445536e220140acf16e43605a4a98e9c
+SHA1 (patch-core_src_plugins_stored_scsitapealert-sd.cc) = 92ef75fbddb587957ec972480a87fe0f5b110111
+SHA1 (patch-core_src_stored_acquire.cc) = c239b2a4a3769b3f99315fae5cc5ee564454a1ad
+SHA1 (patch-core_src_stored_bscan.cc) = 5dfcf88e8049c7717f947349fa127495007b65c6
+SHA1 (patch-core_src_stored_btape.cc) = b3e368e049cec3e9a0c86d9ce29489b53592ff33
+SHA1 (patch-core_src_stored_device.cc) = 34b8069d53d67f90dc43ff44893a990aef40e5c5
+SHA1 (patch-core_src_stored_dir__cmd.cc) = 5c4cc412817a8d8d9eb51b563dbd37bc3f7a7aea
+SHA1 (patch-core_src_stored_label.cc) = 669164289bcb7a2d27e8c63db32d6bf84a3be97e
+SHA1 (patch-core_src_stored_mount.cc) = 7d8b822449068b1f6cd3f411535bbbab4fefba0a
diff --git a/bareos/MESSAGE b/bareos/MESSAGE
index 275efec65b..7b87ab6975 100644
--- a/bareos/MESSAGE
+++ b/bareos/MESSAGE
@@ -2,6 +2,6 @@
 $NetBSD: MESSAGE,v 1.4 2007/09/07 15:15:34 ghen Exp $
 
 You can find some useful scripts to create, update and drop the necessary
-databases, privileges and tables in ${PREFIX}/libexec/bareos/.
+databases, privileges and tables in ${PREFIX}/lib/bareos/scripts.
 
 ===========================================================================
diff --git a/bareos/Makefile b/bareos/Makefile
index bdc8d75a41..56ecdd530c 100644
--- a/bareos/Makefile
+++ b/bareos/Makefile
@@ -18,7 +18,7 @@ SUBST_CLASSES+=			fix-paths
 SUBST_STAGE.fix-paths=		pre-configure
 SUBST_MESSAGE.fix-paths=	Fixing paths.
 SUBST_FILES.fix-paths?=
-SUBST_FILES.fix-paths+=		core/src/cats/make_catalog_backup.pl.in
+SUBST_FILES.fix-paths+=	
 SUBST_VARS.fix-paths=		PREFIX
 
 .include "options.mk"
diff --git a/bareos/Makefile.common b/bareos/Makefile.common
index 51a389abf3..58ba5daa6e 100644
--- a/bareos/Makefile.common
+++ b/bareos/Makefile.common
@@ -3,7 +3,7 @@
 # used by wip/bareos-clientonly/Makefile
 
 GITHUB_PROJECT=	bareos
-VERSION=	18.2.6
+VERSION=	19.2.7
 GITHUB_TAG=	Release/${VERSION}
 
 DISTNAME=	bareos-${VERSION}
@@ -22,8 +22,12 @@ ONLY_FOR_PLATFORM=	NetBSD-*-*
 USE_LANGUAGES+=	c c++
 USE_TOOLS+=	awk
 USE_CMAKE=	yes
+USE_LANGUAGES=  c c++
+CMAKE_ARG_PATH= ..
+CONFIGURE_DIRS= core/_build
 
-CONFIGURE_DIRS+=	core
+pre-configure:
+	${MKDIR} ${WRKSRC}/core/_build
 
 BUILD_DEFS+=		VARBASE
 
@@ -66,6 +70,8 @@ FILES_SUBST+=		BAREOS_SD_USER=${BAREOS_SD_USER}
 CMAKE_ARGS+=	-DCMAKE_INSTALL_PREFIX=${PREFIX}
 CMAKE_ARGS+=	-DCMAKE_STAGING_PREFIX=${BUILDLINK_DIR}
 # reduce job log noise: CMAKE_ARGS+=	-DCMAKE_CXX_FLAGS=-DNO_ADV=1
+CMAKE_ARGS+=	-DCMAKE_CXX_FLAGS=-DNO_ADV=1
+CMAKE_ARGS+=	-DSKIP_GTEST=1
 CMAKE_ARGS+=	-Dconfigtemplatedir=${PREFIX}/${CONFIG_TEMPLATE_PATH}
 CMAKE_ARGS+=	-Dworkingdir=${VARBASE}/db/${PKG_SYSCONFSUBDIR}/working
 CMAKE_ARGS+=	-Dsubsysdir=${VARBASE}/db/${PKG_SYSCONFSUBDIR}
diff --git a/bareos/PLIST.common b/bareos/PLIST.common
index b56cbdbb14..d3907aca1e 100644
--- a/bareos/PLIST.common
+++ b/bareos/PLIST.common
@@ -38,22 +38,22 @@ include/bareos/lockmgr.h
 include/bareos/md5.h
 include/bareos/mem_pool.h
 include/bareos/message.h
+include/bareos/messages_resource.h
+include/bareos/messages_resource_items.h
 include/bareos/mntent_cache.h
 include/bareos/parse_conf.h
 include/bareos/plugins.h
 include/bareos/qualified_resource_name_type_converter.h
-include/bareos/queue.h
 include/bareos/rblist.h
 include/bareos/runscript.h
 include/bareos/rwlock.h
 include/bareos/scsi_crypto.h
 include/bareos/scsi_lli.h
 include/bareos/scsi_tapealert.h
-include/bareos/sellist.h
 include/bareos/serial.h
 include/bareos/sha1.h
-include/bareos/smartall.h
 include/bareos/status.h
+include/bareos/thread_list.h
 include/bareos/tls.h
 include/bareos/tls_conf.h
 include/bareos/tree.h
@@ -61,7 +61,6 @@ include/bareos/try_tls_handshake_as_a_server.h
 include/bareos/var.h
 include/bareos/version.h
 include/bareos/watchdog.h
-include/bareos/workq.h
 lib/bareos/backends/libbareoscats-postgresql.so
 lib/bareos/backends/libbareossd-fifo.so
 lib/bareos/backends/libbareossd-gentape.so
@@ -71,6 +70,8 @@ lib/bareos/plugins/BareosDirWrapper.py
 lib/bareos/plugins/BareosFdPluginBaseclass.py
 lib/bareos/plugins/BareosFdPluginLDAP.py
 lib/bareos/plugins/BareosFdPluginLocalFileset.py
+lib/bareos/plugins/BareosFdPluginOvirt.py
+lib/bareos/plugins/BareosFdPluginPerconaXtraBackup.py
 lib/bareos/plugins/BareosFdWrapper.py
 lib/bareos/plugins/BareosSdPluginBaseclass.py
 lib/bareos/plugins/BareosSdWrapper.py
@@ -80,6 +81,8 @@ lib/bareos/plugins/bareos-dir.py.template
 lib/bareos/plugins/bareos-fd-ldap.py
 lib/bareos/plugins/bareos-fd-local-fileset.py
 lib/bareos/plugins/bareos-fd-mock-test.py
+lib/bareos/plugins/bareos-fd-ovirt.py
+lib/bareos/plugins/bareos-fd-percona-xtrabackup.py
 lib/bareos/plugins/bareos-fd.py.template
 lib/bareos/plugins/bareos-sd-class-plugin.py
 lib/bareos/plugins/bareos-sd.py.template
@@ -119,6 +122,7 @@ lib/bareos/scripts/ddl/updates/postgresql.2001_2002.sql
 lib/bareos/scripts/ddl/updates/postgresql.2002_2003.sql
 lib/bareos/scripts/ddl/updates/postgresql.2003_2004.sql
 lib/bareos/scripts/ddl/updates/postgresql.2004_2171.sql
+lib/bareos/scripts/ddl/updates/postgresql.2171_2192.sql
 lib/bareos/scripts/ddl/updates/postgresql.bee.1017_2004.sql
 lib/bareos/scripts/ddl/versions.map
 lib/bareos/scripts/delete_catalog_backup
@@ -132,21 +136,24 @@ lib/bareos/scripts/make_catalog_backup.pl
 lib/bareos/scripts/query.sql
 lib/bareos/scripts/update_bareos_tables
 lib/libbareos.so
-lib/libbareos.so.18
+lib/libbareos.so.19
 lib/libbareos.so.${PKGVERSION}
 lib/libbareoscats.so
-lib/libbareoscats.so.18
+lib/libbareoscats.so.19
 lib/libbareoscats.so.${PKGVERSION}
+lib/libbareosfastlz.so
+lib/libbareosfastlz.so.19
+lib/libbareosfastlz.so.${PKGVERSION}
 lib/libbareosfind.so
-lib/libbareosfind.so.18
+lib/libbareosfind.so.19
 lib/libbareosfind.so.${PKGVERSION}
 lib/libbareoslmdb.so
-lib/libbareoslmdb.so.18
+lib/libbareoslmdb.so.19
 lib/libbareoslmdb.so.${PKGVERSION}
-lib/libbareossd.so
 lib/libbareossd-gentape.so
+lib/libbareossd.so
 lib/libbareossql.so
-lib/libbareossql.so.18
+lib/libbareossql.so.19
 lib/libbareossql.so.${PKGVERSION}
 man/man1/bareos-tray-monitor.1
 man/man1/bconsole.1
@@ -154,6 +161,7 @@ man/man1/bregex.1
 man/man1/bsmtp.1
 man/man1/bwild.1
 man/man8/bareos-dbcheck.8
+man/man8/bareos-dbcopy.8
 man/man8/bareos-dir.8
 man/man8/bareos-fd.8
 man/man8/bareos-sd.8
@@ -168,6 +176,7 @@ man/man8/btape.8
 man/man8/btraceback.8
 sbin/bareos
 sbin/bareos-dbcheck
+sbin/bareos-dbcopy
 sbin/bareos-dir
 sbin/bareos-fd
 sbin/bareos-sd
@@ -194,10 +203,12 @@ share/examples/bareos/configtemplates/bareos-dir.d/fileset/LinuxAll.conf
 share/examples/bareos/configtemplates/bareos-dir.d/fileset/SelfTest.conf
 share/examples/bareos/configtemplates/bareos-dir.d/fileset/Windows All Drives.conf
 share/examples/bareos/configtemplates/bareos-dir.d/fileset/plugin-ldap.conf.example
+share/examples/bareos/configtemplates/bareos-dir.d/fileset/plugin-ovirt.conf.example
 share/examples/bareos/configtemplates/bareos-dir.d/job/BackupCatalog.conf
 share/examples/bareos/configtemplates/bareos-dir.d/job/RestoreFiles.conf
 share/examples/bareos/configtemplates/bareos-dir.d/job/backup-bareos-fd.conf
 share/examples/bareos/configtemplates/bareos-dir.d/job/backup-ldap.conf.example
+share/examples/bareos/configtemplates/bareos-dir.d/job/backup-ovirt.conf.example
 share/examples/bareos/configtemplates/bareos-dir.d/job/restore-ldap.conf.example
 share/examples/bareos/configtemplates/bareos-dir.d/jobdefs/DefaultJob.conf
 share/examples/bareos/configtemplates/bareos-dir.d/messages/Daemon.conf
@@ -227,5 +238,6 @@ share/examples/bareos/configtemplates/bareos-sd.d/messages/Standard.conf
 share/examples/bareos/configtemplates/bareos-sd.d/storage/bareos-sd.conf
 share/examples/bareos/configtemplates/bconsole.conf
 @pkgdir share/examples/bareos/configtemplates/bareos-sd.d/ndmp
+@pkgdir share/examples/bareos/configtemplates/bareos-dir.d/user
 @pkgdir share/examples/bareos/configtemplates/bareos-dir.d/counter
 @pkgdir share/examples/bareos/configtemplates/bareos-dir-export/client
diff --git a/bareos/distinfo b/bareos/distinfo
index 9efe6d58d4..f83da20854 100644
--- a/bareos/distinfo
+++ b/bareos/distinfo
@@ -1,36 +1,40 @@
 $NetBSD$
 
-SHA1 (bareos-18.2.6.zip) = e09f283a19a1d7fb28f2a587755f9780e9006718
-RMD160 (bareos-18.2.6.zip) = b6174f3eb40c6916238d9546cb59aca82c1aa510
-SHA512 (bareos-18.2.6.zip) = 8e92cbfc463a521c6dc48bd2aa9e0d2ad9814062a69f0c4553f9a65d6663cea9062f082bd755df85732002cc4de4ecb2480e81639a4984b6e2e32688867cf21f
-Size (bareos-18.2.6.zip) = 12919274 bytes
-SHA1 (patch-core_CMakeLists.txt) = a4a5075c40d8019bc0ee2b6af805c019575e22f6
-SHA1 (patch-core_cmake_BareosCheckIncludes.cmake) = a0433a45c9e4795ceb744b8c0589d3dc07a3f97f
-SHA1 (patch-core_cmake_BareosSetVariableDefaults.cmake) = 0fd711f91b369a68a48fb06c279834edcf87451a
+SHA1 (bareos-19.2.7.zip) = 25b07f234de7a2d51e8e2d96b4be07ffc22481c0
+RMD160 (bareos-19.2.7.zip) = a06461cbf4744b94f523a7144e966cf95f11a8ee
+SHA512 (bareos-19.2.7.zip) = d0bf5742e2e19cd340468a26e913a3cb6661f1ee4b4db5d93ac31499d1b67f0368fd651a274c33a9ee3acfea822124cd1021f25cb8303a7a9d63a548fb3223b8
+Size (bareos-19.2.7.zip) = 16666039 bytes
+SHA1 (patch-core_CMakeLists.txt) = a08c50bd2449120cb2c4161aa39a842eab0c230c
+SHA1 (patch-core_cmake_BareosCheckIncludes.cmake) = 8f2a88768acdbe9adf94939ae1dabd3edf40144b
+SHA1 (patch-core_cmake_BareosFindAllLibraries.cmake) = eb33f59f616a5d265a6371dcc028a3031b5dbab5
+SHA1 (patch-core_cmake_BareosSetVariableDefaults.cmake) = a0ff2802d0583fca2685250bd4a5e0c8259837b2
+SHA1 (patch-core_cmake_BareosTimeFunctions.cmake) = aafa1dd9652ae8cc57414a405f03247242100ba9
 SHA1 (patch-core_platforms_netbsd_CMakeLists.txt) = dd6a54bac7e4b51e3f564f83cc7f78a8826a0d8e
 SHA1 (patch-core_platforms_netbsd_chio-changer) = 123f2fd2ec0cddcf4339cf7b0bc28a9f00ba9a06
-SHA1 (patch-core_scripts_CMakeLists.txt) = 844ecbcd8f67f5320cf181bd39b8b67d96abeada
-SHA1 (patch-core_src_CMakeLists.txt) = 6291bb32473cb26ff819f847b9b78d198b53d876
+SHA1 (patch-core_scripts_CMakeLists.txt) = 421198b1bc6cf0570051c018bf1a22024904412a
+SHA1 (patch-core_src_CMakeLists.txt) = 3db708e8ece43b1087773470a19ea3362aec3d79
 SHA1 (patch-core_src_cats_make__catalog__backup.pl.in) = 0753f31201df7406bf95ef95d420f66f27f8f0e8
 SHA1 (patch-core_src_cats_postgresql__queries.inc) = d255a93a039d671d9dad7b7b096dfff97095aa6e
-SHA1 (patch-core_src_dird_admin.cc) = 409e60dc07d7d6868f108ca05273ddacf166a54c
-SHA1 (patch-core_src_dird_archive.cc) = 62646c9d7ef1bc41a28c346c6c43262e70b189b0
-SHA1 (patch-core_src_dird_authenticate__console.cc) = 09ea4ab585690577fc15e4ccf157808355f80c92
-SHA1 (patch-core_src_dird_backup.cc) = e1b98f38942243dcb050b324577085ed84e2c1f7
-SHA1 (patch-core_src_dird_consolidate.cc) = fa60258e0c383e7a7f85b40501fff414bd123738
-SHA1 (patch-core_src_dird_dird__conf.cc) = 363f1eae9120bb6ed75c7ce1d7f9b0fe5e7f1a9e
-SHA1 (patch-core_src_dird_migrate.cc) = 0983dd880ed3529d162cb7cc28e8589844545899
-SHA1 (patch-core_src_dird_restore.cc) = 964a88c4c9096dfba71daef26cc0accf333f4e76
-SHA1 (patch-core_src_dird_verify.cc) = 5d8d7f0be52c18fbe657ce8dfbf0cf9550bc11b1
-SHA1 (patch-core_src_findlib_find__one.cc) = 3aaf8f0c2c88497a3e91da6ae753aea7197d7012
-SHA1 (patch-core_src_include_version.h) = a3b5ebe76ffc69c488b5fe80742b60800f728f13
-SHA1 (patch-core_src_lib_scsi__lli.cc) = d56c4824168b1f1a14b9207eecf849902fc6b550
+SHA1 (patch-core_src_dird_admin.cc) = 0e361de94ff0763c8ac17f32ccb0115c998a7ec2
+SHA1 (patch-core_src_dird_archive.cc) = fa383d6edb8aec942b6c44a35acf50d5ebe5c888
+SHA1 (patch-core_src_dird_authenticate__console.cc) = c5339303583edda8fc9d0c7e741aa6e6b8fc4306
+SHA1 (patch-core_src_dird_backup.cc) = a416a9342d695aaaf438af87113e34a1c4016ebd
+SHA1 (patch-core_src_dird_consolidate.cc) = 934a87e8e799585c4a5bf53c30b0e670b01f3372
+SHA1 (patch-core_src_dird_dird__conf.cc) = b2d619d164acfa8949e8d10d45972dbce7f3b258
+SHA1 (patch-core_src_dird_migrate.cc) = 694f86a15f532f9c13c387f1617be79342ba6e84
+SHA1 (patch-core_src_dird_restore.cc) = ab2243457a788b963ab2dfc6b03046539ee5d06a
+SHA1 (patch-core_src_dird_verify.cc) = b4f346a62358bffc09d5247d1636e352a2318eb0
+SHA1 (patch-core_src_findlib_acl.cc) = 135b306204ff7bc65216bca3904676707c2cd9af
+SHA1 (patch-core_src_findlib_find__one.cc) = 50eb6d289b7b2a7b33ee5828db31d03169833d9c
+SHA1 (patch-core_src_lib_scsi__lli.cc) = 09aa887d71009baa2ce2203c46c88a89097d6546
+SHA1 (patch-core_src_lib_version.c) = e5b54042969a6e2a9348abf0357730c3ba31b668
 SHA1 (patch-core_src_lmdb_mdb.c) = 70c76d7ecf610edb47afbb91f3c4d500d85583fe
-SHA1 (patch-core_src_ndmp_CMakeLists.txt) = 931815a6cb7c04b540d2299b0cc09e63b7962e27
-SHA1 (patch-core_src_ndmp_ndmos.h) = 9e301b997b591cd487f73028f9386c5992c7ec50
-SHA1 (patch-core_src_plugins_stored_scsicrypto-sd.cc) = 910e270e3613e40fc3b746626dc6aa22710cc767
-SHA1 (patch-core_src_plugins_stored_scsitapealert-sd.cc) = 9bc6d866f819dcff888ae722003fe04bb0d06fcc
-SHA1 (patch-core_src_stored_acquire.cc) = cbdd662743e958df2530c854755ab6cf6fa95740
-SHA1 (patch-core_src_stored_btape.cc) = bae76b268e12e21be4d67aa338ebf60b9e65eeb9
-SHA1 (patch-core_src_stored_dir__cmd.cc) = dc6c2b4644274cab2db2a59005ca05e8cf165c3f
-SHA1 (patch-core_src_stored_label.cc) = 4839b2fbb829de0aa9836e9ac92be5c8592c5b7e
+SHA1 (patch-core_src_plugins_stored_scsicrypto-sd.cc) = d59125fd445536e220140acf16e43605a4a98e9c
+SHA1 (patch-core_src_plugins_stored_scsitapealert-sd.cc) = 92ef75fbddb587957ec972480a87fe0f5b110111
+SHA1 (patch-core_src_stored_acquire.cc) = c239b2a4a3769b3f99315fae5cc5ee564454a1ad
+SHA1 (patch-core_src_stored_bscan.cc) = 5dfcf88e8049c7717f947349fa127495007b65c6
+SHA1 (patch-core_src_stored_btape.cc) = b3e368e049cec3e9a0c86d9ce29489b53592ff33
+SHA1 (patch-core_src_stored_device.cc) = 34b8069d53d67f90dc43ff44893a990aef40e5c5
+SHA1 (patch-core_src_stored_dir__cmd.cc) = 5c4cc412817a8d8d9eb51b563dbd37bc3f7a7aea
+SHA1 (patch-core_src_stored_label.cc) = 669164289bcb7a2d27e8c63db32d6bf84a3be97e
+SHA1 (patch-core_src_stored_mount.cc) = 7d8b822449068b1f6cd3f411535bbbab4fefba0a
diff --git a/bareos/patches/patch-core_CMakeLists.txt b/bareos/patches/patch-core_CMakeLists.txt
index 8cf181512f..0cb4b253ce 100644
--- a/bareos/patches/patch-core_CMakeLists.txt
+++ b/bareos/patches/patch-core_CMakeLists.txt
@@ -4,13 +4,12 @@ $NetBSD$
 	Due to current lack of XDR quad marshalling NDMP
 	need to be disabled.
 
---- core/CMakeLists.txt.orig	2019-02-13 14:25:55.000000000 +0000
+--- core/CMakeLists.txt.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/CMakeLists.txt
-@@ -119,6 +119,16 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBS
-    link_libraries(intl)
+@@ -264,6 +264,15 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD
+   link_libraries(intl)
  endif()
  
-+ 
 +if (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
 +   set(HAVE_NETBSD_OS 1)
 +   set(ndmp 0)
@@ -20,14 +19,24 @@ $NetBSD$
 +   link_libraries(intl)
 +endif()
 +
- IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-    set(HAVE_DARWIN_OS 1)
-    #set(CMAKE_INCLUDE_PATH  "${OPENSSL_INCLUDE_DIR}:${CMAKE_INCLUDE_PATH}")
-@@ -477,6 +487,7 @@ if ("${HAVE_CAPABILITY}")
-    message( STATUS "CAPABILITY set")
- endif()
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+   set(HAVE_DARWIN_OS 1)
+   # set(CMAKE_INCLUDE_PATH  "${OPENSSL_INCLUDE_DIR}:${CMAKE_INCLUDE_PATH}")
+@@ -652,6 +661,7 @@ try_compile(
+   ${PROJECT_SOURCE_DIR}/src/compile_tests/trivially_copyable.cc
+ )
  
 +set(HAVE_NDMP 0)
- set(ndmp "${ndmp}" )
- set(lmdb "${lmdb}" )
- set(build_client_only "${client-only}" )
+ set(ndmp "${ndmp}")
+ set(lmdb "${lmdb}")
+ set(build_client_only "${client-only}")
+@@ -666,7 +676,8 @@ if(${acl})
+       set(HAVE_ACL 1)
+       message(STATUS "acl found, libs: ${ACL_LIBS}")
+     else()
+-      message(FATAL_ERROR "build with acl requested, but lib not found")
++      # message(FATAL_ERROR "build with acl requested, but lib not found")
++      set(acl OFF)
+     endif()
+   endif()
+ endif()
diff --git a/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake b/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake
index 090eec4b1f..74d5b29bc9 100644
--- a/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake
+++ b/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake
@@ -2,23 +2,23 @@ $NetBSD$
 
 	Fix header file checks for NetBSD
 
---- core/cmake/BareosCheckIncludes.cmake.orig	2018-12-20 08:51:51.000000000 +0000
+--- core/cmake/BareosCheckIncludes.cmake.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/cmake/BareosCheckIncludes.cmake
-@@ -56,7 +56,7 @@ CHECK_INCLUDE_FILES(sys/dl.h HAVE_SYS_DL
- CHECK_INCLUDE_FILES(sys/ea.h HAVE_SYS_EA_H)
- CHECK_INCLUDE_FILES("sys/types.h;sys/extattr.h" HAVE_SYS_EXTATTR_H)
- CHECK_INCLUDE_FILES(sys/ioctl.h HAVE_SYS_IOCTL_H)
--CHECK_INCLUDE_FILES(sys/mtio.h HAVE_SYS_MTIO_H)
-+CHECK_INCLUDE_FILES("sys/types.h;sys/mtio.h" HAVE_SYS_MTIO_H)
- CHECK_INCLUDE_FILES(sys/ndir.h HAVE_SYS_NDIR_H)
- CHECK_INCLUDE_FILES(sys/nvpair.h HAVE_SYS_NVPAIR_H)
- CHECK_INCLUDE_FILES(sys/select.h HAVE_SYS_SELECT_H)
-@@ -135,7 +135,7 @@ CHECK_INCLUDE_FILES(term.h HAVE_TERM_H)
- CHECK_INCLUDE_FILES("sys/types.h;sys/scsi/impl/uscsi.h" HAVE_SYS_SCSI_IMPL_USCSI_H)
- CHECK_INCLUDE_FILES("stdio.h;camlib.h" HAVE_CAMLIB_H)
- CHECK_INCLUDE_FILES(cam/scsi/scsi_message.h HAVE_CAM_SCSI_SCSI_MESSAGE_H)
--CHECK_INCLUDE_FILES(dev/scsipi/scsipi_all.h HAVE_DEV_SCSIPI_SCSIPI_ALL_H)
-+CHECK_INCLUDE_FILES("sys/types.h;dev/scsipi/scsipi_all.h" HAVE_DEV_SCSIPI_SCSIPI_ALL_H)
+@@ -55,7 +55,7 @@ check_include_files(sys/dl.h HAVE_SYS_DL
+ check_include_files(sys/ea.h HAVE_SYS_EA_H)
+ check_include_files("sys/types.h;sys/extattr.h" HAVE_SYS_EXTATTR_H)
+ check_include_files(sys/ioctl.h HAVE_SYS_IOCTL_H)
+-check_include_files(sys/mtio.h HAVE_SYS_MTIO_H)
++check_include_files("sys/types.h;sys/mtio.h" HAVE_SYS_MTIO_H)
+ check_include_files(sys/ndir.h HAVE_SYS_NDIR_H)
+ check_include_files(sys/nvpair.h HAVE_SYS_NVPAIR_H)
+ check_include_files(sys/select.h HAVE_SYS_SELECT_H)
+@@ -134,7 +134,7 @@ check_include_files("sys/types.h;sys/scs
+                     HAVE_SYS_SCSI_IMPL_USCSI_H)
+ check_include_files("stdio.h;camlib.h" HAVE_CAMLIB_H)
+ check_include_files(cam/scsi/scsi_message.h HAVE_CAM_SCSI_SCSI_MESSAGE_H)
+-check_include_files(dev/scsipi/scsipi_all.h HAVE_DEV_SCSIPI_SCSIPI_ALL_H)
++check_include_files("sys/types.h;dev/scsipi/scsipi_all.h" HAVE_DEV_SCSIPI_SCSIPI_ALL_H)
  
- CHECK_INCLUDE_FILES(scsi/uscsi_all.h HAVE_USCSI_ALL_H)
- CHECK_INCLUDE_FILES(scsi/uscsi_all.h HAVE_SCSI_USCSI_ALL_H)
+ check_include_files(scsi/uscsi_all.h HAVE_USCSI_ALL_H)
+ check_include_files(scsi/uscsi_all.h HAVE_SCSI_USCSI_ALL_H)
diff --git a/bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake b/bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake
new file mode 100644
index 0000000000..efadf19c44
--- /dev/null
+++ b/bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake
@@ -0,0 +1,17 @@
+$NetBSD$
+
+provide a way to disable googletest which may be found by
+cmake but it is not in buildlink. can be optionalized
+later.
+
+--- core/cmake/BareosFindAllLibraries.cmake.orig	2020-06-23 13:14:52.254196443 +0000
++++ core/cmake/BareosFindAllLibraries.cmake
+@@ -82,7 +82,7 @@ bareosfindlibrary("util")
+ bareosfindlibrary("dl")
+ bareosfindlibrary("acl")
+ # BareosFindLibrary("wrap")
+-if (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES SunPro)
++if (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES SunPro AND NOT SKIP_GTEST)
+   bareosfindlibrary("gtest")
+   bareosfindlibrary("gtest_main")
+   bareosfindlibrary("gmock")
diff --git a/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake b/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake
index c74486c25f..81fc63d10f 100644
--- a/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake
+++ b/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake
@@ -1,26 +1,24 @@
 $NetBSD$
 
-	Make logdir absolute (XXX really needed?)
-	Add setting of NDMP feature
+provide absolute paths
 
---- core/cmake/BareosSetVariableDefaults.cmake.orig	2019-02-13 14:25:55.000000000 +0000
+--- core/cmake/BareosSetVariableDefaults.cmake.orig	2020-06-22 13:09:58.135202289 +0000
 +++ core/cmake/BareosSetVariableDefaults.cmake
-@@ -231,7 +231,7 @@ ELSE() # IF (${CMAKE_SYSTEM_NAME} MATCHE
+@@ -124,7 +124,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin"
  
    # logdir
-   IF(NOT DEFINED logdir)
+   if(NOT DEFINED logdir)
 -    set(logdir "${CMAKE_INSTALL_LOCALSTATEDIR}/log/${CMAKE_PROJECT_NAME}")
 +    set(logdir "/${CMAKE_INSTALL_LOCALSTATEDIR}/log/${CMAKE_PROJECT_NAME}")
-   ENDIF()
+   endif()
  
    # datarootdir
-@@ -438,6 +438,9 @@ ENDIF()
+@@ -412,6 +412,8 @@ endif()
  # ndmp
- IF(NOT DEFINED ndmp)
-    SET(ndmp ON)
-+   SET(HAVE_NDMP 1)
-+ELSE()
-+   SET(HAVE_NDMP 0)
- ENDIF()
+ if(NOT DEFINED ndmp)
+   set(ndmp ON)
++else()
++  set(ndmp OFF)
+ endif()
  
  # ipv6
diff --git a/bareos/patches/patch-core_cmake_BareosTimeFunctions.cmake b/bareos/patches/patch-core_cmake_BareosTimeFunctions.cmake
new file mode 100644
index 0000000000..0ce251aff7
--- /dev/null
+++ b/bareos/patches/patch-core_cmake_BareosTimeFunctions.cmake
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Use the POSIX compatible way of doing date calculations.
+
+--- core/cmake/BareosTimeFunctions.cmake.orig	2020-04-16 08:31:41.000000000 +0000
++++ core/cmake/BareosTimeFunctions.cmake
+@@ -37,8 +37,8 @@ function(
+     execute_process(
+       COMMAND
+         ${DATECMD}
+-        --utc
+-        "--date=@${at}"
++        -u
++        "-d @${at}"
+         "+${format}"
+       OUTPUT_VARIABLE out
+       OUTPUT_STRIP_TRAILING_WHITESPACE
diff --git a/bareos/patches/patch-core_scripts_CMakeLists.txt b/bareos/patches/patch-core_scripts_CMakeLists.txt
index 5124270239..85305231d3 100644
--- a/bareos/patches/patch-core_scripts_CMakeLists.txt
+++ b/bareos/patches/patch-core_scripts_CMakeLists.txt
@@ -1,47 +1,44 @@
 $NetBSD$
 
-	Install mtx-changer script if mtx is available
+suppress mtx-changer installation if not found
 
---- core/scripts/CMakeLists.txt.orig	2019-02-13 14:25:55.000000000 +0000
+--- core/scripts/CMakeLists.txt.orig	2020-06-22 13:14:51.366971896 +0000
 +++ core/scripts/CMakeLists.txt
-@@ -41,7 +41,6 @@ INSTALL(FILES
+@@ -42,18 +42,30 @@ install(
  
- IF(NOT client-only)
-    INSTALL(FILES
--         mtx-changer
-          disk-changer
-          bareos-explorer
-          bareos-glusterfind-wrapper
-@@ -54,12 +53,26 @@ IF(NOT client-only)
-          DESTINATION "${scriptdir}")
+ if(NOT client-only)
+   install(
+-    FILES mtx-changer disk-changer bareos-explorer bareos-glusterfind-wrapper
++    FILES disk-changer bareos-explorer bareos-glusterfind-wrapper
+           bareos-ctl-dir bareos-ctl-sd bareos-ctl-funcs
+     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
+                 WORLD_READ WORLD_EXECUTE
+     DESTINATION "${scriptdir}"
+   )
  
-    INSTALL(FILES
--            mtx-changer.conf
-             bareos-regress.conf
--            DESTINATION "${confdir}")
-+            DESTINATION "${configtemplatedir}")
+-  install(FILES mtx-changer.conf bareos-regress.conf DESTINATION "${confdir}")
++  install(FILES bareos-regress.conf DESTINATION "${configtemplatedir}")
  
--   INSTALL(FILES
--          logrotate
--          DESTINATION "${sysconfdir}/logrotate.d"
--          RENAME bareos-dir)
-+   IF(NOT ${MTX} STREQUAL "MTX-NOTFOUND")
-+         INSTALL(FILES
-+                 mtx-changer
-+                 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
-+                             GROUP_READ GROUP_EXECUTE
-+                             WORLD_READ WORLD_EXECUTE
-+                 DESTINATION "${scriptdir}")
+-  install(
+-    FILES logrotate
+-    DESTINATION "${sysconfdir}/logrotate.d"
+-    RENAME bareos-dir
+-  )
++  if(NOT ${MTX} STREQUAL "MTX-NOTFOUND")
++    install(
++      FILES mtx-changer
++      PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
++		  WORLD_READ WORLD_EXECUTE
++      DESTINATION "${scriptdir}"
++    )
++    install(FILES mtx-changer.conf DESTINATION "${configtemplatedir}")
++  endif()
 +
-+         INSTALL(FILES
-+                 mtx-changer.conf
-+                 DESTINATION "${configtemplatedir}")
-+   ENDIF()
-+
-+   IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
-+   	INSTALL(FILES
-+          	logrotate
-+          	DESTINATION "${sysconfdir}/logrotate.d"
-+          	RENAME bareos-dir)
-+   ENDIF()
- ENDIF()
++  if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
++    install(
++      FILES logrotate
++      DESTINATION "${sysconfdir}/logrotate.d"
++      RENAME bareos-dir
++    )
++  endif()
+ endif()
diff --git a/bareos/patches/patch-core_src_CMakeLists.txt b/bareos/patches/patch-core_src_CMakeLists.txt
index b6ccf71c1a..af52b7d6d7 100644
--- a/bareos/patches/patch-core_src_CMakeLists.txt
+++ b/bareos/patches/patch-core_src_CMakeLists.txt
@@ -1,15 +1,15 @@
 $NetBSD$
 
-	Add ndmp driectory if the NDMP feature is requested
+make ndmp conditional
 
---- core/src/CMakeLists.txt.orig	2019-02-13 14:25:55.000000000 +0000
+--- core/src/CMakeLists.txt.orig	2020-06-22 13:23:09.152706321 +0000
 +++ core/src/CMakeLists.txt
-@@ -23,7 +23,7 @@ IF(NOT client-only)
-       add_subdirectory(tests)
-    ENDIF()
-    add_subdirectory(cats)
--   IF(NOT HAVE_WIN32 AND ndmp)
-+   IF(NOT HAVE_NDMP AND ndmp)
-       add_subdirectory(ndmp)
-    ENDIF()
-    add_subdirectory(dird)
+@@ -20,7 +20,7 @@
+ if(NOT client-only)
+   add_subdirectory(tools)
+   add_subdirectory(cats)
+-  if(NOT HAVE_WIN32 AND ndmp)
++  if(HAVE_NDMP AND ndmp)
+     add_subdirectory(ndmp)
+   endif()
+   add_subdirectory(dird)
diff --git a/bareos/patches/patch-core_src_dird_admin.cc b/bareos/patches/patch-core_src_dird_admin.cc
index 9232cc3726..4a25fe4cd5 100644
--- a/bareos/patches/patch-core_src_dird_admin.cc
+++ b/bareos/patches/patch-core_src_dird_admin.cc
@@ -2,25 +2,22 @@ $NetBSD$
 
 	Remove inadequate clutter in production messages
 
---- core/src/dird/admin.cc.orig	2019-01-31 11:39:26.000000000 +0000
+--- core/src/dird/admin.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/dird/admin.cc
-@@ -118,7 +118,9 @@ void AdminCleanup(JobControlRecord *jcr,
-         "  Scheduled time:         %s\n"
-         "  Start time:             %s\n"
-         "  End time:               %s\n"
+@@ -120,10 +120,15 @@ void AdminCleanup(JobControlRecord* jcr,
+          "  Scheduled time:         %s\n"
+          "  Start time:             %s\n"
+          "  End time:               %s\n"
 +#ifndef NO_ADV
-         "  Bareos binary info:     %s\n"
+          "  Bareos binary info:     %s\n"
 +#endif
-         "  Termination:            %s\n\n"),
-         edt,
-         jcr->jr.JobId,
-@@ -126,7 +128,9 @@ void AdminCleanup(JobControlRecord *jcr,
-         schedt,
-         sdt,
-         edt,
+          "  Termination:            %s\n\n"),
+        kBareosVersionStrings.Full, kBareosVersionStrings.ShortDate, edt, jcr->impl->jr.JobId,
+-       jcr->impl->jr.Job, schedt, sdt, edt, kBareosVersionStrings.JoblogMessage,
++       jcr->impl->jr.Job, schedt, sdt, edt,
 +#ifndef NO_ADV
-         BAREOS_JOBLOG_MESSAGE,
++       kBareosVersionStrings.JoblogMessage,
 +#endif
-         TermMsg);
+        TermMsg);
  
-    Dmsg0(debuglevel, "Leave AdminCleanup()\n");
+   Dmsg0(debuglevel, "Leave AdminCleanup()\n");
diff --git a/bareos/patches/patch-core_src_dird_archive.cc b/bareos/patches/patch-core_src_dird_archive.cc
index 5e5bd8b126..2b758ea601 100644
--- a/bareos/patches/patch-core_src_dird_archive.cc
+++ b/bareos/patches/patch-core_src_dird_archive.cc
@@ -2,25 +2,23 @@ $NetBSD$
 
 	Remove inadequate clutter in production messages
 
---- core/src/dird/archive.cc.orig	2019-02-01 07:12:55.170024679 +0000
+--- core/src/dird/archive.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/dird/archive.cc
-@@ -117,7 +117,9 @@ void ArchiveCleanup(JobControlRecord *jc
-         "  Scheduled time:         %s\n"
-         "  Start time:             %s\n"
-         "  End time:               %s\n"
+@@ -120,11 +120,16 @@ void ArchiveCleanup(JobControlRecord* jc
+          "  Scheduled time:         %s\n"
+          "  Start time:             %s\n"
+          "  End time:               %s\n"
 +#ifndef NO_ADV
-         "  Bareos binary info:     %s\n"
+          "  Bareos binary info:     %s\n"
 +#endif
-         "  Termination:            %s\n\n"),
-         edt,
-         jcr->jr.JobId,
-@@ -125,7 +127,9 @@ void ArchiveCleanup(JobControlRecord *jc
-         schedt,
-         sdt,
-         edt,
+          "  Termination:            %s\n\n"),
+        kBareosVersionStrings.Full, kBareosVersionStrings.ShortDate, edt,
+        jcr->impl->jr.JobId, jcr->impl->jr.Job, schedt, sdt, edt,
+-       kBareosVersionStrings.JoblogMessage, TermMsg);
 +#ifndef NO_ADV
-         BAREOS_JOBLOG_MESSAGE,
++       kBareosVersionStrings.JoblogMessage,
 +#endif
-         TermMsg);
++       TermMsg);
  
-    Dmsg0(debuglevel, "Leave ArchiveCleanup()\n");
+   Dmsg0(debuglevel, "Leave ArchiveCleanup()\n");
+ }
diff --git a/bareos/patches/patch-core_src_dird_authenticate__console.cc b/bareos/patches/patch-core_src_dird_authenticate__console.cc
index 02f943db6d..56d845d283 100644
--- a/bareos/patches/patch-core_src_dird_authenticate__console.cc
+++ b/bareos/patches/patch-core_src_dird_authenticate__console.cc
@@ -2,18 +2,18 @@ $NetBSD$
 
 	Remove inadequate clutter in production messages
 
---- core/src/dird/authenticate_console.cc.orig	2019-02-01 07:13:31.178559767 +0000
+--- core/src/dird/authenticate_console.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/dird/authenticate_console.cc
-@@ -204,10 +204,12 @@ bool ConsoleAuthenticatorFrom_18_2::Send
+@@ -216,10 +216,12 @@ bool ConsoleAuthenticatorFrom_18_2::Send
  bool ConsoleAuthenticatorFrom_18_2::SendInfoMessage()
  {
    std::string message;
 +#ifndef NO_ADV
-   message += BAREOS_BINARY_INFO;
+   message += kBareosVersionStrings.BinaryInfo;
    message += " binary\n";
-   message += BAREOS_SERVICES_MESSAGE;
+   message += kBareosVersionStrings.ServicesMessage;
    message += "\n";
 +#endif
    message += "You are ";
-   if (ua_->cons) {
+   if (ua_->user_acl) {
      message += "logged in as: ";
diff --git a/bareos/patches/patch-core_src_dird_backup.cc b/bareos/patches/patch-core_src_dird_backup.cc
index a091602895..470dfc2281 100644
--- a/bareos/patches/patch-core_src_dird_backup.cc
+++ b/bareos/patches/patch-core_src_dird_backup.cc
@@ -2,9 +2,9 @@ $NetBSD$
 
 	Remove inadequate clutter in production messages
 
---- core/src/dird/backup.cc.orig	2019-02-01 07:24:50.329931934 +0000
+--- core/src/dird/backup.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/dird/backup.cc
-@@ -1216,7 +1216,9 @@ void GenerateBackupSummary(JobControlRec
+@@ -1194,7 +1194,9 @@ void GenerateBackupSummary(JobControlRec
          "  Last Volume Bytes:      %s (%sB)\n"
          "%s"                                        /* Daemon status info */
          "%s"                                        /* SecureErase status */
@@ -12,15 +12,15 @@ $NetBSD$
          "  Bareos binary info:     %s\n"
 +#endif
          "  Termination:            %s\n\n"),
-         BAREOS, my_name, VERSION, LSMDATE,
+         BAREOS, my_name, kBareosVersionStrings.Full, kBareosVersionStrings.ShortDate,
          HOST_OS, DISTNAME, DISTVER,
-@@ -1244,7 +1246,9 @@ void GenerateBackupSummary(JobControlRec
+@@ -1222,7 +1224,9 @@ void GenerateBackupSummary(JobControlRec
          edit_uint64_with_suffix(mr.VolBytes, ec8),
          daemon_status.c_str(),
          secure_erase_status.c_str(),
 +#ifndef NO_ADV
-         BAREOS_JOBLOG_MESSAGE,
+         kBareosVersionStrings.JoblogMessage,
 +#endif
          TermMsg);
- }
- } /* namespace directordaemon */
+ 
+   /* clang-format on */
diff --git a/bareos/patches/patch-core_src_dird_consolidate.cc b/bareos/patches/patch-core_src_dird_consolidate.cc
index a922ac186f..c14453dbfb 100644
--- a/bareos/patches/patch-core_src_dird_consolidate.cc
+++ b/bareos/patches/patch-core_src_dird_consolidate.cc
@@ -2,25 +2,23 @@ $NetBSD$
 
 	Remove inadequate clutter in production messages
 
---- core/src/dird/consolidate.cc.orig	2019-02-01 07:25:12.470246640 +0000
+--- core/src/dird/consolidate.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/dird/consolidate.cc
-@@ -350,7 +350,9 @@ void ConsolidateCleanup(JobControlRecord
-         "  Scheduled time:         %s\n"
-         "  Start time:             %s\n"
-         "  End time:               %s\n"
+@@ -384,11 +384,16 @@ void ConsolidateCleanup(JobControlRecord
+          "  Scheduled time:         %s\n"
+          "  Start time:             %s\n"
+          "  End time:               %s\n"
 +#ifndef NO_ADV
-         "  Bareos binary info:     %s\n"
+          "  Bareos binary info:     %s\n"
 +#endif
-         "  Termination:            %s\n\n"),
-         edt,
-         jcr->jr.JobId,
-@@ -358,7 +360,9 @@ void ConsolidateCleanup(JobControlRecord
-         schedt,
-         sdt,
-         edt,
+          "  Termination:            %s\n\n"),
+        kBareosVersionStrings.Full, kBareosVersionStrings.ShortDate, edt,
+        jcr->impl->jr.JobId, jcr->impl->jr.Job, schedt, sdt, edt,
+-       kBareosVersionStrings.JoblogMessage, TermMsg);
 +#ifndef NO_ADV
-         BAREOS_JOBLOG_MESSAGE,
++       kBareosVersionStrings.JoblogMessage,
 +#endif
-         TermMsg);
++       TermMsg);
  
-    Dmsg0(debuglevel, "Leave ConsolidateCleanup()\n");
+   Dmsg0(debuglevel, "Leave ConsolidateCleanup()\n");
+ }
diff --git a/bareos/patches/patch-core_src_dird_dird__conf.cc b/bareos/patches/patch-core_src_dird_dird__conf.cc
index ab7aa32823..d9f3da5943 100644
--- a/bareos/patches/patch-core_src_dird_dird__conf.cc
+++ b/bareos/patches/patch-core_src_dird_dird__conf.cc
@@ -2,15 +2,15 @@ $NetBSD$
 
 	Add dumping of Honor No Dump Flag
 
---- core/src/dird/dird_conf.cc.orig	2019-01-19 22:29:21.418231855 +0000
+--- core/src/dird/dird_conf.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/dird/dird_conf.cc
-@@ -2043,6 +2043,9 @@ bool FilesetResource::PrintConfig(PoolMe
-                   case 'M':                 /* MD5 */
-                      IndentConfigItem(cfg_str, 3, "Signature = MD5\n");
-                      break;
-+                  case 'N':                 /* Honor No Dump Flag */
-+                     IndentConfigItem(cfg_str, 3, "Honor No Dump Flag = Yes\n");
-+                     break;
-                   case 'n':
-                      IndentConfigItem(cfg_str, 3, "Replace = Never\n");
-                      break;
+@@ -2006,6 +2006,9 @@ bool FilesetResource::PrintConfig(PoolMe
+           case 'M': /* MD5 */
+             IndentConfigItem(cfg_str, 3, "Signature = MD5\n");
+             break;
++          case 'N': /* Honor No Dump Flag  */
++            IndentConfigItem(cfg_str, 3, "Honor No Dump Flag = Yes\n");
++            break;
+           case 'n':
+             IndentConfigItem(cfg_str, 3, "Replace = Never\n");
+             break;
diff --git a/bareos/patches/patch-core_src_dird_migrate.cc b/bareos/patches/patch-core_src_dird_migrate.cc
index 761d3c6ca3..fe89792fd3 100644
--- a/bareos/patches/patch-core_src_dird_migrate.cc
+++ b/bareos/patches/patch-core_src_dird_migrate.cc
@@ -2,9 +2,9 @@ $NetBSD$
 
 	remove inadequate clutter in status messages
 
---- core/src/dird/migrate.cc.orig	2019-02-01 07:15:47.112695213 +0000
+--- core/src/dird/migrate.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/dird/migrate.cc
-@@ -1723,7 +1723,9 @@ static inline void GenerateMigrateSummar
+@@ -1764,7 +1764,9 @@ static inline void GenerateMigrateSummar
             "  Last Volume Bytes:      %s (%sB)\n"
             "  SD Errors:              %d\n"
             "  SD termination status:  %s\n"
@@ -12,19 +12,22 @@ $NetBSD$
             "  Bareos binary info:     %s\n"
 +#endif
             "  Termination:            %s\n\n"),
-            BAREOS, my_name, VERSION, LSMDATE,
-            HOST_OS, DISTNAME, DISTVER,
-@@ -1759,7 +1761,9 @@ static inline void GenerateMigrateSummar
-            edit_uint64_with_suffix(mr->VolBytes, ec5),
-            jcr->SDErrors,
-            sd_term_msg,
+          BAREOS, my_name, kBareosVersionStrings.Full,
+          kBareosVersionStrings.ShortDate, HOST_OS, DISTNAME, DISTVER,
+@@ -1798,7 +1800,11 @@ static inline void GenerateMigrateSummar
+          mig_jcr ? mig_jcr->VolumeName : _("*None*"), jcr->VolSessionId,
+          jcr->VolSessionTime, edit_uint64_with_commas(mr->VolBytes, ec4),
+          edit_uint64_with_suffix(mr->VolBytes, ec5), jcr->impl->SDErrors,
+-         sd_term_msg, kBareosVersionStrings.JoblogMessage, term_code);
++         sd_term_msg,
 +#ifndef NO_ADV
-            BAREOS_JOBLOG_MESSAGE,
++         kBareosVersionStrings.JoblogMessage,
 +#endif
-            term_code);
-    } else {
-       /*
-@@ -1774,7 +1778,9 @@ static inline void GenerateMigrateSummar
++         term_code);
+   } else {
+     /*
+      * Copy/Migrate selection only Job.
+@@ -1813,14 +1819,20 @@ static inline void GenerateMigrateSummar
             "  End time:               %s\n"
             "  Elapsed time:           %s\n"
             "  Priority:               %d\n"
@@ -32,15 +35,17 @@ $NetBSD$
             "  Bareos binary info:     %s\n"
 +#endif
             "  Termination:            %s\n\n"),
-            BAREOS, my_name, VERSION, LSMDATE,
-            HOST_OS, DISTNAME, DISTVER,
-@@ -1785,7 +1791,9 @@ static inline void GenerateMigrateSummar
-            edt,
-            edit_utime(RunTime, elapsed, sizeof(elapsed)),
-            jcr->JobPriority,
+          BAREOS, my_name, kBareosVersionStrings.Full,
+          kBareosVersionStrings.ShortDate, HOST_OS, DISTNAME, DISTVER,
+          edit_uint64(jcr->impl->jr.JobId, ec8), jcr->impl->jr.Job,
+          jcr->impl->res.catalog->resource_name_, jcr->impl->res.catalog_source,
+          sdt, edt, edit_utime(RunTime, elapsed, sizeof(elapsed)),
+-         jcr->JobPriority, kBareosVersionStrings.JoblogMessage, term_code);
++         jcr->JobPriority,
 +#ifndef NO_ADV
-            BAREOS_JOBLOG_MESSAGE,
++         kBareosVersionStrings.JoblogMessage,
 +#endif
-            term_code);
-    }
++         term_code);
+   }
  }
+ 
diff --git a/bareos/patches/patch-core_src_dird_restore.cc b/bareos/patches/patch-core_src_dird_restore.cc
index b7bdb32e29..d78c758d7f 100644
--- a/bareos/patches/patch-core_src_dird_restore.cc
+++ b/bareos/patches/patch-core_src_dird_restore.cc
@@ -2,45 +2,50 @@ $NetBSD$
 
 	remove inadequate clutter in status messages
 
---- core/src/dird/restore.cc.orig	2019-02-01 07:17:27.460662966 +0000
+--- core/src/dird/restore.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/dird/restore.cc
-@@ -583,7 +583,9 @@ void GenerateRestoreSummary(JobControlRe
-            "  Bytes Restored:         %s\n"
-            "  Rate:                   %.1f KB/s\n"
-            "  SD termination status:  %s\n"
+@@ -562,7 +562,9 @@ void GenerateRestoreSummary(JobControlRe
+              "  Bytes Restored:         %s\n"
+              "  Rate:                   %.1f KB/s\n"
+              "  SD termination status:  %s\n"
 +#ifndef NO_ADV
-            "  Bareos binary info:     %s\n"
+              "  Bareos binary info:     %s\n"
 +#endif
-            "  Termination:            %s\n\n"),
-            BAREOS, my_name, VERSION, LSMDATE,
-            HOST_OS, DISTNAME, DISTVER,
-@@ -598,7 +600,9 @@ void GenerateRestoreSummary(JobControlRe
-            edit_uint64_with_commas(jcr->jr.JobBytes, ec3),
-            (float)kbps,
-            sd_term_msg,
+              "  Termination:            %s\n\n"),
+            BAREOS, my_name, kBareosVersionStrings.Full,
+            kBareosVersionStrings.ShortDate, HOST_OS, DISTNAME, DISTVER,
+@@ -572,7 +574,11 @@ void GenerateRestoreSummary(JobControlRe
+            edit_uint64_with_commas((uint64_t)jcr->impl->ExpectedFiles, ec1),
+            edit_uint64_with_commas((uint64_t)jcr->impl->jr.JobFiles, ec2),
+            edit_uint64_with_commas(jcr->impl->jr.JobBytes, ec3), (float)kbps,
+-           sd_term_msg, kBareosVersionStrings.JoblogMessage, TermMsg);
++           sd_term_msg,
 +#ifndef NO_ADV
-            BAREOS_JOBLOG_MESSAGE,
++           kBareosVersionStrings.JoblogMessage,
 +#endif
-            TermMsg);
++           TermMsg);
        break;
-    default:
-@@ -631,7 +635,9 @@ void GenerateRestoreSummary(JobControlRe
-            "  FD termination status:  %s\n"
-            "  SD termination status:  %s\n"
-            "%s"
+     default:
+       if (me->secure_erase_cmdline) {
+@@ -607,7 +613,9 @@ void GenerateRestoreSummary(JobControlRe
+              "  FD termination status:  %s\n"
+              "  SD termination status:  %s\n"
+              "%s"
 +#ifndef NO_ADV
-            "  Bareos binary info:     %s\n"
+              "  Bareos binary info:     %s\n"
 +#endif
-            "  Termination:            %s\n\n"),
-            BAREOS, my_name, VERSION, LSMDATE,
-            HOST_OS, DISTNAME, DISTVER,
-@@ -649,7 +655,9 @@ void GenerateRestoreSummary(JobControlRe
-            fd_term_msg,
-            sd_term_msg,
-            secure_erase_status.c_str(),
+              "  Termination:            %s\n\n"),
+            BAREOS, my_name, kBareosVersionStrings.Full,
+            kBareosVersionStrings.ShortDate, HOST_OS, DISTNAME, DISTVER,
+@@ -618,7 +626,10 @@ void GenerateRestoreSummary(JobControlRe
+            edit_uint64_with_commas((uint64_t)jcr->impl->jr.JobFiles, ec2),
+            edit_uint64_with_commas(jcr->impl->jr.JobBytes, ec3), (float)kbps,
+            jcr->JobErrors, fd_term_msg, sd_term_msg,
+-           secure_erase_status.c_str(), kBareosVersionStrings.JoblogMessage,
++           secure_erase_status.c_str(),
 +#ifndef NO_ADV
-            BAREOS_JOBLOG_MESSAGE,
++	   kBareosVersionStrings.JoblogMessage,
 +#endif
             TermMsg);
        break;
-    }
+   }
diff --git a/bareos/patches/patch-core_src_dird_verify.cc b/bareos/patches/patch-core_src_dird_verify.cc
index c4966e15c0..97727bd6aa 100644
--- a/bareos/patches/patch-core_src_dird_verify.cc
+++ b/bareos/patches/patch-core_src_dird_verify.cc
@@ -2,45 +2,49 @@ $NetBSD$
 
 	remove inadequate clutter in status messages
 
---- core/src/dird/verify.cc.orig	2019-02-01 07:18:21.139427739 +0000
+--- core/src/dird/verify.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/dird/verify.cc
-@@ -569,7 +569,9 @@ void VerifyCleanup(JobControlRecord *jcr
-            "  Non-fatal FD errors:    %d\n"
-            "  FD termination status:  %s\n"
-            "  SD termination status:  %s\n"
+@@ -567,7 +567,9 @@ void VerifyCleanup(JobControlRecord* jcr
+              "  Non-fatal FD errors:    %d\n"
+              "  FD termination status:  %s\n"
+              "  SD termination status:  %s\n"
 +#ifndef NO_ADV
-            "  Bareos binary info:     %s\n"
+              "  Bareos binary info:     %s\n"
 +#endif
-            "  Termination:            %s\n\n"),
-            BAREOS, my_name, VERSION, LSMDATE,
-            HOST_OS, DISTNAME, DISTVER,
-@@ -587,7 +589,9 @@ void VerifyCleanup(JobControlRecord *jcr
-            jcr->JobErrors,
-            fd_term_msg,
-            sd_term_msg,
+              "  Termination:            %s\n\n"),
+            BAREOS, my_name, kBareosVersionStrings.Full,
+            kBareosVersionStrings.ShortDate, HOST_OS, DISTNAME, DISTVER,
+@@ -577,7 +579,10 @@ void VerifyCleanup(JobControlRecord* jcr
+            Name, sdt, edt,
+            edit_uint64_with_commas(jcr->impl->ExpectedFiles, ec1),
+            edit_uint64_with_commas(jcr->JobFiles, ec2), jcr->JobErrors,
+-           fd_term_msg, sd_term_msg, kBareosVersionStrings.JoblogMessage,
++           fd_term_msg, sd_term_msg,
 +#ifndef NO_ADV
-            BAREOS_JOBLOG_MESSAGE,
++	   kBareosVersionStrings.JoblogMessage,
 +#endif
             TermMsg);
        break;
-    default:
-@@ -605,7 +609,9 @@ void VerifyCleanup(JobControlRecord *jcr
-            "  Files Examined:         %s\n"
-            "  Non-fatal FD errors:    %d\n"
-            "  FD termination status:  %s\n"
+     default:
+@@ -596,7 +601,9 @@ void VerifyCleanup(JobControlRecord* jcr
+              "  Files Examined:         %s\n"
+              "  Non-fatal FD errors:    %d\n"
+              "  FD termination status:  %s\n"
 +#ifndef NO_ADV
-            "  Bareos binary info:     %s\n"
+              "  Bareos binary info:     %s\n"
 +#endif
-            "  Termination:            %s\n\n"),
-            BAREOS, my_name, VERSION, LSMDATE,
-            HOST_OS, DISTNAME, DISTVER,
-@@ -621,7 +627,9 @@ void VerifyCleanup(JobControlRecord *jcr
-            edit_uint64_with_commas(jcr->JobFiles, ec1),
-            jcr->JobErrors,
-            fd_term_msg,
+              "  Termination:            %s\n\n"),
+            BAREOS, my_name, kBareosVersionStrings.Full,
+            kBareosVersionStrings.ShortDate, HOST_OS, DISTNAME, DISTVER,
+@@ -604,7 +611,10 @@ void VerifyCleanup(JobControlRecord* jcr
+            jcr->impl->res.fileset->resource_name_, JobLevelToString(JobLevel),
+            jcr->impl->res.client->resource_name_, jcr->impl->previous_jr.JobId,
+            Name, sdt, edt, edit_uint64_with_commas(jcr->JobFiles, ec1),
+-           jcr->JobErrors, fd_term_msg, kBareosVersionStrings.JoblogMessage,
++           jcr->JobErrors, fd_term_msg,
 +#ifndef NO_ADV
-            BAREOS_JOBLOG_MESSAGE,
++	   kBareosVersionStrings.JoblogMessage,
 +#endif
             TermMsg);
        break;
-    }
+   }
diff --git a/bareos/patches/patch-core_src_findlib_acl.cc b/bareos/patches/patch-core_src_findlib_acl.cc
new file mode 100644
index 0000000000..55bea7fee5
--- /dev/null
+++ b/bareos/patches/patch-core_src_findlib_acl.cc
@@ -0,0 +1,61 @@
+$NetBSD$
+
+	make ACL compile on NetBSD (10.x onward)
+
+--- core/src/findlib/acl.cc.orig	2020-04-16 08:31:41.000000000 +0000
++++ core/src/findlib/acl.cc
+@@ -552,7 +552,8 @@ static bacl_exit_code (*os_parse_acl_str
+ 
+ #elif defined(HAVE_DARWIN_OS) || defined(HAVE_FREEBSD_OS) || \
+     defined(HAVE_IRIX_OS) || defined(HAVE_OSF1_OS) ||        \
+-    defined(HAVE_LINUX_OS) || defined(HAVE_HURD_OS)
++    defined(HAVE_NETBSD_OS) || defined(HAVE_LINUX_OS) ||     \
++    defined(HAVE_HURD_OS)
+ 
+ #include <sys/types.h>
+ 
+@@ -590,7 +591,7 @@ static bacl_exit_code (*os_parse_acl_str
+ /**
+  * On FreeBSD we can get numeric ACLs
+  */
+-#if defined(HAVE_FREEBSD_OS)
++#if defined(HAVE_FREEBSD_OS) || defined(HAVE_NETBSD_OS)
+ #if defined(BACL_WANT_NUMERIC_IDS)
+ #define BACL_ALTERNATE_TEXT ACL_TEXT_NUMERIC_IDS
+ #endif
+@@ -652,7 +653,7 @@ static acl_type_t BacToOsAcltype(bacl_ty
+ static int AclCountEntries(acl_t acl)
+ {
+   int count = 0;
+-#if defined(HAVE_FREEBSD_OS) || defined(HAVE_LINUX_OS) || defined(HAVE_HURD_OS)
++#if defined(HAVE_FREEBSD_OS) || defined(HAVE_NETBSD_OS) || defined(HAVE_LINUX_OS) || defined(HAVE_HURD_OS)
+   acl_entry_t ace;
+   int entry_available;
+ 
+@@ -693,7 +694,7 @@ static bool AclIsTrivial(acl_t acl)
+    */
+   acl_entry_t ace;
+   acl_tag_t tag;
+-#if defined(HAVE_FREEBSD_OS) || defined(HAVE_LINUX_OS) || defined(HAVE_HURD_OS)
++#if defined(HAVE_FREEBSD_OS) || defined(HAVE_NETBSD_OS) || defined(HAVE_LINUX_OS) || defined(HAVE_HURD_OS)
+   int entry_available;
+ 
+   entry_available = acl_get_entry(acl, ACL_FIRST_ENTRY, &ace);
+@@ -793,7 +794,7 @@ static bacl_exit_code generic_get_acl_fr
+       goto bail_out;
+     }
+ #endif
+-#if defined(HAVE_FREEBSD_OS) && defined(_PC_ACL_NFS4)
++#if (defined(HAVE_FREEBSD_OS) || defined(HAVE_NETBSD_OS)) && defined(_PC_ACL_NFS4)
+     if (acltype == BACL_TYPE_NFS4) {
+       int trivial;
+       if (acl_is_trivial_np(acl, &trivial) == 0) {
+@@ -1066,7 +1067,7 @@ static bacl_exit_code (*os_parse_acl_str
+                                               uint32_t content_length) =
+     darwin_parse_acl_streams;
+ 
+-#elif defined(HAVE_FREEBSD_OS)
++#elif defined(HAVE_FREEBSD_OS) || defined(HAVE_NETBSD_OS)
+ /**
+  * Define the supported ACL streams for these OSes
+  */
diff --git a/bareos/patches/patch-core_src_findlib_find__one.cc b/bareos/patches/patch-core_src_findlib_find__one.cc
index a574921060..c6cc9a2de5 100644
--- a/bareos/patches/patch-core_src_findlib_find__one.cc
+++ b/bareos/patches/patch-core_src_findlib_find__one.cc
@@ -2,14 +2,14 @@ $NetBSD$
 
 	Simplify UF_NODUMP test
 
---- core/src/findlib/find_one.cc.orig	2019-01-19 23:50:10.325582240 +0000
+--- core/src/findlib/find_one.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/findlib/find_one.cc
-@@ -209,7 +209,7 @@ static bool VolumeHasAttrlist(const char
+@@ -206,7 +206,7 @@ static bool VolumeHasAttrlist(const char
   */
- static inline bool no_dump(JobControlRecord *jcr, FindFilesPacket *ff_pkt)
+ static inline bool no_dump(JobControlRecord* jcr, FindFilesPacket* ff_pkt)
  {
 -#if defined(HAVE_CHFLAGS) && defined(UF_NODUMP)
 +#if defined(UF_NODUMP)
-    if (BitIsSet(FO_HONOR_NODUMP, ff_pkt->flags) &&
-        (ff_pkt->statp.st_flags & UF_NODUMP) ) {
-       Jmsg(jcr, M_INFO, 1, _("     NODUMP flag set - will not process %s\n"),
+   if (BitIsSet(FO_HONOR_NODUMP, ff_pkt->flags) &&
+       (ff_pkt->statp.st_flags & UF_NODUMP)) {
+     Jmsg(jcr, M_INFO, 1, _("     NODUMP flag set - will not process %s\n"),
diff --git a/bareos/patches/patch-core_src_include_version.h b/bareos/patches/patch-core_src_include_version.h
deleted file mode 100644
index 5a26d40264..0000000000
--- a/bareos/patches/patch-core_src_include_version.h
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD$
-
-	Reduce clutter on production messages
-
---- core/src/include/version.h.orig	2019-02-13 14:25:55.000000000 +0000
-+++ core/src/include/version.h
-@@ -6,29 +6,33 @@
- #define LSMDATE "13Feb19"
- 
- #ifndef BAREOS_BINARY_INFO
--#define BAREOS_BINARY_INFO "self-compiled"
-+#define BAREOS_BINARY_INFO "pkgsrc-compiled"
- #endif
- 
- #ifndef BAREOS_SERVICES_MESSAGE
--#define BAREOS_SERVICES_MESSAGE "self-compiled binaries are UNSUPPORTED by bareos.com.\nGet official binaries and vendor support on https://www.bareos.com";
-+#define BAREOS_SERVICES_MESSAGE "pkgsrc-compiled binaries are UNSUPPORTED by bareos.com.\nGet official binaries and vendor support on https://www.bareos.com";
- #endif
- 
- #ifndef BAREOS_JOBLOG_MESSAGE
--#define BAREOS_JOBLOG_MESSAGE "self-compiled: Get official binaries and vendor support on bareos.com"
-+#define BAREOS_JOBLOG_MESSAGE "pkgsrc-compiled: Get official binaries and vendor support on bareos.com if this platform is supported"
- #endif
- 
- 
- 
- 
--#define PROG_COPYRIGHT "\n" \
--                       BAREOS_SERVICES_MESSAGE \
--                       "\n" \
-+#ifndef NO_ADV
-+#define PROG_COPYRIGHT_BSM "\n" \
-+            BAREOS_SERVICES_MESSAGE \
-+            "\n"
-+#else
-+#define PROG_COPYRIGHT_BSM 
-+#endif
-+#define PROG_COPYRIGHT PROG_COPYRIGHT_BSM \
-                        "Copyright (C) 2013-2019 Bareos GmbH & Co. KG\n" \
-                        "Copyright (C) %d-2012 Free Software Foundation Europe e.V.\n" \
-                        "Copyright (C) 2010-2017 Planets Communications B.V.\n"
- #define BYEAR "2019"       /* year for copyright messages in programs */
- 
--
- /*
-    BAREOS® - Backup Archiving REcovery Open Sourced
- 
diff --git a/bareos/patches/patch-core_src_lib_scsi__lli.cc b/bareos/patches/patch-core_src_lib_scsi__lli.cc
index 91d9f624d8..8e01348b0f 100644
--- a/bareos/patches/patch-core_src_lib_scsi__lli.cc
+++ b/bareos/patches/patch-core_src_lib_scsi__lli.cc
@@ -2,9 +2,9 @@ $NetBSD$
 
 	Fix coding - was probably never tested with scsi-crypto flag
 
---- core/src/lib/scsi_lli.cc.orig	2018-12-20 08:51:51.000000000 +0000
+--- core/src/lib/scsi_lli.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/lib/scsi_lli.cc
-@@ -384,6 +384,7 @@ bool CheckScsiAtEod(int fd)
+@@ -410,6 +410,7 @@ bool CheckScsiAtEod(int fd) { return fal
  #elif defined(HAVE_NETBSD_OS) || defined(HAVE_OPENBSD_OS)
  
  #if defined(HAVE_NETBSD_OS)
@@ -12,35 +12,36 @@ $NetBSD$
  #include <dev/scsipi/scsipi_all.h>
  #else
  #include <scsi/uscsi_all.h>
-@@ -403,7 +404,7 @@ static inline bool do_scsi_cmd_page(int 
+@@ -432,7 +433,7 @@ static inline bool do_scsi_cmd_page(int 
  {
-    int rc;
-    scsireq_t req;
--   SCSI_PAGE_SENSE *sense;
-+   SCSI_PAGE_SENSE sense;
-    bool opened_device = false;
-    bool retval = false;
+   int rc;
+   scsireq_t req;
+-  SCSI_PAGE_SENSE* sense;
++  SCSI_PAGE_SENSE sense;
+   bool opened_device = false;
+   bool retval = false;
  
-@@ -446,19 +447,17 @@ static inline bool do_scsi_cmd_page(int 
+@@ -476,20 +477,18 @@ static inline bool do_scsi_cmd_page(int 
        retval = true;
        break;
-    case SCCMD_SENSE:
+     case SCCMD_SENSE:
 -      sense = req.sense;
 +      memcpy(&sense, &req.sense, sizeof sense < sizeof req.sense ? sizeof sense : sizeof req.sense);
        Emsg3(M_ERROR, 0, _("Sense Key: %0.2X ASC: %0.2X ASCQ: %0.2X\n"),
              LOBYTE(sense.senseKey), sense.addSenseCode, sense.addSenseCodeQual);
        break;
-    case SCCMD_TIMEOUT:
-       Emsg1(M_ERROR, 0, _("SCIOCCOMMAND ioctl on %s returned SCSI command timed out\n"),
+     case SCCMD_TIMEOUT:
+       Emsg1(M_ERROR, 0,
+             _("SCIOCCOMMAND ioctl on %s returned SCSI command timed out\n"),
 -            devicename);
 +            device_name);
        break;
-    case SCCMD_BUSY:
+     case SCCMD_BUSY:
        Emsg1(M_ERROR, 0, _("SCIOCCOMMAND ioctl on %s returned device is busy\n"),
 -            devicename);
 -      break;
--   case SCCMD_SENSE:
+-    case SCCMD_SENSE:
 +            device_name);
        break;
-    default:
-       Emsg2(M_ERROR, 0, _("SCIOCCOMMAND ioctl on %s returned unknown status %d\n"),
+     default:
+       Emsg2(M_ERROR, 0,
diff --git a/bareos/patches/patch-core_src_lib_version.c b/bareos/patches/patch-core_src_lib_version.c
new file mode 100644
index 0000000000..e65d03d890
--- /dev/null
+++ b/bareos/patches/patch-core_src_lib_version.c
@@ -0,0 +1,28 @@
+$NetBSD$
+
+	note pkgsrc compile origin
+
+--- core/src/lib/version.c.orig	2020-06-22 14:19:42.675724493 +0000
++++ core/src/lib/version.c
+@@ -48,18 +48,18 @@
+ #endif
+ 
+ #if !defined BAREOS_BINARY_INFO
+-#define BAREOS_BINARY_INFO "self-compiled"
++#define BAREOS_BINARY_INFO "pkgsrc-compiled"
+ #endif
+ 
+ #if !defined BAREOS_SERVICES_MESSAGE
+ #define BAREOS_SERVICES_MESSAGE                             \
+-  "self-compiled binaries are UNSUPPORTED by bareos.com.\n" \
++  "pkgsrc-compiled binaries are UNSUPPORTED by bareos.com.\n" \
+   "Get official binaries and vendor support on https://www.bareos.com";
+ #endif
+ 
+ #if !defined BAREOS_JOBLOG_MESSAGE
+ #define BAREOS_JOBLOG_MESSAGE \
+-  "self-compiled: Get official binaries and vendor support on bareos.com"
++  "pkgsrc-compiled: Get official binaries and vendor support on bareos.com"
+ #endif
+ 
+ #define BAREOS_COPYRIGHT_MESSAGE_WITH_FSF_AND_PLANETS            \
diff --git a/bareos/patches/patch-core_src_ndmp_CMakeLists.txt b/bareos/patches/patch-core_src_ndmp_CMakeLists.txt
deleted file mode 100644
index f6d5865428..0000000000
--- a/bareos/patches/patch-core_src_ndmp_CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
-	Make NDMP feature configurable
-
---- core/src/ndmp/CMakeLists.txt.orig	2019-01-31 11:39:26.000000000 +0000
-+++ core/src/ndmp/CMakeLists.txt
-@@ -17,6 +17,7 @@
- #   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- #   02110-1301, USA.
- 
-+if (${HAVE_NDMP})
- 
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNDMOS_OPTION_NO_TEST_AGENTS")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNDMOS_CONST_NDMJOBLIB_REVISION=\\\"${BAREOS_FULL_VERSION}\\\"")
-@@ -115,3 +116,5 @@ IF(build_ndmjob)
-   add_executable(ndmjob ${NDMJOB_SRCS})
-   target_link_libraries(ndmjob bareosndmp)
- ENDIF()
-+
-+endif()
diff --git a/bareos/patches/patch-core_src_ndmp_ndmos.h b/bareos/patches/patch-core_src_ndmp_ndmos.h
deleted file mode 100644
index 79becfe45c..0000000000
--- a/bareos/patches/patch-core_src_ndmp_ndmos.h
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD$
-
-	Add NetBSD tag - not used for now
-
---- core/src/ndmp/ndmos.h.orig	2018-12-20 08:51:51.000000000 +0000
-+++ core/src/ndmp/ndmos.h
-@@ -94,7 +94,8 @@
- 
- #ifndef _NDMOS_H
- #define _NDMOS_H
--
-+#include <stdio.h>
-+#include <string.h>
- /*
-  * Silence compiler for known warnings.
-  */
-@@ -121,6 +122,7 @@
- #define NDMOS_IDENT(A,B,C,D)	(((A)<<24)+((B)<<16)+((C)<<8)+(D))
- 
- #define NDMOS_ID_FREEBSD	NDMOS_IDENT('F','B','s','d')
-+#define NDMOS_ID_NETBSD		NDMOS_IDENT('N','B','s','d')
- #define NDMOS_ID_SOLARIS	NDMOS_IDENT('S','o','l','a')
- #define NDMOS_ID_LINUX		NDMOS_IDENT('L','n','u','x')
- #define NDMOS_ID_IRIX		NDMOS_IDENT('I','R','I','X')
-@@ -149,6 +151,10 @@
- #define NDMOS_ID	NDMOS_ID_FREEBSD
- #endif
- 
-+#ifdef HAVE_NETBSD_OS
-+#define NDMOS_ID	NDMOS_ID_NETBSD
-+#endif
-+
- #ifdef HAVE_SUN_OS
- #define NDMOS_ID	NDMOS_ID_SOLARIS
- #endif
diff --git a/bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc b/bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc
index 6e1eb37561..583a080376 100644
--- a/bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc
+++ b/bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc
@@ -3,38 +3,38 @@ $NetBSD$
 	The original hooks did not clear the key soon enough.
 	It was possible to change media in the tape library 
 	without the key being cleared causing key confusion
-	when bareos operation was mixe with other library clients.
+	when bareos operation was mixed with other library clients.
 	Now the key is cleared whenever the device is closed.
 
---- core/src/plugins/stored/scsicrypto-sd.cc.orig	2019-01-31 11:39:26.000000000 +0000
+--- core/src/plugins/stored/scsicrypto-sd.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/plugins/stored/scsicrypto-sd.cc
-@@ -191,6 +191,7 @@ static bRC newPlugin(bpContext *ctx)
-     * bsdEventLabelWrite - Write of volume label clear key as volume
-     *                      labels are unencrypted.
-     * bsdEventVolumeUnload - Unload of volume clear key
-+    * bsdEventDeviceClose  - Unload of volume clear key (auto changer)
-     * bsdEventReadError - Read error on volume see if its due to
-     *                     the fact encryption is enabled and we
-     *                     have either the wrong key loaded or no key
-@@ -201,11 +202,12 @@ static bRC newPlugin(bpContext *ctx)
-     *                        of the volume loaded in the drive.
-     */
-    bfuncs->registerBareosEvents(ctx,
--                                7,
-+                                8,
-                                 bsdEventLabelRead,
-                                 bsdEventLabelVerified,
-                                 bsdEventLabelWrite,
-                                 bsdEventVolumeUnload,
-+                                bsdEventDeviceClose,
-                                 bsdEventReadError,
-                                 bsdEventDriveStatus,
-                                 bsdEventVolumeStatus);
-@@ -255,6 +257,7 @@ static bRC handlePluginEvent(bpContext *
-    case bsdEventLabelRead:
-    case bsdEventLabelWrite:
-    case bsdEventVolumeUnload:
-+   case bsdEventDeviceClose:
+@@ -181,6 +181,7 @@ static bRC newPlugin(bpContext* ctx)
+    * bsdEventLabelWrite - Write of volume label clear key as volume
+    *                      labels are unencrypted.
+    * bsdEventVolumeUnload - Unload of volume clear key
++   * bsdEventDeviceClose  - Unload of volume clear key (auto changer)
+    * bsdEventReadError - Read error on volume see if its due to
+    *                     the fact encryption is enabled and we
+    *                     have either the wrong key loaded or no key
+@@ -190,10 +191,10 @@ static bRC newPlugin(bpContext* ctx)
+    * bsdEventVolumeStatus - plugin callback for encryption status
+    *                        of the volume loaded in the drive.
+    */
+-  bfuncs->registerBareosEvents(ctx, 7, bsdEventLabelRead, bsdEventLabelVerified,
++  bfuncs->registerBareosEvents(ctx, 8, bsdEventLabelRead, bsdEventLabelVerified,
+                                bsdEventLabelWrite, bsdEventVolumeUnload,
+-                               bsdEventReadError, bsdEventDriveStatus,
+-                               bsdEventVolumeStatus);
++                               bsdEventDeviceClose, bsdEventReadError,
++			       bsdEventDriveStatus, bsdEventVolumeStatus);
+ 
+   return bRC_OK;
+ }
+@@ -240,6 +241,7 @@ static bRC handlePluginEvent(bpContext* 
+     case bsdEventLabelRead:
+     case bsdEventLabelWrite:
+     case bsdEventVolumeUnload:
++    case bsdEventDeviceClose:
        return do_clear_scsi_encryption_key(value);
-    case bsdEventLabelVerified:
+     case bsdEventLabelVerified:
        return do_set_scsi_encryption_key(value);
diff --git a/bareos/patches/patch-core_src_plugins_stored_scsitapealert-sd.cc b/bareos/patches/patch-core_src_plugins_stored_scsitapealert-sd.cc
index 6a1a7e5fe3..ee357189bd 100644
--- a/bareos/patches/patch-core_src_plugins_stored_scsitapealert-sd.cc
+++ b/bareos/patches/patch-core_src_plugins_stored_scsitapealert-sd.cc
@@ -2,17 +2,26 @@ $NetBSD$
 
 	Tape alerts where not always gathered, add missing cases.
 
---- core/src/plugins/stored/scsitapealert-sd.cc.orig	2019-03-14 14:18:24.617761851 +0000
+--- core/src/plugins/stored/scsitapealert-sd.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/plugins/stored/scsitapealert-sd.cc
-@@ -191,8 +191,11 @@ static bRC handlePluginEvent(bpContext *
-    case bsdEventLabelVerified:
-    case bsdEventReadError:
-    case bsdEventWriteError:
-+   case bsdEventVolumeLoad:
-    case bsdEventVolumeUnload:
-+   case bsdEventDeviceRelease:
+@@ -126,8 +126,8 @@ static bRC newPlugin(bpContext* ctx)
+    * Only register plugin events we are interested in.
+    */
+   bfuncs->registerBareosEvents(
+-      ctx, 6, bsdEventVolumeLoad, bsdEventLabelVerified, bsdEventReadError,
+-      bsdEventWriteError, bsdEventVolumeUnload, bsdEventDeviceRelease);
++      ctx, 7, bsdEventVolumeLoad, bsdEventLabelVerified, bsdEventReadError,
++      bsdEventWriteError, bsdEventVolumeLoad, bsdEventVolumeUnload, bsdEventDeviceRelease);
+ 
+   return bRC_OK;
+ }
+@@ -174,7 +174,9 @@ static bRC handlePluginEvent(bpContext* 
+     case bsdEventLabelVerified:
+     case bsdEventReadError:
+     case bsdEventWriteError:
++    case bsdEventVolumeLoad:
+     case bsdEventVolumeUnload:
++    case bsdEventDeviceRelease:
        return handle_tapealert_readout(value);
-+
-    default:
-       Dmsg1(debuglevel, "scsitapealert-sd: Unknown event %d\n", event->eventType);
-       return bRC_Error;
+     default:
+       Dmsg1(debuglevel, "scsitapealert-sd: Unknown event %d\n",
diff --git a/bareos/patches/patch-core_src_stored_acquire.cc b/bareos/patches/patch-core_src_stored_acquire.cc
index a247e9d30b..71304ed666 100644
--- a/bareos/patches/patch-core_src_stored_acquire.cc
+++ b/bareos/patches/patch-core_src_stored_acquire.cc
@@ -2,14 +2,14 @@ $NetBSD$
 
 	For NetBSD SCSI ioctl to go through the device must be writable.
 
---- core/src/stored/acquire.cc.orig	2018-12-20 08:51:51.000000000 +0000
+--- core/src/stored/acquire.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/stored/acquire.cc
-@@ -270,7 +270,7 @@ bool AcquireDeviceForRead(DeviceControlR
-        * it opens it. If it is a tape, it checks the volume name
-        */
-       Dmsg1(rdebuglevel, "stored: open vol=%s\n", dcr->VolumeName);
--      if (!dev->open(dcr, OPEN_READ_ONLY)) {
-+      if (!dev->open(dcr, dev->device->drive_crypto_enabled ? OPEN_READ_WRITE : OPEN_READ_ONLY)) {
-          if (!dev->poll) {
-             Jmsg3(jcr, M_WARNING, 0, _("Read open device %s Volume \"%s\" failed: ERR=%s\n"),
-                   dev->print_name(), dcr->VolumeName, dev->bstrerror());
+@@ -283,7 +283,7 @@ bool AcquireDeviceForRead(DeviceControlR
+      * it opens it. If it is a tape, it checks the volume name
+      */
+     Dmsg1(rdebuglevel, "stored: open vol=%s\n", dcr->VolumeName);
+-    if (!dev->open(dcr, OPEN_READ_ONLY)) {
++    if (!dev->open(dcr, dev->device->drive_crypto_enabled ? OPEN_READ_WRITE : OPEN_READ_ONLY)) {
+       if (!dev->poll) {
+         Jmsg3(jcr, M_WARNING, 0,
+               _("Read open device %s Volume \"%s\" failed: ERR=%s\n"),
diff --git a/bareos/patches/patch-core_src_stored_bscan.cc b/bareos/patches/patch-core_src_stored_bscan.cc
new file mode 100644
index 0000000000..bd8afd13cc
--- /dev/null
+++ b/bareos/patches/patch-core_src_stored_bscan.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+	Remove inadequate clutter in production messages
+
+--- core/src/stored/bscan.cc.orig	2020-06-23 13:36:11.694151050 +0000
++++ core/src/stored/bscan.cc
+@@ -1449,14 +1449,19 @@ static bool UpdateJobRecord(BareosDb* db
+              "Volume Session Id:      %d\n"
+              "Volume Session Time:    %d\n"
+              "Last Volume Bytes:      %s\n"
++#ifndef NO_ADV
+              "Bareos binary info:     %s\n"
++#endif
+              "Termination:            %s\n\n"),
+            edt, mjcr->JobId, mjcr->Job, mjcr->impl->fileset_name,
+            job_level_to_str(mjcr->getJobLevel()), mjcr->client_name, sdt, edt,
+            edit_uint64_with_commas(mjcr->JobFiles, ec1),
+            edit_uint64_with_commas(mjcr->JobBytes, ec2), mjcr->VolSessionId,
+            mjcr->VolSessionTime, edit_uint64_with_commas(mr.VolBytes, ec3),
+-           kBareosVersionStrings.BinaryInfo, TermMsg);
++#ifndef NO_ADV
++           kBareosVersionStrings.BinaryInfo,
++#endif
++	   TermMsg);
+   }
+   FreeJcr(mjcr);
+ 
diff --git a/bareos/patches/patch-core_src_stored_btape.cc b/bareos/patches/patch-core_src_stored_btape.cc
index 762e69730a..febac78074 100644
--- a/bareos/patches/patch-core_src_stored_btape.cc
+++ b/bareos/patches/patch-core_src_stored_btape.cc
@@ -2,22 +2,30 @@ $NetBSD$
 
 	Add missing free*() calls to keep smartalloc happy
 
---- core/src/stored/btape.cc.orig	2019-01-31 11:39:26.000000000 +0000
+--- core/src/stored/btape.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/stored/btape.cc
-@@ -333,6 +333,7 @@ int main(int margc, char *margv[])
+@@ -331,6 +331,7 @@ int main(int margc, char* margv[])
+ 
  static void TerminateBtape(int status)
  {
-    Dsm_check(200);
-+   FreePlugins(jcr);
-    FreeJcr(jcr);
-    jcr = NULL;
++  FreePlugins(jcr);
+   FreeJcr(jcr);
+   jcr = NULL;
+ 
+@@ -369,6 +370,8 @@ static void TerminateBtape(int status)
+   }
+ 
+   StopWatchdog();
++  FlushCryptoCache();
++  UnloadSdPlugins();
+   TermMsg();
+   RecentJobResultsList::Cleanup();
+   CleanupJcrChain();
+@@ -377,7 +380,6 @@ static void TerminateBtape(int status)
+   exit(status);
+ }
  
-@@ -379,6 +380,8 @@ static void TerminateBtape(int status)
-    }
+-
+ btime_t total_time = 0;
+ uint64_t total_size = 0;
  
-    StopWatchdog();
-+   FlushCryptoCache();
-+   UnloadSdPlugins();
-    TermMsg();
-    TermLastJobsList();
-    CloseMemoryPool();               /* free memory in pool */
diff --git a/bareos/patches/patch-core_src_stored_device.cc b/bareos/patches/patch-core_src_stored_device.cc
new file mode 100644
index 0000000000..162cf18c3c
--- /dev/null
+++ b/bareos/patches/patch-core_src_stored_device.cc
@@ -0,0 +1,29 @@
+$NetBSD$
+
+	when using scsi_crypto on NetBSD the
+	file descriptios must be opened read/write
+	as read and write scsi commands are issued
+	for key management
+
+--- core/src/stored/device.cc.orig	2020-06-25 07:59:33.880425717 +0000
++++ core/src/stored/device.cc
+@@ -282,11 +282,16 @@ bool FirstOpenDevice(DeviceControlRecord
+   }
+ 
+   int mode;
+-  if (dev->HasCap(CAP_STREAM)) {
+-    mode = OPEN_WRITE_ONLY;
++  if (dev->device->drive_crypto_enabled) {
++    mode = OPEN_READ_WRITE;
+   } else {
+-    mode = OPEN_READ_ONLY;
++    if (dev->HasCap(CAP_STREAM)) {
++      mode = OPEN_WRITE_ONLY;
++    } else {
++      mode = OPEN_READ_ONLY;
++    }
+   }
++
+   Dmsg0(129, "Opening device.\n");
+   if (!dev->open(dcr, mode)) {
+     Emsg1(M_FATAL, 0, _("dev open failed: %s\n"), dev->errmsg);
diff --git a/bareos/patches/patch-core_src_stored_dir__cmd.cc b/bareos/patches/patch-core_src_stored_dir__cmd.cc
index dd4d883268..c1e9257d72 100644
--- a/bareos/patches/patch-core_src_stored_dir__cmd.cc
+++ b/bareos/patches/patch-core_src_stored_dir__cmd.cc
@@ -2,23 +2,23 @@ $NetBSD$
 
 	For SCSI ioctl to work on NetBSD the device must be open for writing.
 
---- core/src/stored/dir_cmd.cc.orig	2018-12-20 08:51:51.000000000 +0000
+--- core/src/stored/dir_cmd.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/stored/dir_cmd.cc
-@@ -976,7 +976,7 @@ static bool MountCmd(JobControlRecord *j
-                TryAutoloadDevice(jcr, dcr, slot, "");
+@@ -997,7 +997,7 @@ static bool MountCmd(JobControlRecord* j
+             TryAutoloadDevice(jcr, dcr, slot, "");
+           }
+           /* We freed the device, so reopen it and wake any waiting threads */
+-          if (!dev->open(dcr, OPEN_READ_ONLY)) {
++          if (!dev->open(dcr, dev->device->drive_crypto_enabled ? OPEN_READ_WRITE : OPEN_READ_ONLY)) {
+             dir->fsend(_("3901 Unable to open device %s: ERR=%s\n"),
+                        dev->print_name(), dev->bstrerror());
+             if (dev->blocked() == BST_UNMOUNTED) {
+@@ -1062,7 +1062,7 @@ static bool MountCmd(JobControlRecord* j
+                   dev->print_name());
              }
-             /* We freed the device, so reopen it and wake any waiting threads */
+           } else if (dev->IsTape()) {
 -            if (!dev->open(dcr, OPEN_READ_ONLY)) {
 +            if (!dev->open(dcr, dev->device->drive_crypto_enabled ? OPEN_READ_WRITE : OPEN_READ_ONLY)) {
-                dir->fsend(_("3901 Unable to open device %s: ERR=%s\n"), dev->print_name(), dev->bstrerror());
-                if (dev->blocked() == BST_UNMOUNTED) {
-                   /* We blocked the device, so unblock it */
-@@ -1027,7 +1027,7 @@ static bool MountCmd(JobControlRecord *j
-                                "If this is not a blank tape, try unmounting and remounting the Volume.\n"), dev->print_name());
-                }
-             } else if (dev->IsTape()) {
--               if (!dev->open(dcr, OPEN_READ_ONLY)) {
-+               if (!dev->open(dcr, dev->device->drive_crypto_enabled ? OPEN_READ_WRITE : OPEN_READ_ONLY)) {
-                   dir->fsend(_("3901 Unable to open device %s: ERR=%s\n"), dev->print_name(), dev->bstrerror());
-                   break;
-                }
+               dir->fsend(_("3901 Unable to open device %s: ERR=%s\n"),
+                          dev->print_name(), dev->bstrerror());
+               break;
diff --git a/bareos/patches/patch-core_src_stored_label.cc b/bareos/patches/patch-core_src_stored_label.cc
index 2cb8d153d5..872f36a7e8 100644
--- a/bareos/patches/patch-core_src_stored_label.cc
+++ b/bareos/patches/patch-core_src_stored_label.cc
@@ -2,14 +2,14 @@ $NetBSD$
 
 	For SCSI ioctl to work on NetBSD the device must be open for writing.
 
---- core/src/stored/label.cc.orig	2018-12-20 08:51:51.000000000 +0000
+--- core/src/stored/label.cc.orig	2020-04-16 08:31:41.000000000 +0000
 +++ core/src/stored/label.cc
-@@ -86,7 +86,7 @@ int ReadDevVolumeLabel(DeviceControlReco
-          dev->VolHdr.VolumeName[0]?dev->VolHdr.VolumeName:"*NULL*", dev->max_block_size);
+@@ -92,7 +92,7 @@ int ReadDevVolumeLabel(DeviceControlReco
+         dev->max_block_size);
  
-    if (!dev->IsOpen()) {
--      if (!dev->open(dcr, OPEN_READ_ONLY)) {
-+      if (!dev->open(dcr, OPEN_READ_WRITE)) {
-          return VOL_IO_ERROR;
-       }
-    }
+   if (!dev->IsOpen()) {
+-    if (!dev->open(dcr, OPEN_READ_ONLY)) { return VOL_IO_ERROR; }
++    if (!dev->open(dcr, OPEN_READ_WRITE)) { return VOL_IO_ERROR; }
+   }
+ 
+   dev->ClearLabeled();
diff --git a/bareos/patches/patch-core_src_stored_mount.cc b/bareos/patches/patch-core_src_stored_mount.cc
new file mode 100644
index 0000000000..e0919f270f
--- /dev/null
+++ b/bareos/patches/patch-core_src_stored_mount.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+	when using scsi_crypto on NetBSD the
+	file descriptios must be opened read/write
+	as read and write scsi commands are issued
+	for key management
+
+--- core/src/stored/mount.cc.orig	2020-06-25 08:19:03.686643613 +0000
++++ core/src/stored/mount.cc
+@@ -246,10 +246,14 @@ mount_next_vol:
+   /*
+    * Ensure the device is open
+    */
+-  if (dev->HasCap(CAP_STREAM)) {
+-    mode = OPEN_WRITE_ONLY;
+-  } else {
++  if (dev->device->drive_crypto_enabled) {
+     mode = OPEN_READ_WRITE;
++  } else {
++    if (dev->HasCap(CAP_STREAM)) {
++      mode = OPEN_WRITE_ONLY;
++    } else {
++      mode = OPEN_READ_ONLY;
++    }
+   }
+ 
+   /*


Home | Main Index | Thread Index | Old Index