pkgsrc-WIP-changes archive

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

Bareos is now part of the pkgsrc distribution.



Module Name:	pkgsrc-wip
Committed By:	Frank Kardel <kardel%NetBSD.org@localhost>
Pushed By:	kardel
Date:		Tue Jul 28 09:02:38 2020 +0200
Changeset:	6bd71ac3168c3b30c44c15a8c872b7c0a1228c1b

Modified Files:
	Makefile
Removed Files:
	bareos-clientonly/DESCR
	bareos-clientonly/Makefile
	bareos-clientonly/PLIST.client
	bareos-clientonly/files/bareos-fd.sh
	bareos/DESCR
	bareos/MESSAGE
	bareos/Makefile
	bareos/Makefile.common
	bareos/PLIST.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
	bareos/patches/patch-core_CMakeLists.txt
	bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake
	bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake
	bareos/patches/patch-core_cmake_BareosFindPrograms.cmake
	bareos/patches/patch-core_cmake_BareosInstallConfigFiles.cmake
	bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake
	bareos/patches/patch-core_cmake_BareosTimeFunctions.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_filed_accurate__lmdb.cc
	bareos/patches/patch-core_src_findlib_acl.cc
	bareos/patches/patch-core_src_findlib_find__one.cc
	bareos/patches/patch-core_src_lib_mem__pool.cc
	bareos/patches/patch-core_src_lib_scsi__lli.cc
	bareos/patches/patch-core_src_lib_version.c
	bareos/patches/patch-core_src_lmdb_mdb.c
	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_bscan.cc
	bareos/patches/patch-core_src_stored_btape.cc
	bareos/patches/patch-core_src_stored_device.cc
	bareos/patches/patch-core_src_stored_dir__cmd.cc
	bareos/patches/patch-core_src_stored_label.cc
	bareos/patches/patch-core_src_stored_mount.cc

Log Message:
Bareos is now part of the pkgsrc distribution.

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

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

diffstat:
 Makefile                                           |   2 -
 bareos-clientonly/DESCR                            |  18 --
 bareos-clientonly/Makefile                         |  37 ----
 bareos-clientonly/PLIST.client                     |  49 -----
 bareos-clientonly/files/bareos-fd.sh               |  23 --
 bareos/DESCR                                       |  16 --
 bareos/MESSAGE                                     |   7 -
 bareos/Makefile                                    |  47 ----
 bareos/Makefile.common                             | 110 ----------
 bareos/PLIST.common                                | 243 ---------------------
 bareos/distinfo                                    |  44 ----
 bareos/files/bareos-dir.sh                         |  23 --
 bareos/files/bareos-fd.sh                          |  23 --
 bareos/files/bareos-sd.sh                          |  23 --
 bareos/files/bareos.sh                             |  52 -----
 bareos/options.mk                                  |  24 --
 bareos/patches/patch-core_CMakeLists.txt           |  42 ----
 .../patch-core_cmake_BareosCheckIncludes.cmake     |  24 --
 .../patch-core_cmake_BareosFindAllLibraries.cmake  |  17 --
 .../patch-core_cmake_BareosFindPrograms.cmake      |  25 ---
 ...patch-core_cmake_BareosInstallConfigFiles.cmake |  65 ------
 ...atch-core_cmake_BareosSetVariableDefaults.cmake |  24 --
 .../patch-core_cmake_BareosTimeFunctions.cmake     |  17 --
 .../patch-core_platforms_netbsd_CMakeLists.txt     |  18 --
 .../patch-core_platforms_netbsd_chio-changer       | 141 ------------
 bareos/patches/patch-core_scripts_CMakeLists.txt   |  53 -----
 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        |  23 --
 bareos/patches/patch-core_src_dird_archive.cc      |  24 --
 .../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  |  24 --
 bareos/patches/patch-core_src_dird_dird__conf.cc   |  16 --
 bareos/patches/patch-core_src_dird_migrate.cc      |  51 -----
 bareos/patches/patch-core_src_dird_restore.cc      |  51 -----
 bareos/patches/patch-core_src_dird_verify.cc       |  50 -----
 .../patches/patch-core_src_filed_accurate__lmdb.cc |  15 --
 bareos/patches/patch-core_src_findlib_acl.cc       |  79 -------
 bareos/patches/patch-core_src_findlib_find__one.cc |  15 --
 bareos/patches/patch-core_src_lib_mem__pool.cc     |  26 ---
 bareos/patches/patch-core_src_lib_scsi__lli.cc     |  47 ----
 bareos/patches/patch-core_src_lib_version.c        |  28 ---
 bareos/patches/patch-core_src_lmdb_mdb.c           |  25 ---
 .../patch-core_src_plugins_stored_scsicrypto-sd.cc |  40 ----
 ...tch-core_src_plugins_stored_scsitapealert-sd.cc |  27 ---
 bareos/patches/patch-core_src_stored_acquire.cc    |  15 --
 bareos/patches/patch-core_src_stored_bscan.cc      |  27 ---
 bareos/patches/patch-core_src_stored_btape.cc      |  31 ---
 bareos/patches/patch-core_src_stored_device.cc     |  29 ---
 bareos/patches/patch-core_src_stored_dir__cmd.cc   |  24 --
 bareos/patches/patch-core_src_stored_label.cc      |  15 --
 bareos/patches/patch-core_src_stored_mount.cc      |  27 ---
 54 files changed, 1980 deletions(-)

