DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Ports and Packages

FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3rd October 2008
zelut zelut is offline
Port Guard
 
Join Date: Oct 2008
Posts: 11
Question 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
Reply With Quote
  #2   (View Single Post)  
Old 3rd October 2008
harisman's Avatar
harisman harisman is offline
Fdisk Soldier
 
Join Date: May 2008
Location: Hellas (Greece)
Posts: 66
Default

Both installation ways have pros and cons:

Packages Pros:
- You save the total compilation time of the actual program and their depended ones.
- Packages are consisted and work very well.

Packages Cons:
- You accept the default compile options and some times you miss desired features of the program.
- Unneeded depended applications will be installed as well.
- The packages have older versions than those of ports.

Ports Pros:
- You can configure the program's build options and you can build it optimized for your cpu types.
- Unneeded depended programs may be avoided.
- The ports system offers up to date software.

Ports Cons:
- Compilation some times takes a lot of time to complete, even on a fast machine.
- Building process might be stopped due to some compilation errors or missing source files on the main program or the depended ones.

Despite the system allows you to mix both ports and packages programs, I suggest you to pick one way and keep using it exclusively.

I personally prefer the ports system because I have a fast a machine and I want to have control of the building and installation process.

It's up to you to decide which one fits you.

Last edited by harisman; 3rd October 2008 at 01:47 PM.
Reply With Quote
  #3   (View Single Post)  
Old 3rd October 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

There are more ports then packages as well

I prefer ports
Reply With Quote
  #4   (View Single Post)  
Old 3rd October 2008
DNAeon DNAeon is offline
Shell Scout
 
Join Date: Sep 2008
Location: Bulgaria
Posts: 138
Default

Yeap, I prefer ports too - gives you more control over the build process
Reply With Quote
  #5   (View Single Post)  
Old 3rd October 2008
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

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.
Reply With Quote
  #6   (View Single Post)  
Old 4th October 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

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.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #7   (View Single Post)  
Old 5th October 2008
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 373
Default

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
Reply With Quote
  #8   (View Single Post)  
Old 5th October 2008
BSDKaffee's Avatar
BSDKaffee BSDKaffee is offline
Real Name: Jason Hale
Coffee Addict
 
Join Date: May 2008
Location: Wintersville, Ohio
Posts: 212
Default

Quote:
Originally Posted by hitest View Post
Is there a danger if I mix ports and binary packages?
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.
Reply With Quote
  #9   (View Single Post)  
Old 5th October 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

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.
Reply With Quote
Old 5th October 2008
BSDKaffee's Avatar
BSDKaffee BSDKaffee is offline
Real Name: Jason Hale
Coffee Addict
 
Join Date: May 2008
Location: Wintersville, Ohio
Posts: 212
Default

Quote:
Originally Posted by killasmurf86 View Post
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
Packages most likely require less or no build dependencies, but the amount of runtime dependencies are not going to change except for some non-default options in ports. Most ports only require a few small build tools which if kept installed are very low maintenance (gmake, autotools, cmake, etc.). cvsup is a rare exception that required ezm3 to build it because it was written in Modula-3. But since cvsup hardly ever got updated, it wasn't much of an issue anyways.
Reply With Quote
Old 5th October 2008
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 373
Default

Hello BSDKaffee and killasmurf86,

Thank you for the information, it is very-much appreciated. I'm a long-time linux user, but, a FreeBSD novice. I'm learning:-)
__________________
hitest
Reply With Quote
Old 8th September 2009
Naikon Naikon is offline
New User
 
Join Date: Sep 2009
Location: Rep of Ireland
Posts: 6
Default

Yep, as said above, stick with one or the other.
It's much cleaner this way : )
Reply With Quote
Old 5th October 2009
pegrafla pegrafla is offline
New User
 
Join Date: Oct 2009
Posts: 1
Default

It won't affect your system, if you mix methods.
Reply With Quote
Old 20th October 2009
RJPugh RJPugh is offline
Port Guard
 
Join Date: Jun 2008
Location: Culpeper, VA
Posts: 45
Default

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.
Reply With Quote
Old 23rd October 2009
windependence's Avatar
windependence windependence is offline
Real Name: Tim
Shell Scout
 
Join Date: May 2008
Location: Phoenix, Arizona
Posts: 116
Default

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
__________________
www.windependence.org
Get your Windependence today!
Reply With Quote
Old 23rd October 2009
Beastie Beastie is offline
Daemonology student
 
Join Date: Jan 2009
Location: /dev/earth0
Posts: 335
Default

Quote:
Originally Posted by windependence View Post
ports are much more reliable than packages
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:
Originally Posted by windependence View Post
and it doesn't seem to me like packages are supported as well as ports
Ports are maintained and packages are routinely built from them. The only difference is that it takes some time for packages to be available. But if you use a STABLE package repository, you'd have to wait around 2 weeks at most.
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:
Originally Posted by windependence View Post
Most compilation errors occur when your ports collection is not updated or you are mixing old and newer ports.
It's exactly the same with packages and their dependencies. But instead of build-time errors, you have run-time errors: random crashes, inability to start, error messages on ttys, etc.
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!
Reply With Quote
Old 23rd October 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

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''.
Reply With Quote
Old 28th October 2009
windependence's Avatar
windependence windependence is offline
Real Name: Tim
Shell Scout
 
Join Date: May 2008
Location: Phoenix, Arizona
Posts: 116
Default

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
__________________
www.windependence.org
Get your Windependence today!
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 03:36 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick