RPM Community Forums

Mailing List Message of <rpm-users>

Re: Glibc %post

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 10 May 2010 - 16:05:19 CEST
Message-id: <7F39A9B1-B356-46F2-B385-A29C007FE5E0@mac.com>

On May 10, 2010, at 9:50 AM, Eric MSP Veith wrote:

> Hash: SHA1
> On Monday 10 May 2010, Jeff Johnson <n3npq@mac.com> wrote:
>> If you want *RE's you might try embedded perl instead of lua.
> I missed something, please enlighten me: %post -p <perl> does not work here 
> with rpm 5.1.9? If embedding Perl is as easy as embedding lua, I'll use 
> perl, since what I want to archive already has some working Perl code. I 
> mean, using %{perl: ...} will *expand* whatever I produce and put it into 
> the spec file, I don't want this. I merely want to run some Perl/Lua code 
> from the spec file and have access to the specs %defines.

Yup, no embeddings in 5.1.9. The mebeddings were added in rpm-5.2.0 which
was supposed to be released 2 weeks after rpm-5.1.9 was.

But the upgrade to rpm-5.2.1 released today should have all the embeddings,
and should be quite straight forward.

The other approach would be back porting, its quite easy to drop-in
rpmio/rpmperl.[ch] and patch the 4-5 needed places for embedding in RPM.

What is _MUCH_ harder is to get the infrastructure in place to build
with an embedded language. Embedding API's are usually buried deeply
in per-language trees with obscure and frustrating compilation issues.

But I've managed to sort most of the details without too much pain. But
it usually takes me quite a bit longer to figger the linkage than it does
to implement Yet Another Embedding in RPM, the implementation is mostly
"cookie cutter" cut-n-paste.

>> OTOH, if you need "legacy portable" RPM embedding, there's only lua,
>> but you will likely find that "legacy" applied to the "embedding" is
>> not as important as looking carefully at what Lua extensions are
>> implemented.
> I'm not into legacy, not with this distro of my own creation. ;-)

Well, there's another for of legacy called "future proofing". One
of these days I'm gonna have to rework how lua is embedded, what's
implemented currently doesn't have strong enough conventions
for loading from sysem -> vendor -> application -> ... paths,
and could/should be simplified to use an "rpmiob" rather than a "rpmluab"

(An rpmiob is juts a container for octets, related to the macro expansion
limit you asked about).

rpmiob == I/O Buffer is the acronym.

73 de Jeff
Received on Mon May 10 16:05:40 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.