LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-08-2008, 04:58 PM   #1
luco.vico
LQ Newbie
 
Registered: Feb 2008
Posts: 14

Rep: Reputation: 0
Slackware Package Management vs Compiling From Source


Hello, everyone!

I installed Slackware on an old computer to learn linux more in-depth. I use Ubuntu on my laptop.

I'm sorry if this too obvious, but I am having some trouble understanding the package management/compiling from source concept. More specifically, http://howtoforge.com/the_perfect_desktop_slackware12 goes through the various ways of installing software: from ready packages (pg 4/8), from SlackBuilds (pg 6), from bin files (pg 7), and from source (pg 10).

I have no trouble understanding the idea behind using SlackBuilds to build a package and then install it with pkgtool. Easy to install and easy to manage - simply beautiful!

What I do have some difficulty with understanding is the latter two (bin files and from source). One doesn't seem to use installpkg for these two methods. And the question that I have is how do I manage these? How to I uninstall/remove them? And what happens if I happen to compile something from source that was already installed as a package (in Ubuntu if you try to install something that is already installed it just tells you that the program is the latest version and does nothing)?

Thanks in advance!

Vico
 
Old 03-08-2008, 05:21 PM   #2
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 47
Quote:
Originally Posted by luco.vico View Post
What I do have some difficulty with understanding is the latter two (bin files and from source). One doesn't seem to use installpkg for these two methods. And the question that I have is how do I manage these? How to I uninstall/remove them? And what happens if I happen to compile something from source that was already installed as a package (in Ubuntu if you try to install something that is already installed it just tells you that the program is the latest version and does nothing)?

Thanks in advance!

Vico

You "manage" them just by keeping track of them. You might download all source packages to a single directory, for example, or keep a text file of everything you've installed, a database, etc.

To uninstall something you installed from source, you do "make uninstall" in the directory you unpacked and installed it from. To uninstall a .bin file, you just delete it. :-)

If you compile something that is already on your system (and then install it, I presume you mean ), it will overwrite whatever is there to the extent that the package installs to the same directories, has the same files, etc. as the stuff that's already there.

hope that makes it a little clearer
 
Old 03-08-2008, 05:26 PM   #3
luco.vico
LQ Newbie
 
Registered: Feb 2008
Posts: 14

Original Poster
Rep: Reputation: 0
Makes sense!

Nice and simple!

Thank you!

Vico
 
Old 03-08-2008, 05:42 PM   #4
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
I have no trouble understanding the idea behind using SlackBuilds to build a package and then install it with pkgtool. Easy to install and easy to manage - simply beautiful!
OMG - Someone who gets it! And you came from Ubuntu!

Take a look at www.slackbuilds.org.
You'll find some SlackBuild scripts that change the .bin files (ie GoogleEarth) into a slackware package as well.

Simple is good.

Have Fun!
 
Old 03-08-2008, 06:11 PM   #5
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Personally I never (well, hardly ever) install "from source" without making a package. There are a number of ways to create packages from source such as SlackBuilds, src2pkg, trackinstall (part of src2pkg), makepkg, etc. Doing "make uninstall" is not reliable because it does not always work completely, sometimes it does not work at all, and it requires that you keep the source around. Much simpler to just always make packages.

Brian
 
Old 03-08-2008, 06:55 PM   #6
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
I agree with BCarey. `make uninstall` relies on the fact that the developer of the application created a good uninstall rule, and this may not be the case. There are ways of detecting which files were created (eg by `make install`ing again but to a certain directory instead of to the system and deleting the new files in the system, or by later making a slackware package using exactly the same configuration options you used to install the program in the first place and subsequently uninstalling the new package you created), but it's a lot of work later on when it may be more difficult to track what files are really needed and what ones aren't. I always make a SlackBuild for a program (it's not that hard to learn to do) that creates a nice slackware package (or, if a reliable SlackBuild is available, like from slackbuilds.org or Alien's site, I'll use that) which makes installing/uninstalling/upgrading very easy. There are always repositories (like http://repository.slacky.eu/slackware-12.0/ which also contains SlackBuilds) that you can use.
 
Old 03-08-2008, 07:42 PM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,
Quote:
Originally Posted by luco.vico View Post
<snip>

What I do have some difficulty with understanding is the latter two (bin files and from source). One doesn't seem to use installpkg for these two methods. And the question that I have is how do I manage these? How to I uninstall/remove them? And what happens if I happen to compile something from source that was already installed as a package (in Ubuntu if you try to install something that is already installed it just tells you that the program is the latest version and does nothing)?

Thanks in advance!

Vico
You should look at the '/var/log/packages' & '/var/log/removed_packages/' to get some history. I too agree that you should look at 'src2pkg-1.8'.

Don't forget 'pkgtool' which is still a useful tool.

You could always 'man pkgtool', 'man installpkg', 'man removepkg' to get some background.

As for the tracking itself, then 'src2pkg' will allow you much the same as what 'checkinstall' would do in the past, only better.
 
Old 03-09-2008, 12:17 AM   #8
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Hi,

Welcome to Slackware:

Quote:
Originally Posted by luco.vico View Post
Hello, everyone!
I installed Slackware on an old computer to learn linux more in-depth. I use Ubuntu on my laptop.
I came from an Ubuntu background as well and still have Hardy Heron installed on another partition so I know the journey you are making :-)

All the best,

Andrew
 
Old 03-09-2008, 10:52 AM   #9
luco.vico
LQ Newbie
 
Registered: Feb 2008
Posts: 14

Original Poster
Rep: Reputation: 0
Thank you all for your ideas! I completely forgot about src2pkg and the like *slapping my forehead*! I've only installed 3 programs from source, so I guess it shouldn't be too complex to back-track. I'll take a look at some scripts and will probably go back and re-install those three programs via packages.

Thank you all again!

Vico
 
  


Reply



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
Slackware security - package management 52fitz Slackware 4 02-21-2006 03:28 PM
Slackware Package Management gonzalo76 Slackware 12 05-11-2004 07:20 PM
Slackware Package Management kemplej Slackware 1 12-22-2003 05:34 PM
slackware package management Vlad_M Slackware 6 08-15-2003 04:20 AM
package management and source Kellvyn Slackware 6 09-09-2002 11:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:46 AM.

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