8.0 packages to QA

Kelson Vibber kelson at speed.net
Mon Jun 7 21:40:07 UTC 2004


At 10:10 AM 6/6/2004, Ow Mun Heng wrote:
>On Mon, 2004-06-07 at 00:42, Jon Peatfield wrote:
> > The specfile contains a list of patches to apply to the source, if the
> > same (exact) patch applies as can be takes from another source (Debian
> > or RHEL fro example), then you just need to add the PatchN lines to
> > the specfile, change the package release and rebuild.
>
>And usually do you include the patch url into the spec file?

Not in any RPMs I've looked at.

>Do you patch it before making into RPM or get rpmbuild to wget the patch
>and merge it?

One of the design goals (IIRC) of RPM was to be able to start with a 
project's plain, unmodified source code and add patches and structure on 
top of it.  So a source RPM should include:

- unpatched source code (usually tar.gz or tar.bz2)
- patches (if needed)
- install/uninstall scripts (if needed)
- additional files (.desktop entries, icons, etc.)
- the spec file

You should download the patch, copy it to your RPM source directory, then 
add two lines to the .spec file, one in the header section identifying the 
patch filename, the other in the %setup section indicating at what point 
that patch should be applied.

Something like:
Patch1: add-redhat-customization.diff
Patch2: fix-for-such-and-such.diff

...

%setup
%patch2 -p1
%patch1 -p0

Then rpmbuild will apply the patch as part of the build process.

>How would one know if we're "not" doing more harm than actually making a
>"good" package?

You can use "rpmbuild -bp" to only work up through applying the patches to 
see if it's applied cleanly.  If not, you may need to reorder the patches, 
change the -p option, edit the patch, or something more complicated.

Kelson Vibber
SpeedGate Communications <www.speed.net> 






More information about the fedora-legacy-list mailing list