I thought it was impossible. Then I thought it was merely impossible without some terrible hacking. But now, after a bit of inspiration in the shower this morning, I went ahead and implemented the complete %autosetup functionality for EPEL5. Currently built as epel-rpm-macros-5.3 but not yet pushed to testing.
As always, I welcome any testing. If these epel-rpm-macro packages can get karma, folks could start using the things I'm adding sooner rather than two weeks from now. And if you want something added, please file a bugzilla ticket on the epel-rpm-macros package and I'll have a look. Since folks on IRC were curious as to how this is possible: rpm >= 4.6 (i.e. EL6 and newer) provides two tables in the lua namespace: patches and sources. %autosetup iterates over patches to work its patch application magic. If you can somehow provide the patches table in EL5's rpm, you can use the autosetup macros verbatim as far as I can tell. So I wrote some lua support functions to iterate over a range of possible %SOURCEX and %PATCHX macros and stick anything found into the appropriate table. One line added to the %autosetup definition calls this function and everything else works. The whole thing is in /etc/rpm/macros.zzz-epel in the %epel_macros_init() scaffolding and the %elf_setup_patches() function. By default it looks at all of %PATCH0 through %PATCH100000, which takes an immeasurably small amount of time on my test VM. If you really want to use Patch3141527: or whatever, you can set %el5_patches_limit in your spec. This is all working and tested; it can even prep rpm.spec from current rawhide without problems. - J< _______________________________________________ epel-devel mailing list epel-devel@lists.fedoraproject.org http://lists.fedoraproject.org/admin/lists/epel-devel@lists.fedoraproject.org