Whichever BSD you use, the basics of package management are similar. Each member of the BSD family has a slightly different approach in this area, but all share common themes, as David Chisnall discusses in this article.
Whichever BSD you use, the basics of package management are similar. Each member of the BSD family has a slightly different approach in this area, but all share common themes, as David Chisnall discusses in this article.
It does not really cover anything that cannot be found in the manual or even the FAQ. This “article” just doesn’t enough useful information to be named an article. Not for new users, not for advanced users.
Regardless of the above, I’ve always liked pkgsrc over the FreeBSD and OpenBSD ports and packages. It’s much more consistent in compile time configuration directives (use flags, if you like). Yeah, pkgsrc supports use flags. They just don’t call it that way, or hype them as much as Gentoo does. See chap 5.4: http://www.netbsd.org/Documentation/pkgsrc/configuring.html
Not that there’s anything wrong with FreeBSD ports. They’re just not as elegant and simple as pkgsrc. And yes that was subjective. It does have more (working) ports, though.
Btw, with consistency I mean this, for example: why doesn’t the mplayer port in FreeBSD not adhere to the /var/db/ports options framework? If I want to compile it without X support, it doesn’t ask me that the first time with a nice curses interface and remembers my choices in /var/db/ports/$pkg, like it does with most ports. No. Instead I have to declare make with WITHOUT_X11=true or something. Portupgrade doesn’t know about these settings, so doing a portupgrade on mplayer will compile and install mplayer with default config directives. If you implement a make option framework, please make sure all packages are aware of it. Imagine that a certain package in portage doesn’t use USE flags. The entire community would probably immediately fall into a shock or something
Edited 2006-05-26 22:07
What is pkg_version (FreeBSD) and out-of-date (OpenBSD) alternative in pkgsrc?
The mplayer port doesn’t use the options framework simply because the port maintainer doesn’t want to. It really is as simple as that.
You wrote: “Portupgrade doesn’t know about these settings, so doing a portupgrade on mplayer will compile and install mplayer with default config directives.”
Have you ever heard about /usr/local/etc/pkgtools.conf ?
You can put the flags here and they will be honoured by both portinstall and portupgrade.
Edited 2006-05-26 23:07
You have to configure programs properly while installing first time, not after. Portupgrade is automating tool, so you don’t have to worry about configuration anymore… If some program need reconfiguration then run: “make configure” in program port directory.
If you are total n00b, then use PC-BSD .PBI installer. No registry, no USE flags(sorry gentoo zealots), no library hell, no tears- just works(tm).
I’m sorry, I made a mistake by typing “make configure”- right one is “make config”.
As BSDs put a lot of emphasis on security, I think thay should consider official GPG signing / checking of their packages / ports too. Like what SGML does: http://wiki.sourcemage.org/Spell_GPG_Checking . Lots of other Linux distributions use GPG checks with package management too.
More information:
Package and distribution security
http://www.edos-project.org/xwiki/bin/Main/SecurityTopic
I use FreeBSD, but I prefer pkgsrc, bacause the great flexibility and portability of the framework (you can use it in solaris and linux), specially if you administrate a heterogeneous unix network, however the all three must improve the way they apply security updates (in this case I consider debian apt-get better).
Edited 2006-05-27 10:43
pkgsrc supports detached signatures. See the “-s” flag for “pkg_add”.
However, one thing that is mentioned in the article that is not (entirely) true is the claim that you can build packages from any supported platform for any other supported platform (ie cross-compiling). While there is some support to cross-compile some packages for some platforms, it is not currently possible to, say, compile a package under i386 for sgimips (or even across operating systems).
Browser: Links (2.1pre18; NetBSD 3.99.16 i386; 111×40)
Portupgrade doesn’t know about these settings, so doing a portupgrade on mplayer will compile and install mplayer with default config directives.
You need to define your make flags in /usr/local/etc/pkgtools.conf like this for portupgrade to use them:
MAKE_ARGS = {
‘multimedia/mplayer’ => [
‘WITH_OPTIMIZED_CFLAGS=yes’,
‘WITHOUT_RUNTIME_CPUDETECTION=yes’,
‘WITH_DVD=yes’,
‘WITH_LIBDVDREAD=yes’,
‘WITH_GTK2=yes’,
‘WITHOUT_IPV6=yes’,
],
}
i like to use FreeBSD’s sysintall menu to install packages. All the packages are neatly organized in different categoties and it gives a brief summany about the packages.
It mentions using “make && make install” to compile and install a port. Doing just “make install” will be quite sufficient to do both tasks.
Also it mentions using cvsup to update the port-tree, that is no longer considered the best way to grab/update the ports-tree for 6+
“portsnap fetch && portsnap update” is the better way and is magnitudes faster and friendlier on your bandwidth use
While I generally prefer NetBSD over FreeBSD since it supports more of my hardware, I prefer FreeBSD when the time comes to update packages.
In FreeBSD, portupgrade worked all the time for me. In NetBSD, the alternative I know is pkg_chk, and this one fails pretty often for me, and uninstall packages before compiling the newer ones, and then compiling sometimes gets b0rked, so you end up with lots of deleted packaged..
In NetBSD to update packages I’ve been using pkg_chk -un (n to only list what it would do), and then cd in each of the updated packages in pkgsrc, and make replace clean.
I know there has to be a better way, but I haven’t found it yet..
Edited 2006-05-29 20:24