Bug 126707 - rpmbuild parser barks on %xxx comments in changelog
rpmbuild parser barks on %xxx comments in changelog
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rpm (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-24 21:12 EDT by Charlie Brady
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-24 22:53:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Charlie Brady 2004-06-24 21:12:46 EDT
Description of problem:

Recent rpmbuild fails to build various legacy source RPMs which happen
to mention '%prep' or '%install' in changelog entries. Error message
is, e.g.:

error: line 35: second %prep

I don't understand why rpmbuild would look for %{setup,build,install}
anywhere but at the start of a line. It's not cool to break backwards
compatibility, and it's not acceptable to change other people's
changelog entries.

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

Seen with RHEL 3 and FC2 (rpm-4.3.1-0.3_22)

How reproducible:

Very.

Steps to Reproduce:
1. rpm -iv xxxx.src.rpm
2. Add %setup comment in changelog
3. rpmbuild -bb xxxx.spec

Or:

1. rpmbuild --rebuild xxxx.src.rpm, where xxxx.src.rpm used to build
successfully, with, e.g. rpm-4.0.4.
  
Actual results:

error: line 35: second %setup

Expected results:

rpm build successfully, with %setup in comment in changelog.
Comment 1 Jeff Johnson 2004-06-24 22:53:56 EDT
Yup. macors are expanded wherever they are found.

Escape with and extra %, as in
    %%prep
because the redhat-rpm-config package is overloading
the token "%prep" with a multiline expansion to generate
-debuginfo sub-pkgs.
Comment 2 Charlie Brady 2004-07-12 20:22:55 EDT
> Yup. macors are expanded wherever they are found.

But that's wrong, isn't it? Isn't it also wrong to change rpm in a way
which will prevent rebuilding of extant source RPMS?

> Escape with and extra %, as in
>    %%prep

That doesn't work.

Note You need to log in before you can comment on or make changes to this bug.