RPM Community Forums

Mailing List Message of <rpm-devel>

Re: Arbitrary section/script questions

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Sat 15 Dec 2007 - 16:31:41 CET
Message-ID: <20071215153141.GB98647@engelschall.com>
On Sat, Dec 15, 2007, Jeff Johnson wrote:

> On Dec 15, 2007, at 6:04 AM, Ralf S. Engelschall wrote:
>> On Sat, Dec 15, 2007, Ralf S. Engelschall wrote:
>>
>>> I've two questions related to arbitrary sections/scripts which I was not
>>> able to answer myself:
>>>
>>> 1. When I use...
>>>
>>>    | %foo
>>>    |     foo
>>>
>>>    ...RPM does not complain about the section "%foo" not known. Why
>>>    isn't there also an %{_arbitrary_script} macro similar to what
>>>    %{_arbitrary_tags} does to restrict the allowed non-standard script
>>>    sections?
>>>
>>> 2. How can I query the "%foo" from (a) the *.spec, from (b) the .src.rpm
>>>    and from (c) a binary RPM? Because only if I later can query the
>>>    stuff placed into such a section it is useful, of course.
>>
>> Oh, sorry, I forgot to mention: the reason why I'm now also evaluating
>> the possibility to use arbitrary script sections is because I cannot
>> easily place arbitrary text (which even includes newlines) into an
>> arbitrary tag. So I thought: "well, then stuff the text into a script
>> section, there doesn't seem to be those constaints..."
>>
>
> RPM does not complain because of a lack of grammar. Known "%foo"
> items are detected by the parse; otherwise the "%foo" section is just
> appended
> to previous section.

Ah, I see. It was just appended to the "%description" in my test, I guess.
Good point. Thanks for clarification, Jeff.

> [...]
> A proof-of-concept "%foo" implementation is likely no more than a
> couple of hours if you need however.
> [...]

Well, I'm not sure whether I really need it at the end. I'm currently
trying out RPM 5 in a real packaging environment for testing purposes
and there also try to resolve some of the pending OpenPKG-specific
issues. So, we don't have to implement it if you can help me with this
pending question: What would be the solution to put text into a *TAG*
when the text contains *newlines*? Do I really have to replace them
with something different?

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Sat Dec 15 16:32:20 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.