Differences between revisions 331 and 332
Revision 331 as of 2021-04-28 17:04:30
Size: 10357
Editor: Praveen A
Comment: Now ~praveen/gitaly repo should include contrib section
Revision 332 as of 2021-05-01 13:38:49
Size: 10357
Editor: Praveen A
Comment: gitlab 13.11.2 is now available in staging/experimental
Deletions are marked like this. Additions are marked like this.
Line 169: Line 169:
gitlab 13.10.4 is available in staging/experimental. gitlab 13.11.2 is available in staging/experimental.

Gitlab is a git front end with repository management, graphs, links, goodies, commands to run, and review capabilities similar in feel to a self-hosted ?GitHub.

A new feature release of gitlab flows in the following direction: devel -> staging -> experimental -> unstable -> fasttrack-staging -> fasttrack (experimental and unstable may be skipped during freeze and transitions).

See /omnibus if you are looking for instructions to install upstream provided packages.

New upstream releases (including security updates) are announced at https://about.gitlab.com/releases/categories/releases/.

Debian is running its own Instance of GitLab under https://salsa.debian.org, which is not based on the packaged version.

Note 1: For a smooth upgrade experience, always stay on the latest major version of gitlab. For example, if latest version of gitlab is 12.0.0 and you are currently on 11.3.6, then update to 12.0.0 as soon as possible, certainly before the debian package is updated to 13.x. Ideally, you should update as soon as a new version with security updates is available.

Note 2: It is recommended to subscribe to changes in this wiki page or frequently check this page for updates. Alternatively, you can subscribe to https://tracker.debian.org/pkg/gitlab to get notified when new versions are uploaded.

New changes

  1. New from gitlab 13.10.4: Since this version includes gitlab-workhorse golang binary, it was moved to people.debian.org/~praveen/gitaly and should now include contrib section.
  2. New in gitlab 13.6.7-1: New user created after a fresh installation should be approved using gitlab-rails-console. See gitlab#your_account_is_awaiting_approval_from_your_GitLab_administrator for steps to approving users and creating a user with Administrative privileges.

  3. New in gitlab 13.3.8-1: You will need to install grpc gem from rubygems.org gem install -v 1.30.2 grpc (more details below). If you run gitaly on a different machine, you will need to do this on that machine as well.

  4. New in gitlab 13.2.6-3: We have switched to puma as application server replacing unicorn. Upstream already made the switch from 12.9 and unicorn support will be dropped in gitlab 14.0. They saw a memory reduction of 37% in gitlab.com after the switch. See more details about this switch at this upstream blog post https://about.gitlab.com/blog/2020/07/08/migrating-to-puma-on-gitlab/. puma defaults to listening only on unix sockets and if you are running gitaly on a different machine, then you will have to edit /etc/gitlab/puma.rb to bind to tcp:// url as well.

Buster Fast Track (Recommended)

Gitlab 13.10.4 is available in unofficial fasttrack repo targeting buster as base distribution. (no open security issues).

A video demo of the whole installation process with commentary on packaging challenges and troubleshooting steps is available on Debian Social Peertube instance.

Some packages are still needed from personal repo of gitlab maintainer because golang packages cannot be uploaded in fasttrack.debian.net because of a bug in dak setup. Please note the new URL of this repo if you are upgrading from an older version (people.debian.org/~praveen/gitlab is now people.debian.org/~praveen/gitaly and gpg key used for signing is also changed).

Make sure contrib section is enabled for buster and buster/updates

Modify /etc/apt/sources.list to add official buster-backports and contrib section if missing:

deb http://deb.debian.org/debian buster main contrib
deb http://security.debian.org/ buster/updates main contrib
deb http://deb.debian.org/debian buster-backports main contrib 

Import fasttrack archive keyring:

# apt -t buster-backports install fasttrack-archive-keyring

And add the following lines for fasttrack repo:

deb https://fasttrack.debian.net/debian/ buster-fasttrack main contrib
# For dependency packages not in testing only temporarily due to freeze, transitions or delayed by backports-new or NEW.
deb https://fasttrack.debian.net/debian/ buster-backports main contrib

Eventually the packages in this repo will be moved to fasttrack or official backports after fixing https://salsa.debian.org/fasttrack-team/support/-/issues/8 (Need help)

