bmx7: separate bmx7 namespace for binaries, libs, config, runtimedir, ...
authorAxel Neumann <neumann@cgws.de>
Wed, 10 Feb 2016 14:27:07 +0000 (15:27 +0100)
committerAxel Neumann <neumann@cgws.de>
Thu, 11 Feb 2016 06:13:49 +0000 (07:13 +0100)
bmx7/Makefile
bmx7/files/etc/config/bmx6 [deleted file]
bmx7/files/etc/config/bmx7 [new file with mode: 0644]
bmx7/files/etc/init.d/bmx6 [deleted file]
bmx7/files/etc/init.d/bmx7 [new file with mode: 0755]
bmx7/patches/001-json-c.patch

index 82006eedd816b4c306009f08d9355795d7baaa16..ca24f4fee7442af6636e25482774b6ea224633b0 100644 (file)
@@ -28,12 +28,12 @@ PKG_NAME:=bmx7
 
 PKG_SOURCE_PROTO:=git
 
 
 PKG_SOURCE_PROTO:=git
 
-#PKG_SOURCE_URL:=file:///usr/src/bmx6/bmx6.git
+PKG_SOURCE_URL:=file:///usr/src/bmx6/bmx6.git
 #PKG_SOURCE_URL:=git://bmx6.net/bmx6.git
 #PKG_SOURCE_URL:=git://bmx6.net/bmx6.git
-PKG_SOURCE_URL:=git://github.com/axn/bmx6.git
+#PKG_SOURCE_URL:=git://github.com/axn/bmx6.git
 
 
-PKG_REV:=d0841d4bf42ae406cd5319a857dc294badb1ac8d
-PKG_VERSION:=r2016011801
+PKG_REV:=0d2da286a19219caebf55a4234ab612fefac65ce
+PKG_VERSION:=r2016021001
 PKG_RELEASE:=4
 PKG_LICENSE:=GPL-2.0
 
 PKG_RELEASE:=4
 PKG_LICENSE:=GPL-2.0
 
@@ -61,7 +61,7 @@ define Package/bmx7/Default
   TITLE:=BMX7 layer 3 routing daemon
   URL:=http://bmx6.net/
   MAINTAINER:=Axel Neumann <neumann@cgws.de>
   TITLE:=BMX7 layer 3 routing daemon
   URL:=http://bmx6.net/
   MAINTAINER:=Axel Neumann <neumann@cgws.de>
-  DEPENDS:=+zlib +libpolarssl @!bmx6
+  DEPENDS:=+zlib +libpolarssl
 endef
 
 define Package/bmx7/description
 endef
 
 define Package/bmx7/description
@@ -97,12 +97,6 @@ define Package/bmx7-tun
   TITLE:=ipip-based tunnel plugin (recommended!)
 endef
 
   TITLE:=ipip-based tunnel plugin (recommended!)
 endef
 
-#define Package/bmx7-quagga
-#  $(call Package/bmx7/Default)
-#  DEPENDS:=bmx7 +bmx7-tun +qmp-quagga @BROKEN
-#  TITLE:=bmx7 quagga plugin to redistribute/export routes (needs manet/bmx patched quagga 0.99.21)
-#endef
-
 define Package/bmx7-table
   $(call Package/bmx7/Default)
   DEPENDS:=bmx7 +bmx7-tun
 define Package/bmx7-table
   $(call Package/bmx7/Default)
   DEPENDS:=bmx7 +bmx7-tun
@@ -119,60 +113,55 @@ endef
 
 define Package/bmx7/install
        $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
 
 define Package/bmx7/install
        $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bmx6 $(1)/usr/sbin/bmx6
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/bmx7 $(1)/usr/sbin/bmx7
 endef
 
 define Package/bmx7/postinst
 #!/bin/sh
 # # check if we are on real system
 if [ -z "$${IPKG_INSTROOT}" ]; then
 endef
 
 define Package/bmx7/postinst
 #!/bin/sh
 # # check if we are on real system
 if [ -z "$${IPKG_INSTROOT}" ]; then
-       if [ -f /etc/sysupgrade.conf ] && ! grep bmx6 /etc/sysupgrade.conf; then
-               echo /etc/bmx6 >> /etc/sysupgrade.conf
+       if [ -f /etc/sysupgrade.conf ] && ! grep bmx7 /etc/sysupgrade.conf; then
+               echo /etc/bmx7 >> /etc/sysupgrade.conf
         fi
 fi
 endef
 
 
 define Package/bmx7-uci-config/conffiles
         fi
 fi
 endef
 
 
 define Package/bmx7-uci-config/conffiles
