281 Commits

Author SHA1 Message Date
Franco Fichtner
c59a06f645 firmware: sort plugins before store; closes #6616 2023-06-15 13:24:51 +02:00
Franco Fichtner
c6cf3312ad firmware: style 2023-06-06 11:00:49 +02:00
Franco Fichtner
41b5e641cf firmware: let opnsense-update -u stage the kernel as well
And only replace kernel if the pre-upgrade hook went ok.
2023-06-06 09:36:36 +02:00
Franco Fichtner
afcb402aae firmware: shift key extract to "-x" option
We need "-K" for deferred kernel install.
2023-06-06 08:44:29 +02:00
Franco Fichtner
38772514fa firmware: make a note about future work (FreeBSD 14) 2023-06-06 08:13:28 +02:00
Franco Fichtner
72cae559d7 firmware: refactor for clarity 2023-06-05 13:34:02 +02:00
Franco Fichtner
5f60391b63 firmware: handle script errors by aborting the upgrade #6594
The individual scripts should return an error and clean up
their state in case they aborted (which isn't too easy but
in most cases moving the relevant files to the final location
is a good way of dealing with this problem).
2023-06-05 13:32:19 +02:00
Franco Fichtner
cea3afd44c firmware: pre-upgrade hook #6594
Make sure we are ready for reboot with kernel replaced but
not yet booted.  This way we can run the migration in the
last possible correct spot.  We might even abort on errors
here which might be handy to catch issues... to be discussed.
2023-06-05 12:38:48 +02:00
Franco Fichtner
80af1c5ae9 firmware: move sets.sh into more portable query.sh and add tiers fetch #6374 2023-04-26 09:36:58 +02:00
Franco Fichtner
94d3ef10a9 firmware: now that we have a model do not overdo cleanup
It causes spurious changes in the config.xml
2023-04-25 09:20:15 +02:00
Franco Fichtner
780bb10f2c firmware: fix execution when not possible
PR: https://forum.opnsense.org/index.php?topic=33593.0
2023-04-25 08:00:35 +02:00
Franco Fichtner
a50897b517 firmware: make error messages for subscriptions clearer #6373
These are the backend issues we have been having.  We can improve the
messages later, perhaps add better instructions.
2023-03-17 10:03:41 +01:00
Franco Fichtner
09b2bec389 pkg: remove CORE_FLAVOUR handling 2023-02-07 09:22:33 +01:00
Franco Fichtner
0b04cc5efc system: deal with shell_exec() vs. trim() by wrapping all into shell_safe() 2023-01-31 09:01:12 +01:00
Franco Fichtner
607faca9ba firmware: in retrospect always fetch the signature file
When we move to the next major the file contents for
the txz are all the same but their signature is not.
So until the next changelog sync was carried out the
CHECKSUM matched and the signature will stay stale.
2022-10-26 12:53:38 +02:00
Franco Fichtner
5c65f49bce firmware: use effective ABI in changelog fetch 2022-10-26 12:48:06 +02:00
Franco Fichtner
2a15defa74 firmware: filename not prefix 2022-10-25 10:02:23 +02:00
Franco Fichtner
6f7aeba069 firmware: also ignore core.license 2022-10-25 09:59:00 +02:00
Franco Fichtner
166758a2e5 firmware: ignore os-OPNBEcore plugin since dependency is automatic 2022-10-25 09:48:53 +02:00
Franco Fichtner
8d50193182 firmware: remove faulty changelog to force a clean refetch 2022-10-12 10:01:45 +02:00
Franco Fichtner
dd42c8785a firmware: restructure license information handling
opnsense-update -K will handle subscription key return if found.
Fetch the license metadata if it exists, move it to core version
meta file and handle the contents dymanically if it exists.

The only issue for later is that changing the mirror away from
business we have a lingering license file until the next check
for updates is done.
2022-09-27 09:13:45 +02:00
Franco Fichtner
0798b98a16 src: whitespace sweep 2022-09-23 20:31:42 +02:00
Ad Schellevis
797764c10a Core/Firmware - display license validity when applicable
Extends check.sh to fetch license json file when a uuid is found and flush this to /usr/local/opnsense/license.json.
The firmware page adds a license validity row, which is hidden by default and only shown when product.php returns 'product_license_valid_to'.

