macrofied kernel.spec

Jarod Wilson jwilson at redhat.com
Thu Aug 2 20:34:43 UTC 2007


Roland McGrath wrote:
>> I've been intending to do the same. Definitely nice to nuke a bunch of
>> the duplication, but at least in patch form, its not the easiest thing
>> to read and fully comprehend.
> 
> Yes, don't try to read the patch.  (It also gratuitously reorders a couple
> things, because that makes the final kernel.spec easier to read.)

Just realized it looks like you also snuck in a kernel-PAE-debug build
variant... ;) Damn, it'd be nice if koji could spread kernel variant
builds of the same arch across multiple builders...

>> Okay, spent a while looking at a patched spec file. I think I mostly
>> grok everything, though some of the magic I'm not sure I've ever seen
>> before. I might even feel comfortable trying to fix things iff Roland
>> does leave the country or have an accident... ;)
> 
> If there is anything that you think should have more comments, let me know.
> I didn't bother with any comments explaining the % syntax being used.
> But probably there should be some.

I've read through everything a few more times, and I'm even more sure I
get everything now. The main hang-up was the flag passing. Similar, I've
not seen %1 and %2 used a whole lot, so I think that could be confusing
to some people. They all make sense to me, but I've not really seen
their use documented anywhere. But I'm not sure the kernel spec is the
place to document them...

Some of the documentation about what the -s and -r flags represent in
the %kernel_variant_post would probably be worth adding though (just
says [-s <s> -r <r>] right now in the comment header, and my best guess
is s=string, r=replacement).

Maybe also some clarification that %kernel_devel_package and
%kernel_debuginfo_package are used for both kernel-<subpackage> and
kernel -- the comments make it appear they're for kernel-<subpackage>
only. Though "This macro creates a kernel[-<subpackage>]-devel package"
is a wee bit confusing too... Maybe I'm just being nit-picky there,
those parts are probably fine, since for the most part, people really
shouldn't ever have to touch these macro defs anyhow.

Only other thing I'm seeing right now, though its probably been this way
forever, is that we're a bit inconsistent about whether we use %{name}
or just 'kernel' in %package and %description.

> Like most things in rpm, 80% of the
> relevant details are not documented anywhere.

Yeah, no kidding...

-- 
Jarod Wilson
jwilson at redhat.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.fedoraproject.org/pipermail/kernel/attachments/20070802/93d7445b/attachment.bin 


More information about the kernel mailing list