Overriding %doc

Edward Peschko horos11 at gmail.com
Fri Mar 5 02:34:34 UTC 2010


Ok all,

After some investigation and some rpmbuild assistance (thanks jeff), I
take it that there are certain macros that cannot be overridden, as
they are compiled into rpmbuild (%prep, %setup, etc).

I was wondering if %doc fell under the same category - for example, I
see in %files tags for different rpms that there are lines like:

    %doc <filename>

which then gets expanded behind the scenes to paths like

/usr/share/doc/

You would think that this would use %_docdir under the covers, so that
you could use it in a relocatable way (ie: for packages not rooted in
'/'.) However, it seems to be hardcoded somewhere, so that I get a
fully relocatable file EXCEPT for any rpms that use this macro.

So - is this just a bug?  Or is %doc just using another macro that I'm
not aware of? Or can you actually see and override this macro and I
just haven't hit on how to do so?

Thanks much,

Ed

(ps - btw I'm working off of a binary installation of rpmbuild -
where's a pointer to the latest source version, or better yet, a git
repository?)


More information about the Rpm-list mailing list