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.

Bug 1658333

Summary: rpm-build: unknown tag recommends
Product: Red Hat Enterprise Linux 7 Reporter: Carl George 🤠 <carlwgeorge>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: ngompa13, pmatilai
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-14 06:42:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1538566    
Bug Blocks:    

Description Carl George 🤠 2018-12-11 19:12:20 UTC
Description of problem:
The rpm changelog claims that support for weak dependencies was backported.

    * Mon Nov 13 2017 Panu Matilainen <pmatilai> - 4.11.3-32
    - Backport weak dependency tag definitions (#1508538)

However it does not appear to be working.  rpmbuild refuses to build a spec file using a Recommends tag.

Version-Release number of selected component (if applicable):
rpm-4.11.3-35.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. create a spec file using `Recommends:` tag

    Name:           foo
    Version:        0
    Release:        0%{?dist}
    Summary:        Example package
    License:        Public Domain
    Recommends:     bar
    %description
    %{summary}.

2. attempt to build it
    
    $ rpmbuild -ba SPECS/example.spec 

Actual results:

    error: line 6: Unknown tag: Recommends:     bash

Expected results:
successful build

Comment 2 Panu Matilainen 2018-12-12 09:42:32 UTC
No, it doesn't say that support for weak dependencies were backported. Weak dependency *tag definitions* were backported, which only means that you can query them from an existing package, nothing more.

Comment 3 Carl George 🤠 2018-12-13 14:58:59 UTC
That by itself doesn't seem like a useful feature.  Now that dnf (nextgen-yum4) has been added to RHEL, this could be really useful if it's properly integrated.

Also, querying doesn't seem to work.

    $ wget -q https://dl.fedoraproject.org/pub/fedora/linux/releases/29/Everything/x86_64/os/Packages/a/awscli-1.15.71-1.fc29.noarch.rpm
    $ rpm -qp --recommends awscli-1.15.71-1.fc29.noarch.rpm
    rpm: --recommends: unknown option

Comment 4 Panu Matilainen 2018-12-14 06:42:36 UTC
Again, only tag definitions were backported, that doesn't include popt shortcut aliases for querying, it just means that they'll work in --queryformat and are available to python. Human consumption was not the main target here, this all was very much intended. Please leave this closed now.

There's a separate RFE bug requesting a full weakdeps backport: https://bugzilla.redhat.com/show_bug.cgi?id=1538566