Why pkgsrc is bad.

The last couple of days I have seen several people asking if/how to use pkgsrc. What is pkgsrc actually?

The wikipedia entry defines it as following: pkgsrc (package source) is a package management system for Unix-like operating systems. It is used as the primary package management system on NetBSD.

Most people do quote the article of this site as the source of howto install pkgsrc on a slackware machine. Lets have a closer look on how this works shall we? [0]

Added NOTE: Just so people are clear about this. This blog entry is a rant against the article mentioned above. Please read the article first before commenting, as this explains where I come from.

During the initial install you have remove roughly 91%!!! of all slackware packages [1]. To me this seems at least a bit strange. This is not what a decent package tool should do. To replace half of your operating system with what *they* seem is right. Even swaret/slaptget don’t do this, and they manage to break more than their fair share of boxen.

The next step is to install a kernel source, and actually go about breaking the kernel headers. This to me seems absolutely preposterous. Not only are you stuck with one specific kernel, every time you upgrade your kernel, things might just break. There is a good reason why kernel-headers and kernel source are split apart [2]. I honestly can’t grasp why it is needed to go and break this.

Of course, pkgsrc can’t rely on Slackware’s ftp client, no we have to use NetBSD. It just all adds up in many different ways on how to ‘bork’ your system completely.And when all is said and done and you have added the 92% off all the applications back to your system (lets recompile everything!!) plus you are probably forced to use pkgsrc for the rest of your life.

The fun thing is that the author mentions that slackware-9.1 has a broken libstdc++.la and libsupc++.la. I have to really wonder if they are broken (and if they are why hasn’t anyone reported it) or are they broken after pkgsrc has basically done things to the system it wasn’t intended too and thus pkgsrc causes it. It seems to me that pkgsrc does install itself by default with a --prefix=/usr/local/ instead of --prefix=/usr/. If that is the truth, I wonder if installs all the packages into /usr/local/ as well.

Okay, granted, pkgsrc may have a huge database with over 6800 packages, but, quantity doesn’t always mean quality. A good example of that is to compare SlackBuilds.org versus linuxpackages.net, the latter having more packages but the quality of some of them are really really bad.

And when all is said and done, you have a package manager that gets into your way. The beauty of the pkgtools on slackware is, it doesn’t get into your way. It does the job and it does it well. I can to a certain point understand people wanting to use a certain tooling, but if you have to first break your system to actually use that tooling you really have to wonder what exactly it is you are doing.

[0] – Please note that the article is actually based on slackware-9.1. Which is quite different from slackware-11.0

[1] based on the fact that Patrick considers Slackware to be a full install and not counting the packages in extra/

[2] See rworkmans reply on linuxquestions for a good explanation

final note: Yes, I am highly biased :D

