aboutsummaryrefslogtreecommitdiff
path: root/sysutils/bareos17-server
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2019-12-29 20:16:22 +0000
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2019-12-29 20:16:22 +0000
commitd71653bc5eff16148c054def11abbbb1760e5b3b (patch)
treee371e7b61fda38ab94e08eb3066c4e37d011c7c0 /sysutils/bareos17-server
parent706241865b1427893124cd10563d14bc74b82731 (diff)
downloadports-d71653bc5eff16148c054def11abbbb1760e5b3b.tar.gz
ports-d71653bc5eff16148c054def11abbbb1760e5b3b.zip
- Update to 17.2.8
- Fix build with python3 - Fix linking with jansson library
Notes
Notes: svn path=/head/; revision=521423
Diffstat (limited to 'sysutils/bareos17-server')
-rw-r--r--sysutils/bareos17-server/Makefile8
-rw-r--r--sysutils/bareos17-server/distinfo6
-rw-r--r--sysutils/bareos17-server/files/patch-src-plugins-dird_python-dir.c61
-rw-r--r--sysutils/bareos17-server/files/patch-src-plugins-filed_python-fd.c111
-rw-r--r--sysutils/bareos17-server/files/patch-src-plugins-stored_python-sd.c61
-rw-r--r--sysutils/bareos17-server/files/patch-src-stored-Makefile.in8
6 files changed, 245 insertions, 10 deletions
diff --git a/sysutils/bareos17-server/Makefile b/sysutils/bareos17-server/Makefile
index 0c954aa95b47..b9490b500dc0 100644
--- a/sysutils/bareos17-server/Makefile
+++ b/sysutils/bareos17-server/Makefile
@@ -2,8 +2,8 @@
PORTNAME= bareos17
DISTVERSIONPREFIX= Release/
-DISTVERSION= 17.2.7
-PORTREVISION?= 4
+DISTVERSION= 17.2.8
+PORTREVISION?= 0
CATEGORIES?= sysutils
PKGNAMEPREFIX?= #
PKGNAMESUFFIX?= -server
@@ -110,7 +110,8 @@ CONFIGURE_ARGS+=--with-tcp-wrappers=/usr/lib \
.if defined(WITH_CLIENT_ONLY)
LMDB_CONFIGURE_ON= --enable-lmdb=yes
LMDB_CONFIGURE_OFF= --enable-lmdb=no
-LMDB_CFLAGS= -DMDB_DSYNC=O_SYNC
+LMDB_CFLAGS= -DMDB_DSYNC=O_SYNC \
+ -DMDB_USE_POSIX_MUTEX=1
CONFIGURE_ARGS+=--with-fd-user=root \
--with-fd-group=wheel
@@ -194,6 +195,7 @@ post-patch:
# Default bconsole.conf is in ${ETCDIR}
@${REINPLACE_CMD} -e 's|^MAN8 =|MAN8 ?=|g' -e 's|^MAN1 =|MAN1 ?=|g' ${WRKSRC}/manpages/Makefile.in
@${REINPLACE_CMD} -e 's|_NONSHARED||g' ${WRKSRC}/src/filed/Makefile.in
+ @${REINPLACE_CMD} -e 's|/usr/bin/python-config|${PYTHON_CMD}-config|g' ${WRKSRC}/configure
.if defined(WITH_CLIENT_ONLY)
@${REINPLACE_CMD} -e 's|^\(fd_subdirs = .*\)scripts\(.*\)|\1\2|g' ${WRKSRC}/Makefile.in
@${REINPLACE_CMD} -e 's|\(.*$${MKDIR} $${DESTDIR}$${scriptdir}\)|#\1|g' ${WRKSRC}/Makefile.in
diff --git a/sysutils/bareos17-server/distinfo b/sysutils/bareos17-server/distinfo
index 8186063097ce..126ab0f78eae 100644
--- a/sysutils/bareos17-server/distinfo
+++ b/sysutils/bareos17-server/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1535610174
-SHA256 (bareos-bareos-Release-17.2.7_GH0.tar.gz) = 99a5f907e3422532c783ee254dcf5c737d2b1b53522c00924d3e1009289d2fd2
-SIZE (bareos-bareos-Release-17.2.7_GH0.tar.gz) = 4184028
+TIMESTAMP = 1576174004
+SHA256 (bareos-bareos-Release-17.2.8_GH0.tar.gz) = 199457c82b8e61f3ec708f8a399d2db24e720fb62864ebab9ec7a077b4e7084b
+SIZE (bareos-bareos-Release-17.2.8_GH0.tar.gz) = 4190546
diff --git a/sysutils/bareos17-server/files/patch-src-plugins-dird_python-dir.c b/sysutils/bareos17-server/files/patch-src-plugins-dird_python-dir.c
new file mode 100644
index 000000000000..6c0c64d50c2d
--- /dev/null
+++ b/sysutils/bareos17-server/files/patch-src-plugins-dird_python-dir.c
@@ -0,0 +1,61 @@
+--- src/plugins/dird/python-dir.c 2019-12-29 01:43:39.125609000 -0500
++++ src/plugins/dird/python-dir.c 2019-12-29 01:48:30.581353000 -0500
+@@ -34,6 +34,13 @@
+ #error "Need at least Python version 2.6 or newer"
+ #endif
+
++#if (PY_VERSION_HEX > 0x03050000)
++#define PyInt_AsLong PyLong_AsLong
++#define PyInt_FromLong PyLong_FromLong
++#define PyString_AsString PyUnicode_AsUTF8
++#define PyString_FromString PyUnicode_FromString
++#endif
++
+ static const int dbglvl = 150;
+
+ #define PLUGIN_LICENSE "Bareos AGPLv3"
+@@ -114,6 +121,20 @@
+ */
+ static PyThreadState *mainThreadState;
+
++#if (PY_VERSION_HEX > 0x03050000)
++static struct PyModuleDef BareosDIRModuleDef = {
++ PyModuleDef_HEAD_INIT,
++ "bareosdir",
++ NULL,
++ -1,
++ BareosDIRMethods,
++ NULL,
++ NULL,
++ NULL,
++ NULL
++};
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -675,7 +696,11 @@
+ /*
+ * Make our callback methods available for Python.
+ */
++#if (PY_VERSION_HEX > 0x03050000)
++ p_ctx->pInstance = PyModule_Create(&BareosDIRModuleDef);
++#else
+ p_ctx->pInstance = Py_InitModule("bareosdir", BareosDIRMethods);
++#endif
+ }
+
+ /*
+@@ -955,7 +980,11 @@
+ char *value;
+
+ ctx = PyGetbpContext(pyCtx);
++#if (PY_VERSION_HEX > 0x03050000)
++ value = bstrdup(PyString_AsString(pyValue));
++#else
+ value = PyString_AsString(pyValue);
++#endif
+ if (value) {
+ retval = bfuncs->setBareosValue(ctx, (bwDirVariable)var, value);
+ }
diff --git a/sysutils/bareos17-server/files/patch-src-plugins-filed_python-fd.c b/sysutils/bareos17-server/files/patch-src-plugins-filed_python-fd.c
new file mode 100644
index 000000000000..0e5578ed4607
--- /dev/null
+++ b/sysutils/bareos17-server/files/patch-src-plugins-filed_python-fd.c
@@ -0,0 +1,111 @@
+--- src/plugins/filed/python-fd.c 2019-12-29 01:20:40.033054000 -0500
++++ src/plugins/filed/python-fd.c 2019-12-29 01:27:28.921617000 -0500
+@@ -37,6 +37,14 @@
+ #error "Need at least Python version 2.6 or newer"
+ #endif
+
++#if (PY_VERSION_HEX > 0x03050000)
++#define PyInt_AsLong PyLong_AsLong
++#define PyInt_FromLong PyLong_FromLong
++#define PyString_AsString PyUnicode_AsUTF8
++#define PyString_FromString PyUnicode_FromString
++#define PyString_Check PyBytes_Check
++#endif
++
+ static const int dbglvl = 150;
+
+ #define PLUGIN_LICENSE "Bareos AGPLv3"
+@@ -162,6 +170,20 @@
+ */
+ static PyThreadState *mainThreadState;
+
++#if (PY_VERSION_HEX > 0x03050000)
++static struct PyModuleDef BareosFDModuleDef = {
++ PyModuleDef_HEAD_INIT,
++ "bareosfd",
++ NULL,
++ -1,
++ BareosFDMethods,
++ NULL,
++ NULL,
++ NULL,
++ NULL
++};
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -1225,7 +1247,11 @@
+ /*
+ * Make our callback methods available for Python.
+ */
++#if (PY_VERSION_HEX > 0x03050000)
++ p_ctx->pInstance = PyModule_Create(&BareosFDModuleDef);
++#else
+ p_ctx->pInstance = Py_InitModule("bareosfd", BareosFDMethods);
++#endif
+
+ /*
+ * Fill in the slots of PyRestoreObject
+@@ -2702,8 +2728,11 @@
+ }
+ case bVarFileSeen: {
+ char *value;
+-
++#if (PY_VERSION_HEX > 0x03050000)
++ value = bstrdup(PyString_AsString(pyValue));
++#else
+ value = PyString_AsString(pyValue);
++#endif
+ if (value) {
+ retval = bfuncs->setBareosValue(ctx, (bVariable)var, value);
+ }
+@@ -3090,7 +3119,11 @@
+ sp.type = pSavePkt->type;
+ if (pSavePkt->fname) {
+ if (PyString_Check(pSavePkt->fname)) {
++#if (PY_VERSION_HEX > 0x03050000)
++ sp.fname = bstrdup(PyString_AsString(pSavePkt->fname));
++#else
+ sp.fname = PyString_AsString(pSavePkt->fname);
++#endif
+ } else {
+ goto bail_out;
+ }
+@@ -3099,7 +3132,11 @@
+ }
+ if (pSavePkt->link) {
+ if (PyString_Check(pSavePkt->link)) {
++#if (PY_VERSION_HEX > 0x03050000)
++ sp.link = bstrdup(PyString_AsString(pSavePkt->link));
++#else
+ sp.link = PyString_AsString(pSavePkt->link);
++#endif
+ } else {
+ goto bail_out;
+ }
+@@ -3142,7 +3179,11 @@
+ */
+ if (pSavePkt->fname) {
+ if (PyString_Check(pSavePkt->fname)) {
++#if (PY_VERSION_HEX > 0x03050000)
++ sp.fname = bstrdup(PyString_AsString(pSavePkt->fname));
++#else
+ sp.fname = PyString_AsString(pSavePkt->fname);
++#endif
+ } else {
+ goto bail_out;
+ }
+@@ -3219,7 +3260,11 @@
+ return (char *)"";
+ }
+
++#if (PY_VERSION_HEX > 0x03050000)
++ return bstrdup(PyString_AsString(object));
++#else
+ return PyString_AsString(object);
++#endif
+ }
+
+ static inline char *PyGetByteArrayValue(PyObject *object)
diff --git a/sysutils/bareos17-server/files/patch-src-plugins-stored_python-sd.c b/sysutils/bareos17-server/files/patch-src-plugins-stored_python-sd.c
new file mode 100644
index 000000000000..5fcedbb67002
--- /dev/null
+++ b/sysutils/bareos17-server/files/patch-src-plugins-stored_python-sd.c
@@ -0,0 +1,61 @@
+--- src/plugins/stored/python-sd.c 2019-12-29 01:43:28.821366000 -0500
++++ src/plugins/stored/python-sd.c 2019-12-29 01:45:39.796709000 -0500
+@@ -34,6 +34,13 @@
+ #error "Need at least Python version 2.6 or newer"
+ #endif
+
++#if (PY_VERSION_HEX > 0x03050000)
++#define PyInt_AsLong PyLong_AsLong
++#define PyInt_FromLong PyLong_FromLong
++#define PyString_AsString PyUnicode_AsUTF8
++#define PyString_FromString PyUnicode_FromString
++#endif
++
+ static const int dbglvl = 150;
+
+ #define PLUGIN_LICENSE "Bareos AGPLv3"
+@@ -114,6 +121,20 @@
+ */
+ static PyThreadState *mainThreadState;
+
++#if (PY_VERSION_HEX > 0x03050000)
++static struct PyModuleDef BareosSDModuleDef = {
++ PyModuleDef_HEAD_INIT,
++ "bareossd",
++ NULL,
++ -1,
++ BareosSDMethods,
++ NULL,
++ NULL,
++ NULL,
++ NULL
++};
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -695,7 +716,11 @@
+ /*
+ * Make our callback methods available for Python.
+ */
++#if (PY_VERSION_HEX > 0x03050000)
++ p_ctx->pInstance = PyModule_Create(&BareosSDModuleDef);
++#else
+ p_ctx->pInstance = Py_InitModule("bareossd", BareosSDMethods);
++#endif
+ }
+
+ /*
+@@ -976,7 +1001,11 @@
+ char *value;
+
+ ctx = PyGetbpContext(pyCtx);
++#if (PY_VERSION_HEX > 0x03050000)
++ value = bstrdup(PyString_AsString(pyValue));
++#else
+ value = PyString_AsString(pyValue);
++#endif
+ if (value) {
+ bfuncs->setBareosValue(ctx, (bsdwVariable)var, value);
+ }
diff --git a/sysutils/bareos17-server/files/patch-src-stored-Makefile.in b/sysutils/bareos17-server/files/patch-src-stored-Makefile.in
index 342274c92317..a5fed4df9a1f 100644
--- a/sysutils/bareos17-server/files/patch-src-stored-Makefile.in
+++ b/sysutils/bareos17-server/files/patch-src-stored-Makefile.in
@@ -43,7 +43,7 @@
$(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib -o $@ $(TAPEOBJS) \
-lbareossd -lbareoscfg -lbareos $(DLIB) -lm $(LIBS) $(GETTEXT_LIBS) \
- $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED)
-+ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED)
++ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) $(JANSSON_LDFLAGS)
bls: Makefile libbareossd$(DEFAULT_ARCHIVE_TYPE) $(BLSOBJS) \
- ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \
@@ -56,7 +56,7 @@
$(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib -L../findlib -o $@ $(BLSOBJS) $(DLIB) \
-lbareossd -lbareosfind -lbareoscfg -lbareos -lm $(LIBS) $(GETTEXT_LIBS) \
- $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED)
-+ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED)
++ $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) $(JANSSON_LDFLAGS)
bextract: Makefile libbareossd$(DEFAULT_ARCHIVE_TYPE) $(BEXTOBJS) \
- ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \
@@ -69,7 +69,7 @@
$(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib -L../findlib -o $@ $(BEXTOBJS) $(DLIB) \
-lbareossd -lbareosfind -lbareoscfg -lbareos -lm $(LIBS) $(SD_LIBS) $(BEXTRACT_LIBS) \
- $(GETTEXT_LIBS) $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED)
-+ $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED)
++ $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) $(JANSSON_LDFLAGS)
bscan: Makefile libbareossd$(DEFAULT_ARCHIVE_TYPE) $(SCNOBJS) \
- ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) \
@@ -90,7 +90,7 @@
@echo "Linking $@ ..."
$(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L. -L../lib -o $@ $(COPYOBJS) \
- -lbareossd -lbareoscfg -lbareos -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS_NONSHARED) $(GNUTLS_LIBS_NONSHARED)
-+ -lbareossd -lbareoscfg -lbareos -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED)
++ -lbareossd -lbareoscfg -lbareos -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(GNUTLS_LIBS_NONSHARED) $(JANSSON_LDFLAGS)
Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
cd $(topdir) \