diff --git a/Makefile b/Makefile index d12b97a8..b5f4305b 100644 --- a/Makefile +++ b/Makefile @@ -89,19 +89,20 @@ manifest: FORCE @echo '$(GLUON_PRIORITY)' | grep -qE '^([0-9]*\.)?[0-9]+$$' || (echo 'Please specify a numeric value for GLUON_PRIORITY to create a manifest.'; false) @$(CheckExternal) - mkdir -p $(GLUON_IMAGEDIR)/sysupgrade - ( \ echo 'BRANCH=$(GLUON_BRANCH)' && \ echo 'DATE=$(shell $(GLUON_ORIGOPENWRTDIR)/staging_dir/host/bin/lua $(GLUONDIR)/scripts/rfc3339date.lua)' && \ echo 'PRIORITY=$(GLUON_PRIORITY)' && \ echo \ - ) > $(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest + ) > $(GLUON_BUILDDIR)/$(GLUON_BRANCH).manifest.tmp +($(foreach GLUON_TARGET,$(GLUON_TARGETS), \ ( [ ! -e $(BOARD_BUILDDIR)/prepared ] || ( $(GLUONMAKE) manifest GLUON_TARGET='$(GLUON_TARGET)' V=s$(OPENWRT_VERBOSE) ) ) && \ ) :) + mkdir -p $(GLUON_IMAGEDIR)/sysupgrade + mv $(GLUON_BUILDDIR)/$(GLUON_BRANCH).manifest.tmp $(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest + dirclean : FORCE for dir in build_dir dl staging_dir tmp; do \ rm -rf $(GLUON_ORIGOPENWRTDIR)/$$dir; \ @@ -190,7 +191,9 @@ prepare-tmpinfo: FORCE f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \ [ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $${type}_config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \ done + [ tmp/.config-feeds.in -nt tmp/.packagefeeds ] || ./scripts/feeds feed_config > tmp/.config-feeds.in ./scripts/metadata.pl package_mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; } + ./scripts/metadata.pl package_feeds tmp/.packageinfo > tmp/.packagefeeds || { rm -f tmp/.packagefeeds; false; } touch $(TOPDIR)/tmp/.build feeds: FORCE @@ -201,13 +204,24 @@ feeds: FORCE +$(GLUONMAKE_EARLY) prepare-tmpinfo config: FORCE + +$(NO_TRACE_MAKE) scripts/config/conf OPENWRT_BUILD=0 +$(GLUONMAKE) prepare-tmpinfo ( \ cat $(GLUONDIR)/include/config $(GLUONDIR)/targets/$(GLUON_TARGET)/config; \ + echo 'CONFIG_BUILD_SUFFIX="gluon-$(GLUON_TARGET)"'; \ echo '$(patsubst %,CONFIG_PACKAGE_%=m,$(sort $(filter-out -%,$(GLUON_DEFAULT_PACKAGES) $(GLUON_SITE_PACKAGES) $(PROFILE_PACKAGES))))' \ | sed -e 's/ /\n/g'; \ - ) > .config - +$(NO_TRACE_MAKE) defconfig OPENWRT_BUILD=0 + echo '$(patsubst %,CONFIG_GLUON_LANG_%=y,$(GLUON_LANGS))' \ + | sed -e 's/ /\n/g'; \ + ) > $(BOARD_BUILDDIR)/config.tmp + scripts/config/conf --defconfig=$(BOARD_BUILDDIR)/config.tmp Config.in + mv .config $(BOARD_BUILDDIR)/config + + echo 'CONFIG_ALL_KMODS=y' >> $(BOARD_BUILDDIR)/config.tmp + scripts/config/conf --defconfig=$(BOARD_BUILDDIR)/config.tmp Config.in + mv .config $(BOARD_BUILDDIR)/config-allmods + + cp $(BOARD_BUILDDIR)/config .config prepare-target: FORCE rm $(GLUON_OPENWRTDIR)/tmp || true @@ -243,7 +257,6 @@ clean: FORCE rm -f $(gluon_prepared_stamp) -export MD5SUM := $(GLUONDIR)/scripts/md5sum.sh export SHA512SUM := $(GLUONDIR)/scripts/sha512sum.sh @@ -293,11 +306,10 @@ include $(INCLUDE_DIR)/package-ipkg.mk # override variables from rules.mk PACKAGE_DIR = $(GLUON_OPENWRTDIR)/bin/$(BOARD)/packages -PROFILE_BUILDDIR = $(BOARD_BUILDDIR)/$(PROFILE) +PROFILE_BUILDDIR = $(BOARD_BUILDDIR)/profiles/$(PROFILE) PROFILE_KDIR = $(PROFILE_BUILDDIR)/kernel BIN_DIR = $(PROFILE_BUILDDIR)/images -TMP_DIR = $(PROFILE_BUILDDIR)/tmp TARGET_DIR = $(PROFILE_BUILDDIR)/root PREPARED_RELEASE = $$(cat $(gluon_prepared_stamp)) @@ -354,8 +366,8 @@ opkg_config: FORCE image: FORCE - rm -rf $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(PROFILE_KDIR) - mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(TARGET_DIR)/tmp $(GLUON_IMAGEDIR)/factory $(GLUON_IMAGEDIR)/sysupgrade + rm -rf $(TARGET_DIR) $(BIN_DIR) $(PROFILE_KDIR) + mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TARGET_DIR)/tmp $(GLUON_IMAGEDIR)/factory $(GLUON_IMAGEDIR)/sysupgrade cp -r $(BOARD_KDIR) $(PROFILE_KDIR) +$(GLUONMAKE) package_install @@ -393,7 +405,7 @@ manifest: FORCE [ -e "$$file" ] && echo '$(model)' "$(PREPARED_RELEASE)" "$$($(SHA512SUM) "$$file")" "$$file"; \ ) \ ) : \ - ) >> $(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest + ) >> $(GLUON_BUILDDIR)/$(GLUON_BRANCH).manifest.tmp .PHONY: all images prepare clean gluon-tools manifest diff --git a/contrib/sign.sh b/contrib/sign.sh index a88c52df..082e967e 100755 --- a/contrib/sign.sh +++ b/contrib/sign.sh @@ -18,23 +18,23 @@ See also EOHELP exit 1 fi - -SECRET=$1 - -manifest=$2 -upper=$(mktemp) -lower=$(mktemp) - + +SECRET="$1" + +manifest="$2" +upper="$(mktemp)" +lower="$(mktemp)" + awk "BEGIN { sep=0 } /^---\$/ { sep=1; next } { if(sep==0) print > \"$upper\"; else print > \"$lower\"}" \ - $manifest - -ecdsasign $upper < $SECRET >> $lower - -cat $upper > $manifest -echo --- >> $manifest -cat $lower >> $manifest - -rm -f $upper $lower + "$manifest" + +ecdsasign "$upper" < "$SECRET" >> "$lower" + +cat "$upper" > "$manifest" +echo --- >> "$manifest" +cat "$lower" >> "$manifest" + +rm -f "$upper" "$lower" diff --git a/docs/conf.py b/docs/conf.py index d77832bf..4cf0a96e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,9 +54,9 @@ copyright = '2014, Project Gluon' # built documents. # # The short X.Y version. -version = '2014.3' +version = '2014.4+' # The full version, including alpha/beta/rc tags. -release = '2014.3' +release = '2014.4+' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/index.rst b/docs/index.rst index c7e60ee8..a53c0a8d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -98,6 +98,7 @@ Releases .. toctree:: :maxdepth: 1 + releases/v2015.1 releases/v2014.4 releases/v2014.3.1 releases/v2014.3 diff --git a/docs/releases/v2015.1.rst b/docs/releases/v2015.1.rst new file mode 100644 index 00000000..8ce3db0f --- /dev/null +++ b/docs/releases/v2015.1.rst @@ -0,0 +1,30 @@ +Gluon 2015.1 (in development) +============================= + +Added (and removed) hardware support +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +New features +~~~~~~~~~~~~ + + +Bugfixes +~~~~~~~~ + + +Site changes +~~~~~~~~~~~~ +* ``site.conf`` + + - ``hostname_prefix`` is now optional, and is concatenated directly with the + generated node ID, in particular no hyphen is inserted anymore. If you want + to keep the old behaviour, you have to append the hyphen to the + ``hostname_prefix`` field of your ``site.conf``. + +Internals +~~~~~~~~~ + + +Known Issues +~~~~~~~~~~~~ diff --git a/docs/site-example/i18n/de.po b/docs/site-example/i18n/de.po new file mode 100644 index 00000000..271172a4 --- /dev/null +++ b/docs/site-example/i18n/de.po @@ -0,0 +1,35 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2015-03-19 20:28+0100\n" +"Last-Translator: Matthias Schiffer \n" +"Language-Team: German\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "gluon-config-mode:welcome" +msgstr "" +"Willkommen zum Einrichtungsassistenten für deinen neuen Entenhausener " +"Freifunk-Knoten. Fülle das folgende Formular deinen Vorstellungen " +"entsprechend aus und sende es ab." + +msgid "gluon-config-mode:pubkey" +msgstr "" +"Dies ist der öffentliche Schlüssel deines Freifunk-Knotens. Erst nachdem " +"er auf den Servern des Entenhausener Freifunk-Projektes eingetragen wurde, " +"kann sich dein Knoten mit dem Entenhausener Mesh-VPN zu verbinden. Bitte " +"schicke dazu diesen Schlüssel und den Namen deines Knotens " +"(<%=hostname%>) an " +"keys@entenhausen.freifunk.net." + +msgid "gluon-config-mode:reboot" +msgstr "" +"

