@@ -647,7 +647,7 @@ leading to entangled package names like *gluon-mesh-vpn-fastd-respondd* or
647
647
*gluon-status-page-mesh-batman-adv-i18n-de *.
648
648
649
649
For this reason, we have introduced *feature flags *, which can be specified
650
- using the image-customization.lua file. These flags allow to specify
650
+ using the `` image-customization.lua `` file. These flags allow to specify
651
651
a set of features on a higher level than individual package names.
652
652
653
653
Most Gluon packages can simply be specified as feature flags by removing the ``gluon- ``
@@ -671,7 +671,7 @@ To some extent, it will even allow us to further modularize existing Gluon packa
671
671
without necessitating changes to existing site configurations.
672
672
673
673
It is still possible to override such automatic rules by removing them using
674
- *packages * in the image-customization.lua file
674
+ *packages * in the `` image-customization.lua `` file
675
675
(e.g., ``features { '-gluon-status-page-mesh-batman-adv' } `` to remove
676
676
the automatically added package *gluon-status-page-mesh-batman-adv *).
677
677
@@ -699,11 +699,14 @@ example *site.mk*.
699
699
Image customization
700
700
^^^^^^^^^^^^^^^^^^^
701
701
702
- Gluon allows configuration of the build- parameters for the images. A Lua domain-specific-language
703
- has been implemented to facilitate this configuration. This file is interpreted for every device
704
- independently. The file is located in the site root as `` image-customization.lua `` .
702
+ Gluon allows configuration of the build parameters for the images. This
703
+ configuration must always exist to configure the basic features included in a
704
+ Gluon build .
705
705
706
- A simple example for a device-specific image configuration can be found in the site-example.
706
+ The file ``image-customization.lua `` in the root of the site configuration is
707
+ used for this purpose, making use of a Domain Specific Language based on Lua.
708
+ See the :ref: `site-examples ` section for a simple example showing both basic
709
+ setup and a device-specific alteration.
707
710
708
711
The following functions are available:
709
712
@@ -737,6 +740,11 @@ disable_factory()
737
740
Disables factory image generation. Sysupgrade images are still generated and stored in the image
738
741
output directory.
739
742
743
+ Technically, the image customzation file is evaluated once for each device, allowing
744
+ to make use of regular Lua *if * statements for device-specific configuration as
745
+ can be seen in the example.
746
+
747
+
740
748
.. _site-config-mode-texts :
741
749
742
750
Config mode texts
@@ -820,6 +828,7 @@ the corresponding configuration variables would be ``PACKAGES_FOO_REPO``,
820
828
``PACKAGES_FOO_COMMIT `` and ``PACKAGES_FOO_BRANCH ``. Slashes in feed names are
821
829
replaced by underscores to get valid shell variable identifiers.
822
830
831
+ .. _site-examples :
823
832
824
833
Examples
825
834
--------
@@ -836,6 +845,12 @@ site.conf
836
845
.. literalinclude :: ../site-example/site.conf
837
846
:language: lua
838
847
848
+ image-customization.lua
849
+ ^^^^^^^^^^^^^^^^^^^^^^^
850
+
851
+ .. literalinclude :: ../site-example/image-customization.lua
852
+ :language: lua
853
+
839
854
i18n/en.po
840
855
^^^^^^^^^^
841
856
0 commit comments