deltarpm with old RPM packages

Paul B Schroeder paulbsch at vbridges.com
Mon Jan 31 23:32:41 UTC 2011



On 01/31/2011 12:44 PM, Jonathan Dieter wrote:
> On Mon, 2011-01-31 at 11:04 -0600, Paul B Schroeder wrote:
>>
>> On 01/30/2011 02:35 PM, Jonathan Dieter wrote:
>>> On Sun, 2011-01-30 at 12:21 -0600, Paul B Schroeder wrote:
>>>> Hello all..
>>>>
>>>> We have some RPM packages which have been built on a system with RPM
>>>> version 4.4.2.3 and are being installed on F14 based systems with
>>>> 4.8.1..  We are creating the delta RPM packages on the F14 system with
>>>> makedeltarpm 3.6.
>>>>
>>>> So package foo version 1 installs on the F14 systems just fine.  But
>>>> when running applydeltarpm with the drpm created against foo version 2,
>>>> we get "md5 mismatch of result" errors.
>>>>
>>>> I'm guessing this is an issue with the fact that the RPM packages are
>>>> being built with an older version of RPM?  If that's the case, is there
>>>> any way around this problem?
>>>
>>> Can you please provide a sample drpm, original rpm and target rpm
>> Sure can..  Here they are: http://www.haywired.net/vbridges/
>>
>>> (please put them on the web somewhere and provide links)?  What OS is
>>> the system that you're using to build the RPMS?
>> They are being built on Ubuntu 9.04..
>>
>> Thanks for taking a look..Paul...
>
> Ok, Just to explain what happens here.
>
> User has foo-1.0.rpm
> User downloads foo-1.0-1.1.drpm
> When the user applies foo-1.0-1.1.drpm to foo-1.0.rpm, applydeltrpm
> uncompressed foo-1.0, applies the deltarpm, and then recompresses the
> new payload into a byte-for-byte copy of the original foo-1.1.rpm.
>
> The problem you're running into is that the recompressed rpm doesn't
> match original rpm because whatever compression format you're using has
> changed slightly between Ubuntu 9.04 and Fedora 14.  We ran into the
> same problem when we changed some of the xz settings when Fedora 13 was
> in development, which meant we had to throw away all of our old
> deltarpms.
>
> In your case, deltarpms will only work as long as the original rpms are
> generated on a similar enough system to the target to guarantee that the
> compression format (xz, gzip, bzip2) hasn't changed.
Ah..  Okay..  That's the clue I needed.  I see what's going on now.  By 
default they were being built with gzip compression.  On the Ubuntu 
system, it has gzip 1.3.12.  On the target F14 systems, we have gzip 1.4.

So I looked further and saw that rpmlib on the Ubuntu system is built 
with bzip2 support and it has bzip2 1.0.5 installed.  The target F14 
systems have 1.0.6.  No problem there...  Awesome!

So I simply changed the compression format to bzip2 by adding '--define 
"_binary_payload w9.bzdio"' to the rpmbuild command line.  And..  Wahla! 
  Works like a charm now!

>
> For Fedora, we are currently using RHEL 5.5 builders with an updated
> version of rpm and xz-libs to make sure this stays true.
>
> I don't blame you for wanting to stick with deltarpms, though.  A 40kb
> deltarpm is quite impressive when compared with a 15mb download. :)
Yes..  This makes a big difference.  Thanks again for the info!

Cheers...Paul..


-- 
---
Paul B Schroeder
<paulbsch "at" vbridges "dot" com>


More information about the users mailing list