Merge pull request #361 from akru/cjdns-build-fixes
authorMoritz Warning <moritzwarning@web.de>
Wed, 2 May 2018 14:51:59 +0000 (16:51 +0200)
committerGitHub <noreply@github.com>
Wed, 2 May 2018 14:51:59 +0000 (16:51 +0200)
cjdns: v20.1 -> v20.2

12 files changed:
alfred/Makefile
alfred/files/alfred.init
batctl/Makefile
batman-adv/Makefile
bmx7/Makefile
bmx7/files/etc/init.d/bmx7
miniupnpd/Makefile
poprouting/Makefile [deleted file]
poprouting/patches/001-cflags.patch [deleted file]
prince/Makefile [new file with mode: 0644]
prince/files/prince.conf [new file with mode: 0644]
prince/files/prince.init [new file with mode: 0644]

index 7ff77efc48110bc609533a862c810b7d839f5a45..a0d25a5e932d4aac15e5e66e5dd7156417eb85f7 100644 (file)
@@ -8,10 +8,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=alfred
-PKG_VERSION:=2018.0
+PKG_VERSION:=2018.1
 PKG_RELEASE:=0
-PKG_MD5SUM:=a0610a85cd55b9b1ff30b726dc5c455f
-PKG_HASH:=c7cfeb6defc46fe0da9d620afcf89ee36ddc034e31dee58cc239b757a77cf257
+PKG_HASH:=808fa6acf65c7a8e26405115176a5587157f746108cbe5dd974788eb05416d76
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
index 4c9a9e195ada75d8f7b9d42e2b852cc855552bfb..8293436870af23914ce2cdcad26e0539d4b3667d 100755 (executable)
@@ -46,11 +46,11 @@ wait_for_ll_address()
        for i in $(seq $timeout); do
                # We look for
                # - the link-local address (starts with fe80)
-               # - without tentative flag (bit 0x40 in the flags field; the first char of the flags field begins 38 columns after the fe80 prefix
+               # - without tentative flag (bit 0x40 in the flags field; the first char of the fifth field is evaluated)
                # - on interface $iface
                if awk '
                        BEGIN { RET=1 }
-                       /^fe80.{37} [012389ab]/ { if ($6 == "'"$iface"'") RET=0 }
+                       $1 ~ /^fe80/ && $5 ~ /^[012389ab]/ && $6 == "'"$iface"'" { RET=0 }
                        END { exit RET }
                ' /proc/net/if_inet6; then
                        return
index de28f69890e34db0f40f191919766d890350e93b..ae878a6c8875b4856bb3f1a37e41c0871a3cb815 100644 (file)
@@ -9,10 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=batctl
 
-PKG_VERSION:=2018.0
+PKG_VERSION:=2018.1
 PKG_RELEASE:=0
-PKG_MD5SUM:=cfdad757be0a2001158410366f6b9a45
-PKG_HASH:=5a970835b6c85e92a4faf2c40d70664cf80637749c30b898d0c84cfe94f1eff4
+PKG_HASH:=27877d0da6916f88a6cecbbb3f3d23cc4558ef7c7294324bf4fd050ed606b553
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
index 3fd463bdeefc1b263dfe636953bf59531785a66f..16b4ae6d3dcd7553036ec1b1a306d74d1f00c030 100644 (file)
@@ -9,10 +9,9 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=batman-adv
 
-PKG_VERSION:=2018.0
+PKG_VERSION:=2018.1
 PKG_RELEASE:=0
-PKG_MD5SUM:=c39d67cdb5509bf638efc9083e0dd41e
-PKG_HASH:=4826f838e8a2914a9470da25ea2f17f6325c464a130093b20dc7fb4e93f7576c
+PKG_HASH:=b866b28dbbe5c9238abbdf5abbc30fc526dea56898ce4c1bd76d5c017843048b
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.open-mesh.org/batman/releases/batman-adv-$(PKG_VERSION)
index 7188459f11bc7431f696e4acc5bf33588335d3a9..41205df739f79437f8757e17a7b5c6881dd65705 100644 (file)
@@ -30,9 +30,9 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://github.com/bmx-routing/bmx7.git
 #PKG_SOURCE_URL:=file:///usr/src/bmx-routing/bmx7.git
 
-PKG_REV:=f78db8298dd8b3658f6fcfa90df2644a15b99924
-PKG_MIRROR_HASH:=80ca8e04603d824e4dede0055030c765bd9e69f7945c01ffb953de37b228028e
-PKG_VERSION:=r2018030903
+PKG_REV:=9883383dc26df16da67b9ef7ba99efe62f79c4e7
+PKG_MIRROR_HASH:=012178aba42016d3e0961715f99bf1e322c2c6c22b1cc6635375468360cb4d68
+PKG_VERSION:=r2018042501
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-2.0
 
@@ -141,6 +141,7 @@ endef
 
 define Package/bmx7-uci-config/conffiles
 /etc/config/bmx7
