Bug 261557 - www/nextcloud use older version of ImageMagick
Summary: www/nextcloud use older version of ImageMagick
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-29 16:04 UTC by Xavier Humbert
Modified: 2022-12-31 17:19 UTC (History)
4 users (show)

See Also:


Attachments
Patch file (513 bytes, patch)
2022-01-29 16:04 UTC, Xavier Humbert
no flags Details | Diff
Patch to give ImageMagick version choice (1.50 KB, patch)
2022-09-29 14:59 UTC, fsbruva
no flags Details | Diff
Alternate patch to give users ImageMagick version choice. (1.50 KB, patch)
2022-09-29 15:02 UTC, fsbruva
no flags Details | Diff
Revised patch to add ImageMagick 7 option (1.35 KB, patch)
2022-12-12 21:32 UTC, fsbruva
no flags Details | Diff
patch for suggestion only (1.22 KB, patch)
2022-12-19 00:30 UTC, Tatsuki Makino
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Humbert 2022-01-29 16:04:37 UTC
Created attachment 231430 [details]
Patch file

Nextcloud uses by default ImageMagick6, while many other ports use IM7
Here is attached a simple pacth
Regards,
Xavier
Comment 1 fsbruva 2022-09-29 14:59:10 UTC
Created attachment 236946 [details]
Patch to give ImageMagick version choice

(In reply to xavier from comment #0)
Forcing everyone to upgrade in your proposed manner will undoubtedly break things on certain setups. This is because we can't assume that nextcloud is the only user of the ImageMagick on a machine. Add the fact that ImageMagick7 conflicts with 6, and it's a recipe for trouble.

Here's my proposed change - it permits users to specify which pecl port to use, and therefore which ImageMagick to use. However, the patch I am proposing assumes either NO ImageMagick already installed, or the selected nextcloud option matches the already installed version.

@Bernard Do you think changing this would be worthy of an edit to UPDATING? In the case that a user only has ImageMagick installed for nextcloud, any attempts to simply change versions with the radio button in nextcloud's config will fail. This is because the two pecl-imagick ports conflict with each other. Options are to use portmaster -o to change the underlying ImageMagick and then doing the same for the pecl-imagick version to avoid completely de-installing nextcloud, then running the nextcloud 'make config' to ensure the selected options match reality. Or I suppose Nextcloud could be built with NO ImageMagick dependency, then the user must transition ImageMagick & pecl-imagick on their own. The only other alternative is to de-install the old ImageMagick (and pecl-imagick and nextcloud), and then re-install.
Comment 2 fsbruva 2022-09-29 15:02:39 UTC
Created attachment 236947 [details]
Alternate patch to give users ImageMagick version choice.

This is an alternate to 236946, which displays the pecl-imagick port dependency, rather than the underlying ImageMagick port dependency.
Comment 3 fsbruva 2022-12-12 21:32:29 UTC
Created attachment 238741 [details]
Revised patch to add ImageMagick 7 option

Here is a less destructive Makefile patch to add a new option to www/nextcloud for dependency on pecl-imagick-im7, which in turn requires ImageMagick 6. This patch preserves the existing build behavior, in that SET+=IMAGICK still builds/requires pecl-imagick, which is based on ImageMagick 6.

Subsequent transition to deprecate ImageMagick 6 is a long ways off (circa 2030, according to https://legacy.imagemagick.org/ ), but could be handled by an entry in UPDATING.
Comment 4 Tatsuki Makino 2022-12-19 00:30:17 UTC
Created attachment 238905 [details]
patch for suggestion only

I think this is a very(?) difficult problem.

Previously, each port using ImageMagick had the option to select a version of it, but it must be selected to match a version of 6 or 7.
Now it will be the same version selected in IMAGEMAGICK_DEFAULT.

It doesn't seem to make sense to make the option selectable, so I think it would be better to make it like this attachment.

However, I have not verified that it works :)
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-12-31 17:16:39 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=35085067c62abae230c658e25db2c7f926c436ce

commit 35085067c62abae230c658e25db2c7f926c436ce
Author:     Bernard Spil <brnrd@FreeBSD.org>
AuthorDate: 2022-12-31 17:12:44 +0000
Commit:     Bernard Spil <brnrd@FreeBSD.org>
CommitDate: 2022-12-31 17:12:44 +0000

    www/nextcloud: use Uses/magick.mk

     * Fix for occ

    PR:             261557
    Reported by:    <xavier groumpf org>
    Submitted by:   Tatsuki Makino <tatsuki_makino hotmail com>

 www/nextcloud/Makefile     | 13 ++++++++++++-
 www/nextcloud/files/occ.in |  5 ++++-
 2 files changed, 16 insertions(+), 2 deletions(-)
Comment 6 Bernard Spil freebsd_committer freebsd_triage 2022-12-31 17:19:30 UTC
Thanks everyone!

Patch from Tatsuki committed just now.