Changeset 829 for trunk


Ignore:
Timestamp:
Dec 3, 2016, 8:04:17 PM (3 years ago)
Author:
amain
Message:

swconfig10: final fixes for API level 10

Location:
trunk/debian/packages/swconfig10/trunk
Files:
14 added
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/debian/packages/swconfig10/trunk/debian/changelog

    r828 r829  
    1 swconfig (0.0.10-2~debwrt70+1) wheezy-debwrt-unstable; urgency=medium
     1swconfig10 (0.0-1~debwrtSID+1) sid-debwrt-unstable; urgency=medium
    22
    3   * Update version to mini-buildd versioning scheme
    4 
    5  -- Johan van Zoomeren <amain@debwrt.net>  Fri, 20 Nov 2015 20:57:33 +0100
    6 
    7 swconfig (0.0.10-1) stretch-debwrt-unstable; urgency=medium
    8 
    9   * Actual OpenWrt package version is 0.0(not specified), release 10 > 0.0.10
    10 
    11  -- Johan van Zoomeren <amain@debwrt.net>  Sun, 15 Nov 2015 17:25:49 +0100
    12 
    13 swconfig (47459-1) stretch-debwrt-unstable; urgency=medium
    14 
    15   * Update to debian compat level 9
    16 
    17  -- Johan van Zoomeren <amain@debwrt.net>  Wed, 11 Nov 2015 20:04:25 +0100
    18 
    19 swconfig (0.1) unstable; urgency=low
    20 
    21   * Initial Release.
     3  * Import from swconfig 0.0.10
     4  * Split swconfig to allow installing multiple versions of the tool supporting
     5    different switch API levels.
    226
    237 -- Johan van Zoomeren <amain@debwrt.net>  Sat, 06 Nov 2010 18:50:39 +0000
  • trunk/debian/packages/swconfig10/trunk/debian/control

    r811 r829  
    1 Source: swconfig
     1Source: swconfig10
    22Section: net
    33Priority: optional
     
    77Homepage: https://wiki.openwrt.org/doc/techref/swconfig
    88
    9 Package: libsw0
     9Package: libsw10
    1010Architecture: any
    11 Depends: ${shlibs:Depends}, ${misc:Depends}
     11Depends: ${shlibs:Depends}, ${misc:Depends}, libnl-tiny0
    1212Pre-Depends: ${misc:Pre-Depends}
     13Replaces: libsw0
    1314Multi-Arch: same
    1415Description: Configure managed switches shared library
     
    1617 helps users configure ports on a managed switch to configure things like VLAN
    1718 tagging. Note that swconfig is an OpenWrt kernel feature only and is not a part
    18  of mainline Linux.
     19 of mainline Linux. Multiple version of the package may be installed to support
     20 multiple kernel switch API versions.
    1921
    2022Package: libsw-dev
    2123Section: libdevel
    2224Architecture: any
    23 Depends: libsw0 (= ${binary:Version}), ${misc:Depends}
     25Depends: libsw10 (= ${binary:Version}), ${misc:Depends}
    2426Description: Configure managed switches shared library development files
    2527 swconfig is a lightweight Linux kernel driver API and a command-line tool that
     
    2830 of mainline Linux.
    2931
    30 Package: swconfig
     32Package: swconfig10
    3133Architecture: any
    32 Depends: ${shlibs:Depends}, ${misc:Depends}, libnl-tiny0, libsw0
     34Depends: ${shlibs:Depends}, ${misc:Depends}, libnl-tiny0, libsw10
     35Replaces: swconfig
    3336Description: Configure managed switches
    3437 swconfig is a lightweight Linux kernel driver API and a command-line tool that
    3538 helps users configure ports on a managed switch to configure things like VLAN
    3639 tagging. Note that swconfig is an OpenWrt kernel feature only and is not a part
    37  of mainline Linux.
     40 of mainline Linux. Multiple version of the package may be installed to support
     41 multiple kernel switch API versions.
    3842
  • trunk/debian/packages/swconfig10/trunk/debian/patches/002_debwrt_cli.c.patch

    r821 r829  
    11Author: Johan van Zoomeren <amain@debwrt.net>
    22
    3 Index: swconfig-0.0.10/src/cli.c
    4 ===================================================================
    5 --- swconfig-0.0.10.orig/src/cli.c
    6 +++ swconfig-0.0.10/src/cli.c
     3--- swconfig-47459.orig/src/cli.c
     4+++ swconfig-47459/src/cli.c
    75@@ -23,7 +23,7 @@
    86 #include <getopt.h>
     
    1412 #include <linux/types.h>
    1513 #include <linux/netlink.h>
    16 @@ -206,6 +206,7 @@ print_usage(void)
     14@@ -173,6 +173,7 @@ print_usage(void)
    1715        exit(1);
    1816 }
     
    2220 swconfig_load_uci(struct switch_dev *dev, const char *name)
    2321 {
    24 @@ -230,7 +231,7 @@ swconfig_load_uci(struct switch_dev *dev
     22@@ -197,7 +198,7 @@ swconfig_load_uci(struct switch_dev *dev
    2523 out:
    2624        uci_free_context(ctx);
     
    3129 int main(int argc, char **argv)
    3230 {
    33 @@ -357,7 +358,7 @@ int main(int argc, char **argv)
     31@@ -324,7 +325,7 @@ int main(int argc, char **argv)
    3432                putchar('\n');
    3533                break;
  • trunk/debian/packages/swconfig10/trunk/debian/patches/003_debwrt_swlib.h.patch

    r821 r829  
    11Author: Johan van Zoomeren <amain@debwrt.net>
    22
    3 Index: swconfig-0.0.11/src/swlib.h
    4 ===================================================================
    5 --- swconfig-0.0.11.orig/src/swlib.h
    6 +++ swconfig-0.0.11/src/swlib.h
    7 @@ -116,7 +116,7 @@ struct switch_port;
     3--- swconfig-47459.orig/src/swlib.h
     4+++ swconfig-47459/src/swlib.h
     5@@ -111,7 +111,7 @@ struct switch_attr;
     6 struct switch_port;
    87 struct switch_port_map;
    9  struct switch_port_link;
    108 struct switch_val;
    119-struct uci_package;
     
    1412 struct switch_dev {
    1513        int id;
    16 @@ -264,6 +264,6 @@ int swlib_get_attr(struct switch_dev *de
     14@@ -247,6 +247,6 @@ int swlib_get_attr(struct switch_dev *de
    1715  * @dev: switch device struct
    1816  * @p: uci package which contains the desired global config
  • trunk/debian/packages/swconfig10/trunk/debian/patches/007_openwrt_switch.h

    r821 r829  
    1 --- /dev/null   2016-11-27 09:28:40.775309416 +0100
    2 +++ trunk/include/uapi/linux/switch.h   2016-12-01 18:58:45.203309416 +0100
    3 @@ -0,0 +1,119 @@
     1Description: Include OpenWrt's switch.h kernel API
     2Author: Johan van Zoomeren <amain@debwrt.net>
     3
     4--- /dev/null
     5+++ swconfig-47459/include/uapi/linux/switch.h
     6@@ -0,0 +1,101 @@
    47+/*
    58+ * switch.h: Switch configuration API
    69+ *
    7 + * Copyright (C) 2008 Felix Fietkau <nbd@nbd.name>
     10+ * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
    811+ *
    912+ * This program is free software; you can redistribute it and/or
     
    1821+ */
    1922+
    20 +#ifndef _UAPI_LINUX_SWITCH_H
    21 +#define _UAPI_LINUX_SWITCH_H
     23+#ifndef _LINUX_SWITCH_H
     24+#define _LINUX_SWITCH_H
    2225+
    2326+#include <linux/types.h>
     
    2528+#include <linux/netlink.h>
    2629+#include <linux/genetlink.h>
    27 +#ifndef __KERNEL__
    2830+#include <netlink/netlink.h>
    2931+#include <netlink/genl/genl.h>
    3032+#include <netlink/genl/ctrl.h>
    31 +#endif
    3233+
    3334+/* main attributes */
     
    5455+       SWITCH_ATTR_OP_VALUE_STR,
    5556+       SWITCH_ATTR_OP_VALUE_PORTS,
    56 +       SWITCH_ATTR_OP_VALUE_LINK,
    5757+       SWITCH_ATTR_OP_DESCRIPTION,
    5858+       /* port lists */
     
    9191+       SWITCH_TYPE_STRING,
    9292+       SWITCH_TYPE_PORTS,
    93 +       SWITCH_TYPE_LINK,
    9493+       SWITCH_TYPE_NOVAL,
    9594+};
     
    103102+};
    104103+
    105 +/* link nested attributes */
    106 +enum {
    107 +       SWITCH_LINK_UNSPEC,
    108 +       SWITCH_LINK_FLAG_LINK,
    109 +       SWITCH_LINK_FLAG_DUPLEX,
    110 +       SWITCH_LINK_FLAG_ANEG,
    111 +       SWITCH_LINK_FLAG_TX_FLOW,
    112 +       SWITCH_LINK_FLAG_RX_FLOW,
    113 +       SWITCH_LINK_SPEED,
    114 +       SWITCH_LINK_FLAG_EEE_100BASET,
    115 +       SWITCH_LINK_FLAG_EEE_1000BASET,
    116 +       SWITCH_LINK_ATTR_MAX,
    117 +};
    118 +
    119104+#define SWITCH_ATTR_DEFAULTS_OFFSET    0x1000
    120105+
    121106+
    122 +#endif /* _UAPI_LINUX_SWITCH_H */
     107+#endif /* _LINUX_SWITCH_H */
  • trunk/debian/packages/swconfig10/trunk/debian/patches/011_use_openwrt_version_for_so

    r819 r829  
    11Author: Johan van Zoomeren <amain@debwrt.net>
    22
    3 Index: swconfig-0.0.10/src/Makefile
     3Index: swconfig10-0.0/src/Makefile
    44===================================================================
    5 --- swconfig-0.0.10.orig/src/Makefile
    6 +++ swconfig-0.0.10/src/Makefile
    7 @@ -6,7 +6,7 @@ LIBS=-lnl-tiny
     5--- swconfig10-0.0.orig/src/Makefile
     6+++ swconfig10-0.0/src/Makefile
     7@@ -6,10 +6,10 @@ LIBS=-lnl-tiny
    88 LIBNAME=libsw
    99 STATICLIB=$(LIBNAME).a
    1010 SHAREDLIB=$(LIBNAME).so
    1111-SHAREDLIBV=$(LIBNAME).so.0.0.0
    12 +SHAREDLIBV=$(LIBNAME).so.0.0.10
    13  SHAREDLIBM=$(LIBNAME).so.0
     12-SHAREDLIBM=$(LIBNAME).so.0
     13+SHAREDLIBV=$(LIBNAME).so.$(PACKAGE_VERSION).0.0
     14+SHAREDLIBM=$(LIBNAME).so.$(PACKAGE_VERSION)
    1415 
    15  all: swconfig
     16-all: swconfig
     17+all: swconfig$(PACKAGE_VERSION)
     18 
     19 %.o: %.c
     20        $(CC) $(CFLAGS) -fPIC -c -o $@ $^
     21@@ -20,5 +20,5 @@ $(SHAREDLIBV): swlib.o
     22        ln -s $@ $(SHAREDLIB)
     23        ln -s $@ $(SHAREDLIBM)
     24 
     25-swconfig: $(SHAREDLIBV) cli.o
     26+swconfig$(PACKAGE_VERSION): $(SHAREDLIBV) cli.o
     27        $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) -L./ -lsw
  • trunk/debian/packages/swconfig10/trunk/debian/rules

    r821 r829  
    77DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
    88
    9 PACKAGE := swconfig
    10 PACKAGE_LIB := libsw0
    11 PACKAGE_DEV := libsw-dev
     9PACKAGE_VERSION := $(shell grep ^Source: debian/control | sed 's/^.*swconfig//')
     10PACKAGE         := swconfig$(PACKAGE_VERSION)
     11PACKAGE_LIB     := libsw$(PACKAGE_VERSION)
     12PACKAGE_DEV     := libsw-dev
    1213
    1314# ../include contains switch.sh kernel API (see patch 007)
    1415CFLAGS+=-O2 -g -I ../include/uapi -I /usr/include/netlink-tiny
     16
     17# not all variables are exported by default
     18export PACKAGE
     19export PACKAGE_LIB
     20export PACKAGE_VERSION
    1521
    1622%:
     
    2834        install -d debian/$(PACKAGE_DEV)/usr/lib/$(DEB_HOST_MULTIARCH)
    2935        install -d debian/$(PACKAGE_DEV)/usr/include/sw
    30         install src/swconfig debian/$(PACKAGE)/usr/sbin/swconfig
     36        install src/$(PACKAGE) debian/$(PACKAGE)/usr/sbin/$(PACKAGE)
    3137        cp -v src/libsw.so.*.*.* debian/$(PACKAGE_LIB)/usr/lib/$(DEB_HOST_MULTIARCH)
    3238        cp -dv src/libsw.so.* debian/$(PACKAGE_LIB)/usr/lib/$(DEB_HOST_MULTIARCH)
    3339        cp -dv src/libsw.so debian/$(PACKAGE_DEV)/usr/lib/$(DEB_HOST_MULTIARCH)
    34         cp -v src/swlib.h debian/$(PACKAGE_DEV)/usr/include
     40        cp -v src/swlib.h debian/$(PACKAGE_DEV)/usr/include/sw
    3541
    3642override_dh_auto_clean:
Note: See TracChangeset for help on using the changeset viewer.