diff --git a/Makefile b/Makefile index 5d45c2b..3d87a6f 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,28 @@ -all: check_site site.mk site.conf modules +sites: clean info sites/ffhh sites/ffhh-sued -.PHONY: check_site -check_site: - if test -z "${SITE}"; then echo Usage: make SITE=ffhh; exit 1; else true; fi +info: config/defaults.erb template/info.erb + erb -T- config/defaults.erb template/$@.erb >$@ .PHONY: clean clean: + rm -rf sites + rm -f info + +sites/%: config/%.erb + mkdir -p $@ + cd $@ && $(MAKE) -f ../../Makefile site SITE=$(@F) + +site: siteclean site.mk site.conf modules + +.PHONY: siteclean +siteclean: rm -f site.mk site.conf modules modules: - cp sites/${SITE}/$@ $@ + erb -T- ../../config/defaults.erb ../../config/$(SITE).erb ../../template/$@.erb >$@ site.conf: - cp sites/${SITE}/$@ $@ + erb -T- ../../config/defaults.erb ../../config/$(SITE).erb ../../template/$@.erb >$@ site.mk: - cp sites/${SITE}/$@ $@ + erb -T- ../../config/defaults.erb ../../config/$(SITE).erb ../../template/$@.erb >$@ diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..4713fee --- /dev/null +++ b/build.sh @@ -0,0 +1,78 @@ +#!/bin/bash -e + +set -e + +function announce () { + echo '############################' $* >&2 +} + +proc=$(nproc) +gluon_out="${HOME}/firmware" + +while getopts g:j:o:bv opt; do + case "$opt" in + g) gluon_path="$OPTARG" ;; + o) gluon_out="$OPTARG" ;; + b) export BROKEN=1 ;; + j) proc="$OPTARG" ;; + v) verbose=V=s ;; + esac +done +if [ -z "${gluon_path}" ]; then + echo "Usage: $0 -g GLUON_PATH" >&2 + echo " -g GLUON_PATH Path to a checkout of the gluon repository." >&2 + echo " -o OUT_PATH Path to a checkout of the gluon repository. Default: ${gluon_out}" >&2 + echo " -b BROKEN=1" >&2 + echo " -v verbose" >&2 + echo " -j JOBS Run build with -jJOBS. Default: ${proc}" >&2 + exit 1 +fi + +gluon_path=$(realpath $gluon_path) +mkdir -p ${gluon_out} +gluon_out=$(realpath $gluon_out) +site_path=$(realpath $(dirname $BASH_SOURCE)) + +announce GLUON: $gluon_path >&2 +announce FFHH SITES: $site_path >&2 + +# Build the site repo and generate all site configs +announce Building site repo and reading data >&2 +pushd $site_path > /dev/null +make +. info +export GLUON_RELEASE +export GLUON_BRANCH +# get the available sites... +sites="" +for s in sites/*; do sites="${sites} ${s##*/}"; done +announce Gluon will be built for the following sites:$sites >&2 +announce The following targets will be generated: $targets >&2 +popd >/dev/null + +pushd "${gluon_path}" >/dev/null +announce Starting make update... +for s in $sites; do + export GLUON_SITEDIR="${site_path}/sites/${s}" + export GLUON_OUTPUTDIR="${gluon_out}/${s}/${GLUON_BRANCH}/${GLUON_RELEASE}" + export GLUON_IMAGEDIR="${GLUON_OUTPUTDIR}/images" + export GLUON_MODULEDIR="${GLUON_OUTPUTDIR}/modules" + rm -rf "${GLUON_OUTPUTDIR}" + mkdir -p "${GLUON_IMAGEDIR}" "${GLUON_MODULEDIR}" + make update + # Try to install patches. I wasn't able to figure out how patches in gluon/site/patches work. + for p in ${site_path}/patches/*.patch; do + if [ -e "$p" -a ! -f "${gluon_path}/${p##*/}" ]; then + announce Installing patch $p + patch -p1 < $p + touch "${gluon_path}/${p##*/}" + fi + done + for t in $targets; do + announce Starting build for $s/$t... >&2 + make -j$(nproc) GLUON_TARGET=$t $verbose + done + announce Building manifest... + make manifest +done +popd >/dev/null diff --git a/config/defaults.erb b/config/defaults.erb new file mode 100644 index 0000000..792707f --- /dev/null +++ b/config/defaults.erb @@ -0,0 +1,55 @@ +<% +#gluon_branch = "stable" +gluon_branch = "experimental" +gluon_release = "0.9.0" + +# Add the +exp and current date if this is an experimental release +gluon_release += "+exp" + Time.new.strftime("%Y%m%d") if gluon_branch == "experimental" + +gluon_targets = %w( + ar71xx-generic + ar71xx-nand + mpc85xx-generic + x86-generic + x86-64 +) + +gluon_site_packages = %w( + gluon-autoupdater + gluon-config-mode-autoupdater + gluon-config-mode-core + gluon-config-mode-hostname + gluon-config-mode-mesh-vpn + gluon-ebtables-filter-multicast + gluon-ebtables-filter-ra-dhcp + gluon-ebtables-segment-mld + gluon-mesh-vpn-fastd + gluon-radvd + gluon-respondd + gluon-setup-mode + gluon-status-page + gluon-web-admin + gluon-web-autoupdater + gluon-web-network + gluon-web-private-wifi + gluon-web-wifi-config + haveged + iptables + iwinfo +) + +gluon_ath10k_mesh = "11s" + +signing_keys = [ + '417ef22f886539ddbcffbad35e9f493195ca53e05f75bd8d8011a4999498b589', # baldo + 'ef73bc52b929fd11efce9a5c8f0b5463f1766bb995c8a0b3b6bcd7ba45b8b1e6', # leo + '3f0fc50d4e5c893f9f58f98874bd21080b93c28ff5e4d4946352cada1b4e6441', # andre + '1d37eacbd70f72730b1f5aba246a6a8eab100e2d45dda0163d9ad827f70f88d4', # gernot + 'bd5a70d4c3df30eaa860d615c0e0526b0dda5bc60c09c20972bce4ffa7512659', # bjoern + 'd9992853c0fe1a2e983cc222b6bd26e70d4fb2a53862ac099144e9e8142238d0', # daniel +] +signing_keys_experimental = [ + '1a0112fe489860068480c611c5dc56196c2f1a645db651ea2ed19ae0f0e8e1d1', # 1.builder +] + +-%> diff --git a/config/ffhh-sued.erb b/config/ffhh-sued.erb new file mode 100644 index 0000000..cc64d7f --- /dev/null +++ b/config/ffhh-sued.erb @@ -0,0 +1,42 @@ +<% +site_name = 'Freifunk Hamburg Sued' +site_code = 'ffhh-sued' + +gluon_site_packages += %w( gluon-mesh-batman-adv-15 ) +gluon_ath10k_mesh = "11s" + +prefix4 = '10.112.64.0/19' +prefix6 = '2a03:2267:1::/64' + +next_node_ipv4 = '10.112.64.1' +next_node_ipv6 = '2a03:2267:1::1' + +mtu = 1312 + +gateways = { + "gateway01" => { + "key" => "cb09c68e2d2f7d374d47035cd532e0a60b8b3a7447aa5a7f76f4f15c8ffa9e58", + "remotes" => [ '"gw01-new.hamburg.freifunk.net" port 10003' ] + }, + "gateway02" => { + "key" => "462b4e21ab5eb0f9de687efd97252880c895ba55cc9cc0755a75347b0965b6e0", + "remotes" => [ '"gw02-new.hamburg.freifunk.net" port 10003' ] + }, + "gateway03" => { + "key" => "e15295b86138ac490d611e4100f847ccfb7052d5091ded4659f25940be2c0546", + "remotes" => [ '"gw03-new.hamburg.freifunk.net" port 10003' ] + }, + "gateway04" => { + "key" => "fca88dd58316f4ab50d2a697123dddf4d0ba3aad52ddeb0ba7835cdbbeb60dbf", + "remotes" => [ '"gw04-new.hamburg.freifunk.net" port 10004' ] + }, + "gateway05" => { + "key" => "84986658775167dff6918dc8e0529c4a4524cb1782849a80933ddb6d8c6bd3f5", + "remotes" => [ '"gw05-new.hamburg.freifunk.net" port 10004' ] + }, + "gateway06" => { + "key" => "fb608aa75180ba88b4a3399a6498e68796d200afc1bfd275a0dcb903a31f39b6", + "remotes" => [ '"gw06-new.hamburg.freifunk.net" port 10004' ] + }, +} +-%> diff --git a/config/ffhh.erb b/config/ffhh.erb new file mode 100644 index 0000000..4edaff8 --- /dev/null +++ b/config/ffhh.erb @@ -0,0 +1,54 @@ +<% +site_name = 'Freifunk Hamburg' +site_code = 'ffhh' + +gluon_site_packages += %w( gluon-mesh-batman-adv-14 gluon-alfred ) +gluon_ath10k_mesh = "ibss" + +prefix4 = '10.112.0.0/18' +prefix6 = '2a03:2267::/64' + +next_node_ipv4 = '10.112.0.1' +next_node_ipv6 = '2a03:2267::1' + +mtu = 1280 + +gateways = { + "gateway01" => { + "key" => "cb09c68e2d2f7d374d47035cd532e0a60b8b3a7447aa5a7f76f4f15c8ffa9e58", + "remotes" => [ '"gw01.hamburg.freifunk.net" port 10001' ] + }, + "gateway02" => { + "key" => "462b4e21ab5eb0f9de687efd97252880c895ba55cc9cc0755a75347b0965b6e0", + "remotes" => [ '"gw02.hamburg.freifunk.net" port 10001' ] + }, + "gateway03" => { + "key" => "e15295b86138ac490d611e4100f847ccfb7052d5091ded4659f25940be2c0546", + "remotes" => [ '"gw03.hamburg.freifunk.net" port 10001' ] + }, + "gateway04" => { + "key" => "fca88dd58316f4ab50d2a697123dddf4d0ba3aad52ddeb0ba7835cdbbeb60dbf", + "remotes" => [ '"gw04.hamburg.freifunk.net" port 10000' ] + }, + "gateway05" => { + "key" => "84986658775167dff6918dc8e0529c4a4524cb1782849a80933ddb6d8c6bd3f5", + "remotes" => [ '"gw05.hamburg.freifunk.net" port 10001' ] + }, + "gateway06" => { + "key" => "fb608aa75180ba88b4a3399a6498e68796d200afc1bfd275a0dcb903a31f39b6", + "remotes" => [ '"gw06.hamburg.freifunk.net" port 10000' ] + }, + "gateway08" => { + "key" => "67e9b215248ada3f4ffcc9db0bdf897128f6236a0d4e8d660762b77bebc914d4", + "remotes" => [ '"gw08.hamburg.freifunk.net" port 10001' ] + }, + "gateway09" => { + "key" => "5f483f6d26ac9106d86c0edcd08cf92c18caf67933719a394915ab809d1fb2bc", + "remotes" => [ '"gw09.hamburg.freifunk.net" port 10001' ] + }, + "gateway12" => { + "key" => "facbbfb07525782fcde22b929f36ea508a295619eca35782003d9ca2dd3cc524", + "remotes" => [ '"gw12.hamburg.freifunk.net" port 10001' ] + } +} +-%> diff --git a/sites/ffhh-sued/site.conf b/sites/ffhh-sued/site.conf deleted file mode 100644 index c40b955..0000000 --- a/sites/ffhh-sued/site.conf +++ /dev/null @@ -1,139 +0,0 @@ -{ - hostname_prefix = 'GibMirEinenNamen', - site_name = 'Freifunk Hamburg Sued', - site_code = 'ffhh-sued', - - opkg = { - lede = 'http://opkg.services.ffhh/lede/snapshots/packages/%A', - extra = { - modules = 'http://updates.hamburg.freifunk.net/%GS/stable/archive/modules/gluon-%GS-%GR/%S', - }, - }, - - prefix4 = '10.112.64.0/19', - prefix6 = '2a03:2267:1::/64', - - timezone = 'CET-1CEST,M3.5.0,M10.5.0/3', -- Europe/Berlin - ntp_servers = {'1.ntp.services.ffhh','2.ntp.services.ffhh'}, - regdom = 'DE', - - wifi24 = { - channel = 1, - - supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000}, - basic_rate = {6000, 9000, 18000, 36000, 54000}, - - ap = { - ssid = 'hamburg.freifunk.net', - }, - mesh = { - id = '6668682D73756564', - mcast_rate = 12000, - }, - }, - - wifi5 = { - channel = 44, - ap = { - ssid = 'hamburg.freifunk.net', - }, - mesh = { - id = '6668682D73756564', - mcast_rate = 12000, - }, - }, - - next_node = { - ip4 = '10.112.64.1', - ip6 = '2a03:2267:1::1', - - mac = '16:41:95:40:f7:dc', - }, - - mesh_vpn = { - enabled = true, - mtu = 1312, - fastd = { - configurable = true, - methods = {'salsa2012+umac'}, - groups = { - backbone = { - limit = 1, - peers = { - gateway01 = { - key = 'cb09c68e2d2f7d374d47035cd532e0a60b8b3a7447aa5a7f76f4f15c8ffa9e58', - remotes = {'"gw01-new.hamburg.freifunk.net" port 10003'}, - }, - gateway02 = { - key = '462b4e21ab5eb0f9de687efd97252880c895ba55cc9cc0755a75347b0965b6e0', - remotes = {'"gw02-new.hamburg.freifunk.net" port 10003'}, - }, - gateway03 = { - key = 'e15295b86138ac490d611e4100f847ccfb7052d5091ded4659f25940be2c0546', - remotes = {'"gw03-new.hamburg.freifunk.net" port 10003'}, - }, - gateway04 = { - key = 'fca88dd58316f4ab50d2a697123dddf4d0ba3aad52ddeb0ba7835cdbbeb60dbf', - remotes = {'"gw04-new.hamburg.freifunk.net" port 10004'}, - }, - gateway05 = { - key = '84986658775167dff6918dc8e0529c4a4524cb1782849a80933ddb6d8c6bd3f5', - remotes = {'"gw05-new.hamburg.freifunk.net" port 10004'}, - }, - gateway06 = { - key = 'fb608aa75180ba88b4a3399a6498e68796d200afc1bfd275a0dcb903a31f39b6', - remotes = {'"gw06-new.hamburg.freifunk.net" port 10004'}, - }, - }, - }, - }, - }, - bandwidth_limit = { - enabled = false, - ingress = 8096, - egress = 1024, - }, - }, - - autoupdater = { - branch = 'experimental', - branches = { - stable = { - name = 'stable', - mirrors = {'http://1.updates.services.ffhh/ffhh-sued/stable/sysupgrade','http://2.updates.services.ffhh/ffhh-sued/stable/sysupgrade'}, - good_signatures = 2, - pubkeys = { - '417ef22f886539ddbcffbad35e9f493195ca53e05f75bd8d8011a4999498b589', -- baldo - 'ef73bc52b929fd11efce9a5c8f0b5463f1766bb995c8a0b3b6bcd7ba45b8b1e6', -- leo - '3f0fc50d4e5c893f9f58f98874bd21080b93c28ff5e4d4946352cada1b4e6441', -- andre - '1d37eacbd70f72730b1f5aba246a6a8eab100e2d45dda0163d9ad827f70f88d4', -- gernot - 'bd5a70d4c3df30eaa860d615c0e0526b0dda5bc60c09c20972bce4ffa7512659', -- bjoern - 'd9992853c0fe1a2e983cc222b6bd26e70d4fb2a53862ac099144e9e8142238d0', -- daniel - }, - }, - beta = { - name = 'beta', - mirrors = {'http://1.updates.services.ffhh/ffhh-sued/beta/sysupgrade','http://2.updates.services.ffhh/ffhh-sued/beta/sysupgrade'}, - good_signatures = 2, - pubkeys = { - '417ef22f886539ddbcffbad35e9f493195ca53e05f75bd8d8011a4999498b589', -- baldo - 'ef73bc52b929fd11efce9a5c8f0b5463f1766bb995c8a0b3b6bcd7ba45b8b1e6', -- leo - '3f0fc50d4e5c893f9f58f98874bd21080b93c28ff5e4d4946352cada1b4e6441', -- andre - '1d37eacbd70f72730b1f5aba246a6a8eab100e2d45dda0163d9ad827f70f88d4', -- gernot - 'bd5a70d4c3df30eaa860d615c0e0526b0dda5bc60c09c20972bce4ffa7512659', -- bjoern - 'd9992853c0fe1a2e983cc222b6bd26e70d4fb2a53862ac099144e9e8142238d0', -- daniel - }, - }, - experimental = { - name = 'experimental', - mirrors = {'http://1.updates.services.ffhh/ffhh-sued/experimental/sysupgrade','http://2.updates.services.ffhh/ffhh-sued/experimental/sysupgrade'}, - good_signatures = 1, - pubkeys = { - '1a0112fe489860068480c611c5dc56196c2f1a645db651ea2ed19ae0f0e8e1d1', -- 1.builder - }, - }, - }, - }, - - poe_passthrough = false, -} diff --git a/sites/ffhh-sued/site.mk b/sites/ffhh-sued/site.mk deleted file mode 100644 index ccd260c..0000000 --- a/sites/ffhh-sued/site.mk +++ /dev/null @@ -1,38 +0,0 @@ -GLUON_SITE_PACKAGES := \ - gluon-mesh-batman-adv-15 \ - gluon-autoupdater \ - gluon-config-mode-autoupdater \ - gluon-config-mode-core \ - gluon-config-mode-hostname \ - gluon-config-mode-mesh-vpn \ - gluon-ebtables-filter-multicast \ - gluon-ebtables-filter-ra-dhcp \ - gluon-ebtables-segment-mld \ - gluon-web-admin \ - gluon-web-autoupdater \ - gluon-web-network \ - gluon-web-private-wifi \ - gluon-web-wifi-config \ - gluon-mesh-vpn-fastd \ - gluon-radvd \ - gluon-respondd \ - gluon-setup-mode \ - gluon-status-page \ - iwinfo \ - iptables \ - haveged - - -DEFAULT_GLUON_RELEASE := 0.9~exp$(shell date '+%Y%m%d') - -# Allow overriding the release number from the command line -GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE) - -GLUON_PRIORITY ?= 0 - -# Region code required for some images; supported values: us eu -GLUON_REGION ?= eu - -GLUON_ATH10K_MESH ?= 11s - -GLUON_LANGS ?= en de diff --git a/sites/ffhh/modules b/sites/ffhh/modules deleted file mode 100644 index 6416262..0000000 --- a/sites/ffhh/modules +++ /dev/null @@ -1,5 +0,0 @@ -GLUON_SITE_FEEDS='ffhh_packages' - -PACKAGES_FFHH_PACKAGES_REPO=git://github.com/freifunkhamburg/ffhh-packages.git -PACKAGES_FFHH_PACKAGES_COMMIT=ef9fcc1222f74c3c045b1450537a4b8b80efb56c - diff --git a/sites/ffhh/site.conf b/sites/ffhh/site.conf deleted file mode 100644 index 8399090..0000000 --- a/sites/ffhh/site.conf +++ /dev/null @@ -1,158 +0,0 @@ -{ - hostname_prefix = 'GibMirEinenNamen', - site_name = 'Freifunk Hamburg', - site_code = 'ffhh', - - opkg = { - openwrt = 'http://opkg.services.ffhh/%n/%v/%S/packages', - extra = { - modules = 'http://updates.hamburg.freifunk.net/stable/archive/modules/gluon-%GS-%GR/%S', - }, - }, - - prefix4 = '10.112.0.0/18', - prefix6 = '2a03:2267::/64', - - timezone = 'CET-1CEST,M3.5.0,M10.5.0/3', -- Europe/Berlin - ntp_servers = {'1.ntp.services.ffhh','2.ntp.services.ffhh'}, - regdom = 'DE', - - wifi24 = { - channel = 1, - - supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000}, - basic_rate = {6000, 9000, 18000, 36000, 54000}, - - ap = { - ssid = 'hamburg.freifunk.net', - }, - ibss = { - ssid = 'f8:d1:11:87:52:2e', - bssid = 'f8:d1:11:87:52:2e', - mcast_rate = 12000, - }, - --[[ mesh = { - id = 'ffhh-mesh', - mcast_rate = 12000, - }, --]] - }, - - wifi5 = { - channel = 44, - ap = { - ssid = 'hamburg.freifunk.net', - }, - ibss = { - ssid = 'f8:d1:11:87:52:2e', - bssid = 'f8:d1:11:87:52:2e', - mcast_rate = 12000, - }, - --[[ mesh = { - id = 'ffhh-mesh', - mcast_rate = 12000, - }, --]] - }, - - next_node = { - ip4 = '10.112.0.1', - ip6 = '2a03:2267::1', - - mac = '16:41:95:40:f7:dc', - }, - - fastd_mesh_vpn = { - enabled = true, - methods = {'salsa2012+umac'}, - mtu = 1280, - groups = { - backbone = { - limit = 1, - peers = { - gateway01 = { - key = 'cb09c68e2d2f7d374d47035cd532e0a60b8b3a7447aa5a7f76f4f15c8ffa9e58', - remotes = {'"gw01.hamburg.freifunk.net" port 10001'}, - }, - gateway02 = { - key = '462b4e21ab5eb0f9de687efd97252880c895ba55cc9cc0755a75347b0965b6e0', - remotes = {'"gw02.hamburg.freifunk.net" port 10001'}, - }, - gateway03 = { - key = 'e15295b86138ac490d611e4100f847ccfb7052d5091ded4659f25940be2c0546', - remotes = {'"gw03.hamburg.freifunk.net" port 10001'}, - }, - gateway04 = { - key = 'fca88dd58316f4ab50d2a697123dddf4d0ba3aad52ddeb0ba7835cdbbeb60dbf', - remotes = {'"gw04.hamburg.freifunk.net" port 10000'}, - }, - gateway05 = { - key = '84986658775167dff6918dc8e0529c4a4524cb1782849a80933ddb6d8c6bd3f5', - remotes = {'"gw05.hamburg.freifunk.net" port 10001'}, - }, - gateway06 = { - key = 'fb608aa75180ba88b4a3399a6498e68796d200afc1bfd275a0dcb903a31f39b6', - remotes = {'"gw06.hamburg.freifunk.net" port 10000'}, - }, - gateway08 = { - key = '67e9b215248ada3f4ffcc9db0bdf897128f6236a0d4e8d660762b77bebc914d4', - remotes = {'"gw08.hamburg.freifunk.net" port 10001'}, - }, - gateway09 = { - key = '5f483f6d26ac9106d86c0edcd08cf92c18caf67933719a394915ab809d1fb2bc', - remotes = {'"gw09.hamburg.freifunk.net" port 10001'}, - }, - gateway12 = { - key = 'facbbfb07525782fcde22b929f36ea508a295619eca35782003d9ca2dd3cc524', - remotes = {'"gw12.hamburg.freifunk.net" port 10001'}, - }, - }, - }, - }, - bandwidth_limit = { - enabled = false, - ingress = 8096, - egress = 1024, - }, - }, - - autoupdater = { - branch = 'experimental', - branches = { - stable = { - name = 'stable', - mirrors = {'http://1.updates.services.ffhh/stable/sysupgrade','http://2.updates.services.ffhh/stable/sysupgrade'}, - good_signatures = 2, - pubkeys = { - '417ef22f886539ddbcffbad35e9f493195ca53e05f75bd8d8011a4999498b589', -- baldo - 'ef73bc52b929fd11efce9a5c8f0b5463f1766bb995c8a0b3b6bcd7ba45b8b1e6', -- leo - '3f0fc50d4e5c893f9f58f98874bd21080b93c28ff5e4d4946352cada1b4e6441', -- andre - '1d37eacbd70f72730b1f5aba246a6a8eab100e2d45dda0163d9ad827f70f88d4', -- gernot - 'bd5a70d4c3df30eaa860d615c0e0526b0dda5bc60c09c20972bce4ffa7512659', -- bjoern - 'd9992853c0fe1a2e983cc222b6bd26e70d4fb2a53862ac099144e9e8142238d0', -- daniel - }, - }, - beta = { - name = 'beta', - mirrors = {'http://1.updates.services.ffhh/beta/sysupgrade','http://2.updates.services.ffhh/beta/sysupgrade'}, - good_signatures = 2, - pubkeys = { - '417ef22f886539ddbcffbad35e9f493195ca53e05f75bd8d8011a4999498b589', -- baldo - 'ef73bc52b929fd11efce9a5c8f0b5463f1766bb995c8a0b3b6bcd7ba45b8b1e6', -- leo - '3f0fc50d4e5c893f9f58f98874bd21080b93c28ff5e4d4946352cada1b4e6441', -- andre - '1d37eacbd70f72730b1f5aba246a6a8eab100e2d45dda0163d9ad827f70f88d4', -- gernot - 'bd5a70d4c3df30eaa860d615c0e0526b0dda5bc60c09c20972bce4ffa7512659', -- bjoern - 'd9992853c0fe1a2e983cc222b6bd26e70d4fb2a53862ac099144e9e8142238d0', -- daniel - }, - }, - experimental = { - name = 'experimental', - mirrors = {'http://1.updates.services.ffhh/experimental/sysupgrade','http://2.updates.services.ffhh/experimental/sysupgrade'}, - good_signatures = 1, - pubkeys = { - '1a0112fe489860068480c611c5dc56196c2f1a645db651ea2ed19ae0f0e8e1d1', -- 1.builder - }, - }, - }, - }, - - poe_passthrough = false, -} diff --git a/sites/ffhh/site.mk b/sites/ffhh/site.mk deleted file mode 100644 index e94a3c3..0000000 --- a/sites/ffhh/site.mk +++ /dev/null @@ -1,40 +0,0 @@ -GLUON_SITE_PACKAGES := \ - gluon-mesh-batman-adv-14 \ - gluon-alfred \ - gluon-autoupdater \ - gluon-config-mode-autoupdater \ - gluon-config-mode-core \ - gluon-config-mode-hostname \ - gluon-config-mode-mesh-vpn \ - gluon-config-mode-reboot-ffhh \ - gluon-ebtables-filter-multicast \ - gluon-ebtables-filter-ra-dhcp \ - gluon-ebtables-segment-mld \ - gluon-luci-admin \ - gluon-luci-autoupdater \ - gluon-luci-portconfig \ - gluon-luci-private-wifi \ - gluon-luci-wifi-config \ - gluon-mesh-vpn-fastd \ - gluon-radvd \ - gluon-respondd \ - gluon-setup-mode \ - gluon-status-page \ - iwinfo \ - iptables \ - haveged - - -DEFAULT_GLUON_RELEASE := 0.9~exp$(shell date '+%Y%m%d') - -# Allow overriding the release number from the command line -GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE) - -GLUON_PRIORITY ?= 0 - -# Region code required for some images; supported values: us eu -GLUON_REGION ?= eu - -GLUON_ATH10K_MESH ?= ibss - -GLUON_LANGS ?= en de diff --git a/template/info.erb b/template/info.erb new file mode 100644 index 0000000..685d4a9 --- /dev/null +++ b/template/info.erb @@ -0,0 +1,3 @@ +GLUON_RELEASE="<%= gluon_release %>" +GLUON_BRANCH="<%= gluon_branch %>" +targets="<%= gluon_targets.join(" ") %>" diff --git a/sites/ffhh-sued/modules b/template/modules.erb similarity index 100% rename from sites/ffhh-sued/modules rename to template/modules.erb diff --git a/template/site.conf.erb b/template/site.conf.erb new file mode 100644 index 0000000..2a5f60c --- /dev/null +++ b/template/site.conf.erb @@ -0,0 +1,133 @@ +{ + hostname_prefix = 'GibMirEinenNamen', + site_name = '<%= site_name %>', + site_code = '<%= site_code %>', + + opkg = { + lede = 'http://opkg.services.ffhh/lede/snapshots/packages/%A', + extra = { + modules = 'http://updates.hamburg.freifunk.net/%GS/stable/archive/modules/gluon-%GS-%GR/%S', + }, + }, + + prefix4 = '<%= prefix4 %>', + prefix6 = '<%= prefix6 %>', + + timezone = 'CET-1CEST,M3.5.0,M10.5.0/3', -- Europe/Berlin + ntp_servers = {'1.ntp.services.ffhh','2.ntp.services.ffhh'}, + regdom = 'DE', + + wifi24 = { + channel = 1, + + supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000}, + basic_rate = {6000, 9000, 18000, 36000, 54000}, + + ap = { + ssid = 'hamburg.freifunk.net', + }, +<% if gluon_ath10k_mesh == "11s" -%> + mesh = { + id = '6668682D73756564', + mcast_rate = 12000, + }, +<% else -%> + ibss = { + ssid = 'f8:d1:11:87:52:2e', + bssid = 'f8:d1:11:87:52:2e', + mcast_rate = 12000, + }, +<% end -%> + }, + + wifi5 = { + channel = 44, + ap = { + ssid = 'hamburg.freifunk.net', + }, +<% if gluon_ath10k_mesh == "11s" -%> + mesh = { + id = '6668682D73756564', + mcast_rate = 12000, + }, +<% else -%> + ibss = { + ssid = 'f8:d1:11:87:52:2e', + bssid = 'f8:d1:11:87:52:2e', + mcast_rate = 12000, + }, +<% end -%> + }, + + next_node = { + ip4 = '<%= next_node_ipv4 %>', + ip6 = '<%= next_node_ipv6 %>', + + mac = '16:41:95:40:f7:dc', + }, + + mesh_vpn = { + enabled = true, + mtu = <%= mtu %>, + fastd = { + configurable = true, + methods = {'salsa2012+umac'}, + groups = { + backbone = { + limit = 1, + peers = { +<% gateways.each_pair do | name, gw_data | -%> + <%= name %> = { + key = '<%= gw_data['key'] %>', + remotes = { '<%= gw_data['remotes'].join("', '") %>' }, + }, +<% end -%> + }, + }, + }, + }, + bandwidth_limit = { + enabled = false, + ingress = 8096, + egress = 1024, + }, + }, + + autoupdater = { + branch = '<%= gluon_branch %>', + branches = { + stable = { + name = 'stable', + mirrors = {'http://1.updates.services.ffhh/<%= site_code %>/stable/sysupgrade','http://2.updates.services.ffhh/<%= site_code %>/stable/sysupgrade'}, + good_signatures = 2, + pubkeys = { +<% signing_keys.each do | key | -%> + '<%= key %>', +<% end -%> + }, + }, + beta = { + name = 'beta', + mirrors = {'http://1.updates.services.ffhh/<%= site_code %>/beta/sysupgrade','http://2.updates.services.ffhh/<%= site_code %>/beta/sysupgrade'}, + good_signatures = 2, + pubkeys = { +<% signing_keys.each do | key | -%> + '<%= key %>', +<% end -%> + }, + }, + experimental = { + name = 'experimental', + mirrors = {'http://1.updates.services.ffhh/<%= site_code %>/experimental/sysupgrade','http://2.updates.services.ffhh/<%= site_code %>/experimental/sysupgrade'}, + good_signatures = 1, + pubkeys = { +<% signing_keys_experimental.each do | key | -%> + '<%= key %>', +<% end -%> + }, + }, + }, + }, + + poe_passthrough = false, +} diff --git a/template/site.mk.erb b/template/site.mk.erb new file mode 100644 index 0000000..48d48b7 --- /dev/null +++ b/template/site.mk.erb @@ -0,0 +1,17 @@ +GLUON_SITE_PACKAGES :=<% gluon_site_packages.each do | p | -%> +<%= " " + p -%> +<% end -%> + +DEFAULT_GLUON_RELEASE := <%= gluon_release %> + +# Allow overriding the release number from the command line +GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE) + +GLUON_PRIORITY ?= 0 + +# Region code required for some images; supported values: us eu +GLUON_REGION ?= eu + +GLUON_ATH10K_MESH ?= <%= gluon_ath10k_mesh %> + +GLUON_LANGS ?= en de