diffs:
diff --git a/Makefile b/Makefile
index 6eda7285f5..bf60f0f7bb 100644
--- a/Makefile
+++ b/Makefile
@@ -232,8 +232,6 @@ SUBDIR+=	baloo-widgets
 SUBDIR+=	bamf
 SUBDIR+=	bamtools
 SUBDIR+=	banshee
-SUBDIR+=	bareos
-SUBDIR+=	bareos-clientonly
 SUBDIR+=	baresip
 SUBDIR+=	barony
 SUBDIR+=	barrier
diff --git a/bareos-clientonly/DESCR b/bareos-clientonly/DESCR
deleted file mode 100644
index cf7ad94d8b..0000000000
--- a/bareos-clientonly/DESCR
+++ /dev/null
@@ -1,18 +0,0 @@
-Backup Archiving REcovery Open Sourced
-
-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.
-
-Bareos is a fork of Bacula 5.2 around 2010.
-
-Features (partial list)
-	LTO hardware encryption support
-	bandwidth limitation
-	encrypted communication
-	distributed data replication across sites
-	cloud storage support (not yet part of pkgsrc)
-
-This the just the file daemon client installation part.
diff --git a/bareos-clientonly/Makefile b/bareos-clientonly/Makefile
deleted file mode 100644
index 76bff7b092..0000000000
--- a/bareos-clientonly/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-# $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=		../../wip/bareos/patches
-FILESDIR=		../../wip/bareos/files
-DISTINFO_FILE=		../../wip/bareos/distinfo
-
-PLIST_SRC=		PLIST.client
-
-CMAKE_ARGS?=
-CMAKE_ARGS+=		-Dclient-only=true
-
-RCD_SCRIPTS=		bareos-fd
-
-.include "../../wip/bareos/Makefile.common"
-
-# needs to be here to get ${EGREP} defined
-.include "../../mk/bsd.pkg.mk"
-
-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
deleted file mode 100644
index 1a333c115f..0000000000
--- a/bareos-clientonly/PLIST.client
+++ /dev/null
@@ -1,49 +0,0 @@
-@comment $NetBSD$
-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
-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.19
-lib/libbareos.so.${PKGVERSION}
-lib/libbareosfastlz.so
-lib/libbareosfastlz.so.19
-lib/libbareosfastlz.so.${PKGVERSION}
-lib/libbareosfind.so
-lib/libbareosfind.so.19
-lib/libbareosfind.so.${PKGVERSION}
-lib/libbareoslmdb.so
-lib/libbareoslmdb.so.19
-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/files/bareos-fd.sh b/bareos-clientonly/files/bareos-fd.sh
deleted file mode 100644
index 8d644d872c..0000000000
--- a/bareos-clientonly/files/bareos-fd.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!@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
deleted file mode 100644
index 187f0ddc18..0000000000
--- a/bareos/DESCR
+++ /dev/null
@@ -1,16 +0,0 @@
-Backup Archiving REcovery Open Sourced
-
-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.
-
-Bareos is a fork of Bacula 5.2 around 2010.
-
-Features (partial list)
-	LTO hardware encryption support
-	bandwidth limitation
-	encrypted communication
-	distributed data replication across sites
-	cloud storage support (not yet part of pkgsrc)
diff --git a/bareos/MESSAGE b/bareos/MESSAGE
deleted file mode 100644
index 7b87ab6975..0000000000
--- a/bareos/MESSAGE
+++ /dev/null
@@ -1,7 +0,0 @@
-===========================================================================
-$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}/lib/bareos/scripts.
-
-===========================================================================
diff --git a/bareos/Makefile b/bareos/Makefile
deleted file mode 100644
index c58625f2b1..0000000000
--- a/bareos/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-# $NetBSD: Makefile,v 1.77 2018/12/09 18:52:45 adam Exp $
-
-CONFLICTS=		bareos-clientonly-[0-9]* bacula-clientonly-[0-9]* bacula-[0-9]*
-
-COMMENT=		Backup Archiving REcovery Open Sourced
-
-PLIST_SRC=		PLIST.common
-
-RCD_SCRIPTS=		bareos bareos-dir bareos-sd bareos-fd
-
-# For make_catalog_backup.pl.in.
-USE_TOOLS+=		perl:run
-# strange: pkglint complains about VARBASE not defined in BUILD_DEFS, but it is defined in Makefile.common
-BUILD_DEFS+=		VARBASE
-
-.include "options.mk"
-.include "Makefile.common"
-
-# needs to be here to get ${EGREP} defined
-.include "../../mk/bsd.pkg.mk"
-
-REPLACE_PERL+=		core/src/cats/make_catalog_backup.pl.in
-
-# spool directory
-MAKE_DIRS_PERMS+=	${VARBASE}/${PKG_SYSCONFSUBDIR} \
-			${REAL_ROOT_USER} ${BAREOS_GROUP} 0770
-MAKE_DIRS_PERMS+=	${VARBASE}/db/${PKG_SYSCONFSUBDIR}/working \
-			${BAREOS_DIR_USER} ${BAREOS_GROUP} 0770
-MAKE_DIRS_PERMS+=	${VARBASE}/db/${PKG_SYSCONFSUBDIR} \
-			${BAREOS_DIR_USER} ${BAREOS_GROUP} 0770
-MAKE_DIRS_PERMS+=	${VARBASE}/db/${PKG_SYSCONFSUBDIR}/bsr \
-			${BAREOS_DIR_USER} ${BAREOS_GROUP} 0770
-MAKE_DIRS_PERMS+=	${VARBASE}/db/${PKG_SYSCONFSUBDIR}/storage \
-			${BAREOS_DIR_USER} ${BAREOS_GROUP} 0770
-
-post-install:
-	${LN} -fs ${PKG_SYSCONFSUBDIR}/backends/libbareossd-gentape.so ${DESTDIR:Q}/${BAREOS_LIBDIR:Q}/libbareossd-gentape.so
-
-CONFIG_TEMPLATES!=	${EGREP} "^"${CONFIG_TEMPLATE_PATH:Q} PLIST.common 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
-
-MAKE_DIRS?=
-MAKE_DIRS+=	${CONFIG_TEMPLATES:H:O:u:S/^${CONFIG_TEMPLATE_PATH}/${PKG_SYSCONFDIR}/}
diff --git a/bareos/Makefile.common b/bareos/Makefile.common
deleted file mode 100644
index e7bc70527f..0000000000
--- a/bareos/Makefile.common
+++ /dev/null
@@ -1,110 +0,0 @@
-# $NetBSD$
-# used by sysutils/bareos-clientonly/Makefile
-# used by wip/bareos-clientonly/Makefile
-
-GITHUB_PROJECT=	bareos
-VERSION=	19.2.8
-GITHUB_TAG=	Release/${VERSION}
-
-DISTNAME=	bareos-${VERSION}
-WRKSRC=		${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG:C/\//-/}
-CATEGORIES=	sysutils
-MASTER_SITES=	${MASTER_SITE_GITHUB:=bareos/}
-
-# MAINTAINER=	paul%paulbsd.com@localhost
-MAINTAINER=	kardel%NetBSD.org@localhost
-HOMEPAGE=	http://www.bareos.org/
-LICENSE=	gnu-agpl-v3
-
-# pkgsrc version currently only tested/configured for NetBSD build
-ONLY_FOR_PLATFORM=	NetBSD-*-*
-
-USE_LANGUAGES+=	c c++
-USE_CMAKE=	yes
-CMAKE_ARG_PATH=	..
-CONFIGURE_DIRS=	core/_build
-# needs to be able to do compare-and-swap on time_t (cmpxchg8b)
-.if ${MACHINE_ARCH} == "i386"
-CXXFLAGS+=	-march=i586
-.endif
-
-SUBST_CLASSES+=		paths
-SUBST_STAGE.paths=	pre-configure
-SUBST_MESSAGE.paths=	Fixing absolute paths.
-SUBST_FILES.paths=	core/CMakeLists.txt
-SUBST_FILES.paths+=	core/src/cats/make_catalog_backup.pl.in
-SUBST_SED.paths=	-e 's,"/usr/local,"${PREFIX},g'
-SUBST_SED.paths+=	-e 's,"/var/log,"${VARBASE}/log,g'
-SUBST_VARS.paths=	LOCALBASE PREFIX PKGVERSION
-
-pre-configure:
-	${MKDIR} ${WRKSRC}/core/_build
-
-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_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: CXXFLAGS+=-DNO_ADV=1
-CMAKE_ARGS+=	-DCMAKE_CXX_FLAGS="${CXXFLAGS}"
-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}
-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}
-
-.include "../../mk/bsd.prefs.mk"
-
-# dependencies
-.include "../../archivers/lzo/buildlink3.mk"
-.include "../../devel/zlib/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"
diff --git a/bareos/PLIST.common b/bareos/PLIST.common
deleted file mode 100644
index d3907aca1e..0000000000
--- a/bareos/PLIST.common
+++ /dev/null
@@ -1,243 +0,0 @@
-@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/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/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/serial.h
-include/bareos/sha1.h
-include/bareos/status.h
-include/bareos/thread_list.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
-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/BareosFdPluginOvirt.py
-lib/bareos/plugins/BareosFdPluginPerconaXtraBackup.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-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
-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.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
-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.19
-lib/libbareos.so.${PKGVERSION}
-lib/libbareoscats.so
-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.19
-lib/libbareosfind.so.${PKGVERSION}
-lib/libbareoslmdb.so
-lib/libbareoslmdb.so.19
-lib/libbareoslmdb.so.${PKGVERSION}
-lib/libbareossd-gentape.so
-lib/libbareossd.so
-lib/libbareossql.so
-lib/libbareossql.so.19
-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-dbcopy.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-dbcopy
-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/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
-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/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
deleted file mode 100644
index 493529a51f..0000000000
--- a/bareos/distinfo
+++ /dev/null
@@ -1,44 +0,0 @@
-$NetBSD$
-
-SHA1 (bareos-19.2.8.tar.gz) = b26f7db66e108eed1e20b11c36f994456419748e
-RMD160 (bareos-19.2.8.tar.gz) = 221777925946ab05ddc00063ba51daf4555f16d1
-SHA512 (bareos-19.2.8.tar.gz) = 60bbbbd949a63f978cf1ed7d0cfc22c22f117d8c2700eb47531e15b2d91fc700c522519f0b816cd1040283f09b4c81f36910c66c8b6f4bf1ff22180e979bdeb5
-Size (bareos-19.2.8.tar.gz) = 12604929 bytes
-SHA1 (patch-core_CMakeLists.txt) = 17524dd14c665f00a8911589b52f930ec55e1e0e
-SHA1 (patch-core_cmake_BareosCheckIncludes.cmake) = 8f2a88768acdbe9adf94939ae1dabd3edf40144b
-SHA1 (patch-core_cmake_BareosFindAllLibraries.cmake) = eb33f59f616a5d265a6371dcc028a3031b5dbab5
-SHA1 (patch-core_cmake_BareosFindPrograms.cmake) = a3ed507365fb123ea84911451655ced5f07c7f32
-SHA1 (patch-core_cmake_BareosInstallConfigFiles.cmake) = bad0e5c0c87e726aaac49da99857b3699f0d28e2
-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) = 4bc4d7382db8e41bd1a10852e429e8f4e16e9fe4
-SHA1 (patch-core_scripts_CMakeLists.txt) = b7869d18651e6e6da4ad5f23c8f4c80d0166aa7c
-SHA1 (patch-core_src_CMakeLists.txt) = 3db708e8ece43b1087773470a19ea3362aec3d79
-SHA1 (patch-core_src_cats_make__catalog__backup.pl.in) = a31110c1219058a03a4f44411a848ff997aca3c1
-SHA1 (patch-core_src_cats_postgresql__queries.inc) = d255a93a039d671d9dad7b7b096dfff97095aa6e
-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_filed_accurate__lmdb.cc) = a3436251902b16a2ed4617a750a36a8a70284fee
-SHA1 (patch-core_src_findlib_acl.cc) = 79d47ae5f79e4e2629a0330787cc45b8347a42e2
-SHA1 (patch-core_src_findlib_find__one.cc) = 50eb6d289b7b2a7b33ee5828db31d03169833d9c
-SHA1 (patch-core_src_lib_mem__pool.cc) = 16b5adc4a5b2b4fd542b4d330e03283b8994a4a7
-SHA1 (patch-core_src_lib_scsi__lli.cc) = 09aa887d71009baa2ce2203c46c88a89097d6546
-SHA1 (patch-core_src_lib_version.c) = edfd88aed983ea3ce1ead6846707b5625ad5fc51
-SHA1 (patch-core_src_lmdb_mdb.c) = 70c76d7ecf610edb47afbb91f3c4d500d85583fe
-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/files/bareos-dir.sh b/bareos/files/bareos-dir.sh
deleted file mode 100644
index 6ad45ce8e3..0000000000
--- a/bareos/files/bareos-dir.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# PROVIDE: bareos-dir
-# REQUIRE: DAEMON
-
-if [ -f /etc/rc.subr ]; then
-	. /etc/rc.subr
-fi
-
-name="bareosdir"
-rcvar=$name
-command="@PREFIX@/sbin/bareos-dir"
-required_dirs="@BAREOS_ETCDIR@/bareos-dir.d"
-pidfile="@BAREOS_PIDDIR@/bareos-dir.9101.pid"
-command_args="-u @BAREOS_DIR_USER@ -g @BAREOS_GROUP@"
-
-if [ -f /etc/rc.subr ]; then
-	load_rc_config $name
-	run_rc_command "$1"
-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
deleted file mode 100644
index 8d644d872c..0000000000
--- a/bareos/files/bareos-fd.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!@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/files/bareos-sd.sh b/bareos/files/bareos-sd.sh
deleted file mode 100644
index 3437c141bf..0000000000
--- a/bareos/files/bareos-sd.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# PROVIDE: bareos-sd
-# REQUIRE: DAEMON
-
-if [ -f /etc/rc.subr ]; then
-	. /etc/rc.subr
-fi
-
-name="bareossd"
-rcvar=$name
-command="@PREFIX@/sbin/bareos-sd"
-required_dirs="@BAREOS_ETCDIR@/bareos-sd.d"
-pidfile="@BAREOS_PIDDIR@/bareos-sd.9103.pid"
-command_args="-u @BAREOS_SD_USER@ -g @BAREOS_GROUP@"
-
-if [ -f /etc/rc.subr ]; then
-	load_rc_config $name
-	run_rc_command "$1"
-else
-	echo -n " ${name}"
-	${command} ${bareossd_flags} -c ${required_files}
-fi
diff --git a/bareos/files/bareos.sh b/bareos/files/bareos.sh
deleted file mode 100644
index 64035541d1..0000000000
--- a/bareos/files/bareos.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# KEYWORD: nostart
-
-if [ -f /etc/rc.subr ]; then
-	. /etc/rc.subr
-fi
-
-rcd_dir=`/usr/bin/dirname $0`
-
-# NOTE: run_rc_command sets $rc_arg
-#
-forward_commands()
-{
-	# Backward compat with NetBSD <1.6:
-	[ -z "$rc_arg" ] && rc_arg=$_arg
-
-	for file in $COMMAND_LIST; do
-		$rcd_dir/$file $rc_arg
-	done
-}
-
-reverse_commands()
-{
-	# Backward compat with NetBSD <1.6:
-	[ -z "$rc_arg" ] && rc_arg=$_arg
-
-	REVCOMMAND_LIST=
-	for file in $COMMAND_LIST; do
-		REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
-	done
-	for file in $REVCOMMAND_LIST; do
-		$rcd_dir/$file $rc_arg
-	done
-}
-
-COMMAND_LIST="bareos-dir bareos-sd bareos-fd"
-
-name="bareos"
-start_cmd="forward_commands"
-stop_cmd="reverse_commands"
-reload_cmd="forward_commands"
-status_cmd="forward_commands"
-extra_commands="reload status"
-
-if [ -f /etc/rc.subr ]; then
-	run_rc_command "$1"
-else
-	echo -n " ${name}"
-	_arg="$1"
-	${start_cmd}
-fi
diff --git a/bareos/options.mk b/bareos/options.mk
deleted file mode 100644
index 0d7a73191d..0000000000
--- a/bareos/options.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-# $NetBSD: options.mk,v 1.21 2014/10/12 00:08:26 gdt Exp $
-
-PKG_OPTIONS_VAR=		PKG_OPTIONS.bareos
-PKG_SUPPORTED_OPTIONS=		scsi-crypto
-PKG_OPTIONS_REQUIRED_GROUPS=	database
-PKG_OPTIONS_GROUP.database=	catalog-sqlite3 catalog-pgsql catalog-mysql
-PKG_SUGGESTED_OPTIONS=		catalog-pgsql
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Mcatalog-sqlite3)
-.  include "../../databases/sqlite3/buildlink3.mk"
-CMAKE_ARGS+=		-Dsqlite3=yes
-.elif !empty(PKG_OPTIONS:Mcatalog-pgsql)
-.  include "../../mk/pgsql.buildlink3.mk"
-CMAKE_ARGS+=		-Dpostgresql=yes
-.elif !empty(PKG_OPTIONS:Mcatalog-mysql)
-.  include "../../mk/mysql.buildlink3.mk"
-CMAKE_ARGS+=		-Dmysql=yes
-.endif
-
-.if !empty(PKG_OPTIONS:Mscsi-crypto)
-CMAKE_ARGS+=	-Dscsi-crypto=yes
-.endif
diff --git a/bareos/patches/patch-core_CMakeLists.txt b/bareos/patches/patch-core_CMakeLists.txt
deleted file mode 100644
index 92e740341b..0000000000
--- a/bareos/patches/patch-core_CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD$
-
-	Setup NetBSD parameters
-	Due to current lack of XDR quad marshalling NDMP
-	needs to be disabled.
-
---- core/CMakeLists.txt.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/CMakeLists.txt
-@@ -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)
-+   set(PSCMD "ps -ax -o pid,command")
-+   include_directories(@PREFIX@/include)
-+   link_directories(@PREFIX@/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}")
-@@ -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}")
-@@ -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
deleted file mode 100644
index 74d5b29bc9..0000000000
--- a/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
-	Fix header file checks for NetBSD
-
---- core/cmake/BareosCheckIncludes.cmake.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/cmake/BareosCheckIncludes.cmake
-@@ -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)
diff --git a/bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake b/bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake
deleted file mode 100644
index efadf19c44..0000000000
--- a/bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake
+++ /dev/null
@@ -1,17 +0,0 @@
-$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_BareosFindPrograms.cmake b/bareos/patches/patch-core_cmake_BareosFindPrograms.cmake
deleted file mode 100644
index d812a0c4ab..0000000000
--- a/bareos/patches/patch-core_cmake_BareosFindPrograms.cmake
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD$
-
-	the pkgsrc build system provides awk on the path.
-	The cmake build system uses this build path for
-	installed scripts - change the way the awk path
-	is found.
-
---- core/cmake/BareosFindPrograms.cmake.orig	2020-07-09 17:39:20.000000000 +0000
-+++ core/cmake/BareosFindPrograms.cmake
-@@ -18,10 +18,14 @@
- #   02110-1301, USA.
- 
- # find programs
-+if(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
-+  # avoid confusion with pkgsrc build time tool path
-+  find_program(AWK awk PATHS /bin /usr/bin ENV TOOLS_PLATFORM.awk NO_DEFAULT_PATH )
-+endif()
- find_program(AWK awk)
- find_program(GAWK gawk)
- if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
--  set(AWK ${GAWK})
-+ set(AWK ${GAWK})
- endif()
- 
- find_program(PIDOF pidof)
diff --git a/bareos/patches/patch-core_cmake_BareosInstallConfigFiles.cmake b/bareos/patches/patch-core_cmake_BareosInstallConfigFiles.cmake
deleted file mode 100644
index 636a1ae294..0000000000
--- a/bareos/patches/patch-core_cmake_BareosInstallConfigFiles.cmake
+++ /dev/null
@@ -1,65 +0,0 @@
-$NetBSD$
-
-	The original build source is lax on the permissions.
-	Adjust permission to match pkgsrc expectations.
-
---- core/cmake/BareosInstallConfigFiles.cmake.orig	2020-07-09 17:39:20.000000000 +0000
-+++ core/cmake/BareosInstallConfigFiles.cmake
-@@ -69,6 +69,7 @@ macro(
-         file(
-           INSTALL "${configfile}.new"
-           DESTINATION "${DESTCONFDIR}/${resname}"
-+	  FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ
-         )
-         file(RENAME "${configfile}.new" "${configfile}")
-       else()
-@@ -76,7 +77,8 @@ macro(
-           STATUS
-             "${resname}/${fname} as ${resname}/${fname} (new installation)"
-         )
--        file(COPY "${configfile}" DESTINATION "${DESTCONFDIR}/${resname}")
-+        file(COPY "${configfile}" DESTINATION "${DESTCONFDIR}/${resname}" 
-+	     FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ)
-       endif()
-     endforeach()
-   endforeach()
-@@ -121,6 +123,7 @@ macro(
-         file(
-           COPY "${BackendConfigSrcDir}/${configfile}.new"
-           DESTINATION "${DESTCONFDIR}/${dir}"
-+	  FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ
-         )
-         file(RENAME "${BackendConfigSrcDir}/${configfile}.new"
-              "${BackendConfigSrcDir}/${configfile}")
-@@ -129,6 +132,7 @@ macro(
-         file(
-           COPY "${BackendConfigSrcDir}/${configfile}"
-           DESTINATION "${DESTCONFDIR}/${dir}"
-+	  FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ
-         )
-       endif()
-     endforeach()
-@@ -151,6 +155,7 @@ macro(
-       file(
-         COPY "${BackendConfigSrcDir}/${configfile}"
-         DESTINATION "${DESTCONFDIR}/${dir}"
-+	FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-       )
-     endforeach()
- 
-@@ -183,11 +188,14 @@ macro(
-             file(
-               COPY "${configfile}.new"
-               DESTINATION "${DESTCONFDIR}/${resname}"
-+	      FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-             )
-             file(RENAME "${configfile}.new" "${configfile}")
-           else()
-             message(STATUS "${resname}/${fname} as ${resname}/${fname}")
--            file(COPY "${configfile}" DESTINATION "${DESTCONFDIR}/${resname}")
-+            file(COPY "${configfile}" DESTINATION "${DESTCONFDIR}/${resname}"
-+	         FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-+	    )
-           endif()
-         else()
-           message(STATUS "skipping .in file ${configfile}:${IS_INFILE}")
diff --git a/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake b/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake
deleted file mode 100644
index 81fc63d10f..0000000000
--- a/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
-provide absolute paths
-
---- core/cmake/BareosSetVariableDefaults.cmake.orig	2020-06-22 13:09:58.135202289 +0000
-+++ core/cmake/BareosSetVariableDefaults.cmake
-@@ -124,7 +124,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin"
- 
-   # 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
-@@ -412,6 +412,8 @@ endif()
- # ndmp
- 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
deleted file mode 100644
index 0ce251aff7..0000000000
--- a/bareos/patches/patch-core_cmake_BareosTimeFunctions.cmake
+++ /dev/null
@@ -1,17 +0,0 @@
-$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_platforms_netbsd_CMakeLists.txt b/bareos/patches/patch-core_platforms_netbsd_CMakeLists.txt
deleted file mode 100644
index 86decb509c..0000000000
--- a/bareos/patches/patch-core_platforms_netbsd_CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-$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
deleted file mode 100644
index b850176239..0000000000
--- a/bareos/patches/patch-core_platforms_netbsd_chio-changer
+++ /dev/null
@@ -1,141 +0,0 @@
-$NetBSD$
-
-	NetBSD changer script using NetBSD chio command
-
---- core/platforms/netbsd/chio-changer.orig	2020-07-22 11:05:39.078612642 +0000
-+++ core/platforms/netbsd/chio-changer
-@@ -0,0 +1,134 @@
-+#!/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=chio
-+AWK=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
deleted file mode 100644
index 168761d9d4..0000000000
--- a/bareos/patches/patch-core_scripts_CMakeLists.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-$NetBSD$
-
-suppress mtx-changer installation if not found
-
---- core/scripts/CMakeLists.txt.orig	2020-07-09 17:39:20.000000000 +0000
-+++ core/scripts/CMakeLists.txt
-@@ -35,25 +35,37 @@ install(
- install(
-   FILES bareos btraceback.gdb btraceback.dbx btraceback.mdb bareos-config
-         bareos-config-lib.sh bareos-ctl-funcs
--  PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
--              WORLD_READ WORLD_EXECUTE
-+  PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ
-+              WORLD_READ
-   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}")
-+  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 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
deleted file mode 100644
index af52b7d6d7..0000000000
--- a/bareos/patches/patch-core_src_CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-make ndmp conditional
-
---- core/src/CMakeLists.txt.orig	2020-06-22 13:23:09.152706321 +0000
-+++ core/src/CMakeLists.txt
-@@ -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_cats_make__catalog__backup.pl.in b/bareos/patches/patch-core_src_cats_make__catalog__backup.pl.in
deleted file mode 100644
index 36b6a1fb9e..0000000000
--- a/bareos/patches/patch-core_src_cats_make__catalog__backup.pl.in
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
-	XXX sort of works, but should ge generalized
-
---- core/src/cats/make_catalog_backup.pl.in.orig	2020-07-09 17:39:20.000000000 +0000
-+++ core/src/cats/make_catalog_backup.pl.in
-@@ -1,4 +1,4 @@
--#!/usr/bin/env perl
-+#!@PREFIX@/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} = "@PREFIX@/bin:@PREFIX@/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
deleted file mode 100644
index 35cc5bf430..0000000000
--- a/bareos/patches/patch-core_src_cats_postgresql__queries.inc
+++ /dev/null
@@ -1,24 +0,0 @@
-$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
deleted file mode 100644
index 4a25fe4cd5..0000000000
--- a/bareos/patches/patch-core_src_dird_admin.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD$
-
-	Remove inadequate clutter in production messages
-
---- core/src/dird/admin.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/dird/admin.cc
-@@ -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"
-+#endif
-          "  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
-+       kBareosVersionStrings.JoblogMessage,
-+#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
deleted file mode 100644
index 2b758ea601..0000000000
--- a/bareos/patches/patch-core_src_dird_archive.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
-	Remove inadequate clutter in production messages
-
---- core/src/dird/archive.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/dird/archive.cc
-@@ -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"
-+#endif
-          "  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
-+       kBareosVersionStrings.JoblogMessage,
-+#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
deleted file mode 100644
index 56d845d283..0000000000
--- a/bareos/patches/patch-core_src_dird_authenticate__console.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
-	Remove inadequate clutter in production messages
-
---- core/src/dird/authenticate_console.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/dird/authenticate_console.cc
-@@ -216,10 +216,12 @@ bool ConsoleAuthenticatorFrom_18_2::Send
- bool ConsoleAuthenticatorFrom_18_2::SendInfoMessage()
- {
-   std::string message;
-+#ifndef NO_ADV
-   message += kBareosVersionStrings.BinaryInfo;
-   message += " binary\n";
-   message += kBareosVersionStrings.ServicesMessage;
-   message += "\n";
-+#endif
-   message += "You are ";
-   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
deleted file mode 100644
index 470dfc2281..0000000000
--- a/bareos/patches/patch-core_src_dird_backup.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
-	Remove inadequate clutter in production messages
-
---- core/src/dird/backup.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/dird/backup.cc
-@@ -1194,7 +1194,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, kBareosVersionStrings.Full, kBareosVersionStrings.ShortDate,
-         HOST_OS, DISTNAME, DISTVER,
-@@ -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
-         kBareosVersionStrings.JoblogMessage,
-+#endif
-         TermMsg);
- 
-   /* clang-format on */
diff --git a/bareos/patches/patch-core_src_dird_consolidate.cc b/bareos/patches/patch-core_src_dird_consolidate.cc
deleted file mode 100644
index c14453dbfb..0000000000
--- a/bareos/patches/patch-core_src_dird_consolidate.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
-	Remove inadequate clutter in production messages
-
---- core/src/dird/consolidate.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/dird/consolidate.cc
-@@ -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"
-+#endif
-          "  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
-+       kBareosVersionStrings.JoblogMessage,
-+#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
deleted file mode 100644
index d9f3da5943..0000000000
--- a/bareos/patches/patch-core_src_dird_dird__conf.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
-	Add dumping of Honor No Dump Flag
-
---- core/src/dird/dird_conf.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/dird/dird_conf.cc
-@@ -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
deleted file mode 100644
index fe89792fd3..0000000000
--- a/bareos/patches/patch-core_src_dird_migrate.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD$
-
-	remove inadequate clutter in status messages
-
---- core/src/dird/migrate.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/dird/migrate.cc
-@@ -1764,7 +1764,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, 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
-+         kBareosVersionStrings.JoblogMessage,
-+#endif
-+         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"
-+#ifndef NO_ADV
-            "  Bareos binary info:     %s\n"
-+#endif
-            "  Termination:            %s\n\n"),
-          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
-+         kBareosVersionStrings.JoblogMessage,
-+#endif
-+         term_code);
-   }
- }
- 
diff --git a/bareos/patches/patch-core_src_dird_restore.cc b/bareos/patches/patch-core_src_dird_restore.cc
deleted file mode 100644
index d78c758d7f..0000000000
--- a/bareos/patches/patch-core_src_dird_restore.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD$
-
-	remove inadequate clutter in status messages
-
---- core/src/dird/restore.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/dird/restore.cc
-@@ -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"
-+#endif
-              "  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
-+           kBareosVersionStrings.JoblogMessage,
-+#endif
-+           TermMsg);
-       break;
-     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"
-+#endif
-              "  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
-+	   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
deleted file mode 100644
index 97727bd6aa..0000000000
--- a/bareos/patches/patch-core_src_dird_verify.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD$
-
-	remove inadequate clutter in status messages
-
---- core/src/dird/verify.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/dird/verify.cc
-@@ -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"
-+#endif
-              "  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
-+	   kBareosVersionStrings.JoblogMessage,
-+#endif
-            TermMsg);
-       break;
-     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"
-+#endif
-              "  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
-+	   kBareosVersionStrings.JoblogMessage,
-+#endif
-            TermMsg);
-       break;
-   }
diff --git a/bareos/patches/patch-core_src_filed_accurate__lmdb.cc b/bareos/patches/patch-core_src_filed_accurate__lmdb.cc
deleted file mode 100644
index fce7bcb532..0000000000
--- a/bareos/patches/patch-core_src_filed_accurate__lmdb.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-	avoid uninitialized member crash.
-	lmdb not verified to be working correctly though.
-
---- core/src/filed/accurate_lmdb.cc.orig	2020-07-17 12:18:09.949358135 +0000
-+++ core/src/filed/accurate_lmdb.cc
-@@ -45,6 +45,7 @@ static int debuglevel = 100;
- BareosAccurateFilelistLmdb::BareosAccurateFilelistLmdb(JobControlRecord* jcr,
-                                                        uint32_t number_of_files)
- {
-+  jcr_ = jcr;
-   filenr_ = 0;
-   pay_load_ = GetPoolMemory(PM_MESSAGE);
-   lmdb_name_ = GetPoolMemory(PM_FNAME);
diff --git a/bareos/patches/patch-core_src_findlib_acl.cc b/bareos/patches/patch-core_src_findlib_acl.cc
deleted file mode 100644
index e75718031a..0000000000
--- a/bareos/patches/patch-core_src_findlib_acl.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-$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
-  */
-@@ -1091,6 +1092,8 @@ static bacl_exit_code freebsd_build_acl_
-       BErrNo be;
- 
-       switch (errno) {
-+        case EINVAL:
-+	  /*FALLTHROUGH*/
-         case ENOENT:
-           return bacl_exit_ok;
-         default:
-@@ -1119,6 +1122,8 @@ static bacl_exit_code freebsd_build_acl_
-         BErrNo be;
- 
-         switch (errno) {
-+	  case EINVAL:
-+	    /*FALLTHROUGH*/
-           case ENOENT:
-             return bacl_exit_ok;
-           default:
diff --git a/bareos/patches/patch-core_src_findlib_find__one.cc b/bareos/patches/patch-core_src_findlib_find__one.cc
deleted file mode 100644
index c6cc9a2de5..0000000000
--- a/bareos/patches/patch-core_src_findlib_find__one.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-	Simplify UF_NODUMP test
-
---- core/src/findlib/find_one.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/findlib/find_one.cc
-@@ -206,7 +206,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_lib_mem__pool.cc b/bareos/patches/patch-core_src_lib_mem__pool.cc
deleted file mode 100644
index 43144a1e10..0000000000
--- a/bareos/patches/patch-core_src_lib_mem__pool.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
-Calculation memory sums passing a struct abufhead * into a method/function
-that expects a POOLMEM * may fail with negative buffer overrun on certain
-memory allocations.
-Also, as nothing uses the calculated value, we can just drop the broken
-code.
-
---- core/src/lib/mem_pool.cc.orig	2020-07-17 14:40:23.419195873 +0000
-+++ core/src/lib/mem_pool.cc
-@@ -290,7 +290,6 @@ void CloseMemoryPool()
- {
-   struct abufhead *buf, *next;
-   int count = 0;
--  uint64_t bytes = 0;
- 
-   P(mutex);
-   for (int i = 1; i <= PM_MAX; i++) {
-@@ -298,7 +297,6 @@ void CloseMemoryPool()
-     while (buf) {
-       next = buf->next;
-       count++;
--      bytes += SizeofPoolMemory((char*)buf);
-       free((char*)buf);
-       buf = next;
-     }
diff --git a/bareos/patches/patch-core_src_lib_scsi__lli.cc b/bareos/patches/patch-core_src_lib_scsi__lli.cc
deleted file mode 100644
index 8e01348b0f..0000000000
--- a/bareos/patches/patch-core_src_lib_scsi__lli.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD$
-
-	Fix coding - was probably never tested with scsi-crypto flag
-
---- core/src/lib/scsi_lli.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/lib/scsi_lli.cc
-@@ -410,6 +410,7 @@ bool CheckScsiAtEod(int fd) { return fal
- #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>
-@@ -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;
- 
-@@ -476,20 +477,18 @@ 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,
diff --git a/bareos/patches/patch-core_src_lib_version.c b/bareos/patches/patch-core_src_lib_version.c
deleted file mode 100644
index 871fc57681..0000000000
--- a/bareos/patches/patch-core_src_lib_version.c
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD$
-
-	note pkgsrc compile origin
-
---- core/src/lib/version.c.orig	2020-04-16 08:31:41.000000000 +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_lmdb_mdb.c b/bareos/patches/patch-core_src_lmdb_mdb.c
deleted file mode 100644
index 4bc14cefd4..0000000000
--- a/bareos/patches/patch-core_src_lmdb_mdb.c
+++ /dev/null
@@ -1,25 +0,0 @@
-$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_plugins_stored_scsicrypto-sd.cc b/bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc
deleted file mode 100644
index 583a080376..0000000000
--- a/bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-$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 mixed with other library clients.
-	Now the key is cleared whenever the device is closed.
-
---- core/src/plugins/stored/scsicrypto-sd.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/plugins/stored/scsicrypto-sd.cc
-@@ -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:
-       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
deleted file mode 100644
index ee357189bd..0000000000
--- a/bareos/patches/patch-core_src_plugins_stored_scsitapealert-sd.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD$
-
-	Tape alerts where not always gathered, add missing cases.
-
---- core/src/plugins/stored/scsitapealert-sd.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/plugins/stored/scsitapealert-sd.cc
-@@ -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",
diff --git a/bareos/patches/patch-core_src_stored_acquire.cc b/bareos/patches/patch-core_src_stored_acquire.cc
deleted file mode 100644
index 71304ed666..0000000000
--- a/bareos/patches/patch-core_src_stored_acquire.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-	For NetBSD SCSI ioctl to go through the device must be writable.
-
---- core/src/stored/acquire.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/stored/acquire.cc
-@@ -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
deleted file mode 100644
index bd8afd13cc..0000000000
--- a/bareos/patches/patch-core_src_stored_bscan.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-$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
deleted file mode 100644
index febac78074..0000000000
--- a/bareos/patches/patch-core_src_stored_btape.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
-	Add missing free*() calls to keep smartalloc happy
-
---- core/src/stored/btape.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/stored/btape.cc
-@@ -331,6 +331,7 @@ int main(int margc, char* margv[])
- 
- static void TerminateBtape(int status)
- {
-+  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);
- }
- 
--
- btime_t total_time = 0;
- uint64_t total_size = 0;
- 
diff --git a/bareos/patches/patch-core_src_stored_device.cc b/bareos/patches/patch-core_src_stored_device.cc
deleted file mode 100644
index 162cf18c3c..0000000000
--- a/bareos/patches/patch-core_src_stored_device.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-$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
deleted file mode 100644
index c1e9257d72..0000000000
--- a/bareos/patches/patch-core_src_stored_dir__cmd.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
-	For SCSI ioctl to work on NetBSD the device must be open for writing.
-
---- core/src/stored/dir_cmd.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/stored/dir_cmd.cc
-@@ -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());
-             }
-           } 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
deleted file mode 100644
index 872f36a7e8..0000000000
--- a/bareos/patches/patch-core_src_stored_label.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-	For SCSI ioctl to work on NetBSD the device must be open for writing.
-
---- core/src/stored/label.cc.orig	2020-04-16 08:31:41.000000000 +0000
-+++ core/src/stored/label.cc
-@@ -92,7 +92,7 @@ int ReadDevVolumeLabel(DeviceControlReco
-         dev->max_block_size);
- 
-   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
deleted file mode 100644
index e0919f270f..0000000000
--- a/bareos/patches/patch-core_src_stored_mount.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-$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