Keeping Slackware "clean"

drag

Elite Member
Jul 4, 2002
8,708
0
0
Now every since my windows 95 days, I have always wondered how the hell do you keep your OS tidy? Installing software is easy, but how does one go about getting your diskspace back without frying anything. I know its possible, but is it realy worth the time and effort? And what if you like to install tons of software to find the one app you will like? Now with my training as a windows user I eventually just to learned to give up that quest and just learned that I have about a 50/50 chance of creating a unstable OS thru uninstalling software, and that the only practicle way back from a full HD and decent performance without being a "registry" slave is to reformat.

So I got tired of windows and Linux's promise of Free computing was pretty attractive. So I went down to the Book store and bought "The RedHat Bible" that came bundled with 7.0. Playing around with that taught me the ins and outs so I eventually got a more "serious" OS: Slackware. Later I got a bit obsessive about trying to find the latest versions of the software I use every day, the slack version I was using was getting a bit dated, so i got in the bad habit of randomly installing everything from source. I ended up spending most of my computer time chasing down obsolete and conflicting libraries, no fun in that.

My past experiances taught me that I needed to learn packaging systems. Debain was great and Gentoo was terrific. This way I could upgrade, upgrade, upgrade with the dependances being updated and taken care off. Every week I could get any new package and install it if I felt like it, with little difficulty. Plus now I can uninstall stuff.. and gues what? It goes away! no lingering after effects on the OS exept for a couple stray config files here and there. I could take Samba, NFS, KDE or anything and remove it add it again, over and over again. no sweat..

I decided tto tried out RedHat newest offering.. Well RPMs are a mess. The Nvidia rpms, almost broke my OS! for crap's sake! Almost as bad as what Windows users have to deal with. (Now all in all Redhat is realy a great OS, but not really my taste. A bit "fatty". I could fix that, but I don't like gui configuration tools that much anymore and Redhat realy is all about it's blue curve stuff.)

But SLackware is still my favorite. I just like being able to have a Linux OS that just is. Nothing fancy, no weird extra directories tacked onto the filesystem. I like my Linux clean thank you, And I like to understand exactly whats going on, no suprises. Plus SLack does have a package system, well sort of. It always seemed a bit "backwards". It doesn't keep track of dependances, and the selection of packages is limited.. That is until I found out how to use it from this website. With some simple tools I can easily and quickly build my own packages from source code.. Now why would I want to do this if I can easily get them if I use a more "modern" package system like Debian or Gentoo? It's all about control, I make it how I want it. No fuss no muss. I don't have to wait for others to test out newest versions of software, plus now I have the power to "tweak" the code and add patches to software like nmap for extra functionality, but still be able to quickly and easily uninstall stuff if I don't like it. Plus I can install weird or unusual apps, that just won't ever realy have a enough user base to warrent a fully tested package from developers.

Now mind you I have only been doing this for a couple days, but I think I got the most of the bugs ironed out, so don't blame me if it don't work... My method is a bit different from the "quick and dirty method" described in the link, although it is realy about 85-90% the same..

First make a work folder in you user directory. I am drag, so I make /home/drag/work..
Now I keep all my sources from the tarballs in there until I am finished with them..

I'll assume you know the drill:
./configure
make
make install

