From 1c45dd21af4a6ed2b46e4b4240fe123560010596 Mon Sep 17 00:00:00 2001 From: David Bauer <mail@david-bauer.net> Date: Tue, 19 Dec 2023 18:21:28 +0100 Subject: [PATCH] image-customization: include file-extension Include the file-extension with the image-customization.lua file. This will ease work with editors providing syntax highlighting, as they now properly detect the file-type. Signed-off-by: David Bauer <mail@david-bauer.net> --- Makefile | 4 ++-- .../{image-customization => image-customization.lua} | 0 .../{image-customization => image-customization.lua} | 0 docs/dev/packages.rst | 4 ++-- docs/features/multidomain.rst | 2 +- .../{image-customization => image-customization.lua} | 0 .../{image-customization => image-customization.lua} | 0 docs/user/site.rst | 4 ++-- scripts/image_customization_lib.lua | 2 +- scripts/target_config_lib.lua | 2 +- scripts/target_lib.lua | 2 +- 11 files changed, 10 insertions(+), 10 deletions(-) rename contrib/ci/minimal-site/{image-customization => image-customization.lua} (100%) rename contrib/ci/olsr-site/{image-customization => image-customization.lua} (100%) rename docs/multidomain-site-example/{image-customization => image-customization.lua} (100%) rename docs/site-example/{image-customization => image-customization.lua} (100%) diff --git a/Makefile b/Makefile index f3034bac3..5fa37a432 100644 --- a/Makefile +++ b/Makefile @@ -36,11 +36,11 @@ ifneq ($(GLUON_BRANCH),) endif ifneq ($(GLUON_FEATURES)$(GLUON_FEATURES_standard)$(GLUON_FEATURES_tiny),) - $(error *** Warning: GLUON_FEATURES has been obsolete, please use the image-customization file instead.) + $(error *** Warning: GLUON_FEATURES has been obsolete, please use the image-customization.lua file instead.) endif ifneq ($(GLUON_SITE_PACKAGES)$(GLUON_SITE_PACKAGES_standard)$(GLUON_SITE_PACKAGES_tiny),) - $(error *** Warning: GLUON_SITE_PACKAGES has been obsolete, please use the image-customization file instead.) + $(error *** Warning: GLUON_SITE_PACKAGES has been obsolete, please use the image-customization.lua file instead.) endif GLUON_AUTOUPDATER_ENABLED ?= 0 diff --git a/contrib/ci/minimal-site/image-customization b/contrib/ci/minimal-site/image-customization.lua similarity index 100% rename from contrib/ci/minimal-site/image-customization rename to contrib/ci/minimal-site/image-customization.lua diff --git a/contrib/ci/olsr-site/image-customization b/contrib/ci/olsr-site/image-customization.lua similarity index 100% rename from contrib/ci/olsr-site/image-customization rename to contrib/ci/olsr-site/image-customization.lua diff --git a/docs/dev/packages.rst b/docs/dev/packages.rst index 656f63019..286a3014a 100644 --- a/docs/dev/packages.rst +++ b/docs/dev/packages.rst @@ -154,7 +154,7 @@ Feature flags Feature flags provide a convenient way to define package selections without making it necessary to list each package explicitly. The list of features to -enable for a Gluon build is determined by the evaluated image-customization file +enable for a Gluon build is determined by the evaluated image-customization.lua file in the root-directory of the Site repository. The main feature flag definition file is ``package/features``, but each package @@ -208,7 +208,7 @@ Example:: This will * disable the inclusion of the (non-existent) packages *gluon-web-wizard* and *gluon-no-radvd* when their - corresponding feature flags are evaluated as selected in the image-customization file + corresponding feature flags are evaluated as selected in the image-customization.lua file * enable four additional config mode packages when the *web-wizard* feature is enabled * enable *gluon-config-mode-mesh-vpn* when both *web-wizard* and one of *mesh-vpn-fastd* and *mesh-vpn-tunneldigger* are enabled diff --git a/docs/features/multidomain.rst b/docs/features/multidomain.rst index a0dc4020a..853949fab 100644 --- a/docs/features/multidomain.rst +++ b/docs/features/multidomain.rst @@ -106,7 +106,7 @@ Via config mode ^^^^^^^^^^^^^^^ To allow switching the domain via config mode, add ``config-mode-domain-select`` -to the enabled features in the image-customization file. +to the enabled features in the image-customization.lua file. |image0| diff --git a/docs/multidomain-site-example/image-customization b/docs/multidomain-site-example/image-customization.lua similarity index 100% rename from docs/multidomain-site-example/image-customization rename to docs/multidomain-site-example/image-customization.lua diff --git a/docs/site-example/image-customization b/docs/site-example/image-customization.lua similarity index 100% rename from docs/site-example/image-customization rename to docs/site-example/image-customization.lua diff --git a/docs/user/site.rst b/docs/user/site.rst index ff880fe29..b4659cc81 100644 --- a/docs/user/site.rst +++ b/docs/user/site.rst @@ -647,7 +647,7 @@ leading to entangled package names like *gluon-mesh-vpn-fastd-respondd* or *gluon-status-page-mesh-batman-adv-i18n-de*. For this reason, we have introduced *feature flags*, which can be specified -in the using the image-customization framework. These flags allow to specify +in the using the image-customization.lua framework. These flags allow to specify a set of features on a higher level than individual package names. 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 without necessitating changes to existing site configurations. It is still possible to override such automatic rules by removing them using -*packages* in the image-customization file +*packages* in the image-customization.lua file (e.g., ``features { '-gluon-status-page-mesh-batman-adv' }`` to remove the automatically added package *gluon-status-page-mesh-batman-adv*). diff --git a/scripts/image_customization_lib.lua b/scripts/image_customization_lib.lua index 64fc1aac8..51ee70ae4 100644 --- a/scripts/image_customization_lib.lua +++ b/scripts/image_customization_lib.lua @@ -10,7 +10,7 @@ local function file_exists(file) end local function get_customization_file_name(env) - return env.GLUON_SITEDIR .. '/image-customization' + return env.GLUON_SITEDIR .. '/image-customization.lua' end local function evaluate_device(env, dev) diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua index f83d1bcc7..fc06f23e6 100644 --- a/scripts/target_config_lib.lua +++ b/scripts/target_config_lib.lua @@ -92,7 +92,7 @@ local function site_specific_packages(dev_info) local feature_inherited_pkgs local site_features - -- Get all enabled selections from image-customization + -- Get all enabled selections from image-customization.lua site_selections = image_customization_lib.get_selections(env, dev_info) -- First read enabled features from site diff --git a/scripts/target_lib.lua b/scripts/target_lib.lua index 0579d620d..5d8b645ad 100644 --- a/scripts/target_lib.lua +++ b/scripts/target_lib.lua @@ -78,7 +78,7 @@ end local function want_device(device_info) local overrides = get_device_overrides(device_info) - -- Check if device is disabled via image-customization in site + -- Check if device is disabled via image-customization.lua in site if overrides['disabled'] then return false end -- GitLab