opnsense / update

OPNsense update tools
https://opnsense.org/
BSD 2-Clause "Simplified" License
126 stars 76 forks source link

Mismatched Versions Result in no Update #81

Closed fossbrandon closed 2 years ago

fossbrandon commented 2 years ago

I've been updating my process through downloading the update files I need through the mirror, transferring them to the OPNsense device, and then using this CLI tool to update my versions. I've noticed a minor edge case where sometimes the version I'm updating to uses an older base/kernel version but an updated packages version. An example of this is OPNsense version 22.1.6 where there are packages for it here, but no base/kernel files here.

When I update using kernel/base versions 22.1.5 and packages version 22.1.6, this CLI tool fails to update because it can't find the 22.1.6 base/kernel files. I simply renamed the 22.1.5 files to 22.1.6 and the update works so I have a few clarifying questions:

  1. Is it safe to assume that their will always be new packages for each new version?
    • It seems like that theory holds true so far based on the options here.
  2. Is it safe to assume that if a base/kernel version doesn't exist for the version I'm trying to update to, I can just use the next lowest version? Ex: 22.1.6 base/kernel update files don't exist so can I safely use versions 22.1.5?
  3. Is renaming older versions of the base/kernel files to match the packages version safe to do? In my limited testing, the update seems to work just fine but I figure it's better to ask.

Any advice would be appreciated, thanks!

fichtner commented 2 years ago

Hi @fossbrandon,

  1. yep, that's how it works. Hotfixes are the exception that isn't really a full exception: we inject newer packages into a specific version of packages (like with 22.1.4 and 22.1.4_1, same same but different).
  2. correct, that's sort of how minor updates work as they check the base/kernel separately and don't update due to version embedded in opnsense-update package.
  3. Yes, on the mirror we usually set symlinks to avoid copies, but this works well as it doesn't clobber signatures, etc.

Cheers, Franco

fossbrandon commented 2 years ago

Thanks for the clarification! Seems like that process will work for me then. I'll close the issue.