Skip to content

Install Runner in /usr/bin and helper in /usr/lib in Linux

Pedro Pombeiro requested to merge 3440-move-runner-pkg-binary into master

What does this MR do?

This MR changes the .deb and .rpm packages so that they install the Runner binary directly in /usr/bin instead of /usr/lib/gitlab-runner with a symlink on /usr/bin. A symlink to /usr/bin/gitlab-runner is now placed at the old location /usr/lib/gitlab-runner. An issue to remove this symlink at the next major version was created in #26651 (closed).

Why was this MR needed?

See #3440 (closed) and #22963 (closed)

What's the best way to test this MR?

I've tested installing the previous package in a Fedora 28 VM, and then upgrading to the new version with sudo yum localinstall, and the /etc/systemd/system/gitlab-runner.service file was updated to point to /usr/bin/gitlab-runner as expected. The symlink was also correctly updated from:




Previous version failed to check for new builds with:

status=couldn't execute POST against Post dial tcp connect: permission denied

As soon as I updated to the new Runner, the job was picked up and completed successfully with the docker executor.

Steps to test

On a Fedora 28 VM:

  1. Check that SELinux is in Enforcing mode:

    $ /usr/sbin/getenforce
  2. Install Docker

    sudo dnf install -y moby-engine
    sudo systemctl start docker
    sudo gpasswd -a $USER docker
    sudo setfacl -m user:$USER:rw /var/run/docker.sock
  3. Install current gitlab-runner RPM package (not from this MR) to verify broken behaviour

    sudo yum localinstall -y gitlab-runner_amd64.rpm
  4. Register runner and run a build against this runner.

  5. Install RPM package from this MR, and after it upgrades, retry the build. It should complete just fine.

What are the relevant issue numbers?

Closes #3440 (closed)

Edited by Pedro Pombeiro

Merge request reports