Docs: reformated section: Upgrading Packages from 2016.2.x

This commit is contained in:
rubo77 2017-06-08 18:02:14 +02:00
parent 7c11e022c1
commit 2734a486cf

View File

@ -28,7 +28,7 @@ rerun
:: ::
make update make update
`make update` also applies the patches that can be found in the directories found in `make update` also applies the patches that can be found in the directories found in
`patches`; the resulting branch will be called `patched`, while the commit specified in `modules` `patches`; the resulting branch will be called `patched`, while the commit specified in `modules`
@ -40,7 +40,7 @@ using
:: ::
make update-patches make update-patches
If applying a patch fails because you have changed the base commit, the repository will be reset to the old `patched` branch If applying a patch fails because you have changed the base commit, the repository will be reset to the old `patched` branch
and you can try rebasing it onto the new `base` branch yourself and after that call `make update-patches` to fix the problem. and you can try rebasing it onto the new `base` branch yourself and after that call `make update-patches` to fix the problem.
@ -79,18 +79,18 @@ example use the package ``gluon-web-mesh-vpn-fastd`` as a base
:: ::
config main 'settings' config main 'settings'
- to fill this section with values from the ``site.conf`` edit the upgrade - to fill this section with values from the ``site.conf`` edit the upgrade
script for your package and add the same section as the filename of the config script for your package and add the same section as the filename of the config
file in your ``site.conf``: file in your ``site.conf``:
:: ::
your_new_config { your_new_config {
new_value = 'example' new_value = 'example'
} }
:: ::
@ -100,25 +100,31 @@ Upgrading Packages from 2016.2.x
The site.conf and external packages to be rewritten in some parts and Gluon now The site.conf and external packages to be rewritten in some parts and Gluon now
doesn't use LuCI for its Config Mode anymore, but our own fork doesn't use LuCI for its Config Mode anymore, but our own fork
"gluon-web", which is significantly smaller (as lots of features we don't "gluon-web", which is significantly smaller (as lots of features we don't
need have been removed) for detailed changes see `/dev/web/`_. need have been removed) for detailed changes see section `/web/`_.
.. _/dev/web/: - the function ``gluon_luci.escape()`` must be replaced with ``pcdata()`` and
``urlescape()`` with ``urlencode()``
- the function ``gluon_luci.escape()`` must be replaced with ``pcdata()`` and ``urlescape()`` with ``urlencode()`` - the dependencies in the ``Makefile`` must be adapted: replace
- the dependencies in the ``Makefile`` must be adapted: replace ``DEPENDS:=gluon-luci-theme`` with ``DEPENDS:=gluon-web-theme``, ``luci-base`` with ``gluon-web`` and ``gluon-luci-admin`` with ``gluon-web-admin`` ... ``DEPENDS:=gluon-luci-theme`` with ``DEPENDS:=gluon-web-theme``, ``luci-base``
- ``i18n.translate()`` must be replaced with ``translate()`` with ``gluon-web`` and ``gluon-luci-admin`` with ``gluon-web-admin`` ...
- ``luci.template.render_string()`` must be replaced with ``renderer.render_string()`` - ``i18n.translate()`` => ``translate()``
- i.e. ``s:option(cbi.Value, "_altitude" ...`` must be replaced with ``o = s:option(Value, "altitude" ...`` - ``luci.template.render_string()`` =>
- ``o.rmempty`` must be replaced with ``o.optional`` ``renderer.render_string()``
- adapt the paths: ``/lib/gluon/setup-mode/www`` must be replaced with ``/lib/gluon/web/www`` - i.e. ``s:option(cbi.Value, "_altitude" ...`` =>
- includes: ``require 'luci.util'`` must be replaced with ``require 'gluon.web.util'`` and 'luci.i18n', 'gluon.luci' with 'gluon.util' ``o = s:option(Value, "altitude" ...``
- In ``site.mk`` all pakages with ``-luci-`` in its name must be replaced with ``-web-`` (exception: ``gluon-luci-portconfig must be replaced with ``gluon-web-network`` - ``o.rmempty`` => ``o.optional``
- the Makefile now has to reside in a subfolder within the repository, all files and folders needed for inclusion need to be in that same subfolder - adapt the paths: ``/lib/gluon/setup-mode/www`` =>
- the ``site.conf`` needs to be adjusted too. Refer to `site.html#configuration18`_ for the ``/lib/gluon/web/www``
new format: - includes: ``require 'luci.util'`` => ``require 'gluon.web.util'``, 'luci.i18n' and 'gluon.luci' => 'gluon.util'
- The changes in short: the ``fastd_mesh_vpn`` section has been renamed to ``fastd`` - ``local uci = luci.model.uci.cursor()`` => ``local uci = require("simple-uci").cursor()``
and moved into a new section ``mesh_vpn``, with the exception of the options - In ``site.mk`` all pakages with ``-luci-`` in its name must be replaced with
``enabled``, ``mtu`` and ``bandwidth_limit``, which are set directly in the ``-web-`` (exception: ``gluon-luci-portconfig`` =>
``mesh_vpn`` section. ``gluon-web-network``
- the Makefile now has to reside in a subfolder within the repository, all
.. _site.html#configuration18: files and folders needed for inclusion need to be in that same subfolder
- the ``site.conf`` needs to be adjusted too. Refer to `site.html#configuration`_
for the new format:
- The changes in short: the ``fastd_mesh_vpn`` section has been renamed to
``fastd`` and moved into a new section ``mesh_vpn``, with the exception of
the options ``enabled``, ``mtu`` and ``bandwidth_limit``, which are set
directly in the ``mesh_vpn`` section.