Ports or packages?

I use ports on my server and I use packages and ports mixed on desktop PCs. On my old 500 MHz laptop I use packages only.
 
I am a desktop user, and I love FreeBSD. I use packages almost exclusively. As someone mentioned earlier, I've tried compiling OpenOffice and it takes forever. Same goes for Firefox. Don't even think about Java.

As far as picking the compile options is concerned, when was the last time you picked compile options when you installed a third-party application on Windows or the Mac? Do you really compile all of your applications for Linux machines when a package is available?

I've found that it takes very little time for an updated Firefox or Thunderbird package to become available for FreeBSD.

As far as being up to date is concerned, many non-security updates are gratuitous eye candy; updating them often leads to shared-library hell, and I end up wasting hours because of dependencies. After using Firefox 3 on FreeBSD, I decided that I liked Firefox 2 more, and downgraded.

I want a stable machine I can work on. I work full time, and hope to continue doing so, assuming this economy will allow it. I much prefer spending time helping my teenage sons learn to do just a little bit more every day with OpenOffice.org Writer and GNU Cash. They know they don't need to throw away hundreds of dollars on software when good, high-quality free alternatives are available.

I'm using this economic crisis as an opportunity to help my sons with their finances. If I do it right, they won't make the stupid mistakes that put this economy in the toilet. They got an eye opener when they graphed how large and fast debt grows at 25% compounded interest. When we sat down and made budgets for their allowances, they couldn't believe how much money they got in a year, and how much more they could have done with it if only they'd had a budget sooner. Among the other things we can do with FreeBSD, let's not forget to run the numbers.

This is a tech crowd, but unfortunately most of the world is not. Innumeracy is rampant, along with the attendant consequences.

By using packages, I have time to help them explore various websites for news and information about this wild, whacky, and marvelous world in which we live.

Given the choice between spending an hour tweaking a port to install and finding out what's happening on this forum, I'll spend the time checking out this forum, thank you. These are historic and interesting times that we're living in, and there is a lot of work to be done. Let us not squander the power that FreeBSD and other technologies give us.

Time is precious, and life is much too short. Long live packages!
 
ajh said:
As far as picking the compile options is concerned, when was the last time you picked compile options when you installed a third-party application on Windows or the Mac? Do you really compile all of your applications for Linux machines when a package is available?

I think in this thread compile options are used for 2 distinct things:
  1. Optimizations, that make software arbitrarily run faster
  2. Options to packages, removing or adding features

The latter, is the most used reason to use ports or compile your own packages.
 
Mel_Flynn said:
I think in this thread compile options are used for 2 distinct things:
  1. Optimizations, that make software arbitrarily run faster
  2. Options to packages, removing or adding features

The latter, is the most used reason to use ports or compile your own packages.

I trust that you use ports for the latter reason, but I have the impression that many people do so indiscriminately, not in order to customize the application, even when an equivalent package that will lead to an identical installation exists. They seem to think that installing from a package is inferior. I think your reasons for installing from ports is legitimate when the need arises, but there were frequent mentions in this thread of ports being preferable because they are allegedly more up-to-date. But that ain't always so: not everything in ports is the latest version of a particular piece of software.

I don't care to be on the bleeding edge, even though it may be more up-to-date. Up-to-date does not necessarily mean better, unless security issues or critical bugs exist that cannot wait until a package -- or port -- is available. Then I will go to the source and compile the application myself, whether or not a FreeBSD port or package exists.

