diff options
Diffstat (limited to 'sysutils/bareos17-server/files')
18 files changed, 907 insertions, 0 deletions
diff --git a/sysutils/bareos17-server/files/bareos-barcodes b/sysutils/bareos17-server/files/bareos-barcodes new file mode 100644 index 000000000000..f42cb7f7aeea --- /dev/null +++ b/sysutils/bareos17-server/files/bareos-barcodes @@ -0,0 +1,51 @@ +# +# Bacula barcode simulation file +# used by ${PREFIX}/sbin/chio-bareos (FreeBSD) +# +# The volumenames are returned by the "changer list" command +# labeling in the console is done by "label barcodes" +# (then all volumes belog to the default pool). +# All Lines with an "#" at the bedinning are ignored +# +# !!!! If you export an tape and reinsert another one, +# !!!! don't forget to change the volume name in this file! +# +1:Volume1-100 +2:Volume1-101 +3:Volume1-102 +4:Volume1-103 +5:Volume1-104 +6:Volume1-105 +7:Volume1-106 +8:Volume1-107 +9:Volume1-108 +10:Volume1-109 +11:Volume1-110 +12:Volume1-111 +# +# Further volumes exported from the changer +# +# 36GB AIT2 tapes +#Volume1-100 +#Volume1-101 +#Volume1-102 +#Volume1-103 +#Volume1-104 +#Volume1-105 +#Volume1-106 +#Volume1-107 +#Volume1-108 +#Volume1-109 +#Volume1-110 +#Volume1-111 +#Volume1-112 +#Volume1-113 +#Volume1-114 +#Volume1-115 +# +# 50GB AIT2 tapes +#Volume2-200 +#Volume2-201 +#Volume2-202 +#Volume2-203 +#Volume2-204 diff --git a/sysutils/bareos17-server/files/bareos-dir.in b/sysutils/bareos17-server/files/bareos-dir.in new file mode 100644 index 000000000000..1d92025ae9a1 --- /dev/null +++ b/sysutils/bareos17-server/files/bareos-dir.in @@ -0,0 +1,57 @@ +#!/bin/sh +# +# $FreeBSD: head/sysutils/bareos-server/files/bareos-dir.in 323275 2013-07-19 09:44:58Z rm $ +# +# PROVIDE: bareos_dir +# REQUIRE: DAEMON %%REQ_MYSQL%% %%REQ_PGSQL%% +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# bareos_dir_enable (bool): Set to NO by default. +# Set it to YES to enable bareos_dir. +# bareos_dir_flags (params): Set params used to start bareos_dir. +# bareos_dir_config (params): Path to the config file/directory +# + +. /etc/rc.subr + +name="bareos_dir" +rcvar=${name}_enable + +load_rc_config $name + +: ${bareos_dir_enable="NO"} +: ${bareos_dir_flags="-u bareos -g bareos -v"} +: ${bareos_dir_config="%%PREFIX%%/etc/bareos/"} +: ${bareos_dir_pidfile="/var/run/bareos/bareos-dir.9101.pid"} + +command=%%PREFIX%%/sbin/bareos-dir +command_args="-c ${bareos_dir_config}" +pidfile="${bareos_dir_pidfile}" +bconsole_command=/usr/local/bin/bconsole +start_precmd="bareos_start_precmd" +restart_precmd="bareos_dir_configtest" +reload_precmd="bareos_dir_configtest" +reload_cmd="bareos_dir_reload" +configtest_cmd="bareos_dir_configtest" + +bareos_start_precmd() { + [ -d "${pidfile%/*}" ] || install -d -o bareos -g bareos ${pidfile%/*} + bareos_dir_configtest +} + +bareos_dir_configtest() { + echo "Performing sanity check on ${bareos_dir_config} configuration:" + eval ${command} -t +} + +bareos_dir_reload() { + echo "Performing a graceful reload" + # bconsole always exits with 0, so we can't check the return status for success. + echo "reload" | ${bconsole_command} +} + +extra_commands="reload configtest" +run_rc_command "$1" diff --git a/sysutils/bareos17-server/files/bareos-fd.in b/sysutils/bareos17-server/files/bareos-fd.in new file mode 100644 index 000000000000..2a45ee7dfb47 --- /dev/null +++ b/sysutils/bareos17-server/files/bareos-fd.in @@ -0,0 +1,48 @@ +#!/bin/sh +# +# $FreeBSD: head/sysutils/bacula5-server/files/bacula-fd.in 323275 2013-07-19 09:44:58Z rm $ +# +# PROVIDE: bareos_fd +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# bareos_fd_enable (bool): Set to NO by default. +# Set it to YES to enable bareos_fd. +# bareos_fd_flags (params): Set params used to start bareos_fd. +# bareos_fd_config (params): Path to the config file/directory +# + +. /etc/rc.subr + +name="bareos_fd" +rcvar=${name}_enable + +load_rc_config $name + +: ${bareos_fd_enable="NO"} +: ${bareos_fd_flags="-u root -g wheel -v"} +: ${bareos_fd_config="%%PREFIX%%/etc/bareos/"} +: ${bareos_fd_pidfile="/var/run/bareos/bareos-fd.9102.pid"} + +command=%%PREFIX%%/sbin/bareos-fd +command_args="-c ${bareos_fd_config}" +pidfile="${bareos_fd_pidfile}" +start_precmd="bareos_start_precmd" + +bareos_start_precmd() { + [ -d "${pidfile%/*}" ] || { + getent passwd bareos > /dev/null 2&>1 + if [ $? -eq 0] ; then + # user bareos exists + install -d -o bareos -g bareos ${pidfile%/*} + else + # bareos_fd as solitair service + install -d -o root -g wheel ${pidfile%/*} + fi + } +} + +run_rc_command "$1" diff --git a/sysutils/bareos17-server/files/bareos-sd.in b/sysutils/bareos17-server/files/bareos-sd.in new file mode 100644 index 000000000000..9c9df6de204b --- /dev/null +++ b/sysutils/bareos17-server/files/bareos-sd.in @@ -0,0 +1,39 @@ +#!/bin/sh +# +# $FreeBSD: head/sysutils/bacula5-server/files/bacula-sd.in 323486 2013-07-22 17:51:39Z rm $ +# +# PROVIDE: bareos_sd +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# bareos_sd_enable (bool): Set to NO by default. +# Set it to YES to enable bareos_sd. +# bareos_sd_flags (params): Set params used to start bareos_sd. +# bareos_sd_config (params): Path to the config file/directory +# + +. /etc/rc.subr + +name="bareos_sd" +rcvar=${name}_enable + +load_rc_config $name + +: ${bareos_sd_enable="NO"} +: ${bareos_sd_flags="-u bareos -g bareos -v"} +: ${bareos_sd_config="%%PREFIX%%/etc/bareos/"} +: ${bareos_sd_pidfile="/var/run/bareos/bareos-sd.9103.pid"} + +command=%%PREFIX%%/sbin/bareos-sd +command_args="-c ${bareos_sd_config}" +pidfile="${bareos_sd_pidfile}" +start_precmd="bareos_start_precmd" + +bareos_start_precmd() { + [ -d "${pidfile%/*}" ] || install -d -o bareos -g bareos ${pidfile%/*} +} + +run_rc_command "$1" diff --git a/sysutils/bareos17-server/files/chio-bareos b/sysutils/bareos17-server/files/chio-bareos new file mode 100644 index 000000000000..f006ef78e6ce --- /dev/null +++ b/sysutils/bareos17-server/files/chio-bareos @@ -0,0 +1,190 @@ +#!/bin/sh +# +# BAREOS interface to tape libraries and autoloaders for FreeBSD +# (by Rudolf Cejka <cej...@fit.vutbr.cz>, v1.2, 2012/11/14) +# +# 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: +# chio-changer "changer-device" "command" "slot" "tape-device" "drive-index" +# $1 $2 $3 $4 $5 +# for example (on a FreeBSD system): +# chio-changer /dev/ch0 load 1 /dev/nsa0 0 +# +# 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. +# + +PROGNAME=`basename $0` + +# Uncomment the following line, if you want to log debug output. +#DEBUG=/var/run/bareos/${PROGNAME}.log + +# Uncomment the following line, if you need to eject a tape before moving +# it from the drive. +#OFFLINE=yes + +# Uncomment one or more of the following lines, if you need to wait for +# some time (in seconds) after unloading, loading or transferring a tape. +#OFFLINE_SLEEP=10 +#LOAD_SLEEP=10 +#MOVE_SLEEP=10 + +# Uncomment the following line, if you do not have a changer with volume +# reader. +#FAKE_BARCODES=/usr/local/etc/bareos-barcodes + +usage() +{ + cat <<EOF +Usage: ${PROGNAME} <changer-device> <cmd> [slot] [tape-device] [drive-index] + +Commands (<cmd>): + unload Unload a tape into the slot from where it was loaded + load <slot> Load a tape from the slot <slot> (1-based) + transfer <slot> <slotdst> Transfer a tape from the slot <slot> to + the slot <slotdst> (1-based) + list List full storage slots + listall List all storage slots and drives with source information + loaded Give slot from where the tape was loaded (0 = empty drive) + slots Give number of available slots + +Example: + ${PROGNAME} /dev/ch0 load 1 Load a tape from the slot 1 + +EOF + exit 1 +} + +# Default settings +CHANGER=/dev/ch0 +TAPE=/dev/nsa0 +DRIVE=0 + +CHIO=/bin/chio +MT=/usr/bin/mt + +if [ -n "${DEBUG}" ]; then + MSG=$0 + for PAR; do MSG="${MSG} \"${PAR}\""; done + echo `date +"%Y/%m/%d %H:%M:%S"` ${MSG} >> ${DEBUG} +fi + +if [ -n "$1" ]; then + CHANGER=$1; +fi +COMMAND=$2 +SLOT=$3 +SLOTDST=$4 +if [ -n "$4" ]; then + TAPE=$4 +fi +if [ -n "$5" ]; then + DRIVE=$5 +fi + +case ${COMMAND} in +unload) + if [ "${OFFLINE}" = yes ]; then + ${MT} -f ${TAPE} offline + if [ $? = 0 -a -n "${OFFLINE_SLEEP}" ]; then + sleep ${OFFLINE_SLEEP} + fi + fi + if [ -z "${SLOT}" ]; then + ${CHIO} -f ${CHANGER} return drive ${DRIVE} + else + ${CHIO} -f ${CHANGER} move drive ${DRIVE} slot $((${SLOT} - 1)) + fi + if [ $? -ne 0 ]; then + # In case of an error, try to unload the cartridge to the first free slot + FREE=`${CHIO} -f ${CHANGER} status slot | \ + sed -ne '/FULL/d;s/^slot *\([0-9]*\):.*/\1/p' | \ + awk 'BEGIN { n = 0 } { n = $1 + 1; exit } END { print n }'` + if [ ${FREE} -gt 0 ]; then + ${CHIO} -f ${CHANGER} move drive ${DRIVE} slot $((${FREE} - 1)) + else + exit 1 + fi + fi + ;; +load) + if [ -z "${SLOT}" ]; then + usage + fi + ${CHIO} -f ${CHANGER} move slot $((${SLOT} - 1)) drive ${DRIVE} + if [ $? -ne 0 ]; then + exit 1 + fi + if [ -n "${LOAD_SLEEP}" ]; then + sleep ${LOAD_SLEEP} + fi + ;; +transfer) + if [ -z "${SLOT}" -o -z "${SLOTDST}" ]; then + usage + fi + ${CHIO} -f ${CHANGER} move slot $((${SLOT} - 1)) slot $((${SLOTDST} - 1)) + if [ $? -ne 0 ]; then + exit 1 + fi + if [ -n "${MOVE_SLEEP}" ]; then + sleep ${MOVE_SLEEP} + fi + ;; +list) + if [ -z "${FAKE_BARCODES}" ]; then + ${CHIO} -f ${CHANGER} status -v slot | \ + sed -ne 's/^slot *\([0-9]*\):.*FULL.*voltag.*<\([^:]*\):.*/\1:\2/p' | \ + awk -F: '{ print $1 + 1 ":" $2 }' + else + if [ -f "${FAKE_BARCODES}" ]; then + grep -v -e "^#" -e "^$" < ${FAKE_BARCODES} + else + echo "${PROGNAME}: Barcode file ${FAKE_BARCODES} is missing" + exit 1 + fi + fi + ;; +listall) + if [ -z "${FAKE_BARCODES}" ]; then + ${CHIO} -f ${CHANGER} status -vS | \ + sed -ne ' + s/^slot *\([0-9]*\):.*ENAB.*FULL.*voltag.*<\([^:]*\):.*/I:\1:F:\2/p;t + s/^slot *\([0-9]*\):.*FULL.*voltag.*<\([^:]*\):.*/S:\1:F:\2/p;t + s/^drive *\([0-9]*\):.*FULL.*voltag.*<\([^:]*\):.*source.*<[^0-9]*\([0-9]*\)>.*/D:\1:F:\3:\2/p;t + s/^slot *\([0-9]*\):.*ENAB.*voltag.*<\([^:]*\):.*/I:\1:E/p;t + s/^slot *\([0-9]*\):.*voltag.*<\([^:]*\):.*/S:\1:E/p;t + s/^drive *\([0-9]*\):.*voltag.*<\([^:]*\):.*/D:\1:E/p' | \ + awk -F: '{ for (n = 1; n <= NF; n++) printf "%s%s", + (n == ($1 == "D" ? 4 : 2)) ? ($n == "" ? 0 : $n + 1) : $n, + (n == NF) ? "\n" : ":" }' + else + if [ -f "${FAKE_BARCODES}" ]; then + grep -v -e "^#" -e "^$" < ${FAKE_BARCODES} | \ + awk -F: '{ print "S:" $1 (match($2, "^ *$") ? ":E" : ":F:" $2) }' + else + echo "${PROGNAME}: Barcode file ${FAKE_BARCODES} is missing" + exit 1 + fi + fi + ;; +loaded) + # If a tape is loaded, but the source slot is unknown (for example, + # after library reboot), try to report the first free slot + FREE=`${CHIO} -f ${CHANGER} status slot | \ + sed -ne '/FULL/d;s/^slot *\([0-9]*\):.*/\1/p' | \ + awk 'BEGIN { n = 0 } { n = $1 + 1; exit } END { print n }'` + ${CHIO} -f ${CHANGER} status -S drive | \ + sed -ne 's/^drive *'${DRIVE}':.*FULL.*source.*<[^0-9]*\([0-9]*\)>.*/\1/p' \ + | awk 'BEGIN { n = 0 } { n = ($1 == "") ? '${FREE}' : $1 + 1 } \ + END { print n }' + ;; +slots) + ${CHIO} -f ${CHANGER} status | grep -c "^slot " + ;; +*) + usage + ;; +esac diff --git a/sysutils/bareos17-server/files/patch-autoconf_Make.common.in b/sysutils/bareos17-server/files/patch-autoconf_Make.common.in new file mode 100644 index 000000000000..38093dc657b0 --- /dev/null +++ b/sysutils/bareos17-server/files/patch-autoconf_Make.common.in @@ -0,0 +1,13 @@ +--- autoconf/Make.common.in 2016-11-09 23:17:41.055746000 -0500 ++++ autoconf/Make.common.in 2016-11-09 23:17:59.647897000 -0500 +@@ -62,8 +62,8 @@ + MKDIR = @BUILD_DIR@/autoconf/mkinstalldirs + INSTALL = @INSTALL@ + # add the -s to the following in PRODUCTION mode +-INSTALL_PROGRAM = $(INSTALL) -m @SBINPERM@ +-INSTALL_LIB = $(INSTALL) -m 755 ++INSTALL_PROGRAM = $(INSTALL) -s -m @SBINPERM@ ++INSTALL_LIB = $(INSTALL) -s -m 755 + INSTALL_DATA = $(INSTALL) -m 644 + INSTALL_SCRIPT = $(INSTALL) -m @SBINPERM@ + INSTALL_CONFIG = $(INSTALL) -m 640 diff --git a/sysutils/bareos17-server/files/patch-configure b/sysutils/bareos17-server/files/patch-configure new file mode 100644 index 000000000000..2790798a4180 --- /dev/null +++ b/sysutils/bareos17-server/files/patch-configure @@ -0,0 +1,20 @@ +--- configure 2015-08-08 15:47:12.347184000 -0500 ++++ configure 2015-08-08 15:48:11.164437000 -0500 +@@ -18626,7 +18626,7 @@ + found_so= + found_a= + if test $use_additional = yes; then +- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then ++ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test "${enable_static_fd+set}" != set; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then +@@ -21466,7 +21466,7 @@ + found_so= + found_a= + if test $use_additional = yes; then +- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then ++ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test "${enable_static_fd+set}" != set; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then diff --git a/sysutils/bareos17-server/files/patch-src-console-Makefile.in b/sysutils/bareos17-server/files/patch-src-console-Makefile.in new file mode 100644 index 000000000000..b1526de9fb6f --- /dev/null +++ b/sysutils/bareos17-server/files/patch-src-console-Makefile.in @@ -0,0 +1,35 @@ +--- src/console/Makefile.in 2016-10-16 10:14:36.000000000 -0500 ++++ src/console/Makefile.in 2016-11-16 01:14:33.054997000 -0500 +@@ -28,6 +28,7 @@ + CONS_LIBS = @CONS_LIBS@ + + JANSSON_CPPFLAGS = @JANSSON_INC@ ++JANSSON_LDFLAGS = @JANSSON_LIBS@ + + INCLUDES += -I$(srcdir) -I$(basedir) -I$(basedir)/include + +@@ -51,12 +52,12 @@ + bconsole: Makefile $(CONSOBJS) ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) + $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \ + $(DLIB) -lbareoscfg -lbareos -lm $(CONS_LIBS) $(LIBS) $(GETTEXT_LIBS) \ +- $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) ++ $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) $(JANSSON_LDFLAGS) + + static-bconsole: Makefile $(CONSOBJS) ../lib/libbareos.a ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) + $(LIBTOOL_LINK) $(CXX) -static $(LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \ +- $(DLIB) -lbareoscfg -lbareos -lm $(CONS_LIBS) $(LIBS) $(GETTEXT_LIBS) \ +- $(OPENSSL_LIBS) $(GNUTLS_LIBS) ++ $(DLIB) -lbareoscfg -lbareos -lm $(CONS_LIBS) $(LIBS) $(GETTEXT_STATIC_LIBS) \ ++ $(OPENSSL_LIBS) $(GNUTLS_LIBS) $(JANSSON_LDFLAGS) + strip $@ + + +@@ -93,7 +94,7 @@ + $(MKDIR) $(DESTDIR)$(bindir) + $(MKDIR) $(DESTDIR)$(sbindir) + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bconsole $(DESTDIR)$(bindir)/bconsole; +- @if ! [ -r $(DESTDIR)$(sbindir)/bconsole ]; then $(SYMLINK) $(bindir)/bconsole $(DESTDIR)$(sbindir)/bconsole; fi ++ @if ! [ -r $(DESTDIR)$(sbindir)/bconsole ]; then $(SYMLINK) ../bin/bconsole $(DESTDIR)$(sbindir)/bconsole; fi + @srcconf=bconsole.conf; \ + if test -f ${DESTDIR}${confdir}/$$srcconf; then \ + destconf=$$srcconf.new; \ diff --git a/sysutils/bareos17-server/files/patch-src-dird-Makefile.in b/sysutils/bareos17-server/files/patch-src-dird-Makefile.in new file mode 100644 index 000000000000..b106e98bb054 --- /dev/null +++ b/sysutils/bareos17-server/files/patch-src-dird-Makefile.in @@ -0,0 +1,100 @@ +--- src/dird/Makefile.in 2018-07-12 07:38:58.000000000 -0500 ++++ src/dird/Makefile.in 2019-05-09 09:40:05.828917000 -0500 +@@ -56,6 +56,7 @@ + INCLUDES += -I$(srcdir) -I$(basedir) -I$(basedir)/include -I$(basedir)/lmdb -I$(basedir)/ndmp + + JANSSON_CPPFLAGS = @JANSSON_INC@ ++JANSSON_LDFLAGS = @JANSSON_LIBS@ + + DIRD_RESTYPES = catalog client console counter director fileset job jobdefs messages pool profile schedule storage + +@@ -77,46 +78,46 @@ + $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(JANSSON_CPPFLAGS) $(INCLUDES) $(DINCLUDE) $(CXXFLAGS) $< + + bareos-dir: Makefile $(SVROBJS) \ +- ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ + ../cats/libbareossql$(DEFAULT_ARCHIVE_TYPE) \ + ../cats/libbareoscats$(DEFAULT_ARCHIVE_TYPE) \ +- ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ + @NDMP_DEPS@ + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \ + $(NDMP_LIBS) -lbareosfind -lbareossql -lbareoscats -lbareoscfg -lbareos -lm $(DLIB) \ + $(DB_LIBS) $(LIBS) $(WRAPLIBS) $(GETTEXT_LIBS) $(CAP_LIBS) \ +- $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) $(LMDB_LIBS) ++ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) $(LMDB_LIBS) $(JANSSON_LDFLAGS) + + bareos-dbcheck: Makefile $(DBCHKOBJS) \ +- ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ +- ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ + ../cats/libbareossql$(DEFAULT_ARCHIVE_TYPE) \ + ../cats/libbareoscats$(DEFAULT_ARCHIVE_TYPE) + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../findlib -L../cats -o $@ $(DBCHKOBJS) \ + -lbareoscats -lbareossql -lbareoscfg -lbareosfind -lbareos -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) \ +- $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) ++ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) $(JANSSON_LDFLAGS) + + testfind: Makefile $(TSTFNDOBJS) \ +- ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ +- ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ + ../cats/libbareossql$(DEFAULT_ARCHIVE_TYPE) \ + ../cats/libbareoscats$(DEFAULT_ARCHIVE_TYPE) + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -L../findlib -L../cats -o $@ $(TSTFNDOBJS) \ + -lbareoscats -lbareossql -lbareoscfg -lbareosfind -lbareos -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) \ +- $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) ++ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) + + static-bareos-dir: Makefile $(SVROBJS) \ +- ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ + ../cats/libbareossql$(DEFAULT_ARCHIVE_TYPE) \ + ../cats/libbareoscats$(DEFAULT_ARCHIVE_TYPE) \ +- ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ + @NDMP_DEPS@ + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \ +@@ -160,13 +161,8 @@ + if test -f "$$f"; then \ + RESDIR="$$DESTCONFDIR/$$RESTYPE"; \ + RES=`basename "$$f"`; \ +- if test -f "$$RESDIR/$$RES"; then \ +- destconf="$$RESDIR/$$RES.new"; \ +- echo " $$RESTYPE/$$RES as \"$$destconf\" (keep existing)"; \ +- else \ +- destconf="$$RESDIR/$$RES"; \ +- echo " $$RESTYPE/$$RES as \"$$destconf\""; \ +- fi; \ ++ destconf="$$RESDIR/$$RES.sample"; \ ++ echo " $$RESTYPE/$$RES as \"$$destconf\".sample"; \ + ${INSTALL_CONFIG} "$$f" "$$destconf"; \ + if test "x${dir_group}" != "x"; then \ + chgrp -f ${dir_group} $$destconf || true; \ +@@ -174,11 +170,6 @@ + fi; \ + done; \ + done +- $(MKDIR) ${DESTDIR}${confdir}/bareos-dir-export/client/ +- @if test -f ${DESTDIR}${scriptdir}/query.sql; then \ +- echo " ==> Saving existing query.sql to query.sql.old"; \ +- $(MV) -f ${DESTDIR}${scriptdir}/query.sql ${DESTDIR}${scriptdir}/query.sql.old; \ +- fi + ${INSTALL_DATA} query.sql ${DESTDIR}${scriptdir}/query.sql + @if test -f static-bareos-dir; then \ + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bareos-dir $(DESTDIR)$(sbindir)/static-bareos-dir; \ diff --git a/sysutils/bareos17-server/files/patch-src-filed-Makefile.in b/sysutils/bareos17-server/files/patch-src-filed-Makefile.in new file mode 100644 index 000000000000..4f501c1abadf --- /dev/null +++ b/sysutils/bareos17-server/files/patch-src-filed-Makefile.in @@ -0,0 +1,69 @@ +--- src/filed/Makefile.in 2018-07-12 07:38:58.000000000 -0500 ++++ src/filed/Makefile.in 2019-05-09 09:43:00.397777000 -0500 +@@ -21,10 +21,11 @@ + DEBUG=@DEBUG@ + + GETTEXT_LIBS = @LIBINTL@ +-OPENSSL_LIBS_NONSHARED = @OPENSSL_LIBS_NONSHARED@ +-GNUTLS_LIBS_NONSHARED = @GNUTLS_LIBS_NONSHARED@ ++OPENSSL_LIBS = @OPENSSL_LIBS@ ++GNUTLS_LIBS = @GNUTLS_LIBS@ + + JANSSON_CPPFLAGS = @JANSSON_INC@ ++JANSSON_LDFLAGS = @JANSSON_LIBS@ + COMPRESS_CPPFLAGS += @ZLIB_INC@ @LZO_INC@ @FASTLZ_INC@ + + first_rule: all +@@ -39,12 +40,12 @@ + + FDLIBS += @LMDB_LIBS@ + FDLIBS += @CAP_LIBS@ +-FDLIBS += @ZLIB_LIBS_NONSHARED@ +-FDLIBS += @LZO_LIBS_NONSHARED@ +-FDLIBS += @FASTLZ_LIBS_NONSHARED@ +-FDLIBS += @AFS_LIBS_NONSHARED@ +-FDLIBS += @ACL_LIBS_NONSHARED@ +-FDLIBS += @XATTR_LIBS_NONSHARED@ ++FDLIBS += @ZLIB_LIBS@ ++FDLIBS += @LZO_LIBS@ ++FDLIBS += @FASTLZ_LIBS@ ++FDLIBS += @AFS_LIBS@ ++FDLIBS += @ACL_LIBS@ ++FDLIBS += @XATTR_LIBS@ + + INCLUDES += -I$(srcdir) -I$(basedir) -I$(basedir)/include -I$(basedir)/lmdb + +@@ -78,7 +79,7 @@ + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \ + -lbareosfind -lbareoscfg -lbareos -lm $(FDLIBS) $(LIBS) \ +- $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) ++ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS) $(JANSSON_LDFLAGS) + + static-bareos-fd: Makefile $(SVROBJS) \ + ../findlib/libbareosfind.a \ +@@ -87,7 +88,7 @@ + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \ + -lbareosfind -lbareoscfg -lbareos -lm $(FDLIBS) $(LIBS) \ +- $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS) ++ $(DLIB) $(WRAPLIBS) $(GETTEXT_STATIC_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS) $(JANSSON_LDFLAGS) + strip $@ + + Makefile: $(srcdir)/Makefile.in $(topdir)/config.status +@@ -133,13 +134,8 @@ + if test -f "$$f"; then \ + RESDIR="$$DESTCONFDIR/$$RESTYPE"; \ + RES=`basename "$$f"`; \ +- if test -f "$$RESDIR/$$RES"; then \ +- destconf="$$RESDIR/$$RES.new"; \ +- echo " $$RESTYPE/$$RES as \"$$destconf\" (keep existing)"; \ +- else \ +- destconf="$$RESDIR/$$RES"; \ +- echo " $$RESTYPE/$$RES as \"$$destconf\""; \ +- fi; \ ++ destconf="$$RESDIR/$$RES.sample"; \ ++ echo " $$RESTYPE/$$RES as \"$$destconf\".sample"; \ + ${INSTALL_CONFIG} "$$f" "$$destconf"; \ + if test "x${fd_group}" != "x"; then \ + chgrp -f ${fd_group} $$destconf || true; \ diff --git a/sysutils/bareos17-server/files/patch-src-plugins-filed_Makefile.in b/sysutils/bareos17-server/files/patch-src-plugins-filed_Makefile.in new file mode 100644 index 000000000000..6318ac7a4268 --- /dev/null +++ b/sysutils/bareos17-server/files/patch-src-plugins-filed_Makefile.in @@ -0,0 +1,21 @@ +--- src/plugins/filed/Makefile.in 2018-05-17 15:34:21.796332000 -0500 ++++ src/plugins/filed/Makefile.in 2018-05-17 15:35:50.843157000 -0500 +@@ -93,7 +93,8 @@ + + install: all + $(MKDIR) $(DESTDIR)$(plugindir) +- $(MKDIR) ${DESTDIR}${configtemplatedir}/bareos-dir.d/ ++ $(MKDIR) ${DESTDIR}${configtemplatedir}/bareos-dir.d/fileset ++ $(MKDIR) ${DESTDIR}${configtemplatedir}/bareos-dir.d/job + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bpipe-fd.la $(DESTDIR)$(plugindir) + $(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.la + if test "x$(BUILD_PLUGINS)" != "x" ; then \ +@@ -111,7 +112,7 @@ + $(CP) *.py *.py.template $(DESTDIR)$(plugindir); \ + for i in `find python-ldap-conf.d/ \( -name "*.conf" -o -name "*.conf.example" \) -print | cut -d'/' -f2-`; do \ + $(MKDIR) `dirname ${DESTDIR}${configtemplatedir}/$$i`; \ +- $(INSTALL_CONFIG) python-ldap-conf.d/$$i ${DESTDIR}${configtemplatedir}/$$i; \ ++ $(INSTALL_CONFIG) python-ldap-conf.d/$$i ${DESTDIR}${confdir}/`echo $$i | sed -e 's|example|sample|g'`; \ + done; \ + fi; \ + done;\ diff --git a/sysutils/bareos17-server/files/patch-src-plugins-stored-Makefile.in b/sysutils/bareos17-server/files/patch-src-plugins-stored-Makefile.in new file mode 100644 index 000000000000..7d4f8fb3b871 --- /dev/null +++ b/sysutils/bareos17-server/files/patch-src-plugins-stored-Makefile.in @@ -0,0 +1,11 @@ +--- src/plugins/stored/Makefile.in 2015-07-23 18:04:28.275396000 -0500 ++++ src/plugins/stored/Makefile.in 2015-07-23 18:05:09.508399000 -0500 +@@ -39,7 +39,7 @@ + + autoxflate-sd.la: Makefile \ + autoxflate-sd$(DEFAULT_OBJECT_TYPE) \ +- ../../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) ++ $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE) + $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared autoxflate-sd.lo -o $@ -rpath $(plugindir) -module -export-dynamic -avoid-version -L../../lib -lbareos + + example-plugin-sd.la: Makefile example-plugin-sd$(DEFAULT_OBJECT_TYPE) diff --git a/sysutils/bareos17-server/files/patch-src-stored-Makefile.in b/sysutils/bareos17-server/files/patch-src-stored-Makefile.in new file mode 100644 index 000000000000..342274c92317 --- /dev/null +++ b/sysutils/bareos17-server/files/patch-src-stored-Makefile.in @@ -0,0 +1,112 @@ +--- src/stored/Makefile.in 2018-07-12 07:38:58.000000000 -0500 ++++ src/stored/Makefile.in 2019-05-09 09:44:40.049928000 -0500 +@@ -94,6 +94,7 @@ + INCLUDES += -I$(srcdir) -I$(basedir) -I$(basedir)/include + + JANSSON_CPPFLAGS = @JANSSON_INC@ ++JANSSON_LDFLAGS = @JANSSON_LIBS@ + + DEBUG = @DEBUG@ + GETTEXT_LIBS = @LIBINTL@ +@@ -165,17 +166,17 @@ + $(NO_ECHO)$(LIBTOOL_COMPILE) $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(JANSSON_CPPFLAGS) $(INCLUDES) $(DINCLUDE) $(CXXFLAGS) $< + + bareos-sd: Makefile libbareossd$(DEFAULT_ARCHIVE_TYPE) $(SDOBJS) \ +- ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ + @NDMP_DEPS@ + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L. -L../lib -o $@ $(SDOBJS) \ + $(NDMP_LIBS) -lbareossd -lbareoscfg -lbareos -lm $(DLIB) $(LIBS) $(WRAPLIBS) \ +- $(SD_LIBS) $(GETTEXT_LIBS) $(COMPRESS_LIBS) $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) ++ $(SD_LIBS) $(GETTEXT_LIBS) $(COMPRESS_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) $(JANSSON_LDFLAGS) + + static-bareos-sd: Makefile libbareossd$(DEFAULT_ARCHIVE_TYPE) $(SDOBJS) \ +- ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ + @NDMP_DEPS@ + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L. -L../lib -o $@ $(SDOBJS) \ +@@ -188,46 +189,46 @@ + $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I../lib $(INCLUDES) $(DINCLUDE) $(CXXFLAGS) $< + + btape: Makefile libbareossd$(DEFAULT_ARCHIVE_TYPE) $(TAPEOBJS) \ +- ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) ++ $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib -o $@ $(TAPEOBJS) \ + -lbareossd -lbareoscfg -lbareos $(DLIB) -lm $(LIBS) $(GETTEXT_LIBS) \ +- $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) ++ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) + + bls: Makefile libbareossd$(DEFAULT_ARCHIVE_TYPE) $(BLSOBJS) \ +- ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) ++ $(LOCALBASE)/lib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE) + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib -L../findlib -o $@ $(BLSOBJS) $(DLIB) \ + -lbareossd -lbareosfind -lbareoscfg -lbareos -lm $(LIBS) $(GETTEXT_LIBS) \ +- $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) ++ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) + + bextract: Makefile libbareossd$(DEFAULT_ARCHIVE_TYPE) $(BEXTOBJS) \ +- ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) ++ $(LOCALBASE)/lib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE) + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib -L../findlib -o $@ $(BEXTOBJS) $(DLIB) \ + -lbareossd -lbareosfind -lbareoscfg -lbareos -lm $(LIBS) $(SD_LIBS) $(BEXTRACT_LIBS) \ +- $(GETTEXT_LIBS) $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) ++ $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) + + bscan: Makefile libbareossd$(DEFAULT_ARCHIVE_TYPE) $(SCNOBJS) \ +- ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ +- ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \ ++ $(LOCALBASE)/lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) \ + ../cats/libbareossql$(DEFAULT_ARCHIVE_TYPE) \ + ../cats/libbareoscats$(DEFAULT_ARCHIVE_TYPE) + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib -L../cats -L../findlib -o $@ $(SCNOBJS) \ + -lbareossql -lbareoscats $(DB_LIBS) -lbareossd -lbareosfind -lbareoscfg -lbareos -lm $(LIBS) $(SD_LIBS) \ +- $(GETTEXT_LIBS) $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) ++ $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) $(JANSSON_LDFLAGS) + + bcopy: Makefile libbareossd$(DEFAULT_ARCHIVE_TYPE) $(COPYOBJS) \ +- ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE) ++ $(LOCALBASE)/lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) $(LOCALBASE)/lib/libbareos$(DEFAULT_ARCHIVE_TYPE) + @echo "Linking $@ ..." + $(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib -o $@ $(COPYOBJS) \ +- -lbareossd -lbareoscfg -lbareos -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED) ++ -lbareossd -lbareoscfg -lbareos -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) + + Makefile: $(srcdir)/Makefile.in $(topdir)/config.status + cd $(topdir) \ +@@ -256,13 +257,8 @@ + if test -f "$$f"; then \ + RESDIR="$$DESTCONFDIR/$$RESTYPE"; \ + RES=`basename "$$f"`; \ +- if test -f "$$RESDIR/$$RES"; then \ +- destconf="$$RESDIR/$$RES.new"; \ +- echo " $$RESTYPE/$$RES as \"$$destconf\" (keep existing)"; \ +- else \ +- destconf="$$RESDIR/$$RES"; \ +- echo " $$RESTYPE/$$RES as \"$$destconf\""; \ +- fi; \ ++ destconf="$$RESDIR/$$RES.sample"; \ ++ echo " $$RESTYPE/$$RES as \"$$destconf\".sample"; \ + ${INSTALL_CONFIG} "$$f" "$$destconf"; \ + if test "x${sd_group}" != "x"; then \ + chgrp -f ${sd_group} $$destconf || true; \ diff --git a/sysutils/bareos17-server/files/patch-src-tools_Makefile.in b/sysutils/bareos17-server/files/patch-src-tools_Makefile.in new file mode 100644 index 000000000000..9b88111018d5 --- /dev/null +++ b/sysutils/bareos17-server/files/patch-src-tools_Makefile.in @@ -0,0 +1,11 @@ +--- src/tools/Makefile.in 2016-10-16 10:14:36.000000000 -0500 ++++ src/tools/Makefile.in 2016-11-09 22:56:53.069629000 -0500 +@@ -130,7 +130,7 @@ + $(MKDIR) $(DESTDIR)$(sbindir) + @for tool in ${TOOLS_BIN} ; do \ + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) $$tool $(DESTDIR)$(bindir)/$$tool ; \ +- if ! [ -r $(DESTDIR)$(sbindir)/$$tool ]; then $(SYMLINK) $(bindir)/$$tool $(DESTDIR)$(sbindir)/$$tool; fi; \ ++ if ! [ -r $(DESTDIR)$(sbindir)/$$tool ]; then $(SYMLINK) ../bin/$$tool $(DESTDIR)$(sbindir)/$$tool; fi; \ + done + # Allow non-root execution of bsmtp for non-root Directors + chmod 755 $(DESTDIR)$(bindir)/bsmtp diff --git a/sysutils/bareos17-server/files/pkg-deinstall.client.in b/sysutils/bareos17-server/files/pkg-deinstall.client.in new file mode 100644 index 000000000000..3be8c2e4874c --- /dev/null +++ b/sysutils/bareos17-server/files/pkg-deinstall.client.in @@ -0,0 +1,30 @@ +#!/bin/sh + +PATH=/bin:/usr/bin:/usr/sbin + +# Note how to delete UID/GID +USER=%%BAREOS_USER%% +GROUP=%%BAREOS_GROUP%% +UID=%%BAREOS_UID%% +GID=%%BAREOS_UID%% +BACULA_DIR=%%BAREOS_DIR%% + +TMPFILE=/tmp/services-$RANDOM-$$ + +case "$2" in +"DEINSTALL") + # Delete entries in /etc/services + sed -e '/# Bareos port start/,/# Bareos port end/{' \ + -e 'd' \ + -e '}' /etc/services > $TMPFILE + mv -f $TMPFILE /etc/services + + if [ -d ${BAREOS_DIR} ]; then + echo "Check if ${BAREOS_DIR} is empty and delete it to permanently remove the bareos port." + fi + + if pw groupshow "${USER}" 2>/dev/null 1>&2; then + echo "To delete Bareos group permanently, use 'pw groupdel ${GROUP}'" + fi + ;; +esac diff --git a/sysutils/bareos17-server/files/pkg-install.client.in b/sysutils/bareos17-server/files/pkg-install.client.in new file mode 100644 index 000000000000..70ca57028237 --- /dev/null +++ b/sysutils/bareos17-server/files/pkg-install.client.in @@ -0,0 +1,13 @@ +#!/bin/sh + +PATH=/bin:/usr/bin:/usr/sbin + +# Always add lines in /etc/services +grep -q "bareos-dir" /etc/services +if [ "$?" != "0" ]; then + echo "# Bareos port start +bareos-dir 9101/tcp #Bareos director daemon +bareos-fd 9102/tcp #Bareos file daemon +bareos-sd 9103/tcp #Bareos storage daemon +# Bareos port end" >> /etc/services +fi diff --git a/sysutils/bareos17-server/files/pkg-message.client.in b/sysutils/bareos17-server/files/pkg-message.client.in new file mode 100644 index 000000000000..c2d12358cf68 --- /dev/null +++ b/sysutils/bareos17-server/files/pkg-message.client.in @@ -0,0 +1,15 @@ +################################################################################ + +bareos client was installed + +1) Sample files are installed in %%PREFIX%%/etc/bareos/bareos-fd.d/ and + %%PREFIX%%/etc/bareos/bconsole.d/ + +2) Add bareos_fd_enable="YES" to /etc/rc.conf. + +3) If you want to retain old configuration scheme, you must add the following + to /etc/rc.conf + + bareos_fd_config="%%PREFIX%%/etc/bareos/bareos-fd.conf" + +################################################################################ diff --git a/sysutils/bareos17-server/files/pkg-message.server.in b/sysutils/bareos17-server/files/pkg-message.server.in new file mode 100644 index 000000000000..836127358d83 --- /dev/null +++ b/sysutils/bareos17-server/files/pkg-message.server.in @@ -0,0 +1,72 @@ +############################################################################### + +bareos server was installed + +1) Sample files are installed in %%PREFIX%%/etc/bareos/bareos-dir.d/ and + %%PREFIX%%/etc/bareos/bareos-sd.d/ directories + +2) Add bareos_dir_enable="YES" and bareos_sd_enable="YES" to /etc/rc.conf. + +3) If you want to retain old configuration scheme, you must add the following + to /etc/rc.conf + + bareos_dir_config="%%PREFIX%%/etc/bareos/bareos-dir.conf" + bareos_sd_config="%%PREFIX%%/etc/bareos/bareos-sd.conf" + +4) Important information about new version of bareos can be found in the + ReleaseNotes. + + https://github.com/bareos/bareos/blob/master/README.md + +NOTE: + +An auto-changer manipulation script based on FreeBSDs +chio command is included and installed at + + %%PREFIX%%/sbin/chio-bareos + +Please have a look at it if you want to use an +autochanger. You have to configure the usage in + + %%PREFIX%%/etc/bareos/bareos-dir.conf or + %%PREFIX%%/etc/bareos/bareos-dir.d/storage/ + +Take care of correct permissions for changer and +tape device (e.g. /dev/ch0 and /dev/n[r]sa0) i.e. +they must be accessible by user bareos. + +Due to lack of some features in the FreeBSD tape driver +implementation you MUST add some OS dependent options to +the bareos-sd.conf file: + + Hardware End of Medium = no; + Backward Space Record = no; + Backward Space File = no; + +With 2 filemarks at EOT (see man mt): + Fast Forward Space File = no; + BSF at EOM = yes; + TWO EOF = yes; + +With 1 filemarks at EOT (see man mt): + Fast Forward Space File = yes; + BSF at EOM = no; + TWO EOF = no; + +NOTE: YOU CAN SWITCH EOT model ONLY when starting + from scratch with EMPTY tapes. + +It is also important that all the scripts accessed +by RunBeforeJob and RunAfterJob will be executed by +the user bareos. Check your permissions. + +For USB support read the bareos manual. It could be necessary +to configure/compile a new kernel. + +Look at %%PREFIX%%/lib/bareos/scripts/update_bareos_tables for +database update procedure. + +If you are using sqlite you need to run the make_sqlite_tables script as +the bareos user. Do this using 'sudo su -m bareos'. + +################################################################################ |
