Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install GraphicsMagick by default, fixes #3569 #3629

Merged
merged 5 commits into from
Feb 28, 2022

Conversation

gilbertsoft
Copy link
Contributor

@gilbertsoft gilbertsoft commented Feb 25, 2022

The Problem/Issue/Bug:

GraphicsMagick is often used with TYPO3 instead of ImageMagick.

How this PR Solves The Problem:

This patch adds the graphicsmagick package to the ddev-php-base image.

Related Issue Link(s):

Resolves #3569

Release/Deployment notes:

This change has no impact or side effects.

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need a little more work. I built it (make VERSION=test in the containers/ddev-php-base directory). Run it then with docker run -it --rm drud/ddev-php-base:test

  • The php extension is not enabled... I expect it's needed right? This currently just installs the utility. The gmagick extension needs to be installed.
  • The php default configs (/etc/php//conf.d) are not installed, but that may not be necessary.

You can see the setup for loading the PHP extension packages at https://github.com/drud/ddev/blob/cd2edafc5f6821ea11acb32891c3e96bb7aeb55e/containers/ddev-php-base/Dockerfile#L85-L98

@jonaseberle
Copy link
Collaborator

No, we don't need anything from PHP. Just the GM binaries.

@gilbertsoft
Copy link
Contributor Author

gilbertsoft commented Feb 26, 2022

As already said by Jonas, for TYPO3 we only need the binaries and no extension.

Are there other requests to install GM by default where the PHP extension is needed? If yes, I'd add it.

@gilbertsoft
Copy link
Contributor Author

Also added the extension now. According to https://www.php.net/manual/en/gmagick.configuration.php no configuration is needed.

@rfay
Copy link
Member

rfay commented Feb 26, 2022

Thanks!

@rfay
Copy link
Member

rfay commented Feb 27, 2022

I guess phpimagick and phpgmagick are mutually exclusive:

# apt-get install php5.6-gmagick
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  gsfonts libgraphicsmagick-q16-3 libwmf0.2-7
Suggested packages:
  graphicsmagick-dbg libwmf0.2-7-gtk
Recommended packages:
  ttf-dejavu-core
The following packages will be REMOVED:
  php5.6-imagick php7.0-imagick php7.1-imagick php7.2-imagick php7.3-imagick php7.4-imagick php8.0-imagick php8.1-imagick
The following NEW packages will be installed:
  gsfonts libgraphicsmagick-q16-3 libwmf0.2-7 php5.6-gmagick
0 upgraded, 4 newly installed, 8 to remove and 39 not upgraded.
Need to get 4350 kB of archives.
After this operation, 4508 kB of additional disk space will be used.
Do you want to continue? [Y/n]

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted the add of the php extension since it's incompatible with imagick, rebased, and pushed the relevant images.

Please test this and see if it does what you want, @gilbertsoft @jonaseberle - You can easily test on Gitpod with the gitpod link, or download the built artifacts from https://github.com/drud/ddev/actions/runs/1904743275

@gilbertsoft
Copy link
Contributor Author

gilbertsoft commented Feb 27, 2022

I guess php_imagick and php_gmagick are mutually exclusive:

Another reason not using the extensions.

Works like expected for TYPO3.

@rfay rfay merged commit c2c8230 into ddev:master Feb 28, 2022
@gilbertsoft gilbertsoft deleted the feature/graphicsmagick branch February 28, 2022 13:38
@sal-lochbaum
Copy link

I'm wondering how you are using graphicsmagick when ddev writes Imagemagick into the AdditionalConfig.php/additional.php (https://github.com/ddev/ddev/pull/1712/files) which overrules the normal settings?

@rfay
Copy link
Member

rfay commented Jun 18, 2024

It's hard to understand your question @sal-lochbaum - On TYPO3 the additional.php does configure Graphicsmagick by default. And DDEV does have the package installed in ddev-webserver.

And of course you can override the additional.php or turn off settings management.

Full details about settings management at https://ddev.readthedocs.io/en/stable/users/usage/cms-settings/

Please open a new issue with a specific question, or join us in discord for a discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphicsMagick as strong default for TYPO3 based projects
4 participants