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 113934

Summary: SRPMS: test for MMN version it too fragile
Product: Red Hat Enterprise Linux 3 Reporter: Sysoltsev Slawa <vyatcheslav.sysoltsev>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-23 09:48:55 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:
Attachments:
Description Flags
Patch that would fix described problem none

Description Sysoltsev Slawa 2004-01-20 12:55:49 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6)
Gecko/20040113

Description of problem:
I tried to build httpd package by Intel compiler and got a problem:



20020903' '!=' x20020903
#: Error: Upstream MMN is now 20020903, packaged MMN is 20020903.
#: Update the mmn macro and rebuild.
#exit 1

The problem is that to get MMN version C preprocessor is used: 
echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include `pwd`/include/ap_mmn.h |
grep -v '#'
without grep �v this would give with gcc:
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "/users/compiler/tc_5/WORK_DIR/BUILD/httpd-2.0.46/include/ap_mmn.h" 1
# 2 "<command line>" 2
# 1 "<stdin>"
20020903

The reason this test doesn�t work with Intel compiler is in different
control of empty lines in preprocessor output: gcc uses #line
directive to jump over few empty lines of output, Intel compiler
simply leaves these empty lines, so the output of `echo
MODULE_MAGIC_NUMBER_MAJOR | cpp -include `pwd`/include/ap_mmn.h` has
got many empty lines. To get MMN version in this case these empty
lines must be cut along with gcc�s #line directives, so to get MMN
version you should use:
`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include `pwd`/include/ap_mmn.h
| grep -v '#' | grep -v �^[[:space:]]*$�`

This little enhancement would make test for MMN a bit more robust.


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


How reproducible:
Always

Steps to Reproduce:
1. make the wrapper called cpp, that would add -x c - to the command
line and call Intel compiler for C preprocessing
2. make sure your hand-made wrapper is in PATH before system cpp
3. try to build httpd from source rpm
    

Actual Results:  error emitted by check in spec file:
#: Error: Upstream MMN is now 20020903, packaged MMN is 20020903.
#: Update the mmn macro and rebuild.


Expected Results:  succesfully built package

Additional info:

Comment 1 Sysoltsev Slawa 2004-01-20 12:59:28 UTC
Created attachment 97120 [details]
Patch that would fix described problem

Comment 2 Joe Orton 2004-01-20 13:06:32 UTC
Replacing the greps with:
   sed -n '/^2/p'
is the simplest solution, can you try that with icc?


Comment 3 Sysoltsev Slawa 2004-01-20 13:10:39 UTC
super! works well.

Comment 4 Joe Orton 2004-01-20 15:12:01 UTC
Fixed in 2.0.48-9 for Raw Hide; leaving open for inclusion in future
RHEL3 update.

Comment 5 Mark J. Cox 2004-03-23 09:48:55 UTC
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2004-084.html