Cannot install Gitlab-CE on Fedora-33. Dependent package ("policycoreutils-python") doesn't exist

Hello Friends:

I finally had to upgrade my Fedora-30 system to Fedora-33. Too many things were falling behind and no longer working to remain on Fedora-30. Unfortunately, while I had GitLab-CE working well (and with it’s latest version) on Fedora-30, I can only install a super old version on Fedora-33 due to it being dependent on a package that doesn’t exist. It actually doesn’t even exist in Fedora-32 from what I can tell.

Have a look:

root# dnf install gitlab-ce
Last metadata expiration check: 0:03:08 ago on Mon 29 Mar 2021 11:32:39 PM EDT.
Dependencies resolved.

 Problem: cannot install the best candidate for the job
  - nothing provides policycoreutils-python needed by gitlab-ce-13.10.0-ce.0.el7.x86_64
================================================================================================================
 Package                  Architecture          Version                          Repository                Size
================================================================================================================
Installing:
 gitlab-ce                x86_64                9.5.10-ce.0.el7                  gitlab-ce                381 M
Skipping packages with broken dependencies:
 gitlab-ce                x86_64                13.10.0-ce.0.el7                 gitlab-ce                846 M

Transaction Summary
================================================================================================================
Install  1 Package
Skip     1 Package

Total download size: 381 M
Installed size: 1.1 G
Is this ok [y/N]: n
Operation aborted.

root#

And:

root# cat /etc/yum.repos.d/gitlab-ce.repo
[gitlab_gitlab-ce]
name=gitlab_gitlab-ce
baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/fedora/33/$basearch
repo_gpgcheck=0
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
       https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[gitlab_gitlab-ce-source]
name=gitlab_gitlab-ce-source
baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/fedora/33/SRPMS
repo_gpgcheck=0
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
       https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

root# 

I think the name of the RPM package being sought is not what is present in Fedora-32/33 (although it may be slightly more complicated that that):

root# sudo dnf search policycoreutils
Last metadata expiration check: 0:00:21 ago on Tue 30 Mar 2021 12:05:03 AM EDT.
==================================== Name Exactly Matched: policycoreutils =====================================
policycoreutils.x86_64 : SELinux policy core utilities
======================================== Name Matched: policycoreutils =========================================
policycoreutils-dbus.noarch : SELinux policy core DBUS api
policycoreutils-devel.i686 : SELinux policy core policy devel utilities
policycoreutils-devel.x86_64 : SELinux policy core policy devel utilities
policycoreutils-gui.noarch : SELinux configuration GUI
policycoreutils-newrole.x86_64 : The newrole application for RBAC/MLS
policycoreutils-python-utils.noarch : SELinux policy core python utilities
policycoreutils-restorecond.x86_64 : SELinux restorecond utilities
policycoreutils-sandbox.x86_64 : SELinux sandbox utilities
python3-policycoreutils.noarch : SELinux policy core python3 interfaces

Can this be addressed quickly? (Please and thank you if possible). Unfortunately we’re unable to do work. This was unanticipated.

Thank you in advance! :blush:

Hi,

To be totally honest, and from what I see on the docs, Fedora isn’t supported as an OS (gitlab-ce or gitlab-ee only exist as RPMS for el6, el7, el8). Which wouldn’t be surprising since Fedora is at best an unstable test system, for functionality that will later appear in RHEL/CentOS. If you are running anything as a server, seriously you should be using a far more stable operating system like Debian 10, Ubuntu 18.04 or 20.04, RHEL.

What you’ve found is due to changes in Fedora, and the packages which are old being dropped and this is why they don’t exist in Fedora 33. Gitlab isn’t built for Fedora, but rather for stable RPM distros like RHEL/CentOS.

I suggest you get the latest backup from /var/opt/gitlab/backups as well as the gitlab.rb and gitlab-secrets.json and follow the procedures for restoring your system on a supported distro with the exact same version that is currently installed on that Fedora system. Once you have done that, then on the stable server OS upgrade it following the upgrade path from the upgrade docs, as well as ensuring background migrations have finished before upgrading to the next release on the upgrade path.

1 Like

I don’t know what your YUM repository definition is, but from the output it is trying to install the el7 version which won’t work on Fedora 33. You need to install the el8 RPM which should install fine. You will still be on unsupported OS, but it should work.
BTW the policycoreutils-python has been replaced by the policycoreutils-python-utils and python3-policycoreutils packages.

EDIT: sorry, I am blind and missed the middle part with YUM repository definition :slight_smile: Change the repo to point to el/8

Hello @iwalker @balonik
Thank you for prompt and very thorough the replies.

By the way, this isn’t a production setting and, just as a data point, for a very long time (years), GitLab-CE has performed wonderfly on Fedora. Because I run Fedora as the bare-metal server O/S that is HOST to several Fedora GUEST LXC containers, for consistency I took a chance on running GitLab-CE atop Fedora and it worked out well. This only became an issue yesterday when upgrading Fedora to Fedora-33 (i.e. blindsided by the Fedora people substituting the packages in question).

@balonik (Peter): I had thought of trying your suggestion yesterday and adding that REPO to my /etc/yum.repos.d. I’ll try that first because it’s easiest, and report back to you guys.

Thank you and stay tuned. :blush:

@iwalker @balonik
UPDATE:

Without installing the EPEL REPO in my Fedora-33 environment, I simply performed:

root@fc33# wget -O gitlab-ce-13.10.0-ce.0.el8.x86_64.rpm https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/8/gitlab-ce-13.10.0-ce.0.el8.x86_64.rpm/download.rpm
root@fc33# rpm -Uvh gitlab-ce-13.10.0-ce.0.el8.x86_64.rpm
root@fc33# reboot # Reboot LXC container for good measure.
root@fc33# gitlab-ctl upgrade

And that worked.

Notice that I didn’t even need to specify --nodeps or --force to the rpm(1) command. It was a long time ago, but I think that’s what I originally did: Rather than install gitlab-ce.rpm via dnf(1), which complained, I installed it manually via rpm(1), then subsequently performed dnf update [...] across many years which worked to update GitLab CE. As mentioned, it’s unsupported, but works well.

All of this suggests that the binaries installed by Fedora's policycoreutils-python-utils and python3-policycoreutils satisfy the GitLab CE dependencies; particularly because policycoreutils-python doesn’t seem to exist in any Fedora version I’ve used over the years, so GitLab CE must have been using artifacts of the former two packages all this time. :man_shrugging:t2:

Thank you for the help, suggestions and moral support!

I know this is super old, but adding the el/8 repository works for Fedora Rawhide (that today is F36)