Skip to content

Remove /usr/lib/gitlab-runner symlink from packages

What does this MR do?

Removes the /usr/lib/gitlab-runner symlink to /usr/bin/gitlab-runner from packages.

Why was this MR needed?

The runner binary originally was installed at /usr/lib/gitlab-runner. With !2329 (merged) we moved it to /usr/bin/gitlab-runner and added a symlink in /usr/lib/gitlab-runner so as to not break backward compatibility. With the %14.0 we're removing the symlink for new installations/upgrades.

What's the best way to test this MR?

To test the upgrade path, I did the following:

  1. Downloaded a Fedora VM in Parallels (using built-in support)

  2. Fetched a baseline .rpm package from https://gitlab-runner-downloads.s3.amazonaws.com/master/rpm/gitlab-runner_amd64.rpm and placed it in the VM

  3. Fetched .rpm file from job and placed it in the VM as gitlab-runner_amd64-new.rpm

  4. Installed master .rpm package:

    sudo yum localinstall -y gitlab-runner_amd64.rpm
  5. Confirmed that there's a symlink in /usr/lib:

    $ ls -al /usr/lib/gitlab-runner*
    total 12
    drwxr-xr-x.  3 root root 4096 May 12 13:44 .
    dr-xr-xr-x. 46 root root 4096 May 12 13:44 ..
    lrwxrwxrwx.  1 root root   23 May 12 09:41 gitlab-runner -> ../../bin/gitlab-runner
    drwxr-xr-x.  2 root root 4096 May 12 13:44 helper-images
  6. Upgraded to this MR's .rpm package:

    sudo yum localinstall -y gitlab-runner_amd64-new.rpm
  7. Confirmed that there is no symlink in /usr/lib:

    $ ls -al /usr/lib/gitlab-runner*
    total 12
    drwxr-xr-x.  3 root root 4096 May 12 13:48 .
    dr-xr-xr-x. 46 root root 4096 May 12 13:44 ..
    drwxr-xr-x.  2 root root 4096 May 12 13:48 helper-images
  8. Confirmed that gitlab-runner is still accessible:

    $ gitlab-runner -version
    Version:      14.0.0~beta.73.g37a9dd95
    Git revision: 37a9dd95
    Git branch:   refs/pipelines/301548193
    GO version:   go1.13.8
    Built:        2021-05-12T11:17:23+0000
    OS/Arch:      linux/amd64

What are the relevant issue numbers?

Closes #26651 (closed)

Merge request reports