Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WATCH OUT for %__patch in RPM in Mandriva 2010.0

1 view
Skip to first unread message

Kevin the Drummer

unread,
Jan 8, 2010, 1:15:26 PM1/8/10
to
I'm not certain what the version was that changed the %__patch in
Mandriva's RPM defaults, but the change prevented me at first from
rebuilding some RPMs. Way back when on Mandriva 2007.0 %__patch
resulted in something like this in the RPM prep stage:

+ echo 'Patch #1 (exmh-2.1.1-conf.patch.bz2):'
Patch #1 (exmh-2.1.1-conf.patch.bz2):
+ patch -p1 -b --suffix .conf -s

On 2010.0 the same thing results in this:

+ echo 'Patch #3 (exmh-2.7.0-conf.patch):'
Patch #3 (exmh-2.7.0-conf.patch):
+ /usr/bin/patch -U -s -p1 -b --suffix .conf --fuzz=0 \
-i /home_a8/local/src/INCOMING/SOURCES/exmh-2.7.0-conf.patch

The thing that breaks my RPM build is that the patch in question is a
unified patch, generated with diff's "-uNr" flags. But, Mandriva's
new definition of %__patch includes the "-U" flag, which patch's help
says does this:

-U --unified-reject-files Create unified reject files.

I'm not really sure what that means. But, the effect I see is that the
patches fail. If I intercept the build at the right point, then I can
patch the files without -U and it all works.

WORK AROUND: I created new context diff based patches using diff's
"-cNr" flags. Patches created this way seem compatible with the
patch flags in Mandriva's new %__patch definition.

I hope this helps somebody....


--
PLEASE post a SUMMARY of the answer(s) to your question(s)!
Unless otherwise noted, the statements herein reflect my personal
opinions and not those of any organization with which I may be affiliated.

0 new messages