[Bug 294028] www/onlyoffice-documentserver: Upgrade to 9.3.1

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 24 Mar 2026 19:25:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294028

            Bug ID: 294028
           Summary: www/onlyoffice-documentserver: Upgrade to 9.3.1
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: fsbruva@yahoo.com

Created attachment 269079
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=269079&action=edit
Proposed patch

Update to latest version.

Also:
* Fix sharp addon loading issue by publishing as port file
* Shift dependencies for brotli, md4c, and gumbo to use ports
* Upgrade yao-pkg@pkg to 6.14.1, and its node to 20.20.0
* Update pkg-message.in to be more instructive
* Utilize pkg-plist hash for @yao-pkg/pkg-fetch
* Implement new @yao-pkg/pkg-fetch extra patch generation
* Implement new npm cache construction, w/shrinkwraps
* Follow upstream's omission of modern-syslog
* Remove admin-panel

Discussion:
The sharp piece has some backstory. During the later part of the build,
@yao-pkg will bundle the npm package for sharp, and include the native addon
binding. However, @yao-pkg needs to extract the sharp package to HOME or
another location for it to be used at runtime. Previous versions of the port
did not accomodate this, so sharp failed to load. The location pkg extracts to
uses a directory name that is based on the hash of the bundled docservice
binary. This value is extraordinarily hard to obtain during a poudriere build,
so sharp's library loading was patched to load the binding from an adjacent
relative directory, and the native addon is published/tracked as a port file.

For @yao-pkg/pkg-fetch, two improvements were pursued. Previously, one of the
sourcefile tarballs existed solely to publish the SHA512 hash of the node
tarball in a format that pkg-fetch accepted, so that node could be patched and
built. However, the same SHA512 hash already existed in the pkg-plist, so the
port Makefile now extracts and transforms the SHA value. The other improvement
was to use a Cirrus-CI instance to programmatically create the extra-patch
file.

For the cache, the Cirrus-CI was also used to reliably generate and publish the
offline cache. This method is necessary because modern @yao-pkg/pkg has
@esbuild as a dependency, which now has a dependency on an arch-specific
freebsd esbuild binary package. Therefore, it is impossible to simply use 'make
build' on an x64 machine to create a cache that would work on aarch64. The
offline cache uses a two phase approach, first patching and running the npm
installs and building the package-locks for the various directories that
require it. Then, these are converted to npm-shrinkwrap files, and the cache
and node_modules are deleted. The installs are run again using just the
shrinkwrap files, which means that almost all (11 out of 12) cache no packument
data. These shrinkwrap (or package-lock for yao-pkg) files are published
alongside the cache itself, ensuring alignment. Additionally, only certain
directories need the devDependencies during the port's build, so the cache
generation replicates that to further optimize the cache size. Using
shrinkwraps to build the cache also revealed that upstream customised their
server/Metrics shrinkwrap to omit modern-syslog, as its methods are not used.
This removed the need to build the modern-syslog native binding.

Lastly, starting with version 9.3, the admin panel webgui was made closed
source, and only available for enterprise and developer editions. All
configurations options can still be set uding the local.json method.

NOTE: This patch contains edits to the supervisord config files, which contain
^M line endings. As a result, this patch cannot be applied using 'git am', as
it will complain about whitespace errors. Instead, apply the patch with 'git
apply', and then commit as normal.

-- 
You are receiving this mail because:
You are the assignee for the bug.