RPM Community Forums

Mailing List Message of <rpm-users>

Re: Force removing rpmlib(PartialHardlinkSets) from an RPM

From: Marc MERLIN <marc_rpm@merlins.org>
Date: Thu 29 Oct 2009 - 16:11:18 CET
Message-ID: <20091029151118.GC19009@merlins.org>
On Thu, Oct 29, 2009 at 08:35:18AM -0400, Jeff Johnson wrote:
> >Very long story short, I'm building rpms with 4.4.2.1 on ubuntu
> >and need to install on RH 7.1 with rpm 4.0.2.
> >
> >When you have stopped laughing, here's the problem :)
> >I need to tell rpm to never put a rpmlib(PartialHardlinkSets) in
> >the rpms it builds.
> >
> 
> No laughter. I've heard older and odder problems with RPM.

Ok :)

> >When I add a hardlink in the rpm, rpm 4.4.2.1 "helpfully" adds a
> >rpmlib(PartialHardlinkSets) that is not relevant to my case and prevents
> >installing the rpm on RH 7.1 when otherwise said rpm and hardlinks
> >therein, work just fine.
> 
> >Currently, the only way I found to fix this is:
> >perl -pi -e 's|rpmlib\(PartialHardlinkSets\)|rpmlib 
> >(CompressedFileNames)|' scripts-1.1.20091028-0.i386.rpm
> >perl -pi -e 's|8846d64e6f6f85e7d6613958acc0a9a1464ad2ef| 
> >93d6f9fdaea5908b6693fb3235320c43d70cc15d|'  
> >scripts-1.1.20091028-0.i386.rpm
> >
> >command #1: replace property with another one of the same string  length
> >command #2: hand fix the SHA1 signature
> 
> Now I'm laughing ;-)
 
You do what you gotta do :)
 
> The issue is a bit deeper than just changing configuration since
> there's a whole installer behavior of RPM itself that is being tracked.
> 
> The reliable fix is to to just add a patch to rpm-4.4.2.1 to not
> add the tracking dependency.
 
I was wondering if that was the case and thanks for clearing that up.
Patching is obviously an option, I was just very much trying to avoid that
because I don't want a local fork of rpm and have to maintain that locally
forever :)
 
> You can try (its very much not the right thing to do, but you are
> already pretty desperate for a fix if patching digests) adding
> 	Provides: rpmlib(PartialHardlinkSets)
> in the same package to stub-out the Requires:. I won't bore you
> with the details of why its not the right thing to do. But if
> you can mask the Requires: by adding a Provides: you will
> likely be able to install.

Haha, good idea. First I had looked at find-requires until I realized that
the require came from the rpm logic itself, but didn't think that doing
Provides within the package would actually work.
(we thought about making a 3rd party rpm that only provided
rpmlib(PartialHardlinkSets),  la equivs packages on debian, but I didn't
think that would work.

> Another approach to masking the Requires: would be to patch
> the Provides: into rpm-4.0.2.

Indeed. In our case that might be easier if the other trick doesn't work.

> But if you can't rebuild either version of RPM, well, its rather
> hard to retrofit forward compatibility without changing code.

Understood. Just giving us our options definitely helps and saves us some
time trying each one out.

Thanks much,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  
Received on Thu Oct 29 16:11:36 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.