[Fedora-packaging] Vanilla builds guideline?

Ondrej Vasik ovasik at redhat.com
Mon Oct 17 08:12:47 UTC 2011


Hi,
for better automation of our static analysis tools we would like to have
some defined way how to get "as close to vanilla as possible" build from
Fedora srpms. Based on our statistics ~15% of packages are affected -
you can't simply build them without Fedora patches.

This can also be used for other purposes - if you want to rule out
influence of distro specific patches before reporting problem upstream
in the case that upstream sources are hard to compile/get running on
Fedora system. This could reduce false alarms to upstream lists.

In many cases it is not possible to simply disable all the patches -
some are required to get the rpm built but do not affect program
functionality. We have discussed that problem with rpm guy - to get a
way with the lowest possible impact on the package. As a solution, we
are proposing %{?_rawbuild} conditional.
Note: Some packages already use this %{?_rawbuild} anotation, some use %
global _with_vanilla 0 to give user a chance for vanilla build.

Change in the spec file is very simple - just for the patches required
for vanilla build this conditional should be added.

e.g. from the sudo spec file
%patch3 -p1 -b .m4path
->
%patch3 -p1 -b .m4path %{?_rawbuild} 

After this change you can simply create a wrapper for rpmbuild, which
will apply only patches with the %{?_rawbuild} annotation. For more
complicated changes, _with_vanilla global is probably better option.

Our wrapper is available at
http://kdudka.fedorapeople.org/rpmbuild-rawbuild .

Is it possible to establish some common rule for Vanilla builds in
Packaging Guidelines?

Thanks in advance for consideration! 
(or pointing me to better place where to ask)

Greetings,
         Ondrej Vasik



More information about the packaging mailing list