Major update to Bacula-9.0.0: note that this requires a database schema

change, so follow the usual upgrade documentation. This is still compatible
with older File Daemons (clients).
This commit is contained in:
sthen 2017-07-07 16:01:58 +00:00
parent 7ee86372e4
commit 9f02df3a87
13 changed files with 96 additions and 101 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.107 2017/04/10 11:46:33 sthen Exp $
# $OpenBSD: Makefile,v 1.108 2017/07/07 16:01:58 sthen Exp $
# XXX building this port while a version is already installed on the
# system will lead to unexpected hidden dependencies!!!
@ -10,7 +10,7 @@ COMMENT-mysql= Bacula libbaccats support for MySQL
COMMENT-pgsql= Bacula libbaccats support for PostgreSQL
COMMENT-sqlite3= Bacula libbaccats support for SQLite3
V= 7.4.7
V= 9.0.0
DISTNAME= bacula-$V
PKGNAME-main= bacula-client-$V
PKGNAME-server= bacula-server-$V
@ -21,12 +21,13 @@ PKGNAME-sqlite3= bacula-sqlite3-$V
CATEGORIES= sysutils
SHARED_LIBS += bac 6.0
SHARED_LIBS += baccfg 6.0
SHARED_LIBS += bacfind 5.1
SHARED_LIBS += bacsql 5.0
SHARED_LIBS += bac 7.0
SHARED_LIBS += baccfg 7.0
SHARED_LIBS += bacfind 6.0
SHARED_LIBS += bacsd 1.0
SHARED_LIBS += bacsql 6.0
BACCATS_LIBV = 3.0
BACCATS_LIBV = 4.0
SHARED_LIBS += baccats ${BACCATS_LIBV}
SHARED_LIBS += baccats-mysql ${BACCATS_LIBV}
SHARED_LIBS += baccats-postgresql ${BACCATS_LIBV}
@ -49,6 +50,7 @@ MODULES= devel/gettext
LOCALSTATEDIR= ${BASELOCALSTATEDIR}/bacula
SYSCONFDIR= ${BASESYSCONFDIR}/bacula
PATCHORIG= .orig.port
CONFIGURE_STYLE= gnu
USE_GMAKE= Yes
NO_TEST= Yes
@ -90,6 +92,7 @@ CONFIGURE_ARGS += --with-mysql \
--with-sqlite3
MAKE_FLAGS= NO_ECHO=
LIBTOOL_FLAGS= --tag=disable-static
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
@ -153,7 +156,7 @@ post-install:
${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.{a,la}
rm ${PREFIX}/lib/libbaccats.la
mv ${PREFIX}/libexec/bacula/query.sql{,.dist}
mv ${PREFIX}/libexec/bacula/mtx-changer.conf{,.dist}
rm ${PREFIX}/sbin/bacula

View File

@ -1,2 +1,2 @@
SHA256 (bacula-7.4.7.tar.gz) = b2B1wsqQpjze7KObC4Kj6gfOmZne3GiVHYi+1/vAvkA=
SIZE (bacula-7.4.7.tar.gz) = 3312991
SHA256 (bacula-9.0.0.tar.gz) = 7wNnhg2ZcYxqlmozEJiyOiDnsS6r06DG69Rz/6lwjwY=
SIZE (bacula-9.0.0.tar.gz) = 3934794

View File

@ -1,7 +1,8 @@
$OpenBSD: patch-configure,v 1.19 2016/07/08 12:59:13 sthen Exp $
--- configure.orig Wed Jul 6 20:03:41 2016
+++ configure Fri Jul 8 13:41:32 2016
@@ -4808,7 +4808,7 @@ $as_echo "no" >&6; }
$OpenBSD: patch-configure,v 1.20 2017/07/07 16:01:58 sthen Exp $
Index: configure
--- configure.orig
+++ configure
@@ -4832,7 +4832,7 @@ $as_echo "no" >&6; }
fi
@ -10,7 +11,7 @@ $OpenBSD: patch-configure,v 1.19 2016/07/08 12:59:13 sthen Exp $
as_fn_error $? "Unable to find C++ compiler" "$LINENO" 5
fi
@@ -16699,7 +16699,7 @@ if test x$use_libtool != xno; then
@@ -16723,7 +16723,7 @@ if test x$use_libtool != xno; then
LIBTOOL_INSTALL_TARGET="libtool-install"
LIBTOOL_UNINSTALL_TARGET="libtool-uninstall"
LIBTOOL_CLEAN_TARGET="libtool-clean"
@ -19,7 +20,7 @@ $OpenBSD: patch-configure,v 1.19 2016/07/08 12:59:13 sthen Exp $
FD_PLUGIN_DIR="src/plugins/fd"
have_plugins=yes
else
@@ -22362,7 +22362,7 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
@@ -22386,7 +22386,7 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
$as_echo "#define HAVE_READLINE 1" >>confdefs.h
@ -28,7 +29,7 @@ $OpenBSD: patch-configure,v 1.19 2016/07/08 12:59:13 sthen Exp $
got_readline="yes"
else
@@ -22401,7 +22401,7 @@ $as_echo "#define HAVE_READLINE 1" >>confdefs.h
@@ -22425,7 +22425,7 @@ $as_echo "#define HAVE_READLINE 1" >>confdefs.h
got_readline="yes"
CONS_INC="-I${TOP_DIR}/depkgs/readline"
@ -37,7 +38,7 @@ $OpenBSD: patch-configure,v 1.19 2016/07/08 12:59:13 sthen Exp $
CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
@@ -30736,6 +30736,7 @@ netbsd)
@@ -30975,6 +30975,7 @@ netbsd)
DISTVER=`uname -a |awk '{print $3}'`
lld="qd"
llu="qu"
@ -45,7 +46,7 @@ $OpenBSD: patch-configure,v 1.19 2016/07/08 12:59:13 sthen Exp $
TAPEDRIVE="/dev/nrst0"
PSCMD="ps -ax -o pid,command"
PTHREAD_LIB="-pthread"
@@ -30754,6 +30755,7 @@ openbsd)
@@ -30993,6 +30994,7 @@ openbsd)
platforms/openbsd/bacula-fd \
platforms/openbsd/bacula-sd \
platforms/openbsd/bacula-dir"

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-src_dird_Makefile_in,v 1.5 2016/06/06 14:10:57 sthen Exp $
--- src/dird/Makefile.in.orig Wed Jun 1 16:32:00 2016
+++ src/dird/Makefile.in Thu Jun 2 23:19:21 2016
@@ -111,9 +111,6 @@ install: all
fi; \
echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
- @if test "x${dir_group}" != "x"; then \
- chgrp -f ${dir_group} ${DESTDIR}${sysconfdir}/$$destconf ; \
- fi
@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; \

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-src_filed_Makefile_in,v 1.5 2017/02/16 17:16:19 sthen Exp $
--- src/filed/Makefile.in.orig Tue Feb 7 14:07:45 2017
+++ src/filed/Makefile.in Thu Feb 16 16:29:55 2017
@@ -109,9 +109,6 @@ install: all
fi; \
echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
- @if test "x${fd_group}" != "x"; then \
- chgrp -f ${fd_group} ${DESTDIR}${sysconfdir}/$$destconf ; \
- fi
@if test -f static-bacula-fd; then \
$(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-fd $(DESTDIR)$(sbindir)/static-bacula-fd; \
fi

View File

@ -1,16 +1,17 @@
$OpenBSD: patch-src_lib_Makefile_in,v 1.5 2015/08/15 07:50:02 ajacoutot Exp $
--- src/lib/Makefile.in.orig Thu Aug 13 15:52:24 2015
+++ src/lib/Makefile.in Fri Aug 14 10:16:42 2015
@@ -104,7 +104,7 @@ libbac.a: $(LIBBAC_OBJS)
$OpenBSD: patch-src_lib_Makefile_in,v 1.6 2017/07/07 16:01:58 sthen Exp $
Index: src/lib/Makefile.in
--- src/lib/Makefile.in.orig
+++ src/lib/Makefile.in
@@ -103,7 +103,7 @@ libbac.a: $(LIBBAC_OBJS)
libbac.la: Makefile $(LIBBAC_LOBJS)
libbac.la: Makefile $(LIBBAC_LOBJS)
@echo "Making $@ ..."
- $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBAC_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBAC_LT_RELEASE) $(WRAPLIBS) $(CAP_LIBS) $(ZLIBS) $(OPENSSL_LIBS) $(LIBS) $(DLLIBS)
- $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBAC_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBAC_LT_RELEASE) $(WRAPLIBS) $(CAP_LIBS) $(ZLIBS) $(OPENSSL_LIBS) $(LIBS) $(DLLIBS)
+ $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBAC_LOBJS) -export-dynamic -rpath $(libdir) $(WRAPLIBS) $(CAP_LIBS) $(ZLIBS) $(OPENSSL_LIBS) $(LIBS) $(DLLIBS)
libbaccfg.a: $(LIBBACCFG_OBJS)
@echo "Making $@ ..."
@@ -113,7 +113,7 @@ libbaccfg.a: $(LIBBACCFG_OBJS)
@@ -112,7 +112,7 @@ libbaccfg.a: $(LIBBACCFG_OBJS)
libbaccfg.la: Makefile $(LIBBACCFG_LOBJS)
@echo "Making $@ ..."

