Re: patch to include some kernel info in banner

2003-08-25 Thread Mike A. Harris
On Tue, 12 Aug 2003, Daniel Stone wrote:

   This patch puts the kernel version in the banner, on Linux, and also whether
   or not it's tainted (providing it's a sufficiently recent kernel). Thanks
   to Mike Harris for this patch (slightly altered to remove RH_CUSTOM, etc).
 
  Please do not accept this Linux-specific hack of a patch; I merged it to Debian,
  and Mike asked me not to send it upstream.
 
 Granted, as the patch stands.  However, I don't mind doing the minimal
 fixing up for inclusion, as this information would be extremely useful in
 some logs.

Feel free to make it more generic and include it - that would definitely be cool.

 Why the extra symbol, if I may ask, instead merely using defined(linux)?

I don't know, I just grabbed it off Mike and did
s/RH_CUSTOM/KERNEL_VERSION_IN_BANNER/; I think RH_CUSTOM is a catch-all for Red
Hat's whacky stuff.

Yes, I wrote the patch to more or less do what I wanted it to do, 
but in as little time as possible.  It works, however it is far 
from clean code.  Just a very very ugly quick hack, not suitable 
for inclusion.  I used RH_CUSTOM to indicate that it is just an 
ugly custom hack, as I know nobody would include code upstream 
with such slop in it.  My intention, was to some time down the 
road, rewrite it in an OS and distribution neutral manner, and 
clean up the ugliness, then offer it for potential inclusion.  I 
figured I'd finish off a number of other hacks first and include 
them in one fell swoop, once they were in clean enough shape to 
send upstream.

In general, if you see me use RH_CUSTOM, or something else that 
is obvious wouldn't get accepted upstream, I've done it to 
indicate that the patch is just a temporary kludge/fix/hack or 
similar depending on what it's doing.  It's intended to be an 
indicator to others to feel free to use/modify the bits if they 
like, but to not submit it upstream as-is.

The novelty of the quick hack was too great to leave it out until 
I had time for a proper generic solution.  Seeing that 
information in bug reports has been a tremendous God send, in 
particular the kernel version running, buildhost, and tainting 
flags.

Of course you're free to tidy it up as you have, and use it as 
well.  I see something has been commited to CVS based on my 
original, so I'm glad to see someone liked the idea enough to do 
the dirty work I never got around to doing quite yet.

I've got some other patches in current rpms which change the 
server error messages to be more modern and contain more info.  
The messages are currently Red Hat centric though - again, to get 
what I needed done ASAP, with intention to genericize and submit 
upstream.  Basically I've changed the messages to point to 
bugzilla to report bugs, and a few other similar things.

ftp://people.redhat.com/mharris/testing/unstable/XFree86/4.3.0-22/sources/XFree86-4.3.0-redhat-bug-report-address-update.patch

That patch in our current rpms, is distro specific, but what I'd
like to do before submitting it upstream, is modify it so that
the X server default build, has an XFree86 specific message for
the project itself, but permits distribution specific overrides
to allow various OS distros to override the bug report address
and mechanism to find updates.  For example, a Red Hat user would
want to know both how to report a bug to Red Hat via bugzilla,
and to XFree86.org via bugzilla, and they'd want to get updates
via our up2date tool if possible, or via ftp from our ftpsite, or 
alternatively from XFree86.org site's binaries or source 
tarballs.

Assuming the idea is considered sane and acceptable, the exact
text of the XFree86.org generic strings I can write up something
I think might work best for the project itself, and then submit 
the patch which allows distro overrides to that text to 
bugzilla, and David or someone can review and modify to taste and 
commit it if they deem it a sensible addition.

It's a trivial amount of work to do, so I can probably whip out 
something in short order if deemed to be something useful 
generically in XFree86.  Any feedback appreciated.


-- 
Mike A. Harris

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: patch to include some kernel info in banner

2003-08-25 Thread Mike A. Harris
On Sun, 24 Aug 2003, Marc Aurele La France wrote:

This patch puts the kernel version in the banner, on Linux, and also whether
or not it's tainted (providing it's a sufficiently recent kernel). Thanks
to Mike Harris for this patch (slightly altered to remove RH_CUSTOM, etc).

   Please do not accept this Linux-specific hack of a patch; I merged it to Debian,
   and Mike asked me not to send it upstream.

  Granted, as the patch stands.  However, I don't mind doing the minimal
  fixing up for inclusion, as this information would be extremely useful in
  some logs.

 Feel free to make it more generic and include it - that would definitely be cool.

Done.  I opted to use uname(2) instead.  This doesn't say anything about
Linux's tainted thingie, but Mike can send a patch to include it if he,
or anyone else, feels that strongly about it.