-/etc/config/bmx6
+/etc/config/bmx7
 endef
 
 define Package/bmx7-uci-config/install
        $(INSTALL_DIR) $(1)/usr/lib $(1)/etc/config $(1)/etc/init.d
 endef
 
 define Package/bmx7-uci-config/install
        $(INSTALL_DIR) $(1)/usr/lib $(1)/etc/config $(1)/etc/init.d
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_uci_config/bmx6_config.so $(1)/usr/lib/bmx6_config.so
-       $(INSTALL_BIN) ./files/etc/init.d/bmx6 $(1)/etc/init.d/bmx6
-       $(INSTALL_DATA) ./files/etc/config/bmx6 $(1)/etc/config/bmx6
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx7_uci_config/bmx7_config.so $(1)/usr/lib/bmx7_config.so
+       $(INSTALL_BIN) ./files/etc/init.d/bmx7 $(1)/etc/init.d/bmx7
+       $(INSTALL_DATA) ./files/etc/config/bmx7 $(1)/etc/config/bmx7
 endef
 
 define Package/bmx7-json/install
        $(INSTALL_DIR) $(1)/usr/lib
 endef
 
 define Package/bmx7-json/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_json/bmx6_json.so $(1)/usr/lib/bmx6_json.so
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx7_json/bmx7_json.so $(1)/usr/lib/bmx7_json.so
 endef
 
 define Package/bmx7-sms/install
        $(INSTALL_DIR) $(1)/usr/lib
 endef
 
 define Package/bmx7-sms/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_sms/bmx6_sms.so $(1)/usr/lib/bmx6_sms.so
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx7_sms/bmx7_sms.so $(1)/usr/lib/bmx7_sms.so
 endef
 
 define Package/bmx7-tun/install
        $(INSTALL_DIR) $(1)/usr/lib
 endef
 
 define Package/bmx7-tun/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_tun/bmx6_tun.so $(1)/usr/lib/bmx6_tun.so
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx7_tun/bmx7_tun.so $(1)/usr/lib/bmx7_tun.so
 endef
 
 define Package/bmx7-table/install
        $(INSTALL_DIR) $(1)/usr/lib
 endef
 
 define Package/bmx7-table/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_table/bmx6_table.so $(1)/usr/lib/bmx6_table.so
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx7_table/bmx7_table.so $(1)/usr/lib/bmx7_table.so
 endef
 
 endef
 
-#define Package/bmx7-quagga/install
-#      $(INSTALL_DIR) $(1)/usr/lib
-#      $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_quagga/bmx6_quagga.so $(1)/usr/lib/bmx6_quagga.so
-#endef
 
 $(eval $(call BuildPackage,bmx7))
 $(eval $(call BuildPackage,bmx7-uci-config))
 $(eval $(call BuildPackage,bmx7-json))
 $(eval $(call BuildPackage,bmx7-sms))
 
 $(eval $(call BuildPackage,bmx7))
 $(eval $(call BuildPackage,bmx7-uci-config))
 $(eval $(call BuildPackage,bmx7-json))
 $(eval $(call BuildPackage,bmx7-sms))
-#$(eval $(call BuildPackage,bmx7-quagga))
 $(eval $(call BuildPackage,bmx7-table))
 $(eval $(call BuildPackage,bmx7-tun))
 $(eval $(call BuildPackage,bmx7-table))
 $(eval $(call BuildPackage,bmx7-tun))
