Description of problem: My spec file had a line: %config{noreplace} %{_sysconfdir}/wgetrc and the error returned by RPM build was: File must begin with "/": {noreplace} when the real error is bad brackets on %config(noreplace). Version-Release number of selected component (if applicable): RPM version 4.12.0.1 How reproducible: Always Steps to Reproduce: 1.Write a spec file with %config{noreplace} in it 2.Try to build the package Actual results: RPM build errors: File must begin with "/": {noreplace} Expected results: RPM build errors: Wrong brackets, curly instead of normal: %config{noreplace} ~or something like that Additional info:
rpmbuild is made from the rpm source package... ;) Moving over there for comment...
Sorry, rpmbuild is not going to guess your intentions and then try to give helpful hints. The error message is gives is quite correct. Rpmbuild expects a file name and complains that it is malformed. The "(noreplace)" part is optional and the spec parser has correctly decided that it is not there. The error message also is not misleading. It tells you quite directly which part it is not able to interpret in a useful way and what it thinks should be there.