deb https://people.debian.org/~praveen/gitaly buster-backports main contrib
deb https://people.debian.org/~praveen/gitaly buster-fasttrack main contrib

Optional: To avoid some hours of delay between upload and availability in archive

deb http://incoming.debian.org/debian-buildd buildd-buster-backports main contrib

Refresh list of available packages:

# apt update

You may encounter the following error message:

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0B76920762A6B785

If so, these commands can help (trust these repositories):

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

sassc regression

Currently gitlab installation is broken due to libsass in buster-backports . See 953415 for more details.

A work around is to downgrade libsass and libsass-dev to versions in buster and hold it at the older version.

# apt install libsass1/buster libsass-dev/buster && apt-mark hold libsass1 libsass-dev

gitlab crash work around (install grpc from rubygems.org)

To avoid installation crashing with an error message like,

/usr/share/rubygems-integration/all/gems/gitaly-13.4.6/ruby/proto/gitaly/lint_pb.rb:17: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux-gnu]

We have to use versions of grpc from rubygems.org (don't forget to remove this version when ruby-grpc is fixed in debian)

# apt -t buster-fasttrack install ruby2.7

# gem install -v 1.30.2 grpc

and follow gitlab#manually_installing_ruby_dependencies if you are seeing this crash again

Use apt pinning for resolving dependencies

Since buster-backports and buster-fasttrack have lower apt priorities compared to buster, we have to manually give higher priority to packages we want installed from these suites.

# apt install gitlab-apt-pin-preferences
# apt install gitlab

Note: https://gitlab.debian.net is running on this version.

Unstable (be careful when updating packages)

Gitlab 13.4.7 is available in unstable (many security release behind, see experimental for latest security updates).

We try to keep the version in unstable in a good shape with the latest security updates, but some times dependency updates break GitLab.

Now install gitlab

# apt install gitlab

Known Issues

Currently gitlab installation is broken due to a change in libsass. See 953415 for more details.

A work around is to downgrade libsass and libsass-dev to 3.6.1. Use http://snapshot.debian.org/package/libsass/3.6.1-1/ and hold it at the older version.

# wget http://snapshot.debian.org/archive/debian/20190705T210019Z/pool/main/libs/libsass/libsass-dev_3.6.1-1_amd64.deb

# wget http://snapshot.debian.org/archive/debian/20190705T210019Z/pool/main/libs/libsass/libsass1_3.6.1-1_amd64.deb

# dpkg -i libsass1_3.6.1-1_amd64.deb libsass-dev_3.6.1-1_amd64.deb

# apt-mark hold libsass1 libsass-dev

See gitlab#gitlab_crash_work_around_.28install_grpc_from_rubygems.org.29 for installing grpc gem from rubygems.org (just use apt install ruby2.7 for installing ruby)

Experimental - During freeze and transitions

gitlab 13.7.8 is available in experimental (many security release behind, see gitlab/staging for latest security updates).

If you are using experimental for the first time, check DebianExperimental.

You will have to follow the notes mentioned in unstable section above.

Experimental/unstable Staging

gitlab 13.11.2 is available in staging/experimental.

When gitlab is not ready for experimental/unstable (for example some dependencies need to clear NEW queue), it will be available from this repo.

You will have to follow the notes mentioned in unstable section above.

This section moved to gitlab/staging.

Gitlab on Stretch

This section moved to gitlab/stretch.

Gitlab with apache2

Gitlab can use apache instead of nginx. To get a working configuration for your version the best thing to do is to follow the (gitlab-recipes repository) instructions.

Basically you will have to : Disable nginx Set www-data as web server user. Allow Modules dependencies # mod_rewrite # mod_ssl # mod_proxy # mod_proxy_http # mod_headers

a2enmod rewrite proxy_http headers

and as says in recipe

Allow gitlab-workhorse to listen on port 8181, edit or create /etc/default/gitlab and change or add the following:

 gitlab_workhorse_options="-listenUmask 0 -listenNetwork tcp -listenAddr -authBackend"

Troubleshooting common issues

See gitlab/troubleshooting

Contact maintainers

You can reach the maintainers of the gitlab package via

  1. Matrix at #debian-gitlab:poddery.com (join via browser)

  2. IRC #debian-gitlab on OFTC network (join via browser)

  3. Via XMPP at #debian-gitlab#poddery.com@matrix.org

Documentation for gitlab maintainers