Merge pull request #440 from ejurgensen/master
authorTed Hess <thess@kitschensync.net>
Sat, 18 Oct 2014 23:00:58 +0000 (19:00 -0400)
committerTed Hess <thess@kitschensync.net>
Sat, 18 Oct 2014 23:00:58 +0000 (19:00 -0400)
forked-daapd and required libraries

22 files changed:
lang/python/Makefile
lang/python/files/config.site
lang/python/files/python-package.mk
lang/python/patches/120-do-not-add-include-dirs-when-cross-compiling.patch [new file with mode: 0644]
lang/python/patches/130-do-not-run-distutils-tests.patch [new file with mode: 0644]
net/irssi/Makefile
net/nfs-kernel-server/Makefile
net/nfs-kernel-server/patches/100-nfs_utils_uclibc.patch [deleted file]
net/nfs-kernel-server/patches/100-no_malloc_h.patch [new file with mode: 0644]
net/nfs-kernel-server/patches/101-no_malloc_h.patch [deleted file]
net/openvswitch/Makefile
net/sqm-scripts/Makefile
net/sqm-scripts/files/usr/lib/sqm/functions.sh
net/sqm-scripts/files/usr/lib/sqm/run.sh
net/sqm-scripts/files/usr/lib/sqm/simple.qos
net/sqm-scripts/files/usr/lib/sqm/simple_pppoe.qos
net/sqm-scripts/files/usr/lib/sqm/simplest.qos
net/sqm-scripts/files/usr/lib/sqm/stop.sh
utils/lvm2/Makefile [new file with mode: 0644]
utils/lvm2/files/lvm2.init [new file with mode: 0644]
utils/lvm2/patches/000-compile.patch [new file with mode: 0644]
utils/lvm2/patches/001-include_fix.patch [new file with mode: 0644]

index 58b11a1966b34b45a2e832c4f9835f26938c6bf0..9e6282f08397d012114b9aa4f8e2daef3192704c 100644 (file)
@@ -53,7 +53,7 @@ endef
 
 define Package/python
 $(call Package/python/Default)
-  DEPENDS:=+libpthread +zlib +libffi
+  DEPENDS:=+libpthread +zlib +libffi +libopenssl +libcrypto
 endef
 
 define Package/python/description
@@ -239,14 +239,11 @@ define PyPackage/python-full/filespec
 -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/grp.so
 -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/itertools.so
 -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/math.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_md5.so
+-|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_hashlib.so
 -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/operator.so
 -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_random.so
 -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so
 -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/select.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha256.so
--|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha512.so
 -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_socket.so
 -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/strop.so
 -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_struct.so
@@ -328,13 +325,10 @@ define PyPackage/python/filespec
 +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/grp.so
 +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/itertools.so
 +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/math.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_md5.so
++|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_hashlib.so
 +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/operator.so
 +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_random.so
 +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/select.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha256.so
-+|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha512.so
 +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_socket.so
 +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/strop.so
 +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_struct.so
index 8f7a3f9816657e1090939d7ef2817ca8e5f18ae0..cfa56b89b58e0b7fed9b3bf96288bcc1a1981bc8 100644 (file)
@@ -8,4 +8,5 @@
 
 ac_cv_file__dev_ptmx=yes
 ac_cv_file__dev_ptc=no
+ac_cv_buggy_getaddrinfo=no
 
index 0196beeb68373c7b11f6d3449fa5910ee9f6ce9e..dc30494feec690e4fb252cdba490b5f6ca892cff 100644 (file)
@@ -32,10 +32,15 @@ define PyPackage
   $(call shexport,PyPackage/$(1)/filespec)
 
   define Package/$(1)/install
