[go: up one dir, main page]

|
|
Log in / Subscribe / Register

Patching and fuzz

Patching and fuzz

Posted Jul 9, 2008 22:50 UTC (Wed) by epa (subscriber, #39769)
Parent article: Rawhide users: brace for a new RPM

Interesting that applying patches with fuzz is no longer allowed.  Essentially this means that
patches must be regenerated against each new upstream version (though a simple script can
automate that and show the results for checking).  The logical next step would be to take an
md5sum of the source file before and after applying the patch, so it can apply only to the
exact version.

Indeed, pristine sources are a good idea but the rpmbuild tool is a slightly odd place to
apply the patches.  Eventually a better way would be to use the distributed VCS of your choice
to maintain a source tree with your packaging customizations and pull the upstream sources to
it every so often.


to post comments

Patching and fuzz

Posted Jul 9, 2008 23:04 UTC (Wed) by bojan (subscriber, #14302) [Link]

> Interesting that applying patches with fuzz is no longer allowed.

Only by default. This can be overridden by packages.

> Essentially this means that patches must be regenerated against each new upstream version

Only if there is fuzz. Otherwise, no.

Patching and fuzz

Posted Jul 10, 2008 5:25 UTC (Thu) by anchorsystems (guest, #40101) [Link]

> Indeed, pristine sources are a good idea but the rpmbuild tool is a slightly odd place to
> apply the patches.  Eventually a better way would be to use the distributed VCS of your
choice
> to maintain a source tree with your packaging customizations and pull the upstream sources
to
> it every so often.

Argh. That would be an absolute nightmare for collaboration and reuse by
others.

The great thing about source RPMs is that it is trivial for any third party to
see how the source differs from the upstream version. That makes it easy to
update to newer (or older) upstream versions, remove/update old patches, or
to pick up/review patches for upstream integration.

Patching and fuzz

Posted Jul 10, 2008 15:30 UTC (Thu) by iabervon (subscriber, #722) [Link]

I think you're confusing fuzz and offsets. You only get fuzz if there are differences between the version you have and the version the patch was against in the 3 context lines around each change. My vague estimate is that, if a patch applies with fuzz, there's about even odds that the resulting code will work, versus being broken in some way. In particular, if there's a memory leak, and you make a patch to fix it, and the upstream adopts your patch, your patch will probably apply with fuzz and introduce a double-free bug.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds