Bug 126707 - rpmbuild parser barks on %xxx comments in changelog
Summary: rpmbuild parser barks on %xxx comments in changelog
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rpm
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-25 01:12 UTC by Charlie Brady
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-06-25 02:53:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Charlie Brady 2004-06-25 01:12:46 UTC
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-25 02:53:56 UTC
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-13 00:22:55 UTC
> 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.