]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
mstpd: Update to latest SVN version (20).
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 Nov 2011 10:42:45 +0000 (11:42 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 Nov 2011 10:42:45 +0000 (11:42 +0100)
Add script to easily generate tarballs directly from SVN.

mstpd/mstpd.nm
mstpd/patches/ignore-carrier-state-on-bridge-device.patch0 [deleted file]
mstpd/svn-export.sh [new file with mode: 0755]

index 24fd0925b7d6a94ff8710b30f2311b6fee935868..11698f36079e15df4d89edb6cab643adb9bee98a 100644 (file)
@@ -5,8 +5,8 @@
 
 name       = mstpd
 version    = 0.01
-svn_ver    = 16
-release    = 0.2-svn%{svn_ver}.4
+svn_ver    = 20
+release    = 0.2-svn%{svn_ver}.1
 thisapp    = %{name}-%{version}-svn%{svn_ver}
 
 groups     = Networking/Tools
@@ -20,8 +20,7 @@ description
 end
 
 # Tarballs are created as follows:
-# svn export http://svn.code.sf.net/p/mstpd/code/trunk mstpd-%{version}-svn%{svn_ver}
-# tar cvfz mstpd-%{version}-svn%{svn_ver}.tar.gz mstpd-%{version}-svn%{svn_ver}
+# ./svn-export.sh %{version} %{svn_ver}
 
 build
        # Compile for release.
@@ -36,10 +35,6 @@ packages
        package %{name}
                requires = network
 
-               # A regression in the Linux kernel causes that no port
-               # was brought up. It was fixed in 3.0.4-11.
-               conflicts += kernel<3.0.4-11
-
                # Replace rstp.
                provides  += rstp=0.21-9
                obsoletes += rstp<0.21-9
diff --git a/mstpd/patches/ignore-carrier-state-on-bridge-device.patch0 b/mstpd/patches/ignore-carrier-state-on-bridge-device.patch0
deleted file mode 100644 (file)
index 189bf96..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-Index: bridge_ctl.h
-===================================================================
---- bridge_ctl.h       (revision 16)
-+++ bridge_ctl.h       (working copy)
-@@ -81,7 +81,7 @@
- int init_bridge_ops(void);
--int bridge_notify(int br_index, int if_index, bool newlink, bool up);
-+int bridge_notify(int br_index, int if_index, bool newlink, unsigned flags);
- void bridge_bpdu_rcv(int ifindex, const unsigned char *data, int len);
-Index: brmon.c
-===================================================================
---- brmon.c    (revision 16)
-+++ brmon.c    (working copy)
-@@ -66,7 +66,7 @@
-     int len = n->nlmsg_len;
-     char b1[IFNAMSIZ];
-     int af_family = ifi->ifi_family;
--    bool newlink, up;
-+    bool newlink;
-     int br_index;
-     if(n->nlmsg_type == NLMSG_DONE)
-@@ -154,12 +154,6 @@
-     fflush(fp);
-     newlink = (n->nlmsg_type == RTM_NEWLINK);
--    up = false;
--    if(newlink && tb[IFLA_OPERSTATE])
--    {
--        int state = *(uint8_t*)RTA_DATA(tb[IFLA_OPERSTATE]);
--        up = (state == IF_OPER_UP) || (state == IF_OPER_UNKNOWN);
--    }
-     if(tb[IFLA_MASTER])
-         br_index = *(int*)RTA_DATA(tb[IFLA_MASTER]);
-@@ -168,7 +162,7 @@
-     else
-         br_index = -1;
--    bridge_notify(br_index, ifi->ifi_index, newlink, up);
-+    bridge_notify(br_index, ifi->ifi_index, newlink, ifi->ifi_flags);
-     return 0;
- }
-Index: bridge_track.c
-===================================================================
---- bridge_track.c     (revision 16)
-+++ bridge_track.c     (working copy)
-@@ -279,13 +279,15 @@
- }
- /* br_index == if_index means: interface is bridge master */
--int bridge_notify(int br_index, int if_index, bool newlink, bool up)
-+int bridge_notify(int br_index, int if_index, bool newlink, unsigned flags)
- {
-     port_t *ifc;
-     bridge_t *br = NULL, *other_br;
-+    bool up = !!(flags & IFF_UP);
-+    bool running = up && (flags & IFF_RUNNING);
--    LOG("br_index %d, if_index %d, newlink %d, up %d",
--        br_index, if_index, newlink, up);
-+    LOG("br_index %d, if_index %d, newlink %d, up %d, running %d",
-+        br_index, if_index, newlink, up, running);
-     if((br_index >= 0) && (br_index != if_index))
-     {
-@@ -296,9 +298,9 @@
-             ERROR("Couldn't create data for bridge interface %d", br_index);
-             return -1;
-         }
--        int br_up = ethtool_get_link(br->sysdeps.name);
--        if(br_up >= 0)
--            set_br_up(br, !!br_up);
-+        int br_flags = get_flags(br->sysdeps.name);
-+        if(br_flags >= 0)
-+            set_br_up(br, !!(flags & IFF_UP));
-     }
-     if(br)
-@@ -336,7 +338,7 @@
-             delete_if(ifc);
-             return 0;
-         }
--        set_if_up(ifc, up);   /* And speed and duplex */
-+        set_if_up(ifc, running); /* And speed and duplex */
-     }
-     else
-     { /* Interface is not a bridge slave */
-Index: netif_utils.c
-===================================================================
---- netif_utils.c      (revision 16)
-+++ netif_utils.c      (working copy)
-@@ -65,23 +65,17 @@
-     return 0;
- }
--int ethtool_get_link(char *ifname)
-+int get_flags(char *ifname)
- {
-     struct ifreq ifr;
-     memset(&ifr, 0, sizeof(ifr));
-     strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
--    struct ethtool_value eval;
--
--    eval.cmd = ETHTOOL_GLINK;
--    ifr.ifr_data = (caddr_t)&eval;
--    if(0 > ioctl(netsock, SIOCETHTOOL, &ifr))
-+    if(0 > ioctl(netsock, SIOCGIFFLAGS, &ifr))
-     {
--        ERROR("Cannot get link status for %s: %m\n", ifname);
-+        ERROR("%s: get interface flags failed: %m", ifname);
-         return -1;
-     }
--    if(eval.data)
--        return 1;
--    return 0;
-+    return ifr.ifr_flags;
- }
- int ethtool_get_speed_duplex(char *ifname, int *speed, int *duplex)
-Index: netif_utils.h
-===================================================================
---- netif_utils.h      (revision 16)
-+++ netif_utils.h      (working copy)
-@@ -31,9 +31,9 @@
- int netsock_init(void);
- int get_hwaddr(char *ifname, unsigned char *hwaddr);
-+int get_flags(char *ifname);
- int ethtool_get_speed_duplex(char *ifname, int *speed, int *duplex);
--int ethtool_get_link(char *ifname);
- bool is_bridge(char *if_name);
diff --git a/mstpd/svn-export.sh b/mstpd/svn-export.sh
new file mode 100755 (executable)
index 0000000..662d3d3
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+version=${1}
+revision=${2}
+
+if [ -z "${version}" ] || [ -z "${revision}" ]; then
+       echo "Usage ${0}: <version> <revision>" >&2
+       exit 1
+fi
+
+export_dir=mstpd-${version}-svn${revision}
+rm -rf ${export_dir}
+
+set -x
+
+svn export http://svn.code.sf.net/p/mstpd/code/trunk ${export_dir}
+tar cfz mstpd-${version}-svn${revision}.tar.gz ${export_dir}
+rm -rf ${export_dir}
+
+exit 0