Browse Source

update for gluon v2016.2.x

Karsten Böddeker 7 years ago
parent
commit
52609f275e

+ 5 - 5
i18n/de.po

@@ -29,14 +29,14 @@ msgstr ""
 "kann sich dein Knoten mit dem Mesh-VPN verbinden. Bitte "
 "schicke dazu diesen Schlüssel und den Namen deines Knotens "
 "an <a href=\"mailto:kontakt@hochstift.freifunk.net\">kontakt@hochstift.freifunk.net</a> oder benutze am besten gleich das "
-"<a href=\"http://hochstift.freifunk.net/?page_id=366&key=<%=pubkey%>&nname=<%=hostname%>&mac=<%=sysconfig.primary_mac%>&email=<%=contact%>\"> "
+"<a href=\"http://hochstift.freifunk.net/?page_id=366&key=<%=urlescape(pubkey)%>&nname=<%=urlescape(hostname)%>&mac=<%=urlescape(sysconfig.primary_mac)%>&email=<%=urlescape(contact)%>\"> "
 "vorausgefüllte Formular auf unserer Webseite</a>.<br><br>"
 "</p>"
 "<div class=\"the-key\">"
-"<%=hostname%><br/><br/>"
-"# Owner: <%=contact%><br/>"
-"# MAC: <%=sysconfig.primary_mac%><br/>"
-"key \"<%= pubkey %>\";"
+"<%=escape(hostname)%><br/><br/>"
+"# Owner: <%=escape(contact)%><br/>"
+"# MAC: <%=escape(sysconfig.primary_mac)%><br/>"
+"key \"<%=escape(pubkey)%>\";"
 "</div>"
 
 msgid "gluon-config-mode:reboot"

+ 6 - 6
i18n/en.po

@@ -27,15 +27,15 @@ msgstr ""
 "connect to the mesh VPN until the key has been registered on the Freifunk "
 "Hochstift servers. "
 "To register the key fill out "
-"<a href=\"http://hochstift.freifunk.net/?page_id=366&key=<%=pubkey%>&nname=<%=hostname%>&mac=<%=sysconfig.primary_mac%>&email=<%=contact%>\">this form</a> "
-"or send it together with your node's name (<em><%=hostname%></em>) to "
+"<a href=\"http://hochstift.freifunk.net/?page_id=366&key=<%=urlescape(pubkey)%>&nname=<%=urlescape(hostname)%>&mac=<%=urlescape(sysconfig.primary_mac)%>&email=<%=urlescape(contact)%>\">this form</a> "
+"or send it together with your node's name (<em><%=escape(hostname)%></em>) to "
 "<a href=\"mailto:kontakt@hochstift.freifunk.net\">kontakt@hochstift.freifunk.net</a>."
 "</p>"
 "<div class=\"the-key\">"
-"<%=hostname%><br/><br/>"
-"# Owner: <%=contact%><br/>"
-"# MAC: <%=sysconfig.primary_mac%><br/>"
-"key \"<%= pubkey %>\";"
+"<%=escape(hostname)%><br/><br/>"
+"# Owner: <%=escape(contact)%><br/>"
+"# MAC: <%=escape(sysconfig.primary_mac)%><br/>"
+"key \"<%=escape(pubkey)%>\";"
 "</div>"
 
 msgid "gluon-config-mode:reboot"

+ 2 - 2
modules

@@ -1,5 +1,5 @@
 GLUON_SITE_FEEDS='ffho'
 
 PACKAGES_FFHO_REPO=http://git.c3pb.de/freifunk-pb/ffho-packages.git
-PACKAGES_FFHO_BRANCH=v2016.1.x
-PACKAGES_FFHO_COMMIT=234ce04ad00c47eb143a3c276dd648397c18f48c
+PACKAGES_FFHO_BRANCH=2016.2.x
+PACKAGES_FFHO_COMMIT=3f8381d864842d98392a7779d534e27c0364a639

+ 0 - 112
patches/0001-fix-UBNT-model-detection.patch

