From 7fe4581c148aa0d6f07f98ed147b67c2182b6967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Sun, 5 Feb 2023 21:28:26 +0100 Subject: [PATCH] gluon-core: add option to exclude upgrade scripts that alter system invasivly This allows the user to build a "vanilla" image that can still include gluon components such as gluon-mmfd easily --- package/gluon-core/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/gluon-core/Makefile b/package/gluon-core/Makefile index 93b2d599..a3753a4e 100644 --- a/package/gluon-core/Makefile +++ b/package/gluon-core/Makefile @@ -27,6 +27,10 @@ config GLUON_VERSION config GLUON_MINIFY bool "Minify Gluon scripts" default y + +config GLUON_BASE + bool "Exclude everything except the very most basic" + default n endef define Package/gluon-core/conffiles @@ -38,6 +42,10 @@ define Package/gluon-core/install $(INSTALL_DIR) $(1)/lib/gluon echo '$(call qstrip,$(CONFIG_GLUON_VERSION))' > $(1)/lib/gluon/gluon-version + +ifdef CONFIG_GLUON_BASE + find $(1)/lib/gluon/upgrade/ -type f -and ! -name "998-commit" -and ! -name "005-set-domain" -and ! -name "010-primary-mac" -and ! -name "030-system" -and ! -name "120-ntp-servers" -and ! -name "150-poe-passthrough" -and ! -name "300-firewall-rules" -and ! -name "820-dns-config" -and ! -name "999-version" -delete +endif endef $(eval $(call BuildPackageGluon,gluon-core))