RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/rpmio/ digest.c

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 14 Oct 2008 - 19:10:44 CEST
Message-id: <15F82D3F-D38D-4FA9-8864-01B48E7D78C8@mac.com>

On Oct 14, 2008, at 12:58 PM, Ralf S. Engelschall wrote:

> On Tue, Oct 14, 2008, Anders F. Björklund wrote:
>
>>     unbreak build when using older zlib (without combine)
>
>>   +#if !defined(WITH_ZLIB) || defined(HAVE_ZLIB_CRC32_COMBINE)
>>    	    mp->combine = (rpmuint32_t (*)(rpmuint32_t, rpmuint32_t,  
>> size_t)) crc32_combine;
>>   +#endif
>
> I do not understand the "!defined(WITH_ZLIB)" part here.
> If would have expected either...
>
> #if defined(HAVE_ZLIB_CRC32_COMBINE)
>
> ...or..
>
> #if defined(WITH_ZLIB) && defined(HAVE_ZLIB_CRC32_COMBINE)
>
> ...but not the above variant.
> Can you shed some light onto this, please. Thanks.
>

rpm used certain symbols from zlib while zlib was internal to
avoid bloat.

now that zlib is external (and possibly ancient, missing the symbols)
there's a rpm build failure mode.

the best fix (imho) for adler32* and crc32* is to internalize. the  
routines
are not big or complicated, but they are wired into
rpmdigest options and package digest macro configuration chocies.

so to guarantee that the functionality is always available in rpm,
independent of how rpm was built, or which zlib was used,
i'm gonna push the changes from HEAD back to rpm-5.1.x.

73 de Jeff
Received on Tue Oct 14 19:11:25 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.