On 4/21/2023 11:43 PM, Stuart Henderson wrote:
On 2023/04/21 14:56, Steve Williams (Contractor) wrote:
Hi,
I am running Nextcloud and it can now use an external service to
render thumbnails that's (allegedly) much faster than the php
Imagick stuff.
Of course, it's built for docker... I was considering to see if
it's possible/worth the effort to do a port for it.
https://github.com/h2non/imaginary
Written to work easily in Docker but it isn't needed.
From following the ports list, I believe there's support for
easily porting go applications in the OpenBSD ports
infrastructure.
It's easy if the program only uses things which work in OpenBSD, doesn't
need patching, and is supported by "portgen go" - fortunately this is
the case here. For some other software it's a complete nightmare.
Start with "portgen go github.com/h2non/imaginary", add a LIB_DEPENDS
on graphics/libvips (also fortunately this is already ported). That
will be enough to get it building, then you need to add a license marker
in place of the "unknown" and set PERMIT_PACKAGE (remove portgen's
default PERMIT_DISTFILES line as that defaults to the value of
PERMIT_PACKAGE).
Then you are into standard ports things like generating PLIST, setting
WANTLIB (use "make port-lib-depends-check"), writing DESCR, and as it's
a daemon providing an rc script (crib from another go port that provides
a web service - www/honk is probably a good one to borrow from, though
try to avoid setting a pexp with .*, use the default if it works but if
not then try to include ${daemon_flags} in the string). You'll also need
to create a uid (@newuser in PLIST) so it doesn't run as root.
Hi,
Thanks very much for the pointers!
This has been an incredibly positive experience. I cannot believe it
"just worked".
Less than 15 minutes of work, I had a port and had it installed and
running (and yes, it actually works! lol).
I can see that the Nextcloud Team is doing additional work on the
"imaginary" product and keeping it in a different repository.
Of course, it's set up for docker as well. I'm going to see if I can
get that version working as easily.
From:
https://docs.nextcloud.com/server/24/admin_manual/installation/server_tuning.html
"We strongly recommend running our custom docker image that is more up
to date than the official image. You can find the image at
docker.io/nextcloud/aio-imaginary:latest."
If I can get that version just as easily, given that we have Nextcloud
ports, is it worth the effort to create a port for "transparency"?
Would it be accepted (assuming I meet all the standards)?
Thanks,
Steve W.