@@ -1,112 +0,0 @@
-From: Karsten Böddeker <freifunk@kb-light.de>
-Date: Mon, 4 Apr 2016 17:02:55 +0200
-Subject: fix UBNT model detection
-
-diff --git a/patches/openwrt/1000-fix-UBNT-XM-model-detection.patch b/patches/openwrt/1000-fix-UBNT-XM-model-detection.patch
-new file mode 100644
-index 0000000..0824058
---- /dev/null
-+++ b/patches/openwrt/1000-fix-UBNT-XM-model-detection.patch
-@@ -0,0 +1,74 @@
-+From: Neal Oakey <neal.oakey@bingo-ev.de>
-+Date: Sun, 14 Feb 2016 20:58:20 +0100
-+Subject: fix UBNT XM model detection
-+
-+Signed-off-by: Neal Oakey <neal.oakey@bingo-ev.de>
-+
-+diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
-+index dab4d2c..e7b3cd2 100755
-+--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
-++++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
-+@@ -64,6 +64,40 @@ wndr3700_board_detect() {
-+ 	AR71XX_MODEL="$machine"
-+ }
-+ 
-++ubnt_get_mtd_part_magic() {
-++	ar71xx_get_mtd_offset_size_format EEPROM 4118 2 %02x
-++}
-++
-++ubnt_xm_board_detect() {
-++	local model
-++	local magic
-++
-++	magic="$(ubnt_get_mtd_part_magic)"
-++	case ${magic:0:3} in
-++		"e00"|\
-++		"e01"|\
-++		"e80") # It seams that there are different Versions of the Nanostation
-++			model="Ubiquiti NanoStation M"
-++			;;
-++		"e0a")
-++			model="Ubiquiti NanoStation loco M"
-++			;;
-++		"e1b") # Note: the M5 has not been tested!
-++		       #       and the Ti Versions are still missing
-++			model="Ubiquiti Rocket M"
-++			;;
-++		"e20"|\
-++		"e2d") # Bullet Ti M
-++			model="Ubiquiti Bullet M"
-++			;;
-++		"e30")
-++			model="Ubiquiti PicoStation M"
-++			;;
-++	esac
-++
-++	[ ! -z "$model" ] && AR71XX_MODEL="${model}${magic:3:1}"
-++}
-++
-+ cybertan_get_hw_magic() {
-+ 	local part
-+ 
-+@@ -475,12 +509,14 @@ ar71xx_board_detect() {
-+ 		;;
-+ 	*"Bullet M")
-+ 		name="bullet-m"
-++		ubnt_xm_board_detect
-+ 		;;
-+ 	*"Loco M XW")
-+ 		name="loco-m-xw"
-+ 		;;
-+ 	*"Nanostation M")
-+ 		name="nanostation-m"
-++		ubnt_xm_board_detect
-+ 		;;
-+ 	*"Nanostation M XW")
-+ 		name="nanostation-m-xw"
-+@@ -667,6 +703,7 @@ ar71xx_board_detect() {
-+ 		;;
-+ 	*"Rocket M")
-+ 		name="rocket-m"
-++		ubnt_xm_board_detect
-+ 		;;
-+ 	*"Rocket M XW")
-+ 		name="rocket-m-xw"
-diff --git a/targets/ar71xx-generic/profiles.mk b/targets/ar71xx-generic/profiles.mk
-index 4a63667..da178ea 100644
---- a/targets/ar71xx-generic/profiles.mk
-+++ b/targets/ar71xx-generic/profiles.mk
-@@ -162,12 +162,19 @@ $(eval $(call GluonModel,UBNT,ubnt-air-gateway,ubiquiti-airgateway))
- $(eval $(call GluonModel,UBNT,ubnt-airrouter,ubiquiti-airrouter))
- 
- $(eval $(call GluonModel,UBNT,ubnt-bullet-m,ubiquiti-bullet-m))
--$(eval $(call GluonModelAlias,UBNT,ubiquiti-bullet-m,ubiquiti-loco-m))
--$(eval $(call GluonModelAlias,UBNT,ubiquiti-bullet-m,ubiquiti-picostation-m))
--$(eval $(call GluonModelAlias,UBNT,ubiquiti-bullet-m,ubiquiti-rocket-m))
-+$(eval $(call GluonModelAlias,UBNT,ubiquiti-bullet-m,ubiquiti-nanostation-loco-m2))
-+$(eval $(call GluonModelAlias,UBNT,ubiquiti-bullet-m,ubiquiti-nanostation-loco-m5))
-+$(eval $(call GluonModelAlias,UBNT,ubiquiti-bullet-m,ubiquiti-rocket-m2))
-+$(eval $(call GluonModelAlias,UBNT,ubiquiti-bullet-m,ubiquiti-rocket-m5))
-+$(eval $(call GluonModelAlias,UBNT,ubiquiti-bullet-m,ubiquiti-bullet-m2))
-+$(eval $(call GluonModelAlias,UBNT,ubiquiti-bullet-m,ubiquiti-bullet-m5))
-+$(eval $(call GluonModelAlias,UBNT,ubiquiti-bullet-m,ubiquiti-picostation-m2))
- 
--$(eval $(call GluonModel,UBNT,ubnt-loco-m-xw,ubiquiti-loco-m-xw))
- $(eval $(call GluonModel,UBNT,ubnt-nano-m,ubiquiti-nanostation-m))
-+$(eval $(call GluonModelAlias,UBNT,ubiquiti-nanostation-m,ubiquiti-nanostation-m2))
-+$(eval $(call GluonModelAlias,UBNT,ubiquiti-nanostation-m,ubiquiti-nanostation-m5))
-+
-+$(eval $(call GluonModel,UBNT,ubnt-loco-m-xw,ubiquiti-loco-m-xw))
- $(eval $(call GluonModel,UBNT,ubnt-nano-m-xw,ubiquiti-nanostation-m-xw))
- $(eval $(call GluonModel,UBNT,ubnt-rocket-m-xw,ubiquiti-rocket-m-xw))
- $(eval $(call GluonModel,UBNT,ubnt-uap-pro,ubiquiti-unifi-ap-pro))