(When I go to http://www.freebsd.org/ports to search for the odd application, I always grab the package if one exists. It is my understanding that using pkg_add to install that package is identical to running make && make install from an up-to-date ports tree. If so, how can installing from the identical port used to create the corresponding package be preferable in the absence of customization? It seems like wasted time to me.)

I now run RELEASE, recompiling the kernel only in response to security advisories. As a user, my most frequently used applications are plain-vanilla Firefox, Thunderbird, and OpenOffice.org. My impression of these applications is that they are stable, mature, and nontrivial projects. I assume that the default package install options are time-tested to be the "best" for the overwhelming majority of users on a platform-by-platform basis.

My experience with installing nontrivial applications from ports is that doing so at the very least takes significantly more time than installing from packages, and often causes more problems than I want to be bothered with. About the worst experiences involved installing ports that stomp on shared libraries -- by changing their versions, deleting them, or some other alchemy -- causing a cascade of failures in applications that were working just fine before make install.

When installing with packages, even when dependencies need to be satisfied, I can generally fetch the dependency package, install it and be on my merry way.

Let's not forget why compiling third-party applications became so commonplace: *nix implementations differed in so many respects -- manufacturer, machine, compiler, word size, peripherals, etc. -- that it was impractical to ship binaries even when the user and manufacturer would have preferred to do so.

As far as configuration options are concerned, shouldn't a well designed application provide utilities, configuration files, etc.? Consider FreeBSD itself: we use /boot/loader.conf, /etc/sysctl.conf, /etc/rc.conf, and so on to configure the system. We also use sysctl to customize a running system.

As a desktop user I value stability and my time above all. Imagine what my attitude is about infrastructure servers!
 
You're skipping over the other reason compiling applications is still popular, though: Many things have optional support for a mess of features that depend on external libraries (a good case in point is mplayer). You don't want to force people to install every single one, so the package has a moderate set of things enabled. If you want e.g. esound support (which I used to forward things over the network not too long ago), you just have to build it yourself.

As for problems, well - I have a very current ports, in order to get things like KDE 4. The available packages will usually be out of sync by a few minor versions, and that's not completely unproblematic either.
 
ajh said:
I trust that you use ports for the latter reason, but I have the impression that many people do so indiscriminately, not in order to customize the application, even when an equivalent package that will lead to an identical installation exists.
Yeah, I don't share your view that most FreeBSD users are to quote House M.D "idiots", but think about what they need and don't need. Online help forums are not a good representation of the average FreeBSD user.


Then I will go to the source and compile the application myself, whether or not a FreeBSD port or package exists.
That's the easiest way to screw up /usr/local and /var/db/pkg.

It is my understanding that using pkg_add to install that package is identical to running make && make install from an up-to-date ports tree.
Wrong.
It is identical to make -DUSE_PACKAGE_DEPENDS -DPACKAGE_BUILDING -DBATCH clean install

If so, how can installing from the identical port used to create the corresponding package be preferable in the absence of customization? It seems like wasted time to me.)
The PACKAGE_BUILDING options are not always identical to the defaults. One is presented with a config dialog(1) for many ports, that one can use to set/unset options, normally not shown in a forum post.
Additionally, I have various variables set in /etc/make.conf, most notably, WITHOUT_NLS=yes, which saves me a bundle of ports depending on gettext. This also doesn't show in 'make clean install', yet changes the result.