View File

@ -1,13 +1,28 @@
$OpenBSD: patch-src_stored_Makefile_in,v 1.5 2015/08/15 07:50:02 ajacoutot Exp $
--- src/stored/Makefile.in.orig Thu Aug 13 15:52:24 2015
+++ src/stored/Makefile.in Fri Aug 14 10:16:42 2015
@@ -193,9 +193,6 @@ install: all
fi; \
echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
- @if test "x${sd_group}" != "x"; then \
- chgrp -f ${sd_group} ${DESTDIR}${sysconfdir}/$$destconf; \
- fi
@if test -f static-bacula-sd; then \
$(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) static-bacula-sd $(DESTDIR)$(sbindir)/static-bacula-sd; \
fi
$OpenBSD: patch-src_stored_Makefile_in,v 1.6 2017/07/07 16:01:58 sthen Exp $
Index: src/stored/Makefile.in
--- src/stored/Makefile.in.orig
+++ src/stored/Makefile.in
@@ -136,7 +136,7 @@ libbacsd.la: Makefile $(LIBBACSD_LOBJS)
@echo "Making $@ ..."
$(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ \
$(TOKYOCABINET_LIBS) $(LIBBACSD_LOBJS) \
- -export-dynamic -rpath $(libdir) -release $(LIBBACSD_LT_RELEASE)
+ -export-dynamic -rpath $(libdir)
#
# Loadable driver
@@ -144,11 +144,11 @@ libbacsd.la: Makefile $(LIBBACSD_LOBJS)
drivers: bacula-sd-cloud-driver.la bacula-sd-aligned-driver.la
bacula-sd-cloud-driver.la: Makefile $(CLOUD_LOBJS)
- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared $(CLOUD_LOBJS) -o $@ $(S3_LIBS) -rpath $(libdir) -module -export-dynamic -release $(LIBBACSD_LT_RELEASE)
+ $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared $(CLOUD_LOBJS) -o $@ $(S3_LIBS) -rpath $(libdir) -module -export-dynamic
bacula-sd-aligned-driver.la: Makefile $(ALIGNED_LOBJS)
$(LIBTOOL_LINK) $(CXX) $(LDFLAGS) -shared $(ALIGNED_LOBJS) -o $@ -rpath $(plugindir) \
- -module -export-dynamic -release $(LIBBACSD_LT_RELEASE)
+ -module -export-dynamic
bsdjson: Makefile $(JSONOBJS) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)

