From 1a956e5375e11473955b490614e46e4d97fb2e48 Mon Sep 17 00:00:00 2001
From: Daniel Frank <git@danielfrank.net>
Date: Tue, 26 Mar 2024 21:33:19 +0100
Subject: [PATCH 1/6] =?UTF-8?q?add=20updates=20for=20v2023.2=20from=20Bj?=
 =?UTF-8?q?=C3=B6rn?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 image-customization.lua | 36 ++++++++++++++++++++++++++++++++++++
 site.mk                 | 29 -----------------------------
 2 files changed, 36 insertions(+), 29 deletions(-)
 create mode 100644 image-customization.lua

diff --git a/image-customization.lua b/image-customization.lua
new file mode 100644
index 0000000..79abeed
--- /dev/null
+++ b/image-customization.lua
@@ -0,0 +1,36 @@
+features({
+    'autoupdater',
+    'config-mode-domain-select',
+    'ebtables-filter-multicast',
+    'ebtables-filter-ra-dhcp',
+    'mesh-batman-adv-15',
+    'mesh-vpn-fastd',
+    'web-private-wifi',
+    'radv-filterd',
+    'respondd',
+    'status-page',
+    'web-advanced',
+    'web-wizard',
+})
+
+if not device_class('tiny') then
+    features({
+        'wireless-encryption-wpa3',
+    })
+end
+
+packages({
+    '-gluon-config-mode-geo-location',
+    '-gluon-config-mode-contact-info',
+    'gluon-ebtables-source-filter',
+    'gluon-web-mesh-vpn-fastd',
+    'iwinfo',
+})
+
+if target('x86') then
+    packages({
+        'nano',
+        'htop',
+        'ethtool',
+    })
+end
diff --git a/site.mk b/site.mk
index 419cb23..45aa428 100644
--- a/site.mk
+++ b/site.mk
@@ -3,35 +3,6 @@ GLUON_DEPRECATED := upgrade
 
 GLUON_AUTOUPDATER_ENABLED ?= 1
 
-GLUON_SITE_PACKAGES := \
-	-gluon-config-mode-geo-location \
-	-gluon-config-mode-contact-info \
-	gluon-ebtables-source-filter \
-	gluon-web-mesh-vpn-fastd \
-	iwinfo
-
-GLUON_FEATURES := \
-	autoupdater \
-	config-mode-domain-select \
-	ebtables-filter-multicast \
-	ebtables-filter-ra-dhcp \
-	mesh-batman-adv-15 \
-	mesh-vpn-fastd \
-	web-private-wifi \
-	radv-filterd \
-	respondd \
-	status-page \
-	web-advanced \
-	web-wizard
-
-# x86 and x86-64 add extra software
-ifeq ($(GLUON_TARGET),$(filter $(GLUON_TARGET),x86-generic x86-64))
-	GLUON_SITE_PACKAGES += \
-		nano \
-		htop \
-		ethtool
-endif
-
 GLUON_PRIORITY ?= 7
 
 # Region code required for some images; supported values: us eu

From 87e65917f87469570d966cd0e1a870b6bcc31b8f Mon Sep 17 00:00:00 2001
From: Daniel Frank <git@danielfrank.net>
Date: Tue, 26 Mar 2024 21:34:19 +0100
Subject: [PATCH 2/6] v2023.2.2.0

