|
FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD. |
|
Thread Tools | Display Modes |
|
|||
packages vs ports
I'm new to FreeBSD but I'm enjoying it so far. I come from a Linux background, and generally have preferred binary package management tools (apt-get, yum, etc). I've also tried source-based distributions like Gentoo, but haven't seen the benefit of the time requirements of compiling.
Now, as I understand it, FreeBSD packages (via pkg_add) are pre-compiled whereas the ports are to-be-compiled? Is there a benefit one from another? As I mentioned I generally prefer the quick-installation of a binary package, but if it is worth the time to compile (as the Gentoo people claim) then I'd be willing to give that a try. thanks in advance |
|
|||
Yeap, I prefer ports too - gives you more control over the build process
|
|
||||
I tend to use ports on servers (typically way less than 100 ports, sometimes as little as 20), and resort to packages on X installs (desktops, laptops). Building X and its ilk from ports is not much fun, especially when you run somewhere from 500 - 700 ports. On a ports-based system I run portupgrade every day, on a package-based system (portupgrade -PP) about once a week or even less, since packages are updated much less frequently than ports.
|
|
||||
One thing to remember: packages are built using the ports tree. See the package target in the ports(8) man page.
This means, you can use a single system with the ports tree to build packages that can be installed on other systems. This really comes in handy when you have a bunch of similar systems (build once, install many times), or when you have a fast system and a slow system (build on the fast one, install on the second one). In effect, you can have the best of both worlds. |
|
||||
I use packages when I install KDE and Xorg as I run FreeBSD on an older machine, compiling KDE takes days on a Plll 667. I use ports for smaller programs.
Is there a danger if I mix ports and binary packages?
__________________
hitest |
|
||||
Generally, no. My opinion is that it is best to stick with either one or the other with a few exceptions (like mainly using ports but using packages for very large apps like OpenOffice.org). There can be dependency problems if your packages are mostly out of sync with your ports tree and you try to build a new port. This can mainly happen if there are major updates in the ports tree like gettext.
Personally, I use ports for everything. The thing that killed the deal for me with packages was one time I tried to install an OpenOffice.org package and it killed my X.org installation. This was at the time XFree86 was still in the ports tree. The OpenOffice.org package I tried to install was built on a system with XFree86 and when I tried to install it on my system with X.org, it started pulling in XFree86 packages and overwrote my X.org install. |
|
||||
There is no difference if you install ports or packages, or mix them....
The only defference is that packages will require less dependencies, as they don't have to be build from sources.... As an example i can mention deprecated cvsup..... to build it from sources you need ruby (if i remember correct), to install package, you don't need it Also as mentioned above, ports will be up to date, wile packages, won't be that current It won't affect your system, if you mix methods. When port fails for me to compile i just install package. |
|
||||
Quote:
|
|
|||
Yep, as said above, stick with one or the other.
It's much cleaner this way : ) |
|
|||
It won't affect your system, if you mix methods.
|
|
|||
I use an order of priority, personally. I usually start with ports. Failing that, package install, and failing that, a PBI packet.
In my limited experience, ports can be hard to work with on a new install. I've tried installing things from the port tree, but got compilation errors all over the place. Installing a package (which includes PC-BSD's clumsy PBI files), however, has worked fine. And oddly enough, last night when I tried a previously failed port, it worked. I'm guessing that various dependencies came into the system via the PBI and package files. This happened on my previous system as well; ports tends to work better when you have a solid file "infrastructure" on hand. |
|
||||
It's funny how people's experiences can be so different. For me, ports are much more reliable than packages and it doesn't seem to me like packages are supported as well as ports. Most compilation errors occur when your ports collection is not updated or you are mixing old and newer ports. I rarely have compilation errors now where as in the past when I was new to BSD, I had quite a few more. With OpenBSD, I have the opposite experience where packages seem to work better for me. I guess it's just how we approach the setup.
-Tim |
|
|||
What do you mean? Packages are built *from ports* using a default, "works-on-most-systems" configuration, a bit like the GENERIC kernel.
I guess they're both as reliable. Quote:
Of course, even that could be totally unacceptable on secured production systems that need up-to-date, fully patched, software. Ports would be more appropriate in that case. Quote:
So to fix this, you'd just do a pkg_delete -a, say, every 6 months and reinstall everything from scratch. With the port system, you basically do exactly the same thing. You fetch the source for the port and all its build/run-time dependencies again and rebuild the whole hierarchy.
__________________
May the source be with you! |
|
||||
If used as intended, either ports and packages will usually be fine
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
||||
I must have been doing something wrong with packages then. I always had errors installing packages, so I started to use ports and never looked back. I have to confess I haven't tried any packages on FBSD for some time.
On OpenBSD I had exactly the opposite experience where I could never seem to get a clean compile so I use packages exclusively on OBSD. At this point I'm happy with both and more proficient with BSD than I was when I was a n00b. I think I may try packages on the next deployment I do on FBSD. I know the end result is the same but I once compiled Plesk on FBSD and you can't imagine how long that took. I would have loved it if they had a package at the time but the port was the only way. Good information guys, you got me thinking outside my normal tunnel vision. -Tim |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
official openbsd recommendation to install packages (not ports)? | boder | OpenBSD Packages and Ports | 6 | 3rd January 2009 05:12 AM |
Packages vs. Ports | guitarscn | OpenBSD Packages and Ports | 3 | 1st October 2008 04:43 AM |
Upgrading and rebuilding ALL packages/ports | chill | FreeBSD Ports and Packages | 8 | 16th June 2008 04:55 AM |
openvpn 2.1_rc7 from ports (not packages) | s2scott | OpenBSD Packages and Ports | 14 | 23rd May 2008 02:30 AM |
FAQ: FreeBSD Ports and Packages | Carpetsmoker | FreeBSD Ports and Packages | 0 | 1st May 2008 03:38 PM |