Best practices for patch management on RPM based packages?

Enrico Scholz enrico.scholz at informatik.tu-chemnitz.de
Tue Sep 6 19:45:21 UTC 2011


Richard Shaw <hobbes1069 at gmail.com> writes:

> I like the idea of quilt but I can't seem to find the magic recipe to
> get it to integrate with rpmbuild.

I use an %apply macro in ways like

| %apply -n4 -p1

which is equivalent to 

| %patch4 -p1

on ordinary hosts.  But defining this macro as

| %apply(p:n:b:)          \
|         if test -n "$RPM_NO_DEVEL"; then        \
| %patch%{-n:%{-n*}} %-p %-b              \
|         else \
|            quilt import %-p %{!-p:-p 0} %{P:%{-n*}} \
|            quilt push -f; \
|         fi \
| %nil

in ~/.rpmmacros allows the management of patches by 'quilt'.

See e.g.

  http://pkgs.fedoraproject.org/gitweb/?p=milter-greylist.git;a=blob;f=milter-greylist.spec;hb=HEAD

for the definition of %apply.



Enrico


More information about the devel mailing list