Clarify '/usr/src subdirectory'

Erika Pacholleck pchllck at nexgo.de
Wed Mar 6 02:57:23 PST 2002


[05.03.02 21:18 -0800] David McCabe <-- :
> I am installing LFS 3.2rc2. In the section 'Creating Directories', in 
> chapter 5, I'm told to copy the tarballs into "some subdirectory under 
> $LFS/usr/src (you will need to create the desired directory yourself)".
> 
> In an old 3.0 install (my first LFS), it was said that I could put my 
> sources under directories '/usr/src/{a-z}'. I did thusly. That install 
> was seriously crippled, and I've always half-blamed some of the problems 
> on the alphabetic source tree.
> 
> Therefore, I would like to clarify that I should *not* put my tarballs 
> and sources directly in /usr/src,  but in any given subdirectory 
> thereof. Is this correct?
 
You can keep the sources you downloaded wherever you want, the way of
making subdirectories to /usr/src/ from a to z is just one suggestion
how you might organize that, so if you later search a special source
package (for example binutils) you have a way of fast remembering where
to search (for example search in /usr/src/b/).
My personal organzation is totally different, all sources for lfs book
versions are in /mnt/dat/lfs/sources. So where you keep them is up to
you.

But for compiling a package, it is assumed (and best) that the package
you want to do is /usr/src/package_to_do-x.y.z and you can achive that
by doing the following:

# go into directory /usr/src:
cd /usr/src
# unpack the package to do into the /usr/src directory:
bzcat /path_to/your_sources/directory/package_to_do.tar.bz2 | tar xv
# check whether the package was unpacked in /usr/src:
ls -l

The last ls should show you a directory package_to_do-<version>.
So you see it does not matter at all where you keep your downloaded
sources, but it does matter where you unpack them.

-- 
Erika Pacholleck
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list