RPM Community Forums

Mailing List Message of <rpm-users>

Re: Glibc %post

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 10 May 2010 - 16:22:06 CEST
Message-id: <FEC1706C-50A6-46BF-B073-EC1C35B60C43@mac.com>

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

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Monday 10 May 2010, Jeff Johnson <n3npq@mac.com> wrote:
>>> 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.
> 
> Ah, ok. push(&todo, "rpm-5.2.1").
> 
> Btw, silly me: RPM's spec files are basdically a template language, so 
> there's obviously no way to "run" something without expanding. %{perl:...} 
> or %{lua:...} is the only way, AFAIK. So wipe that fast-written lines from 
> your memory, please. Unless I got something wrong, of course. ;-)
> 

Well *.spec files started as RFC 822
	Foo: bar
constructs with
	%bing
	bang
	boom
multiline sections for scriptlets grafted in.

The "templating" comes from macros, not from spec files per-se,
kinda like what is typically called a "closure" in Scheme (and other languages).

>> Well, there's another for of legacy called "future proofing".
> 
> Well, uh, constant revising of spec files has to be done anyways, hasn't it?
> 

The hard issue is preserving the ability to build existing packages from
*.spec recipes with the least amount of change.

"constant revising" is in noone's interest. However, it takes a great
deal of discipline and methodology to "future proof" build recipes.

And if you lack build process prescience, well you're doomed like Sisyphus to
"constantly revising" spec files.

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