How to simplify "Please rebuild all installed 3rd party software"

I greatly dread the inevitiable "Please rebuild all installed 3rd party software" message from freebsd-update and I'm convinced there are ways to reduce the pain. I seek advice.

- 1st:
It seems to me that the primary intent for the universal rebuild is to remove all previous version library dependencies and link them accordingly with the new libraries. This is probably wise. However, there are a great many ports which have no immediate core library linkages (e.g. fonts, perl modules, python gems, etc.); so rebuilding everything seems excessive.

Is there a way to simply skip this process and have the requisite libraries moved to /usr/lib/compat instead of having them deleted by a subsequent freebsd-update install?

Is there a way to generate a list of all libraries which have had their versions bumped when using freebsd-update upgrade from, say, 11.0-RELEASE to 11.1-RELEASE? Presumably a recomplied /usr/lib/libarchive.so.6 does not requre relinking unless the previous version in 11.0 was /usr/lib/libarchive.so.5?

Is there a way to list all /usr/local binaries (and subsequently their origin port) linked against the above list of "bumped" libraries? This question is the crux of the biscuit and given a tool which can simply list all ports dependant on the newly deprecated libraries solves both the 1st and 2nd parts.

Hints about how to write such tools if they are missing would also be welcome.

-2nd:
During the interminable portmaster -af process (use portmaster to force {-f} reinstall of all {-a} installed ports), there are inevitable interruptions when port builds fail for any number of reasons. This is perfectly understandable and reasonable.

However, resuming this process can be difficult after fixing the problem.

What does the tantalizing message "There are 'install complete' flags from a previous -[rf] run of portmaster" mean? I can find no mention of this message in either the man page or generally via Google? Does this imply that portmaster -af will resume where it left off with the correct handling?

/tmp/portmasterfail.txt is very useful in this process. ("Thanks" to the folks continuing the work on portmaster.) However, if one uses portmaster sucessfully to fix a single port problem, /tmp/portmasterfail.txt is deleted and presumably any 'install complete' flags as well? The obvious workaround is to remember to rename these files before moving on; however, I'm old and stupid.

Is there a graceful way to guarantee a build-resume?
 
Last edited by a moderator:
What does the tantalizing message "There are 'install complete' flags from a previous -[rf] run of portmaster" mean? I can find no mention of this message in either the man page or generally via Google?
Look into the -R flag on portmaster(8):

Code:
     -R  used with the -r or -f options to skip ports updated on a previous
         run.  When used with -r it will also prevent the rebuild of the par-
         ent port if it, and all of its dependencies are up to date.
So basically it allows you to continue to use -a after which Portmaster will then automatically skip those ports which were already compiled. That is the theory at least, I myself always rely on the error message and the "continue command" which Portmaster generates when something goes wrong (that or the command in /tmp/portmasterfail.txt).
 
You know what ? I'm happy....

When I upgrade across a same major branch I never rebuild anything, and that caused to me no real issue since I use FreeBSD from version 9

So 11.0 to 11.1... ? I just ignore the message, execute the third time

freebsd-update install

and I make a ultimate cleanup of old libraries
Code:
cd /usr/src
make clean-old
make clean-old-libs

But if switching from 10.x to 11.x, no choice, you must rebuild all.

When upgrading to new major version, now I find more easy to build from scratch an entire new clean system as a "master system"
I play a little, I test if all works as I want, and if I am satisfied with this brand new flavor, for each system I want to upgrade, I clone this "master system" with "cpdup" and inject backed up configuration files of the given workstation (/etc/group, master-passwd ... etc), I just regenerate the passwd encrypted database and login.db with cap_mkdb)

Rebuilding a full system is a real mess when you have a big system with number of packages, non defaults port options, there is always a point where portupgrade/portmaster fails, and as today I haven't found any kind of resume function.
 
Last edited by a moderator:
Back
Top