DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

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

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 2nd January 2009
boder boder is offline
New User
 
Join Date: Jan 2009
Posts: 1
Default official openbsd recommendation to install packages (not ports)?

i noticed in the packages and ports section of the openbsd faq, the team recommends NOT to compile packages from ports. they claim that the binaries have been tested more and that ports could cause problems, i was wondering if there is anything more to it, where do these problems come from. i found it interesting to read that recommendation given the enthusiasm about compiling from source from some projects (gentoo, for instance). what exactly is the difference between a binary compiled from source by ports vs binaries from pkg_add? it seems to me that during the compilation process a more customized profile is made for your machine and the packages on it and therefore that would make it stable, anyone know what's wrong with this? thanks.

Last edited by boder; 2nd January 2009 at 11:31 AM.
Reply With Quote
  #2   (View Single Post)  
Old 2nd January 2009
nihonto nihonto is offline
Fdisk Soldier
 
Join Date: May 2008
Posts: 65
Default

From the OpenBSD-FAQ:

Quote:
15.4.6 - What should I use: packages or ports?
In general, you are highly advised to use packages over building an application from ports. The OpenBSD ports team considers packages to be the goal of their porting work, not the ports themselves.

Building a complex application from source is not trivial. Not only must the application be compiled, but the tools used to build it must be built as well. Unfortunately, OpenBSD, the tools, and the application are all evolving, and often, getting all the pieces working together is a challenge. Once everything works, a revision in any of the pieces the next day could render it broken. Every six months, as a new release of OpenBSD is made, an effort is made to test the building of every port on every platform, but during the development cycle it is likely that some ports will break.

In addition to having all the pieces work together, there is just the matter of time and resources required to compile some applications from source. A common example is CVSup, a tool commonly used to track the OpenBSD source tree. To install CVSup on a moderately fast system with a good Internet connection may take only about ten seconds -- the time required to download and unpack a single 779kB package file. In contrast, building CVSup on the same machine from source is a huge task, requiring many tools and bootstrapping a compiler, taking almost half an hour on the same machine. Other applications, such as Mozilla or KDE may take hours and huge amounts of disk space and RAM/swap to build. Why go through this much time and effort, when the programs are already compiled and sitting on your CD-ROM or FTP mirror, waiting to be used?

Of course, there are a few good reasons to use ports over packages in some cases:

* Distribution rules prohibit OpenBSD from distributing a package.
* You wish to modify or debug the application or study its source code.
* You need a flavor of a port that is not built by the OpenBSD ports team.
* You wish to alter the directory layout (i.e. modifying PREFIX or SYSCONFDIR).

However, for most people and most applications, using packages is a much easier, and definitely the recommended way of adding applications to an OpenBSD system.
I highlighted some sentences or parts of sentences to point out central conclusions. Hope it helps!
Reply With Quote
  #3   (View Single Post)  
Old 2nd January 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

A package you install or a port you build will be identical. There is nothing in a compilation from a port that is "customized" for your particular computer, other than its basic hardware architecture.

Compiler flags may be set for particular architectures, in any particular ports' Makefile. But those settings are crafted by the port developer, not by a port builder. I've done that for ports I've developed. But that's to get those architectures working, not to "optimize" anything.

And if you like gcc optimizations, spend some time Googling gcc -O settings. My understanding is that they break more software than they help.
Reply With Quote
  #4   (View Single Post)  
Old 2nd January 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Some comment on poor gcc optimization on openbsd's misc@ mailing list:

http://marc.info/?l=openbsd-misc&m=119125437910643&w=2
http://marc.info/?l=openbsd-misc&m=117437275125452&w=2
Much of this thread: http://marc.info/?l=openbsd-misc&m=117173411005355&w=2
In that thread, I especially like this one, which links to a never-fixed-but-critical bug in -O2 code: http://marc.info/?l=openbsd-misc&m=117433731624250&w=2

http://marc.info/?l=openbsd-misc&m=114478628411129&w=2
http://marc.info/?l=openbsd-misc&m=114479053121834&w=2

And that's just a very small sampling, from recent times. The list is endless.
Reply With Quote
  #5   (View Single Post)  
Old 2nd January 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by boder View Post
what exactly is the difference between a binary compiled from source by ports vs binaries from pkg_add?
Nothing.
Quote:
it seems to me that during the compilation process a more customized profile is made for your machine and the packages on it and therefore that would make it stable...
Perhaps in the Gentoo world, but this is not true for OpenBSD.
Reply With Quote
  #6   (View Single Post)  
Old 3rd January 2009
lvlamb's Avatar
lvlamb lvlamb is offline
Real Name: Louis V. Lambrecht
Spam Deminer
 
Join Date: May 2008
Location: .be
Posts: 221
Default

OpenBSD apps *always* are installed from packages.
When you make install, the package is build first, then the app is installed from the package.
You would not use ports, unless your paper format is A4, not letter,
or if you want the terminal into geany,
or prevent fxtv to install mplex and block mplayer deps,
or can't wait April to use PostgreSQL 8.3
__________________
da more I know I know I know nuttin'
Reply With Quote
  #7   (View Single Post)  
Old 3rd January 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by lvlamb View Post
OpenBSD apps *always* are installed from packages.
Not to belabor discussion, but lvlamb raises a point that most tend to forget; building from ports simply creates the same packages which can be found on the various mirrors. The final step in building a port simply installs whatever package(s) were generated. This is a primary reason for advocating that existing packages be installed instead of recreating them anew.
Quote:
Originally Posted by boder
it seems to me that during the compilation process a more customized profile is made for your machine and the packages on it and therefore that would make it stable, anyone know what's wrong with this?
What you are seeing is a cultural difference between projects. If I can (over)-generalize the Gentoo philosophy, it is to expose as many knobs as possible such that users have as many choices as they might want to in constructing their systems. This mindset isn't shared by the OpenBSD project for a number of reasons:
  • As part of the catchphrase used by the project (free, functional, & secure...), effort is put into verifying that code paths are legitimate. By exposing lots of knobs, an exponential number of paths would have to be verified. The OpenBSD project is small, & putting time into such work is not deemed a priority, so exposing lots of variations in code paths isn't deemed important either.
  • Not that this is meant to imply that customization cannot be done, as makefiles can be individually modified, but the project itself doesn't have the bandwidth to deal with every possible variation imaginable. People are free to make whatever changes they wish, but the project's responsibility ends at the point of customization.
  • This is also not meant to imply that the OpenBSD project is diametrically opposed to customization. There are times where it is necessary for grounded reasons. The two projects are simply different. They have different goals, so the line is drawn at different locations for cultural reasons.
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
packages vs ports zelut FreeBSD Ports and Packages 17 28th October 2009 08:19 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 02:15 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