User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Build Identifier: The systemd specfile I have is seen here: http://pkgs.fedoraproject.org/cgit/rpms/systemd.git/tree/systemd.spec#n27 rpm (version 4.8.0 on CentOS 6.&) is unable to parse this specfile. See output below. Reproducible: Always Steps to Reproduce: 1. download systemd specfile 2. run `rpm -q --qf "%{Name}" --specfile ~/systemd/specfiles/systemd.spec` Actual Results: error: line 217: second %prep error: query of specfile ~/systemd/specfiles/systemd.spec failed, can't parse Expected Results: systemdsystemd-libssystemd-compat-libssystemd-pamsystemd-develsystemd-udevsystemd-containersystemd-journal-remotesystemd-debuginfo According to http://www.rpm.org/max-rpm-snapshot/ch-rpm-inside.html, the %prep macro on the comment line needs to be escaped: "Comments can be placed in any section of the spec file. Note that macros are expanded everywhere, so with multiline macros which would only have the first line commented also escape the percent (%) character:" Changing '%prep' to '%%prep' on line 27 fixes the parsing. $ rpm -q --qf "%{Name}" --specfile ~/systemd/specfiles/systemd.spec systemdsystemd-libssystemd-compat-libssystemd-pamsystemd-develsystemd-udevsystemd-containersystemd-journal-remotesystemd-debuginfo
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'.
Fixed in edb4e050132b3c8d7764b73d0d7dc564aba51d8f.