diff options
author | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2019-12-29 20:35:44 +0000 |
---|---|---|
committer | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2019-12-29 20:35:44 +0000 |
commit | 8e075f556b909ad0209c6cdf54e430c943f46665 (patch) | |
tree | f28eee6a82a0cbf3f0a50024432ae777e6214e69 /sysutils/bareos-server | |
parent | d71653bc5eff16148c054def11abbbb1760e5b3b (diff) | |
download | ports-8e075f556b909ad0209c6cdf54e430c943f46665.tar.gz ports-8e075f556b909ad0209c6cdf54e430c943f46665.zip |
Notes
Diffstat (limited to 'sysutils/bareos-server')
11 files changed, 301 insertions, 48 deletions
diff --git a/sysutils/bareos-server/Makefile b/sysutils/bareos-server/Makefile index 4a4172ee35c7..45395e0d5ab9 100644 --- a/sysutils/bareos-server/Makefile +++ b/sysutils/bareos-server/Makefile @@ -2,8 +2,8 @@ PORTNAME= bareos DISTVERSIONPREFIX= Release/ -DISTVERSION= 18.2.6 -PORTREVISION?= 1 +DISTVERSION= 18.2.7 +PORTREVISION?= 0 CATEGORIES?= sysutils PKGNAMEPREFIX?= # PKGNAMESUFFIX?= -server @@ -33,7 +33,7 @@ SHEBANG_LANG= perl SHEBANG_FILES= ${WRKSRC}/core/src/cats/make_catalog_backup.pl.in CPPFLAGS+= -I${LOCALBASE}/readline -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -ljansson +LDFLAGS+= -L${LOCALBASE}/lib OPTIONS_DEFAULT= OPENSSL OPTIONS_SINGLE= CRYPTO @@ -66,7 +66,7 @@ SCSICRYPTO_CMAKE_ON= -Dscsi-crypto=ON SCSICRYPTO_CMAKE_OFF= -Dscsi-crypto=OFF .if ${PKGNAMESUFFIX} == "-client" || ${PKGNAMESUFFIX} == "-server" #Till end of the file -PYTHON_USES= python:2.7 +PYTHON_USES= python PYTHON_CMAKE_ON= -Dpython=ON PYTHON_CMAKE_OFF= -Dpython=OFF PYTHON_PLUGIN= yes @@ -192,7 +192,7 @@ MP1+= bsmtp.1 bregex.1 bwild.1 bareos-tray-monitor.1 MAKE_ENV+= MAN8="${MP8}" MAN1="${MP1}" post-patch: - @${REINPLACE_CMD} '21d' ${WRKSRC}/CMakeLists.txt + @${REINPLACE_CMD} '42d' ${WRKSRC}/CMakeLists.txt .if ${PKGNAMESUFFIX} == "-server" @${REINPLACE_CMD} '25d' ${WRKSRC}/core/src/plugins/CMakeLists.txt .endif diff --git a/sysutils/bareos-server/distinfo b/sysutils/bareos-server/distinfo index a276c7153dc6..4219f4cb1ce2 100644 --- a/sysutils/bareos-server/distinfo +++ b/sysutils/bareos-server/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1556169589 -SHA256 (bareos-bareos-Release-18.2.6_GH0.tar.gz) = 43ff0546d4d5486bc70db90ccb7fb1f6a3ac3f9b7293de010d2c300b548056d8 -SIZE (bareos-bareos-Release-18.2.6_GH0.tar.gz) = 9991951 +TIMESTAMP = 1576174612 +SHA256 (bareos-bareos-Release-18.2.7_GH0.tar.gz) = 08fea6e9505188a5e585f90448d6f30befeff2fafc2c494a68e2b571c7c6637f +SIZE (bareos-bareos-Release-18.2.7_GH0.tar.gz) = 10552298 diff --git a/sysutils/bareos-server/files/patch-core-CMakeLists.txt b/sysutils/bareos-server/files/patch-core-CMakeLists.txt index 0d938478efac..49b0a8a0b201 100644 --- a/sysutils/bareos-server/files/patch-core-CMakeLists.txt +++ b/sysutils/bareos-server/files/patch-core-CMakeLists.txt @@ -1,6 +1,6 @@ ---- core/CMakeLists.txt 2019-02-13 09:25:55.000000000 -0500 -+++ core/CMakeLists.txt 2019-05-10 14:14:16.122670000 -0500 -@@ -116,7 +116,9 @@ +--- core/CMakeLists.txt 2019-12-12 12:04:14.000000000 -0500 ++++ core/CMakeLists.txt 2019-12-28 16:17:19.843397000 -0500 +@@ -117,7 +117,9 @@ set(PSCMD "ps -ax -o pid,command") include_directories(/usr/local/include) link_directories(/usr/local/lib) @@ -11,7 +11,7 @@ endif() IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") -@@ -173,7 +175,9 @@ +@@ -176,7 +178,9 @@ add_definitions("-D_FILE_OFFSET_BITS=64") endif() @@ -22,7 +22,7 @@ IF(developer) add_definitions("-DDEVELOPER=1") -@@ -576,7 +580,6 @@ +@@ -586,7 +590,6 @@ add_subdirectory(scripts) add_subdirectory(manpages) diff --git a/sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake b/sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake index 8ad6bb9c6882..d705f0c8f618 100644 --- a/sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake +++ b/sysutils/bareos-server/files/patch-core-cmake_BareosFindAllLibraries.cmake @@ -9,8 +9,8 @@ - find_package(PythonInterp) - INCLUDE(FindPythonLibs) + if (python) -+ # make sure we get python 2 not 3 -+ set(Python_ADDITIONAL_VERSIONS 2.5 2.6 2.7 2.8 2.9) ++ # make sure we get python 2 or 3 ++ set(Python_ADDITIONAL_VERSIONS 3.5 3.6 3.7 3.8 2.7) + find_package(PythonInterp) + INCLUDE(FindPythonLibs) diff --git a/sysutils/bareos-server/files/patch-core-scripts_CMakeLists.txt b/sysutils/bareos-server/files/patch-core-scripts_CMakeLists.txt index 2c8b87d9b309..44c774124482 100644 --- a/sysutils/bareos-server/files/patch-core-scripts_CMakeLists.txt +++ b/sysutils/bareos-server/files/patch-core-scripts_CMakeLists.txt @@ -1,12 +1,12 @@ ---- core/scripts/CMakeLists.txt 2019-05-08 19:49:45.595270000 -0500 -+++ core/scripts/CMakeLists.txt 2019-05-08 19:51:39.443730000 -0500 -@@ -17,28 +17,29 @@ +--- core/scripts/CMakeLists.txt 2019-12-12 12:04:14.000000000 -0500 ++++ core/scripts/CMakeLists.txt 2019-12-28 16:23:36.207715000 -0500 +@@ -17,36 +17,37 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. +IF(client-only) + INSTALL(FILES -+ btraceback ++ bareos btraceback + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE @@ -19,18 +19,33 @@ - WORLD_READ WORLD_EXECUTE - DESTINATION "${sbindir}") + INSTALL(FILES ++ bareos-ctl-fd ++ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE ++ GROUP_READ GROUP_EXECUTE ++ WORLD_READ WORLD_EXECUTE ++ DESTINATION "${scriptdir}" ++ COMPONENT filedaemon) + +-INSTALL(FILES +- bareos-ctl-fd +- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE +- GROUP_READ GROUP_EXECUTE +- WORLD_READ WORLD_EXECUTE +- DESTINATION "${scriptdir}" +- COMPONENT filedaemon) ++ INSTALL(FILES + bareos + btraceback.gdb + btraceback.dbx + btraceback.mdb + bareos-config + bareos-config-lib.sh -+ bareos-ctl-fd + bareos-ctl-funcs + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE -+ DESTINATION "${scriptdir}") ++ DESTINATION "${scriptdir}" ++ ) +ENDIF() -INSTALL(FILES @@ -40,17 +55,17 @@ - btraceback.mdb - bareos-config - bareos-config-lib.sh -- bareos-ctl-fd - bareos-ctl-funcs - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE - WORLD_READ WORLD_EXECUTE -- DESTINATION "${scriptdir}") +- DESTINATION "${scriptdir}" +- ) - IF(NOT client-only) INSTALL(FILES mtx-changer -@@ -47,7 +48,6 @@ +@@ -55,7 +56,6 @@ bareos-glusterfind-wrapper bareos-ctl-dir bareos-ctl-sd diff --git a/sysutils/bareos-server/files/patch-core-src-plugins-dird_python-dir.cc b/sysutils/bareos-server/files/patch-core-src-plugins-dird_python-dir.cc new file mode 100644 index 000000000000..f63db632d130 --- /dev/null +++ b/sysutils/bareos-server/files/patch-core-src-plugins-dird_python-dir.cc @@ -0,0 +1,61 @@ +--- core/src/plugins/dird/python-dir.cc 2019-12-12 12:04:14.000000000 -0500 ++++ core/src/plugins/dird/python-dir.cc 2019-12-29 00:20:30.334502000 -0500 +@@ -35,6 +35,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 ++ + #include "python-dir.h" + #include "lib/edit.h" + +@@ -118,6 +125,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 +@@ -679,7 +700,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 + } + + /* +@@ -959,7 +984,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/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt b/sysutils/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt index 455f2fd3cdc4..5c59efaffb08 100644 --- a/sysutils/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt +++ b/sysutils/bareos-server/files/patch-core-src-plugins-filed_CMakeLists.txt @@ -1,7 +1,7 @@ ---- core/src/plugins/filed/CMakeLists.txt 2019-05-10 13:49:40.521620000 -0500 -+++ core/src/plugins/filed/CMakeLists.txt 2019-05-10 13:50:25.954964000 -0500 -@@ -99,18 +99,18 @@ - INSTALL(TARGETS test-plugin-fd DESTINATION ${plugindir}) +--- core/src/plugins/filed/CMakeLists.txt 2019-12-12 12:04:14.000000000 -0500 ++++ core/src/plugins/filed/CMakeLists.txt 2019-12-28 16:26:47.855833000 -0500 +@@ -100,18 +100,18 @@ + INSTALL(TARGETS test-plugin-fd DESTINATION ${plugindir} COMPONENT filedaemon) endif() -set (PYFILES @@ -16,20 +16,20 @@ - BareosFdPluginLDAP.py - ) +if (python) -+ set (PYFILES -+ bareos-fd.py.template -+ bareos-fd-local-fileset.py -+ bareos-fd-mock-test.py -+ BareosFdPluginBaseclass.py -+ BareosFdPluginLocalFileset.py -+ BareosFdWrapper.py -+ bareos_fd_consts.py -+ bareos-fd-ldap.py -+ BareosFdPluginLDAP.py -+ ) ++ set (PYFILES ++ bareos-fd.py.template ++ bareos-fd-local-fileset.py ++ bareos-fd-mock-test.py ++ BareosFdPluginBaseclass.py ++ BareosFdPluginLocalFileset.py ++ BareosFdWrapper.py ++ bareos_fd_consts.py ++ bareos-fd-ldap.py ++ BareosFdPluginLDAP.py ++ ) --INSTALL(FILES ${PYFILES} DESTINATION ${plugindir}) +-INSTALL(FILES ${PYFILES} DESTINATION ${plugindir} COMPONENT filedaemon) - - -+ INSTALL(FILES ${PYFILES} DESTINATION ${plugindir}) ++ INSTALL(FILES ${PYFILES} DESTINATION ${plugindir} COMPONENT filedaemon) +endif() diff --git a/sysutils/bareos-server/files/patch-core-src-plugins-filed_python-fd.cc b/sysutils/bareos-server/files/patch-core-src-plugins-filed_python-fd.cc new file mode 100644 index 000000000000..3e48800f4da6 --- /dev/null +++ b/sysutils/bareos-server/files/patch-core-src-plugins-filed_python-fd.cc @@ -0,0 +1,111 @@ +--- core/src/plugins/filed/python-fd.cc 2019-12-12 12:04:14.000000000 -0500 ++++ core/src/plugins/filed/python-fd.cc 2019-12-29 00:41:38.985785000 -0500 +@@ -40,6 +40,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 debuglevel = 150; + + #define PLUGIN_LICENSE "Bareos AGPLv3" +@@ -163,6 +171,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 +@@ -1226,7 +1248,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 +@@ -2704,7 +2730,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); + } +@@ -3091,7 +3121,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; + } +@@ -3100,7 +3134,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; + } +@@ -3143,7 +3181,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,8 +3261,11 @@ + if (!object || !PyString_Check(object)) { + 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/bareos-server/files/patch-core-src-plugins-stored_python-sd.cc b/sysutils/bareos-server/files/patch-core-src-plugins-stored_python-sd.cc new file mode 100644 index 000000000000..fb84a03d80ef --- /dev/null +++ b/sysutils/bareos-server/files/patch-core-src-plugins-stored_python-sd.cc @@ -0,0 +1,61 @@ +--- core/src/plugins/stored/python-sd.cc 2019-12-12 12:04:14.000000000 -0500 ++++ core/src/plugins/stored/python-sd.cc 2019-12-29 00:19:19.366390000 -0500 +@@ -36,6 +36,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 debuglevel = 150; + + #define PLUGIN_LICENSE "Bareos AGPLv3" +@@ -121,6 +128,20 @@ + extern "C" { + #endif + ++#if (PY_VERSION_HEX > 0x03050000) ++static struct PyModuleDef BareosSDModuleDef = { ++ PyModuleDef_HEAD_INIT, ++ "bareossd", ++ NULL, ++ -1, ++ BareosSDMethods, ++ NULL, ++ NULL, ++ NULL, ++ NULL ++}; ++#endif ++ + /** + * loadPlugin() and unloadPlugin() are entry points that are + * exported, so Bareos can directly call these two entry points +@@ -698,7 +719,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 + } + + /* +@@ -979,7 +1004,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/bareos-server/files/patch-core-src-stored_CMakeLists.txt b/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt index 0e21b3a7a44c..c803b485d4c4 100644 --- a/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt +++ b/sysutils/bareos-server/files/patch-core-src-stored_CMakeLists.txt @@ -1,6 +1,6 @@ ---- core/src/stored/CMakeLists.txt 2019-02-13 09:25:55.000000000 -0500 -+++ core/src/stored/CMakeLists.txt 2019-05-10 14:55:03.636098000 -0500 -@@ -192,6 +192,8 @@ +--- core/src/stored/CMakeLists.txt 2019-12-12 12:04:14.000000000 -0500 ++++ core/src/stored/CMakeLists.txt 2019-12-28 17:19:55.461762000 -0500 +@@ -193,6 +193,8 @@ target_link_libraries(bareos-sd stored_objects ${BAREOS_SD_LIBRARIES} @@ -9,31 +9,34 @@ ) add_executable(bls ${BLSSRCS}) -@@ -202,6 +204,7 @@ +@@ -203,6 +205,8 @@ add_executable(bextract ${BEXTRACTSRS}) target_link_libraries(bextract bareossd bareosfind bareos ++ ${JANSSON_LIBRARIES} + ${PTHREAD_LIBRARIES} ) add_executable(bscan ${BSCANSRCS}) -@@ -212,6 +215,7 @@ +@@ -213,6 +217,8 @@ add_executable(btape ${BTAPESRCS}) target_link_libraries(btape bareossd bareos ++ ${JANSSON_LIBRARIES} + ${PTHREAD_LIBRARIES} ) add_executable(bcopy ${BCOPYSRCS}) -@@ -219,6 +223,7 @@ +@@ -220,6 +226,8 @@ target_link_libraries(bcopy bareossd bareos ++ ${JANSSON_LIBRARIES} + ${PTHREAD_LIBRARIES} ) INSTALL(TARGETS bareossd DESTINATION ${libdir}) -@@ -231,7 +236,7 @@ +@@ -232,7 +240,7 @@ install(CODE "set(SRC_DIR \"${PROJECT_SOURCE_DIR}\")") install(SCRIPT ${PROJECT_SOURCE_DIR}/cmake/install-stored-configfiles.cmake) diff --git a/sysutils/bareos-server/pkg-plist.client b/sysutils/bareos-server/pkg-plist.client index 101eb52e8b67..0dc6ba80453c 100644 --- a/sysutils/bareos-server/pkg-plist.client +++ b/sysutils/bareos-server/pkg-plist.client @@ -41,6 +41,8 @@ man/man1/bconsole.1.gz man/man8/bareos-fd.8.gz man/man8/bareos.8.gz @group bareos +sbin/bareos +@group bareos sbin/bareos-fd @group bareos sbin/bconsole |