For the dashboard widget we'll add the "licensed until" string to the core product string when available.
2022-09-21 15:37:17 +02:00
Franco Fichtner
eec0fbb96b firmware: improve previous a little more 2022-08-18 08:12:07 +02:00
Franco Fichtner
cf25dd91cb firmware: pkgs was still unknown 2022-08-17 15:37:49 +02:00
Josh Soref
20a3c3da38
Spelling (#5885) 2022-07-18 13:59:03 +02:00
Franco Fichtner
8edb37042c interfaces: remove inconsistencies regarding ping utility 2022-07-18 09:16:11 +02:00
Franco Fichtner
8d56b78153 firmware: provide upgrade log "audit" for #5855 2022-07-14 15:18:06 +02:00
Franco Fichtner
bad28afe70 system: render interfaces in convert_config() #5768
This brings it in line with migrations although both hinge on
the idea that rc.configure_firmware is called to execute this
code.  Both need a better integration but bringing them to the
same level seems to make the most sense.

After reboot the config is in a consistent state now too...

Remove previous plugins_interfaces() call and always use full
path to pluginctl like most spots already do.
2022-07-12 20:41:52 +02:00
Franco Fichtner
7d81b8ff16 firmare: first make sure we can grab an update version for #5537
Displaying changelogs requires a different menu flow but for now focus
on providing a changelog opportunistically before performing the update,
but intentionally after starting it to keep previous flow for now.
2022-07-01 09:50:15 +02:00
Franco Fichtner
83779cd324 firmware: list locked packages in health audit
Might be relevant to update issues as reported via Reddit.
2022-04-14 12:57:00 +02:00
Franco Fichtner
c5fc553ecf firmware: force all should indicate base/kernel reinstall; closes #5701 2022-04-13 08:32:55 +02:00
Franco Fichtner
2a3f201d38 firmware: use isolated directory for database update check
Otherwise we end up trashing our main package database.

PR: https://forum.opnsense.org/index.php?topic=27875.0
2022-04-12 10:25:39 +02:00
Franco Fichtner
0d5d9f9ba9 firmware: exclude revision to match release during hotfixes 2022-03-25 15:13:48 +01:00
Franco Fichtner
ca73304d6a firmware: minor issue here 2022-03-16 13:59:21 +01:00
Franco Fichtner
1bec5fad0f firmware: update work in progress for upgrade handling
We can now safely check packages kernel and base set version from
opnsense-update.  The basic idea is still that a packages set marker
is included now so we can refrain from updating packages once we
are crossing over a major version barrier using said packages set.
2022-03-02 09:30:03 +01:00
Franco Fichtner
cdd35ab6cb Firmware: make the connectivity audit more robust
Change the ping to size 1500 to emulate a typical download
scenario.  Sometimes small pings will respond but not the
larger fetch.

Secondly, do a separate IPv4 and IPv6 update of the repository
depending on whether we got a corresponding address from the
host.  It should clear up the question if IPv4 or IPv6 or both
is broken/defunct/disabled.
2022-03-01 08:52:08 +01:00
Franco Fichtner
9eaa897ed1 firmware: emit changelog URL for testing 2022-03-01 08:47:38 +01:00
Franco Fichtner
bf484cbcf2 firmware: check repository and plugin state in health audit
More often than not this is useful to know.
2022-02-25 08:24:49 +01:00
Franco Fichtner
61445fc13d src: style issue with $((...)) use 2022-02-23 10:23:28 +01:00
Franco Fichtner
602a5b416d firmware: patch header in consistently
The information is relatively helpful so we might as well
complete the script use.
2022-01-26 08:06:06 +01:00
Franco Fichtner
910c1f2a7b firmware: more changes here in the future 2022-01-24 09:49:09 +01:00
Franco Fichtner
6560bd9bbc firmware: use new feature of opnsense-update
Remembers the last packages set upgraded to to avoid too
much spurious upgrade attempts.
2022-01-20 11:34:17 +01:00
Franco Fichtner
9181b5136d firmware: print these here for diagnostics as well 2022-01-19 13:23:13 +01:00
Franco Fichtner
61720fe233 scripts: tabs vs. spaces 2022-01-11 11:22:03 +01:00
Franco Fichtner
ea2349af06 firmware: apparently /etc/motd is gone on FreeBSD 13
Long live /var/run/motd then...
2021-12-17 10:13:42 +01:00
Franco Fichtner
1977e3539f Revert "firmware: work around FreeBSD 13 faulty validation"
This reverts commit d7d69895cd8672379a634488fb116e1a0bbbeaa6.
Was properly solved in stable/22.1.
2021-12-14 11:58:36 +01:00
Franco Fichtner
d7d69895cd firmware: work around FreeBSD 13 faulty validation
ping6: -4 and -6 cannot be used simultaneously

No, that's not how argument parsing works...
2021-12-10 12:46:40 +01:00
Franco Fichtner
1d713525c1 firmware: add new flag for update-based reboot #5358
Keep old flag in place to not break any API consumers for a while.
2021-11-17 12:46:05 +01:00
Franco Fichtner
ff8e2fdc97 firmware: streamline -s/implied script a bit more 2021-11-17 12:04:05 +01:00