+ 0 - 33
patches/0002-openwrt-patch-iw.patch

@@ -1,33 +0,0 @@
-From: Karsten Böddeker <freifunk@kb-light.de>
-Date: Sat, 23 Apr 2016 15:20:30 +0200
-Subject: openwrt: patch iw
-
-diff --git a/patches/openwrt/1001-iw-patch-200-reduce-size-patch.patch b/patches/openwrt/1001-iw-patch-200-reduce-size-patch.patch
-new file mode 100644
-index 0000000..09c978e
---- /dev/null
-+++ b/patches/openwrt/1001-iw-patch-200-reduce-size-patch.patch
-@@ -0,0 +1,23 @@
-+From: Karsten Böddeker <freifunk@kb-light.de>
-+Date: Sat, 23 Apr 2016 15:20:29 +0200
-+Subject: iw: patch 200-reduce_size.patch
-+
-+diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch
-+index dea24fb..fefbf1f 100644
-+--- a/package/network/utils/iw/patches/200-reduce_size.patch
-++++ b/package/network/utils/iw/patches/200-reduce_size.patch
-+@@ -1,12 +1,11 @@
-+ --- a/Makefile
-+ +++ b/Makefile
-+-@@ -15,8 +15,8 @@ CFLAGS += -Wall -Wundef -Wstrict-prototy
-++@@ -16,7 +16,7 @@ CFLAGS += -Wall -Wundef -Wstrict-prototy
-+  OBJS = iw.o genl.o event.o info.o phy.o \
-+  	interface.o ibss.o station.o survey.o util.o ocb.o \
-+  	mesh.o mpath.o mpp.o scan.o reg.o version.o \
-+--	reason.o status.o connect.o link.o offch.o ps.o cqm.o \
-++ 	reason.o status.o connect.o link.o offch.o ps.o cqm.o \
-+ -	bitrate.o wowlan.o coalesce.o roc.o p2p.o vendor.o
-+-+	reason.o status.o link.o offch.o ps.o cqm.o \
-+ +	bitrate.o vendor.o
-+  OBJS += sections.o
-+  

+ 0 - 65
patches/0003-scripts-add-functions-need_one_of-and-need_array_of-to-check_site_lib.lua.patch

