aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysutils/bacula-server/Makefile8
-rw-r--r--sysutils/bacula-server/files/eotmodel-src-stored-dev.c.patch10
2 files changed, 18 insertions, 0 deletions
diff --git a/sysutils/bacula-server/Makefile b/sysutils/bacula-server/Makefile
index ecedbc311165..4c6066de2ebc 100644
--- a/sysutils/bacula-server/Makefile
+++ b/sysutils/bacula-server/Makefile
@@ -79,6 +79,7 @@ OPTIONS= SQLITE3 "Use SqLite-3 database instead of SqLite-2" off
OPTIONS+= MYSQL "Use MySQL database instead of SqLite" off
OPTIONS+= POSTGRESQL "Use PostgreSQL database instead of SqLite" off
OPTIONS+= MTX "Install mtx for control of autochanger devices" off
+OPTIONS+= AUTOSETEOT "Enable auto seteotmodel" off
.endif
OPTIONS+= NLS "Native Language Support via gettext utilities" on
@@ -196,6 +197,9 @@ pre-everything::
@${ECHO_MSG} "The default DB is SQLite-2!"
.endif
@${ECHO_MSG} " WITH_OPENSSL=yes Enable OpenSSL for encrypted communication."
+.if !defined(WITH_AUTOSETEOT)
+ @${ECHO_MSG} " WITH_AUTOSETEOT=yes Enable auto seteotmodel (especially useful with TWO EOF = no.)"
+.endif
@${ECHO_MSG} ""
@${ECHO_MSG} "===> Using ${DBTYPE} as the bacula database."
@${ECHO_MSG} ""
@@ -215,6 +219,10 @@ post-patch:
# In server port don't install filed
@${REINPLACE_CMD} -e '/^fd_subdirs = /s|src/filed||' -e 's|src/console||' ${WRKSRC}/Makefile.in
.endif
+.if defined(WITH_AUTOSETEOT)
+ @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/eotmodel-src-stored-dev.c.patch
+.endif
+
pre-install:
if [ ! -d "${BACULA_DIR}" ]; then \
diff --git a/sysutils/bacula-server/files/eotmodel-src-stored-dev.c.patch b/sysutils/bacula-server/files/eotmodel-src-stored-dev.c.patch
new file mode 100644
index 000000000000..9479683c4776
--- /dev/null
+++ b/sysutils/bacula-server/files/eotmodel-src-stored-dev.c.patch
@@ -0,0 +1,10 @@
+Index: src/stored/dev.c
+@@ -2368,7 +2368,7 @@
+ }
+ }
+ /* Turn this on later when fully tested */
+-#if defined(xxxMTIOCSETEOTMODEL)
++#if defined(MTIOCSETEOTMODEL)
+ uint32_t neof;
+ if (dev->has_cap(CAP_TWOEOF)) {
+ neof = 2;