Update to bacula-5.2.11.

ok sthen@
This commit is contained in:
ajacoutot 2012-09-14 08:14:30 +00:00
parent f4b6bde5b0
commit 03de2da4f4
11 changed files with 69 additions and 196 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.49 2012/08/04 15:17:06 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.50 2012/09/14 08:14:30 ajacoutot Exp $
SHARED_ONLY= Yes
@ -6,8 +6,7 @@ COMMENT-main= network backup solution (client)
COMMENT-server= network backup solution (server)
COMMENT-bat= network backup solution (gui-client)
V= 5.2.10
REVISION-main= 1
V= 5.2.11
DISTNAME= bacula-$V
FULLPKGNAME-main= bacula-client-$V
FULLPKGPATH-main= ${PKGPATH},-main
@ -183,7 +182,7 @@ post-install:
.if ${BUILD_PACKAGES:M-server}
${INSTALL_SCRIPT_DIR} ${PREFIX}/libexec/bacula/updatedb
${INSTALL_SCRIPT} ${WRKSRC}/updatedb/* ${PREFIX}/libexec/bacula/updatedb
${SUBST_CMD} -o ${BINOWN} -g ${BINGRP} -c ${FILESDIR}/chio-changer-openbsd \
${INSTALL_SCRIPT} ${WRKSRC}/examples/autochangers/chio-changer-openbsd \
${PREFIX}/libexec/bacula/chio-changer-openbsd.dist
rm ${PREFIX}/libexec/bacula/updatedb/update*.in
rm ${PREFIX}/lib/libbaccats.*

View File

@ -1,5 +1,2 @@
MD5 (bacula-5.2.10.tar.gz) = GSB9cEnPEaVN7lWFaJBE7A==
RMD160 (bacula-5.2.10.tar.gz) = bjIp0+0c8d3oZpYXsVd/jZTPlsg=
SHA1 (bacula-5.2.10.tar.gz) = Wm3RrQZ3L/+K9abkcyhdIGK6d18=
SHA256 (bacula-5.2.10.tar.gz) = UfMR5sUdbJV1ykWM1jGYxphO6q/0zm8zT/gryZm4s2A=
SIZE (bacula-5.2.10.tar.gz) = 4110586
SHA256 (bacula-5.2.11.tar.gz) = FJNVTvPWRg51eX0j+ClOlqkr+Q6jTBNcvyq4WwuLIAE=
SIZE (bacula-5.2.11.tar.gz) = 4147470

View File

@ -1,122 +0,0 @@
#!/bin/sh
#
# $OpenBSD: chio-changer-openbsd,v 1.1 2012/07/04 12:02:56 ajacoutot Exp $
#
# Bacula interface to chio(1) autoloader for OpenBSD
#
# Adapted from NetBSD pkgsrc and examples/autochangers in bacula source)
# by Antoine Jacoutot <ajacoutot@openbsd.org> for OpenBSD.
# Tested on an LTO-4 device with 8 slots.
# The user Bacula is running as needs rw access to the ch(4) and st(4)
# devices.
#
# If you set in your Device resource:
# Changer Command = "/path/to/chio-changer-openbsd %c %o %S %a %d"
# you will have the following input to this script:
# chio-changer-openbsd "changer-device" "command" "slot" "archive-device" "drive-index"
# $1 $2 $3 $4 $5
#
# So Bacula will always call with all the following arguments, even though
# in come cases, not all are used.
#
# N.B. If you change the script, take care to return either
# the chio exit code or a 0. If the script exits with a non-zero
# exit code, Bacula will assume the request failed.
CHIO=/bin/chio
# time (in seconds) for the unit to settle after (un)loading a tape
SLEEP=1
usage() {
echo "usage: ${0##*/} ctl-device command [slot archive-device drive-index]"
}
# check parameters count
check_parm_count() {
pCount=$1
pCountNeed=$2
if test ${pCount} -lt ${pCountNeed}; then
usage
echo "!!! insufficient number of arguments given"
exit 1
if test ${pCount} -lt 2; then
usage
echo "!!! mimimum usage is the first two arguments"
exit 1
else
usage
echo "!!! command expected ${pCountNeed} arguments"
exit 1
fi
usage
exit 1
fi
}
# check arguments count for specific actions
case $2 in
list|listall)
check_parm_count $# 2
;;
slots)
check_parm_count $# 2
;;
transfer)
check_parm_count $# 4
;;
*)
check_parm_count $# 5
;;
esac
# get arguments
ctl=$1
cmd="$2"
slot=$3
device=$4
drive=$5
case ${cmd} in
unload)
${CHIO} -f ${ctl} move drive ${drive} slot $((${slot} - 1))
rtn=$?
[ ${rtn} -eq 0 ] && sleep ${SLEEP}
exit ${rtn}
;;
load)
${CHIO} -f ${ctl} move slot $((${slot} - 1)) drive ${drive}
rtn=$?
[ ${rtn} -eq 0 ] && sleep ${SLEEP}
exit ${rtn}
;;
list)
${CHIO} -f ${ctl} status -v slot | \
sed -ne 's/^slot *\([0-9]*:\).*FULL.*voltag.*<\(.*\):.*/\1\2/p' | \
awk -F: '{print $1 + 1 ":" $2 }'
exit $?
;;
listall)
echo "The listall command is not implemented on OpenBSD."
exit 1
;;
loaded)
local _slot=`${CHIO} -f ${ctl} status -v | egrep '^slot.*<ACCESS> voltag: <:[0-9]>$' | awk '{ print $2 }' | awk -F: '{ print $1 + 1 }'`
[ -z "${_slot}" ] && _slot=0
echo ${_slot}
exit $?
;;
slots)
${CHIO} -f ${ctl} params | awk "/slots/{print \$2}"
exit $?
;;
transfer)
slotdest=${device}
${CHIO} -f ${ctl} move slot $((${slot} - 1)) slot ${slotdest}
exit $?
;;
esac

