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 5 product line. The current stable release is 5.10. 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 564188

Summary: redhat-release does not include rpm macros required to build packages
Product: Red Hat Enterprise Linux 5 Reporter: Till Maas <opensource>
Component: redhat-releaseAssignee: Daniel Mach <dmach>
Status: CLOSED DUPLICATE QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-12 08:29:42 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 Till Maas 2010-02-11 22:58:25 UTC
Description of problem:
Currently it is required to use rpms from
http://buildsys.fedoraproject.org/buildgroups/rhel5/i386/
to build RHEL rpms, because macros like %rhel are not defined otherwise.

In Fedora, these macros have been moved into fedora-release:
http://lists.fedoraproject.org/pipermail/devel/2007-June/104640.html

Please either include these macros in redhat-release for RHEL 5 or state that you won't do this, both would help me a lot.

Version-Release number of selected component (if applicable):
redhat-release-5Client-5.4.0.3

This is needed to be added to the %install and %files section to fix this:

%install
mkdir -p $RPM_BUILD_ROOT/etc/rpm/
VERSION%{base_release_version}
printf %s%b "%" "rhel $VERSION\n" >> $RPM_BUILD_ROOT/etc/rpm/macros.disttag
printf %s%b "%" "dist .el$VERSION\n" >> $RPM_BUILD_ROOT/etc/rpm/macros.disttag
printf %s%b "%" "el$VERSION 1\n" >> $RPM_BUILD_ROOT/etc/rpm/macros.disttag
printf %s%b "%" "__arch_install_post /usr/lib/rpm/check-buildroot\n" >> $RPM_BUILD_ROOT/etc/rpm/macros.checkbuild


%files
%defattr(-,root,root)
/etc/rpm/macros.disttag
/etc/rpm/macros.checkbuild

Comment 1 Daniel Mach 2010-02-12 08:29:42 UTC
Till,
we already decided not to add macros to redhat-release in RHEL5.
I recommend you to keep using buildsys-macros.

Closing as duplicate of bz#481023.

*** This bug has been marked as a duplicate of bug 481023 ***