Dein Knoten startet gerade neu und wird anschließend versuchen, " +"sich mit anderen Freifunkknoten in seiner Nähe zu " +"verbinden. Weitere Informationen zur " +"Entenhausener Freifunk-Community findest du auf " +"unserer Webseite.

" +"

Viel Spaß mit deinem Knoten und der Erkundung von Freifunk!

" diff --git a/docs/site-example/i18n/en.po b/docs/site-example/i18n/en.po new file mode 100644 index 00000000..bfbbc882 --- /dev/null +++ b/docs/site-example/i18n/en.po @@ -0,0 +1,33 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2015-03-19 20:28+0100\n" +"Last-Translator: Matthias Schiffer \n" +"Language-Team: English\n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "gluon-config-mode:welcome" +msgstr "" +"Welcome the the setup wizard of your new Freifunk Duckburg node. " +"Please fill out the following form and transmit it." + +msgid "gluon-config-mode:pubkey" +msgstr "" +"This is your Freifunk node's public key. The node won't be able to " +"connect to the mesh VPN until the key has been registered on the Freifunk " +"Duckburg servers. " +"To register the key send it together with your node's name (<%=hostname%>) to " +"keys@entenhausen.freifunk.net." + + +msgid "gluon-config-mode:reboot" +msgstr "" +"

