Bug 268833 - graphics/pecl-imagick{-im7}: ImageMagick 7 should be the default
Summary: graphics/pecl-imagick{-im7}: ImageMagick 7 should be the default
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Felix Palmen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-08 23:13 UTC by Xin LI
Modified: 2023-07-19 11:34 UTC (History)
7 users (show)

See Also:
000.fbsd: maintainer-feedback+


Attachments
Patch to make pecl-imagick dependes on IM 7 (834 bytes, patch)
2023-03-27 21:58 UTC, Miroslav Lachman
no flags Details | Diff
Patch to replace pecl-imagick-im7 with pecl-imagick-im6 (729 bytes, patch)
2023-03-27 22:01 UTC, Miroslav Lachman
no flags Details | Diff
remove pecl-imagic-im7, pecl-imagick will build with default IM version (1.27 KB, patch)
2023-07-04 20:53 UTC, Miroslav Lachman
no flags Details | Diff
pecl-imagick full patch to update MOVED and ports depending on pecl-imagick (5.19 KB, patch)
2023-07-04 20:59 UTC, Miroslav Lachman
no flags Details | Diff
patch to update dependencies in nextcloud/Makefile (1.25 KB, patch)
2023-07-04 21:00 UTC, Miroslav Lachman
no flags Details | Diff
patch to update dependencies in piwigo/Makefile (1.16 KB, patch)
2023-07-04 21:01 UTC, Miroslav Lachman
no flags Details | Diff
patch to update dependencies in wordpress/Makefile (1004 bytes, patch)
2023-07-04 21:02 UTC, Miroslav Lachman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xin LI freebsd_committer freebsd_triage 2023-01-08 23:13:17 UTC
The graphics/pecl-imagick is currently using ImageMagick 6 as default.  ImageMagick 7 is the upstream default, and ImageMagick also consider ImageMagick 7 is production ready, therefore the port should make ImageMagick 7 as the default, or do not set it at all.
Comment 1 Tatsuki Makino 2023-01-08 23:37:52 UTC
The changes related to this also affect this recently made change. -> bug 261557

I am thinking that it would be better if graphics/pecl-imagick was changed to a meta port and either graphics/pecl-imagick-im6 or graphics/pecl-imagick-im7 could be chosen depending on IMAGEMAGICK_DEFAULT...

