Re: patching RPMs



Rick Silvers <dev_null@xxxxxx> wrote:
Hello, I have an RPM that consists of already compiled binaries ( about
100 megs worth) and I now have 3 files to patch to that RPM. (which
has already been distributed to several servers) and these three files
replace older versions inside the first RPM.
What I would like to know is if I can generate a patch to my first rpm
that will just apply those three new files but not mess up my first
RPM, i.e myRPM-1-1.i386.rpm for the main package and maybe a
myRPM-1-2.i386.rpm but when I install it, it won't erase the files from
1-1 version... I am kind of new to RPM so I am still trying to figure
it all out. I read up on the %patch tag, but that seems more for sorce
code distributions, and the files I am distributing are already
compiled.

To understand what happens during an RPM upgrade, read
http://www.rpm.org/max-rpm/ch-rpm-upgrade.html#S1-RPM-UPGRADE-WHAT-IT-DOES
(and the surrounding documentation).

The correct approach is to create a myRPM-1-2.i386.rpm that contains all
the files of the original RPM that stayed the same plus the three modified
files.

Apart from that the RPM should be identical to the original.

When you update with RPM -U, only the 3 new files will be replaced and
the RPM database will be updated.

Yours,
Laurenz Albe
.



Relevant Pages

  • Re: Make RPMs from .spec and package source tarball? how?
    ... and then make an RPM based on the ATRPMS spec for the package. ... Install the mythtv source package from atrpms. ... Make the changes you need to the sources and prepare a patch. ...
    (Fedora)
  • Re: Fedora Updates: whole packages vs patches
    ... is recreating the base if you remove the patch. ... > location of the original package, and restore the needed parts from there. ... Implementing a tool that could replace changed files inside binary RPM, ... either download a patch, or new RPM. ...
    (Fedora)
  • RE: Creating RPMS from source without Makefile
    ... Creating RPMS from source without Makefile ... For several applications/tools I'd like to create an RPM to make ... You may want to start with a package less complex than httpd ... "Start with pristine sources; then patch as needed. ...
    (RedHat)
  • RE: [SLE] YaST Online Update Problem
    ... YaST ... I tried that and I get the following for each patch that YaST is trying to ... ERROR (YOU: rpm failed) ... YShortcutmanager.cc:96 No valid shortcut for ...
    (SuSE)
  • Re: Fedora Updates: whole packages vs patches
    ... On Thursday 09 December 2004 12:36 pm, Rich Burroughs wrote: ... > Then the md5sums that RPM uses to check the integrity of the files would ... > be broken for the initial package. ... > In the case of a patch RPM like you mention, ...
    (Fedora)