Ticket #54 (closed enhancement: fixed)

Opened 7 years ago

Last modified 4 years ago

RFE: use quilt for %patch management


Reported by: ensc Assigned to: pmatilai Priority: minor Milestone: rpm-4.11.0 Component: rpm Version: RPM Development Keywords: Cc:


Description

It would be nice when 'quilt' (http://savannah.nongnu.org/projects/quilt) is supported for managing the patchsets. When having packages with much patches, it is often difficulty to rediff them as multiple patches might affect one source file and the usual 'gendiff' will fail then.

'quilt' eases rediffing and generation of new patches very much (e.g. see its manpage).

To use 'quilt' a

| %patch1 -p 1 -b .foo

has to be translated to

| quilt import -p 1 %PATCH1 && quilt push

The '-b ...' is to be ignored. The conventional 'patch' method must stay but there should be a way to switch to 'quilt'.

Change History

06/05/09 09:47:18 changed by pmatilai

  • status changed from new to assigned.

Yup, the traditional %patch approach is getting a bit old and tired. Mandriva actually has patches to do something like this with git, and I see no reason why the approach couldn't be integrated a bit tighter and generalized to work with quilt, hg, bzr and such (to let each developer use what they're most familiar with). Also related to ticket #13.

06/25/12 08:04:48 changed by pmatilai

  • status changed from assigned to closed.
  • resolution set to fixed.
  • milestone set to rpm-4.11.0.

There's now an rough initial implementation in rpm.org master with some new macros: https://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=6c5214950e5885c33c498969ca256c9550f5936b https://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=5322c3bd4bb99e9f1221eeddaf8de4da0f729e99

I'm suspect things will change somewhat (eg %autosetup should probably default to applying all the patches instead of requiring an option to do it) but its usable for early testing and the macros should work with any rpm >= 4.6.0 version. As it is, basically replace "%setup" with "%autosetup -A -S <scm>" (regular %setup options accepted as well, replace <scm> with git, hg, bzr or quilt and add eg -p1 if you need) to have the expanded sources and patch applications to be brought under version control.