diff --git a/docs/features/autoupdater.rst b/docs/features/autoupdater.rst index 014ee59f55a5eecd760c72457bd21a65fda748f5..e0cd9c6c4c3789fc8c8dfb12dd4562064245224b 100644 --- a/docs/features/autoupdater.rst +++ b/docs/features/autoupdater.rst @@ -7,8 +7,11 @@ 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 site configuration. +during development), but it can be enabled by setting the variable ``GLUON_AUTOUPDATER_ENABLED`` to ``1`` when building. +It is also possible to override the default branch during build using the variable ``GLUON_AUTOUPDATER_BRANCH``. + +If a default branch is set neither in *site.conf* nor via ``GLUON_AUTOUPDATER_BRANCH``, the default branch is +implementation-defined. Currently, the branch with the first name in alphabetical order is chosen. A manifest file for the updater can be generated with `make manifest`. A signing script (using ``ecdsautils``) can be found in the `contrib` directory. When creating the manifest, the @@ -32,15 +35,16 @@ Automated nightly builds A fully automated nightly build could use the following commands: -:: +.. code-block:: sh git pull - (git -C site pull) + # git -C site pull make update make clean GLUON_TARGET=ar71xx-generic NUM_CORES_PLUS_ONE=$(expr $(nproc) + 1) - make -j$NUM_CORES_PLUS_ONE GLUON_TARGET=ar71xx-generic GLUON_BRANCH=experimental GLUON_RELEASE=$GLUON_RELEASE - make manifest GLUON_BRANCH=experimental GLUON_RELEASE=$GLUON_RELEASE + make -j$NUM_CORES_PLUS_ONE GLUON_TARGET=ar71xx-generic GLUON_RELEASE=$GLUON_RELEASE \ + GLUON_AUTOUPDATER_BRANCH=experimental GLUON_AUTOUPDATER_ENABLED=1 + make manifest GLUON_RELEASE=$GLUON_RELEASE GLUON_AUTOUPDATER_BRANCH=experimental contrib/sign.sh $SECRETKEY output/images/sysupgrade/experimental.manifest rm -rf /where/to/put/this/experimental diff --git a/docs/site-example/site.conf b/docs/site-example/site.conf index 2e92c1d663ce949c4339a55d71f2ba54a99e77ad..42c95dbe2e1e56449602e2b1b6e75a602cfde922 100644 --- a/docs/site-example/site.conf +++ b/docs/site-example/site.conf @@ -164,7 +164,8 @@ }, autoupdater = { - -- Default branch. Don't forget to set GLUON_BRANCH when building! + -- Default branch (optional), can be overridden by setting GLUON_AUTOUPDATER_BRANCH when building. + -- Set GLUON_AUTOUPDATER_ENABLED to enable the autoupdater by default for newly installed nodes. branch = 'stable', -- List of branches. You may define multiple branches. diff --git a/docs/user/getting_started.rst b/docs/user/getting_started.rst index 08206875181d523c38772d1a8b59b70fa4250f8a..4d7ff69a1bd11a6099222d57c81958df98a87897 100644 --- a/docs/user/getting_started.rst +++ b/docs/user/getting_started.rst @@ -171,10 +171,12 @@ usually be set on the command line or in ``site.mk``. Common variables ................ -GLUON_BRANCH - Sets the default branch of the autoupdater. If unset, the autoupdater is disabled - by default. For the ``make manifest`` command, GLUON_BRANCH defines the branch to - generate a manifest for. +GLUON_AUTOUPDATER_BRANCH + Overrides the default branch of the autoupdater set in ``site.conf``. For the ``make manifest`` command, + ``GLUON_AUTOUPDATER_BRANCH`` defines the branch to generate a manifest for. + +GLUON_AUTOUPDATER_ENABLED + Set to ``1`` to enable the autoupdater by default for newly installed nodes. GLUON_DEPRECATED Controls whether images for deprecated devices should be built. The following @@ -225,7 +227,7 @@ GLUON_DEBUG similar tools. Requires a device or target with at least 16 MB of flash space, e.g. `x86-64`. Unset by default. GLUON_MINIFY - Setting ``GLUON_MINIFY=0`` will omit the minification of scripts during the build process. By + Setting ``GLUON_MINIFY=0`` will omit the minification of scripts during the build process. By default the flag is set to ``1``. Disabling the flag is handy if human readable scripts on the devices are desired for development purposes. Be aware that this will increase the size of the resulting images and is therefore not suitable for devices with small flash chips. diff --git a/docs/user/site.rst b/docs/user/site.rst index bb634afa8f81c05c619c5671478aa46256509984..11004f3b17aeaae21c2d03cc807cc2bd512c1cd0 100644 --- a/docs/user/site.rst +++ b/docs/user/site.rst @@ -418,12 +418,16 @@ poe_passthrough \: optional autoupdater \: package Configuration for the autoupdater feature of Gluon. + Specifying a default branch in *site.conf* is optional. See + :doc:`../features/autoupdater` for information how to change the behaviour + of the autoupdater during image build. + The mirrors are checked in random order until the manifest could be downloaded successfully or all mirrors have been tried. :: autoupdater = { - branch = 'stable', + branch = 'stable', -- optional branches = { stable = { name = 'stable',