Created attachment 206984 [details]
Fix iocage upgrade - patch
This addresses a couple problems that prevented `iocage upgrade' from working properly.
1. Bug #229346 changed freebsd-update to exit with status code 1 in case of no more updates are available. This fixed ezjail and iocell, but broke iocage. As a result, iocage upgrade -r 11.3-RELEASE would not finish updating iocage jail config and exit with an error message. This happened first on 11.3-RELEASE and will also happen on 12.1-RELEASE
2. When updating a jail to 11.x-RELEASE on a 12.x machine, merging config files will create empty files (which then all end up as merge errors). As a result, all configuration is lost (or the attentive sysadmin exits the process in time and fixes things manually). This is caused by the fact that rcs was removed from base in 12.x. Its freebsd-update uses diff3 instead. As iocage always fetches the freebsd-update script of the target release, it gets one from 11.x which will break. This was fixed by adding rcs57 as a dependency of the package (based on the existence of "merge").
3. Upgrading multiple jails (iocage upgrade ALL -r <release>) would break, because of a workaround (setting UNAME_r in the environment) that shouldn't be required any more (iocage 1.2RC already has it removed).
- bumped revision
- moved NO_ARCH to pacify portlint
Created attachment 207014 [details]
Patch to fix iocage upgrade - updated to version
The new version includes a runaway check in case future versions of freebsd-update cause breakage. I'll add a comment to this bug with a link to the commit, once it's merged into upstream.
The pull request has been merged upstream now
@araujo Do you object to any of the changes in the patch? (maintainer feedback).
Taking and committing (maintainer timeout). I think it's a good point in time to commit this, as:
- It's affecting more and more people (the 11.3 update issue as well as the diff3 issue on >= 12-RELEASE).
- 11.2 is close to EoL (freebsd-update is already emitting warnings), this means more people will try to upgrade to 11.3 (and get into trouble).
- It's still >10 days from cutting 2019Q4, so if there is anything really stupid in this commit, it can be fixed before it hits quarterly.
- People on quarterly will have a fixed, but otherwise proven version in 2019Q4 (which is not 1.2, which might have new issues for all I know).
- 12.1-RELEASE is supposed to happen in Q4, which will be affected in the same way as 11.3-RELEASE is. So one more reason why we need a fixed version in 2019Q4.
Note that in addition to the patch from 2019-08-30, the commit will include a patch to allow `make check-plist'/`poudriere testport' finish successfully, something I noticed while QA'ing the patches (see https://github.com/iocage/iocage/issues/1043 for details).
Besides having the changes reviewed and merged upstream, I did local testing (including poudriere runs).
A commit references this bug:
Date: Thu Sep 19 00:21:11 UTC 2019
New revision: 512299
Fix `iocage upgrade' for 11.3-RELEASE and upcoming 12.1-RELEASE
- Fix dependencies when upgrading <12 jails running on a 12-RELEASE jailhost
(depend on `merge' from devel/rcs57).
- Fix to unbreak updating multiple jails at once.
- Patch to `setup.py' to make `make check-plist' pass.
- Move `NO_ARCH' to make portlint happy
Approved by: araujo (maintainer timeout)