+/etc/bmx7
 endef
 
 define Package/bmx7-uci-config/install
index 6886739b4ba2e298f2087cf0f8f6324d24c7e118..515dc8876df77b7aca966c7f30dc117381c7f1cd 100755 (executable)
@@ -1,41 +1,24 @@
 #!/bin/sh /etc/rc.common
-#    Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
-#
-#    This program is free software; you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation; either version 2 of the License, or
-#    (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU General Public License for more details.
-#
-#    You should have received a copy of the GNU General Public License along
-#    with this program; if not, write to the Free Software Foundation, Inc.,
-#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-#    The full GNU General Public License is included in this distribution in
-#    the file called "COPYING".
-
 START=91
+USE_PROCD=1
 
 BIN=/usr/sbin/bmx7
 CONF=/etc/config/bmx7
-PID=/var/run/bmx7/pid
-
 
-start() {
+start_service() {
        cd /root/
        while pgrep -f mac80211.sh ; do sleep 1; done
-       ulimit -c 20000
-       $BIN -f $CONF -d0 > /dev/null &
-}
 
-stop() {
-       start-stop-daemon -p $PID -K
+       procd_open_instance "bmx7"
+       procd_set_param command "$BIN"
+       procd_append_param command -f "$CONF" -d0
+       procd_set_param limits core=20000
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_set_param respawn
+       procd_close_instance
 }
 
-restart() {
-       stop; sleep 3; start
+reload_service() {
+    $BIN -c configReload
 }
index 1841200bdd6b6a6a4d928bf9489d6a99c28d9a76..88ce060afcd7444d4a9b2c814dc7304f97affb06 100644 (file)
@@ -15,7 +15,6 @@ PKG_SOURCE_URL:=http://miniupnp.free.fr/files
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_HASH:=9677aeccadf73b4bf8bb9d832c32b5da8266b4d58eed888f3fd43d7656405643
 
-PKG_MAINTAINER:=Markus Stenberg <fingon@iki.fi>
 PKG_LICENSE:=BSD-3-Clause
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/poprouting/Makefile b/poprouting/Makefile
deleted file mode 100644 (file)
index 6bede93..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=prince
-PKG_VERSION:=v0.3.1
-PKG_RELEASE:=2
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_USE_MIPS16:=0
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE:=prince-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/gabri94/poprouting.git
-PKG_SOURCE_VERSION:=v0.3.1
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-include $(INCLUDE_DIR)/package.mk
-
-define Package/prince
-  SECTION:=net
-  CATEGORY:=Network
-  SUBMENU:=Routing and Redirection
-  MAINTAINER:=Gabriele Gemmi <gabriel@autistici.org>
-  TITLE:=PopRouting daemon
-  URL:=https://github.com/gabri94/poprouting
-  DEPENDS:= +libjson-c +libpthread
-endef
-
-define Package/prince/description
-Prince is an open source implementation of the PopRouting Algorithm.
-It has been developed as a Google Summer of Code Project in collaboration with Freifunk and the University of Trento.
-
-It work by fetching topology data from a Link State routing demon(OONF, OLSR, OSPF, etc),
-calculating the betweenness centrality using the topology, then using these data
-the timer's value are optimized. Finally the timers are pushed back to the routing demon.
-Currently it only supports OLSRd2 (aka OONF).
-endef
-
-CFLAGS += $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
-LDFLAGS += $(TARGET_LDFLAGS)
-
-define Package/prince/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/output/prince $(1)/usr/sbin/
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/output/libprince_oonf_c.so $(1)/usr/lib/
-endef
-
-
-$(eval $(call BuildPackage,prince))
diff --git a/poprouting/patches/001-cflags.patch b/poprouting/patches/001-cflags.patch
deleted file mode 100644 (file)
index c1f13a1..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From dda5c5a0cd2204816f2f83f18e7820ded6c962df Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <f.fainelli@gmail.com>
-Date: Mon, 5 Jun 2017 17:30:24 -0700
-Subject: [PATCH] Honor CFLAGS and LDFLAGS when passed
-
----
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: prince-v0.3.1/Makefile
-===================================================================
---- prince-v0.3.1.orig/Makefile
-+++ prince-v0.3.1/Makefile
-@@ -1,11 +1,11 @@
- CFLAGS+=-lm -ldl -ljson-c -pthread
- poprouting:out libs
-       cp prince/src/common_c.h prince/src/common.h
--      $(CC) $(LDFLAGS) prince/src/prince.c prince/src/lib/ini.c prince/src/parser.c prince/src/socket.c graph-parser_c/src/brandes.c graph-parser_c/src/biconnected.c  graph-parser_c/src/graph_parser.c graph-parser_c/src/graph/graph.c graph-parser_c/src/graph/list.c graph-parser_c/src/network_change.c -o output/prince   $(CFLAGS)
-+      $(CC) $(LDFLAGS) $(CFLAGS) prince/src/prince.c prince/src/lib/ini.c prince/src/parser.c prince/src/socket.c graph-parser_c/src/brandes.c graph-parser_c/src/biconnected.c  graph-parser_c/src/graph_parser.c graph-parser_c/src/graph/graph.c graph-parser_c/src/graph/list.c graph-parser_c/src/network_change.c -o output/prince
-       rm prince/src/common.h
- libs:
-       cp prince/src/common_c.h prince/src/common.h
--      $(CC) -shared -fPIC -o output/libprince_oonf_c.so prince/src/oonf.c prince/src/socket.c prince/src/parser.c graph-parser_c/src/brandes.c graph-parser_c/src/biconnected.c  graph-parser_c/src/graph_parser.c graph-parser_c/src/graph/graph.c graph-parser_c/src/graph/list.c graph-parser_c/src/network_change.c
-+      $(CC) $(LDFLAGS) $(CFLAGS) -shared -fPIC -o output/libprince_oonf_c.so prince/src/oonf.c prince/src/socket.c prince/src/parser.c graph-parser_c/src/brandes.c graph-parser_c/src/biconnected.c  graph-parser_c/src/graph_parser.c graph-parser_c/src/graph/graph.c graph-parser_c/src/graph/list.c graph-parser_c/src/network_change.c
- clean:
-       rm output/*
diff --git a/prince/Makefile b/prince/Makefile
new file mode 100644 (file)
index 0000000..046dc17
--- /dev/null
@@ -0,0 +1,66 @@
+# 
+# Copyright (C) 2009-2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=prince
+PKG_VERSION:=v0.4
+PKG_RELEASE:=1
+
+# out of source build
+CMAKE_BINARY_SUBDIR:=build
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/prince-$(PKG_VERSION)
+PKG_MIRROR_HASH:=19a3cae09f28a5ef07fc0f5ff12cf62c776a94fbf1626336ab04951775c104de
+PKG_INSTALL:=0
+PKG_LICENSE:=MIT
+PKG_SOURCE:=prince-$(PKG_VERSION).tar.xz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=prince-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/AdvancedNetworkingSystems/prince.git
+PKG_SOURCE_VERSION:=v0.4
+PKG_USE_MIPS16:=0
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/prince
+       SECTION :=net
+       CATEGORY :=Network
+       SUBMENU :=Routing and Redirection
+       Mantainer :=Gabriele Gemmi <gabriel@autistici.org>
+       TITLE :=Prince
+       URL :=https://github.com/AdvancedNetworkingSystems/prince
+       MENU :=0
+       DEPENDS := +libjson-c +libpthread
+endef
+
+define Package/prince/description
+       Prince is an open source implementation of the PopRouting Algorithm.
+       It has been developed as a Google Summer of Code Project in collaboration with Freifunk and the University of Trento.
+
+       Prince fetches topology data from a Link State routing daemon (OONF, OLSR, OSPF, etc),
+       calculates the betweenness centrality using the topology and then computes the
+       the timers' optimal values using these data. At the end of the computation the timers are pushed back to the routing daemon.
+       Since v0.4 it supports both OONF and OLSRd.
+endef
+
+define Package/prince/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/prince $(1)/usr/bin/prince
+       $(INSTALL_BIN) ./files/prince.init $(1)/etc/init.d/prince
+       $(INSTALL_DATA) ./files/prince.conf $(1)/etc/prince.conf
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/libprince_oonf.so $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/libprince_olsr.so $(1)/usr/lib
+endef
+
+CFLAGS += $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
+LDFLAGS += $(TARGET_LDFLAGS)
+
+$(eval $(call BuildPackage,prince))
diff --git a/prince/files/prince.conf b/prince/files/prince.conf
new file mode 100644 (file)
index 0000000..7ffbcd4
--- /dev/null
@@ -0,0 +1,16 @@
+{
+       "proto": {
+               "protocol": "oonf",
+               "host": "127.0.0.1",
+               "port": 2009 ,
+               "refresh": 10,
+               "timer_port": 2009
+       },
+       "graph-parser": {
+               "heuristic": 1,
+               "weights": 1,
+               "recursive": 0,
+               "stop_unchanged": 0,
+               "multithreaded": 0
+       }
+}
diff --git a/prince/files/prince.init b/prince/files/prince.init
new file mode 100644 (file)
index 0000000..12f0c8f
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh /etc/rc.common
+# Init script for Prince
+# Copyright (C) 2018 OpenWrt.org
+
+USE_PROCD=1
+START=99
+STOP=15
+
+PROG="/usr/bin/prince"
+CONF="/etc/prince.conf"
+
+start_service(){
+       procd_open_instance
+       procd_set_param command $PROG $CONF
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_set_param user nobody
+       procd_close_instance
+       echo "Prince started"
+}