The node is currently rebooting and will try to connect to other " +"nearby Freifunk nodes after that. " +"Your can find lots of information on the Freifunk Duckburg community on " +"our homepage.

" +"

Have fun with your node and exploring the Freifunk network!

" diff --git a/docs/site-example/i18n/gluon-site.pot b/docs/site-example/i18n/gluon-site.pot new file mode 100644 index 00000000..670de410 --- /dev/null +++ b/docs/site-example/i18n/gluon-site.pot @@ -0,0 +1,11 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +msgid "gluon-config-mode:welcome" +msgstr "" + +msgid "gluon-config-mode:pubkey" +msgstr "" + +msgid "gluon-config-mode:reboot" +msgstr "" diff --git a/docs/site-example/site.conf b/docs/site-example/site.conf index b6f3246d..48e651e9 100644 --- a/docs/site-example/site.conf +++ b/docs/site-example/site.conf @@ -6,8 +6,8 @@ -- This configuration will not work as it. You're required to make -- community specific changes to it! { - -- Used for generated hostnames, e.g. freifunk-abcdef123456. - hostname_prefix = 'freifunk', + -- Used for generated hostnames, e.g. freifunk-abcdef123456. (optional) + -- hostname_prefix = 'freifunk-', -- Name of the community. site_name = 'Freifunk Entenhausen', @@ -166,42 +166,4 @@ -- setup_mode = { -- skip = true, -- }, - - -- These strings are shown in config mode. Some HTML is permissible. - -- - -- msg_welcome: shown at startup - -- msg_pubkey: shown when VPN is enabled - -- msg_reboot: shown during reboot (after finishing configuration) - -- - -- You may use some variables, e.g.: - -- - -- <%=hostname%> - the node's hostname - -- <%=pubkey%> - the fastd public key - -- <%=sysconfig.primary_mac%> - the node's primary MAC - config_mode = { - msg_welcome = [[ -Willkommen zum Einrichtungsassistenten für deinen neuen Entenhausener -Freifunk-Knoten. Fülle das folgende Formular deinen Vorstellungen -entsprechend aus und sende es ab. -]], - msg_pubkey = [[ -Dies ist der öffentliche Schlüssel deines Freifunk-Knotens. Erst nachdem -er auf den Servern des Entenhausener Freifunk-Projektes eingetragen wurde, -kann sich dein Knoten mit dem Entenhausener Mesh-VPN verbinden. Bitte -schicke dazu diesen Schlüssel und den Namen deines Knotens -(<%=hostname%>) an -keys@entenhausen.freifunk.net. -]], - msg_reboot = [[ -

-Dein Knoten startet gerade neu und wird anschließend versuchen, -sich mit anderen Freifunk-Knoten in seiner Nähe zu verbinden. -Weitere Informationen zur Entenhausener Freifunk-Community -findest du auf unserer Webseite. -

-

-Viel Spaß mit deinem Knoten und der Erkundung von Freifunk! -

