

OpenBSD ports are more than just a Makefile - fcambus
http://homing-on-code.blogspot.com/2015/04/ports-are-more-than-just-makefile.html

======
rubyfan
I had much experience with ports about 10 years ago building from source and
even maintaining and creating a few. I can say the community around ports and
specifically Marc Espie were great.

I also always found ports and OpenBSD to be explainable, non-surprising and
simple as opposed to much of what I saw with rpm and apt.

~~~
nextos
Ports work pretty well and without much hassle. In contrast, rpm and apt are
pretty complex. I've never felt I've understood them. If using Linux, I very
much prefer pacman.

However, all seem to be stuck in the past. I wonder why the ideas pioneered by
[http://www.gobolinux.org/](http://www.gobolinux.org/) are not more widely
implemented, leaving nix aside.

~~~
rubyfan
I was always a fan of contained packages as well. Apple generally does a nice
job with application packages.

------
SwellJoe
Edit: I was wrong about OpenBSD ports on several counts, it seems. OpenBSD
seems to have corrected several omissions in package management that I've seen
in the past; some of these changes seem to have come recently, in version 5.5.
I'm reading docs now to see which of these issues have been resolved.

Lest anyone be misled into believing ports is comparable to yum or apt...it is
not.

With ports it is not only possible, but likely, that you will end up with
upgrades to some software that can break other pieces of your system, because
the dependencies often do not account for things, like compile flags, which
can be changed by the user at install time. This leads to a very fragile
system a couple years down the road, after a bunch of upgrades and new
software installation has occurred. This isn't theoretical; I've seen it
happen more often than not in my very limited use of the ports system...it is
avoidable, but it is not obvious or well-documented how to avoid it, and adds
not insignificant costs to maintaining your systems.

With ports it is not possible to verify that the files installed by the port
match what was originally installed. This can be useful for security purposes
(i.e. has the ps command been tampered with?) or for troubleshooting purposes
(i.e. did someone install a program from a source tarball over the original
package, or did permissions/ownership change?). _Edit: I was wrong on this
one. pkg_check verifies package contents against checksums, which is
comparable to rpm -V or debsums._

With ports, it is not possible to reliably roll-back to a prior version in-
place (i.e. without uninstalling everything, and then reinstalling it).

With ports, it is likely you will, over time, end up with multiple versions of
some things (libraries, languages, etc.) installed. This is common on Linux,
as well, but the ability to determine what is built against which versions,
and to be able to keep up with whether, say, an insecure version can be
removed without breaking things on the system, is much weaker (non-existent,
as far as I can tell).

OpenBSD has many fine qualities and very smart people working on it, and I
don't think it's the dumbest idea ever to use it. But, ports is simply not a
sufficient answer to the package management problem. RPM/yum and dpkg/apt are
not perfect, but they are vastly superior to ports in every dimension. FreeBSD
now has pkgng which is very much a move in the right direction, and it would
be definite progress for OpenBSD to adopt it.

Note that providing binaries or not is not on my list of complaints about
ports, above. Somehow, in every conversation about ports failings as a package
manager, there will always be people talking about binaries, and how you can
totally install binaries with ports and so there's no reason to not like
ports. I find it annoyingly time-consuming to build everything from scratch,
but it's not a deal-breaker. Providing binary packages is not why apt and yum
are vastly superior to ports.

~~~
brynet
OpenBSD's ports tree is only distantly related to FreeBSD, and the package
system is a complete rewrite. Implying that it shares any of the same problems
without researching it is being quite disingenuous.

Users are only discouraged from building ports because binary packages have
been provided for all available port flavours, there is no opportunity for
users to customize ports or tweak compile flags without them venturing into
the realm of already unsupported tasks.

The ownership and permissions of files are tracked, and the package tools will
notice if files are missing or have been modified. Dependency tracking,
resolution, individual file check-summing and package signing are all
performed. And OpenBSD handles the versioning of shared libraries separately
for the whole system, even ports.

FreeBSD's pkgng was undoubtedly a good move for FreeBSD, but OpenBSD already
received it's very own next-generation package system a few years prior.

~~~
SwellJoe
_" Dependency tracking, resolution, individual file check-summing and package
signing are all performed."_

Can you link me to the documentation that covers this? I googled before making
my comment, because I have limited (and mostly old) experience with OpenBSD
ports, and wanted to be sure I wasn't making incorrect assertions. I couldn't
find anything about verifying packages.

Anyway, if what you say is true, and OpenBSD now has effective package
management, I'm going to spend some time with it, and possibly add support in
our installer for it. I was under the (seemingly) mistaken impression that it
would have the same faults as ports on FreeBSD.

~~~
brynet
Marc Espie is who developed the package tools, and has given talks about it.
Ted Unangst created signify, which is the basis for the package signing
capabilities.

You could also check the pkg_add(8), signify(1) and ports(7)/packages(7) man
pages.

[http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-
current/man1/...](http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-
current/man1/pkg_add.1)

[http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-
current/man1/...](http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-
current/man1/signify.1)

[http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-
current/man7/...](http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-
current/man7/packages.7)

[http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-
current/man7/...](http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-
current/man7/ports.7)

~~~
lcd047
Also relevant:

* packages vs. ports[0]

* porter's handbook[1]

[0]:
[http://www.openbsd.org/faq/faq15.html](http://www.openbsd.org/faq/faq15.html)

[1]:
[http://www.openbsd.org/faq/ports/index.html](http://www.openbsd.org/faq/ports/index.html)

