Ubuntu packages are ambiguously named and are missing libc version dependencies
Summary
The Ubuntu Omnibus packages for each Ubuntu release are named identically, but are compiled against the release's libc, making them indistinguishable but backwards-incompatible.
Steps to reproduce
- Manually download the Omnibus Gitlab package for Ubuntu Focal
- Attempt to install this package on Ubuntu Bionic. dpkg will start installing, but then fail in the post-install scripts because the bundled libraries cannot find missing symbols in this older libc6 version
- (Optional) Attempt to install the correct package for Ubuntu Bionic. This will now also fail, because the pre-install script for the Omnibus package attempts to run commands to prep the system for install, but these commands use the bundled Ruby and thus will not run.
- The only way to recover this installation is to manually unpack the correct Omnibus package and overwrite the existing libraries (e.g. with
dpkg-deb -x <filename.deb> /
)
What is the current bug behavior?
Incompatible versions of the package will install, but then cannot be upgraded, removed, or reinstalled without manual intervention.
What is the expected correct behavior?
Packages depend on the version of libc6 they are compiled against; for example:
xenial: libc6 >= 2.23
bionic: libc6 >= 2.27
focal: libc6 >= 2.31
Also, package names and versions should include the distribution they are built against in the version number (see Package Versioning Scheme):
gitlab-ee_13.8.4-ee.0_amd64.deb -> gitlab-ee_13.8.4-ee.0~focal1_amd64.deb
Relevant logs and/or screenshots
Initial installation (installing Focal version on Xenial):
root@8a49bba15951:/stuff# apt install ./gitlab-ee_13.8.4-ee.0_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'gitlab-ee' instead of './gitlab-ee_13.8.4-ee.0_amd64.deb'
The following NEW packages will be installed:
gitlab-ee
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/954 MB of archives.
After this operation, 2581 MB of additional disk space will be used.
Get:1 /stuff/gitlab-ee_13.8.4-ee.0_amd64.deb gitlab-ee amd64 13.8.4-ee.0 [954 MB]
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package gitlab-ee.
(Reading database ... 4932 files and directories currently installed.)
Preparing to unpack .../gitlab-ee_13.8.4-ee.0_amd64.deb ...
Unpacking gitlab-ee (13.8.4-ee.0) ...
Setting up gitlab-ee (13.8.4-ee.0) ...
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libcrypt.so.1: version `XCRYPT_2.0' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
dpkg: error processing package gitlab-ee (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
gitlab-ee
E: Sub-process /usr/bin/dpkg returned an error code (1)
Installing the Xenial version over top of this broken version:
root@8a49bba15951:/stuff# dpkg -i xenial__gitlab-ee_13.8.4-ee.0_amd64.deb
(Reading database ... 86203 files and directories currently installed.)
Preparing to unpack xenial__gitlab-ee_13.8.4-ee.0_amd64.deb ...
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libcrypt.so.1: version `XCRYPT_2.0' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
/opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
dpkg: error processing archive xenial__gitlab-ee_13.8.4-ee.0_amd64.deb (--install):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
xenial__gitlab-ee_13.8.4-ee.0_amd64.deb
Output of checks
N/A
Results of GitLab environment info
N/A
Expand for output related to GitLab environment info
root@8a49bba15951:/stuff# gitlab-rake gitlab:env:info /usr/bin/gitlab-rake error: could not load /opt/gitlab/etc/gitlab-rails/gitlab-rails-rc Either you are not allowed to read the file, or it does not exist yet. You can generate it with: sudo gitlab-ctl reconfigure root@8a49bba15951:/stuff# gitlab-ctl reconfigure /opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libcrypt.so.1: version `XCRYPT_2.0' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7) /opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7) /opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7) /opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7) /opt/gitlab/embedded/bin/ruby: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by /opt/gitlab/embedded/lib/libruby.so.2.7)
Results of GitLab application Check
N/A
Possible fixes
As mentioned above, add libc6 dependencies and update versioning to reference the Ubuntu series.