git: 9fdb260c7c19 - main - sysutils/bareos-server: fix build on 32 bit platforms
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 26 Jun 2026 12:09:39 UTC
The branch main has been updated by fuz:
URL: https://cgit.FreeBSD.org/ports/commit/?id=9fdb260c7c19d69f1ed7c25922e1f513323e9d00
commit 9fdb260c7c19d69f1ed7c25922e1f513323e9d00
Author: Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-06-24 11:07:26 +0000
Commit: Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-06-26 12:07:55 +0000
sysutils/bareos-server: fix build on 32 bit platforms
All errors were just printf format errors in log messages.
Please consider removing -Werror so no more time has to be wasted on
patching these.
Approved by: portmgr (build fix blanket)
MFH: 2026Q2
---
sysutils/bareos-server/Makefile | 2 --
.../files/patch-core_src_dird_date__time.cc | 12 +++++++
.../files/patch-core_src_dird_stats.cc | 11 +++++++
...lugins_stored_scsitapealert_scsitapealert-sd.cc | 38 ++++++++++++++++++++++
...h-core_src_stored_backends_dplcompat__device.cc | 11 +++++++
5 files changed, 72 insertions(+), 2 deletions(-)
diff --git a/sysutils/bareos-server/Makefile b/sysutils/bareos-server/Makefile
index 746ad3064aa7..cd050982e2ba 100644
--- a/sysutils/bareos-server/Makefile
+++ b/sysutils/bareos-server/Makefile
@@ -54,8 +54,6 @@ NDMP_DESC= Enable build of NDMP support
SCSICRYPTO_DESC= Build LTO AME crypto plugin
.if ${PKGNAMESUFFIX} == "-server"
-IGNORE_i386= time_t too narrow on i386 FreeBSD, "core/src/dird/date_time.cc:79:76: error: format specifies type 'unsigned long' but the argument has type 'time_t'"
-
OPTIONS_DEFINE= MTX PYTHON LMDB NDMP NLS SCSICRYPTO
OPTIONS_DEFAULT+= LMDB PGSQL SCSICRYPTO
OPTIONS_SINGLE_DATABASE= PGSQL
diff --git a/sysutils/bareos-server/files/patch-core_src_dird_date__time.cc b/sysutils/bareos-server/files/patch-core_src_dird_date__time.cc
new file mode 100644
index 000000000000..0c9a88fe7022
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-core_src_dird_date__time.cc
@@ -0,0 +1,12 @@
+--- core/src/dird/date_time.cc.orig 2026-06-24 10:04:53 UTC
++++ core/src/dird/date_time.cc
+@@ -76,7 +76,8 @@ void DateTime::PrintDebugMessage(int debug_level) cons
+
+ void DateTime::PrintDebugMessage(int debug_level) const
+ {
+- Dmsg8(debug_level, "now = %lx: h=%d m=%d md=%d wd=%d woy=%d yday=%d\n ", time,
++ Dmsg8(debug_level, "now = %llx: h=%d m=%d md=%d wd=%d woy=%d yday=%d\n ",
++ (long long)time,
+ hour, month, day_of_month, day_of_week, week_of_year, day_of_year);
+ }
+
diff --git a/sysutils/bareos-server/files/patch-core_src_dird_stats.cc b/sysutils/bareos-server/files/patch-core_src_dird_stats.cc
new file mode 100644
index 000000000000..274eec6196d8
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-core_src_dird_stats.cc
@@ -0,0 +1,11 @@
+--- core/src/dird/stats.cc.orig 2026-06-24 10:10:44 UTC
++++ core/src/dird/stats.cc
+@@ -141,7 +141,7 @@ extern "C" void* statistics_thread(void*)
+ while (!quit) {
+ now = (utime_t)time(NULL);
+
+- Dmsg1(200, "statistics_thread: Doing work at %" PRItime "\n", now);
++ Dmsg1(200, "statistics_thread: Doing work at %lld\n", (long long)now);
+
+ if (JobCount() == 0) {
+ if (!need_flush) {
diff --git a/sysutils/bareos-server/files/patch-core_src_plugins_stored_scsitapealert_scsitapealert-sd.cc b/sysutils/bareos-server/files/patch-core_src_plugins_stored_scsitapealert_scsitapealert-sd.cc
new file mode 100644
index 000000000000..95a9004bdeef
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-core_src_plugins_stored_scsitapealert_scsitapealert-sd.cc
@@ -0,0 +1,38 @@
+--- core/src/plugins/stored/scsitapealert/scsitapealert-sd.cc.orig 2026-06-24 10:21:35 UTC
++++ core/src/plugins/stored/scsitapealert/scsitapealert-sd.cc
+@@ -54,10 +54,10 @@ void dispatch_messages(JobControlRecord* jcr,
+ "Possible cause: %s\n";
+
+ constexpr const char* print_msg
+- = "TapeAlert on device \"%s\" with volume \"%s\" from jobid %lu: "
++ = "TapeAlert on device \"%s\" with volume \"%s\" from jobid %llu: "
+ "[%d] %s\n";
+ constexpr const char* print_msg_novol
+- = "TapeAlert on device \"%s\" from jobid %lu: [%d] %s\n";
++ = "TapeAlert on device \"%s\" from jobid %llu: [%d] %s\n";
+
+ const uint64_t jobid{jcr ? jcr->JobId : 0};
+
+@@ -66,11 +66,11 @@ void dispatch_messages(JobControlRecord* jcr,
+ if (volume && volume[0] != '\0') {
+ Jmsg(jcr, flag.type, 0, job_msg, device, volume, flag.no, flag.name,
+ flag.message, flag.cause);
+- Pmsg0(-1, print_msg, device, volume, jobid, flag.no, flag.name);
++ Pmsg0(-1, print_msg, device, volume, (unsigned long long)jobid, flag.no, flag.name);
+ } else {
+ Jmsg(jcr, flag.type, 0, job_msg_novol, device, flag.no, flag.name,
+ flag.message, flag.cause);
+- Pmsg0(-1, print_msg_novol, device, jobid, flag.no, flag.name);
++ Pmsg0(-1, print_msg_novol, device, (unsigned long long)jobid, flag.no, flag.name);
+ }
+ }
+ }
+@@ -251,7 +251,7 @@ static bRC handle_tapealert_readout(void* value)
+ Dmsg1(debuglevel,
+ "scsitapealert-sd: checking for tapealerts on device %s DONE\n",
+ dev->archive_device_string);
+- Dmsg1(debuglevel, "scsitapealert-sd: flags: %ld \n", flags);
++ Dmsg1(debuglevel, "scsitapealert-sd: flags: %llu \n", (unsigned long long)flags);
+
+ if (flags) {
+ Dmsg1(
diff --git a/sysutils/bareos-server/files/patch-core_src_stored_backends_dplcompat__device.cc b/sysutils/bareos-server/files/patch-core_src_stored_backends_dplcompat__device.cc
new file mode 100644
index 000000000000..63c706ace923
--- /dev/null
+++ b/sysutils/bareos-server/files/patch-core_src_stored_backends_dplcompat__device.cc
@@ -0,0 +1,11 @@
+--- core/src/stored/backends/dplcompat_device.cc.orig 2026-06-24 10:18:02 UTC
++++ core/src/stored/backends/dplcompat_device.cc
+@@ -342,7 +342,7 @@ bool DropletCompatibleDevice::ReadRemoteChunk(chunk_io
+ return false;
+ } else if (obj_stat->size > request->wbuflen) {
+ Mmsg3(errmsg,
+- T_("Failed to read %s (%ld) to big to fit in chunksize of %" PRIu32
++ T_("Failed to read %s (%zu) to big to fit in chunksize of %" PRIu32
+ " bytes\n"),
+ obj_name.data(), obj_stat->size, request->wbuflen);
+ Dmsg1(debug_info, "%s", errmsg);