Differences between revisions 16 and 17
Revision 16 as of 2020-11-25 10:16:34
Size: 4441
Editor: Praveen A
Comment: specify version for ruby-prof
Revision 17 as of 2020-11-25 11:05:10
Size: 4594
Editor: Praveen A
Comment: add exct versions of more dependencies for upgrade
Deletions are marked like this. Additions are marked like this.
Line 31: Line 31:
ruby-asciidoctor=1.5.8-1 asciidoctor=1.5.8-1 ruby-prof=0.17.0+dfsg-3+b1 ruby-asciidoctor=1.5.8-1 asciidoctor=1.5.8-1 ruby-prof=0.17.0+dfsg-3+b1 \
ruby-responders=2.4.0-3 ruby-task-list=2.2.0-1~bpo10+1 ruby-asana=0.8.1-2~bpo10+1 \
ruby-github-linguist=6.4.0-2 ruby-prometheus-client-mmap=0.9.4-1

Upgrading to buster

You should first upgrade to 11.11.8 version before you can install newer versions.

Update /etc/apt/sources.list and change stretch to buster and add anew entry for buster-fasttrack and gitlab-snapshots (it is a repo created to provide exact versions required for updating from stretch to buster),

deb http://deb.debian.org/debian buster contrib main
deb http://security.debian.org/ buster/updates contrib main
deb https://people.debian.org/~praveen/gitlab buster-backports contrib main
deb https://people.debian.org/~praveen/gitlab-snapshots buster-backports contrib main
deb https://people.debian.org/~praveen/gitlab buster-fasttrack contrib main
deb http://deb.debian.org/debian buster-backports contrib main

If you get permission errors with /usr/share/gitlab/Gemfile.lock and /var/lib/gitlab/yarn-error.log, you can safely remove those two files.

If you get permission erros with /usr/share/gitlab/.bundle/config and /var/lib/gitlab/.ssh/authorized_keys change ownership of these files to gitlab user (if you chose a different user for gitlab, provide that name instead of gitlab)

# chown gitlab:gitlab /usr/share/gitlab/.bundle/config
# chown gitlab:gitlab /var/lib/gitlab/.ssh/authorized_keys

You may need to update postgresql-contrib package separately if you get errors related to postgresql service not running (make sure the new version is running on 5432 port). Use ss -aut command to list the running services.

Now update gitlab

# apt -t buster-backports install ruby-asciidoctor=1.5.8-1 asciidoctor=1.5.8-1
# apt -t buster-backports install gitlab gitaly=1.42.5+debian-1~bpo10+1 \
ruby-gitaly=1.37.0+dfsg-1~bpo10+1 ruby-default-value-for=3.1.1-3~bpo10+1 \
ruby-asciidoctor-plantuml=0.0.8-1 ruby-gitlab-sidekiq-fetcher=0.4.0-2~bpo10+1 \
ruby-asciidoctor=1.5.8-1 asciidoctor=1.5.8-1 ruby-prof=0.17.0+dfsg-3+b1 \
ruby-responders=2.4.0-3 ruby-task-list=2.2.0-1~bpo10+1 ruby-asana=0.8.1-2~bpo10+1 \
ruby-github-linguist=6.4.0-2 ruby-prometheus-client-mmap=0.9.4-1

If you got some errors during "Running final rake tasks and tweaks..." step, you may have to remove some obsolete configuration files (especially if you installed gitlab from stretch for the first time),

rm /usr/share/gitlab/config/initializers/0_license.rb
rm /usr/share/gitlab/config/initializers/0_thread_cache.rb
rm /usr/share/gitlab/config/initializers/active_record_query_cache.rb
rm /usr/share/gitlab/config/initializers/elastic_client_setup.rb
rm /usr/share/gitlab/config/initializers/geo.rb
rm /usr/share/gitlab/config/initializers/load_balancing.rb
rm /usr/share/gitlab/config/initializers/transaction_metrics.rb

If gitlab installation failed at restarting services, you may need a restart.

At this point you should update gitlab to latest version available at gitlab for buster-fasttrack (manually update ruby-bundler, ruby-molinillo and ruby-font-awesome-rails) and run apt dist-upgrade after gitlab is updated.

Stretch Backports (upgrade to buster)

Gitlab 11.4.9 is available in stretch-backports (still affected by some security issues, many security releases behind).

Gitlab 11.5.10 is available for stretch-backports via personal repo of gitlab maintainer (many security releases behind) from https://people.debian.org/~praveen/gitlab

Add to /etc/apt/sources.list

deb https://people.debian.org/~praveen/gitlab stretch-backports contrib main
deb http://deb.debian.org/debian stretch-backports contrib main

Add repo signing key as trusted,

# wget https://people.debian.org/~praveen/gitlab/praveen.key.asc
# apt-key add praveen.key.asc

Now install gitlab,

# apt -t stretch-backports install gitlab

If you got an error like yarn did not find a cache folder during installation, run this command

sudo -u gitlab mkdir -p /var/lib/gitlab/.cache/yarn/v4/

It is recommended to upgrade to buster to receive security updates (see above).

Note: Remove unnecessary packages after upgrade (remove ruby-bootsnap if you see strange load errors).

# apt remove rails npm ruby-bootsnap

Stretch (upgrade to stretch-backports and then to buster)

Gitlab 8.13.11 was available in stretch, but it was not receiving any security updates and was removed in a point release. So it is recommended to update to newer versions from stretch-backports (see above).

# apt install gitlab

It is recommended to upgrade to stretch-backports and then to buster to receive security updates.