Patch #34969
Remove dependency on MimeMagic
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 0% | ||
Category: | Gems support | |||
Target version: | 4.0.9 |
Description
In Redmine, MimeMagic is used to check that files with invalid formats are not passed to ImageMagick when generating thumbnail images with ImageMagick.
This patch replaces MimeMagic with Marcel, a gem bundled with Rails. The benefits of this change are as follows:
- Simplifies the installation process: Due to a licensing issue, the MIME database freedesktop.org.xml was removed from MimeMagic. As a result, you have to make sure that your system has shared-mime-info before you install Redmine. Marcel bundles another database Apache Tika, so you don't have to install MIME database separately
- Can reduce memory usage: By replacing MimeMagic with Marcel, we can reduce one gem dependency. Rails used to depend on MimeMagic, but in Rails 5.2.5 it no longer does. Now only Redmine itself depends on MimeMagic
Related issues
Associated revisions
Remove duplicate code in Redmine::Thumbnail.generate (#34969).
Patch by Go MAEDA.
Replace MimeMagic with Marcel (#34969).
Patch by Go MAEDA.
History
#1
Updated by Go MAEDA over 1 year ago
- Related to Patch #34966: Update Rails to 5.2.5 added
#2
Updated by Go MAEDA over 1 year ago
- Target version set to 4.2.0
#3
Updated by Go MAEDA over 1 year ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
Committed the patches.
#4
Updated by Go MAEDA over 1 year ago
- Status changed from Closed to Reopened
- Target version changed from 4.2.0 to 4.1.3
I think it is better to merge the change to older versions for the following reason. Keep using MimeMagic may cause installation trouble in some environments.
Go MAEDA wrote:
- Simplifies the installation process: Due to a licensing issue, the MIME database freedesktop.org.xml was removed from MimeMagic. As a result, you have to make sure that your system has shared-mime-info before you install Redmine. Marcel bundles another database Apache Tika, so you don't have to install MIME database separately
#5
Updated by Go MAEDA over 1 year ago
- Status changed from Reopened to Closed
#6
Updated by Go MAEDA over 1 year ago
- Status changed from Closed to Reopened
- Target version changed from 4.1.3 to 4.0.9
#8
Updated by Go MAEDA over 1 year ago
- Status changed from Reopened to Closed
Backported to 4.0-stable in r20953.