pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils/bareos
Module Name: pkgsrc
Committed By: kardel
Date: Tue Jul 28 06:36:29 UTC 2020
Added Files:
pkgsrc/sysutils/bareos: DESCR MESSAGE Makefile Makefile.common
PLIST.common distinfo options.mk
pkgsrc/sysutils/bareos/files: bareos-dir.sh bareos-fd.sh bareos-sd.sh
bareos.sh
pkgsrc/sysutils/bareos/patches: patch-core_CMakeLists.txt
patch-core_cmake_BareosCheckIncludes.cmake
patch-core_cmake_BareosFindAllLibraries.cmake
patch-core_cmake_BareosFindPrograms.cmake
patch-core_cmake_BareosInstallConfigFiles.cmake
patch-core_cmake_BareosSetVariableDefaults.cmake
patch-core_cmake_BareosTimeFunctions.cmake
patch-core_platforms_netbsd_CMakeLists.txt
patch-core_platforms_netbsd_chio-changer
patch-core_scripts_CMakeLists.txt patch-core_src_CMakeLists.txt
patch-core_src_cats_make__catalog__backup.pl.in
patch-core_src_cats_postgresql__queries.inc
patch-core_src_dird_admin.cc patch-core_src_dird_archive.cc
patch-core_src_dird_authenticate__console.cc
patch-core_src_dird_backup.cc patch-core_src_dird_consolidate.cc
patch-core_src_dird_dird__conf.cc patch-core_src_dird_migrate.cc
patch-core_src_dird_restore.cc patch-core_src_dird_verify.cc
patch-core_src_filed_accurate__lmdb.cc
patch-core_src_findlib_acl.cc patch-core_src_findlib_find__one.cc
patch-core_src_lib_mem__pool.cc patch-core_src_lib_scsi__lli.cc
patch-core_src_lib_version.c patch-core_src_lmdb_mdb.c
patch-core_src_plugins_stored_scsicrypto-sd.cc
patch-core_src_plugins_stored_scsitapealert-sd.cc
patch-core_src_stored_acquire.cc patch-core_src_stored_bscan.cc
patch-core_src_stored_btape.cc patch-core_src_stored_device.cc
patch-core_src_stored_dir__cmd.cc patch-core_src_stored_label.cc
patch-core_src_stored_mount.cc
Log Message:
sysutils/bareos: import bareos-19.2.8
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 fully part of pkgsrc)
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/bareos/DESCR \
pkgsrc/sysutils/bareos/MESSAGE pkgsrc/sysutils/bareos/Makefile \
pkgsrc/sysutils/bareos/Makefile.common \
pkgsrc/sysutils/bareos/PLIST.common pkgsrc/sysutils/bareos/distinfo \
pkgsrc/sysutils/bareos/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/bareos/files/bareos-dir.sh \
pkgsrc/sysutils/bareos/files/bareos-fd.sh \
pkgsrc/sysutils/bareos/files/bareos-sd.sh \
pkgsrc/sysutils/bareos/files/bareos.sh
cvs rdiff -u -r0 -r1.1 \
pkgsrc/sysutils/bareos/patches/patch-core_CMakeLists.txt \
pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake \
pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake \
pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosFindPrograms.cmake \
pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosInstallConfigFiles.cmake \
pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake \
pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosTimeFunctions.cmake \
pkgsrc/sysutils/bareos/patches/patch-core_platforms_netbsd_CMakeLists.txt \
pkgsrc/sysutils/bareos/patches/patch-core_platforms_netbsd_chio-changer \
pkgsrc/sysutils/bareos/patches/patch-core_scripts_CMakeLists.txt \
pkgsrc/sysutils/bareos/patches/patch-core_src_CMakeLists.txt \
pkgsrc/sysutils/bareos/patches/patch-core_src_cats_make__catalog__backup.pl.in \
pkgsrc/sysutils/bareos/patches/patch-core_src_cats_postgresql__queries.inc \
pkgsrc/sysutils/bareos/patches/patch-core_src_dird_admin.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_dird_archive.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_dird_authenticate__console.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_dird_backup.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_dird_consolidate.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_dird_dird__conf.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_dird_migrate.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_dird_restore.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_dird_verify.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_filed_accurate__lmdb.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_findlib_acl.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_findlib_find__one.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_lib_mem__pool.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_lib_scsi__lli.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_lib_version.c \
pkgsrc/sysutils/bareos/patches/patch-core_src_lmdb_mdb.c \
pkgsrc/sysutils/bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_plugins_stored_scsitapealert-sd.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_stored_acquire.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_stored_bscan.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_stored_btape.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_stored_device.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_stored_dir__cmd.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_stored_label.cc \
pkgsrc/sysutils/bareos/patches/patch-core_src_stored_mount.cc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: pkgsrc/sysutils/bareos/DESCR
diff -u /dev/null pkgsrc/sysutils/bareos/DESCR:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/DESCR Tue Jul 28 06:36:29 2020
@@ -0,0 +1,16 @@
+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 fully part of pkgsrc)
Index: pkgsrc/sysutils/bareos/MESSAGE
diff -u /dev/null pkgsrc/sysutils/bareos/MESSAGE:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/MESSAGE Tue Jul 28 06:36:29 2020
@@ -0,0 +1,7 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+You can find some useful scripts to create, update and drop the necessary
+databases, privileges and tables in ${PREFIX}/lib/bareos/scripts.
+
+===========================================================================
Index: pkgsrc/sysutils/bareos/Makefile
diff -u /dev/null pkgsrc/sysutils/bareos/Makefile:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/Makefile Tue Jul 28 06:36:29 2020
@@ -0,0 +1,47 @@
+# $NetBSD: Makefile,v 1.1 2020/07/28 06:36:29 kardel 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}/}
Index: pkgsrc/sysutils/bareos/Makefile.common
diff -u /dev/null pkgsrc/sysutils/bareos/Makefile.common:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/Makefile.common Tue Jul 28 06:36:29 2020
@@ -0,0 +1,109 @@
+# $NetBSD: Makefile.common,v 1.1 2020/07/28 06:36:29 kardel Exp $
+# used by sysutils/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/}
+
+# also knowledgable: 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"
Index: pkgsrc/sysutils/bareos/PLIST.common
diff -u /dev/null pkgsrc/sysutils/bareos/PLIST.common:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/PLIST.common Tue Jul 28 06:36:29 2020
@@ -0,0 +1,243 @@
+@comment $NetBSD: PLIST.common,v 1.1 2020/07/28 06:36:29 kardel Exp $
+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
Index: pkgsrc/sysutils/bareos/distinfo
diff -u /dev/null pkgsrc/sysutils/bareos/distinfo:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/distinfo Tue Jul 28 06:36:29 2020
@@ -0,0 +1,44 @@
+$NetBSD: distinfo,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+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
Index: pkgsrc/sysutils/bareos/options.mk
diff -u /dev/null pkgsrc/sysutils/bareos/options.mk:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/options.mk Tue Jul 28 06:36:29 2020
@@ -0,0 +1,24 @@
+# $NetBSD: options.mk,v 1.1 2020/07/28 06:36:29 kardel 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
Index: pkgsrc/sysutils/bareos/files/bareos-dir.sh
diff -u /dev/null pkgsrc/sysutils/bareos/files/bareos-dir.sh:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/files/bareos-dir.sh Tue Jul 28 06:36:29 2020
@@ -0,0 +1,23 @@
+#!@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
Index: pkgsrc/sysutils/bareos/files/bareos-fd.sh
diff -u /dev/null pkgsrc/sysutils/bareos/files/bareos-fd.sh:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/files/bareos-fd.sh Tue Jul 28 06:36:29 2020
@@ -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
Index: pkgsrc/sysutils/bareos/files/bareos-sd.sh
diff -u /dev/null pkgsrc/sysutils/bareos/files/bareos-sd.sh:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/files/bareos-sd.sh Tue Jul 28 06:36:29 2020
@@ -0,0 +1,23 @@
+#!@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
Index: pkgsrc/sysutils/bareos/files/bareos.sh
diff -u /dev/null pkgsrc/sysutils/bareos/files/bareos.sh:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/files/bareos.sh Tue Jul 28 06:36:29 2020
@@ -0,0 +1,52 @@
+#!@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
Index: pkgsrc/sysutils/bareos/patches/patch-core_CMakeLists.txt
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_CMakeLists.txt:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_CMakeLists.txt Tue Jul 28 06:36:29 2020
@@ -0,0 +1,42 @@
+$NetBSD: patch-core_CMakeLists.txt,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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()
Index: pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosCheckIncludes.cmake Tue Jul 28 06:36:29 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-core_cmake_BareosCheckIncludes.cmake,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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)
Index: pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosFindAllLibraries.cmake Tue Jul 28 06:36:29 2020
@@ -0,0 +1,17 @@
+$NetBSD: patch-core_cmake_BareosFindAllLibraries.cmake,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+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")
Index: pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosFindPrograms.cmake
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosFindPrograms.cmake:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosFindPrograms.cmake Tue Jul 28 06:36:29 2020
@@ -0,0 +1,25 @@
+$NetBSD: patch-core_cmake_BareosFindPrograms.cmake,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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)
Index: pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosInstallConfigFiles.cmake
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosInstallConfigFiles.cmake:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosInstallConfigFiles.cmake Tue Jul 28 06:36:29 2020
@@ -0,0 +1,65 @@
+$NetBSD: patch-core_cmake_BareosInstallConfigFiles.cmake,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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}")
Index: pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosSetVariableDefaults.cmake Tue Jul 28 06:36:29 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-core_cmake_BareosSetVariableDefaults.cmake,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+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
Index: pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosTimeFunctions.cmake
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosTimeFunctions.cmake:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_cmake_BareosTimeFunctions.cmake Tue Jul 28 06:36:29 2020
@@ -0,0 +1,17 @@
+$NetBSD: patch-core_cmake_BareosTimeFunctions.cmake,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+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
Index: pkgsrc/sysutils/bareos/patches/patch-core_platforms_netbsd_CMakeLists.txt
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_platforms_netbsd_CMakeLists.txt:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_platforms_netbsd_CMakeLists.txt Tue Jul 28 06:36:29 2020
@@ -0,0 +1,18 @@
+$NetBSD: patch-core_platforms_netbsd_CMakeLists.txt,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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()
Index: pkgsrc/sysutils/bareos/patches/patch-core_platforms_netbsd_chio-changer
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_platforms_netbsd_chio-changer:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_platforms_netbsd_chio-changer Tue Jul 28 06:36:29 2020
@@ -0,0 +1,141 @@
+$NetBSD: patch-core_platforms_netbsd_chio-changer,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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
Index: pkgsrc/sysutils/bareos/patches/patch-core_scripts_CMakeLists.txt
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_scripts_CMakeLists.txt:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_scripts_CMakeLists.txt Tue Jul 28 06:36:29 2020
@@ -0,0 +1,53 @@
+$NetBSD: patch-core_scripts_CMakeLists.txt,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+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()
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_CMakeLists.txt
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_CMakeLists.txt:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_CMakeLists.txt Tue Jul 28 06:36:29 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-core_src_CMakeLists.txt,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+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)
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_cats_make__catalog__backup.pl.in
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_cats_make__catalog__backup.pl.in:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_cats_make__catalog__backup.pl.in Tue Jul 28 06:36:29 2020
@@ -0,0 +1,20 @@
+$NetBSD: patch-core_src_cats_make__catalog__backup.pl.in,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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
+ {
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_cats_postgresql__queries.inc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_cats_postgresql__queries.inc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_cats_postgresql__queries.inc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-core_src_cats_postgresql__queries.inc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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) "
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_dird_admin.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_dird_admin.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_dird_admin.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,23 @@
+$NetBSD: patch-core_src_dird_admin.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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");
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_dird_archive.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_dird_archive.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_dird_archive.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-core_src_dird_archive.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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");
+ }
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_dird_authenticate__console.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_dird_authenticate__console.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_dird_authenticate__console.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,19 @@
+$NetBSD: patch-core_src_dird_authenticate__console.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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: ";
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_dird_backup.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_dird_backup.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_dird_backup.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,26 @@
+$NetBSD: patch-core_src_dird_backup.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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 */
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_dird_consolidate.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_dird_consolidate.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_dird_consolidate.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-core_src_dird_consolidate.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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");
+ }
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_dird_dird__conf.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_dird_dird__conf.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_dird_dird__conf.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,16 @@
+$NetBSD: patch-core_src_dird_dird__conf.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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;
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_dird_migrate.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_dird_migrate.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_dird_migrate.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,51 @@
+$NetBSD: patch-core_src_dird_migrate.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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);
+ }
+ }
+
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_dird_restore.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_dird_restore.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_dird_restore.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,51 @@
+$NetBSD: patch-core_src_dird_restore.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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;
+ }
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_dird_verify.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_dird_verify.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_dird_verify.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,50 @@
+$NetBSD: patch-core_src_dird_verify.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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;
+ }
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_filed_accurate__lmdb.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_filed_accurate__lmdb.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_filed_accurate__lmdb.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-core_src_filed_accurate__lmdb.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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);
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_findlib_acl.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_findlib_acl.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_findlib_acl.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,79 @@
+$NetBSD: patch-core_src_findlib_acl.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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:
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_findlib_find__one.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_findlib_find__one.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_findlib_find__one.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-core_src_findlib_find__one.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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"),
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_lib_mem__pool.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_lib_mem__pool.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_lib_mem__pool.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,26 @@
+$NetBSD: patch-core_src_lib_mem__pool.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+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;
+ }
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_lib_scsi__lli.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_lib_scsi__lli.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_lib_scsi__lli.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,47 @@
+$NetBSD: patch-core_src_lib_scsi__lli.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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,
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_lib_version.c
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_lib_version.c:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_lib_version.c Tue Jul 28 06:36:29 2020
@@ -0,0 +1,28 @@
+$NetBSD: patch-core_src_lib_version.c,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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 \
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_lmdb_mdb.c
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_lmdb_mdb.c:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_lmdb_mdb.c Tue Jul 28 06:36:29 2020
@@ -0,0 +1,25 @@
+$NetBSD: patch-core_src_lmdb_mdb.c,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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;
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_plugins_stored_scsicrypto-sd.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,40 @@
+$NetBSD: patch-core_src_plugins_stored_scsicrypto-sd.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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);
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_plugins_stored_scsitapealert-sd.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_plugins_stored_scsitapealert-sd.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_plugins_stored_scsitapealert-sd.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,27 @@
+$NetBSD: patch-core_src_plugins_stored_scsitapealert-sd.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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",
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_stored_acquire.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_stored_acquire.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_stored_acquire.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-core_src_stored_acquire.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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"),
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_stored_bscan.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_stored_bscan.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_stored_bscan.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,27 @@
+$NetBSD: patch-core_src_stored_bscan.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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);
+
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_stored_btape.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_stored_btape.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_stored_btape.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,31 @@
+$NetBSD: patch-core_src_stored_btape.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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;
+
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_stored_device.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_stored_device.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_stored_device.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,29 @@
+$NetBSD: patch-core_src_stored_device.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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);
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_stored_dir__cmd.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_stored_dir__cmd.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_stored_dir__cmd.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,24 @@
+$NetBSD: patch-core_src_stored_dir__cmd.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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;
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_stored_label.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_stored_label.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_stored_label.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,15 @@
+$NetBSD: patch-core_src_stored_label.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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();
Index: pkgsrc/sysutils/bareos/patches/patch-core_src_stored_mount.cc
diff -u /dev/null pkgsrc/sysutils/bareos/patches/patch-core_src_stored_mount.cc:1.1
--- /dev/null Tue Jul 28 06:36:29 2020
+++ pkgsrc/sysutils/bareos/patches/patch-core_src_stored_mount.cc Tue Jul 28 06:36:29 2020
@@ -0,0 +1,27 @@
+$NetBSD: patch-core_src_stored_mount.cc,v 1.1 2020/07/28 06:36:29 kardel Exp $
+
+ 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