iocell
iocell copied to clipboard
make lookup of supported releases dynamic
- [x] Supply documentation according to CONTRIBUTING.md
No new/changed functionality that requires change in the manpage/README
- [x] Explain the feature
Instead of constantly changing the list of presented "supported releases" for 'iocell fetch' manually, make the process dynamic by fetching the currently available releases and snapshots from $ftphost
- [x] Read CONTRIBUTING.md
- [x] Only open the PR against the
develop
branch.
I understand what you're trying to achieve here, but I see two issues:
- your current solution lists BETA releases, what was never intention
- while being dynamic it will quite likely cause documentation of given iocell release to be inaccurate when the ftp site contents will change and the iocell release will lag to reflect it in docs, manpages, etc.
True, pulling in BETA versions might summon goblins nobody wants to fight with (e.g. with updating jails). Also they aren't 'officially supported' by either the security officer, nor in the freebsd forums. OTOH, -CURRENT also isn't a 'supported release' by that definition... But given that -CURRENT is essential for testing (and has been supported by iocell in the past), I think this is a valid exception.
Might something like this be OK?
releases="$(fetch -qo - https://ftp.freebsd.org/pub/FreeBSD/releases/amd64/ | \
sed -e 's/<[^>]*>//g' | awk -F/ '/RELEASE/ { print $1 }')"
snapshots="$(fetch -qo - https://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/ | \
sed -e 's/<[^>]*>//g' | awk -F/ '/CURRENT|STABLE/ { print $1 }')"
Or do you have objections against this lookup being dynamic/automatic in general? I.e. we should first check if iocell still works with any new dot/major release before adding it to the list?
great. github just nuked my branch and automatically closed this PR thanks to "sync fork" being anyting but useful and just overwriting anything...