[package] unbreak mrd6, fix configuration files and init script installation (#5221)
authorFlorian Fainelli <florian@openwrt.org>
Fri, 29 May 2009 13:10:35 +0000 (13:10 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Fri, 29 May 2009 13:10:35 +0000 (13:10 +0000)
SVN-Revision: 16194

ipv6/mrd6/Makefile
ipv6/mrd6/files/mrd6.conf
ipv6/mrd6/patches/001-install.patch [deleted file]
ipv6/mrd6/patches/003-debian.patch [new file with mode: 0644]
ipv6/mrd6/patches/003-missing_icmp_inet6_defs.patch [deleted file]
ipv6/mrd6/patches/004-fix-includes.patch [deleted file]

index 0a7cff9..692eb64 100644 (file)
@@ -11,11 +11,9 @@ PKG_NAME:=mrd6
 PKG_VERSION:=0.9.6
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://fivebits.net/files/mrd6/ \
-       http://hng.av.it.pt/mrd6/download/
-PKG_MD5SUM:=00221326810358889e811c48cbac415a
-TAR_OPTIONS:=
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
+PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/m/mrd6/
+PKG_MD5SUM:=a59d87857654ff92426062ad5664fcd6
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -23,8 +21,8 @@ define Package/mrd6
   SECTION:=ipv6
   CATEGORY:=IPv6
   TITLE:=IPv6 multicast routing daemon
-  URL:=http://artemis.av.it.pt/mrd6/
-  DEPENDS:= +uclibcxx @BROKEN
+  URL:=http://fivebits.net/proj/mrd6
+  DEPENDS:= +uclibcxx
 endef
 
 define Package/mrd6/description
@@ -56,8 +54,8 @@ endef
 
 define Package/mrd6/install
        $(INSTALL_DIR) $(1)/etc/init.d
-       $(INSTALL_DATA) files/mrd6.conf $(1)/etc
-       $(INSTALL_BIN) files/mrd6.init $(1)/etc/init.d/mrd6
+       $(INSTALL_CONF) ./files/mrd6.conf $(1)/etc
+       $(INSTALL_BIN) ./files/mrd6.init $(1)/etc/init.d/mrd6
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mrd $(1)/usr/sbin/mrd6
        $(INSTALL_DIR) $(1)/usr/bin
index 84ce923..283ebd4 100644 (file)
@@ -3,8 +3,8 @@ log {
        attach default "/var/log/mrd6.log" message_err;
 }
 
-interfaces br0 enable = false;  // Should be vlan0 + eth1 but Linux bridge seems broken for multicast
-interfaces eth0 enable = false; // Interface to internal bridge
+interfaces disable br-lan;  // Should be vlan0 + eth1 but Linux bridge seems broken for multicast
+interfaces disable eth0; // Interface to internal bridge
 handle-proper-bridge = true;    // use ETH_P_ALL to see all packets on wrt54g
 
 // The default configured RP is m6bone's Renater RP.
diff --git a/ipv6/mrd6/patches/001-install.patch b/ipv6/mrd6/patches/001-install.patch
deleted file mode 100644 (file)
index dde0c0f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: mrd6-0.9.5/src/Makefile
-===================================================================
---- mrd6-0.9.5.orig/src/Makefile       2007-09-21 13:19:05.000000000 +0200
-+++ mrd6-0.9.5/src/Makefile    2007-09-21 13:19:05.000000000 +0200
-@@ -143,7 +143,8 @@
- install: $(TARGET) $(EXTERNAL_MODULES)
-       install -D $(TARGET) $(DEST_PREFIX)/sbin/$(TARGET)
-       install -D ../tools/mrd6sh $(DEST_PREFIX)/bin/mrd6sh
--      install -D $(EXTERNAL_MODULES) $(DEST_PREFIX)/lib/mrd6/
-+      install -d $(DEST_PREFIX)/lib/mrd6
-+      install $(EXTERNAL_MODULES) $(DEST_PREFIX)/lib/mrd6/
- mrd.version.cpp: $(SOURCES) Makefile
-       @echo '/* This file is automatically generated */' > mrd.version.cpp
diff --git a/ipv6/mrd6/patches/003-debian.patch b/ipv6/mrd6/patches/003-debian.patch
new file mode 100644 (file)
index 0000000..6b99958
--- /dev/null
@@ -0,0 +1,71 @@
+--- mrd6-0.9.6.orig/src/log.cpp
++++ mrd6-0.9.6/src/log.cpp
+@@ -667,3 +667,12 @@
+       os.nprintf(32, "%p", val);
+ }
++#ifdef __s390__
++const char *stream_type_format_parameter(size_t) {
++      return "u";
++}
++
++void stream_push_formated_type(base_stream &os, size_t val) {
++      os.nprintf(32, "%z", val);
++}
++#endif
+--- mrd6-0.9.6.orig/src/mrd.cpp
++++ mrd6-0.9.6/src/mrd.cpp
+@@ -44,6 +44,7 @@
+ #include <cstdarg>
+ #include <cstdlib>
+ #include <errno.h>
++#include <climits>
+ #include <unistd.h>
+ #include <fcntl.h>
+@@ -2338,7 +2339,8 @@
+       out.xprintf("Uptime: %{duration}\n", time_duration((time(0) - m_startup) * 1000));
+       out.xprintf("Performed tasks: %u (spent %llu ms)\n", m_tasks_stat, m_tasks_time_spent);
+-      out.xprintf("Registered sockets: %u reading, %u writing\n", m_read.size(), m_write.size());
++      out.xprintf("Registered sockets: %u reading, %u writing\n",
++              (uint32_t)m_read.size(), (uint32_t)m_write.size());
+       out.xprintf("MRIB prefix count: %u\n", mrib().registry_prefix_count());
+       out.xprintf("Interface count: %u\n", m_intflist.size());
+       out.xprintf("Group state count: %u\n", m_grplist.size());
+--- mrd6-0.9.6.orig/src/bgp/bgp.cpp
++++ mrd6-0.9.6/src/bgp/bgp.cpp
+@@ -35,6 +35,7 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <unistd.h>
++#include <limits.h>
+ #include <map>
+--- mrd6-0.9.6.orig/src/linux/mrd_components.cpp
++++ mrd6-0.9.6/src/linux/mrd_components.cpp
+@@ -92,8 +92,6 @@
+ #if defined(__GLIBC__)
+ #if defined(__i386__)
+       return (void *)base->uc_mcontext.gregs[REG_EIP];
+-#elif defined(__mips__)
+-      return (void *)base->uc_mcontext.gpregs[CTX_EPC];
+ #endif
+ #endif
+       return 0;
+--- mrd6-0.9.6.orig/include/mrd/log.h
++++ mrd6-0.9.6/include/mrd/log.h
+@@ -53,6 +53,12 @@
+ void stream_push_formated_type(base_stream &, const char *val);
+ void stream_push_formated_type(base_stream &, const void *val);
++
++#ifdef __s390__
++const char *stream_type_format_parameter(size_t);
++void stream_push_formated_type(base_stream &, size_t val);
++#endif
++
+ /*!
+  * base log stream
+  */
diff --git a/ipv6/mrd6/patches/003-missing_icmp_inet6_defs.patch b/ipv6/mrd6/patches/003-missing_icmp_inet6_defs.patch
deleted file mode 100644 (file)
index 7244d5a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: mrd6-0.9.5/src/icmp_inet6.cpp
-===================================================================
---- mrd6-0.9.5.orig/src/icmp_inet6.cpp 2007-09-21 13:19:04.000000000 +0200
-+++ mrd6-0.9.5/src/icmp_inet6.cpp      2007-09-21 13:19:06.000000000 +0200
-@@ -51,6 +51,14 @@
- #define IP6_ALERT_MLD 0x00
- #endif
-+#ifndef IP6OPT_PAD1
-+#define IP6OPT_PAD1 0
-+#endif
-+
-+#ifndef IP6OPT_PADN
-+#define IP6OPT_PADN 1
-+#endif
-+
- static in6_addr mld_all_routers;
- static in6_addr all_routers;
diff --git a/ipv6/mrd6/patches/004-fix-includes.patch b/ipv6/mrd6/patches/004-fix-includes.patch
deleted file mode 100644 (file)
index 4eccaeb..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/src/address.cpp b/src/address.cpp
-index 453ad42..9f4cf46 100644
---- a/src/address.cpp
-+++ b/src/address.cpp
-@@ -28,6 +28,8 @@
- #include <arpa/inet.h>
- #include <cstdio>
-+#include <cstring>
-+#include <cstdlib>
- base_stream &operator << (base_stream &os, const inet6_addr &addr) {
-       os.commit_change(addr.print_string(os.req_buffer(64), 64));
-diff --git a/include/mrd/address.h b/include/mrd/address.h
-index 80c8e45..1d2a495 100644
---- a/include/mrd/address.h
-+++ b/include/mrd/address.h
-@@ -31,6 +31,7 @@
- #include <map>
- #include <string>
- #include <vector>
-+#include <cstring>
- class base_stream;