@@ -1,65 +0,0 @@
-From: Karsten Böddeker <freifunk@kb-light.de>
-Date: Wed, 3 Aug 2016 10:50:24 +0200
-Subject: scripts: add functions need_one_of and need_array_of to check_site_lib.lua
-
-need_one_of(varname, array, required) checks weather the value of the specified variable is part of given array.
-need_array_of(varname, array, required) is similar to need_one_of() but assume that varname points to an array.
-
-diff --git a/scripts/check_site_lib.lua b/scripts/check_site_lib.lua
-index 766b94a..49a7f50 100644
---- a/scripts/check_site_lib.lua
-+++ b/scripts/check_site_lib.lua
-@@ -7,6 +7,27 @@ local function loadvar(varname)
-    end
- end
- 
-+local function array_to_string(array)
-+   local string = ''
-+   for _, v in ipairs(array) do
-+      if #string >= 1 then
-+         string = string .. ', '
-+      end
-+      string = string .. v
-+   end
-+   return '[' .. string .. ']'
-+end
-+
-+local function assert_one_of(var, array, msg)
-+   for _, v in ipairs(array) do
-+      if v == var then
-+         return true
-+      end
-+   end
-+
-+   error(msg)
-+end
-+
- local function assert_type(var, t, msg)
-    assert(type(var) == t, msg)
- end
-@@ -99,7 +120,25 @@ function need_table(varname, subcheck, required)
-    return var
- end
- 
-+function need_one_of(varname, array, required)
-+   local var = loadvar(varname)
-+
-+   if required == false and var == nil then
-+      return nil
-+   end
-+
-+   assert_one_of(var, array, "site.conf error: expected `" .. varname .. "' to be one of given array: " .. array_to_string(array))
-+
-+   return var
-+end
-+
- function need_string_array(varname, required)
-    return assert(pcall(need_array, varname, function(e) assert_type(e, 'string') end, required),
- 		 "site.conf error: expected `" .. varname .. "' to be a string array")
- end
-+
-+function need_array_of(varname, array, required)
-+   local ok, var = pcall(need_array, varname, function(e) assert_one_of(e, array) end,required)
-+   assert(ok, "site.conf error: expected `" .. varname .. "' to be a subset of given array: " .. array_to_string(array))
-+   return var
-+end

+ 0 - 92
patches/0004-gluon-core-make-wifi-rates-configurable-by-site.conf.patch

