diff --git a/www/onlyoffice-documentserver/Makefile b/www/onlyoffice-documentserver/Makefile index e8a6c00dde30..6c663109bfd2 100644 --- a/www/onlyoffice-documentserver/Makefile +++ b/www/onlyoffice-documentserver/Makefile @@ -1,246 +1,237 @@ PORTNAME= onlyoffice-documentserver DISTVERSIONPREFIX= v -DISTVERSION= 7.3.3.49 -PORTREVISION= 4 +DISTVERSION= 7.4.0.163 CATEGORIES= www MASTER_SITES+= LOCAL/mikael/v8/:source1 \ LOCAL/mikael/onlyoffice/:source2 \ https://nodejs.org/dist/v${NODE_VERSION_PKGFETCH}/:source3 \ SF/optipng/OptiPNG/optipng-0.7.7/:source4 DISTFILES+= v8-8.9.255.25_all.tar.gz:source1 \ node-v${NODE_VERSION_PKGFETCH}.tar.gz:source3 \ optipng-0.7.7.tar.gz:source4 \ ${PORTNAME}-${DISTVERSION}-npm-cache.tar.gz:source2 MAINTAINER= mikael@FreeBSD.org COMMENT= Secure office and productivity apps WWW= https://www.onlyoffice.com/ LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE.txt BROKEN_i386= fails to build BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Jinja2>=0:devel/py-Jinja2@${PY_FLAVOR} \ boost-libs>0:devel/boost-libs \ glib>=2.54:devel/glib20 \ gn:devel/gn \ java:java/openjdk11 \ ninja:devel/ninja \ - npm:www/npm-node16 + npm:www/npm-node16 \ + ${LOCALBASE}/lib/libcrypto.a:security/openssl30 LIB_DEPENDS= libboost_regex.so:devel/boost-libs \ libcurl.so:ftp/curl \ libharfbuzz.so:print/harfbuzz \ libiconv.so:converters/libiconv \ libicutu.so:devel/icu RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}supervisor>0:sysutils/py-supervisor@${PY_FLAVOR} \ gsed:textproc/gsed \ nginx:www/nginx \ pwgen:sysutils/pwgen \ rabbitmq>0:net/rabbitmq \ webfonts>=0:x11-fonts/webfonts USES= autoreconf:build dos2unix fakeroot gmake gnome iconv localbase nodejs:16,build pkgconfig \ python:3.9+,build qt:5 trigger USE_QT= qmake:build USE_GITHUB= yes GH_ACCOUNT= ONLYOFFICE GH_PROJECT= DocumentServer GH_TAGNAME= v${DISTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/} GH_TUPLE= ONLYOFFICE:core:v${DISTVERSION}:core/core \ ONLYOFFICE:core-fonts:v${DISTVERSION}:corefonts/core-fonts \ ONLYOFFICE:dictionaries:v${DISTVERSION}:dictionaries/dictionaries \ ONLYOFFICE:document-server-integration:v${DISTVERSION}:dsi/document-server-integration \ ONLYOFFICE:document-templates:v${DISTVERSION}:dt/document-templates \ ONLYOFFICE:sdkjs:v${DISTVERSION}:sdkjs/sdkjs \ ONLYOFFICE:server:v${DISTVERSION}:server/server \ ONLYOFFICE:web-apps:v${DISTVERSION}:webapps/web-apps \ ONLYOFFICE:build_tools:v${DISTVERSION}:buildtools/build_tools \ ONLYOFFICE:DocumentBuilder:626d1e44db3d06ceb8298215a67ef0475912d89a:document_builder/DocumentBuilder \ ONLYOFFICE:onlyoffice.github.io:b26d001664d771df4f663d2d3ba7dd4a188b6cab:sdkjs_plugins_v1/onlyoffice.github.io \ ONLYOFFICE:document-server-package:v${DISTVERSION}:dsp/document-server-package \ - hackers-painters:katana-parser:499118d3:hackers_painters_katana/core/Common/3dParty/html/katana-parser \ + jasenhuang:katana-parser:be6df45:jasenhuang_katana/core/Common/3dParty/html/katana-parser \ google:gumbo-parser:aa91b27:google_gumbo/core/Common/3dParty/html/gumbo-parser OPTIONS_SINGLE= DB OPTIONS_SINGLE_DB= MYSQL PGSQL OPTIONS_DEFAULT= PGSQL MYSQL_USES+= mysql:client PGSQL_USES+= pgsql PGSQL_VARS= WANT_PGSQL=client BINARY_ALIAS= python=${PYTHON_CMD} USE_LDCONFIG= yes WWWDIR= ${PREFIX}/www/onlyoffice ETCDIR= ${PREFIX}/etc/onlyoffice DS_USERNAME= onlyoffice DS_GROUPNAME= onlyoffice USERS= ${DS_USERNAME} GROUPS= ${DS_GROUPNAME} PLIST_SUB= DS_GROUPNAME=${DS_GROUPNAME} \ DS_USERNAME=${DS_USERNAME} SUB_FILES= pkg-message \ onlyoffice.newsyslog.sample SUB_LIST= ETCDIR=${ETCDIR} \ PREFIX=${PREFIX} \ WWWDIR=${WWWDIR} # node version used with "npm install pkg@5.5.1" NODE_VERSION_PKGFETCH= 16.13.0 MAKE_ENV= BUILD_NUMBER="8" \ PKG_CACHE_PATH=${WRKDIR}/.pkg-cache \ PRODUCT_VERSION=${DISTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/} \ BUILD_NUMBER=${DISTVERSION:C/^[0-9]+\.[0-9]+\.[0-9]+\.([0-9]+)/\1/} # Don't create __pycache__ directory when executing node-gyp # This is a workaround to avoid filesystem violations during poudriere build MAKE_ENV+= PYTHONDONTWRITEBYTECODE=1 DOS2UNIX_FILES= document-server-package/common/documentserver/nginx/includes/http-common.conf.m4 CONFLICTS_BUILD=devel/googletest post-extract: - @${MV} ${WRKDIR}/v8 ${WRKSRC}/core/Common/3dParty/v8 + @${MV} ${WRKDIR}/v8 ${WRKSRC}/core/Common/3dParty/v8_89 @${MKDIR} ${WRKDIR}/.pkg-cache/node @${CP} ${DISTDIR}/node-v${NODE_VERSION_PKGFETCH}.tar.gz ${WRKDIR}/.pkg-cache/node @${MKDIR} ${WRKSRC}/sdkjs-plugins/v1 @${CP} ${WRKSRC}/onlyoffice.github.io/sdkjs-plugins/v1/* ${WRKSRC}/sdkjs-plugins/v1 @${MV} ${WRKSRC}/server/Common/config/production-linux.json ${WRKSRC}/server/Common/config/production-freebsd.json @${MV} ${WRKSRC}/server/Common/config/development-linux.json ${WRKSRC}/server/Common/config/development-freebsd.json # linux has moved to systemd init files, continue to using supervisord for now ${MKDIR} ${WRKSRC}/document-server-package/common/documentserver/supervisor .for i in ds-converter.conf ds-docservice.conf ds-metrics.conf ds.conf ${CP} ${FILESDIR}/${i} \ ${WRKSRC}/document-server-package/common/documentserver/supervisor .endfor post-patch: @${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' \ + ${WRKSRC}/build_tools/tools/freebsd/automate.py \ + ${WRKSRC}/core/Common/3dParty/boost/boost.pri \ ${WRKSRC}/core/Common/3dParty/icu/icu.pri \ - ${WRKSRC}/core/Common/3dParty/v8/v8/build/toolchain/gcc_toolchain.gni \ - ${WRKSRC}/core/Common/3dParty/v8/v8/buildtools/third_party/libc++/BUILD.gn \ + ${WRKSRC}/core/Common/3dParty/openssl/openssl.pri \ + ${WRKSRC}/core/Common/3dParty/v8_89/v8/build/toolchain/gcc_toolchain.gni \ + ${WRKSRC}/core/Common/3dParty/v8_89/v8/buildtools/third_party/libc++/BUILD.gn \ ${WRKSRC}/core/DesktopEditor/fontengine/ApplicationFonts.cpp \ - ${WRKSRC}/build_tools/tools/freebsd/automate.py + ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-generate-allfonts.sh.m4 \ + ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-jwt-status.sh.m4 \ + ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-pluginsmanager.sh.m4 \ + ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-static-gzip.sh.m4 \ + ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-update-securelink.sh.m4 \ + ${WRKSRC}/document-server-package/common/documentserver/supervisor/ds-converter.conf \ + ${WRKSRC}/document-server-package/common/documentserver/supervisor/ds-docservice.conf \ + ${WRKSRC}/document-server-package/common/documentserver/supervisor/ds-metrics.conf @${REINPLACE_CMD} -e 's|%%CC%%|${CC}|' -e 's|%%CXX%%|${CXX}|' \ - ${WRKSRC}/core/Common/3dParty/v8/v8/build/toolchain/gcc_toolchain.gni \ + ${WRKSRC}/core/Common/3dParty/v8_89/v8/build/toolchain/gcc_toolchain.gni \ ${WRKSRC}/core/Common/base.pri @${REINPLACE_CMD} 's|%%WRKDIR%%|${WRKDIR}|' \ ${WRKSRC}/document-server-package/Makefile @${REINPLACE_CMD} 's|%%WRKSRC%%|${WRKSRC}|' \ ${WRKSRC}/build_tools/scripts/build_js.py \ ${WRKSRC}/build_tools/scripts/build_server.py \ ${WRKSRC}/document-server-package/Makefile - @${REINPLACE_CMD} -e 's|linux|freebsd|' -e 's|/etc|${LOCALBASE}/etc|' \ - ${WRKSRC}/document-server-package/common/documentserver/supervisor/ds-docservice.conf \ - ${WRKSRC}/document-server-package/common/documentserver/supervisor/ds-converter.conf \ - ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-static-gzip.sh.m4 \ - ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-update-securelink.sh.m4 \ - ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-jwt-status.sh.m4 - @${REINPLACE_CMD} 's|/var/www|${LOCALBASE}/www|' \ - ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-generate-allfonts.sh.m4 \ - ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-update-securelink.sh.m4 \ - ${WRKSRC}/document-server-package/common/documentserver/supervisor/ds-converter.conf \ - ${WRKSRC}/document-server-package/common/documentserver/supervisor/ds-docservice.conf \ - ${WRKSRC}/document-server-package/common/documentserver/supervisor/ds-metrics.conf \ - ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-static-gzip.sh.m4 \ - ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-jwt-status.sh.m4 @${REINPLACE_CMD} -e 's|/var/lib|/var/db|' -e 's|/var/www|${LOCALBASE}/www|' \ -e 's|/usr/share|${LOCALBASE}/share|' -e 's|/etc|${LOCALBASE}/etc|' \ ${WRKSRC}/server/Common/config/production-freebsd.json \ ${WRKSRC}/server/Common/config/development-freebsd.json - @${REINPLACE_CMD} -e 's|bash|sh|' -e 's|sed|gsed|' \ - ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-static-gzip.sh.m4 \ - ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-update-securelink.sh.m4 \ - ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-jwt-status.sh.m4 @${REINPLACE_CMD} 's|%%DISTDIR%%|${DISTDIR}|' \ ${WRKSRC}/web-apps/build/patches/optipng-bin+5.1.0.patch @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' -e 's|%%ETCDIR%%|${ETCDIR}|' \ ${WRKSRC}/document-server-package/Makefile - @${REINPLACE_CMD} 's#ds:ds#${DS_USERNAME}:${DS_GROUPNAME}#' \ - ${WRKSRC}/document-server-package/common/documentserver/bin/documentserver-update-securelink.sh.m4 @${RM} ${WRKSRC}/web-apps/build/patches/optipng-bin+5.1.0.patch.orig @${FIND} ${WRKSRC}/server -type f -name npm-shrinkwrap.json -delete - @${ECHO} "# Generated from 'DEPS'" > ${WRKSRC}/core/Common/3dParty/v8/v8/build/config/gclient_args.gni - @${ECHO} "checkout_google_benchmark = false" >> ${WRKSRC}/core/Common/3dParty/v8/v8/build/config/gclient_args.gni + @${ECHO} "# Generated from 'DEPS'" > ${WRKSRC}/core/Common/3dParty/v8_89/v8/build/config/gclient_args.gni + @${ECHO} "checkout_google_benchmark = false" >> ${WRKSRC}/core/Common/3dParty/v8_89/v8/build/config/gclient_args.gni do-build: ${INSTALL_SCRIPT} ${FILESDIR}/npm ${BINARY_LINKDIR}/npm @${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKDIR}/.bin/npm @cd ${WRKSRC}/web-apps/build ; ${SETENV} ${MAKE_ENV} npm install patch-package @cd ${WRKSRC}/web-apps/build ; ${SETENV} ${MAKE_ENV} npm install optipng-bin@5.1.0 @cd ${WRKSRC}/web-apps/build ; node_modules/.bin/patch-package @cd ${WRKSRC}/web-apps/build/node_modules/optipng-bin ; ${SETENV} ${MAKE_ENV} npm run postinstall optipng-bin @cd ${WRKSRC}/server ; ${SETENV} ${MAKE_ENV} npm install grunt-cli @cd ${WRKSRC}/server ; ${SETENV} ${MAKE_ENV} npm install grunt @cd ${WRKSRC}/server ; ${SETENV} ${MAKE_ENV} npm install pkg@5.5.1 @cd ${WRKSRC}/sdkjs ; ${SETENV} ${MAKE_ENV} npm install grunt-cli @cd ${WRKSRC}/sdkjs ; ${SETENV} ${MAKE_ENV} npm install grunt @cd ${WRKSRC} && ${PATCH} -N -s -i ${FILESDIR}/extra-patch-pkg-fetch_lib-es5_build.js || ${TRUE} @cd ${WRKSRC} && ${PATCH} -N -s -i ${FILESDIR}/extra-patch-pkg-fetch_patches_node.v16.13.0.cpp.patch || ${TRUE} cd ${WRKSRC}/build_tools/tools/freebsd ; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} automate.py cd ${WRKSRC}/document-server-package ; ${SETENV} ${MAKE_ENV} ${GMAKE} freebsd do-install: # install the project # do not strip docservice, converter, metrics and json cd ${WRKSRC}/document-server-package/common/documentserver/home && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/documentserver ${INSTALL_SCRIPT} ${WRKSRC}/document-server-package/common/documentserver/bin/*.sh ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/document-server-package/common/documentserver/home/server/tools/all* ${STAGEDIR}${WWWDIR}/documentserver/server/tools ${INSTALL_PROGRAM} ${WRKSRC}/document-server-package/common/documentserver/home/server/FileConverter/bin/x2t ${STAGEDIR}${WWWDIR}/documentserver/server/FileConverter/bin ${INSTALL_PROGRAM} ${WRKSRC}/document-server-package/common/documentserver/home/server/FileConverter/bin/docbuilder ${STAGEDIR}${WWWDIR}/documentserver/server/FileConverter/bin + ${INSTALL_PROGRAM} ${WRKSRC}/document-server-package/common/documentserver/home/server/tools/pluginsmanager ${STAGEDIR}${WWWDIR}/documentserver/server/tools ${INSTALL_DATA} ${WRKSRC}/document-server-package/common/documentserver/home/npm/json ${STAGEDIR}${WWWDIR}/documentserver/npm ${INSTALL_LIB} ${WRKSRC}/document-server-package/common/documentserver/home/server/FileConverter/bin/*.so ${STAGEDIR}${PREFIX}/lib ${RM} ${STAGEDIR}${PREFIX}/bin/documentserver-letsencrypt.sh # install conf ${MKDIR} ${STAGEDIR}${ETCDIR}/documentserver/supervisor \ ${STAGEDIR}${ETCDIR}/documentserver/nginx/includes \ ${STAGEDIR}${ETCDIR}/documentserver/logrotate ${RM} ${WRKSRC}/document-server-package/common/documentserver/config/*-mac.json ${WRKSRC}/document-server-package/common/documentserver/config/*-windows.json cd ${WRKSRC}/document-server-package/common/documentserver/supervisor && ${COPYTREE_SHARE} . ${STAGEDIR}${ETCDIR}/documentserver/supervisor "-name *\.conf" cd ${WRKSRC}/document-server-package/common/documentserver/logrotate && ${COPYTREE_SHARE} . ${STAGEDIR}${ETCDIR}/documentserver/logrotate "-name *\.conf" @${CP} ${WRKSRC}/document-server-package/common/documentserver/nginx/ds-ssl.conf.tmpl ${WRKSRC}/document-server-package/common/documentserver/nginx/ds-ssl.conf .for f in ds.conf ds-ssl.conf includes/http-common.conf includes/ds-common.conf includes/ds-docservice.conf includes/ds-letsencrypt.conf includes/ds-mime.types.conf ${INSTALL_DATA} ${WRKSRC}/document-server-package/common/documentserver/nginx/${f} ${STAGEDIR}${ETCDIR}/documentserver/nginx/${f}.sample .endfor cd ${WRKSRC}/document-server-package/common/documentserver/nginx/includes && ${COPYTREE_SHARE} . ${STAGEDIR}${ETCDIR}/documentserver/nginx/includes "-name *\.conf" cd ${WRKSRC}/document-server-package/common/documentserver/config && ${COPYTREE_SHARE} . ${STAGEDIR}${ETCDIR}/documentserver ${INSTALL_DATA} ${FILESDIR}/local.json.sample ${STAGEDIR}${ETCDIR}/documentserver ${MKDIR} ${STAGEDIR}/${ETCDIR}/documentserver/newsyslog.conf.d ${INSTALL_DATA} ${WRKDIR}/onlyoffice.newsyslog.sample ${STAGEDIR}/${ETCDIR}/documentserver/newsyslog.conf.d # create missing dir ${MKDIR} ${STAGEDIR}/var/log/onlyoffice/documentserver/docservice \ ${STAGEDIR}/var/log/onlyoffice/documentserver/converter \ ${STAGEDIR}/var/log/onlyoffice/documentserver/metrics \ ${STAGEDIR}/var/db/onlyoffice/documentserver/App_Data/cache/files \ ${STAGEDIR}/var/db/onlyoffice/documentserver/App_Data/docbuilder \ ${STAGEDIR}${WWWDIR}/Data \ ${STAGEDIR}${WWWDIR}/documentserver/fonts create-caches-tarball: # do some cleanup first - ${RM} -r ${WRKDIR}/.npm/_logs ${WRKDIR}/.npm/_update-notifier-last-checked ${WRKDIR}/.cache/yarn/v6/.tmp + ${RM} -r ${WRKDIR}/.npm/_logs ${WRKDIR}/.npm/_update-notifier-last-checked ${WRKDIR}/.cache/yarn/v6/.tmp ${WRKDIR}/.cache/node-gyp ${FIND} ${WRKDIR}/.cache -type f -perm 755 -exec file {} \; | ${EGREP} "ELF|PE32+|Mach-O" | ${AWK} -F ':' '{print $$1}' | ${XARGS} ${RM} ${FIND} ${WRKDIR}/.pkg-cache -type f -perm 755 -exec file {} \; | ${EGREP} "ELF|PE32+|Mach-O" | ${AWK} -F ':' '{print $$1}' | ${XARGS} ${RM} cd ${WRKDIR} && \ ${TAR} czf ${PORTNAME}-${DISTVERSION}-npm-cache.tar.gz .npm .cache .pkg-cache .include diff --git a/www/onlyoffice-documentserver/distinfo b/www/onlyoffice-documentserver/distinfo index 3e770cb7429f..ce4d1ecd4af8 100644 --- a/www/onlyoffice-documentserver/distinfo +++ b/www/onlyoffice-documentserver/distinfo @@ -1,39 +1,39 @@ -TIMESTAMP = 1689784075 +TIMESTAMP = 1689842471 SHA256 (v8-8.9.255.25_all.tar.gz) = 54853ef93accc063a82a0dc29457b25c9b6d88315431d62e06ab1f84797c5f80 SIZE (v8-8.9.255.25_all.tar.gz) = 72818814 SHA256 (node-v16.13.0.tar.gz) = 9c00e5b6024cfcbc9105f9c58cf160762e78659a345d100c5bd80a7fb38c684f SIZE (node-v16.13.0.tar.gz) = 63735070 SHA256 (optipng-0.7.7.tar.gz) = 4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452 SIZE (optipng-0.7.7.tar.gz) = 2329555 -SHA256 (onlyoffice-documentserver-7.3.3.49-npm-cache.tar.gz) = e1611fe023c2ac5eacae097c4f9605710f8d5de34b600f6301b282872db3fe1d -SIZE (onlyoffice-documentserver-7.3.3.49-npm-cache.tar.gz) = 234604012 -SHA256 (ONLYOFFICE-DocumentServer-v7.3.3.49-v7.3.3_GH0.tar.gz) = 7eb5d59aea3211fd56d17379c29bf680939fab88e1eb25d0cd6aa32c64e86a4c -SIZE (ONLYOFFICE-DocumentServer-v7.3.3.49-v7.3.3_GH0.tar.gz) = 63957 -SHA256 (ONLYOFFICE-core-v7.3.3.49_GH0.tar.gz) = 7cb74cd2027d051ddf66129df9efc78e3d646af189c18d50e33018d50a356904 -SIZE (ONLYOFFICE-core-v7.3.3.49_GH0.tar.gz) = 88430975 -SHA256 (ONLYOFFICE-core-fonts-v7.3.3.49_GH0.tar.gz) = 3f726b0e5344eabf501e22d566554bbfbc343625360699bbe23536a4d02b73fb -SIZE (ONLYOFFICE-core-fonts-v7.3.3.49_GH0.tar.gz) = 95253256 -SHA256 (ONLYOFFICE-dictionaries-v7.3.3.49_GH0.tar.gz) = 8434d8aad8c7acd571e2d8a751dcbb4e13a750ccf37188455d747f85d2ba4df4 -SIZE (ONLYOFFICE-dictionaries-v7.3.3.49_GH0.tar.gz) = 41115358 -SHA256 (ONLYOFFICE-document-server-integration-v7.3.3.49_GH0.tar.gz) = 9ed80d4f3fba3d98a7cb0e528d856a9ac46ff56233d96f46ce2cd62aa4a17306 -SIZE (ONLYOFFICE-document-server-integration-v7.3.3.49_GH0.tar.gz) = 5344109 -SHA256 (ONLYOFFICE-document-templates-v7.3.3.49_GH0.tar.gz) = e04fdff908953049781c67c74c7d643bd3f2f42f3bd1af4cdcfff45bd4145e8e -SIZE (ONLYOFFICE-document-templates-v7.3.3.49_GH0.tar.gz) = 2152326 -SHA256 (ONLYOFFICE-sdkjs-v7.3.3.49_GH0.tar.gz) = 4e0b68f43cd3338b25e06bbacf69399fee9d69a1d9e6e073c6d971d35bc96e19 -SIZE (ONLYOFFICE-sdkjs-v7.3.3.49_GH0.tar.gz) = 25674391 -SHA256 (ONLYOFFICE-server-v7.3.3.49_GH0.tar.gz) = 6d54baed81b5723c53e55598a5f0a716c18a2bf78047605a725b51a8d0d312ba -SIZE (ONLYOFFICE-server-v7.3.3.49_GH0.tar.gz) = 258896 -SHA256 (ONLYOFFICE-web-apps-v7.3.3.49_GH0.tar.gz) = 90ae7a0e27487d503d681bfdfe84d395baa1139385ca40179956baece9eb2abb -SIZE (ONLYOFFICE-web-apps-v7.3.3.49_GH0.tar.gz) = 281994064 -SHA256 (ONLYOFFICE-build_tools-v7.3.3.49_GH0.tar.gz) = 58607e40cc757d29bfb60bdb1ee687965e812f6219a265ab26ff585f0779b8e8 -SIZE (ONLYOFFICE-build_tools-v7.3.3.49_GH0.tar.gz) = 4588736 +SHA256 (onlyoffice-documentserver-7.4.0.163-npm-cache.tar.gz) = 13c6a5c314a7619473260b2d7fb1161d7d2178e0da3ab6973981b7bfddae82b3 +SIZE (onlyoffice-documentserver-7.4.0.163-npm-cache.tar.gz) = 275714693 +SHA256 (ONLYOFFICE-DocumentServer-v7.4.0.163-v7.4.0_GH0.tar.gz) = ceaa39fcb9373a22f652c02c760f32961d02c49b14af3acb2412b422972fe0bb +SIZE (ONLYOFFICE-DocumentServer-v7.4.0.163-v7.4.0_GH0.tar.gz) = 65484 +SHA256 (ONLYOFFICE-core-v7.4.0.163_GH0.tar.gz) = d6fbd0acd244cfa3e48afe98942720aed0463afb34d12c257bf233f91e919891 +SIZE (ONLYOFFICE-core-v7.4.0.163_GH0.tar.gz) = 88380222 +SHA256 (ONLYOFFICE-core-fonts-v7.4.0.163_GH0.tar.gz) = dc829e15f7fc7f08be31de53d2eb9842c840a2d5a95afd9d99cd0c482c60d277 +SIZE (ONLYOFFICE-core-fonts-v7.4.0.163_GH0.tar.gz) = 95366415 +SHA256 (ONLYOFFICE-dictionaries-v7.4.0.163_GH0.tar.gz) = a6247152990493aa5cf43d22c11d754ecdc2d9740b60b26cbdb955fa1938dbaa +SIZE (ONLYOFFICE-dictionaries-v7.4.0.163_GH0.tar.gz) = 41115736 +SHA256 (ONLYOFFICE-document-server-integration-v7.4.0.163_GH0.tar.gz) = d57cda65a2c3aa8468c665cd789cc59ccbd833c8c13de2247e811a665adb0ec5 +SIZE (ONLYOFFICE-document-server-integration-v7.4.0.163_GH0.tar.gz) = 5118132 +SHA256 (ONLYOFFICE-document-templates-v7.4.0.163_GH0.tar.gz) = 41dcff925754f5ac57ac06fa116e3318ac2d6bcb35a38ca866182477caa858eb +SIZE (ONLYOFFICE-document-templates-v7.4.0.163_GH0.tar.gz) = 2538820 +SHA256 (ONLYOFFICE-sdkjs-v7.4.0.163_GH0.tar.gz) = 411c2b89d46fa3e0af08b4e081ba79366ddc33f5971df8d5963cd36f8046e364 +SIZE (ONLYOFFICE-sdkjs-v7.4.0.163_GH0.tar.gz) = 25997019 +SHA256 (ONLYOFFICE-server-v7.4.0.163_GH0.tar.gz) = cd0df0e1745e0d3944b508d1019669a72f748e7da3b0ff3560d58bd855de9cd4 +SIZE (ONLYOFFICE-server-v7.4.0.163_GH0.tar.gz) = 267471 +SHA256 (ONLYOFFICE-web-apps-v7.4.0.163_GH0.tar.gz) = 74edc2cbeda649251df8f1cf0e34ce48372a1f9a35541abfb70617552a6b18e6 +SIZE (ONLYOFFICE-web-apps-v7.4.0.163_GH0.tar.gz) = 348597216 +SHA256 (ONLYOFFICE-build_tools-v7.4.0.163_GH0.tar.gz) = 048cc71c124dd27a399feb960e540eed555f3935d5272aeb67bdedc030bbdace +SIZE (ONLYOFFICE-build_tools-v7.4.0.163_GH0.tar.gz) = 6656908 SHA256 (ONLYOFFICE-DocumentBuilder-626d1e44db3d06ceb8298215a67ef0475912d89a_GH0.tar.gz) = 275c3a8c993528fa56c69aedb11dd74a6fba9c3bd372874004584ae9cbb190b5 SIZE (ONLYOFFICE-DocumentBuilder-626d1e44db3d06ceb8298215a67ef0475912d89a_GH0.tar.gz) = 31659 SHA256 (ONLYOFFICE-onlyoffice.github.io-b26d001664d771df4f663d2d3ba7dd4a188b6cab_GH0.tar.gz) = 347b8f1d3c21b1f61a3f1fcae86f402b27ce4f8b826e18158834251046d83cf5 SIZE (ONLYOFFICE-onlyoffice.github.io-b26d001664d771df4f663d2d3ba7dd4a188b6cab_GH0.tar.gz) = 17009005 -SHA256 (ONLYOFFICE-document-server-package-v7.3.3.49_GH0.tar.gz) = 1d441f347851055356ded52ad038ee3ebe65d03806f9155c6221a3a0c4491a5b -SIZE (ONLYOFFICE-document-server-package-v7.3.3.49_GH0.tar.gz) = 154588 -SHA256 (hackers-painters-katana-parser-499118d3_GH0.tar.gz) = ed83020cbe07877c7323d475491803797fac12ce4086966011c81023b9852c4b -SIZE (hackers-painters-katana-parser-499118d3_GH0.tar.gz) = 97209 +SHA256 (ONLYOFFICE-document-server-package-v7.4.0.163_GH0.tar.gz) = d9fb262e19ecbbd9a13bbc9f1e2d40f7fcef1ee1548302f4f09c2410a7abae01 +SIZE (ONLYOFFICE-document-server-package-v7.4.0.163_GH0.tar.gz) = 155522 +SHA256 (jasenhuang-katana-parser-be6df45_GH0.tar.gz) = 363ede45ba6d125fdb7323c43d34acd3d0ae9028ac18aec632eb6a623160f09a +SIZE (jasenhuang-katana-parser-be6df45_GH0.tar.gz) = 97712 SHA256 (google-gumbo-parser-aa91b27_GH0.tar.gz) = 1360f85c02fb2573a10f00abcddebc8f1ff277a16f66553439193af93afae335 SIZE (google-gumbo-parser-aa91b27_GH0.tar.gz) = 2119417 diff --git a/www/onlyoffice-documentserver/files/ds-converter.conf b/www/onlyoffice-documentserver/files/ds-converter.conf index 84c47283938f..613c3fd7a6a4 100644 --- a/www/onlyoffice-documentserver/files/ds-converter.conf +++ b/www/onlyoffice-documentserver/files/ds-converter.conf @@ -1,13 +1,13 @@ [program:converter] -command=/var/www/onlyoffice/documentserver/server/FileConverter/converter -directory=/var/www/onlyoffice/documentserver/server/FileConverter +command=%%LOCALBASE%%/www/onlyoffice/documentserver/server/FileConverter/converter +directory=%%LOCALBASE%%/www/onlyoffice/documentserver/server/FileConverter user=onlyoffice -environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/onlyoffice/documentserver,NODE_DISABLE_COLORS=1,APPLICATION_NAME=M4_COMPANY_NAME +environment=NODE_ENV=production-freebsd,NODE_CONFIG_DIR=%%LOCALBASE%%/etc/onlyoffice/documentserver,NODE_DISABLE_COLORS=1,APPLICATION_NAME=M4_COMPANY_NAME stdout_logfile=/var/log/onlyoffice/documentserver/converter/out.log stdout_logfile_backups=0 stdout_logfile_maxbytes=0 stderr_logfile=/var/log/onlyoffice/documentserver/converter/err.log stderr_logfile_backups=0 stderr_logfile_maxbytes=0 autostart=true autorestart=true diff --git a/www/onlyoffice-documentserver/files/ds-docservice.conf b/www/onlyoffice-documentserver/files/ds-docservice.conf index b4e69c14ed67..5eda55c35aab 100644 --- a/www/onlyoffice-documentserver/files/ds-docservice.conf +++ b/www/onlyoffice-documentserver/files/ds-docservice.conf @@ -1,13 +1,13 @@ [program:docservice] -command=/var/www/onlyoffice/documentserver/server/DocService/docservice -directory=/var/www/onlyoffice/documentserver/server/DocService +command=%%LOCALBASE%%/www/onlyoffice/documentserver/server/DocService/docservice +directory=%%LOCALBASE%%/www/onlyoffice/documentserver/server/DocService user=onlyoffice -environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/onlyoffice/documentserver,NODE_DISABLE_COLORS=1 +environment=NODE_ENV=production-freebsd,NODE_CONFIG_DIR=%%LOCALBASE%%/etc/onlyoffice/documentserver,NODE_DISABLE_COLORS=1 stdout_logfile=/var/log/onlyoffice/documentserver/docservice/out.log stdout_logfile_backups=0 stdout_logfile_maxbytes=0 stderr_logfile=/var/log/onlyoffice/documentserver/docservice/err.log stderr_logfile_backups=0 stderr_logfile_maxbytes=0 autostart=true autorestart=true diff --git a/www/onlyoffice-documentserver/files/ds-metrics.conf b/www/onlyoffice-documentserver/files/ds-metrics.conf index 70716c7c5f44..b6181cc76b31 100644 --- a/www/onlyoffice-documentserver/files/ds-metrics.conf +++ b/www/onlyoffice-documentserver/files/ds-metrics.conf @@ -1,13 +1,13 @@ [program:metrics] -command=/var/www/onlyoffice/documentserver/server/Metrics/metrics ./config/config.js -directory=/var/www/onlyoffice/documentserver/server/Metrics +command=%%LOCALBASE%%/www/onlyoffice/documentserver/server/Metrics/metrics ./config/config.js +directory=%%LOCALBASE%%/www/onlyoffice/documentserver/server/Metrics user=onlyoffice environment=NODE_DISABLE_COLORS=1 stdout_logfile=/var/log/onlyoffice/documentserver/metrics/out.log stdout_logfile_backups=0 stdout_logfile_maxbytes=0 stderr_logfile=/var/log/onlyoffice/documentserver/metrics/err.log stderr_logfile_backups=0 stderr_logfile_maxbytes=0 autostart=true autorestart=true diff --git a/www/onlyoffice-documentserver/files/extra-patch-pkg-fetch_patches_node.v16.13.0.cpp.patch b/www/onlyoffice-documentserver/files/extra-patch-pkg-fetch_patches_node.v16.13.0.cpp.patch index 01ce59579ca7..c380dd286e54 100644 --- a/www/onlyoffice-documentserver/files/extra-patch-pkg-fetch_patches_node.v16.13.0.cpp.patch +++ b/www/onlyoffice-documentserver/files/extra-patch-pkg-fetch_patches_node.v16.13.0.cpp.patch @@ -1,178 +1,205 @@ https://github.com/vercel/pkg-fetch/blob/main/patches/node.v16.14.2.cpp.patch + local FreeBSD patches --- server/node_modules/pkg-fetch/patches/node.v16.13.0.cpp.patch.orig 2021-12-30 20:04:18.203959000 +0100 +++ server/node_modules/pkg-fetch/patches/node.v16.13.0.cpp.patch 2021-12-30 20:09:53.210319000 +0100 -@@ -521,3 +521,171 @@ index 0000000000..fb2d47f52b +@@ -1,5 +1,5 @@ +---- node/common.gypi +-+++ node/common.gypi ++--- common.gypi.orig 2021-10-26 14:00:54.000000000 +0200 +++++ common.gypi 2023-07-18 12:52:05.744323000 +0200 + @@ -171,7 +171,7 @@ + 'MSVC_runtimeType': 2 # MultiThreadedDLL (/MD) + }], +@@ -9,6 +9,15 @@ + 'lto': ' -flto=4 -ffat-lto-objects ', # + }, { + 'lto': ' -flto ', # Clang + }], ++@@ -386,7 +386,7 @@ ++ }], ++ [ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', { ++ 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], ++- 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++14' ], +++ 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++14', '-Wno-error=enum-constexpr-conversion' ], ++ 'defines': [ '__STDC_FORMAT_MACROS' ], ++ 'ldflags': [ '-rdynamic' ], ++ 'target_conditions': [ + --- node/deps/v8/include/v8.h + +++ node/deps/v8/include/v8.h + @@ -10092,6 +10092,10 @@ class V8_EXPORT V8 { +@@ -521,6 +530,174 @@ + 'cflags_cc': [ '-frtti', '-fno-lto' ], 'cflags_cc!': [ '-fno-rtti' ], }], [ 'OS == "mac" or OS == "ios"', { +--- node/deps/openssl/config/archs/linux-elf/no-asm/openssl-cl.gypi.orig 2019-08-06 20:46:23 UTC ++++ node/deps/openssl/config/archs/linux-elf/no-asm/openssl-cl.gypi +@@ -12,7 +12,7 @@ + '-Wall -O3 -fomit-frame-pointer', + ], + 'openssl_ex_libs_linux-elf': [ +- '-ldl -pthread', ++ '-pthread', + ], + 'openssl_cli_srcs_linux-elf': [ + 'openssl/apps/asn1pars.c', +--- node/deps/openssl/config/archs/linux-elf/no-asm/openssl.gypi.orig 2021-03-17 20:16:25 UTC ++++ node/deps/openssl/config/archs/linux-elf/no-asm/openssl.gypi +@@ -698,7 +698,7 @@ + '-Wall -O3 -fomit-frame-pointer', + ], + 'openssl_ex_libs_linux-elf': [ +- '-ldl -pthread', ++ '-pthread', + ], + }, + 'include_dirs': [ +--- node/deps/openssl/openssl_no_asm.gypi.orig 2020-09-08 12:17:11 UTC ++++ node/deps/openssl/openssl_no_asm.gypi +@@ -48,7 +48,7 @@ + 'includes': ['config/archs/linux64-mips64/no-asm/openssl.gypi'], + }, { + # Other architectures don't use assembly +- 'includes': ['config/archs/linux-x86_64/no-asm/openssl.gypi'], ++ 'includes': ['config/archs/linux-elf/no-asm/openssl.gypi'], + }], + ], + } +--- node/deps/openssl/openssl-cl_no_asm.gypi.orig 2020-09-08 12:17:10 UTC ++++ node/deps/openssl/openssl-cl_no_asm.gypi +@@ -1,4 +1,5 @@ + { ++ 'defines': ['OPENSSL_NO_ASM'], + 'conditions': [ + ['target_arch=="ppc" and OS=="aix"', { + 'includes': ['config/archs/aix-gcc/no-asm/openssl-cl.gypi'], +@@ -47,7 +48,7 @@ + 'includes': ['config/archs/linux64-mips64/no-asm/openssl-cl.gypi'], + }, { + # Other architectures don't use assembly +- 'includes': ['config/archs/linux-x86_64/no-asm/openssl-cl.gypi'], ++ 'includes': ['config/archs/linux-elf/no-asm/openssl-cl.gypi'], + }], + ], + } +--- node/deps/v8/src/base/platform/platform-freebsd.cc.orig 2020-06-30 17:49:16 UTC ++++ node/deps/v8/src/base/platform/platform-freebsd.cc +@@ -82,8 +82,8 @@ std::vector OS::GetSharedLib + lib_name = std::string(path); + } + result.push_back(SharedLibraryAddress( +- lib_name, reinterpret_cast(map->kve_start), +- reinterpret_cast(map->kve_end))); ++ lib_name, static_cast(map->kve_start), ++ static_cast(map->kve_end))); + } + + start += ssize; +@@ -94,6 +94,48 @@ std::vector OS::GetSharedLib + } + + void OS::SignalCodeMovingGC() {} ++ ++#ifdef __arm__ ++ ++bool OS::ArmUsingHardFloat() { ++// GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify ++// the Floating Point ABI used (PCS stands for Procedure Call Standard). ++// We use these as well as a couple of other defines to statically determine ++// what FP ABI used. ++// GCC versions 4.4 and below don't support hard-fp. ++// GCC versions 4.5 may support hard-fp without defining __ARM_PCS or ++// __ARM_PCS_VFP. ++ ++#define GCC_VERSION \ ++ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) ++#if GCC_VERSION >= 40600 && !defined(__clang__) ++#if defined(__ARM_PCS_VFP) ++ return true; ++#else ++ return false; ++#endif ++ ++#elif GCC_VERSION < 40500 && !defined(__clang__) ++ return false; ++ ++#else ++#if defined(__ARM_PCS_VFP) ++ return true; ++#elif defined(__ARM_PCS) || defined(__SOFTFP__) || defined(__SOFTFP) || \ ++ !defined(__VFP_FP__) ++ return false; ++#else ++#error \ ++ "Your version of compiler does not report the FP ABI compiled for." \ ++ "Please report it on this issue" \ ++ "http://code.google.com/p/v8/issues/detail?id=2140" ++ ++#endif ++#endif ++#undef GCC_VERSION ++} ++ ++#endif // def __arm__ + + void OS::AdjustSchedulingParams() {} + +--- node/deps/v8/src/codegen/ppc/constants-ppc.h.orig 2020-06-30 17:49:17 UTC ++++ node/deps/v8/src/codegen/ppc/constants-ppc.h +@@ -36,7 +36,7 @@ + #endif + + #if !(V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64) || !V8_TARGET_ARCH_PPC64 || \ +- V8_TARGET_LITTLE_ENDIAN || (defined(_CALL_ELF) && _CALL_ELF == 2) ++ (defined(_CALL_ELF) && _CALL_ELF == 2) + #define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 1 + #else + #define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 0 +@@ -44,7 +44,7 @@ + + #if !(V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64) || \ + (V8_TARGET_ARCH_PPC64 && \ +- (V8_TARGET_LITTLE_ENDIAN || (defined(_CALL_ELF) && _CALL_ELF == 2))) ++ (defined(_CALL_ELF) && _CALL_ELF == 2)) + #define ABI_CALL_VIA_IP 1 + #else + #define ABI_CALL_VIA_IP 0 +--- node/deps/v8/src/libsampler/sampler.cc.orig 2021-10-08 13:38:46 UTC ++++ node/deps/v8/src/libsampler/sampler.cc +@@ -490,6 +490,10 @@ void SignalHandler::FillRegisterState(void* context, R + state->pc = reinterpret_cast(mcontext.__gregs[_REG_PC]); + state->sp = reinterpret_cast(mcontext.__gregs[_REG_SP]); + state->fp = reinterpret_cast(mcontext.__gregs[_REG_FP]); ++#elif V8_TARGET_ARCH_PPC64 ++ state->pc = reinterpret_cast(mcontext.mc_srr0); ++ state->sp = reinterpret_cast(mcontext.mc_frame[1]); ++ state->fp = reinterpret_cast(mcontext.mc_frame[31]); + #endif // V8_HOST_ARCH_* + #elif V8_OS_NETBSD + #if V8_HOST_ARCH_IA32 +--- node/node.gypi.orig 2021-03-03 05:40:19 UTC ++++ node/node.gypi +@@ -319,6 +319,9 @@ + [ 'node_use_openssl=="true"', { + 'defines': [ 'HAVE_OPENSSL=1' ], + 'conditions': [ ++ ['openssl_no_asm==1', { ++ 'defines': [ 'OPENSSL_NO_ASM' ], ++ }], + [ 'node_shared_openssl=="false"', { + 'dependencies': [ + './deps/openssl/openssl.gyp:openssl', +--- node/src/cares_wrap.h.orig 2021-08-18 22:13:12 UTC ++++ node/src/cares_wrap.h +@@ -22,7 +22,7 @@ + # include + #endif // __POSIX__ + +-# include ++# include + + namespace node { + namespace cares_wrap { + --- node/deps/openssl/config/archs/linux-elf/no-asm/openssl-cl.gypi.orig 2019-08-06 20:46:23 UTC + +++ node/deps/openssl/config/archs/linux-elf/no-asm/openssl-cl.gypi + @@ -12,7 +12,7 @@ diff --git a/www/onlyoffice-documentserver/files/patch-build__tools_scripts_base.py b/www/onlyoffice-documentserver/files/patch-build__tools_scripts_base.py index 33394cc3671d..95b9974cb2c9 100644 --- a/www/onlyoffice-documentserver/files/patch-build__tools_scripts_base.py +++ b/www/onlyoffice-documentserver/files/patch-build__tools_scripts_base.py @@ -1,30 +1,30 @@ --- build_tools/scripts/base.py.orig 2021-11-16 08:07:24 UTC +++ build_tools/scripts/base.py -@@ -1144,9 +1144,15 @@ def support_old_versions_plugins(out_dir): +@@ -1186,9 +1186,15 @@ def support_old_versions_plugins(out_dir): def support_old_versions_plugins(out_dir): if is_file(out_dir + "/pluginBase.js"): return - download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.js", out_dir + "/plugins.js") - download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins-ui.js", out_dir + "/plugins-ui.js") - download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.css", out_dir + "/plugins.css") +# download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.js", out_dir + "/plugins.js") +# download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins-ui.js", out_dir + "/plugins-ui.js") +# download("https://onlyoffice.github.io/sdkjs-plugins/v1/plugins.css", out_dir + "/plugins.css") + git_dir = get_script_dir() + "/../.." + plugins_dir = git_dir + "/sdkjs-plugins" + copy_file(plugins_dir + "/v1/plugins.js", out_dir + "/plugins.js") + copy_file(plugins_dir + "/v1/plugins-ui.js", out_dir + "/plugins-ui.js") + copy_file(plugins_dir + "/v1/plugins.css", out_dir + "/plugins.css") + content_plugin_base = "" with open(get_path(out_dir + "/plugins.js"), "r") as file: content_plugin_base += file.read() -@@ -1282,7 +1288,7 @@ def clone_marketplace_plugin(out_dir, is_name_as_guid= - def clone_marketplace_plugin(out_dir, is_name_as_guid=False): +@@ -1331,7 +1337,7 @@ def clone_marketplace_plugin(out_dir, is_name_as_guid= + def clone_marketplace_plugin(out_dir, is_name_as_guid=False, is_replace_paths=False, is_delete_git_dir=True, git_owner=""): old_cur = os.getcwd() os.chdir(out_dir) -- git_update("onlyoffice.github.io", False, True) -+# git_update("onlyoffice.github.io", False, True) +- git_update("onlyoffice.github.io", False, True, git_owner) ++# git_update("onlyoffice.github.io", False, True, git_owner) os.chdir(old_cur) dst_dir_name = "marketplace" diff --git a/www/onlyoffice-documentserver/files/patch-build__tools_scripts_core__common_make__common.py b/www/onlyoffice-documentserver/files/patch-build__tools_scripts_core__common_make__common.py index 234edc73b5ab..af97b8b3caf8 100644 --- a/www/onlyoffice-documentserver/files/patch-build__tools_scripts_core__common_make__common.py +++ b/www/onlyoffice-documentserver/files/patch-build__tools_scripts_core__common_make__common.py @@ -1,51 +1,55 @@ --- build_tools/scripts/core_common/make_common.py.orig 2021-11-16 07:07:24 UTC +++ build_tools/scripts/core_common/make_common.py -@@ -8,18 +8,18 @@ import glob +@@ -8,19 +8,19 @@ import glob import base import glob -import boost -import cef -import icu -import openssl +#import boost +#import cef +#import icu +#import openssl import curl import websocket import v8 import html2 -import hunspell +#import hunspell import glew import harfbuzz -import hyphen +-import googletest +#import hyphen ++#import googletest def check_android_ndk_macos_arm(dir): if base.is_dir(dir + "/darwin-x86_64") and not base.is_dir(dir + "/darwin-arm64"): -@@ -34,16 +34,16 @@ def make(): +@@ -35,17 +35,17 @@ def make(): if base.is_dir(toolchain): check_android_ndk_macos_arm(toolchain + "/prebuilt") - boost.make() - cef.make() - icu.make() - openssl.make() +# boost.make() +# cef.make() +# icu.make() +# openssl.make() v8.make() html2.make() - hunspell.make(False) - harfbuzz.make() +# hunspell.make(False) +# harfbuzz.make() glew.make() -- hyphen.make() -+# hyphen.make() +- hyphen.make() +- googletest.make() ++# hyphen.make() ++# googletest.make() if config.check_option("module", "mobile"): if (config.check_option("platform", "android")): diff --git a/www/onlyoffice-documentserver/files/patch-build__tools_scripts_core__common_modules_v8__89.py b/www/onlyoffice-documentserver/files/patch-build__tools_scripts_core__common_modules_v8__89.py new file mode 100644 index 000000000000..a81cf69c3fdd --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-build__tools_scripts_core__common_modules_v8__89.py @@ -0,0 +1,87 @@ +--- build_tools/scripts/core_common/modules/v8_89.py.orig 2023-06-14 09:52:10.504034000 +0200 ++++ build_tools/scripts/core_common/modules/v8_89.py 2023-06-14 11:18:31.776490000 +0200 +@@ -83,39 +83,41 @@ def make(): + base.create_dir(base_dir) + + os.chdir(base_dir) +- if not base.is_dir("depot_tools"): +- base.cmd("git", ["clone", "https://chromium.googlesource.com/chromium/tools/depot_tools.git"]) ++# if not base.is_dir("depot_tools"): ++# base.cmd("git", ["clone", "https://chromium.googlesource.com/chromium/tools/depot_tools.git"]) ++# ++# os.environ["PATH"] = base_dir + "/depot_tools" + os.pathsep + os.environ["PATH"] ++# ++# if ("windows" == base.host_platform()): ++# base.set_env("DEPOT_TOOLS_WIN_TOOLCHAIN", "0") ++# base.set_env("GYP_MSVS_VERSION", config.option("vs-version")) ++# ++# if not base.is_dir("v8"): ++# base.cmd("./depot_tools/fetch", ["v8"], True) ++# base.copy_dir("./v8/third_party", "./v8/third_party_new") ++# if ("windows" == base.host_platform()): ++# os.chdir("v8") ++# base.cmd("git", ["config", "--system", "core.longpaths", "true"]) ++# os.chdir("../") ++# v8_branch_version = "remotes/branch-heads/8.9" ++# if ("mac" == base.host_platform()): ++# v8_branch_version = "remotes/branch-heads/9.9" ++# base.cmd("./depot_tools/gclient", ["sync", "-r", v8_branch_version], True) ++# base.cmd("gclient", ["sync", "--force"], True) ++# base.copy_dir("./v8/third_party_new/ninja", "./v8/third_party/ninja") ++# ++# if ("windows" == base.host_platform()): ++# base.replaceInFile("v8/build/config/win/BUILD.gn", ":static_crt", ":dynamic_crt") ++# ++# if not base.is_file("v8/src/base/platform/wrappers.cc"): ++# base.writeFile("v8/src/base/platform/wrappers.cc", "#include \"src/base/platform/wrappers.h\"\n") ++# ++# if not base.is_file("v8/third_party/jinja2/tests.py.bak"): ++# base.copy_file("v8/third_party/jinja2/tests.py", "v8/third_party/jinja2/tests.py.bak") ++# base.replaceInFile("v8/third_party/jinja2/tests.py", "from collections import Mapping", "try:\n from collections.abc import Mapping\nexcept ImportError:\n from collections import Mapping") + +- os.environ["PATH"] = base_dir + "/depot_tools" + os.pathsep + os.environ["PATH"] +- +- if ("windows" == base.host_platform()): +- base.set_env("DEPOT_TOOLS_WIN_TOOLCHAIN", "0") +- base.set_env("GYP_MSVS_VERSION", config.option("vs-version")) +- +- if not base.is_dir("v8"): +- base.cmd("./depot_tools/fetch", ["v8"], True) +- base.copy_dir("./v8/third_party", "./v8/third_party_new") +- if ("windows" == base.host_platform()): +- os.chdir("v8") +- base.cmd("git", ["config", "--system", "core.longpaths", "true"]) +- os.chdir("../") +- v8_branch_version = "remotes/branch-heads/8.9" +- if ("mac" == base.host_platform()): +- v8_branch_version = "remotes/branch-heads/9.9" +- base.cmd("./depot_tools/gclient", ["sync", "-r", v8_branch_version], True) +- base.cmd("gclient", ["sync", "--force"], True) +- base.copy_dir("./v8/third_party_new/ninja", "./v8/third_party/ninja") +- +- if ("windows" == base.host_platform()): +- base.replaceInFile("v8/build/config/win/BUILD.gn", ":static_crt", ":dynamic_crt") +- +- if not base.is_file("v8/src/base/platform/wrappers.cc"): +- base.writeFile("v8/src/base/platform/wrappers.cc", "#include \"src/base/platform/wrappers.h\"\n") +- +- if not base.is_file("v8/third_party/jinja2/tests.py.bak"): +- base.copy_file("v8/third_party/jinja2/tests.py", "v8/third_party/jinja2/tests.py.bak") +- base.replaceInFile("v8/third_party/jinja2/tests.py", "from collections import Mapping", "try:\n from collections.abc import Mapping\nexcept ImportError:\n from collections import Mapping") +- ++# ~/onlyoffice-documentserver-ports/work/DocumentServer-7.4.0/core/Common/3dParty/v8_89_89 ++ print(base_dir) + os.chdir("v8") + + gn_args = ["v8_static_library=true", +@@ -124,6 +126,10 @@ def make(): + "v8_use_external_startup_data=false", + "use_custom_libcxx=false", + "treat_warnings_as_errors=false"] ++ ++ if config.check_option("platform", "freebsd_64"): ++ base.cmd2("gn", ["gen", "out.gn/freebsd_64", "--args=\"v8_monolithic=true is_debug=false v8_static_library=true is_component_build=false is_clang=true use_sysroot=false treat_warnings_as_errors=false clang_use_chrome_plugins=false use_lld=true use_custom_libcxx=false v8_use_external_startup_data=false is_component_build=false\""]) ++ base.cmd("ninja", ["-C", "out.gn/freebsd_64"]) + + if config.check_option("platform", "linux_64"): + base.cmd2("gn", ["gen", "out.gn/linux_64", make_args(gn_args, "linux")]) diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_openssl_openssl.pri b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_openssl_openssl.pri new file mode 100644 index 000000000000..26a04e4d69b9 --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_openssl_openssl.pri @@ -0,0 +1,13 @@ +--- core/Common/3dParty/openssl/openssl.pri.orig 2023-06-14 14:31:26.960051000 +0200 ++++ core/Common/3dParty/openssl/openssl.pri 2023-06-14 14:31:00.960232000 +0200 +@@ -41,8 +41,8 @@ core_windows { + LIBS += $$OPENSSL_LIBS_DIRECTORY/libssl.lib + LIBS += $$OPENSSL_LIBS_DIRECTORY/libcrypto.lib + } else { +- LIBS += $$OPENSSL_LIBS_DIRECTORY/libssl.a +- LIBS += $$OPENSSL_LIBS_DIRECTORY/libcrypto.a ++ LIBS += %%LOCALBASE%%/lib/libssl.a ++ LIBS += %%LOCALBASE%%/lib/libcrypto.a + } + + INCLUDEPATH += $$OPENSSL_LIBS_DIRECTORY/../include diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8__89_v8_build_config_clang_BUILD.gn b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8__89_v8_build_config_clang_BUILD.gn new file mode 100644 index 000000000000..179516c183f5 --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8__89_v8_build_config_clang_BUILD.gn @@ -0,0 +1,11 @@ +Fix build with llvm16 + +--- core/Common/3dParty/v8_89/v8/build/config/clang/BUILD.gn.orig 2023-07-17 10:46:22.246271000 +0200 ++++ core/Common/3dParty/v8_89/v8/build/config/clang/BUILD.gn 2023-07-17 10:46:59.136940000 +0200 +@@ -38,5 +38,6 @@ config("extra_warnings") { + "-Wstring-conversion", + + "-Wtautological-overlap-compare", ++ "-Wno-error=enum-constexpr-conversion", + ] + } diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_BUILD.gn b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_BUILD.gn index 58cee3e59d4d..38cd088237a0 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_BUILD.gn +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_BUILD.gn @@ -1,32 +1,32 @@ ---- core/Common/3dParty/v8/v8/BUILD.gn.orig 2022-03-17 10:34:15 UTC -+++ core/Common/3dParty/v8/v8/BUILD.gn +--- core/Common/3dParty/v8_89/v8/BUILD.gn.orig 2022-03-17 10:34:15 UTC ++++ core/Common/3dParty/v8_89/v8/BUILD.gn @@ -5229,7 +5229,7 @@ v8_component("v8_libbase") { } } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-linux.cc", @@ -5246,6 +5246,12 @@ v8_component("v8_libbase") { ] libs = [ "dl" ] + } else if (is_bsd) { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-freebsd.cc", + ] + libs = [ "rt", "execinfo" ] } else if (is_android) { if (current_toolchain == host_toolchain) { libs = [ @@ -5769,6 +5775,7 @@ if (v8_monolithic) { ":v8_libplatform", "//build/win:default_exe_manifest", ] + libs = ["execinfo"] configs = [ ":internal_config" ] } diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_BUILD.gn b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_BUILD.gn index 8d2680ccd228..68ff5ecaa977 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_BUILD.gn +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_BUILD.gn @@ -1,30 +1,30 @@ ---- core/Common/3dParty/v8/v8/build/config/BUILD.gn.orig 2022-04-04 20:12:26 UTC -+++ core/Common/3dParty/v8/v8/build/config/BUILD.gn +--- core/Common/3dParty/v8_89/v8/build/config/BUILD.gn.orig 2022-04-04 20:12:26 UTC ++++ core/Common/3dParty/v8_89/v8/build/config/BUILD.gn @@ -121,7 +121,7 @@ config("debug") { # builds, and we have to tell it to turn it off. defines += [ "_HAS_ITERATOR_DEBUGGING=0" ] } - } else if ((is_linux || is_chromeos) && current_cpu == "x64" && + } else if ((is_linux || is_chromeos || is_bsd) && current_cpu == "x64" && enable_iterator_debugging) { # Enable libstdc++ debugging facilities to help catch problems early, see # http://crbug.com/65151 . @@ -220,9 +220,7 @@ config("default_libs") { ] } else if (is_linux || is_chromeos) { libs = [ - "dl", "pthread", - "rt", ] } } @@ -304,7 +302,7 @@ config("executable_config") { "//build/config/ios:ios_dynamic_flags", "//build/config/ios:ios_executable_flags", ] - } else if (is_linux || is_chromeos || is_android || current_os == "aix") { + } else if (is_linux || is_bsd || is_chromeos || is_android || current_os == "aix") { configs += [ "//build/config/gcc:executable_config" ] if (is_chromecast) { configs += [ "//build/config/chromecast:executable_config" ] diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_BUILDCONFIG.gn b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_BUILDCONFIG.gn index 836b52091431..6ce8277e5879 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_BUILDCONFIG.gn +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_BUILDCONFIG.gn @@ -1,48 +1,48 @@ ---- core/Common/3dParty/v8/v8/build/config/BUILDCONFIG.gn.orig 2021-11-15 18:52:18 UTC -+++ core/Common/3dParty/v8/v8/build/config/BUILDCONFIG.gn +--- core/Common/3dParty/v8_89/v8/build/config/BUILDCONFIG.gn.orig 2021-11-15 18:52:18 UTC ++++ core/Common/3dParty/v8_89/v8/build/config/BUILDCONFIG.gn @@ -130,8 +130,11 @@ declare_args() { # separate flags. is_official_build = false + # Whether we're a traditional desktop unix. + is_desktop_linux = current_os == "linux" || current_os == "freebsd" + # Set to true when compiling with the Clang compiler. - is_clang = current_os != "linux" || + is_clang = current_os != "linux" || current_os == "freebsd" || (current_cpu != "s390x" && current_cpu != "s390" && current_cpu != "ppc64" && current_cpu != "ppc" && current_cpu != "mips" && current_cpu != "mips64") @@ -194,8 +197,8 @@ if (host_toolchain == "") { # TODO(dpranke): Add some sort of assert here that verifies that # no toolchain omitted host_toolchain from its toolchain_args(). - if (host_os == "linux") { - if (target_os != "linux") { + if (host_os == "linux" || host_os == "freebsd") { + if (target_os != "linux" && target_os != "freebsd") { host_toolchain = "//build/toolchain/linux:clang_$host_cpu" } else if (is_clang) { host_toolchain = "//build/toolchain/linux:clang_$host_cpu" @@ -232,7 +235,7 @@ if (target_os == "android") { assert(host_os == "linux" || host_os == "mac", "Android builds are only supported on Linux and Mac hosts.") _default_toolchain = "//build/toolchain/android:android_clang_$target_cpu" -} else if (target_os == "chromeos" || target_os == "linux") { +} else if (target_os == "chromeos" || target_os == "linux" || target_os == "freebsd") { # See comments in build/toolchain/cros/BUILD.gn about board compiles. if (is_clang) { _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" @@ -296,10 +299,11 @@ is_ios = current_os == "ios" is_chromeos = current_os == "chromeos" is_fuchsia = current_os == "fuchsia" is_ios = current_os == "ios" -is_linux = current_os == "linux" +is_linux = current_os == "linux" || current_os == "freebsd" is_mac = current_os == "mac" is_nacl = current_os == "nacl" is_win = current_os == "win" || current_os == "winuwp" +is_bsd = current_os == "freebsd" is_apple = is_ios || is_mac is_posix = !is_win && !is_fuchsia diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_compiler_BUILD.gn b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_compiler_BUILD.gn index abe31fa962c0..cf77653a481b 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_compiler_BUILD.gn +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_compiler_BUILD.gn @@ -1,88 +1,88 @@ ---- core/Common/3dParty/v8/v8/build/config/compiler/BUILD.gn.orig 2022-04-04 20:12:27 UTC -+++ core/Common/3dParty/v8/v8/build/config/compiler/BUILD.gn +--- core/Common/3dParty/v8_89/v8/build/config/compiler/BUILD.gn.orig 2022-04-04 20:12:27 UTC ++++ core/Common/3dParty/v8_89/v8/build/config/compiler/BUILD.gn @@ -132,7 +132,7 @@ declare_args() { # # TODO(crbug.com/977230): Enabling this when 'use_xcode_clang' is true may # call an old clang that doesn't support auto-init. - init_stack_vars = !is_android && !use_xcode_clang + init_stack_vars = !is_android && !use_xcode_clang && !is_bsd # This argument is to control whether enabling text section splitting in the # final binary. When enabled, the separated text sections with prefix @@ -316,7 +316,7 @@ config("compiler") { } # Linker warnings. - if (fatal_linker_warnings && !is_apple && current_os != "aix") { + if (fatal_linker_warnings && !is_bsd && !is_apple && current_os != "aix") { ldflags += [ "-Wl,--fatal-warnings" ] } if (fatal_linker_warnings && is_apple) { @@ -501,7 +501,7 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } - if (is_clang && !is_nacl && !use_xcode_clang) { + if (is_clang && !is_nacl && !is_bsd && !use_xcode_clang) { cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] cflags += [ @@ -799,7 +799,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia) { + if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] } @@ -1149,7 +1149,7 @@ config("compiler_deterministic") { "-Xclang", ".", ] - if (!is_win) { + if (!is_win && !is_bsd) { # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167) asmflags = [ "-Wa,-fdebug-compilation-dir,." ] } @@ -1177,7 +1177,7 @@ config("clang_revision") { } config("clang_revision") { - if (is_clang && clang_base_path == default_clang_base_path) { + if (!is_bsd && is_clang && clang_base_path == default_clang_base_path) { update_args = [ "--print-revision", "--verify-version=$clang_version", @@ -1526,7 +1526,7 @@ config("default_warnings") { "-Wno-undefined-var-template", ] - if (is_win) { + if (is_win && !is_bsd) { # TODO(thakis): https://crbug.com/617318 # Currently goma can not handle case sensitiveness for windows well. cflags += [ "-Wno-nonportable-include-path" ] @@ -1780,7 +1780,7 @@ config("thin_archive") { config("thin_archive") { # The macOS and iOS default linker ld64 does not support reading thin # archives. - if ((is_posix && !is_nacl && (!is_apple || use_lld)) || is_fuchsia) { + if ((is_posix && !is_nacl && !is_bsd && (!is_apple || use_lld)) || is_fuchsia) { arflags = [ "-T" ] } else if (is_win && use_lld) { arflags = [ "/llvmlibthin" ] @@ -2321,11 +2321,11 @@ config("symbols") { # flag, so we can use use -g1 for pnacl and nacl-clang compiles. # gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang. if (!is_nacl || is_clang) { - cflags += [ "-g2" ] + cflags += [ "-g0" ] } # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. - if (is_clang && !is_nacl && !use_xcode_clang && !is_apple) { + if (is_clang && !is_nacl && !is_bsd && !use_xcode_clang && !is_apple) { cflags += [ "-Xclang", "-debug-info-kind=constructor", diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_compiler_compiler.gni b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_compiler_compiler.gni index 4e5e72619a5c..c30398cb2d33 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_compiler_compiler.gni +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_compiler_compiler.gni @@ -1,11 +1,11 @@ ---- core/Common/3dParty/v8/v8/build/config/compiler/compiler.gni.orig 2022-04-04 20:12:27 UTC -+++ core/Common/3dParty/v8/v8/build/config/compiler/compiler.gni +--- core/Common/3dParty/v8_89/v8/build/config/compiler/compiler.gni.orig 2022-04-04 20:12:27 UTC ++++ core/Common/3dParty/v8_89/v8/build/config/compiler/compiler.gni @@ -225,7 +225,7 @@ declare_args() { declare_args() { # Whether to use the gold linker from binutils instead of lld or bfd. - use_gold = !use_lld && !(is_chromecast && is_linux && + use_gold = !use_lld && !is_bsd && !(is_chromecast && is_linux && (current_cpu == "arm" || current_cpu == "mipsel")) && (((is_linux || is_chromeos_lacros) && (current_cpu == "x64" || current_cpu == "x86" || diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_features.gni b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_features.gni index 160a2db257bb..ab092315e9b7 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_features.gni +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_features.gni @@ -1,11 +1,11 @@ ---- core/Common/3dParty/v8/v8/build/config/features.gni.orig 2020-09-19 19:50:44 UTC -+++ core/Common/3dParty/v8/v8/build/config/features.gni +--- core/Common/3dParty/v8_89/v8/build/config/features.gni.orig 2020-09-19 19:50:44 UTC ++++ core/Common/3dParty/v8_89/v8/build/config/features.gni @@ -26,7 +26,7 @@ declare_args() { proprietary_codecs = is_chrome_branded || is_chromecast # libudev usage. This currently only affects the content layer. - use_udev = (is_linux || is_chromeos) && !is_chromecast + use_udev = (is_linux || is_chromeos) && !is_chromecast && !is_bsd use_dbus = (is_linux || is_chromeos) && !is_chromecast diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_freetype_freetype.gni b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_freetype_freetype.gni index fcaa76f9522a..7c59aafc8666 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_freetype_freetype.gni +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_freetype_freetype.gni @@ -1,9 +1,9 @@ ---- core/Common/3dParty/v8/v8/build/config/freetype/freetype.gni.orig 2019-03-18 08:59:45 UTC -+++ core/Common/3dParty/v8/v8/build/config/freetype/freetype.gni +--- core/Common/3dParty/v8_89/v8/build/config/freetype/freetype.gni.orig 2019-03-18 08:59:45 UTC ++++ core/Common/3dParty/v8_89/v8/build/config/freetype/freetype.gni @@ -10,5 +10,5 @@ declare_args() { # than version 2.7.1 and have color bitmap support compiled in. WARNING: # System FreeType configurations other than as described WILL INTRODUCE TEXT # RENDERING AND SECURITY REGRESSIONS. - use_system_freetype = false + use_system_freetype = true } diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_linux_BUILD.gn b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_linux_BUILD.gn index 38f6085039fc..af5f02c36117 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_linux_BUILD.gn +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_linux_BUILD.gn @@ -1,11 +1,11 @@ ---- core/Common/3dParty/v8/v8/build/config/linux/BUILD.gn.orig 2022-04-04 20:12:27 UTC -+++ core/Common/3dParty/v8/v8/build/config/linux/BUILD.gn +--- core/Common/3dParty/v8_89/v8/build/config/linux/BUILD.gn.orig 2022-04-04 20:12:27 UTC ++++ core/Common/3dParty/v8_89/v8/build/config/linux/BUILD.gn @@ -42,7 +42,7 @@ config("runtime_library") { if ((!(is_chromeos_ash || is_chromeos_lacros) || default_toolchain != "//build/toolchain/cros:target") && - (!use_custom_libcxx || current_cpu == "mipsel")) { + (!use_custom_libcxx || current_cpu == "mipsel") && !is_bsd) { libs = [ "atomic" ] } } diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_linux_pkg-config.py b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_linux_pkg-config.py index 08a8820cab7c..d0658973c8e5 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_linux_pkg-config.py +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_linux_pkg-config.py @@ -1,26 +1,26 @@ ---- core/Common/3dParty/v8/v8/build/config/linux/pkg-config.py.orig 2019-07-24 18:58:02 UTC -+++ core/Common/3dParty/v8/v8/build/config/linux/pkg-config.py +--- core/Common/3dParty/v8_89/v8/build/config/linux/pkg-config.py.orig 2019-07-24 18:58:02 UTC ++++ core/Common/3dParty/v8_89/v8/build/config/linux/pkg-config.py @@ -59,8 +59,12 @@ def SetConfigPath(options): print("You must specify an architecture via -a if using a sysroot.") sys.exit(1) - libdir = sysroot + '/usr/' + options.system_libdir + '/pkgconfig' - libdir += ':' + sysroot + '/usr/share/pkgconfig' + if "linux" in sys.platform: + libdir = sysroot + '/libdata/' + options.system_libdir + '/pkgconfig' + libdir += ':' + sysroot + '/usr/share/pkgconfig' + elif "bsd" in sys.platform: + libdir = sysroot + '/libdata/pkgconfig' + libdir += ':' + '/usr/libdata/pkgconfig' os.environ['PKG_CONFIG_LIBDIR'] = libdir return libdir @@ -109,7 +113,7 @@ def main(): # If this is run on non-Linux platforms, just return nothing and indicate # success. This allows us to "kind of emulate" a Linux build from other # platforms. - if "linux" not in sys.platform: + if "bsd" not in sys.platform: print("[[],[],[],[],[]]") return 0 diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_sysroot.gni b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_sysroot.gni index 05ddc510f9ac..6e1831303980 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_sysroot.gni +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_config_sysroot.gni @@ -1,14 +1,14 @@ ---- core/Common/3dParty/v8/v8/build/config/sysroot.gni.orig 2020-05-13 18:39:36 UTC -+++ core/Common/3dParty/v8/v8/build/config/sysroot.gni +--- core/Common/3dParty/v8_89/v8/build/config/sysroot.gni.orig 2020-05-13 18:39:36 UTC ++++ core/Common/3dParty/v8_89/v8/build/config/sysroot.gni @@ -21,9 +21,9 @@ declare_args() { # Controls default is_linux sysroot. If set to true, and sysroot # is empty, default sysroot is calculated. - use_sysroot = current_cpu == "x86" || current_cpu == "x64" || + use_sysroot = !is_bsd && (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm" || current_cpu == "arm64" || - current_cpu == "mipsel" || current_cpu == "mips64el" + current_cpu == "mipsel" || current_cpu == "mips64el") } if (sysroot == "") { diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_detect__host__arch.py b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_detect__host__arch.py index ab53692fd0ad..f72029dd3b48 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_detect__host__arch.py +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_detect__host__arch.py @@ -1,11 +1,11 @@ ---- core/Common/3dParty/v8/v8/build/detect_host_arch.py.orig 2019-07-24 18:58:02 UTC -+++ core/Common/3dParty/v8/v8/build/detect_host_arch.py +--- core/Common/3dParty/v8_89/v8/build/detect_host_arch.py.orig 2019-07-24 18:58:02 UTC ++++ core/Common/3dParty/v8_89/v8/build/detect_host_arch.py @@ -21,6 +21,8 @@ def HostArch(): host_arch = 'ia32' elif host_arch in ['x86_64', 'amd64']: host_arch = 'x64' + elif host_arch.startswith('arm64'): + host_arch = 'arm64' elif host_arch.startswith('arm'): host_arch = 'arm' elif host_arch.startswith('aarch64'): diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_gn__run__binary.py b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_gn__run__binary.py index 8d1f8b9fbb93..d0f0114b47ca 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_gn__run__binary.py +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_gn__run__binary.py @@ -1,11 +1,11 @@ ---- core/Common/3dParty/v8/v8/build/gn_run_binary.py.orig 2019-07-24 18:58:02 UTC -+++ core/Common/3dParty/v8/v8/build/gn_run_binary.py +--- core/Common/3dParty/v8_89/v8/build/gn_run_binary.py.orig 2019-07-24 18:58:02 UTC ++++ core/Common/3dParty/v8_89/v8/build/gn_run_binary.py @@ -24,7 +24,7 @@ if not os.path.isabs(path): # The rest of the arguments are passed directly to the executable. args = [path] + sys.argv[2:] -ret = subprocess.call(args) +ret = subprocess.call(args, env={"CHROME_EXE_PATH":"${WRKSRC}/out/Release/chrome"}) if ret != 0: if ret <= -100: # Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_chrome.map b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_chrome.map index 880f15207a36..2cb2da61edb2 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_chrome.map +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_chrome.map @@ -1,29 +1,29 @@ ---- core/Common/3dParty/v8/v8/build/linux/chrome.map.orig 2022-04-04 20:12:27 UTC -+++ core/Common/3dParty/v8/v8/build/linux/chrome.map +--- core/Common/3dParty/v8_89/v8/build/linux/chrome.map.orig 2022-04-04 20:12:27 UTC ++++ core/Common/3dParty/v8_89/v8/build/linux/chrome.map @@ -1,4 +1,7 @@ { +local: + *; + global: __bss_start; __data_start; @@ -20,6 +23,10 @@ global: # Program entry point. _start; + # FreeBSD specific variables. + __progname; + environ; + # Memory allocation symbols. We want chrome and any libraries to # share the same heap, so it is correct to export these symbols. aligned_alloc; @@ -84,7 +91,4 @@ global: localtime_r; v8dbg_*; - -local: - *; }; diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_libpci_BUILD.gn b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_libpci_BUILD.gn index d3f3e012600e..4b6cf812764d 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_libpci_BUILD.gn +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_libpci_BUILD.gn @@ -1,53 +1,53 @@ ---- core/Common/3dParty/v8/v8/build/linux/libpci/BUILD.gn.orig 2019-03-11 22:00:52 UTC -+++ core/Common/3dParty/v8/v8/build/linux/libpci/BUILD.gn +--- core/Common/3dParty/v8_89/v8/build/linux/libpci/BUILD.gn.orig 2019-03-11 22:00:52 UTC ++++ core/Common/3dParty/v8_89/v8/build/linux/libpci/BUILD.gn @@ -3,20 +3,36 @@ # found in the LICENSE file. import("//tools/generate_library_loader/generate_library_loader.gni") +import("//build/config/linux/pkg_config.gni") -# This generates a target named "libpci". -generate_library_loader("libpci") { - name = "LibPciLoader" - output_h = "libpci.h" - output_cc = "libpci_loader.cc" - header = "" +declare_args() { + use_system_libpci = is_bsd +} - functions = [ - "pci_alloc", - "pci_init", - "pci_cleanup", - "pci_scan_bus", - "pci_fill_info", - "pci_lookup_name", - ] +if (use_system_libpci) { + pkg_config("system_libpci") { + packages = [ "libpci" ] + } + + source_set("libpci") { + public_configs = [ ":system_libpci" ] + } + +} else { + # This generates a target named "libpci". + generate_library_loader("libpci") { + name = "LibPciLoader" + output_h = "libpci.h" + output_cc = "libpci_loader.cc" + header = "" + + functions = [ + "pci_alloc", + "pci_init", + "pci_cleanup", + "pci_scan_bus", + "pci_fill_info", + "pci_lookup_name", + ] + } } diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_unbundle_libusb.gn b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_unbundle_libusb.gn index f64c29f463f3..390c8deb9c80 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_unbundle_libusb.gn +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_unbundle_libusb.gn @@ -1,27 +1,27 @@ ---- core/Common/3dParty/v8/v8/build/linux/unbundle/libusb.gn.orig 2019-03-17 01:47:13 UTC -+++ core/Common/3dParty/v8/v8/build/linux/unbundle/libusb.gn +--- core/Common/3dParty/v8_89/v8/build/linux/unbundle/libusb.gn.orig 2019-03-17 01:47:13 UTC ++++ core/Common/3dParty/v8_89/v8/build/linux/unbundle/libusb.gn @@ -0,0 +1,24 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/linux/pkg_config.gni") +import("//build/shim_headers.gni") + +pkg_config("system_libusb") { + packages = [ "libusb-1.0" ] +} + +shim_headers("libusb_shim") { + root_path = "src/libusb" + headers = [ + "libusb.h", + ] +} + +source_set("libusb") { + deps = [ + ":libusb_shim", + ] + public_configs = [ ":system_libusb" ] +} diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_unbundle_replace__gn__files.py b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_unbundle_replace__gn__files.py index 45413173e126..435e558cf1d7 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_unbundle_replace__gn__files.py +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_linux_unbundle_replace__gn__files.py @@ -1,10 +1,10 @@ ---- core/Common/3dParty/v8/v8/build/linux/unbundle/replace_gn_files.py.orig 2021-11-15 18:52:18 UTC -+++ core/Common/3dParty/v8/v8/build/linux/unbundle/replace_gn_files.py +--- core/Common/3dParty/v8_89/v8/build/linux/unbundle/replace_gn_files.py.orig 2021-11-15 18:52:18 UTC ++++ core/Common/3dParty/v8_89/v8/build/linux/unbundle/replace_gn_files.py @@ -25,6 +25,7 @@ REPLACEMENTS = { 'libevent': 'base/third_party/libevent/BUILD.gn', 'libjpeg': 'third_party/libjpeg.gni', 'libpng': 'third_party/libpng/BUILD.gn', + 'libusb': 'third_party/libusb/BUILD.gn', 'libvpx': 'third_party/libvpx/BUILD.gn', 'libwebp': 'third_party/libwebp/BUILD.gn', 'libxml': 'third_party/libxml/BUILD.gn', diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_toolchain_gcc__toolchain.gni b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_toolchain_gcc__toolchain.gni index 66a13c0198c5..c36f3894d1c2 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_toolchain_gcc__toolchain.gni +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_toolchain_gcc__toolchain.gni @@ -1,45 +1,45 @@ ---- core/Common/3dParty/v8/v8/build/toolchain/gcc_toolchain.gni.orig 2022-04-04 20:12:27 UTC -+++ core/Common/3dParty/v8/v8/build/toolchain/gcc_toolchain.gni +--- core/Common/3dParty/v8_89/v8/build/toolchain/gcc_toolchain.gni.orig 2022-04-04 20:12:27 UTC ++++ core/Common/3dParty/v8_89/v8/build/toolchain/gcc_toolchain.gni @@ -51,6 +51,11 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # @@ -639,13 +644,23 @@ template("clang_toolchain") { } gcc_toolchain(target_name) { - prefix = rebase_path("$clang_base_path/bin", root_build_dir) - cc = "$prefix/clang" - cxx = "$prefix/clang++" - ld = cxx - readelf = "${toolprefix}readelf" - ar = "${prefix}/llvm-ar" - nm = "${toolprefix}nm" + if (is_bsd) { + prefix = "%%LOCALBASE%%/bin" + cc = "%%CC%%" + cxx = "%%CXX%%" + ld = cxx + readelf = "${prefix}/readelf" + ar = "llvm-ar" + nm = "${toolprefix}/nm" + } else { + prefix = rebase_path("$clang_base_path/bin", root_build_dir) + cc = "$prefix/clang" + cxx = "$prefix/clang++" + ld = cxx + readelf = "${prefix}/readelf" + ar = "${prefix}/llvm-ar" + nm = "${prefix}/llvm-nm" + } forward_variables_from(invoker, [ diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_toolchain_get__concurrent__links.py b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_toolchain_get__concurrent__links.py index d46057628a4c..1d97e76a118c 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_toolchain_get__concurrent__links.py +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_build_toolchain_get__concurrent__links.py @@ -1,17 +1,17 @@ ---- core/Common/3dParty/v8/v8/build/toolchain/get_concurrent_links.py.orig 2021-05-01 21:15:31 UTC -+++ core/Common/3dParty/v8/v8/build/toolchain/get_concurrent_links.py +--- core/Common/3dParty/v8_89/v8/build/toolchain/get_concurrent_links.py.orig 2021-05-01 21:15:31 UTC ++++ core/Common/3dParty/v8_89/v8/build/toolchain/get_concurrent_links.py @@ -53,6 +53,14 @@ def _GetTotalMemoryInBytes(): return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize'])) except Exception: return 0 + elif sys.platform.startswith('freebsd'): + try: + avail_bytes = int(subprocess.check_output(['sysctl', '-n', 'hw.physmem'])) + # With -fuse-lld it doesn't take a lot of ram, feel free to change that + # 1 * ... to needed amount + return max(1, avail_bytes / (1 * (2 ** 30))) # total / 4GB + except Exception: + return 1 # TODO(scottmg): Implement this for other platforms. return 0 diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_buildtools_third__party_libc++_BUILD.gn b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_buildtools_third__party_libc++_BUILD.gn index 0be4fc9ea074..8983a9eed281 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_buildtools_third__party_libc++_BUILD.gn +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_buildtools_third__party_libc++_BUILD.gn @@ -1,11 +1,11 @@ ---- core/Common/3dParty/v8/v8/buildtools/third_party/libc++/BUILD.gn.orig 2022-04-04 20:12:27 UTC -+++ core/Common/3dParty/v8/v8/buildtools/third_party/libc++/BUILD.gn +--- core/Common/3dParty/v8_89/v8/buildtools/third_party/libc++/BUILD.gn.orig 2022-04-04 20:12:27 UTC ++++ core/Common/3dParty/v8_89/v8/buildtools/third_party/libc++/BUILD.gn @@ -14,7 +14,7 @@ config("config") { # its implementation. cflags += [ "-Wno-macro-redefined" ] } else { - cflags += [ "-fPIC" ] + cflags += [ "-fPIC", "-I%%LOCALBASE%%/include" ] } } diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_include_v8config.h b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_include_v8config.h index 5a8395d7b39d..4159f3861fd4 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_include_v8config.h +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_include_v8config.h @@ -1,21 +1,21 @@ ---- core/Common/3dParty/v8/v8/include/v8config.h.orig 2022-03-17 10:34:15 UTC -+++ core/Common/3dParty/v8/v8/include/v8config.h +--- core/Common/3dParty/v8_89/v8/include/v8config.h.orig 2022-03-17 10:34:15 UTC ++++ core/Common/3dParty/v8_89/v8/include/v8config.h @@ -344,7 +344,18 @@ path. Add it with -I to the command line # define V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS \ (V8_HAS_CPP_ATTRIBUTE(no_unique_address)) +// Work around Clang bug present in 9.0.1, at least. +// +// Clang stores alignment as a 32-bit unsigned integer, but V8 only uses +// V8_ASSUME_ALIGNED() for a 4GB (2^32) alignment +// (kPtrComprIsolateRootAlignment). As such, the alignment overflows and +// becomes zero, triggering an internal Clang assertion that alignment must not +// be zero. +#if 0 # define V8_HAS_BUILTIN_ASSUME_ALIGNED (__has_builtin(__builtin_assume_aligned)) +#else +# define V8_HAS_BUILTIN_ASSUME_ALIGNED 0 +#endif # define V8_HAS_BUILTIN_BSWAP16 (__has_builtin(__builtin_bswap16)) # define V8_HAS_BUILTIN_BSWAP32 (__has_builtin(__builtin_bswap32)) # define V8_HAS_BUILTIN_BSWAP64 (__has_builtin(__builtin_bswap64)) diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_api_api.cc b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_api_api.cc index ad74151d748b..6936d9b93002 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_api_api.cc +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_api_api.cc @@ -1,11 +1,11 @@ ---- core/Common/3dParty/v8/v8/src/api/api.cc.orig 2022-03-17 10:34:15 UTC -+++ core/Common/3dParty/v8/v8/src/api/api.cc +--- core/Common/3dParty/v8_89/v8/src/api/api.cc.orig 2022-03-17 10:34:15 UTC ++++ core/Common/3dParty/v8_89/v8/src/api/api.cc @@ -5894,7 +5894,7 @@ bool v8::V8::Initialize(const int build_config) { return true; } -#if V8_OS_LINUX || V8_OS_MACOSX +#if V8_OS_LINUX || V8_OS_MACOSX || V8_OS_FREEBSD bool TryHandleWebAssemblyTrapPosix(int sig_code, siginfo_t* info, void* context) { #if V8_TARGET_ARCH_X64 && !V8_OS_ANDROID diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_cpu.cc b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_cpu.cc index 648ea31f6aa9..88a1f88fa188 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_cpu.cc +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_cpu.cc @@ -1,18 +1,18 @@ ---- core/Common/3dParty/v8/v8/src/base/cpu.cc.orig 2022-03-17 10:34:15 UTC -+++ core/Common/3dParty/v8/v8/src/base/cpu.cc +--- core/Common/3dParty/v8_89/v8/src/base/cpu.cc.orig 2022-03-17 10:34:15 UTC ++++ core/Common/3dParty/v8_89/v8/src/base/cpu.cc @@ -581,6 +581,7 @@ CPU::CPU() #if V8_OS_LINUX +#if V8_OS_LINUX CPUInfo cpu_info; // Extract implementor from the "CPU implementer" field. @@ -614,6 +615,7 @@ CPU::CPU() } delete[] part; } +#endif // Extract architecture from the "CPU Architecture" field. // The list is well-known, unlike the the output of diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_platform_platform-freebsd.cc b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_platform_platform-freebsd.cc index 143f7a670854..c0ad30878025 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_platform_platform-freebsd.cc +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_platform_platform-freebsd.cc @@ -1,13 +1,13 @@ ---- core/Common/3dParty/v8/v8/src/base/platform/platform-freebsd.cc.orig 2021-04-22 15:00:28 UTC -+++ core/Common/3dParty/v8/v8/src/base/platform/platform-freebsd.cc +--- core/Common/3dParty/v8_89/v8/src/base/platform/platform-freebsd.cc.orig 2021-04-22 15:00:28 UTC ++++ core/Common/3dParty/v8_89/v8/src/base/platform/platform-freebsd.cc @@ -82,8 +82,8 @@ std::vector OS::GetSharedLib lib_name = std::string(path); } result.push_back(SharedLibraryAddress( - lib_name, reinterpret_cast(map->kve_start), - reinterpret_cast(map->kve_end))); + lib_name, static_cast(map->kve_start), + static_cast(map->kve_end))); } start += ssize; diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_platform_platform-posix.cc b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_platform_platform-posix.cc index 8f7e20daeee8..818fc45bc818 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_platform_platform-posix.cc +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_base_platform_platform-posix.cc @@ -1,24 +1,24 @@ ---- core/Common/3dParty/v8/v8/src/base/platform/platform-posix.cc.orig 2022-03-17 10:34:15 UTC -+++ core/Common/3dParty/v8/v8/src/base/platform/platform-posix.cc +--- core/Common/3dParty/v8_89/v8/src/base/platform/platform-posix.cc.orig 2022-03-17 10:34:15 UTC ++++ core/Common/3dParty/v8_89/v8/src/base/platform/platform-posix.cc @@ -464,7 +464,7 @@ bool OS::HasLazyCommits() { // static bool OS::HasLazyCommits() { -#if V8_OS_AIX || V8_OS_LINUX || V8_OS_MACOSX +#if V8_OS_AIX || V8_OS_LINUX || V8_OS_MACOSX || V8_OS_FREEBSD return true; #else // TODO(bbudge) Return true for all POSIX platforms. @@ -595,6 +595,12 @@ int OS::GetCurrentThreadId() { return static_cast(syscall(__NR_gettid)); #elif V8_OS_ANDROID return static_cast(gettid()); +#elif V8_OS_DRAGONFLYBSD || defined(__DragonFly__) + return static_cast(lwp_gettid()); +#elif V8_OS_FREEBSD + return static_cast(pthread_getthreadid_np()); +#elif V8_OS_NETBSD + return static_cast(_lwp_self()); #elif V8_OS_AIX return static_cast(thread_self()); #elif V8_OS_FUCHSIA diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_d8_d8-posix.cc b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_d8_d8-posix.cc index c2ac8ec9f248..7c8d23f36bef 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_d8_d8-posix.cc +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_src_d8_d8-posix.cc @@ -1,19 +1,19 @@ ---- core/Common/3dParty/v8/v8/src/d8/d8-posix.cc.orig 2020-06-13 18:02:18 UTC -+++ core/Common/3dParty/v8/v8/src/d8/d8-posix.cc +--- core/Common/3dParty/v8_89/v8/src/d8/d8-posix.cc.orig 2020-06-13 18:02:18 UTC ++++ core/Common/3dParty/v8_89/v8/src/d8/d8-posix.cc @@ -4,6 +4,8 @@ #include #include +#include +#include #include #include #include @@ -12,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_testing_gmock_BUILD.gn b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_testing_gmock_BUILD.gn index 4e1a5df727e5..6cc129f1398e 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_testing_gmock_BUILD.gn +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_testing_gmock_BUILD.gn @@ -1,22 +1,22 @@ ---- core/Common/3dParty/v8/v8/testing/gmock/BUILD.gn.orig 2022-05-13 18:53:22.198863000 +0200 -+++ core/Common/3dParty/v8/v8/testing/gmock/BUILD.gn 2022-05-13 18:53:05.169357000 +0200 +--- core/Common/3dParty/v8_89/v8/testing/gmock/BUILD.gn.orig 2022-05-13 18:53:22.198863000 +0200 ++++ core/Common/3dParty/v8_89/v8/testing/gmock/BUILD.gn 2022-05-13 18:53:05.169357000 +0200 @@ -15,12 +15,13 @@ source_set("gmock") { "include/gmock/gmock-matchers.h", "include/gmock/gmock.h", ] - deps = [ "//third_party/googletest:gmock" ] - - public_configs = [ - "//third_party/googletest:gmock_config", - "//third_party/googletest:gtest_config", - ] +# deps = [ "//third_party/googletest:gmock" ] +# +# public_configs = [ +# "//third_party/googletest:gmock_config", +# "//third_party/googletest:gtest_config", +# ] +public_deps = [ "//third_party/googletest:gmock" ] } # The file/directory layout of Google Test is not yet considered stable. Until diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_third__party_zlib_BUILD.gn b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_third__party_zlib_BUILD.gn index fbe2eb2138f4..ff98f579fb80 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_third__party_zlib_BUILD.gn +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_third__party_zlib_BUILD.gn @@ -1,11 +1,11 @@ ---- core/Common/3dParty/v8/v8/third_party/zlib/BUILD.gn.orig 2020-11-16 13:31:04 UTC -+++ core/Common/3dParty/v8/v8/third_party/zlib/BUILD.gn +--- core/Common/3dParty/v8_89/v8/third_party/zlib/BUILD.gn.orig 2020-11-16 13:31:04 UTC ++++ core/Common/3dParty/v8_89/v8/third_party/zlib/BUILD.gn @@ -108,6 +108,8 @@ if (use_arm_neon_optimizations) { defines = [ "CRC32_ARMV8_CRC32" ] if (is_android) { defines += [ "ARMV8_OS_ANDROID" ] + } else if (is_bsd) { + defines += [ "ARMV8_OS_FREEBSD" ] } else if (is_linux || is_chromeos) { defines += [ "ARMV8_OS_LINUX" ] } else if (is_mac) { diff --git a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_third__party_zlib_cpu__features.c b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_third__party_zlib_cpu__features.c index 70ed82e79c34..84d8d25891a7 100644 --- a/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_third__party_zlib_cpu__features.c +++ b/www/onlyoffice-documentserver/files/patch-core_Common_3dParty_v8_v8_third__party_zlib_cpu__features.c @@ -1,48 +1,48 @@ ---- core/Common/3dParty/v8/v8/third_party/zlib/cpu_features.c.orig 2020-11-16 13:31:04 UTC -+++ core/Common/3dParty/v8/v8/third_party/zlib/cpu_features.c +--- core/Common/3dParty/v8_89/v8/third_party/zlib/cpu_features.c.orig 2020-11-16 13:31:04 UTC ++++ core/Common/3dParty/v8_89/v8/third_party/zlib/cpu_features.c @@ -31,11 +31,20 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 0; #ifndef CPU_NO_SIMD -#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) +#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_FUCHSIA) || defined(ARMV8_OS_FREEBSD) #include #endif -#if defined(ARMV8_OS_ANDROID) +#if defined(ARMV8_OS_FREEBSD) +#include +#include +#ifndef ID_AA64ISAR0_AES_VAL +#define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES +#endif +#ifndef ID_AA64ISAR0_CRC32_VAL +#define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 +#endif +#elif defined(ARMV8_OS_ANDROID) #include #elif defined(ARMV8_OS_LINUX) #include @@ -56,7 +65,7 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 0; static void _cpu_check_features(void); #endif -#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_MACOS) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS) +#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_MACOS) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS) || defined(ARMV8_OS_FREEBSD) #if !defined(ARMV8_OS_MACOS) // _cpu_check_features() doesn't need to do anything on mac/arm since all // features are known at build time, so don't call it. @@ -123,6 +132,13 @@ static void _cpu_check_features(void) #elif defined(ARMV8_OS_WINDOWS) arm_cpu_enable_crc32 = IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE); arm_cpu_enable_pmull = IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE); +#elif defined(ARMV8_OS_FREEBSD) + uint64_t id_aa64isar0; + id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); + if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) + arm_cpu_enable_pmull = 1; + if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) + arm_cpu_enable_crc32 = 1; #endif } #endif diff --git a/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_doctrenderer_doctrenderer.pro b/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_doctrenderer_doctrenderer.pro index 65b767b6f979..a4afbdf65baf 100644 --- a/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_doctrenderer_doctrenderer.pro +++ b/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_doctrenderer_doctrenderer.pro @@ -1,13 +1,13 @@ --- core/DesktopEditor/doctrenderer/doctrenderer.pro.orig 2021-09-30 12:13:32 UTC -+++ core/DesktopEditor/doctrenderer/doctrenderer.pro -@@ -65,6 +65,10 @@ SOURCES += \ - embed/NativeControlEmbed.cpp \ - embed/NativeBuilderEmbed.cpp ++++ core/DesktopEditor/doctrenderer/doctrenderer.pro 2021-09-30 12:13:32 UTC +@@ -18,6 +18,10 @@ core_android:DEFINES += DISABLE_MEMORY_LIMITATION + #CONFIG += build_xp + core_android:DEFINES += DISABLE_MEMORY_LIMITATION +core_freebsd { + LIBS += -lexecinfo +} + - core_mac { - !use_v8:CONFIG += use_javascript_core - } + HEADERS += \ + config.h \ + doctrenderer.h \ diff --git a/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_doctrenderer_hash.cpp b/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_doctrenderer_hash.cpp new file mode 100644 index 000000000000..c0d1ba12e105 --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_doctrenderer_hash.cpp @@ -0,0 +1,67 @@ +--- core/DesktopEditor/doctrenderer/hash.cpp.orig 2023-06-14 12:14:26.656325000 +0200 ++++ core/DesktopEditor/doctrenderer/hash.cpp 2023-06-14 14:23:39.149523000 +0200 +@@ -4,12 +4,12 @@ + #include "../common/Base64.h" + #endif + +-#include "openssl/sha.h" +-#include "openssl/md2.h" +-#include "openssl/md4.h" +-#include "openssl/md5.h" +-#include "openssl/whrlpool.h" +-#include "openssl/ripemd.h" ++#include ++#include ++#include ++#include ++#include ++#include + + #include + #include +@@ -37,6 +37,7 @@ unsigned char* CHash::hash(const unsigned char* data, + + switch (alg) + { ++#if 0 + case haMD2: + { + nBufLen = 16; +@@ -44,6 +45,7 @@ unsigned char* CHash::hash(const unsigned char* data, + MD2(data, d, pBufData); + break; + } ++#endif + case haMD4: + { + nBufLen = 16; +@@ -246,11 +248,13 @@ void hash_iteration(unsigned char*& input, int iter, u + + switch (alg) + { ++#if 0 + case CHash::haMD2: + { + MD2(input, alg_size + 4, tmp); + break; + } ++#endif + case CHash::haMD4: + { + MD4(input, alg_size + 4, tmp); +@@ -319,6 +323,7 @@ unsigned char* CHash::hash2(const char* password, cons + unsigned char* pBuffer1 = NULL; + switch (alg) + { ++#if 0 + case haMD2: + { + alg_size = 16; +@@ -326,6 +331,7 @@ unsigned char* CHash::hash2(const char* password, cons + MD2(inputData, inputDataLen, pBuffer1); + break; + } ++#endif + case haMD4: + { + alg_size = 16; diff --git a/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_pluginsmanager_main.cpp b/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_pluginsmanager_main.cpp new file mode 100644 index 000000000000..0388d97191e9 --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_pluginsmanager_main.cpp @@ -0,0 +1,20 @@ +--- core/DesktopEditor/pluginsmanager/main.cpp.orig 2023-06-19 10:50:14.262222000 +0200 ++++ core/DesktopEditor/pluginsmanager/main.cpp 2023-06-19 10:50:48.083404000 +0200 +@@ -52,7 +52,7 @@ + #undef GetTempPath + #endif + +-#ifdef LINUX ++#if defined(LINUX) || defined(__FreeBSD__) + #include + #include + #endif +@@ -270,7 +270,7 @@ class CPluginsManager (public) + + m_sSettingsDir = NSSystemUtils::GetAppDataDir() + L"/pluginsmanager"; + +-#ifdef LINUX ++#if defined(LINUX) || defined(__FreeBSD__) + // GetAppDataDir creates folder with ONLYOFFICE on Linux + // as result - two folders in lower/upper case, working with the correct folder + NSStringUtils::string_replace(m_sSettingsDir, L"ONLYOFFICE", L"onlyoffice"); diff --git a/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_xmlsec_test_OpenSSL__gui__test_OpenSSL__gui__test.pro b/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_xmlsec_test_OpenSSL__gui__test_OpenSSL__gui__test.pro deleted file mode 100644 index d427bb54e110..000000000000 --- a/www/onlyoffice-documentserver/files/patch-core_DesktopEditor_xmlsec_test_OpenSSL__gui__test_OpenSSL__gui__test.pro +++ /dev/null @@ -1,13 +0,0 @@ ---- core/DesktopEditor/xmlsec/test/OpenSSL_gui_test/OpenSSL_gui_test.pro.orig 2021-09-30 12:13:32 UTC -+++ core/DesktopEditor/xmlsec/test/OpenSSL_gui_test/OpenSSL_gui_test.pro -@@ -19,6 +19,10 @@ CORE_ROOT_DIR = $$PWD/../../../.. - PWD_ROOT_DIR = $$PWD - include($$CORE_ROOT_DIR/Common/base.pri) - -+core_freebsd { -+ QMAKE_LFLAGS += -Wl,--rpath=./ -+} -+ - core_linux { - QMAKE_LFLAGS += -Wl,--rpath=./ - QMAKE_LFLAGS += -static-libstdc++ -static-libgcc diff --git a/www/onlyoffice-documentserver/files/patch-core_MsBinaryFile_Common_Vml_PPTShape_BinaryReader.h b/www/onlyoffice-documentserver/files/patch-core_MsBinaryFile_Common_Vml_PPTShape_BinaryReader.h deleted file mode 100644 index cf4c872ff299..000000000000 --- a/www/onlyoffice-documentserver/files/patch-core_MsBinaryFile_Common_Vml_PPTShape_BinaryReader.h +++ /dev/null @@ -1,11 +0,0 @@ ---- core/MsBinaryFile/Common/Vml/PPTShape/BinaryReader.h.orig 2023-02-13 15:04:35.201745000 +0100 -+++ core/MsBinaryFile/Common/Vml/PPTShape/BinaryReader.h 2023-02-13 15:04:55.225670000 +0100 -@@ -30,7 +30,7 @@ - * - */ - #pragma once --#include "../../../../../../DesktopEditor/common/Types.h" -+#include "../../../../DesktopEditor/common/Types.h" - - namespace ODRAW - { diff --git a/www/onlyoffice-documentserver/files/patch-core_OOXML_Binary_Sheets_Reader_ChartFromToBinary.cpp b/www/onlyoffice-documentserver/files/patch-core_OOXML_Binary_Sheets_Reader_ChartFromToBinary.cpp new file mode 100644 index 000000000000..839338642d3b --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-core_OOXML_Binary_Sheets_Reader_ChartFromToBinary.cpp @@ -0,0 +1,11 @@ +--- core/OOXML/Binary/Sheets/Reader/ChartFromToBinary.cpp.orig 2023-06-14 14:53:55.376306000 +0200 ++++ core/OOXML/Binary/Sheets/Reader/ChartFromToBinary.cpp 2023-06-14 14:54:16.425588000 +0200 +@@ -10010,7 +10010,7 @@ namespace BinXlsxRW + WriteCT_String(*oVal.m_gapDepth); + m_oBcw.WriteItemEnd(nCurPos); + } +- if (NULL != oVal.m_shape.IsInit()) ++ if (0 != oVal.m_shape.IsInit()) + { + int nCurPos = m_oBcw.WriteItemStart(c_oserct_bar3dchartSHAPE); + WriteCT_Shape(*oVal.m_shape); diff --git a/www/onlyoffice-documentserver/files/patch-core_OOXML_PPTXFormat_DrawingConverter_ASCOfficeDrawingConverter.cpp b/www/onlyoffice-documentserver/files/patch-core_OOXML_PPTXFormat_DrawingConverter_ASCOfficeDrawingConverter.cpp new file mode 100644 index 000000000000..9ba94047b9f3 --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-core_OOXML_PPTXFormat_DrawingConverter_ASCOfficeDrawingConverter.cpp @@ -0,0 +1,16 @@ +--- core/OOXML/PPTXFormat/DrawingConverter/ASCOfficeDrawingConverter.cpp.orig 2023-06-14 14:39:19.258894000 +0200 ++++ core/OOXML/PPTXFormat/DrawingConverter/ASCOfficeDrawingConverter.cpp 2023-06-14 14:49:20.247098000 +0200 +@@ -1928,11 +1928,11 @@ bool CDrawingConverter::ParceObject(const std::wstring + { + XmlUtils::CXmlNode oMainNode; + if (!oMainNode.FromXmlString(strXml)) +- return NULL; ++ return 0; + + XmlUtils::CXmlNodes oNodes; + if (!oMainNode.GetNodes(L"*", oNodes)) +- return NULL; ++ return 0; + + m_pBinaryWriter->StartRecord(0); + m_pBinaryWriter->ClearCurShapePositionAndSizes(); diff --git a/www/onlyoffice-documentserver/files/patch-core_OOXML_XlsxFormat_Chart_ChartSerialize.cpp b/www/onlyoffice-documentserver/files/patch-core_OOXML_XlsxFormat_Chart_ChartSerialize.cpp new file mode 100644 index 000000000000..3e627ca23ed7 --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-core_OOXML_XlsxFormat_Chart_ChartSerialize.cpp @@ -0,0 +1,11 @@ +--- core/OOXML/XlsxFormat/Chart/ChartSerialize.cpp.orig 2023-06-14 14:33:42.265435000 +0200 ++++ core/OOXML/XlsxFormat/Chart/ChartSerialize.cpp 2023-06-14 14:33:54.354616000 +0200 +@@ -1282,7 +1282,7 @@ xmlns:c16r2=\"http://schemas.microsoft.com/office/draw + { + writer.WriteString(L"<"); + writer.WriteString(sNodeName); +- if (NULL != m_l.IsInit()) ++ if (0 != m_l.IsInit()) + { + WritingStringAttrDouble(L"l", *m_l); + } diff --git a/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-generate-allfonts.sh.m4 b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-generate-allfonts.sh.m4 index 326ad8af146b..6b4405573867 100644 --- a/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-generate-allfonts.sh.m4 +++ b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-generate-allfonts.sh.m4 @@ -1,14 +1,35 @@ ---- document-server-package/common/documentserver/bin/documentserver-generate-allfonts.sh.m4.orig 2022-01-19 20:22:54 UTC +--- document-server-package/common/documentserver/bin/documentserver-generate-allfonts.sh.m4.orig 2023-06-20 13:47:11 UTC +++ document-server-package/common/documentserver/bin/documentserver-generate-allfonts.sh.m4 +@@ -5,7 +5,7 @@ fi + ONLYOFFICE_DATA_CONTAINER=$1 + fi + +-DIR="/var/www/M4_DS_PREFIX" ++DIR="%%LOCALBASE%%/www/M4_DS_PREFIX" + + #Start generate AllFonts.js, font thumbnails and font_selection.bin + echo -n Generating AllFonts.js, please wait... @@ -49,11 +49,6 @@ echo Done echo Done -# Setting user rights for files created in the previous steps -chown -R ds:ds "$DIR/sdkjs" -chown -R ds:ds "$DIR/server/FileConverter/bin" -chown -R ds:ds "$DIR/fonts" - #Remove gzipped files rm -f \ $DIR/fonts/*.gz \ +@@ -62,10 +57,7 @@ if [ "$ONLYOFFICE_DATA_CONTAINER" != "true" ]; then + + #Restart web-site and converter + if [ "$ONLYOFFICE_DATA_CONTAINER" != "true" ]; then +- if pgrep -x ""systemd"" >/dev/null; then +- systemctl restart ds-docservice +- systemctl restart ds-converter +- elif pgrep -x ""supervisord"" >/dev/null; then ++ if pgrep -f "supervisord" >/dev/null; then + supervisorctl restart ds:docservice + supervisorctl restart ds:converter + fi diff --git a/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-jwt-status.sh.m4 b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-jwt-status.sh.m4 new file mode 100644 index 000000000000..818dc0efd881 --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-jwt-status.sh.m4 @@ -0,0 +1,39 @@ +--- document-server-package/common/documentserver/bin/documentserver-jwt-status.sh.m4.orig 2023-06-20 13:37:09 UTC ++++ document-server-package/common/documentserver/bin/documentserver-jwt-status.sh.m4 +@@ -1,27 +1,27 @@ +-#!/bin/bash ++#!/bin/sh + +-[ $(id -u) -ne 0 ] && { echo "Root privileges required"; exit 1; } ++[ "$(id -u)" -ne 0 ] && { echo "Root privileges required"; exit 1; } + +-CONF_DIR="/etc/M4_DS_PREFIX" +-DIR="/var/www/M4_DS_PREFIX" ++CONF_DIR="%%LOCALBASE%%/etc/M4_DS_PREFIX" ++DIR="%%LOCALBASE%%/www/M4_DS_PREFIX" + + LOCAL_CONFIG="${CONF_DIR}/local.json" + DEFAULT_CONFIG="${CONF_DIR}/default.json" +-Configs=("$LOCAL_CONFIG" "$DEFAULT_CONFIG") ++Configs="$LOCAL_CONFIG $DEFAULT_CONFIG" + + JSON_BIN="$DIR/npm/json" + +-for i in "${!Configs[@]}"; ++for i in ${Configs}; + do +- if [ -f ${Configs[$i]} ]; then +- JSON="$JSON_BIN -f ${Configs[$i]}" ++ if [ -f "${i}" ]; then ++ JSON="$JSON_BIN -f ${i}" + JWT_ENABLED=$($JSON "services.CoAuthoring.token.enable.request.inbox") + JWT_SECRET=$($JSON "services.CoAuthoring.secret.inbox.string") + JWT_HEADER=$($JSON "services.CoAuthoring.token.inbox.header") + if [ -n "$JWT_ENABLED" ]; then + echo "Your JWT settings:" + echo "JWT enabled - $JWT_ENABLED" +- if [ $JWT_ENABLED = "true" ]; then ++ if [ "${JWT_ENABLED}" = "true" ]; then + echo "JWT secret - $JWT_SECRET" + echo "JWT header - $JWT_HEADER" + fi diff --git a/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-pluginsmanager.sh.m4 b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-pluginsmanager.sh.m4 new file mode 100644 index 000000000000..416e2489db6d --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-pluginsmanager.sh.m4 @@ -0,0 +1,50 @@ +--- document-server-package/common/documentserver/bin/documentserver-pluginsmanager.sh.m4.orig 2023-06-20 13:51:11 UTC ++++ document-server-package/common/documentserver/bin/documentserver-pluginsmanager.sh.m4 +@@ -1,33 +1,32 @@ +-#!/bin/bash ++#!/bin/sh + +-[ $(id -u) -ne 0 ] && { echo "Root privileges required"; exit 1; } ++[ "$(id -u)" -ne 0 ] && { echo "Root privileges required"; exit 1; } + +-while [ "$1" != "" ]; do ++while [ $# -gt 0 ]; do + case $1 in +- + -r | --restart ) +- if [ "$2" != "" ]; then ++ if [ "$2" = "true" ] || [ "$2" = "false" ]; then + RESTART_CONDITION=$2 + shift + fi ++ shift + ;; +- +- * ) args+=("$1"); ++ ++ *) ++ break ++ ;; + esac +- shift + done + +-PLUGIN_MANAGER="/var/www/M4_DS_PREFIX/server/tools/pluginsmanager" +-PLUGIN_DIR="/var/www/M4_DS_PREFIX/sdkjs-plugins/" ++PLUGIN_MANAGER="%%LOCALBASE%%/www/M4_DS_PREFIX/server/tools/pluginsmanager" ++PLUGIN_DIR="%%LOCALBASE%%/www/M4_DS_PREFIX/sdkjs-plugins/" + +-"${PLUGIN_MANAGER}" --directory=\"${PLUGIN_DIR}\" "${args[@]}" ++"${PLUGIN_MANAGER}" --directory=\"${PLUGIN_DIR}\" "$@" + +-chown -R ds:ds "${PLUGIN_DIR}" ++chown -R onlyoffice:onlyoffice "${PLUGIN_DIR}" + + if [ "$RESTART_CONDITION" != "false" ]; then +- if pgrep -x ""systemd"" >/dev/null; then +- systemctl restart ds-docservice +- elif pgrep -x ""supervisord"" >/dev/null; then ++ if pgrep -f "supervisord" >/dev/null; then + supervisorctl restart ds:docservice + fi + fi diff --git a/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-static-gzip.sh.m4 b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-static-gzip.sh.m4 new file mode 100644 index 000000000000..565153f55c2d --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-static-gzip.sh.m4 @@ -0,0 +1,28 @@ +--- document-server-package/common/documentserver/bin/documentserver-static-gzip.sh.m4.orig 2023-06-20 13:45:17 UTC ++++ document-server-package/common/documentserver/bin/documentserver-static-gzip.sh.m4 +@@ -1,18 +1,18 @@ +-#!/bin/bash ++#!/bin/sh + +-DIR="/var/www/M4_DS_PREFIX" +-NGINX_ONLYOFFICE_PATH="/etc/M4_DS_PREFIX/nginx" ++DIR="%%LOCALBASE%%/www/M4_DS_PREFIX" ++NGINX_ONLYOFFICE_PATH="%%LOCALBASE%%/etc/M4_DS_PREFIX/nginx" + +-cd ${DIR} ++cd ${DIR} || exit 1 + # Make gziped scripts +-find ./sdkjs ./web-apps ./sdkjs-plugins -type f \( -name *.js -o -name *.json -o -name *.htm -o -name *.html -o -name *.css \) -exec gzip -kf9 {} \; ++find ./sdkjs ./web-apps ./sdkjs-plugins -type f \( -name "*.js" -o -name "*.json" -o -name "*.htm" -o -name "*.html" -o -name "*.css" \) -exec gzip -kf9 {} \; + + # Make gziped fonts + find ./fonts -type f ! -name "*.*" -exec gzip -kf9 {} \; + + # Turn on static gzip for nginx +-sed 's/#*\s*\(gzip_static\).*/\1 on;/g' \ ++gsed 's/#*\s*\(gzip_static\).*/\1 on;/g' \ + -i ${NGINX_ONLYOFFICE_PATH}/includes/ds-docservice.conf + + # Reload nginx config +-[ $(pgrep -x ""systemd"" | wc -l) -gt 0 ] && systemctl reload nginx || service nginx reload ++service nginx reload diff --git a/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-update-securelink.sh.m4 b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-update-securelink.sh.m4 new file mode 100644 index 000000000000..c6b60908149a --- /dev/null +++ b/www/onlyoffice-documentserver/files/patch-document-server-package_common_documentserver_bin_documentserver-update-securelink.sh.m4 @@ -0,0 +1,65 @@ +--- document-server-package/common/documentserver/bin/documentserver-update-securelink.sh.m4.orig 2023-06-20 13:50:40 UTC ++++ document-server-package/common/documentserver/bin/documentserver-update-securelink.sh.m4 +@@ -1,24 +1,24 @@ + #!/bin/sh + +-while [ "$1" != "" ]; do ++while [ $# -gt 0 ]; do + case $1 in +- + -s | --secure_link_secret ) + if [ "$2" != "" ]; then + SECURE_LINK_SECRET=$2 + shift + fi ++ shift + ;; + + -r | --restart ) +- if [ "$2" != "" ]; then ++ if [ "$2" = "true" ] || [ "$2" = "false" ]; then + RESTART_CONDITION=$2 + shift + fi ++ shift + ;; + +- +- -? | -h | --help ) ++ -h | --help ) + echo " Usage $0 [PARAMETER] [[PARAMETER], ...]" + echo " Parameters:" + echo " -s, --secure_link_secret setting for secret string " +@@ -26,26 +26,21 @@ while [ "$1" != "" ]; do + echo + exit 0 + ;; +- + esac + shift + done + +-NGINX_CONF=/etc/M4_DS_PREFIX/nginx/ds.conf +-LOCAL_CONF=/etc/M4_DS_PREFIX/local.json +-JSON="/var/www/M4_DS_PREFIX/npm/json -q -f ${LOCAL_CONF}" ++NGINX_CONF=%%LOCALBASE%%/etc/M4_DS_PREFIX/nginx/ds.conf ++LOCAL_CONF=%%LOCALBASE%%/etc/M4_DS_PREFIX/local.json ++JSON="%%LOCALBASE%%/www/M4_DS_PREFIX/npm/json -q -f ${LOCAL_CONF}" + + SECURE_LINK_SECRET=${SECURE_LINK_SECRET:-$(pwgen -s 20)} + +-sed "s,\(set \+\$secure_link_secret\).*,\1 "${SECURE_LINK_SECRET}";," -i ${NGINX_CONF} +-${JSON} -I -e 'this.storage={fs: {secretString: "'${SECURE_LINK_SECRET}'" }}' && chown ds:ds $LOCAL_CONF ++gsed "s,\(set \+\$secure_link_secret\).*,\1 ""${SECURE_LINK_SECRET}"";," -i ${NGINX_CONF} ++${JSON} -I -e 'this.storage={fs: {secretString: "'${SECURE_LINK_SECRET}'" }}' && chown onlyoffice:onlyoffice $LOCAL_CONF + + if [ "$RESTART_CONDITION" != "false" ]; then +- if pgrep -x ""systemd"" >/dev/null; then +- systemctl restart ds-docservice +- systemctl restart ds-converter +- systemctl reload nginx +- elif pgrep -x ""supervisord"" >/dev/null; then ++ if pgrep -f "supervisord" >/dev/null; then + supervisorctl restart ds:docservice + supervisorctl restart ds:converter + service nginx reload diff --git a/www/onlyoffice-documentserver/files/pkg-message.in b/www/onlyoffice-documentserver/files/pkg-message.in index c886b84dc9a8..7c4bb47db484 100644 --- a/www/onlyoffice-documentserver/files/pkg-message.in +++ b/www/onlyoffice-documentserver/files/pkg-message.in @@ -1,91 +1,94 @@ [ { type: install message: <