Solved Questions about FreeBSD 13.0 and compat12x

I have a FreeBSD 12.2 server with some 12.2 userland jails running older versions of PHP (5.6, 7.1, 7.2). I didn't upgrade any software in each jail after each PHP version deprecated from ports tree. When 13.0 is ready I plan to upgrade the host and the jails to 13.0.

Questions:

1) If I install compat12x then no need to recompile ports in these jails. When FreeBSD 14.0 released I will have to install compat13x too. Right?

2) If I rebuild the ports (so compat12x is not needed) using the ports tree from one commit before each PHP version deprecated will I get better performance (if phoronix benchmarks for 13.0 are valid) for the PHP applications?
 
Regarding 1) depends how you upgrade - if you would upgrade only the host, then jail can cont. to run "as-is". Make sure your kernel has COMPAT_FREEBSD12. If you upgrade the jail as well, with e.g. installworld && etcupdate the legacy libraries will remain in the jail. The ports for compatXX are usual only needed, when you have a NEW system that needs to run old software so you can get older libs back to the system.
Running old binaries depend on the availability of syscalls (COMPAT_ in kernel) and libraries.

Regarding 2) academic speaking probably :) - more interesting is to see if everything does recompile with llvm11. Best to copy that jail and try out.
 
Finally I am thinking to keep the jails running old PHP versions with 12.2 userland and not touch them. I will only upgrade userland in other jails with supported PHP versions which I regularly update and I will rebuild all ports in these jails so I can run make -DBATCH_DELETE_OLD_FILES delete-old and make -DBATCH_DELETE_OLD_FILES delete-old-libs to remove old file and libraries.
 
If I install compat12x then no need to recompile ports in these jails.
You don't need it because the 12.x libraries are inside the jail already. The GENERIC kernel has COMPAT_FREEBSD12.
When FreeBSD 14.0 released I will have to install compat13x too. Right?
Yes and no. Not for running 12.x jails. You do need it for running 12.x binaries outside the jail, i.e. on the host itself.

If I rebuild the ports (so compat12x is not needed) using the ports tree from one commit before each PHP version deprecated will I get better performance (if phoronix benchmarks for 13.0 are valid) for the PHP applications?
Running a deprecated PHP version is a bad idea for other reasons. No idea what performance effect 13.0 is going to have on PHP.
 
You don't need it because the 12.x libraries are inside the jail already. The GENERIC kernel has COMPAT_FREEBSD12.
But if I run make -DBATCH_DELETE_OLD_FILES delete-old and make -DBATCH_DELETE_OLD_FILES delete-old-libs inside the jail then I need compat12x, right?
 
Only if you actually upgrade the jail to 13.0 too. But it's not a problem to run a 12.x (or 11.x) jail on 13.0. So why go through all that trouble (as long as it's a supported 12.x version)?
 
But if I run make -DBATCH_DELETE_OLD_FILES delete-old and make -DBATCH_DELETE_OLD_FILES delete-old-libs inside the jail then I need compat12x, right?
yes - but why would you delete them first and then install it again? Just keep the libraries within your jail - that is the beautiful thing about jails :)
 
One day the 12.x will not be supported
That will be some time in 2023 at the earliest. You will need to keep it updated, 12.2 -> 12.3, etc. Major versions are supported for at least 5 years (12.0 was released in 2018). PHP 7.4 will probably be EoL before FreeBSD 12 is.

I would worry more about php5 support, the 12.x compatibility risk is insignificant in comparison.
Agree. Still running PHP5 is a massive security risk. PHP 5.6 went EoL 2 years ago, even 7.2 is now EoL.

 
  • Thanks
Reactions: Yze
I setup a test system with 12.2, then upgrade it to 13.0-BETA2 and also upgrade jails userland to 13.0-BETA. Also I run make -DBATCH_DELETE_OLD_FILES delete-old and make -DBATCH_DELETE_OLD_FILES delete-old-libs and finally compat12x was not needed before or after I rebuild the ports.
 
Back
Top