pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Upgrade bareos to current release (18.2.6) Add bareos-clientonly Fixes included here: fix NetBSD port support scsi-crypto option disable NDMP as some RPC marshalling is missing in the base system clear hw crypto key on close (scsi-crypto module) make tapealert check more often (tapealert module) provide a chio-changer script
- To: pkgsrc-wip-changes%NetBSD.org@localhost
- Subject: Upgrade bareos to current release (18.2.6) Add bareos-clientonly Fixes included here: fix NetBSD port support scsi-crypto option disable NDMP as some RPC marshalling is missing in the base system clear hw crypto key on close (scsi-crypto module) make tapealert check more often (tapealert module) provide a chio-changer script
- From: Frank Kardel <kardel%netbsd.org@localhost>
- Date: Fri, 12 Apr 2019 10:19:36 +0000
Module Name: pkgsrc-wip
Committed By: Frank Kardel <kardel%netbsd.org@localhost>
Pushed By: kardel
Date: Fri Apr 12 12:19:36 2019 +0200
Changeset: 7e2d3241eafd0e7c43c0854704e88e24a9193a45
Modified Files:
bareos/DESCR
bareos/Makefile
bareos/Makefile.common
bareos/distinfo
bareos/files/bareos-dir.sh
bareos/files/bareos-fd.sh
bareos/files/bareos-sd.sh
bareos/files/bareos.sh
bareos/options.mk
Added Files:
bareos-clientonly/DESCR
bareos-clientonly/Makefile
bareos-clientonly/PLIST.client
bareos-clientonly/distinfo
bareos-clientonly/files/bareos-fd.sh
bareos/MESSAGE
bareos/PLIST.NetBSD
bareos/PLIST.common
bareos/patches/patch-core_CMakeLists.txt
bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake
bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake
bareos/patches/patch-core_platforms_netbsd_CMakeLists.txt
bareos/patches/patch-core_platforms_netbsd_chio-changer
bareos/patches/patch-core_scripts_CMakeLists.txt
bareos/patches/patch-core_src_CMakeLists.txt
bareos/patches/patch-core_src_cats_make__catalog__backup.pl.in
bareos/patches/patch-core_src_cats_postgresql__queries.inc
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_include_version.h
bareos/patches/patch-core_src_lib_scsi__lli.cc
bareos/patches/patch-core_src_lmdb_mdb.c
bareos/patches/patch-core_src_ndmp_CMakeLists.txt
bareos/patches/patch-core_src_ndmp_ndmos.h
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
Removed Files:
bareos/PLIST
bareos/TODO
bareos/files/chio-changer
bareos/patches/patch-GNUmakefile.in
bareos/patches/patch-Makefile.in
bareos/patches/patch-aa
bareos/patches/patch-src_console_Makefile.in
bareos/patches/patch-src_dird_Makefile.in
bareos/patches/patch-src_filed_Makefile.in
bareos/patches/patch-src_stored_Makefile.in
Log Message:
Upgrade bareos to current release (18.2.6)
Add bareos-clientonly
Fixes included here:
fix NetBSD port
support scsi-crypto option
disable NDMP as some RPC marshalling is missing in the base system
clear hw crypto key on close (scsi-crypto module)
make tapealert check more often (tapealert module)
provide a chio-changer script
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7e2d3241eafd0e7c43c0854704e88e24a9193a45
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
bareos-clientonly/DESCR | 7 +
bareos-clientonly/Makefile | 34 +++
bareos-clientonly/PLIST.client | 42 ++++
bareos-clientonly/distinfo | 37 ++++
bareos-clientonly/files/bareos-fd.sh | 23 ++
bareos/DESCR | 10 +-
bareos/MESSAGE | 7 +
bareos/Makefile | 60 +++---
bareos/Makefile.common | 147 ++++++-------
bareos/PLIST | 105 ----------
bareos/PLIST.NetBSD | 2 +
bareos/PLIST.common | 231 +++++++++++++++++++++
bareos/TODO | 2 -
bareos/distinfo | 45 +++-
bareos/files/bareos-dir.sh | 16 +-
bareos/files/bareos-fd.sh | 15 +-
bareos/files/bareos-sd.sh | 16 +-
bareos/files/bareos.sh | 1 -
bareos/files/chio-changer | 98 ---------
bareos/options.mk | 30 +--
bareos/patches/patch-GNUmakefile.in | 13 --
bareos/patches/patch-Makefile.in | 13 --
bareos/patches/patch-aa | 32 ---
bareos/patches/patch-core_CMakeLists.txt | 33 +++
.../patch-core_cmake_BareosCheckIncludes.cmake | 24 +++
...atch-core_cmake_BareosSetVariableDefaults.cmake | 26 +++
.../patch-core_platforms_netbsd_CMakeLists.txt | 18 ++
.../patch-core_platforms_netbsd_chio-changer | 141 +++++++++++++
bareos/patches/patch-core_scripts_CMakeLists.txt | 47 +++++
bareos/patches/patch-core_src_CMakeLists.txt | 15 ++
...patch-core_src_cats_make__catalog__backup.pl.in | 20 ++
.../patch-core_src_cats_postgresql__queries.inc | 24 +++
bareos/patches/patch-core_src_dird_admin.cc | 26 +++
bareos/patches/patch-core_src_dird_archive.cc | 26 +++
.../patch-core_src_dird_authenticate__console.cc | 19 ++
bareos/patches/patch-core_src_dird_backup.cc | 26 +++
bareos/patches/patch-core_src_dird_consolidate.cc | 26 +++
bareos/patches/patch-core_src_dird_dird__conf.cc | 16 ++
bareos/patches/patch-core_src_dird_migrate.cc | 46 ++++
bareos/patches/patch-core_src_dird_restore.cc | 46 ++++
bareos/patches/patch-core_src_dird_verify.cc | 46 ++++
bareos/patches/patch-core_src_findlib_find__one.cc | 15 ++
bareos/patches/patch-core_src_include_version.h | 47 +++++
bareos/patches/patch-core_src_lib_scsi__lli.cc | 46 ++++
bareos/patches/patch-core_src_lmdb_mdb.c | 25 +++
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 | 40 ++++
...tch-core_src_plugins_stored_scsitapealert-sd.cc | 18 ++
bareos/patches/patch-core_src_stored_acquire.cc | 15 ++
bareos/patches/patch-core_src_stored_btape.cc | 23 ++
bareos/patches/patch-core_src_stored_dir__cmd.cc | 24 +++
bareos/patches/patch-core_src_stored_label.cc | 15 ++
bareos/patches/patch-src_console_Makefile.in | 11 -
bareos/patches/patch-src_dird_Makefile.in | 20 --
bareos/patches/patch-src_filed_Makefile.in | 11 -
bareos/patches/patch-src_stored_Makefile.in | 11 -
57 files changed, 1499 insertions(+), 488 deletions(-)
diffs:
diff --git a/bareos-clientonly/DESCR b/bareos-clientonly/DESCR
new file mode 100644
index 0000000000..b80cb46208
--- /dev/null
+++ b/bareos-clientonly/DESCR
@@ -0,0 +1,7 @@
+Bareos is a set of computer programs that permits the system administrator
+to manage backup, recovery, and verfication of computer data
+across a network of computers of different kinds. Bareos can
+also run entirely upon a single computer and can backup to various types
+of media, including tape and disk.
+
+This the just the client installation part.
diff --git a/bareos-clientonly/Makefile b/bareos-clientonly/Makefile
new file mode 100644
index 0000000000..226fc1d33c
--- /dev/null
+++ b/bareos-clientonly/Makefile
@@ -0,0 +1,34 @@
+# $NetBSD: Makefile,v 1.77 2018/12/09 18:52:45 adam Exp $
+
+PKGNAME= ${DISTNAME:S/-/-clientonly-/}
+
+COMMENT= Backup Archiving REcovery Open Sourced - client
+
+CONFLICTS= bareos-[0-9]* bacula-[0-9]* bacula-clientonly-[0-9]*
+
+PATCHDIR= ${.CURDIR}/../bareos/patches
+FILESDIR= ${.CURDIR}/../bareos/files
+
+PLIST_SRC= PLIST.client
+
+CMAKE_ARGS?=
+CMAKE_ARGS+= -Dclient-only=true
+
+RCD_SCRIPTS= bareos-fd
+
+# non WIP .include "${.CURDIR}/../../sysutils/bareos/Makefile.common"
+.include "${.CURDIR}/../bareos/Makefile.common"
+
+CONFIG_TEMPLATES!=${EGREP} "^"${CONFIG_TEMPLATE_PATH:Q} PLIST.client 2>/dev/null | sed -e 's/ /\\ /g'
+CONF_FILES?=
+
+.for l in ${CONFIG_TEMPLATES}
+CONF_FILES+=${l} ${PKG_SYSCONFDIR}${l:S/^${CONFIG_TEMPLATE_PATH}//}
+.endfor
+
+BUILD_DEFS+=VARBASE # to keep pkglint happy
+
+MAKE_DIRS?=
+MAKE_DIRS+=${CONFIG_TEMPLATES:H:O:u:S/^${CONFIG_TEMPLATE_PATH}/${PKG_SYSCONFDIR}/}
+MAKE_DIRS+=${VARBASE}/db/${PKG_SYSCONFSUBDIR}
+MAKE_DIRS+=${VARBASE}/db/${PKG_SYSCONFSUBDIR}/working
diff --git a/bareos-clientonly/PLIST.client b/bareos-clientonly/PLIST.client
new file mode 100644
index 0000000000..f2797ab801
--- /dev/null
+++ b/bareos-clientonly/PLIST.client
@@ -0,0 +1,42 @@
+@comment $NetBSD$
+bin/bconsole
+lib/bareos/plugins/BareosFdPluginBaseclass.py
+lib/bareos/plugins/BareosFdPluginLDAP.py
+lib/bareos/plugins/BareosFdPluginLocalFileset.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.py.template
+lib/bareos/plugins/bareos_fd_consts.py
+lib/bareos/plugins/bpipe-fd.so
+lib/bareos/plugins/python-fd.so
+lib/bareos/scripts/bareos
+lib/bareos/scripts/bareos-config
+lib/bareos/scripts/bareos-config-lib.sh
+lib/bareos/scripts/bareos-ctl-fd
+lib/bareos/scripts/bareos-ctl-funcs
+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.${PKGVERSION}
+lib/libbareosfind.so
+lib/libbareosfind.so.18
+lib/libbareosfind.so.${PKGVERSION}
+lib/libbareoslmdb.so
+lib/libbareoslmdb.so.18
+lib/libbareoslmdb.so.${PKGVERSION}
+man/man1/bconsole.1
+man/man8/bareos-fd.8
+man/man8/bareos.8
+sbin/bareos
+sbin/bareos-fd
+sbin/bconsole
+sbin/btraceback
+share/examples/bareos/configtemplates/bareos-fd.d/client/myself.conf
+share/examples/bareos/configtemplates/bareos-fd.d/director/bareos-dir.conf
+share/examples/bareos/configtemplates/bareos-fd.d/director/bareos-mon.conf
+share/examples/bareos/configtemplates/bareos-fd.d/messages/Standard.conf
+share/examples/bareos/configtemplates/bconsole.conf
diff --git a/bareos-clientonly/distinfo b/bareos-clientonly/distinfo
new file mode 100644
index 0000000000..64d8131bb1
--- /dev/null
+++ b/bareos-clientonly/distinfo
@@ -0,0 +1,37 @@
+$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 (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_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_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
diff --git a/bareos-clientonly/files/bareos-fd.sh b/bareos-clientonly/files/bareos-fd.sh
new file mode 100644
index 0000000000..8d644d872c
--- /dev/null
+++ b/bareos-clientonly/files/bareos-fd.sh
@@ -0,0 +1,23 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# PROVIDE: bareos-fd
+# REQUIRE: DAEMON
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="bareosfd"
+rcvar=$name
+command="@PREFIX@/sbin/bareos-fd"
+required_dirs="@BAREOS_ETCDIR@/bareos-fd.d"
+pidfile="@BAREOS_PIDDIR@/bareos-fd.9102.pid"
+command_args="-g @BAREOS_GROUP@"
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ echo -n " ${name}"
+ ${command} ${bareosfd_flags} -c ${required_files}
+fi
diff --git a/bareos/DESCR b/bareos/DESCR
index 47c6256460..01f0bfb96a 100644
--- a/bareos/DESCR
+++ b/bareos/DESCR
@@ -1,5 +1,5 @@
-Bareos is a set of computer programs that permits the system
-administrator to manage backup, recovery, and verification of computer
-data across a network of computers of different kinds. Bareos can also
-run entirely upon a single computer and can backup to various types of
-media, including tape and disk.
+Bareos is a set of computer programs that permits the system administrator
+to manage backup, recovery, and verfication of computer data
+across a network of computers of different kinds. Bareos can
+also run entirely upon a single computer and can backup to various types
+of media, including tape and disk.
diff --git a/bareos/MESSAGE b/bareos/MESSAGE
new file mode 100644
index 0000000000..275efec65b
--- /dev/null
+++ b/bareos/MESSAGE
@@ -0,0 +1,7 @@
+===========================================================================
+$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/.
+
+===========================================================================
diff --git a/bareos/Makefile b/bareos/Makefile
index af507e78e4..5effa772bf 100644
--- a/bareos/Makefile
+++ b/bareos/Makefile
@@ -1,39 +1,49 @@
-# $NetBSD$
+# $NetBSD: Makefile,v 1.77 2018/12/09 18:52:45 adam Exp $
-.include "options.mk"
+CONFLICTS= bareos-clientonly-[0-9]* bacula-clientonly-[0-9]* bacula-[0-9]*
+
+COMMENT= Backup Archiving REcovery Open Sourced
-PLIST_SUBST+= BAREOS_DB=${BAREOS_DB}
-MESSAGE_SUBST+= PREFIX=${PREFIX}
-MESSAGE_SUBST+= PKGNAME_NOREV=${PKGNAME_NOREV}
+PLIST_SRC= PLIST.common
+
+RCD_SCRIPTS= bareos bareos-dir bareos-sd bareos-fd
# For make_catalog_backup.pl.in.
USE_TOOLS+= perl:run
-CONFIGURE_ARGS+= --with-dir-group=${BAREOS_GROUP}
-CONFIGURE_ARGS+= --with-dir-user=${BAREOS_DIR_USER}
-CONFIGURE_ARGS+= --with-sd-group=${BAREOS_GROUP}
-CONFIGURE_ARGS+= --with-sd-user=${BAREOS_SD_USER}
-
-OWN_DIRS_PERMS+= ${BAREOS_WORKINGDIR} ${REAL_ROOT_USER} ${BAREOS_GROUP} 770
+REPLACE_PERL?=
+REPLACE_PERL+= core/src/cats/make_catalog_backup.pl.in
-PKG_USERS= ${BAREOS_DIR_USER}:${BAREOS_GROUP}
-PKG_USERS+= ${BAREOS_SD_USER}:${BAREOS_GROUP}
-PKG_GROUPS= ${BAREOS_GROUP}
+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_SED.fix-paths= -e 's,@PREFIX@,${PREFIX},g'
-CONF_FILES+= ${EXAMPLESDIR}/bconsole.conf ${PKG_SYSCONFDIR}/bconsole.conf
+.include "options.mk"
+.include "Makefile.common"
-RCD_SCRIPTS= bareos bareos-dir bareos-sd bareos-fd
+# XXX keep pkglint happy - already defined in Makefile.common
+BUILD_DEFS+= VARBASE
-REPLACE_PERL+= src/cats/make_catalog_backup.pl.in
+# spool directory
+MAKE_DIRS_PERMS+= ${VARBASE}/${PKG_SYSCONFSUBDIR} \
+ ${REAL_ROOT_USER} ${BAREOS_GROUP} 0770
-.include "Makefile.common"
+post-install: # should go away once we find out how to set the run link path in CMakefiles
+ ${LN} -fs ${PKG_SYSCONFSUBDIR}/backends/libbareossd-gentape.so ${DESTDIR:Q}/${BAREOS_LIBDIR:Q}/libbareossd-gentape.so
-.if defined(USE_DESTDIR)
-INSTALL_MAKE_FLAGS+= dir_user= dir_group= sd_group=
-.endif
+CONFIG_TEMPLATES!=${EGREP} "^"${CONFIG_TEMPLATE_PATH:Q} PLIST.common 2>/dev/null | sed -e 's/ /\\ /g'
+CONF_FILES?=
-post-install:
- ${INSTALL_SCRIPT} ${FILESDIR}/chio-changer \
- ${DESTDIR}${PREFIX}/libexec/bareos/
+.for l in ${CONFIG_TEMPLATES}
+CONF_FILES+=${l} ${PKG_SYSCONFDIR}${l:S/^${CONFIG_TEMPLATE_PATH}//}
+.endfor
-.include "../../mk/bsd.pkg.mk"
+MAKE_DIRS?=
+MAKE_DIRS+=${CONFIG_TEMPLATES:H:O:u:S/^${CONFIG_TEMPLATE_PATH}/${PKG_SYSCONFDIR}/}
+MAKE_DIRS+=${VARBASE}/db/${PKG_SYSCONFSUBDIR}
+MAKE_DIRS+=${VARBASE}/db/${PKG_SYSCONFSUBDIR}/bsr
+MAKE_DIRS+=${VARBASE}/db/${PKG_SYSCONFSUBDIR}/storage
+MAKE_DIRS+=${VARBASE}/db/${PKG_SYSCONFSUBDIR}/working
diff --git a/bareos/Makefile.common b/bareos/Makefile.common
index 61bdd6fb49..3c1777ec8d 100644
--- a/bareos/Makefile.common
+++ b/bareos/Makefile.common
@@ -1,88 +1,95 @@
# $NetBSD$
+# used by sysutils/bareos-clientonly/Makefile
+# used by wip/bareos-clientonly/Makefile
GITHUB_PROJECT= bareos
-PKGNAME= ${GITHUB_PROJECT}-${VERSION}
-DISTNAME= bareos
-MASTER_SITES= ${MASTER_SITE_GITHUB:=bareos/}
-DIST_SUBDIR= ${GITHUB_PROJECT}
-TAG= Release
-GITHUB_TAG= ${TAG}/${PKGVERSION_NOREV}
-WRKSRC= ${WRKDIR}/${DISTNAME}-${TAG}-${PKGVERSION_NOREV}
+VERSION= 18.2.6
+GITHUB_TAG= Release/${VERSION}
-VERSION= 17.2.4
+DISTNAME= bareos-${VERSION}
+WRKSRC= ${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG:C/\//-/}
CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_GITHUB:=bareos/}
+EXTRACT_SUFX= .zip
MAINTAINER= paul%paulbsd.com@localhost
HOMEPAGE= http://www.bareos.org/
-COMMENT?= Open Source Data Protection
LICENSE= gnu-agpl-v3
-USE_LANGUAGES= c c++
-USE_LIBTOOL= yes
-USE_PKGLOCALEDIR= yes
-USE_TOOLS+= msgfmt
-GNU_CONFIGURE= yes
+# pkgsrc version currently only tested/configured for NetBSD build
+ONLY_FOR_PLATFORM= NetBSD-*-*
-.include "../../mk/bsd.prefs.mk"
+USE_LANGUAGES+= c c++
+USE_TOOLS+= awk
+USE_CMAKE= yes
-# For make_catalog_backup.pl.in.
-USE_TOOLS+= perl:run
+CONFIGURE_DIRS+= core
+
+BUILD_DEFS+= VARBASE
+
+# file locations
+PKG_SYSCONFSUBDIR?= bareos
+BAREOS_PIDDIR?= ${VARBASE}/run
+BAREOS_LOGDIR?= ${VARBASE}/log
+BAREOS_LIBDIR?= ${PREFIX}/lib
+BAREOS_WORKINGDIR?= ${VARBASE}/db/${PKG_SYSCONFSUBDIR}
+BUILD_DEFS+= BAREOS_PIDDIR BAREOS_WORKINGDIR
+
+# user/group information
BAREOS_GROUP?= bareos
-BAREOS_DIR_USER?= bareos-dir
-BAREOS_SD_USER?= bareos-sd
-PKG_GROUPS_VARS+= BAREOS_GROUP
-PKG_USERS_VARS= BAREOS_DIR_USER BAREOS_SD_USER
+BAREOS_SD_USER?= bareossd
+PKG_GECOS.${BAREOS_SD_USER}=Bareos Storage User
+PKG_HOME.${BAREOS_SD_USER}=${BAREOS_WORKINGDIR}
+PKG_SHELL.${BAREOS_SD_USER}=/bin/sh
+
+BAREOS_DIR_USER?= bareosdir
+PKG_GECOS.${BAREOS_DIR_USER}=Bareos Director User
+PKG_HOME.${BAREOS_DIR_USER}=${BAREOS_WORKINGDIR}
+PKG_SHELL.${BAREOS_DIR_USER}=/bin/sh
+
+PKG_GROUPS= ${BAREOS_GROUP}
+PKG_USERS= ${BAREOS_DIR_USER}:${BAREOS_GROUP} ${BAREOS_SD_USER}:${BAREOS_GROUP}
+
+CONFIG_TEMPLATE_PATH= share/examples/${PKG_SYSCONFSUBDIR}/configtemplates
+
+# variables to substitute
+FILES_SUBST+= BAREOS_ETCDIR=${PKG_SYSCONFDIR}
+FILES_SUBST+= BAREOS_PIDDIR=${BAREOS_PIDDIR}
+FILES_SUBST+= BAREOS_LOGDIR=${BAREOS_LOGDIR}
+FILES_SUBST+= BAREOS_GROUP=${BAREOS_GROUP}
+FILES_SUBST+= BAREOS_DIR_USER=${BAREOS_DIR_USER}
+FILES_SUBST+= BAREOS_SD_USER=${BAREOS_SD_USER}
+
+# cmake arguments
+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+= -Dconfigtemplatedir=${PREFIX}/${CONFIG_TEMPLATE_PATH}
+CMAKE_ARGS+= -Dworkingdir=${VARBASE}/db/${PKG_SYSCONFSUBDIR}/working
+CMAKE_ARGS+= -Dsubsysdir=${VARBASE}/db/${PKG_SYSCONFSUBDIR}
+CMAKE_ARGS+= -Dbsrdir=${VARBASE}/db/${PKG_SYSCONFSUBDIR}/bsr
+CMAKE_ARGS+= -Dlogdir=${BAREOS_LOGDIR}
+CMAKE_ARGS+= -Dlibdir=${BAREOS_LIBDIR}
+CMAKE_ARGS+= -Dpiddir=${BAREOS_PIDDIR}
+CMAKE_ARGS+= -Darchivedir=${VARBASE}/db/${PKG_SYSCONFSUBDIR}/storage
+CMAKE_ARGS+= -Ddir-user=${BAREOS_DIR_USER}
+CMAKE_ARGS+= -Ddir-group=${BAREOS_GROUP}
+CMAKE_ARGS+= -Dsd-user=${BAREOS_SD_USER}
+CMAKE_ARGS+= -Dsd-group=${BAREOS_GROUP}
+CMAKE_ARGS+= -Dfd-user=root
+CMAKE_ARGS+= -Dfd-group=${BAREOS_GROUP}
-PKG_SYSCONFSUBDIR?= bareos
-BAREOS_PIDDIR?= ${VARBASE}/run/bareos
-BAREOS_WORKINGDIR?= ${VARBASE}/spool/bareos
-
-BUILD_DEFS+= VARBASE BAREOS_PIDDIR BAREOS_WORKINGDIR
-
-FILES_SUBST+= BAREOS_ETCDIR=${PKG_SYSCONFDIR}
-FILES_SUBST+= BAREOS_PIDDIR=${BAREOS_PIDDIR}
-FILES_SUBST+= BAREOS_GROUP=${BAREOS_GROUP}
-FILES_SUBST+= BAREOS_DIR_USER=${BAREOS_DIR_USER}
-FILES_SUBST+= BAREOS_SD_USER=${BAREOS_SD_USER}
-
-SUBST_CLASSES+= egdir
-SUBST_STAGE.egdir= pre-configure
-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'
-
-CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+= --with-confdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+= --with-scriptdir=${PREFIX}/libexec/bareos
-CONFIGURE_ARGS+= --with-sbin-perm=0755
-CONFIGURE_ARGS+= --with-working-dir=${BAREOS_WORKINGDIR}
-CONFIGURE_ARGS+= --with-pid-dir=${BAREOS_PIDDIR}
-CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.editlinereadline}/include/readline
-CONFIGURE_ARGS+= --with-jansson
-
-.if ${OPSYS} == "Linux"
-CONFIGURE_ARGS+= --enable-smartalloc
-.endif
-.if ${OPSYS} == "DragonFly"
-CONFIGURE_ARGS+= --disable-xattr
-.endif
-
-PTHREAD_OPTS+= require
-PTHREAD_AUTO_VARS= yes
-
-CONFLICTS= bacula-[0-9]*
-
-EXAMPLESDIR= ${PREFIX}/share/examples/bareos
-INSTALLATION_DIRS+= ${EXAMPLESDIR}
-
-.include "../../mk/readline.buildlink3.mk"
+.include "../../mk/bsd.prefs.mk"
+
+# dependencies
+.include "../../archivers/lzo/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
-.include "../../mk/pthread.buildlink3.mk"
+.include "../../lang/python27/buildlink3.mk"
+.include "../../mk/pam.buildlink3.mk"
+.include "../../devel/readline/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/jansson/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/bareos/PLIST b/bareos/PLIST
deleted file mode 100644
index b17384dbee..0000000000
--- a/bareos/PLIST
+++ /dev/null
@@ -1,105 +0,0 @@
-@comment $NetBSD$
-bin/bconsole
-bin/bregex
-bin/bsmtp
-bin/bwild
-lib/BareosDirPluginBaseclass.py
-lib/BareosDirWrapper.py
-lib/BareosSdPluginBaseclass.py
-lib/BareosSdWrapper.py
-lib/autoxflate-sd.so
-lib/bareos-dir-class-plugin.py
-lib/bareos-dir.py.template
-lib/bareos-sd.py.template
-lib/bareos_dir_consts.py
-lib/bareos_sd_consts.py
-lib/bpipe-fd.so
-lib/libbareos.la
-lib/libbareoscats-${BAREOS_DB}-${PKGVERSION}.so
-lib/libbareoscats-${BAREOS_DB}.a
-lib/libbareoscats-${BAREOS_DB}.so
-lib/libbareoscats.la
-lib/libbareoscfg.la
-lib/libbareosfind.la
-lib/libbareossd.la
-lib/libbareossql.la
-libexec/bareos/bareos
-libexec/bareos/bareos-config
-libexec/bareos/bareos-config-lib.sh
-libexec/bareos/bareos-ctl-dir
-libexec/bareos/bareos-ctl-fd
-libexec/bareos/bareos-ctl-funcs
-libexec/bareos/bareos-ctl-sd
-libexec/bareos/bareos-explorer
-libexec/bareos/bareos_config
-libexec/bareos/btraceback.dbx
-libexec/bareos/btraceback.gdb
-libexec/bareos/btraceback.mdb
-libexec/bareos/chio-changer
-libexec/bareos/create_bareos_database
-libexec/bareos/ddl/creates/${BAREOS_DB}.sql
-libexec/bareos/ddl/drops/${BAREOS_DB}.sql
-libexec/bareos/ddl/grants/${BAREOS_DB}-readonly.sql
-libexec/bareos/ddl/grants/${BAREOS_DB}.sql
-libexec/bareos/ddl/updates/${BAREOS_DB}.10_11.sql
-libexec/bareos/ddl/updates/${BAREOS_DB}.11_12.sql
-libexec/bareos/ddl/updates/${BAREOS_DB}.12_14.sql
-libexec/bareos/ddl/updates/${BAREOS_DB}.14_2001.sql
-libexec/bareos/ddl/updates/${BAREOS_DB}.2001_2002.sql
-libexec/bareos/ddl/updates/${BAREOS_DB}.2002_2003.sql
-libexec/bareos/ddl/updates/${BAREOS_DB}.2003_2004.sql
-libexec/bareos/ddl/updates/${BAREOS_DB}.2004_2171.sql
-libexec/bareos/ddl/updates/${BAREOS_DB}.bee.1017_2004.sql
-libexec/bareos/ddl/versions.map
-libexec/bareos/delete_catalog_backup
-libexec/bareos/disk-changer
-libexec/bareos/drop_bareos_database
-libexec/bareos/drop_bareos_tables
-libexec/bareos/grant_bareos_privileges
-libexec/bareos/make_bareos_tables
-libexec/bareos/make_catalog_backup
-libexec/bareos/make_catalog_backup.pl
-libexec/bareos/mtx-changer
-libexec/bareos/query.sql
-libexec/bareos/update_bareos_tables
-man/man1/bareos-tray-monitor.1
-man/man1/bconsole.1
-man/man1/bregex.1
-man/man1/bsmtp.1
-man/man1/bwild.1
-man/man8/bareos-dbcheck.8
-man/man8/bareos-dir.8
-man/man8/bareos-fd.8
-man/man8/bareos-sd.8
-man/man8/bareos.8
-man/man8/bcopy.8
-man/man8/bextract.8
-man/man8/bls.8
-man/man8/bpluginfo.8
-man/man8/bscan.8
-man/man8/bscrypto.8
-man/man8/btape.8
-man/man8/btraceback.8
-sbin/bareos-dbcheck
-sbin/bareos-dir
-sbin/bareos-fd
-sbin/bareos-sd
-sbin/bconsole
-sbin/bcopy
-sbin/bextract
-sbin/bls
-sbin/bpluginfo
-sbin/bregex
-sbin/bscan
-sbin/bscrypto
-sbin/bsmtp
-sbin/btape
-sbin/btraceback
-sbin/bwild
-@pkgdir etc/bareos/bareos-sd.d
-@pkgdir etc/bareos/bareos-dir.d
-@pkgdir var/bareos/logs
-@pkgdir share/examples/bareos
-@pkgdir libexec/bareos/ddl/grants
-@pkgdir libexec/bareos/ddl/updates
-@pkgdir libexec/bareos/ddl/drops
diff --git a/bareos/PLIST.NetBSD b/bareos/PLIST.NetBSD
new file mode 100644
index 0000000000..6a8f0d06c8
--- /dev/null
+++ b/bareos/PLIST.NetBSD
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+lib/bareos/scripts/chio-changer
diff --git a/bareos/PLIST.common b/bareos/PLIST.common
new file mode 100644
index 0000000000..b56cbdbb14
--- /dev/null
+++ b/bareos/PLIST.common
@@ -0,0 +1,231 @@
+@comment $NetBSD$
+bin/bconsole
+bin/bregex
+bin/bsmtp
+bin/bwild
+bin/timelimit
+include/bareos/address_conf.h
+include/bareos/alist.h
+include/bareos/attr.h
+include/bareos/baconfig.h
+include/bareos/bareos.h
+include/bareos/base64.h
+include/bareos/bc_types.h
+include/bareos/berrno.h
+include/bareos/bits.h
+include/bareos/bpipe.h
+include/bareos/breg.h
+include/bareos/bregex.h
+include/bareos/bsock.h
+include/bareos/bsock_tcp.h
+include/bareos/bstringlist.h
+include/bareos/btime.h
+include/bareos/btimers.h
+include/bareos/cbuf.h
+include/bareos/config.h
+include/bareos/crypto.h
+include/bareos/crypto_cache.h
+include/bareos/devlock.h
+include/bareos/dlist.h
+include/bareos/fnmatch.h
+include/bareos/guid_to_name.h
+include/bareos/htable.h
+include/bareos/ini.h
+include/bareos/jcr.h
+include/bareos/lex.h
+include/bareos/lib.h
+include/bareos/lockmgr.h
+include/bareos/md5.h
+include/bareos/mem_pool.h
+include/bareos/message.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/tls.h
+include/bareos/tls_conf.h
+include/bareos/tree.h
+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
+lib/bareos/backends/libbareossd-tape.so
+lib/bareos/plugins/BareosDirPluginBaseclass.py
+lib/bareos/plugins/BareosDirWrapper.py
+lib/bareos/plugins/BareosFdPluginBaseclass.py
+lib/bareos/plugins/BareosFdPluginLDAP.py
+lib/bareos/plugins/BareosFdPluginLocalFileset.py
+lib/bareos/plugins/BareosFdWrapper.py
+lib/bareos/plugins/BareosSdPluginBaseclass.py
+lib/bareos/plugins/BareosSdWrapper.py
+lib/bareos/plugins/autoxflate-sd.so
+lib/bareos/plugins/bareos-dir-class-plugin.py
+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.py.template
+lib/bareos/plugins/bareos-sd-class-plugin.py
+lib/bareos/plugins/bareos-sd.py.template
+lib/bareos/plugins/bareos_dir_consts.py
+lib/bareos/plugins/bareos_fd_consts.py
+lib/bareos/plugins/bareos_sd_consts.py
+lib/bareos/plugins/bpipe-fd.so
+lib/bareos/plugins/python-dir.so
+lib/bareos/plugins/python-fd.so
+lib/bareos/plugins/python-sd.so
+lib/bareos/plugins/scsicrypto-sd.so
+lib/bareos/plugins/scsitapealert-sd.so
+lib/bareos/scripts/bareos
+lib/bareos/scripts/bareos-config
+lib/bareos/scripts/bareos-config-lib.sh
+lib/bareos/scripts/bareos-ctl-dir
+lib/bareos/scripts/bareos-ctl-fd
+lib/bareos/scripts/bareos-ctl-funcs
+lib/bareos/scripts/bareos-ctl-sd
+lib/bareos/scripts/bareos-explorer
+lib/bareos/scripts/bareos-glusterfind-wrapper
+lib/bareos/scripts/btraceback.dbx
+lib/bareos/scripts/btraceback.gdb
+lib/bareos/scripts/btraceback.mdb
+lib/bareos/scripts/chio-changer
+lib/bareos/scripts/create_bareos_database
+lib/bareos/scripts/ddl/creates/postgresql.sql
+lib/bareos/scripts/ddl/drops/postgresql.sql
+lib/bareos/scripts/ddl/grants/postgresql-change_owner.dbconfig-template.sql
+lib/bareos/scripts/ddl/grants/postgresql-readonly.sql
+lib/bareos/scripts/ddl/grants/postgresql.sql
+lib/bareos/scripts/ddl/updates/postgresql.10_11.sql
+lib/bareos/scripts/ddl/updates/postgresql.11_12.sql
+lib/bareos/scripts/ddl/updates/postgresql.12_14.sql
+lib/bareos/scripts/ddl/updates/postgresql.14_2001.sql
+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.bee.1017_2004.sql
+lib/bareos/scripts/ddl/versions.map
+lib/bareos/scripts/delete_catalog_backup
+lib/bareos/scripts/disk-changer
+lib/bareos/scripts/drop_bareos_database
+lib/bareos/scripts/drop_bareos_tables
+lib/bareos/scripts/grant_bareos_privileges
+lib/bareos/scripts/make_bareos_tables
+lib/bareos/scripts/make_catalog_backup
+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.${PKGVERSION}
+lib/libbareoscats.so
+lib/libbareoscats.so.18
+lib/libbareoscats.so.${PKGVERSION}
+lib/libbareosfind.so
+lib/libbareosfind.so.18
+lib/libbareosfind.so.${PKGVERSION}
+lib/libbareoslmdb.so
+lib/libbareoslmdb.so.18
+lib/libbareoslmdb.so.${PKGVERSION}
+lib/libbareossd.so
+lib/libbareossd-gentape.so
+lib/libbareossql.so
+lib/libbareossql.so.18
+lib/libbareossql.so.${PKGVERSION}
+man/man1/bareos-tray-monitor.1
+man/man1/bconsole.1
+man/man1/bregex.1
+man/man1/bsmtp.1
+man/man1/bwild.1
+man/man8/bareos-dbcheck.8
+man/man8/bareos-dir.8
+man/man8/bareos-fd.8
+man/man8/bareos-sd.8
+man/man8/bareos.8
+man/man8/bcopy.8
+man/man8/bextract.8
+man/man8/bls.8
+man/man8/bpluginfo.8
+man/man8/bscan.8
+man/man8/bscrypto.8
+man/man8/btape.8
+man/man8/btraceback.8
+sbin/bareos
+sbin/bareos-dbcheck
+sbin/bareos-dir
+sbin/bareos-fd
+sbin/bareos-sd
+sbin/bconsole
+sbin/bcopy
+sbin/bextract
+sbin/bls
+sbin/bpluginfo
+sbin/bregex
+sbin/bscan
+sbin/bscrypto
+sbin/bsmtp
+sbin/btape
+sbin/btestls
+sbin/btraceback
+sbin/bwild
+sbin/timelimit
+share/examples/bareos/configtemplates/bareos-dir.d/catalog/MyCatalog.conf
+share/examples/bareos/configtemplates/bareos-dir.d/client/bareos-fd.conf
+share/examples/bareos/configtemplates/bareos-dir.d/console/bareos-mon.conf
+share/examples/bareos/configtemplates/bareos-dir.d/director/bareos-dir.conf
+share/examples/bareos/configtemplates/bareos-dir.d/fileset/Catalog.conf
+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/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/restore-ldap.conf.example
+share/examples/bareos/configtemplates/bareos-dir.d/jobdefs/DefaultJob.conf
+share/examples/bareos/configtemplates/bareos-dir.d/messages/Daemon.conf
+share/examples/bareos/configtemplates/bareos-dir.d/messages/Standard.conf
+share/examples/bareos/configtemplates/bareos-dir.d/pool/Differential.conf
+share/examples/bareos/configtemplates/bareos-dir.d/pool/Full.conf
+share/examples/bareos/configtemplates/bareos-dir.d/pool/Incremental.conf
+share/examples/bareos/configtemplates/bareos-dir.d/pool/Scratch.conf
+share/examples/bareos/configtemplates/bareos-dir.d/profile/operator.conf
+share/examples/bareos/configtemplates/bareos-dir.d/schedule/WeeklyCycle.conf
+share/examples/bareos/configtemplates/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf
+share/examples/bareos/configtemplates/bareos-dir.d/storage/File.conf
+share/examples/bareos/configtemplates/bareos-dir.d/storage/NULL.conf.example
+share/examples/bareos/configtemplates/bareos-dir.d/storage/Tape.conf.example
+share/examples/bareos/configtemplates/bareos-fd.d/client/myself.conf
+share/examples/bareos/configtemplates/bareos-fd.d/director/bareos-dir.conf
+share/examples/bareos/configtemplates/bareos-fd.d/director/bareos-mon.conf
+share/examples/bareos/configtemplates/bareos-fd.d/messages/Standard.conf
+share/examples/bareos/configtemplates/bareos-regress.conf
+share/examples/bareos/configtemplates/bareos-sd.d/autochanger/autochanger-0.conf.example
+share/examples/bareos/configtemplates/bareos-sd.d/device/FileStorage.conf
+share/examples/bareos/configtemplates/bareos-sd.d/device/NULL.conf.example
+share/examples/bareos/configtemplates/bareos-sd.d/device/tapedrive-0.conf.example
+share/examples/bareos/configtemplates/bareos-sd.d/director/bareos-dir.conf
+share/examples/bareos/configtemplates/bareos-sd.d/director/bareos-mon.conf
+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/counter
+@pkgdir share/examples/bareos/configtemplates/bareos-dir-export/client
diff --git a/bareos/TODO b/bareos/TODO
deleted file mode 100644
index 61a0761cff..0000000000
--- a/bareos/TODO
+++ /dev/null
@@ -1,2 +0,0 @@
-This package has known vulnerabilities, please investigate and fix if possible:
- CVE-2017-14610
diff --git a/bareos/distinfo b/bareos/distinfo
index c9e93eee3b..9efe6d58d4 100644
--- a/bareos/distinfo
+++ b/bareos/distinfo
@@ -1,13 +1,36 @@
$NetBSD$
-SHA1 (bareos/bareos.tar.gz) = 58c513e93b109753f0bce07b298ac6f2acbf1511
-RMD160 (bareos/bareos.tar.gz) = 5891765e20f1339cbec14cb2cfa69acf92c2008f
-SHA512 (bareos/bareos.tar.gz) = 165bee4dcfabac7e72839831de7067b4dafd1f82dd1615d7fa08ca331b1b3efa516555e33ca2d2ef42482c9b5104769c5ef3dd40a12e1954934874b6884ea26b
-Size (bareos/bareos.tar.gz) = 4173122 bytes
-SHA1 (patch-GNUmakefile.in) = 9afa4bf9e0818b2e969174b898c10eadcc6768b6
-SHA1 (patch-Makefile.in) = 020827dae3b780a3f8e9716ed15bae90ce40a44b
-SHA1 (patch-aa) = 2bdf72f63f6063da1fa3bd9533459ecb9aba9eb6
-SHA1 (patch-src_console_Makefile.in) = 3b01d5615fffa19a02aecc893637d66f40848818
-SHA1 (patch-src_dird_Makefile.in) = c0ea330a289e9a620ca7c92bb2d94182de0904a4
-SHA1 (patch-src_filed_Makefile.in) = 8ab10fd6c56dc0097c53767f5ef0bf60ca915851
-SHA1 (patch-src_stored_Makefile.in) = 26575569dfdf0b056287fe419380f7a79f18e035
+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 (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_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_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
diff --git a/bareos/files/bareos-dir.sh b/bareos/files/bareos-dir.sh
index 575c4c83f6..6ad45ce8e3 100644
--- a/bareos/files/bareos-dir.sh
+++ b/bareos/files/bareos-dir.sh
@@ -10,20 +10,9 @@ fi
name="bareosdir"
rcvar=$name
command="@PREFIX@/sbin/bareos-dir"
-required_files="@BAREOS_ETCDIR@/bareos-dir.conf"
+required_dirs="@BAREOS_ETCDIR@/bareos-dir.d"
pidfile="@BAREOS_PIDDIR@/bareos-dir.9101.pid"
-command_args="-c ${required_files} -u @BAREOS_DIR_USER@ -g @BAREOS_GROUP@"
-start_precmd="bareosdir_precmd"
-
-bareosdir_precmd()
-{
- if [ ! -d @BAREOS_PIDDIR@ ]; then
- mkdir -p -m 775 @BAREOS_PIDDIR@
- else
- chmod 775 @BAREOS_PIDDIR@
- fi
- chown @BAREOS_DIR_USER@:@BAREOS_GROUP@ @BAREOS_PIDDIR@
-}
+command_args="-u @BAREOS_DIR_USER@ -g @BAREOS_GROUP@"
if [ -f /etc/rc.subr ]; then
load_rc_config $name
@@ -32,4 +21,3 @@ else
echo -n " ${name}"
${command} ${bareosdir_flags} -c ${required_files}
fi
-
diff --git a/bareos/files/bareos-fd.sh b/bareos/files/bareos-fd.sh
index 42e80ec74f..8d644d872c 100644
--- a/bareos/files/bareos-fd.sh
+++ b/bareos/files/bareos-fd.sh
@@ -10,19 +10,9 @@ fi
name="bareosfd"
rcvar=$name
command="@PREFIX@/sbin/bareos-fd"
-required_files="@BAREOS_ETCDIR@/bareos-fd.conf"
+required_dirs="@BAREOS_ETCDIR@/bareos-fd.d"
pidfile="@BAREOS_PIDDIR@/bareos-fd.9102.pid"
-command_args="-c ${required_files} -g @BAREOS_GROUP@"
-start_precmd="bareosfd_precmd"
-
-bareosfd_precmd()
-{
- if [ ! -d @BAREOS_PIDDIR@ ]; then
- mkdir -p -m 775 @BAREOS_PIDDIR@
- else
- chmod 775 @BAREOS_PIDDIR@
- fi
-}
+command_args="-g @BAREOS_GROUP@"
if [ -f /etc/rc.subr ]; then
load_rc_config $name
@@ -31,4 +21,3 @@ else
echo -n " ${name}"
${command} ${bareosfd_flags} -c ${required_files}
fi
-
diff --git a/bareos/files/bareos-sd.sh b/bareos/files/bareos-sd.sh
index b2f45c414b..3437c141bf 100644
--- a/bareos/files/bareos-sd.sh
+++ b/bareos/files/bareos-sd.sh
@@ -10,20 +10,9 @@ fi
name="bareossd"
rcvar=$name
command="@PREFIX@/sbin/bareos-sd"
-required_files="@BAREOS_ETCDIR@/bareos-sd.conf"
+required_dirs="@BAREOS_ETCDIR@/bareos-sd.d"
pidfile="@BAREOS_PIDDIR@/bareos-sd.9103.pid"
-command_args="-c ${required_files} -u @BAREOS_SD_USER@ -g @BAREOS_GROUP@"
-start_precmd="bareossd_precmd"
-
-bareossd_precmd()
-{
- if [ ! -d @BAREOS_PIDDIR@ ]; then
- mkdir -p -m 775 @BAREOS_PIDDIR@
- else
- chmod 775 @BAREOS_PIDDIR@
- fi
- chown @BAREOS_SD_USER@:@BAREOS_GROUP@ @BAREOS_PIDDIR@
-}
+command_args="-u @BAREOS_SD_USER@ -g @BAREOS_GROUP@"
if [ -f /etc/rc.subr ]; then
load_rc_config $name
@@ -32,4 +21,3 @@ else
echo -n " ${name}"
${command} ${bareossd_flags} -c ${required_files}
fi
-
diff --git a/bareos/files/bareos.sh b/bareos/files/bareos.sh
index 2a4dd0448c..64035541d1 100644
--- a/bareos/files/bareos.sh
+++ b/bareos/files/bareos.sh
@@ -50,4 +50,3 @@ else
_arg="$1"
${start_cmd}
fi
-
diff --git a/bareos/files/chio-changer b/bareos/files/chio-changer
deleted file mode 100644
index 4208911151..0000000000
--- a/bareos/files/chio-changer
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/bin/sh
-#
-# Bareos interface to chio autoloader
-#
-# If you set in your Device resource
-#
-# Changer Command = "path-to-this-script/chio-changer %c %o %S %a %d"
-# you will have the following input to this script:
-#
-# So Bareos will always call with all the following arguments, even though
-# in come cases, not all are used.
-#
-# chio-changer "changer-device" "command" "slot" "archive-device" "drive-index"
-# $1 $2 $3 $4 $5
-#
-# N.B. If you change the script, take care to return either
-# the chio exit code or a 0. If the script exits with a non-zero
-# exit code, Bareos will assume the request failed.
-
-CHIO=/bin/chio
-
-# check parameter count on commandline
-check_parm_count() {
- pCount=$1
- pCountNeed=$2
- if test $pCount -lt $pCountNeed; then
- echo "usage: chio-changer ctl-device command [slot archive-device drive-index]"
- echo " Insufficient number of arguments given."
- if test $pCount -lt 2; then
- echo " Mimimum usage is first two arguments ..."
- else
- echo " Command expected $pCountNeed arguments"
- fi
- exit 1
- fi
-}
-
-# Check for special cases where only 2 arguments are needed,
-# all others are a minimum of 5
-case $2 in
- list|listall)
- check_parm_count $# 2
- ;;
- slots)
- check_parm_count $# 2
- ;;
- transfer)
- check_parm_count $# 4
- ;;
- *)
- check_parm_count $# 5
- ;;
-esac
-
-
-# Setup arguments
-ctl=$1
-cmd="$2"
-slot=$3
-device=$4
-drive=$5
-
-case $cmd in
- unload)
- ${CHIO} -f $ctl move drive $drive slot $slot
- ;;
-
- load)
- ${CHIO} -f $ctl move slot $slot drive $drive
- ;;
-
- list)
- ${CHIO} -f $ctl status slot voltags | /usr/bin/awk "/</ { slot=\$2 }\
- /Primary volume tag:/ { tag=\$4 }\
- /From:/ { print slot tag }"
- ;;
-
- listall)
- echo "Not yet implemented"
- ;;
-
- loaded)
- ${CHIO} -f $ctl status drive $drive | /usr/bin/awk "BEGIN { from=0 }\
- /From:/{ from=\$3 }\
- END { print from }"
- ;;
-
- slots)
- ${CHIO} -f $ctl params | awk "/slots/{print \$2}"
- ;;
-
- transfer)
- ${CHIO} -f $ctl move slot $slot slot $device
- ;;
-esac
-
-sleep 1
-
diff --git a/bareos/options.mk b/bareos/options.mk
index 3f7bd6bddd..18248aadd6 100644
--- a/bareos/options.mk
+++ b/bareos/options.mk
@@ -1,35 +1,27 @@
-# $NetBSD$
+# $NetBSD: options.mk,v 1.21 2014/10/12 00:08:26 gdt Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.bareos
-PKG_SUPPORTED_OPTIONS= ssl lzo
+PKG_SUPPORTED_OPTIONS= scsi-crypto
PKG_OPTIONS_REQUIRED_GROUPS= database
PKG_OPTIONS_GROUP.database= catalog-sqlite3 catalog-pgsql catalog-mysql
-PKG_SUGGESTED_OPTIONS= ssl catalog-sqlite3
+PKG_SUGGESTED_OPTIONS= catalog-pgsql #scsi-crypto
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mcatalog-sqlite3)
. include "../../databases/sqlite3/buildlink3.mk"
-CONFIGURE_ARGS+= --with-sqlite3=${BUILDLINK_PREFIX.sqlite3}
-BAREOS_DB= sqlite3
+DBIMPL=sqllite3
+CMAKE_ARGS+= -Dsqlite3=yes
.elif !empty(PKG_OPTIONS:Mcatalog-pgsql)
. include "../../mk/pgsql.buildlink3.mk"
-CONFIGURE_ARGS+= --with-postgresql=${PGSQL_PREFIX}
-BAREOS_DB= postgresql
-PGSQL_VERSIONS_ACCEPTED= 95 94 93
+DBIMPL=postgresql
+CMAKE_ARGS+= -Dpostgresql=yes
.elif !empty(PKG_OPTIONS:Mcatalog-mysql)
. include "../../mk/mysql.buildlink3.mk"
-CONFIGURE_ARGS+= --with-mysql=${PREFIX}
-BAREOS_DB= mysql
+DBIMPL=mysql
+CMAKE_ARGS+= -Dmysql=yes
.endif
-.if !empty(PKG_OPTIONS:Mssl)
-. include "../../security/openssl/buildlink3.mk"
-CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
-.else
-CONFIGURE_ARGS+= --without-openssl
-.endif
-
-.if !empty(PKG_OPTIONS:Mlzo)
-. include "../../archivers/lzo/buildlink3.mk"
+.if !empty(PKG_OPTIONS:Mscsi-crypto)
+CMAKE_ARGS+= -Dscsi-crypto=yes
.endif
diff --git a/bareos/patches/patch-GNUmakefile.in b/bareos/patches/patch-GNUmakefile.in
deleted file mode 100644
index a8b3cba4ef..0000000000
--- a/bareos/patches/patch-GNUmakefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- GNUmakefile.in.old 2016-01-05 15:09:55.000000000 +0000
-+++ GNUmakefile.in
-@@ -40,7 +40,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
-
- #-------------------------------------------------------------------------
-
--all: info Makefile subdirs
-+all: Makefile subdirs
- @echo "bareos was built successfully"
-
- SUBDIRS = ${all_subdirs}
diff --git a/bareos/patches/patch-Makefile.in b/bareos/patches/patch-Makefile.in
deleted file mode 100644
index 6101022140..0000000000
--- a/bareos/patches/patch-Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Makefile.in.old 2016-01-05 15:09:44.000000000 +0000
-+++ Makefile.in
-@@ -40,7 +40,7 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
-
- #-------------------------------------------------------------------------
-
--all: info Makefile
-+all: Makefile
- @for I in ${all_subdirs}; \
- do (cd $$I; echo "==>Entering directory `pwd`"; \
- $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
diff --git a/bareos/patches/patch-aa b/bareos/patches/patch-aa
deleted file mode 100644
index 63a01e95fb..0000000000
--- a/bareos/patches/patch-aa
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD$
-
-- 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 2015-06-11 19:22:56.000000000 +0200
-+++ src/console/conio.c 2015-06-11 19:24:43.000000000 +0200
-@@ -55,11 +55,12 @@
-
- #ifdef HAVE_CONIO
-
-+#include <termios.h>
- #include <curses.h>
- #include <term.h>
-
- #if defined(HAVE_SUN_OS)
--#if !defined(_TERM_H)
-+#if !defined(HAVE_TERM_H)
- extern "C" int tgetent(void *, const char *);
- extern "C" int tgetnum(const char *);
- extern "C" char *tgetstr (const char*, char**);
-@@ -243,7 +244,9 @@
- static char * getprev(void);
- static void putline(char *newl, int newlen);
- static void t_honk_horn(void);
-+#undef t_insert_line
- static void t_insert_line(void);
-+#undef t_delete_line
- static void t_delete_line(void);
- static void t_clrline(int pos, int width);
- void t_sendl(const char *msg, int len);
diff --git a/bareos/patches/patch-core_CMakeLists.txt b/bareos/patches/patch-core_CMakeLists.txt
new file mode 100644
index 0000000000..8cf181512f
--- /dev/null
+++ b/bareos/patches/patch-core_CMakeLists.txt
@@ -0,0 +1,33 @@
+$NetBSD$
+
+ Setup NetBSD parameters
+ 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
+@@ -119,6 +119,16 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBS
+ link_libraries(intl)
+ endif()
+
++
++if (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
++ set(HAVE_NETBSD_OS 1)
++ set(ndmp 0)
++ set(PSCMD "ps -ax -o pid,command")
++ include_directories(/usr/pkg/include)
++ link_directories(/usr/pkg/lib)
++ 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()
+
++set(HAVE_NDMP 0)
+ set(ndmp "${ndmp}" )
+ set(lmdb "${lmdb}" )
+ set(build_client_only "${client-only}" )
diff --git a/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake b/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake
new file mode 100644
index 0000000000..090eec4b1f
--- /dev/null
+++ b/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake
@@ -0,0 +1,24 @@
+$NetBSD$
+
+ Fix header file checks for NetBSD
+
+--- core/cmake/BareosCheckIncludes.cmake.orig 2018-12-20 08:51:51.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)
+
+ 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_BareosSetVariableDefaults.cmake b/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake
new file mode 100644
index 0000000000..c74486c25f
--- /dev/null
+++ b/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake
@@ -0,0 +1,26 @@
+$NetBSD$
+
+ Make logdir absolute (XXX really needed?)
+ Add setting of NDMP feature
+
+--- core/cmake/BareosSetVariableDefaults.cmake.orig 2019-02-13 14:25:55.000000000 +0000
++++ core/cmake/BareosSetVariableDefaults.cmake
+@@ -231,7 +231,7 @@ ELSE() # IF (${CMAKE_SYSTEM_NAME} MATCHE
+
+ # logdir
+ IF(NOT DEFINED logdir)
+- set(logdir "${CMAKE_INSTALL_LOCALSTATEDIR}/log/${CMAKE_PROJECT_NAME}")
++ set(logdir "/${CMAKE_INSTALL_LOCALSTATEDIR}/log/${CMAKE_PROJECT_NAME}")
+ ENDIF()
+
+ # datarootdir
+@@ -438,6 +438,9 @@ ENDIF()
+ # ndmp
+ IF(NOT DEFINED ndmp)
+ SET(ndmp ON)
++ SET(HAVE_NDMP 1)
++ELSE()
++ SET(HAVE_NDMP 0)
+ ENDIF()
+
+ # ipv6
diff --git a/bareos/patches/patch-core_platforms_netbsd_CMakeLists.txt b/bareos/patches/patch-core_platforms_netbsd_CMakeLists.txt
new file mode 100644
index 0000000000..86decb509c
--- /dev/null
+++ b/bareos/patches/patch-core_platforms_netbsd_CMakeLists.txt
@@ -0,0 +1,18 @@
+$NetBSD$
+
+ Add installation of chio-changer script
+
+--- core/platforms/netbsd/CMakeLists.txt.orig 2019-04-01 11:02:03.728443554 +0000
++++ core/platforms/netbsd/CMakeLists.txt
+@@ -0,0 +1,11 @@
++# NetBSD specifics
++
++MESSAGE(STATUS "installing changer script to ${scriptdir}")
++
++# Install changer script
++IF(NOT ${build_client_only})
++ INSTALL (FILES "${CMAKE_CURRENT_LIST_DIR}/chio-changer" DESTINATION "${scriptdir}/"
++ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
++ GROUP_READ GROUP_EXECUTE
++ WORLD_READ WORLD_EXECUTE)
++ENDIF()
diff --git a/bareos/patches/patch-core_platforms_netbsd_chio-changer b/bareos/patches/patch-core_platforms_netbsd_chio-changer
new file mode 100644
index 0000000000..a9bd10c700
--- /dev/null
+++ b/bareos/patches/patch-core_platforms_netbsd_chio-changer
@@ -0,0 +1,141 @@
+$NetBSD$
+
+ NetBSD changer script using NetBSD chio command
+
+--- core/platforms/netbsd/chio-changer.orig 2019-02-08 15:17:46.308846761 +0000
++++ core/platforms/netbsd/chio-changer
+@@ -0,0 +1,134 @@
++#!/bin/sh
++#
++# Bacula interface to chio autoloader
++#
++# If you set in your Device resource
++#
++# Changer Command = "path-to-this-script/chio-changer %c %o %S %a %d"
++# you will have the following input to this script:
++#
++# So Bacula will always call with all the following arguments, even though
++# in come cases, not all are used.
++#
++# chio-changer "changer-device" "command" "slot" "archive-device" "drive-index"
++# $1 $2 $3 $4 $5
++#
++# N.B. If you change the script, take care to return either
++# the chio exit code or a 0. If the script exits with a non-zero
++# exit code, Bacula will assume the request failed.
++
++CHIO=/bin/chio
++AWK=/usr/bin/awk
++
++# check parameter count on commandline
++check_parm_count() {
++ pCount=$1
++ pCountNeed=$2
++ if test $pCount -lt $pCountNeed; then
++ echo "usage: chio-changer ctl-device command [slot archive-device drive-index]"
++ echo " Insufficient number of arguments given."
++ if test $pCount -lt 2; then
++ echo " Mimimum usage is first two arguments ..."
++ else
++ echo " Command expected $pCountNeed arguments"
++ fi
++ exit 1
++ fi
++}
++
++params() {
++ eval $(${CHIO} -f $1 params | ${AWK} '/slots, / { print "slots=" $2 "; drives=" $4 "; picker=" $6 "; portals=" $8 "; totalslots=" ($2+$8) "; portalbase=" $2;}')
++ if [ "x$slots" = "x" ]; then
++ echo "unable to get changer parameters"
++ exit 1
++ fi
++}
++
++# Check for special cases where only 2 arguments are needed,
++# all others are a minimum of 5
++case $2 in
++ list|listall)
++ check_parm_count $# 2
++ ;;
++ slots)
++ check_parm_count $# 2
++ ;;
++ transfer)
++ check_parm_count $# 3
++ ;;
++ *)
++ check_parm_count $# 5
++ ;;
++esac
++
++
++# Setup arguments
++ctl=$1
++cmd="$2"
++slot=${3+`expr $3 - 1`}
++device=$4
++drive=$5
++
++params $ctl
++
++case $cmd in
++ unload)
++ ${CHIO} -f $ctl move drive $drive slot $slot
++ exit $?
++ ;;
++
++ load)
++ ${CHIO} -f $ctl move slot $slot drive $drive
++ exit $?
++ ;;
++
++ list)
++ ${CHIO} -f $ctl status voltags | ${AWK} -v portalbase=$portalbase ' \
++ /^(slot|drive) .*ACCESS.*FULL/ { if (slot != "") { print slot tag; } slot=($2+1) ":"; next; } \
++ /^(slot|drive)/ { if (slot != "") { print slot tag; } slot=""; next; } \
++ /^portal .*ACCESS.*FULL/ { if (slot != "") { print slot tag; } slot=($2+1+portalbase) ":"; next; } \
++ /^portal/ { if (slot != "") { print slot tag; } slot=""; next; } \
++ /Primary volume tag:/ { tag=$4; next;} \
++ /From: slot/ { slot=($3+1) ":"; next;} \
++ END { if (slot != "") { print slot tag; } } \
++ '
++ ;;
++
++ listall)
++ ${CHIO} -f $ctl status voltags | ${AWK} -v portalbase=$portalbase ' \
++ BEGIN { t["slot"] = "S"; t["drive"] = "D"; t["portal"] = "I"; state = "E"; type = "?";} \
++ /^(slot|drive) [0-9]+: <.*ACCESS.*FULL/ { if (slot != "") { print type ":" slot ":" state tag; } slot=($2+1); type = t[$1]; state = "F"; next; } \
++ /^(slot|drive) [0-9]+: <.*ACCESS/ { if (slot != "") { print type ":" slot ":" state tag; } slot=($2+1); type = t[$1]; state = "E"; next; } \
++ /^portal [0-9]+: <.*(INEAB|EXENAB).*ACCESS.*FULL/ { if (slot != "") { print type ":" slot ":" state tag; } slot=($2+1+portalbase); type = t[$1]; state = "F"; next; } \
++ /^portal [0-9]+: <.*(INEAB|EXENAB).*ACCESS/ { if (slot != "") { print type ":" slot ":" state tag; } slot=($2+1+portalbase); type = t[$1]; state = "E"; next; } \
++ /Primary volume tag:/ { if (NF > 5) { tag=":" $4; } else { tag=""; } next;} \
++ /From: slot/ { if (type == "D") { state = state ":" ($3+1); } next;} \
++ END { if (slot != "") { print type ":" slot ":" state tag; } } \
++ '
++ ;;
++
++ loaded)
++ ${CHIO} -f $ctl status drive $drive | ${AWK} 'BEGIN { from=0 }\
++ /From:/{ from=$3+1; }\
++ END { print from }'
++ ;;
++
++ slots)
++ echo $totalslots
++ ;;
++
++ transfer)
++ if [ $slot -ge $portalbase ]; then
++ src="portal $(($slot - $portalbase))"
++ else
++ src="slot $slot"
++ fi
++ if [ $device -gt $portalbase ]; then
++ tgt="portal $(($device - $portalbase - 1))"
++ else
++ tgt="slot $(($device - 1))"
++ fi
++ ${CHIO} -f $ctl move $src $tgt
++ exit $?
++ ;;
++esac
diff --git a/bareos/patches/patch-core_scripts_CMakeLists.txt b/bareos/patches/patch-core_scripts_CMakeLists.txt
new file mode 100644
index 0000000000..5124270239
--- /dev/null
+++ b/bareos/patches/patch-core_scripts_CMakeLists.txt
@@ -0,0 +1,47 @@
+$NetBSD$
+
+ Install mtx-changer script if mtx is available
+
+--- core/scripts/CMakeLists.txt.orig 2019-02-13 14:25:55.000000000 +0000
++++ core/scripts/CMakeLists.txt
+@@ -41,7 +41,6 @@ INSTALL(FILES
+
+ 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}")
+
+ INSTALL(FILES
+- mtx-changer.conf
+ bareos-regress.conf
+- DESTINATION "${confdir}")
++ 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
++ 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()
diff --git a/bareos/patches/patch-core_src_CMakeLists.txt b/bareos/patches/patch-core_src_CMakeLists.txt
new file mode 100644
index 0000000000..b6ccf71c1a
--- /dev/null
+++ b/bareos/patches/patch-core_src_CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+ Add ndmp driectory if the NDMP feature is requested
+
+--- core/src/CMakeLists.txt.orig 2019-02-13 14:25:55.000000000 +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)
diff --git a/bareos/patches/patch-core_src_cats_make__catalog__backup.pl.in b/bareos/patches/patch-core_src_cats_make__catalog__backup.pl.in
new file mode 100644
index 0000000000..4e67dd8616
--- /dev/null
+++ b/bareos/patches/patch-core_src_cats_make__catalog__backup.pl.in
@@ -0,0 +1,20 @@
+$NetBSD$
+
+ XXX sort of works, but should ge generalized
+
+--- core/src/cats/make_catalog_backup.pl.in.orig 2019-01-31 11:39:26.000000000 +0000
++++ core/src/cats/make_catalog_backup.pl.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/pkg/bin/perl
+ use strict;
+
+ =head1 SCRIPT
+@@ -36,6 +36,7 @@ use strict;
+ my $cat = shift or die "Usage: $0 catalogname";
+ my $dir_conf='@sbindir@/bareos-dbcheck -B -c @confdir@';
+ my $wd = "@working_dir@";
++$ENV{PATH} = "/usr/pkg/bin:/usr/pkg/sbin:" . $ENV{PATH};
+
+ sub dump_sqlite3
+ {
diff --git a/bareos/patches/patch-core_src_cats_postgresql__queries.inc b/bareos/patches/patch-core_src_cats_postgresql__queries.inc
new file mode 100644
index 0000000000..35cc5bf430
--- /dev/null
+++ b/bareos/patches/patch-core_src_cats_postgresql__queries.inc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+ Disambuguate reference columns
+
+--- core/src/cats/postgresql_queries.inc.orig 2019-01-31 11:53:07.846130361 +0000
++++ core/src/cats/postgresql_queries.inc
+@@ -170,7 +170,7 @@ const char *BareosDbPostgresql::query_de
+ ,
+
+ /* 0016_uar_list_jobs */
+-"SELECT JobId, Client.Name as Client, StartTime, Level as JobLevel, JobFiles, JobBytes "
++"SELECT Job.JobId, Client.Name as Client, StartTime, Level as JobLevel, Job.JobFiles, Job.JobBytes "
+ "FROM Client, Job "
+ "WHERE Client.ClientId = Job.ClientId "
+ "AND JobStatus IN ('T','W') "
+@@ -179,7 +179,7 @@ const char *BareosDbPostgresql::query_de
+ ,
+
+ /* 0017_uar_print_jobs */
+-"SELECT DISTINCT JobId, Level, JobFiles, JobBytes, StartTime, VolumeName "
++"SELECT DISTINCT JobId, Level, JobFiles, Job.JobBytes, StartTime, VolumeName "
+ "FROM Job "
+ "JOIN JobMedia "
+ "USING (JobId) "
diff --git a/bareos/patches/patch-core_src_dird_admin.cc b/bareos/patches/patch-core_src_dird_admin.cc
new file mode 100644
index 0000000000..9232cc3726
--- /dev/null
+++ b/bareos/patches/patch-core_src_dird_admin.cc
@@ -0,0 +1,26 @@
+$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
+@@ -118,7 +118,9 @@ void AdminCleanup(JobControlRecord *jcr,
+ " Scheduled time: %s\n"
+ " Start time: %s\n"
+ " End time: %s\n"
++#ifndef NO_ADV
+ " 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,
++#ifndef NO_ADV
+ BAREOS_JOBLOG_MESSAGE,
++#endif
+ TermMsg);
+
+ 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
new file mode 100644
index 0000000000..5e5bd8b126
--- /dev/null
+++ b/bareos/patches/patch-core_src_dird_archive.cc
@@ -0,0 +1,26 @@
+$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
+@@ -117,7 +117,9 @@ void ArchiveCleanup(JobControlRecord *jc
+ " Scheduled time: %s\n"
+ " Start time: %s\n"
+ " End time: %s\n"
++#ifndef NO_ADV
+ " 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,
++#ifndef NO_ADV
+ BAREOS_JOBLOG_MESSAGE,
++#endif
+ TermMsg);
+
+ 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
new file mode 100644
index 0000000000..02f943db6d
--- /dev/null
+++ b/bareos/patches/patch-core_src_dird_authenticate__console.cc
@@ -0,0 +1,19 @@
+$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
+@@ -204,10 +204,12 @@ bool ConsoleAuthenticatorFrom_18_2::Send
+ bool ConsoleAuthenticatorFrom_18_2::SendInfoMessage()
+ {
+ std::string message;
++#ifndef NO_ADV
+ message += BAREOS_BINARY_INFO;
+ message += " binary\n";
+ message += BAREOS_SERVICES_MESSAGE;
+ message += "\n";
++#endif
+ message += "You are ";
+ if (ua_->cons) {
+ message += "logged in as: ";
diff --git a/bareos/patches/patch-core_src_dird_backup.cc b/bareos/patches/patch-core_src_dird_backup.cc
new file mode 100644
index 0000000000..a091602895
--- /dev/null
+++ b/bareos/patches/patch-core_src_dird_backup.cc
@@ -0,0 +1,26 @@
+$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
+@@ -1216,7 +1216,9 @@ void GenerateBackupSummary(JobControlRec
+ " Last Volume Bytes: %s (%sB)\n"
+ "%s" /* Daemon status info */
+ "%s" /* SecureErase status */
++#ifndef NO_ADV
+ " Bareos binary info: %s\n"
++#endif
+ " Termination: %s\n\n"),
+ BAREOS, my_name, VERSION, LSMDATE,
+ HOST_OS, DISTNAME, DISTVER,
+@@ -1244,7 +1246,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,
++#endif
+ TermMsg);
+ }
+ } /* namespace directordaemon */
diff --git a/bareos/patches/patch-core_src_dird_consolidate.cc b/bareos/patches/patch-core_src_dird_consolidate.cc
new file mode 100644
index 0000000000..a922ac186f
--- /dev/null
+++ b/bareos/patches/patch-core_src_dird_consolidate.cc
@@ -0,0 +1,26 @@
+$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
+@@ -350,7 +350,9 @@ void ConsolidateCleanup(JobControlRecord
+ " Scheduled time: %s\n"
+ " Start time: %s\n"
+ " End time: %s\n"
++#ifndef NO_ADV
+ " Bareos binary info: %s\n"
++#endif
+ " Termination: %s\n\n"),
+ edt,
+ jcr->jr.JobId,
+@@ -358,7 +360,9 @@ void ConsolidateCleanup(JobControlRecord
+ schedt,
+ sdt,
+ edt,
++#ifndef NO_ADV
+ BAREOS_JOBLOG_MESSAGE,
++#endif
+ TermMsg);
+
+ 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
new file mode 100644
index 0000000000..ab7aa32823
--- /dev/null
+++ b/bareos/patches/patch-core_src_dird_dird__conf.cc
@@ -0,0 +1,16 @@
+$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
+@@ -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;
diff --git a/bareos/patches/patch-core_src_dird_migrate.cc b/bareos/patches/patch-core_src_dird_migrate.cc
new file mode 100644
index 0000000000..761d3c6ca3
--- /dev/null
+++ b/bareos/patches/patch-core_src_dird_migrate.cc
@@ -0,0 +1,46 @@
+$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
+@@ -1723,7 +1723,9 @@ static inline void GenerateMigrateSummar
+ " Last Volume Bytes: %s (%sB)\n"
+ " SD Errors: %d\n"
+ " SD termination status: %s\n"
++#ifndef NO_ADV
+ " 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,
++#ifndef NO_ADV
+ BAREOS_JOBLOG_MESSAGE,
++#endif
+ term_code);
+ } else {
+ /*
+@@ -1774,7 +1778,9 @@ static inline void GenerateMigrateSummar
+ " End time: %s\n"
+ " Elapsed time: %s\n"
+ " Priority: %d\n"
++#ifndef NO_ADV
+ " 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,
++#ifndef NO_ADV
+ BAREOS_JOBLOG_MESSAGE,
++#endif
+ term_code);
+ }
+ }
diff --git a/bareos/patches/patch-core_src_dird_restore.cc b/bareos/patches/patch-core_src_dird_restore.cc
new file mode 100644
index 0000000000..b7bdb32e29
--- /dev/null
+++ b/bareos/patches/patch-core_src_dird_restore.cc
@@ -0,0 +1,46 @@
+$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
+@@ -583,7 +583,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"
++#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,
++#ifndef NO_ADV
+ BAREOS_JOBLOG_MESSAGE,
++#endif
+ TermMsg);
+ break;
+ default:
+@@ -631,7 +635,9 @@ void GenerateRestoreSummary(JobControlRe
+ " FD termination status: %s\n"
+ " SD termination status: %s\n"
+ "%s"
++#ifndef NO_ADV
+ " 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(),
++#ifndef NO_ADV
+ BAREOS_JOBLOG_MESSAGE,
++#endif
+ TermMsg);
+ break;
+ }
diff --git a/bareos/patches/patch-core_src_dird_verify.cc b/bareos/patches/patch-core_src_dird_verify.cc
new file mode 100644
index 0000000000..c4966e15c0
--- /dev/null
+++ b/bareos/patches/patch-core_src_dird_verify.cc
@@ -0,0 +1,46 @@
+$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
+@@ -569,7 +569,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"
++#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,
++#ifndef NO_ADV
+ BAREOS_JOBLOG_MESSAGE,
++#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"
++#ifndef NO_ADV
+ " 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,
++#ifndef NO_ADV
+ BAREOS_JOBLOG_MESSAGE,
++#endif
+ TermMsg);
+ break;
+ }
diff --git a/bareos/patches/patch-core_src_findlib_find__one.cc b/bareos/patches/patch-core_src_findlib_find__one.cc
new file mode 100644
index 0000000000..a574921060
--- /dev/null
+++ b/bareos/patches/patch-core_src_findlib_find__one.cc
@@ -0,0 +1,15 @@
+$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
+@@ -209,7 +209,7 @@ static bool VolumeHasAttrlist(const char
+ */
+ 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"),
diff --git a/bareos/patches/patch-core_src_include_version.h b/bareos/patches/patch-core_src_include_version.h
new file mode 100644
index 0000000000..5a26d40264
--- /dev/null
+++ b/bareos/patches/patch-core_src_include_version.h
@@ -0,0 +1,47 @@
+$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
new file mode 100644
index 0000000000..91d9f624d8
--- /dev/null
+++ b/bareos/patches/patch-core_src_lib_scsi__lli.cc
@@ -0,0 +1,46 @@
+$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
+@@ -384,6 +384,7 @@ bool CheckScsiAtEod(int fd)
+ #elif defined(HAVE_NETBSD_OS) || defined(HAVE_OPENBSD_OS)
+
+ #if defined(HAVE_NETBSD_OS)
++#include <sys/scsiio.h>
+ #include <dev/scsipi/scsipi_all.h>
+ #else
+ #include <scsi/uscsi_all.h>
+@@ -403,7 +404,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;
+
+@@ -446,19 +447,17 @@ static inline bool do_scsi_cmd_page(int
+ retval = true;
+ break;
+ 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"),
+- devicename);
++ device_name);
+ break;
+ case SCCMD_BUSY:
+ Emsg1(M_ERROR, 0, _("SCIOCCOMMAND ioctl on %s returned device is busy\n"),
+- devicename);
+- break;
+- case SCCMD_SENSE:
++ device_name);
+ break;
+ default:
+ Emsg2(M_ERROR, 0, _("SCIOCCOMMAND ioctl on %s returned unknown status %d\n"),
diff --git a/bareos/patches/patch-core_src_lmdb_mdb.c b/bareos/patches/patch-core_src_lmdb_mdb.c
new file mode 100644
index 0000000000..4bc14cefd4
--- /dev/null
+++ b/bareos/patches/patch-core_src_lmdb_mdb.c
@@ -0,0 +1,25 @@
+$NetBSD$
+
+ Fix compilation on NetBSD
+
+--- core/src/lmdb/mdb.c.orig 2018-12-20 08:51:51.000000000 +0000
++++ core/src/lmdb/mdb.c
+@@ -150,7 +150,8 @@ typedef SSIZE_T ssize_t;
+
+ #if defined(__APPLE__) || defined (BSD)
+ # if !(defined(MDB_USE_POSIX_MUTEX) || defined(MDB_USE_POSIX_SEM))
+-# define MDB_USE_SYSV_SEM 1
++/* # define MDB_USE_SYSV_SEM 1 */
++# define MDB_USE_POSIX_SEM 1
+ # endif
+ # define MDB_FDATASYNC fsync
+ #elif defined(ANDROID)
+@@ -4829,7 +4830,7 @@ mdb_env_setup_locks(MDB_env *env, char *
+ #endif
+ #ifdef MDB_USE_SYSV_SEM
+ int semid;
+- union semun semu;
++ // XXXkd: union semun semu;
+ #endif
+ int rc;
+ off_t size, rsize;
diff --git a/bareos/patches/patch-core_src_ndmp_CMakeLists.txt b/bareos/patches/patch-core_src_ndmp_CMakeLists.txt
new file mode 100644
index 0000000000..f6d5865428
--- /dev/null
+++ b/bareos/patches/patch-core_src_ndmp_CMakeLists.txt
@@ -0,0 +1,20 @@
+$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
new file mode 100644
index 0000000000..79becfe45c
--- /dev/null
+++ b/bareos/patches/patch-core_src_ndmp_ndmos.h
@@ -0,0 +1,35 @@
+$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
new file mode 100644
index 0000000000..6e1eb37561
--- /dev/null
+++ b/bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc
@@ -0,0 +1,40 @@
+$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.
+ 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
+@@ -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:
+ return do_clear_scsi_encryption_key(value);
+ 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
new file mode 100644
index 0000000000..6a1a7e5fe3
--- /dev/null
+++ b/bareos/patches/patch-core_src_plugins_stored_scsitapealert-sd.cc
@@ -0,0 +1,18 @@
+$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
+@@ -191,8 +191,11 @@ 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;
diff --git a/bareos/patches/patch-core_src_stored_acquire.cc b/bareos/patches/patch-core_src_stored_acquire.cc
new file mode 100644
index 0000000000..a247e9d30b
--- /dev/null
+++ b/bareos/patches/patch-core_src_stored_acquire.cc
@@ -0,0 +1,15 @@
+$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
+@@ -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());
diff --git a/bareos/patches/patch-core_src_stored_btape.cc b/bareos/patches/patch-core_src_stored_btape.cc
new file mode 100644
index 0000000000..762e69730a
--- /dev/null
+++ b/bareos/patches/patch-core_src_stored_btape.cc
@@ -0,0 +1,23 @@
+$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
+@@ -333,6 +333,7 @@ int main(int margc, char *margv[])
+ static void TerminateBtape(int status)
+ {
+ Dsm_check(200);
++ FreePlugins(jcr);
+ FreeJcr(jcr);
+ jcr = NULL;
+
+@@ -379,6 +380,8 @@ static void TerminateBtape(int status)
+ }
+
+ StopWatchdog();
++ FlushCryptoCache();
++ UnloadSdPlugins();
+ TermMsg();
+ TermLastJobsList();
+ CloseMemoryPool(); /* free memory in pool */
diff --git a/bareos/patches/patch-core_src_stored_dir__cmd.cc b/bareos/patches/patch-core_src_stored_dir__cmd.cc
new file mode 100644
index 0000000000..dd4d883268
--- /dev/null
+++ b/bareos/patches/patch-core_src_stored_dir__cmd.cc
@@ -0,0 +1,24 @@
+$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
+@@ -976,7 +976,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) {
+ /* 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;
+ }
diff --git a/bareos/patches/patch-core_src_stored_label.cc b/bareos/patches/patch-core_src_stored_label.cc
new file mode 100644
index 0000000000..2cb8d153d5
--- /dev/null
+++ b/bareos/patches/patch-core_src_stored_label.cc
@@ -0,0 +1,15 @@
+$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
+@@ -86,7 +86,7 @@ int ReadDevVolumeLabel(DeviceControlReco
+ dev->VolHdr.VolumeName[0]?dev->VolHdr.VolumeName:"*NULL*", 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;
+ }
+ }
diff --git a/bareos/patches/patch-src_console_Makefile.in b/bareos/patches/patch-src_console_Makefile.in
deleted file mode 100644
index 2c314ca046..0000000000
--- a/bareos/patches/patch-src_console_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/console/Makefile.in.old 2017-12-30 10:09:21.000000000 +0100
-+++ src/console/Makefile.in 2017-12-30 10:09:36.000000000 +0100
-@@ -95,7 +95,7 @@
- $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bconsole $(DESTDIR)$(bindir)/bconsole;
- @if ! [ -r $(DESTDIR)$(sbindir)/bconsole ]; then $(SYMLINK) $(bindir)/bconsole $(DESTDIR)$(sbindir)/bconsole; fi
- @srcconf=bconsole.conf; \
-- DESTCONFDIR=${DESTDIR}${configtemplatedir}; \
-+ DESTCONFDIR=${DESTDIR}%%EXAMPLESDIR%%; \
- if test -f $${DESTCONFDIR}/$$srcconf; then \
- destconf=$$srcconf.new; \
- echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
diff --git a/bareos/patches/patch-src_dird_Makefile.in b/bareos/patches/patch-src_dird_Makefile.in
deleted file mode 100644
index e9075bb236..0000000000
--- a/bareos/patches/patch-src_dird_Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/dird/Makefile.in.old 2017-12-30 10:03:42.000000000 +0100
-+++ src/dird/Makefile.in 2017-12-30 10:04:38.000000000 +0100
-@@ -151,7 +151,7 @@
- $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bareos-dbcheck $(DESTDIR)$(sbindir)/bareos-dbcheck
- # copy configuration resource files to directory structure
- @SRCCONFDIR=../defaultconfigs/bareos-dir.d/; \
-- DESTCONFDIR=${DESTDIR}${configtemplatedir}/bareos-dir.d/; \
-+ DESTCONFDIR=${DESTDIR}%%EXAMPLESDIR%%/bareos-dir.d/; \
- echo "installing configuration resource files to $$DESTCONFDIR"; \
- $(MKDIR) $$DESTCONFDIR; \
- for RESTYPE in $(DIRD_RESTYPES); do \
-@@ -174,7 +174,7 @@
- fi; \
- done; \
- done
-- $(MKDIR) ${DESTDIR}${confdir}/bareos-dir-export/client/
-+ $(MKDIR) ${DESTDIR}%%EXAMPLESDIR%%/bareos-dir-export/client/
- @if test -f ${DESTDIR}${scriptdir}/query.sql; then \
- echo " ==> Saving existing query.sql to query.sql.old"; \
- $(MV) -f ${DESTDIR}${scriptdir}/query.sql ${DESTDIR}${scriptdir}/query.sql.old; \
diff --git a/bareos/patches/patch-src_filed_Makefile.in b/bareos/patches/patch-src_filed_Makefile.in
deleted file mode 100644
index 5c414c0b97..0000000000
--- a/bareos/patches/patch-src_filed_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/filed/Makefile.in.old 2017-12-30 10:05:02.000000000 +0100
-+++ src/filed/Makefile.in 2017-12-30 10:05:21.000000000 +0100
-@@ -124,7 +124,7 @@
- install: all
- $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bareos-fd $(DESTDIR)$(sbindir)/bareos-fd
- @SRCCONFDIR=../defaultconfigs/bareos-fd.d/; \
-- DESTCONFDIR=${DESTDIR}${configtemplatedir}/bareos-fd.d/; \
-+ DESTCONFDIR=${DESTDIR}%%EXAMPLESDIR%%/bareos-fd.d/; \
- echo "installing configuration resource files to $$DESTCONFDIR"; \
- $(MKDIR) $$DESTCONFDIR; \
- for RESTYPE in $(FILED_RESTYPES); do \
diff --git a/bareos/patches/patch-src_stored_Makefile.in b/bareos/patches/patch-src_stored_Makefile.in
deleted file mode 100644
index 6f66778e38..0000000000
--- a/bareos/patches/patch-src_stored_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/stored/Makefile.in.old 2017-12-30 10:09:58.000000000 +0100
-+++ src/stored/Makefile.in 2017-12-30 10:10:23.000000000 +0100
-@@ -247,7 +247,7 @@
- $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) btape $(DESTDIR)$(sbindir)/btape
- # copy configuration resource files to directory structure
- @SRCCONFDIR=../defaultconfigs/bareos-sd.d/; \
-- DESTCONFDIR=${DESTDIR}${configtemplatedir}/bareos-sd.d/; \
-+ DESTCONFDIR=${DESTDIR}%%EXAMPLESDIR%%/bareos-sd.d/; \
- echo "installing configuration resource files to $$DESTCONFDIR"; \
- $(MKDIR) $$DESTCONFDIR; \
- for RESTYPE in $(STORED_RESTYPES); do \
Home |
Main Index |
Thread Index |
Old Index