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.
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.
> 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.