Blog Archive

Sunday, May 24, 2009

Package Managers

How old this issue is? ;Z

Before everything, i like the open source development nature, im not agains the good use of the
source code, that before anything is to "modify" the code that is "open source", otherwise you can go back to the closed source and protected ones like: Microsoft, Apple(some are open source with high quality, \0/, congratulations Steve Jobs.), these 2 are enought :) for an example.

After a walk through some linux distributions and some bsd distributions i got some ideas in what
is common to all these and what is different, these things appears to be simple at the first thinking
moment, simple to solve and you think "ohh why they didn't got it yet?".Every day you find
someone new to this world complaining about that "management", we are under the *nix environment, we known that it's pretty different from Redmond ones.

So, what's the point here? Which of the features are common to all?

First we need to known, the lack of common sense comes from a lot of individual perspectives of
what is essencial and what is not.We can start with the top level perspective of what a package
can be managed.I can't use all distirbutions because there is too much (look distrowatch.com)

Source code or Binary based?

So i will talk about: Portage(im new user though), apt(used for some time), rpm(used more than apt)

Source code based

  • Portage: Gentoo based( oh sorry i used just gentoo itself untill now :)
Binary based

  • APT: Debian based(Ubuntu,...)
  • RPM: Red Hat based(fedora,CentOS, ...)
  • Pkgtool: Slackware based(Slax, Slax->Backtrack :D)
Pkgtool

The first distribution that i got was a slackware, if i remember it was the 8th version(today its 12 right?) not too long ago(i got it around 2003).The package manager were pretty simple, basically in bash script language using a ncurses based dialog box, something that when you begin with the linux make you think that you are a "hacker" haha, that time were funny, i was trying to switch from windows environment to linux, and the first distro that i got was the hardest one to deal, but later i noticied that this one is really considered the simplest and hardest one(for beginners, later you known that the simplicity helps a lot).The package manager let you install binary packages and build these, some other functionalities are: list installed packages, remove, etc.

After some time i got the question, and the dependency resolution, this exist? Sure, but not for a
slackware user. :) ops, you have third-part softwares, but we are talking about DEFAULT environment.

So basically till now we have some hints in what could be the core features of a package manager:

  • Install packages
  • Upgrade packages
  • Remove packages
  • Search for installed packages
Remeber, in that time i didn't known anything about bash scripting or awk nut stuff! that was really TOO MUCH for a windows user( oh really it need to be uppercased).

That time while navigating in the web i found the Unix philosophy:

"Write programs that do one thing and do it well" Doug McIlroy[1]

Well, for be true at that time i didn't want understand it, the lack of dependency resolution was
something that i didn't want ;)

So, that's all, slackware is slack, when you get "it", you will see that it make sense, if you want use it, you do, otherwise look ahead and start your research \o/ maybe you end up with Ubuntu.

RPM

Red Hat 9, that was the second distro i used ( if my memory is not corrupted, ohh lets check using the md5sum ... ;).Improvement? Some, that time and still now i didn't use 50% of the command-line arguments of most package managers, and i tend to see some of options redundant and unecessary.What is incredible, is that, even if it's from a software company they didn't provide any enhancements regard dependency resolution, RPM till today is just something like pkgtool(that has its advantages, but not for most end-users), more one time we have to believe in the Unix philosophy(you will be a evangelist of that philosophy when you get the source of the Xorg big thing and try to compile it, its really big, and its not Unix philosophy, really it's not o.O ).

So the main advantages compared to pkgtool for me was:

  • Packages can be cryptographically verified.
About the common sense, Ralf S. Engelschall started a new project to circunvent those diferences in this perspective of what is essencial, the OpenPKG.Since the RPM is in the LSB that good to make things more neutral, even the name RPM(The "Red Hat software") could be changed to help in that goal if its planed to be in the LSB for a long time.The Red Hat is one of the main companies that really is working with the people behind all that distribution names, as you might see GNU/Linux is not totally corrent since i think that just 10% of the softwares in the distributions is made directly from FSF members or linux kernel members, yes all people have their value too, but sure, the core are FSF softwares more the linux kernel, anyway things go much beyond "naming conventions", but it helps people see that a great group can work together to make something each day more nice and some times funny to deal.

Lets talk about yum? Well it's an extension to the original package manager that didn't deal with dependencies and other few things, so thats enough.

APT

Time to get the most famous linux distribution out of the box! ;)

Debian, ohh well, that wasn't the first for me, was Ubuntu(that's the most famous to the new commings).After the "Boom" in the internet about that distribution i had to check it out ;).Dependency resolution, yes it does, and does well and is a part of what we call "default" in the set of utilities.

Before anything, sure, we must tell that Ubuntu is a Debian based distribution, that is, it use its base to make something more specific, end-users that come from other Operating Systems and tend to say that the CLI is the worse monster in their machine, they always want a fancy GUI just to press the buttons and make effects with the window :), that make them happy so they made for them.In the beginning i found it wonderfull, people working on GUI that easy to work thats beautiful, but after i discover the Shell! i found that basic applications were lacking, some them "complete" but the quality of the software were very bad, so today for me focus on GUI is a waste of time if we have our back-ends poorly done(like ifconfig for example, there is not an official developer! and its dated 199X, oO, ok nice we have iproute2 to replace, but i see some distros still with that thing, and some nice distros (gentoo)).

Advantages of the APT over the others come in the better way the functionality is given for
binary packages and source based packages and the configuration management is pretty nice.The RPM
has almost the same functionalities, but i consider the apt a bit better, about the documentation i have to say that when i used RPM the default system installation didn't included some manual pages of some rpm utilities or it didn't exist, while in other side the APT is well documented and
improved by a lot of people of the Debian community.

I forgot to write, the first time i really leaved the Windows was when i got the fedora 9, in 2008.Till that time rarelly i was switching to the linux using the VirtualBox.

Portage

The portage is developed in python(make me think of portability, but i didn't see it running very well in non unix systems, that's where i think python is really usefull), the gentoo introduced one thing that i were looking for when i got tired of too much packages on my system in a situation that i couldn't manage them, a bunch of gnome apps, kde, qt libraries, gtk, strange app that i never saw and used, really a buch of things all messed up, so i decided that will be impossible maintain a system with those things, there is 10000000 of packages to check.I need something that fits my needs.Now less is more(more efectivy in the development of what you want).

The advantage, the USE flag.As you can see most of the times a user lose his hair trying to deal with his/her desktop, most of the times its to much, for end-users or developers, so i see a great advantage here, that could be in all other distros if they want improve something IMHO, let the
user customize its environment.The portage is specific developed to make this happen, practically i don't have much experience with portage right now(around 2 moths of experience at all) but i say, the portage didn't need the only one, others could add this feature for the users.

Concluding

As this post is to be very simple and clear, there is few features that some of us(users) see in some package managers, but in the open source world(where there is a lot of softwares) we need
customization, who won? Portage IMHO, but everything can be enhanced over the time, its open source, its made for change, to fit our needs.

[1] http://en.wikipedia.org/wiki/Unix_philosophy

No comments:

Post a Comment