diff --git a/bmx7/files/etc/config/bmx6 b/bmx7/files/etc/config/bmx6
deleted file mode 100644 (file)
index 26d691c..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-
-# for more information:
-# http://bmx6.net/projects/bmx6/wiki
-# options execute: bmx6 --help
-
-config 'bmx6' 'general'
-#       option 'runtimeDir' '/var/run/bmx6'
-
-
-#config 'plugin'
-#        option 'plugin' 'bmx6_config.so'
-
-#config 'plugin'
-#        option 'plugin' 'bmx6_json.so'
-
-
-#config 'plugin'
-#        option 'plugin' 'bmx6_sms.so'
-
-
-config 'dev' 'mesh_1'
-        option 'dev' 'br-lan'
-
-config 'dev' 'mesh_2'
-        option 'dev' 'wlan0'
-
-
-
-#config 'plugin'
-#        option 'plugin' 'bmx6_tun.so'
-
-#config 'plugin'
-#        option 'plugin' 'bmx6_table.so'
-
-
-#config 'tunDev' default
-#        option 'tunDev' 'default'
-#        option 'tun6Address' '2012:0:0:6666::1/64'
-#        option 'tun4Address' '10.66.66.1/24'
-
-
-#config 'tunOut'
-#        option 'tunOut' 'ip6'
-#        option 'network' '2012::/16'
-#        option 'exportDistance' '0'
-
-#config 'tunOut'
-#        option 'tunOut' 'ip4'
-#        option 'network' '10.0.0.0/9'
-#        option 'minPrefixLen' '27'
-
-
-
-
-
diff --git a/bmx7/files/etc/config/bmx7 b/bmx7/files/etc/config/bmx7
new file mode 100644 (file)
index 0000000..7593ede
--- /dev/null
@@ -0,0 +1,54 @@
+
+# for more information:
+# http://bmx6.net/projects/bmx6/wiki
+# options execute: bmx7 --help
+
+config 'bmx7' 'general'
+#       option 'runtimeDir' '/var/run/bmx7'
+#      option 'trustedNodesDir' '/etc/bmx7/trustedNodes'
+
+#config 'plugin'
+#        option 'plugin' 'bmx7_config.so'
+
+#config 'plugin'
+#        option 'plugin' 'bmx7_json.so'
+
+#config 'plugin'
+#        option 'plugin' 'bmx7_sms.so'
+
+
+config 'dev' 'mesh_1'
+        option 'dev' 'br-lan'
+
+config 'dev' 'mesh_2'
+        option 'dev' 'wlan0'
+
+
+
+#config 'plugin'
+#        option 'plugin' 'bmx7_tun.so'
+
+#config 'plugin'
+#        option 'plugin' 'bmx7_table.so'
+
+
+#config 'tunDev' default
+#        option 'tunDev' 'default'
+#        option 'tun6Address' '2012:0:0:6666::1/64'
+#        option 'tun4Address' '10.66.66.1/24'
+
+
+#config 'tunOut'
+#        option 'tunOut' 'ip6'
+#        option 'network' '2012::/16'
+#        option 'exportDistance' '0'
+
+#config 'tunOut'
+#        option 'tunOut' 'ip4'
+#        option 'network' '10.0.0.0/9'
+#        option 'minPrefixLen' '27'
+
+
+
+
+
diff --git a/bmx7/files/etc/init.d/bmx6 b/bmx7/files/etc/init.d/bmx6
deleted file mode 100755 (executable)
index cb2d5b3..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/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
-
-BIN=/usr/sbin/bmx6
-CONF=/etc/config/bmx6
-PID=/var/run/bmx6/pid
-
-
-start() {
-       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
-}
-
-restart() {
-       stop; sleep 3; start
-}
diff --git a/bmx7/files/etc/init.d/bmx7 b/bmx7/files/etc/init.d/bmx7
new file mode 100755 (executable)
index 0000000..6886739
--- /dev/null
@@ -0,0 +1,41 @@
+#!/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
+
+BIN=/usr/sbin/bmx7
+CONF=/etc/config/bmx7
+PID=/var/run/bmx7/pid
+
+
+start() {
+       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
+}
+
+restart() {
+       stop; sleep 3; start
+}
index 5d29dae43cc624e4cccf00bf4941bd47890fd4ff..794bd9e87fac73ea47f1863bc5fac75e43b9c37a 100644 (file)
@@ -1,7 +1,7 @@
-Index: bmx6-r2014112401/lib/bmx6_json/json.c
+Index: bmx7-r2014112401/lib/bmx7_json/json.c
 ===================================================================
 ===================================================================
---- bmx6-r2014112401.orig/lib/bmx6_json/json.c
-+++ bmx6-r2014112401/lib/bmx6_json/json.c
+--- bmx7-r2014112401.orig/lib/bmx7_json/json.c
++++ bmx7-r2014112401/lib/bmx7_json/json.c
 @@ -27,7 +27,7 @@
  #include <unistd.h>
  #include <fcntl.h>
 @@ -27,7 +27,7 @@
  #include <unistd.h>
  #include <fcntl.h>