Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Define macros for commonly-used strings/urls to distinguish
distributions. Spec files have lots of `%{?fedora:}` and `%{?rhel}`
conditionals which can be defined in one place.
A commit was recently merged to Fedora:
https://src.fedoraproject.org/rpms/fedora-release/pull-request/223
For changes using those values to actually work, the existing downstreams of Fedora that define %rhel need to add these.
This bz is to track changes in centos-release in Centos Stream.
A similar change will have to be made to redhat-release as well in RHEL sources. (I do not have access to rhel sources, so this will need to be done by someone else.)
The main benefit of this change is to consolidate spec files and reduce customizations.
Examples where this change will benefit are in gdb.spec, elfutils.spec, clang.spec, gcc.spec.
Note: The component list does not have a 'centos-release' package, so I'm selecting redhat-release here.
I've tried to verify the fix with redhat-release-9.2-0.5.el9, however, I've hit an issue while evaluating dist_debuginfod_url as it's not substituted in RHEL.
# rpm -E '%{dist_vendor}'
Red Hat, Inc.
# rpm -E '%{dist_name}'
Red Hat Enterprise Linux
# rpm -E '%{dist_home_url}'
https://www.redhat.com/
# rpm -E '%{dist_bug_report_url}'
https://bugzilla.redhat.com/
# rpm -E '%{dist_debuginfod_url}'
error: Too many levels of recursion in macro expansion. It is likely caused by recursive macro declaration.
# cat /usr/lib/rpm/macros.d/macros.dist
# dist macros.
%rhel 9
%__bootstrap ~bootstrap
%dist %{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do print("%{?distprefix" .. i .."}") end}}.el9%{?distsuffix}%{?with_bootstrap:~bootstrap}
%el9 1
%dist_vendor Red Hat, Inc.
%dist_name Red Hat Enterprise Linux
%dist_home_url https://www.redhat.com/
%dist_bug_report_url https://bugzilla.redhat.com/
%dist_debuginfod_url %{dist_debuginfod_url}
Thanks, Florian and Stephen pushing this through! I owe you some beers :)
Pavel - I believe the lack of the dist_debuginfod_url macro in RHEL is expected -- according to the discussion in https://src.fedoraproject.org/rpms/elfutils/pull-request/9#comment-111860 CentOS and Fedora have a debuginfod server, and the macro is expected to be set there; but RHEL does not have one.
I suppose your test should confirm that this macro isn't set in RHEL -- just to ensure one doesn't sneak in by accident.
Unfortuantely, is seem that this is still not implemented properly as we're hitting now following error when rpm is used:
error: /usr/lib/rpm/macros.d/macros.dist: line 11: Macro %dist_debuginfod_url has empty body
Moving back to assigned, please fix this.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (redhat-release bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:2455
Description of problem: Define macros for commonly-used strings/urls to distinguish distributions. Spec files have lots of `%{?fedora:}` and `%{?rhel}` conditionals which can be defined in one place. A commit was recently merged to Fedora: https://src.fedoraproject.org/rpms/fedora-release/pull-request/223 For changes using those values to actually work, the existing downstreams of Fedora that define %rhel need to add these. This bz is to track changes in centos-release in Centos Stream. A similar change will have to be made to redhat-release as well in RHEL sources. (I do not have access to rhel sources, so this will need to be done by someone else.) The main benefit of this change is to consolidate spec files and reduce customizations. Examples where this change will benefit are in gdb.spec, elfutils.spec, clang.spec, gcc.spec. Note: The component list does not have a 'centos-release' package, so I'm selecting redhat-release here.