Hacker News new | past | comments | ask | show | jobs | submit login

They port code from one codebase to the other, and often it's the same dev doing the work for more than one OS, but there isn't any principled coordination of effort to keep a unitary codebase for anything.



A unified package system for BSD family can reduce some friction.


The three of them already use basically the same package system. The package management suite (pkg_add, pkg_info, etc.) and the ports collections all originated from work Jordan Hubbard did for FreeBSD in 1994. OpenBSD re-wrote all the tools, but they are functionally the same. NetBSD (pkgsrc, really) added a frontend (pkgin) to offer a more "modern", apt-like experience. FreeBSD added a similar frontend (pkg) in version 10.

As far as I know, there is no binary compatibility between the three of them, so sharing package repositories would be a no-go, but if you know the tools on one system, that knowledge is transferable to the others, for the most part.

If you want to use the same exact ports collection on each of them, NetBSD's pkgsrc is quite portable, and will work not only on the other BSDs, but on Linux, Mac OS X, Minix, Solaris, and a few others as well. I use pkgsrc to manage packages on my Mac Mini -- Joyent provides binaries for most things, and the other stuff is usually just a `bmake` away.


It is rather more rocky than that. (pkgng arrived in FreeBSD 9.1, by the way. Not 10.)

* pkgng has some stark differences to OpenBSD pkg, most notably the notion of Debian-like "post-install", "pre-remove", et al. scripts.

* The systems compress packages with different tools. OpenBSD pkg uses gzip. FreeBSD pkg uses xz.

* OpenBSD has a notion of "package flavours" that does not really have an analogue in pkgng.

* The introduction of pkgng was distinctly problematic. A lot radically changed in early versions, most critically the configuration file format. It used to be YAML. It's now UCL.

* The documentation is misleading to the point of being downright wrong. The FreeBSD wiki still insists (https://wiki.freebsd.org/pkgng#Metadata) that the configuraton file is YAML. The manual page for pkg-create gives examples such as "name pkg-name" and "file sha256-hash path", which is syntactically incorrect for either language and the wrong keyword to boot. Following the manual does not produce a working configuration file. Ironically, the wiki provides better information on this, even though it provides that information in the wrong configuration language.

* The documentation is misleading to the point of being downright wrong. The FreeBSD manual page for pkg-repository claims that repositories contain files named packagesite.txz, repo.txz, and filesite.txz. In fact, the pkg repo tool generates files named packagesite.txz, meta.txz, and digests.txz .

* OpenBSD pkg and FreeBSD pkg don't really have a common notion of "package repositories". The ways to organize pulling packages from remote storage locations are quite different, even down to the fundamental file fetching tools. FreeBSD has fetch. OpenBSD has ftp.

All that having been said: the idea that a unified packaging system necessitates a unified codebase is disproven by Ubuntu and Debian. (An example is OpenRC: present on Debian 8 at https://packages.debian.org/source/jessie/openrc, up to version 0.21 in what is to be Debian 9, and gone from Ubuntu 16 at http://packages.ubuntu.com/xenial/openrc) Conversely, one can have a unified codebase even with multiple packaging systems.


This is all true, but I was mostly comparing the pkg_* tools (pkg_add, pkg_info, etc.) that were used before the arrival of (NetBSD's) pkgin or (FreeBSD's) pkgng (does OpenBSD have something similar? If so, I haven't used it at this point).


You used the wrong tense. (-:

It should have read "The three of them some years ago used basically the same package system." and "they were functionally the same".

OpenBSD 5.9 still has the old packaging toolset.


Some, but things that would be package-compatible are likely to be source-compatible anyway and shared among Linux, BSD, and Illumos pretty well with existing mechanisms. It's the base operating system that is hit-and-miss with code sharing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: