sysutils/bacula15-server: Add support for zstd compression

You'll know you have zstd enabled if you find something like this:

$ ldd /usr/local/sbin/bextract | grep zstd
	libzstd.so.1 => /usr/local/lib/libzstd.so.1 (0xbab736bf000)

$ ldd /usr/local/sbin/bacula-fd | grep std
	libzstd.so.1 => /usr/local/lib/libzstd.so.1 (0x3e701988b000)

* add libzstd.so:archivers/zstd to LIB_DEPENDS
* apply upstream patches to configure and autoconf/configure

Those patches are:

* files/patch-configure
  https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/commit/358e838a
  bring in some unset fixes, locally adjusted back to 15.0.2

* files/patch-autoconf_configure.in
  https://gitlab.bacula.org/bacula-community-edition/bacula-community/-/commit/8d9669fb
  fix detection of zstd

Upstream discussion: https://sourceforge.net/p/bacula/mailman/bacula-users/?viewmonth=202506

While here, comply with portlint for S3_LIB_DEPENDS

PR:		287403

Sponsored by:	BSDCan 2025 FreeBSD Dev Summit
This commit is contained in:
Dan Langille
2025-06-12 17:38:36 +00:00
parent c5eb0ed77f
commit 51b906b083
3 changed files with 120 additions and 3 deletions
+4 -3
View File
@@ -1,6 +1,6 @@
PORTNAME= bacula
DISTVERSION= 15.0.2
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES?= sysutils
MASTER_SITES= SF/bacula/bacula/${DISTVERSION}
PKGNAMEPREFIX?= #
@@ -21,7 +21,8 @@ SHEBANG_FILES= scripts/get_malware_abuse.ch scripts/key-manager.py.in \
CONFLICTS?= bacula13-server bacula11-server bacula9-server
LIB_DEPENDS+= liblzo2.so:archivers/lzo2
LIB_DEPENDS+= liblzo2.so:archivers/lzo2 \
libzstd.so:archivers/zstd
USERS= bacula
GROUPS= ${USERS}
@@ -134,7 +135,7 @@ MTX_RUN_DEPENDS= ${LOCALBASE}/sbin/mtx:misc/mtx
.endif
S3_CONFIGURE_ARGS= --enable-s3
S3_LIB_DEPENDS= libs3.so:sysutils/bacula-libs3
S3_LIB_DEPENDS= libs3.so:sysutils/bacula-libs3
.include <bsd.port.pre.mk>
@@ -0,0 +1,23 @@
--- autoconf/configure.in.orig 2024-03-22 09:48:41 UTC
+++ autoconf/configure.in
@@ -982,8 +982,10 @@ if test x"${error}" == "x"; then
if test x"${error}" == "x"; then
support_curl=yes
-fi
+fi
+unset error
+
AC_MSG_RESULT([$support_curl])
if test "$support_curl" = "yes"; then
AC_DEFINE(HAVE_CURL, 1, [Define if CURL library is available])
@@ -1042,6 +1044,8 @@ fi
ZSTD_LIBS=""
ZSTD_INC=""
fi
+
+unset error
AC_MSG_RESULT([$support_zstd])
if test "$support_zstd" = "yes"; then
@@ -0,0 +1,93 @@
--- configure.orig 2024-03-22 09:48:41 UTC
+++ configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for bacula 15.0.0.
+# Generated by GNU Autoconf 2.69 for bacula 15.0.2.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ PACKAGE_TARNAME='bacula'
# Identity of this package.
PACKAGE_NAME='bacula'
PACKAGE_TARNAME='bacula'
-PACKAGE_VERSION='15.0.0'
-PACKAGE_STRING='bacula 15.0.0'
+PACKAGE_VERSION='15.0.2'
+PACKAGE_STRING='bacula 15.0.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1653,7 +1653,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures bacula 15.0.0 to adapt to many kinds of systems.
+\`configure' configures bacula 15.0.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1723,7 +1723,7 @@ if test -n "$ac_init_help"; then
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bacula 15.0.0:";;
+ short | recursive ) echo "Configuration of bacula 15.0.2:";;
esac
cat <<\_ACEOF
@@ -1946,7 +1946,7 @@ if $ac_init_version; then
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bacula configure 15.0.0
+bacula configure 15.0.2
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2881,7 +2881,7 @@ running configure, to aid debugging if configure makes
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by bacula $as_me 15.0.0, which was
+It was created by bacula $as_me 15.0.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -23365,6 +23365,8 @@ fi
support_curl=yes
fi
+unset error
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $support_curl" >&5
$as_echo "$support_curl" >&6; }
if test "$support_curl" = "yes"; then
@@ -23435,6 +23437,8 @@ fi
ZSTD_INC=""
fi
+unset error
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $support_zstd" >&5
$as_echo "$support_zstd" >&6; }
if test "$support_zstd" = "yes"; then
@@ -33188,7 +33192,7 @@ ac_log="
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by bacula $as_me 15.0.0, which was
+This file was extended by bacula $as_me 15.0.2, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -33254,7 +33258,7 @@ ac_cs_version="\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-bacula config.status 15.0.0
+bacula config.status 15.0.2
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"