-]], - }, } diff --git a/docs/site-example/site.mk b/docs/site-example/site.mk index e9dfb543..e03be578 100644 --- a/docs/site-example/site.mk +++ b/docs/site-example/site.mk @@ -48,3 +48,6 @@ GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE) # Default priority for updates. GLUON_PRIORITY ?= 0 + +# Languages to include +GLUON_LANGS ?= en de diff --git a/docs/user/getting_started.rst b/docs/user/getting_started.rst index 14848af6..adbec026 100644 --- a/docs/user/getting_started.rst +++ b/docs/user/getting_started.rst @@ -20,11 +20,25 @@ configuration located in *docs/site-example/*. .. _Git tags: http://git-scm.com/book/en/Git-Basics-Tagging .. _list of gluon releases: https://github.com/freifunk-gluon/gluon/releases -Building the image ------------------- +Dependencies +------------ +To build Gluon, several packages need to be installed on the system. On a +freshly installed Debian Wheezy system the following packages are required: + +* `git` (to get Gluon and other dependencies) +* `subversion` +* `build-essential` +* `gawk` +* `unzip` +* `libncurses-dev` (actually `libncurses5-dev`) +* `libz-dev` (actually `zlib1g-dev`) + + +Building the images +------------------- To build Gluon, first check out the repository. Replace *RELEASE* with the -version you'd like to checkout, e.g. *v2014.3*. +version you'd like to checkout, e.g. *v2014.4*. :: @@ -47,17 +61,15 @@ So let's create the directory *site/*: mkdir site cd site -Copy *site.conf* and *site.mk* from *docs/site-example*: +Copy *site.conf*, *site.mk* and *i18n* from *docs/site-example*: :: cp ../docs/site-example/site.conf . cp ../docs/site-example/site.mk . + cp -r ../docs/site-example/i18n . -.. note:: On **v2014.3**, take both files from - https://github.com/freifunk-gluon/gluon/tree/2014.3.x/docs/site-example - -Edit both files to match your community, then go back to the top-level Gluon +Edit these files to match your community, then go back to the top-level Gluon directory and build Gluon: :: @@ -77,10 +89,7 @@ images are to be used when flashing from the original firmware a device came wit and sysupgrade is to upgrade from other versions of Gluon or any other OpenWRT-based system. -For the build reserve 6GB of disk space. The build requires packages -for `subversion`, ncurses headers (`libncurses-dev`) and zlib headers -(`libz-dev`). - +You should reserve about 10GB of disk space for each `GLUON_TARGET`. There are two levels of `make clean`: diff --git a/docs/user/site.rst b/docs/user/site.rst index b2ebbaa0..2c4c6e8b 100644 --- a/docs/user/site.rst +++ b/docs/user/site.rst @@ -159,7 +159,7 @@ roles : optional }, simple_tc : package - Uplink traffic control + Uplink traffic control, ingress and egress values are specified in kbit/s. :: simple_tc = { @@ -180,9 +180,6 @@ setup_mode : package skip = true, }, -config_mode : package - Configuration Mode text blocks - legacy : package Configuration for the legacy upgrade path. This is only required in communities upgrading from Lübeck's LFF-0.3.x. @@ -215,6 +212,30 @@ GLUON_PRIORITY The default priority for the generated manifests (see the autoupdater documentation for more information). +GLUON_LANGS + List of languages (as two-letter-codes) to include for the web interface. Should always contain + ``en``. + +Config mode texts +----------------- + +The community-defined texts in the config mode are configured in PO files in the ``i18n`` subdirectory +of the site configuration. The message IDs currently defined are: + +gluon-config-mode:welcome + Welcome text on the top of the config wizard page. + +gluon-config-mode:pubkey + Information about the public VPN key on the reboot page. + +gluon-config-mode:reboot + General information about the reboot page. + +There is a POT file in the site example directory which can be used to create templates +for the language files. The command ``msginit -l en -i ../../docs/site-example/i18n/gluon-site.pot`` +can be used from the ``i18n`` directory to create an initial PO file called ``en.po`` if the ``gettext`` +utilities are installed. + Examples -------- @@ -230,6 +251,18 @@ site.conf .. literalinclude:: ../site-example/site.conf :language: lua +i18n/en.po +^^^^^^^^^^ + +.. literalinclude:: ../site-example/i18n/en.po + :language: po + +i18n/de.po +^^^^^^^^^^ + +.. literalinclude:: ../site-example/i18n/de.po + :language: po + modules ^^^^^^^ diff --git a/include/Makefile.target b/include/Makefile.target index f2b898da..19370e52 100644 --- a/include/Makefile.target +++ b/include/Makefile.target @@ -1,5 +1,18 @@ +# code adjusted from openwrt/include/kernel-defaults.mk + override define Kernel/Configure - $(call Kernel/Configure/Default) + $(LINUX_CONF_CMD) > $(LINUX_DIR)/.config.target +# copy CONFIG_KERNEL_* settings over to .config.target + awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' $(BOARD_BUILDDIR)/config-allmods >> $(LINUX_DIR)/.config.target + echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> $(LINUX_DIR)/.config.target + echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target + echo "# CONFIG_KALLSYMS_UNCOMPRESSED is not set" >> $(LINUX_DIR)/.config.target + echo "# CONFIG_KPROBES is not set" >> $(LINUX_DIR)/.config.target + $(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo $(BOARD_BUILDDIR)/config-allmods > $(LINUX_DIR)/.config.override + $(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config + $(call Kernel/SetNoInitramfs) + rm -rf $(KERNEL_BUILD_DIR)/modules + $(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(MAKE) $(KERNEL_MAKEOPTS) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install cp $(GLUONDIR)/targets/$(GLUON_TARGET)/vermagic $(LINUX_DIR)/.vermagic endef diff --git a/include/config b/include/config index 8a74d047..faab30c8 100644 --- a/include/config +++ b/include/config @@ -1,8 +1,8 @@ -CONFIG_ALL_KMODS=y - CONFIG_IMAGEOPT=y # CONFIG_PER_FEED_REPO is not set +CONFIG_DEVEL=y + CONFIG_BUSYBOX_CUSTOM=y CONFIG_BUSYBOX_CONFIG_SHA512SUM=y # CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set diff --git a/include/gluon.mk b/include/gluon.mk index 2f461b20..88db6f42 100644 --- a/include/gluon.mk +++ b/include/gluon.mk @@ -14,6 +14,8 @@ export GLUONDIR GLUON_SITEDIR GLUON_SITE_CONFIG GLUON_IMAGEDIR GLUON_BUILDDIR BOARD_BUILDDIR = $(GLUON_BUILDDIR)/$(GLUON_TARGET) BOARD_KDIR = $(BOARD_BUILDDIR)/kernel +export BOARD_BUILDDIR + GLUON_OPENWRTDIR = $(BOARD_BUILDDIR)/openwrt @@ -26,6 +28,9 @@ $(GLUON_SITEDIR)/site.mk: GLUON_VERSION := $(shell cd $(GLUONDIR) && git describe --always 2>/dev/null || echo unknown) export GLUON_VERSION +GLUON_LANGS ?= en +export GLUON_LANGS + ifeq ($(OPENWRT_BUILD),1) ifeq ($(GLUON_TOOLS),1) diff --git a/include/package.mk b/include/package.mk index 8e2af5b1..271d1de0 100644 --- a/include/package.mk +++ b/include/package.mk @@ -6,3 +6,55 @@ define GluonCheckSite $(shell cat $(1) | sed -ne '1h; 1!H; $$ {g; s/@/+@/g; s/\n/-@/g; p}') END__GLUON__CHECK__SITE endef + + +# Languages supported by LuCi +GLUON_SUPPORTED_LANGS := ca zh_cn en fr de el he hu it ja ms no pl pt_br pt ro ru es sv uk vi + +GLUON_LANG_ca := catalan +GLUON_LANG_zh_cn := chinese +GLUON_LANG_en := english +GLUON_LANG_fr := french +GLUON_LANG_de := german +GLUON_LANG_el := greek +GLUON_LANG_he := hebrew +GLUON_LANG_hu := hungarian +GLUON_LANG_it := italian +GLUON_LANG_ja := japanese +GLUON_LANG_ms := malay +GLUON_LANG_no := norwegian +GLUON_LANG_pl := polish +GLUON_LANG_pt_br := portuguese-brazilian +GLUON_LANG_pt := portuguese +GLUON_LANG_ro := romanian +GLUON_LANG_ru := russian +GLUON_LANG_es := spanish +GLUON_LANG_sv := swedish +GLUON_LANG_uk := ukrainian +GLUON_LANG_vi := vietnamese + +GLUON_I18N_PACKAGES := $(foreach lang,$(GLUON_SUPPORTED_LANGS),+GLUON_LANG_$(lang):luci-i18n-$(GLUON_LANG_$(lang))) +GLUON_I18N_CONFIG := $(foreach lang,$(GLUON_SUPPORTED_LANGS),CONFIG_GLUON_LANG_$(lang)) +GLUON_ENABLED_LANGS := $(foreach lang,$(GLUON_SUPPORTED_LANGS),$(if $(CONFIG_GLUON_LANG_$(lang)),$(lang))) + + +GLUON_PO2LMO := $(BUILD_DIR)/luci/build/po2lmo + +define GluonBuildI18N + mkdir -p $$(PKG_BUILD_DIR)/i18n + for lang in $$(GLUON_ENABLED_LANGS); do \ + if [ -e $(2)/$$$$lang.po ]; then \ + rm -f $$(PKG_BUILD_DIR)/i18n/$(1).$$$$lang.lmo; \ + $(GLUON_PO2LMO) $(2)/$$$$lang.po $$(PKG_BUILD_DIR)/i18n/$(1).$$$$lang.lmo; \ + fi; \ + done +endef + +define GluonInstallI18N + $$(INSTALL_DIR) $(2)/usr/lib/lua/luci/i18n + for lang in $$(GLUON_ENABLED_LANGS); do \ + if [ -e $$(PKG_BUILD_DIR)/i18n/$(1).$$$$lang.lmo ]; then \ + $$(INSTALL_DATA) $$(PKG_BUILD_DIR)/i18n/$(1).$$$$lang.lmo $(2)/usr/lib/lua/luci/i18n/$(1).$$$$lang.lmo; \ + fi; \ + done +endef diff --git a/modules b/modules index 56e542a0..04b9b5b2 100644 --- a/modules +++ b/modules @@ -1,14 +1,14 @@ GLUON_FEEDS='openwrt gluon routing luci' OPENWRT_REPO=git://git.openwrt.org/14.07/openwrt.git -OPENWRT_COMMIT=878af3117f68c2f8d6b3d6582e50c6cef521f6f7 +OPENWRT_COMMIT=64ae631f20eb349b47dae30c461ab33b5c4ac5c2 PACKAGES_OPENWRT_REPO=git://github.com/openwrt/packages.git PACKAGES_OPENWRT_COMMIT=01fcd1f29174a56d6ddb59901ed8c67ea42c3a8f PACKAGES_OPENWRT_BRANCH=for-14.07 PACKAGES_GLUON_REPO=git://github.com/freifunk-gluon/packages.git -PACKAGES_GLUON_COMMIT=2d0f8b38dbf6b01f77c780c7c80a995116e3eca8 +PACKAGES_GLUON_COMMIT=f5c0865d5025a7e6ad3ff6c21ca5206ac972ba75 PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git PACKAGES_ROUTING_COMMIT=5d4ad63897b435d5df0f39a49bd58962c22c33b8 diff --git a/patches/openwrt/0003-ar71xx-correctly-detect-hardware-revision-on-TP-Link-Archer-C5-and-C7.patch b/patches/openwrt/0003-ar71xx-correctly-detect-hardware-revision-on-TP-Link-Archer-C5-and-C7.patch index 0201dcf9..7b85d1e7 100644 --- a/patches/openwrt/0003-ar71xx-correctly-detect-hardware-revision-on-TP-Link-Archer-C5-and-C7.patch +++ b/patches/openwrt/0003-ar71xx-correctly-detect-hardware-revision-on-TP-Link-Archer-C5-and-C7.patch @@ -3,7 +3,7 @@ Date: Sat, 16 Aug 2014 17:52:34 +0200 Subject: ar71xx: correctly detect hardware revision on TP-Link Archer C5 and C7 diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index df35775..6694839 100755 +index 18da356..1709356 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -214,6 +214,13 @@ tplink_board_detect() { diff --git a/patches/openwrt/0006-ar71xx-add-support-for-TP-LINK-CPE210-220-510-520.patch b/patches/openwrt/0006-ar71xx-add-support-for-TP-LINK-CPE210-220-510-520.patch index 529593e9..8e109662 100644 --- a/patches/openwrt/0006-ar71xx-add-support-for-TP-LINK-CPE210-220-510-520.patch +++ b/patches/openwrt/0006-ar71xx-add-support-for-TP-LINK-CPE210-220-510-520.patch @@ -62,7 +62,7 @@ index 4be30b8..78f4992 100755 rb-2011l | \ rb-2011uas |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index 6694839..c13a8eb 100755 +index 1709356..9fb4102 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -229,6 +229,39 @@ tplink_board_detect() { diff --git a/patches/openwrt/0008-ar71xx-add-board-support-for-ubnt-loco-m-xw.patch b/patches/openwrt/0008-ar71xx-add-board-support-for-ubnt-loco-m-xw.patch index 137bf991..f3e496d1 100644 --- a/patches/openwrt/0008-ar71xx-add-board-support-for-ubnt-loco-m-xw.patch +++ b/patches/openwrt/0008-ar71xx-add-board-support-for-ubnt-loco-m-xw.patch @@ -44,7 +44,7 @@ index 78f4992..c494310 100755 mr600v2 |\ rb-411 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index c13a8eb..19cd1a7 100755 +index 9fb4102..79b6073 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -396,6 +396,9 @@ ar71xx_board_detect() { diff --git a/patches/openwrt/0012-ar71xx-fix-board-detection-for-TP-LINK-TL-WA860RE.patch b/patches/openwrt/0012-ar71xx-fix-board-detection-for-TP-LINK-TL-WA860RE.patch index 8065eace..31c4304c 100644 --- a/patches/openwrt/0012-ar71xx-fix-board-detection-for-TP-LINK-TL-WA860RE.patch +++ b/patches/openwrt/0012-ar71xx-fix-board-detection-for-TP-LINK-TL-WA860RE.patch @@ -5,7 +5,7 @@ Subject: ar71xx: fix board detection for TP-LINK TL-WA860RE Signed-off-by: Matthias Schiffer diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index 19cd1a7..b0a0bd6 100755 +index 79b6073..13c5bf2 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -630,6 +630,9 @@ ar71xx_board_detect() { diff --git a/patches/openwrt/0015-Add-support-for-the-TP-LINK-TL-WR941ND-v5.patch b/patches/openwrt/0015-Add-support-for-the-TP-LINK-TL-WR941ND-v5.patch index 8e0b92ac..48079fc6 100644 --- a/patches/openwrt/0015-Add-support-for-the-TP-LINK-TL-WR941ND-v5.patch +++ b/patches/openwrt/0015-Add-support-for-the-TP-LINK-TL-WR941ND-v5.patch @@ -48,7 +48,7 @@ index c494310..3ccb917 100755 wnr2200 |\ wnr612-v2) diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index b0a0bd6..c03fe72 100755 +index 13c5bf2..5fbca92 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -681,6 +681,9 @@ ar71xx_board_detect() { diff --git a/patches/openwrt/0016-ar71xx-add-support-for-the-UniFi-AP-Outdoor-Plus.patch b/patches/openwrt/0016-ar71xx-add-support-for-the-UniFi-AP-Outdoor-Plus.patch index e5c63e4a..c5d18bf6 100644 --- a/patches/openwrt/0016-ar71xx-add-support-for-the-UniFi-AP-Outdoor-Plus.patch +++ b/patches/openwrt/0016-ar71xx-add-support-for-the-UniFi-AP-Outdoor-Plus.patch @@ -19,7 +19,7 @@ index f0d5d70..6aac86a 100755 status_led="ubnt:white:status" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index c03fe72..9e70397 100755 +index 5fbca92..61a7936 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -723,6 +723,9 @@ ar71xx_board_detect() { diff --git a/patches/openwrt/0024-ar71xx-detect-GL.iNet-model.patch b/patches/openwrt/0024-ar71xx-detect-GL.iNet-model.patch index 5b3b7687..9996872a 100644 --- a/patches/openwrt/0024-ar71xx-detect-GL.iNet-model.patch +++ b/patches/openwrt/0024-ar71xx-detect-GL.iNet-model.patch @@ -6,7 +6,7 @@ There are two versions of the GL.iNet, the 6408A and the 6416A. The only difference is the flash size. diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index 9e70397..ac7f787 100755 +index 61a7936..a698ce5 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -262,6 +262,19 @@ tplink_pharos_board_detect() { diff --git a/patches/openwrt/0026-x86-use-PARTUUID-instead-explicitly-specifying-the-device-by-default.patch b/patches/openwrt/0026-x86-use-PARTUUID-instead-explicitly-specifying-the-device-by-default.patch index bc9e0431..a2e7e7d9 100644 --- a/patches/openwrt/0026-x86-use-PARTUUID-instead-explicitly-specifying-the-device-by-default.patch +++ b/patches/openwrt/0026-x86-use-PARTUUID-instead-explicitly-specifying-the-device-by-default.patch @@ -1,5 +1,5 @@ From: Matthias Schiffer -Date: Sun, 15 Mar 2015 17:01:32 +0100 +Date: Mon, 23 Mar 2015 21:11:41 +0100 Subject: x86: use PARTUUID instead explicitly specifying the device by default This changes the x86 image generation to match x86_64, using the PARTUUID for @@ -143,14 +143,14 @@ index a2dd20a..73ab5ef 100644 + fi } diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile -index 5983718..a0045a7 100644 +index 5983718..1f91b9f 100644 --- a/target/linux/x86/image/Makefile +++ b/target/linux/x86/image/Makefile @@ -40,7 +40,9 @@ ifneq ($(GRUB_TERMINALS),) GRUB_TERMINAL_CONFIG := terminal_input $(GRUB_TERMINALS); terminal_output $(GRUB_TERMINALS) endif -+SIGNATURE:=$(shell dd if=/dev/urandom bs=4 count=1 2>/dev/null | hexdump -v -e '"%02x"') ++SIGNATURE:=$(shell dd if=/dev/urandom bs=4 count=1 2>/dev/null | hexdump -v -e '"%08x"') ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME)) +ROOTPART:=$(if $(ROOTPART),$(ROOTPART),PARTUUID=$(SIGNATURE)-02) diff --git a/patches/openwrt/0027-ar71xx-fix-model-string-detection-on-NETGEAR-WNDR3700-3800-WNDRMAC.patch b/patches/openwrt/0027-ar71xx-fix-model-string-detection-on-NETGEAR-WNDR3700-3800-WNDRMAC.patch index 23baa97c..f4051a2d 100644 --- a/patches/openwrt/0027-ar71xx-fix-model-string-detection-on-NETGEAR-WNDR3700-3800-WNDRMAC.patch +++ b/patches/openwrt/0027-ar71xx-fix-model-string-detection-on-NETGEAR-WNDR3700-3800-WNDRMAC.patch @@ -1,51 +1,64 @@ From: Matthias Schiffer -Date: Sun, 15 Mar 2015 19:51:15 +0100 +Date: Sun, 29 Mar 2015 13:23:26 +0200 Subject: ar71xx: fix model string detection on NETGEAR WNDR3700/3800/WNDRMAC There were a few issues with the existing code to detect the model string: * Always using the string starting with byte 56 would cut off the W of WNDR when - the ID starts with 29763654+16+128 instead of 29763654+16+64 + the ID starts with 29763654+16+64 instead of 29763654+16+128 * The string contained garbage after the zero byte instead of cutting it off after the zero (which wasn't always visible using busybox tools, but could confuse other scripts) +Tested on a WNDR3700v1 and a WNDR3700v2 using the new 29763654+16+64 ID in the +ART. Furthermore, tested against ART dumps of a WNDR3700v2 using the old +$'\xff...' value and a WNDR3800. + +The [ -z "$model" ] check was dropped as there is no way to actually hit this +unless no ART partition is found at all. + +The awk command was carefully crafted to work both with gawk and the (horribly +broken) busybox awk. + +Fixes #18992. + +Signed-off-by: Matthias Schiffer + diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh -index ac7f787..f50a236 100755 +index a698ce5..1838cb4 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh -@@ -37,16 +37,28 @@ wndr3700_board_detect() { +@@ -37,16 +37,26 @@ wndr3700_board_detect() { machine="NETGEAR WNDR3700" ;; "33373031") - local model - model=$(ar71xx_get_mtd_offset_size_format art 56 10 %c) - if [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' ]; then -+ case "$(ar71xx_get_mtd_offset_size_format art 56 10 %c)" in -+ $'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff') - machine="NETGEAR WNDR3700v2" +- machine="NETGEAR WNDR3700v2" - elif [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xffN' ]; then -+ ;; -+ $'\xff\xff\xff\xff\xff\xff\xff\xff\xffN') - machine="NETGEAR WNDRMAC" +- machine="NETGEAR WNDRMAC" - else -- machine="NETGEAR $model" -- fi -- ;; ++ # Use awk to remove everything after the first zero byte ++ model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | awk 'BEGIN{FS="[[:cntrl:]]"} {print $1; exit}')" ++ case $model in ++ $'\xff'*) ++ if [ "${model:24:1}" = 'N' ]; then ++ machine="NETGEAR WNDRMAC" ++ else ++ machine="NETGEAR WNDR3700v2" ++ fi ++ ;; ++ '29763654+16+64'*) ++ machine="NETGEAR ${model:14}" ++ ;; ++ '29763654+16+128'*) ++ machine="NETGEAR ${model:15}" + ;; + *) -+ # Use awk to remove everything after the first zero byte -+ model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | awk 'BEGIN{FS="[[:cntrl:]]"} {print $1; exit}')" -+ case $model in -+ '29763654+16+64'*) -+ machine="NETGEAR ${model:14}" -+ ;; -+ '29763654+16+128'*) -+ machine="NETGEAR ${model:15}" -+ ;; -+ *) -+ # Unknown ID -+ machine="NETGEAR $model" -+ esac ++ # Unknown ID + machine="NETGEAR $model" +- fi +- ;; + esac esac diff --git a/patches/openwrt/0030-build-define-STAMP_CONFIGURED-recursively.patch b/patches/openwrt/0030-build-define-STAMP_CONFIGURED-recursively.patch new file mode 100644 index 00000000..5e68ad4c --- /dev/null +++ b/patches/openwrt/0030-build-define-STAMP_CONFIGURED-recursively.patch @@ -0,0 +1,26 @@ +From: Matthias Schiffer +Date: Wed, 18 Mar 2015 20:07:22 +0100 +Subject: build: define STAMP_CONFIGURED recursively + +Defining STAMP_CONFIGURED statically caused it not to reflect changes to +PKG_CONFIG_DEPENDS made after including package.mk, like the additional options +added by feeds.mk for all packages. + +Furthermore, as STAMP_CONFIGURED_WILDCARD was already defined recursively, the +patsubst in its definition would never match, and in consequence, the stamps +were never removed. This caused packages not to be rebuilt when they should have +been. + +diff --git a/include/package.mk b/include/package.mk +index 53ca6de..402fb1a 100644 +--- a/include/package.mk ++++ b/include/package.mk +@@ -60,7 +60,7 @@ ifneq ($(PREV_STAMP_PREPARED),) + else + STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))$(call confvar,$(PKG_PREPARED_DEPENDS))) + endif +-STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS))) ++STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS))) + STAMP_CONFIGURED_WILDCARD=$(patsubst %_$(call confvar,$(PKG_CONFIG_DEPENDS)),%_*,$(STAMP_CONFIGURED)) + STAMP_BUILT:=$(PKG_BUILD_DIR)/.built + STAMP_INSTALLED:=$(STAGING_DIR)/stamp/.$(PKG_NAME)_installed diff --git a/patches/openwrt/0031-base-files-disable-reset-button-handling.patch b/patches/openwrt/0031-base-files-disable-reset-button-handling.patch new file mode 100644 index 00000000..4a601eda --- /dev/null +++ b/patches/openwrt/0031-base-files-disable-reset-button-handling.patch @@ -0,0 +1,30 @@ +From: Matthias Schiffer +Date: Sat, 21 Mar 2015 16:40:52 +0100 +Subject: base-files: disable reset button handling + +This conflicts with our reset button usage. + +diff --git a/package/base-files/files/etc/rc.button/reset b/package/base-files/files/etc/rc.button/reset +deleted file mode 100755 +index 229b503..0000000 +--- a/package/base-files/files/etc/rc.button/reset ++++ /dev/null +@@ -1,18 +0,0 @@ +-#!/bin/sh +- +-[ "${ACTION}" = "released" ] || exit 0 +- +-. /lib/functions.sh +- +-logger "$BUTTON pressed for $SEEN seconds" +- +-if [ "$SEEN" -lt 1 ] +-then +- echo "REBOOT" > /dev/console +- sync +- reboot +-elif [ "$SEEN" -gt 5 ] +-then +- echo "FACTORY RESET" > /dev/console +- jffs2reset -y && reboot & +-fi diff --git a/patches/packages/luci/0002-modules-base-dispatcher-set-default-language-if-none-provided-by-the-browser-matches.patch b/patches/packages/luci/0002-modules-base-dispatcher-set-default-language-if-none-provided-by-the-browser-matches.patch new file mode 100644 index 00000000..2e1da79c --- /dev/null +++ b/patches/packages/luci/0002-modules-base-dispatcher-set-default-language-if-none-provided-by-the-browser-matches.patch @@ -0,0 +1,28 @@ +From: Matthias Schiffer +Date: Thu, 19 Mar 2015 18:44:52 +0100 +Subject: modules/base: dispatcher: set default language if none provided by the browser matches + +diff --git a/modules/base/luasrc/dispatcher.lua b/modules/base/luasrc/dispatcher.lua +index f7e16e7..479ac54 100644 +--- a/modules/base/luasrc/dispatcher.lua ++++ b/modules/base/luasrc/dispatcher.lua +@@ -211,6 +211,7 @@ function dispatch(request) + assert(conf.main, + "/etc/config/luci seems to be corrupt, unable to find section 'main'") + ++ local i18n = require "luci.i18n" + local lang = conf.main.lang or "auto" + if lang == "auto" then + local aclang = http.getenv("HTTP_ACCEPT_LANGUAGE") or "" +@@ -222,7 +223,10 @@ function dispatch(request) + end + end + end +- require "luci.i18n".setlanguage(lang) ++ if lang == "auto" then ++ lang = i18n.default ++ end ++ i18n.setlanguage(lang) + + local c = ctx.tree + local stat diff --git a/scripts/md5sum.sh b/scripts/md5sum.sh deleted file mode 100755 index 61600583..00000000 --- a/scripts/md5sum.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -check_command() { - which $1 >/dev/null 2>&1 -} - -if check_command md5sum; then - ret="$(md5sum "$@")" -elif check_command md5; then - ret="$(md5 -q "$@")" -else - echo "$0: no suitable md5sum implementation was found" >&1 - exit 1 -fi - -[ "$?" -eq 0 ] || exit 1 - -echo "$ret" | awk '{ print $1 }'