Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 09-18-2008, 06:09 AM   #31
Registered: Sep 2004
Distribution: Slackware-14.0
Posts: 452

Rep: Reputation: Disabled

If you put something in the core system and it doesn't function, then you are facing greater problems than if you had put it into /usr/local.

/usr/local, as a separate partition, can be simply dismounted.

As for compiling - well I have /usr/local prioritised both in my paths as well as in ld.conf.

Hence if you have the old standard program in the core sytem and the new program in /usr/local, when you run the program the newer version will run. Problems? Unmount /usr/local, try again and if it works, you know where the problem is - and, more importantly, you can carry on working.

The other aspect is creep - at what point do you have a slackware distribution and at what point do you have a system based in Slackware?

Ad absurdum - one would end up having an lfs system since you have given up the idea of keeping the core system strictly separate from any changes/additions you make.

If yours were a business - a bank say - an IT auditor would have grave considerations about tampering with the core system. S/he would want all changes/additions to be kept separately so that they could be given special consideration.

Surely the same would apply to us when debugging a problem? We could focus on where changes had been made much easier if they were kept separately.

Anyway that's my attitude.

If I were to continue putting changes/addtions into the core system, I would really consider moving onto LFS - after all, I would be be half way there.

Slackware would then be a useful source of packages for when I was to lazy to compile myself and a reference system.

I wouldn't have /usr/local because the whole system was "local".
Old 09-18-2008, 06:54 AM   #32
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,071

Rep: Reputation: 673Reputation: 673Reputation: 673Reputation: 673Reputation: 673Reputation: 673
And /opt directory has not been discussed yet
Old 09-18-2008, 07:40 AM   #33
Registered: Sep 2004
Distribution: Slackware-14.0
Posts: 452

Rep: Reputation: Disabled
/opt seems to be just for packages - as opposed to individual programs.

1.13. /opt

This directory is reserved for all the software and add-on packages that are not part of the default installation. For example, StarOffice, Kylix, Netscape Communicator and WordPerfect packages are normally found here.

1.17. /usr



The original idea behind '/usr/local' was to have a separate ('local') '/usr' directory on every machine besides '/usr', which might be just mounted read-only from somewhere else. It copies the structure of '/usr'. These days, '/usr/local' is widely regarded as a good place in which to keep self-compiled or third-party programs. The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr. Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.
So I stand corrected about what I wrote about keeping the original program in /usr, but otherwise my point of view agrees with the standards that additions should be placed in /usr/local.

Last edited by harryhaller; 09-18-2008 at 07:42 AM.
Old 09-18-2008, 11:11 AM   #34
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,890

Rep: Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569Reputation: 569
YOu have to take into account common practices -which means that most users/admins will install any *packaged* software with, usuallly, a prefix of /usr. /usr/local is most often used for software that is installed without packaging it and for a place to put single-file installations -that is short scripts which don't have any ancillary files.
/opt was originally designed to be used for any software which doesn't conform to normal pratices of spreading files out in different places. that is, some programs look for all their files under a single directory. /opt provides a place for htese programs -anything in /opt can follow whatever conevntion they want. usually progs there are installed into a single directory.

The one rule about /usr/local that most distros do folow is that it should be emptied as the distro is delivered.
In summary, if you want to do like everyone else is doing, only put stuff in /usr/local which is installed manually or by using 'make install, or an script. If you create packages for installation , they should nearly lawys be in prefix /usr, although there are exceptions. Some exceptions are really 'illegal', -products which create their own subdirectory in /usr. These should usually be installed, instead in a subdirectory under /usr/lib (no capitals in the name). Then links or wrappers to the binaries are placed in the normal path /usr/bin.

While true that pkgtool will manage packages installed under /usr/local and that some third-party packages may thus overwrite files from the official packages, this is still the most common practice across almost all distros. The biggest 'violators' have historically been several large open-source cross-platform programs, like X11, KDE, Mozilla and others.

If you create a package using prefix /usr/local, installing it with installpkg will still keep the database info under /var/log/packages. If you had a separate partition mounted on /usr/local you could use root=/usr/local installpkg pkgname to install the program there, but that is not correct -pkgtool rightly will ignore the database files which get installed to /usr/local/var/log/packages.
The 'root' option to installpkg is used when you are creating a complete installation under a certain subdirectory, which will be mounted as the main / partition afterwards(or if you want to copy the whole thing to some device).

As soon as you finish installing Slackware, it becomes yours -very few installations are left exactly like the installer created. It doesn't mean you should just go ahead and use LFS, just because you change the hostname or add a package or two(hundred) which are not part of the official release. Slackware users rarely rely 100% on official packages.

If you find anyone else distributing binary packages for Slackware which are installed under /usr/local, you should consider that a bug -no reputable packages is going to do that, and if someone does that, it screams that they don't know what they are doing -even though it may be 'legal', it is just simply not the accepted practice.


packages, slackpkg, slackware

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing of packages installed on system borgibo Linux - Newbie 4 06-16-2008 03:42 PM
listing the installed Packages nmansour Linux - Newbie 4 10-28-2007 02:16 PM
Make slackpkg prefer /extra over /slackware when listing packages to update rignes Slackware 1 06-02-2007 06:00 PM
Listing of packages installed on system kushalkoolwal Debian 12 06-22-2006 02:59 AM
Listing installed packages in Gentoo ? Builder Linux - Distributions 1 07-08-2004 05:09 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration