RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Size limit on tag values?

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Wed 26 Dec 2007 - 20:59:17 CET
Message-ID: <20071226195917.GA97772@engelschall.com>
On Thu, Dec 13, 2007, Jeff Johnson wrote:

> On Dec 13, 2007, at 2:34 PM, Ralf S. Engelschall wrote:
>
> [...]
>> BUT: one question remains which I was not easily able to figure out from
>> the sources: WHAT IS THE SIZE LIMIT OF TAGS IN RPM 5?
>
> Hard to say absolutely, but the previously imposed tag data store
> limit has been changed from 32Mb to 1Gb AFAIK. There are other limits
> that constrain the "WHAT IS THE SIZE LIMIT OF TAGS IN RPM 5?"
> such as the total size of the data store, which is (afaik) 2GB because
> of the necessity to keep the offset a int32_t, the sign change is used
> as a immutable region marker. The additional constraints prevent giving
> a precise answer.
> [...]

I finally poked around in the code a lot deeper and IMHO the precise
answer is: 10*BUFSIZE which on most platforms mean just 10KB, because
build/rpmspec.h shows a "char lbuf[10*BUFSIZ];" which internally is
used for the macro expansion on lines during the .spec file parsing. If
I'm not completely wrong here, this unfortuntely means we can entirely
forget putting rather large amounts of data into a tag via RPM Lua macro
expansions (or generation via Lua print())... :-(

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Wed Dec 26 21:00:05 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.