security patch vs. binary upgrade

Polytropon freebsd at edvax.de
Sun Jun 28 14:39:44 UTC 2015


On Sun, 28 Jun 2015 16:23:47 +0200, Lev wrote:
> Take the situation that I upgrade my base system for the next major release.
> What is going to happen with all the other ports? Must I reinstall literally
> everything? This means I must recompile all the source ports, and reinstall
> all the binary packages?

No. Basically you can install the backwards compatibility
port(s), for example compat9x-amd64 or compat8x-i386),
depending on what version you come from. In this case,
installed ports can be kept using. But pay attention:
Adding new software to this construct may cause major
problems (library mismatches are the typical ones).

It's recommended to reinstall your ports when you change
the FreeBSD major version (8 -> 9, 9 -> 10, 10 -> 11).
You can do this with pkg if you want to use the precompiled
binary packages, or the classic ports collection (with
tools like portmaster or simple "make install"). If you're
going to combine both methods, have a look at Poudriere.

https://www.freebsd.org/doc/handbook/ports-poudriere.html



> Is there any tool for this?

Yes, portmaster can do this. See "man portmaster" and find
an example for exactly this case in the EXAMPLES section.

Some admins suggest making a list of your "main ports" and
then use that list for reinstallation, instead of taking
the risk of installing something (as a dependency) which is
no longer needed just because it's on that list. Your "main
ports" list should contain the software you're actually
intending to use ("top level"), as the system will find out
any needed (!) dependency on its own and install it. If you
want to perform this task cleanly, there's also the suggestion
to remove /usr/local entirely (after having copied any needed
configuration of course!) and re-instantiate it using mtree,
and removing the package database, then finally perform the
reinstallation. However I don't know if pkg (in comparison
to old pkg_* tools) likes that approach. :-)



> Btw... how can I update the source port tree?

With freebsd-update (make sure "Component src" is listed in
/etc/freebsd-updarte.conf) or via SVN.

https://www.freebsd.org/doc/handbook/updating-upgrading-freebsdupdate.html

You can also use SVN for source checkout:

https://www.freebsd.org/doc/handbook/svn.html



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list