FS#77692 - [gitlab] Unable to upload jpeg assets because exiftool not found in path

Attached to Project: Community Packages
Opened by Caleb Maclennan (alerque) - Wednesday, 01 March 2023, 15:26 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:05 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Anatol Pomozov (anatolik)
Caleb Maclennan (alerque)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I see exiftool is installed as a dependency, but the path to the PERL module is not in the $PATH used by gitlab-workhorse. As a result I am not able to upload JPG images as comment and wiki attachments. Other file types work fine.

I finally tracked this down in `journalctl -u gitlab-workhorse`:

Mar 01 16:15:06 <host> gitlab-workhorse[731]: time="2023-03-01T16:15:06+01:00" level=error correlation_id=01GTEVVJKBZ83JPWY4ZHVV77YY error="handleFileUploads: extract files from multipart: start [exiftool -all= --IPTC:all --XMP-iptcExt:all -tagsFromFile @ -ResolutionUnit -XResolution -YResolution -YCbCrSubSampling -YCbCrPositioning -BitsPerSample -ImageHeight -ImageWidth -ImageSize -Copyright -CopyrightNotice -Orientation -]: exec: \"exiftool\": executable file not found in $PATH" method=POST uri=/api/v4/projects/<n>/wikis/attachments
Mar 01 16:15:06 <host> gitlab-workhorse[731]: <mydomain> <myip> - - [2023/03/01:16:15:06 +0100] "POST /api/v4/projects/<n>/wikis/attachments HTTP/1.1" 500 22 "https://<mydomain>/<group>/<project>/-/wikis/home/edit" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" 0
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:05 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/gitlab/issues/3
Comment by Caleb Maclennan (alerque) - Wednesday, 01 March 2023, 15:28 GMT
As a workaround this got my instance working:

sudo ln -s $(which exiftool) /usr/bin

The Perl vendor path it is in is in my user's PATH, but not the path for the gitlab user apparently.
Comment by loqs (loqs) - Wednesday, 01 March 2023, 17:47 GMT
What if perl made use of systemd.environment-generator [1] similar to how filesystem does in [2].

[1] https://www.freedesktop.org/software/systemd/man/systemd.environment-generator.html
[2] /usr/lib/systemd/system-environment-generators/10-arch
Comment by Toolybird (Toolybird) - Monday, 24 July 2023, 20:19 GMT

Loading...