+       find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f
        @$(SH_FUNC) getvar $$(call shvar,PyPackage/$(1)/filespec) | ( \
                IFS='|'; \
                while read fop fspec fperm; do \
                  if [ "$$$$$$$$fop" = "+" ]; then \
+                       if [ ! -e "$(PKG_INSTALL_DIR)$$$$$$$$fspec" ]; then \
+                         echo "File not found '$(PKG_INSTALL_DIR)$$$$$$$$fspec'"; \
+                         exit 1; \
+                       fi; \
                        dpath=`dirname "$$$$$$$$fspec"`; \
                        if [ -n "$$$$$$$$fperm" ]; then \
                          dperm="-m$$$$$$$$fperm"; \
diff --git a/lang/python/patches/120-do-not-add-include-dirs-when-cross-compiling.patch b/lang/python/patches/120-do-not-add-include-dirs-when-cross-compiling.patch
new file mode 100644 (file)
index 0000000..fb2fe8a
--- /dev/null
@@ -0,0 +1,14 @@
+diff --git a/setup.py b/setup.py
+index cbdeaf3..5154412 100644
+--- a/setup.py
++++ b/setup.py
+@@ -480,7 +480,8 @@ class PyBuildExt(build_ext):
+                         add_dir_to_list(dir_list, directory)
+         if os.path.normpath(sys.prefix) != '/usr' \
+-                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
++                and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
++                and not cross_compiling:
+             # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
+             # (PYTHONFRAMEWORK is set) to avoid # linking problems when
+             # building a framework with different architectures than
diff --git a/lang/python/patches/130-do-not-run-distutils-tests.patch b/lang/python/patches/130-do-not-run-distutils-tests.patch
new file mode 100644 (file)
index 0000000..4fdd2bb
--- /dev/null
@@ -0,0 +1,37 @@
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index bcd83bf..c4dcc6d 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1005,32 +1005,6 @@ libinstall:     build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
+               done; \
+       done
+       $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
+-      if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
+-              $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
+-                      $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+-      fi
+-      PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
+-              $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+-              -d $(LIBDEST) -f \
+-              -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+-              $(DESTDIR)$(LIBDEST)
+-      PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+-              $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+-              -d $(LIBDEST) -f \
+-              -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+-              $(DESTDIR)$(LIBDEST)
+-      -PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
+-              $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
+-              -d $(LIBDEST)/site-packages -f \
+-              -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+-      -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+-              $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
+-              -d $(LIBDEST)/site-packages -f \
+-              -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+-      -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+-              $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+-      -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+-              $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
+ # Create the PLATDIR source directory, if one wasn't distributed..
+ $(srcdir)/Lib/$(PLATDIR):
index 2f920498da119f9efdc04cb8b71fd87db47d0ed6..3fbfef115f3d55089394ec0c80ec41755b0dae6e 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=irssi
-PKG_VERSION:=0.8.16
+PKG_VERSION:=0.8.17
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://irssi.org/files/
-PKG_MD5SUM:=4346119c4c000d0198cda17666ff1f06
+PKG_MD5SUM:=ecf64be47978d89a742b435a81cb47db
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
index b5cfcd757b226a2fac98030cb9404a223343e9ad..1a3468f4a59ad68aaff94bf05b0b8bf0121b3a18 100644 (file)
@@ -7,9 +7,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nfs-kernel-server
-PKG_VERSION:=1.3.0
+PKG_VERSION:=1.3.1
 PKG_RELEASE:=1
-PKG_MD5SUM:=3ac3726eda563946d1f44ac3e5b61d56
+PKG_MD5SUM:=97f157f954edb6d4d4385a0c5986f36f
 
 PKG_SOURCE_URL:=@SF/nfs
 PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.bz2
diff --git a/net/nfs-kernel-server/patches/100-nfs_utils_uclibc.patch b/net/nfs-kernel-server/patches/100-nfs_utils_uclibc.patch
deleted file mode 100644 (file)
index 5e4877e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/support/nfs/svc_socket.c
-+++ b/support/nfs/svc_socket.c
-@@ -40,10 +40,13 @@ int getservport(u_long number, const cha
-       char rpcdata[1024], servdata[1024];
-       struct rpcent rpcbuf, *rpcp;
-       struct servent servbuf, *servp = NULL;
--      int ret;
--
-+      int ret=0;
-+#ifndef __UCLIBC__
-       ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof rpcdata,
-                               &rpcp);
-+#else
-+      rpcp = getrpcbynumber (number);
-+#endif
-       if (ret == 0 && rpcp != NULL) {
-               /* First try name.  */
-               ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata,
---- a/utils/mountd/cache.c
-+++ b/utils/mountd/cache.c
-@@ -166,6 +166,7 @@ static void auth_unix_gid(FILE *f)
-       pw = getpwuid(uid);
-       if (!pw)
-               rv = -1;
-+#ifndef __UCLIBC__
-       else {
-               rv = getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups);
-               if (rv == -1 && ngroups >= groups_len) {
-@@ -180,6 +181,7 @@ static void auth_unix_gid(FILE *f)
-                       }
-               }
-       }
-+#endif
-       qword_printuint(f, uid);
-       qword_printtimefrom(f, DEFAULT_TTL);
-       if (rv >= 0) {
diff --git a/net/nfs-kernel-server/patches/100-no_malloc_h.patch b/net/nfs-kernel-server/patches/100-no_malloc_h.patch
new file mode 100644 (file)
index 0000000..afe4c98
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/tools/rpcgen/rpc_cout.c
++++ b/tools/rpcgen/rpc_cout.c
+@@ -36,7 +36,6 @@ static char sccsid[] = "@(#)rpc_cout.c 1
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+-#include <malloc.h>
+ #include <ctype.h>
+ #include "rpc_parse.h"
+ #include "rpc_util.h"
diff --git a/net/nfs-kernel-server/patches/101-no_malloc_h.patch b/net/nfs-kernel-server/patches/101-no_malloc_h.patch
deleted file mode 100644 (file)
index afe4c98..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/tools/rpcgen/rpc_cout.c
-+++ b/tools/rpcgen/rpc_cout.c
-@@ -36,7 +36,6 @@ static char sccsid[] = "@(#)rpc_cout.c 1
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
--#include <malloc.h>
- #include <ctype.h>
- #include "rpc_parse.h"
- #include "rpc_util.h"
index 710e89845a573599604fd852063f9784240cd704..bb5b268ddfcd8da062fc5ce58270da761b205a31 100644 (file)
@@ -26,6 +26,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/kernel.mk
+$(call include_mk, python-package.mk)
 
 PKG_FIXUP=libtool
 
@@ -56,6 +57,27 @@ define Package/openvswitch/description
   Provides the main userspace components required for Open vSwitch to function.
 endef
 
+define Package/openvswitch-python
+  $(call Package/openvswitch/Default)
+  TITLE:=Open vSwitch Python Support
+  DEPENDS:=@PACKAGE_openvswitch +PACKAGE_openvswitch:openvswitch +python
+endef
+
+define Package/openvswitch-python/description
+  Provides bindings and libraries for using Python to manipulate/work with Open vSwitch.
+endef
+
+define Package/openvswitch-ipsec
+  $(call Package/openvswitch/Default)
+  TITLE:=Open vSwitch Userspace Package
+  DEPENDS:=@PACKAGE_openvswitch +PACKAGE_openvswitch:openvswitch-python
+endef
+
+define Package/openvswitch-ipsec/description
+  The ovs-monitor-ipsec script provides support for encrypting GRE tunnels with 
+  IPsec.
+endef
+
 define Package/openvswitch-benchmark
   $(call Package/openvswitch/Default)
   TITLE:=Open vSwitch Userspace Package
@@ -141,6 +163,16 @@ define Package/openvswitch/install
        $(INSTALL_CONF) $(PKG_BUILD_DIR)/vswitchd/vswitch.ovsschema $(1)/usr/share/openvswitch/
 endef
 
+define Package/openvswitch-python/install
+       $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
+       $(CP) $(PKG_BUILD_DIR)/python/ovs/ $(1)/usr/lib/python$(PYTHON_VERSION)/
+endef
+
+define Package/openvswitch-ipsec/install
+       $(INSTALL_DIR) $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/debian/ovs-monitor-ipsec $(1)/usr/sbin/
+endef
+
 define Package/openvswitch-benchmark/install
        $(INSTALL_DIR) $(1)/usr/bin/
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/.libs/ovs-benchmark $(1)/usr/bin/
@@ -152,6 +184,8 @@ define Package/openvswitch/postinst
 endef
 
 $(eval $(call BuildPackage,openvswitch))
+$(eval $(call BuildPackage,openvswitch-python))
+$(eval $(call BuildPackage,openvswitch-ipsec))
 $(eval $(call BuildPackage,openvswitch-benchmark))
 $(eval $(call KernelPackage,openvswitch))
 
index 95fc5e72e26b52433309fd916df8f3e24d52978d..ea296f1b40c4284a84801cb8f9ddc9d8292f373d 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqm-scripts
-PKG_VERSION:=6
+PKG_VERSION:=7
 PKG_RELEASE:=1
 PKG_LICENSE:=GPLv2
 
index 63a67e358641fd5cc33c1fd4b33dc1dced0b7795..f2ed44bbe8d73cec05440ca970a0dbba7f4c1cad 100644 (file)
@@ -1,3 +1,9 @@
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+#       Copyright (C) 2012-4 Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller
+
 #improve the logread output
 sqm_logger() {
     logger -t SQM -s ${1}
@@ -74,42 +80,6 @@ get_ifb_associated_with_if() {
     echo ${CUR_IFB}
 }
 
-# what is the lowest-index currently not used ifb device
-#sm: hopefully this is not required any longer, and can be deleted after a bit more testing...
-get_lowest_unused_ifb() {
-    LOWEST_FREE_IFB=
-    # this just returns a list of currently existing IFBs, these need not be associated with any interface
-    CUR_UP_IFBS=$( ifconfig | grep -o -e ifb'[[:digit:]]\+' )
-    # the possible IFBs (N in insmod ifb numifbs=N)
-    here=$( pwd )
-    cd /sys/devices/virtual/net/
-    CUR_ALLOWED_IFBS=$( ls -d ifb* )
-    sqm_logger "Currently allowed IFBs: ${CUR_ALLOWED_IFBS}"
-    cd ${here}
-    # this is the sorted list of the active ifbs
-    # note for 3.10.32 unused and even down IFBs linger on in the tc output, so take $CUR_UP_IFBS instead
-    # a better test might be to check for each allowed IFB whether it is in use
-    # but the only way I figured out doing this means interating over all interfaces and that sounds costly
-    # so instead we rely on stop.sh actually calling ifconfig ${LAST_USED_IFB} down
-    CUR_USED_IFBS=$( tc -d qdisc | grep -o -e ifb'[[:digit:]]\+' | sort -u)
-    sqm_logger "Currently used IFBs: ${CUR_USED_IFBS}"
-    # now find the lowest index not in the sorted list
-    local CUR_IDX=0
-    while [ -z "$LOWEST_FREE_IFB" ]
-    do
-        #TMP=$( echo "${CUR_USED_IFBS}" | grep -o -e ifb${CUR_IDX} )
-        TMP=$( echo "${CUR_UP_IFBS}" | grep -o -e ifb${CUR_IDX} )
-        [ -z "$TMP" ] && LOWEST_FREE_IFB="ifb"${CUR_IDX}
-        CUR_IDX=$(( $CUR_IDX + 1 ))
-    done
-    # check whether the number is in the allowed range
-    LOWEST_FREE_IFB=$( echo "${CUR_ALLOWED_IFBS}" | grep -o -e ${LOWEST_FREE_IFB} )
-    [ -z "${LOWEST_FREE_IFB}" ] && sqm_logger "The IFB candidate ifb$(( ${CUR_IDX} - 1 )) is not in the range of allowed IFBs, bailing out..."
-    sqm_logger "selected ifb index: ${LOWEST_FREE_IFB}"
-    echo ${LOWEST_FREE_IFB}
-}
-
-# instead of playing around with indices just create a named IFB
 # ATTENTION, IFB names can only be 15 chararcters, so we chop of excessive characters at the start of the interface name 
 # if required
 create_new_ifb_for_if() {
@@ -134,8 +104,6 @@ get_ifb_for_if() {
     CUR_IF=$1
     # if an ifb is already associated return that
     CUR_IFB=$( get_ifb_associated_with_if ${CUR_IF} )
-    # otherwise find the lowest unused ifb device
-    #[ -z "$CUR_IFB" ] && CUR_IFB=$( get_lowest_unused_ifb )
     [ -z "$CUR_IFB" ] && CUR_IFB=$( create_new_ifb_for_if ${CUR_IF} )
     [ -z "$CUR_IFB" ] && sqm_logger "Could not find existing IFB for ${CUR_IF}, nor create a new IFB instead..."
     echo ${CUR_IFB}
@@ -145,13 +113,6 @@ get_ifb_for_if() {
 [ -z "$DEV" ] && DEV=$( get_ifb_for_if ${IFACE} )      # automagically get the right IFB device for the IFACE"
 
 
-
-#sqm_logger "iqdisc opts: ${iqdisc_opts}"
-#sqm_logger "eqdisc opts: ${eqdisc_opts}"
-
-#sqm_logger "LLAM: ${LLAM}"
-#sqm_logger "LINKLAYER: ${LINKLAYER}"
-
 get_htb_adsll_string() {
        ADSLL=""
        if [ "$LLAM" = "htb_private" -a "$LINKLAYER" != "none" ]; 
index 5453bea3f3f6c1f9fcec13f8794c8d6e083367a7..d7b86a220f64688408d58690fc07177e814e7320 100755 (executable)
@@ -1,5 +1,12 @@
 #!/bin/sh
 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+#       Copyright (C) 2012-4 Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller
+
+
 . /lib/functions.sh
 
 STOP=$1
@@ -17,7 +24,7 @@ for STATE_FILE in ${PROTO_STATE_FILE_LIST} ; do
     then
        STATE_FILE_BASE_NAME=$( basename ${STATE_FILE} )
        CURRENT_INTERFACE=${STATE_FILE_BASE_NAME:${#ACTIVE_STATE_PREFIX}:$(( ${#STATE_FILE_BASE_NAME} - ${#ACTIVE_STATE_PREFIX} ))}        
-       logger -t SQM -s "Stopping SQM on interface: ${CURRENT_INTERFACE}"
+       logger -t SQM -s "${0} Stopping SQM on interface: ${CURRENT_INTERFACE}"
        /usr/lib/sqm/stop.sh ${CURRENT_INTERFACE}
        rm ${STATE_FILE}        # well, we stop it so it is not running anymore and hence no active state file needed...
     fi
@@ -38,7 +45,7 @@ run_simple_qos() {
                # this should not be possible, delete after testing
                local SECTION_STOP="stop"       # it seems the user just de-selected enable, so stop the active SQM
            else
-               logger -t SQM -s "SQM for interface ${IFACE} is not enabled, skipping over..."
+               logger -t SQM -s "${0} SQM for interface ${IFACE} is not enabled, skipping over..."
                return 0        # since SQM is not active on the current interface nothing to do here
            fi
        fi
@@ -72,10 +79,10 @@ run_simple_qos() {
 #           /usr/lib/sqm/stop.sh
 #           [ -f ${ACTIVE_STATE_FILE_FQN} ] && rm ${ACTIVE_STATE_FILE_FQN}     # conditional to avoid errors ACTIVE_STATE_FILE_FQN does not exist anymore
 #           $(config_set "$section" enabled 0) # this does not save to the config file only to the loaded memory representation
-#           logger -t SQM -s "SQM qdiscs on ${IFACE} removed"
+            logger -t SQM -s "${0} SQM qdiscs on ${IFACE} removed"
             return 0
        fi
-       logger -t SQM -s "Queue Setup Script: ${SCRIPT}"
+       logger -t SQM -s "${0} Queue Setup Script: ${SCRIPT}"
        [ -x "$SCRIPT" ] && { $SCRIPT ; touch ${ACTIVE_STATE_FILE_FQN}; }
 }
 
index efafada4cdd957c9f68ef4832f7122b69ed7a573..c752660bb4904735dc21a0c851c75eafca8ce6a7 100755 (executable)
@@ -3,8 +3,11 @@
 # A 3 bin tc_codel and ipv6 enabled shaping script for
 # ethernet gateways
 
-# Copyright (C) 2012 Michael D Taht
-# GPLv2
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+#       Copyright (C) 2012-4 Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller
 
 # Compared to the complexity that debloat had become
 # this cleanly shows a means of going from diffserv marking
@@ -36,10 +39,10 @@ ipt -t mangle -A QOS_MARK_${IFACE} -m tos  --tos Minimize-Delay -j MARK --set-ma
 
 if [ "$SQUASH_DSCP" = "1" ]
 then
-sqm_logger "Squashing differentiad services code points (DSCP) from ingress."
+sqm_logger "Squashing differentiated services code points (DSCP) from ingress."
 ipt -t mangle -I PREROUTING -i $IFACE -m dscp ! --dscp 0 -j DSCP --set-dscp-class be
 else
-sqm_logger "Keeping differentiad services code points (DSCP) from ingress."
+sqm_logger "Keeping differentiated services code points (DSCP) from ingress."
 ipt -t mangle -A PREROUTING -i $IFACE -m mark --mark 0x00 -g QOS_MARK_${IFACE} 
 fi
 
index 4a47d4676a1e54cd736c1d82881d60d503b14535..2e84fab9ee8f7c3e0d7bab458fa791c1e3ee8d45 100755 (executable)
@@ -3,8 +3,11 @@
 # A 3 bin tc_codel and ipv6 enabled shaping script for
 # ethernet gateways
 
-# Copyright (C) 2012 Michael D Taht
-# GPLv2
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+#       Copyright (C) 2012-4 Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller
 
 # Compared to the complexity that debloat had become
 # this cleanly shows a means of going from diffserv marking
index e82bcff5c35dfc93298e4bc145af539c4e8a664f..f06c25211ea544550727f1e270785bba90b6fad7 100755 (executable)
@@ -3,8 +3,11 @@
 # A 1 bin tc_codel and ipv6 enabled shaping script for
 # ethernet gateways. This is nearly the simplest possible
 
-# Copyright (C) 2013 Michael D Taht
-# GPLv2
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+#       Copyright (C) 2012-4 Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller
 
 . /usr/lib/sqm/functions.sh
 sqm_logger "Starting simplest.qos"
index f7323e8b926e585fa9fc85752299d0c0f002e05d..29e213b69d025462313a9472f01743e080b72d5a 100755 (executable)
@@ -1,10 +1,17 @@
 #!/bin/sh
 
-. /usr/lib/sqm/functions.sh
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+#       Copyright (C) 2012-4 Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller
 
 # allow passing in the IFACE as first command line argument
 [ ! -z ${1} ] && IFACE=${1}
-sqm_logger "${0} Stopping ${IFACE}"
+# now IFACE is defined so we can source functions.sh without creating a spurious ifb4ge00
+. /usr/lib/sqm/functions.sh
+# sqm_logger is defined in functions.sh...
+sqm_logger "${0}: Stopping ${IFACE}"
 
 # make sure to only delete the ifb associated with the current interface
 CUR_IFB=$( get_ifb_associated_with_if ${IFACE} )
@@ -13,7 +20,7 @@ sqm_stop() {
        tc qdisc del dev $IFACE ingress 2> /dev/null
        tc qdisc del dev $IFACE root 2> /dev/null
        [ ! -z "$CUR_IFB" ] && tc qdisc del dev $CUR_IFB root 2> /dev/null
-        [ ! -z "$CUR_IFB" ] && sqm_logger "${CUR_IFB} shaper deleted"
+        [ ! -z "$CUR_IFB" ] && sqm_logger "${0}: ${CUR_IFB} shaper deleted"
 }
 
 ipt_stop() {
@@ -30,6 +37,6 @@ sqm_stop
 ipt_stop
 [ ! -z "$CUR_IFB" ] && ifconfig ${CUR_IFB} down
 [ ! -z "$CUR_IFB" ] && ip link delete ${CUR_IFB} type ifb
-[ ! -z "$CUR_IFB" ] && sqm_logger "${CUR_IFB} interface deleted"
+[ ! -z "$CUR_IFB" ] && sqm_logger "${0}: ${CUR_IFB} interface deleted"
 
 exit 0
\ No newline at end of file
diff --git a/utils/lvm2/Makefile b/utils/lvm2/Makefile
new file mode 100644 (file)
index 0000000..1a00944
--- /dev/null
@@ -0,0 +1,89 @@
+#
+# Copyright (C) 2009-2010 Stefan Monnier
+# Copyright (C) 2011-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v3+.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=LVM2
+PKG_VERSION:=2.02.111
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0 LGPL-2.1
+
+PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
+PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2
+PKG_MD5SUM:=02487ab2a9e02d1ee76fe217183df28a
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libdevmapper
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=The Linux Kernel Device Mapper userspace library
+  URL:=http://sourceware.org/dm/
+  DEPENDS:=+kmod-dm +libpthread
+endef
+
+define Package/libdevmapper/description
+ The device-mapper is a component of the 2.6 linux kernel that supports logical
+ volume management. It is required by LVM2 and EVMS.
+endef
+
+define Package/lvm2
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=disc
+  TITLE:=The Linux Logical Volume Manager
+  URL:=http://sourceware.org/lvm2/
+  DEPENDS:=+libdevmapper +libblkid +libreadline +libncurses
+endef
+
+define Package/lvm2/description
+ LVM2 refers to a new userspace toolset that provide logical volume management
+ facilities on linux. It is reasonably backwards-compatible with the original
+ LVM toolset.
+endef
+
+CONFIGURE_ARGS += --disable-o_direct
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               install
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/libdevmapper.h $(1)/usr/include
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so* $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_BUILD_DIR)/libdm/libdevmapper.pc $(1)/usr/lib/pkgconfig
+endef
+
+define Package/libdevmapper/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib
+endef
+
+define Package/lvm2/install
+       $(INSTALL_DIR) $(1)/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/lvm $(1)/sbin
+       $(INSTALL_DIR) $(1)/etc/lvm
+       $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/example.conf $(1)/etc/lvm/lvm.conf
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/lvm2.init $(1)/etc/init.d/lvm2
+endef
+
+define Package/lvm2/conffiles
+/etc/lvm/lvm.conf
+endef
+
+$(eval $(call BuildPackage,libdevmapper))
+$(eval $(call BuildPackage,lvm2))
diff --git a/utils/lvm2/files/lvm2.init b/utils/lvm2/files/lvm2.init
new file mode 100644 (file)
index 0000000..3b542d0
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2009 Stefan Monnier
+START=15
+
+start () {
+   /sbin/lvm vgscan --ignorelockingfailure --mknodes || :
+   /sbin/lvm vgchange -aly --ignorelockingfailure || return 2
+}
+
+stop () {
+    /sbin/lvm vgchange -aln --ignorelockingfailure || return 2
+}
diff --git a/utils/lvm2/patches/000-compile.patch b/utils/lvm2/patches/000-compile.patch
new file mode 100644 (file)
index 0000000..0c7dfea
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/make.tmpl.in
++++ b/make.tmpl.in
+@@ -19,7 +19,7 @@
+ # Allow environment to override any built-in default value for CC.
+ # If there is a built-in default, CC is NOT set to @CC@ here.
+-CC ?= @CC@
++CC = @CC@
+ # If $(CC) holds the usual built-in default value of 'cc' then replace it with
+ # the configured value.
diff --git a/utils/lvm2/patches/001-include_fix.patch b/utils/lvm2/patches/001-include_fix.patch
new file mode 100644 (file)
index 0000000..0c79d5d
--- /dev/null
@@ -0,0 +1,12 @@
+diff -urN LVM2.2.02.111.old/lib/device/dev-type.c LVM2.2.02.111/lib/device/dev-type.c
+--- LVM2.2.02.111.old/lib/device/dev-type.c    2014-09-17 09:41:08.281821278 -0400
++++ LVM2.2.02.111/lib/device/dev-type.c        2014-09-17 09:41:50.773821280 -0400
+@@ -22,7 +22,7 @@
+ #include <ctype.h>
+ #ifdef BLKID_WIPING_SUPPORT
+-#include <blkid.h>
++#include <blkid/blkid.h>
+ #endif
+ #include "device-types.h"