---
 README.md  | 1 +
 build.conf | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 5f1ea19..a4daeb7 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,7 @@ Please see [the official Gluon repository](https://github.com/freifunk-gluon/glu
 
 #### Gluon versions used for specific Hamburg Freifunk Firmware builds
 
+- v2023.2.2.0: site-ffhh: v2023.2.2.0, gluon: v2023.2.2
 - v2023.1.2.0: site-ffhh: v2023.1.2.0, gluon: v2023.1.2
 - v2022.1.4.0: site-ffhh: v2022.1.4.0, gluon: v2022.1.4
 - v2022.1.3.0: site-ffhh: v2022.1.3.0, gluon: v2022.1.3 (nur experimental verteilt)
diff --git a/build.conf b/build.conf
index 7c44063..fa36fb5 100644
--- a/build.conf
+++ b/build.conf
@@ -1,4 +1,4 @@
-GLUON_RELEASE="v2023.1.2.0"
+GLUON_RELEASE="v2023.2.2.0"
 targets="ath79-generic ath79-nand ath79-mikrotik bcm27xx-bcm2708 bcm27xx-bcm2709 ipq40xx-generic ipq40xx-mikrotik ipq806x-generic lantiq-xrx200 lantiq-xway mediatek-mt7622 mpc85xx-p1010 mpc85xx-p1020 ramips-mt7620 ramips-mt7621 ramips-mt76x8 rockchip-armv8 sunxi-cortexa7 x86-generic x86-geode x86-legacy x86-64"
 broken_images=(
 	'*dir*615*d*'

From 6251517fe4696099b092ede352fe48e1a4f8df74 Mon Sep 17 00:00:00 2001
From: Entil_Zha <Entil_Zha@localhost.localdomain>
Date: Mon, 16 Sep 2024 19:38:57 +0200
Subject: [PATCH 3/6] add mediatek-filogic targets

---
 README.md  | 3 ++-
 build.conf | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index a4daeb7..0a79e19 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
 
 	In the next two commands replace GLUON_VERSION and SITE_VERSION with the actual version numbers.
 	$ git clone -b GLUON_VERSION https://github.com/freifunk-gluon/gluon.git
-	$ git clone -b SITE_VERSION https://github.com/freifunkhamburg/site-ffhh.git
+	$ git clone -b SITE_VERSION https://git.hamburg.ccc.de/freifunk/site-ffhh.git
 	$ cd site-ffhh
 
 	To build the firmware into the subdirectory firmware:
@@ -15,6 +15,7 @@ Please see [the official Gluon repository](https://github.com/freifunk-gluon/glu
 
 #### Gluon versions used for specific Hamburg Freifunk Firmware builds
 
+- v2023.2.2.1: site-ffhh: v2023.2.2.0, gluon: v2023.2.2 (add mediatek-filogic Routers)
 - v2023.2.2.0: site-ffhh: v2023.2.2.0, gluon: v2023.2.2
 - v2023.1.2.0: site-ffhh: v2023.1.2.0, gluon: v2023.1.2
 - v2022.1.4.0: site-ffhh: v2022.1.4.0, gluon: v2022.1.4
diff --git a/build.conf b/build.conf
index fa36fb5..ee3219a 100644
--- a/build.conf
+++ b/build.conf
@@ -1,5 +1,5 @@
 GLUON_RELEASE="v2023.2.2.0"
-targets="ath79-generic ath79-nand ath79-mikrotik bcm27xx-bcm2708 bcm27xx-bcm2709 ipq40xx-generic ipq40xx-mikrotik ipq806x-generic lantiq-xrx200 lantiq-xway mediatek-mt7622 mpc85xx-p1010 mpc85xx-p1020 ramips-mt7620 ramips-mt7621 ramips-mt76x8 rockchip-armv8 sunxi-cortexa7 x86-generic x86-geode x86-legacy x86-64"
+targets="ath79-generic ath79-nand ath79-mikrotik bcm27xx-bcm2708 bcm27xx-bcm2709 ipq40xx-generic ipq40xx-mikrotik ipq806x-generic lantiq-xrx200 lantiq-xway mediatek-filogic mediatek-mt7622 mpc85xx-p1010 mpc85xx-p1020 ramips-mt7620 ramips-mt7621 ramips-mt76x8 rockchip-armv8 sunxi-cortexa7 x86-generic x86-geode x86-legacy x86-64"
 broken_images=(
 	'*dir*615*d*'
 )

From 9c77f1954908127d12478b8cf14878589ca20fb0 Mon Sep 17 00:00:00 2001
From: Daniel Frank <git@danielfrank.net>
Date: Fri, 1 Nov 2024 20:52:11 +0100
Subject: [PATCH 4/6] v2023.2.4.0

---
 README.md  | 1 +
 build.conf | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 0a79e19..d9e669a 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,7 @@ Please see [the official Gluon repository](https://github.com/freifunk-gluon/glu
 
 #### Gluon versions used for specific Hamburg Freifunk Firmware builds
 
+- v2023.2.4.0: site-ffhh: v2023.2.4.0, gluon: v2023.2.4
 - v2023.2.2.1: site-ffhh: v2023.2.2.0, gluon: v2023.2.2 (add mediatek-filogic Routers)
 - v2023.2.2.0: site-ffhh: v2023.2.2.0, gluon: v2023.2.2
 - v2023.1.2.0: site-ffhh: v2023.1.2.0, gluon: v2023.1.2
diff --git a/build.conf b/build.conf
index ee3219a..07358e1 100644
--- a/build.conf
+++ b/build.conf
@@ -1,4 +1,4 @@
-GLUON_RELEASE="v2023.2.2.0"
+GLUON_RELEASE="v2023.2.4.0"
 targets="ath79-generic ath79-nand ath79-mikrotik bcm27xx-bcm2708 bcm27xx-bcm2709 ipq40xx-generic ipq40xx-mikrotik ipq806x-generic lantiq-xrx200 lantiq-xway mediatek-filogic mediatek-mt7622 mpc85xx-p1010 mpc85xx-p1020 ramips-mt7620 ramips-mt7621 ramips-mt76x8 rockchip-armv8 sunxi-cortexa7 x86-generic x86-geode x86-legacy x86-64"
 broken_images=(
 	'*dir*615*d*'

From db81f77fd00b983b89154a2697a28bc1fa96f918 Mon Sep 17 00:00:00 2001
From: Daniel Frank <git@danielfrank.net>
Date: Mon, 4 Nov 2024 00:49:48 +0100
Subject: [PATCH 5/6] dont nuke the output directory on each run

---
 build.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/build.sh b/build.sh
index ac09d08..a91a46d 100755
--- a/build.sh
+++ b/build.sh
@@ -91,7 +91,6 @@ env | egrep '^GLUON' | sort
 
 pushd "${gluon_path}"
 announce Starting make update...
-rm -rf "${GLUON_OUTPUTDIR}"
 mkdir -p "${GLUON_OUTPUTDIR}"
 make update
 # Try to install patches. I wasn't able to figure out how patches in gluon/site/patches work.

From b3c3b41e3099a5c3379bbbd0501975f274ca7706 Mon Sep 17 00:00:00 2001
From: Daniel Frank <git@danielfrank.net>
Date: Mon, 4 Nov 2024 20:05:53 +0100
Subject: [PATCH 6/6] support BUILD_DATE for experimental versions

---
 build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.sh b/build.sh
index a91a46d..5647ba5 100755
--- a/build.sh
+++ b/build.sh
@@ -79,7 +79,7 @@ pushd "$site_path"
 # shellcheck source=/dev/null
 . ./build.conf
 GLUON_AUTOUPDATER_BRANCH="${GLUON_AUTOUPDATER_BRANCH:-experimental}"
-[ "${GLUON_AUTOUPDATER_BRANCH}" = "experimental" ] && GLUON_RELEASE="${GLUON_RELEASE}~exp$(date +%Y%m%d)"
+[ "${GLUON_AUTOUPDATER_BRANCH}" = "experimental" ] && GLUON_RELEASE="${GLUON_RELEASE}~exp${BUILD_DATE:-$(date +%Y%m%d)}"
 export GLUON_RELEASE
 export GLUON_AUTOUPDATER_BRANCH
 export GLUON_SITEDIR="${site_path}"