81 Commits

Author SHA1 Message Date
Franco Fichtner
a137d96af8 firmware: in case of fs integrity issues try not to break upgrades
File is always packaged, but we cannot trust the file system.
2021-10-14 14:49:11 +02:00
Franco Fichtner
7063dc9e02 firmware: shift away from old-style firmware-xxx files
opnsense-update can read the upgrade hint itself.  We may have
to stash an ABI in there to reach to a different location without
the need to publish a symbolic link.

Move the firmware message to a data location for cleanliness.
2021-09-28 07:38:21 +02:00
Ad Schellevis
19a927ce2c firmware: a major upgrade logically also expects a reboot.
The other side could check if the action would be a major upgrade, but it feels more clear to always communicate the correct intention.
If this doesn't have side affects, we could change 1077e0a2a8/src/opnsense/mvc/app/views/OPNsense/Core/firmware.volt (L223) as well

cc @fichtner
2021-08-25 18:07:17 +02:00
Franco Fichtner
f9f9dd28c1 firmware: remove spurious grep 2021-08-03 12:30:10 +02:00
Franco Fichtner
16a3559747 firmware: replace php with pkg version compare
As a small bonus now also corectly check if an upgrade
for opnsense-update is available.  If not, we are now
able to ignore the downgrade.
2021-08-03 12:23:54 +02:00
Franco Fichtner
83cd07eda4 firmware: add version/date header here as well 2021-07-14 09:22:46 +02:00
Franco Fichtner
9dc9c4e864 firmware: add backend glue to support install probing of plugins #5037
Allows to list dependencies as well.  Remove the JSON return, best to
use something as follows now:

    # configctl firmware probe && configctl firmware product
2021-06-17 10:32:53 +02:00
Franco Fichtner
35217ba0d1 firmware: if upstream package is missing complain; closes #4906
This points to a configuration error that should be resolved one
way or another.
2021-04-09 14:18:26 +02:00
Franco Fichtner
7d7aaa633d firmware: separate error for "forbidden" #4906 2021-04-09 14:06:27 +02:00
Franco Fichtner
70f856bf2f firmware: emit api version string, second major iteration already #4500 2021-02-25 13:59:35 +01:00
Franco Fichtner
8c2ea1f344 firmware: for core that works, for crypto it does not
Since the fetch blocks some time and is not completely reliable
it doesn't really matter if we have it or not.

While here remove a bit of cruft.
2021-02-18 10:24:04 +01:00
Franco Fichtner
e321ab47a6 firmware: no, not going to fix this mess #4500 2021-02-17 14:02:04 +01:00
Franco Fichtner
8a6642c862 firmware: lock pkg when not upgrading it
It can be snatched from any mirror if given which is very
bad when FreeBSD repo is enabled.  A simple pkg-install
will pull in pkg and break the system.
2021-02-17 13:52:10 +01:00
Franco Fichtner
2520f59669 firmwware: slight code updates for check #4500 2021-02-16 16:11:49 +01:00
Franco Fichtner
58b96bc114 firmware: third and last batch #4500 2021-02-16 15:59:37 +01:00
Franco Fichtner
d44a148899 firmware: second batch in check script #4500 2021-02-16 15:52:58 +01:00
Franco Fichtner
9a08ea91e9 firmware: settle on 4 spaces for indent, first batch, minor removals #4500 2021-02-16 15:44:04 +01:00
Franco Fichtner
e4392fb854 firmware: pin critical updates to our repo #4500
While testing pkg was snatched from FreeBSD mirror, which isn't
advisable (nevermind that FreeBSD mirror was enabled in the first
place).