View File

@ -1,11 +1,11 @@
$OpenBSD: patch-Makefile_in,v 1.2 2012/03/08 17:34:34 sthen Exp $
$OpenBSD: patch-Makefile_in,v 1.3 2012/09/14 08:14:31 ajacoutot Exp $
stop building when an error occurs, rather than just keep on with the
next subdir..
--- Makefile.in.orig Tue Feb 21 15:59:33 2012
+++ Makefile.in Wed Mar 7 22:15:48 2012
@@ -43,18 +43,18 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
--- Makefile.in.orig Tue Sep 11 11:26:24 2012
+++ Makefile.in Thu Sep 13 08:19:35 2012
@@ -42,18 +42,18 @@ LIBTOOL_DEPS = @LIBTOOL_DEPS@
#-------------------------------------------------------------------------
all: Makefile
@ -27,7 +27,7 @@ next subdir..
do (cd $$I; echo "==>Entering directory `pwd`"; \
$(MAKE) DESTDIR=$(DESTDIR) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
echo ""; echo ""; exit 1;)); \
@@ -101,12 +101,6 @@ installdirs:
@@ -100,12 +100,6 @@ installdirs:
-if test ! -d $(DESTDIR)$(working_dir) ; then \
$(MKDIR) $(DESTDIR)$(working_dir); \
chmod 770 $(DESTDIR)$(working_dir); \

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-configure,v 1.12 2012/07/09 18:40:58 sthen Exp $
$OpenBSD: patch-configure,v 1.13 2012/09/14 08:14:31 ajacoutot Exp $
--- configure.orig Thu Jun 28 15:52:03 2012
+++ configure Thu Jul 5 18:18:02 2012
@@ -4804,7 +4804,7 @@ $as_echo "no" >&6; }
@ -37,32 +37,6 @@ $OpenBSD: patch-configure,v 1.12 2012/07/09 18:40:58 sthen Exp $
CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
@@ -30333,13 +30333,13 @@ $as_echo "#define HAVE_XATTR 1" >>confdefs.h
fi
PTHREAD_LIB=""
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
-$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -pthread" >&5
+$as_echo_n "checking for pthread_create in -pthread... " >&6; }
if ${ac_cv_lib_pthread_pthread_create+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+LIBS="-pthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -30370,7 +30370,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
- PTHREAD_LIB="-lpthread"
+ PTHREAD_LIB="-pthread"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
@@ -30720,6 +30720,7 @@ netbsd)
DISTVER=`uname -a |awk '{print $3}'`
lld="qd"

View File

