Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 3 product line. The current stable release is 3.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 124995

Summary: "--with foo-bar" may not contain dash
Product: Red Hat Enterprise Linux 3 Reporter: NN Poster <nnposter>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED WONTFIX QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: msw
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-19 19:25:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description NN Poster 2004-06-01 20:45:57 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
(Disclaimer: Due to a lack of comprehensive documentation for RPM I 
am unable to determine if this is a bug or some kind of an obscure 
feature.)

rpmbuild parameter "--with foo-bar" does not allow dash in feature 
name "foo-bar". The expected behavior is that RPM will define a macro 
called "_with_foo-bar" or perhaps "_with_foo_bar" and give it a 
value "--with-foo-bar". Instead RPM will define macro "_with_foo<TAB>-
bar".

Version-Release number of selected component (if applicable):
rpm-4.2.1-4.2

How reproducible:
Always

Steps to Reproduce:
1. rpmbuild --with foo-bar --eval %dump 2>&1 | grep foo
2.
3.
    

Actual Results:   -8: _with_foo  -bar     --with-foo-bar

Expected Results:   -8: _with_foo-bar     --with-foo-bar
OR
 -8: _with_foo_bar     --with-foo-bar

Additional info:

Comment 1 Jeff Johnson 2004-06-02 02:07:45 UTC
Since --with is a popt alias, it's not surprising
that rpm documentation does not cover.

Try man popt.

Yup, looks like the parser stops at first '-'.


Comment 2 Jeff Johnson 2007-01-18 05:57:32 UTC
Macro names do not permit the '-' character, so changing '-' to '_' in --define names is the only solution.

Here is the behavior:

$ rpmbuild --with foo-bar --eval %dump 2>&1 | grep foo
 -8: _with_foo_bar      --with-foo-bar

Fixed in rpm cvs, will be in rpm-4.4.8-0.11 when built.

UPSTREAM

Comment 3 RHEL Program Management 2007-10-19 19:25:05 UTC
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.