canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
3k stars 885 forks source link

freebsd > 14.0-RELEASE uses `/home` not `/usr/home` #5850

Open dch opened 3 weeks ago

dch commented 3 weeks ago

In upstream the move of /usr/home to /home is documented, and there are several prior commits that update the machinery during the installer and elsewhere.

This needs to be adjusted in cloud-init also, but only > FreeBSD 14.0-RELEASE:

https://github.com/canonical/cloud-init/blob/96a07fb75341b8c774351f1e8508b97cfe60de1a/cloudinit/distros/freebsd.py#L38

Currently I'm proposing to address this as a FreeBSD ports patch, where we have tooling to accommodate per-version patching in the ports tree:

https://reviews.freebsd.org/D47338

Should this be upstreamed to cloud-init? If so, what sort of trick would you suggest to make this OS version-aware?

holmanb commented 3 weeks ago

Should this be upstreamed to cloud-init?

Yes, we can upstream it.

If so, what sort of trick would you suggest to make this OS version-aware?

Hmm, not sure. One approach would be to avoid carrying the patch forever by could upstreaming this change and then inverting the patch version check so that it only sets home_dir = "/usr/home" on ${OSVERSION} < 1400000. Whenever you drop support for pre-14.0 then the patch can be dropped.

Thoughts?

emaste commented 3 weeks ago

FWIW the expected EOL for the final FreeBSD 13.x release is April 30, 2026. https://www.freebsd.org/security/#sup

inverting the patch version check

Indeed, it seems that would clearly indicate intent.