@ -1,8 +1,8 @@
$OpenBSD: patch-manpages_bat_1,v 1.4 2011/11/17 23:45:56 ajacoutot Exp $
--- manpages/bat.1.orig Tue Apr 27 15:58:29 2010
+++ manpages/bat.1 Thu Jun 24 16:25:08 2010
$OpenBSD: patch-manpages_bat_1,v 1.5 2012/09/14 08:14:31 ajacoutot Exp $
--- manpages/bat.1.orig Tue Sep 11 11:26:24 2012
+++ manpages/bat.1 Thu Sep 13 08:19:35 2012
@@ -22,7 +22,7 @@ but it is graphical oriented and more features.
bat [\-s] [\-c config_file] [\-d debug_level] [-t]
bat [\-s] [\-c config_file] [\-d debug_level] [\-t]
.TP
.B \-c <config>
-Specify configuration file. Default is bat.conf.

View File

@ -0,0 +1,26 @@
$OpenBSD: patch-src_lib_bsys_c,v 1.1 2012/09/14 08:14:31 ajacoutot Exp $
From c8bd70b8d23c60f10afa134e347e778450dd0c33 Mon Sep 17 00:00:00 2001
From: Marco van Wieringen <mvw@planets.elm.net>
Date: Thu, 13 Sep 2012 05:43:32 +0000
Subject: Fix bug #1932 director crash.
--- src/lib/bsys.c.orig Tue Sep 11 11:26:24 2012
+++ src/lib/bsys.c Thu Sep 13 10:47:21 2012
@@ -53,7 +53,7 @@ static pthread_cond_t timer = PTHREAD_COND_INITIALIZER
int safer_unlink(const char *pathname, const char *regx)
{
int rc;
- regex_t preg1, pexc1;
+ regex_t preg1;
char prbuf[500];
const int nmatch = 30;
regmatch_t pmatch[nmatch];
@@ -83,7 +83,6 @@ int safer_unlink(const char *pathname, const char *reg
rtn = EROFS;
}
regfree(&preg1);
- regfree(&pexc1);
return rtn;
}

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_stored_bacula-sd_conf_in,v 1.4 2012/06/28 19:24:56 ajacoutot Exp $
$OpenBSD: patch-src_stored_bacula-sd_conf_in,v 1.5 2012/09/14 08:14:31 ajacoutot Exp $
--- src/stored/bacula-sd.conf.in.orig Tue Feb 21 16:59:33 2012
+++ src/stored/bacula-sd.conf.in Thu Jun 28 19:53:06 2012
@@ -67,15 +67,15 @@ Device {
@ -7,7 +7,7 @@ $OpenBSD: patch-src_stored_bacula-sd_conf_in,v 1.4 2012/06/28 19:24:56 ajacoutot
# Device = Drive-2
-# Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d"
-# Changer Device = /dev/sg0
+# Changer Command = "@scriptdir@/chio-changer %c %o %S %a %d"
+# Changer Command = "@scriptdir@/chio-changer-openbsd %c %o %S %a %d"
+# Changer Device = /dev/ch0
#}
@ -35,7 +35,7 @@ $OpenBSD: patch-src_stored_bacula-sd_conf_in,v 1.4 2012/06/28 19:24:56 ajacoutot
# Maximum File Size = 3GB
-## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d"
-## Changer Device = /dev/sg0
+## Changer Command = "@scriptdir@/chio-changer %c %o %S %a %d"
+## Changer Command = "@scriptdir@/chio-changer-openbsd %c %o %S %a %d"
+## Changer Device = /dev/ch0
## AutoChanger = yes
# # Enable the Alert command only if you have the mtx package loaded
@ -45,7 +45,7 @@ $OpenBSD: patch-src_stored_bacula-sd_conf_in,v 1.4 2012/06/28 19:24:56 ajacoutot
# RandomAccess = no;
# Maximum File Size = 4GB
-## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d"
+## Changer Command = "@scriptdir@/chio-changer %c %o %S %a %d"
+## Changer Command = "@scriptdir@/chio-changer-openbsd %c %o %S %a %d"
## Changer Device = /dev/sg0
## AutoChanger = yes
# # Enable the Alert command only if you have the mtx package loaded
@ -54,7 +54,7 @@ $OpenBSD: patch-src_stored_bacula-sd_conf_in,v 1.4 2012/06/28 19:24:56 ajacoutot
# RandomAccess = no;
# Maximum File Size = 5GB
-## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d"
+## Changer Command = "@scriptdir@/chio-changer %c %o %S %a %d"
+## Changer Command = "@scriptdir@/chio-changer-openbsd %c %o %S %a %d"
## Changer Device = /dev/sg0
## AutoChanger = yes
# # Enable the Alert command only if you have the mtx package loaded

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-src_tools_Makefile_in,v 1.2 2011/12/12 09:15:09 sthen Exp $
$OpenBSD: patch-src_tools_Makefile_in,v 1.3 2012/09/14 08:14:31 ajacoutot Exp $
Reorder LDFLAGS (prefer -L.libs over /usr/local/lib) so that bacula can
be rebuilt while already installed.
--- src/tools/Makefile.in.orig Sat Nov 26 14:08:12 2011
+++ src/tools/Makefile.in Sun Dec 4 12:01:18 2011
--- src/tools/Makefile.in.orig Tue Sep 11 11:26:24 2012
+++ src/tools/Makefile.in Thu Sep 13 08:19:35 2012
@@ -58,22 +58,22 @@ all: Makefile $(TOOLS) gigaslam grow
@echo " "
@ -33,7 +33,7 @@ be rebuilt while already installed.
$(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
dird_conf.o: ../dird/dird_conf.c
@@ -87,34 +87,34 @@ inc_conf.o: ../dird/inc_conf.c
@@ -90,34 +90,34 @@ inc_conf.o: ../dird/inc_conf.c
testfind: Makefile ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) \
../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) $(FINDOBJS)
@ -75,7 +75,7 @@ be rebuilt while already installed.
-lbaccats -lbacsql -lbacfind -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
cats_test.o: cats_test.c
@@ -122,7 +122,7 @@ cats_test.o: cats_test.c
@@ -125,7 +125,7 @@ cats_test.o: cats_test.c
$(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
cats_test: Makefile ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../cats/libbacsql$(DEFAULT_ARCHIVE_TYPE) cats_test.o
@ -84,12 +84,12 @@ be rebuilt while already installed.
-lbaccats -lbacsql -lbacfind -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
gigaslam.o: gigaslam.c
@@ -132,7 +132,7 @@ gigaslam: gigaslam.o
@@ -135,7 +135,7 @@ gigaslam: gigaslam.o
$(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -o $@ gigaslam.o
grow: Makefile grow.o ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -L../lib -o $@ grow.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+ $(LIBTOOL_LINK) $(CXX) -L../lib $(LDFLAGS) -o $@ grow.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
cd $(topdir) \
bpluginfo.o: bpluginfo.c
$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) -I../filed -I../dird -I../stored $(DINCLUDE) $(CFLAGS) $<

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-bat,v 1.10 2012/04/03 10:05:47 sthen Exp $
@comment $OpenBSD: PLIST-bat,v 1.11 2012/09/14 08:14:31 ajacoutot Exp $
@man man/man1/bat.1
@bin sbin/bat
@mode 750
@ -7,19 +7,18 @@
@mode
@group
share/applications/bat.desktop
share/doc/bacula/html/
share/doc/bacula/html/clients.html
share/doc/bacula/html/console.html
share/doc/bacula/html/filesets.html
share/doc/bacula/html/index.html
share/doc/bacula/html/joblist.html
share/doc/bacula/html/jobplot.html
share/doc/bacula/html/jobs.html
share/doc/bacula/html/mail-message-new.png
share/doc/bacula/html/media.html
share/doc/bacula/html/restore.html
share/doc/bacula/html/status.png
share/doc/bacula/html/storage.html
share/doc/bacula/clients.html
share/doc/bacula/console.html
share/doc/bacula/filesets.html
share/doc/bacula/index.html
share/doc/bacula/joblist.html
share/doc/bacula/jobplot.html
share/doc/bacula/jobs.html
share/doc/bacula/mail-message-new.png
share/doc/bacula/media.html
share/doc/bacula/restore.html
share/doc/bacula/status.png
share/doc/bacula/storage.html
share/examples/bacula/
@mode 644
share/examples/bacula/bat.conf

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.14 2012/04/04 21:30:56 merdely Exp $
@comment $OpenBSD: PLIST-main,v 1.15 2012/09/14 08:14:31 ajacoutot Exp $
@conflict bacula-server-<5.2.1
@pkgpath sysutils/bacula,-client
@newgroup _bacula:591
@ -51,8 +51,8 @@ share/examples/bacula/bacula-fd.conf
@mode 640
@group _bacula
@sample ${BACULACONF}/bacula-fd.conf
@group
@mode
@group
share/examples/bacula/bconsole.conf
@mode 640
@group _bacula