Yeah, my original patch used uname(), but one of the critical
pieces of information I wanted in the output was the kernel
tainting flags, so I know if someone is running X under a tainted
kernel or not.  Also, uname output lacked some of the additional
useful things the /proc/version file contains which are helpful
in troubleshooting.  I switched from uname to /proc/version to
get the extra kernel build info and whatnot.  Both of these
things however are very non-generic and the code looks like 
crap... but it worked well.  ;o)

I wasn't sure what would be best to submit upstream other than 
using uname() as you've done, and possibly having conditionalized 
Linux specific code.  That's still a bit ugly though.

Once I update my rpms to the latest codebase, I'll see if I can 
brainstorm some way of getting the best of both worlds without it 
looking like a horrible mess.  If not, it's best keeping the 
horrible mess as a vendor addition.

Just as an additional note, I've tried to keep the convention of 
using Red Hat specific patches not intended to be submitted 
upstream in the form XFree86-a.b.c-redhat-foo.patch   I made 
comments in our spec file to explain this, so people are clearer 
that these patches are not intended for upstream, but they're of 
course useable/modifyable/etc. to anyone who thinks they're 
useful, including the XFree86 project.  Just trying to keep the 
ugly stuff buried.  ;o)

Thanks Marc.

-- 
Mike A. Harris

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: patch to include some kernel info in banner

2003-08-24 Thread Marc Aurele La France
On Tue, 12 Aug 2003, Daniel Stone wrote:

This patch puts the kernel version in the banner, on Linux, and also whether
or not it's tainted (providing it's a sufficiently recent kernel). Thanks
to Mike Harris for this patch (slightly altered to remove RH_CUSTOM, etc).

   Please do not accept this Linux-specific hack of a patch; I merged it to Debian,
   and Mike asked me not to send it upstream.

  Granted, as the patch stands.  However, I don't mind doing the minimal
  fixing up for inclusion, as this information would be extremely useful in
  some logs.

 Feel free to make it more generic and include it - that would definitely be cool.

Done.  I opted to use uname(2) instead.  This doesn't say anything about
Linux's tainted thingie, but Mike can send a patch to include it if he,
or anyone else, feels that strongly about it.

Marc.

+--+---+
|  Marc Aurele La France   |  work:   1-780-492-9310   |
|  Computing and Network Services  |  fax:1-780-492-1729   |
|  352 General Services Building   |  email:  [EMAIL PROTECTED]  |
|  University of Alberta   +---+
|  Edmonton, Alberta   |   |
|  T6G 2H1 | Standard disclaimers apply|
|  CANADA  |   |
+--+---+
XFree86 Core Team member.  ATI driver and X server internals.

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: patch to include some kernel info in banner

2003-08-11 Thread Daniel Stone
On Sun, Aug 10, 2003 at 09:04:42PM -0600, Marc Aurele La France wrote:
 On Mon, 11 Aug 2003, Daniel Stone wrote:
  On Sun, Aug 10, 2003 at 04:57:14PM -0500, Warren Turkal wrote:
   This patch puts the kernel version in the banner, on Linux, and also whether
   or not it's tainted (providing it's a sufficiently recent kernel). Thanks
   to Mike Harris for this patch (slightly altered to remove RH_CUSTOM, etc).
 
  Please do not accept this Linux-specific hack of a patch; I merged it to Debian,
  and Mike asked me not to send it upstream.
 
 Granted, as the patch stands.  However, I don't mind doing the minimal
 fixing up for inclusion, as this information would be extremely useful in
 some logs.

Feel free to make it more generic and include it - that would definitely be cool.

 Why the extra symbol, if I may ask, instead merely using defined(linux)?

I don't know, I just grabbed it off Mike and did
s/RH_CUSTOM/KERNEL_VERSION_IN_BANNER/; I think RH_CUSTOM is a catch-all for Red
Hat's whacky stuff.

-- 
Daniel Stone  [EMAIL PROTECTED]
http://www.debian.org - http://www.kde.org - http://www.freedesktop.org
Configurability is always the best choice when it's pretty simple to implement
  -- Havoc Pennington, gnome-list


pgp0.pgp
Description: PGP signature


Re: patch to include some kernel info in banner

2003-08-10 Thread Daniel Stone
On Sun, Aug 10, 2003 at 04:57:14PM -0500, Warren Turkal wrote:
 This patch puts the kernel version in the banner, on Linux, and also whether
 or not it's tainted (providing it's a sufficiently recent kernel). Thanks
 to Mike Harris for this patch (slightly altered to remove RH_CUSTOM, etc).

Please do not accept this Linux-specific hack of a patch; I merged it to Debian,
and Mike asked me not to send it upstream.

-- 
Daniel Stone  [EMAIL PROTECTED]
http://www.debian.org - http://www.kde.org - http://www.xwin.org
Jeff doesn't use pants often. -- Pia Smith


pgp0.pgp
Description: PGP signature