Important information regarding latest Xorg update packages

Gene Heskett gene.heskett at verizon.net
Fri Sep 23 14:30:48 UTC 2005


On Thursday 22 September 2005 23:16, Chris Adams wrote:
>Once upon a time, Gene Heskett <gene.heskett at verizon.net> said:
>> On Thursday 22 September 2005 22:30, Chris Adams wrote:
>> >You say "rpm sucks"; I'd say it is the fault of the spec file author
>> > not fully understanding the spec file syntax.  "#" is not a comment
>> > in a spec file.
>>
>> Since when?  I have several spec files leftover from building things,
>> and it appears that the # is liberally used in about 1/3rd of them.
>> The revelant manpage would be nice.
>
>"#" seems to work as a comment because many of the sections of spec
>files are run through a shell or other scripting language that
>recognizes "#" as a comment; rpm passes the lines through untouched.
>If you have a line like:
>
># %define xyzzy 123
>
>then the define takes place; rpm doesn't see "#" as a comment.
>
>The problem lines from the spec file in question:
>
>************************************************************************
>%postun Mesa-libGLU     -p /sbin/ldconfig
>
>##### xfs scripts ####################################################
># Work around a bug in the XFree86-xfs postun script, which results in
> the # special xfs user account being inadvertently removed, causing xfs
> to run as # the root user, and also resulting in xfs not being
> activated by chkconfig, # This trigger executes right after the
> XFree86-xfs postun script, and ensures # that the xfs user exists, and
> that the xfs initscript is properly chkconfig # activated
> (#118145,118818)
>%triggerpostun xfs -- XFree86-xfs
>************************************************************************
>
>The spec file syntax says that the "-p <program>" arg to %postun means
>to run the script with <program> instead of /bin/sh.  If you don't
>provide a script, the program is run with no input.  This is great for
>something like (obviously useless example, but you get the idea):
>
>************************************************************************
>%postun -p /usr/bin/perl
>$x = 1;
>print $x + 1, "\n";
>************************************************************************
>
>However, what happens in the xorg problem spec file above is that rpm
>takes everything up to the next spec file directive as the script (only
>if the following lines are empty does rpm treat it as "no script").
>Since "#" is not a spec file comment, that means rpm thinks that the
>"##### xfs scripts" lines before the %triggerpostun is actually the
>%postun script for xorg-x11-Mesa-libGLU, and that it should be run
>through /sbin/ldconfig.  Of course, ldconfig doesn't know what to do
>with it; that's where we get the error.

Oh cute...

Where is there a bible for writing spec files?  Or, better yet, why
isn't rpm re-written so a # in char position 1 is always a comment
line?  That seems like the sensible thing to do, but I'm but the
expert...

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.35% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.




More information about the fedora-list mailing list