-----BEGIN PGP SIGNED MESSAGE-----


Just my personal 2 bits on the issues:

/usr/include/{linux|asm|net|<etc>}:
Normal directories containing the kernel headers the SYSTEM LIBRARIES were
compiled with.
Kernel sources should go in /usr/src/linux-<kernel version>
(Or /usr/src/kernel-source-<kernel version>. I personally use
'linux-<kernel version>' but I don't think it would really matter as long
as it's either one way or the other. OTOH, if you're compiling kernel on
another machine and actually NEED the kernel headers for your running
kernel(s) on the machine, those headers could go into
/usr/src/kernel-headers-<kernel version>, and using 
'kernel-source-<kernel version>' would make a little more sense.

If /usr/src/linux exists it should be a SYMLINK to the currently-running
kernel, and should be updated by a startup script.
However, this link should be completely OPTIONAL (read: historical) and
anything that uses /usr/src/linux should be prepared to deal gracefully if
it doesn't exist.

A very basic script to check this link would be:
(Copied from Tom's script and fixed up a little)
     if [ -L /usr/src/linux ]
     then
        rm -f /usr/src/linux
        if [ -d /usr/src/linux-`uname -r | sed -e "s/\-.*//"` ]
        then
          ln -s /usr/src/linux-`uname -r | sed -e "s/\-.*//"` \
            /usr/src/linux
        fi
     fi

This could be cleaned up and made robust, but at the moment it's just an
example. I did something quite similar to the vmware Makefiles to get that
to work for me.
However, I like the kernel-package idea of placing all non-kernel-tree
modules in /usr/src/modules/<package name> and building them to the kernel
currently being built, though I've never actually DONE it yet. Hmmmmm..
Maybe I'll go do that for vmware. ;>
Come to think of it.. any newly-installed package that needs modules built
for the current kernel SHOULD stick the sources in
/usr/src/modules<package name>, then should ASK the administrator to
auto-compile and install just the PACKAGE's modules for the running
kernel, and inform the administrator that kernel modules will need to be
re-built for any other used kernels.

My personal opinion (seeing I'm not yet a package maintainer) is that it
would be a good idea to make something like this Debian policy, AND see
about having it put into the FHS.

Okay, so it's about my $2 now. :> I've done what I can as a user; I'm
handing over to anyone actually in policy to shape into something that
will work for us.

On Wed, 14 Jul 1999, Thomas Sippel - Dau wrote:
[snip]

> As for /usr/include/{linux,asm}, and in view of what Linus explained on sizes 
> of
> compiled structures, we should probably settle around:
> 
>      /usr/include/linux   (Linux-) kernel includes for the development 
> environment
> 
>      /usr/src/linux       (link to) sources for the current kernel
> 
> That means that there should be a part of a startup script that does 
> something like:
> 
>     if test -L /usr/src/linux
>        then
>        rm -f /usr/src/linux
>        ln -s linux-`uname -r` /usr/src/linux
>        fi
> 
>     if test -L /lib/modules/kotd
>        then
>        rm -f /lib/modules/kotd
>        ln -s `uname -r` /lib/modules/kotd
>        fi
> 
> It is clear that that is only possible where /usr/src is a link back to the 
> machine
> if /usr/src is mounted read-only.
> 
> Projects which use those include files should probably have a sanity check in 
> the
> makefile, to see if /usr/include/linux and /usr/src/linux/include are the same
> directory (probably comparing the output of cd $i; /bin/pwd) and giving a 
> warning
> message in case they they don't like what they see.
> 
> N.B., should there be an alias for linux, in case people want to use kernel 
> include
> files without caring too much which kernel they are building with and for, or 
> is
> that just a stupid question - it probably would be better to migrate the 
> include
> file out of the kernel specific part in that case ...
> 

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQEVAwUBN40oQ9Zwc6w4vgodAQGFUwf+I9Yq9UiDhyiARndYR0Q6sGnkAptFTGLS
1Mr9sAWEIGTQYMfxZobEkggUdRKWVeJVKkyv2yttxkl0/lHuGsndFAkT9G7MppP4
JxYS1rI/SWT4gnmALLMYwiSpUrSOQzn+XK/Uey90b0Mm8EuEo0BovPq8K7KMlvzT
R1iKE0JSu24A3Kg9RNY7NA6UVmlZqb1/5D+UzqTVEU05TLxY3+fO9woKzp2fpYl8
DpuReb5flYCQNSspaKltEYOLyZfh/XE0lGmOp99jZE2/WO6x88rZ+ovAt7SciTHE
FjZq0Uz8TRAj22rF5l8Icg+pr28bt902TSIbSlye8UKfNE36DSu1lA==
=JTdl
-----END PGP SIGNATURE-----

Reply via email to