If there is a better way, go there :)
Comment 2 Miroslav Lachman 2023-01-15 13:12:57 UTC
I am not against it but it is always more complex when it comes to changing some "default" in FreeBSD ports tree. We cannot simply change default for one port. We need to change it for all consumers of ImageMagick. If it is not made (and tested) then users come with issues of version clashes. PortA needs IM6, portB needs IM7, user needs portA and portB installed at the same time but IM6 and IM7 conflicts, installation of portB deinstalls portA = user complaints.
Comment 3 Xin LI freebsd_committer freebsd_triage 2023-01-30 06:23:05 UTC
(In reply to Miroslav Lachman from comment #2)
Well, this is exactly why I'm asking the default to be following the mainstream default.  Ruby binding, for example, uses ImageMagick 7 and that means e.g. wordpress can't be installed with redmine.

ImageMagick 6 is considered legacy in 2017 by the way.
Comment 4 Miroslav Lachman 2023-03-27 21:58:44 UTC
Created attachment 241152 [details]
Patch to make pecl-imagick dependes on IM 7

Change dependency from IM 6 to IM 7.
Comment 5 Miroslav Lachman 2023-03-27 22:01:03 UTC
Created attachment 241153 [details]
Patch to replace pecl-imagick-im7 with pecl-imagick-im6

I am not sure how this should be done properly. Previous port pecl-imagick-im7 will be replaced by pecl-imagick and new port pecl-imagick-im6 will be created for legacy ImageMagick 6 version of this PECL extension.
Comment 6 Miroslav Lachman 2023-03-27 22:04:33 UTC
Now we have pecl-imagick (for IM 6) and pecl-imagick-im7 (for IM 7), the proposed change should switch pecl-imagick to IM 7, remove pecl-imagick-im7 and create pecl-imagick-im6 for legacy IM 6.

We also need to update RUN_DEPENDS in some ports, namely:

net-mgmt/icingaweb2/Makefile:PDF_RUN_DEPENDS=    ${PHPBASE}/lib/php/${PHP_EXT_DIR}/imagick.so:graphics/pecl-imagick@${PHP_FLAVOR}
www/mediawiki135/Makefile:IMAGICK_RUN_DEPENDS=   ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/imagick.so:graphics/pecl-imagick@${PHP_FLAVOR}
www/mediawiki138/Makefile:IMAGICK_RUN_DEPENDS=   ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/imagick.so:graphics/pecl-imagick@${PHP_FLAVOR}
www/mediawiki139/Makefile:IMAGICK_RUN_DEPENDS=   ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/imagick.so:graphics/pecl-imagick@${PHP_FLAVOR}
www/nextcloud/Makefile:IMAGEMAGICK_DEPENDS=      ${PECL_PKGNAMEPREFIX}imagick>=2.2.2:graphics/pecl-imagick@${PHP_FLAVOR}
www/nextcloud/Makefile:IMAGEMAGICK_DEPENDS=      ${PECL_PKGNAMEPREFIX}imagick-im7>=2.2.2:graphics/pecl-imagick-im7@${PHP_FLAVOR}
www/piwigo/Makefile:IMAGEMAGICK_DEPENDS= ${PECL_PKGNAMEPREFIX}imagick>=2.2.2:graphics/pecl-imagick@${PHP_FLAVOR}
www/piwigo/Makefile:IMAGEMAGICK_DEPENDS= ${PECL_PKGNAMEPREFIX}imagick-im7>=2.2.2:graphics/pecl-imagick-im7@${PHP_FLAVOR}
www/wordpress/Makefile:IMAGEMAGICK_DEPENDS=      ${PECL_PKGNAMEPREFIX}imagick>=2.2.2:graphics/pecl-imagick@${PHP_FLAVOR}
www/wordpress/Makefile:IMAGEMAGICK_DEPENDS=      ${PECL_PKGNAMEPREFIX}imagick-im7>=2.2.2:graphics/pecl-imagick-im7@${PHP_FLAVOR}
Comment 7 Miroslav Lachman 2023-07-04 20:53:29 UTC
Created attachment 243224 [details]
remove pecl-imagic-im7, pecl-imagick will build with default IM version

Updated to USES= magick, pecl-imagick-im7 is removed, pecl-imagick will use the default version of ImageMagick set in make.conf (7 or 6, x11 or nox11)
Comment 8 Miroslav Lachman 2023-07-04 20:59:35 UTC
Created attachment 243236 [details]
pecl-imagick full patch to update MOVED and ports depending on pecl-imagick

This is full patch to also update ports depending on pecl-imagick: Nextcloud, Piwigo, Wordpress - I added  maintainers of these ports to this PR to notify them about this update.

AFAIK no port currently depends on pecl-imagick with ImageMagick 6 by default so it should be safe to do this but better check it twice before commit.
Comment 9 Miroslav Lachman 2023-07-04 21:00:47 UTC
Created attachment 243239 [details]
patch to update dependencies in nextcloud/Makefile
Comment 10 Miroslav Lachman 2023-07-04 21:01:18 UTC
Created attachment 243240 [details]
patch to update dependencies in piwigo/Makefile
Comment 11 Miroslav Lachman 2023-07-04 21:02:08 UTC
Created attachment 243241 [details]
patch to update dependencies in wordpress/Makefile
Comment 12 Felix Palmen freebsd_committer freebsd_triage 2023-07-18 14:29:46 UTC
Hi, as I authored the update to USES=magick, I will have a look!

Thanks for your patches :) It might take me a few days to double-check everything...
Comment 13 commit-hook freebsd_committer freebsd_triage 2023-07-19 11:09:37 UTC
A commit in branch main references this bug:

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

commit a47ec034b7549d2959e45048071d58eff989b29d
Author:     Miroslav Lachman <000.fbsd@quip.cz>
AuthorDate: 2023-07-04 21:00:00 +0000
Commit:     Felix Palmen <zirias@FreeBSD.org>
CommitDate: 2023-07-19 11:05:22 +0000

    graphics/pecl-imagick: Update/bump consumers

    www/nextcloud, www/piwigo and www/wordpress had some custom logic to
    select the pecl-imagick port based on the default ImageMagick version.
    This is now obsolete with the removal of pecl-imagick-im7 and must be
    removed. As this changes dependencies, also bump PORTREVISION in these
    ports.

    Other consumers of pecl-imagick don't need a bump because they only use
    ImageMagick through the PHP API, they don't directly link any shared
    libs.

    PR:             268833
    Approved by:    portmgr (blanket)

 www/nextcloud/Makefile | 11 ++---------
 www/piwigo/Makefile    | 10 ++--------
 www/wordpress/Makefile | 11 ++---------
 3 files changed, 6 insertions(+), 26 deletions(-)
Comment 14 commit-hook freebsd_committer freebsd_triage 2023-07-19 11:09:38 UTC
A commit in branch main references this bug:

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

commit b8e72f7c31046aee0be12553dd1fffde7706ffde
Author:     Miroslav Lachman <000.fbsd@quip.cz>
AuthorDate: 2023-07-04 20:53:00 +0000
Commit:     Felix Palmen <zirias@FreeBSD.org>
CommitDate: 2023-07-19 11:05:15 +0000

    graphics/pecl-imagick: Convert to USES=magick

    This will build it with whatever ImageMagick version is set in
    DEFAULT_VERSIONS, so it obsoletes the -im7 slave port. Remove it and
    document in MOVED.

    PR:             268833

 MOVED                                     |  1 +
 graphics/Makefile                         |  1 -
 graphics/pecl-imagick-im7/Makefile (gone) | 17 -----------------
 graphics/pecl-imagick/Makefile            | 13 +++----------
 4 files changed, 4 insertions(+), 28 deletions(-)
Comment 15 Felix Palmen freebsd_committer freebsd_triage 2023-07-19 11:10:42 UTC
Didn't run into any issues, therefore: Committed, thanks a lot!