2014-05-24 19:49:55 +00:00
|
|
|
Autoupdater
|
|
|
|
===========
|
|
|
|
|
2014-07-09 10:43:10 +00:00
|
|
|
Gluon contains an automatic update system which can be configured in the site configuration.
|
|
|
|
|
|
|
|
Building Images
|
|
|
|
---------------
|
|
|
|
|
|
|
|
By default, the autoupdater is disabled (as it is usually not helpful to have unexpected updates
|
|
|
|
during development), but it can be enabled by setting the variable GLUON_BRANCH when building
|
|
|
|
to override the default branch set in the set in the site configuration.
|
|
|
|
|
|
|
|
A manifest file for the updater can be generated with `make manifest`. A signing script (using
|
2014-07-20 20:36:46 +00:00
|
|
|
ecdsautils) can by found in the `contrib` directory. When creating the manifest, ``GLUON_PRIORITY`` can
|
|
|
|
be set on the command line, or it can be taken from the ``site.mk``.
|
|
|
|
|
|
|
|
The priority defines the maximum number of days that may pass between releasing an update and installation
|
2016-01-14 01:46:29 +00:00
|
|
|
of the images. The update probability will start at 0 after the release time mentioned in the manifest
|
|
|
|
and then slowly rise to 1 up to the point when the number of days given by the priority has passed.
|
2014-07-20 20:36:46 +00:00
|
|
|
|
|
|
|
The priority may be an integer or a decimal fraction.
|
2014-07-09 10:43:10 +00:00
|
|
|
|
|
|
|
A fully automated nightly build could use the following commands:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
git pull
|
|
|
|
(cd site && git pull)
|
|
|
|
make update
|
|
|
|
make clean
|
2015-03-14 18:20:11 +00:00
|
|
|
make -j5 GLUON_TARGET=ar71xx-generic GLUON_BRANCH=experimental
|
2014-07-09 10:43:10 +00:00
|
|
|
make manifest GLUON_BRANCH=experimental
|
2015-10-12 23:18:03 +00:00
|
|
|
contrib/sign.sh $SECRETKEY output/images/sysupgrade/experimental.manifest
|
2014-07-26 00:20:38 +00:00
|
|
|
|
|
|
|
rm -rf /where/to/put/this/experimental
|
2015-10-12 23:18:03 +00:00
|
|
|
cp -r output/images /where/to/put/this/experimental
|
2014-07-09 10:43:10 +00:00
|
|
|
|
|
|
|
|
2014-05-24 19:49:55 +00:00
|
|
|
Infrastructure
|
|
|
|
--------------
|
|
|
|
|
|
|
|
We suggest to have following directory tree accessible via http:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
firmware/
|
|
|
|
stable/
|
|
|
|
sysupgrade/
|
|
|
|
factory/
|
|
|
|
snapshot/
|
|
|
|
sysupgrade/
|
|
|
|
factory/
|
|
|
|
experimental/
|
|
|
|
sysupgrade/
|
|
|
|
factory/
|
|
|
|
|
2015-05-11 14:26:06 +00:00
|
|
|
The server must be available via IPv6.
|
2014-05-24 19:49:55 +00:00
|
|
|
|
|
|
|
Command Line
|
|
|
|
------------
|
|
|
|
|
2016-01-14 01:46:29 +00:00
|
|
|
These commands can be used on a node:
|
2014-07-09 10:43:10 +00:00
|
|
|
|
2014-05-24 19:49:55 +00:00
|
|
|
::
|
|
|
|
|
|
|
|
# Update with some probability
|
2014-08-18 10:47:47 +00:00
|
|
|
autoupdater
|
2014-05-24 19:49:55 +00:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2014-07-20 20:36:46 +00:00
|
|
|
# Force update check, even when the updater is disabled
|
2014-05-24 19:49:55 +00:00
|
|
|
autoupdater -f
|
2016-05-26 14:46:32 +00:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
# If fallback is true the updater will perform an update only if
|
|
|
|
# the timespan given by the priority and another 24h have passed
|
|
|
|
autoupdater --fallback
|
2014-07-09 10:43:10 +00:00
|
|
|
|
|
|
|
|