[lkml]   [2002]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: ver_linux script updates
> Not in sh, you need an ugly 'awk|sed' call to do the printf with 
> formatstrings. And for the declare, you just drop it. Anyway, it is
> incomplete. Or you can decide to do it in bash, and leave the nice
> printf functionality and other gadgets.

declare removed, printf can be a sh-util file as well as a bash built in
so I'm not concerned with that.

> Well it does, but since this stupid loadkeys writes everything to
> stderr you need to parse the output again as follows (on my machine):
> loadkeys --junkoption 2>&1 | head -2 | tail -1

What is the full output of your loadkeys program with --junkoption? I
avoided using combinations of programs and chose to concentrate on
implementing a one program only solution which was common through the

loadkeys is part of the kbd/console-tools mess. It can report a
version, not report a version, use --version or -V depending on what
package or date in history your package comes from.

> This is so gross you could as well do a strings on all those broken
> binaries and maintain a table of offsets where to find the version
> string.

Unfortunately this would evolve into a big pile of versions and offsets
that nobody would want to touch with a 10' pole.

> Well, I could help you (not a bash guru either) but the more I think
> about this the more I think it's like the attempt of ESR to make an
> autoconfigurator. Let's see if I get this correctly:
> o I read ../Documentation/Changes and read that
> "This document is designed to provide a list of the minimum levels of
> software necessary to run the 2.4 kernels, ..."
> Why the hell do I need pppd to get a running 2.4.x kernel? I also do
> not need reiserfs tools because I decided to run ext3. Well and on my
> firewall I definitely don't need any pcmcia-cs package which isn't
> even completely merged into the main kernel.

One doesn't, it's a generic list that makes some assumptions. To this
end, I've decided to add some /proc checking before searching for
certain tool versions.

> o I ask myself: What exactly does this file want to tell people. I
> might be dumb but to run a kernel you need to be able to compile it,
> link it an install it (noone asks for lilo).
> o OTOH, the original author mentions that this software list should be
> checked before one even considers a bug to be a real bug an not just
> some incompatibility with a wrong user space tool.

One of the most visible points in history is pppd, for a long while it
seemed like the most frequently recurring bug post was why pppd didn't
work. The version the bug reporter had was less than required.

> o I ask myself: How define the set of tools then? Shouldn't we for
> example include LVM or raid tools (as actually mentioned further
> down in the same file)?

I've just added checking to a few of the version searches that takes
note from /proc files as to whether or not said support is loaded and
running. In other words it doesn't make to much sense to check for pppd
if the user doesn't use pppd. Note that this can certainly be
misconstrued and I should put a --verbose, or perhaps trying to be smart
here will just make matters worse.

> o Why is this script still in the kernel tree? It is not mentioned
> anywhere and it doesn't work reliably.

It is mentioned in the top level REPORTING-BUGS file.

> The whole concept looks pretty broken to me, but then again I'm just a
> little fart that doesn't see the big picture.

It helps to clean up some ambiguities when a bug report comes in.

>> Because it doesn't work as well as I want it to. The previous
>> writers of this script wrote it based on their choice of distribution
>> and installed packages. There has always been one or more strange
>> outputs or breakage when I run it . All of my software is compiled
>> from original tarballs or cvs from the original author. That means
>> if the
> I have such a distro too, I might run your version of the script on it
> as soon as I got some sleep.

I've updated it a few times since you've last retrieved it.

> What if it hangs like in my example? I suggest you switch over to perl
> or if you want I can give you my bash-exec-alarm-signal handler I once
> wrote. But it's an extreme overkill to have such a thing built-in in
> your script.

Personally I dislike perl ['s bubblegum fixes everything approach], I
don't think it's worth it to make such a heavy requirement of a user.
The hang has been removed by adding the --junkoption, and as far as I
know none of the given version checks should hang now.

> Good luck. I agree that certain information is important to have, such
> as:
> o Gnu C 2.95.3 # gcc --version
> o Gnu make 3.77 # make --version
> o binutils # ld -v
> o util-linux 2.10o # fdformat --version
> o modutils 2.4.2 # insmod -V

Actually, on four of my seven systems I don't have 'fdformat' so
'util-linux' would have failed, but I -do- have 'mount' which is part of
the same package.

> I fail to see why I need more information from that script. But don't
> let yourself stop by my comments.

Agreed, some people use less, some people more.

> I don't know how many tools I've already patched exactly because of
> this bloody annoyance. If one wants to build a stable, reliable,
> reproducable and secure box, where information can be get with simple
> scripts without thousands of lines of code for every little funny
> thing a programmer out there thought might be better than all other
> existing tools.

The only problem with patching tools like this, is that it often doesn't
get back to the author or doesn't get implemented by the author, much
less it doesn't fix earlier versions of the same software.

>> In a side note, if anybody has a reliable way of getting pppd to
>> -always- report the version number, please tell me. To get it to
>> fail, put some junk in /etc/ppp/options, i.e. a not currently
>> existing modem device such as /dev/usb/acm/0.
> Couldn't resist:
> laphish:~ # pppd
> (null): This system lacks kernel support for PPP. This could be because
> the PPP kernel module could not be loaded, or because PPP was not
> included in the kernel configuration. If PPP was included as a
> module, try `/sbin/modprobe -v ppp'. If that fails, check t
> laphish:~ #
> Excellent output, isn't it?

Ugg, don't get me started. "pppd --version" means I want the version.
I don't give a flying fsck whether the kernel supports it or not, and I
don't give a flying fsck if I have a messed up options file. I want the
version, nothing more, nothing less. What's worse, there isn't a textual
string for the version in the binary that I can grab.


[unhandled content-type:application/x-pkcs7-signature]
 \ /
  Last update: 2005-03-22 13:24    [W:0.085 / U:0.632 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site