Replies: 1 comment 1 reply
-
Thanks for the in-depth info there! Do you know if packages use a common naming/versioning scheme? Like NEVR? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In an issue here it was proposed to add support for the BSD family of operating systems and @furlongm asked a couple of questions #457 (comment) there.
Historically the earliest means of package management in Open Source was Jordan Hubbard's introduction of what is known as the FreeBSD Ports Collection. It shipped with the first incarnation of the pkg_* tools (not too much later the Bogus Linux distribution was released with the PMS package manager that would more or less evolve into RPM). Both the ports tree concept and the package management tools spread to all the other BSD systems.
While they do have common ancestry they have diverged a lot. OpenBSD's ports tree works very differently from FreeBSD's. NetBSD's, which goes by the name Pkgsrc, is even portable across platforms (you can use it on multiple BSDs, on Linux, Solaris but also AIX, HP-UX and more). About 10 years ago FreeBSD replaced the aging pkg_* tools with a new tool called pkg(8) (anybody familiar with apt or yum will get along with it quickly). DragonFly BSD also adopted pkg(8) but the other BSDs stuck with pkg_* - which does not mean that they are compatible! At some point OpenBSD did a complete re-write in Perl. NetBSD's are still closest to the original tools but they supplemented it with the pkgin(1) frontend which is unique.
You can still build software from ports, but this is not very common anymore. FreeBSD recommends not to do it directly (people who need customized build options set are meant to use a ports builder application to roll their own package set). OpenBSD strongly recommends not to build from ports. But even if you do, the resulting software installation gets recorded in the package database. So from patchman's perspective you can completely ignore that there's such a thing as a ports tree: Just query the package manager about software installed on the system and it will happily tell you no matter if it was installed from pre-built packages or built from ports.
All the BSDs are also different from Linux in being complete operating systems and not distributions: There's no single "BSD kernel" and the projects just choose different packages that are installed by default. Each and every BSD project's kernel is a specific one in its own right. Packages built on NetBSD will not work on OpenBSD and vice-versa. The same is true for libc and basically the whole userland. Speaking of the latter: These systems are whole operating systems because they each have a so-called "base system", their own userland which is developed together. As a result there is a clear separation between OS and third-party software: A freshly installed BSD system does usually not come with even a single package installed!
While this also means that keeping the OS up to date requires other means than the package manager and that may sound weird from a Linux perspective, it's actually a great thing. On Linux the distro maintainers can never know exactly what wild combination of packages you may have installed which can make distribution upgrades go horribly sideways (we've all been there, right?). With a BSD system you know what the current system looks like and what the new one will look like. Packages generally don't interfere with the actual OS (this is not entirely true as for a workstation you may depend on e.g. a graphics driver from packages which provides a kernel module that will not be compatible after upgrading the OS, but on servers it's hard to break your system with an upgrade unless you deliberately do terrible things).
If anybody is interested in adding BSD support, I would recommend to pick one BSD first and go for that one. Usually FreeBSD is a good choice since that's the most popular one with the largest user base and by far the most often used one in commercial environments.
I will happily provide information on how the package versioning scheme works, how to query the package database, where to get repository information from, what the OS version string means and the like if it helps.
Beta Was this translation helpful? Give feedback.
All reactions