Bug 573339 - rpmbuild eats white lines from HERE-docs in *.spec
Summary: rpmbuild eats white lines from HERE-docs in *.spec
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-14 08:46 UTC by Ralf Corsepius
Modified: 2010-08-06 05:40 UTC (History)
4 users (show)

Fixed In Version: rpm-4.8.0-14.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-04-28 03:04:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ralf Corsepius 2010-03-14 08:46:09 UTC
Description of problem:

rpmbuild eats white lines from HERE-docs in *.spec



Version-Release number of selected component (if applicable):
rpm-4.7.2-1.fc12.x86_64

How reproducible:
Always.

Steps to Reproduce:
Create *.spec which generates a file using a HERE-document and check the generated file.

e.g.
use something similar to this in %prep:
..
cat << EOF > test1.txt
1 The next line should be empty

3
EOF
..
  
Actual results:
rpmbuild remove all "white lines", causing the generated file not to match with what is expected.

Expected results:
rpm to process HERE-docs correctly

Additional info:
I am able to reproduce this bug on
* Fedora 11
* Fedora 12
* Fedora 13
* current rawhide
* openSUSE 11.2

I am *NOT* able to reproduce this bug on
* CentOS5
* CentOS4
* openSUSE 11.1
* openSUSE 11.0

=> *REGRESSION*

Comment 1 Panu Matilainen 2010-03-15 09:07:14 UTC
Reproduced. It only happens in %prep (because of the difference in how its processed due to the built-in %setup and %patch macros), not everywhere in the spec. So it can be worked around by moving the HERE doc generation to eg %build section. Anyway, will fix...

Comment 2 Panu Matilainen 2010-03-15 10:52:53 UTC
Fixed upstream, I'll try to include this in next rpm update for Fedora 11 + 12.

Comment 3 Fedora Update System 2010-04-23 11:30:52 UTC
rpm-4.8.0-14.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/rpm-4.8.0-14.fc13

Comment 4 Fedora Update System 2010-04-25 13:48:28 UTC
rpm-4.8.0-14.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update rpm'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/rpm-4.8.0-14.fc13

Comment 5 Fedora Update System 2010-04-28 03:03:58 UTC
rpm-4.8.0-14.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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