@@ -1,92 +0,0 @@
-From: Karsten Böddeker <freifunk@kb-light.de>
-Date: Wed, 3 Aug 2016 11:02:20 +0200
-Subject: gluon-core: make wifi rates configurable by site.conf
-
-and add documentation
-
-diff --git a/docs/site-example/site.conf b/docs/site-example/site.conf
-index b58f525..25624c3 100644
---- a/docs/site-example/site.conf
-+++ b/docs/site-example/site.conf
-@@ -35,6 +35,14 @@
-     -- Wireless channel.
-     channel = 1,
- 
-+    -- List of supported wifi rates (optional)
-+    -- Example removes 802.11b compatibility for better performance
-+    supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000},
-+
-+    -- List of basic wifi rates (optional, required if supported_rates is set)
-+    -- Example removes 802.11b compatibility for better performance
-+    basic_rate = {6000, 9000, 18000, 36000, 54000},
-+
-     -- ESSID used for client network.
-     ap = {
-       ssid = 'entenhausen.freifunk.net',
-diff --git a/docs/user/site.rst b/docs/user/site.rst
-index b26a28a..4af64b5 100644
---- a/docs/user/site.rst
-+++ b/docs/user/site.rst
-@@ -95,6 +95,12 @@ wifi24 : optional
-     This will only affect new installations.
-     Upgrades will not changed the disabled state.
- 
-+    Additionally it is possible to configure the ``supported_rates`` and ``basic_rate``
-+    of each radio. Both are optional, by default hostapd/driver dictate the rates.
-+    If ``supported_rates`` is set, ``basic_rate`` is required, because ``basic_rate``
-+    has to be a subset of ``supported_rates``.
-+    The example below disables 802.11b rates.
-+
-     ``ap`` requires a single parameter, a string, named ``ssid`` which sets the
-     interface's ESSID.
- 
-@@ -109,6 +115,8 @@ wifi24 : optional
- 
-        wifi24 = {
-          channel = 11,
-+         supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000},
-+         basic_rate = {6000, 9000, 18000, 36000, 54000},
-          ap = {
-            ssid = 'entenhausen.freifunk.net',
-          },
-diff --git a/package/gluon-core/check_site.lua b/package/gluon-core/check_site.lua
-index 1647d77..2239271 100644
---- a/package/gluon-core/check_site.lua
-+++ b/package/gluon-core/check_site.lua
-@@ -28,5 +28,13 @@ for _, config in ipairs({'wifi24', 'wifi5'}) do
-     need_string('regdom') -- regdom is only required when wifi24 or wifi5 is configured
- 
-     need_number(config .. '.channel')
-+
-+    local rates = {1000, 2000, 5500, 6000, 9000, 11000, 12000, 18000, 24000, 36000, 48000, 54000}
-+    local supported_rates = need_array_of(config .. '.supported_rates', rates, false)
-+    if supported_rates then
-+      need_array_of(config .. '.basic_rate', supported_rates, true)
-+    else
-+      need_array_of(config .. '.basic_rate', rates, false)
-+    end
-   end
- end
-diff --git a/package/gluon-core/files/lib/gluon/upgrade/200-wireless b/package/gluon-core/files/lib/gluon/upgrade/200-wireless
-index 5a98a70..d217428 100755
---- a/package/gluon-core/files/lib/gluon/upgrade/200-wireless
-+++ b/package/gluon-core/files/lib/gluon/upgrade/200-wireless
-@@ -17,6 +17,18 @@ local function configure_radio(radio, index, config)
-     uci:set('wireless', radio, 'channel', config.channel)
-     uci:set('wireless', radio, 'htmode', 'HT20')
-     uci:set('wireless', radio, 'country', site.regdom)
-+
-+    if config.supported_rates then
-+      uci:set_list('wireless', radio, 'supported_rates', config.supported_rates)
-+    else
-+      uci:delete('wireless', radio, 'supported_rates')
-+    end
-+
-+    if config.basic_rate then
-+      uci:set_list('wireless', radio, 'basic_rate', config.basic_rate)
-+    else
-+      uci:delete('wireless', radio, 'basic_rate')
-+    end
-   end
- end
- 

+ 4 - 2
site.conf

@@ -34,7 +34,7 @@
 	},
 
 	-- regulatory domain of your wifi
-	regdom = '00',
+	regdom = 'DE',
 
 	-- wifi settings (2.4 GHz and 5 GHz)
 	-- ap.ssid = 'hochstift.freifunk.net/${kürzel}',
@@ -235,11 +235,13 @@
 	-- enable BATMAN on WAN interface by default (requires gluon-batman-on-wan package)
 	batman_on_wan = 0,
 
-	-- hide the altitude field in config mode
 	config_mode = {
 		geo_location = {
 			show_altitude = false,
 		},
+		owner = {
+			obligatory = false,
+		},
 	},
 
 	-- link to map

+ 4 - 3
site.mk

@@ -11,9 +11,9 @@ GLUON_SITE_PACKAGES := \
 	gluon-config-mode-core \
 	gluon-config-mode-autoupdater \
 	gluon-config-mode-contact-info \
-	ffho-config-mode-geo-location \
+	gluon-config-mode-geo-location \
 	gluon-config-mode-hostname \
-	ffho-config-mode-mesh-vpn \
+	gluon-config-mode-mesh-vpn \
 	ffho-config-mode-site-select \
 	ffho-debug \
 	gluon-ebtables-filter-multicast \
@@ -32,7 +32,6 @@ GLUON_SITE_PACKAGES := \
 	gluon-setup-mode \
 	ffho-site-auto-select \
 	ffho-status-page \
-	ffho-txpower-fix \
 	iwinfo \
 	iptables \
 	haveged
@@ -71,3 +70,5 @@ GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)
 GLUON_PRIORITY ?= $(DEFAULT_GLUON_PRIORITY)
 GLUON_REGION ?= eu
 GLUON_LANGS ?= en de
+GLUON_ATH10K_MESH ?= ibss
+GLUON_REGION ?= eu