FS#62619 - [gitlab] Uploading a JPG to an issue/merge request causes an HTTP 500 error
Attached to Project:
Community Packages
Opened by Steven Cook (princeconcord) - Monday, 13 May 2019, 03:35 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 24 May 2019, 03:44 GMT
Opened by Steven Cook (princeconcord) - Monday, 13 May 2019, 03:35 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 24 May 2019, 03:44 GMT
|
Details
Description:
When attaching a JPG image to an issue or a merge request, Gitlab throws an HTTP 500 (internal server error). Uploading a GIF or PNG doesn't throw this error. The cause of this is that Gitlab relies on calling a Perl binary called `exiftool`, which is a binary from the package `extra/perl-image-exiftool`. This package is not currently set as a dependency for Gitlab. Please note that this issue also happens in Gitlab EE (enterprise edition) as well as CE (community edition). This issue can be fixed by doing the following: ``` # pacman -S perl-image-exiftool # ln -s /usr/bin/vendor_perl/exiftool /usr/bin/exiftool ``` I.e. putting `exiftool` in either a global path or the gitlab user's path will fix the issue. A Gitlab restart is not necessary. Additional info: * Occurs even in the latest version: `11.10.4-1` * No Gitlab configuration changes required by end users, apart from the fix above * I've also reported this issue upstream: https://gitlab.com/gitlab-org/gitlab-ce/issues/60853 Steps to reproduce: - Create an issue or merge request - In the message box, click the **Attach a file** link, then choose a JPG - Observe the **Internal server error** message to the left of the link you just clicked. - Check the Gitlab workhorse logs to view the exact error message that the exiftool binary wasn't found. |
This task depends upon
PKGBUILD:
- `dependencies=(... 'perl-image-exiftool')`
Systemd unit file:
- `Environment="PATH=/usr/bin/vendor_perl:$PATH"`