APT-RPM in MacPorts

Panu Matilainen pmatilai at laiskiainen.org
Wed Jul 11 00:36:19 PDT 2007


On Tue, 10 Jul 2007, Anders F Björklund wrote:

> Panu Matilainen wrote:
>
>> Ok, the ok parts are now applied, thanks for the patches. What I didn't
>> apply and why:
>>
>> patch-rpminclude.diff:
>> - $includedir is where the include files are supposed to be
>> *installed*,
>>    not the place to look for system includes. Normally they're the
>> same,
>>    but this breaks "make distcheck"
>
> Will try the "make distcheck" then, but I do want both RPM and APT-RPM
> under the ${prefix} which is normally /opt/local in regular MacPorts.

Yeah, I understand what you want to do there but $includedir isn't the 
right thing.

One thing you can of course do is just set 
CXXFLAGS=-I/opt/local/include/rpm (or whatever the includepath there is) 
when calling configure, that should work without patching configure.ac at 
all.

Another alternative would be adding some configure flag like 
--with-rpm-includes=<path> to configure.

>> patch-genbasedir.diff:
>> - needs to be done in a more general way, md5 executable doesn't exist
>> on
>>    typical linux system
>
> Right, then again "md5sum" doesn't exist on a typical BSD
> (FreeBSD/Darwin)
> system. Maybe try both of them, and fall back on "openssl md5" perhaps
> :-)
>
> Naturally, they each just have to make their output a little different:
> 6e0e2247598f223a36328d245470cfe3  test
> MD5 (test) = 6e0e2247598f223a36328d245470cfe3
> MD5(test)= 6e0e2247598f223a36328d245470cfe3

Argh :) The simplest thing to do is probably just turn md5sum into a shell 
function that uses whatever program it finds and does fixup for the output 
so the rest of the genbasedir doesn't have to care.

>> patch-rpmsense.diff:
>> - these kind of hacks with _RPM*_INTERNAL get apt to build with later
>>    rpm5.org releases, but I don't believe for half a second it'll
>> actually
>>    fully work with eg rpm-4.4.9 without a major rework of how apt
>> interacts
>>    with rpmlib
>
> Indeed it needs a rework, just wanted to get it limping along and
> compiling...
>
> Think patch originally was made under the assumption that the code using 
> the internal values would #define something like _RPMEVR_INTERNAL to use 
> them ?

For some things just #define _RPM<stuff>_INTERNAL might be sufficient even 
if not really the right thing to do, but I think for rpm-4.5 it's not, as 
the version comparison code etc has changed dramatically.

Just FWIW, the major rework of how apt deals with rpm and it's different 
versions is something I've had in mind for a long time, it's a mess 
currently. Apt "knows" way way too much about rpm internal assumptions and 
such, and the version compatibility ifdef's are getting reeeally ugly. 
Getting apt to work with 4.5 and beyond is something I want to do if at 
all sanely possible, since there obviously are people who want to use it 
with it.

 	- Panu -



More information about the Apt-Rpm mailing list