...and know enough that you have to read the INSTALL files, and the README files for any special configurations. Sometimes you only have to do "make" as per NVIDIA's kernel driver install and other varietions are not uncommon...
but generally 80% of the time this will work. And I try to do this completely as a regular user and never as SU or root if I can help it.. (that's the main diference from the afformentioned method)

Ok I make a builds directory in my work folder. Then I'll make a usr folder in that...
Next:
export HM=/home/drag/work/builds
so I can just use $HM and don't have to type it out every time.

ok and then (genericly) all you would have to do is:

./configure --prefix=/usr
make
make install prefix=$HM/usr

that should be enough to "trick" the software into being installed the build/usr file as if it was realy the /usr/ file..

Then you just check the build/usr folder and make sure everything is ok.

But that doesn't work all of the time. :( Lots of the time the "make" file wants to put something in the /etc directory or the /lib.. or wants to make sure that the user will root. etc... In order to do that you need to be root, and so the make install will fail...

But there is a solution! It's in a nifty tool called installwatch!
you just su to root and type:
installwatch -o installog make install prefix=$HM/usr

This will run the make install with all the power of root, but installwatch will keep track of all the changes the install script makes to your filesystem. That way it'll keep track of it for you so you know what exactly is going on... the -o outputs the installwatch stuff into the installog file

The output from installwatch is not realy ment to be human-readable, it is ment so that you can create very nice shell scripts that'll do the hard stuff for you. It's just that I am still working on the details and haven't had a chance to make a effective shell script yet...

so instead after checking out the log file I just:
cat installog |grep -v /home |grep -v /dev > installog2
this will make a log2 with all the important info on it, then I check out the log2 and "mv" all the files to there correct relative locations in the builds/ folder, while carefully undoing the changes done to my OS.

Now with all that done and as root I goto the /home/drag/work/build/ directory.
I checkout everything and make sure that everything is A-ok. I also do a: chown -R root.root ./*
command (remember that dot, it's very important).. and while in the /home/drag/work/build
directory I do that good'ol SLack magic:

makepkg appname.tgz

(say yes to everything, unless you know what your doing..)

this will construct the Slackware package! Now you test it. just run pkgtool and you should be able to isntall it, no prob! Run the proggy and make sure that it works. If you don't like it, just run pkgtool and uninstall it, and it's gone. You can rebuild it again with different options or just forget about it entirely.

It's actually realy easy, and only adds a 5-10 minutes of work on top of what it takes to install stuff from source code anyways.

If you get good enough you can play around with the gcc optimization flags to try to speed it up, or add other proggies to it to make a bunch of software bundled together. Also you add your config files to the fake builds/ directory so that you can reinstall it on a different computer with all your settings.

Now why should you care about this? You got your nice apt-get, and your Gentoo portage system is as slick as snot, or maybe the RPM's are just good enough? Well do to the fact that Slackware is all about keeping standards it's package managment system will probably work on any other distro, it doesn't require any special folders, exept a place to keep the config and package history files. (The only problem is that slackware native packages may or may not work on other Distro's due to dependances in the libs.)You can build your own simple packages to augment the distro's native format, plus if you are a developer or something you can make packages easily so that you can send to your freind's computer so he can try it out and test different configurations... This method isn't just for software either, what if you are trying out a new security model that requires you to change a bunch of different configurations for a bunch of different services? You can use slack's package managment to save your old stuff and save any new configurations you have made. Now you can add and change configs and switch em back and forth for any testing you need to do. Once you test the config's out and get them "right" you can impliment them easily on a bunch of servers by putting the packages up on a ftp server..

Hope somebody finds this usefull :)
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Ya sure:

Slackware rocks, go here to learn how to make your own packages, But since slack package managements rock you can use it on pretty much any linux distro once you install it. Go up top to see how I use it. Step-by-step with commentary! There are lots of uses for it other than installing pre-packaged software.


Happy?

also if you don't already know strace rocks, learn howto use it.

hope someone finds it helpful
 

Booter

Member
Jun 7, 2002
198
0
0
Originally posted by: drag
Now every since my windows 95 days, I have always wondered how the hell do you keep your OS tidy? Installing software is easy, but how does one go about getting your diskspace back without frying anything. I know its possible, but is it realy worth the time and effort? And what if you like to install tons of software to find the one app you will like? Now with my training as a windows user I eventually just to learned to give up that quest and just learned that I have about a 50/50 chance of creating a unstable OS thru uninstalling software, and that the only practicle way back from a full HD and decent performance without being a "registry" slave is to reformat.

So I got tired of windows and Linux's promise of Free computing was pretty attractive. So I went down to the Book store and bought "The RedHat Bible" that came bundled with 7.0. Playing around with that taught me the ins and outs so I eventually got a more "serious" OS: Slackware. Later I got a bit obsessive about trying to find the latest versions of the software I use every day, the slack version I was using was getting a bit dated, so i got in the bad habit of randomly installing everything from source. I ended up spending most of my computer time chasing down obsolete and conflicting libraries, no fun in that.

My past experiances taught me that I needed to learn packaging systems. Debain was great and Gentoo was terrific. This way I could upgrade, upgrade, upgrade with the dependances being updated and taken care off. Every week I could get any new package and install it if I felt like it, with little difficulty. Plus now I can uninstall stuff.. and gues what? It goes away! no lingering after effects on the OS exept for a couple stray config files here and there. I could take Samba, NFS, KDE or anything and remove it add it again, over and over again. no sweat..

I decided tto tried out RedHat newest offering.. Well RPMs are a mess. The Nvidia rpms, almost broke my OS! for crap's sake! Almost as bad as what Windows users have to deal with. (Now all in all Redhat is realy a great OS, but not really my taste. A bit "fatty". I could fix that, but I don't like gui configuration tools that much anymore and Redhat realy is all about it's blue curve stuff.)

But SLackware is still my favorite. I just like being able to have a Linux OS that just is. Nothing fancy, no weird extra directories tacked onto the filesystem. I like my Linux clean thank you, And I like to understand exactly whats going on, no suprises. Plus SLack does have a package system, well sort of. It always seemed a bit "backwards". It doesn't keep track of dependances, and the selection of packages is limited.. That is until I found out how to use it from this website. With some simple tools I can easily and quickly build my own packages from source code.. Now why would I want to do this if I can easily get them if I use a more "modern" package system like Debian or Gentoo? It's all about control, I make it how I want it. No fuss no muss. I don't have to wait for others to test out newest versions of software, plus now I have the power to "tweak" the code and add patches to software like nmap for extra functionality, but still be able to quickly and easily uninstall stuff if I don't like it. Plus I can install weird or unusual apps, that just won't ever realy have a enough user base to warrent a fully tested package from developers.

Now mind you I have only been doing this for a couple days, but I think I got the most of the bugs ironed out, so don't blame me if it don't work... My method is a bit different from the "quick and dirty method" described in the link, although it is realy about 85-90% the same..

First make a work folder in you user directory. I am drag, so I make /home/drag/work..
Now I keep all my sources from the tarballs in there until I am finished with them..

I'll assume you know the drill:
./configure
make
make install

...and know enough that you have to read the INSTALL files, and the README files for any special configurations. Sometimes you only have to do "make" as per NVIDIA's kernel driver install and other varietions are not uncommon...
but generally 80% of the time this will work. And I try to do this completely as a regular user and never as SU or root if I can help it.. (that's the main diference from the afformentioned method)

Ok I make a builds directory in my work folder. Then I'll make a usr folder in that...
Next:
export HM=/home/drag/work/builds
so I can just use $HM and don't have to type it out every time.

ok and then (genericly) all you would have to do is:

./configure --prefix=/usr
make
make install prefix=$HM/usr

that should be enough to "trick" the software into being installed the build/usr file as if it was realy the /usr/ file..

Then you just check the build/usr folder and make sure everything is ok.

But that doesn't work all of the time. :( Lots of the time the "make" file wants to put something in the /etc directory or the /lib.. or wants to make sure that the user will root. etc... In order to do that you need to be root, and so the make install will fail...

But there is a solution! It's in a nifty tool called installwatch!
you just su to root and type:
installwatch -o installog make install prefix=$HM/usr

This will run the make install with all the power of root, but installwatch will keep track of all the changes the install script makes to your filesystem. That way it'll keep track of it for you so you know what exactly is going on... the -o outputs the installwatch stuff into the installog file

The output from installwatch is not realy ment to be human-readable, it is ment so that you can create very nice shell scripts that'll do the hard stuff for you. It's just that I am still working on the details and haven't had a chance to make a effective shell script yet...

so instead after checking out the log file I just:
cat installog |grep -v /home |grep -v /dev > installog2
this will make a log2 with all the important info on it, then I check out the log2 and "mv" all the files to there correct relative locations in the builds/ folder, while carefully undoing the changes done to my OS.

Now with all that done and as root I goto the /home/drag/work/build/ directory.
I checkout everything and make sure that everything is A-ok. I also do a: chown -R root.root ./*
command (remember that dot, it's very important).. and while in the /home/drag/work/build
directory I do that good'ol SLack magic:

makepkg appname.tgz

(say yes to everything, unless you know what your doing..)

this will construct the Slackware package! Now you test it. just run pkgtool and you should be able to isntall it, no prob! Run the proggy and make sure that it works. If you don't like it, just run pkgtool and uninstall it, and it's gone. You can rebuild it again with different options or just forget about it entirely.

It's actually realy easy, and only adds a 5-10 minutes of work on top of what it takes to install stuff from source code anyways.

If you get good enough you can play around with the gcc optimization flags to try to speed it up, or add other proggies to it to make a bunch of software bundled together. Also you add your config files to the fake builds/ directory so that you can reinstall it on a different computer with all your settings.

Now why should you care about this? You got your nice apt-get, and your Gentoo portage system is as slick as snot, or maybe the RPM's are just good enough? Well do to the fact that Slackware is all about keeping standards it's package managment system will probably work on any other distro, it doesn't require any special folders, exept a place to keep the config and package history files. (The only problem is that slackware native packages may or may not work on other Distro's due to dependances in the libs.)You can build your own simple packages to augment the distro's native format, plus if you are a developer or something you can make packages easily so that you can send to your freind's computer so he can try it out and test different configurations... This method isn't just for software either, what if you are trying out a new security model that requires you to change a bunch of different configurations for a bunch of different services? You can use slack's package managment to save your old stuff and save any new configurations you have made. Now you can add and change configs and switch em back and forth for any testing you need to do. Once you test the config's out and get them "right" you can impliment them easily on a bunch of servers by putting the packages up on a ftp server..

Hope somebody finds this usefull :)

Good info drag! I've never tryed slack but i will give it a shot.
 

civad

Golden Member
May 30, 2001
1,397
0
0
drag should try his hand at some review/tutorial writing on a regular basis.

I am sure he will do good...
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: drag
Ya sure:

Slackware rocks, go here to learn how to make your own packages, But since slack package managements rock you can use it on pretty much any linux distro once you install it. Go up top to see how I use it. Step-by-step with commentary! There are lots of uses for it other than installing pre-packaged software.


Happy?

also if you don't already know strace rocks, learn howto use it.

hope someone finds it helpful

Thanks! Sounds neat, I'll have to read the entire thing.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Slackware's package management has its place, but I'm not as universally enamored of it as you are. One big problem is staying up to date - when a new version of a package comes out, you've got to figure out again what your configure flags were, what tricks you needed to play to get it to compile, did you strip the files, did you compress the man pages, etc. For a server or a simple desktop system where things don't change much, this is not bad. But it's a pain on a workstation where you're trying to keep up with the proverbial Joneses. You could (as Pat does) write scripts to automate the process, but then you're getting away from the simplicity of Slack package that you (rightfully, IMO) admire. If you're going to take time to automate package builds, RPM's provide a far more powerful framework for not much more time. Or, use Debian where 99% of the packages you'd ever want are already out there.
 

Spyro

Diamond Member
Dec 4, 2001
3,366
0
0
Originally posted by: drag
Ya sure:

Slackware rocks, go here to learn how to make your own packages, But since slack package managements rock you can use it on pretty much any linux distro once you install it. Go up top to see how I use it. Step-by-step with commentary! There are lots of uses for it other than installing pre-packaged software.


Happy?

also if you don't already know strace rocks, learn howto use it.

hope someone finds it helpful

Ahhh, OK thanks drag. This will probably make keeping track of unpackaged software on my system a lot easier :).
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Another reason I use Debian, let the package maintainers worry about that stuff. I just want to use my OS.
 

Spyro

Diamond Member
Dec 4, 2001
3,366
0
0
Originally posted by: Nothinman
Another reason I use Debian, let the package maintainers worry about that stuff. I just want to use my OS.

Yeah, that is the great thing about debian isn't it :D. Over 14000 precompiled packages, means that normally there is no need to bother with this.
 

Bremen

Senior member
Mar 22, 2001
658
0
0
heh, nice read drag. Of course I think it would be easier to go with scripts like Pat uses, but then writing some of those scripts must have taken awhile, others I just can't figure out how they work :0) I used to just keep the source tree around, and when I wanted to get rid of something 'make uninstall' :0) Keeping the source trees though took up quite a bit of space :-(
 

Bremen

Senior member
Mar 22, 2001
658
0
0
Originally posted by: n0cmonkey
Originally posted by: Nothinman
Another reason I use Debian, let the package maintainers worry about that stuff. I just want to use my OS.

How... Boring.

But valid. How many people drive their cars around every day but have no idea how they work? We all know we *should* probably learn this stuff, but we have more important things to think about. In the same way many people, even geeks, perish the thought, prefer not to think about the OS too much. Although I do agree, it seems kindof boring to me :cool:
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Although I do agree, it seems kindof boring to me :cool:

Why? It gives me more time to mess with things I actually care about like my pf rules or my altq setup or testing linux 2.5.x on my Alpha.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Hey if your interested here is some other things I figured out about the package system.

It realy is a simple tar ball package. All the files that are stored are simply "tar zxfvp"'ed into their respective folders. The only thing extra to the tarball is a /install directory. In it there is a doinst.sh script, this is there to set up any symbolic links to the files that are needed and is responsible for any extra things that need to happen in the install. The other file in the install/ directory is the slack-desc file, this is to provide the description of package in the pkgtool install dialog. Once you install the package the /install directory is removed

And thats it for the package contents.

When you install the package using the slack tools the files are extracted and put in their respective locations around the directories. The install scripts are saved and put in a /var/log/scripts folder. A file created and put into the /var/log/packages folder. It's a file with the same name as the package minus the .tgz/.tar.gz part that keeps a record of:
package name,
compressed size,
uncompressed size,
package location,
copy of the contents of the slack-desc file,
and then the complete file list with paths of the installed files.

if you uninstall the package the /var/log/packages/PackageName is moved into the /var/log/removed_package/ directory and the /var/log/scripts/PackageScript is moved to the /var/log/removed_scripts. There is also a /var/log/setup directory, but I am not sure what it does exaclty, I think it's just a place to store your selections you choose in the OS install...


Now I looked at the pkgtools package from the install cd (the actual package used to install the slack package tools system in the OS install) and it seems that all you'd have to do is untar it into a temp directory and copy the sbin contents to your regular /sbin file. I think that's all you need to get enough to get it working in any linux OS, the binaries are compiled for just the regular i386 architecture and all you need to have in terms of dependances is the ability to support a ncurses menu system (like the menuconfig dialog when you compile a kernel). There are numerous other files in the pkgtools, like a diagolrc file, some extra langauge support files, terminfo files, and the man files. I haven't realy tried the tools on any other linux OS so I can't be sure, but it all seems simple enough.. I'll am going to try it out on my debian box and see how it works.

Don't laugh though! I know that debian's stuff is much more elabrate and usefull for installing software, but I think that this could be a nice tool for a few reasons. Think if your a developer, you could make software and use make different or developement versions into packages that could be tried out on a freinds computer and your own box without going thru the hassle of cleaning up after each update. Also if you want to get the latest version of a obscure utility or aplication, (deb packages can't cover all the bases) so I could use pkgtools to keep track of it. Slack's package system isn't so much reinventing the wheel as it is a well-established, simple and workable alternative solution to a complex problem.

If your interested in checking it out you can go to any of the slackware mirrors and copy the pkgtool tarball (it's in the "a" folder). A list of mirrors can be found in the "getslack" section of www.slackware.com
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
I am also interested in how deb's or rpm's package systems work. (hint hint) how hard is it to you make your own deb packages to keep track of self installed software? or rpms? how about gentoo's portage system...

The two major downsides of Slack's package system (other than shortage of packages compared to others) is the inability to automatic installs over the internet and no automatic dependancy tracking. I suppose you could add this to the install scripts, but it isn't normally.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I am also interested in how deb's or rpm's package systems work. (hint hint) how hard is it to you make your own deb packages to keep track of self installed software? or rpms? how about gentoo's portage system...

Debian packages are supposedly fairly complicated, although I can't speak from experience. RPMs on the other hand are really simple, there were a few quirks but I had a working .spec file for an RPM in less than a day when I started looking at it for work.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
With RPM's, it really depends on careful/picky you want to be. If you've got a simple program and you just want to get it packaged as soon as possible, you could work up a spec for it within a couple hours working off of an example, assuming no prior knowledge of RPM. But if you're a perfectionist, you could spend a lot of time with install/upgrade/removal scripts, tidying up documentation, defining BuildReqs, tweaking AutoReqs, optimizations, and so on. And if you have a truly significant package, life is rarely as simple as ./configure && make && make install. Take a look at the RH spec for the kernel or glibc if you want to see some crazy tricks.

For simple packages, writing specs is only marginally harder than building a Slackware package, especially if you have a good template, and maybe a couple scripts to track files and generate diffs. For complicated packages, Slackware packages are much faster to create because you can freely manipulate the files before you package them. With RPM, you can, at best, use --short-circuit to skip the compile, but you'll still have run through the install again, and check it to make sure the spec is doing what you expect. On the other hand, with Slackware you'll have to do all that work again next time there's a security patch, whereas with RPM, you can just add a few lines to the spec and get some coffee while it rebuilds.
 

BmXStuD

Golden Member
Jan 17, 2003
1,474
0
0
Originally posted by: Booter
Originally posted by: drag
Now every since my windows 95 days, I have always wondered how the hell do you keep your OS tidy? Installing software is easy, but how does one go about getting your diskspace back without frying anything. I know its possible, but is it realy worth the time and effort? And what if you like to install tons of software to find the one app you will like? Now with my training as a windows user I eventually just to learned to give up that quest and just learned that I have about a 50/50 chance of creating a unstable OS thru uninstalling software, and that the only practicle way back from a full HD and decent performance without being a "registry" slave is to reformat.

So I got tired of windows and Linux's promise of Free computing was pretty attractive. So I went down to the Book store and bought "The RedHat Bible" that came bundled with 7.0. Playing around with that taught me the ins and outs so I eventually got a more "serious" OS: Slackware. Later I got a bit obsessive about trying to find the latest versions of the software I use every day, the slack version I was using was getting a bit dated, so i got in the bad habit of randomly installing everything from source. I ended up spending most of my computer time chasing down obsolete and conflicting libraries, no fun in that.

My past experiances taught me that I needed to learn packaging systems. Debain was great and Gentoo was terrific. This way I could upgrade, upgrade, upgrade with the dependances being updated and taken care off. Every week I could get any new package and install it if I felt like it, with little difficulty. Plus now I can uninstall stuff.. and gues what? It goes away! no lingering after effects on the OS exept for a couple stray config files here and there. I could take Samba, NFS, KDE or anything and remove it add it again, over and over again. no sweat..

I decided tto tried out RedHat newest offering.. Well RPMs are a mess. The Nvidia rpms, almost broke my OS! for crap's sake! Almost as bad as what Windows users have to deal with. (Now all in all Redhat is realy a great OS, but not really my taste. A bit "fatty". I could fix that, but I don't like gui configuration tools that much anymore and Redhat realy is all about it's blue curve stuff.)

But SLackware is still my favorite. I just like being able to have a Linux OS that just is. Nothing fancy, no weird extra directories tacked onto the filesystem. I like my Linux clean thank you, And I like to understand exactly whats going on, no suprises. Plus SLack does have a package system, well sort of. It always seemed a bit "backwards". It doesn't keep track of dependances, and the selection of packages is limited.. That is until I found out how to use it from this website. With some simple tools I can easily and quickly build my own packages from source code.. Now why would I want to do this if I can easily get them if I use a more "modern" package system like Debian or Gentoo? It's all about control, I make it how I want it. No fuss no muss. I don't have to wait for others to test out newest versions of software, plus now I have the power to "tweak" the code and add patches to software like nmap for extra functionality, but still be able to quickly and easily uninstall stuff if I don't like it. Plus I can install weird or unusual apps, that just won't ever realy have a enough user base to warrent a fully tested package from developers.

Now mind you I have only been doing this for a couple days, but I think I got the most of the bugs ironed out, so don't blame me if it don't work... My method is a bit different from the "quick and dirty method" described in the link, although it is realy about 85-90% the same..

First make a work folder in you user directory. I am drag, so I make /home/drag/work..
Now I keep all my sources from the tarballs in there until I am finished with them..

I'll assume you know the drill:
./configure
make
make install

...and know enough that you have to read the INSTALL files, and the README files for any special configurations. Sometimes you only have to do "make" as per NVIDIA's kernel driver install and other varietions are not uncommon...
but generally 80% of the time this will work. And I try to do this completely as a regular user and never as SU or root if I can help it.. (that's the main diference from the afformentioned method)

Ok I make a builds directory in my work folder. Then I'll make a usr folder in that...
Next:
export HM=/home/drag/work/builds
so I can just use $HM and don't have to type it out every time.

ok and then (genericly) all you would have to do is:

./configure --prefix=/usr
make
make install prefix=$HM/usr

that should be enough to "trick" the software into being installed the build/usr file as if it was realy the /usr/ file..

Then you just check the build/usr folder and make sure everything is ok.

But that doesn't work all of the time. :( Lots of the time the "make" file wants to put something in the /etc directory or the /lib.. or wants to make sure that the user will root. etc... In order to do that you need to be root, and so the make install will fail...

But there is a solution! It's in a nifty tool called installwatch!
you just su to root and type:
installwatch -o installog make install prefix=$HM/usr

This will run the make install with all the power of root, but installwatch will keep track of all the changes the install script makes to your filesystem. That way it'll keep track of it for you so you know what exactly is going on... the -o outputs the installwatch stuff into the installog file

The output from installwatch is not realy ment to be human-readable, it is ment so that you can create very nice shell scripts that'll do the hard stuff for you. It's just that I am still working on the details and haven't had a chance to make a effective shell script yet...

so instead after checking out the log file I just:
cat installog |grep -v /home |grep -v /dev > installog2
this will make a log2 with all the important info on it, then I check out the log2 and "mv" all the files to there correct relative locations in the builds/ folder, while carefully undoing the changes done to my OS.

Now with all that done and as root I goto the /home/drag/work/build/ directory.
I checkout everything and make sure that everything is A-ok. I also do a: chown -R root.root ./*
command (remember that dot, it's very important).. and while in the /home/drag/work/build
directory I do that good'ol SLack magic:

makepkg appname.tgz

(say yes to everything, unless you know what your doing..)

this will construct the Slackware package! Now you test it. just run pkgtool and you should be able to isntall it, no prob! Run the proggy and make sure that it works. If you don't like it, just run pkgtool and uninstall it, and it's gone. You can rebuild it again with different options or just forget about it entirely.

It's actually realy easy, and only adds a 5-10 minutes of work on top of what it takes to install stuff from source code anyways.

If you get good enough you can play around with the gcc optimization flags to try to speed it up, or add other proggies to it to make a bunch of software bundled together. Also you add your config files to the fake builds/ directory so that you can reinstall it on a different computer with all your settings.

Now why should you care about this? You got your nice apt-get, and your Gentoo portage system is as slick as snot, or maybe the RPM's are just good enough? Well do to the fact that Slackware is all about keeping standards it's package managment system will probably work on any other distro, it doesn't require any special folders, exept a place to keep the config and package history files. (The only problem is that slackware native packages may or may not work on other Distro's due to dependances in the libs.)You can build your own simple packages to augment the distro's native format, plus if you are a developer or something you can make packages easily so that you can send to your freind's computer so he can try it out and test different configurations... This method isn't just for software either, what if you are trying out a new security model that requires you to change a bunch of different configurations for a bunch of different services? You can use slack's package managment to save your old stuff and save any new configurations you have made. Now you can add and change configs and switch em back and forth for any testing you need to do. Once you test the config's out and get them "right" you can impliment them easily on a bunch of servers by putting the packages up on a ftp server..

Hope somebody finds this usefull :)

Good info drag! I've never tryed slack but i will give it a shot.

Umm no mandrake sucks but still brought it :/ i gve slackware a try sometime in the ouple 14 years