automatic packaging of _docdir?

Florian Festi ffesti at
Mon Sep 7 10:40:12 UTC 2015

On 09/07/2015 12:26 PM, Miroslav Suchý wrote:
> I have this snippet in my spec:
> %install
> mkdir -p %{buildroot}%{_docdir}/python-%{upstream_name}
> cp -a docs/* examples %{buildroot}%{_docdir}/python-%{upstream_name}/
> %files
> %doc %{_docdir}/python-%{upstream_name}
> However when I use it exactly this way I get warnings that those files are listed twice.
> When I comment it out:
> %files
> #%doc %{_docdir}/python-%{upstream_name}
> Then those doc files are packaged anyway.
> Is this new feature or bug?
> I have:
> rpm-

Can you please provide the full spec file. There is a bug in rpm-4.12
wrt %doc that got fixed in 4.13. But the information you provide does
not really match. Are the the files in %{_docdir} listed (implicitly) in
the file section else where? See also

The bug actually is that all files in %{_docdir} get added if %doc is
used. With the fix all files installed without using %doc need to be
listed in %files. This still all doesn't explain why they are listed
twice unless there are listed elsewhere in your spec.



Red Hat GmbH, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Michael Cunningham, Michael
O'Neill, Charles Peters

More information about the Rpm-list mailing list