Description of problem: Fedora's rpmbuild doesn't handle %doc file containing escaped white spaces e.g. case like these: %files %doc Devel\ Docs/COPYING Version-Release number of selected component (if applicable): rpm-4.11.2-2.fc19.x86_64 rpm-4.11.2-2.fc20.x86_64 rpm-4.11.2-11.fc21.x86_64 How reproducible: Always Steps to Reproduce: 1. Write a spec, which contains a %doc directive pointing to a file with whitespaces on its path. 2. Try to build the rpm Actual results: rpmbuild chokes due to broken handling of such files. Expected results: - Function Additional info: - Such constructs work on CentOS6. - This behavioral change is the cause some Fedora FTBFSs: Real world case: https://bugzilla.redhat.com/show_bug.cgi?id=1106055
This is an intentional change, in rpm >= 4.11 %doc (and %license) files follow the same rules as the rest of %files. See http://rpm.org/ticket/858 for details but in short, there are two options: 1) Use double-quotation 2) Use globs to cover the whitespace. This is also backwards compatible to older versions.
(In reply to Panu Matilainen from comment #1) > This is an intentional change, To me, this is simply a regression - period. > in rpm >= 4.11 %doc (and %license) files > follow the same rules as the rest of %files. See http://rpm.org/ticket/858 > for details but in short, there are two options: > > 1) Use double-quotation You mean full double-quotes: %doc "foo bar/baz" Partial double-quotes: %doc "foo bar"/baz do not work. Unfortunately, neither of these work on RHEL. > 2) Use globs to cover the whitespace. This is also backwards compatible to > older versions. With all due respect, but you don't want to hear what I thin about this proposal.
Please understand that backslash escaping in %doc only ever worked accidentally, it never was an intended or documented feature but just a hack people came up with because it seemed to work where everything else failed - older versions did not support double quoting either. Just like "%doc --parents foo/" used to "work" because the whole line was simply passed as-is to the "cp" command. A third option would be adding *proper* support for backslash-escaping *everywhere* in %files. I dont think anybody would object to that ... patches welcome.