Skip to content

Commit

Permalink
Work around a packaging bug in RHEL 8.4 (#889)
Browse files Browse the repository at this point in the history
There is a fix pending for this issue, but it is currently breaking
pretty much all builds on the farm, and a hack to the source RPM build
processes is the most expedient way to work around the bug.

This change can be reverted once the CentOS 8 buildroot has an updated
cmake package which provides the cmake3 virtual package. A rebuild of
the source packages will not be required at that time.
  • Loading branch information
cottsay authored Jun 5, 2021
1 parent c3d639f commit f7a12d8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ros_buildfarm/sourcerpm_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ def build_sourcerpm(
'--depth', '1', '--no-single-branch',
release_repository_url, os_pkg_name]

# HACK FOR https://bugzilla.redhat.com/1960791
# RHEL 8.4 shipped a cmake package which omitted the 'cmake3' virtual
# package. This hack replaces dependencies on 'cmake3' with 'cmake >= 3',
# which will work on RHEL 8, but not RHEL 7.
if os_name == 'rhel' and os_code_name == '8':
fixup_cmd = [
'sed', '-i', '-E',
r's/^\(\(Build\)\?Requires:\ \*\)cmake3$/\\1cmake\ \>=\ 3/',
'%s/rpm/%s.spec' % (os_pkg_name, os_pkg_name)]
clone_cmd = [
'sh', '-c', "'" + ' && '.join([
' '.join(clone_cmd),
' '.join(fixup_cmd),
]) + "'"]
# END HACK

cmd = [
'mock',
'--scm-option', 'git_get=%s' % ' '.join(clone_cmd),
Expand Down

0 comments on commit f7a12d8

Please sign in to comment.