[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Important information regarding latest Xorg update packages



Once upon a time, Gene Heskett <gene heskett 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.

-- 
Chris Adams <cmadams hiwaay net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]