I now run RELEASE, recompiling the kernel only in response to security advisories. As a user, my most frequently used applications are plain-vanilla Firefox, Thunderbird, and OpenOffice.org. My impression of these applications is that they are stable, mature, and nontrivial projects. I assume that the default package install options are time-tested to be the "best" for the overwhelming majority of users on a platform-by-platform basis.
And yet, when I still used open-office (I now use Koffice, cause it's just as good and much faster), I compiled my own on a buildserver, cause the package used a threaded perl, that I couldn't use and I didn't want gnome-vfs and did want KDE support.
My KDE uses kdelibs-nocups, so the meta port from FreeBSD is unusable for me. My php5-gd has WITHOUT_X11 set, cause I don't need xorg on webservers, just so php can read an ancient bitmap format, that isn't ever used in webpages.
And so on...

My experience with installing nontrivial applications from ports is that doing so at the very least takes significantly more time than installing from packages, and often causes more problems than I want to be bothered with. About the worst experiences involved installing ports that stomp on shared libraries -- by changing their versions, deleting them, or some other alchemy -- causing a cascade of failures in applications that were working just fine before make install.
Ignorance can only be cured by education. This is what various tools in ports-mgmt/ handle for you and why the /usr/local/lib/compat/pkg directory has been added to ldconfig_paths in /etc/defaults/rc.conf.
Secondly, it's no different when using pkg_add. Upgrading a major version of gettext, through pkg_delete/pkg_add, will screw your installation in the exact same way as pkg_delete/make clean install does.

As far as configuration options are concerned, shouldn't a well designed application provide utilities, configuration files, etc.? Consider FreeBSD itself: we use /boot/loader.conf, /etc/sysctl.conf, /etc/rc.conf, and so on to configure the system. We also use sysctl to customize a running system.
I don't see the relevance of this. Port OPTIONS add/remove features and dependencies, as in, if "OFF", then the feature is not present on your harddisk, ergo you cannot enable it afterwards, similarly, you can only use it if it's "ON". And no - the default is not everything "ON".
 
  • Thanks
Reactions: ajh
Mel_Flynn, thank you for explaining the best reasons for using ports. My view may have been overly simplistic in what I thought was the simplest scenario concerning ports vs. packages.

This is a nuanced, hence subtly complex, topic. This is made all the more complicated when trying to keep systems up to date without breaking anything. I am going to look more deeply at the ports process.

In a plain-vanilla RELEASE environment, is my preference for using packages obtained solely from a FreeBSD ftp site reasonable?

In your experience, are the default options in packages reasonable in my kind of environment?
 
marius said:
I've used ports on one machine, packages on another one, and I've also tried mixing them.

Packages are not very up to date. This means that you don't have the latest version of the program, which in it self is not that important, but what is important is the security. Many of the programs I install using packages have already security holes in them. If the programs don't have any holes when I install them, they will sooner or later end up with one or two, and waiting for someone to update that package can take ages. I always have to solve this problem by replacing the package with a port, since they are updated quite fast.

If I don't update the server to the latest version all the time, pkg_add will start having problems finding some of the packages (this can probably be fixed by setting the PACKAGESITE variable). It also seems like many of the mirror serves out there are not really mirrors. They don't have the same packages as some of the other servers.

Ports are always up to date and are updated as soon as a security hole has been found. If I only use ports I rarely see any trouble with my applications or updates I do. If I start mixing, or use packages only I do believe I get more errors and problems than if I had stayed with ports only.

I think its important for new users to know that ports aren't *always* 'up-to-date'. It's a little dangerous to pretend ports solves your security issues regarding software installation and updating - not always the case. You forget the ports rely on maintainers and they are human with finite time :)
 
liamjfoy said:
I think its important for new users to know that ports aren't *always* 'up-to-date'. It's a little dangerous to pretend ports solves your security issues regarding software installation and updating - not always the case. You forget the ports rely on maintainers and they are human with finite time :)

You are absolutely right. I should have been more clear when talking about ports always being up to date. Ports are not always up to date and free for security issues, but compared to packages, they are maintained a lot faster, and therefore should be more up to date.

How fast ports are updated will of course depend on the FreeBSD port maintainers.

Sorry, my bad :)
 
marius said:
You are absolutely right. I should have been more clear when talking about ports always being up to date. Ports are not always up to date and free for security issues, but compared to packages, they are maintained a lot faster, and therefore should be more up to date.

How fast ports are updated will of course depend on the FreeBSD port maintainers.

Sorry, my bad :)

Agreed :)
 
Caliante said:
I've read somewhere that noobs should use packages whenever possible; I stick by that rule :e:e:e

Can be a serious pain in the backside, even with stable packages. Apart from that, sometimes you have to use ports for certain functionalities or restricted ports. I wouldn't mix them up, can be okay most of the time, but sometimes it can break your whole installation. Try it ;-)
 
I use ports most of the time. They are most up-to-date and customizable. I only use packages for very large apps like OpenOffice.

Mixing is possible, it may work, but I had problems with it - that's why I stick to the ports.
 
Back
Top