Do the same for the release type shift to avoid pivoting towards
third party repos for any reason whatsoever.
2021-02-16 15:03:56 +01:00
Franco Fichtner
4cf0720b66 firmware: merge updates and release type result parsing #4500
With this we get as much visibility as pkg can offer us.  Merge
some code in the process as the release type shift is nothing
special anymore.
2021-02-16 00:40:20 +01:00
Franco Fichtner
e283a5942d firmware: UX and JS changes #4500 2021-02-15 19:52:15 +01:00
Franco Fichtner
8d7ce38678 firmware: add upgrade sets to status if found and required #4500 2021-02-15 13:51:54 +01:00
Franco Fichtner
52594df3e3 firmware: simplify upgrade procedure #4500 2021-02-15 12:05:16 +01:00
Franco Fichtner
14416172b1 firmware: switch to new update procedure #4500 2021-02-15 11:33:44 +01:00
Franco Fichtner
88aa77ecda firmware: assorted changes for #4500
o Do not load the text changelog for the GUI as it is unused
o Rename product_name to product_id for consistency
o Always hint at product_target so correct changelog is displayed
o Rename type to target for consistency
o Add distinguishable labels to changelog view actions
o Return JSON when argument is given for easier debug
2021-02-14 13:50:14 +01:00
Franco Fichtner
64640958df firmware: for check also figure out release type shift #4500 2021-02-12 21:58:05 +01:00
Franco Fichtner
10eab0ae68 firmware: get rid of firmware type name #4500
From the user side no functional changes.  What this can do
now is decide whether to update or do a release type transition.
In most cases it is safer to get all updates first and then
do a release type transition afterwards.  This can follow when
firmware type install can be shelved.
2021-02-12 19:37:58 +01:00
Franco Fichtner
d00a9f3c16 firmware: correct install time and loop check_package #4500
The former is so we have the date of the install point, not the
date of the package build time.  And, secondly, if we loop the
argument for check through the JSON we know to put the result
into perspective later on.
2021-02-12 14:48:20 +01:00
Franco Fichtner
35d88e8da4 firmware: support repository info for updates #4500 2021-02-12 00:03:32 +01:00
Franco Fichtner
724167b44b firmware: remove cruft, show log during check #4500 2021-02-11 22:14:08 +01:00
Franco Fichtner
cc58fd6009 firmware: background the update check, funnel it back to GUI #4500 2021-02-11 20:38:34 +01:00
Franco Fichtner
84b086ec96 firmware: provide check data to caller for upcoming refactor #4500 2021-02-11 16:29:28 +01:00
Franco Fichtner
bfbc0bdccb firmware: warn on incomplete repository, change release type priority #4500 2021-02-10 16:06:49 +01:00
Franco Fichtner
1c8e3a3a47 firmware: update text and make notes for later #4500 2021-01-29 19:38:12 +01:00
Franco Fichtner
92c019b913 firmware: pretty sure parsing REMOVED was working in pkg 1.12 2021-01-05 17:02:31 +01:00
Franco Fichtner
b206ad8443 firmware: fix some issues with missing repository on server 2020-12-13 11:40:13 +01:00
Franco Fichtner
34ebcf6fb5 firmware: properly report an unsigned repostory
The repository is rejected but an internal error returned.  Let's
make this explicit as it is a configuration error anyway.
2020-08-24 11:44:25 +02:00
Franco Fichtner
a58ad17289 firmware: fixed upsteam in pkg 1.12 2019-09-23 07:46:29 +02:00
Franco Fichtner
ea04d268ec firmware: don't trust pkg now or in the future with `-q' 2019-06-05 08:33:20 +02:00
Franco Fichtner
32ff471bf5 firmware: package manager not responding fixes; closes #3172 2019-05-03 17:09:18 +02:00
Franco Fichtner
7b937e878d firmware: we use grep, catch both versions of the error 2019-03-17 10:25:09 +01:00
Franco Fichtner
33496e9fe3 firmware: fix parsing of packages in multi-repo env
PR: https://forum.opnsense.org/index.php?topic=12016.0
2019-03-13 21:04:45 +01:00
Franco Fichtner
b8116f8193 firmware: kernel / base version files no longer append architecture 2019-01-30 08:23:40 +01:00
Franco Fichtner
4adc8ed618 firmware: connection is ok, repository is not
Just change the returned information into something that
makes sense here.  No functional changes between both
sides except we check repository for != 'ok' so we catch
all types of errors if they are added in the future.  Same
is already true for connection.
2019-01-18 19:58:30 +01:00
Franco Fichtner
e4b194e884 firmware: also detect a revoked fingerprint 2019-01-17 15:00:00 +01:00
Franco Fichtner
fb3fd528ad firmware: show untrusted error instead of "no updates" 2019-01-14 11:55:39 +01:00
Michael Steenbeek
2c61e068a2 Small fixes (#3096) 2019-01-04 09:26:16 +01:00
Franco Fichtner
c95c82cb87 firmware: rework opnsense-version again 2018-11-29 08:22:50 +00:00
Franco Fichtner
c5a586e068 firmware: size for kernel / base 2018-11-28 14:25:39 +00:00
Franco Fichtner
4d16653fc5 firmware: ask only once via expansion
We only want to know if there is anything at all and "" + "" is still "".
2018-10-23 06:14:37 +02:00
Franco Fichtner
389b9d4839 firmware: use named arguments in check script 2018-10-22 09:06:03 +02:00