View File

@ -1,7 +1,8 @@
$OpenBSD: patch-src_stored_bacula-sd_conf_in,v 1.9 2015/08/15 07:50:02 ajacoutot Exp $
--- src/stored/bacula-sd.conf.in.orig Thu Aug 13 15:52:24 2015
+++ src/stored/bacula-sd.conf.in Fri Aug 14 10:16:42 2015
@@ -130,15 +130,15 @@ Device {
$OpenBSD: patch-src_stored_bacula-sd_conf_in,v 1.10 2017/07/07 16:01:58 sthen Exp $
Index: src/stored/bacula-sd.conf.in
--- src/stored/bacula-sd.conf.in.orig
+++ src/stored/bacula-sd.conf.in
@@ -131,15 +131,15 @@ Device {
# Name = Autochanger
# Device = Drive-1
# Device = Drive-2
@ -20,7 +21,7 @@ $OpenBSD: patch-src_stored_bacula-sd_conf_in,v 1.9 2015/08/15 07:50:02 ajacoutot
# AutomaticMount = yes; # when device opened, read it
# AlwaysOpen = yes;
# RemovableMedia = yes;
@@ -160,7 +160,7 @@ Device {
@@ -170,7 +170,7 @@ Device {
# Name = Drive-2 #
# Drive Index = 1
# Media Type = DLT-8000
@ -29,7 +30,7 @@ $OpenBSD: patch-src_stored_bacula-sd_conf_in,v 1.9 2015/08/15 07:50:02 ajacoutot
# AutomaticMount = yes; # when device opened, read it
# AlwaysOpen = yes;
# RemovableMedia = yes;
@@ -184,8 +184,8 @@ Device {
@@ -194,8 +194,8 @@ Device {
# RemovableMedia = yes;
# RandomAccess = no;
# Maximum File Size = 3GB
@ -40,29 +41,29 @@ $OpenBSD: patch-src_stored_bacula-sd_conf_in,v 1.9 2015/08/15 07:50:02 ajacoutot
## AutoChanger = yes
# # Enable the Alert command only if you have the mtx package loaded
## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
@@ -205,8 +205,8 @@ Device {
@@ -215,8 +215,8 @@ Device {
# RemovableMedia = yes;
# RandomAccess = no;
# Maximum File Size = 4GB
-## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d"
-## Changer Device = /dev/sg0
+## 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
## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
@@ -226,8 +226,8 @@ Device {
-# Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d"
-# Changer Device = /dev/sg0
+# Changer Command = "@scriptdir@/chio-changer-openbsd %c %o %S %a %d"
+# Changer Device = /dev/ch0
# AutoChanger = yes
# #
# # New alert command in Bacula 9.0.0
@@ -245,8 +245,8 @@ Device {
# RemovableMedia = yes;
# RandomAccess = no;
# Maximum File Size = 5GB
-## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d"
-## Changer Device = /dev/sg0
+## 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
## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
@@ -265,7 +265,7 @@ Device {
-# Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d"
-# Changer Device = /dev/sg0
+# Changer Command = "@scriptdir@/chio-changer-openbsd %c %o %S %a %d"
+# Changer Device = /dev/ch0
# AutoChanger = yes
# #
# # New alert command in Bacula 9.0.0
@@ -302,7 +302,7 @@ Device {
# Name = DDS-4
# Description = "DDS-4 for FreeBSD"
# Media Type = DDS-4

View File

@ -1,29 +1,31 @@
@comment $OpenBSD: PLIST-main,v 1.23 2015/08/15 07:50:02 ajacoutot Exp $
@comment $OpenBSD: PLIST-main,v 1.24 2017/07/07 16:01:58 sthen Exp $
@conflict bacula-server-<5.2.1
@pkgpath sysutils/bacula,-client
@newgroup _bacula:591
@newuser _bacula:591:_bacula:daemon:Bacula Director:/nonexistent:/sbin/nologin
@comment lib/bpipe-fd.a
lib/bpipe-fd.so
lib/libbac.a
lib/libbac.la
@lib lib/libbac.so.${LIBbac_VERSION}
lib/libbaccfg.a
lib/libbaccfg.la
@lib lib/libbaccfg.so.${LIBbaccfg_VERSION}
lib/libbacfind.a
lib/libbacfind.la
@lib lib/libbacfind.so.${LIBbacfind_VERSION}
libexec/bacula/
libexec/bacula/bacula-ctl-fd
libexec/bacula/bacula_config
libexec/bacula/bconsole
libexec/bacula/tapealert
@man man/man8/bacula-fd.8
@man man/man8/bconsole.8
@man man/man8/bregex.8
@man man/man8/bwild.8
@bin sbin/bacula-fd
@bin sbin/bbconsjson
@bin sbin/bconsole
@bin sbin/bdirjson
@bin sbin/bfdjson
@bin sbin/bsdjson
share/doc/bacula/
share/doc/bacula/ChangeLog
share/doc/bacula/INSTALL

View File

@ -1,10 +1,9 @@
@comment $OpenBSD: PLIST-mysql,v 1.4 2016/07/08 12:59:13 sthen Exp $
@comment $OpenBSD: PLIST-mysql,v 1.5 2017/07/07 16:01:58 sthen Exp $
@conflict bacula-server-<7.0.4p2
@conflict bacula-pgsql-*
@conflict bacula-sqlite3-*
@comment no checksum
@lib lib/libbaccats.so.${LIBbaccats_VERSION}
lib/libbaccats-mysql.a
lib/libbaccats-mysql.la
@lib lib/libbaccats-mysql.so.${LIBbaccats-mysql_VERSION}
libexec/bacula/

View File

@ -1,10 +1,9 @@
@comment $OpenBSD: PLIST-pgsql,v 1.4 2016/07/08 12:59:13 sthen Exp $
@comment $OpenBSD: PLIST-pgsql,v 1.5 2017/07/07 16:01:58 sthen Exp $
@conflict bacula-server-<7.0.4p2
@conflict bacula-mysql-*
@conflict bacula-sqlite3-*
@comment no checksum
@lib lib/libbaccats.so.${LIBbaccats_VERSION}
lib/libbaccats-postgresql.a
lib/libbaccats-postgresql.la
@lib lib/libbaccats-postgresql.so.${LIBbaccats-postgresql_VERSION}
libexec/bacula/

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-server,v 1.21 2016/01/19 22:51:10 sthen Exp $
@comment $OpenBSD: PLIST-server,v 1.22 2017/07/07 16:01:58 sthen Exp $
@conflict bacula-<2.2.7
@conflict bacula-client-<5.2.6p2
@pkgpath sysutils/bacula,-server,mysql
@ -6,12 +6,14 @@
@pkgpath sysutils/bacula,-server,sqlite3
@newuser _bacula-sd:599:_bacula:daemon:Bacula Storage Daemon:/nonexistent:/sbin/nologin
@extraunexec rm -rf /var/bacula
lib/libbacsql.a
lib/libbacsd.la
@lib lib/libbacsd.so.${LIBbacsd_VERSION}
lib/libbacsql.la
@lib lib/libbacsql.so.${LIBbacsql_VERSION}
libexec/bacula/bacula
libexec/bacula/bacula-ctl-dir
libexec/bacula/bacula-ctl-sd
libexec/bacula/baculabackupreport
libexec/bacula/btraceback.dbx
libexec/bacula/btraceback.gdb
libexec/bacula/btraceback.mdb
@ -24,7 +26,6 @@ libexec/bacula/delete_catalog_backup
libexec/bacula/disk-changer
libexec/bacula/drop_bacula_database
libexec/bacula/drop_bacula_tables
libexec/bacula/dvd-handler
libexec/bacula/grant_bacula_privileges
libexec/bacula/make_bacula_tables
libexec/bacula/make_catalog_backup

View File

@ -1,10 +1,9 @@
@comment $OpenBSD: PLIST-sqlite3,v 1.3 2016/07/08 12:59:13 sthen Exp $
@comment $OpenBSD: PLIST-sqlite3,v 1.4 2017/07/07 16:01:58 sthen Exp $
@conflict bacula-server-<7.0.4p2
@conflict bacula-pgsql-*
@conflict bacula-mysql-*
@comment no checksum
@lib lib/libbaccats.so.${LIBbaccats_VERSION}
lib/libbaccats-sqlite3.a
lib/libbaccats-sqlite3.la
@lib lib/libbaccats-sqlite3.so.${LIBbaccats-sqlite3_VERSION}
libexec/bacula/