16 thoughts on “Why pkgsrc is bad.

  1. people are wieeeeeeeeerd. i wait with baited breath for someone to tell you why using this package source thing (and NetBSD) on top of Slack is a good idea….

  2. I use pkgsrc on Debian (and Solaris, Mac OS X, NetBSD) – I don’t need root there, I compile everything into $HOME, I’m happy.

    No idea who said you must nuke 92% of your OS for pkgsrc. :)

    – Hubert

  3. You should really read some more about pkgsrc, because clearly you don’t know what you are talking… ROFL.

    • I love it when linux folks talk about anything BSD related, especially ports, dports or pkgsrc. Really? You read one article and think it’s bad? I hope you don’t vote. It really seems to me that BSD folks seem to know more about Linux than the other way around, and really Unix principles in general. And I can say that because the system I’m currently on is running Linux. Pkgsrc may not be perfect but it’s extremely portable and sits on its own. You don’t need to nuke your system. Besides it looks like they’re slowly learning from FreeBSD’s ports/pkgng, which are far better than any of the million packaging formats and utilities available for Linuxes. Though, Linux is a Frankenstein. Never once have I experienced library hell on a BSD or Solaris machine… the number of times on Linux? Countless. If you want to write about what sucks, write about how Linux just has a kernel then every distro has an ls from here, a grep from there, backports from here and here… Kernel devs, after you’re done comparing your kernel code with the Kernel code of any BSD and take a note there, build a base system… it could start just like BSD did, after all BSD was a software distribution for commercial Unix before it was it’s own operating system. I see years go by and keep thinking that if Linux truly wants to compete with windows (which has also used large portions of BSD code) and OS X (oh! built on BSD)… they’ll fix some of these issues. Base system, base compiler, kernel, all should be one package and developed in tandem. Also, unify your ridiculous init systems and learn what /usr/local is for. /sbin != /usr/local/sbin/.

  4. Hubert, Anon,

    Clearly you both haven’t read the article about which I wrote my rant. Otherwise you would both understand where my 92 percentage came from. I have no intention to run pkgsrc on slackware. And I am sure there are better ways to get it running on slackware than in the mentioned article..

    As I mentioned, yes I am probably highly biased :)

  5. I have the impression that the cited web site wants an absolutely minimalistic surf station (thus the removal of Nearly Everything) and mainly uses pkgsrc because audit-packages security is neat.

    Like mentioned by others, pkgsrc usually lives happily in its own corral and doesn’t impact the OS it’s living on. It certainly doesn’t need a general makeover of the OS.

  6. I do admit that my article is more intended as a *rant*. Considering I might actually have a spare box soon, I might write something which will properly highlight how to get a decent default installation of pkgsrc working. (Without removing everything)

    Thanks stargazer :)

  7. By default, pkgsrc installs all packages to /usr/pkg (this, of course, could be changed), and lives friendly with all native packages. How this could break anything? You can “rm -r /usr/pkg /var/db/pkg”, and your system will be same as in previous.
    Also, I do not know what did you mean by kernel sources and breaked headers. I am using Slackware with manually compiled kernels for a quite long time, and hadn’t any problems.

  8. The article is written with the minimalist in mind. Meaning the person who intends on replacing 90% of what is installed by slackware with pkgsrc packages.

    What are the advantages of doing that? Simple, PV rolls out a distribution roughly once a year (actually, wasn’t it 2 years between 10.2 and 11?); by following the linked guide you can have more up-to-date packages than what you find on the cd.

    There are other means of doing this that are slackware specific; but the advantage of pkgsrc is that you have the same version of installed packages, and the same layout on multiple OSes (I use pkgsrc on Opensolaris and NetBSD as well as Slackware).

    Using pkgsrc I routinely build the applications I want (gnome, firefox, whatever) in NetBSD and when it has finished I tar up /usr/pkgsrc/distfiles (where the source files are kept) and archive it (along with pkgsrc-$DATE.tar.bz2) and I have them available to build under whatever other OSes I want to play with.

    If you’re not going to install packages on multiple OSes, and are primarily using slackware; you’re probably better off just using swaret or whatever and forgetting pkgsrc if it’s frustrating you.

    On a side note; I’ve used pkgsrc for two years now, and the last time I’ve compiled a Linux kernel was in 1999; so that part of the instructions always strikes me as a bit on the odd side.

  9. Yes, I can agree with that. Although the orginal author does not mention that. The way the article is written makes it look like this is the way it has to be installed. That in doing so you are actually breaking slackware (and especially the kernel-headers) it not acceptable to me. Especially as that article is quoted every so often as the definite source on how to use pkgsrc.

    As in regard to up-to-date packages. I keep a custom slacktree around in /usr/local/src/build/slack that contains all my self compiled packages. If I really need a new version (or want), I can always grab the slackbuild from Pats main source tree. I suppose that using pkgsrc just simplifies this a bit.

    I can see the advantage of having one source repo that is accessible and will work with a myriad of Operating Systems. Especially if you combine it with something like NFS or SSHFS mounts.

    And if you use slackware there is pkgtools(8). Swaret/slaptget are just horrible horrible bad to use. It’s like playing tennis with a hand grenade. Sure it might work for a while and it makes for a great story, but at some point it is going to make an unholy mess and wreck a lot of things. Almost daily we get people in ##slackware @ irc.freenode.net that come in and ask how to fix their new system because it was messed up. *shrugs* :)

  10. The problem isn’t pkgsrc or slackware – the problem is using the wrong distro for the goal at hand. He wanted a minimal system to build pkgsrc tools on – not an unreasonable thing. But slackware doesn’t (or didn’t – the article does say it’s outdated) have a minimal install. That’s not slackware – or at least not with the options he chose. He should start with a distro that gives him as close to the system he wants to start with as possible. Personally I use the *BSD’s, as they generally start with minimal and expect you to customize them, rather than trying to deliver a complete working desktop.

    • Mike, I totally agree. It’s among the same lines if I wanted to play with RPMs I use suse, fedora or centos or something similar.

      The right tool for the right job.

    • No this isn’t plain BS.However you seem to have utter and complete problems reading the article properly. As I stated the article is not against pkgsrc it self .. it is against the actual article that states you have to remove 90% or more of an original Slackware install to make pkgsrc work in the first place.

      Let me repeat that again: I have a problem where someone suggest removing 90% of a slackware installation to make something work.

      Got it? But then again. I guess I shouldn’t expect to much from people posting uninformed comments like this, who can’t be bother to read the article, the notes and the comments.

      c’est la vie.

      • The title of your artilce is misleading
        It must be something like: “You don’t need to remove slackware packages to use pkgsrc”.

        I think because of this you receive several complaints to the article.

  11. Found your post interesting and would like to see more comparisons of package tools available for various systems. I was running a variant of Slackware on my machine and now I’m running FreeBSD because of memory issues. I can automate the creation of a SlackBuild script fairly easily. I’ve yet to find a good way to automate the process to create port or pkgsrc related scripts. They all seem to need user intervention and iterative changing. I guess I’m doing a few things most users aren’t. I’m updating my system mainly be sneaker-net, so I’m not so worried about tools to download files or dependency issues (I know what applications I’m building). I’m using the same applications on multiple systems with different compilers (Windows with mingw and/or OpenWatcom, FreeBSD with GNU gcc, etc). I’m also creating a lot of the build scripts and patches myself. I’ve yet to find a repository that offers most of the applications I want to use. It seems much easier to run a pkgtool like system using a program such as spkg on these operating systems than to get pkgsrc running on the different operating systems. Would be interested if anyone has other opinions or knows of a better way to automate cross-platform build script creation and manage packages on various cross-platform systems easily. Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s