Sometimes, we need to ask a customer to patch their systems manually. This may be because:
For Omnibus installs on a single server, this is fairly straightforward. Replace
$mr_iid
below with the IID of the merge request, or change the URL to point to
a raw snippet.
$ curl -o /tmp/$mr_iid.patch https://gitlab.com/gitlab-org/gitlab/-/merge_requests/$mr_iid.patch
$ cd /opt/gitlab/embedded/service/gitlab-rails
$ patch -p1 -b -f < /tmp/$mr_iid.patch
$ gitlab-ctl restart
To revert the patch, use the .orig
files the patch
program generates.
Please note that if GitLab is upgraded, the patch will need to be reapplied.
Note: this process only applies to the Rails application (the GitLab repository). Other components may need additional steps.