From: RISCi_ATOM Date: Sat, 29 Jun 2019 20:27:15 +0000 (-0400) Subject: Package feed refresh X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1799f8354d4bd87a8467c3072277aa2dcf87e29b;p=librecmc%2Fpackage-feed.git Package feed refresh --- diff --git a/admin/debootstrap/Makefile b/admin/debootstrap/Makefile deleted file mode 100644 index 72d2c5b..0000000 --- a/admin/debootstrap/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2010 Gianluigi Tiesi -# Copyright (C) 2011-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=debootstrap -PKG_VERSION:=1.0.87 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Daniel Golle - -PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/debootstrap -PKG_MD5SUM:=784f5754f3287ae80715d9100a4ed04e7895be5f7b81b7b2295d335dd69d79fb -PKG_LICENSE:=Unique -PKG_LICENSE_FILES:=debian/copyright - -UNPACK_CMD=ar -p "$(DL_DIR)/$(PKG_SOURCE)" data.tar.xz | xzcat | tar -C $(1) -xf - - -include $(INCLUDE_DIR)/package.mk - -define Package/debootstrap - SECTION:=admin - CATEGORY:=Administration - TITLE:=Bootstrap a basic Debian system - URL:=http://wiki.debian.org/Debootstrap - DEPENDS:= +coreutils +coreutils-chroot +coreutils-sha1sum +ar +xz -endef - -define Package/debootstrap/description - debootstrap is used to create a Debian base system from scratch, without - requiring the availability of dpkg or apt. It does this by downloading .deb - files from a mirror site, and carefully unpacking them into a directory which - can eventually be chrooted into. -endef - -define Build/Compile -# file pkgdetails.c was imported from debian package base-installer version 1.130 - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) ./files/pkgdetails.c -o $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails -endef - -define Package/debootstrap/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin - $(INSTALL_DIR) $(1)/usr/share/debootstrap - $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails $(1)/usr/share/debootstrap - $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/functions $(1)/usr/share/debootstrap - $(INSTALL_DIR) $(1)/usr/share/debootstrap/scripts - $(CP) $(PKG_BUILD_DIR)/usr/share/debootstrap/scripts/* $(1)/usr/share/debootstrap/scripts -endef - -$(eval $(call BuildPackage,debootstrap)) diff --git a/admin/debootstrap/files/pkgdetails.c b/admin/debootstrap/files/pkgdetails.c deleted file mode 100644 index 99ee190..0000000 --- a/admin/debootstrap/files/pkgdetails.c +++ /dev/null @@ -1,347 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#define MAX_LINE 1000 -#define MAX_PKGS 100 - -char *checksum_field=NULL; - -static void oom_die(void) -{ - fputs("Out of memory!\n", stderr); - exit(1); -} - -static char *xvasprintf(const char *fmt, va_list ap) { - char *ret; - - if (vasprintf (&ret, fmt, ap) < 0) { - if (errno == ENOMEM) - oom_die(); - return NULL; - } - return ret; -} - -static char *xasprintf(const char *fmt, ...) { - va_list ap; - char *ret; - - va_start(ap, fmt); - ret = xvasprintf(fmt, ap); - va_end(ap); - return ret; -} - -static char *fieldcpy(char *dst, char *fld) { - while (*fld && *fld != ':') - fld++; - if (!*(fld++)) - return NULL; - while (isspace(*fld)) fld++; - return strcpy(dst, fld); -} - -static void outputdeps(char *deps) { - char *pch = deps; - - while (1) { - while (isspace(*pch)) pch++; - if (!*pch) break; - - while (*pch && *pch != '(' && *pch != '|' && *pch != ',' - && !isspace(*pch)) - { - fputc(*pch++, stdout); - } - fputc('\n', stdout); - while (*pch && *pch++ != ',') (void)NULL; - } -} - -static void dogetdeps(char *pkgsfile, char **in_pkgs, int pkgc) { - char buf[MAX_LINE]; - char cur_pkg[MAX_LINE]; - char cur_deps[MAX_LINE]; - char cur_predeps[MAX_LINE]; - char prev_pkg[MAX_LINE]; - char *pkgs[MAX_PKGS]; - int i; - int skip; - FILE *f; - int output_pkg = -1; - - cur_pkg[0] = cur_deps[0] = cur_predeps[0] = prev_pkg[0] = '\0'; - - for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i]; - - f = fopen(pkgsfile, "r"); - if (f == NULL) { - perror(pkgsfile); - exit(1); - } - - skip = 1; - while (fgets(buf, sizeof(buf), f)) { - if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; - if (strncasecmp(buf, "Package:", 8) == 0) { - int any = 0; - skip = 1; - fieldcpy(cur_pkg, buf); - if (strcmp(cur_pkg, prev_pkg) != 0) { - if (output_pkg != -1) - pkgs[output_pkg] = NULL; - if (cur_deps[0]) - outputdeps(cur_deps); - if (cur_predeps[0]) - outputdeps(cur_predeps); - strcpy(prev_pkg, cur_pkg); - } - cur_deps[0] = cur_predeps[0] = '\0'; - output_pkg = -1; - for (i = 0; i < pkgc; i++) { - if (!pkgs[i]) continue; - any = 1; - if (strcmp(cur_pkg, pkgs[i]) == 0) { - skip = 0; - output_pkg = i; - break; - } - } - if (!any) break; - } else if (!skip && strncasecmp(buf, "Depends:", 8) == 0) - fieldcpy(cur_deps, buf); - else if (!skip && strncasecmp(buf, "Pre-Depends:", 12) == 0) - fieldcpy(cur_predeps, buf); - } - if (cur_deps[0]) - outputdeps(cur_deps); - if (cur_predeps[0]) - outputdeps(cur_predeps); - fclose(f); -} - -static void dopkgmirrorpkgs(int uniq, char *mirror, char *pkgsfile, - char *fieldname, char **in_pkgs, int pkgc) -{ - char buf[MAX_LINE]; - char cur_field[MAX_LINE]; - char cur_pkg[MAX_LINE]; - char cur_ver[MAX_LINE]; - char cur_arch[MAX_LINE]; - char cur_size[MAX_LINE]; - char cur_checksum[MAX_LINE]; - char cur_filename[MAX_LINE]; - char prev_pkg[MAX_LINE]; - char *pkgs[MAX_PKGS]; - int i; - FILE *f; - char *output = NULL; - int output_pkg = -1; - - cur_field[0] = cur_pkg[0] = cur_ver[0] = cur_arch[0] = cur_filename[0] = prev_pkg[0] = '\0'; - - for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i]; - - f = fopen(pkgsfile, "r"); - if (f == NULL) { - perror(pkgsfile); - exit(1); - } - while (fgets(buf, sizeof(buf), f)) { - if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; - if (strncasecmp(buf, fieldname, strlen(fieldname)) == 0) { - fieldcpy(cur_field, buf); - } - if (strncasecmp(buf, "Package:", 8) == 0) { - fieldcpy(cur_pkg, buf); - if (strcmp(cur_pkg, prev_pkg) != 0) { - if (output) - fputs(output, stdout); - if (uniq && output_pkg != -1) - pkgs[output_pkg] = NULL; - strcpy(prev_pkg, cur_pkg); - } - free(output); - output = NULL; - output_pkg = -1; - } else if (strncasecmp(buf, "Version:", 8) == 0) { - fieldcpy(cur_ver, buf); - } else if (strncasecmp(buf, "Architecture:", 13) == 0) { - fieldcpy(cur_arch, buf); - } else if (strncasecmp(buf, "Size:", 5) == 0) { - fieldcpy(cur_size, buf); - } else if (strncasecmp(buf, checksum_field, strlen(checksum_field)) == 0 - && buf[strlen(checksum_field)] == ':') { - fieldcpy(cur_checksum, buf); - } else if (strncasecmp(buf, "Filename:", 9) == 0) { - fieldcpy(cur_filename, buf); - } else if (!*buf) { - int any = 0; - for (i = 0; i < pkgc; i++) { - if (!pkgs[i]) continue; - any = 1; - if (strcmp(cur_field, pkgs[i]) == 0) { - free(output); - output = xasprintf("%s %s %s %s %s %s %s\n", cur_pkg, cur_ver, cur_arch, mirror, cur_filename, cur_checksum, cur_size); - output_pkg = i; - break; - } - } - if (!any) break; - cur_field[0] = '\0'; - } - } - if (output) - fputs(output, stdout); - if (uniq && output_pkg != -1) - pkgs[output_pkg] = NULL; - fclose(f); - - /* any that weren't found are returned as "pkg -" */ - if (uniq) { - for (i = 0; i < pkgc; i++) { - if (pkgs[i]) { - printf("%s -\n", pkgs[i]); - } - } - } -} - -static void dopkgstanzas(char *pkgsfile, char **pkgs, int pkgc) -{ - char buf[MAX_LINE]; - char *accum; - size_t accum_size = 0, accum_alloc = MAX_LINE * 2; - char cur_pkg[MAX_LINE]; - FILE *f; - - accum = malloc(accum_alloc); - if (!accum) - oom_die(); - - f = fopen(pkgsfile, "r"); - if (f == NULL) { - perror(pkgsfile); - free(accum); - exit(1); - } - while (fgets(buf, sizeof(buf), f)) { - if (*buf) { - size_t len = strlen(buf); - if (accum_size + len + 1 > accum_alloc) { - accum_alloc = (accum_size + len + 1) * 2; - accum = realloc(accum, accum_alloc); - if (!accum) - oom_die(); - } - strcpy(accum + accum_size, buf); - accum_size += len; - } - if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0'; - if (strncasecmp(buf, "Package:", 8) == 0) { - fieldcpy(cur_pkg, buf); - } else if (!*buf) { - int i; - for (i = 0; i < pkgc; i++) { - if (!pkgs[i]) continue; - if (strcmp(cur_pkg, pkgs[i]) == 0) { - fputs(accum, stdout); - if (accum[accum_size - 1] != '\n') - fputs("\n\n", stdout); - else if (accum[accum_size - 2] != '\n') - fputc('\n', stdout); - break; - } - } - *accum = '\0'; - accum_size = 0; - } - } - fclose(f); - - free(accum); -} - -static int dotranslatewgetpercent(int low, int high, int end, char *str) { - int ch; - int val, lastval; - - /* print out anything that looks like a % on its own line, appropriately - * scaled */ - - lastval = val = 0; - while ( (ch = getchar()) != EOF ) { - if (isdigit(ch)) { - val *= 10; val += ch - '0'; - } else if (ch == '%') { - float f = (float) val / 100.0 * (high - low) + low; - if (str) { - printf("P: %d %d %s\n", (int) f, end, str); - } else { - printf("P: %d %d\n", (int) f, end); - } - lastval = val; - } else { - val = 0; - } - } - return lastval == 100; -} - -int main(int argc, char *argv[]) { - checksum_field=getenv("DEBOOTSTRAP_CHECKSUM_FIELD"); - if (checksum_field == NULL) { - checksum_field="MD5sum"; - } - - if ((argc == 6 || argc == 5) && strcmp(argv[1], "WGET%") == 0) { - if (dotranslatewgetpercent(atoi(argv[2]), atoi(argv[3]), - atoi(argv[4]), argc == 6 ? argv[5] : NULL)) - { - exit(0); - } else { - exit(1); - } - } else if (argc >= 4 && strcmp(argv[1], "GETDEPS") == 0) { - int i; - for (i = 3; argc - i > MAX_PKGS; i += MAX_PKGS) { - dogetdeps(argv[2], argv+i, MAX_PKGS); - } - dogetdeps(argv[2], argv+i, argc-i); - exit(0); - } else if (argc >= 5 && strcmp(argv[1], "PKGS") == 0) { - int i; - for (i = 4; argc - i > MAX_PKGS; i += MAX_PKGS) { - dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, MAX_PKGS); - } - dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, argc-i); - exit(0); - } else if (argc >= 6 && strcmp(argv[1], "FIELD") == 0) { - int i; - for (i = 5; argc - i > MAX_PKGS; i += MAX_PKGS) { - dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, MAX_PKGS); - } - dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, argc-i); - exit(0); - } else if (argc >= 4 && strcmp(argv[1], "STANZAS") == 0) { - int i; - for (i = 3; argc - i > MAX_PKGS; i += MAX_PKGS) { - dopkgstanzas(argv[2], argv+i, MAX_PKGS); - } - dopkgstanzas(argv[2], argv+i, argc-i); - exit(0); - } else { - fprintf(stderr, "usage: %s PKGS mirror packagesfile pkgs..\n", argv[0]); - fprintf(stderr, " or: %s FIELD field mirror packagesfile pkgs..\n", - argv[0]); - fprintf(stderr, " or: %s GETDEPS packagesfile pkgs..\n", argv[0]); - fprintf(stderr, " or: %s STANZAS packagesfile pkgs..\n", argv[0]); - fprintf(stderr, " or: %s WGET%% low high end reason\n", argv[0]); - exit(1); - } -} diff --git a/admin/debootstrap/patches/100-busybox_fix.patch b/admin/debootstrap/patches/100-busybox_fix.patch deleted file mode 100644 index 5e8db05..0000000 --- a/admin/debootstrap/patches/100-busybox_fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/usr/share/debootstrap/functions -+++ b/usr/share/debootstrap/functions -@@ -859,8 +859,6 @@ choose_extractor () { - - if [ -n "$EXTRACTOR_OVERRIDE" ]; then - extractor="$EXTRACTOR_OVERRIDE" -- elif type dpkg-deb >/dev/null 2>&1; then -- extractor="dpkg-deb" - else - extractor="ar" - fi diff --git a/admin/htop/Makefile b/admin/htop/Makefile deleted file mode 100644 index 010f36d..0000000 --- a/admin/htop/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=htop -PKG_VERSION:=2.0.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://hisham.hm/htop/releases/$(PKG_VERSION)/ -PKG_MD5SUM:=7d354d904bad591a931ad57e99fea84a - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/htop - SECTION:=admin - CATEGORY:=Administration - TITLE:=Interactive processes viewer - DEPENDS:=+libncurses - URL:=http://htop.sourceforge.net/ - MAINTAINER:=Etienne CHAMPETIER -endef - -define Package/htop/description - Htop is an ncursed-based process viewer similar to top, but - it allows to scroll the list vertically and horizontally to - see all processes and their full command lines. -endef - -CONFIGURE_ARGS += \ - --disable-unicode \ - --disable-hwloc - -CONFIGURE_VARS += \ - ac_cv_file__proc_stat=yes \ - ac_cv_file__proc_meminfo=yes - -define Package/htop/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,htop)) diff --git a/admin/htop/patches/100-fix-libtool-version-check.patch b/admin/htop/patches/100-fix-libtool-version-check.patch deleted file mode 100644 index c786213..0000000 --- a/admin/htop/patches/100-fix-libtool-version-check.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -2,7 +2,7 @@ - # Process this file with autoconf to produce a configure script. - - AC_PREREQ(2.65) --LT_PREREQ([2.4.2]) -+LT_PREREQ([2.4.0]) - AC_INIT([htop],[2.0.2],[hisham@gobolinux.org]) - - SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}" diff --git a/admin/monit/Makefile b/admin/monit/Makefile deleted file mode 100644 index 4f8c14a..0000000 --- a/admin/monit/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=monit -PKG_VERSION:=5.18 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://mmonit.com/monit/dist -PKG_MD5SUM:=a1bfac0fbb83439435f8616200d2364d - -PKG_LICENSE:=AGPL-3.0 -PKG_LICENSE_FILES:=COPYING - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/monit/Default - SECTION:=admin - CATEGORY:=Administration - DEPENDS:= +libpthread - TITLE:=System services monitoring utility - URL:=http://mmonit.com/monit/ - MAINTAINER:=Etienne CHAMPETIER -endef - -define Package/monit/Default/description - An utility for monitoring services on a Unix system -endef - -define Package/monit -$(call Package/monit/Default) - DEPENDS+= +libopenssl - TITLE+= (with SSL support) - VARIANT:=ssl -endef - -define Package/monit/description -$(call Package/monit/Default/description) - This package is built with SSL support. -endef - -define Package/monit-nossl -$(call Package/monit/Default) - TITLE+= (without SSL support) - VARIANT:=nossl -endef - -define Package/monit-nossl/description -$(call Package/monit/Default/description) - This package is built without SSL support. -endef - -CONFIGURE_ARGS += \ - --without-pam \ - libmonit_cv_setjmp_available=yes \ - libmonit_cv_vsnprintf_c99_conformant=yes - -ifeq ($(BUILD_VARIANT),ssl) - CONFIGURE_ARGS += \ - --with-ssl \ - --with-ssl-dir="$(STAGING_DIR)/usr" -endif - -ifeq ($(BUILD_VARIANT),nossl) - CONFIGURE_ARGS += \ - --without-ssl -endif - -define Package/monit/conffiles -/etc/monitrc -endef - -define Package/monit/install - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/monit $(1)/usr/bin/ -endef - -Package/monit-nossl/conffiles = $(Package/monit/conffiles) -Package/monit-nossl/install = $(Package/monit/install) - -$(eval $(call BuildPackage,monit)) -$(eval $(call BuildPackage,monit-nossl)) diff --git a/admin/monit/files/monit.init b/admin/monit/files/monit.init deleted file mode 100644 index 2bb3609..0000000 --- a/admin/monit/files/monit.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=60 -USE_PROCD=1 -PROG=/usr/bin/monit - -start_service() { - [ -f /etc/monitrc ] || { echo "monit: /etc/monitrc is missing"; return 1; } - chmod 0600 /etc/monitrc - procd_open_instance - # -I runs in foreground, as procd requires - procd_set_param command "$PROG" -I - procd_close_instance -} diff --git a/admin/monit/patches/001-fix-default-piddir.patch b/admin/monit/patches/001-fix-default-piddir.patch deleted file mode 100644 index 7af871f..0000000 --- a/admin/monit/patches/001-fix-default-piddir.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/configure -+++ b/configure -@@ -13849,14 +13849,7 @@ fi - # Find the right directory to put the root-mode PID file in - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pid file location" >&5 - $as_echo_n "checking pid file location... " >&6; } --if test -d "/run" --then -- piddir="/run" --elif test -d "/var/run"; then -- piddir="/var/run" --elif test -d "/etc"; then -- piddir="/etc" --fi -+piddir="/var/run" - - - cat >>confdefs.h <<_ACEOF diff --git a/admin/muninlite/Makefile b/admin/muninlite/Makefile deleted file mode 100644 index ef7e11d..0000000 --- a/admin/muninlite/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=muninlite -PKG_VERSION:=1.0.4 -PKG_RELEASE:=8 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_MD5SUM:=a8cc86f0cc536a6c22dc298f4ed55339 -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/muninlite - SECTION:=admin - CATEGORY:=Administration - DEPENDS:=+xinetd - TITLE:=Munin node implemented in shell - URL:=http://sourceforge.net/projects/muninlite/ - PKG_MAINTAINER:=Jonathan McCrohan -endef - -define Package/muninlite/Default/description - Munin node implemented in shell. - Munin is a monitoring system for Unix networks. -endef - -define Package/muninlite/install - $(INSTALL_DIR) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/munin-node $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/xinetd.d - $(INSTALL_DATA) ./files/etc/xinetd.d/munin $(1)/etc/xinetd.d/ -endef - -define Package/muninlite/conffiles -/etc/xinetd.d/munin -endef - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) -endef - -$(eval $(call BuildPackage,muninlite)) diff --git a/admin/muninlite/files/etc/xinetd.d/munin b/admin/muninlite/files/etc/xinetd.d/munin deleted file mode 100644 index 012d71b..0000000 --- a/admin/muninlite/files/etc/xinetd.d/munin +++ /dev/null @@ -1,10 +0,0 @@ -service munin -{ - socket_type = stream - protocol = tcp - wait = no - user = root - group = root - server = /usr/sbin/munin-node - disable = no -} diff --git a/admin/muninlite/patches/001-fix_disks.patch b/admin/muninlite/patches/001-fix_disks.patch deleted file mode 100644 index a2264a8..0000000 --- a/admin/muninlite/patches/001-fix_disks.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/plugins/df -+++ b/plugins/df -@@ -19,6 +19,6 @@ fetch_df() { - do - PINFO=$(df -P $PART | tail -1); - PNAME=$(echo $PINFO | cut -d\ -f1 | sed 's/[\/.-]/_/g') -- echo "$PNAME.value" $(echo $PINFO | cut -f5 -d\ | sed -e 's/\%//g') -+ echo "$PNAME.value" $(echo $PINFO | sed -e 's/\%//g' -e 's/ */ /g' | cut -f5 -d' ') - done - } diff --git a/admin/muninlite/patches/002-hostname.patch b/admin/muninlite/patches/002-hostname.patch deleted file mode 100644 index 5d87168..0000000 --- a/admin/muninlite/patches/002-hostname.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/munin-node.in -+++ b/munin-node.in -@@ -113,7 +113,7 @@ PLUGINS=$RES - - # ===== MAIN LOOP ===== - FUNCTIONS="list nodes config fetch version quit" --HOSTNAME=$(hostname -f 2>/dev/null || hostname) -+HOSTNAME=$(/sbin/uci get "system.@system[0].hostname" 2>/dev/null || cat /proc/sys/kernel/hostname) - echo "# munin node at $HOSTNAME" - while read arg0 arg1 - do diff --git a/admin/muninlite/patches/100-fix-no-ethtool.patch b/admin/muninlite/patches/100-fix-no-ethtool.patch deleted file mode 100644 index 88f7e30..0000000 --- a/admin/muninlite/patches/100-fix-no-ethtool.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/plugins/if_ -+++ b/plugins/if_ -@@ -15,10 +15,14 @@ config_if() { - echo "up.min 0" - echo "up.negative down" - echo "up.cdef up,8,*" -- if ethtool $1 | grep -q Speed; then -- MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000)) -- echo "up.max $MAX" -- echo "down.max $MAX" -+ if [ -n "$(which ethtool)" ]; then -+ if [ -x "$(which ethtool)" ]; then -+ if ethtool $1 | grep -q Speed; then -+ MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000)) -+ echo "up.max $MAX" -+ echo "down.max $MAX" -+ fi -+ fi - fi - } - fetch_if() { diff --git a/admin/muninlite/patches/110-fix-uptime-days.patch b/admin/muninlite/patches/110-fix-uptime-days.patch deleted file mode 100644 index d9aa43f..0000000 --- a/admin/muninlite/patches/110-fix-uptime-days.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/plugins/uptime -+++ b/plugins/uptime -@@ -4,8 +4,7 @@ config_uptime() { - echo "graph_vlabel uptime in days" - echo "uptime.label uptime" - echo "uptime.draw AREA" -- echo "uptime.cdef uptime,86400,/" - } - fetch_uptime() { -- echo "uptime.value" $(cut -d\ -f1 /proc/uptime) -+ awk '{printf "uptime.value %.2f",$1/86400; print ""}' /proc/uptime - } diff --git a/admin/muninlite/patches/200-add-tap-dev.patch b/admin/muninlite/patches/200-add-tap-dev.patch deleted file mode 100644 index fa46ce6..0000000 --- a/admin/muninlite/patches/200-add-tap-dev.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/munin-node.in -+++ b/munin-node.in -@@ -72,7 +72,7 @@ RES="" - for PLUG in $PLUGINS - do - if [ "$PLUG" = "if_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do - INTERRES=$(echo $INTER | sed 's/\./VLAN/') - RES="$RES if_$INTERRES" -@@ -80,7 +80,7 @@ do - eval "config_if_${INTERRES}() { config_if $INTER $@; };" - done - elif [ "$PLUG" = "if_err_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do - INTERRES=$(echo $INTER | sed 's/\./VLAN/') - RES="$RES if_err_$INTERRES" diff --git a/admin/muninlite/patches/210-add-bridge-devs.patch b/admin/muninlite/patches/210-add-bridge-devs.patch deleted file mode 100644 index 1a76e97..0000000 --- a/admin/muninlite/patches/210-add-bridge-devs.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/munin-node.in -+++ b/munin-node.in -@@ -72,17 +72,17 @@ RES="" - for PLUG in $PLUGINS - do - if [ "$PLUG" = "if_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do -- INTERRES=$(echo $INTER | sed 's/\./VLAN/') -+ INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') - RES="$RES if_$INTERRES" - eval "fetch_if_${INTERRES}() { fetch_if $INTER $@; };" - eval "config_if_${INTERRES}() { config_if $INTER $@; };" - done - elif [ "$PLUG" = "if_err_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do -- INTERRES=$(echo $INTER | sed 's/\./VLAN/') -+ INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') - RES="$RES if_err_$INTERRES" - eval "fetch_if_err_${INTERRES}() { fetch_if_err $INTER $@; };" - eval "config_if_err_${INTERRES}() { config_if_err $INTER $@; };" diff --git a/admin/muninlite/patches/220-modify-ifname-parser.patch b/admin/muninlite/patches/220-modify-ifname-parser.patch deleted file mode 100644 index 6a2ba23..0000000 --- a/admin/muninlite/patches/220-modify-ifname-parser.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/plugins/if_ -+++ b/plugins/if_ -@@ -26,7 +26,7 @@ config_if() { - fi - } - fetch_if() { -- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g') -+ IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//') - echo "down.value" $(echo $IINFO | cut -d\ -f1) - echo "up.value" $(echo $IINFO | cut -d\ -f9) - } ---- a/plugins/if_err_ -+++ b/plugins/if_err_ -@@ -15,7 +15,7 @@ config_if_err() { - echo "trans.warning 1" - } - fetch_if_err() { -- IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ / /g') -+ IINFO=$(grep "$1:" /proc/net/dev | cut -d: -f2 | sed -e 's/ */ /g' -e 's/^[ \t]*//') - echo "rcvd.value" $(echo $IINFO | cut -d\ -f3) - echo "trans.value" $(echo $IINFO | cut -d\ -f11) - } diff --git a/admin/muninlite/patches/230-fix-available-interface-parsing.patch b/admin/muninlite/patches/230-fix-available-interface-parsing.patch deleted file mode 100644 index 2f227e5..0000000 --- a/admin/muninlite/patches/230-fix-available-interface-parsing.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/munin-node.in -+++ b/munin-node.in -@@ -72,7 +72,7 @@ RES="" - for PLUG in $PLUGINS - do - if [ "$PLUG" = "if_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do - INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') - RES="$RES if_$INTERRES" -@@ -80,7 +80,7 @@ do - eval "config_if_${INTERRES}() { config_if $INTER $@; };" - done - elif [ "$PLUG" = "if_err_" ]; then -- for INTER in $(grep '^ *\(ppp\|eth\|wlan\|ath\|ra\|ipsec\|tap\|br-\)\([^:]\)\{1,\}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); -+ for INTER in $(grep -E '^ *(ppp|eth|wlan|ath|ra|ipsec|tap|br-)[^:]{1,}:' /proc/net/dev | cut -f1 -d: | sed 's/ //g'); - do - INTERRES=$(echo $INTER | sed -e 's/\./VLAN/' -e 's/\-/_/') - RES="$RES if_err_$INTERRES" diff --git a/admin/netdata/Makefile b/admin/netdata/Makefile deleted file mode 100644 index 022ef8b..0000000 --- a/admin/netdata/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (C) 2008-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=netdata -PKG_VERSION:=1.4.0 -PKG_RELEASE:=3 -PKG_MAINTAINER:=Daniel Engberg -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://firehol.org/download/netdata/releases/v$(PKG_VERSION) -PKG_SOURCE_VERSION:=3028b87ee19e8550df6b9decc49733d595e0bd6e - -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/netdata - SECTION:=admin - CATEGORY:=Administration - DEPENDS:=+zlib +libuuid - TITLE:=Real-time performance monitoring tool - URL:=http://netdata.firehol.org/ -endef - -define Package/netdata/description - netdata is a highly optimized Linux daemon providing real-time performance - monitoring for Linux systems, applications and SNMP devices over the web. -endef - -define Package/netdata/conffiles -/etc/netdata/ -endef - -define Package/netdata/install - mkdir -p $(1)/etc/netdata - $(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc - $(CP) ./files/netdata.conf $(1)/etc/netdata - mkdir -p $(1)/usr/share/netdata - $(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share - rm $(1)/usr/share/netdata/web/images/animated.gif - rm -rf $(1)/usr/share/netdata/web/old - rm $(1)/usr/share/netdata/web/demo*html - rm $(1)/usr/share/netdata/web/fonts/*.svg - rm $(1)/usr/share/netdata/web/fonts/*.ttf - rm $(1)/usr/share/netdata/web/fonts/*.woff - rm $(1)/usr/share/netdata/web/fonts/*.otf - mkdir -p $(1)/usr/lib/netdata - $(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib - rm $(1)/usr/lib/netdata/python.d/python-modules-installer.sh - rm -rf $(1)/usr/lib/netdata/python.d/python_modules/pyyaml2 - rm -rf $(1)/usr/lib/netdata/python.d/python_modules/pyyaml3 - chmod 4755 $(1)/usr/lib/netdata/plugins.d/apps.plugin - mkdir -p $(1)/etc/init.d - $(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata - mkdir -p $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin -endef - -$(eval $(call BuildPackage,netdata)) diff --git a/admin/netdata/files/netdata.conf b/admin/netdata/files/netdata.conf deleted file mode 100644 index 8c5c56b..0000000 --- a/admin/netdata/files/netdata.conf +++ /dev/null @@ -1,43 +0,0 @@ -### NetData Configuration - -### Notes about plugins -### -### charts.d - REQUIRES Bash, enable here and edit charts.d.conf -### apps - none atm -### node.d - REQUIRES node.js -### tc - QoS stats (if wanted) -### cgcroups - No support in OpenWRT/LEDE by default -### health - Disabled by default -### KSM - No support in OpenWRT/LEDE by default -### python.d - REQUIRES python and PyYAML, edit python.d.conf to enable - -[global] - run as user = nobody - web files owner = root - web files group = root - update every = 2 - history = 1800 - access log = none - debug log = syslog - error log = syslog - memory mode = ram - -[plugins] - charts.d = no - apps = no - node.d = no - tc = no - cgroups = no - -[health] - enabled = no - -[plugin:proc] - /proc/net/softnet_stat = no - /proc/net/snmp = no - /sys/kernel/mm/ksm = no - /proc/net/netstat = no - /proc/net/ip_vs_stats = no - /proc/net/stat/synproxy = no - /proc/net/rpc/nfsd = no - /proc/net/rpc/nfs = no diff --git a/admin/netdata/files/netdata.init b/admin/netdata/files/netdata.init deleted file mode 100644 index d4be0a7..0000000 --- a/admin/netdata/files/netdata.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 -USE_PROCD=1 - -APPBINARY=/usr/sbin/netdata -CONFIGFILE=/etc/netdata/netdata.conf - - start_service() { - mkdir -m 0755 -p /var/cache/netdata - chown nobody /var/cache/netdata - mkdir -m 0755 -p /var/lib/netdata - chown nobody /var/lib/netdata - mkdir -m 0755 -p /var/log/netdata - chown nobody /var/log/netdata - procd_open_instance - procd_set_param command $APPBINARY -nd -c $CONFIGFILE - procd_set_param file $CONFIGFILE - procd_set_param respawn - procd_close_instance - } diff --git a/admin/netdata/patches/001-disable_external_plugins_by_default.patch b/admin/netdata/patches/001-disable_external_plugins_by_default.patch deleted file mode 100644 index cf9dc83..0000000 --- a/admin/netdata/patches/001-disable_external_plugins_by_default.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/conf.d/charts.d.conf b/conf.d/charts.d.conf -index acb2a6f..8111859 100644 ---- a/conf.d/charts.d.conf -+++ b/conf.d/charts.d.conf -@@ -30,7 +30,7 @@ - - # the default enable/disable for all charts.d collectors - # the default is "yes" --# enable_all_charts="yes" -+enable_all_charts="no" - - # BY DEFAULT ENABLED MODULES - # ap=yes -diff --git a/conf.d/python.d.conf b/conf.d/python.d.conf -index 940bd91..78e2f0a 100644 ---- a/conf.d/python.d.conf -+++ b/conf.d/python.d.conf -@@ -7,7 +7,7 @@ - # - - # Enable / disable the whole python.d.plugin (all its modules) --enabled: yes -+enabled: no - - # Prevent log flood - # Define how many log messages can be written to log file in one log_interval diff --git a/admin/openwisp-config/Makefile b/admin/openwisp-config/Makefile deleted file mode 100644 index ed539b0..0000000 --- a/admin/openwisp-config/Makefile +++ /dev/null @@ -1,119 +0,0 @@ -# openwisp.org -# -# This is free software, licensed under the GNU General Public License v3. -# See /LICENSE for more information. -include $(TOPDIR)/rules.mk - -PKG_NAME:=openwisp-config -PKG_VERSION:=0.4.5 -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_PROTO:=git -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://github.com/openwisp/openwisp-config.git -PKG_SOURCE_VERSION:=0.4.5 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) -PKG_MIRROR_HASH:=017a8ed35ebfda2805426e7da02559d5cc2845ee9ded60fdae8e848d377424fb -PKG_LICENSE:=GPL-3.0 -PKGARCH:=all - -include $(INCLUDE_DIR)/package.mk - -define Package/openwisp-config/default - TITLE:=Remote configuration management agent ($(2) variant) - CATEGORY:=Administration - SECTION:=admin - SUBMENU:=openwisp - DEPENDS:=+curl +lua +libuci-lua +luafilesystem $(3) - VARIANT:=$(1) - MAINTAINER:=Federico Capoano - URL:=http://openwisp.org -endef - -Package/openwisp-config-openssl=$(call Package/openwisp-config/default,openssl,OpenSSL,+ca-certificates +libopenssl) -Package/openwisp-config-mbedtls=$(call Package/openwisp-config/default,mbedtls,mbedTLS,+ca-certificates +libmbedtls) -Package/openwisp-config-cyassl=$(call Package/openwisp-config/default,cyassl,CyaSSL,+ca-certificates +libcyassl) -# deprecated on recent versions of OpenWRT (>= Designated Driver) and LEDE (>= 17.01) -Package/openwisp-config-polarssl=$(call Package/openwisp-config/default,polarssl,PolarSSL,+ca-certificates +libpolarssl) -Package/openwisp-config-nossl=$(call Package/openwisp-config/default,nossl,No SSL) - -define Build/Compile -endef - -define Package/openwisp-config-$(BUILD_VARIANT)/conffiles -/etc/config/openwisp -endef - -ifeq ($(BUILD_VARIANT),openssl) -CONFIG_OPENWISP_UCI:=ssl -endif -ifeq ($(BUILD_VARIANT),mbedtls) -CONFIG_OPENWISP_UCI:=ssl -endif -ifeq ($(BUILD_VARIANT),cyassl) -CONFIG_OPENWISP_UCI:=ssl -endif -ifeq ($(BUILD_VARIANT),polarssl) -CONFIG_OPENWISP_UCI:=ssl -endif -ifeq ($(BUILD_VARIANT),nossl) -CONFIG_OPENWISP_UCI:=nossl -endif - - -define Package/openwisp-config-$(BUILD_VARIANT)/install - $(INSTALL_DIR) \ - $(1)/usr/sbin \ - $(1)/etc/init.d \ - $(1)/etc/config \ - $(1)/etc/openwisp \ - $(1)/usr/lib/lua/openwisp - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \ - $(1)/usr/sbin/openwisp_config - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \ - $(1)/etc/init.d/openwisp_config - - $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwisp-config/files/openwisp-$(CONFIG_OPENWISP_UCI).config \ - $(1)/etc/config/openwisp - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-reload-config \ - $(1)/usr/sbin/openwisp-reload-config - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/utils.lua \ - $(1)/usr/lib/lua/openwisp/utils.lua - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-store-unmanaged.lua \ - $(1)/usr/sbin/openwisp-store-unmanaged - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-restore-unmanaged.lua \ - $(1)/usr/sbin/openwisp-restore-unmanaged - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-remove-default-wifi.lua \ - $(1)/usr/sbin/openwisp-remove-default-wifi - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-uci-autoname.lua \ - $(1)/usr/sbin/openwisp-uci-autoname - - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-update-config.lua \ - $(1)/usr/sbin/openwisp-update-config - - $(CP) $(PKG_BUILD_DIR)/VERSION $(1)/etc/openwisp/ -endef - -$(eval $(call BuildPackage,openwisp-config-openssl)) -$(eval $(call BuildPackage,openwisp-config-mbedtls)) -$(eval $(call BuildPackage,openwisp-config-cyassl)) -$(eval $(call BuildPackage,openwisp-config-polarssl)) -$(eval $(call BuildPackage,openwisp-config-nossl)) diff --git a/admin/sudo/Makefile b/admin/sudo/Makefile deleted file mode 100644 index e9090ee..0000000 --- a/admin/sudo/Makefile +++ /dev/null @@ -1,98 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sudo -PKG_VERSION:=1.8.14p3 -PKG_RELEASE:=1 -PKG_LICENSE:=ISC -PKG_LICENSE_FILES:=doc/LICENSE - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.sudo.ws/dist -PKG_MD5SUM:=93dbd1e47c136179ff1b01494c1c0e75 - -PKG_INSTALL:=1 - -PKG_BUILD_DEPENDS:=sudo/host - -include $(INCLUDE_DIR)/package.mk - -define Package/sudo - SECTION:=admin - CATEGORY:=Administration - TITLE:=Delegate authority to run commands - URL:=http://www.sudo.ws/ - MAINTAINER:=Gergely Kiss -endef - -define Package/sudo/description - Sudo (su "do") allows a system administrator to delegate authority to - give certain users (or groups of users) the ability to run some (or - all) commands as root or another user while providing an audit trail of - the commands and their arguments. -endef - -define Package/sudo/conffiles -/etc/sudoers -/etc/sudoers.d/ -endef - -CONFIGURE_ARGS+= \ - --without-pam \ - --disable-pam-session \ - --with-editor=/bin/vi \ - --without-lecture \ - --disable-zlib \ - --with-rundir=/var/lib/sudo \ - --with-vardir=/var/lib/sudo - -CONFIGURE_VARS+= \ - sudo_cv_uid_t_len=10 \ - sudo_cv_func_unsetenv_void=no - -include $(INCLUDE_DIR)/host-build.mk - -define Host/Compile - cd $(HOST_BUILD_DIR)/lib/util; \ - $(MAKE) mksiglist; $(MAKE) mksigname -endef - -define Host/Install - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin - $(CP) $(HOST_BUILD_DIR)/lib/util/mksig{list,name} $(STAGING_DIR_HOSTPKG)/bin/ -endef - -$(eval $(call HostBuild)) - -define Package/sudo/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/sudo $(1)/usr/bin/ - chmod 4755 $(1)/usr/bin/sudo - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/visudo $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/sudoers $(1)/etc/ - chmod 0440 $(1)/etc/sudoers - $(INSTALL_DIR) $(1)/etc/sudoers.d - $(INSTALL_DIR) $(1)/usr/lib/sudo - $(CP) $(PKG_INSTALL_DIR)/usr/lib/sudo/*.so* $(1)/usr/lib/sudo/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/sudo.init $(1)/etc/init.d/sudo -endef - -define Package/sudo/postinst -#!/bin/sh - -[ -n "$$IPKG_INSTROOT" ] || { - /etc/init.d/sudo enable - /etc/init.d/sudo start -} -endef - -$(eval $(call BuildPackage,sudo)) diff --git a/admin/sudo/files/sudo.init b/admin/sudo/files/sudo.init deleted file mode 100755 index 705fe84..0000000 --- a/admin/sudo/files/sudo.init +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=99 - -start() { - [ -d /var/lib/sudo ] || { - mkdir -m 0755 -p /var/lib/sudo - chmod 0700 /var/lib/sudo - } -} diff --git a/admin/sudo/patches/010-cross-compile-fixes.patch b/admin/sudo/patches/010-cross-compile-fixes.patch deleted file mode 100644 index b9c1e79..0000000 --- a/admin/sudo/patches/010-cross-compile-fixes.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -rupN sudo-1.8.11p2.orig/lib/util/Makefile.in sudo-1.8.11p2/lib/util/Makefile.in ---- sudo-1.8.11p2.orig/lib/util/Makefile.in 2014-10-07 22:26:20.000000000 +0200 -+++ sudo-1.8.11p2/lib/util/Makefile.in 2014-12-09 21:44:35.610041162 +0100 -@@ -142,10 +142,10 @@ libsudo_util.la: $(LTOBJS) @LT_LDDEP@ - esac - - siglist.c: mksiglist -- ./mksiglist > $@ -+ mksiglist > $@ - - signame.c: mksigname -- ./mksigname > $@ -+ mksigname > $@ - - mksiglist: $(srcdir)/mksiglist.c $(srcdir)/mksiglist.h $(incdir)/sudo_compat.h $(top_builddir)/config.h - $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) $(srcdir)/mksiglist.c -o $@ diff --git a/admin/sudo/patches/020-no-owner-change.patch b/admin/sudo/patches/020-no-owner-change.patch deleted file mode 100644 index 417e95d..0000000 --- a/admin/sudo/patches/020-no-owner-change.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN sudo-1.8.11p2.orig/Makefile.in sudo-1.8.11p2/Makefile.in ---- sudo-1.8.11p2.orig/Makefile.in 2014-10-07 22:26:20.000000000 +0200 -+++ sudo-1.8.11p2/Makefile.in 2014-12-09 22:00:27.256934143 +0100 -@@ -62,7 +62,7 @@ SHELL = @SHELL@ - SED = @SED@ - - INSTALL = $(SHELL) $(top_srcdir)/install-sh -c --INSTALL_OWNER = -o $(install_uid) -g $(install_gid) -+INSTALL_OWNER = - - ECHO_N = @ECHO_N@ - ECHO_C = @ECHO_C@ diff --git a/admin/sudo/patches/030-musl-fix-missing-header.patch b/admin/sudo/patches/030-musl-fix-missing-header.patch deleted file mode 100644 index efb7d87..0000000 --- a/admin/sudo/patches/030-musl-fix-missing-header.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN sudo-1.8.14p3.orig/include/sudo_util.h sudo-1.8.14p3/include/sudo_util.h ---- sudo-1.8.14p3.orig/include/sudo_util.h 2015-07-22 14:22:49.000000000 +0200 -+++ sudo-1.8.14p3/include/sudo_util.h 2015-08-30 18:41:24.509814946 +0200 -@@ -23,6 +23,8 @@ - # include "compat/stdbool.h" - #endif /* HAVE_STDBOOL_H */ - -+#include -+ - /* - * Macros for operating on struct timeval. - */ diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile deleted file mode 100644 index 0486164..0000000 --- a/admin/syslog-ng/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=syslog-ng -PKG_VERSION:=3.8.1 -PKG_RELEASE:=3 - -PKG_MAINTAINER:=W. Michael Petullo - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/ -PKG_MD5SUM:=acf14563cf5ce435db8db35486ce66af - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/syslog-ng - SECTION:=admin - CATEGORY:=Administration - DEPENDS:=+libpcre +glib2 +libeventlog +libopenssl +libuuid +libcurl - TITLE:=A powerful syslog daemon - URL:=http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/ -endef - -define Package/syslog-ng/description - syslog-ng reads and logs messages to the system console, log - files, other machines and/or users as specified by its - configuration file. -endef - -define Package/syslog-ng/conffiles - /etc/syslog-ng.conf -endef - -define Build/Configure - $(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure - $(Build/Configure/Default) -endef - -CONFIGURE_ARGS += \ - $(call autoconf_bool,CONFIG_IPV6,ipv6) \ - --disable-dependency-tracking \ - --disable-ampq \ - --disable-tcp-wrapper \ - --disable-glibtest \ - --disable-mongodb \ - --disable-java \ - --disable-json \ - --disable-python \ - --disable-spoof-source \ - --disable-sql \ - --disable-linux-caps \ - --disable-smtp \ - --disable-redis \ - --enable-prce \ - -TARGET_CPPFLAGS += \ - -I$(STAGING_DIR)/usr/include/eventlog - -CONFIGURE_VARS += \ - LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include" - -define Package/syslog-ng/install - $(INSTALL_DIR) $(1)/usr/lib - $(MAKE) -C $(PKG_BUILD_DIR) \ - install-sbinPROGRAMS install-libLTLIBRARIES \ - install-moduleLTLIBRARIES DESTDIR="$(1)" - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc - $(call libtool_remove_files,$(1)) -endef - -$(eval $(call BuildPackage,syslog-ng)) diff --git a/admin/syslog-ng/files/syslog-ng.conf b/admin/syslog-ng/files/syslog-ng.conf deleted file mode 100644 index 6786bc3..0000000 --- a/admin/syslog-ng/files/syslog-ng.conf +++ /dev/null @@ -1,37 +0,0 @@ -@version:3.8 - -options { - chain_hostnames(no); - create_dirs(yes); - flush_lines(0); - keep_hostname(yes); - log_fifo_size(256); - log_msg_size(1024); - stats_freq(0); - flush_lines(0); - use_fqdn(no); -}; - -source src { - internal(); - unix-stream("/dev/log"); -}; - -source net { - udp(ip(0.0.0.0) port(514)); -}; - -source kernel { - file("/proc/kmsg" program_override("kernel")); -}; - -destination messages { - file("/var/log/messages"); -}; - -log { - source(src); - source(net); - source(kernel); - destination(messages); -}; diff --git a/admin/syslog-ng/files/syslog-ng.init b/admin/syslog-ng/files/syslog-ng.init deleted file mode 100644 index cecb3f9..0000000 --- a/admin/syslog-ng/files/syslog-ng.init +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2016 OpenWrt.org - -START=20 - -SERVICE_USE_PID=1 - -start() { - [ -f /etc/syslog-ng.conf ] || return 1 - service_start /usr/sbin/syslog-ng -} - -stop() { - service_stop /usr/sbin/syslog-ng -} - -reload() { - service_reload /usr/sbin/syslog-ng -} diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile deleted file mode 100644 index f66c237..0000000 --- a/admin/zabbix/Makefile +++ /dev/null @@ -1,235 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=zabbix -PKG_VERSION:=3.0.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/zabbix -PKG_MD5SUM:=7c45d37000e67d75042695344c9937e0 - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/zabbix/Default - SECTION:=admin - CATEGORY:=Administration - TITLE:=Zabbix - URL:=http://www.zabbix.com/ - SUBMENU:=zabbix - MAINTAINER:=Etienne CHAMPETIER - USERID:=zabbix=53:zabbix=53 - DEPENDS += $(ICONV_DEPENDS) -endef - -define Package/zabbix-agentd - $(call Package/zabbix/Default) - TITLE+= agentd -endef - -define Package/zabbix-extra-mac80211 - $(call Package/zabbix/Default) - TITLE+= discovery/userparameters for mac80211 - DEPENDS = +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS -endef - -define Package/zabbix-extra-network - $(call Package/zabbix/Default) - TITLE+= discovery/userparameters for network - DEPENDS = +zabbix-agentd +libuci-lua +lua -endef - -define Package/zabbix-extra-wifi - $(call Package/zabbix/Default) - TITLE+= discovery/userparameters for wifi - DEPENDS = +zabbix-agentd +libiwinfo-lua +libuci-lua +lua -endef - -define Package/zabbix-sender - $(call Package/zabbix/Default) - TITLE+= sender -endef - -define Package/zabbix-get - $(call Package/zabbix/Default) - TITLE+= get -endef - -define Package/zabbix-server - $(call Package/zabbix/Default) - TITLE+= server - DEPENDS += +libsqlite3 -endef - -define Package/zabbix-proxy - $(call Package/zabbix/Default) - TITLE+= proxy - DEPENDS += +libsqlite3 -endef - -define Package/zabbix-extra-mac80211/description -An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters. -It contains an suid helper to allow zabbix-agentd to still run as zabbix user and not as root. -See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. -endef - -define Package/zabbix-extra-network/description -An extra package for zabbix-agentd that adds a discovery rule for openwrt network interfaces. -The idea here is to discover only interfaces listed in /etc/config/network (discover br-lan and not eth0.1 and wlan0) -See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. -endef - -define Package/zabbix-extra-wifi/description -An extra package for zabbix-agentd that adds a discovery rule for wifi interfaces and many userparameters. -As it uses libiwinfo, it works with all wifi devices supported by openwrt. -See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates. -endef - -CONFIGURE_ARGS+= \ - --enable-agent \ - --enable-server \ - --enable-proxy \ - $(call autoconf_bool,CONFIG_IPV6,ipv6) \ - --disable-java \ - --with-sqlite3="$(STAGING_DIR)/usr" - -MAKE_FLAGS += ARCH="linux" - -define Package/zabbix/install/sbin - $(INSTALL_DIR) \ - $(1)/usr/sbin - - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/sbin/zabbix_$(2) \ - $(1)/usr/sbin/ -endef - -define Package/zabbix/install/bin - $(INSTALL_DIR) \ - $(1)/usr/bin - - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/zabbix_$(2) \ - $(1)/usr/bin/ -endef - -define Package/zabbix/install/etc - $(INSTALL_DIR) \ - $(1)/etc - - $(INSTALL_CONF) \ - $(PKG_INSTALL_DIR)/etc/zabbix_$(2).conf \ - $(1)/etc/ -endef - -define Package/zabbix/install/init.d - $(INSTALL_DIR) \ - $(1)/etc/init.d - - $(INSTALL_BIN) \ - ./files/zabbix_$(2).init \ - $(1)/etc/init.d/zabbix_$(2) -endef - -define Package/zabbix/install/zabbix.conf.d - $(INSTALL_DIR) \ - $(1)/etc/zabbix_agentd.conf.d - - $(INSTALL_BIN) \ - ./files/$(2) \ - $(1)/etc/zabbix_agentd.conf.d/$(2) -endef - -define Package/zabbix-agentd/conffiles -/etc/zabbix_agentd.conf -endef -define Package/zabbix-server/conffiles -/etc/zabbix_server.conf -endef -define Package/zabbix-proxy/conffiles -/etc/zabbix_proxy.conf -endef - -ifdef CONFIG_PACKAGE_zabbix-extra-mac80211 -define Build/Prepare/zabbix-extra-mac80211 - mkdir -p $(PKG_BUILD_DIR)/zabbix-extra-mac80211 - $(CP) ./files/zabbix_helper_mac80211.c $(PKG_BUILD_DIR)/zabbix-extra-mac80211/ -endef - -define Build/Compile/zabbix-extra-mac80211 - $(TARGET_CC) $(TARGET_CFLAGS) $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211.c -o $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211 -endef -endif - -define Build/Prepare - $(call Build/Prepare/Default) - $(call Build/Prepare/zabbix-extra-mac80211) -endef - -define Build/Compile - $(call Build/Compile/Default) - $(call Build/Compile/zabbix-extra-mac80211) -endef - -define Package/zabbix-agentd/install - $(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d - $(call Package/zabbix/install/sbin,$(1),agentd) - $(call Package/zabbix/install/etc,$(1),agentd) - $(call Package/zabbix/install/init.d,$(1),agentd) -endef - -define Package/zabbix-extra-mac80211/install - $(call Package/zabbix/install/zabbix.conf.d,$(1),mac80211) - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211 $(1)/usr/bin/ - chmod 4755 $(1)/usr/bin/zabbix_helper_mac80211 -endef - -define Package/zabbix-extra-network/install - $(call Package/zabbix/install/zabbix.conf.d,$(1),network) -endef - -define Package/zabbix-extra-wifi/install - $(call Package/zabbix/install/zabbix.conf.d,$(1),wifi) -endef - -define Package/zabbix-sender/install - $(call Package/zabbix/install/bin,$(1),sender) -endef - -define Package/zabbix-get/install - $(call Package/zabbix/install/bin,$(1),get) -endef - -define Package/zabbix-server/install - $(call Package/zabbix/install/sbin,$(1),server) - $(call Package/zabbix/install/etc,$(1),server) -endef - -define Package/zabbix-proxy/install - $(call Package/zabbix/install/sbin,$(1),proxy) - $(call Package/zabbix/install/etc,$(1),proxy) -endef - -$(eval $(call BuildPackage,zabbix-agentd)) -$(eval $(call BuildPackage,zabbix-extra-mac80211)) -$(eval $(call BuildPackage,zabbix-extra-network)) -$(eval $(call BuildPackage,zabbix-extra-wifi)) -$(eval $(call BuildPackage,zabbix-sender)) -$(eval $(call BuildPackage,zabbix-server)) -$(eval $(call BuildPackage,zabbix-proxy)) -$(eval $(call BuildPackage,zabbix-get)) diff --git a/admin/zabbix/files/mac80211 b/admin/zabbix/files/mac80211 deleted file mode 100644 index afa50ae..0000000 --- a/admin/zabbix/files/mac80211 +++ /dev/null @@ -1,27 +0,0 @@ -#see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates - -# If you want to know the exact meaning of an UserParameter, you can search in the ieee80211 standard: -# http://standards.ieee.org/getieee802/download/802.11-2012.pdf -# example: for mac80211.ACKFailureCount search for dot11ACKFailureCount (page 2145) - -# mac80211 phy discovery (like 'phy0') -# example: {"data":[{"{#PHY}":"phy0"}]} -# -UserParameter=mac80211.phydiscovery,zabbix_helper_mac80211 discovery - -#phy statistics (you need {#PHY} as parameter) -# -UserParameter=mac80211.ACKFailureCount[*],zabbix_helper_mac80211 $1 dot11ACKFailureCount -UserParameter=mac80211.FCSErrorCount[*],zabbix_helper_mac80211 $1 dot11FCSErrorCount -UserParameter=mac80211.RTSFailureCount[*],zabbix_helper_mac80211 $1 dot11RTSFailureCount -UserParameter=mac80211.RTSSuccessCount[*],zabbix_helper_mac80211 $1 dot11RTSSuccessCount -UserParameter=mac80211.FailedCount[*],zabbix_helper_mac80211 $1 failed_count -UserParameter=mac80211.FrameDuplicateCount[*],zabbix_helper_mac80211 $1 frame_duplicate_count -UserParameter=mac80211.MulticastReceivedFrameCount[*],zabbix_helper_mac80211 $1 multicast_received_frame_count -UserParameter=mac80211.MulticastTransmittedFrameCount[*],zabbix_helper_mac80211 $1 multicast_transmitted_frame_count -UserParameter=mac80211.MultipleRetryCount[*],zabbix_helper_mac80211 $1 multiple_retry_count -UserParameter=mac80211.ReceivedFragmentCount[*],zabbix_helper_mac80211 $1 received_fragment_count -UserParameter=mac80211.RetryCount[*],zabbix_helper_mac80211 $1 retry_count -UserParameter=mac80211.TransmittedFragmentCount[*],zabbix_helper_mac80211 $1 transmitted_fragment_count -UserParameter=mac80211.TransmittedFrameCount[*],zabbix_helper_mac80211 $1 transmitted_frame_count - diff --git a/admin/zabbix/files/network b/admin/zabbix/files/network deleted file mode 100644 index b68e2a5..0000000 --- a/admin/zabbix/files/network +++ /dev/null @@ -1,9 +0,0 @@ -#see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates - -# network interface discovery -# example: {"data":[{"{#IF}":"lo", "{#NET}":"loopback"},{"{#IF}":"br-lan", "{#NET}":"lan"},{"{#IF}":"eth0.1", "{#NET}":"wan"}]} -# -UserParameter=netowrt.discovery,lua -l uci -e 'x = uci.cursor(nil, "/var/state");list = "{\"data\":[";x:foreach("network", "interface", function(s) list=list.."{\"{#IF}\":\""..s.ifname.."\", \"{#NET}\":\""..s[".name"].."\"}," end); list=string.gsub(list,",$",""); print(list.."]}")' - - - diff --git a/admin/zabbix/files/wifi b/admin/zabbix/files/wifi deleted file mode 100644 index f03d9b4..0000000 --- a/admin/zabbix/files/wifi +++ /dev/null @@ -1,25 +0,0 @@ -#see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates - -# wifi interface discovery -# example: {"data":[{"{#IF}":"wlan0", "{#MODE}":"ap", "{#SSID}":"Openwrt", "{#NET}":"lan", "{#DEV}":"radio0", "{#ENC}":"psk2+ccmp", "{#TYPE}":"mac80211", "{#HWMODE}":"11ng", "{#CHANNEL}":"11", "{#BSSID}":"xx:xx:xx:xx:xx:xx"}]} -# ubus call only work as root so you need to run zabbix as root to use wifi.ifdiscovery -UserParameter=wifi.ifdiscovery, lua -l ubus -l iwinfo -e 'u=ubus.connect();list="{\"data\":[";stat=u:call("network.wireless", "status", {});for dev, dev_table in pairs(stat) do for i, iface in pairs(dev_table["interfaces"]) do c=iface["config"];i=iface["ifname"];t=iwinfo.type(i);iw=iwinfo[t];e = iw.encryption(i);e = e and e.description or "None";n = table.concat(c["network"]," ");list=list.."{\"{#IF}\":\""..i.."\", \"{#MODE}\":\""..iw.mode(i).."\", \"{#SSID}\":\""..c["ssid"].."\", \"{#NET}\":\""..n.."\", \"{#DEV}\":\""..dev.."\", \"{#ENC}\":\""..e.."\", \"{#TYPE}\":\""..t.."\", \"{#HWMODE}\":\"".."?".."\", \"{#CHANNEL}\":\""..iw.channel(i).."\", \"{#BSSID}\":\""..iw.bssid(i).."\"},";end;end;list=string.gsub(list,",$","");print(list.."]}")' - - -#iwinfo info (you need {#IF} as parameter, like 'wlan0') -UserParameter=wifi.iwinfo.channel[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].channel('$1'))" -UserParameter=wifi.iwinfo.frequency[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].frequency('$1'))" -UserParameter=wifi.iwinfo.txpower[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].txpower('$1'))" -UserParameter=wifi.iwinfo.bitrate[*],lua -l iwinfo -e "b = iwinfo[iwinfo.type('$1')].bitrate('$1'); print(b or '0')" -UserParameter=wifi.iwinfo.signal[*],lua -l iwinfo -e "s = iwinfo[iwinfo.type('$1')].signal('$1'); print(s or '-255')" -UserParameter=wifi.iwinfo.noise[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].noise('$1'))" -UserParameter=wifi.iwinfo.quality[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].quality('$1'))" -UserParameter=wifi.iwinfo.quality_max[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].quality_max('$1'))" -UserParameter=wifi.iwinfo.mode[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].mode('$1'))" -UserParameter=wifi.iwinfo.ssid[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].ssid('$1'))" -UserParameter=wifi.iwinfo.bssid[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].bssid('$1'))" -UserParameter=wifi.iwinfo.country[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].country('$1'))" -UserParameter=wifi.iwinfo.nbusers[*],lua -l iwinfo -e "n = 0; for _,_ in pairs(iwinfo[iwinfo.type('$1')].assoclist('$1')) do n = n + 1 end; print(n)" -UserParameter=wifi.iwinfo.encryption[*],lua -l iwinfo -e "e = iwinfo[iwinfo.type('$1')].encryption('$1'); print(e and e.description or 'None')" -UserParameter=wifi.iwinfo.hwmode[*],lua -l iwinfo -e "x=iwinfo[iwinfo.type('$1')].hwmodelist('$1'); print((x.a and 'a' or '')..(x.b and 'b' or '')..(x.g and 'g' or '')..(x.n and 'n' or ''))" - diff --git a/admin/zabbix/files/zabbix_agentd.init b/admin/zabbix/files/zabbix_agentd.init deleted file mode 100755 index ea88634..0000000 --- a/admin/zabbix/files/zabbix_agentd.init +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008-2011 OpenWrt.org - -START=60 - -USE_PROCD=1 -PROG=/usr/sbin/zabbix_agentd -CONFIG=/etc/zabbix_agentd.conf - -start_service() { - # Sometimes the agentd config was installed in /etc/zabbix/zabbix_agentd.conf - [ -f /etc/zabbix/zabbix_agentd.conf ] && mv /etc/zabbix/zabbix_agentd.conf ${CONFIG} - - [ -f ${CONFIG} ] || return 1 - - procd_open_instance - procd_set_param command ${PROG} -c ${CONFIG} -f - procd_set_param respawn - procd_set_param stdout 1 - procd_set_param stderr 1 - procd_close_instance -} - diff --git a/admin/zabbix/files/zabbix_helper_mac80211.c b/admin/zabbix/files/zabbix_helper_mac80211.c deleted file mode 100644 index 1442d27..0000000 --- a/admin/zabbix/files/zabbix_helper_mac80211.c +++ /dev/null @@ -1,77 +0,0 @@ -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include - -int discovery() -{ - DIR *dir; - struct dirent *ent; - bool comma = false; - if ((dir = opendir ("/sys/kernel/debug/ieee80211/")) != NULL) { - printf("{\"data\":["); - while ((ent = readdir (dir)) != NULL) { - if (strcmp(".", ent->d_name) && strcmp("..", ent->d_name)) { - if (comma) - printf(","); - printf("{\"{#PHY}\":\"%s\"}", ent->d_name); - comma = true; - } - } - printf("]}\n"); - closedir(dir); - } else { - perror(""); - return EXIT_FAILURE; - } - return EXIT_SUCCESS; -} - -int get_param(char *phy, char *stat) -{ - char *filename = NULL; - FILE *f = NULL; - phy = basename(phy); - stat = basename(stat); - if (asprintf(&filename, "/sys/kernel/debug/ieee80211/%s/statistics/%s", phy, stat) > 0) - f = fopen(filename, "r"); - - if (f != NULL) { - char temp[256]; - while (fgets(temp, 256, f) != NULL) - printf("%s",temp); - - fclose(f); - } else { - perror(""); - return EXIT_FAILURE; - } - free(filename); - return EXIT_SUCCESS; -} - -int usage(char *name) -{ - fprintf(stderr, "Usage:\n"); - fprintf(stderr, " %s discovery\n", name); - fprintf(stderr, " => print mac80211.phydiscovery discovery rule\n"); - fprintf(stderr, " %s PHY STAT\n", name); - fprintf(stderr, " => cat /sys/kernel/debug/ieee80211/PHY/statistics/STAT as root\n"); - return EXIT_FAILURE; -} - -int main(int argc, char *argv[]) -{ - - switch (argc) { - case 2: - return discovery(); - case 3: - return get_param(argv[1], argv[2]); - default: - return usage(argv[0]); - } -} diff --git a/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch b/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch deleted file mode 100644 index f4b5d33..0000000 --- a/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -161,6 +161,10 @@ if test "x$found_resolv" != "xyes"; then - AC_MSG_ERROR([Unable to do DNS lookups (libresolv check failed)]) - fi - LIBS="${LIBS} ${RESOLV_LIBS}" -+AC_SEARCH_LIBS([res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])]) -+AC_SEARCH_LIBS([__res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])]) -+AC_SEARCH_LIBS([res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])]) -+AC_SEARCH_LIBS([__res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])]) - - dnl ***************************************************************** - dnl * * ---- a/src/libs/zbxsysinfo/common/net.c -+++ b/src/libs/zbxsysinfo/common/net.c -@@ -471,6 +471,7 @@ static int dns_query(AGENT_REQUEST *requ - return SYSINFO_RET_FAIL; - } - -+#if defined(HAVE_RES_MKQUERY) && defined(HAVE_RES_SEND) - if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf)))) - { - SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot create DNS query: %s", zbx_strerror(errno))); -@@ -505,6 +506,11 @@ static int dns_query(AGENT_REQUEST *requ - _res.retry = retry; - - res = res_send(buf, res, answer.buffer, sizeof(answer.buffer)); -+#else /* defined(HAVE_RES_QUERY) && defined(HAVE_RES_SEND) */ -+ /* retrand and retry are ignored */ -+ if (-1 == (res = res_query(zone, C_IN, type, answer.buffer, sizeof(answer.buffer)))) -+ return SYSINFO_RET_FAIL; -+#endif - - _res.options = saved_options; - _res.retrans = saved_retrans; diff --git a/admin/zabbix/patches/002-uclibc_loadavg.patch b/admin/zabbix/patches/002-uclibc_loadavg.patch deleted file mode 100644 index ce62d06..0000000 --- a/admin/zabbix/patches/002-uclibc_loadavg.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- a/src/libs/zbxsysinfo/linux/cpu.c -+++ b/src/libs/zbxsysinfo/linux/cpu.c -@@ -22,6 +22,45 @@ - #include "stats.h" - #include "log.h" - -+ -+/* uclibc and dietlibc do not have this junk -ReneR */ -+#if defined (__UCLIBC__) || defined (__dietlibc__) -+static int getloadavg (double loadavg[], int nelem) -+{ -+ int fd; -+ -+ fd = open ("/proc/loadavg", O_RDONLY); -+ if (fd < 0) -+ return -1; -+ else -+ { -+ char buf[65], *p; -+ ssize_t nread; -+ int i; -+ -+ nread = read (fd, buf, sizeof buf - 1); -+ close (fd); -+ if (nread <= 0) -+ return -1; -+ buf[nread - 1] = '\0'; -+ -+ if (nelem > 3) -+ nelem = 3; -+ p = buf; -+ for (i = 0; i < nelem; ++i) -+ { -+ char *endp; -+ loadavg[i] = strtod (p, &endp); -+ if (endp == p) -+ return -1; -+ p = endp; -+ } -+ -+ return i; -+ } -+} -+#endif -+ - int SYSTEM_CPU_NUM(AGENT_REQUEST *request, AGENT_RESULT *result) - { - char *type; diff --git a/admin/zabbix/patches/003-change-user-and-foreground.patch b/admin/zabbix/patches/003-change-user-and-foreground.patch deleted file mode 100644 index 6779e47..0000000 --- a/admin/zabbix/patches/003-change-user-and-foreground.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/src/libs/zbxnix/daemon.c -+++ b/src/libs/zbxnix/daemon.c -@@ -300,11 +300,14 @@ int daemon_start(int allow_root, const c - - if (0 == allow_root && 0 == getuid()) /* running as root? */ - { -+#if 0 -+/* allow changing user and foreground */ - if (0 != (flags & ZBX_TASK_FLAG_FOREGROUND)) - { - zbx_error("cannot run as root!"); - exit(EXIT_FAILURE); - } -+#endif - - if (NULL == user) - user = "zabbix"; diff --git a/admin/zabbix/patches/010-change-agentd-config.patch b/admin/zabbix/patches/010-change-agentd-config.patch deleted file mode 100644 index 8b16b28..0000000 --- a/admin/zabbix/patches/010-change-agentd-config.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- a/conf/zabbix_agentd.conf -+++ b/conf/zabbix_agentd.conf -@@ -3,12 +3,11 @@ - - ############ GENERAL PARAMETERS ################# - --### Option: PidFile --# Name of PID file. --# --# Mandatory: no --# Default: --# PidFile=/tmp/zabbix_agentd.pid -+# We do not need PidFile with procd -+# PidFile=/var/run/zabbix_agentd.pid -+ -+# use syslog -+LogType=system - - ### Option: LogType - # Specifies where log messages are written to: -@@ -27,8 +26,6 @@ - # Default: - # LogFile= - --LogFile=/tmp/zabbix_agentd.log -- - ### Option: LogFileSize - # Maximum size of log file in MB. - # 0 - disable automatic log rotation. -@@ -114,6 +111,7 @@ Server=127.0.0.1 - # Range: 0-100 - # Default: - # StartAgents=3 -+StartAgents=1 - - ##### Active checks related - -@@ -129,8 +127,6 @@ Server=127.0.0.1 - # Default: - # ServerActive= - --ServerActive=127.0.0.1 -- - ### Option: Hostname - # Unique, case sensitive hostname. - # Required for active checks and must match hostname as configured on the server. -@@ -140,8 +136,6 @@ ServerActive=127.0.0.1 - # Default: - # Hostname= - --Hostname=Zabbix server -- - ### Option: HostnameItem - # Item used for generating Hostname if it is undefined. Ignored if Hostname is defined. - # Does not support UserParameters or aliases. -@@ -259,8 +253,8 @@ Hostname=Zabbix server - # Include= - - # Include=/usr/local/etc/zabbix_agentd.userparams.conf --# Include=/usr/local/etc/zabbix_agentd.conf.d/ - # Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf -+Include=/etc/zabbix_agentd.conf.d/ - - ####### USER-DEFINED MONITORED PARAMETERS ####### - diff --git a/admin/zabbix/patches/100-musl-compat.patch b/admin/zabbix/patches/100-musl-compat.patch deleted file mode 100644 index 61aeb9e..0000000 --- a/admin/zabbix/patches/100-musl-compat.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -51,7 +51,7 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string - syslog.h time.h errno.h sys/types.h sys/stat.h netinet/in.h \ - math.h sys/socket.h dirent.h ctype.h \ - mtent.h fcntl.h sys/param.h arpa/inet.h \ -- sys/vfs.h sys/pstat.h sys/sysinfo.h sys/statvfs.h sys/statfs.h \ -+ sys/vfs.h sys/pstat.h sys/statvfs.h sys/statfs.h \ - sys/socket.h sys/loadavg.h arpa/inet.h \ - sys/vmmeter.h strings.h vm/vm_param.h \ - sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \ -@@ -63,6 +63,11 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string - Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \ - execinfo.h libperfstat.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \ - dlfcn.h sys/utsname.h) -+AC_CHECK_HEADERS(sys/sysinfo.h, [], [], [ -+#ifdef HAVE_LINUX_KERNEL_H -+# include -+#endif -+]) - AC_CHECK_HEADERS(resolv.h, [], [], [ - #ifdef HAVE_SYS_TYPES_H - # include diff --git a/devel/autoconf/Makefile b/devel/autoconf/Makefile deleted file mode 100644 index 598654d..0000000 --- a/devel/autoconf/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=autoconf -PKG_VERSION:=2.69 -PKG_RELEASE:=2 - -PKG_SOURCE_URL:=@GNU/autoconf -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MD5SUM:=50f97f4159805e374639a73e2636f22e -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-3.0+ - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -CONFIGURE_VARS += M4=m4 EMACS=no - -define Package/autoconf - SECTION:=devel - CATEGORY:=Development - TITLE:=autoconf - URL:=https://www.gnu.org/software/autoconf/ - DEPENDS:=+m4 +perl +perlbase-data +perlbase-file +perlbase-getopt \ - +perlbase-dynaloader +perlbase-text -endef - -define Package/autoconf/description - Autoconf is an extensible package of M4 macros that produce shell scripts to - automatically configure software source code packages. -endef - -define Build/Install - $(SED) 's/@PERL@/\/usr\/bin\/perl/g' $(PKG_BUILD_DIR)/bin/Makefile.in - $(call Build/Install/Default) -endef - -define Package/autoconf/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/autoconf - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/INSTALL \ - $(1)/usr/share/autoconf/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autom4te.cfg \ - $(1)/usr/share/autoconf/ - $(INSTALL_DIR) $(1)/usr/share/autoconf/Autom4te - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/Autom4te/* \ - $(1)/usr/share/autoconf/Autom4te/ - $(INSTALL_DIR) $(1)/usr/share/autoconf/autoconf - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autoconf/* \ - $(1)/usr/share/autoconf/autoconf/ - $(INSTALL_DIR) $(1)/usr/share/autoconf/autoscan - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autoscan/* \ - $(1)/usr/share/autoconf/autoscan/ - $(INSTALL_DIR) $(1)/usr/share/autoconf/autotest - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autotest/* \ - $(1)/usr/share/autoconf/autotest/ - $(INSTALL_DIR) $(1)/usr/share/autoconf/m4sugar - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/m4sugar/* \ - $(1)/usr/share/autoconf/m4sugar/ -endef - -$(eval $(call BuildPackage,autoconf)) diff --git a/devel/diffutils/Makefile b/devel/diffutils/Makefile deleted file mode 100644 index fb00a42..0000000 --- a/devel/diffutils/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (C) 2008-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=diffutils -PKG_VERSION:=3.3 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNU/diffutils -PKG_MD5SUM:=99180208ec2a82ce71f55b0d7389f1b3 -PKG_MAINTAINER:=Roger D -PKG_LICENSE:=GPL-3.0 - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/diffutils - SECTION:=devel - CATEGORY:=Development - DEPENDS:=+USE_GLIBC:librt - TITLE:=diffutils - URL:=http://www.gnu.org/software/diffutils/ -endef - -define Package/diffutils/description - The Diffutils package contains programs that show the differences between - files or directories. -endef - -CONFIGURE_VARS += \ - ac_cv_func_mempcpy=n -TARGET_CFLAGS += --std=gnu99 - -define Package/diffutils/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sdiff,diff3,diff,cmp} $(1)/usr/bin/ -endef - -define Package/diffutils/preinst -#!/bin/sh -for x in sdiff diff3 diff cmp; do - [ -L "$${IPKG_INSTROOT}/usr/bin/$$x" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/$$x" -done -exit 0 -endef - -define Package/diffutils/postrm -#!/bin/sh -for x in sdiff diff3 diff cmp; do - /bin/busybox $$x -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/$$x -done -exit 0 -endef - -$(eval $(call BuildPackage,diffutils)) diff --git a/devel/gcc/Makefile b/devel/gcc/Makefile deleted file mode 100644 index b23b7ab..0000000 --- a/devel/gcc/Makefile +++ /dev/null @@ -1,167 +0,0 @@ -# -# Copyright (C) 2008 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gcc -PKG_VERSION:=5.4.0 -PKG_RELEASE:=1 -PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) -PKG_MD5SUM:=4c626ac2a83ef30dfb9260e6f59c2b30 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_INSTALL:=1 -PKG_FIXUP:=libtool -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -TARGET_LANGUAGES:="c,c++" -BUGURL=https://dev.openwrt.org/ -PKGVERSION=OpenWrt GCC $(PKG_VERSION) - -# not using sstrip here as this fucks up the .so's somehow -STRIP:=$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip -RSTRIP:= \ - NM="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)nm" \ - STRIP="$(STRIP)" \ - STRIP_KMOD="$(STRIP) --strip-debug" \ - $(SCRIPT_DIR)/rstrip.sh - - -define Package/gcc - SECTION:=devel - CATEGORY:=Development - TITLE:=gcc - MAINTAINER:=Noble Pepper - DEPENDS:= +binutils +libstdcpp -endef - -define Package/gcc/description - build a native toolchain for compiling on target -endef - -GMPSRC=gmp-4.3.2 - -define Download/gmp - URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ - FILE:=$(GMPSRC).tar.bz2 - MD5SUM:=dd60683d7057917e34630b4a787932e8 -endef -$(eval $(call Download,gmp)) - -MPCSRC=mpc-0.8.1 - -define Download/mpc - URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ - FILE:=$(MPCSRC).tar.gz - MD5SUM:=5b34aa804d514cc295414a963aedb6bf -endef -$(eval $(call Download,mpc)) - -MPFRSRC=mpfr-2.4.2 - -define Download/mpfr - URL:=ftp://gcc.gnu.org/pub/gcc/infrastructure/ - FILE:=$(MPFRSRC).tar.bz2 - MD5SUM:=89e59fe665e2b3ad44a6789f40b059a0 -endef -$(eval $(call Download,mpfr)) - -define Build/Prepare - $(PKG_UNPACK) -# we have to download and unpack additional stuff before patching - tar -C $(PKG_BUILD_DIR) -xvjf $(DL_DIR)/$(GMPSRC).tar.bz2 - ln -sf $(PKG_BUILD_DIR)/$(GMPSRC) $(PKG_BUILD_DIR)/gmp - tar -C $(PKG_BUILD_DIR) -xvzf $(DL_DIR)/$(MPCSRC).tar.gz - ln -sf $(PKG_BUILD_DIR)/$(MPCSRC) $(PKG_BUILD_DIR)/mpc - tar -C $(PKG_BUILD_DIR) -xvjf $(DL_DIR)/$(MPFRSRC).tar.bz2 - ln -sf $(PKG_BUILD_DIR)/$(MPFRSRC) $(PKG_BUILD_DIR)/mpfr - $(Build/Patch) -# poor man's fix for `none-openwrt-linux' not recognized when building with musl - cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpfr/ - cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/gmp/ - cp $(PKG_BUILD_DIR)/config.sub $(PKG_BUILD_DIR)/mpc/ -endef - - -define Build/Configure - (cd $(PKG_BUILD_DIR); rm -f config.cache; \ - SHELL="$(BASH)" \ - $(TARGET_CONFIGURE_OPTS) \ - $(PKG_BUILD_DIR)/configure \ - $(CONFIGURE_ARGS) \ - --build=$(GNU_HOST_NAME) \ - --host=$(REAL_GNU_TARGET_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --enable-languages=$(TARGET_LANGUAGES) \ - --with-bugurl=$(BUGURL) \ - --with-pkgversion="$(PKGVERSION)" \ - --enable-shared \ - $(if $(CONFIG_LIBC_USE_GLIBC),--enable,--disable)-__cxa_atexit \ - --with-default-libstdcxx-abi=gcc4-compatible \ - --enable-target-optspace \ - --with-gnu-ld \ - --disable-nls \ - --disable-libsanitizer \ - --disable-libvtv \ - --disable-libcilkrts \ - --disable-libmudflap \ - --disable-multilib \ - --disable-libgomp \ - --disable-libquadmath \ - --disable-libssp \ - --disable-decimal-float \ - --disable-libstdcxx-pch \ - --with-host-libstdcxx=-lstdc++ \ - --prefix=/usr \ - --libexecdir=/usr/lib \ - --with-local-prefix=/usr \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ - ); -endef - -define Build/Compile - export SHELL="$(BASH)"; $(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" $(MAKE_ARGS) all install -endef - -ENVCFLAGS:="$(TARGET_OPTIMIZATION) $(EXTRA_OPTIMIZATION) -ifeq ($(CONFIG_SOFT_FLOAT),y) - ifeq ($(CONFIG_arm),y) - ENVCFLAGS+= -mfloat-abi=soft - else - ENVCFLAGS+= -msoft-float - endif -endif -ENVCFLAGS+=" - -ENVLDFLAGS:="-Wl,-rpath=/usr/lib -Wl,--dynamic-linker=/usr/lib/$(DYNLINKER) -L/usr/lib" - -define Package/gcc/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) - cp -ar $(PKG_INSTALL_DIR)/usr/include $(1)/usr - cp -a $(PKG_INSTALL_DIR)/usr/bin/{$(REAL_GNU_TARGET_NAME)-{g++,gcc},cpp,gcov} $(1)/usr/bin - ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/c++ - ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/g++ - ln -s $(REAL_GNU_TARGET_NAME)-g++ $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-c++ - ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/gcc - ln -s $(REAL_GNU_TARGET_NAME)-gcc $(1)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc-$(PKG_VERSION) - cp -ar $(PKG_INSTALL_DIR)/usr/lib/gcc $(1)/usr/lib - cp -ar $(TOOLCHAIN_DIR)/include $(1)/usr - cp -a $(TOOLCHAIN_DIR)/lib/*.{o,so*} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) - cp -a $(TOOLCHAIN_DIR)/lib/*nonshared*.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) - cp -a $(TOOLCHAIN_DIR)/lib/libm.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION) - rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgo* - rm -f $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libcc1* - echo '#!/bin/sh' > $(1)/usr/bin/gcc_env.sh - echo 'export LDFLAGS=$(ENVLDFLAGS)' >> $(1)/usr/bin/gcc_env.sh - echo 'export CFLAGS=$(ENVCFLAGS)' >> $(1)/usr/bin/gcc_env.sh - chmod +x $(1)/usr/bin/gcc_env.sh -endef - -$(eval $(call BuildPackage,gcc)) diff --git a/devel/gcc/README b/devel/gcc/README deleted file mode 100644 index 58db474..0000000 --- a/devel/gcc/README +++ /dev/null @@ -1,10 +0,0 @@ -Native GCC that runs on target. - -To save disk space, this GCC only supports dynamic linking on the target box, -there are no static libraries shipped except libgcc.a on those architectures -that need it. - -For now, this was only tested on arm (EABI) and mips targets. Others to be -done... - - Christian Beier diff --git a/devel/gcc/patches/001-revert_register_mode_search.patch b/devel/gcc/patches/001-revert_register_mode_search.patch deleted file mode 100644 index 06373eb..0000000 --- a/devel/gcc/patches/001-revert_register_mode_search.patch +++ /dev/null @@ -1,65 +0,0 @@ -Revert of: - -commit 275035b56823b26d5fb7e90fad945b998648edf2 -Author: bergner -Date: Thu Sep 5 14:09:07 2013 +0000 - - PR target/58139 - * reginfo.c (choose_hard_reg_mode): Scan through all mode classes - looking for widest mode. - - - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 - - ---- a/gcc/reginfo.c -+++ b/gcc/reginfo.c -@@ -665,35 +665,40 @@ choose_hard_reg_mode (unsigned int regno - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - - if (found_mode != VOIDmode) diff --git a/devel/gcc/patches/002-case_insensitive.patch b/devel/gcc/patches/002-case_insensitive.patch deleted file mode 100644 index b3d2dbe..0000000 --- a/devel/gcc/patches/002-case_insensitive.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch b/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch deleted file mode 100644 index a00cbcd..0000000 --- a/devel/gcc/patches/002-dont-choke-when-building-32bit-on-64bit.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/gcc/real.h -+++ b/gcc/real.h -@@ -75,9 +75,10 @@ - + (REAL_VALUE_TYPE_SIZE%HOST_BITS_PER_WIDE_INT ? 1 : 0)) /* round up */ - - /* Verify the guess. */ -+#ifndef __LP64__ - extern char test_real_width - [sizeof (REAL_VALUE_TYPE) <= REAL_WIDTH * sizeof (HOST_WIDE_INT) ? 1 : -1]; -- -+#endif - /* Calculate the format for CONST_DOUBLE. We need as many slots as - are necessary to overlay a REAL_VALUE_TYPE on them. This could be - as many as four (32-bit HOST_WIDE_INT, 128-bit REAL_VALUE_TYPE). diff --git a/devel/gcc/patches/003-mpfr-longlong-mips.patch b/devel/gcc/patches/003-mpfr-longlong-mips.patch deleted file mode 100644 index 0ab9fe5..0000000 --- a/devel/gcc/patches/003-mpfr-longlong-mips.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -Naurd mpfr-2.4.2-a/mpfr-longlong.h mpfr-2.4.2-b/mpfr-longlong.h ---- -a/mpfr-2.4.2/mpfr-longlong.h 2009-11-30 02:43:08.000000000 +0000 -+++ -b/mpfr-2.4.2/mpfr-longlong.h 2009-12-18 12:04:29.000000000 +0000 -@@ -1011,7 +1011,15 @@ - #endif /* __m88000__ */ - - #if defined (__mips) && W_TYPE_SIZE == 32 --#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 -+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UDItype _r; \ -+ _r = (UDItype) u * v; \ -+ (w1) = _r >> 32; \ -+ (w0) = (USItype) _r; \ -+ } while (0) -+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 - #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) - #else -@@ -1024,7 +1032,16 @@ - #endif /* __mips */ - - #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64 --#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 -+#if (__GNUC__ >= 5) || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 4) -+typedef unsigned int UTItype __attribute__ ((mode (TI))); -+#define umul_ppmm(w1, w0, u, v) \ -+ do { \ -+ UTItype _r; \ -+ _r = (UTItype) u * v; \ -+ (w1) = _r >> 64; \ -+ (w0) = (UDItype) _r; \ -+ } while (0) -+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7 - #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) - #else diff --git a/devel/gcc/patches/010-documentation.patch b/devel/gcc/patches/010-documentation.patch deleted file mode 100644 index 07064a9..0000000 --- a/devel/gcc/patches/010-documentation.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -2941,18 +2941,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/devel/gcc/patches/020-no-plt-backport.patch b/devel/gcc/patches/020-no-plt-backport.patch deleted file mode 100644 index b9702c9..0000000 --- a/devel/gcc/patches/020-no-plt-backport.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/gcc/calls.c -+++ b/gcc/calls.c -@@ -225,6 +225,12 @@ prepare_call_address (tree fndecl_or_typ - && targetm.small_register_classes_for_mode_p (FUNCTION_MODE)) - ? force_not_mem (memory_address (FUNCTION_MODE, funexp)) - : memory_address (FUNCTION_MODE, funexp)); -+ else if (flag_pic && !flag_plt && fndecl_or_type -+ && TREE_CODE (fndecl_or_type) == FUNCTION_DECL -+ && !targetm.binds_local_p (fndecl_or_type)) -+ { -+ funexp = force_reg (Pmode, funexp); -+ } - else if (! sibcallp) - { - #ifndef NO_FUNCTION_CSE ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1779,6 +1779,10 @@ fpie - Common Report Var(flag_pie,1) Negative(fPIC) - Generate position-independent code for executables if possible (small mode) - -+fplt -+Common Report Var(flag_plt) Init(1) -+Use PLT for PIC calls (-fno-plt: load the address from GOT at call site) -+ - fplugin= - Common Joined RejectNegative Var(common_deferred_options) Defer - Specify a plugin to load diff --git a/devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch b/devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch deleted file mode 100644 index e88af34..0000000 --- a/devel/gcc/patches/040-fix-mips-ICE-PR-68400.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -8001,9 +8001,17 @@ mask_low_and_shift_p (machine_mode mode, - bool - and_operands_ok (machine_mode mode, rtx op1, rtx op2) - { -- return (memory_operand (op1, mode) -- ? and_load_operand (op2, mode) -- : and_reg_operand (op2, mode)); -+ if (!memory_operand (op1, mode)) -+ return and_reg_operand (op2, mode); -+ -+ if (!and_load_operand (op2, mode)) -+ return false; -+ -+ if (!TARGET_MIPS16 || si_mask_operand(op2, mode)) -+ return true; -+ -+ op1 = XEXP (op1, 0); -+ return !(REG_P (op1) && REGNO (op1) == STACK_POINTER_REGNUM); - } - - /* The canonical form of a mask-low-and-shift-left operation is diff --git a/devel/gcc/patches/100-uclibc-conf.patch b/devel/gcc/patches/100-uclibc-conf.patch deleted file mode 100644 index ff9ad94..0000000 --- a/devel/gcc/patches/100-uclibc-conf.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/contrib/regression/objs-gcc.sh -+++ b/contrib/regression/objs-gcc.sh -@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H - then - make all-gdb all-dejagnu all-ld || exit 1 - make install-gdb install-dejagnu install-ld || exit 1 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] -+ then -+ make all-gdb all-dejagnu all-ld || exit 1 -+ make install-gdb install-dejagnu install-ld || exit 1 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then - make bootstrap || exit 1 - make install || exit 1 ---- a/libjava/classpath/ltconfig -+++ b/libjava/classpath/ltconfig -@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- - - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in --linux-gnu*) ;; -+linux-gnu*|linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux - ;; - - # This must be Linux ELF. --linux-gnu*) -+linux*) - version_type=linux - need_lib_prefix=no - need_version=no diff --git a/devel/gcc/patches/200-musl_config.patch b/devel/gcc/patches/200-musl_config.patch deleted file mode 100644 index b9a5b28..0000000 --- a/devel/gcc/patches/200-musl_config.patch +++ /dev/null @@ -1,309 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 08:25:47 +0000 (+0000) -Subject: [PATCH 2/13] musl libc config -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a9173ceabaf29c16f8ef226fbf98af373a4b2ceb - -[PATCH 2/13] musl libc config - -2015-05-08 Gregor Richards - Szabolcs Nagy - - * config.gcc (LIBC_MUSL): New tm_defines macro. - * config/linux.h (OPTION_MUSL): Define. - (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,) - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,) - (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) - (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) - (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. - * config/linux.opt (mmusl): New option. - * doc/invoke.texi (GNU/Linux Options): Document -mmusl. - * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*. - (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*. - * configure: Regenerate. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222904 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -575,7 +575,7 @@ case ${target} in - esac - - # Common C libraries. --tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" -+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" - - # 32-bit x86 processors supported by --with-arch=. Each processor - # MUST be separated by exactly one space. -@@ -720,6 +720,9 @@ case ${target} in - *-*-*uclibc*) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" - ;; -+ *-*-*musl*) -+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" -+ ;; - *) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" - ;; ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTI - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ -@@ -50,21 +52,25 @@ see the files COPYING3 and COPYING.RUNTI - } while (0) - - /* Determine which dynamic linker to use depending on whether GLIBC or -- uClibc or Bionic is the default C library and whether -- -muclibc or -mglibc or -mbionic has been passed to change the default. */ -+ uClibc or Bionic or musl is the default C library and whether -+ -muclibc or -mglibc or -mbionic or -mmusl has been passed to change -+ the default. */ - --#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ -- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" -+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ -+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" - - #if DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) - #elif DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) - #elif DEFAULT_LIBC == LIBC_BIONIC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) - #else - #error "Unsupported DEFAULT_LIBC" - #endif /* DEFAULT_LIBC */ -@@ -81,24 +87,100 @@ see the files COPYING3 and COPYING.RUNTI - #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" - #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" - #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" -+/* Should be redefined for each target that supports musl. */ -+#define MUSL_DYNAMIC_LINKER "/dev/null" -+#define MUSL_DYNAMIC_LINKER32 "/dev/null" -+#define MUSL_DYNAMIC_LINKER64 "/dev/null" -+#define MUSL_DYNAMIC_LINKERX32 "/dev/null" - - #define GNU_USER_DYNAMIC_LINKER \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ -- BIONIC_DYNAMIC_LINKER) -+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - #define GNU_USER_DYNAMIC_LINKER32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ -- BIONIC_DYNAMIC_LINKER32) -+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ -- BIONIC_DYNAMIC_LINKER64) -+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - #define GNU_USER_DYNAMIC_LINKERX32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ -- BIONIC_DYNAMIC_LINKERX32) -+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) - - /* Whether we have Bionic libc runtime */ - #undef TARGET_HAS_BIONIC - #define TARGET_HAS_BIONIC (OPTION_BIONIC) - -+/* musl avoids problematic includes by rearranging the include directories. -+ * Unfortunately, this is mostly duplicated from cppdefault.c */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif -+ - #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ - /* This is a *uclinux* target. We don't define below macros to normal linux - versions, because doing so would require *uclinux* targets to include ---- a/gcc/config/linux.opt -+++ b/gcc/config/linux.opt -@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_l - Use GNU C library - - muclibc --Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) -+Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl) - Use uClibc C library -+ -+mmusl -+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic) -+Use musl C library ---- a/gcc/configure -+++ b/gcc/configure -@@ -27833,6 +27833,9 @@ if test "${gcc_cv_libc_provides_ssp+set} - else - gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -27865,6 +27868,7 @@ fi - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" -@@ -27961,6 +27965,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5287,6 +5287,9 @@ AC_CACHE_CHECK(__stack_chk_fail in targe - gcc_cv_libc_provides_ssp, - [gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -5313,6 +5316,7 @@ AC_CACHE_CHECK(__stack_chk_fail in targe - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], -@@ -5386,6 +5390,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -667,7 +667,7 @@ Objective-C and Objective-C++ Dialects}. - -mcpu=@var{cpu}} - - @emph{GNU/Linux Options} --@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol -+@gccoptlist{-mglibc -muclibc -mmusl -mbionic -mandroid @gol - -tno-android-cc -tno-android-ld} - - @emph{H8/300 Options} -@@ -15340,13 +15340,19 @@ These @samp{-m} options are defined for - @item -mglibc - @opindex mglibc - Use the GNU C library. This is the default except --on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets. -+on @samp{*-*-linux-*uclibc*}, @samp{*-*-linux-*musl*} and -+@samp{*-*-linux-*android*} targets. - - @item -muclibc - @opindex muclibc - Use uClibc C library. This is the default on - @samp{*-*-linux-*uclibc*} targets. - -+@item -mmusl -+@opindex mmusl -+Use the musl C library. This is the default on -+@samp{*-*-linux-*musl*} targets. -+ - @item -mbionic - @opindex mbionic - Use Bionic C library. This is the default on diff --git a/devel/gcc/patches/201-musl_arm.patch b/devel/gcc/patches/201-musl_arm.patch deleted file mode 100644 index 27a26af..0000000 --- a/devel/gcc/patches/201-musl_arm.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: ktkachov -Date: Wed, 27 May 2015 13:17:11 +0000 (+0000) -Subject: [PATCH 4/13] arm musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4 - -[PATCH 4/13] arm musl support - -On behalf of szabolcs.nagy@arm.com - -2015-05-27 Gregor Richards - - * config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223749 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -77,6 +77,23 @@ - %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ - %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" - -+/* For ARM musl currently supports four dynamic linkers: -+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI -+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI -+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB -+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB -+ musl does not support the legacy OABI mode. -+ All the dynamic linkers live in /lib. -+ We default to soft-float, EL. */ -+#undef MUSL_DYNAMIC_LINKER -+#if TARGET_BIG_ENDIAN_DEFAULT -+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" -+#endif -+#define MUSL_DYNAMIC_LINKER \ -+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC diff --git a/devel/gcc/patches/202-musl_mips.patch b/devel/gcc/patches/202-musl_mips.patch deleted file mode 100644 index 816dd8d..0000000 --- a/devel/gcc/patches/202-musl_mips.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 15:16:50 +0000 (+0000) -Subject: [PATCH 6/13] mips musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2550b6a866c887472b587bef87d433c51cf1ebc8 - -[PATCH 6/13] mips musl support - -2015-05-08 Gregor Richards - Szabolcs Nagy - - * config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Define. - (GNU_USER_DYNAMIC_LINKERN32): Update. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222915 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/mips/linux.h -+++ b/gcc/config/mips/linux.h -@@ -37,7 +37,13 @@ along with GCC; see the file COPYING3. - #define UCLIBC_DYNAMIC_LINKERN32 \ - "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" - -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1" -+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1" -+ - #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" - #define GNU_USER_DYNAMIC_LINKERN32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ -- BIONIC_DYNAMIC_LINKERN32) -+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) diff --git a/devel/gcc/patches/203-musl_powerpc.patch b/devel/gcc/patches/203-musl_powerpc.patch deleted file mode 100644 index b4f34e8..0000000 --- a/devel/gcc/patches/203-musl_powerpc.patch +++ /dev/null @@ -1,209 +0,0 @@ - -gcc/Changelog: - -2015-04-24 Gregor Richards - Szabolcs Nagy - - * config.gcc (secure_plt): Add *-linux*-musl*. - * config/rs6000/linux64.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64): Define. - (GNU_USER_DYNAMIC_LINKER32): Update. - (GNU_USER_DYNAMIC_LINKER64): Update. - (CHOOSE_DYNAMIC_LINKER): Update. - - * config/rs6000/secureplt.h (LINK_SECURE_PLT_DEFAULT_SPEC): Define. - * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Update. - (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER_E,) - (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) - (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) - (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. - (LINK_SECURE_PLT_DEFAULT_SPEC): Define. - (CHOOSE_DYNAMIC_LINKER, LINK_TARGET_SPEC, LINK_OS_LINUX_SPEC): Update. - - * config/rs6000/sysv4le.h (MUSL_DYNAMIC_LINKER_E): Define. - ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -365,17 +365,21 @@ extern int dot_symbols; - #endif - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER32 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - - #undef DEFAULT_ASM_ENDIAN - #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) ---- a/gcc/config/rs6000/secureplt.h -+++ b/gcc/config/rs6000/secureplt.h -@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3. - . */ - - #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" -+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -537,6 +537,9 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - #ifndef CC1_SECURE_PLT_DEFAULT_SPEC - #define CC1_SECURE_PLT_DEFAULT_SPEC "" - #endif -+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC -+#define LINK_SECURE_PLT_DEFAULT_SPEC "" -+#endif - - /* Pass -G xxx to the compiler. */ - #undef CC1_SPEC -@@ -574,7 +577,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - %{R*} \ - %(link_shlib) \ - %{!T*: %(link_start) } \ --%(link_os)" -+%(link_os)" \ -+"%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" - - /* Shared libraries are not default. */ - #define LINK_SHLIB_SPEC "\ -@@ -757,17 +761,22 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - - #define LINK_START_LINUX_SPEC "" - -+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","") -+ - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - - #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ -@@ -889,6 +898,7 @@ ncrtn.o%s" - { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ - { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ - { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ -+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ - { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ - { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ - { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ -@@ -943,3 +953,72 @@ ncrtn.o%s" - /* This target uses the sysv4.opt file. */ - #define TARGET_USES_SYSV4_OPT 1 - -+/* Include order changes for musl, same as in generic linux.h. */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif ---- a/gcc/config/rs6000/sysv4le.h -+++ b/gcc/config/rs6000/sysv4le.h -@@ -31,3 +31,5 @@ - /* Little-endian PowerPC64 Linux uses the ELF v2 ABI by default. */ - #define LINUX64_DEFAULT_ABI_ELFv2 - -+#undef MUSL_DYNAMIC_LINKER_E -+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","le") ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -2416,6 +2416,10 @@ powerpc*-*-linux*) - powerpc*-*-linux*paired*) - tm_file="${tm_file} rs6000/750cl.h" ;; - esac -+ case ${target} in -+ *-linux*-musl*) -+ enable_secureplt=yes ;; -+ esac - if test x${enable_secureplt} = xyes; then - tm_file="rs6000/secureplt.h ${tm_file}" - fi diff --git a/devel/gcc/patches/204-musl_sh.patch b/devel/gcc/patches/204-musl_sh.patch deleted file mode 100644 index 8c3753d..0000000 --- a/devel/gcc/patches/204-musl_sh.patch +++ /dev/null @@ -1,39 +0,0 @@ -gcc/Changelog: - -2015-04-27 Gregor Richards - Szabolcs Nagy - - * config/sh/linux.h (MUSL_DYNAMIC_LINKER): Define. - (MUSL_DYNAMIC_LINKER_E, MUSL_DYNAMIC_LINKER_FP): Define. - ---- a/gcc/config/sh/linux.h -+++ b/gcc/config/sh/linux.h -@@ -43,6 +43,28 @@ along with GCC; see the file COPYING3. - - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack - -+#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN -+#define MUSL_DYNAMIC_LINKER_E "%{mb:eb}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{!ml:eb}" -+#endif -+ -+#if TARGET_CPU_DEFAULT & ( MASK_HARD_SH2A_DOUBLE | MASK_SH4 ) -+/* "-nofpu" if any nofpu option is specified */ -+#define MUSL_DYNAMIC_LINKER_FP \ -+ "%{m1|m2|m2a-nofpu|m3|m4-nofpu|m4-100-nofpu|m4-200-nofpu|m4-300-nofpu|" \ -+ "m4-340|m4-400|m4-500|m4al|m5-32media-nofpu|m5-64media-nofpu|" \ -+ "m5-compact-nofpu:-nofpu}" -+#else -+/* "-nofpu" if none of the hard fpu options are specified */ -+#define MUSL_DYNAMIC_LINKER_FP \ -+ "%{m2a|m4|m4-100|m4-200|m4-300|m4a|m5-32media|m5-64media|m5-compact:;:-nofpu}" -+#endif -+ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER \ -+ "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP ".so.1" -+ - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #undef SUBTARGET_LINK_EMUL_SUFFIX diff --git a/devel/gcc/patches/205-musl_x86.patch b/devel/gcc/patches/205-musl_x86.patch deleted file mode 100644 index 8772328..0000000 --- a/devel/gcc/patches/205-musl_x86.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: ktkachov -Date: Fri, 15 May 2015 13:20:01 +0000 (+0000) -Subject: [PATCH 9/13] x86 musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=5551c8d927c17f60837f15f8dfe46f945ba3fa9c - -[PATCH 9/13] x86 musl support - -On behalf of Szabolcs Nagy. - -2015-05-15 Gregor Richards - - * config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define. - * config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223218 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/i386/linux.h -+++ b/gcc/config/i386/linux.h -@@ -21,3 +21,6 @@ along with GCC; see the file COPYING3. - - #define GNU_USER_LINK_EMULATION "elf_i386" - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" ---- a/gcc/config/i386/linux64.h -+++ b/gcc/config/i386/linux64.h -@@ -30,3 +30,10 @@ see the files COPYING3 and COPYING.RUNTI - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" - #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" - #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -+ -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" -+#undef MUSL_DYNAMIC_LINKERX32 -+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" diff --git a/devel/gcc/patches/206-musl_aarch64.patch b/devel/gcc/patches/206-musl_aarch64.patch deleted file mode 100644 index 6925a02..0000000 --- a/devel/gcc/patches/206-musl_aarch64.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: jgreenhalgh -Date: Wed, 27 May 2015 16:46:39 +0000 (+0000) -Subject: [PATCH 3/13] aarch64 musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=b3ff21cf0531be91bc3fb8200296a7633090ec78 - -[PATCH 3/13] aarch64 musl support - -gcc/Changelog: - -2015-05-27 Gregor Richards - Szabolcs Nagy - - * config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223766 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/aarch64/aarch64-linux.h -+++ b/gcc/config/aarch64/aarch64-linux.h -@@ -23,6 +23,9 @@ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" - -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" -+ - #undef ASAN_CC1_SPEC - #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" - diff --git a/devel/gcc/patches/207-musl_fixincludes.patch b/devel/gcc/patches/207-musl_fixincludes.patch deleted file mode 100644 index 0ff33d3..0000000 --- a/devel/gcc/patches/207-musl_fixincludes.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000) -Subject: fixincludes update for musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2dc727de2e87c2756a514cbb43cea23c99deaa3d - -fixincludes update for musl support - -On behalf of Szabolcs.Nagy@arm.com - -2015-04-22 Gregor Richards - - * mkfixinc.sh: Add *-musl* with no fixes. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222327 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/fixincludes/mkfixinc.sh -+++ b/fixincludes/mkfixinc.sh -@@ -19,7 +19,8 @@ case $machine in - powerpc-*-eabi* | \ - powerpc-*-rtems* | \ - powerpcle-*-eabisim* | \ -- powerpcle-*-eabi* ) -+ powerpcle-*-eabi* | \ -+ *-musl* ) - # IF there is no include fixing, - # THEN create a no-op fixer and exit - (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} diff --git a/devel/gcc/patches/209-musl_libstdc++.patch b/devel/gcc/patches/209-musl_libstdc++.patch deleted file mode 100644 index d2414d0..0000000 --- a/devel/gcc/patches/209-musl_libstdc++.patch +++ /dev/null @@ -1,72 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000) -Subject: libstdc++, libgfortran gthr workaround for musl -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61 - -libstdc++, libgfortran gthr workaround for musl - -On behalf of szabolcs.nagy@arm.com - -[libstdc++-v3/] -2015-04-22 Szabolcs Nagy - - * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define. - * configure.host (os_include_dir): Set to "os/generic" for linux-musl*. - -[libgfortran/] -2015-04-22 Szabolcs Nagy - - * acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*. - * configure: Regenerate. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222329 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libgfortran/acinclude.m4 -+++ b/libgfortran/acinclude.m4 -@@ -100,7 +100,7 @@ void foo (void); - [Define to 1 if the target supports #pragma weak]) - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - AC_DEFINE(GTHREAD_USE_WEAK, 0, - [Define to 0 if the target shouldn't use #pragma weak]) - ;; ---- a/libgfortran/configure -+++ b/libgfortran/configure -@@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>con - - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - - $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h - ---- a/libstdc++-v3/config/os/generic/os_defines.h -+++ b/libstdc++-v3/config/os/generic/os_defines.h -@@ -33,4 +33,9 @@ - // System-specific #define, typedefs, corrections, etc, go here. This - // file will come before all others. - -+// Disable the weak reference logic in gthr.h for os/generic because it -+// is broken on every platform unless there is implementation specific -+// workaround in gthr-posix.h and at link-time for static linking. -+#define _GLIBCXX_GTHREAD_USE_WEAK 0 -+ - #endif ---- a/libstdc++-v3/configure.host -+++ b/libstdc++-v3/configure.host -@@ -273,6 +273,9 @@ case "${host_os}" in - freebsd*) - os_include_dir="os/bsd/freebsd" - ;; -+ linux-musl*) -+ os_include_dir="os/generic" -+ ;; - gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) - if [ "$uclibc" = "yes" ]; then - os_include_dir="os/uclibc" diff --git a/devel/gcc/patches/230-musl_libssp.patch b/devel/gcc/patches/230-musl_libssp.patch deleted file mode 100644 index 30f42e9..0000000 --- a/devel/gcc/patches/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -727,7 +727,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/devel/gcc/patches/240-musl-libitm-fixes.patch b/devel/gcc/patches/240-musl-libitm-fixes.patch deleted file mode 100644 index 533cb68..0000000 --- a/devel/gcc/patches/240-musl-libitm-fixes.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000) -Subject: libitm fixes for musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338 - -libitm fixes for musl support - -On behalf of Szabolcs.Nagy@arm.com - -2015-04-22 Gregor Richards - - * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h. - * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libitm/config/arm/hwcap.cc -+++ b/libitm/config/arm/hwcap.cc -@@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0 - - #ifdef __linux__ - #include --#include -+#include - #include - - static void __attribute__((constructor)) ---- a/libitm/config/linux/x86/tls.h -+++ b/libitm/config/linux/x86/tls.h -@@ -25,16 +25,19 @@ - #ifndef LIBITM_X86_TLS_H - #define LIBITM_X86_TLS_H 1 - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - /* Use slots in the TCB head rather than __thread lookups. - GLIBC has reserved words 10 through 13 for TM. */ - #define HAVE_ARCH_GTM_THREAD 1 - #define HAVE_ARCH_GTM_THREAD_DISP 1 - #endif -+#endif - - #include "config/generic/tls.h" - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - namespace GTM HIDDEN { - - #ifdef __x86_64__ -@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a - - } // namespace GTM - #endif /* >= GLIBC 2.10 */ -+#endif - - #endif // LIBITM_X86_TLS_H diff --git a/devel/gcc/patches/250-add-musl.patch b/devel/gcc/patches/250-add-musl.patch deleted file mode 100644 index 8cbedde..0000000 --- a/devel/gcc/patches/250-add-musl.patch +++ /dev/null @@ -1,120 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 08:30:40 +0000 (+0000) -Subject: [PATCH 0/13] Add musl support to GCC -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e - -[PATCH 0/13] Add musl support to GCC - -2015-05-08 Szabolcs Nagy - - * config/glibc-stdint.h (OPTION_MUSL): Define. - (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE): - Change the definition based on OPTION_MUSL for 64 bit targets. - * config/linux.h (OPTION_MUSL): Redefine. - * config/alpha/linux.h (OPTION_MUSL): Redefine. - * config/rs6000/linux.h (OPTION_MUSL): Redefine. - * config/rs6000/linux64.h (OPTION_MUSL): Redefine. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222905 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/alpha/linux.h -+++ b/gcc/config/alpha/linux.h -@@ -61,10 +61,14 @@ along with GCC; see the file COPYING3. - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; ---- a/gcc/config/glibc-stdint.h -+++ b/gcc/config/glibc-stdint.h -@@ -22,6 +22,12 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* Systems using musl libc should use this header and make sure -+ OPTION_MUSL is defined correctly before using the TYPE macros. */ -+#ifndef OPTION_MUSL -+#define OPTION_MUSL 0 -+#endif -+ - #define SIG_ATOMIC_TYPE "int" - - #define INT8_TYPE "signed char" -@@ -43,12 +49,12 @@ see the files COPYING3 and COPYING.RUNTI - #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") - - #define INT_FAST8_TYPE "signed char" --#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") --#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") -+#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") -+#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") - #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") - #define UINT_FAST8_TYPE "unsigned char" --#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") --#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") -+#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") -+#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") - #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") - - #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -32,11 +32,13 @@ see the files COPYING3 and COPYING.RUNTI - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL - #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL - #define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -30,10 +30,14 @@ - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -299,10 +299,14 @@ extern int dot_symbols; - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; diff --git a/devel/gcc/patches/260-musl-add-unwind-fix.patch b/devel/gcc/patches/260-musl-add-unwind-fix.patch deleted file mode 100644 index a3b83e2..0000000 --- a/devel/gcc/patches/260-musl-add-unwind-fix.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000) -Subject: unwind fix for musl -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a2e31d0681d8a47389b8a3552622fbd9827bcef4 - -unwind fix for musl - -On behalf of szabolcs.nagy@arm.com - -2015-04-22 Gregor Richards - Szabolcs Nagy - - * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on - Linux if target provides dl_iterate_phdr. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libgcc/unwind-dw2-fde-dip.c -+++ b/libgcc/unwind-dw2-fde-dip.c -@@ -59,6 +59,12 @@ - - #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ - && defined(TARGET_DL_ITERATE_PHDR) \ -+ && defined(__linux__) -+# define USE_PT_GNU_EH_FRAME -+#endif -+ -+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -+ && defined(TARGET_DL_ITERATE_PHDR) \ - && (defined(__DragonFly__) || defined(__FreeBSD__)) - # define ElfW __ElfN - # define USE_PT_GNU_EH_FRAME diff --git a/devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch b/devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch deleted file mode 100644 index bdebf6c..0000000 --- a/devel/gcc/patches/270-musl-add-powerpc-softfloat-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -369,8 +369,8 @@ extern int dot_symbols; - #endif - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" --#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" --#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -765,7 +765,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" --#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_MUSL diff --git a/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch b/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 1743658..0000000 --- a/devel/gcc/patches/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,14 +0,0 @@ -Use the proper rtx cost model for the selected CPU, even when optimizing -for size. This generates better code. - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -17483,7 +17483,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch b/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch deleted file mode 100644 index 0edeb13..0000000 --- a/devel/gcc/patches/800-arm_v5te_no_ldrd_strd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/arm/arm.h -+++ b/gcc/config/arm/arm.h -@@ -285,7 +285,7 @@ extern void (*arm_lang_output_object_att - /* Thumb-1 only. */ - #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) - --#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ -+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ - && !TARGET_THUMB1) - - #define TARGET_CRC32 (arm_arch_crc) diff --git a/devel/gcc/patches/810-arm-softfloat-libgcc.patch b/devel/gcc/patches/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 1d06f5b..0000000 --- a/devel/gcc/patches/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -60,8 +60,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/devel/gcc/patches/820-libgcc_pic.patch b/devel/gcc/patches/820-libgcc_pic.patch deleted file mode 100644 index 42bf0c8..0000000 --- a/devel/gcc/patches/820-libgcc_pic.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -887,11 +887,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -913,7 +914,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - endif -@@ -1108,6 +1109,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/devel/gcc/patches/830-arm_unbreak_armv4t.patch b/devel/gcc/patches/830-arm_unbreak_armv4t.patch deleted file mode 100644 index 37f8f2a..0000000 --- a/devel/gcc/patches/830-arm_unbreak_armv4t.patch +++ /dev/null @@ -1,13 +0,0 @@ -http://sourceware.org/ml/crossgcc/2008-05/msg00009.html - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -45,7 +45,7 @@ - The ARM10TDMI core is the default for armv5t, so set - SUBTARGET_CPU_DEFAULT to achieve this. */ - #undef SUBTARGET_CPU_DEFAULT --#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi -+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi - - /* TARGET_BIG_ENDIAN_DEFAULT is set in - config.gcc for big endian configurations. */ diff --git a/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch b/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index cb1fb98..0000000 --- a/devel/gcc/patches/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -94,10 +94,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/devel/gcc/patches/850-use_shared_libgcc.patch b/devel/gcc/patches/850-use_shared_libgcc.patch deleted file mode 100644 index 5818cf4..0000000 --- a/devel/gcc/patches/850-use_shared_libgcc.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -131,10 +131,6 @@ - #define ENDFILE_SPEC \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -132,5 +132,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -60,6 +60,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" - diff --git a/devel/gcc/patches/851-libgcc_no_compat.patch b/devel/gcc/patches/851-libgcc_no_compat.patch deleted file mode 100644 index 80c3476..0000000 --- a/devel/gcc/patches/851-libgcc_no_compat.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/devel/gcc/patches/870-ppc_no_crtsavres.patch b/devel/gcc/patches/870-ppc_no_crtsavres.patch deleted file mode 100644 index 0e64a41..0000000 --- a/devel/gcc/patches/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -21500,7 +21500,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/devel/gcc/patches/880-no_java_section.patch b/devel/gcc/patches/880-no_java_section.patch deleted file mode 100644 index def6c9f..0000000 --- a/devel/gcc/patches/880-no_java_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/defaults.h -+++ b/gcc/defaults.h -@@ -380,7 +380,7 @@ see the files COPYING3 and COPYING.RUNTI - /* If we have named section and we support weak symbols, then use the - .jcr section for recording java classes which need to be registered - at program start-up time. */ --#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK -+#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK - #ifndef JCR_SECTION_NAME - #define JCR_SECTION_NAME ".jcr" - #endif diff --git a/devel/gcc/patches/900-bad-mips16-crt.patch b/devel/gcc/patches/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc..0000000 --- a/devel/gcc/patches/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/devel/gcc/patches/910-mbsd_multi.patch b/devel/gcc/patches/910-mbsd_multi.patch deleted file mode 100644 index 32fc9da..0000000 --- a/devel/gcc/patches/910-mbsd_multi.patch +++ /dev/null @@ -1,222 +0,0 @@ - - This patch brings over a few features from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - * -Werror-maybe-reset - Has the effect of -Wno-error if GCC_NO_WERROR is - set and not '0', a no-operation otherwise. This is - to be able to use -Werror in "make" but prevent - GNU autoconf generated configure scripts from - freaking out. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -122,6 +122,9 @@ static int class_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -449,6 +452,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1034,6 +1043,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -431,6 +431,10 @@ Wfloat-conversion - C ObjC C++ ObjC++ Var(warn_float_conversion) LangEnabledBy(C ObjC C++ ObjC++,Wconversion) - Warn for implicit type conversions that cause loss of floating point precision - -+Werror-maybe-reset -+C ObjC C++ ObjC++ -+; Documented in common.opt -+ - Wfloat-equal - C ObjC C++ ObjC++ Var(warn_float_equal) Warning - Warn if testing floating point numbers for equality -@@ -1161,6 +1165,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -561,6 +561,10 @@ Werror= - Common Joined - Treat specified warning as error - -+Werror-maybe-reset -+Common -+If environment variable GCC_NO_WERROR is set, act as -Wno-error -+ - Wextra - Common Var(extra_warnings) Warning - Print extra (possibly unwanted) warnings -@@ -1360,6 +1364,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -1699,6 +1699,17 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_Werror_maybe_reset: -+ { -+ char *ev = getenv ("GCC_NO_WERROR"); -+ if ((ev != NULL) && (*ev != '0')) -+ warnings_are_errors = 0; -+ } -+ break; -+ -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -163,6 +163,11 @@ in older programs. This warning is on b - Make all warnings into hard errors. Source code which triggers warnings - will be rejected. - -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ - @item -Wsystem-headers - @opindex Wsystem-headers - Issue warnings for code in system headers. These are normally unhelpful ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -251,7 +251,7 @@ Objective-C and Objective-C++ Dialects}. - -Wdisabled-optimization @gol - -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol - -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol ---Wno-endif-labels -Werror -Werror=* @gol -+-Wno-endif-labels -Werror -Werror=* -Werror-maybe-reset @gol - -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol - -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol - -Wformat-security -Wformat-signedness -Wformat-y2k @gol -@@ -5382,6 +5382,22 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ -+ at item -fhonour-copts -+ at opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector -@@ -7860,7 +7876,7 @@ so, the first branch is redirected to ei - second branch or a point immediately following it, depending on whether - the condition is known to be true or false. - --Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -+Enabled at levels @option{-O3}. - - @item -fsplit-wide-types - @opindex fsplit-wide-types ---- a/gcc/java/jvspec.c -+++ b/gcc/java/jvspec.c -@@ -629,6 +629,7 @@ lang_specific_pre_link (void) - class name. Append dummy `.c' that can be stripped by set_input so %b - is correct. */ - set_input (concat (main_class_name, "main.c", NULL)); -+ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ - err = do_spec (jvgenmain_spec); - if (err == 0) - { diff --git a/devel/gcc/patches/920-specs_nonfatal_getenv.patch b/devel/gcc/patches/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 3d708f2..0000000 --- a/devel/gcc/patches/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -8807,8 +8807,10 @@ getenv_spec_function (int argc, const ch - - value = getenv (argv[0]); - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", argv[0]); -+ { -+ warning (input_location, "environment variable %qs not defined", argv[0]); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/devel/gcc/patches/930-fix-mips-noexecstack.patch b/devel/gcc/patches/930-fix-mips-noexecstack.patch deleted file mode 100644 index c05844d..0000000 --- a/devel/gcc/patches/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -19629,6 +19629,9 @@ mips_lra_p (void) - #undef TARGET_LRA_P - #define TARGET_LRA_P mips_lra_p - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/devel/gcc/patches/930-osdefines.patch b/devel/gcc/patches/930-osdefines.patch deleted file mode 100644 index a1b6120..0000000 --- a/devel/gcc/patches/930-osdefines.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/libstdc++-v3/config/os/gnu-linux/os_defines.h 2015-01-05 06:33:28.000000000 -0600 -+++ b/libstdc++-v3/config/os/gnu-linux/os_defines.h 2016-04-15 12:32:49.374356001 -0500 -@@ -41,8 +41,8 @@ - // Provide a declaration for the possibly deprecated gets function, as - // glibc 2.15 and later does not declare gets for ISO C11 when - // __GNU_SOURCE is defined. --#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) -+//#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE) - # undef _GLIBCXX_HAVE_GETS --#endif -+//#endif - - #endif diff --git a/devel/gcc/patches/940-no-clobber-stamp-bits.patch b/devel/gcc/patches/940-no-clobber-stamp-bits.patch deleted file mode 100644 index 0b21ffa..0000000 --- a/devel/gcc/patches/940-no-clobber-stamp-bits.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libstdc++-v3/include/Makefile.in -+++ b/libstdc++-v3/include/Makefile.in -@@ -1421,7 +1421,7 @@ stamp-bits: ${bits_headers} - @$(STAMP) stamp-bits - - stamp-bits-sup: stamp-bits ${bits_sup_headers} -- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null -+ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null - @$(STAMP) stamp-bits-sup - - stamp-c_base: ${c_base_headers} diff --git a/devel/gcc/patches/950-cpp_file_path_translation.patch b/devel/gcc/patches/950-cpp_file_path_translation.patch deleted file mode 100644 index dc0938a..0000000 --- a/devel/gcc/patches/950-cpp_file_path_translation.patch +++ /dev/null @@ -1,182 +0,0 @@ -Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -581,6 +581,10 @@ c_common_handle_option (size_t scode, co - add_path (xstrdup (arg), SYSTEM, 0, true); - break; - -+ case OPT_iremap: -+ add_cpp_remap_path (arg); -+ break; -+ - case OPT_iwithprefix: - add_prefixed_path (arg, SYSTEM); - break; ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1528,6 +1528,10 @@ iquote - C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) - -iquote Add to the end of the quote include path - -+iremap -+C ObjC C++ ObjC++ Joined Separate -+-iremap Convert to if it occurs as prefix in __FILE__. -+ - iwithprefix - C ObjC C++ ObjC++ Joined Separate - -iwithprefix Add to the end of the system include path ---- a/gcc/doc/cpp.texi -+++ b/gcc/doc/cpp.texi -@@ -4441,6 +4441,7 @@ without notice. - @c man begin SYNOPSIS - cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] - [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] -+ [@option{-iremap}@var{src}:@var{dst}] - [@option{-W}@var{warn}@dots{}] - [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] - [@option{-MP}] [@option{-MQ} @var{target}@dots{}] ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -532,6 +532,12 @@ Search @var{dir} only for header files r - If @var{dir} begins with @code{=}, then the @code{=} will be replaced - by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -fdirectives-only - @opindex fdirectives-only - When preprocessing, handle directives, but do not expand macros. ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -494,8 +494,8 @@ Objective-C and Objective-C++ Dialects}. - @item Directory Options - @xref{Directory Options,,Options for Directory Search}. - @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol ---iquote@var{dir} -L@var{dir} -specs=@var{file} -I- @gol ----sysroot=@var{dir} --no-sysroot-suffix} -+-iquote@var{dir} -iremap@var{src}:@var{dst} -L@var{dir} -specs=@var{file} @gol -+-I- --sysroot=@var{dir} --no-sysroot-suffix} - - @item Machine Dependent Options - @xref{Submodel Options,,Hardware Models and Configurations}. -@@ -11479,6 +11479,12 @@ be searched for header files only for th - "@var{file}"}; they are not searched for @code{#include <@var{file}>}, - otherwise just like @option{-I}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -L@var{dir} - @opindex L - Add directory @var{dir} to the list of directories to be searched ---- a/libcpp/include/cpplib.h -+++ b/libcpp/include/cpplib.h -@@ -751,6 +751,9 @@ extern void cpp_set_lang (cpp_reader *, - /* Set the include paths. */ - extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); - -+/* Provide src:dst pair for __FILE__ remapping. */ -+extern void add_cpp_remap_path (const char *); -+ - /* Call these to get pointers to the options, callback, and deps - structures for a given reader. These pointers are good until you - call cpp_finish on that reader. You can either edit the callbacks ---- a/libcpp/macro.c -+++ b/libcpp/macro.c -@@ -224,6 +224,64 @@ static const char * const monthnames[] = - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - -+static size_t remap_pairs; -+static char **remap_src; -+static char **remap_dst; -+ -+void -+add_cpp_remap_path (const char *arg) -+{ -+ const char *arg_dst; -+ size_t len; -+ -+ arg_dst = strchr(arg, ':'); -+ if (arg_dst == NULL) -+ { -+ fprintf(stderr, "Invalid argument for -iremap\n"); -+ exit(1); -+ } -+ -+ len = arg_dst - arg; -+ ++arg_dst; -+ -+ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); -+ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); -+ -+ remap_src[remap_pairs] = (char *) xmalloc(len + 1); -+ memcpy(remap_src[remap_pairs], arg, len); -+ remap_src[remap_pairs][len] = '\0'; -+ remap_dst[remap_pairs] = xstrdup(arg_dst); -+ ++remap_pairs; -+} -+ -+static const char * -+cpp_remap_file (const char *arg, char **tmp_name) -+{ -+ char *result; -+ size_t i, len; -+ -+ for (i = 0; i < remap_pairs; ++i) -+ { -+ len = strlen (remap_src[i]); -+ if (strncmp (remap_src[i], arg, len)) -+ continue; -+ if (arg[len] == '\0') -+ return xstrdup (remap_dst[i]); -+ if (arg[len] != '/') -+ continue; -+ arg += len; -+ len = strlen (remap_dst[i]); -+ result = (char *) xmalloc (len + strlen (arg) + 1); -+ memcpy(result, remap_dst[i], len); -+ strcpy(result + len, arg); -+ *tmp_name = result; -+ -+ return result; -+ } -+ -+ return arg; -+} -+ - /* Helper function for builtin_macro. Returns the text generated by - a builtin macro. */ - const uchar * -@@ -286,6 +344,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - { - unsigned int len; - const char *name; -+ char *tmp_name = NULL; - uchar *buf; - - if (node->value.builtin == BT_FILE) -@@ -297,6 +356,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - if (!name) - abort (); - } -+ name = cpp_remap_file (name, &tmp_name); - len = strlen (name); - buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); - result = buf; -@@ -304,6 +364,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); - *buf++ = '"'; - *buf = '\0'; -+ free (tmp_name); - } - break; - diff --git a/devel/gcc/patches/960-go_libm.patch b/devel/gcc/patches/960-go_libm.patch deleted file mode 100644 index d16b020..0000000 --- a/devel/gcc/patches/960-go_libm.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/go/Make-lang.in -+++ b/gcc/go/Make-lang.in -@@ -74,7 +74,7 @@ go_OBJS = $(GO_OBJS) go/gospec.o - - go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS) - +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ -- $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -+ $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -lm - - # Documentation. - diff --git a/devel/gcc/patches/970-warn_bug.patch b/devel/gcc/patches/970-warn_bug.patch deleted file mode 100644 index 2c5cf9b..0000000 --- a/devel/gcc/patches/970-warn_bug.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgo/runtime/mprof.goc -+++ b/libgo/runtime/mprof.goc -@@ -403,7 +403,7 @@ func ThreadCreateProfile(p Slice) (n int - - func Stack(b Slice, all bool) (n int) { - byte *pc, *sp; -- bool enablegc; -+ bool enablegc = false; /* workaround GCC bug #36550 */ - - sp = runtime_getcallersp(&b); - pc = (byte*)(uintptr)runtime_getcallerpc(&b); diff --git a/devel/libtool-bin/Makefile b/devel/libtool-bin/Makefile deleted file mode 100644 index a10303e..0000000 --- a/devel/libtool-bin/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libtool -PKG_VERSION:=2.4.6 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNU/libtool -PKG_MD5SUM:=1bfb9b923f2c1339b4d2ce1807064aa5 -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-2.0+ -PKG_BUILD_DIR = $(BUILD_DIR)/libtool-bin/$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -CONFIGURE_VARS += GREP=grep SED=sed - -define Package/libtool-bin - SECTION:=devel - CATEGORY:=Development - TITLE:=GNU Libtool - libtoolize - URL:=https://www.gnu.org/software/libtool/ -endef - -define Package/libtool-bin/description - GNU libtool is a generic library support script. - Libtool hides the complexity of using shared libraries behind a consistent, - portable interface. - This package contains the libtoolize executable. -endef - -define Package/libtool-bin/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libtoolize $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/aclocal/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/*.m4 \ - $(1)/usr/share/aclocal/ - $(INSTALL_DIR) $(1)/usr/share/libtool/build-aux/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/libtool/build-aux/* \ - $(1)/usr/share/libtool/build-aux/ -endef - -$(eval $(call BuildPackage,libtool-bin)) diff --git a/devel/lpc21isp/Makefile b/devel/lpc21isp/Makefile deleted file mode 100644 index 292b7a4..0000000 --- a/devel/lpc21isp/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lpc21isp -PKG_VERSION:=197 -PKG_RELEASE:=1 -PKG_LICENSE:=LGPL-3.0+ -PKG_LICENSE_FILES:=README gpl.txt lgpl-3.0.txt - -PKG_BUILD_DIR:=$(BUILD_DIR)/lpc21isp_$(PKG_VERSION) -PKG_SOURCE:=lpc21isp_$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/lpc21isp -PKG_MD5SUM:=0b286859a05a725647ecb1b3fe9ba606 -PKG_CAT:=zcat - -include $(INCLUDE_DIR)/package.mk - -define Package/lpc21isp - SECTION:=base - CATEGORY:=Development - TITLE:=Command line ISP for NXP LPC family and ADUC70xx - URL:=http://lpc21isp.sourceforge.net/ - MAINTAINER:=Emil 'Skeen' Madsen -endef - -define Package/lpc21isp/description - Portable command line ISP (In-circuit Programmer) for NXP LPC family - and Analog Devices ADUC70xx. -endef - -define Package/lpc21isp/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lpc21isp $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,lpc21isp)) diff --git a/devel/lttng-modules/Makefile b/devel/lttng-modules/Makefile deleted file mode 100644 index 99510a0..0000000 --- a/devel/lttng-modules/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (C) 2013-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lttng-modules -PKG_VERSION:=2.6.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/ -PKG_MD5SUM:=ccfb50ad922cdaf54a809e2d9de23da4 - -PKG_LICENSE:=LGPL-2.1 GPL-2.0 MIT -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Nicolas Thill - -include $(INCLUDE_DIR)/kernel.mk -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/lttng - SUBMENU:=Other modules - TITLE:=Linux Trace Toolkit: next generation (kernel modules) - URL:=https://lttng.org/ - DEPENDS:= @!TARGET_uml @KERNEL_FTRACE_SYSCALLS - FILES:= \ - $(PKG_BUILD_DIR)/lttng-*.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/lib/lttng-*.$(LINUX_KMOD_SUFFIX) \ - $(PKG_BUILD_DIR)/probes/lttng-*.$(LINUX_KMOD_SUFFIX) -endef - -define Build/Compile - $(MAKE) -C "$(LINUX_DIR)" \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - SUBDIRS="$(PKG_BUILD_DIR)" \ - V="$(V)" \ - modules -endef - -$(eval $(call KernelPackage,lttng)) diff --git a/devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch b/devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch deleted file mode 100644 index d8a0c62..0000000 --- a/devel/lttng-modules/patches/001-mm_page_alloc_extfrag.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/instrumentation/events/lttng-module/kmem.h -+++ b/instrumentation/events/lttng-module/kmem.h -@@ -287,6 +287,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(mm - ) - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,2) \ -+ || LTTNG_KERNEL_RANGE(3,18,10, 3,19,0) \ - || LTTNG_KERNEL_RANGE(3,14,36, 3,15,0) \ - || LTTNG_DEBIAN_KERNEL_RANGE(3,16,7,9,0,0, 3,17,0,0,0,0)) - diff --git a/devel/lttng-tools/Makefile b/devel/lttng-tools/Makefile deleted file mode 100644 index e52c529..0000000 --- a/devel/lttng-tools/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2013-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lttng-tools -PKG_VERSION:=2.6.0 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/ -PKG_MD5SUM:=0478f60395f9564b4a19f45ce7b7f3df - -PKG_LICENSE:=LGPL-2.1 GPL-2.0 -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill - -PKG_FIXUP:=autoreconf -PKG_USE_MIPS16:=0 -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lttng-tools - SECTION:=devel - CATEGORY:=Development - TITLE:=Linux Trace Toolkit: next generation (tools) - URL:=https://lttng.org/ - DEPENDS:= +lttng-ust +libpopt +libxml2 -endef - -CONFIGURE_ARGS += --disable-kmod - -TARGET_LDFLAGS += -lurcu-bp - -MAKE_FLAGS += V="$(V)" - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/lttng $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ctl*.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lttng-ctl.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/lttng-tools/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblttng-ctl*.so.* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lttng $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lttng* $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,lttng-tools)) diff --git a/devel/lttng-tools/patches/100-musl-compat.patch b/devel/lttng-tools/patches/100-musl-compat.patch deleted file mode 100644 index 8813f83..0000000 --- a/devel/lttng-tools/patches/100-musl-compat.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/src/common/compat/poll.h -+++ b/src/common/compat/poll.h -@@ -55,6 +55,10 @@ static inline void __lttng_poll_free(voi - #include - #include - -+#ifndef __GLIBC_PREREQ -+#define __GLIBC_PREREQ(maj, min) (0) -+#endif -+ - /* See man epoll(7) for this define path */ - #define COMPAT_EPOLL_PROC_PATH "/proc/sys/fs/epoll/max_user_watches" - ---- a/src/common/runas.h -+++ b/src/common/runas.h -@@ -21,6 +21,7 @@ - - #include - #include -+#include - - int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid); - int run_as_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid); diff --git a/devel/lttng-tools/patches/200-use-extern.patch b/devel/lttng-tools/patches/200-use-extern.patch deleted file mode 100644 index 180c061..0000000 --- a/devel/lttng-tools/patches/200-use-extern.patch +++ /dev/null @@ -1,423 +0,0 @@ ---- a/src/common/mi-lttng.h -+++ b/src/common/mi-lttng.h -@@ -49,133 +49,133 @@ struct mi_lttng_version { - }; - - /* Strings related to command */ --const char * const mi_lttng_element_command; --const char * const mi_lttng_element_command_action; --const char * const mi_lttng_element_command_add_context; --const char * const mi_lttng_element_command_calibrate; --const char * const mi_lttng_element_command_create; --const char * const mi_lttng_element_command_destroy; --const char * const mi_lttng_element_command_disable_channel; --const char * const mi_lttng_element_command_disable_event; --const char * const mi_lttng_element_command_enable_channels; --const char * const mi_lttng_element_command_enable_event; --const char * const mi_lttng_element_command_list; --const char * const mi_lttng_element_command_load; --const char * const mi_lttng_element_command_name; --const char * const mi_lttng_element_command_output; --const char * const mi_lttng_element_command_save; --const char * const mi_lttng_element_command_set_session; --const char * const mi_lttng_element_command_snapshot; --const char * const mi_lttng_element_command_snapshot_add; --const char * const mi_lttng_element_command_snapshot_del; --const char * const mi_lttng_element_command_snapshot_list; --const char * const mi_lttng_element_command_snapshot_record; --const char * const mi_lttng_element_command_start; --const char * const mi_lttng_element_command_stop; --const char * const mi_lttng_element_command_success; --const char * const mi_lttng_element_command_version; -+extern const char * const mi_lttng_element_command; -+extern const char * const mi_lttng_element_command_action; -+extern const char * const mi_lttng_element_command_add_context; -+extern const char * const mi_lttng_element_command_calibrate; -+extern const char * const mi_lttng_element_command_create; -+extern const char * const mi_lttng_element_command_destroy; -+extern const char * const mi_lttng_element_command_disable_channel; -+extern const char * const mi_lttng_element_command_disable_event; -+extern const char * const mi_lttng_element_command_enable_channels; -+extern const char * const mi_lttng_element_command_enable_event; -+extern const char * const mi_lttng_element_command_list; -+extern const char * const mi_lttng_element_command_load; -+extern const char * const mi_lttng_element_command_name; -+extern const char * const mi_lttng_element_command_output; -+extern const char * const mi_lttng_element_command_save; -+extern const char * const mi_lttng_element_command_set_session; -+extern const char * const mi_lttng_element_command_snapshot; -+extern const char * const mi_lttng_element_command_snapshot_add; -+extern const char * const mi_lttng_element_command_snapshot_del; -+extern const char * const mi_lttng_element_command_snapshot_list; -+extern const char * const mi_lttng_element_command_snapshot_record; -+extern const char * const mi_lttng_element_command_start; -+extern const char * const mi_lttng_element_command_stop; -+extern const char * const mi_lttng_element_command_success; -+extern const char * const mi_lttng_element_command_version; - - /* Strings related to version command */ --const char * const mi_lttng_element_version; --const char * const mi_lttng_element_version_commit; --const char * const mi_lttng_element_version_description; --const char * const mi_lttng_element_version_license; --const char * const mi_lttng_element_version_major; --const char * const mi_lttng_element_version_minor; --const char * const mi_lttng_element_version_patch_level; --const char * const mi_lttng_element_version_str; --const char * const mi_lttng_element_version_web; -+extern const char * const mi_lttng_element_version; -+extern const char * const mi_lttng_element_version_commit; -+extern const char * const mi_lttng_element_version_description; -+extern const char * const mi_lttng_element_version_license; -+extern const char * const mi_lttng_element_version_major; -+extern const char * const mi_lttng_element_version_minor; -+extern const char * const mi_lttng_element_version_patch_level; -+extern const char * const mi_lttng_element_version_str; -+extern const char * const mi_lttng_element_version_web; - - /* String related to a lttng_event_field */ --const char * const mi_lttng_element_event_field; --const char * const mi_lttng_element_event_fields; -+extern const char * const mi_lttng_element_event_field; -+extern const char * const mi_lttng_element_event_fields; - - /* String related to lttng_event_context */ --const char * const mi_lttng_context_type_perf_counter; --const char * const mi_lttng_context_type_perf_cpu_counter; --const char * const mi_lttng_context_type_perf_thread_counter; -+extern const char * const mi_lttng_context_type_perf_counter; -+extern const char * const mi_lttng_context_type_perf_cpu_counter; -+extern const char * const mi_lttng_context_type_perf_thread_counter; - - /* String related to lttng_event_perf_counter_ctx */ --const char * const mi_lttng_element_perf_counter_context; -+extern const char * const mi_lttng_element_perf_counter_context; - - /* Strings related to pid */ --const char * const mi_lttng_element_pids; --const char * const mi_lttng_element_pid; --const char * const mi_lttng_element_pid_id; -+extern const char * const mi_lttng_element_pids; -+extern const char * const mi_lttng_element_pid; -+extern const char * const mi_lttng_element_pid_id; - - /* Strings related to save command */ --const char * const mi_lttng_element_save; -+extern const char * const mi_lttng_element_save; - - /* Strings related to load command */ --const char * const mi_lttng_element_load; -+extern const char * const mi_lttng_element_load; - - /* General element of mi_lttng */ --const char * const mi_lttng_element_empty; --const char * const mi_lttng_element_id; --const char * const mi_lttng_element_nowrite; --const char * const mi_lttng_element_success; --const char * const mi_lttng_element_type_enum; --const char * const mi_lttng_element_type_float; --const char * const mi_lttng_element_type_integer; --const char * const mi_lttng_element_type_other; --const char * const mi_lttng_element_type_string; -+extern const char * const mi_lttng_element_empty; -+extern const char * const mi_lttng_element_id; -+extern const char * const mi_lttng_element_nowrite; -+extern const char * const mi_lttng_element_success; -+extern const char * const mi_lttng_element_type_enum; -+extern const char * const mi_lttng_element_type_float; -+extern const char * const mi_lttng_element_type_integer; -+extern const char * const mi_lttng_element_type_other; -+extern const char * const mi_lttng_element_type_string; - - /* String related to loglevel */ --const char * const mi_lttng_loglevel_str_alert; --const char * const mi_lttng_loglevel_str_crit; --const char * const mi_lttng_loglevel_str_debug; --const char * const mi_lttng_loglevel_str_debug_function; --const char * const mi_lttng_loglevel_str_debug_line; --const char * const mi_lttng_loglevel_str_debug_module; --const char * const mi_lttng_loglevel_str_debug_process; --const char * const mi_lttng_loglevel_str_debug_program; --const char * const mi_lttng_loglevel_str_debug_system; --const char * const mi_lttng_loglevel_str_debug_unit; --const char * const mi_lttng_loglevel_str_emerg; --const char * const mi_lttng_loglevel_str_err; --const char * const mi_lttng_loglevel_str_info; --const char * const mi_lttng_loglevel_str_notice; --const char * const mi_lttng_loglevel_str_unknown; --const char * const mi_lttng_loglevel_str_warning; -+extern const char * const mi_lttng_loglevel_str_alert; -+extern const char * const mi_lttng_loglevel_str_crit; -+extern const char * const mi_lttng_loglevel_str_debug; -+extern const char * const mi_lttng_loglevel_str_debug_function; -+extern const char * const mi_lttng_loglevel_str_debug_line; -+extern const char * const mi_lttng_loglevel_str_debug_module; -+extern const char * const mi_lttng_loglevel_str_debug_process; -+extern const char * const mi_lttng_loglevel_str_debug_program; -+extern const char * const mi_lttng_loglevel_str_debug_system; -+extern const char * const mi_lttng_loglevel_str_debug_unit; -+extern const char * const mi_lttng_loglevel_str_emerg; -+extern const char * const mi_lttng_loglevel_str_err; -+extern const char * const mi_lttng_loglevel_str_info; -+extern const char * const mi_lttng_loglevel_str_notice; -+extern const char * const mi_lttng_loglevel_str_unknown; -+extern const char * const mi_lttng_loglevel_str_warning; - - /* String related to loglevel JUL */ --const char * const mi_lttng_loglevel_str_jul_all; --const char * const mi_lttng_loglevel_str_jul_config; --const char * const mi_lttng_loglevel_str_jul_fine; --const char * const mi_lttng_loglevel_str_jul_finer; --const char * const mi_lttng_loglevel_str_jul_finest; --const char * const mi_lttng_loglevel_str_jul_info; --const char * const mi_lttng_loglevel_str_jul_off; --const char * const mi_lttng_loglevel_str_jul_severe; --const char * const mi_lttng_loglevel_str_jul_warning; -+extern const char * const mi_lttng_loglevel_str_jul_all; -+extern const char * const mi_lttng_loglevel_str_jul_config; -+extern const char * const mi_lttng_loglevel_str_jul_fine; -+extern const char * const mi_lttng_loglevel_str_jul_finer; -+extern const char * const mi_lttng_loglevel_str_jul_finest; -+extern const char * const mi_lttng_loglevel_str_jul_info; -+extern const char * const mi_lttng_loglevel_str_jul_off; -+extern const char * const mi_lttng_loglevel_str_jul_severe; -+extern const char * const mi_lttng_loglevel_str_jul_warning; - - /* String related to loglevel Log4j */ --const char * const mi_lttng_loglevel_str_log4j_off; --const char * const mi_lttng_loglevel_str_log4j_fatal; --const char * const mi_lttng_loglevel_str_log4j_error; --const char * const mi_lttng_loglevel_str_log4j_warn; --const char * const mi_lttng_loglevel_str_log4j_info; --const char * const mi_lttng_loglevel_str_log4j_debug; --const char * const mi_lttng_loglevel_str_log4j_trace; --const char * const mi_lttng_loglevel_str_log4j_all; -+extern const char * const mi_lttng_loglevel_str_log4j_off; -+extern const char * const mi_lttng_loglevel_str_log4j_fatal; -+extern const char * const mi_lttng_loglevel_str_log4j_error; -+extern const char * const mi_lttng_loglevel_str_log4j_warn; -+extern const char * const mi_lttng_loglevel_str_log4j_info; -+extern const char * const mi_lttng_loglevel_str_log4j_debug; -+extern const char * const mi_lttng_loglevel_str_log4j_trace; -+extern const char * const mi_lttng_loglevel_str_log4j_all; - - /* String related to loglevel type */ --const char * const mi_lttng_loglevel_type_all; --const char * const mi_lttng_loglevel_type_range; --const char * const mi_lttng_loglevel_type_single; --const char * const mi_lttng_loglevel_type_unknown; -+extern const char * const mi_lttng_loglevel_type_all; -+extern const char * const mi_lttng_loglevel_type_range; -+extern const char * const mi_lttng_loglevel_type_single; -+extern const char * const mi_lttng_loglevel_type_unknown; - - /* Sting related to lttng_calibrate */ --const char * const mi_lttng_element_calibrate; --const char * const mi_lttng_element_calibrate_function; -+extern const char * const mi_lttng_element_calibrate; -+extern const char * const mi_lttng_element_calibrate_function; - - /* String related to a lttng_snapshot */ --const char * const mi_lttng_element_snapshot_ctrl_url; --const char * const mi_lttng_element_snapshot_data_url; --const char * const mi_lttng_element_snapshot_max_size; --const char * const mi_lttng_element_snapshot_n_ptr; --const char * const mi_lttng_element_snapshot_session_name; --const char * const mi_lttng_element_snapshots; -+extern const char * const mi_lttng_element_snapshot_ctrl_url; -+extern const char * const mi_lttng_element_snapshot_data_url; -+extern const char * const mi_lttng_element_snapshot_max_size; -+extern const char * const mi_lttng_element_snapshot_n_ptr; -+extern const char * const mi_lttng_element_snapshot_session_name; -+extern const char * const mi_lttng_element_snapshots; - - /* Utility string function */ - const char *mi_lttng_loglevel_string(int value, enum lttng_domain_type domain); ---- a/src/common/config/config-session-abi.h -+++ b/src/common/config/config-session-abi.h -@@ -18,95 +18,95 @@ - #ifndef CONFIG_SESSION_INTERNAL_H - #define CONFIG_SESSION_INTERNAL_H - --const char * const config_element_channel; --const char * const config_element_channels; --const char * const config_element_domain; --const char * const config_element_domains; --const char * const config_element_event; --const char * const config_element_events; --const char * const config_element_context; --const char * const config_element_contexts; --const char * const config_element_attributes; --const char * const config_element_exclusion; --const char * const config_element_exclusions; --const char * const config_element_function_attributes; --const char * const config_element_probe_attributes; --const char * const config_element_symbol_name; --const char * const config_element_address; --const char * const config_element_offset; --const char * const config_element_name; --const char * const config_element_enabled; --const char * const config_element_overwrite_mode; --const char * const config_element_subbuf_size; --const char * const config_element_num_subbuf; --const char * const config_element_switch_timer_interval; --const char * const config_element_read_timer_interval; --const char * const config_element_output; --const char * const config_element_output_type; --const char * const config_element_tracefile_size; --const char * const config_element_tracefile_count; --const char * const config_element_live_timer_interval; --const char * const config_element_type; --const char * const config_element_buffer_type; --const char * const config_element_session; --const char * const config_element_sessions; --const char * const config_element_perf; --const char * const config_element_config; --const char * const config_element_started; --const char * const config_element_snapshot_mode; --const char * const config_element_loglevel; --const char * const config_element_loglevel_type; --const char * const config_element_filter; --const char * const config_element_snapshot_outputs; --const char * const config_element_consumer_output; --const char * const config_element_destination; --const char * const config_element_path; --const char * const config_element_net_output; --const char * const config_element_control_uri; --const char * const config_element_data_uri; --const char * const config_element_max_size; -- --const char * const config_domain_type_kernel; --const char * const config_domain_type_ust; --const char * const config_domain_type_jul; --const char * const config_domain_type_log4j; -- --const char * const config_buffer_type_per_pid; --const char * const config_buffer_type_per_uid; --const char * const config_buffer_type_global; -- --const char * const config_overwrite_mode_discard; --const char * const config_overwrite_mode_overwrite; -- --const char * const config_output_type_splice; --const char * const config_output_type_mmap; -- --const char * const config_loglevel_type_all; --const char * const config_loglevel_type_range; --const char * const config_loglevel_type_single; -- --const char * const config_event_type_all; --const char * const config_event_type_tracepoint; --const char * const config_event_type_probe; --const char * const config_event_type_function; --const char * const config_event_type_function_entry; --const char * const config_event_type_noop; --const char * const config_event_type_syscall; --const char * const config_event_type_kprobe; --const char * const config_event_type_kretprobe; -- --const char * const config_event_context_pid; --const char * const config_event_context_procname; --const char * const config_event_context_prio; --const char * const config_event_context_nice; --const char * const config_event_context_vpid; --const char * const config_event_context_tid; --const char * const config_event_context_vtid; --const char * const config_event_context_ppid; --const char * const config_event_context_vppid; --const char * const config_event_context_pthread_id; --const char * const config_event_context_hostname; --const char * const config_event_context_ip; --const char * const config_event_context_perf_thread_counter; -+extern const char * const config_element_channel; -+extern const char * const config_element_channels; -+extern const char * const config_element_domain; -+extern const char * const config_element_domains; -+extern const char * const config_element_event; -+extern const char * const config_element_events; -+extern const char * const config_element_context; -+extern const char * const config_element_contexts; -+extern const char * const config_element_attributes; -+extern const char * const config_element_exclusion; -+extern const char * const config_element_exclusions; -+extern const char * const config_element_function_attributes; -+extern const char * const config_element_probe_attributes; -+extern const char * const config_element_symbol_name; -+extern const char * const config_element_address; -+extern const char * const config_element_offset; -+extern const char * const config_element_name; -+extern const char * const config_element_enabled; -+extern const char * const config_element_overwrite_mode; -+extern const char * const config_element_subbuf_size; -+extern const char * const config_element_num_subbuf; -+extern const char * const config_element_switch_timer_interval; -+extern const char * const config_element_read_timer_interval; -+extern const char * const config_element_output; -+extern const char * const config_element_output_type; -+extern const char * const config_element_tracefile_size; -+extern const char * const config_element_tracefile_count; -+extern const char * const config_element_live_timer_interval; -+extern const char * const config_element_type; -+extern const char * const config_element_buffer_type; -+extern const char * const config_element_session; -+extern const char * const config_element_sessions; -+extern const char * const config_element_perf; -+extern const char * const config_element_config; -+extern const char * const config_element_started; -+extern const char * const config_element_snapshot_mode; -+extern const char * const config_element_loglevel; -+extern const char * const config_element_loglevel_type; -+extern const char * const config_element_filter; -+extern const char * const config_element_snapshot_outputs; -+extern const char * const config_element_consumer_output; -+extern const char * const config_element_destination; -+extern const char * const config_element_path; -+extern const char * const config_element_net_output; -+extern const char * const config_element_control_uri; -+extern const char * const config_element_data_uri; -+extern const char * const config_element_max_size; -+ -+extern const char * const config_domain_type_kernel; -+extern const char * const config_domain_type_ust; -+extern const char * const config_domain_type_jul; -+extern const char * const config_domain_type_log4j; -+ -+extern const char * const config_buffer_type_per_pid; -+extern const char * const config_buffer_type_per_uid; -+extern const char * const config_buffer_type_global; -+ -+extern const char * const config_overwrite_mode_discard; -+extern const char * const config_overwrite_mode_overwrite; -+ -+extern const char * const config_output_type_splice; -+extern const char * const config_output_type_mmap; -+ -+extern const char * const config_loglevel_type_all; -+extern const char * const config_loglevel_type_range; -+extern const char * const config_loglevel_type_single; -+ -+extern const char * const config_event_type_all; -+extern const char * const config_event_type_tracepoint; -+extern const char * const config_event_type_probe; -+extern const char * const config_event_type_function; -+extern const char * const config_event_type_function_entry; -+extern const char * const config_event_type_noop; -+extern const char * const config_event_type_syscall; -+extern const char * const config_event_type_kprobe; -+extern const char * const config_event_type_kretprobe; -+ -+extern const char * const config_event_context_pid; -+extern const char * const config_event_context_procname; -+extern const char * const config_event_context_prio; -+extern const char * const config_event_context_nice; -+extern const char * const config_event_context_vpid; -+extern const char * const config_event_context_tid; -+extern const char * const config_event_context_vtid; -+extern const char * const config_event_context_ppid; -+extern const char * const config_event_context_vppid; -+extern const char * const config_event_context_pthread_id; -+extern const char * const config_event_context_hostname; -+extern const char * const config_event_context_ip; -+extern const char * const config_event_context_perf_thread_counter; - - #endif /* CONFIG_SESSION_INTERNAL_H */ diff --git a/devel/m4/Makefile b/devel/m4/Makefile deleted file mode 100644 index 19c8c17..0000000 --- a/devel/m4/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=m4 -PKG_VERSION:=1.4.17 -PKG_RELEASE:=2 - -PKG_SOURCE_URL:=@GNU/m4 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MD5SUM:=12a3c829301a4fd6586a57d3fcf196dc -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-3.0+ - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/m4 - SECTION:=devel - CATEGORY:=Development - TITLE:=m4 - URL:=https://www.gnu.org/software/m4/ -endef - -define Package/m4/description - GNU M4 is an implementation of the traditional Unix macro processor. - It is used by GNU Autoconf and Automake. -endef - -define Package/m4/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/m4 $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,m4)) diff --git a/devel/make/Makefile b/devel/make/Makefile deleted file mode 100644 index 2a1ba49..0000000 --- a/devel/make/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=make -PKG_VERSION:=4.2.1 -PKG_RELEASE:=2 - -PKG_SOURCE_URL:=@GNU/make -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_MD5SUM:=15b012617e7c44c0ed482721629577ac -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-3.0+ - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/make - SECTION:=devel - CATEGORY:=Development - TITLE:=make - URL:=https://www.gnu.org/software/make/ -endef - -define Package/make/description - The Make package contains a tool to create executables from source files. -endef - -define Package/make/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/make $(1)/usr/bin/ -endef - -# provide gnumake.h at build time for other packages -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_BUILD_DIR)/gnumake.h $(1)/usr/include/ -endef - -$(eval $(call BuildPackage,make)) diff --git a/devel/patch/Makefile b/devel/patch/Makefile deleted file mode 100644 index d705a30..0000000 --- a/devel/patch/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2008-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=patch -PKG_VERSION:=2.7.5 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNU/patch -PKG_MD5SUM:=e3da7940431633fb65a01b91d3b7a27a -PKG_LICENSE:=GPL-3.0+ -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/patch - SECTION:=devel - CATEGORY:=Development - TITLE:=patch - URL:=http://www.gnu.org/ - MAINTAINER:=Russell Senior -endef - -define Package/patch/description - The Patch package contains a program for modifying or creating files - by applying a "patch" file typically created by the diff program. -endef - -CONFIGURE_ARGS+= --disable-xattr - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - -define Package/patch/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/patch $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,patch)) diff --git a/devel/pkg-config/Makefile b/devel/pkg-config/Makefile deleted file mode 100644 index 7fa0076..0000000 --- a/devel/pkg-config/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pkg-config -PKG_VERSION:=0.29.1 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://pkgconfig.freedesktop.org/releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=f739a28cae4e0ca291f82d1d41ef107d -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_LICENSE:=GPL-2+ - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/pkg-config - SECTION:=devel - CATEGORY:=Development - TITLE:=pkg-config - URL:=http://www.freedesktop.org/wiki/Software/pkg-config/ - DEPENDS:=+glib2 $(INTL_DEPENDS) -endef - -define Package/pkg-config/description - pkg-config is a helper tool used when compiling applications and libraries. - It helps you insert the correct compiler options on the command line so an - application can use gcc -o test test.cpkg-config --libs --cflags glib-2.0 - for instance, rather than hard-coding values on where to find glib (or - other libraries). -endef - -define Package/pkg-config/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pkg-config $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/aclocal/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/pkg.m4 \ - $(1)/usr/share/aclocal/ -endef - -$(eval $(call BuildPackage,pkg-config)) diff --git a/ipv6/aiccu/Makefile b/ipv6/aiccu/Makefile deleted file mode 100644 index 4b81e10..0000000 --- a/ipv6/aiccu/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=aiccu -PKG_VERSION:=20070115 -PKG_RELEASE:=16 - -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.sixxs.net/archive/sixxs/aiccu/unix -PKG_MD5SUM:=c9bcc83644ed788e22a7c3f3d4021350 -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=doc/LICENSE - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk - -define Package/aiccu/Default - TITLE:=SixXS IPv6 Connectivity Client ($(1)) - SECTION:=net - CATEGORY:=Network - VARIANT:=$(2) - DEPENDS:=+libpthread +ip +kmod-sit +kmod-tun $(3) - URL:=http://www.sixxs.net/tools/aiccu/ - MAINTAINER:=Ondrej Caletka -endef - -Package/aiccu=$(call Package/aiccu/Default,without GNUTLS support,default) -Package/aiccu-gnutls=$(call Package/aiccu/Default,with GNUTLS support,gnutls,+libgnutls) - -define Build/Configure - $(SED) "s,strip,/bin/true," $(PKG_BUILD_DIR)/unix-console/Makefile -endef - -ifeq ($(BUILD_VARIANT),gnutls) -CONFIG_AICCU_GNUTLS:=y -endif - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" OS_NAME="Linux" OS_VERSION="$(LINUX_VERSION)" \ - EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ - EXTRA_LDFLAGS="$(TARGET_LDFLAGS) -pthread" \ - $(if $(CONFIG_AICCU_GNUTLS),HAVE_GNUTLS=1) \ - DEBUG=0 -endef - -define Package/aiccu/conffiles -/etc/config/aiccu -endef - -Package/aiccu-gnutls/conffiles=$(call Package/aiccu/conffiles) - -define Package/aiccu/install - $(INSTALL_DIR) $(1)/usr/sbin $(1)/lib/netifd/proto $(1)/etc/hotplug.d/ntp - $(INSTALL_BIN) $(PKG_BUILD_DIR)/unix-console/$(PKG_NAME) $(1)/usr/sbin/ - $(INSTALL_BIN) ./files/aiccu.sh $(1)/lib/netifd/proto/aiccu.sh - $(INSTALL_DATA) ./files/aiccu.hotplug $(1)/etc/hotplug.d/ntp/10-aiccu -endef - -Package/aiccu-gnutls/install=$(call Package/aiccu/install,$(1)) - -$(eval $(call BuildPackage,aiccu)) -$(eval $(call BuildPackage,aiccu-gnutls)) diff --git a/ipv6/aiccu/files/aiccu.hotplug b/ipv6/aiccu/files/aiccu.hotplug deleted file mode 100644 index b521371..0000000 --- a/ipv6/aiccu/files/aiccu.hotplug +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -NTPSTRATUMFILE="/var/run/aiccu_ntp_stratum" -echo $stratum > "$NTPSTRATUMFILE" diff --git a/ipv6/aiccu/files/aiccu.sh b/ipv6/aiccu/files/aiccu.sh deleted file mode 100755 index 584574b..0000000 --- a/ipv6/aiccu/files/aiccu.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh -# aiccu.sh - AICCU proto -# Copyright (c) 2014 OpenWrt.org - -[ -n "$INCLUDE_ONLY" ] || { - . /lib/functions.sh - . /lib/functions/network.sh - . ../netifd-proto.sh - init_proto "$@" -} - -proto_aiccu_setup() { - local cfg="$1" - local iface="$2" - local link="aiccu-$cfg" - - local username password protocol server ip6prefix tunnelid requiretls defaultroute nat heartbeat verbose sourcerouting ip6addr ntpsynctimeout - json_get_vars username password protocol server ip6prefix tunnelid requiretls defaultroute nat heartbeat verbose sourcerouting ip6addr ntpsynctimeout - - [ -z "$username" -o -z "$password" ] && { - proto_notify_error "$cfg" "MISSING_USERNAME_OR_PASSWORD" - proto_block_restart "$cfg" - return - } - - ( proto_add_host_dependency "$cfg" 0.0.0.0 ) - - CFGFILE="/var/etc/${link}.conf" - PIDFILE="/var/run/${link}.pid" - NTPSTRATUMFILE="/var/run/aiccu_ntp_stratum" - mkdir -p /var/run /var/etc - - echo "username $username" > "$CFGFILE" - echo "password $password" >> "$CFGFILE" - echo "ipv6_interface $link" >> "$CFGFILE" - [ -n "$server" ] && echo "server $server" >> "$CFGFILE" - [ -n "$protocol" ] && echo "protocol $protocol" >> "$CFGFILE" - [ -n "$tunnelid" ] && echo "tunnel_id $tunnelid" >> "$CFGFILE" - [ "$requiretls" == 1 ] && echo "requiretls true" >> "$CFGFILE" - [ "$nat" == 1 ] && echo "behindnat true" >> "$CFGFILE" - [ "$heartbeat" == 1 ] && echo "makebeats true" >> "$CFGFILE" - [ "$verbose" == 1 ] && echo "verbose true" >> "$CFGFILE" - echo "defaultroute false" >> "$CFGFILE" - echo "daemonize true" >> "$CFGFILE" - echo "pidfile $PIDFILE" >> "$CFGFILE" - - # By default, wait at most 90 seconds for NTP sync - [ -z "$ntpsynctimeout" ] && ntpsynctimeout=90 - for i in $(seq 1 $ntpsynctimeout); do - [ -f "$NTPSTRATUMFILE" ] && \ - [ "$(cat $NTPSTRATUMFILE)" -lt 16 ] && \ - echo "NTP synced, stratum $(cat $NTPSTRATUMFILE)" && break - [ "$(( $i % 10 ))" -eq 0 ] && echo "Waiting ${i} secs for NTP sync..." - sleep 1 - done - - aiccu start "$CFGFILE" - - [ "$?" -ne 0 ] && { - proto_notify_error "$cfg" "AICCU_FAILED_SEE_LOG" - proto_block_restart "$cfg" - return - } - - proto_init_update "$link" 1 - - local source="" - [ "$sourcerouting" != "0" ] && source="::/128" - [ "$defaultroute" != "0" ] && proto_add_ipv6_route "::" 0 "" "" "" "$source" - - [ -n "$ip6addr" ] && { - local local6="${ip6addr%%/*}" - local mask6="${ip6addr##*/}" - [[ "$local6" = "$mask6" ]] && mask6= - proto_add_ipv6_address "$local6" "$mask6" - [ "$defaultroute" != "0" -a "$sourcerouting" != "0" ] && proto_add_ipv6_route "::" 0 "" "" "" "$local6/$mask6" - } - - [ -n "$ip6prefix" ] && { - proto_add_ipv6_prefix "$ip6prefix" - [ "$defaultroute" != "0" -a "$sourcerouting" != "0" ] && proto_add_ipv6_route "::" 0 "" "" "" "$ip6prefix" - } - - proto_send_update "$cfg" - -} - -proto_aiccu_teardown() { - local cfg="$1" - local link="aiccu-$cfg" - CFGFILE="/var/etc/${link}.conf" - PIDFILE="/var/run/${link}.pid" - [ -f "$CFGFILE" -a -f "$PIDFILE" ] && { - local pid="$(cat "$PIDFILE")" - [ -d /proc/$pid -a $(cat /proc/$pid/comm) = "aiccu" ] && \ - aiccu stop "$CFGFILE" - } -} - -proto_aiccu_init_config() { - no_device=1 - available=1 - proto_config_add_string "username" - proto_config_add_string "password" - proto_config_add_string "protocol" - proto_config_add_string "server" - proto_config_add_string "ip6addr:ip6addr" - proto_config_add_string "ip6prefix:ip6addr" - proto_config_add_string "tunnelid" - proto_config_add_boolean "requiretls" - proto_config_add_boolean "defaultroute" - proto_config_add_boolean "sourcerouting" - proto_config_add_boolean "nat" - proto_config_add_boolean "heartbeat" - proto_config_add_boolean "verbose" - proto_config_add_int "ntpsynctimeout" -} - -[ -n "$INCLUDE_ONLY" ] || { - add_protocol aiccu -} diff --git a/ipv6/aiccu/patches/100-cross_compile.patch b/ipv6/aiccu/patches/100-cross_compile.patch deleted file mode 100644 index 6ef8ad5..0000000 --- a/ipv6/aiccu/patches/100-cross_compile.patch +++ /dev/null @@ -1,101 +0,0 @@ ---- a/unix-console/Makefile -+++ b/unix-console/Makefile -@@ -25,7 +25,8 @@ CWARNS += -W -Wall -Wshadow -Wpointer-ar - # CWARNS += -Wpacked - - #CFLAGS += $(CWARNS) -D_GNU_SOURCE -D_DEBUG -g3 -O0 --CFLAGS += $(CWARNS) -D_GNU_SOURCE -+CFLAGS += $(CWARNS) $(EXTRA_CFLAGS) -D_GNU_SOURCE -+LDFLAGS += $(EXTRA_LDFLAGS) - CC = @gcc - RM = rm - -@@ -40,25 +41,25 @@ CFLAGS += -D AICCU_CONSOLE - # GnuTLS Support ? - # Used by TIC to secure that communication - # Currently defaultly builds only on Linux, but other platforms might easily also support it --ifeq ($(shell uname | grep -c "Linux"),1) -+ifneq ($(HAVE_GNUTLS),) - CFLAGS += -D AICCU_GNUTLS - LDFLAGS += -lgnutls - endif - - # Linux --ifeq ($(shell uname | grep -c "Linux"),1) -+ifeq ($(OS_NAME),Linux) - CFLAGS += -D_LINUX -D HAS_IFHEAD -D AICCU_TYPE="\"linux\"" - SRCS += ../common/aiccu_linux.c - OBJS += ../common/aiccu_linux.o --LDFLAGS += -lpthread -lresolv -+LDFLAGS += -pthread -lresolv - endif - - # FreeBSD --ifeq ($(shell uname | grep -c "FreeBSD"),1) -+ifeq ($(OS_NAME),FreeBSD) - CFLAGS += -D_FREEBSD - - # FreeBSD 4.x --ifeq ($(shell uname -r | cut -c 1),4) -+ifeq ($(shell echo $(OS_VERSION) | cut -c 1),4) - CFLAGS += -D AICCU_TYPE="\"freebsd4\"" - SRCS += ../common/aiccu_freebsd4.c - OBJS += ../common/aiccu_freebsd4.o -@@ -71,7 +72,7 @@ endif - endif - - # DragonFlyBSD --ifeq ($(shell uname | grep -c "DragonFly"),1) -+ifeq ($(OS_NAME),DragonFly) - CFLAGS += -D_DFBSD -D NEED_IFHEAD -D AICCU_TYPE="\"dragonfly\"" - SRCS += ../common/aiccu_freebsd4.c - OBJS += ../common/aiccu_freebsd4.o -@@ -79,7 +80,7 @@ CFLAGS += -pthread - endif - - # NetBSD --ifeq ($(shell uname | grep -c "NetBSD"),1) -+ifeq ($(OS_NAME),NetBSD) - CFLAGS += -D_NETBSD -D AICCU_TYPE="\"kame\"" - - # Check if net/if_tun.h has TUNSIFHEAD and enable support for it -@@ -97,10 +98,10 @@ CFLAGS += -pthread -D_NETBSD_SOURCE - endif - - # OpenBSD --ifeq ($(shell uname | grep -c "OpenBSD"),1) -+ifeq ($(OS_NAME),OpenBSD) - CFLAGS += -D_OPENBSD -D HAS_IFHEAD - # 2.7-2.9 --ifeq ($(shell uname -r | cut -c 1),2) -+ifeq ($(shell echo $(OS_VERSION) | cut -c 1),2) - CFLAGS += -D AICCU_TYPE="\"openbsd2\"" - SRCS += ../common/aiccu_openbsd2.c - OBJS += ../common/aiccu_openbsd2.o -@@ -114,7 +115,7 @@ CFLAGS += -pthread - endif - - # Darwin --ifeq ($(shell uname | grep -c "Darwin"),1) -+ifeq ($(OS_NAME),Darwin) - CFLAGS += -D_DARWIN -D NEED_IFHEAD -D AICCU_TYPE="\"darwin\"" - SRCS += ../common/aiccu_darwin.c - OBJS += ../common/aiccu_darwin.o -@@ -122,7 +123,7 @@ LDFLAGS += -lresolv - endif - - # SunOS / Solaris --ifeq ($(shell uname | grep -c "SunOS"),1) -+ifeq ($(OS_NAME),SunOS) - CFLAGS += -D_SUNOS -D AICCU_TYPE="\"sunos\"" - SRCS += ../common/aiccu_sunos.c - OBJS += ../common/aiccu_sunos.o -@@ -130,7 +131,7 @@ LDFLAGS += -lsocket -lnsl -lresolv - endif - - # AIX --ifeq ($(shell uname | grep -c "AIX"),1) -+ifeq ($(OS_NAME),AIX) - CC = @/usr/vac/bin/xlc_r - CFLAGS = -qthreaded -q64 -qlanglvl=stdc99 -bmaxdata:0xD0000000 -D_64BIT -g -qdbxextra -qfullpath -qheapdebug -qformat=all -qcheck=all - CFLAGS += -D AICCU_CONSOLE diff --git a/ipv6/aiccu/patches/200-add_dn_skipname.patch b/ipv6/aiccu/patches/200-add_dn_skipname.patch deleted file mode 100644 index 3ce1e92..0000000 --- a/ipv6/aiccu/patches/200-add_dn_skipname.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- /dev/null -+++ b/common/dn_skipname.c -@@ -0,0 +1,51 @@ -+#include -+#include -+ -+/* Ripped from glibc 2.4 sources. */ -+ -+/* -+ * ns_name_skip(ptrptr, eom) -+ * Advance *ptrptr to skip over the compressed name it points at. -+ * return: -+ * 0 on success, -1 (with errno set) on failure. -+ */ -+int ns_name_skip(const u_char **ptrptr, const u_char *eom) -+{ -+ const u_char *cp; -+ u_int n; -+ -+ cp = *ptrptr; -+ while (cp < eom && (n = *cp++) != 0) -+ { -+ /* Check for indirection. */ -+ switch (n & NS_CMPRSFLGS) { -+ case 0: /* normal case, n == len */ -+ cp += n; -+ continue; -+ case NS_CMPRSFLGS: /* indirection */ -+ cp++; -+ break; -+ default: /* illegal type */ -+ errno = EMSGSIZE; -+ return (-1); -+ } -+ break; -+ } -+ if (cp > eom) -+ { -+ errno = EMSGSIZE; -+ return (-1); -+ } -+ *ptrptr = cp; -+ return (0); -+} -+ -+int dn_skipname(const u_char *ptr, const u_char *eom) -+{ -+ const u_char *saveptr = ptr; -+ -+ if(ns_name_skip(&ptr, eom) == -1) -+ return (-1); -+ return (ptr - saveptr); -+} -+ ---- a/unix-console/Makefile -+++ b/unix-console/Makefile -@@ -10,9 +10,9 @@ - # $Date: 2007-01-15 11:04:27 $ - # **********************************************************/ - --SRCS = main.c ../common/tun.c ../common/aiccu.c ../common/hash_md5.c ../common/hash_sha1.c ../common/common.c ../common/heartbeat.c ../common/tic.c ../common/ayiya.c ../common/aiccu_test.c ../common/resolver.c -+SRCS = main.c ../common/tun.c ../common/aiccu.c ../common/hash_md5.c ../common/hash_sha1.c ../common/common.c ../common/heartbeat.c ../common/tic.c ../common/ayiya.c ../common/aiccu_test.c ../common/resolver.c ../common/dn_skipname.c - INCS = ../common/tun.h ../common/aiccu.h ../common/hash_md5.h ../common/hash_sha1.h ../common/common.h ../common/heartbeat.h ../common/tic.h ../common/ayiya.h ../common/resolver.h --OBJS = main.o ../common/tun.o ../common/aiccu.o ../common/hash_md5.o ../common/hash_sha1.o ../common/common.o ../common/heartbeat.o ../common/tic.o ../common/ayiya.o ../common/aiccu_test.o ../common/resolver.o -+OBJS = main.o ../common/tun.o ../common/aiccu.o ../common/hash_md5.o ../common/hash_sha1.o ../common/common.o ../common/heartbeat.o ../common/tic.o ../common/ayiya.o ../common/aiccu_test.o ../common/resolver.o ../common/dn_skipname.o - - # New features not fully implemented and thus disabled for now - #CFLAGS += -D NEWSTUFF_TSP -D NEWSTUFF_TEEPEE diff --git a/ipv6/aiccu/patches/300-resolver-uclibc.patch b/ipv6/aiccu/patches/300-resolver-uclibc.patch deleted file mode 100644 index b88ef5c..0000000 --- a/ipv6/aiccu/patches/300-resolver-uclibc.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/common/resolver.c -+++ b/common/resolver.c -@@ -26,7 +26,7 @@ - - int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record)) - { --#ifdef _LINUX -+#if defined(_LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__) - struct __res_state res; - #endif - unsigned char answer[8192]; -@@ -38,7 +38,7 @@ int getrrs(const char *label, int rrtype - uint16_t type = 0, class = 0; - uint32_t ttl = 0; - --#ifdef _LINUX -+#if defined(_LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__) - memset(&res, 0, sizeof(res)); - res.options = RES_DEBUG; - res_ninit(&res); -@@ -47,7 +47,7 @@ int getrrs(const char *label, int rrtype - #endif - - memset(answer, 0, sizeof(answer)); --#ifdef _LINUX -+#if defined(_LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__) - ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer)); - #else - ret = res_query(label, C_IN, rrtype, answer, sizeof(answer)); diff --git a/ipv6/aiccu/patches/400-musl-compat.patch b/ipv6/aiccu/patches/400-musl-compat.patch deleted file mode 100644 index b6e0c32..0000000 --- a/ipv6/aiccu/patches/400-musl-compat.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/common/common.h -+++ b/common/common.h -@@ -50,6 +50,7 @@ - #include - #include - #include -+#include - #include - - #if defined(_SUNOS) || defined(_AIX) || defined(_DARWIN) -@@ -91,7 +92,9 @@ - #include - - #include -+#if defined(__GLIBC__) || defined(__UCLIBC__) - #include -+#endif - #ifdef linux - #include - #include ---- a/common/dn_skipname.c -+++ b/common/dn_skipname.c -@@ -1,6 +1,8 @@ - #include - #include - -+#include -+ - /* Ripped from glibc 2.4 sources. */ - - /* diff --git a/ipv6/aiccu/patches/500-gnutls_3.4.patch b/ipv6/aiccu/patches/500-gnutls_3.4.patch deleted file mode 100644 index a314784..0000000 --- a/ipv6/aiccu/patches/500-gnutls_3.4.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- aiccu/common/common.c -+++ aiccu/common/common.c -@@ -271,8 +271,6 @@ - TLSSOCKET sock_alloc(void) - { - #ifdef AICCU_GNUTLS -- /* Allow connections to servers that have OpenPGP keys as well */ -- const int cert_type_priority[3] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; - int ret; - #endif /* AICCU_GNUTLS*/ - -@@ -300,7 +298,8 @@ - gnutls_set_default_priority(sock->session); - /* XXX: Return value is not documented in GNUTLS documentation! */ - -- gnutls_certificate_type_set_priority(sock->session, cert_type_priority); -+ /* Allow connections to servers that have OpenPGP keys as well */ -+ gnutls_priority_set_direct(sock->session, "NORMAL:+CTYPE-OPENPGP", NULL); - /* XXX: Return value is not documented in GNUTLS documentation! */ - - /* Configure the x509 credentials for the current session */ - diff --git a/ipv6/tayga/Makefile b/ipv6/tayga/Makefile deleted file mode 100644 index d68a271..0000000 --- a/ipv6/tayga/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tayga -PKG_VERSION:=0.9.2 -PKG_RELEASE:=2 - -PKG_SOURCE:=tayga-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.litech.org/tayga/ -PKG_MD5SUM:=7a7b24165ce008df772f398d86fa280e -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/tayga - SECTION:=net - CATEGORY:=Network - DEPENDS:=+ip @IPV6 +kmod-tun - TITLE:=Out-of-kernel stateless NAT64 implementation for Linux - URL:=http://www.litech.org/tayga/ - MAINTAINER:=Ondrej Caletka -endef - -define Package/tayga/description - TAYGA is an out-of-kernel stateless NAT64 implementation for - Linux. It uses the TUN driver to exchange packets with the - kernel, which is the same driver used by OpenVPN and QEMU/KVM. -endef - -ifdef CONFIG_PACKAGE_netifd - define Package/tayga/install - $(INSTALL_DIR) $(1)/usr/sbin $(1)/lib/netifd/proto - $(INSTALL_BIN) $(PKG_BUILD_DIR)/tayga $(1)/usr/sbin/ - $(INSTALL_BIN) ./files/tayga-proto.sh $(1)/lib/netifd/proto/tayga.sh - endef -else - define Package/tayga/install - $(INSTALL_DIR) $(1)/usr/sbin $(1)/lib/network $(1)/etc/hotplug.d/iface - $(INSTALL_BIN) $(PKG_BUILD_DIR)/tayga $(1)/usr/sbin/ - $(INSTALL_DATA) ./files/tayga.sh $(1)/lib/network/tayga.sh - $(INSTALL_DATA) ./files/tayga.hotplug $(1)/etc/hotplug.d/iface/95-tayga - endef -endif - -$(eval $(call BuildPackage,tayga)) diff --git a/ipv6/tayga/files/tayga-proto.sh b/ipv6/tayga/files/tayga-proto.sh deleted file mode 100755 index b92c2a6..0000000 --- a/ipv6/tayga/files/tayga-proto.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -# tayga.sh - TAYGA proto -# Copyright (c) 2014 OpenWrt.org - -[ -n "$INCLUDE_ONLY" ] || { - . /lib/functions.sh - . /lib/functions/network.sh - . ../netifd-proto.sh - init_proto "$@" -} - -proto_tayga_setup() { - local cfg="$1" - local iface="$2" - local link="tayga-$cfg" - - local ipv4_addr ipv6_addr prefix dynamic_pool ipaddr ip6addr noroutes - json_get_vars ipv4_addr ipv6_addr prefix dynamic_pool ipaddr ip6addr noroutes - [ -z "$ipv4_addr" -o -z "$prefix" ] && { - proto_notify_error "$cfg" "REQUIRED_PARAMETERS_MISSING" - proto_block_restart "$cfg" - return - } - - local tmpconf="/var/etc/tayga-$cfg.conf" - mkdir -p /var/etc - mkdir -p /var/run/tayga/$cfg - - echo "tun-device $link" >$tmpconf - echo "ipv4-addr $ipv4_addr" >>$tmpconf - [ -n "$ipv6_addr" ] && - echo "ipv6-addr $ipv6_addr" >>$tmpconf - [ -n "$prefix" ] && - echo "prefix $prefix" >>$tmpconf - [ -n "$dynamic_pool" ] && - echo "dynamic-pool $dynamic_pool" >>$tmpconf - echo "data-dir /var/run/tayga/$cfg" >>$tmpconf - #TODO: Support static mapping of IPv4 <-> IPv6 - - # here we create TUN device and check configuration - tayga -c $tmpconf --mktun - [ "$?" -ne 0 ] && { - proto_notify_error "$cfg" "TAYGA_FAILED" - proto_block_restart "$cfg" - return - } - - proto_init_update "$link" 1 - - [ -n "$ipaddr" ] && proto_add_ipv4_address "$ipaddr" "255.255.255.255" - [ -n "$ip6addr" ] && proto_add_ipv6_address "$ip6addr" "128" - - [ "$noroutes" != 1 ] && { - [ -n "$ipv6_addr" ] && proto_add_ipv6_route "$ipv6_addr" "128" - [ -n "$dynamic_pool" ] && { - local pool="${dynamic_pool%%/*}" - local mask="${dynamic_pool##*/}" - proto_add_ipv4_route "$pool" "$mask" - } - [ -n "$prefix" ] && { - local prefix6="${prefix%%/*}" - local mask6="${prefix##*/}" - proto_add_ipv6_route "$prefix6" "$mask6" - } - } - - proto_send_update "$cfg" - - proto_run_command "$cfg" tayga -n -c $tmpconf \ - -p /var/run/$link.pid - -} - -proto_tayga_teardown() { - local cfg="$1" - local tmpconf="/var/etc/tayga-$cfg.conf" - proto_kill_command "$cfg" - sleep 1 - tayga -c $tmpconf --rmtun -} - -proto_tayga_init_config() { - no_device=1 - available=1 - proto_config_add_string "ipv4_addr" - proto_config_add_string "ipv6_addr" - proto_config_add_string "prefix" - proto_config_add_string "dynamic_pool" - proto_config_add_string "ipaddr" - proto_config_add_string "ip6addr:ip6addr" - proto_config_add_boolean "noroutes" -} - -[ -n "$INCLUDE_ONLY" ] || { - add_protocol tayga -} diff --git a/ipv6/tayga/files/tayga.hotplug b/ipv6/tayga/files/tayga.hotplug deleted file mode 100644 index fb989bd..0000000 --- a/ipv6/tayga/files/tayga.hotplug +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -if [ "$ACTION" = ifup ]; then - . /lib/functions.sh - - include /lib/network - scan_interfaces - - update_tunnel() { - local cfg="$1" - - local proto - config_get proto "$cfg" proto - [ "$proto" = tayga ] || return 0 - - local wandev4 - config_get wandev4 "$cfg" wan4_device "$(find_tayga_wanif4)" - - local wandev6 - config_get wandev6 "$cfg" wan6_device "$(find_tayga_wanif6)" - - [ "$wandev4" = "$DEVICE" ] || [ "$wandev6" = "$DEVICE" ] || return 0 - - local wanip4=$(find_tayga_wanip4 "$wandev4") - local wanip6=$(find_tayga_wanip6 "$wandev6") - - [ -n "$wanip4" ] && [ -n "$wanip6" ] && { - uci_set_state network "$cfg" ipv4addr "$wanip4" - uci_set_state network "$cfg" ipv6addr "$wanip6" - - logger -t tayga-update "Re-establishing tayga NAT64 due to change on $INTERFACE ($DEVICE)" - ifup "$cfg" & - } - } - - config_foreach update_tunnel interface -fi diff --git a/ipv6/tayga/files/tayga.sh b/ipv6/tayga/files/tayga.sh deleted file mode 100644 index a9edb6d..0000000 --- a/ipv6/tayga/files/tayga.sh +++ /dev/null @@ -1,152 +0,0 @@ -# tayga.sh - NAT64 backend - -find_tayga_wanif4() { - local if=$(ip -4 r l e 0.0.0.0/0); if="${if#default* dev }"; if="${if%% *}" - [ -n "$if" ] && grep -qs "^ *$if:" /proc/net/dev && echo "$if" -} - -find_tayga_wanip4() { - local ip=$(ip -4 a s dev "$1"); ip="${ip#*inet }" - echo "${ip%%[^0-9.]*}" -} - -find_tayga_wanif6() { - local if=$(ip -6 r l e ::/0); if="${if#default* dev }"; if="${if%% *}" - [ -n "$if" ] && grep -qs "^ *$if:" /proc/net/dev && echo "$if" -} - -find_tayga_wanip6() { - local ip=$(ip -6 a s dev "$1"); ip="${ip#*inet6 }" - echo "${ip%%[^0-9A-Fa-f:]*}" -} - -# Hook into scan_interfaces() to synthesize a .device option -# This is needed for /sbin/ifup to properly dispatch control -# to setup_interface_tayga() even if no .ifname is set in -# the configuration. -scan_tayga() { - config_set "$1" device "tayga-$1" -} - -coldplug_interface_tayga() { - setup_interface_tayga "tayga-$1" "$1" -} - -tayga_add_static_mappings() { - local tmpconf="$1" - - ( - . /lib/functions.sh - config_load firewall - - tayga_map_rule_add() { - local cfg="$1" - local tmpconf="$2" - local ipv4_addr ipv6_addr - config_get ipv4_addr "$cfg" ipv4_addr "" - config_get ipv6_addr "$cfg" ipv6_addr "" - [ -n "$ipv4_addr" ] && [ -n "$ipv6_addr" ] && - echo "map $ipv4_addr $ipv6_addr" >>$tmpconf - } - - config_foreach tayga_map_rule_add nat64 "$tmpconf" - ) -} - -setup_interface_tayga() { - local iface="$1" - local cfg="$2" - local link="tayga-$cfg" - - local ipv4_addr ipv6_addr prefix dynamic_pool - - config_get ipv4_addr "$cfg" ipv4_addr - config_get ipv6_addr "$cfg" ipv6_addr - config_get prefix "$cfg" prefix - config_get dynamic_pool "$cfg" dynamic_pool - - local args - - include /lib/network - scan_interfaces - - local wanip4=$(uci_get network "$cfg" ipv4addr) - local wanip6=$(uci_get network "$cfg" ipv6addr) - - local wanif4=$(find_tayga_wanif4) - local wanif6=$(find_tayga_wanif6) - - [ -z "$wanip4" ] && { - [ -n "$wanif4" ] && { - wanip4=$(find_tayga_wanip4 "$wanif4") - uci_set_state network "$cfg" wan4_device "$wanif4" - } - } - - [ -z "$wanip6" ] && { - [ -n "$wanif6" ] && { - wanip6=$(find_tayga_wanip6 "$wanif6") - uci_set_state network "$cfg" wan6_device "$wanif6" - } - } - - [ -n "$wanip4" ] && [ -n "$wanip6" ] || { - echo "Cannot determine local IPv4 and IPv6 addressed for tayga NAT64 $cfg - skipping" - return 1 - } - - local tmpconf="/var/etc/tayga-$cfg.conf" - args="-c $tmpconf" - mkdir -p /var/etc - mkdir -p /var/run/tayga/$cfg - - echo "tun-device $link" >$tmpconf - echo "ipv4-addr $ipv4_addr" >>$tmpconf - [ -n "$ipv6_addr" ] && - echo "ipv6-addr $ipv6_addr" >>$tmpconf - [ -n "$prefix" ] && - echo "prefix $prefix" >>$tmpconf - - tayga_add_static_mappings "$tmpconf" - - [ -n "$dynamic_pool" ] && - echo "dynamic-pool $dynamic_pool" >>$tmpconf - echo "data-dir /var/run/tayga/$cfg" >>$tmpconf - - # creating the tunnel below will trigger a net subsystem event - # prevent it from touching or iface by disabling .auto here - uci_set_state network "$cfg" ifname $link - uci_set_state network "$cfg" auto 0 - - # here we create TUN device and check configuration - tayga $args --mktun || return 1 - - ip link set "$link" up - - ip addr add "$wanip4" dev "$link" - ip addr add "$wanip6" dev "$link" - - [ -n "$dynamic_pool" ] && - ip -4 route add "$dynamic_pool" dev "$link" - [ -n "$prefix" ] && - ip -6 route add "$prefix" dev "$link" - - start-stop-daemon -S -x tayga -- $args -p /var/run/$link.pid - - env -i ACTION="ifup" DEVICE="$link" INTERFACE="$cfg" PROTO="tayga" \ - /sbin/hotplug-call iface -} - -stop_interface_tayga() { - local cfg="$1" - local link="tayga-$cfg" - - env -i ACTION="ifdown" DEVICE="$link" INTERFACE="$cfg" PROTO="tayga" \ - /sbin/hotplug-call iface - - service_kill tayga "/var/run/$link.pid" - - ip link set "$link" down - ip addr flush dev "$link" - ip route flush dev "$link" -} diff --git a/ipv6/tayga/patches/001-configure_unset_CFLAGS.patch b/ipv6/tayga/patches/001-configure_unset_CFLAGS.patch deleted file mode 100644 index c56b5f2..0000000 --- a/ipv6/tayga/patches/001-configure_unset_CFLAGS.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -5,8 +5,6 @@ AC_CONFIG_HEADERS(config.h) - - AC_PROG_CC - --CFLAGS='-g -Wall' -- - tayga_conf_path=${sysconfdir}/tayga.conf - - AC_SUBST(tayga_conf_path) diff --git a/ipv6/tayga/patches/002-bigendian_wrong_checksum.patch b/ipv6/tayga/patches/002-bigendian_wrong_checksum.patch deleted file mode 100644 index d8deac3..0000000 --- a/ipv6/tayga/patches/002-bigendian_wrong_checksum.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- a/nat64.c -+++ b/nat64.c -@@ -19,6 +19,11 @@ - - extern struct config *gcfg; - -+static uint16_t checksum_extend_byte(uint8_t b) -+{ -+ return htons(b << 8); -+} -+ - static uint16_t ip_checksum(void *d, int c) - { - uint32_t sum = 0xffff; -@@ -30,7 +35,7 @@ static uint16_t ip_checksum(void *d, int - } - - if (c) -- sum += htons(*((uint8_t *)p) << 8); -+ sum += checksum_extend_byte(*((uint8_t *)p)); - - while (sum > 0xffff) - sum = (sum & 0xffff) + (sum >> 16); -@@ -180,10 +185,12 @@ static int xlate_payload_4to6(struct pkt - cksum = ones_add(p->icmp->cksum, cksum); - if (p->icmp->type == 8) { - p->icmp->type = 128; -- p->icmp->cksum = ones_add(cksum, ~(128 - 8)); -+ p->icmp->cksum = ones_add(cksum, -+ ~checksum_extend_byte(128 - 8)); - } else { - p->icmp->type = 129; -- p->icmp->cksum = ones_add(cksum, ~(129 - 0)); -+ p->icmp->cksum = ones_add(cksum, -+ ~checksum_extend_byte(129 - 0)); - } - return 0; - case 17: -@@ -668,10 +675,12 @@ static int xlate_payload_6to4(struct pkt - cksum = ones_add(p->icmp->cksum, cksum); - if (p->icmp->type == 128) { - p->icmp->type = 8; -- p->icmp->cksum = ones_add(cksum, 128 - 8); -+ p->icmp->cksum = ones_add(cksum, -+ checksum_extend_byte(128 - 8)); - } else { - p->icmp->type = 0; -- p->icmp->cksum = ones_add(cksum, 129 - 0); -+ p->icmp->cksum = ones_add(cksum, -+ checksum_extend_byte(129 - 0)); - } - return 0; - case 17: diff --git a/kernel/mtd-rw/Makefile b/kernel/mtd-rw/Makefile deleted file mode 100644 index 7385df9..0000000 --- a/kernel/mtd-rw/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2016 Joseph C. Lehner -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=mtd-rw -PKG_VERSION:=git-20160214 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/jclehner/mtd-rw.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=7e8562067d6a366c8cbaa8084396c33b7e12986b - -PKG_MAINTAINER=Joseph C. Lehner -PKG_LICENSE=GPL-2.0 -PKG_LICENSE_FILES=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/mtd-rw - SUBMENU:=Other modules - TITLE:=Write-enabler for MTD partitions - FILES:=$(PKG_BUILD_DIR)/mtd-rw.ko -endef - -define KernelPackage/mtd-rw/description - A kernel module that temporarily makes all MTD partitions writeable. -endef - -MAKE_OPTS:= \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - M="$(PKG_BUILD_DIR)" - -define Build/Compile - $(MAKE) -C "$(LINUX_DIR)" \ - $(MAKE_OPTS) \ - CONFIG_MTD_RW=m \ - modules -endef - -$(eval $(call KernelPackage,mtd-rw)) diff --git a/lang/chardet/Makefile b/lang/chardet/Makefile deleted file mode 100644 index 6343b4e..0000000 --- a/lang/chardet/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=chardet -PKG_VERSION:=2.3.0 -PKG_RELEASE:=1 -PKG_LICENSE:=LGPL-2.1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/c/chardet/ -PKG_MD5SUM:=25274d664ccb5130adae08047416e1a8 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/chardet - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Universal encoding detector for Python 2 and 3 - URL:=https://github.com/chardet/chardet - DEPENDS:=+python -endef - -define Package/chardet/description - Universal encoding detector for Python 2 and 3 -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/chardet/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/chardetect \ - $(1)/usr/bin - # fix python exec path in scripts - sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/chardetect -endef - -$(eval $(call BuildPackage,chardet)) diff --git a/lang/django-appconf/Makefile b/lang/django-appconf/Makefile deleted file mode 100644 index c06fa6a..0000000 --- a/lang/django-appconf/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=django-appconf -PKG_VERSION:=1.0.2 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/34/b9/d07195652ab494b026f7cb0341dd6e5f2e6e39be177abe05e2cec8bd46e4/ -PKG_MD5SUM:=cc11511a47088bc56531df67cd5d6261 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/django-appconf - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=A helper class for handling configuration defaults of packaged apps gracefully. - URL:=http://django-appconf.readthedocs.org/ - DEPENDS:=+python +django -endef - -define Package/django-appconf/description - A helper class for handling configuration defaults of packaged apps gracefully. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/django-appconf/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,django-appconf)) diff --git a/lang/django-compressor/Makefile b/lang/django-compressor/Makefile deleted file mode 100644 index 414e342..0000000 --- a/lang/django-compressor/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=django-compressor -PKG_VERSION:=2.1 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=django_compressor-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/23/46/2c7d582255969ad5259937f5f9e14aec1f3349d0fc0651129330918d1c6d/ -PKG_BUILD_DIR:=$(BUILD_DIR)/django_compressor-$(PKG_VERSION)/ -PKG_MD5SUM:=21ecfe4e8615eae64f7068a5599df9af -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/django-compressor - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Compresses linked and inline JavaScript or CSS into single cached files. - URL:=http://django-compressor.readthedocs.org/ - DEPENDS:=+python +django -endef - -define Package/django-compressor/description - Compresses linked and inline JavaScript or CSS into single cached files. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/django-compressor/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,django-compressor)) diff --git a/lang/django-constance/Makefile b/lang/django-constance/Makefile deleted file mode 100644 index 11dd2e2..0000000 --- a/lang/django-constance/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=django-constance -PKG_VERSION:=1.2 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/0a/ff/1c1caae2b7be9c26f2aee0703236998e22cf5557fa56726347b5afa149d1/ -PKG_MD5SUM:=f9f8e527df50b0a1533149d9be0b814b -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/django-constance - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Django live settings with pluggable backends, including Redis. - URL:=https://github.com/jazzband/django-constance - DEPENDS:=+python +django -endef - -define Package/django-constance/description - Django live settings with pluggable backends, including Redis. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/django-constance/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,django-constance)) diff --git a/lang/django-jsonfield/Makefile b/lang/django-jsonfield/Makefile deleted file mode 100644 index 40a9ff7..0000000 --- a/lang/django-jsonfield/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=django-jsonfield -PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/e4/b2/a079f0a2218e0eb7892edbf404e0bbfbb281a6bbf06966b775f5142ed159/ -PKG_MD5SUM:=2e5e737a3f93f3b5d7ae6026b1340167 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/django-jsonfield - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=JSONField for django models - URL:=https://github.com/bradjasper/django-jsonfield - DEPENDS:=+python +django -endef - -define Package/django-jsonfield/description - JSONField for django models -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/django-jsonfield/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,django-jsonfield)) diff --git a/lang/django-picklefield/Makefile b/lang/django-picklefield/Makefile deleted file mode 100644 index 0747796..0000000 --- a/lang/django-picklefield/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=django-picklefield -PKG_VERSION:=0.3.2 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/django-picklefield/ -PKG_MD5SUM:=b2c17ca9e03704ce33890e6aefc7b2e5 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/django-picklefield - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Pickled object field for Django - URL:=http://github.com/gintas/django-picklefield/ - DEPENDS:=+python +django -endef - -define Package/django-picklefield/description - Pickled object field for Django -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/django-picklefield/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,django-picklefield)) diff --git a/lang/django-postoffice/Makefile b/lang/django-postoffice/Makefile deleted file mode 100644 index 18dce36..0000000 --- a/lang/django-postoffice/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=django-postoffice -PKG_VERSION:=2.0.8 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=django-post_office-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/52/25/cc0cfe923f183d7c19b162cac3bf8430ddaed7bad28202b8f93a97d248a4/ -PKG_BUILD_DIR:=$(BUILD_DIR)/django-post_office-$(PKG_VERSION)/ -PKG_MD5SUM:=437bf62cef06381d346ae2bc087c0e3c -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/django-postoffice - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=A Django app to monitor and send mail asynchronously, complete with template support. - URL:=https://github.com/ui/django-postoffice - DEPENDS:=+python +django +django-jsonfield -endef - -define Package/django-postoffice/description - A Django app to monitor and send mail asynchronously, complete with template support. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/django-postoffice/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,django-postoffice)) diff --git a/lang/django-restframework/Makefile b/lang/django-restframework/Makefile deleted file mode 100644 index 5ae6956..0000000 --- a/lang/django-restframework/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=django-restframework -PKG_VERSION:=3.3.3 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE:=djangorestframework-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/d/djangorestframework/ -PKG_BUILD_DIR:=$(BUILD_DIR)/djangorestframework-$(PKG_VERSION) -PKG_MD5SUM:=6f5ee9646e7fa87dad4385d3c7e7678d -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/django-restframework - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Web APIs for Django, made easy. - URL:=http://www.django-rest-framework.org/ - DEPENDS:=+python +django -endef - -define Package/django-restframework/description - Web APIs for Django, made easy. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/django-restframework/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,django-restframework)) diff --git a/lang/django-statici18n/Makefile b/lang/django-statici18n/Makefile deleted file mode 100644 index 5d94774..0000000 --- a/lang/django-statici18n/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=django-statici18n -PKG_VERSION:=1.2.1 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/72/76/6ee13019e1691bff6b759136068ee77fcc2982b700135caa134030937b28/ -PKG_MD5SUM:=67cac19909dd3272ae1fc73ad8d1dca3 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/django-statici18n - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=A Django app that provides helper for generating JavaScript catalog to static files. - URL:=http://django-statici18n.readthedocs.org/ - DEPENDS:=+python +django -endef - -define Package/django-statici18n/description - A Django app that provides helper for generating JavaScript catalog to static files. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/django-statici18n/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,django-statici18n)) diff --git a/lang/django/Makefile b/lang/django/Makefile deleted file mode 100644 index c932cc1..0000000 --- a/lang/django/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=django -PKG_VERSION:=1.8.12 -PKG_RELEASE=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/django/django.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=c168aeba175dbb92c615460a360cb1ea978de5d3 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/django - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=The web framework for perfectionists with deadlines. - MAINTAINER:=Gergely Kiss - URL:=https://www.djangoproject.com/ - DEPENDS:=+python -endef - -define Package/django/description - The web framework for perfectionists with deadlines. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \ - $(1)/usr/bin -endef - -define Package/django/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/django-admin.py \ - $(1)/usr/bin - # fix python exec path - sed -i 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/django-admin.py -endef - -$(eval $(call BuildPackage,django)) diff --git a/lang/dkjson/Makefile b/lang/dkjson/Makefile deleted file mode 100644 index efb0012..0000000 --- a/lang/dkjson/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 20013-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dkjson -PKG_VERSION:=2.5 -PKG_RELEASE:=3 - -PKG_SOURCE_URL:=https://github.com/LuaDist/dkjson.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=e72ba0c9f5d8b8746fc306f6189a819dbb5cd0be -PKG_LICENSE:=MIT -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/dkjson - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=DKJSON - URL:=http://dkolf.de/src/dkjson-lua.fsl/home - MAINTAINER:=Lars Gierth - DEPENDS:=+lua -endef - -define Package/dkjson/description - Lua JSON parser/serializer with UTF-8 support -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/dkjson/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dkjson.lua $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,dkjson)) diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile deleted file mode 100644 index 3a86aa5..0000000 --- a/lang/erlang/Makefile +++ /dev/null @@ -1,339 +0,0 @@ -# -# Copyright (C) 2009-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=erlang -PKG_VERSION:=17.5 -PKG_RELEASE:=3 - -PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:= http://www.erlang.org/download/ \ - http://erlang.mirror.su.se/ -PKG_MD5SUM:=346dd0136bf1cc28cebc140e505206bb - -PKG_LICENSE:=ErlPL-1.1 -PKG_LICENSE_FILES:=EPLICENCE -PKG_MAINTAINER:=Nicolas Thill - -PKG_BUILD_DEPENDS:=erlang/host openssl -PKG_USE_MIPS16:=0 - -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/otp_src_$(PKG_VERSION) -PKG_BUILD_DIR:=$(BUILD_DIR)/otp_src_$(PKG_VERSION) - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/erlang/Default - SUBMENU:=Erlang - SECTION:=lang - CATEGORY:=Languages - TITLE:=Erlang/OTP programming language - URL:=http://www.erlang.org/ -endef - -define Package/erlang/Default/description - Erlang/OTP is a general-purpose programming language and runtime - environment. Erlang has built-in support for concurrency, distribution - and fault tolerance. -endef - -define Package/erlang -$(call Package/erlang/Default) - DEPENDS+= +libncurses +librt +zlib - PROVIDES:= erlang-erts=6.4 erlang-kernel=3.2 erlang-sasl=2.4.1 erlang-stdlib=2.4 -endef - -define Package/erlang/description -$(call Package/erlang/Default/description) - . - This package contains the runtime implementation and a minimal set of - modules (erts, kernel, sasl & stdlib). -endef - - -define Package/erlang-asn1 -$(call Package/erlang/Default) - TITLE:=Abstract Syntax Notation One (ASN.1) support - VERSION:=3.0.4 - DEPENDS+= +erlang +erlang-syntax-tools -endef - -define Package/erlang-asn1/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides Abstract Syntax Notation One (ASN.1) - support. -endef - - -define Package/erlang-compiler -$(call Package/erlang/Default) - TITLE:=Byte code compiler - VERSION:=5.0.4 - DEPENDS+= +erlang +erlang-hipe -endef - -define Package/erlang-compiler/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides a byte code compiler for Erlang which - produces highly compact code. -endef - - -define Package/erlang-crypto -$(call Package/erlang/Default) - TITLE:=Cryptography support - VERSION:=3.5 - DEPENDS+= +erlang +libopenssl -endef - -define Package/erlang-crypto/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides functions for computation of message - digests, and encryption and decryption functions. -endef - - -define Package/erlang-hipe -$(call Package/erlang/Default) - TITLE:=High Performance Erlang - VERSION:=3.11.3 - DEPENDS+= +erlang -endef - -define Package/erlang-hipe/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides HiPE (High Performance Erlang) - support. -endef - - -define Package/erlang-inets -$(call Package/erlang/Default) - TITLE:=Internet clients and servers - VERSION:=5.10.6 - DEPENDS+= +erlang -endef - -define Package/erlang-inets/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides a container for Internet clients and - servers. Currently a FTP client, a HTTP client and server, and a tftp - client and server have been incorporated in Inets. -endef - - -define Package/erlang-mnesia -$(call Package/erlang/Default) - TITLE:=Distributed database - VERSION:=4.12.5 - DEPENDS+= +erlang -endef - -define Package/erlang-mnesia/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides a distributed DataBase Management - System (DBMS), appropriate for telecommunications applications and - other Erlang applications which require continuous operation and - exhibit soft real-time properties. -endef - - -define Package/erlang-runtime-tools -$(call Package/erlang/Default) - TITLE:=Low-profile debugging/tracing tools - VERSION:=1.8.16 - DEPENDS+= +erlang -endef - -define Package/erlang-runtime-tools/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides low footprint tracing/debugging tools - suitable for inclusion in a production system. -endef - - -define Package/erlang-snmp -$(call Package/erlang/Default) - TITLE:=Simple Network Management Protocol (SNMP) support - VERSION:=5.1.1 - DEPENDS+= +erlang +erlang-asn1 -endef - -define Package/erlang-snmp/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides Simple Network Management Protocol - (SNMP) support including a MIB compiler and tools for creating SNMP - agents. -endef - - -define Package/erlang-ssh -$(call Package/erlang/Default) - TITLE:=Secure Shell (SSH) support - VERSION:=3.2 - DEPENDS+= +erlang +erlang-crypto -endef - -define Package/erlang-ssh/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides an implementation of the Secure Shell - protocol, with SSH & SFTP support. -endef - - -define Package/erlang-ssl -$(call Package/erlang/Default) - TITLE:=Secure Sockets Layer (SSL) support - VERSION:=6.0 - DEPENDS+= +erlang +erlang-crypto -endef - -define Package/erlang-ssl/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides support for secure communication over - sockets. -endef - - -define Package/erlang-syntax-tools -$(call Package/erlang/Default) - TITLE:=Abstract Erlang syntax trees handling support - VERSION:=1.6.18 - DEPENDS+= +erlang -endef - -define Package/erlang-syntax-tools/description -$(call Package/erlang/Default/description) - . - This Erlang/OTP package provides support for handling abstract Erlang - syntax trees. -endef - - -# Host - -HOST_CONFIGURE_ARGS += \ - --disable-hipe \ - --disable-smp-support \ - --without-javac - -HOST_CFLAGS += -D_GNU_SOURCE - -define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR) all -endef - -define Host/Install - $(MAKE) -C $(HOST_BUILD_DIR) install -endef - - -# Target - -CONFIGURE_ARGS += \ - --disable-hipe \ - --disable-smp-support \ - --without-javac \ - --enable-dynamic-ssl-lib - -CONFIGURE_VARS += \ - SHLIB_LD="$(TARGET_CC)" \ - TARGET_ARCH="$(TARGET_ARCH)" \ - ac_cv_func_mmap_fixed_mapped=yes \ - ac_cv_path_WX_CONFIG_PATH=no \ - erl_xcomp_getaddrinfo=no \ - erl_xcomp_sysroot="$(STAGING_DIR)" - -EXTRA_CFLAGS+=-D_GNU_SOURCE -EXTRA_LDFLAGS+=-lz - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - noboot - $(MAKE) -C $(PKG_BUILD_DIR) \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - install -endef - -define Package/erlang/install - $(INSTALL_DIR) $(1)/usr/bin - for f in epmd erl erlc escript run_erl; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/$$$$f $(1)/usr/bin/ ; \ - done - $(INSTALL_DIR) $(1)/usr/lib/erlang/bin - for f in erl erlc escript run_erl start start.boot start.script start_clean.boot start_erl start_sasl.boot to_erl; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/bin/$$$$f $(1)/usr/lib/erlang/bin/ ; \ - done - $(INSTALL_DIR) $(1)/usr/lib/erlang/lib - for m in erts kernel sasl stdlib; do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$m-* $(1)/usr/lib/erlang/lib/ ; \ - rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/examples ; \ - rm -rf $(1)/usr/lib/erlang/lib/$$$$m-*/src ; \ - done - $(INSTALL_DIR) $(1)/usr/lib/erlang - $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/erts-* $(1)/usr/lib/erlang/ - rm -rf $(1)/usr/lib/erlang/erts-*/{doc,include,lib,man,src} - rm -rf $(1)/usr/lib/erlang/erts-*/bin/*.src - $(INSTALL_DIR) $(1)/usr/lib/erlang/releases - $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/releases/* $(1)/usr/lib/erlang/releases/ - $(SED) 's,%ERL_ROOT%,/usr/lib/erlang,g' \ - $(1)/usr/lib/erlang/releases/RELEASES.src - mv -f $(1)/usr/lib/erlang/releases/RELEASES.src \ - $(1)/usr/lib/erlang/releases/RELEASES - for f in bin/erl bin/start erts-*/bin/erl erts-*/bin/start; do \ - $(SED) 's,^\(ROOTDIR\)=.*,\1=/usr/lib/erlang,g' \ - $(1)/usr/lib/erlang/$$$$f ; \ - done -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/lib/erl_interface/obj/*/*.a $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_BUILD_DIR)/lib/erl_interface/include/*.h $(1)/usr/include/ -endef - -define BuildModule - - define Package/erlang-$(1)/install - $(INSTALL_DIR) $$(1)/usr/lib/erlang/lib - for m in $(2); do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/erlang/lib/$$$$$$$$m-* $$(1)/usr/lib/erlang/lib/ ; \ - rm -rf $$(1)/usr/lib/erlang/lib/$$$$$$$$m-*/{examples,priv/obj,src} ; \ - done - endef - - $$(eval $$(call BuildPackage,erlang-$(1))) - -endef - - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,erlang)) -$(eval $(call BuildModule,asn1,asn1)) -$(eval $(call BuildModule,compiler,compiler)) -$(eval $(call BuildModule,crypto,crypto)) -$(eval $(call BuildModule,hipe,hipe)) -$(eval $(call BuildModule,inets,inets)) -$(eval $(call BuildModule,mnesia,mnesia)) -$(eval $(call BuildModule,runtime-tools,runtime_tools)) -$(eval $(call BuildModule,snmp,snmp)) -$(eval $(call BuildModule,ssh,ssh)) -$(eval $(call BuildModule,ssl,ssl)) -$(eval $(call BuildModule,syntax-tools,syntax_tools)) diff --git a/lang/erlang/patches/101-emulator_includes.patch b/lang/erlang/patches/101-emulator_includes.patch deleted file mode 100644 index 5a413af..0000000 --- a/lang/erlang/patches/101-emulator_includes.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/erts/emulator/Makefile.in -+++ b/erts/emulator/Makefile.in -@@ -682,7 +682,7 @@ $(OBJDIR)/beam_emu.o: beam/beam_emu.c - endif - - $(OBJDIR)/%.o: beam/%.c -- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ -+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@ - - $(OBJDIR)/%.o: $(TARGET)/%.c - $(V_CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@ diff --git a/lang/erlang/patches/102-musl_compat.patch b/lang/erlang/patches/102-musl_compat.patch deleted file mode 100644 index d23900e..0000000 --- a/lang/erlang/patches/102-musl_compat.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/lib/erl_interface/src/connect/ei_resolve.c -+++ b/lib/erl_interface/src/connect/ei_resolve.c -@@ -642,7 +642,7 @@ struct hostent *ei_gethostbyname_r(const - #ifndef HAVE_GETHOSTBYNAME_R - return my_gethostbyname_r(name,hostp,buffer,buflen,h_errnop); - #else --#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__)) -+#if (defined(_GNU_SOURCE) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__)) - struct hostent *result; - - gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop); diff --git a/lang/erlang/patches/103-disable_emacs.patch b/lang/erlang/patches/103-disable_emacs.patch deleted file mode 100644 index 9412195..0000000 --- a/lang/erlang/patches/103-disable_emacs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/lib/tools/Makefile -+++ b/lib/tools/Makefile -@@ -23,7 +23,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk - # Macros - # ---------------------------------------------------- - --SUB_DIRECTORIES = c_src src doc/src examples priv emacs -+SUB_DIRECTORIES = c_src src doc/src examples priv - - include vsn.mk - VSN = $(TOOLS_VSN) diff --git a/lang/et_xmlfile/Makefile b/lang/et_xmlfile/Makefile deleted file mode 100644 index f0c0139..0000000 --- a/lang/et_xmlfile/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=et_xmlfile -PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/e/et_xmlfile/ -PKG_MD5SUM:=f47940fd9d556375420b2e276476cfaf -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/et_xmlfile - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=An implementation of lxml.xmlfile for the standard library - URL:=https://bitbucket.org/openpyxl/et_xmlfile - DEPENDS:=+python -endef - -define Package/et_xmlfile/description - An implementation of lxml.xmlfile for the standard library -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/et_xmlfile/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,et_xmlfile)) diff --git a/lang/flup/Makefile b/lang/flup/Makefile deleted file mode 100644 index b0514f4..0000000 --- a/lang/flup/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=flup -PKG_VERSION:=1.0.2 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/f/flup/ -PKG_MD5SUM:=24dad7edc5ada31dddd49456ee8d5254 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/flup - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Random assortment of WSGI servers - URL:=http://www.saddi.com/software/flup/ - DEPENDS:=+python -endef - -define Package/flup/description - Random assortment of WSGI servers -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/flup/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,flup)) diff --git a/lang/gunicorn/Makefile b/lang/gunicorn/Makefile deleted file mode 100644 index efdf9f4..0000000 --- a/lang/gunicorn/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gunicorn -PKG_VERSION:=19.6.0 -PKG_RELEASE=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/84/ce/7ea5396efad1cef682bbc4068e72a0276341d9d9d0f501da609fab9fcb80/ -PKG_MD5SUM:=338e5e8a83ea0f0625f768dba4597530 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/gunicorn - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=WSGI HTTP Server for UNIX - MAINTAINER:=Gergely Kiss - URL:=http://gunicorn.org/ - DEPENDS:=+python +python-setuptools -endef - -define Package/gunicorn/description - WSGI HTTP Server for UNIX -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/gunicorn/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gunicorn* \ - $(1)/usr/bin - # fix python exec path in scripts - $(SED) 's/#!.*/#!\/usr\/bin\/python/g' $(1)/usr/bin/gunicorn* -endef - -$(eval $(call BuildPackage,gunicorn)) diff --git a/lang/jamvm/Makefile b/lang/jamvm/Makefile deleted file mode 100644 index 996dfa0..0000000 --- a/lang/jamvm/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=jamvm -PKG_VERSION:=2.0.0 -PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0+ -PKG_MAINTAINER:=Dana H. Myers - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_MD5SUM:=a6e3321ef4b3cfb4afc20bd75452e11e - -PKG_USE_MIPS16:=0 - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/jamvm - SUBMENU:=Java - SECTION:=lang - CATEGORY:=Languages - TITLE:=A compact Java Virtual Machine - URL:=http://sourceforge.net/projects/jamvm - DEPENDS:=+zlib +libpthread +librt +classpath @!avr32 -endef - -define Package/jamvm/description - JamVM is a new Java Virtual Machine which conforms to the JVM - specification version (blue book). In comparison to most other VM's (free - and commercial) it is extremely small.However, unlike other small VMs - (e.g. KVM) it is designed to support the full specification, and includes - support for object finalisation, Soft/Weak/Phantom References, the Java - Native Interface (JNI) and the Reflection API. -endef - -CONFIGURE_ARGS += \ - --with-java-runtime-library=gnuclasspath \ - --with-classpath-install-dir=/usr \ - --disable-int-inlining \ - --disable-shared \ - --without-pic - -MAKE_FLAGS += \ - GLIBJ_ZIP=$(STAGING_DIR)/usr/share/classpath/glibj.zip - -define Package/jamvm/install - $(INSTALL_DIR) $(1)/usr - $(CP) \ - $(PKG_INSTALL_DIR)/usr/bin \ - $(PKG_INSTALL_DIR)/usr/share \ - $(1)/usr/ -endef - -define Build/InstallDev - $(CP) $(PKG_INSTALL_DIR)/* $(1)/ -endef - -$(eval $(call BuildPackage,jamvm)) diff --git a/lang/jdcal/Makefile b/lang/jdcal/Makefile deleted file mode 100644 index 34d3970..0000000 --- a/lang/jdcal/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=jdcal -PKG_VERSION:=1.2 -PKG_RELEASE:=1 -PKG_LICENSE:=BSD-3-Clause - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/j/jdcal/ -PKG_MD5SUM:=ab8d5ba300fd1eb01514f363d19b1eb9 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/jdcal - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=Julian dates from proleptic Gregorian and Julian calendars. - URL:=http://github.com/phn/jdcal - DEPENDS:=+python -endef - -define Package/jdcal/description - Julian dates from proleptic Gregorian and Julian calendars. -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/jdcal/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,jdcal)) diff --git a/lang/json4lua/Makefile b/lang/json4lua/Makefile deleted file mode 100644 index 0e0c9c5..0000000 --- a/lang/json4lua/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=json4lua -PKG_VERSION:=0.9.53 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/amrhassan/json4lua.git -PKG_SOURCE_VERSION:=$(PKG_VERSION) - -PKG_MAINTAINER:=Amr Hassan -PKG_LICENSE=MIT - -LUA_MODULE_PATH:=/usr/lib/lua - -include $(INCLUDE_DIR)/package.mk - -define Package/json4lua - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=json4lua - URL:=https://github.com/amrhassan/json4lua - DEPENDS:=+lua +luasocket -endef - -define Package/json4lua/description - JSON and JSONRPC for Lua -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/json4lua/install - $(INSTALL_DIR) $(1)/$(LUA_MODULE_PATH)/json - $(INSTALL_DATA) $(PKG_BUILD_DIR)/json/json.lua $(1)/$(LUA_MODULE_PATH)/json.lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/json/rpc.lua $(1)/$(LUA_MODULE_PATH)/json/rpc.lua -endef - -$(eval $(call BuildPackage,json4lua)) diff --git a/lang/lpeg/Makefile b/lang/lpeg/Makefile deleted file mode 100644 index ee8a4ef..0000000 --- a/lang/lpeg/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lpeg -PKG_VERSION:=0.12.2 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.inf.puc-rio.br/~roberto/lpeg/ -PKG_MD5SUM:=fabb614eb46e370d4f6b8fd82d17ca7e - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/lpeg - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LPeg - URL:=http://www.inf.puc-rio.br/~roberto/lpeg/ - DEPENDS:=+lua -endef - -define Package/lpeg/description - LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs) -endef - -define Build/Configure -endef - -# add make variable overrides here -MAKE_FLAGS += - -define Package/lpeg/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lpeg.so $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lpeg)) diff --git a/lang/lua-bencode/Makefile b/lang/lua-bencode/Makefile deleted file mode 100644 index a7b898b..0000000 --- a/lang/lua-bencode/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 20013-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-bencode -PKG_VERSION:=2.1.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://bitbucket.org/wilhelmy/lua-bencode/downloads/ -PKG_HASH:=4624f33ff026bc62990a323ee4953e42d68430c38a1a4726c9cfd77c085b1422 -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-bencode - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=lua-bencode - URL:=https://bitbucket.org/wilhelmy/lua-bencode - MAINTAINER:=Lars Gierth - DEPENDS:=+lua -endef - -define Package/lua-bencode/description - This is a module for the lua programming language for decoding and encoding - bencoded data which can be used to read and write torrent files for bittorrent. -endef - -define Build/Configure -endef - -define Build/Compile -endef - - -define Package/lua-bencode/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/bencode.lua $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-bencode)) diff --git a/lang/lua-cjson/Makefile b/lang/lua-cjson/Makefile deleted file mode 100644 index 7cdb350..0000000 --- a/lang/lua-cjson/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-cjson -PKG_VERSION:=2.1.0 -PKG_RELEASE:=2 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.kyne.com.au/~mark/software/download/ -PKG_MD5SUM:=24f270663e9f6ca8ba2a02cef19f7963 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -HOST_BUILD_DEPENDS:=lua/host - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/lua-cjson - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua CJSON parser - URL:=https://github.com/mpx/lua-cjson - DEPENDS:= +lua -endef - -define Package/lua-cjson/description - Lua CJSON is a fast JSON encoding/parsing module for Lua. -endef - -CMAKE_OPTIONS += \ - -DUSE_LUA=ON - -CMAKE_HOST_OPTIONS += \ - -DLUA_MATH_LIBRARY=m - -define Package/lua-cjson/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/cjson.so $(1)/usr/lib/lua/ - - $(INSTALL_DIR) $(1)/usr/lib/lua/cjson - $(INSTALL_DATA) $(PKG_BUILD_DIR)/lua/cjson/util.lua $(1)/usr/lib/lua/cjson -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,lua-cjson)) diff --git a/lang/lua-copas/Makefile b/lang/lua-copas/Makefile deleted file mode 100644 index 4f073e2..0000000 --- a/lang/lua-copas/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (C) 2009-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-copas -PKG_VERSION:=2.0.0 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/keplerproject/copas.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=f39a80add9f7c010ac979297652bbaaea0360a27 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-copas - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua-Copas - URL:=https://github.com/keplerproject/copas - DEPENDS:=+lua -endef - -define Package/lua-copas/description - Copas is a dispatcher based on coroutines that can be used by TCP/IP servers. -endef - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - T="$(BUILD_VARIANT)" \ - PREFIX="$(PKG_INSTALL_DIR)/usr" \ - install -endef - -# add make variable overrides here -MAKE_FLAGS += - -define Package/lua-copas/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DIR) $(1)/usr/lib/lua/copas - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas.lua $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/ftp.lua $(1)/usr/lib/lua/copas - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/smtp.lua $(1)/usr/lib/lua/copas - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/http.lua $(1)/usr/lib/lua/copas - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/copas/limit.lua $(1)/usr/lib/lua/copas -endef - -$(eval $(call BuildPackage,lua-copas)) diff --git a/lang/lua-copas/patches/makefile.patch b/lang/lua-copas/patches/makefile.patch deleted file mode 100644 index 10e4734..0000000 --- a/lang/lua-copas/patches/makefile.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- lua-copas-1.2.1_org/Makefile 2014-06-04 16:39:17.451563827 +0800 -+++ lua-copas-1.2.1/Makefile 2014-06-04 16:39:41.115563309 +0800 -@@ -1,10 +1,10 @@ - # $Id: Makefile,v 1.3 2007/10/29 22:50:16 carregal Exp $ - - # Default prefix --PREFIX = /usr/local -+PREFIX ?= $(DESTDIR)/usr - - # System's lua directory (where Lua libraries are installed) --LUA_DIR= $(PREFIX)/share/lua/5.1 -+LUA_DIR= $(PREFIX)/lib/lua - - install: - mkdir -p $(LUA_DIR)/copas diff --git a/lang/lua-coxpcall/Makefile b/lang/lua-coxpcall/Makefile deleted file mode 100644 index 6ca3ff8..0000000 --- a/lang/lua-coxpcall/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (C) 2009-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-coxpcall -PKG_VERSION:=1.15.0 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/keplerproject/coxpcall.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=979257892884816c97391dfd7b0a7b30dcc8f479 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-coxpcall - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua-Coxpcall - URL:=https://github.com/keplerproject/coxpcall - DEPENDS:=+lua -endef - -define Package/lua-coxpcall/description - Coxpcall encapsulates the protected calls with a coroutine based loop, - so errors can be dealed without the usual pcall/xpcall issues with coroutines. -endef - -TARGET_CFLAGS += $(FPIC) -# add make variable overrides here -MAKE_FLAGS += - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - T="$(BUILD_VARIANT)" \ - LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ - install -endef - -define Package/lua-coxpcall/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/coxpcall.lua $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-coxpcall)) diff --git a/lang/lua-coxpcall/patches/config.patch b/lang/lua-coxpcall/patches/config.patch deleted file mode 100644 index 2a1dbfd..0000000 --- a/lang/lua-coxpcall/patches/config.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- lua-coxpcall-1.15.0_org/config 1970-01-01 08:00:00.000000000 +0800 -+++ lua-coxpcall-1.15.0/config 2014-06-04 16:51:55.487547258 +0800 -@@ -0,0 +1 @@ -+LUA_DIR ?=$(DESTDIR)/usr/lib/lua diff --git a/lang/lua-lsqlite3/Makefile b/lang/lua-lsqlite3/Makefile deleted file mode 100644 index 473e215..0000000 --- a/lang/lua-lsqlite3/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lsqlite3 -PKG_VERSION:=0.9.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=http://lua.sqlite.org/index.cgi/zip/lsqlite3_fsl09w.zip -PKG_MD5SUM:=8e16ef4fda82eb73295bf2f1050d14f1 - -PKG_LICENSE:=MIT -PKG_MAINTAINER:=Oskari Rauta - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)_fsl09w.zip - -include $(INCLUDE_DIR)/package.mk - -define Package/lsqlite3 - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua wrapper for the SQLite3 library - URL:=http://lua.sqlite.org - DEPENDS:= +lua +libsqlite3 -endef - -define Package/lsqlite3/description - LuaSQLite3 is a thin wrapper around the public domain SQLite3 database engine. -endef - -TARGET_CFLAGS += $(FPIC) -std=gnu99 -TARGET_CPPFLAGS += -DLUA_USE_LINUX -TARGET_LDFLAGS += -llua -lsqlite3 -lpthread - -define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \ - -c $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.c \ - -o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \ - -DSQLITE_VERSION="$(PKG_VERSION)" - $(TARGET_CC) $(TARGET_LDFLAGS) -shared \ - $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \ - -o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.so -endef - -define Package/lsqlite3/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/*.so $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,lsqlite3)) diff --git a/lang/lua-lzlib/Makefile b/lang/lua-lzlib/Makefile deleted file mode 100644 index e4094f5..0000000 --- a/lang/lua-lzlib/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-lzlib -PKG_VERSION:=0.4.3 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/LuaDist/lzlib.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=79329a07d8f79c19eadd7ea2752b4c4e1574b015 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-lzlib - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua zlib binding - URL:=http://github.com/LuaDist/lzlib - DEPENDS:= +lua +zlib -endef - -define Package/lua-lzlib/description - A library to access zlib library functions and also to read/write gzip files using an interface similar to the base io package. -endef - -MAKE_FLAGS += \ - LUA="$(STAGING_DIR)/usr" \ - OFLAGS="$(TARGET_CFLAGS)" \ - -define Package/lua-lzlib/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/zlib.so $(1)/usr/lib/lua/ - - $(INSTALL_DATA) $(PKG_BUILD_DIR)/gzip.lua $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,lua-lzlib)) diff --git a/lang/lua-lzlib/patches/001-allow_optim_flags.patch b/lang/lua-lzlib/patches/001-allow_optim_flags.patch deleted file mode 100644 index 78f981d..0000000 --- a/lang/lua-lzlib/patches/001-allow_optim_flags.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -14,7 +14,8 @@ LUABIN= $(LUA)/bin - ZLIB=../zlib-1.2.3 - - # no need to change anything below here --CFLAGS= $(INCS) $(DEFS) $(WARN) -O0 -fPIC -+CFLAGS= $(INCS) $(DEFS) $(WARN) $(OFLAGS) -fPIC -+OFLAGS= -O0 - WARN= -g -Werror -Wall -pedantic #-ansi - INCS= -I$(LUAINC) -I$(ZLIB) - LIBS= -L$(ZLIB) -lz -L$(LUALIB) -L$(LUABIN) #-llua51 diff --git a/lang/lua-md5/Makefile b/lang/lua-md5/Makefile deleted file mode 100644 index 36e0d9d..0000000 --- a/lang/lua-md5/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-md5 -PKG_VERSION:=1.2 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/keplerproject/md5.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=024b65738b4434860777fc43d7cacaefea29ec60 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-md5 - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua-MD5 - URL:=https://github.com/keplerproject/md5 - DEPENDS:=+lua -endef - -define Package/lua-md5/description - MD5 offers basic cryptographic facilities for Lua -endef - -TARGET_CFLAGS += $(FPIC) - -# add make variable overrides here -MAKE_FLAGS += - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - PREFIX="$(STAGING_DIR)/usr" \ - LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \ - clean - $(MAKE) -C $(PKG_BUILD_DIR) \ - PREFIX="$(STAGING_DIR)/usr" \ - LUA_LIBDIR="$(STAGING_DIR)/usr/lib/lua" \ - LIB_OPTION="-shared" \ - CC="$(TARGET_CROSS)gcc" \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - all -endef - -define Build/Install - $(MAKE) -C $(PKG_BUILD_DIR) \ - LUA_LIBDIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ - LUA_DIR="$(PKG_INSTALL_DIR)/usr/lib/lua" \ - install -endef - -define Package/lua-md5/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/md5.lua $(1)/usr/lib/lua - $(INSTALL_DIR) $(1)/usr/lib/lua/md5 - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/core.so $(1)/usr/lib/lua/md5/core.so -endef - -$(eval $(call BuildPackage,lua-md5)) diff --git a/lang/lua-md5/patches/config.patch b/lang/lua-md5/patches/config.patch deleted file mode 100644 index abea3a8..0000000 --- a/lang/lua-md5/patches/config.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- lua-md5-1.2/config 2014-06-04 16:55:50.000000000 +0800 -+++ lua-md5-1.2_new/config 2014-06-04 16:57:54.223539416 +0800 -@@ -1,13 +1,13 @@ - # Installation directories - - # Default prefix --PREFIX = /usr/local -+PREFIX = /usr - - # System's libraries directory (where binary libraries are installed) --LUA_LIBDIR= $(PREFIX)/lib/lua/5.1 -+LUA_LIBDIR= $(PREFIX)/lib/lua - - # System's lua directory (where Lua libraries are installed) --LUA_DIR= $(PREFIX)/share/lua/5.1 -+LUA_DIR= $(PREFIX)/lib/lua - - # Lua includes directory - LUA_INC= $(PREFIX)/include diff --git a/lang/lua-md5/patches/makefile.patch b/lang/lua-md5/patches/makefile.patch deleted file mode 100644 index 89a2e33..0000000 --- a/lang/lua-md5/patches/makefile.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Makefile.orig 2014-06-04 17:16:40.083514808 +0800 -+++ b/Makefile 2014-06-04 17:17:27.111513780 +0800 -@@ -1,6 +1,6 @@ - # $Id: Makefile,v 1.7 2007/10/11 00:02:56 carregal Exp $ - --CONFIG= ./config -+CFLAGS+= -fPIC - - include $(CONFIG) - diff --git a/lang/lua-mobdebug/Makefile b/lang/lua-mobdebug/Makefile deleted file mode 100644 index 3d11539..0000000 --- a/lang/lua-mobdebug/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-mobdebug -PKG_VERSION:=0.61 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/pkulchenko/MobDebug.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=9a03aa59696647ba3b7f9ae2f29a9f28532a4feb -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-mobdebug - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua-MobDebug - URL:=https://github.com/pkulchenko/MobDebug - DEPENDS:=+lua -endef - -define Package/lua-mobdebug/description - MobDebug is a remote debugger for Lua (including Lua 5.1, Lua 5.2, Lua 5.3, and LuaJIT 2.x). -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Build/Install -endef - -# add make variable overrides here -MAKE_FLAGS += - -define Package/lua-mobdebug/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/mobdebug.lua $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-mobdebug)) diff --git a/lang/lua-openssl/Makefile b/lang/lua-openssl/Makefile deleted file mode 100644 index 6f46e7a..0000000 --- a/lang/lua-openssl/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2016 Amnon Paz -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-openssl -PKG_VERSION:=0.6.0 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Amnon Paz -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://github.com/zhaozg/lua-openssl.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=1b950e6ff8617205cda1a1b612637ef21b9daf96 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua openSSL binding - URL:=http://github.com/zhaozg/lua-openssl - DEPENDS:=+lua +libopenssl +librt -endef - -define Package/lua-openssl/description - A free, MIT-licensed OpenSSL binding for Lua. -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/openssl.so $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/lua-openssl/patches/0001-Revise-Makefile.patch b/lang/lua-openssl/patches/0001-Revise-Makefile.patch deleted file mode 100644 index e084c0b..0000000 --- a/lang/lua-openssl/patches/0001-Revise-Makefile.patch +++ /dev/null @@ -1,135 +0,0 @@ -diff --git a/Makefile b/Makefile -index 6cb1176..6605879 100644 ---- a/Makefile -+++ b/Makefile -@@ -1,85 +1,45 @@ --T=openssl -- --PREFIX ?=/usr/local --LIB_OPTION ?= -shared -- --#Lua auto detect --LUA_VERSION ?= $(shell pkg-config luajit --print-provides) --ifeq ($(LUA_VERSION),) ############ Not use luajit --LUAV ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)") --LUA_CFLAGS ?= -I$(PREFIX)/include/lua$(LUAV) --LUA_LIBS ?= -L$(PREFIX)/lib --LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV) --else --LUAV ?= $(shell lua -e "_,_,v=string.find(_VERSION,'Lua (.+)');print(v)") --LUA_CFLAGS ?= $(shell pkg-config luajit --cflags) --LUA_LIBS ?= $(shell pkg-config luajit --libs) --LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUAV) --endif -- --#OS auto detect --SYS := $(shell gcc -dumpmachine) -- --ifneq (, $(findstring linux, $(SYS))) --# Do linux things --LDFLAGS = -fPIC -lrt -ldl --OPENSSL_LIBS ?= $(shell pkg-config openssl --libs) --OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags) --CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS) --endif --ifneq (, $(findstring apple, $(SYS))) --# Do darwin things --LDFLAGS = -fPIC -lrt -ldl --OPENSSL_LIBS ?= $(shell pkg-config openssl --libs) --OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags) --CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS) --endif --ifneq (, $(findstring mingw, $(SYS))) --# Do mingw things --V = $(shell lua -e "v=string.gsub('$(LUAV)','%.','');print(v)") --LDFLAGS = -mwindows -lcrypt32 -lssl -lcrypto -lws2_32 $(PREFIX)/bin/lua$(V).dll --LUA_CFLAGS = -DLUA_LIB -DLUA_BUILD_AS_DLL -I$(PREFIX)/include/ --CFLAGS = $(OPENSSL_CFLAGS) $(LUA_CFLAGS) --endif --ifneq (, $(findstring cygwin, $(SYS))) --# Do cygwin things --OPENSSL_LIBS ?= $(shell pkg-config openssl --libs) --OPENSSL_CFLAGS ?= $(shell pkg-config openssl --cflags) --CFLAGS = -fPIC $(OPENSSL_CFLAGS) $(LUA_CFLAGS) --endif --#custome config --ifeq (.config, $(wildcard .config)) --include .config --endif -- --LIBNAME= $T.so.$V -- --#LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X -- --# Compilation directives --WARN_MOST = -Wall -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic --WARN = -Wall -Wno-unused-value --WARN_MIN = --CFLAGS += $(WARN_MIN) -DPTHREADS --CC= gcc -g $(CFLAGS) -Ideps -- -- --OBJS=src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o \ --src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o \ --src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o -- --.c.o: -- $(CC) -c -o $@ $? -- --all: $T.so -- echo $(SYS) -- --$T.so: $(OBJS) -- MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; $(CC) $(CFLAGS) $(LIB_OPTION) -o $T.so $(OBJS) $(OPENSSL_LIBS) $(LUA_LIBS) $(LDFLAGS) -- --install: all -- mkdir -p $(LUA_LIBDIR) -- cp $T.so $(LUA_LIBDIR) -- --clean: -- rm -f $T.so $(OBJS) -+.PHONY: install clean -+ -+PKGC ?= pkg-config -+ -+LIBNAME = openssl.so -+LIB_OPTION = -shared -+ -+# lua's package config can be under various names -+LUAPKGC := $(shell for pc in lua lua5.1 lua5.2 lua5.3; do \ -+ $(PKGC) --exists $$pc && echo $$pc && break; \ -+ done) -+ -+BUILD_DIR = $(shell pwd) -+ -+# LUA include/libraries build flags -+LUA_LIBDIR := $(shell $(PKGC) --variable=libdir $(LUAPKGC)) -+LUA_CFLAGS := $(shell $(PKGC) --cflags $(LUAPKGC)) -+LUA_LIBS := $(shell $(PKGC) --libs-only-L $(LUAPKGC)) -+ -+# openssl include/libraries build flags -+OPENSSL_LIBS = $(shell $(PKGC) openssl --libs) -+OPENSSL_CFLAGS = $(shell $(PKGC) openssl --cflags) -+ -+# openssl include/libraries build flags -+LOCAL_INCLUDE = -I$(BUILD_DIR)/deps -+ -+CFLAGS += -fPIC -DPTHREADS -g $(LOCAL_INCLUDE) $(OPENSSL_CFLAGS) $(LUA_CFLAGS) -+LDFLAGS += -lrt -ldl $(OPENSSL_LIBS) $(LUA_LIBS) -+ -+OBJS = src/asn1.o src/auxiliar.o src/bio.o src/cipher.o src/cms.o src/compat.o src/crl.o src/csr.o src/dh.o src/digest.o src/dsa.o src/ec.o src/engine.o src/hmac.o src/lbn.o src/lhash.o src/misc.o src/ocsp.o src/openssl.o src/ots.o src/pkcs12.o src/pkcs7.o src/pkey.o src/rsa.o src/ssl.o src/th-lock.o src/util.o src/x509.o src/xattrs.o src/xexts.o src/xname.o src/xstore.o src/xalgor.o src/callback.o -+ -+all: clean $(LIBNAME) -+ -+$(LIBNAME): $(OBJS) -+ $(CC) $(LDFLAGS) $(LIB_OPTION) $(OBJS) -o $@ -+ -+%.o: %.c -+ $(CC) $(CFLAGS) -c $< -o $@ -+ -+install: all -+ mkdir -p $(LUA_LIBDIR) -+ cp $(LIBNAME) $(LUA_LIBDIR) -+ -+clean: -+ rm -f $(LIBNAME) $(OBJS) diff --git a/lang/lua-openssl/patches/0010-Fix-Linkage.patch b/lang/lua-openssl/patches/0010-Fix-Linkage.patch deleted file mode 100644 index 52bcf1a..0000000 --- a/lang/lua-openssl/patches/0010-Fix-Linkage.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/deps/lua-compat/c-api/compat-5.3.c b/deps/lua-compat/c-api/compat-5.3.c -index 4395bbc..4a8877c 100644 ---- a/deps/lua-compat/c-api/compat-5.3.c -+++ b/deps/lua-compat/c-api/compat-5.3.c -@@ -491,17 +491,6 @@ COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i) { - } - - --COMPAT53_API int lua_isinteger (lua_State *L, int index) { -- if (lua_type(L, index) == LUA_TNUMBER) { -- lua_Number n = lua_tonumber(L, index); -- lua_Integer i = lua_tointeger(L, index); -- if (i == n) -- return 1; -- } -- return 0; --} -- -- - static void compat53_reverse (lua_State *L, int a, int b) { - for (; a < b; ++a, --b) { - lua_pushvalue(L, a); -diff --git a/deps/lua-compat/c-api/compat-5.3.h b/deps/lua-compat/c-api/compat-5.3.h -index 2309294..8e67bae 100644 ---- a/deps/lua-compat/c-api/compat-5.3.h -+++ b/deps/lua-compat/c-api/compat-5.3.h -@@ -244,9 +244,6 @@ typedef int (*lua_KFunction)(lua_State *L, int status, lua_KContext ctx); - #define lua_geti COMPAT53_CONCAT(COMPAT53_PREFIX, _geti) - COMPAT53_API int lua_geti (lua_State *L, int index, lua_Integer i); - --#define lua_isinteger COMPAT53_CONCAT(COMPAT53_PREFIX, _isinteger) --COMPAT53_API int lua_isinteger (lua_State *L, int index); -- - #define lua_numbertointeger(n, p) \ - ((*(p) = (lua_Integer)(n)), 1) - diff --git a/lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch b/lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch deleted file mode 100644 index 2f29680..0000000 --- a/lang/lua-openssl/patches/0020-support-OPENSSL_NO_SSL3_METHOD.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- lua-openssl-0.6.0.old/src/ssl.c 2016-09-19 08:30:43.735075695 +0200 -+++ lua-openssl-0.6.0/src/ssl.c 2016-09-19 09:02:45.733813437 +0200 -@@ -24,12 +24,17 @@ - SSL_METHOD* method = NULL; - const char* ciphers; - SSL_CTX* ctx; -- if (strcmp(meth, "SSLv3") == 0) -+ if (0); -+ -+#ifndef OPENSSL_NO_SSL3 -+ else if (strcmp(meth, "SSLv3") == 0) - method = SSLv3_method(); /* SSLv3 */ - else if (strcmp(meth, "SSLv3_server") == 0) - method = SSLv3_server_method(); /* SSLv3 */ - else if (strcmp(meth, "SSLv3_client") == 0) - method = SSLv3_client_method(); /* SSLv3 */ -+#endif -+ - else if (strcmp(meth, "SSLv23") == 0) - method = SSLv23_method(); /* SSLv3 but can rollback to v2 */ - else if (strcmp(meth, "SSLv23_server") == 0) -@@ -79,15 +84,15 @@ - #endif - else - luaL_error(L, "#1:%s not supported\n" -- "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", -- "default is SSLv3", -+ "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", -+ "default is TLSv1", - meth); - ciphers = luaL_optstring(L, 2, SSL_DEFAULT_CIPHER_LIST); - ctx = SSL_CTX_new(method); - if (!ctx) - luaL_error(L, "#1:%s not supported\n" -- "Maybe SSLv3 SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", -- "default is SSLv3", -+ "Maybe [SSLv3] SSLv23 TLSv1 TLSv1_1 TLSv1_2 DTLSv1 [SSLv2], option followed by _client or _server\n", -+ "default is TLSv1", - meth); - openssl_newvalue(L, ctx); - SSL_CTX_set_cipher_list(ctx, ciphers); diff --git a/lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch b/lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch deleted file mode 100644 index 44e5330..0000000 --- a/lang/lua-openssl/patches/0030-support-OPENSSL_NO_COMP.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- lua-openssl-0.6.0.old/src/ssl.c 2016-09-19 08:30:43.735075695 +0200 -+++ lua-openssl-0.6.0/src/ssl.c 2016-09-19 08:48:37.393737125 +0200 -@@ -1245,7 +1250,7 @@ - lua_pushinteger(L, st); - return 2; - } --#ifndef LIBRESSL_VERSION_NUMBER -+#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER) - static int openssl_ssl_current_compression(lua_State *L) - { - SSL* s = CHECK_OBJECT(1, SSL, "openssl.ssl"); -@@ -1803,7 +1808,7 @@ - {"getfd", openssl_ssl_getfd}, - - {"current_cipher", openssl_ssl_current_cipher}, --#ifndef LIBRESSL_VERSION_NUMBER -+#if !defined(OPENSSL_NO_COMP) && !defined(LIBRESSL_VERSION_NUMBER) - {"current_compression", openssl_ssl_current_compression}, - #endif - {"getpeerverification", openssl_ssl_getpeerverification}, diff --git a/lang/lua-penlight/Makefile b/lang/lua-penlight/Makefile deleted file mode 100644 index 5c1b72a..0000000 --- a/lang/lua-penlight/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-penlight -PKG_VERSION:=1.3.2 -PKG_RELEASE:=2 -PKG_BUILD_DIR:=$(BUILD_DIR)/Penlight-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/stevedonovan/Penlight/archive/ -PKG_MD5SUM:=0315a39834bb6fab07741ec04ede1bf4 -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE.md - -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Penlight - URL:=http://stevedonovan.github.io/Penlight/api/manual/01-introduction.md.html - DEPENDS:=+luafilesystem - MAINTAINER:= Karl Palsson -endef - -define Package/$(PKG_NAME)/description - It is often said of Lua that it does not include batteries. - Penlight is the batteries. -endef - -define Build/Compile - echo "Nothing to compile, pure lua package" -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(CP) $(PKG_BUILD_DIR)/lua/pl $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/lua-rings/Makefile b/lang/lua-rings/Makefile deleted file mode 100644 index 7b2e270..0000000 --- a/lang/lua-rings/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-rings -PKG_VERSION:=1.3.0 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/keplerproject/rings.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=2b8a900f8b9dbde304859a3ac9d437795c3fdde3 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_FIXUP:=autoreconf - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-rings - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua-Rings - URL:=http://keplerproject.github.io/rings/ - DEPENDS:=+lua -endef - -define Package/lua-rings/description - Rings is a library which provides a way to create new Lua states from within Lua. -endef - -TARGET_CFLAGS += $(FPIC) -# add make variable overrides here -MAKE_FLAGS += - -define Build/Configure -endef - -define Package/lua-rings/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rings.so $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/stable.lua $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-rings)) diff --git a/lang/lua-rings/patches/config.patch b/lang/lua-rings/patches/config.patch deleted file mode 100644 index 5740fae..0000000 --- a/lang/lua-rings/patches/config.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- lua-rings-1.3.0_org/config 2014-06-04 15:24:24.223662038 +0800 -+++ lua-rings-1.3.0/config 2014-06-04 16:16:15.183594040 +0800 -@@ -1,15 +1,15 @@ - # Installation directories - - # Default prefix --PREFIX ?= /usr/local -+PREFIX ?= /usr - - DESTDIR ?= / - - # System's libraries directory (where binary libraries are installed) --LUA_LIBDIR ?= $(PREFIX)/lib/lua/5.1 -+LUA_LIBDIR ?= $(PREFIX)/lib/lua - - # System's lua directory (where Lua libraries are installed) --LUA_DIR ?= $(PREFIX)/share/lua/5.1 -+LUA_DIR ?= $(PREFIX)/lib/lua - - # Lua includes directory - LUA_INC ?= $(PREFIX)/include -@@ -24,6 +24,5 @@ - WARN ?= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -Wpointer-arith -pedantic - INCS ?= -I$(LUA_INC) - CFLAGS ?= $(WARN) $(INCS) --CC ?= gcc - - # $Id: config,v 1.7 2007/10/29 22:51:39 carregal Exp $ diff --git a/lang/lua-rings/patches/makefile.patch b/lang/lua-rings/patches/makefile.patch deleted file mode 100644 index 8bb0551..0000000 --- a/lang/lua-rings/patches/makefile.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- lua-rings-1.3.0_org/Makefile 2014-06-04 15:24:37.583661746 +0800 -+++ lua-rings-1.3.0/Makefile 2014-06-04 15:23:41.611662970 +0800 -@@ -3,6 +3,8 @@ - T= rings - CONFIG= ./config - -+CFLAGS+= -fPIC -+ - include $(CONFIG) - - SRCS= src/rings.c diff --git a/lang/lua-rs232/Makefile b/lang/lua-rs232/Makefile deleted file mode 100644 index 7ef5ac7..0000000 --- a/lang/lua-rs232/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-rs232 -PKG_VERSION:=1.0.3 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/srdgame/librs232.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=a9d463181e7f7034fe6a55bc38e845fb04fa93ba -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-rs232 - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua Serial Library - URL:=https://github.com/srdgame/librs232 - DEPENDS:= +lua -endef - -define Package/lua-rs232/description - multiplatform library for serial communications over RS-232 -endef - -CONFIGURE_ARGS += \ - --with-lua-inc=$(STAGING_DIR)/usr/include \ - --with-lua-lib=$(STAGING_DIR)/usr/lib - -#define Build/Configure -# ( cd "$(PKG_BUILD_DIR)"; ./autogen.sh ) -# $(call Build/Configure/Default) -#endef -define Build/Configure -endef - -define Build/Compile - (cd "$(PKG_BUILD_DIR)"; $(TARGET_CC) src/rs232.c src/rs232_posix.c bindings/lua/luars232.c -DLUAROCKS_HACK -std=gnu99 -I./include -I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib -fPIC -shared -o luars232.so) -endef - -define Build/Install -endef - -define Package/lua-rs232/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/luars232.so $(1)/usr/lib/lua/ -endef - -$(eval $(call BuildPackage,lua-rs232)) diff --git a/lang/lua-sha2/Makefile b/lang/lua-sha2/Makefile deleted file mode 100644 index 321d6de..0000000 --- a/lang/lua-sha2/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 20013-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-sha2 -PKG_VERSION:=0.2.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/lgierth/lua-sha2.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=02bd4bfdc8062c7e1ae51c5a72906efc0a6375ee -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-sha2 - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua binding for Aaron Gifford's SHA-2 implementation - URL:=https://code.google.com/p/sha2/ - MAINTAINER:=Lars Gierth - DEPENDS:=+lua -endef - -define Package/lua-sha2/description - Lua Binding for the SHA-2 (SHA-256/384/512) BSD-licensed C implementation by Aaron Gifford. - Also contains a HMAC implementation in Lua. -endef - -TARGET_CFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN -TARGET_LDFLAGS += -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN - -define Build/Configure -endef - -define Package/lua-sha2/install - $(INSTALL_DIR) $(1)/usr/lib/lua/hmac - $(INSTALL_DATA) $(PKG_BUILD_DIR)/sha2.so $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac.lua $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/sha2.lua $(1)/usr/lib/lua/hmac - $(INSTALL_DATA) $(PKG_BUILD_DIR)/hmac/md5.lua $(1)/usr/lib/lua/hmac -endef - -$(eval $(call BuildPackage,lua-sha2)) diff --git a/lang/lua-sha2/patches/001-makefile.patch b/lang/lua-sha2/patches/001-makefile.patch deleted file mode 100644 index e395044..0000000 --- a/lang/lua-sha2/patches/001-makefile.patch +++ /dev/null @@ -1,14 +0,0 @@ -From: Lars Gierth -Date: Tue, 2 Sep 2014 00:05:39 +0200 - - Add rump Makefile - -new file mode 100644 -index 0000000..f081d38 ---- /dev/null -+++ b/Makefile -@@ -0,0 +1,4 @@ -+all: sha2.o sha2lib.o -+ $(CC) -shared -o sha2.so sha2.o sha2lib.o -+ -+.PHONY: all diff --git a/lang/lua-wsapi/Makefile b/lang/lua-wsapi/Makefile deleted file mode 100644 index 5117596..0000000 --- a/lang/lua-wsapi/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-wsapi -PKG_VERSION:=1.6.1 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/keplerproject/wsapi.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=eed8338401196cc155e59280adbe58d78933ead0 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-wsapi/Default - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua WSAPI - URL:=https://keplerproject.github.io/wsapi/ - DEPENDS:= +lua -endef - -define Package/lua-wsapi/Default/description - WSAPI is an API that abstracts the web server from Lua web applications -endef - - -define Package/lua-wsapi-base -$(call Package/lua-wsapi/Default) - TITLE+= base - DEPENDS+= +luafilesystem - VARIANT:=base -endef - -define Package/lua-wsapi-base/description -$(call Package/lua-wsapi/Default/description) - . - This package contains the basic stuff. -endef - -define Package/lua-wsapi-xavante -$(call Package/lua-wsapi/Default) - TITLE+= xavante - DEPENDS+= +lua-wsapi-base +lua-xavante - VARIANT:=xavante -endef - -define Package/lua-wsapi-xavante/description -$(call Package/lua-wsapi/Default/description) - . - This package contains the Xavante stuff. -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Build/Install -endef - -define Package/lua-wsapi-base/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi.lua $(1)/usr/lib/lua - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi.cgi $(1)/usr/bin - - $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/{common,request,response,util,cgi,sapi,ringer,mock}.lua $(1)/usr/lib/lua/wsapi -endef - -define Package/lua-wsapi-xavante/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/launcher/wsapi $(1)/usr/bin - - $(INSTALL_DIR) $(1)/usr/lib/lua/wsapi - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/wsapi/xavante.lua $(1)/usr/lib/lua/wsapi -endef - - -$(eval $(call BuildPackage,lua-wsapi-base)) -$(eval $(call BuildPackage,lua-wsapi-xavante)) diff --git a/lang/lua-xavante/Makefile b/lang/lua-xavante/Makefile deleted file mode 100644 index 71ed8bd..0000000 --- a/lang/lua-xavante/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-xavante -PKG_VERSION:=2.3.0 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/keplerproject/xavante.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=9825b905133e14d37a4c179f2d02367ab93f1ef6 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-xavante - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Xavante Web Server - URL:=http://keplerproject.github.io/xavante/ - DEPENDS:= +lua -endef - -define Package/lua-xavante/description - Xavante is a Lua HTTP 1.1 Web server that uses a modular architecture based on URI mapped handlers. -endef - - -define Build/Configure -endef - -define Build/Compile -endef - -define Build/Install -endef - -define Package/lua-xavante/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/sajax/sajax.lua $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/xavante/xavante.lua $(1)/usr/lib/lua - - $(INSTALL_DIR) $(1)/usr/lib/lua/xavante - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/xavante/{cgiluahandler,encoding,filehandler,httpd,mime,patternhandler,redirecthandler,vhostshandler,indexhandler,urlhandler,ruleshandler}.lua $(1)/usr/lib/lua/xavante -endef - -$(eval $(call BuildPackage,lua-xavante)) diff --git a/lang/luabitop/Makefile b/lang/luabitop/Makefile deleted file mode 100644 index 6153c8d..0000000 --- a/lang/luabitop/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luabitop -PKG_VERSION:=1.0.2 -PKG_RELEASE:=1 - -_BASENAME:=LuaBitOp - -PKG_MAINTAINER:=Maxim Storchak -PKG_SOURCE:=$(_BASENAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://bitop.luajit.org/download/ -PKG_MD5SUM:=d0c1080fe0c844e8477279668e2d0d06 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(_BASENAME)-$(PKG_VERSION) -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/luabitop - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=luabitop - URL:=http://bitop.luajit.org/ - DEPENDS:=+liblua -endef - -define Package/luabitop/description -Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise operations on numbers. -endef - -define Build/Configure -endef - - -TARGET_CFLAGS += $(FPIC) -DLUA_USE_LINUX -DLUA_NUMBER_DOUBLE - -define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_CPPFLAGS) -std=gnu99 $(FPIC) -DLUA_USE_LINUX -shared -o $(PKG_BUILD_DIR)/bit.so $(PKG_BUILD_DIR)/bit.c -endef - -define Package/luabitop/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bit.so $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,luabitop)) diff --git a/lang/luaexpat/Makefile b/lang/luaexpat/Makefile deleted file mode 100644 index eae164f..0000000 --- a/lang/luaexpat/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2009 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luaexpat -PKG_VERSION:=1.3.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://matthewwild.co.uk/projects/luaexpat -PKG_MD5SUM:=3c20b5795e7107f847f8da844fbfe2da - -include $(INCLUDE_DIR)/package.mk - -define Package/luaexpat - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaExpat - URL:=http://matthewwild.co.uk/projects/luaexpat/ - MAINTAINER:=W. Michael Petullo - DEPENDS:=+lua +libexpat -endef - -define Package/luaexpat/description - LuaExpat is a SAX XML parser based on the Expat library. -endef - -define Build/Configure -endef - -define Build/Compile - $(CP) files/compat-5.1r5 $(PKG_BUILD_DIR)/compat-5.1r5 - $(MAKE) -C $(PKG_BUILD_DIR) \ - EXPAT_INC="-I$(STAGING_DIR)/usr/include/" \ - LUA_INC="-I$(STAGING_DIR)/usr/include/" \ - LUA_LIBDIR="$(STAGING_DIR)/usr/lib/" \ - COMPAT_DIR="$(PKG_BUILD_DIR)/compat-5.1r5" \ - LDFLAGS="-shared $(TARGET_LDFLAGS)" \ - CC="$(TARGET_CC) $(TARGET_CFLAGS) $(FPIC) -std=c99" \ - LD="$(TARGET_CROSS)ld -shared" -endef - -define Package/luaexpat/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp.so $(1)/usr/lib/lua/lxp.so - $(INSTALL_DIR) $(1)/usr/lib/lua/lxp - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lxp/lom.lua $(1)/usr/lib/lua/lxp -endef - -$(eval $(call BuildPackage,luaexpat)) diff --git a/lang/luaexpat/files/compat-5.1r5/compat-5.1.c b/lang/luaexpat/files/compat-5.1r5/compat-5.1.c deleted file mode 100644 index 6fdb8b7..0000000 --- a/lang/luaexpat/files/compat-5.1r5/compat-5.1.c +++ /dev/null @@ -1,97 +0,0 @@ -/* -** Compat-5.1 -** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat) -** $Id: compat-5.1.c,v 1.13 2006/02/20 21:12:47 carregal Exp $ -*/ - -#include -#include -#include "lua.h" -#include "lauxlib.h" -#include "compat-5.1.h" - -static void getfield(lua_State *L, int idx, const char *name) { - const char *end = strchr(name, '.'); - lua_pushvalue(L, idx); - while (end) { - lua_pushlstring(L, name, end - name); - lua_gettable(L, -2); - lua_remove(L, -2); - if (lua_isnil(L, -1)) return; - name = end+1; - end = strchr(name, '.'); - } - lua_pushstring(L, name); - lua_gettable(L, -2); - lua_remove(L, -2); -} - -static void setfield(lua_State *L, int idx, const char *name) { - const char *end = strchr(name, '.'); - lua_pushvalue(L, idx); - while (end) { - lua_pushlstring(L, name, end - name); - lua_gettable(L, -2); - /* create table if not found */ - if (lua_isnil(L, -1)) { - lua_pop(L, 1); - lua_newtable(L); - lua_pushlstring(L, name, end - name); - lua_pushvalue(L, -2); - lua_settable(L, -4); - } - lua_remove(L, -2); - name = end+1; - end = strchr(name, '.'); - } - lua_pushstring(L, name); - lua_pushvalue(L, -3); - lua_settable(L, -3); - lua_pop(L, 2); -} - -LUALIB_API void luaL_module(lua_State *L, const char *libname, - const luaL_reg *l, int nup) { - if (libname) { - getfield(L, LUA_GLOBALSINDEX, libname); /* check whether lib already exists */ - if (lua_isnil(L, -1)) { - int env, ns; - lua_pop(L, 1); /* get rid of nil */ - lua_pushliteral(L, "require"); - lua_gettable(L, LUA_GLOBALSINDEX); /* look for require */ - lua_getfenv(L, -1); /* getfenv(require) */ - lua_remove(L, -2); /* remove function require */ - env = lua_gettop(L); - - lua_newtable(L); /* create namespace for lib */ - ns = lua_gettop(L); - getfield(L, env, "package.loaded"); /* get package.loaded table */ - if (lua_isnil(L, -1)) { /* create package.loaded table */ - lua_pop(L, 1); /* remove previous result */ - lua_newtable(L); - lua_pushvalue(L, -1); - setfield(L, env, "package.loaded"); - } - else if (!lua_istable(L, -1)) - luaL_error(L, "name conflict for library `%s'", libname); - lua_pushstring(L, libname); - lua_pushvalue(L, ns); - lua_settable(L, -3); /* package.loaded[libname] = ns */ - lua_pop(L, 1); /* get rid of package.loaded table */ - lua_pushvalue(L, ns); /* copy namespace */ - setfield(L, LUA_GLOBALSINDEX, libname); - lua_remove (L, env); /* remove env */ - } - lua_insert(L, -(nup+1)); /* move library table to below upvalues */ - } - for (; l->name; l++) { - int i; - lua_pushstring(L, l->name); - for (i=0; ifunc, nup); - lua_settable(L, -(nup+3)); - } - lua_pop(L, nup); /* remove upvalues */ -} - diff --git a/lang/luaexpat/files/compat-5.1r5/compat-5.1.h b/lang/luaexpat/files/compat-5.1r5/compat-5.1.h deleted file mode 100644 index 97570d9..0000000 --- a/lang/luaexpat/files/compat-5.1r5/compat-5.1.h +++ /dev/null @@ -1,13 +0,0 @@ -/* -** Compat-5.1 -** Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat/) -** $Id: compat-5.1.h,v 1.8 2006/02/20 21:12:47 carregal Exp $ -*/ - -#ifndef COMPAT_H - -LUALIB_API void luaL_module(lua_State *L, const char *libname, - const luaL_reg *l, int nup); -#define luaL_openlib luaL_module - -#endif diff --git a/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua b/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua deleted file mode 100644 index 0938d56..0000000 --- a/lang/luaexpat/files/compat-5.1r5/compat-5.1.lua +++ /dev/null @@ -1,267 +0,0 @@ --- --- Compat-5.1 --- Copyright Kepler Project 2004-2006 (http://www.keplerproject.org/compat) --- According to Lua 5.1 --- $Id: compat-5.1.lua,v 1.22 2006/02/20 21:12:47 carregal Exp $ --- - -_COMPAT51 = "Compat-5.1 R5" - -local LUA_DIRSEP = '/' -local LUA_OFSEP = '_' -local OLD_LUA_OFSEP = '' -local POF = 'luaopen_' -local LUA_PATH_MARK = '?' -local LUA_IGMARK = ':' - -local assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type = assert, error, getfenv, ipairs, loadfile, loadlib, pairs, setfenv, setmetatable, type -local find, format, gfind, gsub, sub = string.find, string.format, string.gfind, string.gsub, string.sub - --- --- avoid overwriting the package table if it's already there --- -package = package or {} -local _PACKAGE = package - -package.path = LUA_PATH or os.getenv("LUA_PATH") or - ("./?.lua;" .. - "/usr/local/share/lua/5.0/?.lua;" .. - "/usr/local/share/lua/5.0/?/?.lua;" .. - "/usr/local/share/lua/5.0/?/init.lua" ) - -package.cpath = LUA_CPATH or os.getenv("LUA_CPATH") or - "./?.so;" .. - "./l?.so;" .. - "/usr/local/lib/lua/5.0/?.so;" .. - "/usr/local/lib/lua/5.0/l?.so" - --- --- make sure require works with standard libraries --- -package.loaded = package.loaded or {} -package.loaded.debug = debug -package.loaded.string = string -package.loaded.math = math -package.loaded.io = io -package.loaded.os = os -package.loaded.table = table -package.loaded.base = _G -package.loaded.coroutine = coroutine -local _LOADED = package.loaded - --- --- avoid overwriting the package.preload table if it's already there --- -package.preload = package.preload or {} -local _PRELOAD = package.preload - - --- --- looks for a file `name' in given path --- -local function findfile (name, pname) - name = gsub (name, "%.", LUA_DIRSEP) - local path = _PACKAGE[pname] - assert (type(path) == "string", format ("package.%s must be a string", pname)) - for c in gfind (path, "[^;]+") do - c = gsub (c, "%"..LUA_PATH_MARK, name) - local f = io.open (c) - if f then - f:close () - return c - end - end - return nil -- not found -end - - --- --- check whether library is already loaded --- -local function loader_preload (name) - assert (type(name) == "string", format ( - "bad argument #1 to `require' (string expected, got %s)", type(name))) - assert (type(_PRELOAD) == "table", "`package.preload' must be a table") - return _PRELOAD[name] -end - - --- --- Lua library loader --- -local function loader_Lua (name) - assert (type(name) == "string", format ( - "bad argument #1 to `require' (string expected, got %s)", type(name))) - local filename = findfile (name, "path") - if not filename then - return false - end - local f, err = loadfile (filename) - if not f then - error (format ("error loading module `%s' (%s)", name, err)) - end - return f -end - - -local function mkfuncname (name) - name = gsub (name, "^.*%"..LUA_IGMARK, "") - name = gsub (name, "%.", LUA_OFSEP) - return POF..name -end - -local function old_mkfuncname (name) - --name = gsub (name, "^.*%"..LUA_IGMARK, "") - name = gsub (name, "%.", OLD_LUA_OFSEP) - return POF..name -end - --- --- C library loader --- -local function loader_C (name) - assert (type(name) == "string", format ( - "bad argument #1 to `require' (string expected, got %s)", type(name))) - local filename = findfile (name, "cpath") - if not filename then - return false - end - local funcname = mkfuncname (name) - local f, err = loadlib (filename, funcname) - if not f then - funcname = old_mkfuncname (name) - f, err = loadlib (filename, funcname) - if not f then - error (format ("error loading module `%s' (%s)", name, err)) - end - end - return f -end - - -local function loader_Croot (name) - local p = gsub (name, "^([^.]*).-$", "%1") - if p == "" then - return - end - local filename = findfile (p, "cpath") - if not filename then - return - end - local funcname = mkfuncname (name) - local f, err, where = loadlib (filename, funcname) - if f then - return f - elseif where ~= "init" then - error (format ("error loading module `%s' (%s)", name, err)) - end -end - --- create `loaders' table -package.loaders = package.loaders or { loader_preload, loader_Lua, loader_C, loader_Croot, } -local _LOADERS = package.loaders - - --- --- iterate over available loaders --- -local function load (name, loaders) - -- iterate over available loaders - assert (type (loaders) == "table", "`package.loaders' must be a table") - for i, loader in ipairs (loaders) do - local f = loader (name) - if f then - return f - end - end - error (format ("module `%s' not found", name)) -end - --- sentinel -local sentinel = function () end - --- --- new require --- -function _G.require (modname) - assert (type(modname) == "string", format ( - "bad argument #1 to `require' (string expected, got %s)", type(name))) - local p = _LOADED[modname] - if p then -- is it there? - if p == sentinel then - error (format ("loop or previous error loading module '%s'", modname)) - end - return p -- package is already loaded - end - local init = load (modname, _LOADERS) - _LOADED[modname] = sentinel - local actual_arg = _G.arg - _G.arg = { modname } - local res = init (modname) - if res then - _LOADED[modname] = res - end - _G.arg = actual_arg - if _LOADED[modname] == sentinel then - _LOADED[modname] = true - end - return _LOADED[modname] -end - - --- findtable -local function findtable (t, f) - assert (type(f)=="string", "not a valid field name ("..tostring(f)..")") - local ff = f.."." - local ok, e, w = find (ff, '(.-)%.', 1) - while ok do - local nt = rawget (t, w) - if not nt then - nt = {} - t[w] = nt - elseif type(t) ~= "table" then - return sub (f, e+1) - end - t = nt - ok, e, w = find (ff, '(.-)%.', e+1) - end - return t -end - --- --- new package.seeall function --- -function _PACKAGE.seeall (module) - local t = type(module) - assert (t == "table", "bad argument #1 to package.seeall (table expected, got "..t..")") - local meta = getmetatable (module) - if not meta then - meta = {} - setmetatable (module, meta) - end - meta.__index = _G -end - - --- --- new module function --- -function _G.module (modname, ...) - local ns = _LOADED[modname] - if type(ns) ~= "table" then - ns = findtable (_G, modname) - if not ns then - error (string.format ("name conflict for module '%s'", modname)) - end - _LOADED[modname] = ns - end - if not ns._NAME then - ns._NAME = modname - ns._M = ns - ns._PACKAGE = gsub (modname, "[^.]*$", "") - end - setfenv (2, ns) - for i, f in ipairs (arg) do - f (ns) - end -end diff --git a/lang/luafilesystem/Makefile b/lang/luafilesystem/Makefile deleted file mode 100644 index 13abef6..0000000 --- a/lang/luafilesystem/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (C) 2008-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luafilesystem -PKG_VERSION:=1.6.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/keplerproject/luafilesystem.git -PKG_SOURCE_VERSION:=2fd989cd6c777583be1c93616018c55b2cbb1bcf -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/luafilesystem - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaFileSystem - URL:=http://keplerproject.github.com/luafilesystem/ - MAINTAINER:=W. Michael Petullo - DEPENDS:=+liblua -endef - -define Package/luafilesystem/description - This package contains the LuaFileSystem library, a set of portable - functions for directory creation, listing and deletion and for file - locking. -endef - -define Build/Configure -endef - -TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS) - -TARGET_LDFLAGS += -llua - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \ - LDFLAGS="$(TARGET_LDFLAGS)" - $(TARGET_CROSS)ar r $(PKG_BUILD_DIR)/src/luafilesystem.a $(PKG_BUILD_DIR)/src/lfs.o -endef - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR)/usr/include - $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lfs.h $(STAGING_DIR)/usr/include - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(STAGING_DIR)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/luafilesystem.a $(STAGING_DIR)/usr/lib/lua -endef - -define Package/luafilesystem/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(1)/usr/lib/lua/lfs.so -endef - -$(eval $(call BuildPackage,luafilesystem)) diff --git a/lang/lualanes/Makefile b/lang/lualanes/Makefile deleted file mode 100644 index 749709d..0000000 --- a/lang/lualanes/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2007-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lualanes -PKG_REV:=aa9bfcf2dd49f55f11b27e7c21d5b75d81ccfc7e -PKG_VERSION:=3.9.4 -PKG_RELEASE=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz -PKG_SOURCE_URL:=https://github.com/LuaLanes/lanes.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -PKG_BUILD_DEPENDS:=lua/host luac/host - -include $(INCLUDE_DIR)/package.mk - -define Package/lualanes - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaLanes - URL:=http://luaforge.net/projects/lanes/ - DEPENDS:=+lua +luac +liblua +libpthread - MAINTAINER:=Vladimir Malyutin -endef - -define Package/lualanes/description - Lanes is a lightweight, native, lazy evaluating multithreading library for Lua 5.1 and 5.2. -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) all \ - CC="$(TARGET_CC)" \ - LUA="$(STAGING_DIR_HOSTPKG)/bin/lua" \ - LUAC="$(STAGING_DIR_HOSTPKG)/bin/luac" \ - OPT_FLAGS="$(TARGET_CFLAGS) --std=c99 -Dpthread_yield=sched_yield" -endef - -define Package/lualanes/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lanes.lua $(1)/usr/lib/lua/ - $(INSTALL_DIR) $(1)/usr/lib/lua/lanes - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/lanes/core.so $(1)/usr/lib/lua/lanes/core.so -endef - -$(eval $(call BuildPackage,lualanes)) diff --git a/lang/lualanes/patches/100-musl-compat.patch b/lang/lualanes/patches/100-musl-compat.patch deleted file mode 100644 index ba3f49f..0000000 --- a/lang/lualanes/patches/100-musl-compat.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/threading.h b/src/threading.h -index bfa9ab8..7b3d6a1 100644 ---- a/src/threading.h -+++ b/src/threading.h -@@ -128,7 +128,7 @@ enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED }; - #endif // PLATFORM_WIN32 - #include - -- #ifdef PLATFORM_LINUX -+ #if defined(PLATFORM_LINUX) && defined(__UCLIBC__) - # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP - #else - /* OS X, ... */ diff --git a/lang/luaposix/Makefile b/lang/luaposix/Makefile deleted file mode 100644 index 9bf3628..0000000 --- a/lang/luaposix/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (C) 2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luaposix -PKG_VERSION:=v33.2.1 -PKG_RELEASE:=5 - -PKG_SOURCE:=release-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/luaposix/luaposix/archive/ -PKG_MD5SUM:=aa68b5c07ab1ecea81bb466c81e88056 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION) -PKG_REMOVE_FILES:=aclocal.m4 -PKG_FIXUP:=autoreconf -PKG_MAINTAINER:=Maxim Storchak -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/luaposix - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=luaposix - URL:=http://luaforge.net/projects/luaposix/ - DEPENDS:=+lua +librt - PKG_BUILD_DEPENDS:=+lua/host -endef - -define Package/luaposix/description - luaposix is a general POSIX library for Lua providing access - to various low level libc functions. -endef - -CONFIGURE_VARS += ac_cv_path_LDOC="true" - -TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99 -ifeq ($(CONFIG_USE_MUSL),y) - TARGET_CFLAGS += -D_POSIX_PRIORITY_SCHEDULING -endif - -ifneq ($(CONFIG_USE_GLIBC),) - ifeq ($(CONFIG_EGLIBC_OPTION_EGLIBC_UTMP),) - TARGET_CFLAGS += -DNO_GETLOGIN - endif -endif - - -define Package/luaposix/install - $(INSTALL_DIR) $(1)/usr/lib/lua/posix - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ext/posix/.libs/posix.so $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix.lua $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,luaposix)) diff --git a/lang/luaposix/patches/100-eglibc-compat.patch b/lang/luaposix/patches/100-eglibc-compat.patch deleted file mode 100644 index e4df63b..0000000 --- a/lang/luaposix/patches/100-eglibc-compat.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/ext/posix/unistd.c b/ext/posix/unistd.c -index 9276640..69c8cef 100644 ---- a/ext/posix/unistd.c -+++ b/ext/posix/unistd.c -@@ -525,6 +525,7 @@ Pgetgroups(lua_State *L) - #endif - - -+#ifndef NO_GETLOGIN - /*** - Current logged-in user. - @treturn[1] string username, if successful -@@ -537,6 +538,7 @@ Pgetlogin(lua_State *L) - checknargs(L, 0); - return pushstringresult(getlogin()); - } -+#endif - - - /*** -@@ -1044,7 +1046,9 @@ static const luaL_Reg posix_unistd_fns[] = - LPOSIX_FUNC( Pgetegid ), - LPOSIX_FUNC( Pgeteuid ), - LPOSIX_FUNC( Pgetgid ), -+#ifndef NO_GETLOGIN - LPOSIX_FUNC( Pgetlogin ), -+#endif - LPOSIX_FUNC( Pgetpgrp ), - LPOSIX_FUNC( Pgetpid ), - LPOSIX_FUNC( Pgetppid ), diff --git a/lang/luaposix/patches/101-disable-curses.patch b/lang/luaposix/patches/101-disable-curses.patch deleted file mode 100644 index 6412799..0000000 --- a/lang/luaposix/patches/101-disable-curses.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index dfd4199..19924d0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -153,15 +153,6 @@ AC_CHECK_LIB([rt], [clock_gettime]) - AC_SUBST([LIBRT], [$LIBS]) - LIBS=$save_LIBS - --## Curses --AX_WITH_CURSES --AC_ARG_VAR(CURSES_LIB, [linker flags for curses library]) -- --save_LIBS=$LIBS --LIBS="$CURSES_LIB $LIBS" --AC_CHECK_FUNCS([resizeterm]) --LIBS=$save_LIBS -- - ## Use system implementation, or bundled replacement? - AC_CHECK_FUNCS([strlcpy]) - -diff --git a/ext/posix/posix.c b/ext/posix/posix.c -index 6019df0..2d75487 100644 ---- a/ext/posix/posix.c -+++ b/ext/posix/posix.c -@@ -12,7 +12,6 @@ - - #include "bit32.c" - #include "ctype.c" --#include "curses.c" - #include "dirent.c" - #include "errno.c" - #include "fcntl.c" diff --git a/lang/luaposix/patches/102-disable-compat-deprecated.diff b/lang/luaposix/patches/102-disable-compat-deprecated.diff deleted file mode 100644 index 7c58be4..0000000 --- a/lang/luaposix/patches/102-disable-compat-deprecated.diff +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/lib/posix.lua.in b/lib/posix.lua.in -index 17ef39a..a248d9b 100644 ---- a/lib/posix.lua.in -+++ b/lib/posix.lua.in -@@ -35,15 +35,6 @@ for _, sub in ipairs { - end - end - -- ---- Inject deprecated APIs (overwriting submodules) for backwards compatibility. --for k, v in pairs (require "posix.deprecated") do -- M[k] = v --end --for k, v in pairs (require "posix.compat") do -- M[k] = v --end -- - M.version = "posix for " .. _VERSION .. " / @PACKAGE_STRING@" - - diff --git a/lang/luarocks/Makefile b/lang/luarocks/Makefile deleted file mode 100644 index 73dbde7..0000000 --- a/lang/luarocks/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luarocks -PKG_VERSION:=2.2.2 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/keplerproject/luarocks.git -PKG_SOURCE_VERSION:=v$(PKG_VERSION) - -PKG_MAINTAINER:=Amr Hassan -PKG_INSTALL=1 -PKG_BUILD_DEPENDS:=lua/host luac/host -PKG_LICENSE=GPL - -include $(INCLUDE_DIR)/package.mk - -define Package/luarocks - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=luarocks - URL:=https://github.com/keplerproject/luarocks - DEPENDS:=+lua +luac +liblua +luasocket +unzip +curl +luasec -endef - -define Package/luarocks/description - LuaRocks is a deployment and management system for Lua modules. -endef - -# My custom args, copied and modified from SDK_ROOT/include/package-defaults.mk -CONFIGURE_ARGS = \ - --prefix=$(CONFIGURE_PREFIX) \ - --sysconfdir=/etc \ - --with-lua=$(STAGING_DIR_HOSTPKG) - -CONFIGURE_VARS = \ - LUAROCKS_UNAME_S="Linux" \ - LUAROCKS_UNAME_M="$(ARCH)" - -define Build/Compile - $(call Build/Compile/Default,build) -endef - -define Package/luarocks/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-5.1 $(1)/usr/bin/luarocks - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luarocks-admin-5.1 $(1)/usr/bin/luarocks-admin - $(CP) $(PKG_INSTALL_DIR)/usr/share $(1)/usr/share - $(CP) $(PKG_INSTALL_DIR)/etc $(1)/etc -endef - -$(eval $(call BuildPackage,luarocks)) diff --git a/lang/luarocks/patches/01_dont_modify_bin_shebang.diff b/lang/luarocks/patches/01_dont_modify_bin_shebang.diff deleted file mode 100644 index a1bad21..0000000 --- a/lang/luarocks/patches/01_dont_modify_bin_shebang.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff -rupN luarocks/Makefile luarocks.new/Makefile ---- luarocks/Makefile 2015-02-19 13:24:07.027310956 +0200 -+++ luarocks.new/Makefile 2015-02-22 13:28:24.497353543 +0200 -@@ -104,7 +104,7 @@ build_bins: cleanup_bins - for f in $(BIN_FILES) ;\ - do \ - sed "1d" src/bin/$$f > src/bin/$$f.bak ;\ -- echo "#!$(LUA_BINDIR)/lua$(LUA_SUFFIX)" > src/bin/$$f ;\ -+ echo "#!/usr/bin/env lua" > src/bin/$$f ;\ - echo "package.path = [[$(LUADIR)/?.lua;]]..package.path" | sed "s,//,/,g" >> src/bin/$$f ;\ - cat src/bin/$$f.bak >> src/bin/$$f ;\ - chmod +x src/bin/$$f ;\ -Binary files luarocks/src/bin/.luarocks.swp and luarocks.new/src/bin/.luarocks.swp differ diff --git a/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch b/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch deleted file mode 100644 index 5c9c968..0000000 --- a/lang/luarocks/patches/02_allow_configure_uname_siteconfig_adjustment.patch +++ /dev/null @@ -1,37 +0,0 @@ -Index: luarocks-2.2.2/configure -=================================================================== ---- luarocks-2.2.2.orig/configure -+++ luarocks-2.2.2/configure -@@ -388,18 +388,22 @@ then - fi - - echo_n "Configuring for system... " --if uname -s --then -- LUAROCKS_UNAME_S=`uname -s` --else -- die "Could not determine operating system. 'uname -s' failed." -+if [ -z "$LUAROCKS_UNAME_S" ]; then -+ if uname -s -+ then -+ LUAROCKS_UNAME_S=`uname -s` -+ else -+ die "Could not determine operating system. 'uname -s' failed." -+ fi - fi - echo_n "Configuring for architecture... " --if uname -m --then -- LUAROCKS_UNAME_M=`uname -m` --else -- die "Could not determine processor architecture. 'uname -m' failed." -+if [ -z "$LUAROCKS_UNAME_M" ]; then -+ if uname -m -+ then -+ LUAROCKS_UNAME_M=`uname -m` -+ else -+ die "Could not determine processor architecture. 'uname -m' failed." -+ fi - fi - - for v in 5.1 5.2 5.3; do diff --git a/lang/luasec/Makefile b/lang/luasec/Makefile deleted file mode 100644 index b2bde57..0000000 --- a/lang/luasec/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (C) 2009-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luasec -PKG_VERSION:=0.6 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/brunoos/luasec/archive/ -PKG_MD5SUM:=14e1aef6d2aae96bbf98afc6b6634af2 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION) - -MAINTAINER:=W. Michael Petullo -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/luasec - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaSec - URL:=https://github.com/brunoos/luasec - DEPENDS:=+lua +libopenssl +luasocket -endef - -define Package/luasec/description - LuaSec is a binding for OpenSSL library to provide TLS/SSL communication. -endef - -define Build/Configure -endef - -MAKE_FLAGS += \ - INCDIR="$(TARGET_CPPFLAGS) -I." \ - LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \ - LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \ - LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" - -define Build/Compile -$(call Build/Compile/Default,linux) -endef - -define Package/luasec/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.so $(1)/usr/lib/lua/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl.lua $(1)/usr/lib/lua/ - $(INSTALL_DIR) $(1)/usr/lib/lua/ssl - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/lua/ssl/https.lua $(1)/usr/lib/lua/ssl/ -endef - -$(eval $(call BuildPackage,luasec)) diff --git a/lang/luasoap/Makefile b/lang/luasoap/Makefile deleted file mode 100644 index 6ebf03b..0000000 --- a/lang/luasoap/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luasoap -PKG_VERSION:=2014-08-21 -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/tomasguisasola/luasoap.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=af1e100281cee4b972df10121e37e51d53367a98 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_MD5SUM:= - -PKG_MAINTAINER:=Liu Peng -PKG_LICENSE:=MIT - -include $(INCLUDE_DIR)/package.mk - -define Package/luasoap - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaSOAP - URL:=https://github.com/tomasguisasola/luasoap - DEPENDS:=+lua +luaexpat +luasec +luasocket -endef - -define Package/luasoap/description - LuaSOAP is a library of functions to deal with SOAP. -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/luasoap/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/soap.lua $(1)/usr/lib/lua/ - $(INSTALL_DIR) $(1)/usr/lib/lua/soap - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{client,server}.lua $(1)/usr/lib/lua/soap/ - $(INSTALL_DIR) $(1)/usr/lib/lua/soap/client - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/client/https.lua $(1)/usr/lib/lua/soap/client/ - $(INSTALL_DIR) $(1)/usr/lib/lua/soap/tests - $(INSTALL_DATA) $(PKG_BUILD_DIR)/tests/test{,-http,-server}.lua $(1)/usr/lib/lua/soap/tests/ -endef - -$(eval $(call BuildPackage,luasoap)) diff --git a/lang/luasocket/Makefile b/lang/luasocket/Makefile deleted file mode 100644 index 5e7c983..0000000 --- a/lang/luasocket/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (C) 2009-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luasocket -PKG_SOURCE_VERSION:=6d5e40c324c84d9c1453ae88e0ad5bdd0a631448 -PKG_VERSION:=3.0-rc1-20130909 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/luasocket - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=LuaSocket - URL:=http://luasocket.luaforge.net/ - MAINTAINER:=W. Michael Petullo - DEPENDS:=+lua -endef - -define Package/luasocket/description - LuaSocket is the most comprehensive networking support - library for the Lua language. It provides easy access to - TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more. -endef - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/ \ - LIBDIR="$(TARGET_LDFLAGS)" \ - CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \ - LD="$(TARGET_CROSS)ld -shared" \ - all -endef - - -define Package/luasocket/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime.so.1.0.3 $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket.so.3.0-rc1 $(1)/usr/lib/lua - $(INSTALL_DIR) $(1)/usr/lib/lua/mime - ln -sf ../mime.so.1.0.3 $(1)/usr/lib/lua/mime/core.so - $(INSTALL_DIR) $(1)/usr/lib/lua/socket - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url,headers}.lua $(1)/usr/lib/lua/socket - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/unix.so $(1)/usr/lib/lua/socket - ln -sf ../socket.so.3.0-rc1 $(1)/usr/lib/lua/socket/core.so -endef - -$(eval $(call BuildPackage,luasocket)) diff --git a/lang/luasocket/patches/0001-Add-interface-support.patch b/lang/luasocket/patches/0001-Add-interface-support.patch deleted file mode 100644 index 3be42ed..0000000 --- a/lang/luasocket/patches/0001-Add-interface-support.patch +++ /dev/null @@ -1,237 +0,0 @@ -From 96fdf07acf78ecfc9be76a8b0591f38fe6f1a875 Mon Sep 17 00:00:00 2001 -From: Steven Barth -Date: Sat, 9 Nov 2013 12:01:42 +0100 -Subject: [PATCH] Add interface resolving - ---- - src/if.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/if.h | 27 ++++++++++++++ - src/luasocket.c | 2 + - src/makefile | 2 + - src/options.c | 9 +++++ - 5 files changed, 153 insertions(+) - create mode 100644 src/if.c - create mode 100644 src/if.h - -diff --git a/src/if.c b/src/if.c -new file mode 100644 -index 0000000..db231aa ---- /dev/null -+++ b/src/if.c -@@ -0,0 +1,113 @@ -+/* -+ * $Id: if.c $ -+ * -+ * Author: Markus Stenberg -+ * -+ * Copyright (c) 2012 cisco Systems, Inc. -+ * -+ * Created: Tue Dec 4 14:50:34 2012 mstenber -+ * Last modified: Wed Dec 5 18:51:08 2012 mstenber -+ * Edit time: 24 min -+ * -+ */ -+ -+#include -+#include -+#include -+ -+#include "if.h" -+ -+#include "lauxlib.h" -+ -+static int if_global_indextoname(lua_State *L); -+static int if_global_nametoindex(lua_State *L); -+static int if_global_nameindex(lua_State *L); -+ -+static luaL_Reg func[] = { -+ { "indextoname", if_global_indextoname}, -+ { "nametoindex", if_global_nametoindex}, -+ { "nameindex", if_global_nameindex}, -+ { NULL, NULL} -+}; -+ -+int if_open(lua_State *L) -+{ -+ lua_pushstring(L, "iface"); -+ lua_newtable(L); -+ luaL_openlib(L, NULL, func, 0); -+ lua_settable(L, -3); -+ return 0; -+} -+ -+int if_global_indextoname(lua_State *L) -+{ -+ unsigned int ifnumber; -+ const char *name; -+ char buf[IF_NAMESIZE+1]; -+ -+ if (!lua_isnumber(L, 1)) -+ { -+ lua_pushnil(L); -+ lua_pushstring(L, "indextoname expects only number argument"); -+ return 2; -+ } -+ ifnumber = lua_tonumber(L, 1); -+ if (!(name = if_indextoname(ifnumber, buf))) -+ { -+ lua_pushnil(L); -+ lua_pushstring(L, "nonexistent interface"); -+ return 2; -+ } -+ lua_pushstring(L, name); -+ return 1; -+} -+ -+int if_global_nametoindex(lua_State *L) -+{ -+ unsigned int ifnumber; -+ if (!lua_isstring(L, 1)) -+ { -+ lua_pushnil(L); -+ lua_pushstring(L, "nametoindex expects only string argument"); -+ return 2; -+ } -+ if (!(ifnumber = if_nametoindex(lua_tostring(L, 1)))) -+ { -+ lua_pushnil(L); -+ lua_pushstring(L, "nonexistent interface"); -+ return 2; -+ } -+ lua_pushnumber(L, ifnumber); -+ return 1; -+} -+ -+int if_global_nameindex(lua_State *L) -+{ -+ struct if_nameindex *ni, *oni; -+ int i = 1; -+ oni = ni = if_nameindex(); -+ lua_newtable(L); -+ while (ni && ni->if_index && *(ni->if_name)) -+ { -+ /* at result[i], we store.. */ -+ lua_pushnumber(L, i); -+ -+ /* new table with two items - index, name*/ -+ lua_newtable(L); -+ lua_pushstring(L, "index"); -+ lua_pushnumber(L, ni->if_index); -+ lua_settable(L, -3); -+ -+ lua_pushstring(L, "name"); -+ lua_pushstring(L, ni->if_name); -+ lua_settable(L, -3); -+ -+ /* Then, actually store it */ -+ lua_settable(L, -3); -+ -+ i++; -+ ni++; -+ } -+ if_freenameindex(oni); -+ return 1; -+} -diff --git a/src/if.h b/src/if.h -new file mode 100644 -index 0000000..dc7faf8 ---- /dev/null -+++ b/src/if.h -@@ -0,0 +1,27 @@ -+/* -+ * $Id: if.h $ -+ * -+ * Author: Markus Stenberg -+ * -+ * Copyright (c) 2012 cisco Systems, Inc. -+ * -+ * Created: Tue Dec 4 14:37:24 2012 mstenber -+ * Last modified: Tue Dec 4 14:51:43 2012 mstenber -+ * Edit time: 7 min -+ * -+ */ -+ -+/* This module provides Lua wrapping for the advanced socket API -+ * defined in RFC3542, or mainly, the access to the system's interface -+ * list. It is necessary for use of recvmsg/sendmsg. -+ * -+ * TODO - Do something clever with Windows? -+ */ -+#ifndef IF_H -+#define IF_H -+ -+#include "lua.h" -+ -+int if_open(lua_State *L); -+ -+#endif /* IF_H */ -diff --git a/src/luasocket.c b/src/luasocket.c -index e6ee747..85d41a6 100644 ---- a/src/luasocket.c -+++ b/src/luasocket.c -@@ -31,6 +31,7 @@ - #include "tcp.h" - #include "udp.h" - #include "select.h" -+#include "if.h" - - /*-------------------------------------------------------------------------*\ - * Internal function prototypes -@@ -51,6 +52,7 @@ static const luaL_Reg mod[] = { - {"tcp", tcp_open}, - {"udp", udp_open}, - {"select", select_open}, -+ {"iface", if_open}, - {NULL, NULL} - }; - -diff --git a/src/makefile b/src/makefile -index 8d3521e..09d4882 100644 ---- a/src/makefile -+++ b/src/makefile -@@ -262,6 +262,7 @@ SOCKET_OBJS= \ - auxiliar.$(O) \ - options.$(O) \ - inet.$(O) \ -+ if.$(O) \ - $(SOCKET) \ - except.$(O) \ - select.$(O) \ -@@ -387,6 +388,7 @@ auxiliar.$(O): auxiliar.c auxiliar.h - buffer.$(O): buffer.c buffer.h io.h timeout.h - except.$(O): except.c except.h - inet.$(O): inet.c inet.h socket.h io.h timeout.h usocket.h -+if.$(O): if.c if.h - io.$(O): io.c io.h timeout.h - luasocket.$(O): luasocket.c luasocket.h auxiliar.h except.h \ - timeout.h buffer.h io.h inet.h socket.h usocket.h tcp.h \ -diff --git a/src/options.c b/src/options.c -index 8ac2a14..1c73e6f 100644 ---- a/src/options.c -+++ b/src/options.c -@@ -3,6 +3,9 @@ - * LuaSocket toolkit - \*=========================================================================*/ - #include -+#include -+#include -+#include - - #include "lauxlib.h" - -@@ -285,6 +288,12 @@ static int opt_ip6_setmembership(lua_State *L, p_socket ps, int level, int name) - if (!lua_isnil(L, -1)) { - if (lua_isnumber(L, -1)) { - val.ipv6mr_interface = (unsigned int) lua_tonumber(L, -1); -+ } else if (lua_isstring(L, -1)) { -+ if (!(val.ipv6mr_interface = if_nametoindex(lua_tostring(L, -1)))) { -+ lua_pushnil(L); -+ lua_pushstring(L, "nonexistent interface"); -+ return 2; -+ } - } else - luaL_argerror(L, -1, "number 'interface' field expected"); - } --- -1.8.4.rc3 - diff --git a/lang/luasql/Makefile b/lang/luasql/Makefile deleted file mode 100644 index 135ebff..0000000 --- a/lang/luasql/Makefile +++ /dev/null @@ -1,118 +0,0 @@ -# -# Copyright (C) 2010-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luasql -PKG_VERSION:=2.3.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/keplerproject/luasql.git -PKG_SOURCE_VERSION:=v$(PKG_VERSION) - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=docs/us/license.html -PKG_MAINTAINER:=Nicolas Thill - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/luasql/Default - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua SQL binding - URL:=http://keplerproject.github.io/luasql/ - DEPENDS:= +lua -endef - -define Package/luasql/Default/description - LuaSQL is a simple interface from Lua to a DBMS. -endef - - -define Package/luasql-mysql -$(call Package/luasql/Default) - TITLE+= for MySQL - DEPENDS+= +libmysqlclient - VARIANT:=mysql -endef - -define Package/luasql-mysql/description -$(call Package/luasql/Default/description) - . - This package contains the MySQL binding. -endef - - -define Package/luasql-pgsql -$(call Package/luasql/Default) - TITLE+= for PostgreSQL - DEPENDS+= +libpq - VARIANT:=postgres -endef - -define Package/luasql-pgsql/description -$(call Package/luasql/Default/description) - . - This package contains the PostgreSQL binding. -endef - - -define Package/luasql-sqlite3 -$(call Package/luasql/Default) - TITLE+= for SQLite 3 - DEPENDS+= +libsqlite3 - VARIANT:=sqlite3 -endef - -define Package/luasql-sqlite3/description -$(call Package/luasql/Default/description) - . - This package contains the SQLite 3 binding. -endef - - -TARGET_CFLAGS += $(FPIC) -std=gnu99 -TARGET_CPPFLAGS += -DLUA_USE_LINUX - -ifeq ($(BUILD_VARIANT),mysql) - TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/mysql - TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz -endif - -ifeq ($(BUILD_VARIANT),postgres) - TARGET_LDFLAGS += -lpq -endif - -ifeq ($(BUILD_VARIANT),sqlite3) - TARGET_LDFLAGS += -lsqlite3 -lpthread -endif - -MAKE_FLAGS += \ - T="$(BUILD_VARIANT)" \ - DRIVER_INCS="$(TARGET_CPPFLAGS)" \ - DRIVER_LIBS="$(TARGET_LDFLAGS)" \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - lib - -define Package/Install/Default - $(INSTALL_DIR) $(1)/usr/lib/lua/luasql - $(CP) $(PKG_BUILD_DIR)/src/*.so $(1)/usr/lib/lua/luasql/ -endef - -Package/luasql-mysql/install = $(Package/Install/Default) -Package/luasql-pgsql/install = $(Package/Install/Default) -Package/luasql-sqlite3/install = $(Package/Install/Default) - -$(eval $(call BuildPackage,luasql-mysql)) -$(eval $(call BuildPackage,luasql-pgsql)) -$(eval $(call BuildPackage,luasql-sqlite3)) diff --git a/lang/lzmq/Makefile b/lang/lzmq/Makefile deleted file mode 100644 index b17b945..0000000 --- a/lang/lzmq/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lzmq -PKG_VERSION:=0.4.3 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Chang -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/zeromq/lzmq/tar.gz/v$(PKG_VERSION)? -PKG_MD5SUM:=c4e51a60a5a26987bdce59e45d674a9e - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/lzmq - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua ZeroMQ binding - URL:=https://github.com/moteus/lzmq/ - DEPENDS:= +lua +libzmq -endef - -define Package/lzmq/description - LZMQ is a Lua binding to ZeroMQ. -endef - -CMAKE_OPTIONS += \ - -DUSE_LUA=ON - -define Package/lzmq/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lzmq.so $(1)/usr/lib/lua/ - - $(INSTALL_DIR) $(1)/usr/lib/lua/lzmq - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lzmq/timer.so $(1)/usr/lib/lua/lzmq - $(CP) -R $(PKG_BUILD_DIR)/src/lua/lzmq/* $(1)/usr/lib/lua/lzmq -endef - -$(eval $(call BuildPackage,lzmq)) diff --git a/lang/micropython-lib/Makefile b/lang/micropython-lib/Makefile index 2f3fc61..4e02a73 100644 --- a/lang/micropython-lib/Makefile +++ b/lang/micropython-lib/Makefile @@ -8,20 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=micropython-lib -PKG_VERSION=1.8.6-$(PKG_SOURCE_VERSION) +PKG_VERSION:=1.9.3 PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/micropython/micropython-lib/tar.gz/v$(PKG_VERSION)? +PKG_HASH:=66e15380eb109613263beb6825b8eecb9191088270c1a59e8c7d922dd57183c7 + PKG_MAINTAINER:=Roger D PKG_LICENSE:=MIT, PSFL PKG_LICENSE_FILES:=LICENSE -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/micropython/micropython-lib.git -PKG_SOURCE_VERSION:=f81e979c56dddb771ad36ec381b7f2c6cd12111f - -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -42,13 +39,12 @@ define Package/micropython-lib/description endef MAKE_FLAGS:=\ - -C $(PKG_BUILD_DIR) \ - PREFIX=$(PKG_BUILD_DIR)/_install_tmp \ + PREFIX=$(PKG_BUILD_DIR)/_install_tmp/dist \ install define Package/micropython-lib/install $(INSTALL_DIR) $(1)/usr/lib/micropython - $(CP) $(PKG_BUILD_DIR)/_install_tmp/* $(1)/usr/lib/micropython + $(CP) $(PKG_BUILD_DIR)/_install_tmp/dist/* $(1)/usr/lib/micropython endef $(eval $(call BuildPackage,micropython-lib)) diff --git a/lang/micropython/Makefile b/lang/micropython/Makefile index 7ee5882..932ab94 100644 --- a/lang/micropython/Makefile +++ b/lang/micropython/Makefile @@ -8,20 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=micropython -PKG_VERSION=1.8.6-$(PKG_SOURCE_VERSION) +PKG_VERSION:=1.9.4 PKG_RELEASE:=1 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/micropython/micropython/releases/download/v$(PKG_VERSION) +PKG_HASH:=0db042011bffcbd65362b67eb3cca87eaefa9f2a55b747fa75e922c706b8ce1a + PKG_MAINTAINER:=Roger D PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/micropython/micropython.git -PKG_SOURCE_VERSION:=5a1d63fc14dae788f705403a43c2d8639b7dd9cd - -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -31,7 +28,7 @@ define Package/micropython SECTION:=lang CATEGORY:=Languages TITLE:=Micro Python - URL:=http://micropython.org + URL:=https://micropython.org DEPENDS:=+libffi endef @@ -41,17 +38,17 @@ define Package/micropython/description endef -MAKE_FLAGS += -C $(PKG_BUILD_DIR)/unix +MAKE_FLAGS += -C $(PKG_BUILD_DIR)/ports/unix FROZEN_MPY_DIR= define Build/Compile - $(call Build/Compile/Default,axtls) - $(call Build/Compile/Default) + $(call Build/Compile/Default,axtls) + $(call Build/Compile/Default) endef define Package/micropython/install $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/unix/micropython $(1)/usr/bin/micropython + $(INSTALL_BIN) $(PKG_BUILD_DIR)/ports/unix/micropython $(1)/usr/bin/micropython endef $(eval $(call BuildPackage,micropython)) diff --git a/lang/micropython/patches/000-Makefile-no-errors b/lang/micropython/patches/000-Makefile-no-errors deleted file mode 100644 index 765f3e7..0000000 --- a/lang/micropython/patches/000-Makefile-no-errors +++ /dev/null @@ -1,13 +0,0 @@ -Index: micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile -=================================================================== ---- micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755.orig/unix/Makefile 2016-11-17 02:43:13.000000000 +0100 -+++ micropython-1.5-20161117-e81a5353cb794b8d6c57317488e5db6a1c524755/unix/Makefile 2016-11-17 16:49:02.937809018 +0100 -@@ -21,7 +21,7 @@ - INC += -I$(BUILD) - - # compiler settings --CWARN = -Wall -Werror -+CWARN = -Wall - CWARN += -Wpointer-arith -Wuninitialized - CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA) - diff --git a/lang/micropython/patches/000-Makefile-no-errors.patch b/lang/micropython/patches/000-Makefile-no-errors.patch new file mode 100644 index 0000000..1ebfa43 --- /dev/null +++ b/lang/micropython/patches/000-Makefile-no-errors.patch @@ -0,0 +1,13 @@ +diff --git a/ports/unix/Makefile b/ports/unix/Makefile +index cbdd3f3..0ab157d 100644 +--- a/ports/unix/Makefile ++++ b/ports/unix/Makefile +@@ -21,7 +21,7 @@ INC += -I$(TOP) + INC += -I$(BUILD) + + # compiler settings +-CWARN = -Wall -Werror ++CWARN = -Wall + CWARN += -Wpointer-arith -Wuninitialized + CFLAGS = $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA) + diff --git a/lang/node-arduino-firmata/Makefile b/lang/node-arduino-firmata/Makefile deleted file mode 100644 index f4de0c0..0000000 --- a/lang/node-arduino-firmata/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (C) 2014 Arduino LLC -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=arduino-firmata -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.3.3 -PKG_RELEASE:=5 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/shokai/node-arduino-firmata.git -PKG_SOURCE_VERSION:=16e76007edf218d72df590adbd711ac6b7432845 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_BUILD_DEPENDS:=node/host -PKG_NODE_VERSION:=4.4.5 - -PKG_MAINTAINER:=John Crispin -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE.txt - -include $(INCLUDE_DIR)/package.mk - -define Package/node-arduino-firmata - DEPENDS:=+node - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - DEPENDS:=+node +node-serialport - TITLE:=Node.js package to access serial ports for reading and writing - URL:=https://www.npmjs.org/package/serialport -endef - -define Package/node-arduino-firmata/description - Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them! -endef - -define Build/Prepare - /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1 - $(Build/Patch) -endef - -EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \ - -define Build/Compile - $(MAKE_FLAGS) \ - npm_config_arch=$(CONFIG_ARCH) \ - npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \ - npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \ - PREFIX="$(PKG_INSTALL_DIR)/usr/" \ - npm install -g $(PKG_BUILD_DIR) -endef - -define Package/node-arduino-firmata/install - mkdir -p $(1)/usr/lib/node - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node - rm -rf $(1)/usr/lib/node/arduino-firmata/node_modules/serialport/ - $(CP) ./files/* $(1)/ -endef - -$(eval $(call BuildPackage,node-arduino-firmata)) - diff --git a/lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js b/lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js deleted file mode 100644 index 578bd40..0000000 --- a/lang/node-arduino-firmata/files/usr/lib/node/arduino-firmata/lib/arduino-firmata.js +++ /dev/null @@ -1,306 +0,0 @@ -(function() { - 'use strict'; - var ArduinoFirmata, SerialPort, debug, events, exports, serialport, - extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - hasProp = {}.hasOwnProperty; - - events = require('eventemitter2'); - - SerialPort = (serialport = require('serialport')).SerialPort; - - debug = require('debug')('arduino-firmata'); - - exports = module.exports = ArduinoFirmata = (function(superClass) { - extend(ArduinoFirmata, superClass); - - ArduinoFirmata.Status = { - CLOSE: 0, - OPEN: 1 - }; - - ArduinoFirmata.INPUT = 0; - - ArduinoFirmata.OUTPUT = 1; - - ArduinoFirmata.ANALOG = 2; - - ArduinoFirmata.PWM = 3; - - ArduinoFirmata.SERVO = 4; - - ArduinoFirmata.SHIFT = 5; - - ArduinoFirmata.I2C = 6; - - ArduinoFirmata.LOW = 0; - - ArduinoFirmata.HIGH = 1; - - ArduinoFirmata.MAX_DATA_BYTES = 32; - - ArduinoFirmata.DIGITAL_MESSAGE = 0x90; - - ArduinoFirmata.ANALOG_MESSAGE = 0xE0; - - ArduinoFirmata.REPORT_ANALOG = 0xC0; - - ArduinoFirmata.REPORT_DIGITAL = 0xD0; - - ArduinoFirmata.SET_PIN_MODE = 0xF4; - - ArduinoFirmata.REPORT_VERSION = 0xF9; - - ArduinoFirmata.SYSTEM_RESET = 0xFF; - - ArduinoFirmata.START_SYSEX = 0xF0; - - ArduinoFirmata.END_SYSEX = 0xF7; - - ArduinoFirmata.list = function(callback) { - return serialport.list(function(err, ports) { - var devices, j, len, port; - if (err) { - return callback(err); - } - devices = []; - for (j = 0, len = ports.length; j < len; j++) { - port = ports[j]; - if (/usb|acm|com\d+/i.test(port.comName)) { - devices.push(port.comName); - } - } - return callback(null, devices); - }); - }; - - function ArduinoFirmata() { - this.status = ArduinoFirmata.Status.CLOSE; - this.wait_for_data = 0; - this.execute_multi_byte_command = 0; - this.multi_byte_channel = 0; - this.stored_input_data = []; - this.parsing_sysex = false; - this.sysex_bytes_read = 0; - this.digital_output_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - this.digital_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - this.analog_input_data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - this.boardVersion = null; - } - - ArduinoFirmata.prototype.isOldArduinoDevice = function() { - return /usbserial|USB/.test(this.serialport_name); - }; - - ArduinoFirmata.prototype.connect = function(serialport_name, opts) { - this.serialport_name = serialport_name; - if (opts == null) { - opts = { - baudrate: 57600 - }; - } - opts.parser = serialport.parsers.raw; - if (!this.serialport_name) { - ArduinoFirmata.list((function(_this) { - return function(err, devices) { - return _this.connect(devices[0], opts); - }; - })(this)); - return this; - } - this.once('boardReady', function() { - var io_init_wait; - debug('boardReady'); - io_init_wait = this.isOldArduinoDevice() ? (debug("old arduino device found " + this.serialport_name), 3000) : (debug("new arduino device found " + this.serialport_name), 100); - debug("wait " + io_init_wait + "(msec)"); - return setTimeout((function(_this) { - return function() { - var i, j, k; - for (i = j = 0; j < 6; i = ++j) { - _this.write([ArduinoFirmata.REPORT_ANALOG | i, 1]); - } - for (i = k = 0; k < 2; i = ++k) { - _this.write([ArduinoFirmata.REPORT_DIGITAL | i, 1]); - } - debug('init IO ports'); - return _this.emit('connect'); - }; - })(this), io_init_wait); - }); - this.serialport = new SerialPort(this.serialport_name, opts); - this.serialport.once('open', (function(_this) { - return function() { - var cid; - cid = setInterval(function() { - debug('request REPORT_VERSION'); - return _this.write([ArduinoFirmata.REPORT_VERSION]); - }, 500); - _this.once('boardVersion', function(version) { - clearInterval(cid); - _this.status = ArduinoFirmata.Status.OPEN; - return _this.emit('boardReady'); - }); - return _this.serialport.on('data', function(data) { - var byte, j, len, results; - results = []; - for (j = 0, len = data.length; j < len; j++) { - byte = data[j]; - results.push(_this.process_input(byte)); - } - return results; - }); - }; - })(this)); - return this; - }; - - ArduinoFirmata.prototype.isOpen = function() { - return this.status === ArduinoFirmata.Status.OPEN; - }; - - ArduinoFirmata.prototype.close = function(callback) { - this.status = ArduinoFirmata.Status.CLOSE; - return this.serialport.close(callback); - }; - - ArduinoFirmata.prototype.reset = function(callback) { - return this.write([ArduinoFirmata.SYSTEM_RESET], callback); - }; - - ArduinoFirmata.prototype.write = function(bytes, callback) { - return this.serialport.write(bytes, callback); - }; - - ArduinoFirmata.prototype.sysex = function(command, data, callback) { - var write_data; - if (data == null) { - data = []; - } - data = data.map(function(i) { - return i & 0x7f; - }); - write_data = [ArduinoFirmata.START_SYSEX, command].concat(data, [ArduinoFirmata.END_SYSEX]); - return this.write(write_data, callback); - }; - - ArduinoFirmata.prototype.pinMode = function(pin, mode, callback) { - switch (mode) { - case true: - mode = ArduinoFirmata.OUTPUT; - break; - case false: - mode = ArduinoFirmata.INPUT; - } - return this.write([ArduinoFirmata.SET_PIN_MODE, pin, mode], callback); - }; - - ArduinoFirmata.prototype.digitalWrite = function(pin, value, callback) { - var port_num; - this.pinMode(pin, ArduinoFirmata.OUTPUT); - port_num = (pin >>> 3) & 0x0F; - if (value === 0 || value === false) { - this.digital_output_data[port_num] &= ~(1 << (pin & 0x07)); - } else { - this.digital_output_data[port_num] |= 1 << (pin & 0x07); - } - return this.write([ArduinoFirmata.DIGITAL_MESSAGE | port_num, this.digital_output_data[port_num] & 0x7F, this.digital_output_data[port_num] >>> 7], callback); - }; - - ArduinoFirmata.prototype.analogWrite = function(pin, value, callback) { - value = Math.floor(value); - this.pinMode(pin, ArduinoFirmata.PWM); - return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), value & 0x7F, value >>> 7], callback); - }; - - ArduinoFirmata.prototype.servoWrite = function(pin, angle, callback) { - this.pinMode(pin, ArduinoFirmata.SERVO); - return this.write([ArduinoFirmata.ANALOG_MESSAGE | (pin & 0x0F), angle & 0x7F, angle >>> 7], callback); - }; - - ArduinoFirmata.prototype.digitalRead = function(pin) { - return ((this.digital_input_data[pin >>> 3] >>> (pin & 0x07)) & 0x01) > 0; - }; - - ArduinoFirmata.prototype.analogRead = function(pin) { - return this.analog_input_data[pin]; - }; - - ArduinoFirmata.prototype.process_input = function(input_data) { - var analog_value, command, diff, i, j, old_analog_value, results, stat, sysex_command, sysex_data; - if (this.parsing_sysex) { - if (input_data === ArduinoFirmata.END_SYSEX) { - this.parsing_sysex = false; - sysex_command = this.stored_input_data[0]; - sysex_data = this.stored_input_data.slice(1, this.sysex_bytes_read); - return this.emit('sysex', { - command: sysex_command, - data: sysex_data - }); - } else { - this.stored_input_data[this.sysex_bytes_read] = input_data; - return this.sysex_bytes_read += 1; - } - } else if (this.wait_for_data > 0 && input_data < 128) { - this.wait_for_data -= 1; - this.stored_input_data[this.wait_for_data] = input_data; - if (this.execute_multi_byte_command !== 0 && this.wait_for_data === 0) { - switch (this.execute_multi_byte_command) { - case ArduinoFirmata.DIGITAL_MESSAGE: - input_data = (this.stored_input_data[0] << 7) + this.stored_input_data[1]; - diff = this.digital_input_data[this.multi_byte_channel] ^ input_data; - this.digital_input_data[this.multi_byte_channel] = input_data; - if (this.listeners('digitalChange').length > 0) { - results = []; - for (i = j = 0; j <= 13; i = ++j) { - if (((0x01 << i) & diff) > 0) { - stat = (input_data & diff) > 0; - results.push(this.emit('digitalChange', { - pin: i + this.multi_byte_channel * 8, - value: stat, - old_value: !stat - })); - } else { - results.push(void 0); - } - } - return results; - } - break; - case ArduinoFirmata.ANALOG_MESSAGE: - analog_value = (this.stored_input_data[0] << 7) + this.stored_input_data[1]; - old_analog_value = this.analogRead(this.multi_byte_channel); - this.analog_input_data[this.multi_byte_channel] = analog_value; - if (old_analog_value !== analog_value) { - return this.emit('analogChange', { - pin: this.multi_byte_channel, - value: analog_value, - old_value: old_analog_value - }); - } - break; - case ArduinoFirmata.REPORT_VERSION: - this.boardVersion = this.stored_input_data[1] + "." + this.stored_input_data[0]; - return this.emit('boardVersion', this.boardVersion); - } - } - } else { - if (input_data < 0xF0) { - command = input_data & 0xF0; - this.multi_byte_channel = input_data & 0x0F; - } else { - command = input_data; - } - if (command === ArduinoFirmata.START_SYSEX) { - this.parsing_sysex = true; - return this.sysex_bytes_read = 0; - } else if (command === ArduinoFirmata.DIGITAL_MESSAGE || command === ArduinoFirmata.ANALOG_MESSAGE || command === ArduinoFirmata.REPORT_VERSION) { - this.wait_for_data = 2; - return this.execute_multi_byte_command = command; - } - } - }; - - return ArduinoFirmata; - - })(events.EventEmitter2); - -}).call(this); diff --git a/lang/node-arduino-firmata/patches/000-new-serialport.patch b/lang/node-arduino-firmata/patches/000-new-serialport.patch deleted file mode 100644 index 10eab64..0000000 --- a/lang/node-arduino-firmata/patches/000-new-serialport.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/package.json -+++ b/package.json -@@ -30,7 +30,6 @@ - "author": "Sho Hashimoto ", - "license": "MIT", - "dependencies": { -- "serialport": "*", - "eventemitter2": "*", - "debug": "*" - }, diff --git a/lang/node-cylon/Makefile b/lang/node-cylon/Makefile deleted file mode 100644 index 13833a3..0000000 --- a/lang/node-cylon/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -# -# Copyright (C) 2014 Arduino LLC -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=cylon -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.22.0 -PKG_RELEASE:=5 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/hybridgroup/cylon-firmata.git -PKG_SOURCE_VERSION:=0c37da77e48b3e2cc3a8d566822a17689de91b40 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_BUILD_DEPENDS:=node/host -PKG_NODE_VERSION:=4.4.5 - -PKG_MAINTAINER:=John Crispin -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/node-cylon/default - DEPENDS:=+node $(2) - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=CylonJS - $(1) - URL:=https://www.npmjs.org/package/cylon -endef - -define Package/node-cylon - $(call Package/node-cylon/default,Core) -endef - -define Package/node-cylon-i2c - $(call Package/node-cylon/default,I2C,+node-cylon) -endef - -define Package/node-cylon-gpio - $(call Package/node-cylon/default,GPIO,+node-cylon) -endef - -define Package/node-cylon-firmata - $(call Package/node-cylon/default,Firmata,+node-cylon-gpio +node-cylon-i2c +node-arduino-firmata) -endef - -define Package/node-cylon/description - JavaScript Robotics, By Your Command Next generation robotics framework with support for 36 different platforms Get Started -endef - -define Build/Prepare - /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1 - $(Build/Patch) -endef - -EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \ - -define Build/Compile - $(MAKE_FLAGS) \ - npm_config_arch=$(CONFIG_ARCH) \ - npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \ - npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \ - PREFIX="$(PKG_INSTALL_DIR)/usr/" \ - npm install -g $(PKG_BUILD_DIR) -endef - -define Package/node-cylon/install - mkdir -p $(1)/usr/lib/node/cylon - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon/* $(1)/usr/lib/node/cylon/ -endef - -define Package/node-cylon-i2c/install - mkdir -p $(1)/usr/lib/node/cylon-i2c - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-i2c/* $(1)/usr/lib/node/cylon-i2c/ -endef - -define Package/node-cylon-gpio/install - mkdir -p $(1)/usr/lib/node/cylon-gpio - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/node_modules/cylon-gpio/* $(1)/usr/lib/node/cylon-gpio/ -endef - -define Package/node-cylon-firmata/install - mkdir -p $(1)/usr/lib/node/cylon-firmata - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/cylon-firmata/{index.js,lib,LICENSE,package.json,README.md,RELEASES.md,spec} $(1)/usr/lib/node/cylon-firmata/ -endef - -$(eval $(call BuildPackage,node-cylon)) -$(eval $(call BuildPackage,node-cylon-i2c)) -$(eval $(call BuildPackage,node-cylon-gpio)) -$(eval $(call BuildPackage,node-cylon-firmata)) - diff --git a/lang/node-cylon/patches/0001-serialport.patch b/lang/node-cylon/patches/0001-serialport.patch deleted file mode 100644 index 08d579c..0000000 --- a/lang/node-cylon/patches/0001-serialport.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: node-cylon-0.22.0/package.json -=================================================================== ---- node-cylon-0.22.0.orig/package.json 2015-10-20 20:32:48.000000000 +0200 -+++ node-cylon-0.22.0/package.json 2015-10-21 10:42:20.616109122 +0200 -@@ -38,7 +38,6 @@ - }, - - "dependencies": { -- "firmata": ">= 0.3.2", - "cylon": "1.1.0", - "cylon-gpio": "0.26.0", - "cylon-i2c": "0.22.0" diff --git a/lang/node-hid/Makefile b/lang/node-hid/Makefile deleted file mode 100644 index b8a5b7a..0000000 --- a/lang/node-hid/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=hid -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=0.5.1 -PKG_RELEASE:=5 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/node-hid/node-hid.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=35d830b7810c87d32484d0a346621568c4849441 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_BUILD_DEPENDS:=node/host -PKG_NODE_VERSION:=4.4.5 - -PKG_MAINTAINER:=John Crispin -PKG_LICENSE:=Custom -PKG_LICENSE_FILES:= - -include $(INCLUDE_DIR)/package.mk - -define Package/node-hid - DEPENDS:=+node - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - DEPENDS:=+libusb-1.0 +hidapi +libstdcpp - TITLE:=Node.js package to access HID devices - URL:=https://github.com/node-hid/node-hid -endef - -define Package/node-hid/description - Node.js package to access HID devices -endef - -CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))) - -EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/libusb-1.0 - -define Build/Compile - git init $(PKG_BUILD_DIR) - $(MAKE_VARS) \ - $(MAKE_FLAGS) \ - npm_config_arch=$(CONFIG_ARCH) \ - npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \ - npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \ - PREFIX="$(PKG_INSTALL_DIR)/usr/" \ - npm install --build-from-source --target_arch=$(CPU) -g $(PKG_BUILD_DIR) -endef - -define Package/node-hid/install - mkdir -p $(1)/usr/lib/node/node-hid/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/ -endef - -$(eval $(call BuildPackage,node-hid)) - diff --git a/lang/node-serialport/Makefile b/lang/node-serialport/Makefile deleted file mode 100644 index 3109404..0000000 --- a/lang/node-serialport/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2014 Arduino LLC -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NPM_NAME:=serialport -PKG_NAME:=node-$(PKG_NPM_NAME) -PKG_VERSION:=3.0.0 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NPM_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/ -PKG_MD5SUM:=ea20a17746dd64e72d5f6f2019d9e28d - -PKG_BUILD_DEPENDS:=node/host -PKG_NODE_VERSION:=4.4.5 - -PKG_MAINTAINER:=John Crispin -PKG_LICENSE:=Custom -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/node-serialport - DEPENDS:=+node - SUBMENU:=Node.js - SECTION:=lang - CATEGORY:=Languages - TITLE:=Node.js package to access serial ports for reading and writing - URL:=https://www.npmjs.org/package/serialport -endef - -define Package/node-serialport/description - Node.js package to access serial ports for reading and writing OR Welcome your robotic JavaScript overlords. Better yet, program them! -endef - -define Build/Prepare - /bin/tar xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components 1 - $(Build/Patch) -endef - -CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH))) - -EXTRA_LDFLAGS="-L$(TOOLCHAIN_DIR)/lib/ -Wl,-rpath-link $(TOOLCHAIN_DIR)/lib/" \ - -define Build/Compile - $(MAKE_FLAGS) \ - npm_config_arch=$(CONFIG_ARCH) \ - npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \ - npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \ - PREFIX="$(PKG_INSTALL_DIR)/usr/" \ - npm install --build-from-source --target_arch=$(CPU) -g $(PKG_BUILD_DIR) -endef - -define Package/node-serialport/install - mkdir -p $(1)/usr/lib/node/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/* $(1)/usr/lib/node/ -endef - -$(eval $(call BuildPackage,node-serialport)) - diff --git a/lang/node/Makefile b/lang/node/Makefile deleted file mode 100644 index 3a1a2f3..0000000 --- a/lang/node/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=node -PKG_VERSION:=v4.4.5 -PKG_RELEASE:=1 - -PKG_SOURCE:=node-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION} -PKG_MD5SUM:=376140907bbe362f36065a30af04f020 - -HOST_BUILD_DEPENDS:=python/host -PKG_BUILD_DEPENDS:=python/host -PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 - -HOST_BUILD_PARALLEL:=1 -PKG_BUILD_PARALLEL:=1 - -PKG_MAINTAINER:=John Crispin -PKG_LICENSE:= - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/node - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Node.js - TITLE:=Node.js is a platform built on Chrome's JavaScript runtime - URL:=http://nodejs.org/ - DEPENDS:=+libpthread +librt +libstdcpp +libopenssl +zlib -endef - -define Package/node/description - Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses - an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' - package ecosystem, npm, is the largest ecosystem of open source libraries in the world. -endef - -CPU:=$(subst aarch64,arm64,$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))) - -MAKE_VARS += \ - DESTCPU=$(CPU) - -CONFIGURE_ARGS= \ - --dest-cpu=$(CPU) \ - --dest-os=linux \ - --without-snapshot \ - --shared-zlib \ - --shared-openssl \ - --prefix=/usr - -ifneq ($(findstring arm,$(ARCH)),) -CONFIGURE_ARGS+= \ - $(if $(CONFIG_SOFT_FLOAT),--with-arm-float-abi=soft,--with-arm-float-abi=hard) -endif - -ifneq ($(findstring mips,$(ARCH)),) -CONFIGURE_ARGS+= \ - $(if $(CONFIG_SOFT_FLOAT),--with-mips-float-abi=soft,--with-mips-float-abi=hard) -endif - -HOST_CONFIGURE_VARS:= - -HOST_CONFIGURE_ARGS:= \ - --dest-os=linux \ - --without-snapshot \ - --prefix=$(STAGING_DIR_HOSTPKG) - -HOST_CONFIGURE_CMD:=python ./configure - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ -endef - -define Package/node/install - mkdir -p $(1)/usr/bin $(1)/usr/lib/node_modules/npm/{bin,lib,node_modules} - $(CP) $(PKG_INSTALL_DIR)/usr/bin/{node,npm} $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/{package.json,LICENSE,cli.js} $(1)/usr/lib/node_modules/npm - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/bin/npm-cli.js $(1)/usr/lib/node_modules/npm/bin - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/lib/* $(1)/usr/lib/node_modules/npm/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/node_modules/npm/node_modules/* $(1)/usr/lib/node_modules/npm/node_modules/ -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,node)) diff --git a/lang/node/patches/001-hardfloat.patch b/lang/node/patches/001-hardfloat.patch deleted file mode 100644 index 1bb2493..0000000 --- a/lang/node/patches/001-hardfloat.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/deps/v8/src/base/cpu.cc b/deps/v8/src/base/cpu.cc -index 4f58720..1f3071e 100644 ---- a/deps/v8/src/base/cpu.cc -+++ b/deps/v8/src/base/cpu.cc -@@ -143,6 +143,7 @@ int __detect_fp64_mode(void) { - ".set push\n\t" - ".set noreorder\n\t" - ".set oddspreg\n\t" -+ ".set hardfloat\n\t" - "lui $t0, 0x3FF0\n\t" - "ldc1 $f0, %0\n\t" - "mtc1 $t0, $f1\n\t" diff --git a/lang/node/patches/002-addr_info.patch b/lang/node/patches/002-addr_info.patch deleted file mode 100644 index 0aa02da..0000000 --- a/lang/node/patches/002-addr_info.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/deps/uv/src/unix/getaddrinfo.c -+++ b/deps/uv/src/unix/getaddrinfo.c -@@ -99,6 +99,7 @@ static void uv__getaddrinfo_work(struct - int err; - - req = container_of(w, uv_getaddrinfo_t, work_req); -+ req->hints->ai_flags &= ~AI_V4MAPPED; - err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo); - req->retcode = uv__getaddrinfo_translate_error(err); - } diff --git a/lang/node/patches/003-path.patch b/lang/node/patches/003-path.patch deleted file mode 100644 index 01a71c6..0000000 --- a/lang/node/patches/003-path.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/lib/module.js -+++ b/lib/module.js -@@ -453,7 +453,8 @@ Module._initPaths = function() { - homeDir = process.env.HOME; - } - -- var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; -+ var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node'), -+ path.resolve(process.execPath, '..', '..', 'lib', 'node_modules')]; - - if (homeDir) { - paths.unshift(path.resolve(homeDir, '.node_libraries')); diff --git a/lang/openpyxl/Makefile b/lang/openpyxl/Makefile deleted file mode 100644 index 6656d56..0000000 --- a/lang/openpyxl/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openpyxl -PKG_VERSION:=2.4.0 -PKG_RELEASE:=1 -PKG_LICENSE:=MIT - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/7e/75/9bb309f80e4f75d139ecc55e9edf65c5844336b5a84966a609267255f961/ -PKG_MD5SUM:=e3376d1fce0681fd0b4047ab89218af4 -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/openpyxl - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - MAINTAINER:=Gergely Kiss - TITLE:=A Python library to read/write Excel 2010 xlsx/xlsm files - URL:=https://openpyxl.readthedocs.org/ - DEPENDS:=+python +django -endef - -define Package/openpyxl/description - A Python library to read/write Excel 2010 xlsx/xlsm files -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR)) -endef - -define Package/openpyxl/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR) -endef - -$(eval $(call BuildPackage,openpyxl)) diff --git a/lang/perl-cgi/Makefile b/lang/perl-cgi/Makefile deleted file mode 100644 index eaca425..0000000 --- a/lang/perl-cgi/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-cgi -PKG_VERSION:=4.35 -PKG_RELEASE:=2 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO -PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=15e63942c02354426b25f056f2a4467c - -PKG_LICENSE:=GPL Artistic-2.0 -PKG_MAINTAINER:=Marcel Denia , \ - Philip Prindeville - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/CGI-$(PKG_VERSION) - -# don't strip comments because that will mangle this module -PKG_LEAVE_COMMENTS:=1 - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-cgi - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Handle Common Gateway Interface requests and responses - URL:=http://search.cpan.org/dist/CGI/ - DEPENDS:=perl +perl-html-parser +perlbase-base +perlbase-config +perlbase-encode +perlbase-essential +perlbase-file +perlbase-if +perlbase-utf8 -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-cgi/install - $(call perlmod/Install,$(1),CGI CGI.pm auto/CGI) -endef - - -$(eval $(call BuildPackage,perl-cgi)) diff --git a/lang/perl-compress-bzip2/Makefile b/lang/perl-compress-bzip2/Makefile deleted file mode 100644 index 2876646..0000000 --- a/lang/perl-compress-bzip2/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2014, 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-compress-bzip2 -PKG_VERSION:=2.24 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/R/RU/RURBAN/ -PKG_SOURCE:=Compress-Bzip2-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=d5ef04d1e51fe45743b3044abad967d2 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Compress-Bzip2-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-compress-bzip2 - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Perl interface to bzip2 compression library - URL:=http://search.cpan.org/dist/Compress-Bzip2/ - DEPENDS:=perl +libbz2 +perlbase-autoloader +perlbase-config +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-getopt +perlbase-test +perlbase-xsloader -endef - -define Build/Configure - $(call perlmod/Configure,,BUILD_BZLIB=0) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-compress-bzip2/install - $(call perlmod/Install,$(1),Compress auto/Compress) -endef - - -$(eval $(call BuildPackage,perl-compress-bzip2)) diff --git a/lang/perl-dbi/Makefile b/lang/perl-dbi/Makefile deleted file mode 100644 index 3c594d1..0000000 --- a/lang/perl-dbi/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2014, 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-dbi -PKG_VERSION:=1.634 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TIMB/ -PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=4ad15a9c2cc9b68e3fe1f5cadf9cdb30 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/DBI-$(PKG_VERSION) -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/DBI-$(PKG_VERSION) - -HOST_BUILD_DEPENDS:=perl/host - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk -include ../perl/perlmod.mk - -define Package/perl-dbi - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Database independent interface for Perl - URL:=http://search.cpan.org/dist/DBI/ - DEPENDS:=perl +perlbase-base +perlbase-config +perlbase-cwd +perlbase-data +perlbase-dynaloader +perlbase-errno +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-io +perlbase-ipc +perlbase-scalar +perlbase-storable +perlbase-symbol +perlbase-tie +perlbase-universal +perlbase-utf8 -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Host/Configure - $(call perlmod/host/Configure,,) -endef - -define Host/Compile - $(call perlmod/host/Compile,,) -endef - -define Host/Install - $(call perlmod/host/Install,$(1),) -endef - -define Package/perl-dbi/install - $(call perlmod/Install,$(1),DB* auto/DBI,DBI/W32ODBC.pm auto/DBI/*.h) -endef - - -$(eval $(call BuildPackage,perl-dbi)) -$(eval $(call HostBuild)) diff --git a/lang/perl-device-serialport/Makefile b/lang/perl-device-serialport/Makefile deleted file mode 100644 index 2069bed..0000000 --- a/lang/perl-device-serialport/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2014, 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-device-serialport -PKG_VERSION:=1.04 -PKG_RELEASE:=3 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CO/COOK/ -PKG_SOURCE:=Device-SerialPort-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=82c698151f934eb28c65d1838cee7d9e - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Paul Oranje - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Device-SerialPort-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-device-serialport - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=A POSIX-based version of the Win32::SerialPort module - URL:=http://search.cpan.org/dist/Device-SerialPort/ - DEPENDS:=perl +perlbase-essential +perlbase-io +perlbase-posix +perlbase-test +perlbase-xsloader -endef - -define Package/perl-device-serialport/description - A POSIX-based version of the Win32::SerialPort module - that provides modem support to Perl applications -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-device-serialport/install - $(call perlmod/Install,$(1),Device auto/Device) -endef - - -$(eval $(call BuildPackage,perl-device-serialport)) diff --git a/lang/perl-device-usb/Makefile b/lang/perl-device-usb/Makefile deleted file mode 100644 index 0a2c737..0000000 --- a/lang/perl-device-usb/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-device-usb -PKG_VERSION:=0.36 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GW/GWADEJ/ -PKG_SOURCE:=Device-USB-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=aa91bee777f7ed7a18225a84f8795344 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Device-USB-$(PKG_VERSION) -PKG_BUILD_DEPENDS:=perl-inline-c/host - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-device-usb - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=libusb library wrapper - URL:=http://search.cpan.org/dist/Device-USB/ - DEPENDS:=perl +libusb-compat +perl-inline +perl-inline-c +perlbase-essential +perlbase-test -endef - -# Device::USB will generate a second Makefile.PL to build it's native code -# using Inline::C under _Inline/. The goal here is to prevent Inline::C from -# running that one automatically, as we need to supply a bunch of overrides via -# perlmod/Configure. -# _INLINE_C_NO_COMPILE_ is an OpenWRT-specific environment variable to Inline::C -# that does just that. -define Build/Configure - $(call perlmod/Configure,,) - - # Prepare a library directory where we can link againt lusb-0.1(as - # opposed to -lusb) to avoid confusion at runtime - mkdir $(PKG_BUILD_DIR)/syslib - $(LN) $(STAGING_DIR)/usr/lib/libusb.so $(PKG_BUILD_DIR)/syslib/libusb-0.1.so - - # Generate _Inline - $(call perlmod/Compile,config,LIBUSB_LIBDIR=$(PKG_BUILD_DIR)/syslib \ - _INLINE_C_NO_COMPILE_=1 \ - _INLINE_C_SYSTEM_TYPEMAP_=$(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/ExtUtils/typemap) - $(call perlmod/Compile,dynamic,_INLINE_C_NO_COMPILE_=1) - - # Configure _Inline - $(call perlmod/Configure,,,$(PKG_BUILD_DIR)/_Inline/build/Device/USB) - - # Prevent re-configuring Inline code - sed 's/^dynamic :: D.*$$$$//' -i $(PKG_BUILD_DIR)/Makefile -endef - -define Build/Compile - $(call perlmod/Compile,,,$(PKG_BUILD_DIR)/_Inline/build/Device/USB) - $(call perlmod/Compile,,) -endef - -define Package/perl-device-usb/install - $(call perlmod/Install,$(1),Device auto/Device) -endef - - -$(eval $(call BuildPackage,perl-device-usb)) diff --git a/lang/perl-device-usb/README.patches b/lang/perl-device-usb/README.patches deleted file mode 100644 index 66ece00..0000000 --- a/lang/perl-device-usb/README.patches +++ /dev/null @@ -1,8 +0,0 @@ -This package contains some patches taken directly from Debian Jessie(stable at -the time of writing). -Namely, these are: -- 100-fix_buildsystem.patch -- 110-just_assume_libusb_is_there.diff - -The other patches are specific to OpenWRT, fixing bugs and resolving conflicts -where necessary. \ No newline at end of file diff --git a/lang/perl-device-usb/patches/100-fix_buildsystem.patch b/lang/perl-device-usb/patches/100-fix_buildsystem.patch deleted file mode 100644 index 5201894..0000000 --- a/lang/perl-device-usb/patches/100-fix_buildsystem.patch +++ /dev/null @@ -1,20 +0,0 @@ -Description: Ignore files we do not want installed. -Forwarded: not-needed -Author: Tim Retout -Reviewed-by: gregor herrmann -Last-Update: 2013-10-28 - ---- a/Makefile.PL -+++ b/Makefile.PL -@@ -2,6 +2,11 @@ - use warnings; - use Inline::MakeMaker; - -+sub MY::libscan { -+ return if ($_[1] eq 'USB.pm' or $_[1] eq 'dump_usb.pl'); -+ return $_[1]; -+} -+ - if($^O eq 'MSWin32') - { - if(!$ENV{LIBUSB_LIBDIR} or !$ENV{LIBUSB_INCDIR}) diff --git a/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff b/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff deleted file mode 100644 index 9365eb4..0000000 --- a/lang/perl-device-usb/patches/110-just_assume_libusb_is_there.diff +++ /dev/null @@ -1,30 +0,0 @@ -Subject: Just assume libusb is out there - Makefile.PL should not try to check for libusb in a given list of directories - as the compiler might look in other places as well. -Origin: vendor -Bug-Debian: http://bugs.debian.org/639677 -Forwarded: not-needed -From: Ansgar Burchardt -Reviewed-by: gregor herrmann -Last-Update: 2013-10-28 - ---- libdevice-usb-perl.orig/Makefile.PL -+++ libdevice-usb-perl/Makefile.PL -@@ -21,7 +21,7 @@ - } - } - --unless(header_found()) -+unless(1 || header_found()) - { - die <<"END"; - ERROR: Can't find usb.h header. -@@ -36,7 +36,7 @@ - END - } - --unless(lib_found()) -+unless(1 || lib_found()) - { - die <<"END"; - ERROR: Can't find libusb library. diff --git a/lang/perl-device-usb/patches/120-use_libusb_0_1.patch b/lang/perl-device-usb/patches/120-use_libusb_0_1.patch deleted file mode 100644 index 7d43e73..0000000 --- a/lang/perl-device-usb/patches/120-use_libusb_0_1.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/lib/Device/USB.pm -+++ b/lib/Device/USB.pm -@@ -9,8 +9,8 @@ use Inline ( - C => "DATA", - ($ENV{LIBUSB_LIBDIR} - ? ( LIBS => "-L\"$ENV{LIBUSB_LIBDIR}\" " . -- ($^O eq 'MSWin32' ? ' -llibusb -L\"$ENV{WINDDK}\\lib\\crt\\i386\" -lmsvcrt ' : '-lusb') ) -- : ( LIBS => '-lusb', ) -+ ($^O eq 'MSWin32' ? ' -llibusb -L\"$ENV{WINDDK}\\lib\\crt\\i386\" -lmsvcrt ' : '-lusb-0.1') ) -+ : ( LIBS => '-lusb-0.1', ) - ), - ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ), - NAME => 'Device::USB', diff --git a/lang/perl-device-usb/patches/130-provide-proper-library-paths.patch b/lang/perl-device-usb/patches/130-provide-proper-library-paths.patch deleted file mode 100644 index 3fce75a..0000000 --- a/lang/perl-device-usb/patches/130-provide-proper-library-paths.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/lib/Device/USB.pm -+++ b/lib/Device/USB.pm -@@ -8,8 +8,8 @@ use Carp; - use Inline ( - C => "DATA", - ($ENV{LIBUSB_LIBDIR} -- ? ( LIBS => "-L\"$ENV{LIBUSB_LIBDIR}\" " . -- ($^O eq 'MSWin32' ? ' -llibusb -L\"$ENV{WINDDK}\\lib\\crt\\i386\" -lmsvcrt ' : '-lusb-0.1') ) -+ ? ( LIBS => "-L$ENV{LIBUSB_LIBDIR} " . -+ ($^O eq 'MSWin32' ? ' -llibusb -L$ENV{WINDDK}\\lib\\crt\\i386 -lmsvcrt ' : '-lusb-0.1') ) - : ( LIBS => '-lusb-0.1', ) - ), - ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ), diff --git a/lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch b/lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch deleted file mode 100644 index 55e5cc3..0000000 --- a/lang/perl-device-usb/patches/140-avoid-libusb-name-conflicts.patch +++ /dev/null @@ -1,219 +0,0 @@ ---- a/lib/Device/USB.pm -+++ b/lib/Device/USB.pm -@@ -15,6 +15,7 @@ use Inline ( - ($ENV{LIBUSB_INCDIR} ? ( INC => "-I\"$ENV{LIBUSB_INCDIR}\"" ) : () ), - NAME => 'Device::USB', - VERSION => '0.36', -+ PREFIX => 'deviceusb_', - ); - - Inline->init(); -@@ -540,74 +541,74 @@ unsigned DeviceUSBDebugLevel() - return debugLevel; - } - --void libusb_init() -+void deviceusb_libusb_init() - { - usb_init(); - } - --int libusb_find_busses() -+int deviceusb_libusb_find_busses() - { - return usb_find_busses(); - } - --int libusb_find_devices() -+int deviceusb_libusb_find_devices() - { - return usb_find_devices(); - } - --void *libusb_get_busses() -+void *deviceusb_libusb_get_busses() - { - return usb_get_busses(); - } - --void *libusb_open(void *dev) -+void *deviceusb_libusb_open(void *dev) - { - return usb_open( (struct usb_device*)dev ); - } - --int libusb_close(void *dev) -+int deviceusb_libusb_close(void *dev) - { - return usb_close((usb_dev_handle *)dev); - } - --int libusb_set_configuration(void *dev, int configuration) -+int deviceusb_libusb_set_configuration(void *dev, int configuration) - { - if(DeviceUSBDebugLevel()) - { -- printf( "libusb_set_configuration( %d )\n", configuration ); -+ printf( "deviceusb_libusb_set_configuration( %d )\n", configuration ); - } - return usb_set_configuration((usb_dev_handle *)dev, configuration); - } - --int libusb_set_altinterface(void *dev, int alternate) -+int deviceusb_libusb_set_altinterface(void *dev, int alternate) - { - if(DeviceUSBDebugLevel()) - { -- printf( "libusb_set_altinterface( %d )\n", alternate ); -+ printf( "deviceusb_libusb_set_altinterface( %d )\n", alternate ); - } - return usb_set_altinterface((usb_dev_handle *)dev, alternate); - } - --int libusb_clear_halt(void *dev, unsigned int ep) -+int deviceusb_libusb_clear_halt(void *dev, unsigned int ep) - { - if(DeviceUSBDebugLevel()) - { -- printf( "libusb_clear_halt( %d )\n", ep ); -+ printf( "deviceusb_libusb_clear_halt( %d )\n", ep ); - } - return usb_clear_halt((usb_dev_handle *)dev, ep); - } - --int libusb_reset(void *dev) -+int deviceusb_libusb_reset(void *dev) - { - return usb_reset((usb_dev_handle *)dev); - } - --int libusb_get_driver_np(void *dev, int interface, char *name, unsigned int namelen) -+int deviceusb_libusb_get_driver_np(void *dev, int interface, char *name, unsigned int namelen) - { - int ret = 0; - if(DeviceUSBDebugLevel()) - { -- printf( "libusb_get_driver_np( %d )\n", interface ); -+ printf( "deviceusb_libusb_get_driver_np( %d )\n", interface ); - } - #if LIBUSB_HAS_GET_DRIVER_NP - ret = usb_get_driver_np((usb_dev_handle *)dev, interface, name, namelen); -@@ -618,11 +619,11 @@ int libusb_get_driver_np(void *dev, int - #endif - } - --int libusb_detach_kernel_driver_np(void *dev, int interface) -+int deviceusb_libusb_detach_kernel_driver_np(void *dev, int interface) - { - if(DeviceUSBDebugLevel()) - { -- printf( "libusb_detach_kernel_driver_np( %d )\n", interface ); -+ printf( "deviceusb_libusb_detach_kernel_driver_np( %d )\n", interface ); - } - #if LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP - return usb_detach_kernel_driver_np((usb_dev_handle *)dev, interface); -@@ -631,25 +632,25 @@ int libusb_detach_kernel_driver_np(void - #endif - } - --int libusb_claim_interface(void *dev, int interface) -+int deviceusb_libusb_claim_interface(void *dev, int interface) - { - if(DeviceUSBDebugLevel()) - { -- printf( "libusb_claim_interface( %d )\n", interface ); -+ printf( "deviceusb_libusb_claim_interface( %d )\n", interface ); - } - return usb_claim_interface((usb_dev_handle *)dev, interface); - } - --int libusb_release_interface(void *dev, int interface) -+int deviceusb_libusb_release_interface(void *dev, int interface) - { - if(DeviceUSBDebugLevel()) - { -- printf( "libusb_release_interface( %d )\n", interface ); -+ printf( "deviceusb_libusb_release_interface( %d )\n", interface ); - } - return usb_release_interface((usb_dev_handle *)dev, interface); - } - --void libusb_control_msg(void *dev, int requesttype, int request, int value, int index, char *bytes, int size, int timeout) -+void deviceusb_libusb_control_msg(void *dev, int requesttype, int request, int value, int index, char *bytes, int size, int timeout) - { - int i = 0; - int retval = 0; -@@ -658,7 +659,7 @@ void libusb_control_msg(void *dev, int r - - if(DeviceUSBDebugLevel()) - { -- printf( "libusb_control_msg( %#04x, %#04x, %#04x, %#04x, %p, %d, %d )\n", -+ printf( "deviceusb_libusb_control_msg( %#04x, %#04x, %#04x, %#04x, %p, %d, %d )\n", - requesttype, request, value, index, bytes, size, timeout - ); - /* maybe need to add support for printing the bytes string. */ -@@ -691,54 +692,54 @@ void libusb_control_msg(void *dev, int r - Inline_Stack_Done; - } - --int libusb_get_string(void *dev, int index, int langid, char *buf, size_t buflen) -+int deviceusb_libusb_get_string(void *dev, int index, int langid, char *buf, size_t buflen) - { - if(DeviceUSBDebugLevel()) - { -- printf( "libusb_get_string( %d, %d, %p, %lu )\n", -+ printf( "deviceusb_libusb_get_string( %d, %d, %p, %lu )\n", - index, langid, buf, (unsigned long)buflen - ); - } - return usb_get_string((usb_dev_handle *)dev, index, langid, buf, buflen); - } - --int libusb_get_string_simple(void *dev, int index, char *buf, size_t buflen) -+int deviceusb_libusb_get_string_simple(void *dev, int index, char *buf, size_t buflen) - { - if(DeviceUSBDebugLevel()) - { -- printf( "libusb_get_string_simple( %d, %p, %lu )\n", -+ printf( "deviceusb_libusb_get_string_simple( %d, %p, %lu )\n", - index, buf, (unsigned long)buflen - ); - } - return usb_get_string_simple((usb_dev_handle *)dev, index, buf, buflen); - } - --int libusb_get_descriptor(void *dev, unsigned char type, unsigned char index, char *buf, int size) -+int deviceusb_libusb_get_descriptor(void *dev, unsigned char type, unsigned char index, char *buf, int size) - { - return usb_get_descriptor((usb_dev_handle *)dev, type, index, buf, size); - } - --int libusb_get_descriptor_by_endpoint(void *dev, int ep, unsigned char type, unsigned char index, char *buf, int size) -+int deviceusb_libusb_get_descriptor_by_endpoint(void *dev, int ep, unsigned char type, unsigned char index, char *buf, int size) - { - return usb_get_descriptor_by_endpoint((usb_dev_handle *)dev, ep, type, index, buf, size); - } - --int libusb_bulk_write(void *dev, int ep, char *bytes, int size, int timeout) -+int deviceusb_libusb_bulk_write(void *dev, int ep, char *bytes, int size, int timeout) - { - return usb_bulk_write((usb_dev_handle *)dev, ep, bytes, size, timeout); - } - --int libusb_bulk_read(void *dev, int ep, char *bytes, int size, int timeout) -+int deviceusb_libusb_bulk_read(void *dev, int ep, char *bytes, int size, int timeout) - { - return usb_bulk_read((usb_dev_handle *)dev, ep, bytes, size, timeout); - } - --int libusb_interrupt_write(void *dev, int ep, char *bytes, int size, int timeout) -+int deviceusb_libusb_interrupt_write(void *dev, int ep, char *bytes, int size, int timeout) - { - return usb_interrupt_write((usb_dev_handle *)dev, ep, bytes, size, timeout); - } - --int libusb_interrupt_read(void *dev, int ep, char *bytes, int size, int timeout) -+int deviceusb_libusb_interrupt_read(void *dev, int ep, char *bytes, int size, int timeout) - { - return usb_interrupt_read((usb_dev_handle *)dev, ep, bytes, size, timeout); - } diff --git a/lang/perl-encode-locale/Makefile b/lang/perl-encode-locale/Makefile deleted file mode 100644 index 54071dc..0000000 --- a/lang/perl-encode-locale/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-encode-locale -PKG_VERSION:=1.05 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS -PKG_SOURCE:=Encode-Locale-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=fcfdb8e4ee34bcf62aed429b4a23db27 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Encode-Locale-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-encode-locale - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Determine the locale encoding - URL:=http://search.cpan.org/dist/Encode-Locale/ - DEPENDS:=perl +perlbase-base +perlbase-encode +perlbase-essential -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-encode-locale/install - $(call perlmod/Install,$(1),Encode auto/Encode) -endef - - -$(eval $(call BuildPackage,perl-encode-locale)) diff --git a/lang/perl-file-listing/Makefile b/lang/perl-file-listing/Makefile deleted file mode 100644 index 19a6938..0000000 --- a/lang/perl-file-listing/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-file-listing -PKG_VERSION:=6.04 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS -PKG_SOURCE:=File-Listing-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=83f636b477741f3a014585bb9cc079a6 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/File-Listing-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-file-listing - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Parse directory listing - URL:=http://search.cpan.org/dist/File-Listing/ - DEPENDS:=perl +perl-http-date +perlbase-essential -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-file-listing/install - $(call perlmod/Install,$(1),File auto/File) -endef - - -$(eval $(call BuildPackage,perl-file-listing)) diff --git a/lang/perl-file-sharedir-install/Makefile b/lang/perl-file-sharedir-install/Makefile deleted file mode 100644 index d107d70..0000000 --- a/lang/perl-file-sharedir-install/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-file-sharedir-install -PKG_VERSION:=0.10 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GW/GWYN -PKG_SOURCE:=File-ShareDir-Install-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=37fb7fa72ce7184516dd022aba62f524 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/File-ShareDir-Install-$(PKG_VERSION) -HOST_BUILD_DEPENDS:=perl/host -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/File-ShareDir-Install-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk -include ../perl/perlmod.mk - -define Package/perl-file-sharedir-install - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Install read-only data files - URL:=http://search.cpan.org/dist/File-ShareDir-Install/ - DEPENDS:=perl +perlbase-essential +perlbase-extutils +perlbase-file +perlbase-io -endef - -define Host/Configure - $(call perlmod/host/Configure,,,) -endef - -define Host/Compile - $(call perlmod/host/Compile,,) -endef - -define Host/Install - $(call perlmod/host/Install,$(1),) -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-file-sharedir-install/install - $(call perlmod/Install,$(1),File auto/File) -endef - - -$(eval $(call BuildPackage,perl-file-sharedir-install)) -$(eval $(call HostBuild)) diff --git a/lang/perl-html-form/Makefile b/lang/perl-html-form/Makefile deleted file mode 100644 index d412a1f..0000000 --- a/lang/perl-html-form/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-html-form -PKG_VERSION:=6.03 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS -PKG_SOURCE:=HTML-Form-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=fa6c2680207ed4fef5ea2ef09c210614 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Form-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-html-form - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Class that represents an HTML form element - URL:=http://search.cpan.org/dist/HTML-Form/ - DEPENDS:=perl +perl-html-parser +perl-http-message +perl-uri +perlbase-encode +perlbase-essential -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-html-form/install - $(call perlmod/Install,$(1),HTML auto/HTML) -endef - - -$(eval $(call BuildPackage,perl-html-form)) diff --git a/lang/perl-html-parser/Makefile b/lang/perl-html-parser/Makefile deleted file mode 100644 index e977217..0000000 --- a/lang/perl-html-parser/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2014 - 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-html-parser -PKG_VERSION:=3.72 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS/ -PKG_SOURCE:=HTML-Parser-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=eb7505e5f626913350df9dd4a03d54a8 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Parser-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-html-parser - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=A collection of modules that parse HTML text documents - URL:=http://search.cpan.org/dist/HTML-Parser/ - DEPENDS:=perl +perl-html-tagset +perlbase-essential +perlbase-xsloader -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-html-parser/install - $(call perlmod/Install,$(1),HTML auto/HTML) -endef - - -$(eval $(call BuildPackage,perl-html-parser)) diff --git a/lang/perl-html-tagset/Makefile b/lang/perl-html-tagset/Makefile deleted file mode 100644 index 4bcd10c..0000000 --- a/lang/perl-html-tagset/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-html-tagset -PKG_VERSION:=3.20 -PKG_RELEASE:=3 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/P/PE/PETDANCE/ -PKG_SOURCE:=HTML-Tagset-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=d2bfa18fe1904df7f683e96611e87437 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Tagset-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-html-tagset - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Data tables pertaining to HTML - URL:=http://search.cpan.org/dist/HTML-Tagset/ - DEPENDS:=perl +perlbase-essential -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-html-tagset/install - $(call perlmod/Install,$(1),HTML) -endef - - -$(eval $(call BuildPackage,perl-html-tagset)) diff --git a/lang/perl-html-tree/Makefile b/lang/perl-html-tree/Makefile deleted file mode 100644 index d1b4ac9..0000000 --- a/lang/perl-html-tree/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-html-tree -PKG_VERSION:=3.23 -PKG_RELEASE:=4 -PKG_MD5SUM:=6352f50be402301f79b580dd235d7762 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/P/PE/PETEK/ -PKG_SOURCE:=HTML-Tree-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=6352f50be402301f79b580dd235d7762 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTML-Tree-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-html-tree - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Represent and create HTML syntax trees - URL:=http://search.cpan.org/dist/HTML-Tree/ - DEPENDS:=perl +perl-html-parser +perl-html-tagset +perlbase-essential +perlbase-integer -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-html-tree/install - $(call perlmod/Install,$(1),HTML) -endef - - -$(eval $(call BuildPackage,perl-html-tree)) diff --git a/lang/perl-http-cookies/Makefile b/lang/perl-http-cookies/Makefile deleted file mode 100644 index 329767a..0000000 --- a/lang/perl-http-cookies/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-http-cookies -PKG_VERSION:=6.01 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS -PKG_SOURCE:=HTTP-Cookies-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=ecfd0eeb88512033352c2f13c9580f03 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Cookies-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-http-cookies - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=HTTP cookie jars - URL:=http://search.cpan.org/dist/HTTP-Cookies/ - DEPENDS:=perl +perl-http-date +perl-http-message +perlbase-essential +perlbase-time -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-http-cookies/install - $(call perlmod/Install,$(1),HTTP auto/HTTP) -endef - - -$(eval $(call BuildPackage,perl-http-cookies)) diff --git a/lang/perl-http-daemon/Makefile b/lang/perl-http-daemon/Makefile deleted file mode 100644 index 178573d..0000000 --- a/lang/perl-http-daemon/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-http-daemon -PKG_VERSION:=6.01 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS -PKG_SOURCE:=HTTP-Daemon-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=ed0ae02d25d7f1e89456d4d69732adc2 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Daemon-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-http-daemon - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=A simple http server class - URL:=http://search.cpan.org/dist/HTTP-Daemon/ - DEPENDS:=perl +perl-http-date +perl-http-message +perl-lwp-mediatypes +perlbase-essential +perlbase-io +perlbase-sys -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-http-daemon/install - $(call perlmod/Install,$(1),HTTP auto/HTTP) -endef - - -$(eval $(call BuildPackage,perl-http-daemon)) diff --git a/lang/perl-http-date/Makefile b/lang/perl-http-date/Makefile deleted file mode 100644 index bf0bd40..0000000 --- a/lang/perl-http-date/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-http-date -PKG_VERSION:=6.02 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS -PKG_SOURCE:=HTTP-Date-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=52b7a0d5982d61be1edb217751d7daba - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Date-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-http-date - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Date conversion routines - URL:=http://search.cpan.org/dist/HTTP-Date/ - DEPENDS:=perl +perlbase-essential +perlbase-time -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-http-date/install - $(call perlmod/Install,$(1),HTTP auto/HTTP) -endef - - -$(eval $(call BuildPackage,perl-http-date)) diff --git a/lang/perl-http-message/Makefile b/lang/perl-http-message/Makefile deleted file mode 100644 index 2b90e2a..0000000 --- a/lang/perl-http-message/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-http-message -PKG_VERSION:=6.11 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER -PKG_SOURCE:=HTTP-Message-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=4ed7add10daea3ab30abfeab6d03872f - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Message-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-http-message - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=HTTP style messages - URL:=http://search.cpan.org/dist/HTTP-Message/ - DEPENDS:=perl +perl-encode-locale +perl-http-date +perl-io-html +perl-lwp-mediatypes +perl-uri +perlbase-base +perlbase-compress +perlbase-encode +perlbase-essential +perlbase-io +perlbase-mime -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-http-message/install - $(call perlmod/Install,$(1),HTTP auto/HTTP) -endef - - -$(eval $(call BuildPackage,perl-http-message)) diff --git a/lang/perl-http-negotiate/Makefile b/lang/perl-http-negotiate/Makefile deleted file mode 100644 index a72893a..0000000 --- a/lang/perl-http-negotiate/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-http-negotiate -PKG_VERSION:=6.01 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS -PKG_SOURCE:=HTTP-Negotiate-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=1236195250e264d7436e7bb02031671b - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Negotiate-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-http-negotiate - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Choose a variant to serve - URL:=http://search.cpan.org/dist/HTTP-Negotiate/ - DEPENDS:=perl +perl-http-message +perlbase-essential -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-http-negotiate/install - $(call perlmod/Install,$(1),HTTP auto/HTTP) -endef - - -$(eval $(call BuildPackage,perl-http-negotiate)) diff --git a/lang/perl-http-server-simple/Makefile b/lang/perl-http-server-simple/Makefile deleted file mode 100644 index 9a41da6..0000000 --- a/lang/perl-http-server-simple/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-http-server-simple -PKG_VERSION:=0.51 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/B/BP/BPS -PKG_SOURCE:=HTTP-Server-Simple-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=ef736daddc7a32a29207fa4ed5f5d62e - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/HTTP-Server-Simple-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-http-server-simple - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lightweight HTTP server - URL:=http://search.cpan.org/dist/HTTP-Server-Simple/ - DEPENDS:=perl +perl-cgi +perlbase-base +perlbase-essential +perlbase-filehandle +perlbase-socket +perlbase-test -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-http-server-simple/install - $(call perlmod/Install,$(1),HTTP auto/HTTP) -endef - - -$(eval $(call BuildPackage,perl-http-server-simple)) diff --git a/lang/perl-inline-c/Makefile b/lang/perl-inline-c/Makefile deleted file mode 100644 index 52826d2..0000000 --- a/lang/perl-inline-c/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-inline-c -PKG_VERSION:=0.76 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/I/IN/INGY -PKG_SOURCE:=Inline-C-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=c0fbfdd058075c9271a1384c822c9a87 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Inline-C-$(PKG_VERSION) -HOST_BUILD_DEPENDS:=perl/host perl-inline/host perl-parse-recdescent/host perl-file-sharedir-install/host -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Inline-C-$(PKG_VERSION) -PKG_BUILD_DEPENDS:=perl-inline/host perl-parse-recdescent/host perl-file-sharedir-install/host - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk -include ../perl/perlmod.mk - -define Package/perl-inline-c - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=C Language Support for Inline - URL:=http://search.cpan.org/dist/Inline-C/ - DEPENDS:=perl +perl-inline +perl-parse-recdescent +perlbase-config +perlbase-cwd +perlbase-data +perlbase-essential +perlbase-extutils +perlbase-file +perlbase-if -endef - -define Host/Configure - $(call perlmod/host/Configure,,,) -endef - -define Host/Compile - $(call perlmod/host/Compile,,) -endef - -define Host/Install - $(call perlmod/host/Install,$(1),) -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-inline-c/install - $(call perlmod/Install,$(1),Inline auto/Inline) -endef - - -$(eval $(call BuildPackage,perl-inline-c)) -$(eval $(call HostBuild)) diff --git a/lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch b/lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch deleted file mode 100644 index dcfe2bb..0000000 --- a/lang/perl-inline-c/patches/100-inline_c-no_compile_hack.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/lib/Inline/C.pm -+++ b/lib/Inline/C.pm -@@ -361,7 +361,7 @@ sub build { - $o->call('write_XS', 'Build Glue 1'); - $o->call('write_Inline_headers', 'Build Glue 2'); - $o->call('write_Makefile_PL', 'Build Glue 3'); -- $o->call('compile', 'Build Compile'); -+ $o->call('compile', 'Build Compile') unless $ENV{'_INLINE_C_NO_COMPILE_'}; - if (IS_WIN32) { - $lockfh->release or die "releasemutex $file: $^E"; - } diff --git a/lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch b/lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch deleted file mode 100644 index b2ae09e..0000000 --- a/lang/perl-inline-c/patches/110-inline_c-make_system_typemap_overridable.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- a/lib/Inline/C.pm -+++ b/lib/Inline/C.pm -@@ -438,22 +438,28 @@ sub get_maps { - print STDERR "get_maps Stage\n" if $o->{CONFIG}{BUILD_NOISY}; - my $typemap = ''; - my $file; -- $file = File::Spec->catfile( -- $Config::Config{installprivlib}, -- "ExtUtils", -- "typemap", -- ); -- $typemap = $file if -f $file; -- $file = File::Spec->catfile( -- $Config::Config{privlibexp} -- ,"ExtUtils","typemap" -- ); -- $typemap = $file -- if (not $typemap and -f $file); -- warn "Can't find the default system typemap file" -- if (not $typemap and $^W); -+ -+ unless ($ENV{'_INLINE_C_SYSTEM_TYPEMAP_'}) { -+ $file = File::Spec->catfile( -+ $Config::Config{installprivlib}, -+ "ExtUtils", -+ "typemap", -+ ); -+ $typemap = $file if -f $file; -+ $file = File::Spec->catfile( -+ $Config::Config{privlibexp} -+ ,"ExtUtils","typemap" -+ ); -+ $typemap = $file -+ if (not $typemap and -f $file); -+ warn "Can't find the default system typemap file" -+ if (not $typemap and $^W); - -- unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $typemap) if $typemap; -+ unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $typemap) if $typemap; -+ } -+ else { -+ unshift(@{$o->{ILSM}{MAKEFILE}{TYPEMAPS}}, $ENV{'_INLINE_C_SYSTEM_TYPEMAP_'}); -+ } - - if (not $o->UNTAINT) { - require FindBin; diff --git a/lang/perl-inline/Makefile b/lang/perl-inline/Makefile deleted file mode 100644 index a120705..0000000 --- a/lang/perl-inline/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-inline -PKG_VERSION:=0.80 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/I/IN/INGY -PKG_SOURCE:=Inline-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=510bbac46e727bcaf240b7feac2646c9 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Inline-$(PKG_VERSION) -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Inline-$(PKG_VERSION) - -HOST_BUILD_DEPENDS:=perl/host - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk -include ../perl/perlmod.mk - -define Package/perl-inline - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Write subroutines in other languages - URL:=http://search.cpan.org/dist/Inline/ - DEPENDS:=perl +perlbase-base +perlbase-config +perlbase-cwd +perlbase-digest +perlbase-essential +perlbase-fcntl +perlbase-file -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-inline/install - $(call perlmod/Install,$(1),Inline.pm Inline auto/Inline) -endef - -define Host/Configure - $(call perlmod/host/Configure,,,) -endef - -define Host/Compile - $(call perlmod/host/Compile,,) -endef - -define Host/Install - $(call perlmod/host/Install,$(1),) -endef - - -$(eval $(call BuildPackage,perl-inline)) -$(eval $(call HostBuild)) diff --git a/lang/perl-io-html/Makefile b/lang/perl-io-html/Makefile deleted file mode 100644 index 9390c36..0000000 --- a/lang/perl-io-html/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-io-html -PKG_VERSION:=1.001 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CJ/CJM -PKG_SOURCE:=IO-HTML-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=3f8958718844dc96b9f6946f21d70d22 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/IO-HTML-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-io-html - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Open an HTML file with automatic charset detection - URL:=http://search.cpan.org/dist/IO-HTML/ - DEPENDS:=perl +perlbase-encode +perlbase-essential -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-io-html/install - $(call perlmod/Install,$(1),IO auto/IO) -endef - - -$(eval $(call BuildPackage,perl-io-html)) diff --git a/lang/perl-lockfile-simple/Makefile b/lang/perl-lockfile-simple/Makefile deleted file mode 100644 index b81e678..0000000 --- a/lang/perl-lockfile-simple/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-lockfile-simple -PKG_VERSION:=0.208 -PKG_RELEASE:=3 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SC/SCHWIGON/lockfile-simple/ -PKG_SOURCE:=LockFile-Simple-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=4421283b4f32549e5299963734170044 - -PKG_LICENSE:=GPL-2.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/LockFile-Simple-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-lockfile-simple - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Simple advisory file locking - URL:=http://search.cpan.org/dist/LockFile-Simple/ - DEPENDS:=perl +perlbase-essential +perlbase-sys -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-lockfile-simple/install - $(call perlmod/Install,$(1),LockFile auto/LockFile) -endef - - -$(eval $(call BuildPackage,perl-lockfile-simple)) diff --git a/lang/perl-lwp-mediatypes/Makefile b/lang/perl-lwp-mediatypes/Makefile deleted file mode 100644 index 6985431..0000000 --- a/lang/perl-lwp-mediatypes/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-lwp-mediatypes -PKG_VERSION:=6.02 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS -PKG_SOURCE:=LWP-MediaTypes-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=8c5f25fb64b974d22aff424476ba13c9 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/LWP-MediaTypes-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-lwp-mediatypes - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Guess media type for a file or a URL - URL:=http://search.cpan.org/dist/LWP-MediaTypes/ - DEPENDS:=perl +perlbase-essential -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-lwp-mediatypes/install - $(call perlmod/Install,$(1),LWP auto/LWP) -endef - - -$(eval $(call BuildPackage,perl-lwp-mediatypes)) diff --git a/lang/perl-net-http/Makefile b/lang/perl-net-http/Makefile deleted file mode 100644 index 058ac16..0000000 --- a/lang/perl-net-http/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-net-http -PKG_VERSION:=6.09 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER -PKG_SOURCE:=Net-HTTP-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=3d84d17f64c7316d69e7eb7b4e292b9a - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Net-HTTP-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-net-http - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Low-level HTTP connection (client) - URL:=http://search.cpan.org/dist/Net-HTTP/ - DEPENDS:=perl +perl-uri +perlbase-compress +perlbase-essential +perlbase-io -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-net-http/install - $(call perlmod/Install,$(1),Net auto/Net) -endef - - -$(eval $(call BuildPackage,perl-net-http)) diff --git a/lang/perl-net-telnet/Makefile b/lang/perl-net-telnet/Makefile deleted file mode 100644 index c915064..0000000 --- a/lang/perl-net-telnet/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2011-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-net-telnet -PKG_VERSION:=3.04 -PKG_RELEASE:=3 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/J/JR/JROGERS/ -PKG_SOURCE:=Net-Telnet-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=d2514080116c1b0fa5f96295c84538e3 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Net-Telnet-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-net-telnet - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Telnet client - URL:=http://search.cpan.org/dist/Net-Telnet/ - DEPENDS:=perl +perlbase-essential +perlbase-socket +perlbase-symbol -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-net-telnet/install - $(call perlmod/Install,$(1),Net auto/Net) -endef - - -$(eval $(call BuildPackage,perl-net-telnet)) diff --git a/lang/perl-parse-recdescent/Makefile b/lang/perl-parse-recdescent/Makefile deleted file mode 100644 index bbeff7b..0000000 --- a/lang/perl-parse-recdescent/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-parse-recdescent -PKG_VERSION:=1.967013 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/J/JT/JTBRAUN -PKG_SOURCE:=Parse-RecDescent-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=98f582240556a4a92e5d57e480f9d39d - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/Parse-RecDescent-$(PKG_VERSION) -HOST_BUILD_DEPENDS:=perl/host -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Parse-RecDescent-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk -include ../perl/perlmod.mk - -define Package/perl-parse-recdescent - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Generate Recursive-Descent Parsers - URL:=http://search.cpan.org/dist/Parse-RecDescent/ - DEPENDS:=perl +perlbase-essential +perlbase-test +perlbase-text -endef - -define Host/Configure - $(call perlmod/host/Configure,,,) -endef - -define Host/Compile - $(call perlmod/host/Compile,,) -endef - -define Host/Install - $(call perlmod/host/Install,$(1),) -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-parse-recdescent/install - $(call perlmod/Install,$(1),Parse auto/Parse) -endef - - -$(eval $(call BuildPackage,perl-parse-recdescent)) -$(eval $(call HostBuild)) diff --git a/lang/perl-sub-uplevel/Makefile b/lang/perl-sub-uplevel/Makefile deleted file mode 100644 index 266bce4..0000000 --- a/lang/perl-sub-uplevel/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-sub-uplevel -PKG_VERSION:=0.25 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/D/DA/DAGOLDEN -PKG_SOURCE:=Sub-Uplevel-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=5d0752dbfa94d0c91b25a264f47f5675 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Sub-Uplevel-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-sub-uplevel - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Apparently run a function in a higher stack frame - URL:=http://search.cpan.org/dist/Sub-Uplevel/ - DEPENDS:=perl +perlbase-essential -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-sub-uplevel/install - $(call perlmod/Install,$(1),Sub auto/Sub) -endef - - -$(eval $(call BuildPackage,perl-sub-uplevel)) diff --git a/lang/perl-test-harness/Makefile b/lang/perl-test-harness/Makefile deleted file mode 100644 index 0c14e85..0000000 --- a/lang/perl-test-harness/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2014 - 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-test-harness -PKG_VERSION:=3.36 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEONT/ -PKG_SOURCE:=Test-Harness-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=4c8d9c77e8e06ca96c7383c05c8f3616 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Test-Harness-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-test-harness - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Perl Test Harness - URL:=http://search.cpan.org/dist/Test-Harness/ - DEPENDS:=perl +perlbase-base +perlbase-benchmark +perlbase-config +perlbase-essential +perlbase-file +perlbase-getopt +perlbase-io +perlbase-posix +perlbase-text -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-test-harness/install - $(call perlmod/Install,$(1),App auto/Test TAP Test) -endef - - -$(eval $(call BuildPackage,perl-test-harness)) diff --git a/lang/perl-test-warn/Makefile b/lang/perl-test-warn/Makefile deleted file mode 100644 index 995e1ba..0000000 --- a/lang/perl-test-warn/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-test-warn -PKG_VERSION:=0.30 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/C/CH/CHORNY -PKG_SOURCE:=Test-Warn-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=8306b998a96d2cc69266b5248d550472 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/Test-Warn-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-test-warn - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Perl extension to test methods for warnings - URL:=http://search.cpan.org/dist/Test-Warn/ - DEPENDS:=perl +perl-sub-uplevel +perlbase-essential +perlbase-test -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-test-warn/install - $(call perlmod/Install,$(1),Test auto/Test) -endef - - -$(eval $(call BuildPackage,perl-test-warn)) diff --git a/lang/perl-uri/Makefile b/lang/perl-uri/Makefile deleted file mode 100644 index 18667fc..0000000 --- a/lang/perl-uri/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 - 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-uri -PKG_VERSION:=1.71 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/ -PKG_SOURCE:=URI-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=247c3da29a794f72730e01aa5a715daf - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/URI-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-uri - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Manipulates and accesses URI strings - URL:=http://search.cpan.org/dist/URI/ - DEPENDS:=perl +perlbase-essential +perlbase-integer +perlbase-mime +perlbase-scalar +perlbase-utf8 -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-uri/install - $(call perlmod/Install,$(1),URI URI.pm) -endef - - -$(eval $(call BuildPackage,perl-uri)) diff --git a/lang/perl-www-curl/Makefile b/lang/perl-www-curl/Makefile deleted file mode 100644 index 1e424cb..0000000 --- a/lang/perl-www-curl/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-www-curl -PKG_VERSION:=4.17 -PKG_RELEASE:=4 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SZ/SZBALINT/ -PKG_SOURCE:=WWW-Curl-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=997ac81cd6b03b30b36f7cd930474845 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-Curl-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-www-curl - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Perl bindings to libcurl - URL:=http://search.cpan.org/dist/WWW-Curl/ - DEPENDS:=perl +libcurl +perlbase-essential +perlbase-xsloader -endef - -define Build/Configure - $(call perlmod/Configure,$(STAGING_DIR)/usr/include,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-www-curl/install - $(call perlmod/Install,$(1),WWW/Curl WWW/Curl.pm auto/WWW/Curl) -endef - - -$(eval $(call BuildPackage,perl-www-curl)) diff --git a/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch b/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch deleted file mode 100644 index 568b65c..0000000 --- a/lang/perl-www-curl/patches/100-perl-www-curl_disable_curl-config_hack.patch +++ /dev/null @@ -1,74 +0,0 @@ ---- a/Makefile.PL -+++ b/Makefile.PL -@@ -12,31 +12,31 @@ no_index directory => 'template'; - repository 'http://github.com/szbalint/WWW--Curl'; - # This is a hack. If you have libcurl installed, just specify curl.h below - # and comment out this line. --if ($^O ne 'MSWin32') { -- if (!$ENV{CURL_CONFIG}) { -- requires_external_bin 'curl-config'; -- } --} else { -- print "Sorry, no automated install is available on Windows,\n". -- "please see the README.Win32 file on instructions for a manual install.\n"; -- exit(0); --} -- --my $curl_config = $ENV{CURL_CONFIG} || 'curl-config'; -- --my $vernum = `${curl_config} --vernum`; chomp $vernum; --my $version = `${curl_config} --version`; chomp $version; -- --my $minimum_ver = hex("070a08"); -- --if ($vernum && hex($vernum) <= $minimum_ver) { -- print "Your currently installed libcurl version - $version - is too old.\n". -- "This module doesn't seek compatibility with versions older than 7.10.8\n". -- "Proceed manually if you know what you're doing.\n"; -- exit(0); --} -- --print "The version is $version\n"; -+#if ($^O ne 'MSWin32') { -+# if (!$ENV{CURL_CONFIG}) { -+# requires_external_bin 'curl-config'; -+# } -+#} else { -+# print "Sorry, no automated install is available on Windows,\n". -+# "please see the README.Win32 file on instructions for a manual install.\n"; -+# exit(0); -+#} -+# -+#my $curl_config = $ENV{CURL_CONFIG} || 'curl-config'; -+# -+#my $vernum = `${curl_config} --vernum`; chomp $vernum; -+#my $version = `${curl_config} --version`; chomp $version; -+# -+#my $minimum_ver = hex("070a08"); -+# -+#if ($vernum && hex($vernum) <= $minimum_ver) { -+# print "Your currently installed libcurl version - $version - is too old.\n". -+# "This module doesn't seek compatibility with versions older than 7.10.8\n". -+# "Proceed manually if you know what you're doing.\n"; -+# exit(0); -+#} -+# -+#print "The version is $version\n"; - - my @includes = qw(); - my ($cflags,$lflags, $ldflags) = ('','',''); -@@ -58,10 +58,10 @@ if ($^O ne 'MSWin32') { - # Get curl to tell us where it is, if we can. - # - --if ($^O ne 'MSWin32') { -- $cflags = `${curl_config} --cflags`; -- $lflags = `${curl_config} --libs`; --} -+#if ($^O ne 'MSWin32') { -+# $cflags = `${curl_config} --cflags`; -+# $lflags = `${curl_config} --libs`; -+#} - - # can't find link flags, make some guesses - if (!defined($lflags)) { diff --git a/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path b/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path deleted file mode 100644 index 34221c0..0000000 --- a/lang/perl-www-curl/patches/101-skip-preprocessor-symbol.path +++ /dev/null @@ -1,34 +0,0 @@ -From 0be0223422e6e5f4091c6e4e058d213623eed105 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= -Date: Mon, 12 Sep 2016 14:40:44 +0200 -Subject: [PATCH] Skip preprocessor symbol only CURL_STRICTER -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -CURL_STRICTER leaked into curl-constants.c when building against -curl-7.50.2. This is a preprocessor only macro without a value. - -CPAN RT#117793 - -Signed-off-by: Petr Písař ---- - Makefile.PL | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.PL b/Makefile.PL -index f9170bb..ad2bd3d 100644 ---- a/Makefile.PL -+++ b/Makefile.PL -@@ -127,7 +127,7 @@ if (!defined($curl_h)) { - close H; - - for my $e (sort @syms) { -- if($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z)/) { -+ if($e =~ /(OBSOLETE|^CURL_EXTERN|^CURL_STRICTER\z|_LAST\z|_LASTENTRY\z)/) { - next; - } - my ($group) = $e =~ m/^([^_]+_)/; --- -2.7.4 - diff --git a/lang/perl-www-curl/patches/200-fix_default_lflags.patch b/lang/perl-www-curl/patches/200-fix_default_lflags.patch deleted file mode 100644 index f51eaf5..0000000 --- a/lang/perl-www-curl/patches/200-fix_default_lflags.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.PL -+++ b/Makefile.PL -@@ -39,7 +39,7 @@ repository 'http://github.com/szbalint/ - #print "The version is $version\n"; - - my @includes = qw(); --my ($cflags,$lflags, $ldflags) = ('','',''); -+my ($cflags,$lflags, $ldflags) = ('','-lcurl',''); - - # You may need to specify where to find curl.h on your platform - # These are guesses only, in case curl-config is not telling us. diff --git a/lang/perl-www-mechanize/Makefile b/lang/perl-www-mechanize/Makefile deleted file mode 100644 index 93d6be2..0000000 --- a/lang/perl-www-mechanize/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2010-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-www-mechanize -PKG_VERSION:=1.75 -PKG_RELEASE:=1 - -PKG_SOURCE:=WWW-Mechanize-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/ -PKG_MD5SUM:=9a4b9c8827f519908ef0a0d2b8ae96fa - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-Mechanize-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-www-mechanize - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Perl WWW Mechanize - URL:=http://search.cpan.org/dist/WWW-Mechanize/ - DEPENDS:=perl +perl-cgi +perl-html-form +perl-html-parser +perl-html-tree +perl-http-daemon +perl-http-message +perl-http-server-simple +perl-test-warn +perl-uri +perl-www +perlbase-base +perlbase-essential +perlbase-file +perlbase-findbin +perlbase-getopt +perlbase-pod +perlbase-test -endef - -define Build/Configure - $(call perlmod/Configure,$(STAGING_DIR)/usr/include,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-www-mechanize/install - $(call perlmod/Install,$(1),WWW/Mechanize WWW/Mechanize.pm) -endef - - -$(eval $(call BuildPackage,perl-www-mechanize)) diff --git a/lang/perl-www-robotrules/Makefile b/lang/perl-www-robotrules/Makefile deleted file mode 100644 index c28b8c2..0000000 --- a/lang/perl-www-robotrules/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-www-robotrules -PKG_VERSION:=6.02 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS -PKG_SOURCE:=WWW-RobotRules-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=b7186e8b8b3701e70c22abf430742403 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/WWW-RobotRules-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-www-robotrules - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=database of robots.txt-derived permissions - URL:=http://search.cpan.org/dist/WWW-RobotRules/ - DEPENDS:=perl +perl-uri +perlbase-anydbm-file +perlbase-essential +perlbase-fcntl -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-www-robotrules/install - $(call perlmod/Install,$(1),WWW auto/WWW) -endef - - -$(eval $(call BuildPackage,perl-www-robotrules)) diff --git a/lang/perl-www/Makefile b/lang/perl-www/Makefile deleted file mode 100644 index 86bf15b..0000000 --- a/lang/perl-www/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2013-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-www -PKG_VERSION:=6.15 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/E/ET/ETHER/ -PKG_SOURCE:=libwww-perl-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=6888c9d8728cd6f3ea3c9754461c9f94 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/libwww-perl-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include ../perl/perlmod.mk - -define Package/perl-www - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=WWW client/server library for Perl (aka LWP) - URL:=http://search.cpan.org/dist/libwww-perl/ - DEPENDS:=perl +perl-encode-locale +perl-file-listing +perl-html-parser +perl-http-cookies +perl-http-daemon +perl-http-date +perl-http-message +perl-http-negotiate +perl-lwp-mediatypes +perl-net-http +perl-uri +perl-www-robotrules +perlbase-base +perlbase-digest +perlbase-encode +perlbase-essential +perlbase-io +perlbase-mime +perlbase-net -endef - -define Build/Configure - $(call perlmod/Configure,,) -endef - -define Build/Compile - $(call perlmod/Compile,,) -endef - -define Package/perl-www/install - $(call perlmod/Install,$(1),LWP.pm auto/LWP LWP) -endef - - -$(eval $(call BuildPackage,perl-www)) diff --git a/lang/perl-xml-parser/Makefile b/lang/perl-xml-parser/Makefile deleted file mode 100644 index 57977c1..0000000 --- a/lang/perl-xml-parser/Makefile +++ /dev/null @@ -1,86 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl-xml-parser -PKG_VERSION:=2.44 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TO/TODDR/ -PKG_SOURCE:=XML-Parser-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=af4813fe3952362451201ced6fbce379 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_MAINTAINER:=Marcel Denia - -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/XML-Parser-$(PKG_VERSION) -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/XML-Parser-$(PKG_VERSION) - -HOST_BUILD_DEPENDS:=perl/host expat/host - -EXPAT_LIBPATH:=$(STAGING_DIR)/usr/lib -EXPAT_INCPATH=$(STAGING_DIR)/usr/include -HOST_EXPAT_LIBPATH:=$(STAGING_DIR_HOSTPKG)/lib -HOST_EXPAT_INCPATH=$(STAGING_DIR_HOSTPKG)/include - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk -include ../perl/perlmod.mk - -define Package/perl-xml-parser - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=Perl XML Parser - URL:=http://search.cpan.org/dist/XML-Parser/ - DEPENDS:=perl +libexpat +perlbase-dynaloader +perlbase-essential -endef - -define FixupExpat - # Manually reconfigure XML::Parser::Expat, as some overrides we provide will not have any effect otherwise - # Force usage of OpenWRT's expat - sed \ - -e 's!%%EXPAT_LIBPATH%%!$(2)!g' \ - -e 's!%%EXPAT_INCPATH%%!$(3)!g' \ - -i $(1)/Expat/Makefile.PL -endef - -define Build/Configure - $(call perlmod/Configure,EXPATLIBPATH=$(EXPAT_LIBPATH) EXPATINCPATH=$(EXPAT_INCPATH),,) - - $(call FixupExpat,$(PKG_BUILD_DIR),$(EXPAT_LIBPATH),$(EXPAT_INCPATH)) - $(call perlmod/Configure,,,$(PKG_BUILD_DIR)/Expat) -endef - -define Build/Compile - $(call perlmod/Compile,,) - $(call perlmod/Compile,,,$(PKG_BUILD_DIR)/Expat) -endef - -define Host/Configure - $(call perlmod/host/Configure,EXPATLIBPATH=$(HOST_EXPAT_LIBPATH) EXPATINCPATH=$(HOST_EXPAT_INCPATH),,) - $(call FixupExpat,$(HOST_BUILD_DIR),$(HOST_EXPAT_LIBPATH),$(HOST_EXPAT_INCPATH)) - $(call perlmod/host/Configure,,,$(HOST_BUILD_DIR)/Expat) -endef - -define Host/Compile - $(call perlmod/host/Compile,,) - $(call perlmod/host/Compile,,,$(HOST_BUILD_DIR)/Expat) -endef - -define Host/Install - $(call perlmod/host/Install,$(1),) -endef - -define Package/perl-xml-parser/install - $(call perlmod/Install,$(1),auto/XML XML) -endef - - -$(eval $(call BuildPackage,perl-xml-parser)) -$(eval $(call HostBuild)) diff --git a/lang/perl-xml-parser/patches/010-xml-parser-expat-use-ppport.h b/lang/perl-xml-parser/patches/010-xml-parser-expat-use-ppport.h deleted file mode 100644 index e2aad83..0000000 --- a/lang/perl-xml-parser/patches/010-xml-parser-expat-use-ppport.h +++ /dev/null @@ -1,7476 +0,0 @@ ---- a/Expat/Expat.xs -+++ b/Expat/Expat.xs -@@ -20,17 +20,7 @@ - #include "patchlevel.h" - #include "encoding.h" - -- --/* Version 5.005_5x (Development version for 5.006) doesn't like sv_... -- anymore, but 5.004 doesn't know about PL_sv.. -- Don't want to push up required version just for this. */ -- --#if PATCHLEVEL < 5 --#define PL_sv_undef sv_undef --#define PL_sv_no sv_no --#define PL_sv_yes sv_yes --#define PL_na na --#endif -+#include "ppport.h" - - #define BUFSIZE 32768 - ---- /dev/null -+++ b/Expat/ppport.h -@@ -0,0 +1,7452 @@ -+#if 0 -+<<'SKIP'; -+#endif -+/* -+---------------------------------------------------------------------- -+ -+ ppport.h -- Perl/Pollution/Portability Version 3.21 -+ -+ Automatically created by Devel::PPPort running under perl 5.020002. -+ -+ Do NOT edit this file directly! -- Edit PPPort_pm.PL and the -+ includes in parts/inc/ instead. -+ -+ Use 'perldoc ppport.h' to view the documentation below. -+ -+---------------------------------------------------------------------- -+ -+SKIP -+ -+=pod -+ -+=head1 NAME -+ -+ppport.h - Perl/Pollution/Portability version 3.21 -+ -+=head1 SYNOPSIS -+ -+ perl ppport.h [options] [source files] -+ -+ Searches current directory for files if no [source files] are given -+ -+ --help show short help -+ -+ --version show version -+ -+ --patch=file write one patch file with changes -+ --copy=suffix write changed copies with suffix -+ --diff=program use diff program and options -+ -+ --compat-version=version provide compatibility with Perl version -+ --cplusplus accept C++ comments -+ -+ --quiet don't output anything except fatal errors -+ --nodiag don't show diagnostics -+ --nohints don't show hints -+ --nochanges don't suggest changes -+ --nofilter don't filter input files -+ -+ --strip strip all script and doc functionality from -+ ppport.h -+ -+ --list-provided list provided API -+ --list-unsupported list unsupported API -+ --api-info=name show Perl API portability information -+ -+=head1 COMPATIBILITY -+ -+This version of F is designed to support operation with Perl -+installations back to 5.003, and has been tested up to 5.11.5. -+ -+=head1 OPTIONS -+ -+=head2 --help -+ -+Display a brief usage summary. -+ -+=head2 --version -+ -+Display the version of F. -+ -+=head2 --patch=I -+ -+If this option is given, a single patch file will be created if -+any changes are suggested. This requires a working diff program -+to be installed on your system. -+ -+=head2 --copy=I -+ -+If this option is given, a copy of each file will be saved with -+the given suffix that contains the suggested changes. This does -+not require any external programs. Note that this does not -+automagially add a dot between the original filename and the -+suffix. If you want the dot, you have to include it in the option -+argument. -+ -+If neither C<--patch> or C<--copy> are given, the default is to -+simply print the diffs for each file. This requires either -+C or a C program to be installed. -+ -+=head2 --diff=I -+ -+Manually set the diff program and options to use. The default -+is to use C, when installed, and output unified -+context diffs. -+ -+=head2 --compat-version=I -+ -+Tell F to check for compatibility with the given -+Perl version. The default is to check for compatibility with Perl -+version 5.003. You can use this option to reduce the output -+of F if you intend to be backward compatible only -+down to a certain Perl version. -+ -+=head2 --cplusplus -+ -+Usually, F will detect C++ style comments and -+replace them with C style comments for portability reasons. -+Using this option instructs F to leave C++ -+comments untouched. -+ -+=head2 --quiet -+ -+Be quiet. Don't print anything except fatal errors. -+ -+=head2 --nodiag -+ -+Don't output any diagnostic messages. Only portability -+alerts will be printed. -+ -+=head2 --nohints -+ -+Don't output any hints. Hints often contain useful portability -+notes. Warnings will still be displayed. -+ -+=head2 --nochanges -+ -+Don't suggest any changes. Only give diagnostic output and hints -+unless these are also deactivated. -+ -+=head2 --nofilter -+ -+Don't filter the list of input files. By default, files not looking -+like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped. -+ -+=head2 --strip -+ -+Strip all script and documentation functionality from F. -+This reduces the size of F dramatically and may be useful -+if you want to include F in smaller modules without -+increasing their distribution size too much. -+ -+The stripped F will have a C<--unstrip> option that allows -+you to undo the stripping, but only if an appropriate C -+module is installed. -+ -+=head2 --list-provided -+ -+Lists the API elements for which compatibility is provided by -+F. Also lists if it must be explicitly requested, -+if it has dependencies, and if there are hints or warnings for it. -+ -+=head2 --list-unsupported -+ -+Lists the API elements that are known not to be supported by -+F and below which version of Perl they probably -+won't be available or work. -+ -+=head2 --api-info=I -+ -+Show portability information for API elements matching I. -+If I is surrounded by slashes, it is interpreted as a regular -+expression. -+ -+=head1 DESCRIPTION -+ -+In order for a Perl extension (XS) module to be as portable as possible -+across differing versions of Perl itself, certain steps need to be taken. -+ -+=over 4 -+ -+=item * -+ -+Including this header is the first major one. This alone will give you -+access to a large part of the Perl API that hasn't been available in -+earlier Perl releases. Use -+ -+ perl ppport.h --list-provided -+ -+to see which API elements are provided by ppport.h. -+ -+=item * -+ -+You should avoid using deprecated parts of the API. For example, using -+global Perl variables without the C prefix is deprecated. Also, -+some API functions used to have a C prefix. Using this form is -+also deprecated. You can safely use the supported API, as F -+will provide wrappers for older Perl versions. -+ -+=item * -+ -+If you use one of a few functions or variables that were not present in -+earlier versions of Perl, and that can't be provided using a macro, you -+have to explicitly request support for these functions by adding one or -+more C<#define>s in your source code before the inclusion of F. -+ -+These functions or variables will be marked C in the list shown -+by C<--list-provided>. -+ -+Depending on whether you module has a single or multiple files that -+use such functions or variables, you want either C or global -+variants. -+ -+For a C function or variable (used only in a single source -+file), use: -+ -+ #define NEED_function -+ #define NEED_variable -+ -+For a global function or variable (used in multiple source files), -+use: -+ -+ #define NEED_function_GLOBAL -+ #define NEED_variable_GLOBAL -+ -+Note that you mustn't have more than one global request for the -+same function or variable in your project. -+ -+ Function / Variable Static Request Global Request -+ ----------------------------------------------------------------------------------------- -+ PL_parser NEED_PL_parser NEED_PL_parser_GLOBAL -+ PL_signals NEED_PL_signals NEED_PL_signals_GLOBAL -+ eval_pv() NEED_eval_pv NEED_eval_pv_GLOBAL -+ grok_bin() NEED_grok_bin NEED_grok_bin_GLOBAL -+ grok_hex() NEED_grok_hex NEED_grok_hex_GLOBAL -+ grok_number() NEED_grok_number NEED_grok_number_GLOBAL -+ grok_numeric_radix() NEED_grok_numeric_radix NEED_grok_numeric_radix_GLOBAL -+ grok_oct() NEED_grok_oct NEED_grok_oct_GLOBAL -+ load_module() NEED_load_module NEED_load_module_GLOBAL -+ my_snprintf() NEED_my_snprintf NEED_my_snprintf_GLOBAL -+ my_sprintf() NEED_my_sprintf NEED_my_sprintf_GLOBAL -+ my_strlcat() NEED_my_strlcat NEED_my_strlcat_GLOBAL -+ my_strlcpy() NEED_my_strlcpy NEED_my_strlcpy_GLOBAL -+ newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL -+ newRV_noinc() NEED_newRV_noinc NEED_newRV_noinc_GLOBAL -+ newSV_type() NEED_newSV_type NEED_newSV_type_GLOBAL -+ newSVpvn_flags() NEED_newSVpvn_flags NEED_newSVpvn_flags_GLOBAL -+ newSVpvn_share() NEED_newSVpvn_share NEED_newSVpvn_share_GLOBAL -+ pv_display() NEED_pv_display NEED_pv_display_GLOBAL -+ pv_escape() NEED_pv_escape NEED_pv_escape_GLOBAL -+ pv_pretty() NEED_pv_pretty NEED_pv_pretty_GLOBAL -+ sv_2pv_flags() NEED_sv_2pv_flags NEED_sv_2pv_flags_GLOBAL -+ sv_2pvbyte() NEED_sv_2pvbyte NEED_sv_2pvbyte_GLOBAL -+ sv_catpvf_mg() NEED_sv_catpvf_mg NEED_sv_catpvf_mg_GLOBAL -+ sv_catpvf_mg_nocontext() NEED_sv_catpvf_mg_nocontext NEED_sv_catpvf_mg_nocontext_GLOBAL -+ sv_pvn_force_flags() NEED_sv_pvn_force_flags NEED_sv_pvn_force_flags_GLOBAL -+ sv_setpvf_mg() NEED_sv_setpvf_mg NEED_sv_setpvf_mg_GLOBAL -+ sv_setpvf_mg_nocontext() NEED_sv_setpvf_mg_nocontext NEED_sv_setpvf_mg_nocontext_GLOBAL -+ vload_module() NEED_vload_module NEED_vload_module_GLOBAL -+ vnewSVpvf() NEED_vnewSVpvf NEED_vnewSVpvf_GLOBAL -+ warner() NEED_warner NEED_warner_GLOBAL -+ -+To avoid namespace conflicts, you can change the namespace of the -+explicitly exported functions / variables using the C -+macro. Just C<#define> the macro before including C: -+ -+ #define DPPP_NAMESPACE MyOwnNamespace_ -+ #include "ppport.h" -+ -+The default namespace is C. -+ -+=back -+ -+The good thing is that most of the above can be checked by running -+F on your source code. See the next section for -+details. -+ -+=head1 EXAMPLES -+ -+To verify whether F is needed for your module, whether you -+should make any changes to your code, and whether any special defines -+should be used, F can be run as a Perl script to check your -+source code. Simply say: -+ -+ perl ppport.h -+ -+The result will usually be a list of patches suggesting changes -+that should at least be acceptable, if not necessarily the most -+efficient solution, or a fix for all possible problems. -+ -+If you know that your XS module uses features only available in -+newer Perl releases, if you're aware that it uses C++ comments, -+and if you want all suggestions as a single patch file, you could -+use something like this: -+ -+ perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff -+ -+If you only want your code to be scanned without any suggestions -+for changes, use: -+ -+ perl ppport.h --nochanges -+ -+You can specify a different C program or options, using -+the C<--diff> option: -+ -+ perl ppport.h --diff='diff -C 10' -+ -+This would output context diffs with 10 lines of context. -+ -+If you want to create patched copies of your files instead, use: -+ -+ perl ppport.h --copy=.new -+ -+To display portability information for the C function, -+use: -+ -+ perl ppport.h --api-info=newSVpvn -+ -+Since the argument to C<--api-info> can be a regular expression, -+you can use -+ -+ perl ppport.h --api-info=/_nomg$/ -+ -+to display portability information for all C<_nomg> functions or -+ -+ perl ppport.h --api-info=/./ -+ -+to display information for all known API elements. -+ -+=head1 BUGS -+ -+If this version of F is causing failure during -+the compilation of this module, please check if newer versions -+of either this module or C are available on CPAN -+before sending a bug report. -+ -+If F was generated using the latest version of -+C and is causing failure of this module, please -+file a bug report using the CPAN Request Tracker at L. -+ -+Please include the following information: -+ -+=over 4 -+ -+=item 1. -+ -+The complete output from running "perl -V" -+ -+=item 2. -+ -+This file. -+ -+=item 3. -+ -+The name and version of the module you were trying to build. -+ -+=item 4. -+ -+A full log of the build that failed. -+ -+=item 5. -+ -+Any other information that you think could be relevant. -+ -+=back -+ -+For the latest version of this code, please get the C -+module from CPAN. -+ -+=head1 COPYRIGHT -+ -+Version 3.x, Copyright (c) 2004-2013, Marcus Holland-Moritz. -+ -+Version 2.x, Copyright (C) 2001, Paul Marquess. -+ -+Version 1.x, Copyright (C) 1999, Kenneth Albanowski. -+ -+This program is free software; you can redistribute it and/or -+modify it under the same terms as Perl itself. -+ -+=head1 SEE ALSO -+ -+See L. -+ -+=cut -+ -+use strict; -+ -+# Disable broken TRIE-optimization -+BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if $] >= 5.009004 && $] <= 5.009005 } -+ -+my $VERSION = 3.21; -+ -+my %opt = ( -+ quiet => 0, -+ diag => 1, -+ hints => 1, -+ changes => 1, -+ cplusplus => 0, -+ filter => 1, -+ strip => 0, -+ version => 0, -+); -+ -+my($ppport) = $0 =~ /([\w.]+)$/; -+my $LF = '(?:\r\n|[\r\n])'; # line feed -+my $HS = "[ \t]"; # horizontal whitespace -+ -+# Never use C comments in this file! -+my $ccs = '/'.'*'; -+my $cce = '*'.'/'; -+my $rccs = quotemeta $ccs; -+my $rcce = quotemeta $cce; -+ -+eval { -+ require Getopt::Long; -+ Getopt::Long::GetOptions(\%opt, qw( -+ help quiet diag! filter! hints! changes! cplusplus strip version -+ patch=s copy=s diff=s compat-version=s -+ list-provided list-unsupported api-info=s -+ )) or usage(); -+}; -+ -+if ($@ and grep /^-/, @ARGV) { -+ usage() if "@ARGV" =~ /^--?h(?:elp)?$/; -+ die "Getopt::Long not found. Please don't use any options.\n"; -+} -+ -+if ($opt{version}) { -+ print "This is $0 $VERSION.\n"; -+ exit 0; -+} -+ -+usage() if $opt{help}; -+strip() if $opt{strip}; -+ -+if (exists $opt{'compat-version'}) { -+ my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) }; -+ if ($@) { -+ die "Invalid version number format: '$opt{'compat-version'}'\n"; -+ } -+ die "Only Perl 5 is supported\n" if $r != 5; -+ die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000; -+ $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s; -+} -+else { -+ $opt{'compat-version'} = 5; -+} -+ -+my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/ -+ ? ( $1 => { -+ ($2 ? ( base => $2 ) : ()), -+ ($3 ? ( todo => $3 ) : ()), -+ (index($4, 'v') >= 0 ? ( varargs => 1 ) : ()), -+ (index($4, 'p') >= 0 ? ( provided => 1 ) : ()), -+ (index($4, 'n') >= 0 ? ( nothxarg => 1 ) : ()), -+ } ) -+ : die "invalid spec: $_" } qw( -+AvFILLp|5.004050||p -+AvFILL||| -+BhkDISABLE||5.019003| -+BhkENABLE||5.019003| -+BhkENTRY_set||5.019003| -+BhkENTRY||| -+BhkFLAGS||| -+CALL_BLOCK_HOOKS||| -+CLASS|||n -+CPERLscope|5.005000||p -+CX_CURPAD_SAVE||| -+CX_CURPAD_SV||| -+CopFILEAV|5.006000||p -+CopFILEGV_set|5.006000||p -+CopFILEGV|5.006000||p -+CopFILESV|5.006000||p -+CopFILE_set|5.006000||p -+CopFILE|5.006000||p -+CopSTASHPV_set|5.006000||p -+CopSTASHPV|5.006000||p -+CopSTASH_eq|5.006000||p -+CopSTASH_set|5.006000||p -+CopSTASH|5.006000||p -+CopyD|5.009002|5.004050|p -+Copy||5.004050| -+CvPADLIST||5.008001| -+CvSTASH||| -+CvWEAKOUTSIDE||| -+DEFSV_set|5.010001||p -+DEFSV|5.004050||p -+END_EXTERN_C|5.005000||p -+ENTER||| -+ERRSV|5.004050||p -+EXTEND||| -+EXTERN_C|5.005000||p -+F0convert|||n -+FREETMPS||| -+GIMME_V||5.004000|n -+GIMME|||n -+GROK_NUMERIC_RADIX|5.007002||p -+G_ARRAY||| -+G_DISCARD||| -+G_EVAL||| -+G_METHOD|5.006001||p -+G_NOARGS||| -+G_SCALAR||| -+G_VOID||5.004000| -+GetVars||| -+GvAV||| -+GvCV||| -+GvHV||| -+GvSVn|5.009003||p -+GvSV||| -+Gv_AMupdate||5.011000| -+HEf_SVKEY||5.004000| -+HeHASH||5.004000| -+HeKEY||5.004000| -+HeKLEN||5.004000| -+HePV||5.004000| -+HeSVKEY_force||5.004000| -+HeSVKEY_set||5.004000| -+HeSVKEY||5.004000| -+HeUTF8||5.010001| -+HeVAL||5.004000| -+HvENAMELEN||5.015004| -+HvENAMEUTF8||5.015004| -+HvENAME||5.013007| -+HvNAMELEN_get|5.009003||p -+HvNAMELEN||5.015004| -+HvNAMEUTF8||5.015004| -+HvNAME_get|5.009003||p -+HvNAME||| -+INT2PTR|5.006000||p -+IN_LOCALE_COMPILETIME|5.007002||p -+IN_LOCALE_RUNTIME|5.007002||p -+IN_LOCALE|5.007002||p -+IN_PERL_COMPILETIME|5.008001||p -+IS_NUMBER_GREATER_THAN_UV_MAX|5.007002||p -+IS_NUMBER_INFINITY|5.007002||p -+IS_NUMBER_IN_UV|5.007002||p -+IS_NUMBER_NAN|5.007003||p -+IS_NUMBER_NEG|5.007002||p -+IS_NUMBER_NOT_INT|5.007002||p -+IVSIZE|5.006000||p -+IVTYPE|5.006000||p -+IVdf|5.006000||p -+LEAVE||| -+LINKLIST||5.013006| -+LVRET||| -+MARK||| -+MULTICALL||5.019003| -+MY_CXT_CLONE|5.009002||p -+MY_CXT_INIT|5.007003||p -+MY_CXT|5.007003||p -+MoveD|5.009002|5.004050|p -+Move||5.004050| -+NOOP|5.005000||p -+NUM2PTR|5.006000||p -+NVTYPE|5.006000||p -+NVef|5.006001||p -+NVff|5.006001||p -+NVgf|5.006001||p -+Newxc|5.009003||p -+Newxz|5.009003||p -+Newx|5.009003||p -+Nullav||| -+Nullch||| -+Nullcv||| -+Nullhv||| -+Nullsv||| -+OP_CLASS||5.013007| -+OP_DESC||5.007003| -+OP_NAME||5.007003| -+ORIGMARK||| -+PAD_BASE_SV||| -+PAD_CLONE_VARS||| -+PAD_COMPNAME_FLAGS||| -+PAD_COMPNAME_GEN_set||| -+PAD_COMPNAME_GEN||| -+PAD_COMPNAME_OURSTASH||| -+PAD_COMPNAME_PV||| -+PAD_COMPNAME_TYPE||| -+PAD_RESTORE_LOCAL||| -+PAD_SAVE_LOCAL||| -+PAD_SAVE_SETNULLPAD||| -+PAD_SETSV||| -+PAD_SET_CUR_NOSAVE||| -+PAD_SET_CUR||| -+PAD_SVl||| -+PAD_SV||| -+PERLIO_FUNCS_CAST|5.009003||p -+PERLIO_FUNCS_DECL|5.009003||p -+PERL_ABS|5.008001||p -+PERL_BCDVERSION|5.019002||p -+PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p -+PERL_HASH|5.004000||p -+PERL_INT_MAX|5.004000||p -+PERL_INT_MIN|5.004000||p -+PERL_LONG_MAX|5.004000||p -+PERL_LONG_MIN|5.004000||p -+PERL_MAGIC_arylen|5.007002||p -+PERL_MAGIC_backref|5.007002||p -+PERL_MAGIC_bm|5.007002||p -+PERL_MAGIC_collxfrm|5.007002||p -+PERL_MAGIC_dbfile|5.007002||p -+PERL_MAGIC_dbline|5.007002||p -+PERL_MAGIC_defelem|5.007002||p -+PERL_MAGIC_envelem|5.007002||p -+PERL_MAGIC_env|5.007002||p -+PERL_MAGIC_ext|5.007002||p -+PERL_MAGIC_fm|5.007002||p -+PERL_MAGIC_glob|5.019002||p -+PERL_MAGIC_isaelem|5.007002||p -+PERL_MAGIC_isa|5.007002||p -+PERL_MAGIC_mutex|5.019002||p -+PERL_MAGIC_nkeys|5.007002||p -+PERL_MAGIC_overload_elem|5.019002||p -+PERL_MAGIC_overload_table|5.007002||p -+PERL_MAGIC_overload|5.019002||p -+PERL_MAGIC_pos|5.007002||p -+PERL_MAGIC_qr|5.007002||p -+PERL_MAGIC_regdata|5.007002||p -+PERL_MAGIC_regdatum|5.007002||p -+PERL_MAGIC_regex_global|5.007002||p -+PERL_MAGIC_shared_scalar|5.007003||p -+PERL_MAGIC_shared|5.007003||p -+PERL_MAGIC_sigelem|5.007002||p -+PERL_MAGIC_sig|5.007002||p -+PERL_MAGIC_substr|5.007002||p -+PERL_MAGIC_sv|5.007002||p -+PERL_MAGIC_taint|5.007002||p -+PERL_MAGIC_tiedelem|5.007002||p -+PERL_MAGIC_tiedscalar|5.007002||p -+PERL_MAGIC_tied|5.007002||p -+PERL_MAGIC_utf8|5.008001||p -+PERL_MAGIC_uvar_elem|5.007003||p -+PERL_MAGIC_uvar|5.007002||p -+PERL_MAGIC_vec|5.007002||p -+PERL_MAGIC_vstring|5.008001||p -+PERL_PV_ESCAPE_ALL|5.009004||p -+PERL_PV_ESCAPE_FIRSTCHAR|5.009004||p -+PERL_PV_ESCAPE_NOBACKSLASH|5.009004||p -+PERL_PV_ESCAPE_NOCLEAR|5.009004||p -+PERL_PV_ESCAPE_QUOTE|5.009004||p -+PERL_PV_ESCAPE_RE|5.009005||p -+PERL_PV_ESCAPE_UNI_DETECT|5.009004||p -+PERL_PV_ESCAPE_UNI|5.009004||p -+PERL_PV_PRETTY_DUMP|5.009004||p -+PERL_PV_PRETTY_ELLIPSES|5.010000||p -+PERL_PV_PRETTY_LTGT|5.009004||p -+PERL_PV_PRETTY_NOCLEAR|5.010000||p -+PERL_PV_PRETTY_QUOTE|5.009004||p -+PERL_PV_PRETTY_REGPROP|5.009004||p -+PERL_QUAD_MAX|5.004000||p -+PERL_QUAD_MIN|5.004000||p -+PERL_REVISION|5.006000||p -+PERL_SCAN_ALLOW_UNDERSCORES|5.007003||p -+PERL_SCAN_DISALLOW_PREFIX|5.007003||p -+PERL_SCAN_GREATER_THAN_UV_MAX|5.007003||p -+PERL_SCAN_SILENT_ILLDIGIT|5.008001||p -+PERL_SHORT_MAX|5.004000||p -+PERL_SHORT_MIN|5.004000||p -+PERL_SIGNALS_UNSAFE_FLAG|5.008001||p -+PERL_SUBVERSION|5.006000||p -+PERL_SYS_INIT3||5.010000| -+PERL_SYS_INIT||5.010000| -+PERL_SYS_TERM||5.019003| -+PERL_UCHAR_MAX|5.004000||p -+PERL_UCHAR_MIN|5.004000||p -+PERL_UINT_MAX|5.004000||p -+PERL_UINT_MIN|5.004000||p -+PERL_ULONG_MAX|5.004000||p -+PERL_ULONG_MIN|5.004000||p -+PERL_UNUSED_ARG|5.009003||p -+PERL_UNUSED_CONTEXT|5.009004||p -+PERL_UNUSED_DECL|5.007002||p -+PERL_UNUSED_VAR|5.007002||p -+PERL_UQUAD_MAX|5.004000||p -+PERL_UQUAD_MIN|5.004000||p -+PERL_USE_GCC_BRACE_GROUPS|5.009004||p -+PERL_USHORT_MAX|5.004000||p -+PERL_USHORT_MIN|5.004000||p -+PERL_VERSION|5.006000||p -+PL_DBsignal|5.005000||p -+PL_DBsingle|||pn -+PL_DBsub|||pn -+PL_DBtrace|||pn -+PL_Sv|5.005000||p -+PL_bufend|5.019002||p -+PL_bufptr|5.019002||p -+PL_check||5.006000| -+PL_compiling|5.004050||p -+PL_comppad_name||5.017004| -+PL_comppad||5.008001| -+PL_copline|5.019002||p -+PL_curcop|5.004050||p -+PL_curpad||5.005000| -+PL_curstash|5.004050||p -+PL_debstash|5.004050||p -+PL_defgv|5.004050||p -+PL_diehook|5.004050||p -+PL_dirty|5.004050||p -+PL_dowarn|||pn -+PL_errgv|5.004050||p -+PL_error_count|5.019002||p -+PL_expect|5.019002||p -+PL_hexdigit|5.005000||p -+PL_hints|5.005000||p -+PL_in_my_stash|5.019002||p -+PL_in_my|5.019002||p -+PL_keyword_plugin||5.011002| -+PL_last_in_gv|||n -+PL_laststatval|5.005000||p -+PL_lex_state|5.019002||p -+PL_lex_stuff|5.019002||p -+PL_linestr|5.019002||p -+PL_modglobal||5.005000|n -+PL_na|5.004050||pn -+PL_no_modify|5.006000||p -+PL_ofsgv|||n -+PL_opfreehook||5.011000|n -+PL_parser|5.009005|5.009005|p -+PL_peepp||5.007003|n -+PL_perl_destruct_level|5.004050||p -+PL_perldb|5.004050||p -+PL_ppaddr|5.006000||p -+PL_rpeepp||5.013005|n -+PL_rsfp_filters|5.019002||p -+PL_rsfp|5.019002||p -+PL_rs|||n -+PL_signals|5.008001||p -+PL_stack_base|5.004050||p -+PL_stack_sp|5.004050||p -+PL_statcache|5.005000||p -+PL_stdingv|5.004050||p -+PL_sv_arenaroot|5.004050||p -+PL_sv_no|5.004050||pn -+PL_sv_undef|5.004050||pn -+PL_sv_yes|5.004050||pn -+PL_tainted|5.004050||p -+PL_tainting|5.004050||p -+PL_tokenbuf|5.019002||p -+POP_MULTICALL||5.019003| -+POPi|||n -+POPl|||n -+POPn|||n -+POPpbytex||5.007001|n -+POPpx||5.005030|n -+POPp|||n -+POPs|||n -+PTR2IV|5.006000||p -+PTR2NV|5.006000||p -+PTR2UV|5.006000||p -+PTR2nat|5.009003||p -+PTR2ul|5.007001||p -+PTRV|5.006000||p -+PUSHMARK||| -+PUSH_MULTICALL||5.019003| -+PUSHi||| -+PUSHmortal|5.009002||p -+PUSHn||| -+PUSHp||| -+PUSHs||| -+PUSHu|5.004000||p -+PUTBACK||| -+PadARRAY||5.019003| -+PadMAX||5.019003| -+PadlistARRAY||5.019003| -+PadlistMAX||5.019003| -+PadlistNAMESARRAY||5.019003| -+PadlistNAMESMAX||5.019003| -+PadlistNAMES||5.019003| -+PadlistREFCNT||5.017004| -+PadnameIsOUR||| -+PadnameIsSTATE||| -+PadnameLEN||5.019003| -+PadnameOURSTASH||| -+PadnameOUTER||| -+PadnamePV||5.019003| -+PadnameSV||5.019003| -+PadnameTYPE||| -+PadnameUTF8||5.019003| -+PadnamelistARRAY||5.019003| -+PadnamelistMAX||5.019003| -+PerlIO_clearerr||5.007003| -+PerlIO_close||5.007003| -+PerlIO_context_layers||5.009004| -+PerlIO_eof||5.007003| -+PerlIO_error||5.007003| -+PerlIO_fileno||5.007003| -+PerlIO_fill||5.007003| -+PerlIO_flush||5.007003| -+PerlIO_get_base||5.007003| -+PerlIO_get_bufsiz||5.007003| -+PerlIO_get_cnt||5.007003| -+PerlIO_get_ptr||5.007003| -+PerlIO_read||5.007003| -+PerlIO_seek||5.007003| -+PerlIO_set_cnt||5.007003| -+PerlIO_set_ptrcnt||5.007003| -+PerlIO_setlinebuf||5.007003| -+PerlIO_stderr||5.007003| -+PerlIO_stdin||5.007003| -+PerlIO_stdout||5.007003| -+PerlIO_tell||5.007003| -+PerlIO_unread||5.007003| -+PerlIO_write||5.007003| -+Perl_signbit||5.009005|n -+PoisonFree|5.009004||p -+PoisonNew|5.009004||p -+PoisonWith|5.009004||p -+Poison|5.008000||p -+READ_XDIGIT||5.017006| -+RETVAL|||n -+Renewc||| -+Renew||| -+SAVECLEARSV||| -+SAVECOMPPAD||| -+SAVEPADSV||| -+SAVETMPS||| -+SAVE_DEFSV|5.004050||p -+SPAGAIN||| -+SP||| -+START_EXTERN_C|5.005000||p -+START_MY_CXT|5.007003||p -+STMT_END|||p -+STMT_START|||p -+STR_WITH_LEN|5.009003||p -+ST||| -+SV_CONST_RETURN|5.009003||p -+SV_COW_DROP_PV|5.008001||p -+SV_COW_SHARED_HASH_KEYS|5.009005||p -+SV_GMAGIC|5.007002||p -+SV_HAS_TRAILING_NUL|5.009004||p -+SV_IMMEDIATE_UNREF|5.007001||p -+SV_MUTABLE_RETURN|5.009003||p -+SV_NOSTEAL|5.009002||p -+SV_SMAGIC|5.009003||p -+SV_UTF8_NO_ENCODING|5.008001||p -+SVfARG|5.009005||p -+SVf_UTF8|5.006000||p -+SVf|5.006000||p -+SVt_INVLIST||5.019002| -+SVt_IV||| -+SVt_NULL||| -+SVt_NV||| -+SVt_PVAV||| -+SVt_PVCV||| -+SVt_PVFM||| -+SVt_PVGV||| -+SVt_PVHV||| -+SVt_PVIO||| -+SVt_PVIV||| -+SVt_PVLV||| -+SVt_PVMG||| -+SVt_PVNV||| -+SVt_PV||| -+SVt_REGEXP||5.011000| -+Safefree||| -+Slab_Alloc||| -+Slab_Free||| -+Slab_to_ro||| -+Slab_to_rw||| -+StructCopy||| -+SvCUR_set||| -+SvCUR||| -+SvEND||| -+SvGAMAGIC||5.006001| -+SvGETMAGIC|5.004050||p -+SvGROW||| -+SvIOK_UV||5.006000| -+SvIOK_notUV||5.006000| -+SvIOK_off||| -+SvIOK_only_UV||5.006000| -+SvIOK_only||| -+SvIOK_on||| -+SvIOKp||| -+SvIOK||| -+SvIVX||| -+SvIV_nomg|5.009001||p -+SvIV_set||| -+SvIVx||| -+SvIV||| -+SvIsCOW_shared_hash||5.008003| -+SvIsCOW||5.008003| -+SvLEN_set||| -+SvLEN||| -+SvLOCK||5.007003| -+SvMAGIC_set|5.009003||p -+SvNIOK_off||| -+SvNIOKp||| -+SvNIOK||| -+SvNOK_off||| -+SvNOK_only||| -+SvNOK_on||| -+SvNOKp||| -+SvNOK||| -+SvNVX||| -+SvNV_nomg||5.013002| -+SvNV_set||| -+SvNVx||| -+SvNV||| -+SvOK||| -+SvOOK_offset||5.011000| -+SvOOK||| -+SvPOK_off||| -+SvPOK_only_UTF8||5.006000| -+SvPOK_only||| -+SvPOK_on||| -+SvPOKp||| -+SvPOK||| -+SvPVX_const|5.009003||p -+SvPVX_mutable|5.009003||p -+SvPVX||| -+SvPV_const|5.009003||p -+SvPV_flags_const_nolen|5.009003||p -+SvPV_flags_const|5.009003||p -+SvPV_flags_mutable|5.009003||p -+SvPV_flags|5.007002||p -+SvPV_force_flags_mutable|5.009003||p -+SvPV_force_flags_nolen|5.009003||p -+SvPV_force_flags|5.007002||p -+SvPV_force_mutable|5.009003||p -+SvPV_force_nolen|5.009003||p -+SvPV_force_nomg_nolen|5.009003||p -+SvPV_force_nomg|5.007002||p -+SvPV_force|||p -+SvPV_mutable|5.009003||p -+SvPV_nolen_const|5.009003||p -+SvPV_nolen|5.006000||p -+SvPV_nomg_const_nolen|5.009003||p -+SvPV_nomg_const|5.009003||p -+SvPV_nomg_nolen|5.013007||p -+SvPV_nomg|5.007002||p -+SvPV_renew|5.009003||p -+SvPV_set||| -+SvPVbyte_force||5.009002| -+SvPVbyte_nolen||5.006000| -+SvPVbytex_force||5.006000| -+SvPVbytex||5.006000| -+SvPVbyte|5.006000||p -+SvPVutf8_force||5.006000| -+SvPVutf8_nolen||5.006000| -+SvPVutf8x_force||5.006000| -+SvPVutf8x||5.006000| -+SvPVutf8||5.006000| -+SvPVx||| -+SvPV||| -+SvREFCNT_dec_NN||5.017007| -+SvREFCNT_dec||| -+SvREFCNT_inc_NN|5.009004||p -+SvREFCNT_inc_simple_NN|5.009004||p -+SvREFCNT_inc_simple_void_NN|5.009004||p -+SvREFCNT_inc_simple_void|5.009004||p -+SvREFCNT_inc_simple|5.009004||p -+SvREFCNT_inc_void_NN|5.009004||p -+SvREFCNT_inc_void|5.009004||p -+SvREFCNT_inc|||p -+SvREFCNT||| -+SvROK_off||| -+SvROK_on||| -+SvROK||| -+SvRV_set|5.009003||p -+SvRV||| -+SvRXOK||5.009005| -+SvRX||5.009005| -+SvSETMAGIC||| -+SvSHARED_HASH|5.009003||p -+SvSHARE||5.007003| -+SvSTASH_set|5.009003||p -+SvSTASH||| -+SvSetMagicSV_nosteal||5.004000| -+SvSetMagicSV||5.004000| -+SvSetSV_nosteal||5.004000| -+SvSetSV||| -+SvTAINTED_off||5.004000| -+SvTAINTED_on||5.004000| -+SvTAINTED||5.004000| -+SvTAINT||| -+SvTHINKFIRST||| -+SvTRUE_nomg||5.013006| -+SvTRUE||| -+SvTYPE||| -+SvUNLOCK||5.007003| -+SvUOK|5.007001|5.006000|p -+SvUPGRADE||| -+SvUTF8_off||5.006000| -+SvUTF8_on||5.006000| -+SvUTF8||5.006000| -+SvUVXx|5.004000||p -+SvUVX|5.004000||p -+SvUV_nomg|5.009001||p -+SvUV_set|5.009003||p -+SvUVx|5.004000||p -+SvUV|5.004000||p -+SvVOK||5.008001| -+SvVSTRING_mg|5.009004||p -+THIS|||n -+UNDERBAR|5.009002||p -+UTF8_MAXBYTES|5.009002||p -+UVSIZE|5.006000||p -+UVTYPE|5.006000||p -+UVXf|5.007001||p -+UVof|5.006000||p -+UVuf|5.006000||p -+UVxf|5.006000||p -+WARN_ALL|5.006000||p -+WARN_AMBIGUOUS|5.006000||p -+WARN_ASSERTIONS|5.019002||p -+WARN_BAREWORD|5.006000||p -+WARN_CLOSED|5.006000||p -+WARN_CLOSURE|5.006000||p -+WARN_DEBUGGING|5.006000||p -+WARN_DEPRECATED|5.006000||p -+WARN_DIGIT|5.006000||p -+WARN_EXEC|5.006000||p -+WARN_EXITING|5.006000||p -+WARN_GLOB|5.006000||p -+WARN_INPLACE|5.006000||p -+WARN_INTERNAL|5.006000||p -+WARN_IO|5.006000||p -+WARN_LAYER|5.008000||p -+WARN_MALLOC|5.006000||p -+WARN_MISC|5.006000||p -+WARN_NEWLINE|5.006000||p -+WARN_NUMERIC|5.006000||p -+WARN_ONCE|5.006000||p -+WARN_OVERFLOW|5.006000||p -+WARN_PACK|5.006000||p -+WARN_PARENTHESIS|5.006000||p -+WARN_PIPE|5.006000||p -+WARN_PORTABLE|5.006000||p -+WARN_PRECEDENCE|5.006000||p -+WARN_PRINTF|5.006000||p -+WARN_PROTOTYPE|5.006000||p -+WARN_QW|5.006000||p -+WARN_RECURSION|5.006000||p -+WARN_REDEFINE|5.006000||p -+WARN_REGEXP|5.006000||p -+WARN_RESERVED|5.006000||p -+WARN_SEMICOLON|5.006000||p -+WARN_SEVERE|5.006000||p -+WARN_SIGNAL|5.006000||p -+WARN_SUBSTR|5.006000||p -+WARN_SYNTAX|5.006000||p -+WARN_TAINT|5.006000||p -+WARN_THREADS|5.008000||p -+WARN_UNINITIALIZED|5.006000||p -+WARN_UNOPENED|5.006000||p -+WARN_UNPACK|5.006000||p -+WARN_UNTIE|5.006000||p -+WARN_UTF8|5.006000||p -+WARN_VOID|5.006000||p -+WIDEST_UTYPE|5.015004||p -+XCPT_CATCH|5.009002||p -+XCPT_RETHROW|5.009002|5.007001|p -+XCPT_TRY_END|5.009002|5.004000|p -+XCPT_TRY_START|5.009002|5.004000|p -+XPUSHi||| -+XPUSHmortal|5.009002||p -+XPUSHn||| -+XPUSHp||| -+XPUSHs||| -+XPUSHu|5.004000||p -+XSPROTO|5.010000||p -+XSRETURN_EMPTY||| -+XSRETURN_IV||| -+XSRETURN_NO||| -+XSRETURN_NV||| -+XSRETURN_PV||| -+XSRETURN_UNDEF||| -+XSRETURN_UV|5.008001||p -+XSRETURN_YES||| -+XSRETURN|||p -+XST_mIV||| -+XST_mNO||| -+XST_mNV||| -+XST_mPV||| -+XST_mUNDEF||| -+XST_mUV|5.008001||p -+XST_mYES||| -+XS_APIVERSION_BOOTCHECK||5.013004| -+XS_EXTERNAL||5.019003| -+XS_INTERNAL||5.019003| -+XS_VERSION_BOOTCHECK||| -+XS_VERSION||| -+XSprePUSH|5.006000||p -+XS||| -+XopDISABLE||5.019003| -+XopENABLE||5.019003| -+XopENTRY_set||5.019003| -+XopENTRY||5.019003| -+XopFLAGS||5.013007| -+ZeroD|5.009002||p -+Zero||| -+_aMY_CXT|5.007003||p -+_add_range_to_invlist||| -+_append_range_to_invlist||| -+_core_swash_init||| -+_get_swash_invlist||| -+_invlist_array_init||| -+_invlist_contains_cp||| -+_invlist_contents||| -+_invlist_dump||| -+_invlist_intersection_maybe_complement_2nd||| -+_invlist_intersection||| -+_invlist_invert_prop||| -+_invlist_invert||| -+_invlist_len||| -+_invlist_populate_swatch||| -+_invlist_search||| -+_invlist_subtract||| -+_invlist_union_maybe_complement_2nd||| -+_invlist_union||| -+_is_uni_FOO||5.017008| -+_is_uni_perl_idcont||5.017008| -+_is_uni_perl_idstart||5.017007| -+_is_utf8_FOO||5.017008| -+_is_utf8_mark||5.017008| -+_is_utf8_perl_idcont||5.017008| -+_is_utf8_perl_idstart||5.017007| -+_new_invlist_C_array||| -+_new_invlist||| -+_pMY_CXT|5.007003||p -+_swash_inversion_hash||| -+_swash_to_invlist||| -+_to_fold_latin1||| -+_to_uni_fold_flags||5.013011| -+_to_upper_title_latin1||| -+_to_utf8_fold_flags||5.015006| -+_to_utf8_lower_flags||5.015006| -+_to_utf8_title_flags||5.015006| -+_to_utf8_upper_flags||5.015006| -+aMY_CXT_|5.007003||p -+aMY_CXT|5.007003||p -+aTHXR_|5.019002||p -+aTHXR|5.019002||p -+aTHX_|5.006000||p -+aTHX|5.006000||p -+aassign_common_vars||| -+add_cp_to_invlist||| -+add_data|||n -+add_utf16_textfilter||| -+addmad||| -+adjust_size_and_find_bucket|||n -+adjust_stack_on_leave||| -+alloc_maybe_populate_EXACT||| -+alloccopstash||| -+allocmy||| -+amagic_call||| -+amagic_cmp_locale||| -+amagic_cmp||| -+amagic_deref_call||5.013007| -+amagic_i_ncmp||| -+amagic_is_enabled||| -+amagic_ncmp||| -+anonymise_cv_maybe||| -+any_dup||| -+ao||| -+append_madprops||| -+apply_attrs_my||| -+apply_attrs_string||5.006001| -+apply_attrs||| -+apply||| -+assert_uft8_cache_coherent||| -+atfork_lock||5.007003|n -+atfork_unlock||5.007003|n -+av_arylen_p||5.009003| -+av_clear||| -+av_create_and_push||5.009005| -+av_create_and_unshift_one||5.009005| -+av_delete||5.006000| -+av_exists||5.006000| -+av_extend_guts||| -+av_extend||| -+av_fetch||| -+av_fill||| -+av_iter_p||5.011000| -+av_len||| -+av_make||| -+av_pop||| -+av_push||| -+av_reify||| -+av_shift||| -+av_store||| -+av_tindex||5.017009| -+av_top_index||5.017009| -+av_undef||| -+av_unshift||| -+ax|||n -+bad_type_gv||| -+bad_type_pv||| -+bind_match||| -+block_end||| -+block_gimme||5.004000| -+block_start||| -+blockhook_register||5.013003| -+boolSV|5.004000||p -+boot_core_PerlIO||| -+boot_core_UNIVERSAL||| -+boot_core_mro||| -+bytes_cmp_utf8||5.013007| -+bytes_from_utf8||5.007001| -+bytes_to_uni|||n -+bytes_to_utf8||5.006001| -+call_argv|5.006000||p -+call_atexit||5.006000| -+call_list||5.004000| -+call_method|5.006000||p -+call_pv|5.006000||p -+call_sv|5.006000||p -+caller_cx||5.013005| -+calloc||5.007002|n -+cando||| -+cast_i32||5.006000| -+cast_iv||5.006000| -+cast_ulong||5.006000| -+cast_uv||5.006000| -+check_locale_boundary_crossing||| -+check_type_and_open||| -+check_uni||| -+check_utf8_print||| -+checkcomma||| -+ckWARN|5.006000||p -+ck_entersub_args_core||| -+ck_entersub_args_list||5.013006| -+ck_entersub_args_proto_or_list||5.013006| -+ck_entersub_args_proto||5.013006| -+ck_warner_d||5.011001|v -+ck_warner||5.011001|v -+ckwarn_common||| -+ckwarn_d||5.009003| -+ckwarn||5.009003| -+cl_and|||n -+cl_anything|||n -+cl_init|||n -+cl_is_anything|||n -+cl_or|||n -+clear_placeholders||| -+clone_params_del|||n -+clone_params_new|||n -+closest_cop||| -+compute_EXACTish||| -+convert||| -+cop_fetch_label||5.015001| -+cop_free||| -+cop_hints_2hv||5.013007| -+cop_hints_fetch_pvn||5.013007| -+cop_hints_fetch_pvs||5.013007| -+cop_hints_fetch_pv||5.013007| -+cop_hints_fetch_sv||5.013007| -+cop_store_label||5.015001| -+cophh_2hv||5.013007| -+cophh_copy||5.013007| -+cophh_delete_pvn||5.013007| -+cophh_delete_pvs||5.013007| -+cophh_delete_pv||5.013007| -+cophh_delete_sv||5.013007| -+cophh_fetch_pvn||5.013007| -+cophh_fetch_pvs||5.013007| -+cophh_fetch_pv||5.013007| -+cophh_fetch_sv||5.013007| -+cophh_free||5.013007| -+cophh_new_empty||5.019003| -+cophh_store_pvn||5.013007| -+cophh_store_pvs||5.013007| -+cophh_store_pv||5.013007| -+cophh_store_sv||5.013007| -+core_prototype||| -+core_regclass_swash||| -+coresub_op||| -+could_it_be_a_POSIX_class||| -+cr_textfilter||| -+create_eval_scope||| -+croak_memory_wrap||5.019003|n -+croak_no_mem|||n -+croak_no_modify||5.013003|n -+croak_nocontext|||vn -+croak_popstack|||n -+croak_sv||5.013001| -+croak_xs_usage||5.010001|n -+croak|||v -+csighandler||5.009003|n -+curmad||| -+current_re_engine||| -+curse||| -+custom_op_desc||5.007003| -+custom_op_name||5.007003| -+custom_op_register||5.013007| -+custom_op_xop||5.013007| -+cv_ckproto_len_flags||| -+cv_clone_into||| -+cv_clone||| -+cv_const_sv_or_av||| -+cv_const_sv||5.004000| -+cv_dump||| -+cv_forget_slab||| -+cv_get_call_checker||5.013006| -+cv_set_call_checker||5.013006| -+cv_undef||| -+cvgv_set||| -+cvstash_set||| -+cx_dump||5.005000| -+cx_dup||| -+cxinc||| -+dAXMARK|5.009003||p -+dAX|5.007002||p -+dITEMS|5.007002||p -+dMARK||| -+dMULTICALL||5.009003| -+dMY_CXT_SV|5.007003||p -+dMY_CXT|5.007003||p -+dNOOP|5.006000||p -+dORIGMARK||| -+dSP||| -+dTHR|5.004050||p -+dTHXR|5.019002||p -+dTHXa|5.006000||p -+dTHXoa|5.006000||p -+dTHX|5.006000||p -+dUNDERBAR|5.009002||p -+dVAR|5.009003||p -+dXCPT|5.009002||p -+dXSARGS||| -+dXSI32||| -+dXSTARG|5.006000||p -+deb_curcv||| -+deb_nocontext|||vn -+deb_stack_all||| -+deb_stack_n||| -+debop||5.005000| -+debprofdump||5.005000| -+debprof||| -+debstackptrs||5.007003| -+debstack||5.007003| -+debug_start_match||| -+deb||5.007003|v -+defelem_target||| -+del_sv||| -+delete_eval_scope||| -+delimcpy||5.004000|n -+deprecate_commaless_var_list||| -+despatch_signals||5.007001| -+destroy_matcher||| -+die_nocontext|||vn -+die_sv||5.013001| -+die_unwind||| -+die|||v -+dirp_dup||| -+div128||| -+djSP||| -+do_aexec5||| -+do_aexec||| -+do_aspawn||| -+do_binmode||5.004050| -+do_chomp||| -+do_close||| -+do_delete_local||| -+do_dump_pad||| -+do_eof||| -+do_exec3||| -+do_execfree||| -+do_exec||| -+do_gv_dump||5.006000| -+do_gvgv_dump||5.006000| -+do_hv_dump||5.006000| -+do_ipcctl||| -+do_ipcget||| -+do_join||| -+do_magic_dump||5.006000| -+do_msgrcv||| -+do_msgsnd||| -+do_ncmp||| -+do_oddball||| -+do_op_dump||5.006000| -+do_op_xmldump||| -+do_open9||5.006000| -+do_openn||5.007001| -+do_open||5.004000| -+do_pmop_dump||5.006000| -+do_pmop_xmldump||| -+do_print||| -+do_readline||| -+do_seek||| -+do_semop||| -+do_shmio||| -+do_smartmatch||| -+do_spawn_nowait||| -+do_spawn||| -+do_sprintf||| -+do_sv_dump||5.006000| -+do_sysseek||| -+do_tell||| -+do_trans_complex_utf8||| -+do_trans_complex||| -+do_trans_count_utf8||| -+do_trans_count||| -+do_trans_simple_utf8||| -+do_trans_simple||| -+do_trans||| -+do_vecget||| -+do_vecset||| -+do_vop||| -+docatch||| -+doeval||| -+dofile||| -+dofindlabel||| -+doform||| -+doing_taint||5.008001|n -+dooneliner||| -+doopen_pm||| -+doparseform||| -+dopoptoeval||| -+dopoptogiven||| -+dopoptolabel||| -+dopoptoloop||| -+dopoptosub_at||| -+dopoptowhen||| -+doref||5.009003| -+dounwind||| -+dowantarray||| -+dump_all_perl||| -+dump_all||5.006000| -+dump_eval||5.006000| -+dump_exec_pos||| -+dump_fds||| -+dump_form||5.006000| -+dump_indent||5.006000|v -+dump_mstats||| -+dump_packsubs_perl||| -+dump_packsubs||5.006000| -+dump_sub_perl||| -+dump_sub||5.006000| -+dump_sv_child||| -+dump_trie_interim_list||| -+dump_trie_interim_table||| -+dump_trie||| -+dump_vindent||5.006000| -+dumpuntil||| -+dup_attrlist||| -+emulate_cop_io||| -+eval_pv|5.006000||p -+eval_sv|5.006000||p -+exec_failed||| -+expect_number||| -+fbm_compile||5.005000| -+fbm_instr||5.005000| -+feature_is_enabled||| -+filter_add||| -+filter_del||| -+filter_gets||| -+filter_read||| -+finalize_optree||| -+finalize_op||| -+find_and_forget_pmops||| -+find_array_subscript||| -+find_beginning||| -+find_byclass||| -+find_hash_subscript||| -+find_in_my_stash||| -+find_lexical_cv||| -+find_runcv_where||| -+find_runcv||5.008001| -+find_rundefsv2||| -+find_rundefsvoffset||5.009002| -+find_rundefsv||5.013002| -+find_script||| -+find_uninit_var||| -+first_symbol|||n -+foldEQ_latin1||5.013008|n -+foldEQ_locale||5.013002|n -+foldEQ_utf8_flags||5.013010| -+foldEQ_utf8||5.013002| -+foldEQ||5.013002|n -+fold_constants||| -+forbid_setid||| -+force_ident_maybe_lex||| -+force_ident||| -+force_list||| -+force_next||| -+force_strict_version||| -+force_version||| -+force_word||| -+forget_pmop||| -+form_nocontext|||vn -+form_short_octal_warning||| -+form||5.004000|v -+fp_dup||| -+fprintf_nocontext|||vn -+free_global_struct||| -+free_tied_hv_pool||| -+free_tmps||| -+gen_constant_list||| -+get_and_check_backslash_N_name||| -+get_aux_mg||| -+get_av|5.006000||p -+get_context||5.006000|n -+get_cvn_flags|5.009005||p -+get_cvs|5.011000||p -+get_cv|5.006000||p -+get_db_sub||| -+get_debug_opts||| -+get_hash_seed||| -+get_hv|5.006000||p -+get_invlist_iter_addr||| -+get_invlist_offset_addr||| -+get_invlist_previous_index_addr||| -+get_mstats||| -+get_no_modify||| -+get_num||| -+get_op_descs||5.005000| -+get_op_names||5.005000| -+get_opargs||| -+get_ppaddr||5.006000| -+get_re_arg||| -+get_sv|5.006000||p -+get_vtbl||5.005030| -+getcwd_sv||5.007002| -+getenv_len||| -+glob_2number||| -+glob_assign_glob||| -+glob_assign_ref||| -+gp_dup||| -+gp_free||| -+gp_ref||| -+grok_bin|5.007003||p -+grok_bslash_N||| -+grok_bslash_c||| -+grok_bslash_o||| -+grok_bslash_x||| -+grok_hex|5.007003||p -+grok_number|5.007002||p -+grok_numeric_radix|5.007002||p -+grok_oct|5.007003||p -+group_end||| -+gv_AVadd||| -+gv_HVadd||| -+gv_IOadd||| -+gv_SVadd||| -+gv_add_by_type||5.011000| -+gv_autoload4||5.004000| -+gv_autoload_pvn||5.015004| -+gv_autoload_pv||5.015004| -+gv_autoload_sv||5.015004| -+gv_check||| -+gv_const_sv||5.009003| -+gv_dump||5.006000| -+gv_efullname3||5.004000| -+gv_efullname4||5.006001| -+gv_efullname||| -+gv_ename||| -+gv_fetchfile_flags||5.009005| -+gv_fetchfile||| -+gv_fetchmeth_autoload||5.007003| -+gv_fetchmeth_pv_autoload||5.015004| -+gv_fetchmeth_pvn_autoload||5.015004| -+gv_fetchmeth_pvn||5.015004| -+gv_fetchmeth_pv||5.015004| -+gv_fetchmeth_sv_autoload||5.015004| -+gv_fetchmeth_sv||5.015004| -+gv_fetchmethod_autoload||5.004000| -+gv_fetchmethod_pv_flags||5.015004| -+gv_fetchmethod_pvn_flags||5.015004| -+gv_fetchmethod_sv_flags||5.015004| -+gv_fetchmethod||| -+gv_fetchmeth||| -+gv_fetchpvn_flags|5.009002||p -+gv_fetchpvs|5.009004||p -+gv_fetchpv||| -+gv_fetchsv|5.009002||p -+gv_fullname3||5.004000| -+gv_fullname4||5.006001| -+gv_fullname||| -+gv_handler||5.007001| -+gv_init_pvn||5.015004| -+gv_init_pv||5.015004| -+gv_init_svtype||| -+gv_init_sv||5.015004| -+gv_init||| -+gv_magicalize_isa||| -+gv_name_set||5.009004| -+gv_stashpvn|5.004000||p -+gv_stashpvs|5.009003||p -+gv_stashpv||| -+gv_stashsv||| -+gv_try_downgrade||| -+handle_regex_sets||| -+he_dup||| -+hek_dup||| -+hfree_next_entry||| -+hfreeentries||| -+hsplit||| -+hv_assert||| -+hv_auxinit||| -+hv_backreferences_p||| -+hv_clear_placeholders||5.009001| -+hv_clear||| -+hv_common_key_len||5.010000| -+hv_common||5.010000| -+hv_copy_hints_hv||5.009004| -+hv_delayfree_ent||5.004000| -+hv_delete_common||| -+hv_delete_ent||5.004000| -+hv_delete||| -+hv_eiter_p||5.009003| -+hv_eiter_set||5.009003| -+hv_ename_add||| -+hv_ename_delete||| -+hv_exists_ent||5.004000| -+hv_exists||| -+hv_fetch_ent||5.004000| -+hv_fetchs|5.009003||p -+hv_fetch||| -+hv_fill||5.013002| -+hv_free_ent_ret||| -+hv_free_ent||5.004000| -+hv_iterinit||| -+hv_iterkeysv||5.004000| -+hv_iterkey||| -+hv_iternext_flags||5.008000| -+hv_iternextsv||| -+hv_iternext||| -+hv_iterval||| -+hv_kill_backrefs||| -+hv_ksplit||5.004000| -+hv_magic_check|||n -+hv_magic||| -+hv_name_set||5.009003| -+hv_notallowed||| -+hv_placeholders_get||5.009003| -+hv_placeholders_p||| -+hv_placeholders_set||5.009003| -+hv_rand_set||5.017011| -+hv_riter_p||5.009003| -+hv_riter_set||5.009003| -+hv_scalar||5.009001| -+hv_store_ent||5.004000| -+hv_store_flags||5.008000| -+hv_stores|5.009004||p -+hv_store||| -+hv_undef_flags||| -+hv_undef||| -+ibcmp_locale||5.004000| -+ibcmp_utf8||5.007003| -+ibcmp||| -+incline||| -+incpush_if_exists||| -+incpush_use_sep||| -+incpush||| -+ingroup||| -+init_argv_symbols||| -+init_constants||| -+init_dbargs||| -+init_debugger||| -+init_global_struct||| -+init_i18nl10n||5.006000| -+init_i18nl14n||5.006000| -+init_ids||| -+init_interp||| -+init_main_stash||| -+init_perllib||| -+init_postdump_symbols||| -+init_predump_symbols||| -+init_stacks||5.005000| -+init_tm||5.007002| -+inplace_aassign||| -+instr|||n -+intro_my||| -+intuit_method||| -+intuit_more||| -+invert||| -+invlist_array||| -+invlist_clone||| -+invlist_extend||| -+invlist_highest||| -+invlist_is_iterating||| -+invlist_iterfinish||| -+invlist_iterinit||| -+invlist_iternext||| -+invlist_max||| -+invlist_previous_index||| -+invlist_set_len||| -+invlist_set_previous_index||| -+invlist_trim||| -+invoke_exception_hook||| -+io_close||| -+isALNUMC|5.006000||p -+isALNUM_lazy||| -+isALPHANUMERIC||5.017008| -+isALPHA||| -+isASCII|5.006000|5.006000|p -+isBLANK|5.006001||p -+isCNTRL|5.006000|5.006000|p -+isDIGIT||| -+isFOO_lc||| -+isFOO_utf8_lc||| -+isGRAPH|5.006000||p -+isGV_with_GP|5.009004||p -+isIDCONT||5.017008| -+isIDFIRST_lazy||| -+isIDFIRST||| -+isLOWER||| -+isOCTAL||5.013005| -+isPRINT|5.004000||p -+isPSXSPC|5.006001||p -+isPUNCT|5.006000||p -+isSPACE||| -+isUPPER||| -+isWORDCHAR||5.013006| -+isXDIGIT|5.006000||p -+is_an_int||| -+is_ascii_string||5.011000|n -+is_cur_LC_category_utf8||| -+is_handle_constructor|||n -+is_list_assignment||| -+is_lvalue_sub||5.007001| -+is_uni_alnum_lc||5.006000| -+is_uni_alnumc_lc||5.017007| -+is_uni_alnumc||5.017007| -+is_uni_alnum||5.006000| -+is_uni_alpha_lc||5.006000| -+is_uni_alpha||5.006000| -+is_uni_ascii_lc||5.006000| -+is_uni_ascii||5.006000| -+is_uni_blank_lc||5.017002| -+is_uni_blank||5.017002| -+is_uni_cntrl_lc||5.006000| -+is_uni_cntrl||5.006000| -+is_uni_digit_lc||5.006000| -+is_uni_digit||5.006000| -+is_uni_graph_lc||5.006000| -+is_uni_graph||5.006000| -+is_uni_idfirst_lc||5.006000| -+is_uni_idfirst||5.006000| -+is_uni_lower_lc||5.006000| -+is_uni_lower||5.006000| -+is_uni_print_lc||5.006000| -+is_uni_print||5.006000| -+is_uni_punct_lc||5.006000| -+is_uni_punct||5.006000| -+is_uni_space_lc||5.006000| -+is_uni_space||5.006000| -+is_uni_upper_lc||5.006000| -+is_uni_upper||5.006000| -+is_uni_xdigit_lc||5.006000| -+is_uni_xdigit||5.006000| -+is_utf8_alnumc||5.017007| -+is_utf8_alnum||5.006000| -+is_utf8_alpha||5.006000| -+is_utf8_ascii||5.006000| -+is_utf8_blank||5.017002| -+is_utf8_char_buf||5.015008|n -+is_utf8_char_slow|||n -+is_utf8_char||5.006000|n -+is_utf8_cntrl||5.006000| -+is_utf8_common||| -+is_utf8_digit||5.006000| -+is_utf8_graph||5.006000| -+is_utf8_idcont||5.008000| -+is_utf8_idfirst||5.006000| -+is_utf8_lower||5.006000| -+is_utf8_mark||5.006000| -+is_utf8_perl_space||5.011001| -+is_utf8_perl_word||5.011001| -+is_utf8_posix_digit||5.011001| -+is_utf8_print||5.006000| -+is_utf8_punct||5.006000| -+is_utf8_space||5.006000| -+is_utf8_string_loclen||5.009003|n -+is_utf8_string_loc||5.008001|n -+is_utf8_string||5.006001|n -+is_utf8_upper||5.006000| -+is_utf8_xdigit||5.006000| -+is_utf8_xidcont||5.013010| -+is_utf8_xidfirst||5.013010| -+isa_lookup||| -+items|||n -+ix|||n -+jmaybe||| -+join_exact||| -+keyword_plugin_standard||| -+keyword||| -+leave_scope||| -+lex_bufutf8||5.011002| -+lex_discard_to||5.011002| -+lex_grow_linestr||5.011002| -+lex_next_chunk||5.011002| -+lex_peek_unichar||5.011002| -+lex_read_space||5.011002| -+lex_read_to||5.011002| -+lex_read_unichar||5.011002| -+lex_start||5.009005| -+lex_stuff_pvn||5.011002| -+lex_stuff_pvs||5.013005| -+lex_stuff_pv||5.013006| -+lex_stuff_sv||5.011002| -+lex_unstuff||5.011002| -+listkids||| -+list||| -+load_module_nocontext|||vn -+load_module|5.006000||pv -+localize||| -+looks_like_bool||| -+looks_like_number||| -+lop||| -+mPUSHi|5.009002||p -+mPUSHn|5.009002||p -+mPUSHp|5.009002||p -+mPUSHs|5.010001||p -+mPUSHu|5.009002||p -+mXPUSHi|5.009002||p -+mXPUSHn|5.009002||p -+mXPUSHp|5.009002||p -+mXPUSHs|5.010001||p -+mXPUSHu|5.009002||p -+mad_free||| -+madlex||| -+madparse||| -+magic_clear_all_env||| -+magic_cleararylen_p||| -+magic_clearenv||| -+magic_clearhints||| -+magic_clearhint||| -+magic_clearisa||| -+magic_clearpack||| -+magic_clearsig||| -+magic_copycallchecker||| -+magic_dump||5.006000| -+magic_existspack||| -+magic_freearylen_p||| -+magic_freeovrld||| -+magic_getarylen||| -+magic_getdefelem||| -+magic_getnkeys||| -+magic_getpack||| -+magic_getpos||| -+magic_getsig||| -+magic_getsubstr||| -+magic_gettaint||| -+magic_getuvar||| -+magic_getvec||| -+magic_get||| -+magic_killbackrefs||| -+magic_methcall1||| -+magic_methcall|||v -+magic_methpack||| -+magic_nextpack||| -+magic_regdata_cnt||| -+magic_regdatum_get||| -+magic_regdatum_set||| -+magic_scalarpack||| -+magic_set_all_env||| -+magic_setarylen||| -+magic_setcollxfrm||| -+magic_setdbline||| -+magic_setdefelem||| -+magic_setenv||| -+magic_sethint||| -+magic_setisa||| -+magic_setmglob||| -+magic_setnkeys||| -+magic_setpack||| -+magic_setpos||| -+magic_setregexp||| -+magic_setsig||| -+magic_setsubstr||| -+magic_settaint||| -+magic_setutf8||| -+magic_setuvar||| -+magic_setvec||| -+magic_set||| -+magic_sizepack||| -+magic_wipepack||| -+make_matcher||| -+make_trie_failtable||| -+make_trie||| -+malloc_good_size|||n -+malloced_size|||n -+malloc||5.007002|n -+markstack_grow||| -+matcher_matches_sv||| -+mayberelocate||| -+measure_struct||| -+memEQs|5.009005||p -+memEQ|5.004000||p -+memNEs|5.009005||p -+memNE|5.004000||p -+mem_collxfrm||| -+mem_log_common|||n -+mess_alloc||| -+mess_nocontext|||vn -+mess_sv||5.013001| -+mess||5.006000|v -+method_common||| -+mfree||5.007002|n -+mg_clear||| -+mg_copy||| -+mg_dup||| -+mg_find_mglob||| -+mg_findext||5.013008| -+mg_find||| -+mg_free_type||5.013006| -+mg_free||| -+mg_get||| -+mg_length||5.005000| -+mg_localize||| -+mg_magical||| -+mg_set||| -+mg_size||5.005000| -+mini_mktime||5.007002| -+minus_v||| -+missingterm||| -+mode_from_discipline||| -+modkids||| -+more_bodies||| -+more_sv||| -+moreswitches||| -+mro_clean_isarev||| -+mro_gather_and_rename||| -+mro_get_from_name||5.010001| -+mro_get_linear_isa_dfs||| -+mro_get_linear_isa||5.009005| -+mro_get_private_data||5.010001| -+mro_isa_changed_in||| -+mro_meta_dup||| -+mro_meta_init||| -+mro_method_changed_in||5.009005| -+mro_package_moved||| -+mro_register||5.010001| -+mro_set_mro||5.010001| -+mro_set_private_data||5.010001| -+mul128||| -+mulexp10|||n -+my_atof2||5.007002| -+my_atof||5.006000| -+my_attrs||| -+my_bcopy|||n -+my_bzero|||n -+my_chsize||| -+my_clearenv||| -+my_cxt_index||| -+my_cxt_init||| -+my_dirfd||5.009005| -+my_exit_jump||| -+my_exit||| -+my_failure_exit||5.004000| -+my_fflush_all||5.006000| -+my_fork||5.007003|n -+my_kid||| -+my_lstat_flags||| -+my_lstat||5.019003| -+my_memcmp|||n -+my_memset||5.004000|n -+my_pclose||5.004000| -+my_popen_list||5.007001| -+my_popen||5.004000| -+my_setenv||| -+my_snprintf|5.009004||pvn -+my_socketpair||5.007003|n -+my_sprintf|5.009003||pvn -+my_stat_flags||| -+my_stat||5.019003| -+my_strftime||5.007002| -+my_strlcat|5.009004||pn -+my_strlcpy|5.009004||pn -+my_unexec||| -+my_vsnprintf||5.009004|n -+need_utf8|||n -+newANONATTRSUB||5.006000| -+newANONHASH||| -+newANONLIST||| -+newANONSUB||| -+newASSIGNOP||| -+newATTRSUB_flags||| -+newATTRSUB||5.006000| -+newAVREF||| -+newAV||| -+newBINOP||| -+newCONDOP||| -+newCONSTSUB_flags||5.015006| -+newCONSTSUB|5.004050||p -+newCVREF||| -+newDEFSVOP||| -+newFORM||| -+newFOROP||5.013007| -+newGIVENOP||5.009003| -+newGIVWHENOP||| -+newGP||| -+newGVOP||| -+newGVREF||| -+newGVgen_flags||5.015004| -+newGVgen||| -+newHVREF||| -+newHVhv||5.005000| -+newHV||| -+newIO||| -+newLISTOP||| -+newLOGOP||| -+newLOOPEX||| -+newLOOPOP||| -+newMADPROP||| -+newMADsv||| -+newMYSUB||5.017004| -+newNULLLIST||| -+newOP||| -+newPADOP||| -+newPMOP||| -+newPROG||| -+newPVOP||| -+newRANGE||| -+newRV_inc|5.004000||p -+newRV_noinc|5.004000||p -+newRV||| -+newSLICEOP||| -+newSTATEOP||| -+newSTUB||| -+newSUB||| -+newSVOP||| -+newSVREF||| -+newSV_type|5.009005||p -+newSVhek||5.009003| -+newSViv||| -+newSVnv||| -+newSVpadname||5.017004| -+newSVpv_share||5.013006| -+newSVpvf_nocontext|||vn -+newSVpvf||5.004000|v -+newSVpvn_flags|5.010001||p -+newSVpvn_share|5.007001||p -+newSVpvn_utf8|5.010001||p -+newSVpvn|5.004050||p -+newSVpvs_flags|5.010001||p -+newSVpvs_share|5.009003||p -+newSVpvs|5.009003||p -+newSVpv||| -+newSVrv||| -+newSVsv||| -+newSVuv|5.006000||p -+newSV||| -+newTOKEN||| -+newUNOP||| -+newWHENOP||5.009003| -+newWHILEOP||5.013007| -+newXS_flags||5.009004| -+newXS_len_flags||| -+newXSproto||5.006000| -+newXS||5.006000| -+new_collate||5.006000| -+new_constant||| -+new_ctype||5.006000| -+new_he||| -+new_logop||| -+new_numeric||5.006000| -+new_stackinfo||5.005000| -+new_version||5.009000| -+new_warnings_bitfield||| -+next_symbol||| -+nextargv||| -+nextchar||| -+ninstr|||n -+no_bareword_allowed||| -+no_fh_allowed||| -+no_op||| -+not_a_number||| -+not_incrementable||| -+nothreadhook||5.008000| -+nuke_stacks||| -+num_overflow|||n -+oopsAV||| -+oopsHV||| -+op_append_elem||5.013006| -+op_append_list||5.013006| -+op_clear||| -+op_const_sv||| -+op_contextualize||5.013006| -+op_dump||5.006000| -+op_free||| -+op_getmad_weak||| -+op_getmad||| -+op_integerize||| -+op_linklist||5.013006| -+op_lvalue_flags||| -+op_lvalue||5.013007| -+op_null||5.007002| -+op_prepend_elem||5.013006| -+op_refcnt_dec||| -+op_refcnt_inc||| -+op_refcnt_lock||5.009002| -+op_refcnt_unlock||5.009002| -+op_scope||5.013007| -+op_std_init||| -+op_unscope||| -+op_xmldump||| -+open_script||| -+opslab_force_free||| -+opslab_free_nopad||| -+opslab_free||| -+pMY_CXT_|5.007003||p -+pMY_CXT|5.007003||p -+pTHX_|5.006000||p -+pTHX|5.006000||p -+packWARN|5.007003||p -+pack_cat||5.007003| -+pack_rec||| -+package_version||| -+package||| -+packlist||5.008001| -+pad_add_anon||5.008001| -+pad_add_name_pvn||5.015001| -+pad_add_name_pvs||5.015001| -+pad_add_name_pv||5.015001| -+pad_add_name_sv||5.015001| -+pad_alloc_name||| -+pad_alloc||| -+pad_block_start||| -+pad_check_dup||| -+pad_compname_type||5.009003| -+pad_findlex||| -+pad_findmy_pvn||5.015001| -+pad_findmy_pvs||5.015001| -+pad_findmy_pv||5.015001| -+pad_findmy_sv||5.015001| -+pad_fixup_inner_anons||| -+pad_free||| -+pad_leavemy||| -+pad_new||5.008001| -+pad_peg|||n -+pad_push||| -+pad_reset||| -+pad_setsv||| -+pad_sv||| -+pad_swipe||| -+pad_tidy||5.008001| -+padlist_dup||| -+padlist_store||| -+parse_arithexpr||5.013008| -+parse_barestmt||5.013007| -+parse_block||5.013007| -+parse_body||| -+parse_fullexpr||5.013008| -+parse_fullstmt||5.013005| -+parse_ident||| -+parse_label||5.013007| -+parse_listexpr||5.013008| -+parse_lparen_question_flags||| -+parse_stmtseq||5.013006| -+parse_termexpr||5.013008| -+parse_unicode_opts||| -+parser_dup||| -+parser_free_nexttoke_ops||| -+parser_free||| -+path_is_searchable|||n -+peep||| -+pending_ident||| -+perl_alloc_using|||n -+perl_alloc|||n -+perl_clone_using|||n -+perl_clone|||n -+perl_construct|||n -+perl_destruct||5.007003|n -+perl_free|||n -+perl_parse||5.006000|n -+perl_run|||n -+pidgone||| -+pm_description||| -+pmop_dump||5.006000| -+pmop_xmldump||| -+pmruntime||| -+pmtrans||| -+pop_scope||| -+populate_isa|||v -+pregcomp||5.009005| -+pregexec||| -+pregfree2||5.011000| -+pregfree||| -+prepend_madprops||| -+prescan_version||5.011004| -+printbuf||| -+printf_nocontext|||vn -+process_special_blocks||| -+ptr_hash|||n -+ptr_table_clear||5.009005| -+ptr_table_fetch||5.009005| -+ptr_table_find|||n -+ptr_table_free||5.009005| -+ptr_table_new||5.009005| -+ptr_table_split||5.009005| -+ptr_table_store||5.009005| -+push_scope||| -+put_byte||| -+put_latin1_charclass_innards||| -+pv_display|5.006000||p -+pv_escape|5.009004||p -+pv_pretty|5.009004||p -+pv_uni_display||5.007003| -+qerror||| -+qsortsvu||| -+re_compile||5.009005| -+re_croak2||| -+re_dup_guts||| -+re_intuit_start||5.019001| -+re_intuit_string||5.006000| -+re_op_compile||| -+readpipe_override||| -+realloc||5.007002|n -+reentrant_free||5.019003| -+reentrant_init||5.019003| -+reentrant_retry||5.019003|vn -+reentrant_size||5.019003| -+ref_array_or_hash||| -+refcounted_he_chain_2hv||| -+refcounted_he_fetch_pvn||| -+refcounted_he_fetch_pvs||| -+refcounted_he_fetch_pv||| -+refcounted_he_fetch_sv||| -+refcounted_he_free||| -+refcounted_he_inc||| -+refcounted_he_new_pvn||| -+refcounted_he_new_pvs||| -+refcounted_he_new_pv||| -+refcounted_he_new_sv||| -+refcounted_he_value||| -+refkids||| -+refto||| -+ref||5.019003| -+reg_check_named_buff_matched||| -+reg_named_buff_all||5.009005| -+reg_named_buff_exists||5.009005| -+reg_named_buff_fetch||5.009005| -+reg_named_buff_firstkey||5.009005| -+reg_named_buff_iter||| -+reg_named_buff_nextkey||5.009005| -+reg_named_buff_scalar||5.009005| -+reg_named_buff||| -+reg_node||| -+reg_numbered_buff_fetch||| -+reg_numbered_buff_length||| -+reg_numbered_buff_store||| -+reg_qr_package||| -+reg_recode||| -+reg_scan_name||| -+reg_skipcomment||| -+reg_temp_copy||| -+reganode||| -+regatom||| -+regbranch||| -+regclass_swash||5.009004| -+regclass||| -+regcppop||| -+regcppush||| -+regcurly||| -+regdump_extflags||| -+regdump_intflags||| -+regdump||5.005000| -+regdupe_internal||| -+regexec_flags||5.005000| -+regfree_internal||5.009005| -+reghop3|||n -+reghop4|||n -+reghopmaybe3|||n -+reginclass||| -+reginitcolors||5.006000| -+reginsert||| -+regmatch||| -+regnext||5.005000| -+regpatws|||n -+regpiece||| -+regpposixcc||| -+regprop||| -+regrepeat||| -+regtail_study||| -+regtail||| -+regtry||| -+reguni||| -+regwhite|||n -+reg||| -+repeatcpy|||n -+report_evil_fh||| -+report_redefined_cv||| -+report_uninit||| -+report_wrongway_fh||| -+require_pv||5.006000| -+require_tie_mod||| -+restore_magic||| -+rninstr|||n -+rpeep||| -+rsignal_restore||| -+rsignal_save||| -+rsignal_state||5.004000| -+rsignal||5.004000| -+run_body||| -+run_user_filter||| -+runops_debug||5.005000| -+runops_standard||5.005000| -+rv2cv_op_cv||5.013006| -+rvpv_dup||| -+rxres_free||| -+rxres_restore||| -+rxres_save||| -+safesyscalloc||5.006000|n -+safesysfree||5.006000|n -+safesysmalloc||5.006000|n -+safesysrealloc||5.006000|n -+same_dirent||| -+save_I16||5.004000| -+save_I32||| -+save_I8||5.006000| -+save_adelete||5.011000| -+save_aelem_flags||5.011000| -+save_aelem||5.004050| -+save_alloc||5.006000| -+save_aptr||| -+save_ary||| -+save_bool||5.008001| -+save_clearsv||| -+save_delete||| -+save_destructor_x||5.006000| -+save_destructor||5.006000| -+save_freeop||| -+save_freepv||| -+save_freesv||| -+save_generic_pvref||5.006001| -+save_generic_svref||5.005030| -+save_gp||5.004000| -+save_hash||| -+save_hdelete||5.011000| -+save_hek_flags|||n -+save_helem_flags||5.011000| -+save_helem||5.004050| -+save_hints||5.010001| -+save_hptr||| -+save_int||| -+save_item||| -+save_iv||5.005000| -+save_lines||| -+save_list||| -+save_long||| -+save_magic_flags||| -+save_mortalizesv||5.007001| -+save_nogv||| -+save_op||5.005000| -+save_padsv_and_mortalize||5.010001| -+save_pptr||| -+save_pushi32ptr||5.010001| -+save_pushptri32ptr||| -+save_pushptrptr||5.010001| -+save_pushptr||5.010001| -+save_re_context||5.006000| -+save_scalar_at||| -+save_scalar||| -+save_set_svflags||5.009000| -+save_shared_pvref||5.007003| -+save_sptr||| -+save_svref||| -+save_vptr||5.006000| -+savepvn||| -+savepvs||5.009003| -+savepv||| -+savesharedpvn||5.009005| -+savesharedpvs||5.013006| -+savesharedpv||5.007003| -+savesharedsvpv||5.013006| -+savestack_grow_cnt||5.008001| -+savestack_grow||| -+savesvpv||5.009002| -+sawparens||| -+scalar_mod_type|||n -+scalarboolean||| -+scalarkids||| -+scalarseq||| -+scalarvoid||| -+scalar||| -+scan_bin||5.006000| -+scan_commit||| -+scan_const||| -+scan_formline||| -+scan_heredoc||| -+scan_hex||| -+scan_ident||| -+scan_inputsymbol||| -+scan_num||5.007001| -+scan_oct||| -+scan_pat||| -+scan_str||| -+scan_subst||| -+scan_trans||| -+scan_version||5.009001| -+scan_vstring||5.009005| -+scan_word||| -+screaminstr||5.005000| -+search_const||| -+seed||5.008001| -+sequence_num||| -+set_context||5.006000|n -+set_numeric_local||5.006000| -+set_numeric_radix||5.006000| -+set_numeric_standard||5.006000| -+setdefout||| -+share_hek_flags||| -+share_hek||5.004000| -+si_dup||| -+sighandler|||n -+simplify_sort||| -+skipspace0||| -+skipspace1||| -+skipspace2||| -+skipspace_flags||| -+softref2xv||| -+sortcv_stacked||| -+sortcv_xsub||| -+sortcv||| -+sortsv_flags||5.009003| -+sortsv||5.007003| -+space_join_names_mortal||| -+ss_dup||| -+stack_grow||| -+start_force||| -+start_glob||| -+start_subparse||5.004000| -+stdize_locale||| -+strEQ||| -+strGE||| -+strGT||| -+strLE||| -+strLT||| -+strNE||| -+str_to_version||5.006000| -+strip_return||| -+strnEQ||| -+strnNE||| -+study_chunk||| -+sub_crush_depth||| -+sublex_done||| -+sublex_push||| -+sublex_start||| -+sv_2bool_flags||5.013006| -+sv_2bool||| -+sv_2cv||| -+sv_2io||| -+sv_2iuv_common||| -+sv_2iuv_non_preserve||| -+sv_2iv_flags||5.009001| -+sv_2iv||| -+sv_2mortal||| -+sv_2num||| -+sv_2nv_flags||5.013001| -+sv_2pv_flags|5.007002||p -+sv_2pv_nolen|5.006000||p -+sv_2pvbyte_nolen|5.006000||p -+sv_2pvbyte|5.006000||p -+sv_2pvutf8_nolen||5.006000| -+sv_2pvutf8||5.006000| -+sv_2pv||| -+sv_2uv_flags||5.009001| -+sv_2uv|5.004000||p -+sv_add_arena||| -+sv_add_backref||| -+sv_backoff||| -+sv_bless||| -+sv_cat_decode||5.008001| -+sv_catpv_flags||5.013006| -+sv_catpv_mg|5.004050||p -+sv_catpv_nomg||5.013006| -+sv_catpvf_mg_nocontext|||pvn -+sv_catpvf_mg|5.006000|5.004000|pv -+sv_catpvf_nocontext|||vn -+sv_catpvf||5.004000|v -+sv_catpvn_flags||5.007002| -+sv_catpvn_mg|5.004050||p -+sv_catpvn_nomg|5.007002||p -+sv_catpvn||| -+sv_catpvs_flags||5.013006| -+sv_catpvs_mg||5.013006| -+sv_catpvs_nomg||5.013006| -+sv_catpvs|5.009003||p -+sv_catpv||| -+sv_catsv_flags||5.007002| -+sv_catsv_mg|5.004050||p -+sv_catsv_nomg|5.007002||p -+sv_catsv||| -+sv_catxmlpvn||| -+sv_catxmlpv||| -+sv_catxmlsv||| -+sv_chop||| -+sv_clean_all||| -+sv_clean_objs||| -+sv_clear||| -+sv_cmp_flags||5.013006| -+sv_cmp_locale_flags||5.013006| -+sv_cmp_locale||5.004000| -+sv_cmp||| -+sv_collxfrm_flags||5.013006| -+sv_collxfrm||| -+sv_copypv_flags||5.017002| -+sv_copypv_nomg||5.017002| -+sv_copypv||| -+sv_dec_nomg||5.013002| -+sv_dec||| -+sv_del_backref||| -+sv_derived_from_pvn||5.015004| -+sv_derived_from_pv||5.015004| -+sv_derived_from_sv||5.015004| -+sv_derived_from||5.004000| -+sv_destroyable||5.010000| -+sv_display||| -+sv_does_pvn||5.015004| -+sv_does_pv||5.015004| -+sv_does_sv||5.015004| -+sv_does||5.009004| -+sv_dump||| -+sv_dup_common||| -+sv_dup_inc_multiple||| -+sv_dup_inc||| -+sv_dup||| -+sv_eq_flags||5.013006| -+sv_eq||| -+sv_exp_grow||| -+sv_force_normal_flags||5.007001| -+sv_force_normal||5.006000| -+sv_free2||| -+sv_free_arenas||| -+sv_free||| -+sv_gets||5.004000| -+sv_grow||| -+sv_i_ncmp||| -+sv_inc_nomg||5.013002| -+sv_inc||| -+sv_insert_flags||5.010001| -+sv_insert||| -+sv_isa||| -+sv_isobject||| -+sv_iv||5.005000| -+sv_kill_backrefs||| -+sv_len_utf8_nomg||| -+sv_len_utf8||5.006000| -+sv_len||| -+sv_magic_portable|5.019003|5.004000|p -+sv_magicext_mglob||| -+sv_magicext||5.007003| -+sv_magic||| -+sv_mortalcopy_flags||| -+sv_mortalcopy||| -+sv_ncmp||| -+sv_newmortal||| -+sv_newref||| -+sv_nolocking||5.007003| -+sv_nosharing||5.007003| -+sv_nounlocking||| -+sv_nv||5.005000| -+sv_peek||5.005000| -+sv_pos_b2u_flags||5.019003| -+sv_pos_b2u_midway||| -+sv_pos_b2u||5.006000| -+sv_pos_u2b_cached||| -+sv_pos_u2b_flags||5.011005| -+sv_pos_u2b_forwards|||n -+sv_pos_u2b_midway|||n -+sv_pos_u2b||5.006000| -+sv_pvbyten_force||5.006000| -+sv_pvbyten||5.006000| -+sv_pvbyte||5.006000| -+sv_pvn_force_flags|5.007002||p -+sv_pvn_force||| -+sv_pvn_nomg|5.007003|5.005000|p -+sv_pvn||5.005000| -+sv_pvutf8n_force||5.006000| -+sv_pvutf8n||5.006000| -+sv_pvutf8||5.006000| -+sv_pv||5.006000| -+sv_recode_to_utf8||5.007003| -+sv_reftype||| -+sv_ref||| -+sv_release_COW||| -+sv_replace||| -+sv_report_used||| -+sv_resetpvn||| -+sv_reset||| -+sv_rvweaken||5.006000| -+sv_sethek||| -+sv_setiv_mg|5.004050||p -+sv_setiv||| -+sv_setnv_mg|5.006000||p -+sv_setnv||| -+sv_setpv_mg|5.004050||p -+sv_setpvf_mg_nocontext|||pvn -+sv_setpvf_mg|5.006000|5.004000|pv -+sv_setpvf_nocontext|||vn -+sv_setpvf||5.004000|v -+sv_setpviv_mg||5.008001| -+sv_setpviv||5.008001| -+sv_setpvn_mg|5.004050||p -+sv_setpvn||| -+sv_setpvs_mg||5.013006| -+sv_setpvs|5.009004||p -+sv_setpv||| -+sv_setref_iv||| -+sv_setref_nv||| -+sv_setref_pvn||| -+sv_setref_pvs||5.019003| -+sv_setref_pv||| -+sv_setref_uv||5.007001| -+sv_setsv_cow||| -+sv_setsv_flags||5.007002| -+sv_setsv_mg|5.004050||p -+sv_setsv_nomg|5.007002||p -+sv_setsv||| -+sv_setuv_mg|5.004050||p -+sv_setuv|5.004000||p -+sv_tainted||5.004000| -+sv_taint||5.004000| -+sv_true||5.005000| -+sv_unglob||| -+sv_uni_display||5.007003| -+sv_unmagicext||5.013008| -+sv_unmagic||| -+sv_unref_flags||5.007001| -+sv_unref||| -+sv_untaint||5.004000| -+sv_upgrade||| -+sv_usepvn_flags||5.009004| -+sv_usepvn_mg|5.004050||p -+sv_usepvn||| -+sv_utf8_decode||5.006000| -+sv_utf8_downgrade||5.006000| -+sv_utf8_encode||5.006000| -+sv_utf8_upgrade_flags_grow||5.011000| -+sv_utf8_upgrade_flags||5.007002| -+sv_utf8_upgrade_nomg||5.007002| -+sv_utf8_upgrade||5.007001| -+sv_uv|5.005000||p -+sv_vcatpvf_mg|5.006000|5.004000|p -+sv_vcatpvfn_flags||5.017002| -+sv_vcatpvfn||5.004000| -+sv_vcatpvf|5.006000|5.004000|p -+sv_vsetpvf_mg|5.006000|5.004000|p -+sv_vsetpvfn||5.004000| -+sv_vsetpvf|5.006000|5.004000|p -+sv_xmlpeek||| -+svtype||| -+swallow_bom||| -+swash_fetch||5.007002| -+swash_init||5.006000| -+swatch_get||| -+sys_init3||5.010000|n -+sys_init||5.010000|n -+sys_intern_clear||| -+sys_intern_dup||| -+sys_intern_init||| -+sys_term||5.010000|n -+taint_env||| -+taint_proper||| -+tied_method|||v -+tmps_grow||5.006000| -+toFOLD_uni||5.007003| -+toFOLD_utf8||5.019001| -+toFOLD||5.019001| -+toLOWER_L1||5.019001| -+toLOWER_LC||5.004000| -+toLOWER_uni||5.007003| -+toLOWER_utf8||5.015007| -+toLOWER||| -+toTITLE_uni||5.007003| -+toTITLE_utf8||5.015007| -+toTITLE||5.019001| -+toUPPER_uni||5.007003| -+toUPPER_utf8||5.015007| -+toUPPER||5.004000| -+to_byte_substr||| -+to_lower_latin1||| -+to_uni_fold||5.007003| -+to_uni_lower_lc||5.006000| -+to_uni_lower||5.007003| -+to_uni_title_lc||5.006000| -+to_uni_title||5.007003| -+to_uni_upper_lc||5.006000| -+to_uni_upper||5.007003| -+to_utf8_case||5.007003| -+to_utf8_fold||5.015007| -+to_utf8_lower||5.015007| -+to_utf8_substr||| -+to_utf8_title||5.015007| -+to_utf8_upper||5.015007| -+token_free||| -+token_getmad||| -+tokenize_use||| -+tokeq||| -+tokereport||| -+too_few_arguments_pv||| -+too_few_arguments_sv||| -+too_many_arguments_pv||| -+too_many_arguments_sv||| -+translate_substr_offsets||| -+try_amagic_bin||| -+try_amagic_un||| -+uiv_2buf|||n -+unlnk||| -+unpack_rec||| -+unpack_str||5.007003| -+unpackstring||5.008001| -+unreferenced_to_tmp_stack||| -+unshare_hek_or_pvn||| -+unshare_hek||| -+unsharepvn||5.004000| -+unwind_handler_stack||| -+update_debugger_info||| -+upg_version||5.009005| -+usage||| -+utf16_textfilter||| -+utf16_to_utf8_reversed||5.006001| -+utf16_to_utf8||5.006001| -+utf8_distance||5.006000| -+utf8_hop||5.006000| -+utf8_length||5.007001| -+utf8_mg_len_cache_update||| -+utf8_mg_pos_cache_update||| -+utf8_to_bytes||5.006001| -+utf8_to_uvchr_buf||5.015009| -+utf8_to_uvchr||5.007001| -+utf8_to_uvuni_buf||5.015009| -+utf8_to_uvuni||5.007001| -+utf8n_to_uvchr||| -+utf8n_to_uvuni||5.007001| -+utilize||| -+uvchr_to_utf8_flags||5.007003| -+uvchr_to_utf8||| -+uvuni_to_utf8_flags||5.007003| -+uvuni_to_utf8||5.007001| -+valid_utf8_to_uvchr||| -+valid_utf8_to_uvuni||5.015009| -+validate_proto||| -+validate_suid||| -+varname||| -+vcmp||5.009000| -+vcroak||5.006000| -+vdeb||5.007003| -+vform||5.006000| -+visit||| -+vivify_defelem||| -+vivify_ref||| -+vload_module|5.006000||p -+vmess||5.006000| -+vnewSVpvf|5.006000|5.004000|p -+vnormal||5.009002| -+vnumify||5.009000| -+vstringify||5.009000| -+vverify||5.009003| -+vwarner||5.006000| -+vwarn||5.006000| -+wait4pid||| -+warn_nocontext|||vn -+warn_sv||5.013001| -+warner_nocontext|||vn -+warner|5.006000|5.004000|pv -+warn|||v -+was_lvalue_sub||| -+watch||| -+whichsig_pvn||5.015004| -+whichsig_pv||5.015004| -+whichsig_sv||5.015004| -+whichsig||| -+win32_croak_not_implemented|||n -+with_queued_errors||| -+wrap_op_checker||5.015008| -+write_to_stderr||| -+xmldump_all_perl||| -+xmldump_all||| -+xmldump_attr||| -+xmldump_eval||| -+xmldump_form||| -+xmldump_indent|||v -+xmldump_packsubs_perl||| -+xmldump_packsubs||| -+xmldump_sub_perl||| -+xmldump_sub||| -+xmldump_vindent||| -+xs_apiversion_bootcheck||| -+xs_version_bootcheck||| -+yyerror_pvn||| -+yyerror_pv||| -+yyerror||| -+yylex||| -+yyparse||| -+yyunlex||| -+yywarn||| -+); -+ -+if (exists $opt{'list-unsupported'}) { -+ my $f; -+ for $f (sort { lc $a cmp lc $b } keys %API) { -+ next unless $API{$f}{todo}; -+ print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n"; -+ } -+ exit 0; -+} -+ -+# Scan for possible replacement candidates -+ -+my(%replace, %need, %hints, %warnings, %depends); -+my $replace = 0; -+my($hint, $define, $function); -+ -+sub find_api -+{ -+ my $code = shift; -+ $code =~ s{ -+ / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*) -+ | "[^"\\]*(?:\\.[^"\\]*)*" -+ | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx; -+ grep { exists $API{$_} } $code =~ /(\w+)/mg; -+} -+ -+while () { -+ if ($hint) { -+ my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings; -+ if (m{^\s*\*\s(.*?)\s*$}) { -+ for (@{$hint->[1]}) { -+ $h->{$_} ||= ''; # suppress warning with older perls -+ $h->{$_} .= "$1\n"; -+ } -+ } -+ else { undef $hint } -+ } -+ -+ $hint = [$1, [split /,?\s+/, $2]] -+ if m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$}; -+ -+ if ($define) { -+ if ($define->[1] =~ /\\$/) { -+ $define->[1] .= $_; -+ } -+ else { -+ if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) { -+ my @n = find_api($define->[1]); -+ push @{$depends{$define->[0]}}, @n if @n -+ } -+ undef $define; -+ } -+ } -+ -+ $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)}; -+ -+ if ($function) { -+ if (/^}/) { -+ if (exists $API{$function->[0]}) { -+ my @n = find_api($function->[1]); -+ push @{$depends{$function->[0]}}, @n if @n -+ } -+ undef $function; -+ } -+ else { -+ $function->[1] .= $_; -+ } -+ } -+ -+ $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)}; -+ -+ $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$}; -+ $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)}; -+ $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce}; -+ $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$}; -+ -+ if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) { -+ my @deps = map { s/\s+//g; $_ } split /,/, $3; -+ my $d; -+ for $d (map { s/\s+//g; $_ } split /,/, $1) { -+ push @{$depends{$d}}, @deps; -+ } -+ } -+ -+ $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)}; -+} -+ -+for (values %depends) { -+ my %s; -+ $_ = [sort grep !$s{$_}++, @$_]; -+} -+ -+if (exists $opt{'api-info'}) { -+ my $f; -+ my $count = 0; -+ my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$"; -+ for $f (sort { lc $a cmp lc $b } keys %API) { -+ next unless $f =~ /$match/; -+ print "\n=== $f ===\n\n"; -+ my $info = 0; -+ if ($API{$f}{base} || $API{$f}{todo}) { -+ my $base = format_version($API{$f}{base} || $API{$f}{todo}); -+ print "Supported at least starting from perl-$base.\n"; -+ $info++; -+ } -+ if ($API{$f}{provided}) { -+ my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003"; -+ print "Support by $ppport provided back to perl-$todo.\n"; -+ print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f}; -+ print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f}; -+ print "\n$hints{$f}" if exists $hints{$f}; -+ print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f}; -+ $info++; -+ } -+ print "No portability information available.\n" unless $info; -+ $count++; -+ } -+ $count or print "Found no API matching '$opt{'api-info'}'."; -+ print "\n"; -+ exit 0; -+} -+ -+if (exists $opt{'list-provided'}) { -+ my $f; -+ for $f (sort { lc $a cmp lc $b } keys %API) { -+ next unless $API{$f}{provided}; -+ my @flags; -+ push @flags, 'explicit' if exists $need{$f}; -+ push @flags, 'depend' if exists $depends{$f}; -+ push @flags, 'hint' if exists $hints{$f}; -+ push @flags, 'warning' if exists $warnings{$f}; -+ my $flags = @flags ? ' ['.join(', ', @flags).']' : ''; -+ print "$f$flags\n"; -+ } -+ exit 0; -+} -+ -+my @files; -+my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc ); -+my $srcext = join '|', map { quotemeta $_ } @srcext; -+ -+if (@ARGV) { -+ my %seen; -+ for (@ARGV) { -+ if (-e) { -+ if (-f) { -+ push @files, $_ unless $seen{$_}++; -+ } -+ else { warn "'$_' is not a file.\n" } -+ } -+ else { -+ my @new = grep { -f } glob $_ -+ or warn "'$_' does not exist.\n"; -+ push @files, grep { !$seen{$_}++ } @new; -+ } -+ } -+} -+else { -+ eval { -+ require File::Find; -+ File::Find::find(sub { -+ $File::Find::name =~ /($srcext)$/i -+ and push @files, $File::Find::name; -+ }, '.'); -+ }; -+ if ($@) { -+ @files = map { glob "*$_" } @srcext; -+ } -+} -+ -+if (!@ARGV || $opt{filter}) { -+ my(@in, @out); -+ my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files; -+ for (@files) { -+ my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i; -+ push @{ $out ? \@out : \@in }, $_; -+ } -+ if (@ARGV && @out) { -+ warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out); -+ } -+ @files = @in; -+} -+ -+die "No input files given!\n" unless @files; -+ -+my(%files, %global, %revreplace); -+%revreplace = reverse %replace; -+my $filename; -+my $patch_opened = 0; -+ -+for $filename (@files) { -+ unless (open IN, "<$filename") { -+ warn "Unable to read from $filename: $!\n"; -+ next; -+ } -+ -+ info("Scanning $filename ..."); -+ -+ my $c = do { local $/; }; -+ close IN; -+ -+ my %file = (orig => $c, changes => 0); -+ -+ # Temporarily remove C/XS comments and strings from the code -+ my @ccom; -+ -+ $c =~ s{ -+ ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]* -+ | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* ) -+ | ( ^$HS*\#[^\r\n]* -+ | "[^"\\]*(?:\\.[^"\\]*)*" -+ | '[^'\\]*(?:\\.[^'\\]*)*' -+ | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) ) -+ }{ defined $2 and push @ccom, $2; -+ defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex; -+ -+ $file{ccom} = \@ccom; -+ $file{code} = $c; -+ $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m; -+ -+ my $func; -+ -+ for $func (keys %API) { -+ my $match = $func; -+ $match .= "|$revreplace{$func}" if exists $revreplace{$func}; -+ if ($c =~ /\b(?:Perl_)?($match)\b/) { -+ $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func}; -+ $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/; -+ if (exists $API{$func}{provided}) { -+ $file{uses_provided}{$func}++; -+ if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) { -+ $file{uses}{$func}++; -+ my @deps = rec_depend($func); -+ if (@deps) { -+ $file{uses_deps}{$func} = \@deps; -+ for (@deps) { -+ $file{uses}{$_} = 0 unless exists $file{uses}{$_}; -+ } -+ } -+ for ($func, @deps) { -+ $file{needs}{$_} = 'static' if exists $need{$_}; -+ } -+ } -+ } -+ if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) { -+ if ($c =~ /\b$func\b/) { -+ $file{uses_todo}{$func}++; -+ } -+ } -+ } -+ } -+ -+ while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) { -+ if (exists $need{$2}) { -+ $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++; -+ } -+ else { warning("Possibly wrong #define $1 in $filename") } -+ } -+ -+ for (qw(uses needs uses_todo needed_global needed_static)) { -+ for $func (keys %{$file{$_}}) { -+ push @{$global{$_}{$func}}, $filename; -+ } -+ } -+ -+ $files{$filename} = \%file; -+} -+ -+# Globally resolve NEED_'s -+my $need; -+for $need (keys %{$global{needs}}) { -+ if (@{$global{needs}{$need}} > 1) { -+ my @targets = @{$global{needs}{$need}}; -+ my @t = grep $files{$_}{needed_global}{$need}, @targets; -+ @targets = @t if @t; -+ @t = grep /\.xs$/i, @targets; -+ @targets = @t if @t; -+ my $target = shift @targets; -+ $files{$target}{needs}{$need} = 'global'; -+ for (@{$global{needs}{$need}}) { -+ $files{$_}{needs}{$need} = 'extern' if $_ ne $target; -+ } -+ } -+} -+ -+for $filename (@files) { -+ exists $files{$filename} or next; -+ -+ info("=== Analyzing $filename ==="); -+ -+ my %file = %{$files{$filename}}; -+ my $func; -+ my $c = $file{code}; -+ my $warnings = 0; -+ -+ for $func (sort keys %{$file{uses_Perl}}) { -+ if ($API{$func}{varargs}) { -+ unless ($API{$func}{nothxarg}) { -+ my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))} -+ { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge); -+ if ($changes) { -+ warning("Doesn't pass interpreter argument aTHX to Perl_$func"); -+ $file{changes} += $changes; -+ } -+ } -+ } -+ else { -+ warning("Uses Perl_$func instead of $func"); -+ $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*} -+ {$func$1(}g); -+ } -+ } -+ -+ for $func (sort keys %{$file{uses_replace}}) { -+ warning("Uses $func instead of $replace{$func}"); -+ $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g); -+ } -+ -+ for $func (sort keys %{$file{uses_provided}}) { -+ if ($file{uses}{$func}) { -+ if (exists $file{uses_deps}{$func}) { -+ diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}})); -+ } -+ else { -+ diag("Uses $func"); -+ } -+ } -+ $warnings += hint($func); -+ } -+ -+ unless ($opt{quiet}) { -+ for $func (sort keys %{$file{uses_todo}}) { -+ print "*** WARNING: Uses $func, which may not be portable below perl ", -+ format_version($API{$func}{todo}), ", even with '$ppport'\n"; -+ $warnings++; -+ } -+ } -+ -+ for $func (sort keys %{$file{needed_static}}) { -+ my $message = ''; -+ if (not exists $file{uses}{$func}) { -+ $message = "No need to define NEED_$func if $func is never used"; -+ } -+ elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') { -+ $message = "No need to define NEED_$func when already needed globally"; -+ } -+ if ($message) { -+ diag($message); -+ $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg); -+ } -+ } -+ -+ for $func (sort keys %{$file{needed_global}}) { -+ my $message = ''; -+ if (not exists $global{uses}{$func}) { -+ $message = "No need to define NEED_${func}_GLOBAL if $func is never used"; -+ } -+ elsif (exists $file{needs}{$func}) { -+ if ($file{needs}{$func} eq 'extern') { -+ $message = "No need to define NEED_${func}_GLOBAL when already needed globally"; -+ } -+ elsif ($file{needs}{$func} eq 'static') { -+ $message = "No need to define NEED_${func}_GLOBAL when only used in this file"; -+ } -+ } -+ if ($message) { -+ diag($message); -+ $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg); -+ } -+ } -+ -+ $file{needs_inc_ppport} = keys %{$file{uses}}; -+ -+ if ($file{needs_inc_ppport}) { -+ my $pp = ''; -+ -+ for $func (sort keys %{$file{needs}}) { -+ my $type = $file{needs}{$func}; -+ next if $type eq 'extern'; -+ my $suffix = $type eq 'global' ? '_GLOBAL' : ''; -+ unless (exists $file{"needed_$type"}{$func}) { -+ if ($type eq 'global') { -+ diag("Files [@{$global{needs}{$func}}] need $func, adding global request"); -+ } -+ else { -+ diag("File needs $func, adding static request"); -+ } -+ $pp .= "#define NEED_$func$suffix\n"; -+ } -+ } -+ -+ if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) { -+ $pp = ''; -+ $file{changes}++; -+ } -+ -+ unless ($file{has_inc_ppport}) { -+ diag("Needs to include '$ppport'"); -+ $pp .= qq(#include "$ppport"\n) -+ } -+ -+ if ($pp) { -+ $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms) -+ || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m) -+ || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m) -+ || ($c =~ s/^/$pp/); -+ } -+ } -+ else { -+ if ($file{has_inc_ppport}) { -+ diag("No need to include '$ppport'"); -+ $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m); -+ } -+ } -+ -+ # put back in our C comments -+ my $ix; -+ my $cppc = 0; -+ my @ccom = @{$file{ccom}}; -+ for $ix (0 .. $#ccom) { -+ if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) { -+ $cppc++; -+ $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/; -+ } -+ else { -+ $c =~ s/$rccs$ix$rcce/$ccom[$ix]/; -+ } -+ } -+ -+ if ($cppc) { -+ my $s = $cppc != 1 ? 's' : ''; -+ warning("Uses $cppc C++ style comment$s, which is not portable"); -+ } -+ -+ my $s = $warnings != 1 ? 's' : ''; -+ my $warn = $warnings ? " ($warnings warning$s)" : ''; -+ info("Analysis completed$warn"); -+ -+ if ($file{changes}) { -+ if (exists $opt{copy}) { -+ my $newfile = "$filename$opt{copy}"; -+ if (-e $newfile) { -+ error("'$newfile' already exists, refusing to write copy of '$filename'"); -+ } -+ else { -+ local *F; -+ if (open F, ">$newfile") { -+ info("Writing copy of '$filename' with changes to '$newfile'"); -+ print F $c; -+ close F; -+ } -+ else { -+ error("Cannot open '$newfile' for writing: $!"); -+ } -+ } -+ } -+ elsif (exists $opt{patch} || $opt{changes}) { -+ if (exists $opt{patch}) { -+ unless ($patch_opened) { -+ if (open PATCH, ">$opt{patch}") { -+ $patch_opened = 1; -+ } -+ else { -+ error("Cannot open '$opt{patch}' for writing: $!"); -+ delete $opt{patch}; -+ $opt{changes} = 1; -+ goto fallback; -+ } -+ } -+ mydiff(\*PATCH, $filename, $c); -+ } -+ else { -+fallback: -+ info("Suggested changes:"); -+ mydiff(\*STDOUT, $filename, $c); -+ } -+ } -+ else { -+ my $s = $file{changes} == 1 ? '' : 's'; -+ info("$file{changes} potentially required change$s detected"); -+ } -+ } -+ else { -+ info("Looks good"); -+ } -+} -+ -+close PATCH if $patch_opened; -+ -+exit 0; -+ -+ -+sub try_use { eval "use @_;"; return $@ eq '' } -+ -+sub mydiff -+{ -+ local *F = shift; -+ my($file, $str) = @_; -+ my $diff; -+ -+ if (exists $opt{diff}) { -+ $diff = run_diff($opt{diff}, $file, $str); -+ } -+ -+ if (!defined $diff and try_use('Text::Diff')) { -+ $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' }); -+ $diff = <
$tmp") { -+ print F $str; -+ close F; -+ -+ if (open F, "$prog $file $tmp |") { -+ while () { -+ s/\Q$tmp\E/$file.patched/; -+ $diff .= $_; -+ } -+ close F; -+ unlink $tmp; -+ return $diff; -+ } -+ -+ unlink $tmp; -+ } -+ else { -+ error("Cannot open '$tmp' for writing: $!"); -+ } -+ -+ return undef; -+} -+ -+sub rec_depend -+{ -+ my($func, $seen) = @_; -+ return () unless exists $depends{$func}; -+ $seen = {%{$seen||{}}}; -+ return () if $seen->{$func}++; -+ my %s; -+ grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}}; -+} -+ -+sub parse_version -+{ -+ my $ver = shift; -+ -+ if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) { -+ return ($1, $2, $3); -+ } -+ elsif ($ver !~ /^\d+\.[\d_]+$/) { -+ die "cannot parse version '$ver'\n"; -+ } -+ -+ $ver =~ s/_//g; -+ $ver =~ s/$/000000/; -+ -+ my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/; -+ -+ $v = int $v; -+ $s = int $s; -+ -+ if ($r < 5 || ($r == 5 && $v < 6)) { -+ if ($s % 10) { -+ die "cannot parse version '$ver'\n"; -+ } -+ } -+ -+ return ($r, $v, $s); -+} -+ -+sub format_version -+{ -+ my $ver = shift; -+ -+ $ver =~ s/$/000000/; -+ my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/; -+ -+ $v = int $v; -+ $s = int $s; -+ -+ if ($r < 5 || ($r == 5 && $v < 6)) { -+ if ($s % 10) { -+ die "invalid version '$ver'\n"; -+ } -+ $s /= 10; -+ -+ $ver = sprintf "%d.%03d", $r, $v; -+ $s > 0 and $ver .= sprintf "_%02d", $s; -+ -+ return $ver; -+ } -+ -+ return sprintf "%d.%d.%d", $r, $v, $s; -+} -+ -+sub info -+{ -+ $opt{quiet} and return; -+ print @_, "\n"; -+} -+ -+sub diag -+{ -+ $opt{quiet} and return; -+ $opt{diag} and print @_, "\n"; -+} -+ -+sub warning -+{ -+ $opt{quiet} and return; -+ print "*** ", @_, "\n"; -+} -+ -+sub error -+{ -+ print "*** ERROR: ", @_, "\n"; -+} -+ -+my %given_hints; -+my %given_warnings; -+sub hint -+{ -+ $opt{quiet} and return; -+ my $func = shift; -+ my $rv = 0; -+ if (exists $warnings{$func} && !$given_warnings{$func}++) { -+ my $warn = $warnings{$func}; -+ $warn =~ s!^!*** !mg; -+ print "*** WARNING: $func\n", $warn; -+ $rv++; -+ } -+ if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) { -+ my $hint = $hints{$func}; -+ $hint =~ s/^/ /mg; -+ print " --- hint for $func ---\n", $hint; -+ } -+ $rv; -+} -+ -+sub usage -+{ -+ my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms; -+ my %M = ( 'I' => '*' ); -+ $usage =~ s/^\s*perl\s+\S+/$^X $0/; -+ $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g; -+ -+ print < }; -+ my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms; -+ $copy =~ s/^(?=\S+)/ /gms; -+ $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms; -+ $self =~ s/^SKIP.*(?=^__DATA__)/SKIP -+if (\@ARGV && \$ARGV[0] eq '--unstrip') { -+ eval { require Devel::PPPort }; -+ \$@ and die "Cannot require Devel::PPPort, please install.\\n"; -+ if (eval \$Devel::PPPort::VERSION < $VERSION) { -+ die "$0 was originally generated with Devel::PPPort $VERSION.\\n" -+ . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n" -+ . "Please install a newer version, or --unstrip will not work.\\n"; -+ } -+ Devel::PPPort::WriteFile(\$0); -+ exit 0; -+} -+print <$0" or die "cannot strip $0: $!\n"; -+ print OUT "$pl$c\n"; -+ -+ exit 0; -+} -+ -+__DATA__ -+*/ -+ -+#ifndef _P_P_PORTABILITY_H_ -+#define _P_P_PORTABILITY_H_ -+ -+#ifndef DPPP_NAMESPACE -+# define DPPP_NAMESPACE DPPP_ -+#endif -+ -+#define DPPP_CAT2(x,y) CAT2(x,y) -+#define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name) -+ -+#ifndef PERL_REVISION -+# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION)) -+# define PERL_PATCHLEVEL_H_IMPLICIT -+# include -+# endif -+# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL))) -+# include -+# endif -+# ifndef PERL_REVISION -+# define PERL_REVISION (5) -+ /* Replace: 1 */ -+# define PERL_VERSION PATCHLEVEL -+# define PERL_SUBVERSION SUBVERSION -+ /* Replace PERL_PATCHLEVEL with PERL_VERSION */ -+ /* Replace: 0 */ -+# endif -+#endif -+ -+#define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10)) -+#define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION)) -+ -+/* It is very unlikely that anyone will try to use this with Perl 6 -+ (or greater), but who knows. -+ */ -+#if PERL_REVISION != 5 -+# error ppport.h only works with Perl version 5 -+#endif /* PERL_REVISION != 5 */ -+#ifndef dTHR -+# define dTHR dNOOP -+#endif -+#ifndef dTHX -+# define dTHX dNOOP -+#endif -+ -+#ifndef dTHXa -+# define dTHXa(x) dNOOP -+#endif -+#ifndef pTHX -+# define pTHX void -+#endif -+ -+#ifndef pTHX_ -+# define pTHX_ -+#endif -+ -+#ifndef aTHX -+# define aTHX -+#endif -+ -+#ifndef aTHX_ -+# define aTHX_ -+#endif -+ -+#if (PERL_BCDVERSION < 0x5006000) -+# ifdef USE_THREADS -+# define aTHXR thr -+# define aTHXR_ thr, -+# else -+# define aTHXR -+# define aTHXR_ -+# endif -+# define dTHXR dTHR -+#else -+# define aTHXR aTHX -+# define aTHXR_ aTHX_ -+# define dTHXR dTHX -+#endif -+#ifndef dTHXoa -+# define dTHXoa(x) dTHXa(x) -+#endif -+ -+#ifdef I_LIMITS -+# include -+#endif -+ -+#ifndef PERL_UCHAR_MIN -+# define PERL_UCHAR_MIN ((unsigned char)0) -+#endif -+ -+#ifndef PERL_UCHAR_MAX -+# ifdef UCHAR_MAX -+# define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX) -+# else -+# ifdef MAXUCHAR -+# define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR) -+# else -+# define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0) -+# endif -+# endif -+#endif -+ -+#ifndef PERL_USHORT_MIN -+# define PERL_USHORT_MIN ((unsigned short)0) -+#endif -+ -+#ifndef PERL_USHORT_MAX -+# ifdef USHORT_MAX -+# define PERL_USHORT_MAX ((unsigned short)USHORT_MAX) -+# else -+# ifdef MAXUSHORT -+# define PERL_USHORT_MAX ((unsigned short)MAXUSHORT) -+# else -+# ifdef USHRT_MAX -+# define PERL_USHORT_MAX ((unsigned short)USHRT_MAX) -+# else -+# define PERL_USHORT_MAX ((unsigned short)~(unsigned)0) -+# endif -+# endif -+# endif -+#endif -+ -+#ifndef PERL_SHORT_MAX -+# ifdef SHORT_MAX -+# define PERL_SHORT_MAX ((short)SHORT_MAX) -+# else -+# ifdef MAXSHORT /* Often used in */ -+# define PERL_SHORT_MAX ((short)MAXSHORT) -+# else -+# ifdef SHRT_MAX -+# define PERL_SHORT_MAX ((short)SHRT_MAX) -+# else -+# define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1)) -+# endif -+# endif -+# endif -+#endif -+ -+#ifndef PERL_SHORT_MIN -+# ifdef SHORT_MIN -+# define PERL_SHORT_MIN ((short)SHORT_MIN) -+# else -+# ifdef MINSHORT -+# define PERL_SHORT_MIN ((short)MINSHORT) -+# else -+# ifdef SHRT_MIN -+# define PERL_SHORT_MIN ((short)SHRT_MIN) -+# else -+# define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3)) -+# endif -+# endif -+# endif -+#endif -+ -+#ifndef PERL_UINT_MAX -+# ifdef UINT_MAX -+# define PERL_UINT_MAX ((unsigned int)UINT_MAX) -+# else -+# ifdef MAXUINT -+# define PERL_UINT_MAX ((unsigned int)MAXUINT) -+# else -+# define PERL_UINT_MAX (~(unsigned int)0) -+# endif -+# endif -+#endif -+ -+#ifndef PERL_UINT_MIN -+# define PERL_UINT_MIN ((unsigned int)0) -+#endif -+ -+#ifndef PERL_INT_MAX -+# ifdef INT_MAX -+# define PERL_INT_MAX ((int)INT_MAX) -+# else -+# ifdef MAXINT /* Often used in */ -+# define PERL_INT_MAX ((int)MAXINT) -+# else -+# define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1)) -+# endif -+# endif -+#endif -+ -+#ifndef PERL_INT_MIN -+# ifdef INT_MIN -+# define PERL_INT_MIN ((int)INT_MIN) -+# else -+# ifdef MININT -+# define PERL_INT_MIN ((int)MININT) -+# else -+# define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3)) -+# endif -+# endif -+#endif -+ -+#ifndef PERL_ULONG_MAX -+# ifdef ULONG_MAX -+# define PERL_ULONG_MAX ((unsigned long)ULONG_MAX) -+# else -+# ifdef MAXULONG -+# define PERL_ULONG_MAX ((unsigned long)MAXULONG) -+# else -+# define PERL_ULONG_MAX (~(unsigned long)0) -+# endif -+# endif -+#endif -+ -+#ifndef PERL_ULONG_MIN -+# define PERL_ULONG_MIN ((unsigned long)0L) -+#endif -+ -+#ifndef PERL_LONG_MAX -+# ifdef LONG_MAX -+# define PERL_LONG_MAX ((long)LONG_MAX) -+# else -+# ifdef MAXLONG -+# define PERL_LONG_MAX ((long)MAXLONG) -+# else -+# define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1)) -+# endif -+# endif -+#endif -+ -+#ifndef PERL_LONG_MIN -+# ifdef LONG_MIN -+# define PERL_LONG_MIN ((long)LONG_MIN) -+# else -+# ifdef MINLONG -+# define PERL_LONG_MIN ((long)MINLONG) -+# else -+# define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3)) -+# endif -+# endif -+#endif -+ -+#if defined(HAS_QUAD) && (defined(convex) || defined(uts)) -+# ifndef PERL_UQUAD_MAX -+# ifdef ULONGLONG_MAX -+# define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX) -+# else -+# ifdef MAXULONGLONG -+# define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG) -+# else -+# define PERL_UQUAD_MAX (~(unsigned long long)0) -+# endif -+# endif -+# endif -+ -+# ifndef PERL_UQUAD_MIN -+# define PERL_UQUAD_MIN ((unsigned long long)0L) -+# endif -+ -+# ifndef PERL_QUAD_MAX -+# ifdef LONGLONG_MAX -+# define PERL_QUAD_MAX ((long long)LONGLONG_MAX) -+# else -+# ifdef MAXLONGLONG -+# define PERL_QUAD_MAX ((long long)MAXLONGLONG) -+# else -+# define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1)) -+# endif -+# endif -+# endif -+ -+# ifndef PERL_QUAD_MIN -+# ifdef LONGLONG_MIN -+# define PERL_QUAD_MIN ((long long)LONGLONG_MIN) -+# else -+# ifdef MINLONGLONG -+# define PERL_QUAD_MIN ((long long)MINLONGLONG) -+# else -+# define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3)) -+# endif -+# endif -+# endif -+#endif -+ -+/* This is based on code from 5.003 perl.h */ -+#ifdef HAS_QUAD -+# ifdef cray -+#ifndef IVTYPE -+# define IVTYPE int -+#endif -+ -+#ifndef IV_MIN -+# define IV_MIN PERL_INT_MIN -+#endif -+ -+#ifndef IV_MAX -+# define IV_MAX PERL_INT_MAX -+#endif -+ -+#ifndef UV_MIN -+# define UV_MIN PERL_UINT_MIN -+#endif -+ -+#ifndef UV_MAX -+# define UV_MAX PERL_UINT_MAX -+#endif -+ -+# ifdef INTSIZE -+#ifndef IVSIZE -+# define IVSIZE INTSIZE -+#endif -+ -+# endif -+# else -+# if defined(convex) || defined(uts) -+#ifndef IVTYPE -+# define IVTYPE long long -+#endif -+ -+#ifndef IV_MIN -+# define IV_MIN PERL_QUAD_MIN -+#endif -+ -+#ifndef IV_MAX -+# define IV_MAX PERL_QUAD_MAX -+#endif -+ -+#ifndef UV_MIN -+# define UV_MIN PERL_UQUAD_MIN -+#endif -+ -+#ifndef UV_MAX -+# define UV_MAX PERL_UQUAD_MAX -+#endif -+ -+# ifdef LONGLONGSIZE -+#ifndef IVSIZE -+# define IVSIZE LONGLONGSIZE -+#endif -+ -+# endif -+# else -+#ifndef IVTYPE -+# define IVTYPE long -+#endif -+ -+#ifndef IV_MIN -+# define IV_MIN PERL_LONG_MIN -+#endif -+ -+#ifndef IV_MAX -+# define IV_MAX PERL_LONG_MAX -+#endif -+ -+#ifndef UV_MIN -+# define UV_MIN PERL_ULONG_MIN -+#endif -+ -+#ifndef UV_MAX -+# define UV_MAX PERL_ULONG_MAX -+#endif -+ -+# ifdef LONGSIZE -+#ifndef IVSIZE -+# define IVSIZE LONGSIZE -+#endif -+ -+# endif -+# endif -+# endif -+#ifndef IVSIZE -+# define IVSIZE 8 -+#endif -+ -+#ifndef LONGSIZE -+# define LONGSIZE 8 -+#endif -+ -+#ifndef PERL_QUAD_MIN -+# define PERL_QUAD_MIN IV_MIN -+#endif -+ -+#ifndef PERL_QUAD_MAX -+# define PERL_QUAD_MAX IV_MAX -+#endif -+ -+#ifndef PERL_UQUAD_MIN -+# define PERL_UQUAD_MIN UV_MIN -+#endif -+ -+#ifndef PERL_UQUAD_MAX -+# define PERL_UQUAD_MAX UV_MAX -+#endif -+ -+#else -+#ifndef IVTYPE -+# define IVTYPE long -+#endif -+ -+#ifndef LONGSIZE -+# define LONGSIZE 4 -+#endif -+ -+#ifndef IV_MIN -+# define IV_MIN PERL_LONG_MIN -+#endif -+ -+#ifndef IV_MAX -+# define IV_MAX PERL_LONG_MAX -+#endif -+ -+#ifndef UV_MIN -+# define UV_MIN PERL_ULONG_MIN -+#endif -+ -+#ifndef UV_MAX -+# define UV_MAX PERL_ULONG_MAX -+#endif -+ -+#endif -+ -+#ifndef IVSIZE -+# ifdef LONGSIZE -+# define IVSIZE LONGSIZE -+# else -+# define IVSIZE 4 /* A bold guess, but the best we can make. */ -+# endif -+#endif -+#ifndef UVTYPE -+# define UVTYPE unsigned IVTYPE -+#endif -+ -+#ifndef UVSIZE -+# define UVSIZE IVSIZE -+#endif -+#ifndef sv_setuv -+# define sv_setuv(sv, uv) \ -+ STMT_START { \ -+ UV TeMpUv = uv; \ -+ if (TeMpUv <= IV_MAX) \ -+ sv_setiv(sv, TeMpUv); \ -+ else \ -+ sv_setnv(sv, (double)TeMpUv); \ -+ } STMT_END -+#endif -+#ifndef newSVuv -+# define newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv)) -+#endif -+#ifndef sv_2uv -+# define sv_2uv(sv) ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv))) -+#endif -+ -+#ifndef SvUVX -+# define SvUVX(sv) ((UV)SvIVX(sv)) -+#endif -+ -+#ifndef SvUVXx -+# define SvUVXx(sv) SvUVX(sv) -+#endif -+ -+#ifndef SvUV -+# define SvUV(sv) (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv)) -+#endif -+ -+#ifndef SvUVx -+# define SvUVx(sv) ((PL_Sv = (sv)), SvUV(PL_Sv)) -+#endif -+ -+/* Hint: sv_uv -+ * Always use the SvUVx() macro instead of sv_uv(). -+ */ -+#ifndef sv_uv -+# define sv_uv(sv) SvUVx(sv) -+#endif -+ -+#if !defined(SvUOK) && defined(SvIOK_UV) -+# define SvUOK(sv) SvIOK_UV(sv) -+#endif -+#ifndef XST_mUV -+# define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) ) -+#endif -+ -+#ifndef XSRETURN_UV -+# define XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END -+#endif -+#ifndef PUSHu -+# define PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END -+#endif -+ -+#ifndef XPUSHu -+# define XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END -+#endif -+ -+#ifdef HAS_MEMCMP -+#ifndef memNE -+# define memNE(s1,s2,l) (memcmp(s1,s2,l)) -+#endif -+ -+#ifndef memEQ -+# define memEQ(s1,s2,l) (!memcmp(s1,s2,l)) -+#endif -+ -+#else -+#ifndef memNE -+# define memNE(s1,s2,l) (bcmp(s1,s2,l)) -+#endif -+ -+#ifndef memEQ -+# define memEQ(s1,s2,l) (!bcmp(s1,s2,l)) -+#endif -+ -+#endif -+#ifndef memEQs -+# define memEQs(s1, l, s2) \ -+ (sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1))) -+#endif -+ -+#ifndef memNEs -+# define memNEs(s1, l, s2) !memEQs(s1, l, s2) -+#endif -+#ifndef MoveD -+# define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t)) -+#endif -+ -+#ifndef CopyD -+# define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t)) -+#endif -+ -+#ifdef HAS_MEMSET -+#ifndef ZeroD -+# define ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t)) -+#endif -+ -+#else -+#ifndef ZeroD -+# define ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)), d) -+#endif -+ -+#endif -+#ifndef PoisonWith -+# define PoisonWith(d,n,t,b) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t)) -+#endif -+ -+#ifndef PoisonNew -+# define PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB) -+#endif -+ -+#ifndef PoisonFree -+# define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF) -+#endif -+ -+#ifndef Poison -+# define Poison(d,n,t) PoisonFree(d,n,t) -+#endif -+#ifndef Newx -+# define Newx(v,n,t) New(0,v,n,t) -+#endif -+ -+#ifndef Newxc -+# define Newxc(v,n,t,c) Newc(0,v,n,t,c) -+#endif -+ -+#ifndef Newxz -+# define Newxz(v,n,t) Newz(0,v,n,t) -+#endif -+ -+#ifndef PERL_UNUSED_DECL -+# ifdef HASATTRIBUTE -+# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER) -+# define PERL_UNUSED_DECL -+# else -+# define PERL_UNUSED_DECL __attribute__((unused)) -+# endif -+# else -+# define PERL_UNUSED_DECL -+# endif -+#endif -+ -+#ifndef PERL_UNUSED_ARG -+# if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */ -+# include -+# define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x)) -+# else -+# define PERL_UNUSED_ARG(x) ((void)x) -+# endif -+#endif -+ -+#ifndef PERL_UNUSED_VAR -+# define PERL_UNUSED_VAR(x) ((void)x) -+#endif -+ -+#ifndef PERL_UNUSED_CONTEXT -+# ifdef USE_ITHREADS -+# define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl) -+# else -+# define PERL_UNUSED_CONTEXT -+# endif -+#endif -+#ifndef NOOP -+# define NOOP /*EMPTY*/(void)0 -+#endif -+ -+#ifndef dNOOP -+# define dNOOP extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL -+#endif -+ -+#ifndef NVTYPE -+# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) -+# define NVTYPE long double -+# else -+# define NVTYPE double -+# endif -+typedef NVTYPE NV; -+#endif -+ -+#ifndef INT2PTR -+# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) -+# define PTRV UV -+# define INT2PTR(any,d) (any)(d) -+# else -+# if PTRSIZE == LONGSIZE -+# define PTRV unsigned long -+# else -+# define PTRV unsigned -+# endif -+# define INT2PTR(any,d) (any)(PTRV)(d) -+# endif -+#endif -+ -+#ifndef PTR2ul -+# if PTRSIZE == LONGSIZE -+# define PTR2ul(p) (unsigned long)(p) -+# else -+# define PTR2ul(p) INT2PTR(unsigned long,p) -+# endif -+#endif -+#ifndef PTR2nat -+# define PTR2nat(p) (PTRV)(p) -+#endif -+ -+#ifndef NUM2PTR -+# define NUM2PTR(any,d) (any)PTR2nat(d) -+#endif -+ -+#ifndef PTR2IV -+# define PTR2IV(p) INT2PTR(IV,p) -+#endif -+ -+#ifndef PTR2UV -+# define PTR2UV(p) INT2PTR(UV,p) -+#endif -+ -+#ifndef PTR2NV -+# define PTR2NV(p) NUM2PTR(NV,p) -+#endif -+ -+#undef START_EXTERN_C -+#undef END_EXTERN_C -+#undef EXTERN_C -+#ifdef __cplusplus -+# define START_EXTERN_C extern "C" { -+# define END_EXTERN_C } -+# define EXTERN_C extern "C" -+#else -+# define START_EXTERN_C -+# define END_EXTERN_C -+# define EXTERN_C extern -+#endif -+ -+#if defined(PERL_GCC_PEDANTIC) -+# ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN -+# define PERL_GCC_BRACE_GROUPS_FORBIDDEN -+# endif -+#endif -+ -+#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus) -+# ifndef PERL_USE_GCC_BRACE_GROUPS -+# define PERL_USE_GCC_BRACE_GROUPS -+# endif -+#endif -+ -+#undef STMT_START -+#undef STMT_END -+#ifdef PERL_USE_GCC_BRACE_GROUPS -+# define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */ -+# define STMT_END ) -+#else -+# if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__) -+# define STMT_START if (1) -+# define STMT_END else (void)0 -+# else -+# define STMT_START do -+# define STMT_END while (0) -+# endif -+#endif -+#ifndef boolSV -+# define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no) -+#endif -+ -+/* DEFSV appears first in 5.004_56 */ -+#ifndef DEFSV -+# define DEFSV GvSV(PL_defgv) -+#endif -+ -+#ifndef SAVE_DEFSV -+# define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) -+#endif -+ -+#ifndef DEFSV_set -+# define DEFSV_set(sv) (DEFSV = (sv)) -+#endif -+ -+/* Older perls (<=5.003) lack AvFILLp */ -+#ifndef AvFILLp -+# define AvFILLp AvFILL -+#endif -+#ifndef ERRSV -+# define ERRSV get_sv("@",FALSE) -+#endif -+ -+/* Hint: gv_stashpvn -+ * This function's backport doesn't support the length parameter, but -+ * rather ignores it. Portability can only be ensured if the length -+ * parameter is used for speed reasons, but the length can always be -+ * correctly computed from the string argument. -+ */ -+#ifndef gv_stashpvn -+# define gv_stashpvn(str,len,create) gv_stashpv(str,create) -+#endif -+ -+/* Replace: 1 */ -+#ifndef get_cv -+# define get_cv perl_get_cv -+#endif -+ -+#ifndef get_sv -+# define get_sv perl_get_sv -+#endif -+ -+#ifndef get_av -+# define get_av perl_get_av -+#endif -+ -+#ifndef get_hv -+# define get_hv perl_get_hv -+#endif -+ -+/* Replace: 0 */ -+#ifndef dUNDERBAR -+# define dUNDERBAR dNOOP -+#endif -+ -+#ifndef UNDERBAR -+# define UNDERBAR DEFSV -+#endif -+#ifndef dAX -+# define dAX I32 ax = MARK - PL_stack_base + 1 -+#endif -+ -+#ifndef dITEMS -+# define dITEMS I32 items = SP - MARK -+#endif -+#ifndef dXSTARG -+# define dXSTARG SV * targ = sv_newmortal() -+#endif -+#ifndef dAXMARK -+# define dAXMARK I32 ax = POPMARK; \ -+ register SV ** const mark = PL_stack_base + ax++ -+#endif -+#ifndef XSprePUSH -+# define XSprePUSH (sp = PL_stack_base + ax - 1) -+#endif -+ -+#if (PERL_BCDVERSION < 0x5005000) -+# undef XSRETURN -+# define XSRETURN(off) \ -+ STMT_START { \ -+ PL_stack_sp = PL_stack_base + ax + ((off) - 1); \ -+ return; \ -+ } STMT_END -+#endif -+#ifndef XSPROTO -+# define XSPROTO(name) void name(pTHX_ CV* cv) -+#endif -+ -+#ifndef SVfARG -+# define SVfARG(p) ((void*)(p)) -+#endif -+#ifndef PERL_ABS -+# define PERL_ABS(x) ((x) < 0 ? -(x) : (x)) -+#endif -+#ifndef dVAR -+# define dVAR dNOOP -+#endif -+#ifndef SVf -+# define SVf "_" -+#endif -+#ifndef UTF8_MAXBYTES -+# define UTF8_MAXBYTES UTF8_MAXLEN -+#endif -+#ifndef CPERLscope -+# define CPERLscope(x) x -+#endif -+#ifndef PERL_HASH -+# define PERL_HASH(hash,str,len) \ -+ STMT_START { \ -+ const char *s_PeRlHaSh = str; \ -+ I32 i_PeRlHaSh = len; \ -+ U32 hash_PeRlHaSh = 0; \ -+ while (i_PeRlHaSh--) \ -+ hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \ -+ (hash) = hash_PeRlHaSh; \ -+ } STMT_END -+#endif -+ -+#ifndef PERLIO_FUNCS_DECL -+# ifdef PERLIO_FUNCS_CONST -+# define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs -+# define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs) -+# else -+# define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs -+# define PERLIO_FUNCS_CAST(funcs) (funcs) -+# endif -+#endif -+ -+/* provide these typedefs for older perls */ -+#if (PERL_BCDVERSION < 0x5009003) -+ -+# ifdef ARGSproto -+typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto); -+# else -+typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX); -+# endif -+ -+typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); -+ -+#endif -+#ifndef isPSXSPC -+# define isPSXSPC(c) (isSPACE(c) || (c) == '\v') -+#endif -+ -+#ifndef isBLANK -+# define isBLANK(c) ((c) == ' ' || (c) == '\t') -+#endif -+ -+#ifdef EBCDIC -+#ifndef isALNUMC -+# define isALNUMC(c) isalnum(c) -+#endif -+ -+#ifndef isASCII -+# define isASCII(c) isascii(c) -+#endif -+ -+#ifndef isCNTRL -+# define isCNTRL(c) iscntrl(c) -+#endif -+ -+#ifndef isGRAPH -+# define isGRAPH(c) isgraph(c) -+#endif -+ -+#ifndef isPRINT -+# define isPRINT(c) isprint(c) -+#endif -+ -+#ifndef isPUNCT -+# define isPUNCT(c) ispunct(c) -+#endif -+ -+#ifndef isXDIGIT -+# define isXDIGIT(c) isxdigit(c) -+#endif -+ -+#else -+# if (PERL_BCDVERSION < 0x5010000) -+/* Hint: isPRINT -+ * The implementation in older perl versions includes all of the -+ * isSPACE() characters, which is wrong. The version provided by -+ * Devel::PPPort always overrides a present buggy version. -+ */ -+# undef isPRINT -+# endif -+ -+#ifdef HAS_QUAD -+# define WIDEST_UTYPE U64TYPE -+#else -+# define WIDEST_UTYPE U32 -+#endif -+#ifndef isALNUMC -+# define isALNUMC(c) (isALPHA(c) || isDIGIT(c)) -+#endif -+ -+#ifndef isASCII -+# define isASCII(c) ((WIDEST_UTYPE) (c) <= 127) -+#endif -+ -+#ifndef isCNTRL -+# define isCNTRL(c) ((WIDEST_UTYPE) (c) < ' ' || (c) == 127) -+#endif -+ -+#ifndef isGRAPH -+# define isGRAPH(c) (isALNUM(c) || isPUNCT(c)) -+#endif -+ -+#ifndef isPRINT -+# define isPRINT(c) (((c) >= 32 && (c) < 127)) -+#endif -+ -+#ifndef isPUNCT -+# define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126)) -+#endif -+ -+#ifndef isXDIGIT -+# define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) -+#endif -+ -+#endif -+ -+#ifndef PERL_SIGNALS_UNSAFE_FLAG -+ -+#define PERL_SIGNALS_UNSAFE_FLAG 0x0001 -+ -+#if (PERL_BCDVERSION < 0x5008000) -+# define D_PPP_PERL_SIGNALS_INIT PERL_SIGNALS_UNSAFE_FLAG -+#else -+# define D_PPP_PERL_SIGNALS_INIT 0 -+#endif -+ -+#if defined(NEED_PL_signals) -+static U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT; -+#elif defined(NEED_PL_signals_GLOBAL) -+U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT; -+#else -+extern U32 DPPP_(my_PL_signals); -+#endif -+#define PL_signals DPPP_(my_PL_signals) -+ -+#endif -+ -+/* Hint: PL_ppaddr -+ * Calling an op via PL_ppaddr requires passing a context argument -+ * for threaded builds. Since the context argument is different for -+ * 5.005 perls, you can use aTHXR (supplied by ppport.h), which will -+ * automatically be defined as the correct argument. -+ */ -+ -+#if (PERL_BCDVERSION <= 0x5005005) -+/* Replace: 1 */ -+# define PL_ppaddr ppaddr -+# define PL_no_modify no_modify -+/* Replace: 0 */ -+#endif -+ -+#if (PERL_BCDVERSION <= 0x5004005) -+/* Replace: 1 */ -+# define PL_DBsignal DBsignal -+# define PL_DBsingle DBsingle -+# define PL_DBsub DBsub -+# define PL_DBtrace DBtrace -+# define PL_Sv Sv -+# define PL_bufend bufend -+# define PL_bufptr bufptr -+# define PL_compiling compiling -+# define PL_copline copline -+# define PL_curcop curcop -+# define PL_curstash curstash -+# define PL_debstash debstash -+# define PL_defgv defgv -+# define PL_diehook diehook -+# define PL_dirty dirty -+# define PL_dowarn dowarn -+# define PL_errgv errgv -+# define PL_error_count error_count -+# define PL_expect expect -+# define PL_hexdigit hexdigit -+# define PL_hints hints -+# define PL_in_my in_my -+# define PL_laststatval laststatval -+# define PL_lex_state lex_state -+# define PL_lex_stuff lex_stuff -+# define PL_linestr linestr -+# define PL_na na -+# define PL_perl_destruct_level perl_destruct_level -+# define PL_perldb perldb -+# define PL_rsfp_filters rsfp_filters -+# define PL_rsfp rsfp -+# define PL_stack_base stack_base -+# define PL_stack_sp stack_sp -+# define PL_statcache statcache -+# define PL_stdingv stdingv -+# define PL_sv_arenaroot sv_arenaroot -+# define PL_sv_no sv_no -+# define PL_sv_undef sv_undef -+# define PL_sv_yes sv_yes -+# define PL_tainted tainted -+# define PL_tainting tainting -+# define PL_tokenbuf tokenbuf -+/* Replace: 0 */ -+#endif -+ -+/* Warning: PL_parser -+ * For perl versions earlier than 5.9.5, this is an always -+ * non-NULL dummy. Also, it cannot be dereferenced. Don't -+ * use it if you can avoid is and unless you absolutely know -+ * what you're doing. -+ * If you always check that PL_parser is non-NULL, you can -+ * define DPPP_PL_parser_NO_DUMMY to avoid the creation of -+ * a dummy parser structure. -+ */ -+ -+#if (PERL_BCDVERSION >= 0x5009005) -+# ifdef DPPP_PL_parser_NO_DUMMY -+# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \ -+ (croak("panic: PL_parser == NULL in %s:%d", \ -+ __FILE__, __LINE__), (yy_parser *) NULL))->var) -+# else -+# ifdef DPPP_PL_parser_NO_DUMMY_WARNING -+# define D_PPP_parser_dummy_warning(var) -+# else -+# define D_PPP_parser_dummy_warning(var) \ -+ warn("warning: dummy PL_" #var " used in %s:%d", __FILE__, __LINE__), -+# endif -+# define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \ -+ (D_PPP_parser_dummy_warning(var) &DPPP_(dummy_PL_parser)))->var) -+#if defined(NEED_PL_parser) -+static yy_parser DPPP_(dummy_PL_parser); -+#elif defined(NEED_PL_parser_GLOBAL) -+yy_parser DPPP_(dummy_PL_parser); -+#else -+extern yy_parser DPPP_(dummy_PL_parser); -+#endif -+ -+# endif -+ -+/* PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf depends on PL_parser */ -+/* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf -+ * Do not use this variable unless you know exactly what you're -+ * doint. It is internal to the perl parser and may change or even -+ * be removed in the future. As of perl 5.9.5, you have to check -+ * for (PL_parser != NULL) for this variable to have any effect. -+ * An always non-NULL PL_parser dummy is provided for earlier -+ * perl versions. -+ * If PL_parser is NULL when you try to access this variable, a -+ * dummy is being accessed instead and a warning is issued unless -+ * you define DPPP_PL_parser_NO_DUMMY_WARNING. -+ * If DPPP_PL_parser_NO_DUMMY is defined, the code trying to access -+ * this variable will croak with a panic message. -+ */ -+ -+# define PL_expect D_PPP_my_PL_parser_var(expect) -+# define PL_copline D_PPP_my_PL_parser_var(copline) -+# define PL_rsfp D_PPP_my_PL_parser_var(rsfp) -+# define PL_rsfp_filters D_PPP_my_PL_parser_var(rsfp_filters) -+# define PL_linestr D_PPP_my_PL_parser_var(linestr) -+# define PL_bufptr D_PPP_my_PL_parser_var(bufptr) -+# define PL_bufend D_PPP_my_PL_parser_var(bufend) -+# define PL_lex_state D_PPP_my_PL_parser_var(lex_state) -+# define PL_lex_stuff D_PPP_my_PL_parser_var(lex_stuff) -+# define PL_tokenbuf D_PPP_my_PL_parser_var(tokenbuf) -+# define PL_in_my D_PPP_my_PL_parser_var(in_my) -+# define PL_in_my_stash D_PPP_my_PL_parser_var(in_my_stash) -+# define PL_error_count D_PPP_my_PL_parser_var(error_count) -+ -+ -+#else -+ -+/* ensure that PL_parser != NULL and cannot be dereferenced */ -+# define PL_parser ((void *) 1) -+ -+#endif -+#ifndef mPUSHs -+# define mPUSHs(s) PUSHs(sv_2mortal(s)) -+#endif -+ -+#ifndef PUSHmortal -+# define PUSHmortal PUSHs(sv_newmortal()) -+#endif -+ -+#ifndef mPUSHp -+# define mPUSHp(p,l) sv_setpvn(PUSHmortal, (p), (l)) -+#endif -+ -+#ifndef mPUSHn -+# define mPUSHn(n) sv_setnv(PUSHmortal, (NV)(n)) -+#endif -+ -+#ifndef mPUSHi -+# define mPUSHi(i) sv_setiv(PUSHmortal, (IV)(i)) -+#endif -+ -+#ifndef mPUSHu -+# define mPUSHu(u) sv_setuv(PUSHmortal, (UV)(u)) -+#endif -+#ifndef mXPUSHs -+# define mXPUSHs(s) XPUSHs(sv_2mortal(s)) -+#endif -+ -+#ifndef XPUSHmortal -+# define XPUSHmortal XPUSHs(sv_newmortal()) -+#endif -+ -+#ifndef mXPUSHp -+# define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END -+#endif -+ -+#ifndef mXPUSHn -+# define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END -+#endif -+ -+#ifndef mXPUSHi -+# define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END -+#endif -+ -+#ifndef mXPUSHu -+# define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END -+#endif -+ -+/* Replace: 1 */ -+#ifndef call_sv -+# define call_sv perl_call_sv -+#endif -+ -+#ifndef call_pv -+# define call_pv perl_call_pv -+#endif -+ -+#ifndef call_argv -+# define call_argv perl_call_argv -+#endif -+ -+#ifndef call_method -+# define call_method perl_call_method -+#endif -+#ifndef eval_sv -+# define eval_sv perl_eval_sv -+#endif -+ -+/* Replace: 0 */ -+#ifndef PERL_LOADMOD_DENY -+# define PERL_LOADMOD_DENY 0x1 -+#endif -+ -+#ifndef PERL_LOADMOD_NOIMPORT -+# define PERL_LOADMOD_NOIMPORT 0x2 -+#endif -+ -+#ifndef PERL_LOADMOD_IMPORT_OPS -+# define PERL_LOADMOD_IMPORT_OPS 0x4 -+#endif -+ -+#ifndef G_METHOD -+# define G_METHOD 64 -+# ifdef call_sv -+# undef call_sv -+# endif -+# if (PERL_BCDVERSION < 0x5006000) -+# define call_sv(sv, flags) ((flags) & G_METHOD ? perl_call_method((char *) SvPV_nolen_const(sv), \ -+ (flags) & ~G_METHOD) : perl_call_sv(sv, flags)) -+# else -+# define call_sv(sv, flags) ((flags) & G_METHOD ? Perl_call_method(aTHX_ (char *) SvPV_nolen_const(sv), \ -+ (flags) & ~G_METHOD) : Perl_call_sv(aTHX_ sv, flags)) -+# endif -+#endif -+ -+/* Replace perl_eval_pv with eval_pv */ -+ -+#ifndef eval_pv -+#if defined(NEED_eval_pv) -+static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error); -+static -+#else -+extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error); -+#endif -+ -+#ifdef eval_pv -+# undef eval_pv -+#endif -+#define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b) -+#define Perl_eval_pv DPPP_(my_eval_pv) -+ -+#if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL) -+ -+SV* -+DPPP_(my_eval_pv)(char *p, I32 croak_on_error) -+{ -+ dSP; -+ SV* sv = newSVpv(p, 0); -+ -+ PUSHMARK(sp); -+ eval_sv(sv, G_SCALAR); -+ SvREFCNT_dec(sv); -+ -+ SPAGAIN; -+ sv = POPs; -+ PUTBACK; -+ -+ if (croak_on_error && SvTRUE(GvSV(errgv))) -+ croak(SvPVx(GvSV(errgv), na)); -+ -+ return sv; -+} -+ -+#endif -+#endif -+ -+#ifndef vload_module -+#if defined(NEED_vload_module) -+static void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args); -+static -+#else -+extern void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args); -+#endif -+ -+#ifdef vload_module -+# undef vload_module -+#endif -+#define vload_module(a,b,c,d) DPPP_(my_vload_module)(aTHX_ a,b,c,d) -+#define Perl_vload_module DPPP_(my_vload_module) -+ -+#if defined(NEED_vload_module) || defined(NEED_vload_module_GLOBAL) -+ -+void -+DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args) -+{ -+ dTHR; -+ dVAR; -+ OP *veop, *imop; -+ -+ OP * const modname = newSVOP(OP_CONST, 0, name); -+ /* 5.005 has a somewhat hacky force_normal that doesn't croak on -+ SvREADONLY() if PL_compling is true. Current perls take care in -+ ck_require() to correctly turn off SvREADONLY before calling -+ force_normal_flags(). This seems a better fix than fudging PL_compling -+ */ -+ SvREADONLY_off(((SVOP*)modname)->op_sv); -+ modname->op_private |= OPpCONST_BARE; -+ if (ver) { -+ veop = newSVOP(OP_CONST, 0, ver); -+ } -+ else -+ veop = NULL; -+ if (flags & PERL_LOADMOD_NOIMPORT) { -+ imop = sawparens(newNULLLIST()); -+ } -+ else if (flags & PERL_LOADMOD_IMPORT_OPS) { -+ imop = va_arg(*args, OP*); -+ } -+ else { -+ SV *sv; -+ imop = NULL; -+ sv = va_arg(*args, SV*); -+ while (sv) { -+ imop = append_elem(OP_LIST, imop, newSVOP(OP_CONST, 0, sv)); -+ sv = va_arg(*args, SV*); -+ } -+ } -+ { -+ const line_t ocopline = PL_copline; -+ COP * const ocurcop = PL_curcop; -+ const int oexpect = PL_expect; -+ -+#if (PERL_BCDVERSION >= 0x5004000) -+ utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0), -+ veop, modname, imop); -+#else -+ utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(), -+ modname, imop); -+#endif -+ PL_expect = oexpect; -+ PL_copline = ocopline; -+ PL_curcop = ocurcop; -+ } -+} -+ -+#endif -+#endif -+ -+#ifndef load_module -+#if defined(NEED_load_module) -+static void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...); -+static -+#else -+extern void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...); -+#endif -+ -+#ifdef load_module -+# undef load_module -+#endif -+#define load_module DPPP_(my_load_module) -+#define Perl_load_module DPPP_(my_load_module) -+ -+#if defined(NEED_load_module) || defined(NEED_load_module_GLOBAL) -+ -+void -+DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...) -+{ -+ va_list args; -+ va_start(args, ver); -+ vload_module(flags, name, ver, &args); -+ va_end(args); -+} -+ -+#endif -+#endif -+#ifndef newRV_inc -+# define newRV_inc(sv) newRV(sv) /* Replace */ -+#endif -+ -+#ifndef newRV_noinc -+#if defined(NEED_newRV_noinc) -+static SV * DPPP_(my_newRV_noinc)(SV *sv); -+static -+#else -+extern SV * DPPP_(my_newRV_noinc)(SV *sv); -+#endif -+ -+#ifdef newRV_noinc -+# undef newRV_noinc -+#endif -+#define newRV_noinc(a) DPPP_(my_newRV_noinc)(aTHX_ a) -+#define Perl_newRV_noinc DPPP_(my_newRV_noinc) -+ -+#if defined(NEED_newRV_noinc) || defined(NEED_newRV_noinc_GLOBAL) -+SV * -+DPPP_(my_newRV_noinc)(SV *sv) -+{ -+ SV *rv = (SV *)newRV(sv); -+ SvREFCNT_dec(sv); -+ return rv; -+} -+#endif -+#endif -+ -+/* Hint: newCONSTSUB -+ * Returns a CV* as of perl-5.7.1. This return value is not supported -+ * by Devel::PPPort. -+ */ -+ -+/* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */ -+#if (PERL_BCDVERSION < 0x5004063) && (PERL_BCDVERSION != 0x5004005) -+#if defined(NEED_newCONSTSUB) -+static void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv); -+static -+#else -+extern void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv); -+#endif -+ -+#ifdef newCONSTSUB -+# undef newCONSTSUB -+#endif -+#define newCONSTSUB(a,b,c) DPPP_(my_newCONSTSUB)(aTHX_ a,b,c) -+#define Perl_newCONSTSUB DPPP_(my_newCONSTSUB) -+ -+#if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL) -+ -+/* This is just a trick to avoid a dependency of newCONSTSUB on PL_parser */ -+/* (There's no PL_parser in perl < 5.005, so this is completely safe) */ -+#define D_PPP_PL_copline PL_copline -+ -+void -+DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv) -+{ -+ U32 oldhints = PL_hints; -+ HV *old_cop_stash = PL_curcop->cop_stash; -+ HV *old_curstash = PL_curstash; -+ line_t oldline = PL_curcop->cop_line; -+ PL_curcop->cop_line = D_PPP_PL_copline; -+ -+ PL_hints &= ~HINT_BLOCK_SCOPE; -+ if (stash) -+ PL_curstash = PL_curcop->cop_stash = stash; -+ -+ newSUB( -+ -+#if (PERL_BCDVERSION < 0x5003022) -+ start_subparse(), -+#elif (PERL_BCDVERSION == 0x5003022) -+ start_subparse(0), -+#else /* 5.003_23 onwards */ -+ start_subparse(FALSE, 0), -+#endif -+ -+ newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)), -+ newSVOP(OP_CONST, 0, &PL_sv_no), /* SvPV(&PL_sv_no) == "" -- GMB */ -+ newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv)) -+ ); -+ -+ PL_hints = oldhints; -+ PL_curcop->cop_stash = old_cop_stash; -+ PL_curstash = old_curstash; -+ PL_curcop->cop_line = oldline; -+} -+#endif -+#endif -+ -+/* -+ * Boilerplate macros for initializing and accessing interpreter-local -+ * data from C. All statics in extensions should be reworked to use -+ * this, if you want to make the extension thread-safe. See ext/re/re.xs -+ * for an example of the use of these macros. -+ * -+ * Code that uses these macros is responsible for the following: -+ * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts" -+ * 2. Declare a typedef named my_cxt_t that is a structure that contains -+ * all the data that needs to be interpreter-local. -+ * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t. -+ * 4. Use the MY_CXT_INIT macro such that it is called exactly once -+ * (typically put in the BOOT: section). -+ * 5. Use the members of the my_cxt_t structure everywhere as -+ * MY_CXT.member. -+ * 6. Use the dMY_CXT macro (a declaration) in all the functions that -+ * access MY_CXT. -+ */ -+ -+#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \ -+ defined(PERL_CAPI) || defined(PERL_IMPLICIT_CONTEXT) -+ -+#ifndef START_MY_CXT -+ -+/* This must appear in all extensions that define a my_cxt_t structure, -+ * right after the definition (i.e. at file scope). The non-threads -+ * case below uses it to declare the data as static. */ -+#define START_MY_CXT -+ -+#if (PERL_BCDVERSION < 0x5004068) -+/* Fetches the SV that keeps the per-interpreter data. */ -+#define dMY_CXT_SV \ -+ SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE) -+#else /* >= perl5.004_68 */ -+#define dMY_CXT_SV \ -+ SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY, \ -+ sizeof(MY_CXT_KEY)-1, TRUE) -+#endif /* < perl5.004_68 */ -+ -+/* This declaration should be used within all functions that use the -+ * interpreter-local data. */ -+#define dMY_CXT \ -+ dMY_CXT_SV; \ -+ my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv)) -+ -+/* Creates and zeroes the per-interpreter data. -+ * (We allocate my_cxtp in a Perl SV so that it will be released when -+ * the interpreter goes away.) */ -+#define MY_CXT_INIT \ -+ dMY_CXT_SV; \ -+ /* newSV() allocates one more than needed */ \ -+ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\ -+ Zero(my_cxtp, 1, my_cxt_t); \ -+ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp)) -+ -+/* This macro must be used to access members of the my_cxt_t structure. -+ * e.g. MYCXT.some_data */ -+#define MY_CXT (*my_cxtp) -+ -+/* Judicious use of these macros can reduce the number of times dMY_CXT -+ * is used. Use is similar to pTHX, aTHX etc. */ -+#define pMY_CXT my_cxt_t *my_cxtp -+#define pMY_CXT_ pMY_CXT, -+#define _pMY_CXT ,pMY_CXT -+#define aMY_CXT my_cxtp -+#define aMY_CXT_ aMY_CXT, -+#define _aMY_CXT ,aMY_CXT -+ -+#endif /* START_MY_CXT */ -+ -+#ifndef MY_CXT_CLONE -+/* Clones the per-interpreter data. */ -+#define MY_CXT_CLONE \ -+ dMY_CXT_SV; \ -+ my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\ -+ Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\ -+ sv_setuv(my_cxt_sv, PTR2UV(my_cxtp)) -+#endif -+ -+#else /* single interpreter */ -+ -+#ifndef START_MY_CXT -+ -+#define START_MY_CXT static my_cxt_t my_cxt; -+#define dMY_CXT_SV dNOOP -+#define dMY_CXT dNOOP -+#define MY_CXT_INIT NOOP -+#define MY_CXT my_cxt -+ -+#define pMY_CXT void -+#define pMY_CXT_ -+#define _pMY_CXT -+#define aMY_CXT -+#define aMY_CXT_ -+#define _aMY_CXT -+ -+#endif /* START_MY_CXT */ -+ -+#ifndef MY_CXT_CLONE -+#define MY_CXT_CLONE NOOP -+#endif -+ -+#endif -+ -+#ifndef IVdf -+# if IVSIZE == LONGSIZE -+# define IVdf "ld" -+# define UVuf "lu" -+# define UVof "lo" -+# define UVxf "lx" -+# define UVXf "lX" -+# elif IVSIZE == INTSIZE -+# define IVdf "d" -+# define UVuf "u" -+# define UVof "o" -+# define UVxf "x" -+# define UVXf "X" -+# else -+# error "cannot define IV/UV formats" -+# endif -+#endif -+ -+#ifndef NVef -+# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \ -+ defined(PERL_PRIfldbl) && (PERL_BCDVERSION != 0x5006000) -+ /* Not very likely, but let's try anyway. */ -+# define NVef PERL_PRIeldbl -+# define NVff PERL_PRIfldbl -+# define NVgf PERL_PRIgldbl -+# else -+# define NVef "e" -+# define NVff "f" -+# define NVgf "g" -+# endif -+#endif -+ -+#ifndef SvREFCNT_inc -+# ifdef PERL_USE_GCC_BRACE_GROUPS -+# define SvREFCNT_inc(sv) \ -+ ({ \ -+ SV * const _sv = (SV*)(sv); \ -+ if (_sv) \ -+ (SvREFCNT(_sv))++; \ -+ _sv; \ -+ }) -+# else -+# define SvREFCNT_inc(sv) \ -+ ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL) -+# endif -+#endif -+ -+#ifndef SvREFCNT_inc_simple -+# ifdef PERL_USE_GCC_BRACE_GROUPS -+# define SvREFCNT_inc_simple(sv) \ -+ ({ \ -+ if (sv) \ -+ (SvREFCNT(sv))++; \ -+ (SV *)(sv); \ -+ }) -+# else -+# define SvREFCNT_inc_simple(sv) \ -+ ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL) -+# endif -+#endif -+ -+#ifndef SvREFCNT_inc_NN -+# ifdef PERL_USE_GCC_BRACE_GROUPS -+# define SvREFCNT_inc_NN(sv) \ -+ ({ \ -+ SV * const _sv = (SV*)(sv); \ -+ SvREFCNT(_sv)++; \ -+ _sv; \ -+ }) -+# else -+# define SvREFCNT_inc_NN(sv) \ -+ (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv) -+# endif -+#endif -+ -+#ifndef SvREFCNT_inc_void -+# ifdef PERL_USE_GCC_BRACE_GROUPS -+# define SvREFCNT_inc_void(sv) \ -+ ({ \ -+ SV * const _sv = (SV*)(sv); \ -+ if (_sv) \ -+ (void)(SvREFCNT(_sv)++); \ -+ }) -+# else -+# define SvREFCNT_inc_void(sv) \ -+ (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0) -+# endif -+#endif -+#ifndef SvREFCNT_inc_simple_void -+# define SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END -+#endif -+ -+#ifndef SvREFCNT_inc_simple_NN -+# define SvREFCNT_inc_simple_NN(sv) (++SvREFCNT(sv), (SV*)(sv)) -+#endif -+ -+#ifndef SvREFCNT_inc_void_NN -+# define SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv))) -+#endif -+ -+#ifndef SvREFCNT_inc_simple_void_NN -+# define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv))) -+#endif -+ -+#ifndef newSV_type -+ -+#if defined(NEED_newSV_type) -+static SV* DPPP_(my_newSV_type)(pTHX_ svtype const t); -+static -+#else -+extern SV* DPPP_(my_newSV_type)(pTHX_ svtype const t); -+#endif -+ -+#ifdef newSV_type -+# undef newSV_type -+#endif -+#define newSV_type(a) DPPP_(my_newSV_type)(aTHX_ a) -+#define Perl_newSV_type DPPP_(my_newSV_type) -+ -+#if defined(NEED_newSV_type) || defined(NEED_newSV_type_GLOBAL) -+ -+SV* -+DPPP_(my_newSV_type)(pTHX_ svtype const t) -+{ -+ SV* const sv = newSV(0); -+ sv_upgrade(sv, t); -+ return sv; -+} -+ -+#endif -+ -+#endif -+ -+#if (PERL_BCDVERSION < 0x5006000) -+# define D_PPP_CONSTPV_ARG(x) ((char *) (x)) -+#else -+# define D_PPP_CONSTPV_ARG(x) (x) -+#endif -+#ifndef newSVpvn -+# define newSVpvn(data,len) ((data) \ -+ ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \ -+ : newSV(0)) -+#endif -+#ifndef newSVpvn_utf8 -+# define newSVpvn_utf8(s, len, u) newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0) -+#endif -+#ifndef SVf_UTF8 -+# define SVf_UTF8 0 -+#endif -+ -+#ifndef newSVpvn_flags -+ -+#if defined(NEED_newSVpvn_flags) -+static SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags); -+static -+#else -+extern SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags); -+#endif -+ -+#ifdef newSVpvn_flags -+# undef newSVpvn_flags -+#endif -+#define newSVpvn_flags(a,b,c) DPPP_(my_newSVpvn_flags)(aTHX_ a,b,c) -+#define Perl_newSVpvn_flags DPPP_(my_newSVpvn_flags) -+ -+#if defined(NEED_newSVpvn_flags) || defined(NEED_newSVpvn_flags_GLOBAL) -+ -+SV * -+DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags) -+{ -+ SV *sv = newSVpvn(D_PPP_CONSTPV_ARG(s), len); -+ SvFLAGS(sv) |= (flags & SVf_UTF8); -+ return (flags & SVs_TEMP) ? sv_2mortal(sv) : sv; -+} -+ -+#endif -+ -+#endif -+ -+/* Backwards compatibility stuff... :-( */ -+#if !defined(NEED_sv_2pv_flags) && defined(NEED_sv_2pv_nolen) -+# define NEED_sv_2pv_flags -+#endif -+#if !defined(NEED_sv_2pv_flags_GLOBAL) && defined(NEED_sv_2pv_nolen_GLOBAL) -+# define NEED_sv_2pv_flags_GLOBAL -+#endif -+ -+/* Hint: sv_2pv_nolen -+ * Use the SvPV_nolen() or SvPV_nolen_const() macros instead of sv_2pv_nolen(). -+ */ -+#ifndef sv_2pv_nolen -+# define sv_2pv_nolen(sv) SvPV_nolen(sv) -+#endif -+ -+#ifdef SvPVbyte -+ -+/* Hint: SvPVbyte -+ * Does not work in perl-5.6.1, ppport.h implements a version -+ * borrowed from perl-5.7.3. -+ */ -+ -+#if (PERL_BCDVERSION < 0x5007000) -+ -+#if defined(NEED_sv_2pvbyte) -+static char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp); -+static -+#else -+extern char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp); -+#endif -+ -+#ifdef sv_2pvbyte -+# undef sv_2pvbyte -+#endif -+#define sv_2pvbyte(a,b) DPPP_(my_sv_2pvbyte)(aTHX_ a,b) -+#define Perl_sv_2pvbyte DPPP_(my_sv_2pvbyte) -+ -+#if defined(NEED_sv_2pvbyte) || defined(NEED_sv_2pvbyte_GLOBAL) -+ -+char * -+DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp) -+{ -+ sv_utf8_downgrade(sv,0); -+ return SvPV(sv,*lp); -+} -+ -+#endif -+ -+/* Hint: sv_2pvbyte -+ * Use the SvPVbyte() macro instead of sv_2pvbyte(). -+ */ -+ -+#undef SvPVbyte -+ -+#define SvPVbyte(sv, lp) \ -+ ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK) \ -+ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp)) -+ -+#endif -+ -+#else -+ -+# define SvPVbyte SvPV -+# define sv_2pvbyte sv_2pv -+ -+#endif -+#ifndef sv_2pvbyte_nolen -+# define sv_2pvbyte_nolen(sv) sv_2pv_nolen(sv) -+#endif -+ -+/* Hint: sv_pvn -+ * Always use the SvPV() macro instead of sv_pvn(). -+ */ -+ -+/* Hint: sv_pvn_force -+ * Always use the SvPV_force() macro instead of sv_pvn_force(). -+ */ -+ -+/* If these are undefined, they're not handled by the core anyway */ -+#ifndef SV_IMMEDIATE_UNREF -+# define SV_IMMEDIATE_UNREF 0 -+#endif -+ -+#ifndef SV_GMAGIC -+# define SV_GMAGIC 0 -+#endif -+ -+#ifndef SV_COW_DROP_PV -+# define SV_COW_DROP_PV 0 -+#endif -+ -+#ifndef SV_UTF8_NO_ENCODING -+# define SV_UTF8_NO_ENCODING 0 -+#endif -+ -+#ifndef SV_NOSTEAL -+# define SV_NOSTEAL 0 -+#endif -+ -+#ifndef SV_CONST_RETURN -+# define SV_CONST_RETURN 0 -+#endif -+ -+#ifndef SV_MUTABLE_RETURN -+# define SV_MUTABLE_RETURN 0 -+#endif -+ -+#ifndef SV_SMAGIC -+# define SV_SMAGIC 0 -+#endif -+ -+#ifndef SV_HAS_TRAILING_NUL -+# define SV_HAS_TRAILING_NUL 0 -+#endif -+ -+#ifndef SV_COW_SHARED_HASH_KEYS -+# define SV_COW_SHARED_HASH_KEYS 0 -+#endif -+ -+#if (PERL_BCDVERSION < 0x5007002) -+ -+#if defined(NEED_sv_2pv_flags) -+static char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); -+static -+#else -+extern char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); -+#endif -+ -+#ifdef sv_2pv_flags -+# undef sv_2pv_flags -+#endif -+#define sv_2pv_flags(a,b,c) DPPP_(my_sv_2pv_flags)(aTHX_ a,b,c) -+#define Perl_sv_2pv_flags DPPP_(my_sv_2pv_flags) -+ -+#if defined(NEED_sv_2pv_flags) || defined(NEED_sv_2pv_flags_GLOBAL) -+ -+char * -+DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags) -+{ -+ STRLEN n_a = (STRLEN) flags; -+ return sv_2pv(sv, lp ? lp : &n_a); -+} -+ -+#endif -+ -+#if defined(NEED_sv_pvn_force_flags) -+static char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); -+static -+#else -+extern char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags); -+#endif -+ -+#ifdef sv_pvn_force_flags -+# undef sv_pvn_force_flags -+#endif -+#define sv_pvn_force_flags(a,b,c) DPPP_(my_sv_pvn_force_flags)(aTHX_ a,b,c) -+#define Perl_sv_pvn_force_flags DPPP_(my_sv_pvn_force_flags) -+ -+#if defined(NEED_sv_pvn_force_flags) || defined(NEED_sv_pvn_force_flags_GLOBAL) -+ -+char * -+DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags) -+{ -+ STRLEN n_a = (STRLEN) flags; -+ return sv_pvn_force(sv, lp ? lp : &n_a); -+} -+ -+#endif -+ -+#endif -+ -+#if (PERL_BCDVERSION < 0x5008008) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5009003) ) -+# define DPPP_SVPV_NOLEN_LP_ARG &PL_na -+#else -+# define DPPP_SVPV_NOLEN_LP_ARG 0 -+#endif -+#ifndef SvPV_const -+# define SvPV_const(sv, lp) SvPV_flags_const(sv, lp, SV_GMAGIC) -+#endif -+ -+#ifndef SvPV_mutable -+# define SvPV_mutable(sv, lp) SvPV_flags_mutable(sv, lp, SV_GMAGIC) -+#endif -+#ifndef SvPV_flags -+# define SvPV_flags(sv, lp, flags) \ -+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ -+ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv_flags(sv, &lp, flags)) -+#endif -+#ifndef SvPV_flags_const -+# define SvPV_flags_const(sv, lp, flags) \ -+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ -+ ? ((lp = SvCUR(sv)), SvPVX_const(sv)) : \ -+ (const char*) sv_2pv_flags(sv, &lp, flags|SV_CONST_RETURN)) -+#endif -+#ifndef SvPV_flags_const_nolen -+# define SvPV_flags_const_nolen(sv, flags) \ -+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ -+ ? SvPVX_const(sv) : \ -+ (const char*) sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN)) -+#endif -+#ifndef SvPV_flags_mutable -+# define SvPV_flags_mutable(sv, lp, flags) \ -+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ -+ ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) : \ -+ sv_2pv_flags(sv, &lp, flags|SV_MUTABLE_RETURN)) -+#endif -+#ifndef SvPV_force -+# define SvPV_force(sv, lp) SvPV_force_flags(sv, lp, SV_GMAGIC) -+#endif -+ -+#ifndef SvPV_force_nolen -+# define SvPV_force_nolen(sv) SvPV_force_flags_nolen(sv, SV_GMAGIC) -+#endif -+ -+#ifndef SvPV_force_mutable -+# define SvPV_force_mutable(sv, lp) SvPV_force_flags_mutable(sv, lp, SV_GMAGIC) -+#endif -+ -+#ifndef SvPV_force_nomg -+# define SvPV_force_nomg(sv, lp) SvPV_force_flags(sv, lp, 0) -+#endif -+ -+#ifndef SvPV_force_nomg_nolen -+# define SvPV_force_nomg_nolen(sv) SvPV_force_flags_nolen(sv, 0) -+#endif -+#ifndef SvPV_force_flags -+# define SvPV_force_flags(sv, lp, flags) \ -+ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ -+ ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvn_force_flags(sv, &lp, flags)) -+#endif -+#ifndef SvPV_force_flags_nolen -+# define SvPV_force_flags_nolen(sv, flags) \ -+ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ -+ ? SvPVX(sv) : sv_pvn_force_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags)) -+#endif -+#ifndef SvPV_force_flags_mutable -+# define SvPV_force_flags_mutable(sv, lp, flags) \ -+ ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \ -+ ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) \ -+ : sv_pvn_force_flags(sv, &lp, flags|SV_MUTABLE_RETURN)) -+#endif -+#ifndef SvPV_nolen -+# define SvPV_nolen(sv) \ -+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ -+ ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC)) -+#endif -+#ifndef SvPV_nolen_const -+# define SvPV_nolen_const(sv) \ -+ ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ -+ ? SvPVX_const(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN)) -+#endif -+#ifndef SvPV_nomg -+# define SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0) -+#endif -+ -+#ifndef SvPV_nomg_const -+# define SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0) -+#endif -+ -+#ifndef SvPV_nomg_const_nolen -+# define SvPV_nomg_const_nolen(sv) SvPV_flags_const_nolen(sv, 0) -+#endif -+ -+#ifndef SvPV_nomg_nolen -+# define SvPV_nomg_nolen(sv) ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \ -+ ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, 0)) -+#endif -+#ifndef SvPV_renew -+# define SvPV_renew(sv,n) STMT_START { SvLEN_set(sv, n); \ -+ SvPV_set((sv), (char *) saferealloc( \ -+ (Malloc_t)SvPVX(sv), (MEM_SIZE)((n)))); \ -+ } STMT_END -+#endif -+#ifndef SvMAGIC_set -+# define SvMAGIC_set(sv, val) \ -+ STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \ -+ (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END -+#endif -+ -+#if (PERL_BCDVERSION < 0x5009003) -+#ifndef SvPVX_const -+# define SvPVX_const(sv) ((const char*) (0 + SvPVX(sv))) -+#endif -+ -+#ifndef SvPVX_mutable -+# define SvPVX_mutable(sv) (0 + SvPVX(sv)) -+#endif -+#ifndef SvRV_set -+# define SvRV_set(sv, val) \ -+ STMT_START { assert(SvTYPE(sv) >= SVt_RV); \ -+ (((XRV*) SvANY(sv))->xrv_rv = (val)); } STMT_END -+#endif -+ -+#else -+#ifndef SvPVX_const -+# define SvPVX_const(sv) ((const char*)((sv)->sv_u.svu_pv)) -+#endif -+ -+#ifndef SvPVX_mutable -+# define SvPVX_mutable(sv) ((sv)->sv_u.svu_pv) -+#endif -+#ifndef SvRV_set -+# define SvRV_set(sv, val) \ -+ STMT_START { assert(SvTYPE(sv) >= SVt_RV); \ -+ ((sv)->sv_u.svu_rv = (val)); } STMT_END -+#endif -+ -+#endif -+#ifndef SvSTASH_set -+# define SvSTASH_set(sv, val) \ -+ STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \ -+ (((XPVMG*) SvANY(sv))->xmg_stash = (val)); } STMT_END -+#endif -+ -+#if (PERL_BCDVERSION < 0x5004000) -+#ifndef SvUV_set -+# define SvUV_set(sv, val) \ -+ STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \ -+ (((XPVIV*) SvANY(sv))->xiv_iv = (IV) (val)); } STMT_END -+#endif -+ -+#else -+#ifndef SvUV_set -+# define SvUV_set(sv, val) \ -+ STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \ -+ (((XPVUV*) SvANY(sv))->xuv_uv = (val)); } STMT_END -+#endif -+ -+#endif -+ -+#if (PERL_BCDVERSION >= 0x5004000) && !defined(vnewSVpvf) -+#if defined(NEED_vnewSVpvf) -+static SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args); -+static -+#else -+extern SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args); -+#endif -+ -+#ifdef vnewSVpvf -+# undef vnewSVpvf -+#endif -+#define vnewSVpvf(a,b) DPPP_(my_vnewSVpvf)(aTHX_ a,b) -+#define Perl_vnewSVpvf DPPP_(my_vnewSVpvf) -+ -+#if defined(NEED_vnewSVpvf) || defined(NEED_vnewSVpvf_GLOBAL) -+ -+SV * -+DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args) -+{ -+ register SV *sv = newSV(0); -+ sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); -+ return sv; -+} -+ -+#endif -+#endif -+ -+#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf) -+# define sv_vcatpvf(sv, pat, args) sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) -+#endif -+ -+#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf) -+# define sv_vsetpvf(sv, pat, args) sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) -+#endif -+ -+#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg) -+#if defined(NEED_sv_catpvf_mg) -+static void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...); -+static -+#else -+extern void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...); -+#endif -+ -+#define Perl_sv_catpvf_mg DPPP_(my_sv_catpvf_mg) -+ -+#if defined(NEED_sv_catpvf_mg) || defined(NEED_sv_catpvf_mg_GLOBAL) -+ -+void -+DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...) -+{ -+ va_list args; -+ va_start(args, pat); -+ sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); -+ SvSETMAGIC(sv); -+ va_end(args); -+} -+ -+#endif -+#endif -+ -+#ifdef PERL_IMPLICIT_CONTEXT -+#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg_nocontext) -+#if defined(NEED_sv_catpvf_mg_nocontext) -+static void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...); -+static -+#else -+extern void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...); -+#endif -+ -+#define sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext) -+#define Perl_sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext) -+ -+#if defined(NEED_sv_catpvf_mg_nocontext) || defined(NEED_sv_catpvf_mg_nocontext_GLOBAL) -+ -+void -+DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...) -+{ -+ dTHX; -+ va_list args; -+ va_start(args, pat); -+ sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); -+ SvSETMAGIC(sv); -+ va_end(args); -+} -+ -+#endif -+#endif -+#endif -+ -+/* sv_catpvf_mg depends on sv_catpvf_mg_nocontext */ -+#ifndef sv_catpvf_mg -+# ifdef PERL_IMPLICIT_CONTEXT -+# define sv_catpvf_mg Perl_sv_catpvf_mg_nocontext -+# else -+# define sv_catpvf_mg Perl_sv_catpvf_mg -+# endif -+#endif -+ -+#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf_mg) -+# define sv_vcatpvf_mg(sv, pat, args) \ -+ STMT_START { \ -+ sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ -+ SvSETMAGIC(sv); \ -+ } STMT_END -+#endif -+ -+#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg) -+#if defined(NEED_sv_setpvf_mg) -+static void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...); -+static -+#else -+extern void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...); -+#endif -+ -+#define Perl_sv_setpvf_mg DPPP_(my_sv_setpvf_mg) -+ -+#if defined(NEED_sv_setpvf_mg) || defined(NEED_sv_setpvf_mg_GLOBAL) -+ -+void -+DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...) -+{ -+ va_list args; -+ va_start(args, pat); -+ sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); -+ SvSETMAGIC(sv); -+ va_end(args); -+} -+ -+#endif -+#endif -+ -+#ifdef PERL_IMPLICIT_CONTEXT -+#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg_nocontext) -+#if defined(NEED_sv_setpvf_mg_nocontext) -+static void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...); -+static -+#else -+extern void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...); -+#endif -+ -+#define sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext) -+#define Perl_sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext) -+ -+#if defined(NEED_sv_setpvf_mg_nocontext) || defined(NEED_sv_setpvf_mg_nocontext_GLOBAL) -+ -+void -+DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...) -+{ -+ dTHX; -+ va_list args; -+ va_start(args, pat); -+ sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); -+ SvSETMAGIC(sv); -+ va_end(args); -+} -+ -+#endif -+#endif -+#endif -+ -+/* sv_setpvf_mg depends on sv_setpvf_mg_nocontext */ -+#ifndef sv_setpvf_mg -+# ifdef PERL_IMPLICIT_CONTEXT -+# define sv_setpvf_mg Perl_sv_setpvf_mg_nocontext -+# else -+# define sv_setpvf_mg Perl_sv_setpvf_mg -+# endif -+#endif -+ -+#if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf_mg) -+# define sv_vsetpvf_mg(sv, pat, args) \ -+ STMT_START { \ -+ sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ -+ SvSETMAGIC(sv); \ -+ } STMT_END -+#endif -+ -+/* Hint: newSVpvn_share -+ * The SVs created by this function only mimic the behaviour of -+ * shared PVs without really being shared. Only use if you know -+ * what you're doing. -+ */ -+ -+#ifndef newSVpvn_share -+ -+#if defined(NEED_newSVpvn_share) -+static SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash); -+static -+#else -+extern SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash); -+#endif -+ -+#ifdef newSVpvn_share -+# undef newSVpvn_share -+#endif -+#define newSVpvn_share(a,b,c) DPPP_(my_newSVpvn_share)(aTHX_ a,b,c) -+#define Perl_newSVpvn_share DPPP_(my_newSVpvn_share) -+ -+#if defined(NEED_newSVpvn_share) || defined(NEED_newSVpvn_share_GLOBAL) -+ -+SV * -+DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash) -+{ -+ SV *sv; -+ if (len < 0) -+ len = -len; -+ if (!hash) -+ PERL_HASH(hash, (char*) src, len); -+ sv = newSVpvn((char *) src, len); -+ sv_upgrade(sv, SVt_PVIV); -+ SvIVX(sv) = hash; -+ SvREADONLY_on(sv); -+ SvPOK_on(sv); -+ return sv; -+} -+ -+#endif -+ -+#endif -+#ifndef SvSHARED_HASH -+# define SvSHARED_HASH(sv) (0 + SvUVX(sv)) -+#endif -+#ifndef HvNAME_get -+# define HvNAME_get(hv) HvNAME(hv) -+#endif -+#ifndef HvNAMELEN_get -+# define HvNAMELEN_get(hv) (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0) -+#endif -+#ifndef GvSVn -+# define GvSVn(gv) GvSV(gv) -+#endif -+ -+#ifndef isGV_with_GP -+# define isGV_with_GP(gv) isGV(gv) -+#endif -+ -+#ifndef gv_fetchpvn_flags -+# define gv_fetchpvn_flags(name, len, flags, svt) gv_fetchpv(name, flags, svt) -+#endif -+ -+#ifndef gv_fetchsv -+# define gv_fetchsv(name, flags, svt) gv_fetchpv(SvPV_nolen_const(name), flags, svt) -+#endif -+#ifndef get_cvn_flags -+# define get_cvn_flags(name, namelen, flags) get_cv(name, flags) -+#endif -+#ifndef WARN_ALL -+# define WARN_ALL 0 -+#endif -+ -+#ifndef WARN_CLOSURE -+# define WARN_CLOSURE 1 -+#endif -+ -+#ifndef WARN_DEPRECATED -+# define WARN_DEPRECATED 2 -+#endif -+ -+#ifndef WARN_EXITING -+# define WARN_EXITING 3 -+#endif -+ -+#ifndef WARN_GLOB -+# define WARN_GLOB 4 -+#endif -+ -+#ifndef WARN_IO -+# define WARN_IO 5 -+#endif -+ -+#ifndef WARN_CLOSED -+# define WARN_CLOSED 6 -+#endif -+ -+#ifndef WARN_EXEC -+# define WARN_EXEC 7 -+#endif -+ -+#ifndef WARN_LAYER -+# define WARN_LAYER 8 -+#endif -+ -+#ifndef WARN_NEWLINE -+# define WARN_NEWLINE 9 -+#endif -+ -+#ifndef WARN_PIPE -+# define WARN_PIPE 10 -+#endif -+ -+#ifndef WARN_UNOPENED -+# define WARN_UNOPENED 11 -+#endif -+ -+#ifndef WARN_MISC -+# define WARN_MISC 12 -+#endif -+ -+#ifndef WARN_NUMERIC -+# define WARN_NUMERIC 13 -+#endif -+ -+#ifndef WARN_ONCE -+# define WARN_ONCE 14 -+#endif -+ -+#ifndef WARN_OVERFLOW -+# define WARN_OVERFLOW 15 -+#endif -+ -+#ifndef WARN_PACK -+# define WARN_PACK 16 -+#endif -+ -+#ifndef WARN_PORTABLE -+# define WARN_PORTABLE 17 -+#endif -+ -+#ifndef WARN_RECURSION -+# define WARN_RECURSION 18 -+#endif -+ -+#ifndef WARN_REDEFINE -+# define WARN_REDEFINE 19 -+#endif -+ -+#ifndef WARN_REGEXP -+# define WARN_REGEXP 20 -+#endif -+ -+#ifndef WARN_SEVERE -+# define WARN_SEVERE 21 -+#endif -+ -+#ifndef WARN_DEBUGGING -+# define WARN_DEBUGGING 22 -+#endif -+ -+#ifndef WARN_INPLACE -+# define WARN_INPLACE 23 -+#endif -+ -+#ifndef WARN_INTERNAL -+# define WARN_INTERNAL 24 -+#endif -+ -+#ifndef WARN_MALLOC -+# define WARN_MALLOC 25 -+#endif -+ -+#ifndef WARN_SIGNAL -+# define WARN_SIGNAL 26 -+#endif -+ -+#ifndef WARN_SUBSTR -+# define WARN_SUBSTR 27 -+#endif -+ -+#ifndef WARN_SYNTAX -+# define WARN_SYNTAX 28 -+#endif -+ -+#ifndef WARN_AMBIGUOUS -+# define WARN_AMBIGUOUS 29 -+#endif -+ -+#ifndef WARN_BAREWORD -+# define WARN_BAREWORD 30 -+#endif -+ -+#ifndef WARN_DIGIT -+# define WARN_DIGIT 31 -+#endif -+ -+#ifndef WARN_PARENTHESIS -+# define WARN_PARENTHESIS 32 -+#endif -+ -+#ifndef WARN_PRECEDENCE -+# define WARN_PRECEDENCE 33 -+#endif -+ -+#ifndef WARN_PRINTF -+# define WARN_PRINTF 34 -+#endif -+ -+#ifndef WARN_PROTOTYPE -+# define WARN_PROTOTYPE 35 -+#endif -+ -+#ifndef WARN_QW -+# define WARN_QW 36 -+#endif -+ -+#ifndef WARN_RESERVED -+# define WARN_RESERVED 37 -+#endif -+ -+#ifndef WARN_SEMICOLON -+# define WARN_SEMICOLON 38 -+#endif -+ -+#ifndef WARN_TAINT -+# define WARN_TAINT 39 -+#endif -+ -+#ifndef WARN_THREADS -+# define WARN_THREADS 40 -+#endif -+ -+#ifndef WARN_UNINITIALIZED -+# define WARN_UNINITIALIZED 41 -+#endif -+ -+#ifndef WARN_UNPACK -+# define WARN_UNPACK 42 -+#endif -+ -+#ifndef WARN_UNTIE -+# define WARN_UNTIE 43 -+#endif -+ -+#ifndef WARN_UTF8 -+# define WARN_UTF8 44 -+#endif -+ -+#ifndef WARN_VOID -+# define WARN_VOID 45 -+#endif -+ -+#ifndef WARN_ASSERTIONS -+# define WARN_ASSERTIONS 46 -+#endif -+#ifndef packWARN -+# define packWARN(a) (a) -+#endif -+ -+#ifndef ckWARN -+# ifdef G_WARN_ON -+# define ckWARN(a) (PL_dowarn & G_WARN_ON) -+# else -+# define ckWARN(a) PL_dowarn -+# endif -+#endif -+ -+#if (PERL_BCDVERSION >= 0x5004000) && !defined(warner) -+#if defined(NEED_warner) -+static void DPPP_(my_warner)(U32 err, const char *pat, ...); -+static -+#else -+extern void DPPP_(my_warner)(U32 err, const char *pat, ...); -+#endif -+ -+#define Perl_warner DPPP_(my_warner) -+ -+#if defined(NEED_warner) || defined(NEED_warner_GLOBAL) -+ -+void -+DPPP_(my_warner)(U32 err, const char *pat, ...) -+{ -+ SV *sv; -+ va_list args; -+ -+ PERL_UNUSED_ARG(err); -+ -+ va_start(args, pat); -+ sv = vnewSVpvf(pat, &args); -+ va_end(args); -+ sv_2mortal(sv); -+ warn("%s", SvPV_nolen(sv)); -+} -+ -+#define warner Perl_warner -+ -+#define Perl_warner_nocontext Perl_warner -+ -+#endif -+#endif -+ -+/* concatenating with "" ensures that only literal strings are accepted as argument -+ * note that STR_WITH_LEN() can't be used as argument to macros or functions that -+ * under some configurations might be macros -+ */ -+#ifndef STR_WITH_LEN -+# define STR_WITH_LEN(s) (s ""), (sizeof(s)-1) -+#endif -+#ifndef newSVpvs -+# define newSVpvs(str) newSVpvn(str "", sizeof(str) - 1) -+#endif -+ -+#ifndef newSVpvs_flags -+# define newSVpvs_flags(str, flags) newSVpvn_flags(str "", sizeof(str) - 1, flags) -+#endif -+ -+#ifndef newSVpvs_share -+# define newSVpvs_share(str) newSVpvn_share(str "", sizeof(str) - 1, 0) -+#endif -+ -+#ifndef sv_catpvs -+# define sv_catpvs(sv, str) sv_catpvn(sv, str "", sizeof(str) - 1) -+#endif -+ -+#ifndef sv_setpvs -+# define sv_setpvs(sv, str) sv_setpvn(sv, str "", sizeof(str) - 1) -+#endif -+ -+#ifndef hv_fetchs -+# define hv_fetchs(hv, key, lval) hv_fetch(hv, key "", sizeof(key) - 1, lval) -+#endif -+ -+#ifndef hv_stores -+# define hv_stores(hv, key, val) hv_store(hv, key "", sizeof(key) - 1, val, 0) -+#endif -+#ifndef gv_fetchpvs -+# define gv_fetchpvs(name, flags, svt) gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt) -+#endif -+ -+#ifndef gv_stashpvs -+# define gv_stashpvs(name, flags) gv_stashpvn(name "", sizeof(name) - 1, flags) -+#endif -+#ifndef get_cvs -+# define get_cvs(name, flags) get_cvn_flags(name "", sizeof(name)-1, flags) -+#endif -+#ifndef SvGETMAGIC -+# define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END -+#endif -+#ifndef PERL_MAGIC_sv -+# define PERL_MAGIC_sv '\0' -+#endif -+ -+#ifndef PERL_MAGIC_overload -+# define PERL_MAGIC_overload 'A' -+#endif -+ -+#ifndef PERL_MAGIC_overload_elem -+# define PERL_MAGIC_overload_elem 'a' -+#endif -+ -+#ifndef PERL_MAGIC_overload_table -+# define PERL_MAGIC_overload_table 'c' -+#endif -+ -+#ifndef PERL_MAGIC_bm -+# define PERL_MAGIC_bm 'B' -+#endif -+ -+#ifndef PERL_MAGIC_regdata -+# define PERL_MAGIC_regdata 'D' -+#endif -+ -+#ifndef PERL_MAGIC_regdatum -+# define PERL_MAGIC_regdatum 'd' -+#endif -+ -+#ifndef PERL_MAGIC_env -+# define PERL_MAGIC_env 'E' -+#endif -+ -+#ifndef PERL_MAGIC_envelem -+# define PERL_MAGIC_envelem 'e' -+#endif -+ -+#ifndef PERL_MAGIC_fm -+# define PERL_MAGIC_fm 'f' -+#endif -+ -+#ifndef PERL_MAGIC_regex_global -+# define PERL_MAGIC_regex_global 'g' -+#endif -+ -+#ifndef PERL_MAGIC_isa -+# define PERL_MAGIC_isa 'I' -+#endif -+ -+#ifndef PERL_MAGIC_isaelem -+# define PERL_MAGIC_isaelem 'i' -+#endif -+ -+#ifndef PERL_MAGIC_nkeys -+# define PERL_MAGIC_nkeys 'k' -+#endif -+ -+#ifndef PERL_MAGIC_dbfile -+# define PERL_MAGIC_dbfile 'L' -+#endif -+ -+#ifndef PERL_MAGIC_dbline -+# define PERL_MAGIC_dbline 'l' -+#endif -+ -+#ifndef PERL_MAGIC_mutex -+# define PERL_MAGIC_mutex 'm' -+#endif -+ -+#ifndef PERL_MAGIC_shared -+# define PERL_MAGIC_shared 'N' -+#endif -+ -+#ifndef PERL_MAGIC_shared_scalar -+# define PERL_MAGIC_shared_scalar 'n' -+#endif -+ -+#ifndef PERL_MAGIC_collxfrm -+# define PERL_MAGIC_collxfrm 'o' -+#endif -+ -+#ifndef PERL_MAGIC_tied -+# define PERL_MAGIC_tied 'P' -+#endif -+ -+#ifndef PERL_MAGIC_tiedelem -+# define PERL_MAGIC_tiedelem 'p' -+#endif -+ -+#ifndef PERL_MAGIC_tiedscalar -+# define PERL_MAGIC_tiedscalar 'q' -+#endif -+ -+#ifndef PERL_MAGIC_qr -+# define PERL_MAGIC_qr 'r' -+#endif -+ -+#ifndef PERL_MAGIC_sig -+# define PERL_MAGIC_sig 'S' -+#endif -+ -+#ifndef PERL_MAGIC_sigelem -+# define PERL_MAGIC_sigelem 's' -+#endif -+ -+#ifndef PERL_MAGIC_taint -+# define PERL_MAGIC_taint 't' -+#endif -+ -+#ifndef PERL_MAGIC_uvar -+# define PERL_MAGIC_uvar 'U' -+#endif -+ -+#ifndef PERL_MAGIC_uvar_elem -+# define PERL_MAGIC_uvar_elem 'u' -+#endif -+ -+#ifndef PERL_MAGIC_vstring -+# define PERL_MAGIC_vstring 'V' -+#endif -+ -+#ifndef PERL_MAGIC_vec -+# define PERL_MAGIC_vec 'v' -+#endif -+ -+#ifndef PERL_MAGIC_utf8 -+# define PERL_MAGIC_utf8 'w' -+#endif -+ -+#ifndef PERL_MAGIC_substr -+# define PERL_MAGIC_substr 'x' -+#endif -+ -+#ifndef PERL_MAGIC_defelem -+# define PERL_MAGIC_defelem 'y' -+#endif -+ -+#ifndef PERL_MAGIC_glob -+# define PERL_MAGIC_glob '*' -+#endif -+ -+#ifndef PERL_MAGIC_arylen -+# define PERL_MAGIC_arylen '#' -+#endif -+ -+#ifndef PERL_MAGIC_pos -+# define PERL_MAGIC_pos '.' -+#endif -+ -+#ifndef PERL_MAGIC_backref -+# define PERL_MAGIC_backref '<' -+#endif -+ -+#ifndef PERL_MAGIC_ext -+# define PERL_MAGIC_ext '~' -+#endif -+ -+/* That's the best we can do... */ -+#ifndef sv_catpvn_nomg -+# define sv_catpvn_nomg sv_catpvn -+#endif -+ -+#ifndef sv_catsv_nomg -+# define sv_catsv_nomg sv_catsv -+#endif -+ -+#ifndef sv_setsv_nomg -+# define sv_setsv_nomg sv_setsv -+#endif -+ -+#ifndef sv_pvn_nomg -+# define sv_pvn_nomg sv_pvn -+#endif -+ -+#ifndef SvIV_nomg -+# define SvIV_nomg SvIV -+#endif -+ -+#ifndef SvUV_nomg -+# define SvUV_nomg SvUV -+#endif -+ -+#ifndef sv_catpv_mg -+# define sv_catpv_mg(sv, ptr) \ -+ STMT_START { \ -+ SV *TeMpSv = sv; \ -+ sv_catpv(TeMpSv,ptr); \ -+ SvSETMAGIC(TeMpSv); \ -+ } STMT_END -+#endif -+ -+#ifndef sv_catpvn_mg -+# define sv_catpvn_mg(sv, ptr, len) \ -+ STMT_START { \ -+ SV *TeMpSv = sv; \ -+ sv_catpvn(TeMpSv,ptr,len); \ -+ SvSETMAGIC(TeMpSv); \ -+ } STMT_END -+#endif -+ -+#ifndef sv_catsv_mg -+# define sv_catsv_mg(dsv, ssv) \ -+ STMT_START { \ -+ SV *TeMpSv = dsv; \ -+ sv_catsv(TeMpSv,ssv); \ -+ SvSETMAGIC(TeMpSv); \ -+ } STMT_END -+#endif -+ -+#ifndef sv_setiv_mg -+# define sv_setiv_mg(sv, i) \ -+ STMT_START { \ -+ SV *TeMpSv = sv; \ -+ sv_setiv(TeMpSv,i); \ -+ SvSETMAGIC(TeMpSv); \ -+ } STMT_END -+#endif -+ -+#ifndef sv_setnv_mg -+# define sv_setnv_mg(sv, num) \ -+ STMT_START { \ -+ SV *TeMpSv = sv; \ -+ sv_setnv(TeMpSv,num); \ -+ SvSETMAGIC(TeMpSv); \ -+ } STMT_END -+#endif -+ -+#ifndef sv_setpv_mg -+# define sv_setpv_mg(sv, ptr) \ -+ STMT_START { \ -+ SV *TeMpSv = sv; \ -+ sv_setpv(TeMpSv,ptr); \ -+ SvSETMAGIC(TeMpSv); \ -+ } STMT_END -+#endif -+ -+#ifndef sv_setpvn_mg -+# define sv_setpvn_mg(sv, ptr, len) \ -+ STMT_START { \ -+ SV *TeMpSv = sv; \ -+ sv_setpvn(TeMpSv,ptr,len); \ -+ SvSETMAGIC(TeMpSv); \ -+ } STMT_END -+#endif -+ -+#ifndef sv_setsv_mg -+# define sv_setsv_mg(dsv, ssv) \ -+ STMT_START { \ -+ SV *TeMpSv = dsv; \ -+ sv_setsv(TeMpSv,ssv); \ -+ SvSETMAGIC(TeMpSv); \ -+ } STMT_END -+#endif -+ -+#ifndef sv_setuv_mg -+# define sv_setuv_mg(sv, i) \ -+ STMT_START { \ -+ SV *TeMpSv = sv; \ -+ sv_setuv(TeMpSv,i); \ -+ SvSETMAGIC(TeMpSv); \ -+ } STMT_END -+#endif -+ -+#ifndef sv_usepvn_mg -+# define sv_usepvn_mg(sv, ptr, len) \ -+ STMT_START { \ -+ SV *TeMpSv = sv; \ -+ sv_usepvn(TeMpSv,ptr,len); \ -+ SvSETMAGIC(TeMpSv); \ -+ } STMT_END -+#endif -+#ifndef SvVSTRING_mg -+# define SvVSTRING_mg(sv) (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring) : NULL) -+#endif -+ -+/* Hint: sv_magic_portable -+ * This is a compatibility function that is only available with -+ * Devel::PPPort. It is NOT in the perl core. -+ * Its purpose is to mimic the 5.8.0 behaviour of sv_magic() when -+ * it is being passed a name pointer with namlen == 0. In that -+ * case, perl 5.8.0 and later store the pointer, not a copy of it. -+ * The compatibility can be provided back to perl 5.004. With -+ * earlier versions, the code will not compile. -+ */ -+ -+#if (PERL_BCDVERSION < 0x5004000) -+ -+ /* code that uses sv_magic_portable will not compile */ -+ -+#elif (PERL_BCDVERSION < 0x5008000) -+ -+# define sv_magic_portable(sv, obj, how, name, namlen) \ -+ STMT_START { \ -+ SV *SvMp_sv = (sv); \ -+ char *SvMp_name = (char *) (name); \ -+ I32 SvMp_namlen = (namlen); \ -+ if (SvMp_name && SvMp_namlen == 0) \ -+ { \ -+ MAGIC *mg; \ -+ sv_magic(SvMp_sv, obj, how, 0, 0); \ -+ mg = SvMAGIC(SvMp_sv); \ -+ mg->mg_len = -42; /* XXX: this is the tricky part */ \ -+ mg->mg_ptr = SvMp_name; \ -+ } \ -+ else \ -+ { \ -+ sv_magic(SvMp_sv, obj, how, SvMp_name, SvMp_namlen); \ -+ } \ -+ } STMT_END -+ -+#else -+ -+# define sv_magic_portable(a, b, c, d, e) sv_magic(a, b, c, d, e) -+ -+#endif -+ -+#ifdef USE_ITHREADS -+#ifndef CopFILE -+# define CopFILE(c) ((c)->cop_file) -+#endif -+ -+#ifndef CopFILEGV -+# define CopFILEGV(c) (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv) -+#endif -+ -+#ifndef CopFILE_set -+# define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv)) -+#endif -+ -+#ifndef CopFILESV -+# define CopFILESV(c) (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv) -+#endif -+ -+#ifndef CopFILEAV -+# define CopFILEAV(c) (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav) -+#endif -+ -+#ifndef CopSTASHPV -+# define CopSTASHPV(c) ((c)->cop_stashpv) -+#endif -+ -+#ifndef CopSTASHPV_set -+# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch)) -+#endif -+ -+#ifndef CopSTASH -+# define CopSTASH(c) (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv) -+#endif -+ -+#ifndef CopSTASH_set -+# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch) -+#endif -+ -+#ifndef CopSTASH_eq -+# define CopSTASH_eq(c,hv) ((hv) && (CopSTASHPV(c) == HvNAME(hv) \ -+ || (CopSTASHPV(c) && HvNAME(hv) \ -+ && strEQ(CopSTASHPV(c), HvNAME(hv))))) -+#endif -+ -+#else -+#ifndef CopFILEGV -+# define CopFILEGV(c) ((c)->cop_filegv) -+#endif -+ -+#ifndef CopFILEGV_set -+# define CopFILEGV_set(c,gv) ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv)) -+#endif -+ -+#ifndef CopFILE_set -+# define CopFILE_set(c,pv) CopFILEGV_set((c), gv_fetchfile(pv)) -+#endif -+ -+#ifndef CopFILESV -+# define CopFILESV(c) (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv) -+#endif -+ -+#ifndef CopFILEAV -+# define CopFILEAV(c) (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav) -+#endif -+ -+#ifndef CopFILE -+# define CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch) -+#endif -+ -+#ifndef CopSTASH -+# define CopSTASH(c) ((c)->cop_stash) -+#endif -+ -+#ifndef CopSTASH_set -+# define CopSTASH_set(c,hv) ((c)->cop_stash = (hv)) -+#endif -+ -+#ifndef CopSTASHPV -+# define CopSTASHPV(c) (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch) -+#endif -+ -+#ifndef CopSTASHPV_set -+# define CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD)) -+#endif -+ -+#ifndef CopSTASH_eq -+# define CopSTASH_eq(c,hv) (CopSTASH(c) == (hv)) -+#endif -+ -+#endif /* USE_ITHREADS */ -+#ifndef IN_PERL_COMPILETIME -+# define IN_PERL_COMPILETIME (PL_curcop == &PL_compiling) -+#endif -+ -+#ifndef IN_LOCALE_RUNTIME -+# define IN_LOCALE_RUNTIME (PL_curcop->op_private & HINT_LOCALE) -+#endif -+ -+#ifndef IN_LOCALE_COMPILETIME -+# define IN_LOCALE_COMPILETIME (PL_hints & HINT_LOCALE) -+#endif -+ -+#ifndef IN_LOCALE -+# define IN_LOCALE (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME) -+#endif -+#ifndef IS_NUMBER_IN_UV -+# define IS_NUMBER_IN_UV 0x01 -+#endif -+ -+#ifndef IS_NUMBER_GREATER_THAN_UV_MAX -+# define IS_NUMBER_GREATER_THAN_UV_MAX 0x02 -+#endif -+ -+#ifndef IS_NUMBER_NOT_INT -+# define IS_NUMBER_NOT_INT 0x04 -+#endif -+ -+#ifndef IS_NUMBER_NEG -+# define IS_NUMBER_NEG 0x08 -+#endif -+ -+#ifndef IS_NUMBER_INFINITY -+# define IS_NUMBER_INFINITY 0x10 -+#endif -+ -+#ifndef IS_NUMBER_NAN -+# define IS_NUMBER_NAN 0x20 -+#endif -+#ifndef GROK_NUMERIC_RADIX -+# define GROK_NUMERIC_RADIX(sp, send) grok_numeric_radix(sp, send) -+#endif -+#ifndef PERL_SCAN_GREATER_THAN_UV_MAX -+# define PERL_SCAN_GREATER_THAN_UV_MAX 0x02 -+#endif -+ -+#ifndef PERL_SCAN_SILENT_ILLDIGIT -+# define PERL_SCAN_SILENT_ILLDIGIT 0x04 -+#endif -+ -+#ifndef PERL_SCAN_ALLOW_UNDERSCORES -+# define PERL_SCAN_ALLOW_UNDERSCORES 0x01 -+#endif -+ -+#ifndef PERL_SCAN_DISALLOW_PREFIX -+# define PERL_SCAN_DISALLOW_PREFIX 0x02 -+#endif -+ -+#ifndef grok_numeric_radix -+#if defined(NEED_grok_numeric_radix) -+static bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send); -+static -+#else -+extern bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send); -+#endif -+ -+#ifdef grok_numeric_radix -+# undef grok_numeric_radix -+#endif -+#define grok_numeric_radix(a,b) DPPP_(my_grok_numeric_radix)(aTHX_ a,b) -+#define Perl_grok_numeric_radix DPPP_(my_grok_numeric_radix) -+ -+#if defined(NEED_grok_numeric_radix) || defined(NEED_grok_numeric_radix_GLOBAL) -+bool -+DPPP_(my_grok_numeric_radix)(pTHX_ const char **sp, const char *send) -+{ -+#ifdef USE_LOCALE_NUMERIC -+#ifdef PL_numeric_radix_sv -+ if (PL_numeric_radix_sv && IN_LOCALE) { -+ STRLEN len; -+ char* radix = SvPV(PL_numeric_radix_sv, len); -+ if (*sp + len <= send && memEQ(*sp, radix, len)) { -+ *sp += len; -+ return TRUE; -+ } -+ } -+#else -+ /* older perls don't have PL_numeric_radix_sv so the radix -+ * must manually be requested from locale.h -+ */ -+#include -+ dTHR; /* needed for older threaded perls */ -+ struct lconv *lc = localeconv(); -+ char *radix = lc->decimal_point; -+ if (radix && IN_LOCALE) { -+ STRLEN len = strlen(radix); -+ if (*sp + len <= send && memEQ(*sp, radix, len)) { -+ *sp += len; -+ return TRUE; -+ } -+ } -+#endif -+#endif /* USE_LOCALE_NUMERIC */ -+ /* always try "." if numeric radix didn't match because -+ * we may have data from different locales mixed */ -+ if (*sp < send && **sp == '.') { -+ ++*sp; -+ return TRUE; -+ } -+ return FALSE; -+} -+#endif -+#endif -+ -+#ifndef grok_number -+#if defined(NEED_grok_number) -+static int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep); -+static -+#else -+extern int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep); -+#endif -+ -+#ifdef grok_number -+# undef grok_number -+#endif -+#define grok_number(a,b,c) DPPP_(my_grok_number)(aTHX_ a,b,c) -+#define Perl_grok_number DPPP_(my_grok_number) -+ -+#if defined(NEED_grok_number) || defined(NEED_grok_number_GLOBAL) -+int -+DPPP_(my_grok_number)(pTHX_ const char *pv, STRLEN len, UV *valuep) -+{ -+ const char *s = pv; -+ const char *send = pv + len; -+ const UV max_div_10 = UV_MAX / 10; -+ const char max_mod_10 = UV_MAX % 10; -+ int numtype = 0; -+ int sawinf = 0; -+ int sawnan = 0; -+ -+ while (s < send && isSPACE(*s)) -+ s++; -+ if (s == send) { -+ return 0; -+ } else if (*s == '-') { -+ s++; -+ numtype = IS_NUMBER_NEG; -+ } -+ else if (*s == '+') -+ s++; -+ -+ if (s == send) -+ return 0; -+ -+ /* next must be digit or the radix separator or beginning of infinity */ -+ if (isDIGIT(*s)) { -+ /* UVs are at least 32 bits, so the first 9 decimal digits cannot -+ overflow. */ -+ UV value = *s - '0'; -+ /* This construction seems to be more optimiser friendly. -+ (without it gcc does the isDIGIT test and the *s - '0' separately) -+ With it gcc on arm is managing 6 instructions (6 cycles) per digit. -+ In theory the optimiser could deduce how far to unroll the loop -+ before checking for overflow. */ -+ if (++s < send) { -+ int digit = *s - '0'; -+ if (digit >= 0 && digit <= 9) { -+ value = value * 10 + digit; -+ if (++s < send) { -+ digit = *s - '0'; -+ if (digit >= 0 && digit <= 9) { -+ value = value * 10 + digit; -+ if (++s < send) { -+ digit = *s - '0'; -+ if (digit >= 0 && digit <= 9) { -+ value = value * 10 + digit; -+ if (++s < send) { -+ digit = *s - '0'; -+ if (digit >= 0 && digit <= 9) { -+ value = value * 10 + digit; -+ if (++s < send) { -+ digit = *s - '0'; -+ if (digit >= 0 && digit <= 9) { -+ value = value * 10 + digit; -+ if (++s < send) { -+ digit = *s - '0'; -+ if (digit >= 0 && digit <= 9) { -+ value = value * 10 + digit; -+ if (++s < send) { -+ digit = *s - '0'; -+ if (digit >= 0 && digit <= 9) { -+ value = value * 10 + digit; -+ if (++s < send) { -+ digit = *s - '0'; -+ if (digit >= 0 && digit <= 9) { -+ value = value * 10 + digit; -+ if (++s < send) { -+ /* Now got 9 digits, so need to check -+ each time for overflow. */ -+ digit = *s - '0'; -+ while (digit >= 0 && digit <= 9 -+ && (value < max_div_10 -+ || (value == max_div_10 -+ && digit <= max_mod_10))) { -+ value = value * 10 + digit; -+ if (++s < send) -+ digit = *s - '0'; -+ else -+ break; -+ } -+ if (digit >= 0 && digit <= 9 -+ && (s < send)) { -+ /* value overflowed. -+ skip the remaining digits, don't -+ worry about setting *valuep. */ -+ do { -+ s++; -+ } while (s < send && isDIGIT(*s)); -+ numtype |= -+ IS_NUMBER_GREATER_THAN_UV_MAX; -+ goto skip_value; -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ } -+ numtype |= IS_NUMBER_IN_UV; -+ if (valuep) -+ *valuep = value; -+ -+ skip_value: -+ if (GROK_NUMERIC_RADIX(&s, send)) { -+ numtype |= IS_NUMBER_NOT_INT; -+ while (s < send && isDIGIT(*s)) /* optional digits after the radix */ -+ s++; -+ } -+ } -+ else if (GROK_NUMERIC_RADIX(&s, send)) { -+ numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */ -+ /* no digits before the radix means we need digits after it */ -+ if (s < send && isDIGIT(*s)) { -+ do { -+ s++; -+ } while (s < send && isDIGIT(*s)); -+ if (valuep) { -+ /* integer approximation is valid - it's 0. */ -+ *valuep = 0; -+ } -+ } -+ else -+ return 0; -+ } else if (*s == 'I' || *s == 'i') { -+ s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; -+ s++; if (s == send || (*s != 'F' && *s != 'f')) return 0; -+ s++; if (s < send && (*s == 'I' || *s == 'i')) { -+ s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; -+ s++; if (s == send || (*s != 'I' && *s != 'i')) return 0; -+ s++; if (s == send || (*s != 'T' && *s != 't')) return 0; -+ s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0; -+ s++; -+ } -+ sawinf = 1; -+ } else if (*s == 'N' || *s == 'n') { -+ /* XXX TODO: There are signaling NaNs and quiet NaNs. */ -+ s++; if (s == send || (*s != 'A' && *s != 'a')) return 0; -+ s++; if (s == send || (*s != 'N' && *s != 'n')) return 0; -+ s++; -+ sawnan = 1; -+ } else -+ return 0; -+ -+ if (sawinf) { -+ numtype &= IS_NUMBER_NEG; /* Keep track of sign */ -+ numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT; -+ } else if (sawnan) { -+ numtype &= IS_NUMBER_NEG; /* Keep track of sign */ -+ numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT; -+ } else if (s < send) { -+ /* we can have an optional exponent part */ -+ if (*s == 'e' || *s == 'E') { -+ /* The only flag we keep is sign. Blow away any "it's UV" */ -+ numtype &= IS_NUMBER_NEG; -+ numtype |= IS_NUMBER_NOT_INT; -+ s++; -+ if (s < send && (*s == '-' || *s == '+')) -+ s++; -+ if (s < send && isDIGIT(*s)) { -+ do { -+ s++; -+ } while (s < send && isDIGIT(*s)); -+ } -+ else -+ return 0; -+ } -+ } -+ while (s < send && isSPACE(*s)) -+ s++; -+ if (s >= send) -+ return numtype; -+ if (len == 10 && memEQ(pv, "0 but true", 10)) { -+ if (valuep) -+ *valuep = 0; -+ return IS_NUMBER_IN_UV; -+ } -+ return 0; -+} -+#endif -+#endif -+ -+/* -+ * The grok_* routines have been modified to use warn() instead of -+ * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit, -+ * which is why the stack variable has been renamed to 'xdigit'. -+ */ -+ -+#ifndef grok_bin -+#if defined(NEED_grok_bin) -+static UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); -+static -+#else -+extern UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); -+#endif -+ -+#ifdef grok_bin -+# undef grok_bin -+#endif -+#define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d) -+#define Perl_grok_bin DPPP_(my_grok_bin) -+ -+#if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL) -+UV -+DPPP_(my_grok_bin)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) -+{ -+ const char *s = start; -+ STRLEN len = *len_p; -+ UV value = 0; -+ NV value_nv = 0; -+ -+ const UV max_div_2 = UV_MAX / 2; -+ bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; -+ bool overflowed = FALSE; -+ -+ if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) { -+ /* strip off leading b or 0b. -+ for compatibility silently suffer "b" and "0b" as valid binary -+ numbers. */ -+ if (len >= 1) { -+ if (s[0] == 'b') { -+ s++; -+ len--; -+ } -+ else if (len >= 2 && s[0] == '0' && s[1] == 'b') { -+ s+=2; -+ len-=2; -+ } -+ } -+ } -+ -+ for (; len-- && *s; s++) { -+ char bit = *s; -+ if (bit == '0' || bit == '1') { -+ /* Write it in this wonky order with a goto to attempt to get the -+ compiler to make the common case integer-only loop pretty tight. -+ With gcc seems to be much straighter code than old scan_bin. */ -+ redo: -+ if (!overflowed) { -+ if (value <= max_div_2) { -+ value = (value << 1) | (bit - '0'); -+ continue; -+ } -+ /* Bah. We're just overflowed. */ -+ warn("Integer overflow in binary number"); -+ overflowed = TRUE; -+ value_nv = (NV) value; -+ } -+ value_nv *= 2.0; -+ /* If an NV has not enough bits in its mantissa to -+ * represent a UV this summing of small low-order numbers -+ * is a waste of time (because the NV cannot preserve -+ * the low-order bits anyway): we could just remember when -+ * did we overflow and in the end just multiply value_nv by the -+ * right amount. */ -+ value_nv += (NV)(bit - '0'); -+ continue; -+ } -+ if (bit == '_' && len && allow_underscores && (bit = s[1]) -+ && (bit == '0' || bit == '1')) -+ { -+ --len; -+ ++s; -+ goto redo; -+ } -+ if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) -+ warn("Illegal binary digit '%c' ignored", *s); -+ break; -+ } -+ -+ if ( ( overflowed && value_nv > 4294967295.0) -+#if UVSIZE > 4 -+ || (!overflowed && value > 0xffffffff ) -+#endif -+ ) { -+ warn("Binary number > 0b11111111111111111111111111111111 non-portable"); -+ } -+ *len_p = s - start; -+ if (!overflowed) { -+ *flags = 0; -+ return value; -+ } -+ *flags = PERL_SCAN_GREATER_THAN_UV_MAX; -+ if (result) -+ *result = value_nv; -+ return UV_MAX; -+} -+#endif -+#endif -+ -+#ifndef grok_hex -+#if defined(NEED_grok_hex) -+static UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); -+static -+#else -+extern UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); -+#endif -+ -+#ifdef grok_hex -+# undef grok_hex -+#endif -+#define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d) -+#define Perl_grok_hex DPPP_(my_grok_hex) -+ -+#if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL) -+UV -+DPPP_(my_grok_hex)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) -+{ -+ const char *s = start; -+ STRLEN len = *len_p; -+ UV value = 0; -+ NV value_nv = 0; -+ -+ const UV max_div_16 = UV_MAX / 16; -+ bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; -+ bool overflowed = FALSE; -+ const char *xdigit; -+ -+ if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) { -+ /* strip off leading x or 0x. -+ for compatibility silently suffer "x" and "0x" as valid hex numbers. -+ */ -+ if (len >= 1) { -+ if (s[0] == 'x') { -+ s++; -+ len--; -+ } -+ else if (len >= 2 && s[0] == '0' && s[1] == 'x') { -+ s+=2; -+ len-=2; -+ } -+ } -+ } -+ -+ for (; len-- && *s; s++) { -+ xdigit = strchr((char *) PL_hexdigit, *s); -+ if (xdigit) { -+ /* Write it in this wonky order with a goto to attempt to get the -+ compiler to make the common case integer-only loop pretty tight. -+ With gcc seems to be much straighter code than old scan_hex. */ -+ redo: -+ if (!overflowed) { -+ if (value <= max_div_16) { -+ value = (value << 4) | ((xdigit - PL_hexdigit) & 15); -+ continue; -+ } -+ warn("Integer overflow in hexadecimal number"); -+ overflowed = TRUE; -+ value_nv = (NV) value; -+ } -+ value_nv *= 16.0; -+ /* If an NV has not enough bits in its mantissa to -+ * represent a UV this summing of small low-order numbers -+ * is a waste of time (because the NV cannot preserve -+ * the low-order bits anyway): we could just remember when -+ * did we overflow and in the end just multiply value_nv by the -+ * right amount of 16-tuples. */ -+ value_nv += (NV)((xdigit - PL_hexdigit) & 15); -+ continue; -+ } -+ if (*s == '_' && len && allow_underscores && s[1] -+ && (xdigit = strchr((char *) PL_hexdigit, s[1]))) -+ { -+ --len; -+ ++s; -+ goto redo; -+ } -+ if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) -+ warn("Illegal hexadecimal digit '%c' ignored", *s); -+ break; -+ } -+ -+ if ( ( overflowed && value_nv > 4294967295.0) -+#if UVSIZE > 4 -+ || (!overflowed && value > 0xffffffff ) -+#endif -+ ) { -+ warn("Hexadecimal number > 0xffffffff non-portable"); -+ } -+ *len_p = s - start; -+ if (!overflowed) { -+ *flags = 0; -+ return value; -+ } -+ *flags = PERL_SCAN_GREATER_THAN_UV_MAX; -+ if (result) -+ *result = value_nv; -+ return UV_MAX; -+} -+#endif -+#endif -+ -+#ifndef grok_oct -+#if defined(NEED_grok_oct) -+static UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); -+static -+#else -+extern UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result); -+#endif -+ -+#ifdef grok_oct -+# undef grok_oct -+#endif -+#define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d) -+#define Perl_grok_oct DPPP_(my_grok_oct) -+ -+#if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL) -+UV -+DPPP_(my_grok_oct)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result) -+{ -+ const char *s = start; -+ STRLEN len = *len_p; -+ UV value = 0; -+ NV value_nv = 0; -+ -+ const UV max_div_8 = UV_MAX / 8; -+ bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES; -+ bool overflowed = FALSE; -+ -+ for (; len-- && *s; s++) { -+ /* gcc 2.95 optimiser not smart enough to figure that this subtraction -+ out front allows slicker code. */ -+ int digit = *s - '0'; -+ if (digit >= 0 && digit <= 7) { -+ /* Write it in this wonky order with a goto to attempt to get the -+ compiler to make the common case integer-only loop pretty tight. -+ */ -+ redo: -+ if (!overflowed) { -+ if (value <= max_div_8) { -+ value = (value << 3) | digit; -+ continue; -+ } -+ /* Bah. We're just overflowed. */ -+ warn("Integer overflow in octal number"); -+ overflowed = TRUE; -+ value_nv = (NV) value; -+ } -+ value_nv *= 8.0; -+ /* If an NV has not enough bits in its mantissa to -+ * represent a UV this summing of small low-order numbers -+ * is a waste of time (because the NV cannot preserve -+ * the low-order bits anyway): we could just remember when -+ * did we overflow and in the end just multiply value_nv by the -+ * right amount of 8-tuples. */ -+ value_nv += (NV)digit; -+ continue; -+ } -+ if (digit == ('_' - '0') && len && allow_underscores -+ && (digit = s[1] - '0') && (digit >= 0 && digit <= 7)) -+ { -+ --len; -+ ++s; -+ goto redo; -+ } -+ /* Allow \octal to work the DWIM way (that is, stop scanning -+ * as soon as non-octal characters are seen, complain only iff -+ * someone seems to want to use the digits eight and nine). */ -+ if (digit == 8 || digit == 9) { -+ if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT)) -+ warn("Illegal octal digit '%c' ignored", *s); -+ } -+ break; -+ } -+ -+ if ( ( overflowed && value_nv > 4294967295.0) -+#if UVSIZE > 4 -+ || (!overflowed && value > 0xffffffff ) -+#endif -+ ) { -+ warn("Octal number > 037777777777 non-portable"); -+ } -+ *len_p = s - start; -+ if (!overflowed) { -+ *flags = 0; -+ return value; -+ } -+ *flags = PERL_SCAN_GREATER_THAN_UV_MAX; -+ if (result) -+ *result = value_nv; -+ return UV_MAX; -+} -+#endif -+#endif -+ -+#if !defined(my_snprintf) -+#if defined(NEED_my_snprintf) -+static int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...); -+static -+#else -+extern int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...); -+#endif -+ -+#define my_snprintf DPPP_(my_my_snprintf) -+#define Perl_my_snprintf DPPP_(my_my_snprintf) -+ -+#if defined(NEED_my_snprintf) || defined(NEED_my_snprintf_GLOBAL) -+ -+int -+DPPP_(my_my_snprintf)(char *buffer, const Size_t len, const char *format, ...) -+{ -+ dTHX; -+ int retval; -+ va_list ap; -+ va_start(ap, format); -+#ifdef HAS_VSNPRINTF -+ retval = vsnprintf(buffer, len, format, ap); -+#else -+ retval = vsprintf(buffer, format, ap); -+#endif -+ va_end(ap); -+ if (retval < 0 || (len > 0 && (Size_t)retval >= len)) -+ Perl_croak(aTHX_ "panic: my_snprintf buffer overflow"); -+ return retval; -+} -+ -+#endif -+#endif -+ -+#if !defined(my_sprintf) -+#if defined(NEED_my_sprintf) -+static int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...); -+static -+#else -+extern int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...); -+#endif -+ -+#define my_sprintf DPPP_(my_my_sprintf) -+#define Perl_my_sprintf DPPP_(my_my_sprintf) -+ -+#if defined(NEED_my_sprintf) || defined(NEED_my_sprintf_GLOBAL) -+ -+int -+DPPP_(my_my_sprintf)(char *buffer, const char* pat, ...) -+{ -+ va_list args; -+ va_start(args, pat); -+ vsprintf(buffer, pat, args); -+ va_end(args); -+ return strlen(buffer); -+} -+ -+#endif -+#endif -+ -+#ifdef NO_XSLOCKS -+# ifdef dJMPENV -+# define dXCPT dJMPENV; int rEtV = 0 -+# define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0) -+# define XCPT_TRY_END JMPENV_POP; -+# define XCPT_CATCH if (rEtV != 0) -+# define XCPT_RETHROW JMPENV_JUMP(rEtV) -+# else -+# define dXCPT Sigjmp_buf oldTOP; int rEtV = 0 -+# define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0) -+# define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf); -+# define XCPT_CATCH if (rEtV != 0) -+# define XCPT_RETHROW Siglongjmp(top_env, rEtV) -+# endif -+#endif -+ -+#if !defined(my_strlcat) -+#if defined(NEED_my_strlcat) -+static Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size); -+static -+#else -+extern Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size); -+#endif -+ -+#define my_strlcat DPPP_(my_my_strlcat) -+#define Perl_my_strlcat DPPP_(my_my_strlcat) -+ -+#if defined(NEED_my_strlcat) || defined(NEED_my_strlcat_GLOBAL) -+ -+Size_t -+DPPP_(my_my_strlcat)(char *dst, const char *src, Size_t size) -+{ -+ Size_t used, length, copy; -+ -+ used = strlen(dst); -+ length = strlen(src); -+ if (size > 0 && used < size - 1) { -+ copy = (length >= size - used) ? size - used - 1 : length; -+ memcpy(dst + used, src, copy); -+ dst[used + copy] = '\0'; -+ } -+ return used + length; -+} -+#endif -+#endif -+ -+#if !defined(my_strlcpy) -+#if defined(NEED_my_strlcpy) -+static Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size); -+static -+#else -+extern Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size); -+#endif -+ -+#define my_strlcpy DPPP_(my_my_strlcpy) -+#define Perl_my_strlcpy DPPP_(my_my_strlcpy) -+ -+#if defined(NEED_my_strlcpy) || defined(NEED_my_strlcpy_GLOBAL) -+ -+Size_t -+DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size) -+{ -+ Size_t length, copy; -+ -+ length = strlen(src); -+ if (size > 0) { -+ copy = (length >= size) ? size - 1 : length; -+ memcpy(dst, src, copy); -+ dst[copy] = '\0'; -+ } -+ return length; -+} -+ -+#endif -+#endif -+#ifndef PERL_PV_ESCAPE_QUOTE -+# define PERL_PV_ESCAPE_QUOTE 0x0001 -+#endif -+ -+#ifndef PERL_PV_PRETTY_QUOTE -+# define PERL_PV_PRETTY_QUOTE PERL_PV_ESCAPE_QUOTE -+#endif -+ -+#ifndef PERL_PV_PRETTY_ELLIPSES -+# define PERL_PV_PRETTY_ELLIPSES 0x0002 -+#endif -+ -+#ifndef PERL_PV_PRETTY_LTGT -+# define PERL_PV_PRETTY_LTGT 0x0004 -+#endif -+ -+#ifndef PERL_PV_ESCAPE_FIRSTCHAR -+# define PERL_PV_ESCAPE_FIRSTCHAR 0x0008 -+#endif -+ -+#ifndef PERL_PV_ESCAPE_UNI -+# define PERL_PV_ESCAPE_UNI 0x0100 -+#endif -+ -+#ifndef PERL_PV_ESCAPE_UNI_DETECT -+# define PERL_PV_ESCAPE_UNI_DETECT 0x0200 -+#endif -+ -+#ifndef PERL_PV_ESCAPE_ALL -+# define PERL_PV_ESCAPE_ALL 0x1000 -+#endif -+ -+#ifndef PERL_PV_ESCAPE_NOBACKSLASH -+# define PERL_PV_ESCAPE_NOBACKSLASH 0x2000 -+#endif -+ -+#ifndef PERL_PV_ESCAPE_NOCLEAR -+# define PERL_PV_ESCAPE_NOCLEAR 0x4000 -+#endif -+ -+#ifndef PERL_PV_ESCAPE_RE -+# define PERL_PV_ESCAPE_RE 0x8000 -+#endif -+ -+#ifndef PERL_PV_PRETTY_NOCLEAR -+# define PERL_PV_PRETTY_NOCLEAR PERL_PV_ESCAPE_NOCLEAR -+#endif -+#ifndef PERL_PV_PRETTY_DUMP -+# define PERL_PV_PRETTY_DUMP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE -+#endif -+ -+#ifndef PERL_PV_PRETTY_REGPROP -+# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE -+#endif -+ -+/* Hint: pv_escape -+ * Note that unicode functionality is only backported to -+ * those perl versions that support it. For older perl -+ * versions, the implementation will fall back to bytes. -+ */ -+ -+#ifndef pv_escape -+#if defined(NEED_pv_escape) -+static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags); -+static -+#else -+extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags); -+#endif -+ -+#ifdef pv_escape -+# undef pv_escape -+#endif -+#define pv_escape(a,b,c,d,e,f) DPPP_(my_pv_escape)(aTHX_ a,b,c,d,e,f) -+#define Perl_pv_escape DPPP_(my_pv_escape) -+ -+#if defined(NEED_pv_escape) || defined(NEED_pv_escape_GLOBAL) -+ -+char * -+DPPP_(my_pv_escape)(pTHX_ SV *dsv, char const * const str, -+ const STRLEN count, const STRLEN max, -+ STRLEN * const escaped, const U32 flags) -+{ -+ const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\'; -+ const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc; -+ char octbuf[32] = "%123456789ABCDF"; -+ STRLEN wrote = 0; -+ STRLEN chsize = 0; -+ STRLEN readsize = 1; -+#if defined(is_utf8_string) && defined(utf8_to_uvchr) -+ bool isuni = flags & PERL_PV_ESCAPE_UNI ? 1 : 0; -+#endif -+ const char *pv = str; -+ const char * const end = pv + count; -+ octbuf[0] = esc; -+ -+ if (!(flags & PERL_PV_ESCAPE_NOCLEAR)) -+ sv_setpvs(dsv, ""); -+ -+#if defined(is_utf8_string) && defined(utf8_to_uvchr) -+ if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count)) -+ isuni = 1; -+#endif -+ -+ for (; pv < end && (!max || wrote < max) ; pv += readsize) { -+ const UV u = -+#if defined(is_utf8_string) && defined(utf8_to_uvchr) -+ isuni ? utf8_to_uvchr((U8*)pv, &readsize) : -+#endif -+ (U8)*pv; -+ const U8 c = (U8)u & 0xFF; -+ -+ if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) { -+ if (flags & PERL_PV_ESCAPE_FIRSTCHAR) -+ chsize = my_snprintf(octbuf, sizeof octbuf, -+ "%"UVxf, u); -+ else -+ chsize = my_snprintf(octbuf, sizeof octbuf, -+ "%cx{%"UVxf"}", esc, u); -+ } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) { -+ chsize = 1; -+ } else { -+ if (c == dq || c == esc || !isPRINT(c)) { -+ chsize = 2; -+ switch (c) { -+ case '\\' : /* fallthrough */ -+ case '%' : if (c == esc) -+ octbuf[1] = esc; -+ else -+ chsize = 1; -+ break; -+ case '\v' : octbuf[1] = 'v'; break; -+ case '\t' : octbuf[1] = 't'; break; -+ case '\r' : octbuf[1] = 'r'; break; -+ case '\n' : octbuf[1] = 'n'; break; -+ case '\f' : octbuf[1] = 'f'; break; -+ case '"' : if (dq == '"') -+ octbuf[1] = '"'; -+ else -+ chsize = 1; -+ break; -+ default: chsize = my_snprintf(octbuf, sizeof octbuf, -+ pv < end && isDIGIT((U8)*(pv+readsize)) -+ ? "%c%03o" : "%c%o", esc, c); -+ } -+ } else { -+ chsize = 1; -+ } -+ } -+ if (max && wrote + chsize > max) { -+ break; -+ } else if (chsize > 1) { -+ sv_catpvn(dsv, octbuf, chsize); -+ wrote += chsize; -+ } else { -+ char tmp[2]; -+ my_snprintf(tmp, sizeof tmp, "%c", c); -+ sv_catpvn(dsv, tmp, 1); -+ wrote++; -+ } -+ if (flags & PERL_PV_ESCAPE_FIRSTCHAR) -+ break; -+ } -+ if (escaped != NULL) -+ *escaped= pv - str; -+ return SvPVX(dsv); -+} -+ -+#endif -+#endif -+ -+#ifndef pv_pretty -+#if defined(NEED_pv_pretty) -+static char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags); -+static -+#else -+extern char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags); -+#endif -+ -+#ifdef pv_pretty -+# undef pv_pretty -+#endif -+#define pv_pretty(a,b,c,d,e,f,g) DPPP_(my_pv_pretty)(aTHX_ a,b,c,d,e,f,g) -+#define Perl_pv_pretty DPPP_(my_pv_pretty) -+ -+#if defined(NEED_pv_pretty) || defined(NEED_pv_pretty_GLOBAL) -+ -+char * -+DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count, -+ const STRLEN max, char const * const start_color, char const * const end_color, -+ const U32 flags) -+{ -+ const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%'; -+ STRLEN escaped; -+ -+ if (!(flags & PERL_PV_PRETTY_NOCLEAR)) -+ sv_setpvs(dsv, ""); -+ -+ if (dq == '"') -+ sv_catpvs(dsv, "\""); -+ else if (flags & PERL_PV_PRETTY_LTGT) -+ sv_catpvs(dsv, "<"); -+ -+ if (start_color != NULL) -+ sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color)); -+ -+ pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR); -+ -+ if (end_color != NULL) -+ sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color)); -+ -+ if (dq == '"') -+ sv_catpvs(dsv, "\""); -+ else if (flags & PERL_PV_PRETTY_LTGT) -+ sv_catpvs(dsv, ">"); -+ -+ if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count) -+ sv_catpvs(dsv, "..."); -+ -+ return SvPVX(dsv); -+} -+ -+#endif -+#endif -+ -+#ifndef pv_display -+#if defined(NEED_pv_display) -+static char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim); -+static -+#else -+extern char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim); -+#endif -+ -+#ifdef pv_display -+# undef pv_display -+#endif -+#define pv_display(a,b,c,d,e) DPPP_(my_pv_display)(aTHX_ a,b,c,d,e) -+#define Perl_pv_display DPPP_(my_pv_display) -+ -+#if defined(NEED_pv_display) || defined(NEED_pv_display_GLOBAL) -+ -+char * -+DPPP_(my_pv_display)(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim) -+{ -+ pv_pretty(dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP); -+ if (len > cur && pv[cur] == '\0') -+ sv_catpvs(dsv, "\\0"); -+ return SvPVX(dsv); -+} -+ -+#endif -+#endif -+ -+#endif /* _P_P_PORTABILITY_H_ */ -+ -+/* End of File ppport.h */ diff --git a/lang/perl-xml-parser/patches/020-xml-parser-expat-lib-inc-path-anchor.patch b/lang/perl-xml-parser/patches/020-xml-parser-expat-lib-inc-path-anchor.patch deleted file mode 100644 index 4e17daa..0000000 --- a/lang/perl-xml-parser/patches/020-xml-parser-expat-lib-inc-path-anchor.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/Expat/Makefile.PL -+++ b/Expat/Makefile.PL -@@ -2,6 +2,9 @@ use ExtUtils::MakeMaker; - use Config; - use English; - -+$expat_libpath = '%%EXPAT_LIBPATH%%'; -+$expat_incpath = '%%EXPAT_INCPATH%%'; -+ - my $libs = "-lexpat"; - my @extras = (); - diff --git a/lang/perl/Config.in b/lang/perl/Config.in deleted file mode 100644 index 65a3a47..0000000 --- a/lang/perl/Config.in +++ /dev/null @@ -1,31 +0,0 @@ -menu "Configuration" - depends on PACKAGE_perl - -config PERL_THREADS - bool "Enable threading support" - default y if (mips || mipsel || i386 || i686 || x86_64 || armeb || arm) - default n - -config PERL_TESTS - bool "Include perl tests" - default n - help - Include test suites for all perl packages. - - This will increase the size of perl and related packages - considerably. - Test support is still in development. Some tests will fail, - others are just missing completely. - -config PERL_NOCOMMENT - bool "Strip comments and pod sections from modules" - default y - help - Remove comments and pod sections for all perl packages. - - This will descrease the size of perl libraries moderately. - - Stripping occasionally gets confused and mangles valid code, - so disable this option if you're not pressed for space. - -endmenu diff --git a/lang/perl/Makefile b/lang/perl/Makefile deleted file mode 100644 index d3cb081..0000000 --- a/lang/perl/Makefile +++ /dev/null @@ -1,185 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=perl -PKG_VERSION:=5.22.1 -PKG_RELEASE:=4 - -PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \ - http://www.cpan.org/src/5.0 \ - ftp://ftp.mpi-sb.mpg.de/pub/perl/CPAN/src/5.0 \ - http://ftp.mpi-sb.mpg.de/pub/perl/CPAN/src/5.0 \ - ftp://ftp.gmd.de/mirrors/CPAN/src/5.0 \ - http://ftp5.gwdg.de/pub/languages/perl/CPAN/src/ \ - ftp://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0 \ - http://ftp.funet.fi/pub/languages/perl/CPAN/src/5.0 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=19295bbb775a3c36123161b9bf4892f1 - -PKG_LICENSE:=GPL-1.0+ Artistic-1.0-Perl -PKG_LICENSE_FILES:=Copying Artistic README -PKG_MAINTAINER:=Marcel Denia , \ - Philip Prindeville - -# Build settings -PKG_BUILD_DIR:=$(BUILD_DIR)/perl/$(PKG_NAME)-$(PKG_VERSION) -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/perl/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL:=1 -PKG_BUILD_DEPENDS:=perl/host -PKG_BUILD_PARALLEL:=1 -HOST_BUILD_PARALLEL:=1 - -# Variables used during configuration/build -HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr - -# Filter -g3, it will break Compress-Raw-Zlib -TARGET_CFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CFLAGS)) -TARGET_CPPFLAGS_PERL:=$(patsubst -g3,-g,$(TARGET_CPPFLAGS)) - -# A list of disabled tests -# ExtUtils tests are disabled for now as we don't support building -# native extensions on the target machine at the moment -PERL_DISABLEDTESTS:=cpan/ExtUtils-Constant cpan/ExtUtils-MakeMaker -# We're on Linux, so don't even package them -PERL_DISABLEDTESTS+=cpan/Win32API-File cpan/Win32 ext/VMS-DCLsym ext/VMS-Filespec ext/VMS-Stdio ext/Win32CORE os2/ -# NDBM and ODBM not supported -PERL_DISABLEDTESTS+=ext/NDBM_File ext/ODBM_File - - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk -include perlmod.mk - -define Package/perl - SUBMENU:=Perl - SECTION:=lang - CATEGORY:=Languages - TITLE:=The Perl intepreter - URL:=http://www.perl.com/ - DEPENDS:=+USE_GLIBC:libbsd +PERL_THREADS:libpthread -endef - -define Package/perl/description - Perl is a stable, cross platform programming language. - It is used for mission critical projects in the public and private sectors - and is widely used to program web applications of all needs. -endef - -define Package/perl/config - source "$(SOURCE)/Config.in" -endef - -# Static host perl -define Host/Configure - ( cd $(HOST_BUILD_DIR); ./Configure -der -Uusedl -Duserelocatableinc -Dprefix=$(HOST_PERL_PREFIX) $(if $(CONFIG_PERL_THREADS),-Dusethreads,)) -endef - -define Host/Install - ( cd $(HOST_BUILD_DIR); ./miniperl installperl ) - $(INSTALL_DIR) $(HOST_PERL_PREFIX)/bin/ - $(CP) $(HOST_BUILD_DIR)/generate_uudmap $(HOST_PERL_PREFIX)/bin/ - - # Link any possibly installed static extension in - $(MAKE) -C $(HOST_BUILD_DIR)/relink clean || true - ( cd $(HOST_BUILD_DIR)/relink && $(HOST_PERL_PREFIX)/bin/perl Makefile.PL ) - $(call perlmod/host/relink,$(HOST_BUILD_DIR)/relink) -endef - -# Target perl -define Build/Configure - $(PERL_CMD) files/perlconfig.pl -Dowrt:target_cc='$(TARGET_CC)' \ - -Dowrt:gccversion=$(CONFIG_GCC_VERSION) \ - -Dowrt:target_cross='$(TARGET_CROSS)' \ - -Dowrt:cflags='$(TARGET_CFLAGS_PERL) $(TARGET_CPPFLAGS_PERL)' \ - -Dowrt:ldflags='-rdynamic $(TARGET_LDFLAGS)' \ - -Dowrt:libc=$(subst uClibc,uclibc,$(CONFIG_LIBC)) \ - -Dowrt:ipv6=$(if $($(CONFIG_IPV6)),define,undef) \ - -Dowrt:threads=$(if $(CONFIG_PERL_THREADS),yes,no) \ - -Dowrt:staging_dir='$(STAGING_DIR)' \ - -Dowrt:host_perl_prefix='$(HOST_PERL_PREFIX)' \ - files/version.config \ - files/base.config \ - files/$(patsubst i386,i486,$(ARCH)).config \ - files/architecture.config \ - files/signal.config \ - files/threads.config \ - files/libc.config \ - files/misc.config \ - > $(PKG_BUILD_DIR)/config.sh - (cd $(PKG_BUILD_DIR) && ./Configure -S) - install -m 0644 $(PKG_BUILD_DIR)/config.h $(PKG_BUILD_DIR)/xconfig.h -endef - -define Build/Compile - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION) - $(CP) $(PKG_INSTALL_DIR)/usr/lib/perl5/$(PERL_VERSION) $(1)/usr/lib/perl5/ -endef - -define Package/perl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/perl$(PKG_VERSION) $(1)/usr/bin - ln -nsf perl$(PKG_VERSION) $(1)/usr/bin/perl - - $(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/CORE - $(CP) $(PKG_INSTALL_DIR)/usr/lib/perl5/$(PERL_VERSION)/CORE/libperl.so $(1)/usr/lib/perl5/$(PERL_VERSION)/CORE/ -endef - - -$(eval $(call RequireCommand,rsync, \ - $(PKG_NAME) requires rsync installed on the host-system. \ -)) - -$(eval $(call BuildPackage,perl)) -$(eval $(call HostBuild)) - --include perlbase.mk - -# A helper package that includes all sort of supplementary files for tests -define Package/perl-tests-common -$(call Package/perlbase-template) -TITLE:=Common test support files -DEPENDS:=@PERL_TESTS -endef - -define Package/perl-tests-common/install - $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR) - $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/Porting - $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/regen - $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/lib - $(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/XS - $(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/auto/XS - $(INSTALL_DIR) $(1)/usr/lib/perl5/$(PERL_VERSION)/unicore - - $(CP) $(PKG_BUILD_DIR)/t $(1)/$(PERL_TESTSDIR) - $(CP) $(PKG_BUILD_DIR)/Porting $(1)/$(PERL_TESTSDIR) - $(CP) $(PKG_BUILD_DIR)/regen $(1)/$(PERL_TESTSDIR) - $(CP) $(PKG_BUILD_DIR)/MANIFEST $(1)/$(PERL_TESTSDIR) - $(CP) $(PKG_BUILD_DIR)/TestInit.pm $(1)/$(PERL_TESTSDIR) - $(CP) $(PKG_BUILD_DIR)/vutil.c $(1)/$(PERL_TESTSDIR) - $(CP) $(PKG_BUILD_DIR)/vxs.inc $(1)/$(PERL_TESTSDIR) - $(CP) $(PKG_BUILD_DIR)/lib/XS $(1)/usr/lib/perl5/$(PERL_VERSION)/ - $(CP) $(PKG_BUILD_DIR)/lib/auto/XS $(1)/usr/lib/perl5/$(PERL_VERSION)/auto - $(CP) $(PKG_BUILD_DIR)/lib/vmsish.pm $(1)/usr/lib/perl5/$(PERL_VERSION)/ - $(CP) $(PKG_BUILD_DIR)/lib/vmsish.t $(1)/$(PERL_TESTSDIR)/lib - $(CP) $(PKG_BUILD_DIR)/lib/Internals.t $(1)/$(PERL_TESTSDIR)/lib - $(CP) $(PKG_BUILD_DIR)/lib/unicore/TestProp.pl $(1)/usr/lib/perl5/$(PERL_VERSION)/unicore - $(CP) files/perl-run_tests.sh $(1)/$(PERL_TESTSDIR)/run_tests.sh - sed \ - -e 's!%%PERL_DISABLEDTESTS%%!$(PERL_DISABLEDTESTS)!' \ - -e 's!%%PERL_VERSION%%!$(PERL_VERSION)!' \ - -i $(1)/$(PERL_TESTSDIR)/run_tests.sh - $(CP) $(PKG_BUILD_DIR)/config_h.SH $(1)/$(PERL_TESTSDIR) - $(CP) $(PKG_BUILD_DIR)/perl.h $(1)/$(PERL_TESTSDIR) -endef - -$(eval $(call BuildPackage,perl-tests-common)) diff --git a/lang/perl/README.patches b/lang/perl/README.patches deleted file mode 100644 index 5f3b595..0000000 --- a/lang/perl/README.patches +++ /dev/null @@ -1,9 +0,0 @@ -The patches in this package are loosely sorted into the following categories: - -0xx - Bugfixes -1xx - Cross-compile fixes -3xx - Workarounds -7xx - Testsuite fixes - -Feel free to add another one if your new patch doesn't seem to fit into an -existing category. \ No newline at end of file diff --git a/lang/perl/files/README.config b/lang/perl/files/README.config deleted file mode 100644 index 16bf058..0000000 --- a/lang/perl/files/README.config +++ /dev/null @@ -1,59 +0,0 @@ --- Perl configuration -- - -Perl uses a huge configuration file, normally generated via the Configure script -at build-time. This fails when cross-compiling though, so we need to supply our -own. - -We're using perlconfig.pl to piece together the final configuration from a bunch -of configuration files(all ending in .config). Please refer to perlconfig.pl's -POD for information on usage and syntax. - -Throughout the files, you will see a bunch of references to private symbols with -the prefix "owrt". These are used to control output in an effort to both -simplify writing configuration files, as well as to provide switchable options -to select the feature set of the resulting perl installation. - -The following will be a summary/quick reference of all private symbols we're -currently using: - -Passed via architecture configuration file(mipsel.config, i486.config, ...) ---------------------------------------------------------------------------- -Symbol Values Description -owrt:bits 32/64 Target's native word length. -owrt:endian little/big Target's endianness. -owrt:arch mipsel, i486, ... Target's architecture name. -owrt:sig_count 64/128 Number of signals the target - provides(NSIG - 1). -owrt:sigs * Symbolic names of the first 32 signals - this architecture provides, in numeric - order. Separated by whitespaces. -owrt:sig_name_extra * Symbolic names of any additional signals - this architecture provides after - owrt:sig_count. Separated by - whitespaces. -owrt:sig_num_extra * Numeric values associated with the - signal names provided in - owrt:sig_name_extra. Separated by - whitespaces. - -Passed via command line ------------------------ -Symbol Values Description -owrt:libc glibc/uclibc/musl Which C library implementation is in - use. -owrt:threads yes/no Whether to enable threading support. -owrt:ipv6 define/undef Whether to enable IPv6 support. -owrt:target_cross * Target architecture's host triplet. -owrt:target_cc * C compiler to use. -owrt:gccversion * target_cc's version number. -owrt:cflags * Additional C compiler flags. -owrt:ldflags * Additional linker flags. -owrt:staging_dir * Same as OpenWRT buildroot's - $(STAGING_DIR). -owrt:host_perl_prefix * host-perl installation prefix. - -Passed via version.config -------------------------- -Symbol Values Description -owrt:perllibpath * Path to perl library files, from the - target's point of view. diff --git a/lang/perl/files/architecture.config b/lang/perl/files/architecture.config deleted file mode 100644 index cc97281..0000000 --- a/lang/perl/files/architecture.config +++ /dev/null @@ -1,121 +0,0 @@ -alignbytes='8' - -($owrt:bits eq '32') { - ($owrt:endian eq 'little') { - byteorder='1234' - } - ($owrt:endian eq 'big') { - byteorder='4321' - } - - # Types - ivsize='4' - uvsize='4' - longsize='4' - longdblsize='8' - ptrsize='4' - - #quadkind='3' - #doublekind='3' - #longdblkind='0' - - i8type='signed char' - i16type='signed short' - i32type='signed long' - i64type='signed long long' - u32type='unsigned long' - u64type='unsigned long long' - quadtype='long long' - uquadtype='unsigned long long' - - sizesize='4' - - use64bitall='undef' - use64bitint='undef' - - uidformat='"lu"' - gidformat='"lu"' - - selectminbits='32' - - sGMTIME_max='2147483647' - sGMTIME_min='-2147483648' - sLOCALTIME_max='2147483647' - sLOCALTIME_min='-2147483648' - - sPRIi64='"Li"' - sPRIo64='"Lo"' - sPRIu64='"Lu"' - sPRIx64='"Lx"' - sPRId64='"Ld"' - - netdb_host_type='const void *' - nv_preserves_uv_bits='32' - d_nv_preserves_uv='define' - d_printf_format_null='define' - d_u32align='undef' -} -($owrt:bits eq '64') { - ($owrt:endian eq 'little') { - byteorder='12345678' - } - ($owrt:endian eq 'big') { - byteorder='87654321' - } - - # Types - ivsize='8' - uvsize='8' - longsize='8' - longdblsize='16' - ptrsize='8' - - quadtype='long' - - i16type='signed short' - i32type='signed int' - i64type='signed long' - i8type='signed char' - - u32type='unsigned int' - u64type='unsigned long' - uquadtype='unsigned long' - - sizesize='8' - - uidformat='"u"' - gidformat='"u"' - - selectminbits='64' - - sGMTIME_max='67768036191676799' - sGMTIME_min='-62167219200' - sLOCALTIME_max='67768036191673199' - sLOCALTIME_min='-62167222408' - - sPRIi64='"li"' - sPRIo64='"lo"' - sPRIu64='"lu"' - sPRIx64='"lx"' - sPRId64='"ld"' - - netdb_host_type='char *' - nv_preserves_uv_bits='53' - d_nv_preserves_uv='undef' - d_printf_format_null='undef' - d_u32align='define' - use64bitall='define' - use64bitint='define' -} - -# Only defined by i486 and x86_64. Provide defaults for all others -(!defined($sPRIEUldbl)) { - sPRIEUldbl='"E"' - sPRIFUldbl='"F"' - sPRIGUldbl='"G"' - sPRIXU64='"LX"' - sPRIeldbl='"e"' - sPRIfldbl='"f"' - sPRIgldbl='"g"' - sSCNfldbl='"f"' -} diff --git a/lang/perl/files/arm.config b/lang/perl/files/arm.config deleted file mode 100644 index 75fe254..0000000 --- a/lang/perl/files/arm.config +++ /dev/null @@ -1,19 +0,0 @@ -owrt:arch=arm -owrt:bits=32 -owrt:endian=little - -ccsymbols='__ARM_ARCH_3__=1' -cppccsymbols='' -cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' -d_casti32='define' -d_modflproto='undef' -doublekind='3' -fpossize='20' -longdblkind='0' -need_va_copy='undef' -quadkind='3' - -owrt:sig_count='64' -owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' -owrt:sig_name_extra='IOT CLD POLL UNUSED' -owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/files/armeb.config b/lang/perl/files/armeb.config deleted file mode 100644 index 081300c..0000000 --- a/lang/perl/files/armeb.config +++ /dev/null @@ -1,19 +0,0 @@ -owrt:arch=armeb -owrt:bits=32 -owrt:endian=big - -ccsymbols='__ARM_ARCH_3__=1' -cppccsymbols='' -cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' -d_casti32='define' -d_modflproto='undef' -doublekind='4' -fpossize='20' -longdblkind='0' -need_va_copy='undef' -quadkind='3' - -owrt:sig_count='64' -owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' -owrt:sig_name_extra='IOT CLD POLL UNUSED' -owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/files/base.config b/lang/perl/files/base.config deleted file mode 100644 index edc3bd4..0000000 --- a/lang/perl/files/base.config +++ /dev/null @@ -1,1005 +0,0 @@ -Author='' -Date='' -Header='' -Id='' -Locker='' -Log='' -PERL_CONFIG_SH=true -PERL_PATCHLEVEL= -RCSfile='' -Revision='' -Source='' -State='' -_a='.a' -_exe='' -_o='.o' -afs='false' -afsroot='/afs' -ansi2knr='' -aphostname='/bin/hostname' -ar='ar' -archname64='' -archobjs='' -awk='awk' -baserev='5.0' -bash='' -bin='/usr/bin' -bin_ELF='define' -binexp='/usr/bin' -bison='bison' -byacc='byacc' -c='' -castflags='0' -cat='cat' -ccname='gcc' -ccversion='' -cf_by='root' -charbits='8' -charsize='1' -chgrp='' -chmod='chmod' -chown='' -clocktype='clock_t' -comm='comm' -compress='' -config_arg0='./Configure' -config_arg1='-der' -contains='grep' -cp='cp' -cpio='' -cpp='cpp' -cpp_stuff='42' -cpplast='-' -cppminus='-' -cryptlib='' -csh='csh' -ctermid_r_proto='0' -d_Gconvert='sprintf((b),"%.*g",(n),(x))' -d_PRIEUldbl='define' -d_PRIFUldbl='define' -d_PRIGUldbl='define' -d_PRIXU64='define' -d_PRId64='define' -d_PRIeldbl='define' -d_PRIfldbl='define' -d_PRIgldbl='define' -d_PRIi64='define' -d_PRIo64='define' -d_PRIu64='define' -d_PRIx64='define' -d_SCNfldbl='define' -d__fwalk='undef' -d_access='define' -d_accessx='undef' -d_acosh='define' -d_aintl='undef' -d_alarm='define' -d_archlib='undef' -d_asctime64='undef' -d_asinh='define' -d_atanh='define' -d_atolf='undef' -d_atoll='define' -d_attribute_deprecated='define' -d_attribute_format='define' -d_attribute_malloc='define' -d_attribute_nonnull='define' -d_attribute_noreturn='define' -d_attribute_pure='define' -d_attribute_unused='define' -d_attribute_warn_unused_result='define' -d_backtrace='define' -d_bcmp='define' -d_bcopy='define' -d_bsd='undef' -d_bsdgetpgrp='undef' -d_bsdsetpgrp='undef' -d_builtin_choose_expr='define' -d_builtin_expect='undef' -d_bzero='define' -d_c99_variadic_macros='define' -d_castneg='define' -d_cbrt='define' -d_charvspr='undef' -d_chown='define' -d_chroot='define' -d_chsize='undef' -d_class='undef' -d_clearenv='define' -d_clock='define' -d_clock_getres='define' -d_clock_gettime='define' -d_clock_nanosleep='define' -d_closedir='define' -d_cmsghdr_s='define' -d_const='define' -d_copysign='define' -d_copysignl='undef' -d_cplusplus='undef' -d_csh='undef' -d_ctermid='define' -d_ctermid_r='undef' -d_ctime64='undef' -d_cuserid='define' -d_dbl_dig='define' -d_dbminitproto='undef' -d_difftime='define' -d_difftime64='undef' -d_dir_dd_fd='undef' -d_dirfd='define' -d_dirnamlen='undef' -d_dladdr='define' -d_dlerror='define' -d_dlopen='define' -d_dlsymun='undef' -d_dosuid='undef' -d_drand48proto='define' -d_dup2='define' -d_eaccess='undef' -d_endgrent='define' -d_endgrent_r='undef' -d_endhent='define' -d_endhostent_r='undef' -d_endnent='define' -d_endnetent_r='undef' -d_endpent='define' -d_endprotoent_r='undef' -d_endpwent='define' -d_endpwent_r='undef' -d_endsent='define' -d_endservent_r='undef' -d_eofnblk='define' -d_erf='define' -d_erfc='define' -d_eunice='undef' -d_exp2='define' -d_expm1='define' -d_faststdio='undef' -d_fchdir='define' -d_fchmod='define' -d_fchown='define' -d_fcntl='define' -d_fcntl_can_lock='define' -d_fd_macros='define' -d_fd_set='define' -d_fdim='define' -d_fgetpos='define' -d_finite='define' -d_finitel='undef' -d_flexfnam='define' -d_flock='define' -d_flockproto='define' -d_fma='define' -d_fmax='define' -d_fmin='define' -d_fork='define' -d_fp_class='undef' -d_fp_classify='undef' -d_fp_classl='undef' -d_fpathconf='define' -d_fpclass='undef' -d_fpclassify='define' -d_fpclassl='undef' -d_fpgetround='undef' -d_fpos64_t='undef' -d_frexpl='undef' -d_fs_data_s='undef' -d_fseeko='define' -d_fsetpos='define' -d_fstatfs='define' -d_fstatvfs='define' -d_fsync='define' -d_ftello='define' -d_ftime='undef' -d_futimes='undef' -d_gdbm_ndbm_h_uses_prototypes='undef' -d_gdbmndbm_h_uses_prototypes='undef' -d_getaddrinfo='define' -d_getcwd='define' -d_getespwnam='undef' -d_getfsstat='undef' -d_getgrent='define' -d_getgrps='define' -d_gethbyaddr='define' -d_gethbyname='define' -d_gethent='define' -d_gethname='define' -d_gethostprotos='define' -d_getitimer='define' -d_getlogin='define' -d_getmnt='undef' -d_getmntent='define' -d_getnameinfo='define' -d_getnbyaddr='define' -d_getnbyname='define' -d_getnent='define' -d_getnetprotos='define' -d_getpagsz='define' -d_getpbyname='define' -d_getpbynumber='define' -d_getpent='define' -d_getpgid='define' -d_getpgrp='define' -d_getpgrp2='undef' -d_getppid='define' -d_getprior='define' -d_getprotoprotos='define' -d_getprpwnam='undef' -d_getpwent='define' -d_getsbyname='define' -d_getsbyport='define' -d_getsent='define' -d_getservprotos='define' -d_getspnam='define' -d_gettimeod='define' -d_gmtime64='undef' -d_gnulibc='undef' -d_grpasswd='define' -d_hasmntopt='define' -d_htonl='define' -d_hypot='define' -d_ilogb='define' -d_ilogbl='undef' -d_inc_version_list='undef' -d_index='undef' -d_inetaton='define' -d_inetntop='define' -d_inetpton='define' -d_int64_t='define' -d_ip_mreq='define' -d_ip_mreq_source='define' -d_ipv6_mreq="$owrt:ipv6" -d_ipv6_mreq_source='undef' -d_isascii='define' -d_isblank='define' -d_isfinite='define' -d_isfinitel='undef' -d_isinf='define' -d_isinfl='define' -d_isless='undef' -d_isnan='define' -d_isnanl='undef' -d_isnormal='define' -d_killpg='define' -d_lc_monetary_2008='define' -d_lchown='define' -d_ldbl_dig='define' -d_ldexpl='define' -d_lgamma='define' -d_lgamma_r='define' -d_libm_lib_version='define' -d_libname_unique='undef' -d_link='define' -d_llrint='define' -d_llrintl='define' -d_llround='define' -d_llroundl='define' -d_localtime64='undef' -d_locconv='define' -d_lockf='define' -d_log1p='define' -d_log2='define' -d_logb='define' -d_longdbl='define' -d_longlong='define' -d_lrint='define' -d_lrintl='define' -d_lround='define' -d_lroundl='define' -d_lseekproto='define' -d_lstat='define' -d_madvise='define' -d_malloc_good_size='undef' -d_malloc_size='undef' -d_mblen='define' -d_mbstowcs='define' -d_mbtowc='define' -d_memchr='define' -d_memcmp='define' -d_memcpy='define' -d_memmove='define' -d_memset='define' -d_mkdir='define' -d_mkdtemp='define' -d_mkfifo='define' -d_mkstemp='define' -d_mkstemps='undef' -d_mktime='define' -d_mktime64='undef' -d_mmap='define' -d_modfl='undef' -d_modfl_pow32_bug='undef' -d_mprotect='define' -d_msg='define' -d_msg_ctrunc='define' -d_msg_dontroute='define' -d_msg_oob='define' -d_msg_peek='define' -d_msg_proxy='define' -d_msgctl='define' -d_msgget='define' -d_msghdr_s='define' -d_msgrcv='define' -d_msgsnd='define' -d_msync='define' -d_munmap='define' -d_mymalloc='undef' -d_nan='define' -d_nanosleep='define' -d_ndbm='undef' -d_ndbm_h_uses_prototypes='undef' -d_nearbyint='define' -d_nextafter='define' -d_nice='define' -d_nl_langinfo='define' -d_nv_zero_is_allbits_zero='define' -d_old_pthread_create_joinable='undef' -d_oldpthreads='undef' -d_oldsock='undef' -d_open3='define' -d_pathconf='define' -d_pause='define' -d_perl_otherlibdirs='undef' -d_phostname='undef' -d_pipe='define' -d_poll='define' -d_portable='define' -d_prctl='define' -d_prctl_set_name='define' -d_procselfexe='define' -d_pseudofork='undef' -d_pthread_attr_setscope='define' -d_ptrdiff_t='define' -d_pwage='undef' -d_pwchange='undef' -d_pwclass='undef' -d_pwcomment='undef' -d_pwexpire='undef' -d_pwgecos='define' -d_pwpasswd='define' -d_pwquota='undef' -d_qgcvt='undef' -d_quad='define' -d_re_comp='undef' -d_readdir='define' -d_readlink='define' -d_readv='define' -d_recvmsg='define' -d_regcmp='undef' -d_regcomp='define' -d_remainder='define' -d_remquo='define' -d_rename='define' -d_rewinddir='define' -d_rint='define' -d_rmdir='define' -d_round='define' -d_safebcpy='undef' -d_safemcpy='undef' -d_sanemcmp='define' -d_sbrkproto='define' -d_scalbn='define' -d_scalbnl='undef' -d_sched_yield='define' -d_scm_rights='define' -d_seekdir='define' -d_select='define' -d_sem='define' -d_semctl='define' -d_semctl_semid_ds='define' -d_semctl_semun='define' -d_semget='define' -d_semop='define' -d_sendmsg='define' -d_setegid='define' -d_seteuid='define' -d_setgrent='define' -d_setgrent_r='undef' -d_setgrps='define' -d_sethent='define' -d_sethostent_r='undef' -d_setitimer='define' -d_setlinebuf='define' -d_setlocale='define' -d_setlocale_r='undef' -d_setnent='define' -d_setnetent_r='undef' -d_setpent='define' -d_setpgid='define' -d_setpgrp='define' -d_setpgrp2='undef' -d_setprior='define' -d_setproctitle='undef' -d_setprotoent_r='undef' -d_setpwent='define' -d_setpwent_r='undef' -d_setregid='define' -d_setresgid='define' -d_setresuid='define' -d_setreuid='define' -d_setrgid='undef' -d_setruid='undef' -d_setsent='define' -d_setservent_r='undef' -d_setsid='define' -d_setvbuf='define' -d_sfio='undef' -d_shm='define' -d_shmat='define' -d_shmatprototype='define' -d_shmctl='define' -d_shmdt='define' -d_shmget='define' -d_sigaction='define' -d_signbit='undef' -d_sigprocmask='define' -d_sigsetjmp='define' -d_sin6_scope_id="$owrt:ipv6" -d_sitearch='define' -d_snprintf='define' -d_sockaddr_in6="$owrt:ipv6" -d_sockaddr_sa_len='undef' -d_sockatmark='undef' -d_sockatmarkproto='undef' -d_socket='define' -d_socklen_t='define' -d_sockpair='define' -d_socks5_init='undef' -d_sprintf_returns_strlen='define' -d_sqrtl='undef' -d_stat='define' -d_statblks='define' -d_statfs_f_flags='undef' -d_statfs_s='define' -d_static_inline='define' -d_statvfs='define' -d_stdio_cnt_lval='undef' -d_stdio_ptr_lval='undef' -d_stdio_ptr_lval_nochange_cnt='undef' -d_stdio_ptr_lval_sets_cnt='undef' -d_stdio_stream_array='undef' -d_stdiobase='undef' -d_stdstdio='undef' -d_strchr='define' -d_strcoll='define' -d_strctcpy='define' -d_strerrm='strerror(e)' -d_strerror='define' -d_strftime='define' -d_strlcat='define' -d_strlcpy='define' -d_strtod='define' -d_strtol='define' -d_strtold='define' -d_strtoll='define' -d_strtoq='define' -d_strtoul='define' -d_strtoull='define' -d_strtouq='define' -d_strxfrm='define' -d_suidsafe='undef' -d_symlink='define' -d_syscall='define' -d_syscallproto='define' -d_sysconf='define' -d_sysernlst='' -d_syserrlst='undef' -d_system='define' -d_tcgetpgrp='define' -d_tcsetpgrp='define' -d_telldir='define' -d_telldirproto='define' -d_tgamma='define' -d_time='define' -d_timegm='define' -d_times='define' -d_tm_tm_gmtoff='define' -d_tm_tm_zone='define' -d_trunc='define' -d_truncate='define' -d_truncl='define' -d_tzname='define' -d_ualarm='define' -d_umask='define' -d_uname='define' -d_union_semun='undef' -d_unordered='undef' -d_unsetenv='define' -d_usleep='define' -d_usleepproto='define' -d_ustat='define' -d_vendorarch='undef' -d_vendorbin='undef' -d_vendorlib='undef' -d_vendorscript='undef' -d_vfork='undef' -d_void_closedir='undef' -d_voidsig='define' -d_voidtty='' -d_volatile='define' -d_vprintf='define' -d_vsnprintf='define' -d_wait4='define' -d_waitpid='define' -d_wcscmp='define' -d_wcstombs='define' -d_wcsxfrm='define' -d_wctomb='define' -d_writev='define' -d_xenix='undef' -date='date' -db_hashtype='u_int32_t' -db_prefixtype='size_t' -db_version_major='' -db_version_minor='' -db_version_patch='' -defvoidused='15' -direntrytype='struct dirent' -dlext='so' -dlsrc='dl_dlopen.xs' -doublesize='8' -drand01='drand48()' -dtrace='' -eagain='EAGAIN' -ebcdic='undef' -echo='echo' -egrep='egrep' -emacs='' -endgrent_r_proto='0' -endhostent_r_proto='0' -endnetent_r_proto='0' -endprotoent_r_proto='0' -endpwent_r_proto='0' -endservent_r_proto='0' -eunicefix=':' -exe_ext='' -expr='expr' -extern_C='extern' -extras='' -fflushNULL='define' -fflushall='undef' -find='' -firstmakefile='makefile' -flex='' -fpostype='fpos_t' -freetype='void' -from=':' -full_csh='csh' -full_sed='sed' -gccansipedantic='' -gccosandvers='' -gidsign='1' -gidsize='4' -gidtype='gid_t' -glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib ' -gmake='gmake' -gnulibc_version='' -grep='grep' -groupcat='cat /etc/group' -groupstype='gid_t' -gzip='gzip' -h_fcntl='false' -h_sysfile='true' -hint='recommended' -hostcat='cat /etc/hosts' -hostgenerate="$owrt:host_perl_prefix/bin/generate_uudmap" -hostosname='' -hostperl="$owrt:host_perl_prefix/bin/perl" -html1dir=' ' -html1direxp='' -html3dir=' ' -html3direxp='' -i16size='2' -i32size='4' -i64size='8' -i8size='1' -i_arpainet='define' -i_assert='define' -i_bfd='undef' -i_bsdioctl='' -i_db='define' -i_dbm='undef' -i_dirent='define' -i_dld='undef' -i_dlfcn='define' -i_execinfo='define' -i_fcntl='undef' -i_fenv='undef' -i_float='define' -i_fp='undef' -i_fp_class='undef' -i_gdbm='define' -i_gdbm_ndbm='undef' -i_gdbmndbm='undef' -i_grp='define' -i_ieeefp='undef' -i_inttypes='define' -i_langinfo='define' -i_libutil='undef' -i_limits='define' -i_locale='define' -i_machcthr='undef' -i_malloc='define' -i_mallocmalloc='undef' -i_math='define' -i_memory='undef' -i_mntent='define' -i_ndbm='undef' -i_netdb='define' -i_neterrno='undef' -i_netinettcp='define' -i_niin='define' -i_poll='define' -i_prot='undef' -i_pthread='define' -i_pwd='define' -i_quadmath='define' -i_rpcsvcdbm='undef' -i_sfio='undef' -i_sgtty='undef' -i_shadow='define' -i_socks='undef' -i_stdarg='define' -i_stdbool='define' -i_stddef='define' -i_stdint='define' -i_stdlib='define' -i_string='define' -i_sunmath='undef' -i_sysaccess='undef' -i_sysdir='define' -i_sysfile='define' -i_sysfilio='undef' -i_sysin='undef' -i_sysioctl='define' -i_syslog='define' -i_sysmman='define' -i_sysmode='undef' -i_sysmount='define' -i_sysndir='undef' -i_sysparam='define' -i_syspoll='define' -i_sysresrc='define' -i_syssecrt='undef' -i_sysselct='define' -i_syssockio='undef' -i_sysstat='define' -i_sysstatfs='define' -i_sysstatvfs='define' -i_systime='define' -i_systimek='undef' -i_systimes='define' -i_systypes='define' -i_sysuio='define' -i_sysun='define' -i_sysutsname='define' -i_sysvfs='define' -i_syswait='define' -i_termio='undef' -i_termios='define' -i_time='define' -i_unistd='define' -i_ustat='define' -i_utime='define' -i_values='define' -i_varargs='undef' -i_varhdr='stdarg.h' -i_vfork='undef' -ignore_versioned_solibs='y' -inc_version_list=' ' -inc_version_list_init='0' -incpath='' -inews='' -initialinstalllocation='/usr/bin' -installbin='/usr/bin' -installhtml1dir='' -installhtml3dir='' -installman1dir='' -installman3dir='' -installprefix='/usr' -installprefixexp='/usr' -installscript='/usr/bin' -installsitebin='/usr/bin' -installsitehtml1dir='' -installsitehtml3dir='' -installsiteman1dir='' -installsiteman3dir='' -installsitescript='/usr/bin' -installstyle='lib/perl5' -installusrbinperl='define' -installvendorarch='' -installvendorbin='' -installvendorhtml1dir='' -installvendorhtml3dir='' -installvendorlib='' -installvendorman1dir='' -installvendorman3dir='' -installvendorscript='' -intsize='4' -issymlink='test -h' -ivdformat='"ld"' -ivtype='long' -ksh='' -ld_can_script='define' -ldlibpthname='LD_LIBRARY_PATH' -less='less' -lib_ext='.a' -libc='' -libdb_needs_pthread='N' -libperl='libperl.so' -libpth="$owrt:staging_dir/lib $owrt:staging_dir/usr/lib" -libsdirs="$owrt:staging_dir/lib $owrt:staging_dir/usr/lib" -libspath="$owrt:staging_dir/lib $owrt:staging_dir/usr/lib" -libswanted_uselargefiles='' -line='' -lint='' -lkflags='' -ln='ln' -lns='/bin/ln -s' -locincpth=' ' -loclibpth=' ' -longlongsize='8' -lp='' -lpr='' -ls='ls' -lseeksize='8' -lseektype='off_t' -mail='' -mailx='' -make='make' -make_set_make='#' -mallocobj='' -mallocsrc='' -malloctype='void *' -man1dir=' ' -man1direxp='' -man1ext='0' -man3dir=' ' -man3direxp='' -man3ext='0' -mips_type='' -mistrustnm='' -mkdir='mkdir' -mmaptype='void *' -modetype='mode_t' -more='more' -multiarch='undef' -mv='' -mydomain='.dev.null' -n='-n' -netdb_hlen_type='size_t' -netdb_name_type='const char *' -netdb_net_type='in_addr_t' -nm='nm' -nm_opt='' -nm_so_opt='--dynamic' -nroff='nroff' -nvEUformat='"E"' -nvFUformat='"F"' -nvGUformat='"G"' -nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0' -nveformat='"e"' -nvfformat='"f"' -nvgformat='"g"' -nvsize='8' -nvtype='double' -o_nonblock='O_NONBLOCK' -obj_ext='.o' -old_pthread_create_joinable='' -optimize='-O2' -orderlib='false' -osname='linux' -otherlibdirs=' ' -package='perl5' -pager='/usr/bin/less' -passcat='cat /etc/passwd' -path_sep=':' -perl='' -perl5='' -perl_patchlevel='' -perl_static_inline='static __inline__' -perlpath='/usr/bin/perl' -pg='pg' -phostname='hostname' -pidtype='pid_t' -plibpth='' -pmake='' -pr='' -prefix='/usr' -prefixexp='/usr' -procselfexe='"/proc/self/exe"' -prototype='define' -randbits='48' -randfunc='drand48' -randseedtype='long' -ranlib=':' -rd_nodata='-1' -rm='rm' -rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*' -rmail='' -run='' -runnm='false' -sched_yield='sched_yield()' -scriptdir='/usr/bin' -scriptdirexp='/usr/bin' -sed='sed' -seedfunc='srand48' -selecttype='fd_set *' -sendmail='' -setgrent_r_proto='0' -sethostent_r_proto='0' -setlocale_r_proto='0' -setnetent_r_proto='0' -setprotoent_r_proto='0' -setpwent_r_proto='0' -setservent_r_proto='0' -sh='/bin/sh' -shar='' -sharpbang='#!' -shmattype='void *' -shortsize='2' -shrpenv='' -shsharp='true' -signal_t='void' -sitearch='' -sitearchexp='' -sitebin='/usr/bin' -sitebinexp='/usr/bin' -sitehtml1dir='' -sitehtml1direxp='' -sitehtml3dir='' -sitehtml3direxp='' -sitelib='' -sitelibexp='' -siteman1dir='' -siteman1direxp='' -siteman3dir='' -siteman3direxp='' -siteprefix='/usr' -siteprefixexp='/usr' -sitescript='/usr/bin' -sitescriptexp='/usr/bin' -sizetype='size_t' -sleep='' -smail='' -so='so' -sockethdr='' -socketlib='' -socksizetype='socklen_t' -sort='sort' -spackage='Perl5' -spitshell='cat' -src='.' -ssizetype='ssize_t' -st_ino_sign='1' -st_ino_size='8' -startperl='#!/usr/bin/perl' -startsh='#!/bin/sh' -static_ext=' ' -stdchar='char' -stdio_base='((fp)->_base)' -stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' -stdio_cnt='((fp)->_cnt)' -stdio_filbuf='' -stdio_ptr='((fp)->_ptr)' -stdio_stream_array='' -submit='' -sysman='/usr/share/man/man1' -sysroot='' -tail='' -tar='' -targetdir='' -targetenv='' -targethost='' -targetmkdir='' -targetport='' -targetsh='/bin/sh' -tbl='' -tee='' -test='test' -timetype='time_t' -to=':' -touch='touch' -tr='tr' -trnl='\n' -troff='' -u16size='2' -u16type='unsigned short' -u32size='4' -u64size='8' -u8size='1' -u8type='unsigned char' -uidsign='1' -uidsize='4' -uidtype='uid_t' -uname='uname' -uniq='uniq' -use5005threads='undef' -usecbacktrace='undef' -usecrosscompile='define' -usedevel='undef' -usedl='define' -usedtrace='undef' -usefaststdio='undef' -usekernprocpathname='undef' -uselargefiles='define' -uselongdouble='undef' -usemallocwrap='define' -usemorebits='undef' -usemymalloc='n' -usenm='true' -usensgetexecutablepath='undef' -useopcode='true' -useperlio='define' -useposix='true' -usequadmath='undef' -usereentrant='undef' -userelocatableinc='undef' -usesfio='false' -useshrplib='true' -usesitecustomize='undef' -usesocks='undef' -usevendorprefix='undef' -useversionedarchname='undef' -usevfork='false' -usrinc="$owrt:staging_dir/include $owrt:staging_dir/usr/include" -uuname='' -uvXUformat='"lX"' -uvoformat='"lo"' -uvtype='unsigned long' -uvuformat='"lu"' -uvxformat='"lx"' -vaproto='define' -vendorarch='' -vendorarchexp='' -vendorbin='' -vendorbinexp='' -vendorhtml1dir=' ' -vendorhtml1direxp='' -vendorhtml3dir=' ' -vendorhtml3direxp='' -vendorlib='' -vendorlib_stem='' -vendorlibexp='' -vendorman1dir=' ' -vendorman1direxp='' -vendorman3dir=' ' -vendorman3direxp='' -vendorprefix='' -vendorprefixexp='' -vendorscript='' -vendorscriptexp='' -versiononly='undef' -vi='' -voidflags='15' -xlibpth='/usr/lib/386 /lib/386' -yacc='yacc' -yaccflags='' -zcat='' -zip='zip' - -config_argc=1 -config_args='-der' - -# Tools -cpprun="$owrt:target_cc -E" -cppstdin="$owrt:target_cc -E" -cc="$owrt:target_cc" -ld="$cc" -full_ar="${owrt:target_cross}ar" - -# Tool flags -cppflags="$owrt:cflags" -ccflags="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $owrt:cflags" -ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' -ccdlflags="-fPIC -Wl,-rpath,$owrt:perllibpath/CORE" -cccdlflags='-fPIC' -ldflags='' -ldflags_uselargefiles='' -lddlflags="-shared $owrt:ldflags" - -# Libraries -perllibs='-ldl -lm -lcrypt -lutil -lc' -libs='-lgdbm -ldb -ldl -lm -lcrypt -lutil -lc' -libsfiles='libdl.so libm.so libcrypt.so libutil.so libc.so' -libswanted='sfio socket inet nm ndbm gdbm dbm db malloc dl dld ld sun m crypt sec util c cposix posix ucb BSD' diff --git a/lang/perl/files/i486.config b/lang/perl/files/i486.config deleted file mode 100644 index b44c64e..0000000 --- a/lang/perl/files/i486.config +++ /dev/null @@ -1,28 +0,0 @@ -owrt:arch=i486 -owrt:bits=32 -owrt:endian=little - -ccsymbols='' -cppccsymbols='' -cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 i386=1 __i386=1 __i386__=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' -d_casti32='undef' -d_modflproto='define' -doublekind='3' -fpossize='20' -longdblkind='3' -need_va_copy='undef' -quadkind='3' - -sPRIEUldbl='"LE"' -sPRIFUldbl='"LF"' -sPRIGUldbl='"LG"' -sPRIXU64='"LX"' -sPRIeldbl='"Le"' -sPRIfldbl='"Lf"' -sPRIgldbl='"Lg"' -sSCNfldbl='"Lf"' - -owrt:sig_count='64' -owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' -owrt:sig_name_extra='IOT CLD POLL UNUSED' -owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/files/libc.config b/lang/perl/files/libc.config deleted file mode 100644 index 93d190c..0000000 --- a/lang/perl/files/libc.config +++ /dev/null @@ -1,47 +0,0 @@ -($owrt:libc eq 'glibc') { - perllibs="$perllibs -lbsd" - ldflags="$ldflags -L$owrt:staging_dir/lib" -} - -# uclibc does not provide crypt_r(). -($owrt:libc eq 'uclibc') { - crypt_r_proto='0' - d_crypt_r='undef' -} - -($owrt:libc eq 'musl') { - # musl does not provide a working setlocale(). It accepts arbitrary locales - # and makes them act as if they were C.UTF-8. - d_setlocale='undef' - - d_stdio_ptr_lval='undef' - d_stdio_ptr_lval_sets_cnt='undef' - d_stdiobase='undef' - d_stdstdio='undef' - - d_getnetbyname_r='undef' - - d_getprotobyname_r='undef' - d_getpwent_r='undef' - d_getservent_r='undef' - d_gethostent_r='undef' - d_getnetent_r='undef' - d_getnetbyaddr_r='undef' - d_getprotoent_r='undef' - d_getprotobynumber_r='undef' - d_getgrent_r='undef' - - getprotobyname_r='undef' - getpwent_r='undef' - getservent_r='undef' - gethostent_r='undef' - getnetent_r='undef' - getnetbyaddr_r='undef' - getprotoent_r='undef' - getprotobynumber_r='undef' - getgrent_r='undef' - - i_fcntl='define' - h_fcntl='true' - d_strerror_r='undef' -} diff --git a/lang/perl/files/mips.config b/lang/perl/files/mips.config deleted file mode 100644 index 05e807b..0000000 --- a/lang/perl/files/mips.config +++ /dev/null @@ -1,19 +0,0 @@ -owrt:arch=mips -owrt:bits=32 -owrt:endian=big - -ccsymbols='' -cppccsymbols='' -cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 LANGUAGE_C=1 _LANGUAGE_C=1 __LANGUAGE_C=1 __LANGUAGE_C__=1 _LARGEFILE_SOURCE=1 MIPSEL=1 _MIPSEL=1 __MIPSEL=1 __MIPSEL__=1 _MIPS_FPSET=16 _MIPS_ISA=_MIPS_ISA_MIPS1 _MIPS_SIM=1 _MIPS_SZINT=32 _MIPS_SZLONG=32 _MIPS_SZPTR=32 __PIC__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 R3000=1 _R3000=1 __R3000=1 __R3000__=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 mips=1 _mips=1 __mips=1 __mips__=1 __pic__=1 unix=1 __unix=1 __unix__=1' -d_casti32='define' -d_modflproto='undef' -doublekind='4' -fpossize='24' -longdblkind='0' -need_va_copy='undef' -quadkind='3' - -owrt:sig_count=128 -owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ' -owrt:sig_name_extra='IOT CLD POLL' -owrt:sig_num_extra='6 18 22' diff --git a/lang/perl/files/mips64.config b/lang/perl/files/mips64.config deleted file mode 100644 index 89875f7..0000000 --- a/lang/perl/files/mips64.config +++ /dev/null @@ -1,19 +0,0 @@ -owrt:arch=mips64 -owrt:bits=64 -owrt:endian=big - -ccsymbols='' -cppccsymbols='' -cppsymbols='' -d_casti32='define' -d_modflproto='undef' -doublekind='4' -fpossize='24' -longdblkind='6' -need_va_copy='define' -quadkind='2' - -owrt:sig_count=128 -owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ' -owrt:sig_name_extra='IOT CLD POLL' -owrt:sig_num_extra='6 18 22' diff --git a/lang/perl/files/mipsel.config b/lang/perl/files/mipsel.config deleted file mode 100644 index d209a0d..0000000 --- a/lang/perl/files/mipsel.config +++ /dev/null @@ -1,19 +0,0 @@ -owrt:arch=mipsel -owrt:bits=32 -owrt:endian=little - -ccsymbols='' -cppccsymbols='' -cppsymbols='__ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 LANGUAGE_C=1 _LANGUAGE_C=1 __LANGUAGE_C=1 __LANGUAGE_C__=1 _LARGEFILE_SOURCE=1 MIPSEL=1 _MIPSEL=1 __MIPSEL=1 __MIPSEL__=1 _MIPS_FPSET=16 _MIPS_ISA=_MIPS_ISA_MIPS1 _MIPS_SIM=1 _MIPS_SZINT=32 _MIPS_SZLONG=32 _MIPS_SZPTR=32 __PIC__=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 R3000=1 _R3000=1 __R3000=1 __R3000__=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 mips=1 _mips=1 __mips=1 __mips__=1 __pic__=1 unix=1 __unix=1 __unix__=1' -d_casti32='define' -d_modflproto='undef' -doublekind='3' -fpossize='24' -longdblkind='0' -need_va_copy='undef' -quadkind='3' - -owrt:sig_count=128 -owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ' -owrt:sig_name_extra='IOT CLD POLL' -owrt:sig_num_extra='6 18 22' diff --git a/lang/perl/files/misc.config b/lang/perl/files/misc.config deleted file mode 100644 index 3e8f6bd..0000000 --- a/lang/perl/files/misc.config +++ /dev/null @@ -1,11 +0,0 @@ -cf_email='naoir@gmx.net' -osvers='3.18.19' -gccversion="$owrt:gccversion" -myhostname='OpenWrt' -cf_time='Thu Jan 1 12:00:00 CEST 2015' - -perladmin="$cf_email" -archname="$owrt:arch-linux-$owrt:libc" -targetarch="$archname" -myarchname="$archname" -myuname="Linux $myhostname $osvers #1 SMP $cf_time @{[$owrt:arch =~ s/(el|eb)$//r]} GNU/Linux" diff --git a/lang/perl/files/perl-run_tests.sh b/lang/perl/files/perl-run_tests.sh deleted file mode 100755 index bf83c0a..0000000 --- a/lang/perl/files/perl-run_tests.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh - -PERL_TESTSDIR="/usr/share/perl/perl-tests" -PERL_LIBDIR="/usr/lib/perl5/%%PERL_VERSION%%/" -PERL_DISABLEDTESTS="%%PERL_DISABLEDTESTS%%" - -no_run="" -manual_run="" -manual_run_no_base="" - -while [ ! -z "$1" ]; do - case $1 in - -n) - no_run="yes" - ;; - -m) - manual_run="yes" - ;; - -mb) - manual_run="yes" - manual_run_no_base="yes" - ;; - --help) - echo "run_tests.sh [-n|-m|-mb|--help]" - echo "" - echo "Options:" - echo " -n Just prepare the environment. Don't actually run any tests" - echo " -m Run tests manually according to MANIFEST, instead of whatever t/TEST chooses" - echo " -mb Don't run base tests. Implies -m" - echo " --help Print this help ;)" - echo "" - exit 0 - ;; - *) - echo "Invalid argument: $1" - ;; - esac - shift -done - -if [ ! -f "$PERL_TESTSDIR/__prepared" ]; then - # Many tests insist on having PERL5LIB in $PERL_TESTSDIR/lib. However, - # that directory may also contain tests. Some of them(FindBin.t in particular) - # also demand being located in a directory ending with "lib". So we can't do symlink - # trickery here. - # Our solution is to just copy PERL5LIB over. - if [ -d "$PERL_TESTSDIR/lib" ]; then - cp -a "$PERL_LIBDIR/"* "$PERL_TESTSDIR/lib/" - else - ln -s "$PERL_LIBDIR" "$PERL_TESTSDIR/lib" - fi - - ln -s /usr/bin/perl "$PERL_TESTSDIR/perl" - ln -s /usr/bin/perl "$PERL_TESTSDIR/t/perl" - touch "$PERL_TESTSDIR/__prepared" - - for i in $PERL_DISABLEDTESTS; do - echo "Disabling $i tests" - sed 's!^'$i'.*$!!' -i $PERL_TESTSDIR/MANIFEST - done - - cat $PERL_TESTSDIR/MANIFEST | grep -v '^$' > $PERL_TESTSDIR/MANIFEST_NEW - rm $PERL_TESTSDIR/MANIFEST - mv $PERL_TESTSDIR/MANIFEST_NEW $PERL_TESTSDIR/MANIFEST -fi - -if [ -z "$no_run" ]; then - cd "$PERL_TESTSDIR/t" - if [ ! -z "$manual_run" ]; then - for i in $(cat ../MANIFEST | sed 's/\t.*$//g' | grep '\.t$'); do - if [ ! -z "$manual_run_no_base" ] && [ ! -z "$(echo $i | grep '^t/')" ]; then - continue; - fi - echo "Running $i" - ./TEST ../$i - echo "" - done - else - ./perl TEST - fi -fi diff --git a/lang/perl/files/perlconfig.pl b/lang/perl/files/perlconfig.pl deleted file mode 100644 index f169980..0000000 --- a/lang/perl/files/perlconfig.pl +++ /dev/null @@ -1,313 +0,0 @@ -#!/usr/bin/perl - -# 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 3 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, see . -# -# Copyright 2015 Marcel Denia - -=head1 NAME - -perlconfig.pl - -=head1 SYNOPSIS - -B [B<-Dsymbol>=I, ...] [B<-dsymbol>=I, ...] I<[files]> - -Generate a configuration file suitable for (cross-)compiling perl 5. - -=head1 OPTIONS - -=over - -=item B<-Dsymbol=value> - -The symbol identified by I will have the literal value I. -When generating the configuration file, it's value will be printed enclosed by -single quotation marks('). - -=item B<-dsymbol=value> - -The symbol identified by I will have the literal value I. - -=back - -=head1 DESCRIPTION - -B is a program to compile and generate configuration files ready -to be used as a "config.sh" file for compiling perl 5. It does so by processing -specially-made configuration files(usually called *.config), typically augmented -by command-line definitions. - -B's intent is to be used in place of perl 5's own Configure -script in situations where it can not be run, like cross-compiling. - -=head2 File syntax - -B's configuration files a consist of symbol definitions in -different variations, each one assigning a specific symbol identified by a name -some value, as well as conditional blocks in order to allow for some -flexibility. - -=head3 Symbol names - -A symbol name has to consist entirely of alphanumeric characters as well as -the underscore(_) character. In addition, symbol names may be prefixed with an -all-lowercase string, separated by a colon(:): - - my:name=value - -Having a zero-length prefix string is also valid: - - :name=value - -Symbols prefixed that way are called private symbols. They act exactly like -regular symbols, with the only difference being that they will B be written -to the final configuration file. - -=head3 Symbol definitions - -A symbol definition is in the form of a simple name/value pair, separated by -an equals sign(=): - - name=value - -I can be anything really. However, there are 3 notations, with -differences in quoting and interpolation: - -=over - -=item name=foo - -The symbol identified by I will have the literal value I. - -=item name='foo' - -The symbol identified by I will have the literal value I. -When generating the configuration file, it's value will be printed enclosed by -single quotation marks('). - -=item name="foo" - -The symbol identified by I will have the value of I -S>(as described in L). -When generating the configuration file, it's value will be printed enclosed by -single quotation marks('). - -=back - -=head3 Conditional blocks - -A conditional block is of the form - - (condition) { - ... - } - -B will execute everything enclosed in the curly braces({ and }), -or inside the BLOCK in Perl 5 terms, if I evaluates to any true -value. I will go through interpolation as described in -L. It may contain any valid Perl 5 expression. Some common -examples are: - -=over - -=item $name eq 'foo' - -Evaluates to true if configuration symbol I is literally equal to I. - -=item $name ne 'foo' - -Evaluates to true if configuration symbol I is B literally equal to -I. - -=item defined($name) - -Evaluates to true if configuration symbol I is defined(has any usable -value, see L). - -=back - -Conditional blocks may be nested inside conditional blocks. Note that the -opening curl brace({) has to be on the same line as your condition. - -=head3 Comments - -All lines starting with nothing or any number of whitespaces, followed by a -hash sign(#), are considered comments and will be completely ignored by -B. - -=head3 Interpolation - -In certain situations(see above), B will interpolate strings or -constructs in order to allow you to refer to configuration symbols or embed -code. - -Interpolated strings are subject to the following rules: - -=over - -=item You may not include any single(') or double(") quotation marks. - -You can use \qq in order to include double quotation marks(") in your string. - -=item $name and ${name} reference configuration symbols - -You can easily refer to existing configuration symbols using the commmon $name -or ${name} syntax. In case you want to refer to the perl variable named $name, -write \$name. This is useful for embedding code. - -=item Perl 5 interpolation rules apply - -Aside from the above, you may include anything that is also valid for an -interpolated(qq//) string in Perl 5. For instance, it's perfectly valid to -execute code using the @{[]} construct. - -=back - -=head1 EXAMPLES - -As a simple example, consider the following configuration file, named -"example.config": - - recommendation='The Perl you want is' - ($:maturity eq 'stable') { - recommendation="$recommendation Perl 5" - } - ($:maturity eq 'experimental') { - recommendation="$recommendation Perl 6(try Rakudo!)" - } - -Executing it using these command-lines will yield the following results: - -=over - -=item $ perlconfig.pl -D:maturity=stable example.config - - recommendation='The Perl you want is Perl 5' - -=item $ perlconfig.pl -D:maturity=experimental example.config - - recommendation='The Perl you want is Perl 6(try Rakudo!)' - -=back - -=head1 AUTHOR - -Marcel Denia - -=head1 COPYRIGHT AND LICENSE - -Copyright 2015 Marcel Denia - -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 3 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, see . - -=cut - -use strict; -use warnings; -use List::Util qw/all/; -my $symbol_name_prefix_regex = '(?:[a-z]*:)'; -my $symbol_name_regex = "($symbol_name_prefix_regex?(?:[a-zA-Z0-9_]+))"; - -my %config; - -sub interpolate { - my $string = shift; - my %options = @_; - - # First, convert $foo into ${foo} - $string =~ s/(?{value} - $string =~ s/\$\{$symbol_name_regex\}/\$config{\'$1\'}->{value}/g; - - # Un-escape \$foo - $string =~ s/\\\$/\$/g; - - # Turn \qq into " - $string =~ s/\\qq/\\"/g; - - return $string; -} - -# Parse command-line symbol definitions -while ($ARGV[0]) { - if ($ARGV[0] =~ /^-([D|d])$symbol_name_regex=(.*)$/) { - $config{$2} = { value => $3, quoted => $1 eq 'D' }; - shift(@ARGV); - } - else { - last; - } -} - -# Process configuration files -my @condition_stack = ( 1 ); -for my $file (@ARGV) { - open(my $fh, '<', $file) or die "Can't open $file: $!\n"; - while (my $line = <$fh>) { - chomp($line); - - if ($line =~ /^\s*$symbol_name_regex=(.*)$/) { # A symbol definition - if (all {$_ == 1} @condition_stack) { - my $symbol = $1; - (my $quote_begin, my $value, my $quote_end) = $2 =~ /^(['|"])?([^'"]*)(['|"])?$/; - - $quote_begin = '' unless defined $quote_begin; - $quote_end = '' unless defined $quote_end; - die "$file:$.: Unmatched quotes in \"$line\"\n" unless $quote_begin eq $quote_end; - - if ($quote_begin eq '"') { - $config{$symbol} = { value => eval('"' . interpolate($2) . '"'), quoted => 1 }; - } - else { - $config{$symbol} = { value => $2, quoted => $quote_begin eq '\'' }; - } - } - } - elsif ($line =~ /^\s*\((.*)\)\s?{$/) { # A conditional block - if (eval(interpolate($1))) { - push(@condition_stack, 1); - } - else { - push(@condition_stack, 0); - } - } - elsif ($line =~ /^\s*}$/) { # Closing a conditional block - pop(@condition_stack); - die "$file:$.: Closing non-existent block\n" unless @condition_stack; - } - elsif ($line =~ (/^\s*$/) || ($line =~ /^\s*#/)) { # An empty line or comment - } - else { - die "$file:$.: Malformed line: \"$line\"\n"; - } - } -} - -# Output -for (sort(keys(%config))) { - my $quote = $config{$_}->{quoted} ? '\'' : ''; - print("$_=$quote$config{$_}->{value}$quote\n") unless $_ =~ /^$symbol_name_prefix_regex/; -} \ No newline at end of file diff --git a/lang/perl/files/powerpc.config b/lang/perl/files/powerpc.config deleted file mode 100644 index 33af767..0000000 --- a/lang/perl/files/powerpc.config +++ /dev/null @@ -1,19 +0,0 @@ -owrt:arch=powerpc -owrt:bits=32 -owrt:endian=big - -ccsymbols='__gnu_linux__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 system=linux system=posix system=unix' -cppccsymbols='linux=1 unix=1' -cppsymbols='_BIG_ENDIAN=1 __BIG_ENDIAN__=1 __ELF__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 __linux=1 __linux__=1 __unix=1 __unix__=1' -d_casti32='undef' -d_modflproto='undef' -doublekind='4' -fpossize='24' -longdblkind='0' -need_va_copy='define' -quadkind='3' - -owrt:sig_count='64' -owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' -owrt:sig_name_extra='IOT CLD POLL UNUSED' -owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/files/signal.config b/lang/perl/files/signal.config deleted file mode 100644 index 183d3b9..0000000 --- a/lang/perl/files/signal.config +++ /dev/null @@ -1,18 +0,0 @@ -# Signal table helper - -(defined($owrt:sigs)) { - sig_name="$owrt:sigs" - (($owrt:libc eq 'glibc') || ($owrt:libc eq 'uclibc')) { - sig_name="$sig_name NUM32 NUM33 RTMIN NUM35 NUM36" - } - ($owrt:libc eq 'musl') { - sig_name="$sig_name NUM32 NUM33 NUM34 RTMIN NUM36" - } - - sig_name="$sig_name @{[map({qq/NUM\$_/} 37..$owrt:sig_count - 2)]} RTMAX $owrt:sig_name_extra" - sig_num="@{[0..$owrt:sig_count - 1]} $owrt:sig_num_extra " - sig_count="$owrt:sig_count" - sig_size="@{[scalar(split(q/ /, $sig_name))]}" - sig_name_init="@{[join(q/, /, map({qq/\qq\$_\qq/} split(q/ /, $sig_name)))]}, 0" - sig_num_init="@{[join(q/, /, split(q/ /, $sig_num))]}, 0" -} diff --git a/lang/perl/files/threads.config b/lang/perl/files/threads.config deleted file mode 100644 index e0a2f82..0000000 --- a/lang/perl/files/threads.config +++ /dev/null @@ -1,197 +0,0 @@ -($owrt:threads eq 'yes') { - # Configure arguments - config_args="$config_args -Dusethreads" - config_arg2='-Dusethreads' - config_argc=2 - - # Options - useithreads='define' - usemultiplicity='define' - usethreads='define' - - # Flags and related - ccflags="-D_REENTRANT -D_GNU_SOURCE $ccflags" - cppflags="-D_REENTRANT -D_GNU_SOURCE $cppflags" - perllibs="-lpthread $perllibs" - libs="-lpthread $libs" - libsfiles="libpthread.so $libsfiles" - libswanted="pthread $libswanted" - - - crypt_r_proto='REENTRANT_PROTO_B_CCS' - i_crypt='define' - d_crypt='define' - d_crypt_r='define' - - # Prototypes - asctime_r_proto='REENTRANT_PROTO_B_SB' - ctime_r_proto='REENTRANT_PROTO_B_SB' - drand48_r_proto='REENTRANT_PROTO_I_ST' - getgrent_r_proto='REENTRANT_PROTO_I_SBWR' - getgrgid_r_proto='REENTRANT_PROTO_I_TSBWR' - getgrnam_r_proto='REENTRANT_PROTO_I_CSBWR' - gethostbyaddr_r_proto='REENTRANT_PROTO_I_TsISBWRE' - gethostbyname_r_proto='REENTRANT_PROTO_I_CSBWRE' - gethostent_r_proto='REENTRANT_PROTO_I_SBWRE' - getlogin_r_proto='REENTRANT_PROTO_I_BW' - getnetbyaddr_r_proto='REENTRANT_PROTO_I_uISBWRE' - getnetbyname_r_proto='REENTRANT_PROTO_I_CSBWRE' - getnetent_r_proto='REENTRANT_PROTO_I_SBWRE' - getprotobyname_r_proto='REENTRANT_PROTO_I_CSBWR' - getprotobynumber_r_proto='REENTRANT_PROTO_I_ISBWR' - getprotoent_r_proto='REENTRANT_PROTO_I_SBWR' - getpwent_r_proto='REENTRANT_PROTO_I_SBWR' - getpwnam_r_proto='REENTRANT_PROTO_I_CSBWR' - getpwuid_r_proto='REENTRANT_PROTO_I_TSBWR' - getservbyname_r_proto='REENTRANT_PROTO_I_CCSBWR' - getservbyport_r_proto='REENTRANT_PROTO_I_ICSBWR' - getservent_r_proto='REENTRANT_PROTO_I_SBWR' - getspnam_r_proto='REENTRANT_PROTO_I_CSBWR' - gmtime_r_proto='REENTRANT_PROTO_S_TS' - localtime_r_proto='REENTRANT_PROTO_S_TS' - random_r_proto='REENTRANT_PROTO_I_St' - readdir64_r_proto='REENTRANT_PROTO_I_TSR' - readdir_r_proto='REENTRANT_PROTO_I_TSR' - srand48_r_proto='REENTRANT_PROTO_I_LS' - srandom_r_proto='REENTRANT_PROTO_I_TS' - strerror_r_proto='REENTRANT_PROTO_B_IBW' - tmpnam_r_proto='REENTRANT_PROTO_B_B' - ttyname_r_proto='REENTRANT_PROTO_I_IBW' - - # Defines - d_asctime_r='define' - d_ctime_r='define' - d_drand48_r='define' - d_fds_bits='define' - d_fegetround='undef' - d_getgrent_r='define' - d_getgrgid_r='define' - d_getgrnam_r='define' - d_gethostbyaddr_r='define' - d_gethostbyname_r='define' - d_gethostent_r='define' - d_getlogin_r='define' - d_getnetbyaddr_r='define' - d_getnetbyname_r='define' - d_getnetent_r='define' - d_getprotobyname_r='define' - d_getprotobynumber_r='define' - d_getprotoent_r='define' - d_getpwent_r='define' - d_getpwnam_r='define' - d_getpwuid_r='define' - d_getservbyname_r='define' - d_getservbyport_r='define' - d_getservent_r='define' - d_getspnam_r='define' - d_gmtime_r='define' - d_j0='undef' - d_j0l='undef' - d_localtime_r='define' - d_localtime_r_needs_tzset='define' - d_nexttoward='undef' - d_off64_t='define' - d_pthread_atfork='define' - d_pthread_yield='define' - d_random_r='define' - d_readdir64_r='define' - d_readdir_r='define' - d_srand48_r='define' - d_srandom_r='define' - d_sresgproto='define' - d_sresuproto='define' - d_strerror_r='define' - d_tmpnam_r='define' - d_ttyname_r='define' -} -($owrt:threads eq 'no') { - # Options - useithreads='undef' - usemultiplicity='undef' - usethreads='undef' - - # Prototyypes - asctime_r_proto='0' - crypt_r_proto='0' - ctime_r_proto='0' - drand48_r_proto='0' - getgrent_r_proto='0' - getgrgid_r_proto='0' - getgrnam_r_proto='0' - gethostbyaddr_r_proto='0' - gethostbyname_r_proto='0' - gethostent_r_proto='0' - getlogin_r_proto='0' - getnetbyaddr_r_proto='0' - getnetbyname_r_proto='0' - getnetent_r_proto='0' - getprotobyname_r_proto='0' - getprotobynumber_r_proto='0' - getprotoent_r_proto='0' - getpwent_r_proto='0' - getpwnam_r_proto='0' - getpwuid_r_proto='0' - getservbyname_r_proto='0' - getservbyport_r_proto='0' - getservent_r_proto='0' - getspnam_r_proto='0' - gmtime_r_proto='0' - - # Defines - d_asctime_r='undef' - d_crypt='define' - d_crypt_r='undef' - d_ctime_r='undef' - d_drand48_r='undef' - d_fds_bits='undef' - d_fegetround='define' - d_getgrent_r='undef' - d_getgrgid_r='undef' - d_getgrnam_r='undef' - d_gethostbyaddr_r='undef' - d_gethostbyname_r='undef' - d_gethostent_r='undef' - d_getlogin_r='undef' - d_getnetbyaddr_r='undef' - d_getnetbyname_r='undef' - d_getnetent_r='undef' - d_getprotobyname_r='undef' - d_getprotobynumber_r='undef' - d_getprotoent_r='undef' - d_getpwent_r='undef' - d_getpwnam_r='undef' - d_getpwuid_r='undef' - d_getservbyname_r='undef' - d_getservbyport_r='undef' - d_getservent_r='undef' - d_getspnam_r='undef' - d_gmtime_r='undef' - d_j0='define' - d_j0l='define' - d_localtime_r='undef' - d_localtime_r_needs_tzset='undef' - d_nexttoward='define' - d_off64_t='undef' - d_pthread_atfork='undef' - d_pthread_yield='undef' - d_random_r='undef' - d_readdir64_r='undef' - d_readdir_r='undef' - d_srand48_r='undef' - d_srandom_r='undef' - d_sresgproto='undef' - d_sresuproto='undef' - d_strerror_r='undef' - d_tmpnam_r='undef' - d_ttyname_r='undef' - i_crypt='define' - localtime_r_proto='0' - random_r_proto='0' - readdir64_r_proto='0' - readdir_r_proto='0' - srand48_r_proto='0' - srandom_r_proto='0' - strerror_r_proto='0' - tmpnam_r_proto='0' - ttyname_r_proto='0' -} diff --git a/lang/perl/files/version.config b/lang/perl/files/version.config deleted file mode 100644 index 98cd2a5..0000000 --- a/lang/perl/files/version.config +++ /dev/null @@ -1,38 +0,0 @@ -# Set the version here -PERL_REVISION=5 -PERL_VERSION=22 -PERL_SUBVERSION=1 - -# (api_revison, api_version, api_subversion) = (revision, version, 0) usually -PERL_API_REVISION=5 -PERL_API_VERSION=22 -PERL_API_SUBVERSION=0 - -known_extensions='B Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/Glob Filter/Util/Call GDBM_File Hash/Util I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Text/Soundex Time/HiRes Time/Piece Unicode/Normalize Win32 Win32API/File Win32CORE XS/APItest XS/Typemap attrs re threads threads/shared Hash/Util/FieldHash' -extensions='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call GDBM_File Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate XS/APItest XS/Typemap arybase attributes mro re threads threads/shared Archive/Tar Attribute/Handlers AutoLoader B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators Unicode/Normalize version' -nonxs_ext='Archive/Tar Attribute/Handlers AutoLoader B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators Unicode/Normalize version' -dynamic_ext='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call GDBM_File Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate XS/APItest XS/Typemap arybase attributes mro re threads threads/shared' - -# No need to change anything from here on -owrt:perllibpath="/usr/lib/perl5/$PERL_REVISION.$PERL_VERSION" - -revision="$PERL_REVISION" -patchlevel="$PERL_VERSION" -subversion="$PERL_SUBVERSION" -version_patchlevel_string="version $PERL_VERSION subversion $PERL_SUBVERSION" -version="$PERL_REVISION.$PERL_VERSION.$PERL_SUBVERSION" - -api_revision="$PERL_API_REVISION" -api_version="$PERL_API_VERSION" -api_subversion="$PERL_API_SUBVERSION" -api_versionstring="$PERL_API_REVISION.$PERL_API_VERSION.$PERL_API_SUBVERSION" - -privlib="$owrt:perllibpath" -privlibexp="$privlib" -archlib="$owrt:perllibpath" -archlibexp="$archlib" - -installarchlib="$owrt:perllibpath" -installprivlib="$owrt:perllibpath" -installsitearch="$owrt:perllibpath" -installsitelib="$owrt:perllibpath" diff --git a/lang/perl/files/x86_64.config b/lang/perl/files/x86_64.config deleted file mode 100644 index a9cb581..0000000 --- a/lang/perl/files/x86_64.config +++ /dev/null @@ -1,28 +0,0 @@ -owrt:arch=x86_64 -owrt:bits=64 -owrt:endian=little - -ccsymbols='' -cppccsymbols='' -cppsymbols='__ELF__=1 _LP64=1 __FLT_EVAL_METHOD__=0 __FXSR__=1 __GCC_ATOMIC_LLONG_LOCK_FREE=2 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 __INT64_MAX__=9223372036854775807L __INT64_TYPE__=long\ int __INTMAX_MAX__=9223372036854775807L __INTMAX_TYPE__=long\ int __INTPTR_MAX__=9223372036854775807L __INTPTR_TYPE__=long\ int __INT_FAST16_MAX__=9223372036854775807L __INT_FAST16_TYPE__=long\ int __INT_FAST32_MAX__=9223372036854775807L __INT_FAST32_TYPE__=long\ int __INT_FAST64_MAX__=9223372036854775807L __INT_FAST64_TYPE__=long\ int __INT_LEAST64_MAX__=9223372036854775807L __INT_LEAST64_TYPE__=long\ int __LONG_MAX__=9223372036854775807L __LP64__=1 __MMX__=1 __PTRDIFF_MAX__=9223372036854775807L __PTRDIFF_TYPE__=long\ int __SIZEOF_INT128__=16 __SIZEOF_LONG_DOUBLE__=16 __SIZEOF_LONG__=8 __SIZEOF_POINTER__=8 __SIZEOF_PTRDIFF_T__=8 __SIZEOF_SIZE_T__=8 __SIZE_MAX__=18446744073709551615UL __SIZE_TYPE__=long\ unsigned\ int __SSE2_MATH__=1 __SSE2__=1 __SSE_MATH__=1 __SSE__=1 __UINT64_MAX__=18446744073709551615UL __UINT64_TYPE__=long\ unsigned\ int __UINTMAX_MAX__=18446744073709551615UL __UINTMAX_TYPE__=long\ unsigned\ int __UINTPTR_MAX__=18446744073709551615UL __UINTPTR_TYPE__=long\ unsigned\ int __UINT_FAST16_MAX__=18446744073709551615UL __UINT_FAST16_TYPE__=long\ unsigned\ int __UINT_FAST32_MAX__=18446744073709551615UL __UINT_FAST32_TYPE__=long\ unsigned\ int __UINT_FAST64_MAX__=18446744073709551615UL __UINT_FAST64_TYPE__=long\ unsigned\ int __UINT_LEAST64_MAX__=18446744073709551615UL __UINT_LEAST64_TYPE__=long\ unsigned\ int __WCHAR_MAX__=2147483647 __WCHAR_MIN__=(-2147483647\ -\ 1) __WCHAR_TYPE__=int __amd64=1 __amd64__=1 __code_model_small__=1 __k8=1 __k8__=1 __x86_64=1 __x86_64__=1 _FILE_OFFSET_BITS=64 __GLIBC__=2 __GLIBC_MINOR__=2 __GNUC__=3 __GNUC_MINOR__=4 __GNU_LIBRARY__=6 _LARGEFILE_SOURCE=1 _POSIX_C_SOURCE=199506L _POSIX_SOURCE=1 __STDC__=1 __USE_BSD=1 __USE_FILE_OFFSET64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_SVID=1 linux=1 __linux=1 __linux__=1 unix=1 __unix=1 __unix__=1' -d_casti32='undef' -d_modflproto='define' -doublekind='3' -fpossize='16' -longdblkind='3' -need_va_copy='define' -quadkind='2' - -sPRIEUldbl='"LE"' -sPRIFUldbl='"LF"' -sPRIGUldbl='"LG"' -sPRIXU64='"lX"' -sPRIeldbl='"Le"' -sPRIfldbl='"Lf"' -sPRIgldbl='"Lg"' -sSCNfldbl='"Lf"' - -owrt:sig_count='64' -owrt:sigs='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS' -owrt:sig_name_extra='IOT CLD POLL UNUSED' -owrt:sig_num_extra='6 17 29 31' diff --git a/lang/perl/patches/010-musl-compat.patch b/lang/perl/patches/010-musl-compat.patch deleted file mode 100644 index 8dbad78..0000000 --- a/lang/perl/patches/010-musl-compat.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/pp.c -+++ b/pp.c -@@ -43,7 +43,7 @@ extern Pid_t getpid (void); - * Some BSDs and Cygwin default to POSIX math instead of IEEE. - * This switches them over to IEEE. - */ --#if defined(LIBM_LIB_VERSION) -+#if defined(LIBM_LIB_VERSION) && (defined(__GLIBC__) || defined(__UCLIBC__)) - _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_; - #endif - diff --git a/lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch b/lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch deleted file mode 100644 index 956466d..0000000 --- a/lang/perl/patches/020-host-libc-dir-moved-debian+derivatives.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/hints/linux.sh -+++ b/hints/linux.sh -@@ -221,6 +221,24 @@ case "$libc" in - ;; - esac - -+# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries -+# (such as -lm) in /lib or /usr/lib. So we have to ask gcc to tell us -+# where to look. We don't want gcc's own libraries, however, so we -+# filter those out. -+# This could be conditional on Unbuntu, but other distributions may -+# follow suit, and this scheme seems to work even on rather old gcc's. -+# This unconditionally uses gcc because even if the user is using another -+# compiler, we still need to find the math library and friends, and I don't -+# know how other compilers will cope with that situation. -+# Still, as an escape hatch, allow Configure command line overrides to -+# plibpth to bypass this check. -+case "$plibpth" in -+'') plibpth=`gcc -print-search-dirs | grep libraries | -+ cut -f2- -d= | tr ':' $trnl | grep -v 'gcc'` -+ plibpth="$plibpth" # Collapse all entries on one line -+ ;; -+esac -+ - # Are we using ELF? Thanks to Kenneth Albanowski - # for this test. - cat >try.c <<'EOM' diff --git a/lang/perl/patches/100-fix-cross-compile-endianness-detection.patch b/lang/perl/patches/100-fix-cross-compile-endianness-detection.patch deleted file mode 100644 index e187941..0000000 --- a/lang/perl/patches/100-fix-cross-compile-endianness-detection.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/config_h.SH -+++ b/config_h.SH -@@ -52,6 +52,19 @@ sed <$CONFIG_H -e 's!^#und - #ifndef _config_h_ - #define _config_h_ - -+#if defined(USE_CROSS_COMPILE) && !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) -+# include -+# if defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN) -+# if (__BYTE_ORDER == __LITTLE_ENDIAN) -+# define __LITTLE_ENDIAN__ -+# elif (__BYTE_ORDER == __BIG_ENDIAN) -+# define __BIG_ENDIAN__ -+# else -+# error Unknown endianness -+# endif -+# endif -+#endif -+ - /* LOC_SED: - * This symbol holds the complete pathname to the sed program. - */ diff --git a/lang/perl/patches/110-always_use_miniperl.patch b/lang/perl/patches/110-always_use_miniperl.patch deleted file mode 100644 index 9f9f812..0000000 --- a/lang/perl/patches/110-always_use_miniperl.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/Makefile.SH -+++ b/Makefile.SH -@@ -316,22 +316,11 @@ MANIFEST_SRT = MANIFEST.srt - - !GROK!THIS! - --case "$usecrosscompile$perl" in --define?*) -- $spitshell >>$Makefile <>$Makefile <>$Makefile <>$Makefile < "relink"); diff --git a/lang/perl/patches/310-recompile-hack.patch b/lang/perl/patches/310-recompile-hack.patch deleted file mode 100644 index 05a8e9b..0000000 --- a/lang/perl/patches/310-recompile-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -perl: Work around recompile failures - -Apparently, recompiling/relinking fails under some circumstances. This -patch has been reported to work around that issue. - ---- a/Makefile.SH -+++ b/Makefile.SH -@@ -818,7 +818,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LI - true) - $spitshell >>$Makefile <<'!NO!SUBS!' - rm -f $@ -- $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs) -+ $(CC) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs) - !NO!SUBS! - case "$osname" in - aix) diff --git a/lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch b/lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch deleted file mode 100644 index f90e5d9..0000000 --- a/lang/perl/patches/700-tie_fetch_count_t-handle_missing_crypt.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/t/op/tie_fetch_count.t -+++ b/t/op/tie_fetch_count.t -@@ -250,12 +250,17 @@ for ([chdir=>''],[chmod=>'0,'],[chown=>' - check_count "$op $args\\\$tied_glob$postargs"; - } - --$dummy = crypt $var,0; check_count 'crypt $tied, ...'; --$dummy = crypt 0,$var; check_count 'crypt ..., $tied'; --$var = substr(chr 256,0,0); --$dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...'; --$var = substr(chr 256,0,0); --$dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8'; -+SKIP: { -+ use Config; -+ skip "crypt() is unavailable", 4, unless defined $Config{'d_crypt'}; -+ -+ $dummy = crypt $var,0; check_count 'crypt $tied, ...'; -+ $dummy = crypt 0,$var; check_count 'crypt ..., $tied'; -+ $var = substr(chr 256,0,0); -+ $dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...'; -+ $var = substr(chr 256,0,0); -+ $dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8'; -+} - - SKIP: - { diff --git a/lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch b/lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch deleted file mode 100644 index e60ee8c..0000000 --- a/lang/perl/patches/710-threads_join-skip_ps_on_busybox.patch +++ /dev/null @@ -1,81 +0,0 @@ -perl: Skip $0 test on busybox - -This test requires a ps which provides the -f option, as well as suitable output. -We can't provide either with busybox. Just skip it for now. - -Signed-off-by: Marcel Denia - ---- a/dist/threads/t/join.t -+++ b/dist/threads/t/join.t -@@ -110,36 +110,41 @@ sub skip { - - # We parse ps output so this is OS-dependent. - if ($^O eq 'linux') { -- # First modify $0 in a subthread. -- #print "# mainthread: \$0 = $0\n"; -- threads->create(sub{ #print "# subthread: \$0 = $0\n"; -- $0 = "foobar"; -- #print "# subthread: \$0 = $0\n" -- })->join; -- #print "# mainthread: \$0 = $0\n"; -- #print "# pid = $$\n"; -- if (open PS, "ps -f |") { # Note: must work in (all) systems. -- my ($sawpid, $sawexe); -- while () { -- chomp; -- #print "# [$_]\n"; -- if (/^\s*\S+\s+$$\s/) { -- $sawpid++; -- if (/\sfoobar\s*$/) { # Linux 2.2 leaves extra trailing spaces. -- $sawexe++; -- } -- last; -- } -- } -- close PS or die; -- if ($sawpid) { -- ok($sawpid && $sawexe, 'altering $0 is effective'); -- } else { -- skip("\$0 check: did not see pid $$ in 'ps -f |'"); -- } -- } else { -- skip("\$0 check: opening 'ps -f |' failed: $!"); -- } -+ if (readlink('/bin/ps') ne 'busybox') { -+ # First modify $0 in a subthread. -+ #print "# mainthread: \$0 = $0\n"; -+ threads->create(sub{ #print "# subthread: \$0 = $0\n"; -+ $0 = "foobar"; -+ #print "# subthread: \$0 = $0\n" -+ })->join; -+ #print "# mainthread: \$0 = $0\n"; -+ #print "# pid = $$\n"; -+ if (open PS, "ps -f |") { # Note: must work in (all) systems. -+ my ($sawpid, $sawexe); -+ while () { -+ chomp; -+ #print "# [$_]\n"; -+ if (/^\s*\S+\s+$$\s/) { -+ $sawpid++; -+ if (/\sfoobar\s*$/) { # Linux 2.2 leaves extra trailing spaces. -+ $sawexe++; -+ } -+ last; -+ } -+ } -+ close PS or die; -+ if ($sawpid) { -+ ok($sawpid && $sawexe, 'altering $0 is effective'); -+ } else { -+ skip("\$0 check: did not see pid $$ in 'ps -f |'"); -+ } -+ } else { -+ skip("\$0 check: opening 'ps -f |' failed: $!"); -+ } -+ } -+ else { -+ skip("\$0 check: incompatible with busybox"); -+ } - } else { - skip("\$0 check: only on Linux"); - } diff --git a/lang/perl/patches/900-CVE-2015-8607.patch b/lang/perl/patches/900-CVE-2015-8607.patch deleted file mode 100644 index 5f1c1cb..0000000 --- a/lang/perl/patches/900-CVE-2015-8607.patch +++ /dev/null @@ -1,57 +0,0 @@ -From b6307f728a4f842a54ea96959e386c7daa92ece1 Mon Sep 17 00:00:00 2001 -From: Tony Cook -Date: Tue, 15 Dec 2015 10:56:54 +1100 -Subject: [perl #126862] ensure File::Spec::canonpath() preserves taint - -Previously the unix specific XS implementation of canonpath() would -return an untainted path when supplied a tainted path. - -For the empty string case, newSVpvs() already sets taint as needed on -its result. ---- - dist/PathTools/Cwd.xs | 1 + - dist/PathTools/t/taint.t | 19 ++++++++++++++++++- - 2 files changed, 19 insertions(+), 1 deletion(-) - ---- a/dist/PathTools/Cwd.xs -+++ b/dist/PathTools/Cwd.xs -@@ -535,6 +535,7 @@ THX_unix_canonpath(pTHX_ SV *path) - *o = 0; - SvPOK_on(retval); - SvCUR_set(retval, o - SvPVX(retval)); -+ SvTAINT(retval); - return retval; - } - ---- a/dist/PathTools/t/taint.t -+++ b/dist/PathTools/t/taint.t -@@ -12,7 +12,7 @@ use Test::More; - BEGIN { - plan( - ${^TAINT} -- ? (tests => 17) -+ ? (tests => 21) - : (skip_all => "A perl without taint support") - ); - } -@@ -34,3 +34,20 @@ foreach my $func (@Functions) { - - # Previous versions of Cwd tainted $^O - is !tainted($^O), 1, "\$^O should not be tainted"; -+ -+{ -+ # [perl #126862] canonpath() loses taint -+ my $tainted = substr($ENV{PATH}, 0, 0); -+ # yes, getcwd()'s result should be tainted, and is tested above -+ # but be sure -+ ok tainted(File::Spec->canonpath($tainted . Cwd::getcwd)), -+ "canonpath() keeps taint on non-empty string"; -+ ok tainted(File::Spec->canonpath($tainted)), -+ "canonpath() keeps taint on empty string"; -+ -+ (Cwd::getcwd() =~ /^(.*)/); -+ my $untainted = $1; -+ ok !tainted($untainted), "make sure our untainted value is untainted"; -+ ok !tainted(File::Spec->canonpath($untainted)), -+ "canonpath() doesn't add taint to untainted string"; -+} diff --git a/lang/perl/patches/901-CVE-2016-2381.patch b/lang/perl/patches/901-CVE-2016-2381.patch deleted file mode 100644 index ee5db6c..0000000 --- a/lang/perl/patches/901-CVE-2016-2381.patch +++ /dev/null @@ -1,102 +0,0 @@ -From: Tony Cook -Date: Wed, 27 Jan 2016 00:52:15 +0000 (+1100) -Subject: remove duplicate environment variables from environ -X-Git-Url: http://perl5.git.perl.org/perl.git/commitdiff_plain/ae37b791a73a9e78dedb89fb2429d2628cf58076 - -remove duplicate environment variables from environ - -If we see duplicate environment variables while iterating over -environ[]: - -a) make sure we use the same value in %ENV that getenv() returns. - -Previously on a duplicate, %ENV would have the last entry for the name -from environ[], but a typical getenv() would return the first entry. - -Rather than assuming all getenv() implementations return the first entry -explicitly call getenv() to ensure they agree. - -b) remove duplicate entries from environ - -Previously if there was a duplicate definition for a name in environ[] -setting that name in %ENV could result in an unsafe value being passed -to a child process, so ensure environ[] has no duplicates. - -CVE-2016-2381 ---- - ---- a/perl.c -+++ b/perl.c -@@ -4298,23 +4298,70 @@ S_init_postdump_symbols(pTHX_ int argc, - } - if (env) { - char *s, *old_var; -+ STRLEN nlen; - SV *sv; -+ HV *dups = newHV(); -+ - for (; *env; env++) { - old_var = *env; - - if (!(s = strchr(old_var,'=')) || s == old_var) - continue; -+ nlen = s - old_var; - - #if defined(MSDOS) && !defined(DJGPP) - *s = '\0'; - (void)strupr(old_var); - *s = '='; - #endif -- sv = newSVpv(s+1, 0); -- (void)hv_store(hv, old_var, s - old_var, sv, 0); -+ if (hv_exists(hv, old_var, nlen)) { -+ const char *name = savepvn(old_var, nlen); -+ -+ /* make sure we use the same value as getenv(), otherwise code that -+ uses getenv() (like setlocale()) might see a different value to %ENV -+ */ -+ sv = newSVpv(PerlEnv_getenv(name), 0); -+ -+ /* keep a count of the dups of this name so we can de-dup environ later */ -+ if (hv_exists(dups, name, nlen)) -+ ++SvIVX(*hv_fetch(dups, name, nlen, 0)); -+ else -+ (void)hv_store(dups, name, nlen, newSViv(1), 0); -+ -+ Safefree(name); -+ } -+ else { -+ sv = newSVpv(s+1, 0); -+ } -+ (void)hv_store(hv, old_var, nlen, sv, 0); - if (env_is_not_environ) - mg_set(sv); - } -+ if (HvKEYS(dups)) { -+ /* environ has some duplicate definitions, remove them */ -+ HE *entry; -+ hv_iterinit(dups); -+ while ((entry = hv_iternext_flags(dups, 0))) { -+ STRLEN nlen; -+ const char *name = HePV(entry, nlen); -+ IV count = SvIV(HeVAL(entry)); -+ IV i; -+ SV **valp = hv_fetch(hv, name, nlen, 0); -+ -+ assert(valp); -+ -+ /* try to remove any duplicate names, depending on the -+ * implementation used in my_setenv() the iteration might -+ * not be necessary, but let's be safe. -+ */ -+ for (i = 0; i < count; ++i) -+ my_setenv(name, 0); -+ -+ /* and set it back to the value we set $ENV{name} to */ -+ my_setenv(name, SvPV_nolen(*valp)); -+ } -+ } -+ SvREFCNT_dec_NN(dups); - } - #endif /* USE_ENVIRON_ARRAY */ - #endif /* !PERL_MICRO */ diff --git a/lang/perl/perlbase.mk b/lang/perl/perlbase.mk deleted file mode 100644 index 9ad9d77..0000000 --- a/lang/perl/perlbase.mk +++ /dev/null @@ -1,1559 +0,0 @@ -define Package/perlbase-template -SUBMENU:=Perl -SECTION:=lang -CATEGORY:=Languages -URL:=http://www.cpan.org/ -DEPENDS:=perl -endef - -define Package/perlbase-anydbm-file -$(call Package/perlbase-template) -TITLE:=AnyDBM_File perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-anydbm-file/install -$(call perlmod/Install,$(1),AnyDBM_File.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/AnyDBM_File.t) -endef - -$(eval $(call BuildPackage,perlbase-anydbm-file)) - - -define Package/perlbase-app -$(call Package/perlbase-template) -TITLE:=app perl module -DEPENDS+=+perlbase-autouse +perlbase-base +perlbase-config +perlbase-cpan +perlbase-essential +perlbase-file +perlbase-getopt +perlbase-if +perlbase-tap +perlbase-text -endef - -define Package/perlbase-app/install -$(call perlmod/Install,$(1),App,) -endef - -$(eval $(call BuildPackage,perlbase-app)) - - -define Package/perlbase-archive -$(call Package/perlbase-template) -TITLE:=Archive perl module -DEPENDS+=+perlbase-cwd +perlbase-essential +perlbase-file +perlbase-io -endef - -define Package/perlbase-archive/install -$(call perlmod/Install,$(1),Archive,) -$(call perlmod/InstallBaseTests,$(1),cpan/Archive-Tar/bin cpan/Archive-Tar/t) - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ptar $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ptardiff $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ptargrep $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,perlbase-archive)) - - -define Package/perlbase-arybase -$(call Package/perlbase-template) -TITLE:=arybase perl module -DEPENDS+=+perlbase-xsloader -endef - -define Package/perlbase-arybase/install -$(call perlmod/Install,$(1),arybase.pm auto/arybase,) -$(call perlmod/InstallBaseTests,$(1),ext/arybase/t) -endef - -$(eval $(call BuildPackage,perlbase-arybase)) - - -define Package/perlbase-attribute -$(call Package/perlbase-template) -TITLE:=Attribute perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-attribute/install -$(call perlmod/Install,$(1),Attribute,) -$(call perlmod/InstallBaseTests,$(1),dist/Attribute-Handlers/t) -endef - -$(eval $(call BuildPackage,perlbase-attribute)) - - -define Package/perlbase-attributes -$(call Package/perlbase-template) -TITLE:=attributes perl module -DEPENDS+=+perlbase-essential +perlbase-xsloader -endef - -define Package/perlbase-attributes/install -$(call perlmod/Install,$(1),attributes.pm auto/attributes,) -endef - -$(eval $(call BuildPackage,perlbase-attributes)) - - -define Package/perlbase-autodie -$(call Package/perlbase-template) -TITLE:=autodie perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-autodie/install -$(call perlmod/Install,$(1),autodie autodie.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/autodie/t) -endef - -$(eval $(call BuildPackage,perlbase-autodie)) - - -define Package/perlbase-autoloader -$(call Package/perlbase-template) -TITLE:=AutoLoader perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-autoloader/install -$(call perlmod/Install,$(1),AutoLoader.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/AutoLoader/t) -endef - -$(eval $(call BuildPackage,perlbase-autoloader)) - - -define Package/perlbase-autosplit -$(call Package/perlbase-template) -TITLE:=AutoSplit perl module -DEPENDS+=+perlbase-config +perlbase-essential +perlbase-file -endef - -define Package/perlbase-autosplit/install -$(call perlmod/Install/NoStrip,$(1),AutoSplit.pm,) -endef - -$(eval $(call BuildPackage,perlbase-autosplit)) - - -define Package/perlbase-autouse -$(call Package/perlbase-template) -TITLE:=autouse perl module -endef - -define Package/perlbase-autouse/install -$(call perlmod/Install,$(1),autouse.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/autouse/t) -endef - -$(eval $(call BuildPackage,perlbase-autouse)) - - -define Package/perlbase-b -$(call Package/perlbase-template) -TITLE:=B perl module -DEPENDS+=+perlbase-config +perlbase-essential +perlbase-feature -endef - -define Package/perlbase-b/install -$(call perlmod/Install,$(1),B B.pm auto/B,) -$(call perlmod/InstallBaseTests,$(1),cpan/B-Debug/t ext/B/t lib/B/Deparse-core.t lib/B/Deparse-subclass.t lib/B/Deparse.t) -endef - -$(eval $(call BuildPackage,perlbase-b)) - - -define Package/perlbase-base -$(call Package/perlbase-template) -TITLE:=base perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-base/install -$(call perlmod/Install,$(1),base.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/base/t) -endef - -$(eval $(call BuildPackage,perlbase-base)) - - -define Package/perlbase-benchmark -$(call Package/perlbase-template) -TITLE:=Benchmark perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-benchmark/install -$(call perlmod/Install,$(1),Benchmark.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/Benchmark.t) -endef - -$(eval $(call BuildPackage,perlbase-benchmark)) - - -define Package/perlbase-bigint -$(call Package/perlbase-template) -TITLE:=bigint perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-bigint/install -$(call perlmod/Install,$(1),bigint.pm,) -endef - -$(eval $(call BuildPackage,perlbase-bigint)) - - -define Package/perlbase-bignum -$(call Package/perlbase-template) -TITLE:=bignum perl module -DEPENDS+=+perlbase-bigint +perlbase-essential -endef - -define Package/perlbase-bignum/install -$(call perlmod/Install,$(1),bignum.pm bigrat.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/bignum/t) -endef - -$(eval $(call BuildPackage,perlbase-bignum)) - - -define Package/perlbase-blib -$(call Package/perlbase-template) -TITLE:=blib perl module -DEPENDS+=+perlbase-cwd +perlbase-essential +perlbase-file -endef - -define Package/perlbase-blib/install -$(call perlmod/Install,$(1),blib.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/blib.t) -endef - -$(eval $(call BuildPackage,perlbase-blib)) - - -define Package/perlbase-bytes -$(call Package/perlbase-template) -TITLE:=bytes perl module -endef - -define Package/perlbase-bytes/install -$(call perlmod/Install,$(1),bytes.pm bytes_heavy.pl,) -$(call perlmod/InstallBaseTests,$(1),lib/bytes.t) -endef - -$(eval $(call BuildPackage,perlbase-bytes)) - - -define Package/perlbase-charnames -$(call Package/perlbase-template) -TITLE:=charnames perl module -DEPENDS+=+perlbase-bytes +perlbase-essential +perlbase-re +perlbase-unicore -endef - -define Package/perlbase-charnames/install -$(call perlmod/Install,$(1),_charnames.pm charnames.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/charnames.t) -endef - -$(eval $(call BuildPackage,perlbase-charnames)) - - -define Package/perlbase-class -$(call Package/perlbase-template) -TITLE:=Class perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-class/install -$(call perlmod/Install,$(1),Class,) -$(call perlmod/InstallBaseTests,$(1),lib/Class/Struct.t) -endef - -$(eval $(call BuildPackage,perlbase-class)) - - -define Package/perlbase-compress -$(call Package/perlbase-template) -TITLE:=Compress perl module -DEPENDS+=+perlbase-bytes +perlbase-essential +perlbase-io +perlbase-scalar -endef - -define Package/perlbase-compress/install -$(call perlmod/Install,$(1),Compress auto/Compress,) -$(call perlmod/InstallBaseTests,$(1),cpan/Compress-Raw-Bzip2/t cpan/Compress-Raw-Zlib/t) -endef - -$(eval $(call BuildPackage,perlbase-compress)) - - -define Package/perlbase-config -$(call Package/perlbase-template) -TITLE:=Config perl module -endef - -define Package/perlbase-config/install -$(call perlmod/Install,$(1),Config Config.pm Config_git.pl Config_heavy.pl,) -$(call perlmod/InstallBaseTests,$(1),cpan/Config-Perl-V/t lib/Config.t lib/Config/Extensions.t) -endef - -$(eval $(call BuildPackage,perlbase-config)) - - -define Package/perlbase-cpan -$(call Package/perlbase-template) -TITLE:=CPAN perl module -DEPENDS+=+perlbase-b +perlbase-config +perlbase-cwd +perlbase-dirhandle +perlbase-essential +perlbase-extutils +perlbase-fcntl +perlbase-file +perlbase-filehandle +perlbase-http-tiny +perlbase-net +perlbase-safe +perlbase-scalar +perlbase-sys +perlbase-text -endef - -define Package/perlbase-cpan/install -$(call perlmod/Install,$(1),CPAN CPAN.pm Parse/CPAN/Meta.pm,CPAN/FirstTime.pm) -$(call perlmod/Install/NoStrip,$(1),CPAN/FirstTime.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/CPAN-Meta-Requirements/t cpan/CPAN-Meta-YAML/t cpan/CPAN-Meta/t cpan/CPAN/t cpan/Parse-CPAN-Meta/t) -endef - -$(eval $(call BuildPackage,perlbase-cpan)) - - -define Package/perlbase-cwd -$(call Package/perlbase-template) -TITLE:=Cwd perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-cwd/install -$(call perlmod/Install,$(1),Cwd.pm auto/Cwd,) -endef - -$(eval $(call BuildPackage,perlbase-cwd)) - - -define Package/perlbase-data -$(call Package/perlbase-template) -TITLE:=Data perl module -DEPENDS+=+perlbase-bytes +perlbase-essential -endef - -define Package/perlbase-data/install -$(call perlmod/Install,$(1),Data auto/Data,) -$(call perlmod/InstallBaseTests,$(1),dist/Data-Dumper/t) -endef - -$(eval $(call BuildPackage,perlbase-data)) - - -define Package/perlbase-db -$(call Package/perlbase-template) -TITLE:=DB perl module -DEPENDS+=+libdb47 +perlbase-essential +perlbase-meta-notation -endef - -define Package/perlbase-db/install -$(call perlmod/Install,$(1),DB.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/DB.t) -endef - -$(eval $(call BuildPackage,perlbase-db)) - - -define Package/perlbase-db-file -$(call Package/perlbase-template) -TITLE:=DB_File perl module -DEPENDS+=+libdb47 +perlbase-essential +perlbase-tie -endef - -define Package/perlbase-db-file/install -$(call perlmod/Install,$(1),DB_File.pm auto/DB_File,) -$(call perlmod/InstallBaseTests,$(1),cpan/DB_File/t) -endef - -$(eval $(call BuildPackage,perlbase-db-file)) - - -define Package/perlbase-dbm-filter -$(call Package/perlbase-template) -TITLE:=DBM_Filter perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-dbm-filter/install -$(call perlmod/Install,$(1),DBM_Filter DBM_Filter.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/DBM_Filter/t lib/dbm_filter_util.pl) -endef - -$(eval $(call BuildPackage,perlbase-dbm-filter)) - - -define Package/perlbase-devel -$(call Package/perlbase-template) -TITLE:=Devel perl module -DEPENDS+=+perlbase-essential +perlbase-file +perlbase-selfloader +perlbase-xsloader -endef - -define Package/perlbase-devel/install -$(call perlmod/Install,$(1),Devel auto/Devel,Devel/PPPort.pm) -$(call perlmod/Install/NoStrip,$(1),Devel/PPPort.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/Devel-PPPort/t dist/Devel-SelfStubber/t ext/Devel-Peek/t) -endef - -$(eval $(call BuildPackage,perlbase-devel)) - - -define Package/perlbase-diagnostics -$(call Package/perlbase-template) -TITLE:=diagnostics perl module -DEPENDS+=+perlbase-config +perlbase-essential +perlbase-text -endef - -define Package/perlbase-diagnostics/install -$(call perlmod/Install,$(1),diagnostics.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/diagnostics.t pod/perldiag.pod) -endef - -$(eval $(call BuildPackage,perlbase-diagnostics)) - - -define Package/perlbase-digest -$(call Package/perlbase-template) -TITLE:=Digest perl module -DEPENDS+=+perlbase-dynaloader +perlbase-essential +perlbase-fcntl +perlbase-integer -endef - -define Package/perlbase-digest/install -$(call perlmod/Install,$(1),Digest Digest.pm auto/Digest,) -$(call perlmod/InstallBaseTests,$(1),cpan/Digest-MD5/MD5.xs cpan/Digest-MD5/t cpan/Digest-SHA/t cpan/Digest/t) - $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/cpan/Digest-SHA/src -endef - -$(eval $(call BuildPackage,perlbase-digest)) - - -define Package/perlbase-dirhandle -$(call Package/perlbase-template) -TITLE:=DirHandle perl module -DEPENDS+=+perlbase-essential +perlbase-symbol -endef - -define Package/perlbase-dirhandle/install -$(call perlmod/Install,$(1),DirHandle.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/DirHandle.t) -endef - -$(eval $(call BuildPackage,perlbase-dirhandle)) - - -define Package/perlbase-dumpvalue -$(call Package/perlbase-template) -TITLE:=Dumpvalue perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-dumpvalue/install -$(call perlmod/Install,$(1),Dumpvalue.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/Dumpvalue/t) -endef - -$(eval $(call BuildPackage,perlbase-dumpvalue)) - - -define Package/perlbase-dumpvar -$(call Package/perlbase-template) -TITLE:=dumpvar perl module -endef - -define Package/perlbase-dumpvar/install -$(call perlmod/Install,$(1),dumpvar.pl,) -$(call perlmod/InstallBaseTests,$(1),lib/dumpvar.t) -endef - -$(eval $(call BuildPackage,perlbase-dumpvar)) - - -define Package/perlbase-dynaloader -$(call Package/perlbase-template) -TITLE:=DynaLoader perl module -DEPENDS+=+perlbase-config -endef - -define Package/perlbase-dynaloader/install -$(call perlmod/Install,$(1),DynaLoader.pm,) -$(call perlmod/InstallBaseTests,$(1),ext/DynaLoader/t) -endef - -$(eval $(call BuildPackage,perlbase-dynaloader)) - - -define Package/perlbase-encode -$(call Package/perlbase-template) -TITLE:=Encode perl module -DEPENDS+=+perlbase-essential +perlbase-mime +perlbase-utf8 +perlbase-xsloader -endef - -define Package/perlbase-encode/install -$(call perlmod/Install,$(1),Encode Encode.pm auto/Encode,Encode/PerlIO.pod Encode/Supported.pod) -$(call perlmod/InstallBaseTests,$(1),cpan/Encode/t) -endef - -$(eval $(call BuildPackage,perlbase-encode)) - - -define Package/perlbase-encoding -$(call Package/perlbase-template) -TITLE:=encoding perl module -DEPENDS+=+perlbase-encode +perlbase-essential -endef - -define Package/perlbase-encoding/install -$(call perlmod/Install,$(1),encoding encoding.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/encoding-warnings/t) -endef - -$(eval $(call BuildPackage,perlbase-encoding)) - - -define Package/perlbase-english -$(call Package/perlbase-template) -TITLE:=English perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-english/install -$(call perlmod/Install,$(1),English.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/English.t) -endef - -$(eval $(call BuildPackage,perlbase-english)) - - -define Package/perlbase-env -$(call Package/perlbase-template) -TITLE:=Env perl module -DEPENDS+=+perlbase-config +perlbase-tie -endef - -define Package/perlbase-env/install -$(call perlmod/Install,$(1),Env.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/Env/t) -endef - -$(eval $(call BuildPackage,perlbase-env)) - - -define Package/perlbase-errno -$(call Package/perlbase-template) -TITLE:=Errno perl module -DEPENDS+=+perlbase-config +perlbase-essential -endef - -define Package/perlbase-errno/install -$(call perlmod/Install,$(1),Errno.pm,) -$(call perlmod/InstallBaseTests,$(1),ext/Errno/t) -endef - -$(eval $(call BuildPackage,perlbase-errno)) - - -define Package/perlbase-essential -$(call Package/perlbase-template) -TITLE:=essential perl module -DEPENDS+=+perlbase-config -endef - -define Package/perlbase-essential/install -$(call perlmod/Install,$(1),Carp Carp.pm Exporter Exporter.pm constant.pm deprecate.pm lib.pm locale.pm overload.pm overloading.pm parent.pm strict.pm subs.pm vars.pm warnings warnings.pm,) -$(call perlmod/Install/NoStrip,$(1),overload/numbers.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/parent/t dist/Carp/t dist/Exporter/t dist/constant/t dist/lib/t lib/locale.t lib/overload.t lib/overload64.t lib/overloading.t lib/strict.t lib/subs.t lib/vars.t lib/vars_carp.t lib/warnings.t) -endef - -$(eval $(call BuildPackage,perlbase-essential)) - - -define Package/perlbase-experimental -$(call Package/perlbase-template) -TITLE:=experimental perl module -DEPENDS+=+perlbase-essential +perlbase-feature +perlbase-version -endef - -define Package/perlbase-experimental/install -$(call perlmod/Install,$(1),experimental.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/experimental/t) -endef - -$(eval $(call BuildPackage,perlbase-experimental)) - - -define Package/perlbase-extutils -$(call Package/perlbase-template) -TITLE:=ExtUtils perl module -DEPENDS+=+perlbase-autosplit +perlbase-base +perlbase-config +perlbase-cwd +perlbase-dirhandle +perlbase-encode +perlbase-essential +perlbase-file +perlbase-io +perlbase-ipc +perlbase-ostype +perlbase-symbol +perlbase-text -endef - -define Package/perlbase-extutils/install -$(call perlmod/Install,$(1),ExtUtils,ExtUtils/MakeMaker/FAQ.pod ExtUtils/MakeMaker/Tutorial.pod ExtUtils/ParseXS.pm ExtUtils/ParseXS/Utilities.pm) -$(call perlmod/Install/NoStrip,$(1),ExtUtils/ParseXS.pm ExtUtils/ParseXS/Utilities.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/ExtUtils-Command/t cpan/ExtUtils-Constant/t cpan/ExtUtils-Install/t cpan/ExtUtils-MakeMaker/t cpan/ExtUtils-Manifest/t dist/ExtUtils-CBuilder/t dist/ExtUtils-ParseXS/t lib/ExtUtils/t lib/h2ph.t lib/h2xs.t utils/h2ph utils/h2xs) -endef - -$(eval $(call BuildPackage,perlbase-extutils)) - - -define Package/perlbase-fatal -$(call Package/perlbase-template) -TITLE:=Fatal perl module -DEPENDS+=+perlbase-autodie +perlbase-config +perlbase-essential +perlbase-scalar +perlbase-tie -endef - -define Package/perlbase-fatal/install -$(call perlmod/Install,$(1),Fatal.pm,) -endef - -$(eval $(call BuildPackage,perlbase-fatal)) - - -define Package/perlbase-fcntl -$(call Package/perlbase-template) -TITLE:=Fcntl perl module -DEPENDS+=+perlbase-essential +perlbase-xsloader -endef - -define Package/perlbase-fcntl/install -$(call perlmod/Install,$(1),Fcntl.pm auto/Fcntl,) -$(call perlmod/InstallBaseTests,$(1),ext/Fcntl/t) -endef - -$(eval $(call BuildPackage,perlbase-fcntl)) - - -define Package/perlbase-feature -$(call Package/perlbase-template) -TITLE:=feature perl module -endef - -define Package/perlbase-feature/install -$(call perlmod/Install,$(1),feature.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/feature.t lib/feature/unicode_strings.t) -endef - -$(eval $(call BuildPackage,perlbase-feature)) - - -define Package/perlbase-fields -$(call Package/perlbase-template) -TITLE:=fields perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-fields/install -$(call perlmod/Install,$(1),fields.pm,) -endef - -$(eval $(call BuildPackage,perlbase-fields)) - - -define Package/perlbase-file -$(call Package/perlbase-template) -TITLE:=File perl module -DEPENDS+=+perlbase-class +perlbase-config +perlbase-cwd +perlbase-errno +perlbase-essential +perlbase-fcntl +perlbase-filehandle +perlbase-io +perlbase-locale +perlbase-params +perlbase-scalar +perlbase-symbol +perlbase-xsloader -endef - -define Package/perlbase-file/install -$(call perlmod/Install,$(1),File auto/File,File/Find.pm) -$(call perlmod/Install/NoStrip,$(1),File/Find.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/File-Fetch/t cpan/File-Path/t cpan/File-Temp/t dist/PathTools/t ext/File-DosGlob/t ext/File-Find/t ext/File-Glob/t lib/File/Basename.t lib/File/Compare.t lib/File/Copy.t lib/File/stat-7896.t lib/File/stat.t) -endef - -$(eval $(call BuildPackage,perlbase-file)) - - -define Package/perlbase-filecache -$(call Package/perlbase-template) -TITLE:=FileCache perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-filecache/install -$(call perlmod/Install,$(1),FileCache.pm,) -$(call perlmod/InstallBaseTests,$(1),ext/FileCache/t) -endef - -$(eval $(call BuildPackage,perlbase-filecache)) - - -define Package/perlbase-filehandle -$(call Package/perlbase-template) -TITLE:=FileHandle perl module -DEPENDS+=+perlbase-essential +perlbase-io -endef - -define Package/perlbase-filehandle/install -$(call perlmod/Install,$(1),FileHandle.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/FileHandle.t) -endef - -$(eval $(call BuildPackage,perlbase-filehandle)) - - -define Package/perlbase-filetest -$(call Package/perlbase-template) -TITLE:=filetest perl module -endef - -define Package/perlbase-filetest/install -$(call perlmod/Install,$(1),filetest.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/filetest.t) -endef - -$(eval $(call BuildPackage,perlbase-filetest)) - - -define Package/perlbase-filter -$(call Package/perlbase-template) -TITLE:=Filter perl module -DEPENDS+=+perlbase-dynaloader +perlbase-essential +perlbase-text -endef - -define Package/perlbase-filter/install -$(call perlmod/Install,$(1),Filter auto/Filter,) -$(call perlmod/InstallBaseTests,$(1),cpan/Filter-Util-Call/filter-util.pl cpan/Filter-Util-Call/t dist/Filter-Simple/t) -endef - -$(eval $(call BuildPackage,perlbase-filter)) - - -define Package/perlbase-findbin -$(call Package/perlbase-template) -TITLE:=FindBin perl module -DEPENDS+=+perlbase-cwd +perlbase-essential +perlbase-file -endef - -define Package/perlbase-findbin/install -$(call perlmod/Install,$(1),FindBin.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/FindBin.t) -endef - -$(eval $(call BuildPackage,perlbase-findbin)) - - -define Package/perlbase-gdbm-file -$(call Package/perlbase-template) -TITLE:=GDBM_File perl module -DEPENDS+=+libgdbm +perlbase-essential +perlbase-tie +perlbase-xsloader -endef - -define Package/perlbase-gdbm-file/install -$(call perlmod/Install,$(1),GDBM_File.pm auto/GDBM_File,) -$(call perlmod/InstallBaseTests,$(1),ext/GDBM_File/t) -endef - -$(eval $(call BuildPackage,perlbase-gdbm-file)) - - -define Package/perlbase-getopt -$(call Package/perlbase-template) -TITLE:=Getopt perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-getopt/install -$(call perlmod/Install,$(1),Getopt,) -$(call perlmod/InstallBaseTests,$(1),cpan/Getopt-Long/t lib/Getopt/Std.t) -endef - -$(eval $(call BuildPackage,perlbase-getopt)) - - -define Package/perlbase-hash -$(call Package/perlbase-template) -TITLE:=Hash perl module -DEPENDS+=+perlbase-essential +perlbase-scalar +perlbase-xsloader -endef - -define Package/perlbase-hash/install -$(call perlmod/Install,$(1),Hash auto/Hash,) -$(call perlmod/InstallBaseTests,$(1),ext/Hash-Util-FieldHash/t ext/Hash-Util/t) -endef - -$(eval $(call BuildPackage,perlbase-hash)) - - -define Package/perlbase-http-tiny -$(call Package/perlbase-template) -TITLE:=http-tiny perl module -DEPENDS+=+perlbase-errno +perlbase-essential +perlbase-io -endef - -define Package/perlbase-http-tiny/install -$(call perlmod/Install,$(1),HTTP/Tiny.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/HTTP-Tiny/corpus cpan/HTTP-Tiny/t) -endef - -$(eval $(call BuildPackage,perlbase-http-tiny)) - - -define Package/perlbase-i18n -$(call Package/perlbase-template) -TITLE:=I18N perl module -DEPENDS+=+perlbase-essential +perlbase-posix +perlbase-xsloader -endef - -define Package/perlbase-i18n/install -$(call perlmod/Install,$(1),I18N auto/I18N,I18N/LangTags/List.pm) -$(call perlmod/InstallBaseTests,$(1),dist/I18N-Collate/t dist/I18N-LangTags/t ext/I18N-Langinfo/t) -$(call perlmod/Install/NoStrip,$(1),I18N/LangTags/List.pm) -endef - -$(eval $(call BuildPackage,perlbase-i18n)) - - -define Package/perlbase-if -$(call Package/perlbase-template) -TITLE:=if perl module -endef - -define Package/perlbase-if/install -$(call perlmod/Install,$(1),if.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/if/t) -endef - -$(eval $(call BuildPackage,perlbase-if)) - - -define Package/perlbase-integer -$(call Package/perlbase-template) -TITLE:=integer perl module -endef - -define Package/perlbase-integer/install -$(call perlmod/Install,$(1),integer.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/integer.t) -endef - -$(eval $(call BuildPackage,perlbase-integer)) - - -define Package/perlbase-io -$(call Package/perlbase-template) -TITLE:=IO perl module -DEPENDS+=+perlbase-base +perlbase-bytes +perlbase-config +perlbase-errno +perlbase-essential +perlbase-fcntl +perlbase-list +perlbase-posix +perlbase-scalar +perlbase-selectsaver +perlbase-socket +perlbase-symbol +perlbase-tie +perlbase-xsloader -endef - -define Package/perlbase-io/install -$(call perlmod/Install,$(1),IO IO.pm auto/IO,) -$(call perlmod/InstallBaseTests,$(1),cpan/IO-Compress/t cpan/IO-Socket-IP/t cpan/IO-Zlib/t dist/IO/Makefile.PL dist/IO/t) -endef - -$(eval $(call BuildPackage,perlbase-io)) - - -define Package/perlbase-ipc -$(call Package/perlbase-template) -TITLE:=IPC perl module -DEPENDS+=+perlbase-config +perlbase-essential +perlbase-file +perlbase-locale +perlbase-params +perlbase-symbol +perlbase-text -endef - -define Package/perlbase-ipc/install -$(call perlmod/Install,$(1),IPC auto/IPC,) -$(call perlmod/InstallBaseTests,$(1),cpan/IPC-Cmd/t cpan/IPC-SysV/t ext/IPC-Open3/t) -endef - -$(eval $(call BuildPackage,perlbase-ipc)) - - -define Package/perlbase-json-pp -$(call Package/perlbase-template) -TITLE:=json-pp perl module -DEPENDS+=+perlbase-b +perlbase-base +perlbase-essential -endef - -define Package/perlbase-json-pp/install -$(call perlmod/Install,$(1),JSON/PP JSON/PP.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/JSON-PP/t) -endef - -$(eval $(call BuildPackage,perlbase-json-pp)) - - -define Package/perlbase-less -$(call Package/perlbase-template) -TITLE:=less perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-less/install -$(call perlmod/Install,$(1),less.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/less.t) -endef - -$(eval $(call BuildPackage,perlbase-less)) - - -define Package/perlbase-list -$(call Package/perlbase-template) -TITLE:=List perl module -DEPENDS+=+perlbase-essential +perlbase-xsloader -endef - -define Package/perlbase-list/install -$(call perlmod/Install,$(1),List auto/List,) -endef - -$(eval $(call BuildPackage,perlbase-list)) - - -define Package/perlbase-locale -$(call Package/perlbase-template) -TITLE:=Locale perl module -DEPENDS+=+perlbase-essential +perlbase-i18n +perlbase-integer +perlbase-utf8 -endef - -define Package/perlbase-locale/install -$(call perlmod/Install,$(1),Locale,Locale/Constants.pod Locale/Country.pod Locale/Currency.pod Locale/Language.pod Locale/Maketext.pod Locale/Maketext/TPJ13.pod Locale/Script.pod) -$(call perlmod/InstallBaseTests,$(1),cpan/Locale-Codes/t cpan/Locale-Maketext-Simple/t dist/Locale-Maketext/t) -endef - -$(eval $(call BuildPackage,perlbase-locale)) - - -define Package/perlbase-math -$(call Package/perlbase-template) -TITLE:=Math perl module -DEPENDS+=+perlbase-config +perlbase-essential +perlbase-scalar +perlbase-xsloader -endef - -define Package/perlbase-math/install -$(call perlmod/Install,$(1),Math auto/Math,) -$(call perlmod/InstallBaseTests,$(1),cpan/Math-Complex/t dist/Math-BigInt-FastCalc/t dist/Math-BigInt/t dist/Math-BigRat/t) -endef - -$(eval $(call BuildPackage,perlbase-math)) - - -define Package/perlbase-memoize -$(call Package/perlbase-template) -TITLE:=Memoize perl module -DEPENDS+=+perlbase-config +perlbase-essential +perlbase-storable -endef - -define Package/perlbase-memoize/install -$(call perlmod/Install,$(1),Memoize Memoize.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/Memoize/t) -endef - -$(eval $(call BuildPackage,perlbase-memoize)) - - -define Package/perlbase-meta-notation -$(call Package/perlbase-template) -TITLE:=meta_notation module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-meta-notation/install -$(call perlmod/Install,$(1),meta_notation.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/meta_notation.t) -endef - -$(eval $(call BuildPackage,perlbase-meta-notation)) - - -define Package/perlbase-mime -$(call Package/perlbase-template) -TITLE:=MIME perl module -DEPENDS+=+perlbase-essential +perlbase-xsloader -endef - -define Package/perlbase-mime/install -$(call perlmod/Install,$(1),MIME auto/MIME,) -$(call perlmod/InstallBaseTests,$(1),cpan/MIME-Base64/t) -endef - -$(eval $(call BuildPackage,perlbase-mime)) - - -define Package/perlbase-module -$(call Package/perlbase-template) -TITLE:=Module perl module -DEPENDS+=+perlbase-essential +perlbase-file +perlbase-filehandle +perlbase-locale +perlbase-params +perlbase-version -endef - -define Package/perlbase-module/install -$(call perlmod/Install,$(1),Module,) -$(call perlmod/InstallBaseTests,$(1),cpan/Module-Load-Conditional/t cpan/Module-Load/t cpan/Module-Loaded/t cpan/Module-Metadata/corpus cpan/Module-Metadata/lib cpan/Module-Metadata/t dist/Module-CoreList/t) -endef - -$(eval $(call BuildPackage,perlbase-module)) - - -define Package/perlbase-mro -$(call Package/perlbase-template) -TITLE:=mro perl module -DEPENDS+=+perlbase-essential +perlbase-xsloader -endef - -define Package/perlbase-mro/install -$(call perlmod/Install,$(1),auto/mro mro.pm,) -endef - -$(eval $(call BuildPackage,perlbase-mro)) - - -define Package/perlbase-net -$(call Package/perlbase-template) -TITLE:=Net perl module -DEPENDS+=+perlbase-class +perlbase-errno +perlbase-essential +perlbase-fcntl +perlbase-filehandle +perlbase-io +perlbase-posix +perlbase-socket +perlbase-symbol +perlbase-time -endef - -define Package/perlbase-net/install -$(call perlmod/Install,$(1),Net,Net/libnetFAQ.pod) -$(call perlmod/InstallBaseTests,$(1),cpan/libnet/t dist/Net-Ping/t lib/Net/hostent.t lib/Net/netent.t lib/Net/protoent.t lib/Net/servent.t) -endef - -$(eval $(call BuildPackage,perlbase-net)) - - -define Package/perlbase-next -$(call Package/perlbase-template) -TITLE:=NEXT perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-next/install -$(call perlmod/Install,$(1),NEXT.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/NEXT/t) -endef - -$(eval $(call BuildPackage,perlbase-next)) - - -define Package/perlbase-o -$(call Package/perlbase-template) -TITLE:=O perl module -DEPENDS+=+perlbase-b +perlbase-essential -endef - -define Package/perlbase-o/install -$(call perlmod/Install,$(1),O.pm,) -endef - -$(eval $(call BuildPackage,perlbase-o)) - - -define Package/perlbase-opcode -$(call Package/perlbase-template) -TITLE:=Opcode perl module -DEPENDS+=+perlbase-essential +perlbase-xsloader -endef - -define Package/perlbase-opcode/install -$(call perlmod/Install,$(1),auto/Opcode,) -$(call perlmod/Install/NoStrip,$(1),Opcode.pm,) -$(call perlmod/InstallBaseTests,$(1),ext/Opcode/t) -endef - -$(eval $(call BuildPackage,perlbase-opcode)) - - -define Package/perlbase-open -$(call Package/perlbase-template) -TITLE:=open perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-open/install -$(call perlmod/Install,$(1),open.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/open.t) -endef - -$(eval $(call BuildPackage,perlbase-open)) - - -define Package/perlbase-ops -$(call Package/perlbase-template) -TITLE:=ops perl module -DEPENDS+=+perlbase-opcode -endef - -define Package/perlbase-ops/install -$(call perlmod/Install,$(1),ops.pm,) -endef - -$(eval $(call BuildPackage,perlbase-ops)) - - -define Package/perlbase-ostype -$(call Package/perlbase-template) -TITLE:=OSType perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-ostype/install -$(call perlmod/Install,$(1),Perl/OSType.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/Perl-OSType/t) -endef - -$(eval $(call BuildPackage,perlbase-ostype)) - - -define Package/perlbase-params -$(call Package/perlbase-template) -TITLE:=Params perl module -DEPENDS+=+perlbase-essential +perlbase-locale -endef - -define Package/perlbase-params/install -$(call perlmod/Install,$(1),Params,) -$(call perlmod/InstallBaseTests,$(1),cpan/Params-Check/t) -endef - -$(eval $(call BuildPackage,perlbase-params)) - - -define Package/perlbase-perl5db -$(call Package/perlbase-template) -TITLE:=perl5db perl module -DEPENDS+=+perlbase-cwd +perlbase-essential -endef - -define Package/perlbase-perl5db/install -$(call perlmod/Install,$(1),perl5db.pl,) -$(call perlmod/InstallBaseTests,$(1),lib/perl5db.t lib/perl5db/t) -endef - -$(eval $(call BuildPackage,perlbase-perl5db)) - - -define Package/perlbase-perlio -$(call Package/perlbase-template) -TITLE:=PerlIO perl module -DEPENDS+=+perlbase-essential +perlbase-mime +perlbase-xsloader -endef - -define Package/perlbase-perlio/install -$(call perlmod/Install,$(1),PerlIO PerlIO.pm auto/PerlIO,) -$(call perlmod/InstallBaseTests,$(1),cpan/PerlIO-via-QuotedPrint/t ext/PerlIO-encoding/t ext/PerlIO-scalar/t ext/PerlIO-via/t) -endef - -$(eval $(call BuildPackage,perlbase-perlio)) - - -define Package/perlbase-pod -$(call Package/perlbase-template) -TITLE:=Pod perl module -DEPENDS+=+perlbase-config +perlbase-cwd +perlbase-encode +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-getopt +perlbase-integer +perlbase-posix +perlbase-symbol +perlbase-term +perlbase-text -endef - -define Package/perlbase-pod/install -$(call perlmod/Install,$(1),Pod,Pod/Usage.pm) -$(call perlmod/Install/NoStrip,$(1),Pod/Usage.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/Pod-Checker/t cpan/Pod-Escapes/t cpan/Pod-Parser/lib cpan/Pod-Parser/scripts cpan/Pod-Parser/t cpan/Pod-Perldoc/t cpan/Pod-Simple/t cpan/Pod-Usage/scripts cpan/Pod-Usage/t cpan/podlators/t ext/Pod-Functions/Functions.pm ext/Pod-Functions/t ext/Pod-Html/t lib/Pod/t) - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/pod2man $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/pod2text $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,perlbase-pod)) - - -define Package/perlbase-posix -$(call Package/perlbase-template) -TITLE:=POSIX perl module -DEPENDS+=+perlbase-essential +perlbase-fcntl +perlbase-tie +perlbase-xsloader -endef - -define Package/perlbase-posix/install -$(call perlmod/Install,$(1),POSIX.pm auto/POSIX,) -$(call perlmod/InstallBaseTests,$(1),ext/POSIX/Makefile.PL ext/POSIX/POSIX.xs ext/POSIX/t) -endef - -$(eval $(call BuildPackage,perlbase-posix)) - - -define Package/perlbase-re -$(call Package/perlbase-template) -TITLE:=re perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-re/install -$(call perlmod/Install,$(1),auto/re re.pm,) -$(call perlmod/InstallBaseTests,$(1),ext/re/t) -endef - -$(eval $(call BuildPackage,perlbase-re)) - - -define Package/perlbase-safe -$(call Package/perlbase-template) -TITLE:=Safe perl module -DEPENDS+=+perlbase-b +perlbase-essential +perlbase-opcode +perlbase-scalar +perlbase-utf8 -endef - -define Package/perlbase-safe/install -$(call perlmod/Install,$(1),Safe.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/Safe/t) -endef - -$(eval $(call BuildPackage,perlbase-safe)) - - -define Package/perlbase-scalar -$(call Package/perlbase-template) -TITLE:=Scalar perl module -DEPENDS+=+perlbase-essential +perlbase-list -endef - -define Package/perlbase-scalar/install -$(call perlmod/Install,$(1),Scalar Sub,) -$(call perlmod/InstallBaseTests,$(1),cpan/Scalar-List-Utils/t) - $(INSTALL_DIR) $(1)/$(PERL_TESTSDIR)/cpan/Scalar-List-Utils/blib -endef - -$(eval $(call BuildPackage,perlbase-scalar)) - - -define Package/perlbase-sdbm-file -$(call Package/perlbase-template) -TITLE:=SDBM_File perl module -DEPENDS+=+perlbase-essential +perlbase-tie +perlbase-xsloader -endef - -define Package/perlbase-sdbm-file/install -$(call perlmod/Install,$(1),SDBM_File.pm auto/SDBM_File,) -$(call perlmod/InstallBaseTests,$(1),ext/SDBM_File/t) -endef - -$(eval $(call BuildPackage,perlbase-sdbm-file)) - - -define Package/perlbase-search -$(call Package/perlbase-template) -TITLE:=Search perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-search/install -$(call perlmod/Install,$(1),Search,) -$(call perlmod/InstallBaseTests,$(1),dist/Search-Dict/t) -endef - -$(eval $(call BuildPackage,perlbase-search)) - - -define Package/perlbase-selectsaver -$(call Package/perlbase-template) -TITLE:=SelectSaver perl module -DEPENDS+=+perlbase-essential +perlbase-symbol -endef - -define Package/perlbase-selectsaver/install -$(call perlmod/Install,$(1),SelectSaver.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/SelectSaver.t) -endef - -$(eval $(call BuildPackage,perlbase-selectsaver)) - - -define Package/perlbase-selfloader -$(call Package/perlbase-template) -TITLE:=SelfLoader perl module -DEPENDS+=+perlbase-essential +perlbase-io -endef - -define Package/perlbase-selfloader/install -$(call perlmod/Install,$(1),SelfLoader.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/SelfLoader/t) -endef - -$(eval $(call BuildPackage,perlbase-selfloader)) - - -define Package/perlbase-sigtrap -$(call Package/perlbase-template) -TITLE:=sigtrap perl module -DEPENDS+=+perlbase-essential +perlbase-meta-notation -endef - -define Package/perlbase-sigtrap/install -$(call perlmod/Install,$(1),sigtrap.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/sigtrap.t) -endef - -$(eval $(call BuildPackage,perlbase-sigtrap)) - - -define Package/perlbase-socket -$(call Package/perlbase-template) -TITLE:=Socket perl module -DEPENDS+=+perlbase-essential +perlbase-xsloader -endef - -define Package/perlbase-socket/install -$(call perlmod/Install,$(1),Socket.pm auto/Socket,) -$(call perlmod/InstallBaseTests,$(1),cpan/Socket/t) -endef - -$(eval $(call BuildPackage,perlbase-socket)) - - -define Package/perlbase-sort -$(call Package/perlbase-template) -TITLE:=sort perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-sort/install -$(call perlmod/Install,$(1),sort.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/sort.t) -endef - -$(eval $(call BuildPackage,perlbase-sort)) - - -define Package/perlbase-storable -$(call Package/perlbase-template) -TITLE:=Storable perl module -DEPENDS+=+perlbase-essential +perlbase-xsloader -endef - -define Package/perlbase-storable/install -$(call perlmod/Install,$(1),Storable.pm auto/Storable,) -$(call perlmod/InstallBaseTests,$(1),dist/Storable/t) -endef - -$(eval $(call BuildPackage,perlbase-storable)) - - -define Package/perlbase-symbol -$(call Package/perlbase-template) -TITLE:=Symbol perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-symbol/install -$(call perlmod/Install,$(1),Symbol.pm,) -$(call perlmod/InstallBaseTests,$(1),lib/Symbol.t) -endef - -$(eval $(call BuildPackage,perlbase-symbol)) - - -define Package/perlbase-sys -$(call Package/perlbase-template) -TITLE:=Sys perl module -DEPENDS+=+perlbase-essential +perlbase-file +perlbase-posix +perlbase-socket -endef - -define Package/perlbase-sys/install -$(call perlmod/Install,$(1),Sys auto/Sys,) -$(call perlmod/InstallBaseTests,$(1),cpan/Sys-Syslog/t ext/Sys-Hostname/t) -endef - -$(eval $(call BuildPackage,perlbase-sys)) - - -define Package/perlbase-tap -$(call Package/perlbase-template) -TITLE:=TAP perl module -DEPENDS+=+perlbase-base +perlbase-benchmark +perlbase-config +perlbase-essential +perlbase-file +perlbase-io +perlbase-posix +perlbase-text -endef - -define Package/perlbase-tap/install -$(call perlmod/Install,$(1),TAP,) -endef - -$(eval $(call BuildPackage,perlbase-tap)) - - -define Package/perlbase-term -$(call Package/perlbase-template) -TITLE:=Term perl module -DEPENDS+=+perlbase-essential -endef - -define Package/perlbase-term/install -$(call perlmod/Install,$(1),Term,) -$(call perlmod/InstallBaseTests,$(1),cpan/Term-ANSIColor/t cpan/Term-Cap/test.pl dist/Term-Complete/t dist/Term-ReadLine/t) -endef - -$(eval $(call BuildPackage,perlbase-term)) - - -define Package/perlbase-test -$(call Package/perlbase-template) -TITLE:=Test perl module -DEPENDS+=+perlbase-base +perlbase-config +perlbase-essential +perlbase-io +perlbase-symbol +perlbase-tap +perlbase-text -endef - -define Package/perlbase-test/install -$(call perlmod/Install,$(1),Test Test.pm ok.pm,Test/Builder.pm Test/Harness/TAP.pod Test/More.pm Test/Tutorial.pod) -$(call perlmod/Install/NoStrip,$(1),Test/Builder.pm Test/More.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/Test-Harness/t cpan/Test-Simple/t cpan/Test/t) - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prove $(1)/usr/bin -endef - -$(eval $(call BuildPackage,perlbase-test)) - - -define Package/perlbase-text -$(call Package/perlbase-template) -TITLE:=Text perl module -DEPENDS+=+perlbase-essential +perlbase-selfloader -endef - -define Package/perlbase-text/install -$(call perlmod/Install,$(1),Text,) -$(call perlmod/InstallBaseTests,$(1),cpan/Text-Balanced/t cpan/Text-ParseWords/t cpan/Text-Tabs/t dist/Text-Abbrev/t) -endef - -$(eval $(call BuildPackage,perlbase-text)) - - -define Package/perlbase-thread -$(call Package/perlbase-template) -TITLE:=Thread perl module -DEPENDS+=+perlbase-essential +perlbase-scalar +perlbase-threads -endef - -define Package/perlbase-thread/install -$(call perlmod/Install,$(1),Thread Thread.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/Thread-Queue/t dist/Thread-Semaphore/t lib/Thread.t) -endef - -$(eval $(call BuildPackage,perlbase-thread)) - - -define Package/perlbase-threads -$(call Package/perlbase-template) -TITLE:=threads perl module -DEPENDS+=+perlbase-config +perlbase-essential +perlbase-scalar +perlbase-xsloader -endef - -define Package/perlbase-threads/install -$(call perlmod/Install,$(1),auto/threads threads threads.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/threads-shared/t dist/threads/t) -endef - -$(eval $(call BuildPackage,perlbase-threads)) - - -define Package/perlbase-tie -$(call Package/perlbase-template) -TITLE:=Tie perl module -DEPENDS+=+perlbase-essential +perlbase-fcntl +perlbase-xsloader -endef - -define Package/perlbase-tie/install -$(call perlmod/Install,$(1),Tie auto/Tie,) -$(call perlmod/InstallBaseTests,$(1),cpan/Tie-RefHash/t dist/Tie-File/t ext/Tie-Hash-NamedCapture/t ext/Tie-Memoize/lib/Tie/Memoize.pm ext/Tie-Memoize/t lib/Tie/Array/push.t lib/Tie/Array/splice.t lib/Tie/Array/std.t lib/Tie/Array/stdpush.t lib/Tie/ExtraHash.t lib/Tie/Handle/stdhandle.t lib/Tie/Handle/stdhandle_from_handle.t lib/Tie/Hash.t lib/Tie/Scalar.t lib/Tie/SubstrHash.t) -endef - -$(eval $(call BuildPackage,perlbase-tie)) - - -define Package/perlbase-time -$(call Package/perlbase-template) -TITLE:=Time perl module -DEPENDS+=+perlbase-class +perlbase-config +perlbase-dynaloader +perlbase-essential -endef - -define Package/perlbase-time/install -$(call perlmod/Install,$(1),Time auto/Time,) -$(call perlmod/InstallBaseTests,$(1),cpan/Time-HiRes/t cpan/Time-Local/t cpan/Time-Piece/t lib/Time/gmtime.t lib/Time/localtime.t) -endef - -$(eval $(call BuildPackage,perlbase-time)) - - -define Package/perlbase-unicode -$(call Package/perlbase-template) -TITLE:=Unicode perl module -DEPENDS+=+perlbase-base +perlbase-charnames +perlbase-dynaloader +perlbase-essential +perlbase-file -endef - -define Package/perlbase-unicode/install -$(call perlmod/Install,$(1),Unicode auto/Unicode,) -$(call perlmod/InstallBaseTests,$(1),cpan/Unicode-Collate/t cpan/Unicode-Normalize/t lib/Unicode/UCD.t) -endef - -$(eval $(call BuildPackage,perlbase-unicode)) - - -define Package/perlbase-unicore -$(call Package/perlbase-template) -TITLE:=unicore perl module -endef - -define Package/perlbase-unicore/install -$(call perlmod/Install,$(1),unicore,) -$(call perlmod/InstallBaseTests,$(1),lib/unicore/NameAliases.txt lib/unicore/PropValueAliases.txt lib/unicore/PropertyAliases.txt lib/unicore/UnicodeData.txt) -endef - -$(eval $(call BuildPackage,perlbase-unicore)) - - -define Package/perlbase-universal -$(call Package/perlbase-template) -TITLE:=UNIVERSAL perl module -endef - -define Package/perlbase-universal/install -$(call perlmod/Install,$(1),UNIVERSAL.pm,) -endef - -$(eval $(call BuildPackage,perlbase-universal)) - - -define Package/perlbase-user -$(call Package/perlbase-template) -TITLE:=User perl module -DEPENDS+=+perlbase-class +perlbase-config +perlbase-essential -endef - -define Package/perlbase-user/install -$(call perlmod/Install,$(1),User,) -$(call perlmod/InstallBaseTests,$(1),lib/User/grent.t lib/User/pwent.t) -endef - -$(eval $(call BuildPackage,perlbase-user)) - - -define Package/perlbase-utf8 -$(call Package/perlbase-template) -TITLE:=utf8 perl module -DEPENDS+=+perlbase-essential +perlbase-re +perlbase-unicore -endef - -define Package/perlbase-utf8/install -$(call perlmod/Install,$(1),utf8.pm utf8_heavy.pl,) -$(call perlmod/InstallBaseTests,$(1),lib/utf8.t) -endef - -$(eval $(call BuildPackage,perlbase-utf8)) - - -define Package/perlbase-version -$(call Package/perlbase-template) -TITLE:=version perl module -DEPENDS+=+perlbase-config +perlbase-essential -endef - -define Package/perlbase-version/install -$(call perlmod/Install,$(1),version version.pm,) -$(call perlmod/InstallBaseTests,$(1),cpan/version/t) -endef - -$(eval $(call BuildPackage,perlbase-version)) - - -define Package/perlbase-xsloader -$(call Package/perlbase-template) -TITLE:=XSLoader perl module -endef - -define Package/perlbase-xsloader/install -$(call perlmod/Install,$(1),XSLoader.pm,) -$(call perlmod/InstallBaseTests,$(1),dist/XSLoader/t ext/XS-APItest/t ext/XS-Typemap/t) -endef - -$(eval $(call BuildPackage,perlbase-xsloader)) - - -# Generated Fri Sep 25 07:47:59 2015 diff --git a/lang/perl/perlmod.mk b/lang/perl/perlmod.mk deleted file mode 100644 index be56608..0000000 --- a/lang/perl/perlmod.mk +++ /dev/null @@ -1,166 +0,0 @@ -# This makefile simplifies perl module builds. -# - -PERL_VERSION:=5.22 - -# Build environment -HOST_PERL_PREFIX:=$(STAGING_DIR_HOSTPKG)/usr -ifneq ($(CONFIG_USE_GLIBC),) - EXTRA_LIBS:=bsd - EXTRA_LIBDIRS:=$(STAGING_DIR)/lib -endif -PERL_CMD:=$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION).0 - -MOD_CFLAGS_PERL:=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -ifdef CONFIG_PERL_THREADS - MOD_CFLAGS_PERL+= -D_REENTRANT -D_GNU_SOURCE -endif - -# Module install prefix -PERL_SITELIB:=/usr/lib/perl5/$(PERL_VERSION) -PERL_TESTSDIR:=/usr/share/perl/perl-tests -PERLBASE_TESTSDIR:=/usr/share/perl/perlbase-tests -PERLMOD_TESTSDIR:=/usr/share/perl/perlmod-tests - -define perlmod/host/relink - rm -f $(1)/Makefile.aperl - $(MAKE) -C $(1) perl - $(CP) $(1)/perl $(PERL_CMD) - $(CP) $(1)/perl $(STAGING_DIR_HOSTPKG)/usr/bin/perl -endef - -define perlmod/host/Configure - (cd $(HOST_BUILD_DIR); \ - PERL_MM_USE_DEFAULT=1 \ - $(2) \ - $(PERL_CMD) Makefile.PL \ - $(1) \ - ); -endef - -define perlmod/host/Compile - $(2) \ - $(MAKE) -C $(HOST_BUILD_DIR) \ - $(1) \ - install -endef - -define perlmod/host/Install - $(2) \ - $(MAKE) -C $(HOST_BUILD_DIR) \ - $(1) \ - install - $(call perlmod/host/relink,$(HOST_BUILD_DIR)) -endef - -define perlmod/Configure - (cd $(if $(3),$(3),$(PKG_BUILD_DIR)); \ - PERL_MM_USE_DEFAULT=1 \ - $(2) \ - $(PERL_CMD) -MConfig -e '$$$${tied %Config::Config}{cpprun}="$(GNU_TARGET_NAME)-cpp -E"; do "Makefile.PL"' \ - $(1) \ - AR=ar \ - CC=$(GNU_TARGET_NAME)-gcc \ - CCFLAGS="$(MOD_CFLAGS_PERL)" \ - CCCDLFLAGS=-fPIC \ - CCDLFLAGS=-Wl,-E \ - DLEXT=so \ - DLSRC=dl_dlopen.xs \ - EXE_EXT=" " \ - FULL_AR=$(GNU_TARGET_NAME)-ar \ - LD=$(GNU_TARGET_NAME)-gcc \ - LDDLFLAGS="-shared -rdynamic $(TARGET_LDFLAGS)" \ - LDFLAGS="$(EXTRA_LIBDIRS:%=-L%) $(EXTRA_LIBS:%=-l%) " \ - LIBC=" " \ - LIB_EXT=.a \ - OBJ_EXT=.o \ - OSNAME=linux \ - OSVERS=2.4.30 \ - RANLIB=: \ - SITELIBEXP=" " \ - SITEARCHEXP=" " \ - SO=so \ - VENDORARCHEXP=" " \ - VENDORLIBEXP=" " \ - SITEPREFIX=/usr \ - INSTALLPRIVLIB=$(PERL_SITELIB) \ - INSTALLSITELIB=$(PERL_SITELIB) \ - INSTALLVENDORLIB=" " \ - INSTALLARCHLIB=$(PERL_SITELIB) \ - INSTALLSITEARCH=$(PERL_SITELIB) \ - INSTALLVENDORARCH=" " \ - INSTALLBIN=/usr/bin \ - INSTALLSITEBIN=/usr/bin \ - INSTALLVENDORBIN=" " \ - INSTALLSCRIPT=/usr/bin \ - INSTALLSITESCRIPT=/usr/bin \ - INSTALLVENDORSCRIPT=" " \ - INSTALLMAN1DIR=/usr/man/man1 \ - INSTALLSITEMAN1DIR=/usr/man/man1 \ - INSTALLVENDORMAN1DIR=" " \ - INSTALLMAN3DIR=/usr/man/man3 \ - INSTALLSITEMAN3DIR=/usr/man/man3 \ - INSTALLVENDORMAN3DIR=" " \ - LINKTYPE=dynamic \ - DESTDIR=$(PKG_INSTALL_DIR) \ - ); - sed 's!^PERL_INC = .*!PERL_INC = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)/CORE/!' -i $(if $(3),$(3),$(PKG_BUILD_DIR))/Makefile -endef - -define perlmod/Compile - PERL5LIB=$(PERL_LIB) \ - $(2) \ - $(MAKE) -C $(if $(3),$(3),$(PKG_BUILD_DIR)) \ - $(1) \ - install -endef - -define perlmod/Install/NoStrip - $(INSTALL_DIR) $(strip $(1))$(PERL_SITELIB) - (cd $(PKG_INSTALL_DIR)$(PERL_SITELIB) && \ - rsync --relative -rlHp --itemize-changes \ - --exclude=\*.pod \ - --exclude=.packlist \ - $(addprefix --exclude=/,$(strip $(3))) \ - --prune-empty-dirs \ - $(strip $(2)) $(strip $(1))$(PERL_SITELIB)) - - chmod -R u+w $(strip $(1))$(PERL_SITELIB) -endef - - -define perlmod/_DoStrip - @echo "---> Stripping modules in: $(strip $(1))$(PERL_SITELIB)" - find $(strip $(1))$(PERL_SITELIB) -name \*.pm -or -name \*.pl | \ - xargs -r sed -i \ - -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,/^=cut/d' \ - -e '/^=\(head\|pod\|item\|over\|back\|encoding\|begin\|end\|for\)/,$$$$d' \ - -e '/^#$$$$/d' \ - -e '/^#[^!"'"'"']/d' -endef - -define perlmod/Install - $(call perlmod/Install/NoStrip,$(1),$(2),$(3)) - - $(if $(CONFIG_PERL_NOCOMMENT),$(if $(PKG_LEAVE_COMMENTS),,$(call perlmod/_DoStrip,$(1),$(2),$(3)))) -endef - -# You probably don't want to use this directly. Look at perlmod/InstallTests -define perlmod/_InstallTests - $(INSTALL_DIR) $(strip $(1)) - (cd $(PKG_BUILD_DIR)/$(2) && \ - rsync --relative -rlHp --itemize-changes \ - --exclude=.packlist \ - --prune-empty-dirs \ - $(strip $(3)) $(strip $(1))) - - chmod -R u+w $(strip $(1)) -endef - -define perlmod/InstallBaseTests - $(if $(CONFIG_PERL_TESTS),$(call perlmod/_InstallTests,$(1)$(PERL_TESTSDIR),,$(2))) -endef - -define perlmod/InstallTests - $(if $(CONFIG_PERL_TESTS),$(call perlmod/_InstallTests,$(1)$(PERL_TESTSDIR),$(2),$(3))) -endef diff --git a/lang/php7-pecl-dio/Makefile b/lang/php7-pecl-dio/Makefile deleted file mode 100644 index 9c1d52e..0000000 --- a/lang/php7-pecl-dio/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PECL_NAME:=dio -PECL_LONGNAME:=Direct I/O functions - -PKG_VERSION:=0.0.9 -PKG_RELEASE:=1 -PKG_MD5SUM:=2c80b63fbbbaead856cb468955c14dc328d1262621b0c704b122d902053c8156 - -PKG_NAME:=php7-pecl-$(PECL_NAME) -PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://pecl.php.net/get/ - -PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 - -PKG_MAINTAINER:=Michael Heimpold - -PKG_LICENSE:=PHPv3.01 -PKG_LICENSE_FILES:= - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../php7/pecl.mk - -$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME))) -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-http/Makefile b/lang/php7-pecl-http/Makefile deleted file mode 100644 index be9267a..0000000 --- a/lang/php7-pecl-http/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PECL_NAME:=pecl_http -PECL_LONGNAME:=Extended HTTP Support - -PKG_VERSION:=3.1.0 -PKG_RELEASE:=2 -PKG_MD5SUM:=e3de67b156e7d5f6c2e5eb1e2b5f0acceb7004f1260d68c9f8b2c0f9629aabf0 - -PKG_NAME:=php7-pecl-http -PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://pecl.php.net/get/ - -PKG_MAINTAINER:=Michael Heimpold - -PKG_LICENSE:=BSD-2-Clause -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DEPENDS:=php7 php7-pecl-propro php7-pecl-raphf -PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../php7/pecl.mk - -CONFIGURE_VARS+= \ - PECL_cv_HAVE_EXT_propro=yes \ - PECL_cv_HAVE_EXT_raphf=yes \ - PECL_cv_HAVE_LIBCURL_ARES=no \ - PECL_cv_HAVE_LIBCURL_OpenSSL=$(if $(CONFIG_LIBCURL_OPENSSL),yes,no) \ - PECL_cv_HAVE_LIBCURL_GnuTLS=$(if $(CONFIG_LIBCURL_GNUTLS),yes,no) \ - PECL_cv_HAVE_LIBCURL_NSS=no \ - PECL_cv_HAVE_LIBCURL_SecureTransport=no \ - PECL_cv_HAVE_LIBCURL_GSKit=no \ - PECL_cv_HAVE_LIBCURL_PolarSSL=no \ - PECL_cv_HAVE_LIBCURL_WolfSSL=$(if $(CONFIG_LIBCURL_CYASSL),yes,no) \ - PECL_cv_HAVE_LIBCURL_mbedTLS=$(if $(CONFIG_LIBCURL_MBEDTLS),yes,no) \ - PECL_cv_HAVE_LIBCURL_axTLS=no \ - PECL_cv_LIBCURL_TLSAUTH_SRP=$(if $(CONFIG_LIBCURL_TLS_SRP),yes,no) \ - -CONFIGURE_ARGS+= \ - --with-http \ - --without-http-shared-deps \ - --with-http-libcurl-dir="$(STAGING_DIR)/usr" \ - --with-http-libevent-dir="$(STAGING_DIR)/usr" \ - --with-http-libidn-dir="$(STAGING_DIR)/usr" - -$(eval $(call PECLPackage,http,$(PECL_LONGNAME),+icu +libcurl +librt +libevent2 +libidn +php7-mod-iconv +php7-mod-session +php7-pecl-raphf +php7-pecl-propro,30)) -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-http/patches.old/100_config9-m4.patch b/lang/php7-pecl-http/patches.old/100_config9-m4.patch deleted file mode 100644 index 304a1df..0000000 --- a/lang/php7-pecl-http/patches.old/100_config9-m4.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/config9.m4 2016-09-08 21:39:18.000000000 +0200 -+++ b/config9.m4 2016-09-08 21:42:35.066903251 +0200 -@@ -71,18 +71,7 @@ - extname=$1 - haveext=$[PHP_]translit($1,a-z_-,A-Z__) - AC_MSG_CHECKING([for ext/$extname support]) -- if test -x "$PHP_EXECUTABLE"; then -- grepext=`$PHP_EXECUTABLE -m | $EGREP ^$extname\$` -- if test "$grepext" = "$extname"; then -- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1 -- AC_MSG_RESULT([yes]) -- $2 -- else -- [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)= -- AC_MSG_RESULT([no]) -- $3 -- fi -- elif test "$haveext" != "no" && test "x$haveext" != "x"; then -+ if test "$haveext" != "no" && test "x$haveext" != "x"; then - [PHP_HTTP_HAVE_EXT_]translit($1,a-z_-,A-Z__)=1 - AC_MSG_RESULT([yes]) - $2 diff --git a/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch b/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch deleted file mode 100644 index ee925c4..0000000 --- a/lang/php7-pecl-http/patches/100_php_http_etag_bigendian_check.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/php_http_etag.c 2016-12-12 10:04:21.000000000 +0100 -+++ b/src/php_http_etag.c 2016-12-23 21:10:59.523222367 +0100 -@@ -60,7 +60,7 @@ - unsigned char buf[4]; - - *((uint *) e->ctx) = ~*((uint *) e->ctx); --#if WORDS_BIGENDIAN -+#ifdef WORDS_BIGENDIAN - etag = php_http_etag_digest((unsigned char *) e->ctx, 4); - #else - buf[0] = ((unsigned char *) e->ctx)[3]; diff --git a/lang/php7-pecl-libevent/Makefile b/lang/php7-pecl-libevent/Makefile deleted file mode 100644 index 272b34a..0000000 --- a/lang/php7-pecl-libevent/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PECL_NAME:=libevent -PECL_LONGNAME:=Libevent - event notification - -PKG_NAME:=php7-pecl-$(PECL_NAME) -PKG_VERSION=2016-08-30-$(PKG_SOURCE_VERSION) -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/expressif/pecl-event-libevent.git -PKG_SOURCE_VERSION:=9e72744ce6224beafc7b54ce2a3a990f1c552a5a -PKG_SOURCE_SUBDIR:=$(PECL_NAME)-$(PKG_SOURCE_VERSION) -PKG_SOURCE:=$(PECL_NAME)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_MAINTAINER:=Michael Heimpold - -PKG_LICENSE:=PHPv3.01 -PKG_LICENSE_FILES:= - -PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_SOURCE_VERSION) -PKG_BUILD_PARALLEL:=1 - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../php7/pecl.mk - -CONFIGURE_ARGS+= --with-libevent=shared,"$(STAGING_DIR)/usr" - -$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME),+libevent2 +php7-mod-sockets,25)) -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-libevent/patches/010-libevent2.patch b/lang/php7-pecl-libevent/patches/010-libevent2.patch deleted file mode 100644 index 961fb36..0000000 --- a/lang/php7-pecl-libevent/patches/010-libevent2.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/libevent.c -+++ b/libevent.c -@@ -42,10 +42,12 @@ - (rsrc = (rsrc_type) zend_fetch_resource(passed_id TSRMLS_CC, default_id, resource_type_name, NULL, 1, resource_type)) - #endif - --#ifdef PHP_WIN32 -+//#ifdef PHP_WIN32 - /* XXX compiling with 2.x on Windows. Luckily the ext code works thanks to the - compat exports from the libevent. However it might need to be adapted to the - never version, so this ifdefs would go away. */ -+#if 1 -+/* force use of libevent2 on OpenWrt and by-pass compat event.h */ - # include - # include - # include diff --git a/lang/php7-pecl-propro/Makefile b/lang/php7-pecl-propro/Makefile deleted file mode 100644 index 3bfe535..0000000 --- a/lang/php7-pecl-propro/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PECL_NAME:=propro -PECL_LONGNAME:=Property proxy - -PKG_VERSION:=2.0.1 -PKG_RELEASE:=2 -PKG_MD5SUM:=19f9517210a87e18cc09faed262e1522 - -PKG_NAME:=php7-pecl-propro -PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://pecl.php.net/get/ - -PKG_MAINTAINER:=Michael Heimpold - -PKG_LICENSE:=BSD-2-Clause -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../php7/pecl.mk - -CONFIGURE_ARGS+= \ - --enable-propro - -define Build/InstallDev - mkdir -p $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME) - $(CP) $(PKG_BUILD_DIR)/php_propro.h $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME)/ - $(CP) $(PKG_BUILD_DIR)/php_propro_api.h $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME)/ -endef - -$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME))) -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7-pecl-raphf/Makefile b/lang/php7-pecl-raphf/Makefile deleted file mode 100644 index 4ce09f9..0000000 --- a/lang/php7-pecl-raphf/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PECL_NAME:=raphf -PECL_LONGNAME:=Resource and persistent handles factory - -PKG_VERSION:=2.0.0 -PKG_RELEASE:=2 -PKG_MD5SUM:=bc465eb5caa9d0f09cced121a8ac2e8e - -PKG_NAME:=php7-pecl-raphf -PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://pecl.php.net/get/ - -PKG_MAINTAINER:=Michael Heimpold - -PKG_LICENSE:=BSD-2-Clause -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php7/$(PECL_NAME)-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../php7/pecl.mk - -CONFIGURE_ARGS+= \ - --enable-raphf - -define Build/InstallDev - mkdir -p $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME) - cp $(PKG_BUILD_DIR)/php_raphf.h $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME)/ - cp $(PKG_BUILD_DIR)/php_raphf_api.h $(STAGING_DIR)/usr/include/php7/ext/$(PECL_NAME)/ -endef - -$(eval $(call PECLPackage,$(PECL_NAME),$(PECL_LONGNAME))) -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/lang/php7/Makefile b/lang/php7/Makefile deleted file mode 100644 index 6cd2beb..0000000 --- a/lang/php7/Makefile +++ /dev/null @@ -1,594 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=php -PKG_VERSION:=7.1.1 -PKG_RELEASE:=1 - -PKG_MAINTAINER:=Michael Heimpold - -PKG_LICENSE:=PHPv3.01 -PKG_LICENSE_FILES:=LICENSE - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_MD5SUM:=65eef256f6e7104a05361939f5e23ada -PKG_HASH:=b3565b0c1441064eba204821608df1ec7367abff881286898d900c2c2a5ffe70 - -PKG_FIXUP:=libtool autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 - -PHP7_MODULES = \ - calendar ctype curl \ - fileinfo \ - dom \ - exif \ - ftp \ - gettext gd gmp \ - hash \ - iconv intl \ - json \ - ldap \ - mbstring mcrypt mysqli \ - opcache openssl \ - pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql phar \ - session shmop simplexml soap sockets sqlite3 sysvmsg sysvsem sysvshm \ - tokenizer \ - xml xmlreader xmlwriter zip \ - -PKG_CONFIG_DEPENDS:= \ - $(patsubst %,CONFIG_PACKAGE_php7-mod-%,$(PHP7_MODULES)) \ - CONFIG_PHP7_FILTER CONFIG_PHP7_LIBXML CONFIG_PHP7_SYSTEMTZDATA - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/php7/Default - SUBMENU:=PHP - SECTION:=lang - CATEGORY:=Languages - TITLE:=PHP7 Hypertext preprocessor - URL:=http://www.php.net/ - DEPENDS:=php7 -endef - -define Package/php7/Default/description - PHP is a widely-used general-purpose scripting language that is especially - suited for Web development and can be embedded into HTML. -endef - -define Package/php7/config - config PHP7_FILTER - bool "PHP7 Filter support" - depends on PACKAGE_php7-cli || PACKAGE_php7-cgi - - config PHP7_LIBXML - bool "PHP7 LIBXML support" - depends on PACKAGE_php7-cli || PACKAGE_php7-cgi - - config PHP7_SYSTEMTZDATA - bool "Use system timezone data instead of php's built-in database" - depends on PACKAGE_php7-cli || PACKAGE_php7-cgi - select PACKAGE_zoneinfo-core - default y - help - Enabling this feature automatically selects the zoneinfo-core package - which contains data for UTC timezone. To use other timezones you have - to install the corresponding zoneinfo-... package(s). -endef - -define Package/php7 - $(call Package/php7/Default) - - DEPENDS:=+libpcre +zlib \ - +PHP7_LIBXML:libxml2 -endef - -define Package/php7/description - $(call Package/php7/Default/description) - This package contains only the PHP config file. You must actually choose - your PHP flavour (cli, cgi or fastcgi). - - Please note, that installing php5 and php7 in parallel on the same target - is not supported in OpenWrt/LEDE. -endef - -define Package/php7-cli - $(call Package/php7/Default) - DEPENDS+= +PACKAGE_php7-mod-intl:libstdcpp - TITLE+= (CLI) -endef - -define Package/php7-cli/description - $(call Package/php7/Default/description) - This package contains the CLI version of the PHP7 interpreter. -endef - -define Package/php7-cgi - $(call Package/php7/Default) - DEPENDS+= +PACKAGE_php7-mod-intl:libstdcpp - TITLE+= (CGI & FastCGI) -endef - -define Package/php7-cgi/description - $(call Package/php7/Default/description) - This package contains the CGI version of the PHP7 interpreter. -endef - -define Package/php7-fastcgi - $(call Package/php7/Default) - DEPENDS+= +php7-cgi - TITLE:=FastCGI startup script -endef - -define Package/php7-fastcgi/description - As FastCGI support is now a core feature the php7-fastcgi package now depends - on the php7-cgi package, containing just the startup script. -endef - -define Package/php7-fpm - $(call Package/php7/Default) - DEPENDS+= +php7-cgi - TITLE+= (FPM) -endef - -define Package/php7-fpm/description - $(call Package/php7/Default/description) - This package contains the FastCGI Process Manager of the PHP7 interpreter. -endef - -CONFIGURE_ARGS+= \ - --enable-cli \ - --enable-cgi \ - --enable-fpm \ - --enable-shared \ - --disable-static \ - --disable-rpath \ - --disable-debug \ - --disable-phpdbg \ - --without-pear \ - \ - --with-config-file-path=/etc \ - --with-config-file-scan-dir=/etc/php7 \ - --disable-short-tags \ - \ - --with-zlib="$(STAGING_DIR)/usr" \ - --with-zlib-dir="$(STAGING_DIR)/usr" - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-calendar),) - CONFIGURE_ARGS+= --enable-calendar=shared -else - CONFIGURE_ARGS+= --disable-calendar -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ctype),) - CONFIGURE_ARGS+= --enable-ctype=shared -else - CONFIGURE_ARGS+= --disable-ctype -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-curl),) - CONFIGURE_ARGS+= --with-curl=shared,"$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS+= --without-curl -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-fileinfo),) - CONFIGURE_ARGS+= --enable-fileinfo=shared -else - CONFIGURE_ARGS+= --disable-fileinfo -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gettext),) - CONFIGURE_ARGS+= --with-gettext=shared,"$(STAGING_DIR)/usr/lib/libintl-full" -else - CONFIGURE_ARGS+= --without-gettext -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-dom),) - CONFIGURE_ARGS+= --enable-dom=shared -else - CONFIGURE_ARGS+= --disable-dom -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-exif),) - CONFIGURE_ARGS+= --enable-exif=shared -else - CONFIGURE_ARGS+= --disable-exif -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ftp),) - CONFIGURE_ARGS+= --enable-ftp=shared -else - CONFIGURE_ARGS+= --disable-ftp -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gd),) - CONFIGURE_ARGS+= \ - --with-gd=shared \ - --without-freetype-dir \ - --with-jpeg-dir="$(STAGING_DIR)/usr" \ - --with-png-dir="$(STAGING_DIR)/usr" \ - --without-xpm-dir \ - --without-t1lib \ - --enable-gd-native-ttf \ - --disable-gd-jis-conv -else - CONFIGURE_ARGS+= --without-gd -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-gmp),) - CONFIGURE_ARGS+= --with-gmp=shared,"$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS+= --without-gmp -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-hash),) - CONFIGURE_ARGS+= --enable-hash=shared -else - CONFIGURE_ARGS+= --disable-hash -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-iconv),) - CONFIGURE_ARGS+= --with-iconv=shared,"$(ICONV_PREFIX)" -else - CONFIGURE_ARGS+= --without-iconv -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-intl),) - CONFIGURE_ARGS+= --enable-intl=shared -else - CONFIGURE_ARGS+= --disable-intl -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-json),) - CONFIGURE_ARGS+= --enable-json=shared -else - CONFIGURE_ARGS+= --disable-json -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-ldap),) - CONFIGURE_ARGS+= \ - --with-ldap=shared,"$(STAGING_DIR)/usr" \ - --with-ldap-sasl="$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS+= --without-ldap -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mbstring),) - CONFIGURE_ARGS+= --enable-mbstring=shared --enable-mbregex -else - CONFIGURE_ARGS+= --disable-mbstring -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mcrypt),) - CONFIGURE_ARGS+= --with-mcrypt=shared,"$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS+= --without-mcrypt -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-mysqli),) - CONFIGURE_ARGS+= --with-mysqli=shared,"$(STAGING_DIR)/usr/bin/mysql_config" -else - CONFIGURE_ARGS+= --without-mysqli -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-opcache),) - CONFIGURE_ARGS+= --enable-opcache=shared -else - CONFIGURE_ARGS+= --disable-opcache -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-openssl),) - CONFIGURE_ARGS+= \ - --with-openssl=shared,"$(STAGING_DIR)/usr" \ - --with-kerberos=no \ - --with-openssl-dir="$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS+= --without-openssl -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pcntl),) - CONFIGURE_ARGS+= --enable-pcntl=shared -else - CONFIGURE_ARGS+= --disable-pcntl -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo),) - CONFIGURE_ARGS+= --enable-pdo=shared - ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-mysql),) - CONFIGURE_ARGS+= --with-pdo-mysql=shared,"$(STAGING_DIR)/usr" - else - CONFIGURE_ARGS+= --without-pdo-mysql - endif - ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-pgsql),) - CONFIGURE_ARGS+= --with-pdo-pgsql=shared,"$(STAGING_DIR)/usr" - else - CONFIGURE_ARGS+= --without-pdo-pgsql - endif - ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pdo-sqlite),) - CONFIGURE_ARGS+= --with-pdo-sqlite=shared,"$(STAGING_DIR)/usr" - else - CONFIGURE_ARGS+= --without-pdo-sqlite - endif -else - CONFIGURE_ARGS+= --disable-pdo -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-pgsql),) - CONFIGURE_ARGS+= --with-pgsql=shared,"$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS+= --without-pgsql -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-phar),) - CONFIGURE_ARGS+= --enable-phar=shared -else - CONFIGURE_ARGS+= --disable-phar -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-session),) - CONFIGURE_ARGS+= --enable-session=shared -else - CONFIGURE_ARGS+= --disable-session -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-shmop),) - CONFIGURE_ARGS+= --enable-shmop=shared -else - CONFIGURE_ARGS+= --disable-shmop -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-simplexml),) - CONFIGURE_ARGS+= --enable-simplexml=shared -else - CONFIGURE_ARGS+= --disable-simplexml -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-soap),) - CONFIGURE_ARGS+= --enable-soap=shared -else - CONFIGURE_ARGS+= --disable-soap -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sockets),) - CONFIGURE_ARGS+= --enable-sockets=shared -else - CONFIGURE_ARGS+= --disable-sockets -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sqlite3),) - CONFIGURE_ARGS+= --with-sqlite3=shared,"$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS+= --without-sqlite3 -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvmsg),) - CONFIGURE_ARGS+= --enable-sysvmsg=shared -else - CONFIGURE_ARGS+= --disable-sysvmsg -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvsem),) - CONFIGURE_ARGS+= --enable-sysvsem=shared -else - CONFIGURE_ARGS+= --disable-sysvsem -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-sysvshm),) - CONFIGURE_ARGS+= --enable-sysvshm=shared -else - CONFIGURE_ARGS+= --disable-sysvshm -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-tokenizer),) - CONFIGURE_ARGS+= --enable-tokenizer=shared -else - CONFIGURE_ARGS+= --disable-tokenizer -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xml),) - CONFIGURE_ARGS+= --enable-xml=shared,"$(STAGING_DIR)/usr" - ifneq ($(CONFIG_PHP7_LIBXML),) - CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2" - else - CONFIGURE_ARGS+= --with-libexpat-dir="$(STAGING_DIR)/usr" - endif -else - CONFIGURE_ARGS+= --disable-xml -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xmlreader),) - CONFIGURE_ARGS+= --enable-xmlreader=shared,"$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS+= --disable-xmlreader -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_php7-mod-xmlwriter),) - CONFIGURE_ARGS+= --enable-xmlwriter=shared,"$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS+= --disable-xmlwriter -endif - -ifneq ($(CONFIG_PACKAGE_php7-mod-zip),) - CONFIGURE_ARGS+= --enable-zip=shared -else - CONFIGURE_ARGS+= --disable-zip -endif - -ifneq ($(SDK)$(CONFIG_PHP7_FILTER),) - CONFIGURE_ARGS+= --enable-filter -else - CONFIGURE_ARGS+= --disable-filter -endif - -ifneq ($(SDK)$(CONFIG_PHP7_LIBXML),) - CONFIGURE_ARGS+= --enable-libxml - CONFIGURE_ARGS+= --with-libxml-dir="$(STAGING_DIR)/usr/include/libxml2" -else - CONFIGURE_ARGS+= --disable-libxml -endif - -#ifneq ($(CONFIG_PHP7_SYSTEMTZDATA),) -# CONFIGURE_ARGS+= --with-system-tzdata -#else -# CONFIGURE_ARGS+= --without-system-tzdata -#endif - -CONFIGURE_VARS+= \ - ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no) \ - php_cv_cc_rpath="no" \ - iconv_impl_name="gnu_libiconv" \ - ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \ - -define Package/php7/conffiles -/etc/php.ini -endef - -define Package/php7/install - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/php.ini $(1)/etc/ -endef - -define Package/php7-cli/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_BUILD_DIR)/sapi/cli/php $(1)/usr/bin/php-cli -endef - -define Package/php7-cgi/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_BUILD_DIR)/sapi/cgi/php-cgi $(1)/usr/bin/php-cgi - ln -sf php-cgi $(1)/usr/bin/php-fcgi -endef - -define Package/php7-fastcgi/install - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/php7-fastcgi.config $(1)/etc/config/php7-fastcgi - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/php7-fastcgi.init $(1)/etc/init.d/php7-fastcgi -endef - -define Package/php7-fpm/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/sapi/fpm/php-fpm $(1)/usr/bin/php-fpm - - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/php7-fpm.conf $(1)/etc/php7-fpm.conf - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/php7-fpm.config $(1)/etc/config/php7-fpm - - $(INSTALL_DIR) $(1)/etc/php7-fpm.d - $(INSTALL_DATA) ./files/php7-fpm-www.conf $(1)/etc/php7-fpm.d/www.conf - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/php7-fpm.init $(1)/etc/init.d/php7-fpm -endef - -define Build/Prepare - $(call Build/Prepare/Default) - ( cd $(PKG_BUILD_DIR); touch configure.in; ./buildconf --force ) -endef - -define Build/InstallDev - rm -rf $(PKG_BUILD_DIR)/staging - make -C $(PKG_BUILD_DIR) install INSTALL_ROOT=$(PKG_BUILD_DIR)/staging - rm -rf $(PKG_BUILD_DIR)/staging/usr/{share,man,sbin} - rm -f $(PKG_BUILD_DIR)/staging/usr/bin/{php,php-cgi,php-cli} - mv $(PKG_BUILD_DIR)/staging/usr/bin/phpize $(PKG_BUILD_DIR)/staging/usr/bin/phpize7 - mv $(PKG_BUILD_DIR)/staging/usr/bin/php-config $(PKG_BUILD_DIR)/staging/usr/bin/php7-config - mv $(PKG_BUILD_DIR)/staging/usr/include/php $(PKG_BUILD_DIR)/staging/usr/include/php7 - mv $(PKG_BUILD_DIR)/staging/usr/lib/php $(PKG_BUILD_DIR)/staging/usr/lib/php7 - - $(CP) $(PKG_BUILD_DIR)/staging/usr $(STAGING_DIR)/ - - sed -i -e "s#prefix='/usr'#prefix='$(STAGING_DIR)/usr'#" $(STAGING_DIR)/usr/bin/phpize7 - sed -i -e "s#exec_prefix=\"\`eval echo /usr\`\"#exec_prefix='$(STAGING_DIR)/usr'#" $(STAGING_DIR)/usr/bin/phpize7 - sed -i -e "s#/include\`/php\"#/include\`/php7\"#" $(STAGING_DIR)/usr/bin/phpize7 - sed -i -e "s#/lib/php\`/build\"#/lib/php7\`/build\"#" $(STAGING_DIR)/usr/bin/phpize7 - - sed -i -e "s#prefix=\"/usr\"#prefix=\"$(STAGING_DIR)/usr\"#" $(STAGING_DIR)/usr/bin/php7-config - sed -i -e "s#/include/php\"#/include/php7\"#" $(STAGING_DIR)/usr/bin/php7-config -endef - -define BuildModule - - define Package/php7-mod-$(1) - $(call Package/php7/Default) - - ifneq ($(3),) - DEPENDS+=$(3) - endif - - TITLE:=$(2) shared module - endef - - define Package/php7-mod-$(1)/install - $(INSTALL_DIR) $$(1)/usr/lib/php - $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/ - $(INSTALL_DIR) $$(1)/etc/php7 - ifeq ($(5),zend) - echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini - else - echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php7/$(if $(4),$(4),20)_$(subst -,_,$(1)).ini - endif - endef - - $$(eval $$(call BuildPackage,php7-mod-$(1))) - -endef - -$(eval $(call BuildPackage,php7)) -$(eval $(call BuildPackage,php7-cgi)) -$(eval $(call BuildPackage,php7-cli)) -$(eval $(call BuildPackage,php7-fastcgi)) -$(eval $(call BuildPackage,php7-fpm)) - -#$(eval $(call BuildModule,NAME,TITLE[,PKG DEPENDS])) -$(eval $(call BuildModule,calendar,Calendar)) -$(eval $(call BuildModule,ctype,Ctype)) -$(eval $(call BuildModule,curl,cURL,+PACKAGE_php7-mod-curl:libcurl)) -$(eval $(call BuildModule,dom,DOM,+@PHP7_LIBXML +PACKAGE_php7-mod-dom:libxml2)) -$(eval $(call BuildModule,exif,EXIF)) -$(eval $(call BuildModule,fileinfo,Fileinfo)) -$(eval $(call BuildModule,ftp,FTP,+PACKAGE_php7-mod-ftp:libopenssl)) -$(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php7-mod-gd:libjpeg +PACKAGE_php7-mod-gd:libpng)) -$(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php7-mod-gettext:libintl-full)) -$(eval $(call BuildModule,gmp,GMP,+PACKAGE_php7-mod-gmp:libgmp)) -$(eval $(call BuildModule,hash,Hash)) -$(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS))) -$(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php7-mod-intl:icu)) -$(eval $(call BuildModule,json,JSON)) -$(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php7-mod-ldap:libopenldap +PACKAGE_php7-mod-ldap:libsasl2)) -$(eval $(call BuildModule,mbstring,MBString)) -$(eval $(call BuildModule,mcrypt,Mcrypt,+PACKAGE_php7-mod-mcrypt:libmcrypt +PACKAGE_php7-mod-mcrypt:libltdl)) -$(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php7-mod-mysqli:libmysqlclient)) -$(eval $(call BuildModule,opcache,OPcache,,,zend)) -$(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php7-mod-openssl:libopenssl)) -$(eval $(call BuildModule,pcntl,PCNTL)) -$(eval $(call BuildModule,pdo,PHP Data Objects)) -$(eval $(call BuildModule,pdo-mysql,PDO driver for MySQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-mysql:libmysqlclient)) -$(eval $(call BuildModule,pdo-pgsql,PDO driver for PostgreSQL,+php7-mod-pdo +PACKAGE_php7-mod-pdo-pgsql:libpq)) -$(eval $(call BuildModule,pdo-sqlite,PDO driver for SQLite 3.x,+php7-mod-pdo +PACKAGE_php7-mod-pdo-sqlite:libsqlite3 +PACKAGE_php7-mod-pdo-sqlite:librt)) -$(eval $(call BuildModule,pgsql,PostgreSQL,+PACKAGE_php7-mod-pgsql:libpq)) -$(eval $(call BuildModule,phar,Phar Archives,+php7-mod-hash)) -$(eval $(call BuildModule,session,Session)) -$(eval $(call BuildModule,shmop,Shared Memory)) -$(eval $(call BuildModule,simplexml,SimpleXML,+@PHP7_LIBXML +PACKAGE_php7-mod-simplexml:libxml2)) -$(eval $(call BuildModule,soap,SOAP,+@PHP7_LIBXML +PACKAGE_php7-mod-soap:libxml2)) -$(eval $(call BuildModule,sockets,Sockets)) -$(eval $(call BuildModule,sqlite3,SQLite3,+PACKAGE_php7-mod-sqlite3:libsqlite3)) -$(eval $(call BuildModule,sysvmsg,System V messages)) -$(eval $(call BuildModule,sysvsem,System V shared memory)) -$(eval $(call BuildModule,sysvshm,System V semaphore)) -$(eval $(call BuildModule,tokenizer,Tokenizer)) -$(eval $(call BuildModule,xml,XML,+PHP7_LIBXML:libxml2 +!PHP7_LIBXML:libexpat)) -$(eval $(call BuildModule,xmlreader,XMLReader,+@PHP7_LIBXML +PACKAGE_php7-mod-xmlreader:libxml2)) -$(eval $(call BuildModule,xmlwriter,XMLWriter,+@PHP7_LIBXML +PACKAGE_php7-mod-xmlwriter:libxml2)) -$(eval $(call BuildModule,zip,ZIP,+PACKAGE_php7-mod-zip:zlib)) diff --git a/lang/php7/files/php.ini b/lang/php7/files/php.ini deleted file mode 100644 index c88ab0a..0000000 --- a/lang/php7/files/php.ini +++ /dev/null @@ -1,152 +0,0 @@ -[PHP] -zend.ze1_compatibility_mode = Off - -; Language Options - -engine = On -;short_open_tag = Off -precision = 12 -y2k_compliance = On -output_buffering = Off -;output_handler = -zlib.output_compression = Off -;zlib.output_compression_level = -1 -;zlib.output_handler = -implicit_flush = Off -unserialize_callback_func = -serialize_precision = 100 - -;open_basedir = -disable_functions = -disable_classes = - -; Colors for Syntax Highlighting mode. Anything that's acceptable in -; would work. -;highlight.string = #DD0000 -;highlight.comment = #FF9900 -;highlight.keyword = #007700 -;highlight.bg = #FFFFFF -;highlight.default = #0000BB -;highlight.html = #000000 - -;ignore_user_abort = On -;realpath_cache_size = 16k -;realpath_cache_ttl = 120 - -; Miscellaneous - -expose_php = On - -; Resource Limits - -max_execution_time = 30 ; Maximum execution time of each script, in seconds. -max_input_time = 60 ; Maximum amount of time each script may spend parsing request data. -;max_input_nesting_level = 64 -memory_limit = 8M ; Maximum amount of memory a script may consume. - -; Error handling and logging - -; Error Level Constants: -; E_ALL - All errors and warnings (includes E_STRICT as of PHP 6.0.0) -; E_ERROR - fatal run-time errors -; E_RECOVERABLE_ERROR - almost fatal run-time errors -; E_WARNING - run-time warnings (non-fatal errors) -; E_PARSE - compile-time parse errors -; E_NOTICE - run-time notices (these are warnings which often result -; from a bug in your code, but it's possible that it was -; intentional (e.g., using an uninitialized variable and -; relying on the fact it's automatically initialized to an -; empty string) -; E_STRICT - run-time notices, enable to have PHP suggest changes -; to your code which will ensure the best interoperability -; and forward compatibility of your code -; E_CORE_ERROR - fatal errors that occur during PHP's initial startup -; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's -; initial startup -; E_COMPILE_ERROR - fatal compile-time errors -; E_COMPILE_WARNING - compile-time warnings (non-fatal errors) -; E_USER_ERROR - user-generated error message -; E_USER_WARNING - user-generated warning message -; E_USER_NOTICE - user-generated notice message -; E_DEPRECATED - warn about code that will not work in future versions -; of PHP -; E_USER_DEPRECATED - user-generated deprecation warnings -; -; Common Values: -; E_ALL & ~E_NOTICE (Show all errors, except for notices and coding standards warnings.) -; E_ALL & ~E_NOTICE | E_STRICT (Show all errors, except for notices) -; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors) -; E_ALL | E_STRICT (Show all errors, warnings and notices including coding standards.) -; Default Value: E_ALL & ~E_NOTICE -error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT - -display_errors = On -display_startup_errors = Off -log_errors = Off -log_errors_max_len = 1024 -ignore_repeated_errors = Off -ignore_repeated_source = Off -report_memleaks = On -;report_zend_debug = 0 -track_errors = Off -;html_errors = Off -;docref_root = "/phpmanual/" -;docref_ext = .html -;error_prepend_string = "" -;error_append_string = "" -; Log errors to specified file. -;error_log = /var/log/php_errors.log -; Log errors to syslog. -;error_log = syslog - -; Data Handling - -;arg_separator.output = "&" -;arg_separator.input = ";&" -variables_order = "EGPCS" -request_order = "GP" -register_globals = Off -register_long_arrays = Off -register_argc_argv = On -auto_globals_jit = On -post_max_size = 8M -;magic_quotes_gpc = Off -magic_quotes_runtime = Off -magic_quotes_sybase = Off -auto_prepend_file = -auto_append_file = -default_mimetype = "text/html" -;default_charset = "iso-8859-1" -;always_populate_raw_post_data = On - -; Paths and Directories - -; UNIX: "/path1:/path2" -;include_path = ".:/php/includes" -doc_root = "/www" -user_dir = -extension_dir = "/usr/lib/php" -enable_dl = On -;cgi.force_redirect = 1 -;cgi.nph = 1 -;cgi.redirect_status_env = ; -cgi.fix_pathinfo=1 -;fastcgi.impersonate = 1; -;fastcgi.logging = 0 -;cgi.rfc2616_headers = 0 - -; File Uploads - -file_uploads = On -upload_tmp_dir = "/tmp" -upload_max_filesize = 2M -max_file_uploads = 20 - -; Fopen wrappers - -allow_url_fopen = On -allow_url_include = Off -;from="john@doe.com" -;user_agent="PHP" -default_socket_timeout = 60 -;auto_detect_line_endings = Off diff --git a/lang/php7/files/php7-fastcgi.config b/lang/php7/files/php7-fastcgi.config deleted file mode 100644 index 22e9998..0000000 --- a/lang/php7/files/php7-fastcgi.config +++ /dev/null @@ -1,3 +0,0 @@ -config php7-fastcgi - option enabled 1 - option port '1026' diff --git a/lang/php7/files/php7-fastcgi.init b/lang/php7/files/php7-fastcgi.init deleted file mode 100644 index 21f5b09..0000000 --- a/lang/php7/files/php7-fastcgi.init +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=50 - -SERVICE_DAEMONIZE=1 -SERVICE_WRITE_PID=1 - -start_instance() { - local section="$1" - local enabled - local port - - config_get_bool enabled "$section" 'enabled' 0 - config_get port "$section" 'port' 1026 - - [ $enabled -gt 0 ] || return 1 - - PHP_FCGI_CHILDREN='' \ - service_start /usr/bin/php-fcgi -b $port -} - -start() { - config_load 'php7-fastcgi' - config_foreach start_instance 'php7-fastcgi' -} - -stop() { - service_stop /usr/bin/php-fcgi -} diff --git a/lang/php7/files/php7-fpm-www.conf b/lang/php7/files/php7-fpm-www.conf deleted file mode 100644 index d3a3222..0000000 --- a/lang/php7/files/php7-fpm-www.conf +++ /dev/null @@ -1,392 +0,0 @@ -; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the -; pool name ('www' here) -[www] - -; Per pool prefix -; It only applies on the following directives: -; - 'slowlog' -; - 'listen' (unixsocket) -; - 'chroot' -; - 'chdir' -; - 'php_values' -; - 'php_admin_values' -; When not set, the global prefix (or /usr) applies instead. -; Note: This directive can also be relative to the global prefix. -; Default Value: none -;prefix = /path/to/pools/$pool - -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = nobody -;group = - -; The address on which to accept FastCGI requests. -; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on -; a specific port; -; 'port' - to listen on a TCP socket to all addresses on a -; specific port; -; '/path/to/unix/socket' - to listen on a unix socket. -; Note: This value is mandatory. -listen = /var/run/php7-fpm.sock - -; Set listen(2) backlog. -; Default Value: 128 (-1 on FreeBSD and OpenBSD) -;listen.backlog = 128 - -; Set permissions for unix socket, if one is used. In Linux, read/write -; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. -; Default Values: user and group are set as the running user -; mode is set to 0666 -;listen.owner = www-data -;listen.group = www-data -;listen.mode = 0666 - -; List of ipv4 addresses of FastCGI clients which are allowed to connect. -; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original -; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address -; must be separated by a comma. If this value is left blank, connections will be -; accepted from any ip address. -; Default Value: any -;listen.allowed_clients = 127.0.0.1 - -; Specify the nice(2) priority to apply to the pool processes (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) -; Note: - It will only work if the FPM master process is launched as root -; - The pool processes will inherit the master process priority -; unless it specified otherwise -; Default Value: no set -; priority = -19 - -; Choose how the process manager will control the number of child processes. -; Possible Values: -; static - a fixed number (pm.max_children) of child processes; -; dynamic - the number of child processes are set dynamically based on the -; following directives. With this process management, there will be -; always at least 1 children. -; pm.max_children - the maximum number of children that can -; be alive at the same time. -; pm.start_servers - the number of children created on startup. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is greater than this -; number then some children will be killed. -; ondemand - no children are created at startup. Children will be forked when -; new requests will connect. The following parameter are used: -; pm.max_children - the maximum number of children that -; can be alive at the same time. -; pm.process_idle_timeout - The number of seconds after which -; an idle process will be killed. -; Note: This value is mandatory. -pm = dynamic - -; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. -; This value sets the limit on the number of simultaneous requests that will be -; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. -; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. The below defaults are based on a server without much resources. Don't -; forget to tweak pm.* to fit your needs. -; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' -; Note: This value is mandatory. -pm.max_children = 5 - -; The number of child processes created on startup. -; Note: Used only when pm is set to 'dynamic' -; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 2 - -; The desired minimum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 1 - -; The desired maximum number of idle server processes. -; Note: Used only when pm is set to 'dynamic' -; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 3 - -; The number of seconds after which an idle process will be killed. -; Note: Used only when pm is set to 'ondemand' -; Default Value: 10s -;pm.process_idle_timeout = 10s; - -; The number of requests each child process should execute before respawning. -; This can be useful to work around memory leaks in 3rd party libraries. For -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -;pm.max_requests = 500 - -; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. It shows the following informations: -; pool - the name of the pool; -; process manager - static, dynamic or ondemand; -; start time - the date and time FPM has started; -; start since - number of seconds since FPM has started; -; accepted conn - the number of request accepted by the pool; -; listen queue - the number of request in the queue of pending -; connections (see backlog in listen(2)); -; max listen queue - the maximum number of requests in the queue -; of pending connections since FPM has started; -; listen queue len - the size of the socket queue of pending connections; -; idle processes - the number of idle processes; -; active processes - the number of active processes; -; total processes - the number of idle + active processes; -; max active processes - the maximum number of active processes since FPM -; has started; -; max children reached - number of times, the process limit has been reached, -; when pm tries to start more children (works only for -; pm 'dynamic' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 62636 -; accepted conn: 190460 -; listen queue: 0 -; max listen queue: 1 -; listen queue len: 42 -; idle processes: 4 -; active processes: 11 -; total processes: 15 -; max active processes: 12 -; max children reached: 0 -; -; By default the status page output is formatted as text/plain. Passing either -; 'html', 'xml' or 'json' in the query string will return the corresponding -; output syntax. Example: -; http://www.foo.bar/status -; http://www.foo.bar/status?json -; http://www.foo.bar/status?html -; http://www.foo.bar/status?xml -; -; By default the status page only outputs short status. Passing 'full' in the -; query string will also return status for each pool process. -; Example: -; http://www.foo.bar/status?full -; http://www.foo.bar/status?json&full -; http://www.foo.bar/status?html&full -; http://www.foo.bar/status?xml&full -; The Full status returns for each process: -; pid - the PID of the process; -; state - the state of the process (Idle, Running, ...); -; start time - the date and time the process has started; -; start since - the number of seconds since the process has started; -; requests - the number of requests the process has served; -; request duration - the duration in µs of the requests; -; request method - the request method (GET, POST, ...); -; request URI - the request URI with the query string; -; content length - the content length of the request (only with POST); -; user - the user (PHP_AUTH_USER) (or '-' if not set); -; script - the main script called (or '-' if not set); -; last request cpu - the %cpu the last request consumed -; it's always 0 if the process is not in Idle state -; because CPU calculation is done when the request -; processing has terminated; -; last request memory - the max amount of memory the last request consumed -; it's always 0 if the process is not in Idle state -; because memory calculation is done when the request -; processing has terminated; -; If the process is in Idle state, then informations are related to the -; last request the process has served. Otherwise informations are related to -; the current request being served. -; Example output: -; ************************ -; pid: 31330 -; state: Running -; start time: 01/Jul/2011:17:53:49 +0200 -; start since: 63087 -; requests: 12808 -; request duration: 1250261 -; request method: GET -; request URI: /test_mem.php?N=10000 -; content length: 0 -; user: - -; script: /home/fat/web/docs/php/test_mem.php -; last request cpu: 0.00 -; last request memory: 0 -; -; Note: There is a real-time FPM status monitoring sample web page available -; It's available in: ${prefix}/share/fpm/status.html -; -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;pm.status_path = /status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; Note: The value must start with a leading slash (/). The value can be -; anything, but it may not be a good idea to use the .php extension or it -; may conflict with a real PHP file. -; Default Value: not set -;ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -; The access log file -; Default: not set -;access.log = log/$pool.access.log - -; The access log format. -; The following syntax is allowed -; %%: the '%' character -; %C: %CPU used by the request -; it can accept the following format: -; - %{user}C for user CPU only -; - %{system}C for system CPU only -; - %{total}C for user + system CPU (default) -; %d: time taken to serve the request -; it can accept the following format: -; - %{seconds}d (default) -; - %{miliseconds}d -; - %{mili}d -; - %{microseconds}d -; - %{micro}d -; %e: an environment variable (same as $_ENV or $_SERVER) -; it must be associated with embraces to specify the name of the env -; variable. Some exemples: -; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e -; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e -; %f: script filename -; %l: content-length of the request (for POST request only) -; %m: request method -; %M: peak of memory allocated by PHP -; it can accept the following format: -; - %{bytes}M (default) -; - %{kilobytes}M -; - %{kilo}M -; - %{megabytes}M -; - %{mega}M -; %n: pool name -; %o: ouput header -; it must be associated with embraces to specify the name of the header: -; - %{Content-Type}o -; - %{X-Powered-By}o -; - %{Transfert-Encoding}o -; - .... -; %p: PID of the child that serviced the request -; %P: PID of the parent of the child that serviced the request -; %q: the query string -; %Q: the '?' character if query string exists -; %r: the request URI (without the query string, see %q and %Q) -; %R: remote IP address -; %s: status (response code) -; %t: server time the request was received -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %T: time the log has been written (the request has finished) -; it can accept a strftime(3) format: -; %d/%b/%Y:%H:%M:%S %z (default) -; %u: remote user -; -; Default: "%R - %u %t \"%m %r\" %s" -;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" - -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -;slowlog = log/$pool.log.slow - -; The timeout for serving a single request after which a PHP backtrace will be -; dumped to the 'slowlog' file. A value of '0s' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_slowlog_timeout = 0 - -; The timeout for serving a single request after which the worker process will -; be killed. This option should be used when the 'max_execution_time' ini option -; does not stop script execution for some reason. A value of '0' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_terminate_timeout = 0 - -; Set open file descriptor rlimit. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Chroot to this directory at the start. This value must be defined as an -; absolute path. When this value is not set, chroot is not used. -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one -; of its subdirectories. If the pool prefix is not set, the global prefix -; will be used instead. -; Note: chrooting is a great security feature and should be used whenever -; possible. However, all PHP paths will be relative to the chroot -; (error_log, sessions.save_path, ...). -; Default Value: not set -;chroot = - -; Chdir to this directory at the start. -; Note: relative path can be used. -; Default Value: current directory or / when chroot -chdir = / - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; Default Value: no -;catch_workers_output = yes - -; Limits the extensions of the main script FPM will allow to parse. This can -; prevent configuration mistakes on the web server side. You should only limit -; FPM to .php extensions to prevent malicious users to use other extensions to -; exectute php code. -; Note: set an empty value to allow all extensions. -; Default Value: .php -;security.limit_extensions = .php .php3 .php4 .php5 - -; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from -; the current environment. -; Default Value: clean env -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp - -; Additional php.ini defines, specific to this pool of workers. These settings -; overwrite the values previously defined in the php.ini. The directives are the -; same as the PHP SAPI: -; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. -; php_admin_value/php_admin_flag - these directives won't be overwritten by -; PHP call 'ini_set' -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. - -; Defining 'extension' will load the corresponding shared extension from -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not -; overwrite previously defined php.ini values, but will append the new value -; instead. - -; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or /usr) - -; Default Value: nothing is defined by default except the values in php.ini and -; specified at startup with the -d argument -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com -;php_flag[display_errors] = off -;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M diff --git a/lang/php7/files/php7-fpm.conf b/lang/php7/files/php7-fpm.conf deleted file mode 100644 index c980b21..0000000 --- a/lang/php7/files/php7-fpm.conf +++ /dev/null @@ -1,121 +0,0 @@ -;;;;;;;;;;;;;;;;;;;;; -; FPM Configuration ; -;;;;;;;;;;;;;;;;;;;;; - -; All relative paths in this configuration file are relative to PHP's install -; prefix (/usr). This prefix can be dynamically changed by using the -; '-p' argument from the command line. - -; Include one or more files. If glob(3) exists, it is used to include a bunch of -; files from a glob(3) pattern. This directive can be used everywhere in the -; file. -; Relative path can also be used. They will be prefixed by: -; - the global prefix if it's been set (-p argument) -; - /usr otherwise -;include=/etc/php7/fpm/*.conf - -;;;;;;;;;;;;;;;;;; -; Global Options ; -;;;;;;;;;;;;;;;;;; - -[global] -; Pid file -; Note: the default prefix is /var -; Default Value: none -pid = /var/run/php7-fpm.pid - -; Error log file -; If it's set to "syslog", log is sent to syslogd instead of being written -; in a local file. -; Note: the default prefix is /var -; Default Value: log/php-fpm.log -error_log = /var/log/php7-fpm.log - -; syslog_facility is used to specify what type of program is logging the -; message. This lets syslogd specify that messages from different facilities -; will be handled differently. -; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON) -; Default Value: daemon -;syslog.facility = daemon - -; syslog_ident is prepended to every message. If you have multiple FPM -; instances running on the same server, you can change the default value -; which must suit common needs. -; Default Value: php-fpm -;syslog.ident = php-fpm - -; Log level -; Possible Values: alert, error, warning, notice, debug -; Default Value: notice -;log_level = notice - -; If this number of child processes exit with SIGSEGV or SIGBUS within the time -; interval set by emergency_restart_interval then FPM will restart. A value -; of '0' means 'Off'. -; Default Value: 0 -;emergency_restart_threshold = 0 - -; Interval of time used by emergency_restart_interval to determine when -; a graceful restart will be initiated. This can be useful to work around -; accidental corruptions in an accelerator's shared memory. -; Available Units: s(econds), m(inutes), h(ours), or d(ays) -; Default Unit: seconds -; Default Value: 0 -;emergency_restart_interval = 0 - -; Time limit for child processes to wait for a reaction on signals from master. -; Available units: s(econds), m(inutes), h(ours), or d(ays) -; Default Unit: seconds -; Default Value: 0 -;process_control_timeout = 0 - -; The maximum number of processes FPM will fork. This has been design to control -; the global number of processes when using dynamic PM within a lot of pools. -; Use it with caution. -; Note: A value of 0 indicates no limit -; Default Value: 0 -; process.max = 128 - -; Specify the nice(2) priority to apply to the master process (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) -; Note: - It will only work if the FPM master process is launched as root -; - The pool process will inherit the master process priority -; unless it specified otherwise -; Default Value: no set -; process.priority = -19 - -; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. -; Default Value: yes -;daemonize = yes - -; Set open file descriptor rlimit for the master process. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit for the master process. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Specify the event mechanism FPM will use. The following is available: -; - select (any POSIX os) -; - poll (any POSIX os) -; - epoll (linux >= 2.5.44) -; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0) -; - /dev/poll (Solaris >= 7) -; - port (Solaris >= 10) -; Default Value: not set (auto detection) -; events.mechanism = epoll - -;;;;;;;;;;;;;;;;;;;; -; Pool Definitions ; -;;;;;;;;;;;;;;;;;;;; - -; Multiple pools of child processes may be started with different listening -; ports and different management options. The name of the pool will be -; used in logs and stats. There is no limitation on the number of pools which -; FPM can handle. Your system will tell you anyway :) - -; To configure the pools it is recommended to have one .conf file per -; pool in the following directory: -include=/etc/php7-fpm.d/*.conf diff --git a/lang/php7/files/php7-fpm.config b/lang/php7/files/php7-fpm.config deleted file mode 100644 index 3a893c6..0000000 --- a/lang/php7/files/php7-fpm.config +++ /dev/null @@ -1,2 +0,0 @@ -config php7-fpm - option enabled 1 diff --git a/lang/php7/files/php7-fpm.init b/lang/php7/files/php7-fpm.init deleted file mode 100644 index c913a2b..0000000 --- a/lang/php7/files/php7-fpm.init +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=50 - -PROG=/usr/bin/php-fpm -CONFIG=/etc/php7-fpm.conf - -SERVICE_PID_FILE=/var/run/php7-fpm.pid - -start_instance() { - local section="$1" - local enabled - - config_get_bool enabled "$section" 'enabled' 0 - - [ $enabled -gt 0 ] || return 1 - - service_start $PROG -y $CONFIG -g $SERVICE_PID_FILE -} - -start() { - config_load 'php7-fpm' - config_foreach start_instance 'php7-fpm' -} - -stop() { - service_stop $PROG -} diff --git a/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch b/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch deleted file mode 100644 index 819ad1e..0000000 --- a/lang/php7/patches/0013-Add-support-for-use-of-the-system-timezone-database.patch +++ /dev/null @@ -1,684 +0,0 @@ -From: Joe Orton -Date: Thu, 20 Oct 2016 11:44:14 +0200 -Subject: Add support for use of the system timezone database - -Add support for use of the system timezone database, rather -than embedding a copy. Discussed upstream but was not desired. - -History: -r14: improve check for valid tz file -r13: adapt for upstream changes to use PHP allocator -r12: adapt for upstream changes for new zic -r11: use canonical names to avoid more case sensitivity issues - round lat/long from zone.tab towards zero per builtin db -r10: make timezone case insensitive -r9: fix another compile error without --with-system-tzdata configured (Michael Heimpold) -r8: fix compile error without --with-system-tzdata configured -r7: improve check for valid timezone id to exclude directories -r6: fix fd leak in r5, fix country code/BC flag use in - timezone_identifiers_list() using system db, - fix use of PECL timezonedb to override system db, -r5: reverts addition of "System/Localtime" fake tzname. - updated for 5.3.0, parses zone.tab to pick up mapping between - timezone name, country code and long/lat coords -r4: added "System/Localtime" tzname which uses /etc/localtime -r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert) -r2: add filesystem trawl to set up name alias index -r1: initial revision ---- - ext/date/lib/parse_tz.c | 560 +++++++++++++++++++++++++++++++++++++++++++++++- - ext/date/lib/timelib.m4 | 13 ++ - 2 files changed, 562 insertions(+), 11 deletions(-) - -diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c -index 20d7eea..ed7717e 100644 ---- a/ext/date/lib/parse_tz.c -+++ b/ext/date/lib/parse_tz.c -@@ -24,6 +24,16 @@ - - #include "timelib.h" - -+#ifdef HAVE_SYSTEM_TZDATA -+#include -+#include -+#include -+#include -+#include -+ -+#include "php_scandir.h" -+#endif -+ - #include - - #ifdef HAVE_LOCALE_H -@@ -36,8 +46,12 @@ - #include - #endif - -+#ifndef HAVE_SYSTEM_TZDATA - #define TIMELIB_SUPPORTS_V2DATA - #include "timezonedb.h" -+#endif -+ -+#include - - #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) - # if defined(__LITTLE_ENDIAN__) -@@ -59,6 +73,11 @@ static int read_preamble(const unsigned char **tzf, timelib_tzinfo *tz) - { - uint32_t version; - -+ if (memcmp(*tzf, "TZif", 4) == 0) { -+ *tzf += 20; -+ return 0; -+ } -+ - /* read ID */ - version = (*tzf)[3] - '0'; - *tzf += 4; -@@ -302,7 +321,429 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) - } - } - --static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) -+#ifdef HAVE_SYSTEM_TZDATA -+ -+#ifdef HAVE_SYSTEM_TZDATA_PREFIX -+#define ZONEINFO_PREFIX HAVE_SYSTEM_TZDATA_PREFIX -+#else -+#define ZONEINFO_PREFIX "/usr/share/zoneinfo" -+#endif -+ -+/* System timezone database pointer. */ -+static const timelib_tzdb *timezonedb_system; -+ -+/* Hash table entry for the cache of the zone.tab mapping table. */ -+struct location_info { -+ char code[2]; -+ double latitude, longitude; -+ char name[64]; -+ char *comment; -+ struct location_info *next; -+}; -+ -+/* Cache of zone.tab. */ -+static struct location_info **system_location_table; -+ -+/* Size of the zone.tab hash table; a random-ish prime big enough to -+ * prevent too many collisions. */ -+#define LOCINFO_HASH_SIZE (1021) -+ -+/* Compute a case insensitive hash of str */ -+static uint32_t tz_hash(const char *str) -+{ -+ const unsigned char *p = (const unsigned char *)str; -+ uint32_t hash = 5381; -+ int c; -+ -+ while ((c = tolower(*p++)) != '\0') { -+ hash = (hash << 5) ^ hash ^ c; -+ } -+ -+ return hash % LOCINFO_HASH_SIZE; -+} -+ -+/* Parse an ISO-6709 date as used in zone.tab. Returns end of the -+ * parsed string on success, or NULL on parse error. On success, -+ * writes the parsed number to *result. */ -+static char *parse_iso6709(char *p, double *result) -+{ -+ double v, sign; -+ char *pend; -+ size_t len; -+ -+ if (*p == '+') -+ sign = 1.0; -+ else if (*p == '-') -+ sign = -1.0; -+ else -+ return NULL; -+ -+ p++; -+ for (pend = p; *pend >= '0' && *pend <= '9'; pend++) -+ ;; -+ -+ /* Annoying encoding used by zone.tab has no decimal point, so use -+ * the length to determine the format: -+ * -+ * 4 = DDMM -+ * 5 = DDDMM -+ * 6 = DDMMSS -+ * 7 = DDDMMSS -+ */ -+ len = pend - p; -+ if (len < 4 || len > 7) { -+ return NULL; -+ } -+ -+ /* p => [D]DD */ -+ v = (p[0] - '0') * 10.0 + (p[1] - '0'); -+ p += 2; -+ if (len == 5 || len == 7) -+ v = v * 10.0 + (*p++ - '0'); -+ /* p => MM[SS] */ -+ v += (10.0 * (p[0] - '0') -+ + p[1] - '0') / 60.0; -+ p += 2; -+ /* p => [SS] */ -+ if (len > 5) { -+ v += (10.0 * (p[0] - '0') -+ + p[1] - '0') / 3600.0; -+ p += 2; -+ } -+ -+ /* Round to five decimal place, not because it's a good idea, -+ * but, because the builtin data uses rounded data, so, match -+ * that. */ -+ *result = trunc(v * sign * 100000.0) / 100000.0; -+ -+ return p; -+} -+ -+/* This function parses the zone.tab file to build up the mapping of -+ * timezone to country code and geographic location, and returns a -+ * hash table. The hash table is indexed by the function: -+ * -+ * tz_hash(timezone-name) -+ */ -+static struct location_info **create_location_table(void) -+{ -+ struct location_info **li, *i; -+ char zone_tab[PATH_MAX]; -+ char line[512]; -+ FILE *fp; -+ -+ strncpy(zone_tab, ZONEINFO_PREFIX "/zone.tab", sizeof zone_tab); -+ -+ fp = fopen(zone_tab, "r"); -+ if (!fp) { -+ return NULL; -+ } -+ -+ li = calloc(LOCINFO_HASH_SIZE, sizeof *li); -+ -+ while (fgets(line, sizeof line, fp)) { -+ char *p = line, *code, *name, *comment; -+ uint32_t hash; -+ double latitude, longitude; -+ -+ while (isspace(*p)) -+ p++; -+ -+ if (*p == '#' || *p == '\0' || *p == '\n') -+ continue; -+ -+ if (!isalpha(p[0]) || !isalpha(p[1]) || p[2] != '\t') -+ continue; -+ -+ /* code => AA */ -+ code = p; -+ p[2] = 0; -+ p += 3; -+ -+ /* coords => [+-][D]DDMM[SS][+-][D]DDMM[SS] */ -+ p = parse_iso6709(p, &latitude); -+ if (!p) { -+ continue; -+ } -+ p = parse_iso6709(p, &longitude); -+ if (!p) { -+ continue; -+ } -+ -+ if (!p || *p != '\t') { -+ continue; -+ } -+ -+ /* name = string */ -+ name = ++p; -+ while (*p != '\t' && *p && *p != '\n') -+ p++; -+ -+ *p++ = '\0'; -+ -+ /* comment = string */ -+ comment = p; -+ while (*p != '\t' && *p && *p != '\n') -+ p++; -+ -+ if (*p == '\n' || *p == '\t') -+ *p = '\0'; -+ -+ hash = tz_hash(name); -+ i = malloc(sizeof *i); -+ memcpy(i->code, code, 2); -+ strncpy(i->name, name, sizeof i->name); -+ i->comment = strdup(comment); -+ i->longitude = longitude; -+ i->latitude = latitude; -+ i->next = li[hash]; -+ li[hash] = i; -+ /* printf("%s [%u, %f, %f]\n", name, hash, latitude, longitude); */ -+ } -+ -+ fclose(fp); -+ -+ return li; -+} -+ -+/* Return location info from hash table, using given timezone name. -+ * Returns NULL if the name could not be found. */ -+const struct location_info *find_zone_info(struct location_info **li, -+ const char *name) -+{ -+ uint32_t hash = tz_hash(name); -+ const struct location_info *l; -+ -+ if (!li) { -+ return NULL; -+ } -+ -+ for (l = li[hash]; l; l = l->next) { -+ if (strcasecmp(l->name, name) == 0) -+ return l; -+ } -+ -+ return NULL; -+} -+ -+/* Filter out some non-tzdata files and the posix/right databases, if -+ * present. */ -+static int index_filter(const struct dirent *ent) -+{ -+ return strcmp(ent->d_name, ".") != 0 -+ && strcmp(ent->d_name, "..") != 0 -+ && strcmp(ent->d_name, "posix") != 0 -+ && strcmp(ent->d_name, "posixrules") != 0 -+ && strcmp(ent->d_name, "right") != 0 -+ && strstr(ent->d_name, ".list") == NULL -+ && strstr(ent->d_name, ".tab") == NULL; -+} -+ -+static int sysdbcmp(const void *first, const void *second) -+{ -+ const timelib_tzdb_index_entry *alpha = first, *beta = second; -+ -+ return strcasecmp(alpha->id, beta->id); -+} -+ -+ -+/* Create the zone identifier index by trawling the filesystem. */ -+static void create_zone_index(timelib_tzdb *db) -+{ -+ size_t dirstack_size, dirstack_top; -+ size_t index_size, index_next; -+ timelib_tzdb_index_entry *db_index; -+ char **dirstack; -+ -+ /* LIFO stack to hold directory entries to scan; each slot is a -+ * directory name relative to the zoneinfo prefix. */ -+ dirstack_size = 32; -+ dirstack = malloc(dirstack_size * sizeof *dirstack); -+ dirstack_top = 1; -+ dirstack[0] = strdup(""); -+ -+ /* Index array. */ -+ index_size = 64; -+ db_index = malloc(index_size * sizeof *db_index); -+ index_next = 0; -+ -+ do { -+ struct dirent **ents; -+ char name[PATH_MAX], *top; -+ int count; -+ -+ /* Pop the top stack entry, and iterate through its contents. */ -+ top = dirstack[--dirstack_top]; -+ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s", top); -+ -+ count = php_scandir(name, &ents, index_filter, php_alphasort); -+ -+ while (count > 0) { -+ struct stat st; -+ const char *leaf = ents[count - 1]->d_name; -+ -+ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s/%s", -+ top, leaf); -+ -+ if (strlen(name) && stat(name, &st) == 0) { -+ /* Name, relative to the zoneinfo prefix. */ -+ const char *root = top; -+ -+ if (root[0] == '/') root++; -+ -+ snprintf(name, sizeof name, "%s%s%s", root, -+ *root ? "/": "", leaf); -+ -+ if (S_ISDIR(st.st_mode)) { -+ if (dirstack_top == dirstack_size) { -+ dirstack_size *= 2; -+ dirstack = realloc(dirstack, -+ dirstack_size * sizeof *dirstack); -+ } -+ dirstack[dirstack_top++] = strdup(name); -+ } -+ else { -+ if (index_next == index_size) { -+ index_size *= 2; -+ db_index = realloc(db_index, -+ index_size * sizeof *db_index); -+ } -+ -+ db_index[index_next++].id = strdup(name); -+ } -+ } -+ -+ free(ents[--count]); -+ } -+ -+ if (count != -1) free(ents); -+ free(top); -+ } while (dirstack_top); -+ -+ qsort(db_index, index_next, sizeof *db_index, sysdbcmp); -+ -+ db->index = db_index; -+ db->index_size = index_next; -+ -+ free(dirstack); -+} -+ -+#define FAKE_HEADER "1234\0??\1??" -+#define FAKE_UTC_POS (7 - 4) -+ -+/* Create a fake data segment for database 'sysdb'. */ -+static void fake_data_segment(timelib_tzdb *sysdb, -+ struct location_info **info) -+{ -+ size_t n; -+ char *data, *p; -+ -+ data = malloc(3 * sysdb->index_size + 7); -+ -+ p = mempcpy(data, FAKE_HEADER, sizeof(FAKE_HEADER) - 1); -+ -+ for (n = 0; n < sysdb->index_size; n++) { -+ const struct location_info *li; -+ timelib_tzdb_index_entry *ent; -+ -+ ent = (timelib_tzdb_index_entry *)&sysdb->index[n]; -+ -+ /* Lookup the timezone name in the hash table. */ -+ if (strcmp(ent->id, "UTC") == 0) { -+ ent->pos = FAKE_UTC_POS; -+ continue; -+ } -+ -+ li = find_zone_info(info, ent->id); -+ if (li) { -+ /* If found, append the BC byte and the -+ * country code; set the position for this -+ * section of timezone data. */ -+ ent->pos = (p - data) - 4; -+ *p++ = '\1'; -+ *p++ = li->code[0]; -+ *p++ = li->code[1]; -+ } -+ else { -+ /* If not found, the timezone data can -+ * point at the header. */ -+ ent->pos = 0; -+ } -+ } -+ -+ sysdb->data = (unsigned char *)data; -+} -+ -+/* Returns true if the passed-in stat structure describes a -+ * probably-valid timezone file. */ -+static int is_valid_tzfile(const struct stat *st, int fd) -+{ -+ if (fd) { -+ char buf[20]; -+ if (read(fd, buf, 20)!=20) { -+ return 0; -+ } -+ lseek(fd, SEEK_SET, 0); -+ if (memcmp(buf, "TZif", 4)) { -+ return 0; -+ } -+ } -+ return S_ISREG(st->st_mode) && st->st_size > 20; -+} -+ -+/* To allow timezone names to be used case-insensitively, find the -+ * canonical name for this timezone, if possible. */ -+static const char *canonical_tzname(const char *timezone) -+{ -+ if (timezonedb_system) { -+ timelib_tzdb_index_entry *ent, lookup; -+ -+ lookup.id = (char *)timezone; -+ -+ ent = bsearch(&lookup, timezonedb_system->index, -+ timezonedb_system->index_size, sizeof lookup, -+ sysdbcmp); -+ if (ent) { -+ return ent->id; -+ } -+ } -+ -+ return timezone; -+} -+ -+/* Return the mmap()ed tzfile if found, else NULL. On success, the -+ * length of the mapped data is placed in *length. */ -+static char *map_tzfile(const char *timezone, size_t *length) -+{ -+ char fname[PATH_MAX]; -+ struct stat st; -+ char *p; -+ int fd; -+ -+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { -+ return NULL; -+ } -+ -+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); -+ -+ fd = open(fname, O_RDONLY); -+ if (fd == -1) { -+ return NULL; -+ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st, fd)) { -+ close(fd); -+ return NULL; -+ } -+ -+ *length = st.st_size; -+ p = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); -+ close(fd); -+ -+ return p != MAP_FAILED ? p : NULL; -+} -+ -+#endif -+ -+static int inmem_seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) - { - int left = 0, right = tzdb->index_size - 1; - #ifdef HAVE_SETLOCALE -@@ -341,21 +782,88 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const - return 0; - } - -+static int seek_to_tz_position(const unsigned char **tzf, char *timezone, -+ char **map, size_t *maplen, -+ const timelib_tzdb *tzdb) -+{ -+#ifdef HAVE_SYSTEM_TZDATA -+ if (tzdb == timezonedb_system) { -+ char *orig; -+ -+ orig = map_tzfile(timezone, maplen); -+ if (orig == NULL) { -+ return 0; -+ } -+ -+ (*tzf) = (unsigned char *)orig; -+ *map = orig; -+ return 1; -+ } -+ else -+#endif -+ { -+ return inmem_seek_to_tz_position(tzf, timezone, tzdb); -+ } -+} -+ - const timelib_tzdb *timelib_builtin_db(void) - { -+#ifdef HAVE_SYSTEM_TZDATA -+ if (timezonedb_system == NULL) { -+ timelib_tzdb *tmp = malloc(sizeof *tmp); -+ -+ tmp->version = "0.system"; -+ tmp->data = NULL; -+ create_zone_index(tmp); -+ system_location_table = create_location_table(); -+ fake_data_segment(tmp, system_location_table); -+ timezonedb_system = tmp; -+ } -+ -+ return timezonedb_system; -+#else - return &timezonedb_builtin; -+#endif - } - - const timelib_tzdb_index_entry *timelib_timezone_builtin_identifiers_list(int *count) - { -+#ifdef HAVE_SYSTEM_TZDATA -+ *count = timezonedb_system->index_size; -+ return timezonedb_system->index; -+#else - *count = sizeof(timezonedb_idx_builtin) / sizeof(*timezonedb_idx_builtin); - return timezonedb_idx_builtin; -+#endif - } - - int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb) - { - const unsigned char *tzf; -- return (seek_to_tz_position(&tzf, timezone, tzdb)); -+ -+#ifdef HAVE_SYSTEM_TZDATA -+ if (tzdb == timezonedb_system) { -+ char fname[PATH_MAX]; -+ struct stat st; -+ -+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { -+ return 0; -+ } -+ -+ if (system_location_table) { -+ if (find_zone_info(system_location_table, timezone) != NULL) { -+ /* found in cache */ -+ return 1; -+ } -+ } -+ -+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); -+ -+ return stat(fname, &st) == 0 && is_valid_tzfile(&st, 0); -+ } -+#endif -+ -+ return (inmem_seek_to_tz_position(&tzf, timezone, tzdb)); - } - - static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) -@@ -380,24 +888,54 @@ static void read_64bit_header(const unsigned char **tzf, timelib_tzinfo *tz) - timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb) - { - const unsigned char *tzf; -+ char *memmap = NULL; -+ size_t maplen; - timelib_tzinfo *tmp; - int version; - -- if (seek_to_tz_position(&tzf, timezone, tzdb)) { -+ if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) { - tmp = timelib_tzinfo_ctor(timezone); - - version = read_preamble(&tzf, tmp); - read_header(&tzf, tmp); - read_transistions(&tzf, tmp); - read_types(&tzf, tmp); -- if (version == 2) { -- skip_64bit_preamble(&tzf, tmp); -- read_64bit_header(&tzf, tmp); -- skip_64bit_transistions(&tzf, tmp); -- skip_64bit_types(&tzf, tmp); -- skip_posix_string(&tzf, tmp); -- } -- read_location(&tzf, tmp); -+ -+#ifdef HAVE_SYSTEM_TZDATA -+ if (memmap) { -+ const struct location_info *li; -+ -+ /* TZif-style - grok the location info from the system database, -+ * if possible. */ -+ -+ if ((li = find_zone_info(system_location_table, timezone)) != NULL) { -+ tmp->location.comments = timelib_strdup(li->comment); -+ strncpy(tmp->location.country_code, li->code, 2); -+ tmp->location.longitude = li->longitude; -+ tmp->location.latitude = li->latitude; -+ tmp->bc = 1; -+ } -+ else { -+ strcpy(tmp->location.country_code, "??"); -+ tmp->bc = 0; -+ tmp->location.comments = timelib_strdup(""); -+ } -+ -+ /* Now done with the mmap segment - discard it. */ -+ munmap(memmap, maplen); -+ } else -+#endif -+ { -+ /* PHP-style - use the embedded info. */ -+ if (version == 2) { -+ skip_64bit_preamble(&tzf, tmp); -+ read_64bit_header(&tzf, tmp); -+ skip_64bit_transistions(&tzf, tmp); -+ skip_64bit_types(&tzf, tmp); -+ skip_posix_string(&tzf, tmp); -+ } -+ read_location(&tzf, tmp); -+ } - } else { - tmp = NULL; - } -diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4 -index 99bf9fa..4bf7e46 100644 ---- a/ext/date/lib/timelib.m4 -+++ b/ext/date/lib/timelib.m4 -@@ -78,3 +78,16 @@ stdlib.h - - dnl Check for strtoll, atoll - AC_CHECK_FUNCS(strtoll atoll strftime gettimeofday) -+ -+PHP_ARG_WITH(system-tzdata, for use of system timezone data, -+[ --with-system-tzdata[=DIR] to specify use of system timezone data], -+no, no) -+ -+if test "$PHP_SYSTEM_TZDATA" != "no"; then -+ AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used]) -+ -+ if test "$PHP_SYSTEM_TZDATA" != "yes"; then -+ AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA", -+ [Define for location of system timezone data]) -+ fi -+fi diff --git a/lang/php7/patches/0016-dont-gitclean-in-build.patch b/lang/php7/patches/0016-dont-gitclean-in-build.patch deleted file mode 100644 index 32de557..0000000 --- a/lang/php7/patches/0016-dont-gitclean-in-build.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Debian PHP Maintainers -Date: Sat, 2 May 2015 10:26:53 +0200 -Subject: dont-gitclean-in-build - ---- - build/build.mk | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/build/build.mk b/build/build.mk -index 9452984..b964def 100644 ---- a/build/build.mk -+++ b/build/build.mk -@@ -63,6 +63,5 @@ gitclean-work: - @if (test ! -f '.git/info/exclude' || grep -s "git-ls-files" .git/info/exclude); then \ - (echo "Rebuild .git/info/exclude" && echo '*.o' > .git/info/exclude && git svn propget svn:ignore | grep -v config.nice >> .git/info/exclude); \ - fi; \ -- git clean -X -f -d; - - .PHONY: $(ALWAYS) snapshot diff --git a/lang/php7/patches/0032-Use-system-timezone.patch b/lang/php7/patches/0032-Use-system-timezone.patch deleted file mode 100644 index efa1fc7..0000000 --- a/lang/php7/patches/0032-Use-system-timezone.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Debian PHP Maintainers -Date: Sat, 2 May 2015 10:26:56 +0200 -Subject: Use system timezone - -Upstream don't want this patch. See -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=730771 for a summary. - -This delta is recovered from previous versions of the system timezone patch in -Debian, and appears to have inadvertently been dropped. Author unknown. - -To be used in tandem with use_embedded_timezonedb.patch and use_embedded_timezonedb_fixes.patch. ---- - ext/date/php_date.c | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/ext/date/php_date.c b/ext/date/php_date.c -index cbe6e91..1999c83 100644 ---- a/ext/date/php_date.c -+++ b/ext/date/php_date.c -@@ -1003,6 +1003,23 @@ static char* guess_timezone(const timelib_tzdb *tzdb) - DATEG(timezone_valid) = 1; - return DATEG(default_timezone); - } -+ /* Try to guess timezone from system information */ -+ { -+ struct tm *ta, tmbuf; -+ time_t the_time; -+ char *tzid = NULL; -+ -+ the_time = time(NULL); -+ ta = php_localtime_r(&the_time, &tmbuf); -+ if (ta) { -+ tzid = timelib_timezone_id_from_abbr(ta->tm_zone, ta->tm_gmtoff, ta->tm_isdst); -+ } -+ if (! tzid) { -+ tzid = "UTC"; -+ } -+ -+ return tzid; -+ } - /* Fallback to UTC */ - return "UTC"; - } diff --git a/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch b/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch deleted file mode 100644 index 0a10afa..0000000 --- a/lang/php7/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch +++ /dev/null @@ -1,114 +0,0 @@ -From: Thijs Kinkhorst -Date: Wed, 15 Jun 2016 09:18:03 +0200 -Subject: Add patch to remove build timestamps from generated binaries. - ---- - ext/standard/info.c | 1 - - sapi/apache2handler/config.m4 | 15 +++------------ - sapi/cgi/cgi_main.c | 4 ++-- - sapi/cli/php_cli.c | 4 ++-- - sapi/fpm/fpm/fpm_main.c | 4 ++-- - sapi/phpdbg/phpdbg.c | 4 +--- - 6 files changed, 10 insertions(+), 22 deletions(-) - -diff --git a/ext/standard/info.c b/ext/standard/info.c -index e74d6b4..883fbdf 100644 ---- a/ext/standard/info.c -+++ b/ext/standard/info.c -@@ -865,7 +865,6 @@ PHPAPI void php_print_info(int flag) - php_info_print_box_end(); - php_info_print_table_start(); - php_info_print_table_row(2, "System", ZSTR_VAL(php_uname)); -- php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__); - #ifdef COMPILER - php_info_print_table_row(2, "Compiler", COMPILER); - #endif -diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 -index f286b1a..fba92b8 100644 ---- a/sapi/apache2handler/config.m4 -+++ b/sapi/apache2handler/config.m4 -@@ -59,18 +59,9 @@ if test "$PHP_APXS2" != "no"; then - APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" - - APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` -- if test -z `$APXS -q SYSCONFDIR`; then -- INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ -- $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ -- -i -n php7" -- else -- APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR` -- INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ -- \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \ -- $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ -- -S SYSCONFDIR='$APXS_SYSCONFDIR' \ -- -i -a -n php7" -- fi -+ INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ -+ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \ -+ -i -n php7" - - case $host_alias in - *aix*) -diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c -index 0b6deb1..bb9014a 100644 ---- a/sapi/cgi/cgi_main.c -+++ b/sapi/cgi/cgi_main.c -@@ -2342,9 +2342,9 @@ consult the installation file that came with this distribution, or visit \n\ - SG(request_info).no_headers = 1; - } - #if ZEND_DEBUG -- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); - #else -- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); - #endif - php_request_shutdown((void *) 0); - fcgi_shutdown(); -diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c -index dc92045..bb28364 100644 ---- a/sapi/cli/php_cli.c -+++ b/sapi/cli/php_cli.c -@@ -690,8 +690,8 @@ static int do_cli(int argc, char **argv) /* {{{ */ - goto out; - - case 'v': /* show php version & quit */ -- php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", -- PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__, -+ php_printf("PHP %s (%s) ( %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", -+ PHP_VERSION, cli_sapi_module.name, - #if ZTS - "ZTS " - #else -diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c -index 6768113..545c52e 100644 ---- a/sapi/fpm/fpm/fpm_main.c -+++ b/sapi/fpm/fpm/fpm_main.c -@@ -1756,9 +1756,9 @@ int main(int argc, char *argv[]) - SG(request_info).no_headers = 1; - - #if ZEND_DEBUG -- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); - #else -- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version()); -+ php_printf("PHP %s (%s)\nCopyright (c) 1997-2017 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version()); - #endif - php_request_shutdown((void *) 0); - fcgi_shutdown(); -diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c -index b47c7c8..ab94bba 100644 ---- a/sapi/phpdbg/phpdbg.c -+++ b/sapi/phpdbg/phpdbg.c -@@ -1699,10 +1699,8 @@ phpdbg_main: - phpdbg_do_help_cmd(exec); - } else if (show_version) { - phpdbg_out( -- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2017 The PHP Group\n%s", -+ "phpdbg %s\nPHP %s, Copyright (c) 1997-2017 The PHP Group\n%s", - PHPDBG_VERSION, -- __DATE__, -- __TIME__, - PHP_VERSION, - get_zend_version() - ); diff --git a/lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch b/lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch deleted file mode 100644 index 78f7dca..0000000 --- a/lang/php7/patches/0042-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= -Date: Wed, 29 Jul 2015 14:37:55 +0200 -Subject: Remove W3C validation icon to not expose the reader's IP address to - potential tracking. - ---- - sapi/fpm/status.html.in | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/sapi/fpm/status.html.in b/sapi/fpm/status.html.in -index 86492d7..31c31ff 100644 ---- a/sapi/fpm/status.html.in -+++ b/sapi/fpm/status.html.in -@@ -71,11 +71,6 @@ - PID↓Start TimeStart SinceRequests ServedRequest DurationRequest methodRequest URIContent LengthUserScriptLast Request %CPULast Request Memory - - --

-- -- Valid XHTML 1.0 Transitional -- --

- - - - -
- Active cjdns peers - - - - - - - - - - - - -
User/NameIPv6StatusVersionRx / TxLatency
Querying Admin API
-
diff --git a/net/luci-app-cjdns/luasrc/view/cjdns/value.htm b/net/luci-app-cjdns/luasrc/view/cjdns/value.htm deleted file mode 100644 index d1e54bb..0000000 --- a/net/luci-app-cjdns/luasrc/view/cjdns/value.htm +++ /dev/null @@ -1,35 +0,0 @@ -<%+cbi/valueheader%> - style="width: auto" /> - <% if self.password then %><% end %> - <% if #self.keylist > 0 or self.datatype then -%> - - <% end -%> -<%+cbi/valuefooter%> diff --git a/net/luci-app-clamav/Makefile b/net/luci-app-clamav/Makefile deleted file mode 100644 index fed8e63..0000000 --- a/net/luci-app-clamav/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luci-app-clamav -PKG_RELEASE:=20150520 - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -PKG_LICENSE:=Apache-2.0 -PKG_MAINTAINER:=Marko Ratkaj - -include $(INCLUDE_DIR)/package.mk - -define Package/luci-app-clamav - SECTION:=luci - CATEGORY:=LuCI - SUBMENU:=3. Applications - TITLE:=ClamAV Web UI - DEPENDS:=+luci-mod-admin-full +clamav -endef - -define Package/luci-app-clamav/description - This package will install ClamAV Web UI. -endef - -define Build/Prepare -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/luci-app-clamav/install - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller/ - $(INSTALL_BIN) \ - ./files/controller/clamav-controller.lua \ - $(1)/usr/lib/lua/luci/controller/clamav.lua - - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/ - $(INSTALL_BIN) \ - ./files/model/cbi/clamav-cbi.lua \ - $(1)/usr/lib/lua/luci/model/cbi/clamav.lua -endef - -$(eval $(call BuildPackage,luci-app-clamav)) diff --git a/net/luci-app-clamav/files/controller/clamav-controller.lua b/net/luci-app-clamav/files/controller/clamav-controller.lua deleted file mode 100644 index 02f3bfc..0000000 --- a/net/luci-app-clamav/files/controller/clamav-controller.lua +++ /dev/null @@ -1,22 +0,0 @@ ---[[ - -LuCI ClamAV module - -Copyright (C) 2015, Itus Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Author: Marko Ratkaj - Luka Perkov - -]]-- - -module("luci.controller.clamav", package.seeall) - -function index() - entry({"admin", "services", "clamav"}, cbi("clamav"), _("ClamAV")) -end diff --git a/net/luci-app-clamav/files/model/cbi/clamav-cbi.lua b/net/luci-app-clamav/files/model/cbi/clamav-cbi.lua deleted file mode 100644 index ff98139..0000000 --- a/net/luci-app-clamav/files/model/cbi/clamav-cbi.lua +++ /dev/null @@ -1,178 +0,0 @@ ---[[ - -LuCI ClamAV module - -Copyright (C) 2015, Itus Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Author: Marko Ratkaj - Luka Perkov - -]]-- - -local fs = require "nixio.fs" -local sys = require "luci.sys" -require "ubus" - -m = Map("clamav", translate("ClamAV")) -m.on_after_commit = function() luci.sys.call("/etc/init.d/clamav restart") end - -s = m:section(TypedSection, "clamav") -s.anonymous = true -s.addremove = false - -s:tab("tab_advanced", translate("Settings")) -s:tab("tab_logs", translate("Log")) - ---------------- Settings -------------- - -LogFileMaxSize = s:taboption("tab_advanced", Value, "LogFileMaxSize", translate("Max size of log file")) -LogFileMaxSize:value("512K", translate("512K")) -LogFileMaxSize:value("1M", translate("1M")) -LogFileMaxSize:value("2M", translate("2M")) -LogFileMaxSize.default = "1M" - -LogTime = s:taboption("tab_advanced", ListValue, "LogTime", translate("Log time with each message")) -LogTime:value("no", translate("No")) -LogTime:value("yes", translate("Yes")) -LogTime.default = "no" - -LogVerbose = s:taboption("tab_advanced", ListValue, "LogVerbose", translate("Enable verbose logging")) -LogVerbose:value("no", translate("No")) -LogVerbose:value("yes", translate("Yes")) -LogVerbose.default = "no" - -ExtendedDetectionInfo = s:taboption("tab_advanced", ListValue, "ExtendedDetectionInfo", translate("Log additional infection info")) -ExtendedDetectionInfo:value("no", translate("No")) -ExtendedDetectionInfo:value("yes", translate("Yes")) -ExtendedDetectionInfo.default = "no" - -dummy3 = s:taboption("tab_advanced", DummyValue, "") -dummy4 = s:taboption("tab_advanced", DummyValue, "") - -MaxDirectoryRecursion = s:taboption("tab_advanced", Value, "MaxDirectoryRecursion", translate("Max directory scan depth")) -MaxDirectoryRecursion:value("15", translate("15")) -MaxDirectoryRecursion:value("20", translate("20")) -MaxDirectoryRecursion.default = "15" - -FollowDirectorySymlink = s:taboption("tab_advanced", ListValue, "FollowDirectorySymlink", translate("Follow directory symlinks")) -FollowDirectorySymlink:value("no", translate("No")) -FollowDirectorySymlink:value("yes", translate("Yes")) -FollowDirectorySymlink.default = "no" - -FollowFileSymlinks = s:taboption("tab_advanced", ListValue, "FollowFileSymlinks", translate("Follow file symlinks")) -FollowFileSymlinks:value("no", translate("No")) -FollowFileSymlinks:value("yes", translate("Yes")) -FollowFileSymlinks.default = "no" - -DetectPUA = s:taboption("tab_advanced", ListValue, "DetectPUA", translate("Detect possibly unwanted apps")) -DetectPUA:value("no", translate("No")) -DetectPUA:value("yes", translate("Yes")) -DetectPUA.default = "no" - -ScanPE = s:taboption("tab_advanced", ListValue, "ScanPE", translate("Scan portable executables")) -ScanPE:value("no", translate("No")) -ScanPE:value("yes", translate("Yes")) -ScanPE.default = "yes" - -ScanELF = s:taboption("tab_advanced", ListValue, "ScanELF", translate("Scan ELF files")) -ScanELF:value("no", translate("No")) -ScanELF:value("yes", translate("Yes")) -ScanELF.default = "yes" - -DetectBrokenExecutables = s:taboption("tab_advanced", ListValue, "DetectBrokenExecutables", translate("Detect broken executables")) -DetectBrokenExecutables:value("no", translate("No")) -DetectBrokenExecutables:value("yes", translate("Yes")) -DetectBrokenExecutables.default = "no" - -ScanOLE2 = s:taboption("tab_advanced", ListValue, "ScanOLE2", translate("Scan MS Office and .msi files")) -ScanOLE2:value("no", translate("No")) -ScanOLE2:value("yes", translate("Yes")) -ScanOLE2.default = "yes" - -ScanPDF = s:taboption("tab_advanced", ListValue, "ScanPDF", translate("Scan pdf files")) -ScanPDF:value("no", translate("No")) -ScanPDF:value("yes", translate("Yes")) -ScanPDF.default = "yes" - -ScanSWF = s:taboption("tab_advanced", ListValue, "ScanSWF", translate("Scan swf files")) -ScanSWF:value("no", translate("No")) -ScanSWF:value("yes", translate("Yes")) -ScanSWF.default = "yes" - -ScanMail = s:taboption("tab_advanced", ListValue, "ScanMail", translate("Scan emails")) -ScanMail:value("no", translate("No")) -ScanMail:value("yes", translate("Yes")) -ScanMail.default = "yes" - -ScanPartialMessages = s:taboption("tab_advanced", ListValue, "ScanPartialMessages", translate("Scan RFC1341 messages split over many emails")) -ScanPartialMessages:value("no", translate("No")) -ScanPartialMessages:value("yes", translate("Yes")) -ScanPartialMessages.default = "no" - -ScanArchive = s:taboption("tab_advanced", ListValue, "ScanArchive", translate("Scan archives")) -ScanArchive:value("no", translate("No")) -ScanArchive:value("yes", translate("Yes")) -ScanArchive.default = "yes" - -ArchiveBlockEncrypted = s:taboption("tab_advanced", ListValue, "ArchiveBlockEncrypted", translate("Block encrypted archives")) -ArchiveBlockEncrypted:value("no", translate("No")) -ArchiveBlockEncrypted:value("yes", translate("Yes")) -ArchiveBlockEncrypted.default = "no" - -dummy5 = s:taboption("tab_advanced", DummyValue, "") -dummy6 = s:taboption("tab_advanced", DummyValue, "") - -StreamMinPort = s:taboption("tab_advanced", Value, "StreamMinPort", translate("Port range, lowest port")) -StreamMinPort.datatype = "portrange" -StreamMinPort:value("1024",translate("1024")) -StreamMinPort.default = "1024" - -StreamMaxPort = s:taboption("tab_advanced", Value, "StreamMaxPort", translate("Port range, highest port")) -StreamMaxPort.datatype = "portrange" -StreamMaxPort:value("2048",translate("2048")) -StreamMaxPort.default = "2048" - -MaxThreads = s:taboption("tab_advanced", Value, "MaxThreads", translate("Max number of threads")) -MaxThreads.datatype = "and(uinteger,min(1))" -MaxThreads:value("10",translate("10")) -MaxThreads:value("20",translate("20")) -MaxThreads.default = "10" - -SelfCheck = s:taboption("tab_advanced", Value, "SelfCheck", translate("Database check every N sec")) -SelfCheck.datatype = "and(uinteger,min(1))" -SelfCheck:value("600",translate("600")) -SelfCheck.default = "600" - -MaxFileSize = s:taboption("tab_advanced", Value, "MaxFileSize", translate("Max size of scanned file")) -MaxFileSize.datatype = "string" -MaxFileSize:value("150M",translate("150M")) -MaxFileSize:value("50M",translate("50M")) -MaxFileSize.default = "150M" - ------------------- Log -------------------- - -clamav_logfile = s:taboption("tab_logs", TextValue, "lines", "") -clamav_logfile.wrap = "off" -clamav_logfile.rows = 25 -clamav_logfile.rmempty = true - -function clamav_logfile.cfgvalue() - local uci = require "luci.model.uci".cursor_state() - local file = "/tmp/clamd.log" - if file then - return fs.readfile(file) or "" - else - return "" - end -end - -function clamav_logfile.write() -end - -return m diff --git a/net/luci-app-e2guardian/Makefile b/net/luci-app-e2guardian/Makefile deleted file mode 100644 index 880f373..0000000 --- a/net/luci-app-e2guardian/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luci-app-e2guardian -PKG_RELEASE:=20150520 - -PKG_LICENSE:=Apache-2.0 - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk - -define Package/luci-app-e2guardian - SECTION:=luci - CATEGORY:=LuCI - SUBMENU:=3. Applications - TITLE:=E2Guardian Web UI - DEPENDS:=+luci-mod-admin-full +e2guardian - MAINTAINER:=Marko Ratkaj -endef - -define Package/luci-app-e2guardian/description - This package will install E2Guardian Web UI. -endef - -define Build/Prepare -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/luci-app-e2guardian/install - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller/ - $(INSTALL_BIN) \ - ./files/e2guardian-controller.lua \ - $(1)/usr/lib/lua/luci/controller/e2guardian.lua - - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/ - $(INSTALL_BIN) \ - ./files//e2guardian-cbi.lua \ - $(1)/usr/lib/lua/luci/model/cbi/e2guardian.lua -endef - -$(eval $(call BuildPackage,luci-app-e2guardian)) diff --git a/net/luci-app-e2guardian/files/e2guardian-cbi.lua b/net/luci-app-e2guardian/files/e2guardian-cbi.lua deleted file mode 100644 index b621321..0000000 --- a/net/luci-app-e2guardian/files/e2guardian-cbi.lua +++ /dev/null @@ -1,399 +0,0 @@ ---[[ - -LuCI E2Guardian module - -Copyright (C) 2015, Itus Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Author: Marko Ratkaj - Luka Perkov - -]]-- - -local fs = require "nixio.fs" -local sys = require "luci.sys" - -m = Map("e2guardian", translate("E2Guardian")) -m.on_after_commit = function() luci.sys.call("/etc/init.d/e2guardian restart") end - -s = m:section(TypedSection, "e2guardian") -s.anonymous = true -s.addremove = false - -s:tab("tab_general", translate("General Settings")) -s:tab("tab_additional", translate("Additional Settings")) -s:tab("tab_logs", translate("Logs")) - - ------------------ General Settings Tab ----------------------- - -filterip = s:taboption("tab_general", Value, "filterip", translate("IP that E2Guardian listens")) -filterip.datatype = "ip4addr" - -filterports = s:taboption("tab_general", Value, "filterports", translate("Port that E2Guardian listens")) -filterports.datatype = "portrange" -filterports.placeholder = "0-65535" - -proxyip = s:taboption("tab_general", Value, "proxyip", translate("IP address of the proxy")) -proxyip.datatype = "ip4addr" -proxyip.default = "127.0.0.1" - -proxyport = s:taboption("tab_general", Value, "proxyport", translate("Port of the proxy")) -proxyport.datatype = "portrange" -proxyport.placeholder = "0-65535" - -languagedir = s:taboption("tab_general", Value, "languagedir", translate("Language dir")) -languagedir.datatype = "string" -languagedir.default = "/usr/share/e2guardian/languages" - -language = s:taboption("tab_general", Value, "language", translate("Language to use")) -language.datatype = "string" -language.default = "ukenglish" - -loglevel = s:taboption("tab_general", ListValue, "loglevel", translate("Logging Settings")) -loglevel:value("0", translate("none")) -loglevel:value("1", translate("just denied")) -loglevel:value("2", translate("all text based")) -loglevel:value("3", translate("all requests")) -loglevel.default = "2" - -logexceptionhits = s:taboption("tab_general", ListValue, "logexceptionhits", translate("Log Exception Hits")) -logexceptionhits:value("0", translate("never")) -logexceptionhits:value("1", translate("log, but don't mark as exceptions")) -logexceptionhits:value("2", translate("log and mark")) -logexceptionhits.default = "2" - -logfileformat = s:taboption("tab_general", ListValue, "logfileformat", translate("Log File Format")) -logfileformat:value("1", translate("DansgGuardian format, space delimited")) -logfileformat:value("2", translate("CSV-style format")) -logfileformat:value("3", translate("Squid Log File Format")) -logfileformat:value("4", translate("Tab delimited")) -logfileformat:value("5", translate("Protex format")) -logfileformat:value("6", translate("Protex format with server field blanked")) -logfileformat.default = "1" - -accessdeniedaddress = s:taboption("tab_general", Value, "accessdeniedaddress", translate("Access denied address"), -translate("Server to which the cgi e2guardian reporting script was copied. Reporting levels 1 and 2 only")) -accessdeniedaddress.datatype = "string" -accessdeniedaddress.default = "http://YOURSERVER.YOURDOMAIN/cgi-bin/e2guardian.pl" - -usecustombannedimage = s:taboption("tab_general", ListValue, "usecustombannedimage", translate("Banned image replacement")) -usecustombannedimage:value("on", translate("Yes")) -usecustombannedimage:value("off", translate("No")) -usecustombannedimage.default = "on" - -custombannedimagefile = s:taboption("tab_general", Value, "custombannedimagefile", translate("Custom banned image file")) -custombannedimagefile.datatype = "string" -custombannedimagefile.default = "/usr/share/e2guardian/transparent1x1.gif" - -usecustombannedflash = s:taboption("tab_general", ListValue, "usecustombannedflash", translate("Banned flash replacement")) -usecustombannedflash:value("on", translate("Yes")) -usecustombannedflash:value("off", translate("No")) -usecustombannedflash.default = "on" - -custombannedflashfile = s:taboption("tab_general", Value, "custombannedflashfile", translate("Custom banned flash file")) -custombannedflashfile.datatype = "string" -custombannedflashfile.default = "/usr/share/e2guardian/blockedflash.swf" - -filtergroups = s:taboption("tab_general", Value, "filtergroups", translate("Number of filter groups")) -filtergroups.datatype = "and(uinteger,min(1))" -filtergroups.default = "1" - -filtergroupslist = s:taboption("tab_general", Value, "filtergroupslist", translate("List of filter groups")) -filtergroupslist.datatype = "string" -filtergroupslist.default = "/etc/e2guardian/lists/filtergroupslist" - -bannediplist = s:taboption("tab_general", Value, "bannediplist", translate("List of banned IPs")) -bannediplist.datatype = "string" -bannediplist.default = "/etc/e2guardian/lists/bannediplist" - -exceptioniplist = s:taboption("tab_general", Value, "exceptioniplist", translate("List of IP exceptions")) -exceptioniplist.datatype = "string" -exceptioniplist.default = "/etc/e2guardian/lists/exceptioniplist" - -perroomblockingdirectory = s:taboption("tab_general", Value, "perroomblockingdirectory", translate("Per-Room blocking definition directory")) -perroomblockingdirectory.datatype = "string" -perroomblockingdirectory.default = "/etc/e2guardian/lists/bannedrooms/" - -showweightedfound = s:taboption("tab_general", ListValue, "showweightedfound", translate("Show weighted phrases found")) -showweightedfound:value("on", translate("Yes")) -showweightedfound:value("off", translate("No")) -showweightedfound.default = "on" - -weightedphrasemode = s:taboption("tab_general", ListValue, "weightedphrasemode", translate("Weighted phrase mode")) -weightedphrasemode:value("0", translate("off")) -weightedphrasemode:value("1", translate("on, normal operation")) -weightedphrasemode:value("2", translate("on, phrase found only counts once on a page")) -weightedphrasemode.default = "2" - -urlcachenumber = s:taboption("tab_general", Value, "urlcachenumber", translate("Clean result caching for URLs")) -urlcachenumber.datatype = "and(uinteger,min(0))" -urlcachenumber.default = "1000" - -urlcacheage = s:taboption("tab_general", Value, "urlcacheage", translate("Age before they should be ignored in seconds")) -urlcacheage.datatype = "and(uinteger,min(0))" -urlcacheage.default = "900" - -scancleancache = s:taboption("tab_general", ListValue, "scancleancache", translate("Cache for content (AV) scans as 'clean'")) -scancleancache:value("on", translate("Yes")) -scancleancache:value("off", translate("No")) -scancleancache.default = "on" - -phrasefiltermode = s:taboption("tab_general", ListValue, "phrasefiltermode", translate("Filtering options")) -phrasefiltermode:value("0", translate("raw")) -phrasefiltermode:value("1", translate("smart")) -phrasefiltermode:value("2", translate("both raw and smart")) -phrasefiltermode:value("3", translate("meta/title")) -phrasefiltermode.default = "2" - -preservecase = s:taboption("tab_general", ListValue, "perservecase", translate("Lower caseing options")) -preservecase:value("0", translate("force lower case")) -preservecase:value("1", translate("don't change")) -preservecase:value("2", translate("scan fist in lower, then in original")) -preservecase.default = "0" - -hexdecodecontent = s:taboption("tab_general", ListValue, "hexdecodecontent", translate("Hex decoding options")) -hexdecodecontent:value("on", translate("Yes")) -hexdecodecontent:value("off", translate("No")) -hexdecodecontent.default = "off" - -forcequicksearch = s:taboption("tab_general", ListValue, "forcequicksearch", translate("Quick search")) -forcequicksearch:value("on", translate("Yes")) -forcequicksearch:value("off", translate("No")) -forcequicksearch.default = "off" - -reverseaddresslookups= s:taboption("tab_general", ListValue, "reverseaddresslookups", translate("Reverse lookups for banned site and URLs")) -reverseaddresslookups:value("on", translate("Yes")) -reverseaddresslookups:value("off", translate("No")) -reverseaddresslookups.default = "off" - -reverseclientiplookups = s:taboption("tab_general", ListValue, "reverseclientiplookups", translate("Reverse lookups for banned and exception IP lists")) -reverseclientiplookups:value("on", translate("Yes")) -reverseclientiplookups:value("off", translate("No")) -reverseclientiplookups.default = "off" - -logclienthostnames = s:taboption("tab_general", ListValue, "logclienthostnames", translate("Perform reverse lookups on client IPs for successful requests")) -logclienthostnames:value("on", translate("Yes")) -logclienthostnames:value("off", translate("No")) -logclienthostnames.default = "off" - -createlistcachefiles = s:taboption("tab_general", ListValue, "createlistcachefiles", translate("Build bannedsitelist and bannedurllist cache files")) -createlistcachefiles:value("on",translate("Yes")) -createlistcachefiles:value("off",translate("No")) -createlistcachefiles.default = "on" - -prefercachedlists = s:taboption("tab_general", ListValue, "prefercachedlists", translate("Prefer cached list files")) -prefercachedlists:value("on", translate("Yes")) -prefercachedlists:value("off", translate("No")) -prefercachedlists.default = "off" - -maxuploadsize = s:taboption("tab_general", Value, "maxuploadsize", translate("Max upload size (in Kbytes)")) -maxuploadsize:value("-1", translate("no blocking")) -maxuploadsize:value("0", translate("complete block")) -maxuploadsize.default = "-1" - -maxcontentfiltersize = s:taboption("tab_general", Value, "maxcontentfiltersize", translate("Max content filter size"), -translate("The value must not be higher than max content ram cache scan size or 0 to match it")) -maxcontentfiltersize.datatype = "and(uinteger,min(0))" -maxcontentfiltersize.default = "256" - -maxcontentramcachescansize = s:taboption("tab_general", Value, "maxcontentramcachescansize", translate("Max content ram cache scan size"), -translate("This is the max size of file that DG will download and cache in RAM")) -maxcontentramcachescansize.datatype = "and(uinteger,min(0))" -maxcontentramcachescansize.default = "2000" - -maxcontentfilecachescansize = s:taboption("tab_general", Value, "maxcontentfilecachescansize", translate("Max content file cache scan size")) -maxcontentfilecachescansize.datatype = "and(uinteger,min(0))" -maxcontentfilecachescansize.default = "20000" - -proxytimeout = s:taboption("tab_general", Value, "proxytimeout", translate("Proxy timeout (5-100)")) -proxytimeout.datatype = "range(5,100)" -proxytimeout.default = "20" - -proxyexchange = s:taboption("tab_general", Value, "proxyexchange", translate("Proxy header excahnge (20-300)")) -proxyexchange.datatype = "range(20,300)" -proxyexchange.default = "20" - -pcontimeout = s:taboption("tab_general", Value, "pcontimeout", translate("Pconn timeout"), -translate("How long a persistent connection will wait for other requests")) -pcontimeout.datatype = "range(5,300)" -pcontimeout.default = "55" - -filecachedir = s:taboption("tab_general", Value, "filecachedir", translate("File cache directory")) -filecachedir.datatype = "string" -filecachedir.default = "/tmp" - -deletedownloadedtempfiles = s:taboption("tab_general", ListValue, "deletedownloadedtempfiles", translate("Delete file cache after user completes download")) -deletedownloadedtempfiles:value("on", translate("Yes")) -deletedownloadedtempfiles:value("off", translate("No")) -deletedownloadedtempfiles.default = "on" - -initialtrickledelay = s:taboption("tab_general", Value, "initialtrickledelay", translate("Initial Trickle delay"), -translate("Number of seconds a browser connection is left waiting before first being sent *something* to keep it alive")) -initialtrickledelay.datatype = "and(uinteger,min(0))" -initialtrickledelay.default = "20" - -trickledelay = s:taboption("tab_general", Value, "trickledelay", translate("Trickle delay"), -translate("Number of seconds a browser connection is left waiting before being sent more *something* to keep it alive")) -trickledelay.datatype = "and(uinteger,min(0))" -trickledelay.default = "10" - -downloadmanager = s:taboption("tab_general", Value, "downloadmanager", translate("Download manager")) -downloadmanager.datatype = "string" -downloadmanager.default = "/etc/e2guardian/downloadmanagers/default.conf" - -contentscannertimeout = s:taboption("tab_general", Value, "contentscannertimeout", translate("Content scanner timeout")) -contentscannertimeout.datatype = "and(uinteger,min(0))" -contentscannertimeout.default = "60" - -contentscanexceptions = s:taboption("tab_general", ListValue, "contentscanexceptions", translate("Content scan exceptions")) -contentscanexceptions:value("on", translate("Yes")) -contentscanexceptions:value("off", translate("No")) -contentscanexceptions.default = "off" - -recheckreplacedurls = s:taboption("tab_general", ListValue, "recheckreplacedurls", translate("e-check replaced URLs")) -recheckreplacedurls:value("on", translate("Yes")) -recheckreplacedurls:value("off", translate("No")) -recheckreplacedurls.default = "off" - -forwardedfor = s:taboption("tab_general", ListValue, "forwardedfor", translate("Misc setting: forwardedfor"), -translate("If on, it may help solve some problem sites that need to know the source ip.")) -forwardedfor:value("on", translate("Yes")) -forwardedfor:value("off", translate("No")) -forwardedfor.default = "off" - -usexforwardedfor = s:taboption("tab_general", ListValue, "usexforwardedfor", translate("Misc setting: usexforwardedfor"), -translate("This is for when you have squid between the clients and E2Guardian")) -usexforwardedfor:value("on", translate("Yes")) -usexforwardedfor:value("off", translate("No")) -usexforwardedfor.default = "off" - -logconnectionhandlingerrors = s:taboption("tab_general", ListValue, "logconnectionhandlingerrors", translate("Log debug info about log()ing and accept()ing")) -logconnectionhandlingerrors:value("on", translate("Yes")) -logconnectionhandlingerrors:value("off", translate("No")) -logconnectionhandlingerrors.default = "on" - -logchildprocesshandling = s:taboption("tab_general", ListValue, "logchildprocesshandling", translate("Log child process handling")) -logchildprocesshandling:value("on", translate("Yes")) -logchildprocesshandling:value("off", translate("No")) -logchildprocesshandling.default = "off" - -maxchildren = s:taboption("tab_general", Value, "maxchildren", translate("Max number of processes to spawn")) -maxchildren.datatype = "and(uinteger,min(0))" -maxchildren.default = "180" - -minchildren = s:taboption("tab_general", Value, "minchildren", translate("Min number of processes to spawn")) -minchildren.datatype = "and(uinteger,min(0))" -minchildren.default = "20" - -minsparechildren = s:taboption("tab_general", Value, "minsparechildren", translate("Min number of processes to keep ready")) -minsparechildren.datatype = "and(uinteger,min(0))" -minsparechildren.default = "16" - -preforkchildren = s:taboption("tab_general", Value, "preforkchildren", translate("Sets minimum nuber of processes when it runs out")) -preforkchildren.datatype = "and(uinteger,min(0))" -preforkchildren.default = "10" - -maxsparechildren = s:taboption("tab_general", Value, "maxsparechildren", translate("Sets the maximum number of processes to have doing nothing")) -maxsparechildren.datatype = "and(uinteger,min(0))" -maxsparechildren.default = "32" - -maxagechildren = s:taboption("tab_general", Value, "maxagechildren", translate("Max age of child process")) -maxagechildren.datatype = "and(uinteger,min(0))" -maxagechildren.default = "500" - -maxips = s:taboption("tab_general", Value, "maxips", translate("Max number of clinets allowed to connect")) -maxips:value("0", translate("no limit")) -maxips.default = "0" - -ipipcfilename = s:taboption("tab_general", Value, "ipipcfilename", translate("IP list IPC server directory and filename")) -ipipcfilename.datatype = "string" -ipipcfilename.default = "/tmp/.dguardianipc" - -urlipcfilename = s:taboption("tab_general", Value, "urlipcfilename", translate("Defines URL list IPC server directory and filename used to communicate with the URL cache process")) -urlipcfilename.datatype = "string" -urlipcfilename.default = "/tmp/.dguardianurlipc" - -ipcfilename = s:taboption("tab_general", Value, "ipcfilename", translate("Defines URL list IPC server directory and filename used to communicate with the URL cache process")) -ipcfilename.datatype = "string" -ipcfilename.default = "/tmp/.dguardianipipc" - -nodeamon = s:taboption("tab_general", ListValue, "nodeamon", translate("Disable deamoning")) -nodeamon:value("on", translate("Yes")) -nodeamon:value("off", translate("No")) -nodeamon.default = "off" - -nologger = s:taboption("tab_general", ListValue, "nologger", translate("Disable logger")) -nologger:value("on", translate("Yes")) -nologger:value("off", translate("No")) -nologger.default = "off" - -logadblock = s:taboption("tab_general", ListValue, "logadblock", translate("Enable logging of ADs")) -logadblock:value("on", translate("Yes")) -logadblock:value("off", translate("No")) -logadblock.default = "off" - -loguseragent = s:taboption("tab_general", ListValue, "loguseragent", translate("Enable logging of client user agent")) -loguseragent:value("on", translate("Yes")) -loguseragent:value("off", translate("No")) -loguseragent.default = "off" - -softrestart = s:taboption("tab_general", ListValue, "softrestart", translate("Enable soft restart")) -softrestart:value("on", translate("Yes")) -softrestart:value("off", translate("No")) -softrestart.default = "off" - - ------------------------- Additional Settings Tab ---------------------------- - -e2guardian_config_file = s:taboption("tab_additional", TextValue, "_data", "") -e2guardian_config_file.wrap = "off" -e2guardian_config_file.rows = 25 -e2guardian_config_file.rmempty = false - -function e2guardian_config_file.cfgvalue() - local uci = require "luci.model.uci".cursor_state() - file = "/etc/e2guardian/e2guardianf1.conf" - if file then - return fs.readfile(file) or "" - else - return "" - end -end - -function e2guardian_config_file.write(self, section, value) - if value then - local uci = require "luci.model.uci".cursor_state() - file = "/etc/e2guardian/e2guardianf1.conf" - fs.writefile(file, value:gsub("\r\n", "\n")) - end -end - - ----------------------------- Logs Tab ----------------------------- - -e2guardian_logfile = s:taboption("tab_logs", TextValue, "lines", "") -e2guardian_logfile.wrap = "off" -e2guardian_logfile.rows = 25 -e2guardian_logfile.rmempty = true - -function e2guardian_logfile.cfgvalue() - local uci = require "luci.model.uci".cursor_state() - file = "/tmp/e2guardian/access.log" - if file then - return fs.readfile(file) or "" - else - return "Can't read log file" - end -end - -function e2guardian_logfile.write() - return "" -end - -return m diff --git a/net/luci-app-e2guardian/files/e2guardian-controller.lua b/net/luci-app-e2guardian/files/e2guardian-controller.lua deleted file mode 100644 index dd545f5..0000000 --- a/net/luci-app-e2guardian/files/e2guardian-controller.lua +++ /dev/null @@ -1,22 +0,0 @@ ---[[ - -LuCI E2Guardian module - -Copyright (C) 2015, Itus Networks, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Author: Marko Ratkaj - Luka Perkov - -]]-- - -module("luci.controller.e2guardian", package.seeall) - -function index() - entry({"admin", "services", "e2guardian"}, cbi("e2guardian"), _("E2Guardian")) -end diff --git a/net/luci-app-squid/Makefile b/net/luci-app-squid/Makefile deleted file mode 100644 index 91ce724..0000000 --- a/net/luci-app-squid/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luci-app-squid -PKG_RELEASE:=20150608 - -PKG_LICENSE:=Apache-2.0 - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk - -define Package/luci-app-squid - SECTION:=luci - CATEGORY:=LuCI - SUBMENU:=3. Applications - TITLE:=Squid Web UI - DEPENDS:=+luci-mod-admin-full +squid - MAINTAINER:=Marko Ratkaj -endef - -define Package/luci-app-squid/description - This package will install Squid Web UI. -endef - -define Build/Prepare -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/luci-app-squid/install - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller/ - $(INSTALL_BIN) \ - ./files/squid-controller.lua \ - $(1)/usr/lib/lua/luci/controller/squid.lua - - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/ - $(INSTALL_BIN) \ - ./files//squid-cbi.lua \ - $(1)/usr/lib/lua/luci/model/cbi/squid.lua -endef - -$(eval $(call BuildPackage,luci-app-squid)) diff --git a/net/luci-app-squid/files/squid-cbi.lua b/net/luci-app-squid/files/squid-cbi.lua deleted file mode 100644 index 0ac554a..0000000 --- a/net/luci-app-squid/files/squid-cbi.lua +++ /dev/null @@ -1,67 +0,0 @@ ---[[ - -LuCI Squid module - -Copyright (C) 2015, OpenWrt.org - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Author: Marko Ratkaj - -]]-- - -local fs = require "nixio.fs" -local sys = require "luci.sys" -require "ubus" - -m = Map("squid", translate("Squid")) -m.on_after_commit = function() luci.sys.call("/etc/init.d/squid restart") end - -s = m:section(TypedSection, "squid") -s.anonymous = true -s.addremove = false - -s:tab("general", translate("General Settings")) - -http_port = s:taboption("general", Value, "http_port", translate("Port")) -http_port.datatype = "portrange" -http_port.placeholder = "0-65535" - -visible_hostname = s:taboption("general", Value, "visible_hostname", translate("Visible Hostname")) -visible_hostname.datatype="string" -visible_hostname.placeholder = "OpenWrt" - -coredump_dir = s:taboption("general", Value, "coredump_dir", translate("Coredump files directory")) -coredump_dir.datatype="string" -coredump_dir.placeholder = "/tmp/squid" - -s:tab("advanced", translate("Advanced Settings")) - -squid_config_file = s:taboption("advanced", TextValue, "_data", "") -squid_config_file.wrap = "off" -squid_config_file.rows = 25 -squid_config_file.rmempty = false - -function squid_config_file.cfgvalue() - local uci = require "luci.model.uci".cursor_state() - local file = uci:get("squid", "squid", "config_file") - if file then - return fs.readfile(file) or "" - else - return "" - end -end - -function squid_config_file.write(self, section, value) - if value then - local uci = require "luci.model.uci".cursor_state() - local file = uci:get("squid", "squid", "config_file") - fs.writefile(file, value:gsub("\r\n", "\n")) - end -end - -return m diff --git a/net/luci-app-squid/files/squid-controller.lua b/net/luci-app-squid/files/squid-controller.lua deleted file mode 100644 index 09946a1..0000000 --- a/net/luci-app-squid/files/squid-controller.lua +++ /dev/null @@ -1,21 +0,0 @@ ---[[ - -LuCI Squid module - -Copyright (C) 2015, OpenWrt.org - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Author: Marko Ratkaj - -]]-- - -module("luci.controller.squid", package.seeall) - -function index() - entry({"admin", "services", "squid"}, cbi("squid"), _("Squid")) -end diff --git a/net/mac-telnet/Makefile b/net/mac-telnet/Makefile deleted file mode 100644 index 024ce75..0000000 --- a/net/mac-telnet/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (C) 2014-2015 OpenWrt.org -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mac-telnet -PKG_VERSION:=2015-09-02 -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/jow-/MAC-Telnet.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=37d83cbc9c07266d6c957d27bf75285b305eceab -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_LICENSE:=GPL-2.0+ -PKG_MAINTAINER:=Jo-Philipp Wich - -include $(INCLUDE_DIR)/package.mk - -TARGET_CFLAGS += -ffunction-sections -fdata-sections $(if $(CONFIG_MACTELNET_PLAIN_SUPPORT),-DTELNET_SUPPORT) -TARGET_LDFLAGS += -Wl,--gc-sections - -# 1: name -# 2: executable -define BuildPlugin - define Package/mac-telnet-$(1) - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libubox - TITLE:=MAC-Telnet / MAC-SSH $(1) - URL:=https://github.com/jow-/MAC-Telnet - endef - - define Package/mac-telnet-$(1)/description - Open source MAC Telnet client and server utilities for connecting to - Mikrotik RouterOS routers and Linux machines via MAC address. - endef - - define Package/mac-telnet-$(1)/install - $(INSTALL_DIR) $$(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(2) $$(1)/usr/sbin/ - $(call Package/mac-telnet-$(1)/install-extra) - endef - - $$(eval $$(call BuildPackage,mac-telnet-$(1))) -endef - -define Package/mac-telnet-server/config - config MACTELNET_PLAIN_SUPPORT - bool "Include support for plain telnet connections" - depends on PACKAGE_mac-telnet-server - default y - help - Disable this option to only support SSH logins to the - MAC-Telnet server. -endef - -define Package/mac-telnet-server/install-extra - $(INSTALL_DIR) $$(1)/etc/init.d - $(INSTALL_BIN) ./files/mactelnet.init $$(1)/etc/init.d/mactelnet - $(INSTALL_DIR) $$(1)/etc/config - $(INSTALL_DATA) ./files/mactelnet.config $$(1)/etc/config/mactelnet -endef - - -$(eval $(call BuildPlugin,server,mactelnetd)) -$(eval $(call BuildPlugin,client,mactelnet)) -$(eval $(call BuildPlugin,ping,macping)) -$(eval $(call BuildPlugin,discover,mndp)) diff --git a/net/mac-telnet/files/mactelnet.config b/net/mac-telnet/files/mactelnet.config deleted file mode 100644 index ddf7157..0000000 --- a/net/mac-telnet/files/mactelnet.config +++ /dev/null @@ -1,9 +0,0 @@ -# Global settings for MAC-Telnet daemon -config mactelnetd - option sshmode '0' - list interface 'lan' - -# Define a MAC-Telnet login, multiple login sections allowed -config login - option username 'root' - option password '' diff --git a/net/mac-telnet/files/mactelnet.init b/net/mac-telnet/files/mactelnet.init deleted file mode 100755 index 701ce98..0000000 --- a/net/mac-telnet/files/mactelnet.init +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=60 - -USE_PROCD=1 - -PROG=/usr/sbin/mactelnetd -USERS=/var/etc/mactelnetd.users -SSHMODE=0 - -add_account() { - local cfg="$1" - local user pass - - [ $SSHMODE -eq 0 ] || { - [ -n "$already_warned" ] || { - echo "mactelnet.$cfg: login sections ignored in SSH mode" >&1 - already_warned=1 - } - return - } - - config_get username "$cfg" username - config_get password "$cfg" password - - [ -n "$username" ] || { - echo "mactelnet.$cfg: username missing" >&2 - return - } - - [ -n "$password" ] || { - echo "mactelnet.$cfg: password missing" >&2 - return - } - - echo "$username:$password" >> $USERS -} - -add_interface() { - local iface="$1" - local device - - [ -n "$iface" ] || return - - if network_get_physdev device "$iface"; then - procd_append_param command -i "$device" - fi - - procd_add_reload_interface_trigger "$iface" -} - -add_globals() { - local cfg="$1" - - config_get_bool SSHMODE "$cfg" sshmode 0 - [ $SSHMODE -eq 0 ] || procd_append_param command -S - - config_list_foreach "$cfg" interface add_interface -} - -start_service() { - . /lib/functions/network.sh - - procd_open_instance - - procd_add_reload_trigger mactelnet - procd_set_param command "$PROG" -f - - config_load mactelnet - config_foreach add_globals mactelnetd - - [ $SSHMODE -eq 1 ] || { - rm -f $USERS - config_foreach add_account login - } - - procd_close_instance -} - diff --git a/net/macchanger/Makefile b/net/macchanger/Makefile new file mode 100644 index 0000000..2bfcbbf --- /dev/null +++ b/net/macchanger/Makefile @@ -0,0 +1,45 @@ +# +# Copyright (C) 2006-2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=macchanger +PKG_VERSION:=1.7.0 +PKG_RELEASE:=2 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/alobbs/macchanger/releases/download/$(PKG_VERSION)/ +PKG_MD5SUM:=ca56f16142914337391dac91603eb332 + +PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Nicolas Thill + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/macchanger + SECTION:=utils + CATEGORY:=Utilities + TITLE:=utility for viewing/manipulating the MAC address + URL:=https://github.com/alobbs/macchanger/ +endef + +define Package/macchanger/description + This is a GNU/Linux utility for viewing/manipulating the MAC address + of network interfaces. +endef + +define Package/macchanger/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/macchanger $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share + $(CP) $(PKG_INSTALL_DIR)/usr/share/macchanger $(1)/usr/share/ +endef + +$(eval $(call BuildPackage,macchanger)) diff --git a/net/macchanger/patches/0001-fix-build-with-musl.patch b/net/macchanger/patches/0001-fix-build-with-musl.patch new file mode 100644 index 0000000..4a30d55 --- /dev/null +++ b/net/macchanger/patches/0001-fix-build-with-musl.patch @@ -0,0 +1,13 @@ +Index: macchanger-1.7.0/src/netinfo.c +=================================================================== +--- macchanger-1.7.0.orig/src/netinfo.c ++++ macchanger-1.7.0/src/netinfo.c +@@ -113,7 +113,7 @@ mc_net_info_get_permanent_mac (const net + epa->size = IFHWADDRLEN; + + memcpy(&req, &(net->dev), sizeof(struct ifreq)); +- req.ifr_data = (caddr_t)epa; ++ req.ifr_data = (char *)epa; + + if (ioctl(net->sock, SIOCETHTOOL, &req) < 0) { + perror ("[ERROR] Could not read permanent MAC"); diff --git a/net/mdnsresponder/Makefile b/net/mdnsresponder/Makefile deleted file mode 100644 index 4b2f5be..0000000 --- a/net/mdnsresponder/Makefile +++ /dev/null @@ -1,164 +0,0 @@ -# -# Copyright (C) 2009-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mDNSResponder -PKG_VERSION:=576.30.4 -PKG_RELEASE:=1 - -PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://opensource.apple.com/tarballs/mDNSResponder/ -PKG_MD5SUM:=940057ac8b513b00e8e9ca12ef796762 -PKG_MAINTAINER:=Steven Barth -PKG_LICENSE:=Apache-2.0 - -PKG_BUILD_DIR:=$(BUILD_DIR)/mDNSResponder-$(PKG_VERSION) - -PKG_BUILD_PARALLEL:=0 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -# sys/capability.h is not part of *libc* -PKG_BUILD_DEPENDS:=libcap - -define Package/mDNSResponder/Default - SECTION:=net - CATEGORY:=Network - SUBMENU:=IP Addresses and Names - TITLE:=mDNS - URL:=http://developer.apple.com/networking/bonjour/ -endef - -define Package/mDNSResponder/Default/description - Bonjour, also known as zero-configuration networking, enables - automatic discovery of computers, devices, and services on - IP networks. -endef - -define Package/mdns-utils -$(call Package/mDNSResponder/Default) - TITLE+= client utilities - DEPENDS+= +mdnsd -endef - -define Package/mdns-utils/description -$(call Package/mDNSResponder/Default/description) - . - This package contains mDNS client utilities: - - dns-sd - - mDNSClient - - mDNSIdentify - - mDNSNetMonitor - - mDNSProxyResponder - - mDNSResponder -endef - -define Package/mdnsd -$(call Package/mDNSResponder/Default) - TITLE+= server daemon -endef - -define Package/mdnsd/description -$(call Package/mDNSResponder/Default/description) - . - This package contains the mDNS server daemon. -endef - -define Package/mdnsresponder -$(call Package/mDNSResponder/Default) - TITLE+= suite (meta) - DEPENDS+= +mdns-utils +mdnsd -endef - -define Package/mdnsresponder/description -$(call Package/mDNSResponder/Default/description) - . - This meta package contains only dependencies on other packages. -endef - -# I have no idea why -lc is required, but without it, C library symbols are -# not found: -MAKE_FLAGS += \ - LD="$(TARGET_CC)" \ - CFLAGS_DEBUG="$(TARGET_CFLAGS)" \ - LINKOPTS=-lc \ - LDCONFIG= \ - ETCBASE="$(PKG_INSTALL_DIR)/etc" \ - INSTBASE="$(PKG_INSTALL_DIR)/usr" \ - NSSINSTPATH="$(PKG_INSTALL_DIR)/lib" \ - MANPATH="$(PKG_INSTALL_DIR)/usr/man" \ - STARTUPSCRIPTDIR="$(PKG_INSTALL_DIR)/etc/init.d" \ - RUNLEVELSCRIPTSDIR="$(PKG_INSTALL_DIR)/etc/rc.d" \ - os=linux-uclibc -MAKE_PATH = mDNSPosix - -define Build/Compile - $(call Build/Compile/Default) - # XXX: mDNSResponder's "make install" does not seem to create: - mkdir -p $(PKG_INSTALL_DIR)/lib/ - mkdir -p $(PKG_INSTALL_DIR)/usr/bin/ - mkdir -p $(PKG_INSTALL_DIR)/usr/sbin/ - mkdir -p $(PKG_INSTALL_DIR)/usr/lib/ - mkdir -p $(PKG_INSTALL_DIR)/usr/man/man5/ - mkdir -p $(PKG_INSTALL_DIR)/usr/man/man8/ - mkdir -p $(PKG_INSTALL_DIR)/usr/include/ - mkdir -p $(PKG_INSTALL_DIR)/etc/ - mkdir -p $(PKG_INSTALL_DIR)/etc/init.d/ - mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/ - mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc2.d/ - mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc3.d/ - mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc4.d/ - mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc5.d/ - mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc0.d/ - mkdir -p $(PKG_INSTALL_DIR)/etc/rc.d/rc6.d/ -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_BUILD_DIR)/mDNSShared/dns_sd.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/*.so* $(1)/usr/lib/ -endef - -define Package/mdns-utils/install - $(INSTALL_DIR) $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/dns-sd $(1)/usr/bin/ - $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSClientPosix $(1)/usr/bin/mDNSClient - $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSIdentify $(1)/usr/bin/mDNSIdentify - $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSNetMonitor $(1)/usr/bin/mDNSNetMonitor - $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSProxyResponderPosix $(1)/usr/bin/mDNSProxyResponder - $(CP) $(PKG_BUILD_DIR)/mDNSPosix/build/prod/mDNSResponderPosix $(1)/usr/bin/mDNSResponder - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/mDNSResponder.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/mDNSResponder.init $(1)/etc/init.d/mDNSResponder -endef - -define Package/mdns-utils/conffiles -/etc/mDNSResponder.conf -endef - -define Package/mdnsd/install - $(INSTALL_DIR) $(1)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/mdnsd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/mdnsd.init $(1)/etc/init.d/mdnsd - $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdns_sd.so.1 $(1)/usr/lib/ - $(LN) -s libdns_sd.so.1 $(1)/usr/lib/libdns_sd.so -endef - -define Package/mdnsresponder/install - : -endef - -$(eval $(call BuildPackage,mdns-utils)) -$(eval $(call BuildPackage,mdnsd)) -$(eval $(call BuildPackage,mdnsresponder)) diff --git a/net/mdnsresponder/files/mDNSResponder.conf b/net/mdnsresponder/files/mDNSResponder.conf deleted file mode 100644 index 23aab16..0000000 --- a/net/mdnsresponder/files/mDNSResponder.conf +++ /dev/null @@ -1,4 +0,0 @@ -"OpenWrt SSH" -_ssh._tcp. local -22 -OpenWrt SSH server diff --git a/net/mdnsresponder/files/mDNSResponder.init b/net/mdnsresponder/files/mDNSResponder.init deleted file mode 100644 index 87f9e90..0000000 --- a/net/mdnsresponder/files/mDNSResponder.init +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2009-2011 OpenWrt.org - -START=61 - -SERVICE_USE_PID=1 - -start() { - service_start /usr/bin/mDNSResponder -b -f /etc/mDNSResponder.conf -} - -stop() { - service_stop /usr/bin/mDNSResponder -} diff --git a/net/mdnsresponder/files/mdnsd.init b/net/mdnsresponder/files/mdnsd.init deleted file mode 100755 index 817604b..0000000 --- a/net/mdnsresponder/files/mdnsd.init +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2009-2014 OpenWrt.org - -START=60 -STOP=10 -USE_PROCD=1 - -start_service() { - procd_open_instance - procd_set_param command /usr/sbin/mdnsd -debug - procd_set_param respawn - procd_close_instance -} - diff --git a/net/mdnsresponder/patches/001-cross_compile.patch b/net/mdnsresponder/patches/001-cross_compile.patch deleted file mode 100644 index b1685fc..0000000 --- a/net/mdnsresponder/patches/001-cross_compile.patch +++ /dev/null @@ -1,115 +0,0 @@ ---- a/Clients/Makefile -+++ b/Clients/Makefile -@@ -27,6 +27,8 @@ - - ############################################################################# - -+CC = @cc -+ - # On OS X the dns_sd library functions are included in libSystem, which is implicitly linked with every executable - # If /usr/lib/libSystem.dylib exists, then we're on OS X, so we don't need also to link the "dns_sd" shared library - ifneq "$(wildcard /usr/lib/libSystem.dylib)" "" -@@ -46,10 +48,10 @@ build: - mkdir build - - build/dns-sd: build dns-sd.c ClientCommon.c -- $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -+ $(CC) $(CFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ - - build/dns-sd64: build dns-sd.c ClientCommon.c -- $(CC) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64 -+ $(CC) $(CFLAGS) $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -Wall -o $@ -m64 - - # Note, we can make a 'fat' version of dns-sd using 'lipo', as shown below, but we - # don't, because we don't want or need a 'fat' version of dns-sd, because it will ---- a/mDNSPosix/Makefile -+++ b/mDNSPosix/Makefile -@@ -54,11 +54,12 @@ COREDIR = ../mDNSCore - SHAREDDIR ?= ../mDNSShared - JDK = /usr/jdk - --CC = @cc -+CC = @gcc - BISON = @bison - FLEX = @flex - ST = @strip --LD = ld -shared -+LD = @ld -+SOOPTS = -shared - CP = cp - RM = rm - LN = ln -s -f -@@ -92,7 +93,7 @@ CFLAGS_DEBUG = -O0 -DMDNS_DEBUGMSGS=0 - CFLAGS_OS = -DNOT_HAVE_DAEMON -DNOT_HAVE_SA_LEN -DNOT_HAVE_SOCKLEN_T -DNOT_HAVE_IF_NAMETOINDEX \ - -DLOG_PERROR=0 -D_XPG4_2 -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME -DTARGET_OS_SOLARIS - CC = gcc --LD = gcc -shared -+LD = gcc - LINKOPTS = -lsocket -lnsl -lresolv - JAVACFLAGS_OS += -I$(JDK)/include/solaris - ifneq ($(DEBUG),1) -@@ -148,7 +149,8 @@ CFLAGS_OS = -DHAVE_IPV6 -no-cpp-precomp - -D__MAC_OS_X_VERSION_MIN_REQUIRED=__MAC_OS_X_VERSION_10_4 \ - -D__APPLE_USE_RFC_2292 #-Wunreachable-code - CC = gcc --LD = $(CC) -dynamiclib -+LD = $(CC) -+SOOPTS= -dynamiclib - LINKOPTS = -lSystem - LDSUFFIX = dylib - JDK = /System/Library/Frameworks/JavaVM.framework/Home -@@ -170,8 +172,9 @@ NSSLIBFILE := $(NSSLIBNAME)-$(NSSVERSIO - NSSLINKNAME := $(NSSLIBNAME).so.2 - NSSINSTPATH := /lib - --# If not otherwise defined, we install into /usr/lib and /usr/include -+# If not otherwise defined, we install into /usr/lib, /usr/include and /etc - # and our startup script is called mdns (e.g. /etc/init.d/mdns) -+ETCBASE?=/etc - INSTBASE?=/usr - STARTUPSCRIPTNAME?=mdns - -@@ -257,7 +260,7 @@ libdns_sd: setup $(BUILDDIR)/libdns_sd.$ - CLIENTLIBOBJS = $(OBJDIR)/dnssd_clientlib.c.so.o $(OBJDIR)/dnssd_clientstub.c.so.o $(OBJDIR)/dnssd_ipc.c.so.o - - $(BUILDDIR)/libdns_sd.$(LDSUFFIX): $(CLIENTLIBOBJS) -- @$(LD) $(LINKOPTS) -o $@ $+ -+ @$(LD) $(SOOPTS) $(LINKOPTS) -o $@ $+ - @$(STRIP) $@ - - Clients: setup libdns_sd ../Clients/build/dns-sd -@@ -292,7 +295,7 @@ InstalledManPages: $(MANPATH)/man8/mdnsd - InstalledClients: $(INSTBASE)/bin/dns-sd - @echo $+ " installed" - --InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) /etc/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8 -+InstalledNSS: $(NSSINSTPATH)/$(NSSLINKNAME) $(ETCBASE)/nss_mdns.conf $(MANPATH)/man5/nss_mdns.conf.5 $(MANPATH)/man8/libnss_mdns.8 - @echo $+ " installed" - - # Note: If daemon already installed, we make sure it's stopped before overwriting it -@@ -347,19 +350,21 @@ $(INSTBASE)/bin/dns-sd: ../Clients/build - - $(NSSINSTPATH)/$(NSSLINKNAME): $(NSSINSTPATH)/$(NSSLIBFILE) - $(LN) $< $@ -- ldconfig -+ifdef LDCONFIG -+ $(LDCONFIG) -+endif - - $(NSSINSTPATH)/$(NSSLIBFILE): $(BUILDDIR)/$(NSSLIBFILE) - $(CP) $< $@ - chmod 444 $@ - --/etc/nss_mdns.conf: nss_mdns.conf -+$(ETCBASE)/nss_mdns.conf: nss_mdns.conf - $(CP) $< $@ - chmod 444 $@ - # Check the nsswitch.conf file. - # If 'mdns' does not already appear on the "hosts:" line, then add it right before 'dns' -- cp -f /etc/nsswitch.conf /etc/nsswitch.conf.pre-mdns -- sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' /etc/nsswitch.conf.pre-mdns > /etc/nsswitch.conf -+ -[ -f $(ETCBASE)/nsswitch.conf ] && cp -f $(ETCBASE)/nsswitch.conf $(ETCBASE)/nsswitch.conf.pre-mdns -+ -[ -f $(ETCBASE)/nsswitch.conf ] && sed -e '/mdns/!s/^\(hosts:.*\)dns\(.*\)/\1mdns dns\2/' $(ETCBASE)/nsswitch.conf.pre-mdns > $(ETCBASE)/nsswitch.conf - - ############################################################################# - diff --git a/net/mdnsresponder/patches/100-linux_fixes.patch b/net/mdnsresponder/patches/100-linux_fixes.patch deleted file mode 100644 index df56608..0000000 --- a/net/mdnsresponder/patches/100-linux_fixes.patch +++ /dev/null @@ -1,403 +0,0 @@ -diff --git a/.gitignore b/.gitignore -new file mode 100644 -index 0000000..920cdfc ---- /dev/null -+++ b/.gitignore -@@ -0,0 +1,4 @@ -+Clients/build -+mDNSPosix/build -+mDNSPosix/objects -+ -diff --git a/Clients/Makefile b/Clients/Makefile -index 383af31..925c20e 100755 ---- a/Clients/Makefile -+++ b/Clients/Makefile -@@ -34,7 +34,7 @@ TARGETS = build/dns-sd build/dns-sd64 - LIBS = - else - TARGETS = build/dns-sd --LIBS = -L../mDNSPosix/build/prod/ -ldns_sd -+LIBS ?= -L../mDNSPosix/build/prod/ -ldns_sd - endif - - all: $(TARGETS) -diff --git a/mDNSPosix/PosixDaemon.c b/mDNSPosix/PosixDaemon.c -index 88b3292..e86a6c7 100644 ---- a/mDNSPosix/PosixDaemon.c -+++ b/mDNSPosix/PosixDaemon.c -@@ -37,6 +37,11 @@ - #include - #include - #include -+#ifdef __linux__ -+#include /* !!! We require libcap-dev for this. Oh well. */ -+/* prctl is required to enable inheriting of capabilities across setuid */ -+#include -+#endif /* __linux__ */ - - #if __APPLE__ - #undef daemon -@@ -184,16 +189,50 @@ int main(int argc, char **argv) - - Reconfigure(&mDNSStorage); - -+#ifdef __linux__ -+ /* -+ * SO_BINDTODEVICE is privileged operation; however, we can get -+ * around it using capabilities instead of remaining root. -+ */ -+ if (mStatus_NoError == err) -+ { -+ if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0) -+ perror("prctl PR_SET_KEEPCAPS"); -+ } -+#endif /* __linux__ */ -+ - // Now that we're finished with anything privileged, switch over to running as "nobody" - if (mStatus_NoError == err) - { - const struct passwd *pw = getpwnam("nobody"); - if (pw != NULL) -+ { - setuid(pw->pw_uid); -+#ifdef __linux__ -+ struct __user_cap_header_struct ch; -+ struct __user_cap_data_struct cd[_LINUX_CAPABILITY_U32S_3]; -+ -+ memset(&ch, 0, sizeof(ch)); -+ ch.version = _LINUX_CAPABILITY_VERSION_3; -+ ch.pid = getpid(); -+ memset(&cd[0], 0, sizeof(cd)); -+ /* CAP_NET_RAW is required to use SO_BINDTODEVICE */ -+ int caps = CAP_TO_MASK(CAP_NET_RAW); -+ cd[0].permitted = caps; -+ cd[0].effective = caps; -+ if (capset(&ch, &cd[0]) < 0) -+ perror("capset"); -+#endif /* __linux__ */ -+ } - else - LogMsg("WARNING: mdnsd continuing as root because user \"nobody\" does not exist"); - } - -+#ifdef __linux__ -+ if (mStatus_NoError == err) -+ err = mDNSPlatformPosixRefreshInterfaceList(&mDNSStorage); -+#endif /* __linux__ */ -+ - if (mStatus_NoError == err) - err = MainLoop(&mDNSStorage); - -diff --git a/mDNSPosix/Responder.c b/mDNSPosix/Responder.c -index 3996b7b..e58d8eb 100755 ---- a/mDNSPosix/Responder.c -+++ b/mDNSPosix/Responder.c -@@ -603,7 +603,8 @@ static mStatus RegisterServicesInFile(const char *filePath) - status = mStatus_UnknownErr; - } - -- assert(0 == fclose(fp)); -+ int rv = fclose(fp); -+ assert(0 == rv); - - return status; - } -diff --git a/mDNSPosix/mDNSPosix.c b/mDNSPosix/mDNSPosix.c -index 6effa12..7c1d6eb 100755 ---- a/mDNSPosix/mDNSPosix.c -+++ b/mDNSPosix/mDNSPosix.c -@@ -138,7 +138,7 @@ mDNSlocal void SockAddrTomDNSAddr(const struct sockaddr *const sa, mDNSAddr *ipA - - // mDNS core calls this routine when it needs to send a packet. - mDNSexport mStatus mDNSPlatformSendUDP(const mDNS *const m, const void *const msg, const mDNSu8 *const end, -- mDNSInterfaceID InterfaceID, UDPSocket *src, const mDNSAddr *dst, -+ mDNSInterfaceID InterfaceID, UDPSocket *src, const mDNSAddr *dst, - mDNSIPPort dstPort, mDNSBool useBackgroundTrafficClass) - { - int err = 0; -@@ -583,9 +583,17 @@ mDNSlocal void FreePosixNetworkInterface(PosixNetworkInterface *intf) - { - assert(intf != NULL); - if (intf->intfName != NULL) free((void *)intf->intfName); -- if (intf->multicastSocket4 != -1) assert(close(intf->multicastSocket4) == 0); -+ if (intf->multicastSocket4 != -1) -+ { -+ int rv = close(intf->multicastSocket4); -+ assert(rv == 0); -+ } - #if HAVE_IPV6 -- if (intf->multicastSocket6 != -1) assert(close(intf->multicastSocket6) == 0); -+ if (intf->multicastSocket6 != -1) -+ { -+ int rv = close(intf->multicastSocket6); -+ assert(rv == 0); -+ } - #endif - - // Move interface to the RecentInterfaces list for a minute -@@ -724,6 +732,29 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf - if (err < 0) { err = errno; perror("setsockopt - IP_MULTICAST_TTL"); } - } - -+#ifdef __linux__ -+#ifdef SO_BINDTODEVICE -+ if (err == 0 && interfaceIndex) -+ { -+ char ifname[IFNAMSIZ]; -+ if (if_indextoname(interfaceIndex, ifname)) -+ { -+ err = setsockopt(*sktPtr, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname)); -+ if (err < 0) -+ { -+ err = errno; -+ perror("setsockopt - SO_BINDTODEVICE"); -+ } -+ } -+ else -+ { -+ err = errno; -+ perror("if_indextoname"); -+ } -+ } -+#endif /* SO_BINDTODEVICE */ -+#endif /* __linux__ */ -+ - // And start listening for packets - if (err == 0) - { -@@ -805,6 +836,29 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf - if (err < 0) { err = errno; perror("setsockopt - IPV6_MULTICAST_HOPS"); } - } - -+#ifdef __linux__ -+#ifdef SO_BINDTODEVICE -+ if (err == 0 && interfaceIndex) -+ { -+ char ifname[IFNAMSIZ]; -+ if (if_indextoname(interfaceIndex, ifname)) -+ { -+ err = setsockopt(*sktPtr, SOL_SOCKET, SO_BINDTODEVICE, ifname, strlen(ifname)); -+ if (err < 0) -+ { -+ err = errno; -+ perror("setsockopt - SO_BINDTODEVICE"); -+ } -+ } -+ else -+ { -+ err = errno; -+ perror("if_indextoname"); -+ } -+ } -+#endif /* SO_BINDTODEVICE */ -+#endif /* __linux__ */ -+ - // And start listening for packets - if (err == 0) - { -@@ -836,7 +890,12 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf - } - - // Clean up -- if (err != 0 && *sktPtr != -1) { assert(close(*sktPtr) == 0); *sktPtr = -1; } -+ if (err != 0 && *sktPtr != -1) -+ { -+ int rv = close(*sktPtr); -+ assert(rv == 0); -+ *sktPtr = -1; -+ } - assert((err == 0) == (*sktPtr != -1)); - return err; - } -@@ -938,19 +997,14 @@ mDNSlocal int SetupInterfaceList(mDNS *const m) - int err = 0; - struct ifi_info *intfList = get_ifi_info(AF_INET, mDNStrue); - struct ifi_info *firstLoopback = NULL; -+ struct ifi_info **p = &intfList; - - assert(m != NULL); - debugf("SetupInterfaceList"); - -- if (intfList == NULL) err = ENOENT; -- - #if HAVE_IPV6 -- if (err == 0) /* Link the IPv6 list to the end of the IPv4 list */ -- { -- struct ifi_info **p = &intfList; -- while (*p) p = &(*p)->ifi_next; -- *p = get_ifi_info(AF_INET6, mDNStrue); -- } -+ while (*p) p = &(*p)->ifi_next; -+ *p = get_ifi_info(AF_INET6, mDNStrue); - #endif - - if (err == 0) -@@ -1026,7 +1080,7 @@ mDNSlocal mStatus OpenIfNotifySocket(int *pFD) - /* Subscribe the socket to Link & IP addr notifications. */ - mDNSPlatformMemZero(&snl, sizeof snl); - snl.nl_family = AF_NETLINK; -- snl.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR; -+ snl.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR | RTMGRP_IPV6_IFADDR; - ret = bind(sock, (struct sockaddr *) &snl, sizeof snl); - if (0 == ret) - *pFD = sock; -@@ -1104,11 +1158,18 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd) - PrintNetLinkMsg(pNLMsg); - #endif - -+ // this result isn't used anywhere as a number, just as -+ // non-zero - however, I have seen devices with more than 32 -+ // interfaces at some point.. -+ // (on Linux, every tunnel increases index for example) -+ - // Process the NetLink message - if (pNLMsg->nlmsg_type == RTM_GETLINK || pNLMsg->nlmsg_type == RTM_NEWLINK) -- result |= 1 << ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index; -+ result |= 1; -+ // << ((struct ifinfomsg*) NLMSG_DATA(pNLMsg))->ifi_index; - else if (pNLMsg->nlmsg_type == RTM_DELADDR || pNLMsg->nlmsg_type == RTM_NEWADDR) -- result |= 1 << ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index; -+ result |= 1; -+ // << ((struct ifaddrmsg*) NLMSG_DATA(pNLMsg))->ifa_index; - - // Advance pNLMsg to the next message in the buffer - if ((pNLMsg->nlmsg_flags & NLM_F_MULTI) != 0 && pNLMsg->nlmsg_type != NLMSG_DONE) -@@ -1279,8 +1340,12 @@ mDNSexport mStatus mDNSPlatformInit(mDNS *const m) - if (err == mStatus_NoError) err = SetupSocket(&sa, zeroIPPort, 0, &m->p->unicastSocket6); - #endif - -+ // In Linux case, we can't set up sockets with different owner - -+ // it blows up SO_REUSEPORT. So we do this step bit later. -+#ifndef __linux__ - // Tell mDNS core about the network interfaces on this machine. - if (err == mStatus_NoError) err = SetupInterfaceList(m); -+#endif /* !__linux__ */ - - // Tell mDNS core about DNS Servers - mDNS_Lock(m); -@@ -1313,9 +1378,17 @@ mDNSexport void mDNSPlatformClose(mDNS *const m) - { - assert(m != NULL); - ClearInterfaceList(m); -- if (m->p->unicastSocket4 != -1) assert(close(m->p->unicastSocket4) == 0); -+ if (m->p->unicastSocket4 != -1) -+ { -+ int rv = close(m->p->unicastSocket4); -+ assert(rv == 0); -+ } - #if HAVE_IPV6 -- if (m->p->unicastSocket6 != -1) assert(close(m->p->unicastSocket6) == 0); -+ if (m->p->unicastSocket6 != -1) -+ { -+ int rv = close(m->p->unicastSocket6); -+ assert(rv == 0); -+ } - #endif - } - -@@ -1571,14 +1644,14 @@ mDNSexport mStatus mDNSPlatformClearSPSMACAddr(void) - mDNSexport mDNSu16 mDNSPlatformGetUDPPort(UDPSocket *sock) - { - (void) sock; // unused -- -+ - return (mDNSu16)-1; - } - - mDNSexport mDNSBool mDNSPlatformInterfaceIsD2D(mDNSInterfaceID InterfaceID) - { - (void) InterfaceID; // unused -- -+ - return mDNSfalse; - } - -diff --git a/mDNSPosix/mDNSUNP.c b/mDNSPosix/mDNSUNP.c -index b392fc7..f551ad5 100755 ---- a/mDNSPosix/mDNSUNP.c -+++ b/mDNSPosix/mDNSUNP.c -@@ -63,6 +63,7 @@ - #if defined(AF_INET6) && HAVE_IPV6 && HAVE_LINUX - #include - #include -+#include - - /* Converts a prefix length to IPv6 network mask */ - void plen_to_mask(int plen, char *addr) { -@@ -86,7 +87,7 @@ struct ifi_info *get_ifi_info_linuxv6(int family, int doaliases) - FILE *fp; - char addr[8][5]; - int flags, myflags, index, plen, scope; -- char ifname[9], lastname[IFNAMSIZ]; -+ char ifname[IFNAMSIZ], lastname[IFNAMSIZ]; - char addr6[32+7+1]; /* don't forget the seven ':' */ - struct addrinfo hints, *res0; - struct sockaddr_in6 *sin6; -@@ -94,7 +95,8 @@ struct ifi_info *get_ifi_info_linuxv6(int family, int doaliases) - int err; - int sockfd = -1; - struct ifreq ifr; -- -+ char mask[64] = "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %"; -+ sprintf(mask+strlen(mask), "%ds\n", IFNAMSIZ); - res0=NULL; - ifihead = NULL; - ifipnext = &ifihead; -@@ -106,11 +108,12 @@ struct ifi_info *get_ifi_info_linuxv6(int family, int doaliases) - goto gotError; - } - while (fscanf(fp, -- "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %8s\n", -+ mask, - addr[0],addr[1],addr[2],addr[3], - addr[4],addr[5],addr[6],addr[7], - &index, &plen, &scope, &flags, ifname) != EOF) { - -+ if (flags & IFA_F_DEPRECATED) continue; - myflags = 0; - if (strncmp(lastname, ifname, IFNAMSIZ) == 0) { - if (doaliases == 0) -@@ -204,8 +207,11 @@ gotError: - res0=NULL; - } - done: -+ if (fp) -+ fclose(fp); - if (sockfd != -1) { -- assert(close(sockfd) == 0); -+ int rv = close(sockfd); -+ assert(rv == 0); - } - return(ifihead); /* pointer to first structure in linked list */ - } -diff --git a/mDNSShared/dnsextd_parser.y b/mDNSShared/dnsextd_parser.y -index 18c5990..d4b63ce 100644 ---- a/mDNSShared/dnsextd_parser.y -+++ b/mDNSShared/dnsextd_parser.y -@@ -15,6 +15,8 @@ - * limitations under the License. - */ - -+%parse-param { void *context } -+ - %{ - #include - #include -@@ -23,7 +25,7 @@ - #include "DebugServices.h" - #include "dnsextd.h" - --void yyerror( const char* error ); -+void yyerror( void *context, const char* error ); - int yylex(void); - - -@@ -378,7 +380,7 @@ int yywrap(void); - - extern int yylineno; - --void yyerror( const char *str ) -+void yyerror( void *context, const char *str ) - { - fprintf( stderr,"%s:%d: error: %s\n", g_filename, yylineno, str ); - } diff --git a/net/mdnsresponder/patches/114-fix_posix_build.patch b/net/mdnsresponder/patches/114-fix_posix_build.patch deleted file mode 100644 index d3fbae5..0000000 --- a/net/mdnsresponder/patches/114-fix_posix_build.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/mDNSPosix/mDNSPosix.c -+++ b/mDNSPosix/mDNSPosix.c -@@ -1673,7 +1673,7 @@ mDNSexport mDNSs32 mDNSPlatformGetServic - return -1; - } - --mDNSexport void mDNSPlatformSetDelegatePID(UDPSocket *src, const mDNSAddr *dst, DNSQuestion *q) -+mDNSexport void mDNSPlatformSetuDNSSocktOpt(UDPSocket *src, const mDNSAddr *dst, DNSQuestion *q) - { - (void) src; - (void) dst; diff --git a/net/memcached/Makefile b/net/memcached/Makefile deleted file mode 100644 index 98904eb..0000000 --- a/net/memcached/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (C) 2009-2012 OpenWrt.org -# Copyright (C) 2009-2014 Thomas Heil -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=memcached -PKG_VERSION:=1.4.36 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://memcached.org/files -PKG_MD5SUM:=1e028fbab7288911fcaa5ed2a21817fe - -PKG_MAINTAINER:=Thomas Heil - -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/memcached - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libevent2 +libpthread - TITLE:=The high-performance, distributed memory object caching system - URL:=http://memcached.org/ -endef - -define Package/memcached/description - Free and open source, high-performance, distributed memory object caching system -endef - -define Package/memcached/conffiles -/etc/config/memcached -endef - -ifeq ($(CONFIG_BIG_ENDIAN),y) -CONFIGURE_VARS += ac_cv_c_endian=big -else -CONFIGURE_VARS += ac_cv_c_endian=little -endif - -CONFIGURE_ARGS += \ - --with-libevent=$(STAGING_DIR)/usr/include/libevent \ - --disable-docs \ - --disable-dtrace \ - --disable-coverage \ - --disable-sasl - -TARGET_CFLAGS += \ - -std=gnu99 - -TARGET_LDFLAGS = \ - -L$(STAGING_DIR)/usr/lib/libevent -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib - -define Package/memcached/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/memcached $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/memcached.config $(1)/etc/config/memcached - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/memcached.init $(1)/etc/init.d/memcached -endef - -$(eval $(call BuildPackage,memcached)) diff --git a/net/memcached/files/memcached.config b/net/memcached/files/memcached.config deleted file mode 100644 index 4071116..0000000 --- a/net/memcached/files/memcached.config +++ /dev/null @@ -1,6 +0,0 @@ -config memcached - option user 'nobody' - option maxconn '1024' - option listen '0.0.0.0' - option port '11211' - option memory '64' diff --git a/net/memcached/files/memcached.init b/net/memcached/files/memcached.init deleted file mode 100644 index 063bf64..0000000 --- a/net/memcached/files/memcached.init +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2010-2011 OpenWrt.org - -START=80 - -start_instance () { - local section="$1" - - config_get user "$section" user - config_get maxconn "$section" maxconn - config_get listen "$section" listen - config_get port "$section" port - config_get memory "$section" memory - - service_start /usr/bin/memcached -d -u ${user:-nobody} \ - -c ${maxconn:-1024} -l ${listen:-0.0.0.0} \ - -p ${port:-11211} -U ${port:-11211} -m ${memory:-64} -} - -start() { - config_load 'memcached' - config_foreach start_instance 'memcached' -} - -stop() { - service_stop /usr/bin/memcached -} diff --git a/net/memcached/patches/100-fix_iov_max.patch b/net/memcached/patches/100-fix_iov_max.patch deleted file mode 100644 index 55a980c..0000000 --- a/net/memcached/patches/100-fix_iov_max.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: memcached-1.4.26/memcached.c -=================================================================== ---- memcached-1.4.26.orig/memcached.c -+++ memcached-1.4.26/memcached.c -@@ -13,6 +13,10 @@ - * Anatoly Vorobey - * Brad Fitzpatrick - */ -+#ifndef __need_IOV_MAX -+#define __need_IOV_MAX -+#endif -+ - #include "memcached.h" - #include - #include -@@ -30,9 +34,6 @@ - #define _P1003_1B_VISIBLE - #endif - /* need this to get IOV_MAX on some platforms. */ --#ifndef __need_IOV_MAX --#define __need_IOV_MAX --#endif - #include - #include - #include diff --git a/net/mii-tool/Makefile b/net/mii-tool/Makefile deleted file mode 100644 index e9c793d..0000000 --- a/net/mii-tool/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2006-2010 OpenWrt.org -# Copyright (C) 2016 Stijn Segers -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mii-tool -PKG_VERSION=2016-10-06-$(PKG_SOURCE_VERSION) -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://git.code.sf.net/p/net-tools/code -PKG_SOURCE_VERSION:=115f1af2494ded1fcd21c8419d5e289bc4df380f -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_MAINTAINER:=Stijn Segers - -include $(INCLUDE_DIR)/package.mk - -define Package/mii-tool - SECTION:=net - CATEGORY:=Network - TITLE:=configure media type using MII commands - URL:=http://net-tools.sourceforge.net/ -endef - -define Package/mii-tool/description - The mii-tool command allows you to set or autodetect the media type - or mii chipset-based ethernet devices. It traditionally had been - distributed in the net-tools package. This is a single distribution - optimized for embedded systems and fully automated cross/-sysroot-builds -endef - -define Build/Configure - # Failed configure.sh leaves stub config.h around. - rm -f $(PKG_BUILD_DIR)/config.h - ( cd $(PKG_BUILD_DIR); yes $$$$'\n' | ./configure.sh config.in ) -endef - -define Package/mii-tool/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mii-tool $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,mii-tool)) diff --git a/net/mini_snmpd/Makefile b/net/mini_snmpd/Makefile deleted file mode 100644 index f86539a..0000000 --- a/net/mini_snmpd/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (C) 2009-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mini_snmpd -PKG_VERSION:=1.4-rc1 -PKG_RELEASE:=2 -PKG_MAINTAINER:=Luke McKee -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/troglobit/mini-snmpd.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=203d92e60ed09466d6676c6ad20ad6cb2ce08a5d -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz - -PKG_FIXUP:=autoreconf -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 -# As warned by upstream maintainer and binutils -# however compiler warnings can be ignored until next binutils release -# https://github.com/wongsyrone/openwrt-1/issues/67 -# PKG_SSP:=0 -# PKG_RELRO:=0 - -include $(INCLUDE_DIR)/package.mk - -define Package/mini_snmpd - SECTION:=net - CATEGORY:=Network - TITLE:=A tiny SNMP server for embedded systems - URL:=http://troglobit.github.io/mini-snmpd.html -# uncomment if you just want the binary, not the init script -# openwrt requires init script runtime dependencies be defined for make menuconfig -# (e.g busybox sysntpd) - DEPENDS:=+jsonfilter +ubus +procd +ubox -endef - -CONFIGURE_ARGS+= \ - $(if $(CONFIG_IPV6),,--disable-ipv6) - -# Configure weirdness - Disabled by default, explicitately disabling turns feature on! -# --disable-debug \ -# --disable-demo - Upstream Github Issue #4 Fixed 20160707 - -define Package/mini_snmpd/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/mini_snmpd $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/mini_snmpd.config $(1)/etc/config/mini_snmpd - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/mini_snmpd.init $(1)/etc/init.d/mini_snmpd -endef - -define Package/mini_snmpd/conffiles -/etc/config/mini_snmpd -endef - -$(eval $(call BuildPackage,mini_snmpd)) diff --git a/net/mini_snmpd/files/mini_snmpd.config b/net/mini_snmpd/files/mini_snmpd.config deleted file mode 100644 index c06f7b1..0000000 --- a/net/mini_snmpd/files/mini_snmpd.config +++ /dev/null @@ -1,26 +0,0 @@ -# you may add more than the 'default' mini_snmpd instances provided they all bind to different ports/interfaces -# to get around max 4 interface or mountpoint limit constrained by mini_snmpd's mib -config mini_snmpd 'default' - option enabled 1 - option ipv6 0 - # Verbose flag given to mini_snmpd, extra verbose is only possible with compile time config flags - option debug 0 - # Turn on community authentication (snmp agent must use community name) - option auth 0 - option community 'public' - option contact 'OpenWRT router ' - option location 'Undisclosed' - # to listen on all interfaces you need to set option listen_interface '' - option listen_interface 'lan' - #option udp_port '161' - #option tcp_port '161' - #option vendor_oid '' - option mib_timeout 1 - # enable basic disk usage statistics on specified mountpoint - list disks '/overlay' - list disks '/tmp' - # enable basic network statistics on specified interface - # 4 interfaces maximum per instance, as named in /etc/config/network and luci - # not physical device names - list interfaces 'lan' - list interfaces 'wan' diff --git a/net/mini_snmpd/files/mini_snmpd.init b/net/mini_snmpd/files/mini_snmpd.init deleted file mode 100644 index 0fb63d4..0000000 --- a/net/mini_snmpd/files/mini_snmpd.init +++ /dev/null @@ -1,240 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2009-2016 OpenWrt.org -# Copyright (C) 2016 Luke McKee -# Procd init script reference: http://wiki.prplfoundation.org/wiki/Procd_reference - -START=98 -USE_PROCD=1 -PROG=/usr/bin/mini_snmpd -NAME=mini_snmpd - -_log() { - logger -p daemon.info -t mini_snmpd "$@" -} - -_err() { - logger -p daemon.err -t mini_snmpd "$@" -} - - -# mini_snmpd 1.3+ now starts later in the game. Expects filesystems monitored to be already mounted, or wont pass args to mini_snmpd -# and at least configuration entry for network physical interface defined in /etc/config/network -# It handles network interfaces not yet present (e.g. ppp) but will statfs() the root/wrong filesystem if device not mounted -# Tip: complex scripts run faster without in openwrt if you stop busybox forking and searching for applets. Faster bootups -# CONFIG_BUSYBOX_CONFIG_FEATURE_SH_NOFORK -# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS -# BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE [=n] -# CONFIG_BUSYBOX_CONFIG_ASH_CMDCMD - -mini_snmpd_validation="enabled:bool:0 \ - ipv6:bool:0 \ - debug:bool:0 \ - auth:bool:1 \ - community:rangelength(1,32):public \ - contact:maxlength(255) \ - location:maxlength(255) \ - listen_interface:uciname \ - udp_port:port \ - tcp_port:port \ - vendor_oid:string \ - mib_timeout:and(min(1),uinteger) \ - disks:list(directory) \ - interfaces:list(uciname) \ - respawn_threshold:uinteger respawn_timeout:uinteger respawn_retry:uinteger" -# busybox ash has no array variable support, when put validations in a string be careful to have no spaces in each validate constraint -# this makes it very difficult to use the 'or(uciname, "all")' test, so listen_interface '' or undefined now meands bind to "all". -# this is the sarafice you have to make to avoid typing it all in twice in this script so we can give feedback to user on what's misconfigered -# in syslog - -append_disk() { - local disk="$1" disk_count - [ -z $disk_count ] && disk_count=0 - if grep -qF "$disk" /proc/mounts ; then - # check the fileystem is mountpoint, and directory search permissions available for statfs() - # presence as a directory -d test done is already done by uci_validate_section() - [ -x "$disk" ] || { - _err "$cfg: mountpoint $disk for snmp monitoring EACCES error. Check permissions, ignoring" - return 1 - } - if [ $disk_count -lt 4 ] ; then - append disks_arg "$disk" ',' - disk_count=$((disk_count++)) - else - _err "$cfg: more than 4 mountpoints defined in uci. Disc $disk ignored." - fi - else - _err "$cfg: mountpoint $disk for snmp monitoring not mounted, ignoring." - fi -} - -append_interface() { - local name="$1" netdev netdev_count - [ -z $netdev_count ] && netdev_count=0 - # for the purposes of snmp monitoring it doesn't need to be up, it just needs to exist in /proc/net/dev - netdev=$(ubus -S call network.interface dump|jsonfilter -e "@.interface[@.interface=\"$name\"].l3_device") - if [ -n "$netdev" ] && grep -qF "$netdev" /proc/net/dev ]; then - [ $netdev_count -ge 4 ] && { - _err "$cfg: too many network interfaces configured, ignoring $name" - return - } - netdev_count=$((netdev_count++)) - if [ -n "$interfaces_arg" ]; then - append interfaces_arg "$netdev" ',' - else - append interfaces_arg "$netdev" - fi - else - _err "$cfg: physical interface for network $name not found in uci or kernel so not monitoring" - fi -} - -append_arg() { - local var="$2" - local opt="$1" - [ -n "$var" ] && procd_append_param command $opt "$var" -} - -watch_interfaces() { - local cfg="$1" - local enabled listen_interface # listen_interface_up - config_get_bool enabled "$cfg" "enabled" '1' - [ "$enabled" -gt 0 ] || return 0 - config_get listen_interface "$cfg" listen_interface - # listen_interface_up=$(ubus -S call network.interface dump | jsonfilter -e "@.interface[@.interface=\"$listen_interface\"].up") - # If the interface is up & instance is running we'll watch at the instance level and only restart that instance if it's bound interface changes - # Regardless of ubus knowing about an interface (in the case it's not yet configured) - [ -n "$listen_interface" ] && trigger_interfaces="${listen_interface} ${trigger_interfaces} " -} - -validate_mini_snmpd_section() { - # validate a mini_snmpd instance in uci config file mini_snmpd - # http://luci.subsignal.org/trac/wiki/Documentation/Datatypes ubox/validate/validate.c - uci_validate_section mini_snmpd mini_snmpd "${1}" $mini_snmpd_validation -} - - -service_triggers() { - config_load 'mini_snmpd' - procd_open_trigger - procd_add_config_trigger "config.change" "mini_snmpd" /etc/init.d/mini_snmpd reload - config_foreach watch_interfaces 'mini_snmpd' - # this only watches interfaces for which there is no running instance due to interface down / not in ubus - # hence start not reload, this trigger will not affect running instances as another start will not change their procd command arguments - # or stop the already running process - [ -n "$trigger_interfaces" ] & { - for n in $trigger_interfaces ; do - procd_add_interface_trigger "interface.*" $n /etc/init.d/mini_snmpd start - done - } - procd_close_trigger - procd_add_validation validate_mini_snmpd_section -} - - -start_instance() { - local cfg validation_failed validation_err disks_arg interfaces_arg - cfg="$1" - #uci_validate_section should unset undefined variables from other instances - #however defining uci variables as local will scope them to this instance - #"local variables are also visible to functions called by the parent function" so it's good practice - local enabled ipv6 debug auth community contact location listen_interface \ - udp_port tcp_port vendor_oid mib_timeout - local disks="" interfaces="" - validate_mini_snmpd_section "$cfg" 2>/dev/null || validation_failed=1 - [ "$enabled" == 1 ] || { - _log "instance:$cfg disabled not starting" - return 1 - } - - local listen_interface_json listen_interface_ip listen_interface_device listen_interface_up ubus_exit ubus_err - [ -n "$listen_interface" ] && { - listen_interface_json=$(ubus -S call network.interface.$listen_interface status) - ubus_exit=$? - [ $ubus_exit = 4 ] && { - _err "$cfg: listen_interface $listen_interface not properly configured in ubus network.interface.* not starting this instance " - return 1 - } - [ $ubus_exit = 255 -a -z "$listen_interface_json" ] && { - _log "$cfg: ubusd not yet up, will try to start mini_snmpd shorlty when procd detects $listen_interface comes up" - return 1 - } - [ -z "$listen_interface_json" ] && { - ubus_err=`ubus call network.interface.$listen_interface status 2>&1 >/dev/null` - _err "$cfg: unknown ubus error. exit: $ubus_exit errormsg: $ubus_err " - return 1 - } - listen_interface_up=$(jsonfilter -s "$listen_interface_json" -e '@.up') - if [ "$ipv6" = 1 ]; then - listen_interface_ip=$(jsonfilter -s "$listen_interface_json" -e "@['ipv6-address'][0].address") - else - listen_interface_ip=$(jsonfilter -s "$listen_interface_json" -e "@['ipv4-address'][0].address") - fi - [ -n "$listen_interface_ip" -a "$listen_interface_up" = 'true' ] || { - _log "$cfg:listen interface $listen_interface not up yet / not configured properly" - _log "$cfg:procd will try again when interface state changes" - return 1 - } - listen_interface_device=$(jsonfilter -s "$listen_interface_json" -e '@.l3_device') - } - - [ $validation_failed ] && { - _err "validation of $NAME configuration for $cfg instance failed, all tests should be within constraints" - _err "please edit the configuration values below using [l]uci " - validation_err=`/sbin/validate_data mini_snmpd mini_snmpd "$cfg" $mini_snmpd_validation 2>&1 | sed '/with\ false$/!d;s/validates\ as\ /needs\ to\ be\ /;s/with\ false//' ` - _err "${validation_err}" - return 1 - } - config_list_foreach "$cfg" 'disks' append_disk - config_list_foreach "$cfg" 'interfaces' append_interface - # test if variables are unset or zero length - [ -z "${disks_arg:+1}" -a -z "${interfaces_arg:+1}" ] && { - _err "$cfg: you haven't sucessfully configured any mountpoints or disks for this instance, not starting" - return 1 - } - - procd_open_instance - - procd_set_param command "$PROG" -n - procd_set_param stdout "1" - procd_set_param stderr "1" - # don't the like default respawn values? you can override through uci. - # vars left as global so you only need to do it in the first mini_snmpd instance - procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-10} ${respawn_retry:-1} - # this monitors ubus changes - [ -n "$listen_interface" ] && { - #procd_open_trigger - #procd_add_interface_trigger "interface.*" $listen_interface /etc/init.d/mini_snmpd reload - #procd_close_trigger - procd_add_reload_interface_trigger $listen_interface #or use shorthand of above - } - # this re-starts the daemon if a properly configured network interface is changed whilst it is already running - # igmpproxy has this as well as "procd_set_param netdev" - - append_arg "-c" "$community" - append_arg "-L" "${location}" - append_arg "-C" "${contact}" - append_arg "-p" $udp_port - append_arg "-P" $tcp_port - append_arg "-V" "${vendor_oid}" - append_arg "-t" $mib_timeout - - [ "$ipv6" = 1 ] && procd_append_param command "-6" - [ "$debug" = 1 ] && procd_append_param command "-v" - # uci_validate_section() aka /sbin/validate_data can only cast default values not defined in /etc/config/* to string - # e.g. ="1" however it sets bools defined in /etc/config/* to =1 / =0 - [ "$auth" = 1 -o "$auth" = "1" ] && procd_append_param command "-a" - [ -n "$disks_arg" ] && procd_append_param command "-d $disks_arg" - [ -n "$interfaces_arg" ] && procd_append_param command "-i $interfaces_arg" - [ -n "$listen_interface_device" ] && { - procd_append_param command "-I" "$listen_interface_device" - # and this monitors the hardware device for changes outside of ubus - just a guess - procd_set_param netdev $listen_interface_device - } - procd_close_instance -} - -start_service() { - config_load 'mini_snmpd' - config_foreach start_instance 'mini_snmpd' -} - diff --git a/net/miniupnpc/Makefile b/net/miniupnpc/Makefile deleted file mode 100644 index fbf6222..0000000 --- a/net/miniupnpc/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# -# Copyright (C) 2010-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=miniupnpc -PKG_VERSION:=1.9 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://miniupnp.free.fr/files -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=5ef3ba321e6df72d6519b728b292073e -PKG_MAINTAINER:=Steven Barth - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/miniupnpc/Default - TITLE:=Lightweight UPnP - URL:=http://miniupnp.tuxfamily.org/ -endef - -define Package/miniupnpc - $(call Package/miniupnpc/Default) - SECTION:=net - CATEGORY:=Network - SUBMENU:=Firewall - TITLE+= client - DEPENDS:=+libminiupnpc -endef - -define Package/libminiupnpc - $(call Package/miniupnpc/Default) - SECTION:=libs - CATEGORY:=Libraries - TITLE+= library -endef - -TARGET_CFLAGS += $(FPIC) - -MAKE_FLAGS += \ - OS="Linux" \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/miniupnpc - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/miniupnpc/*.h \ - $(1)/usr/include/miniupnpc/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a} \ - $(1)/usr/lib/ -endef - -define Package/miniupnpc/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upnpc $(1)/usr/bin/ -endef - -define Package/libminiupnpc/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/lib/libminiupnpc.so.* \ - $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,miniupnpc)) -$(eval $(call BuildPackage,libminiupnpc)) diff --git a/net/miniupnpc/patches/100-no_minixml_test.patch b/net/miniupnpc/patches/100-no_minixml_test.patch deleted file mode 100644 index 93f6772..0000000 --- a/net/miniupnpc/patches/100-no_minixml_test.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -151,8 +151,8 @@ installpythonmodule3: pythonmodule3 - python3 setup.py install - - validateminixml: minixmlvalid -- @echo "minixml validation test" -- ./minixmlvalid -+ @echo "(skipping) minixml validation test" -+# ./minixmlvalid - touch $@ - - validateminiwget: testminiwget minihttptestserver testminiwget.sh diff --git a/net/miniupnpc/patches/200-miniupnpc_desc.patch b/net/miniupnpc/patches/200-miniupnpc_desc.patch deleted file mode 100644 index 320707e..0000000 --- a/net/miniupnpc/patches/200-miniupnpc_desc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/upnpcommands.c -+++ b/upnpcommands.c -@@ -367,7 +367,7 @@ UPNP_AddPortMapping(const char * control - AddPortMappingArgs[5].elt = "NewEnabled"; - AddPortMappingArgs[5].val = "1"; - AddPortMappingArgs[6].elt = "NewPortMappingDescription"; -- AddPortMappingArgs[6].val = desc?desc:"libminiupnpc"; -+ AddPortMappingArgs[6].val = desc?desc:"miniupnpc"; - AddPortMappingArgs[7].elt = "NewLeaseDuration"; - AddPortMappingArgs[7].val = leaseDuration?leaseDuration:"0"; - if(!(buffer = simpleUPnPcommand(-1, controlURL, servicetype, diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile deleted file mode 100644 index 42023ff..0000000 --- a/net/miniupnpd/Makefile +++ /dev/null @@ -1,81 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=miniupnpd -PKG_VERSION:=2.0.20170421 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://miniupnp.free.fr/files -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=9677aeccadf73b4bf8bb9d832c32b5da8266b4d58eed888f3fd43d7656405643 - -PKG_MAINTAINER:=Markus Stenberg -PKG_LICENSE:=BSD-3-Clause - -include $(INCLUDE_DIR)/package.mk - -define Package/miniupnpd - SECTION:=net - CATEGORY:=Network - DEPENDS:=+iptables +libip4tc +IPV6:libip6tc +IPV6:ip6tables +libuuid - TITLE:=Lightweight UPnP IGD, NAT-PMP & PCP daemon - SUBMENU:=Firewall - URL:=http://miniupnp.free.fr/ -endef - -define Package/miniupnpd/config -config MINIUPNPD_IGDv2 - bool - default y - prompt "Enable IGDv2" -endef - -define Package/miniupnpd/conffiles -/etc/config/upnpd -endef - -define Package/miniupnpd/postinst -#!/bin/sh - -if [ -z "$$IPKG_INSTROOT" ]; then - ( . /etc/uci-defaults/99-miniupnpd ) - rm -f /etc/uci-defaults/99-miniupnpd -fi - -exit 0 -endef - -define Build/Prepare - $(call Build/Prepare/Default) - echo "OpenWrt" | tr \(\)\ _ >$(PKG_BUILD_DIR)/os.openwrt -endef - -MAKE_FLAGS += \ - TARGET_OPENWRT=1 TEST=0 \ - LIBS="" \ - CC="$(TARGET_CC) -DIPTABLES_143 \ - -lip4tc $(if $(CONFIG_IPV6),-lip6tc) -luuid" \ - CONFIG_OPTIONS="--portinuse --leasefile \ - $(if $(CONFIG_IPV6),--ipv6) \ - $(if $(CONFIG_MINIUPNPD_IGDv2),--igd2)" \ - -f Makefile.linux \ - miniupnpd - - -define Package/miniupnpd/install - $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config $(1)/etc/uci-defaults $(1)/etc/hotplug.d/iface $(1)/usr/share/miniupnpd - $(INSTALL_BIN) $(PKG_BUILD_DIR)/miniupnpd $(1)/usr/sbin/miniupnpd - $(INSTALL_BIN) ./files/miniupnpd.init $(1)/etc/init.d/miniupnpd - $(INSTALL_CONF) ./files/upnpd.config $(1)/etc/config/upnpd - $(INSTALL_DATA) ./files/miniupnpd.hotplug $(1)/etc/hotplug.d/iface/50-miniupnpd - $(INSTALL_DATA) ./files/miniupnpd.defaults $(1)/etc/uci-defaults/99-miniupnpd - $(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/miniupnpd/firewall.include -endef - -$(eval $(call BuildPackage,miniupnpd)) diff --git a/net/miniupnpd/files/firewall.include b/net/miniupnpd/files/firewall.include deleted file mode 100644 index 0eb96d7..0000000 --- a/net/miniupnpd/files/firewall.include +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# miniupnpd integration for firewall3 - -IP6TABLES=/usr/sbin/ip6tables - -iptables -t filter -N MINIUPNPD 2>/dev/null -iptables -t nat -N MINIUPNPD 2>/dev/null -iptables -t nat -N MINIUPNPD-POSTROUTING 2>/dev/null - -[ -x $IP6TABLES ] && $IP6TABLES -t filter -N MINIUPNPD 2>/dev/null - -. /lib/functions/network.sh - -ADDED=0 - -add_extzone_rules() { - local ext_zone=$1 - - [ -z "$ext_zone" ] && return - - # IPv4 - due to NAT, need to add both to nat and filter table - iptables -t filter -I zone_${ext_zone}_forward -j MINIUPNPD - iptables -t nat -I zone_${ext_zone}_prerouting -j MINIUPNPD - iptables -t nat -I zone_${ext_zone}_postrouting -j MINIUPNPD-POSTROUTING - - # IPv6 if available - filter only - [ -x $IP6TABLES ] && { - $IP6TABLES -t filter -I zone_${ext_zone}_forward -j MINIUPNPD - } - ADDED=$(($ADDED + 1)) -} - -# By default, user configuration is king. - -for ext_iface in $(uci -q get upnpd.config.external_iface); do - add_extzone_rules $(fw3 -q network "$ext_iface") -done - -add_extzone_rules $(uci -q get upnpd.config.external_zone) - -[ ! $ADDED = 0 ] && exit 0 - - -# If really nothing is available, resort to network_find_wan{,6} and -# assume external interfaces all have same firewall zone. - -# (This heuristic may fail horribly, in case of e.g. multihoming, so -# please set external_zone in that case!) - -network_find_wan wan_iface -network_find_wan6 wan6_iface - -for ext_iface in $wan_iface $wan6_iface; do - # fw3 -q network fails on sub-interfaces => map to device first - network_get_device ext_device $ext_iface - add_extzone_rules $(fw3 -q device "$ext_device") -done diff --git a/net/miniupnpd/files/miniupnpd.defaults b/net/miniupnpd/files/miniupnpd.defaults deleted file mode 100644 index 7271389..0000000 --- a/net/miniupnpd/files/miniupnpd.defaults +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOT - delete firewall.miniupnpd - set firewall.miniupnpd=include - set firewall.miniupnpd.type=script - set firewall.miniupnpd.path=/usr/share/miniupnpd/firewall.include - set firewall.miniupnpd.family=any - set firewall.miniupnpd.reload=1 - commit firewall -EOT - -exit 0 diff --git a/net/miniupnpd/files/miniupnpd.hotplug b/net/miniupnpd/files/miniupnpd.hotplug deleted file mode 100644 index 320437e..0000000 --- a/net/miniupnpd/files/miniupnpd.hotplug +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -/etc/init.d/miniupnpd enabled || exit 0 - -. /lib/functions/service.sh - -# If miniupnpd is not running: -# - check on _any_ event (even updates may contribute to network_find_wan*) - -# If miniupnpd _is_ running: -# - check only on ifup (otherwise lease updates etc would cause -# miniupnpd state loss) - -[ ! "$ACTION" = "ifup" ] && service_check /usr/sbin/miniupnpd && exit 0 - -tmpconf="/var/etc/miniupnpd.conf" -extiface=$(uci get upnpd.config.external_iface) -extzone=$(uci get upnpd.config.external_zone) - -. /lib/functions/network.sh - -for iface in $(uci get upnpd.config.internal_iface); do - network_get_device device $iface - [ "$DEVICE" = "$device" ] && /etc/init.d/miniupnpd restart && exit 0 -done - - -if [ -z "$extiface" ] ; then - # manual external zone (if dynamically find interfaces - # belonging to it) overrides network_find_wan* - if [ -n "$extzone" ] ; then - ifname=$(fw3 -q zone $extzone | head -1) - fi - [ -n "$extiface" ] || network_find_wan extiface - [ -n "$extiface" ] || network_find_wan6 extiface -fi - -[ -n "$ifname" ] || network_get_device ifname ${extiface} -grep -q "ext_ifname=$ifname" $tmpconf || /etc/init.d/miniupnpd restart diff --git a/net/miniupnpd/files/miniupnpd.init b/net/miniupnpd/files/miniupnpd.init deleted file mode 100644 index c934a28..0000000 --- a/net/miniupnpd/files/miniupnpd.init +++ /dev/null @@ -1,212 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2014 OpenWrt.org - -START=94 -STOP=15 - -SERVICE_USE_PID=1 - -upnpd_get_port_range() { - local _var="$1"; shift - local _val - - config_get _val "$@" - - case "$_val" in - [0-9]*[:-][0-9]*) - export -n -- "${_var}_start=${_val%%[:-]*}" - export -n -- "${_var}_end=${_val##*[:-]}" - ;; - [0-9]*) - export -n -- "${_var}_start=$_val" - export -n -- "${_var}_end=" - ;; - esac -} - -conf_rule_add() { - local cfg="$1" - local tmpconf="$2" - local action external_port_start external_port_end int_addr - local internal_port_start internal_port_end - - config_get action "$cfg" action "deny" # allow or deny - upnpd_get_port_range "ext" "$cfg" ext_ports "0-65535" # external ports: x, x-y, x:y - config_get int_addr "$cfg" int_addr "0.0.0.0/0" # ip or network and subnet mask (internal) - upnpd_get_port_range "int" "$cfg" int_ports "0-65535" # internal ports: x, x-y, x:y or range - - # Make a single IP IP/32 so that miniupnpd.conf can use it. - case "$int_addr" in - */*) ;; - *) int_addr="$int_addr/32" ;; - esac - - echo "${action} ${ext_start}${ext_end:+-}${ext_end} ${int_addr} ${int_start}${int_end:+-}${int_end}" >>$tmpconf -} - -upnpd_write_bool() { - local opt="$1" - local def="${2:-0}" - local alt="$3" - local val - - config_get_bool val config "$opt" "$def" - if [ "$val" -eq 0 ]; then - echo "${alt:-$opt}=no" >> $tmpconf - else - echo "${alt:-$opt}=yes" >> $tmpconf - fi -} - -boot() { - return -} - -start() { - config_load "upnpd" - local extiface intiface upload download logging secure enabled natpmp - local extip port usesysuptime conffile serial_number model_number - local uuid notify_interval presentation_url enable_upnp - local upnp_lease_file clean_ruleset_threshold clean_ruleset_interval - local ipv6_listening_ip enabled - - config_get_bool enabled config enabled 1 - - [ "$enabled" -gt 0 ] || return 1 - - config_get extiface config external_iface - config_get extzone config external_zone - config_get intiface config internal_iface - config_get extip config external_ip - config_get port config port 5000 - config_get upload config upload - config_get download config download - config_get_bool logging config log_output 0 - config_get conffile config config_file - config_get serial_number config serial_number - config_get model_number config model_number - config_get uuid config uuid - config_get notify_interval config notify_interval - config_get presentation_url config presentation_url - config_get upnp_lease_file config upnp_lease_file - config_get clean_ruleset_threshold config clean_ruleset_threshold - config_get clean_ruleset_interval config clean_ruleset_interval - config_get ipv6_listening_ip config ipv6_listening_ip - - local args - - . /lib/functions/network.sh - - local ifname - - # manual external interface overrides everything - if [ -z "$extiface" ] ; then - # manual external zone (if dynamically find interfaces - # belonging to it) overrides network_find_wan* - if [ -n "$extzone" ] ; then - ifname=$(fw3 -q zone $extzone | head -1) - fi - [ -n "$extiface" ] || network_find_wan extiface - [ -n "$extiface" ] || network_find_wan6 extiface - fi - - [ -n "$ifname" ] || network_get_device ifname ${extiface} - - if [ -n "$conffile" ]; then - args="-f $conffile" - else - local tmpconf="/var/etc/miniupnpd.conf" - args="-f $tmpconf" - mkdir -p /var/etc - - echo "ext_ifname=$ifname" >$tmpconf - - [ -n "$extip" ] && \ - echo "ext_ip=$extip" >>$tmpconf - - local iface - for iface in ${intiface:-lan}; do - local device - network_get_device device "$iface" && { - echo "listening_ip=$device" >>$tmpconf - } - done - - [ "$port" != "auto" ] && \ - echo "port=$port" >>$tmpconf - - config_load "upnpd" - upnpd_write_bool enable_natpmp 1 - upnpd_write_bool enable_upnp 1 - upnpd_write_bool secure_mode 1 - upnpd_write_bool pcp_allow_thirdparty 0 - upnpd_write_bool system_uptime 1 - - [ -n "$upnp_lease_file" ] && \ - echo "lease_file=$upnp_lease_file" >>$tmpconf - - [ -n "$upload" -a -n "$download" ] && { - echo "bitrate_down=$(($download * 1024 * 8))" >>$tmpconf - echo "bitrate_up=$(($upload * 1024 * 8))" >>$tmpconf - } - - [ -n "${presentation_url}" ] && \ - echo "presentation_url=${presentation_url}" >>$tmpconf - - [ -n "${notify_interval}" ] && \ - echo "notify_interval=${notify_interval}" >>$tmpconf - - [ -n "${clean_ruleset_threshold}" ] && \ - echo "clean_ruleset_threshold=${clean_ruleset_threshold}" >>$tmpconf - - [ -n "${clean_ruleset_interval}" ] && \ - echo "clean_ruleset_interval=${clean_ruleset_interval}" >>$tmpconf - - [ -n "${ipv6_listening_ip}" ] && \ - echo "ipv6_listening_ip=${ipv6_listening_ip}" >>$tmpconf - - [ -z "$uuid" ] && { - uuid="$(cat /proc/sys/kernel/random/uuid)" - uci set upnpd.config.uuid=$uuid - uci commit upnpd - } - - [ "$uuid" = "nocli" ] || \ - echo "uuid=$uuid" >>$tmpconf - - [ -n "${serial_number}" ] && \ - echo "serial=${serial_number}" >>$tmpconf - - [ -n "${model_number}" ] && \ - echo "model_number=${model_number}" >>$tmpconf - - config_foreach conf_rule_add perm_rule "$tmpconf" - fi - - - if [ -n "$ifname" ]; then - # start firewall - iptables -L MINIUPNPD >/dev/null 2>/dev/null || fw3 reload - - if [ "$logging" = "1" ]; then - SERVICE_DAEMONIZE=1 \ - service_start /usr/sbin/miniupnpd $args -d - else - SERVICE_DAEMONIZE= \ - service_start /usr/sbin/miniupnpd $args - fi - else - logger -t "upnp daemon" "external interface not found, not starting" - fi -} - -stop() { - service_stop /usr/sbin/miniupnpd - - iptables -t nat -F MINIUPNPD 2>/dev/null - iptables -t filter -F MINIUPNPD 2>/dev/null - - [ -x /usr/sbin/ip6tables ] && { - ip6tables -t filter -F MINIUPNPD 2>/dev/null - } -} diff --git a/net/miniupnpd/files/upnpd.config b/net/miniupnpd/files/upnpd.config deleted file mode 100644 index 9a65bfa..0000000 --- a/net/miniupnpd/files/upnpd.config +++ /dev/null @@ -1,27 +0,0 @@ -config upnpd config - option enabled 0 - option enable_natpmp 1 - option enable_upnp 1 - option secure_mode 1 - option log_output 0 - option download 1024 - option upload 512 - #by default, looked up dynamically from ubus - #option external_iface wan - option internal_iface lan - option port 5000 - option upnp_lease_file /var/upnp.leases - -config perm_rule - option action allow - option ext_ports 1024-65535 - option int_addr 0.0.0.0/0 # Does not override secure_mode - option int_ports 1024-65535 - option comment "Allow high ports" - -config perm_rule - option action deny - option ext_ports 0-65535 - option int_addr 0.0.0.0/0 - option int_ports 0-65535 - option comment "Default deny" diff --git a/net/miniupnpd/patches/101-no-ssl-uuid.patch b/net/miniupnpd/patches/101-no-ssl-uuid.patch deleted file mode 100644 index 81cea10..0000000 --- a/net/miniupnpd/patches/101-no-ssl-uuid.patch +++ /dev/null @@ -1,23 +0,0 @@ -We do not need to autodetect SSL/UUID; SSL we do not support, UUID we always do. - ---- a/Makefile.linux -+++ b/Makefile.linux -@@ -153,14 +153,18 @@ LDLIBS += $(shell $(PKG_CONFIG) --static - LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack) - endif # ($(TEST),1) - -+ifeq ($(TARGET_OPENWRT),) -+# n/a - we don't enable https server for IGD v2 anyway in OpenWrt - LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl) - -+# n/a - we hardcodedly support libuuid - TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1) - ifeq ($(TEST),1) - LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l uuid) - else - $(info please install uuid-dev package / libuuid) - endif # ($(TEST),1) -+endif - - TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o - diff --git a/net/miniupnpd/patches/102-ipv6-ext-port.patch b/net/miniupnpd/patches/102-ipv6-ext-port.patch deleted file mode 100644 index 806c7fd..0000000 --- a/net/miniupnpd/patches/102-ipv6-ext-port.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/pcpserver.c -+++ b/pcpserver.c -@@ -982,6 +982,7 @@ static int CreatePCPMap_NAT(pcp_info_t * - timestamp); - if (r < 0) - return PCP_ERR_NO_RESOURCES; -+ pcp_msg_info->ext_port = pcp_msg_info->int_port; - return PCP_SUCCESS; - } - diff --git a/net/miniupnpd/patches/103-no-ipv6-autodetection.patch b/net/miniupnpd/patches/103-no-ipv6-autodetection.patch deleted file mode 100644 index 50d5a39..0000000 --- a/net/miniupnpd/patches/103-no-ipv6-autodetection.patch +++ /dev/null @@ -1,27 +0,0 @@ -The miniupnpd makefile tries to autodetect iptables capabilities. -This will incorrectly detect capabilities such as ipv6 support even though it is disabled for the target build. - -As the OpenWRT buildsystem already passes the right compile flags, we can skip the autodetection. - - ---- a/netfilter/Makefile -+++ b/netfilter/Makefile -@@ -38,8 +38,6 @@ endif - endif - endif - --LIBS += /lib/libip4tc.so /lib/libip6tc.so -- - all: iptcrdr.o testiptcrdr iptpinhole.o \ - testiptcrdr_peer testiptcrdr_dscp test_nfct_get - # testiptpinhole ---- a/Makefile.linux -+++ b/Makefile.linux -@@ -73,7 +73,6 @@ CPPFLAGS += -DIPTABLES_143 - endif - - CFLAGS += $(shell $(PKG_CONFIG) --cflags libiptc) --LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libiptc) - LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libiptc) - LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other libiptc) - else diff --git a/net/miniupnpd/patches/104-always-libuuid.patch b/net/miniupnpd/patches/104-always-libuuid.patch deleted file mode 100644 index d6c0770..0000000 --- a/net/miniupnpd/patches/104-always-libuuid.patch +++ /dev/null @@ -1,20 +0,0 @@ -As it turns out, the 'magic' libuuid/bsd uuid check just checks -outside buildtree altogether for the uuid_generate. So we just -hardcode it. - ---- a/genconfig.sh -+++ b/genconfig.sh -@@ -367,12 +367,7 @@ case $FW in - esac - - # UUID API --if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then -- echo "#define BSD_UUID" >> ${CONFIGFILE} --fi --if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then -- echo "#define LIB_UUID" >> ${CONFIGFILE} --fi -+echo "#define LIB_UUID" >> ${CONFIGFILE} - - # set V6SOCKETS_ARE_V6ONLY to 0 if it was not set above - if [ -z "$V6SOCKETS_ARE_V6ONLY" ] ; then diff --git a/net/mtr/Makefile b/net/mtr/Makefile deleted file mode 100644 index ac07cb3..0000000 --- a/net/mtr/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mtr -PKG_REV:=dd2b75080bc5406ba0b438953b36b72204ba114b -PKG_VERSION:=0.85+newdns-$(PKG_REV) -PKG_RELEASE:=2 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/traviscross/mtr.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/mtr - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libncurses - TITLE:=Full screen ncurses traceroute tool - URL:=http://www.bitwizard.nl/mtr/ - PKG_MAINTAINER:=Jonathan McCrohan -endef - -define Package/mtr/description - mtr combines the functionality of the 'traceroute' and 'ping' programs - in a single network diagnostic tool. - As mtr starts, it investigates the network connection between the host - mtr runs on and a user-specified destination host. After it - determines the address of each network hop between the machines, - it sends a sequence ICMP ECHO requests to each one to determine the - quality of the link to each machine. As it does this, it prints - running statistics about each machine. -endef - -CONFIGURE_ARGS += \ - --without-gtk \ - --without-glib \ - $(call autoconf_bool,CONFIG_IPV6,ipv6) - -define Build/Configure - (cd $(PKG_BUILD_DIR); touch \ - configure.in \ - aclocal.m4 \ - Makefile.in \ - img/Makefile.in \ - stamp-h.in \ - config.h.in \ - configure \ - ); - $(call Build/Configure/Default) -endef - -define Package/mtr/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mtr $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,mtr)) diff --git a/net/mtr/patches/100-disabled-ipv6-fix.patch b/net/mtr/patches/100-disabled-ipv6-fix.patch deleted file mode 100644 index 5ef9984..0000000 --- a/net/mtr/patches/100-disabled-ipv6-fix.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/net.c -+++ b/net.c -@@ -307,9 +307,11 @@ void net_send_tcp(int index) - struct sockaddr_storage local; - struct sockaddr_storage remote; - struct sockaddr_in *local4 = (struct sockaddr_in *) &local; -- struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) &local; - struct sockaddr_in *remote4 = (struct sockaddr_in *) &remote; -+#ifdef ENABLE_IPV6 -+ struct sockaddr_in6 *local6 = (struct sockaddr_in6 *) &local; - struct sockaddr_in6 *remote6 = (struct sockaddr_in6 *) &remote; -+#endif - socklen_t len; - - ttl = index + 1; -@@ -566,8 +568,10 @@ void net_send_query(int index) - - /* sendto() assumes packet length includes the IPv4 header but not the - IPv6 header. */ -- spacketsize = abs(packetsize) - -- ( ( af == AF_INET ) ? 0 : sizeof (struct ip6_hdr) ); -+ spacketsize = abs(packetsize); -+#ifdef ENABLE_IPV6 -+ spacketsize -= ( ( af == AF_INET ) ? 0 : sizeof (struct ip6_hdr) ); -+#endif - rv = sendto(sendsock, packet, spacketsize, 0, remotesockaddr, salen); - if (first && (rv < 0) && ((errno == EINVAL) || (errno == EMSGSIZE))) { - /* Try the first packet again using host byte order. */ ---- a/dns.c -+++ b/dns.c -@@ -49,7 +49,7 @@ - #include - #include - //#include --//#include -+#include - #include - #include - #include ---- a/net.h -+++ b/net.h -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - #include - #ifdef ENABLE_IPV6 - #include diff --git a/net/mwan3-luci/Makefile b/net/mwan3-luci/Makefile deleted file mode 100644 index 8c77394..0000000 --- a/net/mwan3-luci/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luci-app-mwan3 -PKG_VERSION:=1.4 -PKG_RELEASE:=5 -PKG_MAINTAINER:=Aedan Renner -PKG_LICENSE:=GPLv2 - -include $(INCLUDE_DIR)/package.mk - -define Package/luci-app-mwan3 - SECTION:=LuCI - CATEGORY:=LuCI - SUBMENU:=3. Applications - TITLE:=LuCI support for the MWAN3 multiwan hotplug script - DEPENDS:=+mwan3 +luci-mod-admin-full +luci-app-firewall +luci-lib-nixio - PKGARCH:=all - MAINTAINER:=Aedan Renner -endef - -define Package/luci-app-mwan3/description -Hotplug script which makes configuration of multiple WAN interfaces simple and -manageable with loadbalancing/failover support for up to 250 physical or logical -WAN interfaces, connection tracking and an easy to manage traffic ruleset -endef - -define Build/Compile -endef - -define Package/luci-app-mwan3/install - $(CP) ./files/* $(1) -endef - -$(eval $(call BuildPackage,luci-app-mwan3)) diff --git a/net/mwan3-luci/files/etc/hotplug.d/iface/16-mwancustombak b/net/mwan3-luci/files/etc/hotplug.d/iface/16-mwancustombak deleted file mode 100755 index 6e2875e..0000000 --- a/net/mwan3-luci/files/etc/hotplug.d/iface/16-mwancustombak +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -# to enable this script uncomment the case loop at the bottom -# to report mwan status on interface hotplug ifup/ifdown events modify the lines in the send_alert function - -send_alert() -{ - # variable "$1" stores the MWAN status information - # insert your code here to send the contents of "$1" - echo "$1" -} - -gather_event_info() -{ - # create event information message - local EVENT_INFO="Interface [ "$INTERFACE" ($DEVICE) ] on router [ "$(uci -p /var/state get system.@system[0].hostname)" ] has triggered a hotplug [ "$ACTION" ] event on "$(date +"%a %b %d %Y %T %Z")"" - - # get current interface, policy and rule status - local CURRENT_STATUS="$(/usr/sbin/mwan3 status)" - - # get last 50 MWAN systemlog messages - local MWAN_LOG="$(echo -e "Last 50 MWAN systemlog entries. Newest entries sorted at the top:\n$(logread | grep mwan3 | tail -n 50 | sed 'x;1!H;$!d;x')")" - - # pass event info to send_alert function - send_alert "$(echo -e "$EVENT_INFO\n\n$CURRENT_STATUS\n\n$MWAN_LOG")" -} - -#case "$ACTION" in -# ifup) -# gather_event_info -# ;; -# -# ifdown) -# gather_event_info -# ;; -#esac - -exit 0 diff --git a/net/mwan3-luci/files/etc/uci-defaults/mwan-luci b/net/mwan3-luci/files/etc/uci-defaults/mwan-luci deleted file mode 100755 index ff9a229..0000000 --- a/net/mwan3-luci/files/etc/uci-defaults/mwan-luci +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# replace existing mwan ucitrack entry -uci -q batch <<-EOF >/dev/null - del ucitrack.@mwan3[-1] - add ucitrack mwan3 - set ucitrack.@mwan3[-1].exec="/usr/sbin/mwan3 restart" - commit ucitrack -EOF - -# remove LuCI cache -rm -rf /tmp/luci-indexcache /tmp/luci-modulecache - -exit 0 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua b/net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua deleted file mode 100644 index 3d5a23d..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/controller/mwan3.lua +++ /dev/null @@ -1,331 +0,0 @@ -module("luci.controller.mwan3", package.seeall) - -sys = require "luci.sys" -ut = require "luci.util" - -ip = "/usr/bin/ip -4 " - -function index() - if not nixio.fs.access("/etc/config/mwan3") then - return - end - - entry({"admin", "network", "mwan"}, - alias("admin", "network", "mwan", "overview"), - _("Load Balancing"), 600) - - entry({"admin", "network", "mwan", "overview"}, - alias("admin", "network", "mwan", "overview", "overview_interface"), - _("Overview"), 10) - entry({"admin", "network", "mwan", "overview", "overview_interface"}, - template("mwan/overview_interface")) - entry({"admin", "network", "mwan", "overview", "interface_status"}, - call("interfaceStatus")) - entry({"admin", "network", "mwan", "overview", "overview_detailed"}, - template("mwan/overview_detailed")) - entry({"admin", "network", "mwan", "overview", "detailed_status"}, - call("detailedStatus")) - - entry({"admin", "network", "mwan", "configuration"}, - alias("admin", "network", "mwan", "configuration", "interface"), - _("Configuration"), 20) - entry({"admin", "network", "mwan", "configuration", "interface"}, - arcombine(cbi("mwan/interface"), cbi("mwan/interfaceconfig")), - _("Interfaces"), 10).leaf = true - entry({"admin", "network", "mwan", "configuration", "member"}, - arcombine(cbi("mwan/member"), cbi("mwan/memberconfig")), - _("Members"), 20).leaf = true - entry({"admin", "network", "mwan", "configuration", "policy"}, - arcombine(cbi("mwan/policy"), cbi("mwan/policyconfig")), - _("Policies"), 30).leaf = true - entry({"admin", "network", "mwan", "configuration", "rule"}, - arcombine(cbi("mwan/rule"), cbi("mwan/ruleconfig")), - _("Rules"), 40).leaf = true - - entry({"admin", "network", "mwan", "advanced"}, - alias("admin", "network", "mwan", "advanced", "hotplugscript"), - _("Advanced"), 100) - entry({"admin", "network", "mwan", "advanced", "hotplugscript"}, - form("mwan/advanced_hotplugscript")) - entry({"admin", "network", "mwan", "advanced", "mwanconfig"}, - form("mwan/advanced_mwanconfig")) - entry({"admin", "network", "mwan", "advanced", "networkconfig"}, - form("mwan/advanced_networkconfig")) - entry({"admin", "network", "mwan", "advanced", "wirelessconfig"}, - form("mwan/advanced_wirelessconfig")) - entry({"admin", "network", "mwan", "advanced", "diagnostics"}, - template("mwan/advanced_diagnostics")) - entry({"admin", "network", "mwan", "advanced", "diagnostics_display"}, - call("diagnosticsData"), nil).leaf = true - entry({"admin", "network", "mwan", "advanced", "troubleshooting"}, - template("mwan/advanced_troubleshooting")) - entry({"admin", "network", "mwan", "advanced", "troubleshooting_display"}, - call("troubleshootingData")) -end - -function getInterfaceStatus(ruleNumber, interfaceName) - if ut.trim(sys.exec("uci -p /var/state get mwan3." .. interfaceName .. ".enabled")) == "1" then - if ut.trim(sys.exec(ip .. "route list table " .. ruleNumber)) ~= "" then - if ut.trim(sys.exec("uci -p /var/state get mwan3." .. interfaceName .. ".track_ip")) ~= "" then - return "online" - else - return "notMonitored" - end - else - return "offline" - end - else - return "notEnabled" - end -end - -function getInterfaceName() - local ruleNumber, status = 0, "" - uci.cursor():foreach("mwan3", "interface", - function (section) - ruleNumber = ruleNumber+1 - status = status .. section[".name"] .. "[" .. getInterfaceStatus(ruleNumber, section[".name"]) .. "]" - end - ) - return status -end - -function interfaceStatus() - local ntm = require "luci.model.network".init() - - local mArray = {} - - -- overview status - local statusString = getInterfaceName() - if statusString ~= "" then - mArray.wans = {} - wansid = {} - - for wanName, interfaceState in string.gfind(statusString, "([^%[]+)%[([^%]]+)%]") do - local wanInterfaceName = ut.trim(sys.exec("uci -p /var/state get network." .. wanName .. ".ifname")) - if wanInterfaceName == "" then - wanInterfaceName = "X" - end - local wanDeviceLink = ntm:get_interface(wanInterfaceName) - wanDeviceLink = wanDeviceLink and wanDeviceLink:get_network() - wanDeviceLink = wanDeviceLink and wanDeviceLink:adminlink() or "#" - wansid[wanName] = #mArray.wans + 1 - mArray.wans[wansid[wanName]] = { name = wanName, link = wanDeviceLink, ifname = wanInterfaceName, status = interfaceState } - end - end - - -- overview status log - local mwanLog = ut.trim(sys.exec("logread | grep mwan3 | tail -n 50 | sed 'x;1!H;$!d;x'")) - if mwanLog ~= "" then - mArray.mwanlog = { mwanLog } - end - - luci.http.prepare_content("application/json") - luci.http.write_json(mArray) -end - -function detailedStatus() - local mArray = {} - - -- detailed mwan status - local detailStatusInfo = ut.trim(sys.exec("/usr/sbin/mwan3 status")) - if detailStatusInfo ~= "" then - mArray.mwandetail = { detailStatusInfo } - end - - luci.http.prepare_content("application/json") - luci.http.write_json(mArray) -end - -function diagnosticsData(interface, tool, task) - function getInterfaceNumber() - local number = 0 - uci.cursor():foreach("mwan3", "interface", - function (section) - number = number+1 - if section[".name"] == interface then - interfaceNumber = number - end - end - ) - end - - local mArray = {} - - local results = "" - if tool == "service" then - os.execute("/usr/sbin/mwan3 " .. task) - if task == "restart" then - results = "MWAN3 restarted" - elseif task == "stop" then - results = "MWAN3 stopped" - else - results = "MWAN3 started" - end - else - local interfaceDevice = ut.trim(sys.exec("uci -p /var/state get network." .. interface .. ".ifname")) - if interfaceDevice ~= "" then - if tool == "ping" then - local gateway = ut.trim(sys.exec("route -n | awk '{if ($8 == \"" .. interfaceDevice .. "\" && $1 == \"0.0.0.0\" && $3 == \"0.0.0.0\") print $2}'")) - if gateway ~= "" then - if task == "gateway" then - local pingCommand = "ping -c 3 -W 2 -I " .. interfaceDevice .. " " .. gateway - results = pingCommand .. "\n\n" .. sys.exec(pingCommand) - else - local tracked = ut.trim(sys.exec("uci -p /var/state get mwan3." .. interface .. ".track_ip")) - if tracked ~= "" then - for z in tracked:gmatch("[^ ]+") do - local pingCommand = "ping -c 3 -W 2 -I " .. interfaceDevice .. " " .. z - results = results .. pingCommand .. "\n\n" .. sys.exec(pingCommand) .. "\n\n" - end - else - results = "No tracking IP addresses configured on " .. interface - end - end - else - results = "No default gateway for " .. interface .. " found. Default route does not exist or is configured incorrectly" - end - elseif tool == "rulechk" then - getInterfaceNumber() - local rule1 = sys.exec(ip .. "rule | grep $(echo $((" .. interfaceNumber .. " + 1000)))") - local rule2 = sys.exec(ip .. "rule | grep $(echo $((" .. interfaceNumber .. " + 2000)))") - if rule1 ~= "" and rule2 ~= "" then - results = "All required interface IP rules found:\n\n" .. rule1 .. rule2 - elseif rule1 ~= "" or rule2 ~= "" then - results = "Missing 1 of the 2 required interface IP rules\n\n\nRules found:\n\n" .. rule1 .. rule2 - else - results = "Missing both of the required interface IP rules" - end - elseif tool == "routechk" then - getInterfaceNumber() - local routeTable = sys.exec(ip .. "route list table " .. interfaceNumber) - if routeTable ~= "" then - results = "Interface routing table " .. interfaceNumber .. " was found:\n\n" .. routeTable - else - results = "Missing required interface routing table " .. interfaceNumber - end - elseif tool == "hotplug" then - if task == "ifup" then - os.execute("/usr/sbin/mwan3 ifup " .. interface) - results = "Hotplug ifup sent to interface " .. interface .. "..." - else - os.execute("/usr/sbin/mwan3 ifdown " .. interface) - results = "Hotplug ifdown sent to interface " .. interface .. "..." - end - end - else - results = "Unable to perform diagnostic tests on " .. interface .. ". There is no physical or virtual device associated with this interface" - end - end - if results ~= "" then - results = ut.trim(results) - mArray.diagnostics = { results } - end - - luci.http.prepare_content("application/json") - luci.http.write_json(mArray) -end - -function troubleshootingData() - local ver = require "luci.version" - - local mArray = {} - - -- software versions - local wrtRelease = ut.trim(ver.distversion) - if wrtRelease ~= "" then - wrtRelease = "OpenWrt - " .. wrtRelease - else - wrtRelease = "OpenWrt - unknown" - end - local luciRelease = ut.trim(ver.luciversion) - if luciRelease ~= "" then - luciRelease = "\nLuCI - " .. luciRelease - else - luciRelease = "\nLuCI - unknown" - end - local mwanVersion = ut.trim(sys.exec("opkg info mwan3 | grep Version | awk '{print $2}'")) - if mwanVersion ~= "" then - mwanVersion = "\n\nmwan3 - " .. mwanVersion - else - mwanVersion = "\n\nmwan3 - unknown" - end - local mwanLuciVersion = ut.trim(sys.exec("opkg info luci-app-mwan3 | grep Version | awk '{print $2}'")) - if mwanLuciVersion ~= "" then - mwanLuciVersion = "\nmwan3-luci - " .. mwanLuciVersion - else - mwanLuciVersion = "\nmwan3-luci - unknown" - end - mArray.versions = { wrtRelease .. luciRelease .. mwanVersion .. mwanLuciVersion } - - -- mwan config - local mwanConfig = ut.trim(sys.exec("cat /etc/config/mwan3")) - if mwanConfig == "" then - mwanConfig = "No data found" - end - mArray.mwanconfig = { mwanConfig } - - -- network config - local networkConfig = ut.trim(sys.exec("cat /etc/config/network | sed -e 's/.*username.*/ USERNAME HIDDEN/' -e 's/.*password.*/ PASSWORD HIDDEN/'")) - if networkConfig == "" then - networkConfig = "No data found" - end - mArray.netconfig = { networkConfig } - - -- wireless config - local wirelessConfig = ut.trim(sys.exec("cat /etc/config/wireless | sed -e 's/.*username.*/ USERNAME HIDDEN/' -e 's/.*password.*/ PASSWORD HIDDEN/' -e 's/.*key.*/ KEY HIDDEN/'")) - if wirelessConfig == "" then - wirelessConfig = "No data found" - end - mArray.wificonfig = { wirelessConfig } - - -- ifconfig - local ifconfig = ut.trim(sys.exec("ifconfig")) - if ifconfig == "" then - ifconfig = "No data found" - end - mArray.ifconfig = { ifconfig } - - -- route -n - local routeShow = ut.trim(sys.exec("route -n")) - if routeShow == "" then - routeShow = "No data found" - end - mArray.routeshow = { routeShow } - - -- ip rule show - local ipRuleShow = ut.trim(sys.exec(ip .. "rule show")) - if ipRuleShow == "" then - ipRuleShow = "No data found" - end - mArray.iprule = { ipRuleShow } - - -- ip route list table 1-250 - local routeList, routeString = ut.trim(sys.exec(ip .. "rule | sed 's/://g' | awk '$1>=2001 && $1<=2250' | awk '{print $NF}'")), "" - if routeList ~= "" then - for line in routeList:gmatch("[^\r\n]+") do - routeString = routeString .. line .. "\n" .. sys.exec(ip .. "route list table " .. line) - end - routeString = ut.trim(routeString) - else - routeString = "No data found" - end - mArray.routelist = { routeString } - - -- default firewall output policy - local firewallOut = ut.trim(sys.exec("uci -p /var/state get firewall.@defaults[0].output")) - if firewallOut == "" then - firewallOut = "No data found" - end - mArray.firewallout = { firewallOut } - - -- iptables - local iptables = ut.trim(sys.exec("iptables -L -t mangle -v -n")) - if iptables == "" then - iptables = "No data found" - end - mArray.iptables = { iptables } - - luci.http.prepare_content("application/json") - luci.http.write_json(mArray) -end diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_hotplugscript.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_hotplugscript.lua deleted file mode 100644 index 0e7b8b1..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_hotplugscript.lua +++ /dev/null @@ -1,55 +0,0 @@ --- ------ hotplug script configuration ------ -- - -fs = require "nixio.fs" -sys = require "luci.sys" -ut = require "luci.util" - -script = "/etc/hotplug.d/iface/16-mwancustom" -scriptBackup = "/etc/hotplug.d/iface/16-mwancustombak" - -if luci.http.formvalue("cbid.luci.1._restorebak") then -- restore button has been clicked - luci.http.redirect(luci.dispatcher.build_url("admin/network/mwan/advanced/hotplugscript") .. "?restore=yes") -elseif luci.http.formvalue("restore") == "yes" then -- restore script from backup - os.execute("cp -f " .. scriptBackup .. " " .. script) -end - - -m5 = SimpleForm("luci", nil) - m5:append(Template("mwan/advanced_hotplugscript")) -- highlight current tab - -f = m5:section(SimpleSection, nil, - translate("This section allows you to modify the contents of /etc/hotplug.d/iface/16-mwancustom
" .. - "This is useful for running system commands and/or scripts based on interface ifup or ifdown hotplug events

" .. - "Notes:
" .. - "The first line of the script must be "#!/bin/sh" without quotes
" .. - "Lines beginning with # are comments and are not executed

" .. - "Available variables:
" .. - "$ACTION is the hotplug event (ifup, ifdown)
" .. - "$INTERFACE is the interface name (wan1, wan2, etc.)
" .. - "$DEVICE is the device name attached to the interface (eth0.1, eth1, etc.)")) - - -restore = f:option(Button, "_restorebak", translate("Restore default hotplug script")) - restore.inputtitle = translate("Restore...") - restore.inputstyle = "apply" - -t = f:option(TextValue, "lines") - t.rmempty = true - t.rows = 20 - - function t.cfgvalue() - local hps = fs.readfile(script) - if not hps or hps == "" then -- if script does not exist or is blank restore from backup - sys.call("cp -f " .. scriptBackup .. " " .. script) - return fs.readfile(script) - else - return hps - end - end - - function t.write(self, section, data) -- format and write new data to script - return fs.writefile(script, ut.trim(data:gsub("\r\n", "\n")) .. "\n") - end - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_mwanconfig.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_mwanconfig.lua deleted file mode 100644 index e0a99e8..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_mwanconfig.lua +++ /dev/null @@ -1,32 +0,0 @@ --- ------ mwan configuration ------ -- - -ut = require "luci.util" - -mwanConfig = "/etc/config/mwan3" - - -m5 = SimpleForm("luci", nil) - m5:append(Template("mwan/advanced_mwanconfig")) -- highlight current tab - - -f = m5:section(SimpleSection, nil, - translate("This section allows you to modify the contents of /etc/config/mwan3")) - -t = f:option(TextValue, "lines") - t.rmempty = true - t.rows = 20 - - function t.cfgvalue() - return nixio.fs.readfile(mwanConfig) or "" - end - - function t.write(self, section, data) -- format and write new data to script - return nixio.fs.writefile(mwanConfig, "\n" .. ut.trim(data:gsub("\r\n", "\n")) .. "\n") - end - - function f.handle(self, state, data) - return true - end - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_networkconfig.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_networkconfig.lua deleted file mode 100644 index b93d897..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_networkconfig.lua +++ /dev/null @@ -1,32 +0,0 @@ --- ------ network configuration ------ -- - -ut = require "luci.util" - -networkConfig = "/etc/config/network" - - -m5 = SimpleForm("networkconf", nil) - m5:append(Template("mwan/advanced_networkconfig")) -- highlight current tab - - -f = m5:section(SimpleSection, nil, - translate("This section allows you to modify the contents of /etc/config/network")) - -t = f:option(TextValue, "lines") - t.rmempty = true - t.rows = 20 - - function t.cfgvalue() - return nixio.fs.readfile(networkConfig) or "" - end - - function t.write(self, section, data) -- format and write new data to script - return nixio.fs.writefile(networkConfig, "\n" .. ut.trim(data:gsub("\r\n", "\n")) .. "\n") - end - - function f.handle(self, state, data) - return true - end - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_wirelessconfig.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_wirelessconfig.lua deleted file mode 100644 index 95e9f7c..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/advanced_wirelessconfig.lua +++ /dev/null @@ -1,32 +0,0 @@ --- ------ wireless configuration ------ -- - -ut = require "luci.util" - -wirelessConfig = "/etc/config/wireless" - - -m5 = SimpleForm("wirelessconf", nil) - m5:append(Template("mwan/advanced_wirelessconfig")) -- highlight current tab - - -f = m5:section(SimpleSection, nil, - translate("This section allows you to modify the contents of /etc/config/wireless")) - -t = f:option(TextValue, "lines") - t.rmempty = true - t.rows = 20 - - function t.cfgvalue() - return nixio.fs.readfile(wirelessConfig) or "" - end - - function t.write(self, section, data) -- format and write new data to script - return nixio.fs.writefile(wirelessConfig, "\n" .. ut.trim(data:gsub("\r\n", "\n")) .. "\n") - end - - function f.handle(self, state, data) - return true - end - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/interface.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/interface.lua deleted file mode 100644 index a8e68a0..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/interface.lua +++ /dev/null @@ -1,266 +0,0 @@ --- ------ extra functions ------ -- - -function interfaceCheck() -- find issues with too many interfaces, reliability and metric - uci.cursor():foreach("mwan3", "interface", - function (section) - local interfaceName = section[".name"] - interfaceNumber = interfaceNumber+1 -- count number of mwan interfaces configured - -- create list of metrics for none and duplicate checking - local metricValue = ut.trim(sys.exec("uci -p /var/state get network." .. interfaceName .. ".metric")) - if metricValue == "" then - errorFound = 1 - errorNoMetricList = errorNoMetricList .. interfaceName .. " " - else - metricList = metricList .. interfaceName .. " " .. metricValue .. "\n" - end - -- check if any interfaces have a higher reliability requirement than tracking IPs configured - local trackingNumber = tonumber(ut.trim(sys.exec("echo $(uci -p /var/state get mwan3." .. interfaceName .. ".track_ip) | wc -w"))) - if trackingNumber > 0 then - local reliabilityNumber = tonumber(ut.trim(sys.exec("uci -p /var/state get mwan3." .. interfaceName .. ".reliability"))) - if reliabilityNumber and reliabilityNumber > trackingNumber then - errorFound = 1 - errorReliabilityList = errorReliabilityList .. interfaceName .. " " - end - end - -- check if any interfaces are not properly configured in /etc/config/network or have no default route in main routing table - if ut.trim(sys.exec("uci -p /var/state get network." .. interfaceName)) == "interface" then - local interfaceDevice = ut.trim(sys.exec("uci -p /var/state get network." .. interfaceName .. ".ifname")) - if interfaceDevice == "uci: Entry not found" or interfaceDevice == "" then - errorFound = 1 - errorNetConfigList = errorNetConfigList .. interfaceName .. " " - errorRouteList = errorRouteList .. interfaceName .. " " - else - local routeCheck = ut.trim(sys.exec("route -n | awk '{if ($8 == \"" .. interfaceDevice .. "\" && $1 == \"0.0.0.0\" && $3 == \"0.0.0.0\") print $1}'")) - if routeCheck == "" then - errorFound = 1 - errorRouteList = errorRouteList .. interfaceName .. " " - end - end - else - errorFound = 1 - errorNetConfigList = errorNetConfigList .. interfaceName .. " " - errorRouteList = errorRouteList .. interfaceName .. " " - end - end - ) - -- check if any interfaces have duplicate metrics - local metricDuplicateNumbers = sys.exec("echo '" .. metricList .. "' | awk '{print $2}' | uniq -d") - if metricDuplicateNumbers ~= "" then - errorFound = 1 - local metricDuplicates = "" - for line in metricDuplicateNumbers:gmatch("[^\r\n]+") do - metricDuplicates = sys.exec("echo '" .. metricList .. "' | grep '" .. line .. "' | awk '{print $1}'") - errorDuplicateMetricList = errorDuplicateMetricList .. metricDuplicates - end - errorDuplicateMetricList = sys.exec("echo '" .. errorDuplicateMetricList .. "' | tr '\n' ' '") - end -end - -function interfaceWarnings() -- display status and warning messages at the top of the page - local warnings = "" - if interfaceNumber <= 250 then - warnings = "There are currently " .. interfaceNumber .. " of 250 supported interfaces configured" - else - warnings = "WARNING: " .. interfaceNumber .. " interfaces are configured exceeding the maximum of 250!" - end - if errorReliabilityList ~= " " then - warnings = warnings .. "

WARNING: some interfaces have a higher reliability requirement than there are tracking IP addresses!" - end - if errorRouteList ~= " " then - warnings = warnings .. "

WARNING: some interfaces have no default route in the main routing table!" - end - if errorNetConfigList ~= " " then - warnings = warnings .. "

WARNING: some interfaces are configured incorrectly or not at all in /etc/config/network!" - end - if errorNoMetricList ~= " " then - warnings = warnings .. "

WARNING: some interfaces have no metric configured in /etc/config/network!" - end - if errorDuplicateMetricList ~= " " then - warnings = warnings .. "

WARNING: some interfaces have duplicate metrics configured in /etc/config/network!" - end - return warnings -end - --- ------ interface configuration ------ -- - -dsp = require "luci.dispatcher" -sys = require "luci.sys" -ut = require "luci.util" - -interfaceNumber = 0 -metricList = "" -errorFound = 0 -errorDuplicateMetricList = " " -errorNetConfigList = " " -errorNoMetricList = " " -errorReliabilityList = " " -errorRouteList = " " -interfaceCheck() - - -m5 = Map("mwan3", translate("MWAN Interface Configuration"), - translate(interfaceWarnings())) - m5:append(Template("mwan/config_css")) - - -mwan_interface = m5:section(TypedSection, "interface", translate("Interfaces"), - translate("MWAN supports up to 250 physical and/or logical interfaces
" .. - "MWAN requires that all interfaces have a unique metric configured in /etc/config/network
" .. - "Names must match the interface name found in /etc/config/network (see advanced tab)
" .. - "Names may contain characters A-Z, a-z, 0-9, _ and no spaces
" .. - "Interfaces may not share the same name as configured members, policies or rules")) - mwan_interface.addremove = true - mwan_interface.dynamic = false - mwan_interface.sectionhead = "Interface" - mwan_interface.sortable = true - mwan_interface.template = "cbi/tblsection" - mwan_interface.extedit = dsp.build_url("admin", "network", "mwan", "configuration", "interface", "%s") - function mwan_interface.create(self, section) - TypedSection.create(self, section) - m5.uci:save("mwan3") - luci.http.redirect(dsp.build_url("admin", "network", "mwan", "configuration", "interface", section)) - end - - -enabled = mwan_interface:option(DummyValue, "enabled", translate("Enabled")) - enabled.rawhtml = true - function enabled.cfgvalue(self, s) - if self.map:get(s, "enabled") == "1" then - return "Yes" - else - return "No" - end - end - -track_ip = mwan_interface:option(DummyValue, "track_ip", translate("Tracking IP")) - track_ip.rawhtml = true - function track_ip.cfgvalue(self, s) - tracked = self.map:get(s, "track_ip") - if tracked then - local ipList = "" - for k,v in pairs(tracked) do - ipList = ipList .. v .. "
" - end - return ipList - else - return "—" - end - end - -reliability = mwan_interface:option(DummyValue, "reliability", translate("Tracking reliability")) - reliability.rawhtml = true - function reliability.cfgvalue(self, s) - if tracked then - return self.map:get(s, "reliability") or "—" - else - return "—" - end - end - -count = mwan_interface:option(DummyValue, "count", translate("Ping count")) - count.rawhtml = true - function count.cfgvalue(self, s) - if tracked then - return self.map:get(s, "count") or "—" - else - return "—" - end - end - -timeout = mwan_interface:option(DummyValue, "timeout", translate("Ping timeout")) - timeout.rawhtml = true - function timeout.cfgvalue(self, s) - if tracked then - local timeoutValue = self.map:get(s, "timeout") - if timeoutValue then - return timeoutValue .. "s" - else - return "—" - end - else - return "—" - end - end - -interval = mwan_interface:option(DummyValue, "interval", translate("Ping interval")) - interval.rawhtml = true - function interval.cfgvalue(self, s) - if tracked then - local intervalValue = self.map:get(s, "interval") - if intervalValue then - return intervalValue .. "s" - else - return "—" - end - else - return "—" - end - end - -down = mwan_interface:option(DummyValue, "down", translate("Interface down")) - down.rawhtml = true - function down.cfgvalue(self, s) - if tracked then - return self.map:get(s, "down") or "—" - else - return "—" - end - end - -up = mwan_interface:option(DummyValue, "up", translate("Interface up")) - up.rawhtml = true - function up.cfgvalue(self, s) - if tracked then - return self.map:get(s, "up") or "—" - else - return "—" - end - end - -metric = mwan_interface:option(DummyValue, "metric", translate("Metric")) - metric.rawhtml = true - function metric.cfgvalue(self, s) - local metricValue = sys.exec("uci -p /var/state get network." .. s .. ".metric") - if metricValue ~= "" then - return metricValue - else - return "—" - end - end - -errors = mwan_interface:option(DummyValue, "errors", translate("Errors")) - errors.rawhtml = true - function errors.cfgvalue(self, s) - if errorFound == 1 then - local mouseOver, lineBreak = "", "" - if string.find(errorReliabilityList, " " .. s .. " ") then - mouseOver = "Higher reliability requirement than there are tracking IP addresses" - lineBreak = " " - end - if string.find(errorRouteList, " " .. s .. " ") then - mouseOver = mouseOver .. lineBreak .. "No default route in the main routing table" - lineBreak = " " - end - if string.find(errorNetConfigList, " " .. s .. " ") then - mouseOver = mouseOver .. lineBreak .. "Configured incorrectly or not at all in /etc/config/network" - lineBreak = " " - end - if string.find(errorNoMetricList, " " .. s .. " ") then - mouseOver = mouseOver .. lineBreak .. "No metric configured in /etc/config/network" - lineBreak = " " - end - if string.find(errorDuplicateMetricList, " " .. s .. " ") then - mouseOver = mouseOver .. lineBreak .. "Duplicate metric configured in /etc/config/network" - end - if mouseOver == "" then - return "" - else - return "\"error\"" - end - else - return "" - end - end - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/interfaceconfig.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/interfaceconfig.lua deleted file mode 100644 index 387ff01..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/interfaceconfig.lua +++ /dev/null @@ -1,190 +0,0 @@ --- ------ extra functions ------ -- - -function interfaceCheck() - metricValue = ut.trim(sys.exec("uci -p /var/state get network." .. arg[1] .. ".metric")) - if metricValue == "" then -- no metric - errorNoMetric = 1 - else -- if metric exists create list of interface metrics to compare against for duplicates - uci.cursor():foreach("mwan3", "interface", - function (section) - local metricValue = ut.trim(sys.exec("uci -p /var/state get network." .. section[".name"] .. ".metric")) - metricList = metricList .. section[".name"] .. " " .. metricValue .. "\n" - end - ) - -- compare metric against list - local metricDuplicateNumbers, metricDuplicates = sys.exec("echo '" .. metricList .. "' | awk '{print $2}' | uniq -d"), "" - for line in metricDuplicateNumbers:gmatch("[^\r\n]+") do - metricDuplicates = sys.exec("echo '" .. metricList .. "' | grep '" .. line .. "' | awk '{print $1}'") - errorDuplicateMetricList = errorDuplicateMetricList .. metricDuplicates - end - if sys.exec("echo '" .. errorDuplicateMetricList .. "' | grep -w " .. arg[1]) ~= "" then - errorDuplicateMetric = 1 - end - end - -- check if this interface has a higher reliability requirement than track IPs configured - local trackingNumber = tonumber(ut.trim(sys.exec("echo $(uci -p /var/state get mwan3." .. arg[1] .. ".track_ip) | wc -w"))) - if trackingNumber > 0 then - local reliabilityNumber = tonumber(ut.trim(sys.exec("uci -p /var/state get mwan3." .. arg[1] .. ".reliability"))) - if reliabilityNumber and reliabilityNumber > trackingNumber then - errorReliability = 1 - end - end - -- check if any interfaces are not properly configured in /etc/config/network or have no default route in main routing table - if ut.trim(sys.exec("uci -p /var/state get network." .. arg[1])) == "interface" then - local interfaceDevice = ut.trim(sys.exec("uci -p /var/state get network." .. arg[1] .. ".ifname")) - if interfaceDevice == "uci: Entry not found" or interfaceDevice == "" then - errorNetConfig = 1 - errorRoute = 1 - else - local routeCheck = ut.trim(sys.exec("route -n | awk '{if ($8 == \"" .. interfaceDevice .. "\" && $1 == \"0.0.0.0\" && $3 == \"0.0.0.0\") print $1}'")) - if routeCheck == "" then - errorRoute = 1 - end - end - else - errorNetConfig = 1 - errorRoute = 1 - end -end - -function interfaceWarnings() -- display warning messages at the top of the page - local warns, lineBreak = "", "" - if errorReliability == 1 then - warns = "WARNING: this interface has a higher reliability requirement than there are tracking IP addresses!" - lineBreak = "

" - end - if errorRoute == 1 then - warns = warns .. lineBreak .. "WARNING: this interface has no default route in the main routing table!" - lineBreak = "

" - end - if errorNetConfig == 1 then - warns = warns .. lineBreak .. "WARNING: this interface is configured incorrectly or not at all in /etc/config/network!" - lineBreak = "

" - end - if errorNoMetric == 1 then - warns = warns .. lineBreak .. "WARNING: this interface has no metric configured in /etc/config/network!" - elseif errorDuplicateMetric == 1 then - warns = warns .. lineBreak .. "WARNING: this and other interfaces have duplicate metrics configured in /etc/config/network!" - end - return warns -end - --- ------ interface configuration ------ -- - -dsp = require "luci.dispatcher" -sys = require "luci.sys" -ut = require "luci.util" -arg[1] = arg[1] or "" - -metricValue = "" -metricList = "" -errorDuplicateMetricList = "" -errorNoMetric = 0 -errorDuplicateMetric = 0 -errorRoute = 0 -errorNetConfig = 0 -errorReliability = 0 -interfaceCheck() - - -m5 = Map("mwan3", translate("MWAN Interface Configuration - " .. arg[1]), - translate(interfaceWarnings())) - m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "interface") - - -mwan_interface = m5:section(NamedSection, arg[1], "interface", "") - mwan_interface.addremove = false - mwan_interface.dynamic = false - - -enabled = mwan_interface:option(ListValue, "enabled", translate("Enabled")) - enabled.default = "1" - enabled:value("1", translate("Yes")) - enabled:value("0", translate("No")) - -track_ip = mwan_interface:option(DynamicList, "track_ip", translate("Tracking IP"), - translate("This IP address will be pinged to dermine if the link is up or down. Leave blank to assume interface is always online")) - track_ip.datatype = "ipaddr" - -reliability = mwan_interface:option(Value, "reliability", translate("Tracking reliability"), - translate("Acceptable values: 1-100. This many Tracking IP addresses must respond for the link to be deemed up")) - reliability.datatype = "range(1, 100)" - reliability.default = "1" - -count = mwan_interface:option(ListValue, "count", translate("Ping count")) - count.default = "1" - count:value("1") - count:value("2") - count:value("3") - count:value("4") - count:value("5") - -timeout = mwan_interface:option(ListValue, "timeout", translate("Ping timeout")) - timeout.default = "2" - timeout:value("1", translate("1 second")) - timeout:value("2", translate("2 seconds")) - timeout:value("3", translate("3 seconds")) - timeout:value("4", translate("4 seconds")) - timeout:value("5", translate("5 seconds")) - timeout:value("6", translate("6 seconds")) - timeout:value("7", translate("7 seconds")) - timeout:value("8", translate("8 seconds")) - timeout:value("9", translate("9 seconds")) - timeout:value("10", translate("10 seconds")) - -interval = mwan_interface:option(ListValue, "interval", translate("Ping interval")) - interval.default = "5" - interval:value("1", translate("1 second")) - interval:value("3", translate("3 seconds")) - interval:value("5", translate("5 seconds")) - interval:value("10", translate("10 seconds")) - interval:value("20", translate("20 seconds")) - interval:value("30", translate("30 seconds")) - interval:value("60", translate("1 minute")) - interval:value("300", translate("5 minutes")) - interval:value("600", translate("10 minutes")) - interval:value("900", translate("15 minutes")) - interval:value("1800", translate("30 minutes")) - interval:value("3600", translate("1 hour")) - -down = mwan_interface:option(ListValue, "down", translate("Interface down"), - translate("Interface will be deemed down after this many failed ping tests")) - down.default = "3" - down:value("1") - down:value("2") - down:value("3") - down:value("4") - down:value("5") - down:value("6") - down:value("7") - down:value("8") - down:value("9") - down:value("10") - -up = mwan_interface:option(ListValue, "up", translate("Interface up"), - translate("Downed interface will be deemed up after this many successful ping tests")) - up.default = "3" - up:value("1") - up:value("2") - up:value("3") - up:value("4") - up:value("5") - up:value("6") - up:value("7") - up:value("8") - up:value("9") - up:value("10") - -metric = mwan_interface:option(DummyValue, "metric", translate("Metric"), - translate("This displays the metric assigned to this interface in /etc/config/network")) - metric.rawhtml = true - function metric.cfgvalue(self, s) - if errorNoMetric == 0 then - return metricValue - else - return "—" - end - end - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/member.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/member.lua deleted file mode 100644 index 3bccbd9..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/member.lua +++ /dev/null @@ -1,46 +0,0 @@ --- ------ member configuration ------ -- - -ds = require "luci.dispatcher" - - -m5 = Map("mwan3", translate("MWAN Member Configuration")) - m5:append(Template("mwan/config_css")) - - -mwan_member = m5:section(TypedSection, "member", translate("Members"), - translate("Members are profiles attaching a metric and weight to an MWAN interface
" .. - "Names may contain characters A-Z, a-z, 0-9, _ and no spaces
" .. - "Members may not share the same name as configured interfaces, policies or rules")) - mwan_member.addremove = true - mwan_member.dynamic = false - mwan_member.sectionhead = "Member" - mwan_member.sortable = true - mwan_member.template = "cbi/tblsection" - mwan_member.extedit = ds.build_url("admin", "network", "mwan", "configuration", "member", "%s") - function mwan_member.create(self, section) - TypedSection.create(self, section) - m5.uci:save("mwan3") - luci.http.redirect(ds.build_url("admin", "network", "mwan", "configuration", "member", section)) - end - - -interface = mwan_member:option(DummyValue, "interface", translate("Interface")) - interface.rawhtml = true - function interface.cfgvalue(self, s) - return self.map:get(s, "interface") or "—" - end - -metric = mwan_member:option(DummyValue, "metric", translate("Metric")) - metric.rawhtml = true - function metric.cfgvalue(self, s) - return self.map:get(s, "metric") or "1" - end - -weight = mwan_member:option(DummyValue, "weight", translate("Weight")) - weight.rawhtml = true - function weight.cfgvalue(self, s) - return self.map:get(s, "weight") or "1" - end - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/memberconfig.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/memberconfig.lua deleted file mode 100644 index 181d22e..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/memberconfig.lua +++ /dev/null @@ -1,47 +0,0 @@ --- ------ extra functions ------ -- - -function cbi_add_interface(field) - uci.cursor():foreach("mwan3", "interface", - function (section) - field:value(section[".name"]) - end - ) -end - --- ------ member configuration ------ -- - -dsp = require "luci.dispatcher" -arg[1] = arg[1] or "" - - -m5 = Map("mwan3", translate("MWAN Member Configuration - ") .. arg[1]) - m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "member") - - -mwan_member = m5:section(NamedSection, arg[1], "member", "") - mwan_member.addremove = false - mwan_member.dynamic = false - - -interface = mwan_member:option(Value, "interface", translate("Interface")) - cbi_add_interface(interface) - -metric = mwan_member:option(Value, "metric", translate("Metric"), - translate("Acceptable values: 1-1000. Defaults to 1 if not set")) - metric.datatype = "range(1, 1000)" - -weight = mwan_member:option(Value, "weight", translate("Weight"), - translate("Acceptable values: 1-1000. Defaults to 1 if not set")) - weight.datatype = "range(1, 1000)" - - --- ------ currently configured interfaces ------ -- - -mwan_interface = m5:section(TypedSection, "interface", translate("Currently Configured Interfaces")) - mwan_interface.addremove = false - mwan_interface.dynamic = false - mwan_interface.sortable = false - mwan_interface.template = "cbi/tblsection" - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/policy.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/policy.lua deleted file mode 100644 index e141d69..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/policy.lua +++ /dev/null @@ -1,95 +0,0 @@ --- ------ extra functions ------ -- - -function policyCheck() -- check to see if any policy names exceed the maximum of 15 characters - uci.cursor():foreach("mwan3", "policy", - function (section) - if string.len(section[".name"]) > 15 then - nameTooLong = 1 - err_name_list = err_name_list .. section[".name"] .. " " - end - end - ) -end - -function policyWarn() -- display status and warning messages at the top of the page - if nameTooLong == 1 then - return "WARNING: Some policies have names exceeding the maximum of 15 characters!" - else - return "" - end -end - --- ------ policy configuration ------ -- - -ds = require "luci.dispatcher" -sys = require "luci.sys" - -nameTooLong = 0 -err_name_list = " " -policyCheck() - - -m5 = Map("mwan3", translate("MWAN Policy Configuration"), - translate(policyWarn())) - m5:append(Template("mwan/config_css")) - - -mwan_policy = m5:section(TypedSection, "policy", translate("Policies"), - translate("Policies are profiles grouping one or more members controlling how MWAN distributes traffic
" .. - "Member interfaces with lower metrics are used first. Interfaces with the same metric load-balance
" .. - "Load-balanced member interfaces distribute more traffic out those with higher weights
" .. - "Names may contain characters A-Z, a-z, 0-9, _ and no spaces. Names must be 15 characters or less
" .. - "Policies may not share the same name as configured interfaces, members or rules")) - mwan_policy.addremove = true - mwan_policy.dynamic = false - mwan_policy.sectionhead = "Policy" - mwan_policy.sortable = true - mwan_policy.template = "cbi/tblsection" - mwan_policy.extedit = ds.build_url("admin", "network", "mwan", "configuration", "policy", "%s") - function mwan_policy.create(self, section) - TypedSection.create(self, section) - m5.uci:save("mwan3") - luci.http.redirect(ds.build_url("admin", "network", "mwan", "configuration", "policy", section)) - end - - -use_member = mwan_policy:option(DummyValue, "use_member", translate("Members assigned")) - use_member.rawhtml = true - function use_member.cfgvalue(self, s) - local memberConfig, memberList = self.map:get(s, "use_member"), "" - if memberConfig then - for k,v in pairs(memberConfig) do - memberList = memberList .. v .. "
" - end - return memberList - else - return "—" - end - - end - -last_resort = mwan_policy:option(DummyValue, "last_resort", translate("Last resort")) - last_resort.rawhtml = true - function last_resort.cfgvalue(self, s) - local action = self.map:get(s, "last_resort") - if action == "blackhole" then - return "blackhole (drop)" - elseif action == "default" then - return "default (use main routing table)" - else - return "unreachable (reject)" - end - end - -errors = mwan_policy:option(DummyValue, "errors", translate("Errors")) - errors.rawhtml = true - function errors.cfgvalue(self, s) - if not string.find(err_name_list, " " .. s .. " ") then - return "" - else - return "\"error\"" - end - end - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/policyconfig.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/policyconfig.lua deleted file mode 100644 index f48a104..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/policyconfig.lua +++ /dev/null @@ -1,65 +0,0 @@ --- ------ extra functions ------ -- - -function policyCheck() -- check to see if this policy's name exceed the maximum of 15 characters - policyNameLength = string.len(arg[1]) - if policyNameLength > 15 then - nameTooLong = 1 - end -end - -function policyWarn() -- display status and warning messages at the top of the page - if nameTooLong == 1 then - return "WARNING: this policy's name is " .. policyNameLength .. " characters exceeding the maximum of 15!" - else - return "" - end -end - -function cbiAddMember(field) - uci.cursor():foreach("mwan3", "member", - function (section) - field:value(section[".name"]) - end - ) -end - --- ------ policy configuration ------ -- - -dsp = require "luci.dispatcher" -arg[1] = arg[1] or "" - -nameTooLong = 0 -policyCheck() - - -m5 = Map("mwan3", translate("MWAN Policy Configuration - " .. arg[1]), - translate(policyWarn())) - m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "policy") - - -mwan_policy = m5:section(NamedSection, arg[1], "policy", "") - mwan_policy.addremove = false - mwan_policy.dynamic = false - - -use_member = mwan_policy:option(DynamicList, "use_member", translate("Member used")) - cbiAddMember(use_member) - -last_resort = mwan_policy:option(ListValue, "last_resort", translate("Last resort"), - translate("When all policy members are offline use this behavior for matched traffic")) - last_resort.default = "unreachable" - last_resort:value("unreachable", translate("unreachable (reject)")) - last_resort:value("blackhole", translate("blackhole (drop)")) - last_resort:value("default", translate("default (use main routing table)")) - - --- ------ currently configured members ------ -- - -mwan_member = m5:section(TypedSection, "member", translate("Currently Configured Members")) - mwan_member.addremove = false - mwan_member.dynamic = false - mwan_member.sortable = false - mwan_member.template = "cbi/tblsection" - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/rule.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/rule.lua deleted file mode 100644 index a22e010..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/rule.lua +++ /dev/null @@ -1,141 +0,0 @@ --- ------ extra functions ------ -- - -function ruleCheck() -- determine if rules needs a proper protocol configured - uci.cursor():foreach("mwan3", "rule", - function (section) - local sourcePort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. section[".name"] .. ".src_port")) - local destPort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. section[".name"] .. ".dest_port")) - if sourcePort ~= "" or destPort ~= "" then -- ports configured - local protocol = ut.trim(sys.exec("uci -p /var/state get mwan3." .. section[".name"] .. ".proto")) - if protocol == "" or protocol == "all" then -- no or improper protocol - error_protocol_list = error_protocol_list .. section[".name"] .. " " - end - end - end - ) -end - -function ruleWarn() -- display warning messages at the top of the page - if error_protocol_list ~= " " then - return "WARNING: some rules have a port configured with no or improper protocol specified! Please configure a specific protocol!" - else - return "" - end -end - --- ------ rule configuration ------ -- - -dsp = require "luci.dispatcher" -sys = require "luci.sys" -ut = require "luci.util" - -error_protocol_list = " " -ruleCheck() - - -m5 = Map("mwan3", translate("MWAN Rule Configuration"), - translate(ruleWarn())) - m5:append(Template("mwan/config_css")) - - -mwan_rule = m5:section(TypedSection, "rule", translate("Traffic Rules"), - translate("Rules specify which traffic will use a particular MWAN policy based on IP address, port or protocol
" .. - "Rules are matched from top to bottom. Rules below a matching rule are ignored. Traffic not matching any rule is routed using the main routing table
" .. - "Traffic destined for known (other than default) networks is handled by the main routing table. Traffic matching a rule, but all WAN interfaces for that policy are down will be blackholed
" .. - "Names may contain characters A-Z, a-z, 0-9, _ and no spaces
" .. - "Rules may not share the same name as configured interfaces, members or policies")) - mwan_rule.addremove = true - mwan_rule.anonymous = false - mwan_rule.dynamic = false - mwan_rule.sectionhead = "Rule" - mwan_rule.sortable = true - mwan_rule.template = "cbi/tblsection" - mwan_rule.extedit = dsp.build_url("admin", "network", "mwan", "configuration", "rule", "%s") - function mwan_rule.create(self, section) - TypedSection.create(self, section) - m5.uci:save("mwan3") - luci.http.redirect(dsp.build_url("admin", "network", "mwan", "configuration", "rule", section)) - end - - -src_ip = mwan_rule:option(DummyValue, "src_ip", translate("Source address")) - src_ip.rawhtml = true - function src_ip.cfgvalue(self, s) - return self.map:get(s, "src_ip") or "—" - end - -src_port = mwan_rule:option(DummyValue, "src_port", translate("Source port")) - src_port.rawhtml = true - function src_port.cfgvalue(self, s) - return self.map:get(s, "src_port") or "—" - end - -dest_ip = mwan_rule:option(DummyValue, "dest_ip", translate("Destination address")) - dest_ip.rawhtml = true - function dest_ip.cfgvalue(self, s) - return self.map:get(s, "dest_ip") or "—" - end - -dest_port = mwan_rule:option(DummyValue, "dest_port", translate("Destination port")) - dest_port.rawhtml = true - function dest_port.cfgvalue(self, s) - return self.map:get(s, "dest_port") or "—" - end - -proto = mwan_rule:option(DummyValue, "proto", translate("Protocol")) - proto.rawhtml = true - function proto.cfgvalue(self, s) - return self.map:get(s, "proto") or "all" - end - -sticky = mwan_rule:option(DummyValue, "sticky", translate("Sticky")) - sticky.rawhtml = true - function sticky.cfgvalue(self, s) - if self.map:get(s, "sticky") == "1" then - stickied = 1 - return "Yes" - else - stickied = nil - return "No" - end - end - -timeout = mwan_rule:option(DummyValue, "timeout", translate("Sticky timeout")) - timeout.rawhtml = true - function timeout.cfgvalue(self, s) - if stickied then - local timeoutValue = self.map:get(s, "timeout") - if timeoutValue then - return timeoutValue .. "s" - else - return "600s" - end - else - return "—" - end - end - -ipset = mwan_rule:option(DummyValue, "ipset", translate("IPset")) - ipset.rawhtml = true - function ipset.cfgvalue(self, s) - return self.map:get(s, "ipset") or "—" - end - -use_policy = mwan_rule:option(DummyValue, "use_policy", translate("Policy assigned")) - use_policy.rawhtml = true - function use_policy.cfgvalue(self, s) - return self.map:get(s, "use_policy") or "—" - end - -errors = mwan_rule:option(DummyValue, "errors", translate("Errors")) - errors.rawhtml = true - function errors.cfgvalue(self, s) - if not string.find(error_protocol_list, " " .. s .. " ") then - return "" - else - return "\"error\"" - end - end - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/ruleconfig.lua b/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/ruleconfig.lua deleted file mode 100644 index f7fb341..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/model/cbi/mwan/ruleconfig.lua +++ /dev/null @@ -1,113 +0,0 @@ --- ------ extra functions ------ -- - -function ruleCheck() -- determine if rule needs a protocol specified - local sourcePort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. arg[1] .. ".src_port")) - local destPort = ut.trim(sys.exec("uci -p /var/state get mwan3." .. arg[1] .. ".dest_port")) - if sourcePort ~= "" or destPort ~= "" then -- ports configured - local protocol = ut.trim(sys.exec("uci -p /var/state get mwan3." .. arg[1] .. ".proto")) - if protocol == "" or protocol == "all" then -- no or improper protocol - error_protocol = 1 - end - end -end - -function ruleWarn() -- display warning message at the top of the page - if error_protocol == 1 then - return "WARNING: this rule is incorrectly configured with no or improper protocol specified! Please configure a specific protocol!" - else - return "" - end -end - -function cbiAddPolicy(field) - uci.cursor():foreach("mwan3", "policy", - function (section) - field:value(section[".name"]) - end - ) -end - -function cbiAddProtocol(field) - local protocols = ut.trim(sys.exec("cat /etc/protocols | grep ' # ' | awk '{print $1}' | grep -vw -e 'ip' -e 'tcp' -e 'udp' -e 'icmp' -e 'esp' | grep -v 'ipv6' | sort | tr '\n' ' '")) - for p in string.gmatch(protocols, "%S+") do - field:value(p) - end -end - --- ------ rule configuration ------ -- - -dsp = require "luci.dispatcher" -sys = require "luci.sys" -ut = require "luci.util" -arg[1] = arg[1] or "" - -error_protocol = 0 -ruleCheck() - - -m5 = Map("mwan3", translate("MWAN Rule Configuration - ") .. arg[1], - translate(ruleWarn())) - m5.redirect = dsp.build_url("admin", "network", "mwan", "configuration", "rule") - - -mwan_rule = m5:section(NamedSection, arg[1], "rule", "") - mwan_rule.addremove = false - mwan_rule.dynamic = false - - -src_ip = mwan_rule:option(Value, "src_ip", translate("Source address"), - translate("Supports CIDR notation (eg \"192.168.100.0/24\") without quotes")) - src_ip.datatype = ipaddr - -src_port = mwan_rule:option(Value, "src_port", translate("Source port"), - translate("May be entered as a single or multiple port(s) (eg \"22\" or \"80,443\") or as a portrange (eg \"1024:2048\") without quotes")) - -dest_ip = mwan_rule:option(Value, "dest_ip", translate("Destination address"), - translate("Supports CIDR notation (eg \"192.168.100.0/24\") without quotes")) - dest_ip.datatype = ipaddr - -dest_port = mwan_rule:option(Value, "dest_port", translate("Destination port"), - translate("May be entered as a single or multiple port(s) (eg \"22\" or \"80,443\") or as a portrange (eg \"1024:2048\") without quotes")) - -proto = mwan_rule:option(Value, "proto", translate("Protocol"), - translate("View the contents of /etc/protocols for protocol descriptions")) - proto.default = "all" - proto.rmempty = false - proto:value("all") - proto:value("ip") - proto:value("tcp") - proto:value("udp") - proto:value("icmp") - proto:value("esp") - cbiAddProtocol(proto) - -sticky = mwan_rule:option(ListValue, "sticky", translate("Sticky"), - translate("Traffic from the same source IP address that previously matched this rule within the sticky timeout period will use the same WAN interface")) - sticky.default = "0" - sticky:value("1", translate("Yes")) - sticky:value("0", translate("No")) - -timeout = mwan_rule:option(Value, "timeout", translate("Sticky timeout"), - translate("Seconds. Acceptable values: 1-1000000. Defaults to 600 if not set")) - timeout.datatype = "range(1, 1000000)" - -ipset = mwan_rule:option(Value, "ipset", translate("IPset"), - translate("Name of IPset rule. Requires IPset rule in /etc/dnsmasq.conf (eg \"ipset=/youtube.com/youtube\")")) - -use_policy = mwan_rule:option(Value, "use_policy", translate("Policy assigned")) - cbiAddPolicy(use_policy) - use_policy:value("unreachable", translate("unreachable (reject)")) - use_policy:value("blackhole", translate("blackhole (drop)")) - use_policy:value("default", translate("default (use main routing table)")) - - --- ------ currently configured policies ------ -- - -mwan_policy = m5:section(TypedSection, "policy", translate("Currently Configured Policies")) - mwan_policy.addremove = false - mwan_policy.dynamic = false - mwan_policy.sortable = false - mwan_policy.template = "cbi/tblsection" - - -return m5 diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/admin_status/index/mwan.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/admin_status/index/mwan.htm deleted file mode 100644 index 53b997a..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/admin_status/index/mwan.htm +++ /dev/null @@ -1 +0,0 @@ -<%+mwan/openwrt_overview_status%> diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_diagnostics.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_diagnostics.htm deleted file mode 100644 index 14d404b..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_diagnostics.htm +++ /dev/null @@ -1,129 +0,0 @@ -<%+header%> - - - -<% - local uci = require "luci.model.uci" - - interfaceNames = "" - uci.cursor():foreach("mwan3", "interface", - function (section) - interfaceNames = interfaceNames .. section[".name"] .. " " - end - ) -%> - - - - -
-
- <%:MWAN Interface Diagnostics%> - -
- - - - - - -
-
-
- <%:MWAN Service Control%> -
- - - -
-
- -
- - - -<%+footer%> diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_hotplugscript.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_hotplugscript.htm deleted file mode 100644 index 4c2a0dc..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_hotplugscript.htm +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_mwanconfig.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_mwanconfig.htm deleted file mode 100644 index fba3fa6..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_mwanconfig.htm +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_networkconfig.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_networkconfig.htm deleted file mode 100644 index cf90112..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_networkconfig.htm +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_troubleshooting.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_troubleshooting.htm deleted file mode 100644 index 0a12496..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_troubleshooting.htm +++ /dev/null @@ -1,74 +0,0 @@ -<%+header%> - - - - - - -
-
- <%:Troubleshooting Data%> -
<%:Loading%> Collecting data...
-
-
- - - -<%+footer%> diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_wirelessconfig.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_wirelessconfig.htm deleted file mode 100644 index 5077674..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/advanced_wirelessconfig.htm +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/config_css.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/config_css.htm deleted file mode 100644 index 99da487..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/config_css.htm +++ /dev/null @@ -1,34 +0,0 @@ - diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/openwrt_overview_status.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/openwrt_overview_status.htm deleted file mode 100644 index 9329b92..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/openwrt_overview_status.htm +++ /dev/null @@ -1,83 +0,0 @@ - - -
- <%:MWAN Interface Live Status%> -
<%:Loading%> Collecting data...
-
- - diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/overview_detailed.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/overview_detailed.htm deleted file mode 100644 index b80b9f3..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/overview_detailed.htm +++ /dev/null @@ -1,51 +0,0 @@ -<%+header%> - - - - - - -
-
- <%:MWAN Detailed Status%> -
<%:Loading%> Collecting data...
-
-
- - - -<%+footer%> diff --git a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/overview_interface.htm b/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/overview_interface.htm deleted file mode 100644 index 472c7ce..0000000 --- a/net/mwan3-luci/files/usr/lib/lua/luci/view/mwan/overview_interface.htm +++ /dev/null @@ -1,122 +0,0 @@ -<%+header%> - - - - - - -
-
- <%:MWAN Interface Live Status%> -
<%:Loading%> Collecting data...
-
-
- <%:MWAN Interface Systemlog%> -
<%:Loading%> Collecting data...
-
-
- - - -<%+footer%> diff --git a/net/mwan3/Makefile b/net/mwan3/Makefile deleted file mode 100644 index 394a642..0000000 --- a/net/mwan3/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mwan3 -PKG_VERSION:=2.5.2 -PKG_RELEASE:=5 -PKG_MAINTAINER:=Florian Eckert -PKG_LICENSE:=GPLv2 - -include $(INCLUDE_DIR)/package.mk - -define Package/mwan3 - SECTION:=net - CATEGORY:=Network - SUBMENU:=Routing and Redirection - DEPENDS:=+ip +ipset +iptables +iptables-mod-conntrack-extra +iptables-mod-ipopt - TITLE:=Multiwan hotplug script with connection tracking support - MAINTAINER:=Florian Eckert - PKGARCH:=all -endef - -define Package/mwan3/description -Hotplug script which makes configuration of multiple WAN interfaces simple -and manageable. With loadbalancing/failover support for up to 250 wan -interfaces, connection tracking and an easy to manage traffic ruleset. -endef - -define Package/mwan3/conffiles -/etc/config/mwan3 -/etc/mwan3.user -endef - -define Build/Compile -endef - -define Package/mwan3/install -$(CP) ./files/* $(1) -endef - -$(eval $(call BuildPackage,mwan3)) diff --git a/net/mwan3/files/etc/config/mwan3 b/net/mwan3/files/etc/config/mwan3 deleted file mode 100644 index 0ebe38d..0000000 --- a/net/mwan3/files/etc/config/mwan3 +++ /dev/null @@ -1,73 +0,0 @@ - -config interface 'wan' - option enabled '1' - list track_ip '8.8.4.4' - list track_ip '8.8.8.8' - list track_ip '208.67.222.222' - list track_ip '208.67.220.220' - option reliability '2' - option count '1' - option timeout '2' - option interval '5' - option down '3' - option up '8' - -config interface 'wan2' - option enabled '0' - list track_ip '8.8.8.8' - list track_ip '208.67.220.220' - option reliability '1' - option count '1' - option timeout '2' - option interval '5' - option down '3' - option up '8' - -config member 'wan_m1_w3' - option interface 'wan' - option metric '1' - option weight '3' - -config member 'wan_m2_w3' - option interface 'wan' - option metric '2' - option weight '3' - -config member 'wan2_m1_w2' - option interface 'wan2' - option metric '1' - option weight '2' - -config member 'wan2_m2_w2' - option interface 'wan2' - option metric '2' - option weight '2' - -config policy 'wan_only' - list use_member 'wan_m1_w3' - -config policy 'wan2_only' - list use_member 'wan2_m1_w2' - -config policy 'balanced' - list use_member 'wan_m1_w3' - list use_member 'wan2_m1_w2' - -config policy 'wan_wan2' - list use_member 'wan_m1_w3' - list use_member 'wan2_m2_w2' - -config policy 'wan2_wan' - list use_member 'wan_m2_w3' - list use_member 'wan2_m1_w2' - -config rule 'https' - option sticky '1' - option dest_port '443' - option proto 'tcp' - option use_policy 'balanced' - -config rule 'default_rule' - option dest_ip '0.0.0.0/0' - option use_policy 'balanced' - diff --git a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 deleted file mode 100644 index e3fd16c..0000000 --- a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh -. /lib/functions/network.sh -. /lib/mwan3/mwan3.sh - -[ "$ACTION" == "ifup" -o "$ACTION" == "ifdown" ] || exit 1 -[ -n "$INTERFACE" ] || exit 2 - -if [ "$ACTION" == "ifup" ]; then - [ -n "$DEVICE" ] || exit 3 -fi - -mwan3_set_connected_iptables - -config_load mwan3 -config_get enabled $INTERFACE enabled 0 -[ "$enabled" == "1" ] || exit 0 - -if [ "$ACTION" == "ifup" ]; then - config_get family $INTERFACE family ipv4 - if [ "$family" = "ipv4" ]; then - ubus call network.interface.${INTERFACE}_4 status &>/dev/null - if [ "$?" -eq "0" ]; then - network_get_gateway gateway ${INTERFACE}_4 - else - network_get_gateway gateway $INTERFACE - fi - elif [ "$family" = "ipv6" ]; then - ubus call network.interface.${INTERFACE}_6 status &>/dev/null - if [ "$?" -eq "0" ]; then - network_get_gateway6 gateway ${INTERFACE}_6 - else - network_get_gateway6 gateway ${INTERFACE} - fi - fi - - [ -n "$gateway" ] || exit 9 -fi - -$LOG notice "$ACTION interface $INTERFACE (${DEVICE:-unknown})" - -case "$ACTION" in - ifup) - mwan3_set_general_rules - mwan3_set_general_iptables - mwan3_create_iface_rules $INTERFACE $DEVICE - mwan3_create_iface_iptables $INTERFACE $DEVICE - mwan3_create_iface_route $INTERFACE $DEVICE - mwan3_track $INTERFACE $DEVICE - mwan3_set_policies_iptables - mwan3_set_user_rules - mwan3_flush_conntrack $INTERFACE $DEVICE "ifup" - ;; - ifdown) - mwan3_delete_iface_rules $INTERFACE - mwan3_delete_iface_iptables $INTERFACE - mwan3_delete_iface_route $INTERFACE - mwan3_delete_iface_ipset_entries $INTERFACE - mwan3_track_signal $INTERFACE $DEVICE - mwan3_set_policies_iptables - mwan3_set_user_rules - mwan3_flush_conntrack $INTERFACE $DEVICE "ifdown" - ;; -esac - -exit 0 diff --git a/net/mwan3/files/etc/hotplug.d/iface/16-mwan3-user b/net/mwan3/files/etc/hotplug.d/iface/16-mwan3-user deleted file mode 100644 index 485f8de..0000000 --- a/net/mwan3/files/etc/hotplug.d/iface/16-mwan3-user +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -[ -f "/etc/mwan3.user" ] && { - . /lib/functions.sh - - config_load mwan3 - config_get enabled "$INTERFACE" enabled 0 - [ "${enabled}" = "1" ] || exit 0 - env -i ACTION="$ACTION" INTERFACE="$INTERFACE" DEVICE="$DEVICE" \ - /bin/sh /etc/mwan3.user -} - -exit 0 diff --git a/net/mwan3/files/etc/mwan3.user b/net/mwan3/files/etc/mwan3.user deleted file mode 100644 index 3c1f9fb..0000000 --- a/net/mwan3/files/etc/mwan3.user +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# -# This file is interpreted as shell script. -# Put your custom mwan3 action here, they will -# be executed with each netifd hotplug interface event -# on interfaces for which mwan3 is enabled. -# -# There are three main environment variables that are passed to this script. -# -# $ACTION Either "ifup" or "ifdown" -# $INTERFACE Name of the interface which went up or down (e.g. "wan" or "wwan") -# $DEVICE Physical device name which interface went up or down (e.g. "eth0" or "wwan0") diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh deleted file mode 100644 index 3798d7e..0000000 --- a/net/mwan3/files/lib/mwan3/mwan3.sh +++ /dev/null @@ -1,862 +0,0 @@ -#!/bin/sh - -IP4="ip -4" -IP6="ip -6" -IPS="ipset" -IPT4="iptables -t mangle -w" -IPT6="ip6tables -t mangle -w" -LOG="logger -t mwan3 -p" -CONNTRACK_FILE="/proc/net/nf_conntrack" - -mwan3_get_iface_id() -{ - local _tmp _iface _iface_count - - _iface="$2" - - mwan3_get_id() - { - let _iface_count++ - [ "$1" == "$_iface" ] && _tmp=$_iface_count - } - config_foreach mwan3_get_id interface - export "$1=$_tmp" -} - -mwan3_set_connected_iptables() -{ - local connected_network_v4 connected_network_v6 - - $IPS -! create mwan3_connected_v4 hash:net - $IPS create mwan3_connected_v4_temp hash:net - - for connected_network_v4 in $($IP4 route | awk '{print $1}' | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}'); do - $IPS -! add mwan3_connected_v4_temp $connected_network_v4 - done - - for connected_network_v4 in $($IP4 route list table 0 | awk '{print $2}' | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}'); do - $IPS -! add mwan3_connected_v4_temp $connected_network_v4 - done - - $IPS add mwan3_connected_v4_temp 224.0.0.0/3 - - $IPS swap mwan3_connected_v4_temp mwan3_connected_v4 - $IPS destroy mwan3_connected_v4_temp - - $IPS -! create mwan3_connected_v6 hash:net family inet6 - $IPS create mwan3_connected_v6_temp hash:net family inet6 - - for connected_network_v6 in $($IP6 route | awk '{print $1}' | egrep '([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])'); do - $IPS -! add mwan3_connected_v6_temp $connected_network_v6 - done - - $IPS swap mwan3_connected_v6_temp mwan3_connected_v6 - $IPS destroy mwan3_connected_v6_temp - - $IPS -! create mwan3_connected list:set - $IPS -! add mwan3_connected mwan3_connected_v4 - $IPS -! add mwan3_connected mwan3_connected_v6 -} - -mwan3_set_general_rules() -{ - local IP - - for IP in "$IP4" "$IP6"; do - - if [ -z "$($IP rule list | awk '$1 == "2253:"')" ]; then - $IP rule add pref 2253 fwmark 0xfd00/0xff00 blackhole - fi - - if [ -z "$($IP rule list | awk '$1 == "2254:"')" ]; then - $IP rule add pref 2254 fwmark 0xfe00/0xff00 unreachable - fi - done -} - -mwan3_set_general_iptables() -{ - local IPT - - for IPT in "$IPT4" "$IPT6"; do - - if ! $IPT -S mwan3_ifaces_in &> /dev/null; then - $IPT -N mwan3_ifaces_in - fi - - if ! $IPT -S mwan3_connected &> /dev/null; then - $IPT -N mwan3_connected - $IPS -! create mwan3_connected list:set - $IPT -A mwan3_connected -m set --match-set mwan3_connected dst -j MARK --set-xmark 0xff00/0xff00 - fi - - if ! $IPT -S mwan3_ifaces_out &> /dev/null; then - $IPT -N mwan3_ifaces_out - fi - - if ! $IPT -S mwan3_rules &> /dev/null; then - $IPT -N mwan3_rules - fi - - if ! $IPT -S mwan3_hook &> /dev/null; then - $IPT -N mwan3_hook - $IPT -A mwan3_hook -j CONNMARK --restore-mark --nfmask 0xff00 --ctmask 0xff00 - $IPT -A mwan3_hook -m mark --mark 0x0/0xff00 -j mwan3_ifaces_in - $IPT -A mwan3_hook -m mark --mark 0x0/0xff00 -j mwan3_connected - $IPT -A mwan3_hook -m mark --mark 0x0/0xff00 -j mwan3_ifaces_out - $IPT -A mwan3_hook -m mark --mark 0x0/0xff00 -j mwan3_rules - $IPT -A mwan3_hook -j CONNMARK --save-mark --nfmask 0xff00 --ctmask 0xff00 - $IPT -A mwan3_hook -m mark ! --mark 0xff00/0xff00 -j mwan3_connected - fi - - if ! $IPT -S PREROUTING | grep mwan3_hook &> /dev/null; then - $IPT -A PREROUTING -j mwan3_hook - fi - - if ! $IPT -S OUTPUT | grep mwan3_hook &> /dev/null; then - $IPT -A OUTPUT -j mwan3_hook - fi - done -} - -mwan3_create_iface_iptables() -{ - local id family src_ip src_ipv6 - - config_get family $1 family ipv4 - mwan3_get_iface_id id $1 - - [ -n "$id" ] || return 0 - - if [ "$family" == "ipv4" ]; then - - ubus call network.interface.${1}_4 status &>/dev/null - if [ "$?" -eq "0" ]; then - network_get_ipaddr src_ip ${1}_4 - else - network_get_ipaddr src_ip $1 - fi - - $IPS -! create mwan3_connected list:set - - if ! $IPT4 -S mwan3_ifaces_in &> /dev/null; then - $IPT4 -N mwan3_ifaces_in - fi - - if ! $IPT4 -S mwan3_ifaces_out &> /dev/null; then - $IPT4 -N mwan3_ifaces_out - fi - - if ! $IPT4 -S mwan3_iface_in_$1 &> /dev/null; then - $IPT4 -N mwan3_iface_in_$1 - fi - - if ! $IPT4 -S mwan3_iface_out_$1 &> /dev/null; then - $IPT4 -N mwan3_iface_out_$1 - fi - - $IPT4 -F mwan3_iface_in_$1 - $IPT4 -A mwan3_iface_in_$1 -i $2 -m set --match-set mwan3_connected src -m mark --mark 0x0/0xff00 -m comment --comment "default" -j MARK --set-xmark 0xff00/0xff00 - $IPT4 -A mwan3_iface_in_$1 -i $2 -m mark --mark 0x0/0xff00 -m comment --comment "$1" -j MARK --set-xmark $(($id*256))/0xff00 - - $IPT4 -D mwan3_ifaces_in -m mark --mark 0x0/0xff00 -j mwan3_iface_in_$1 &> /dev/null - $IPT4 -A mwan3_ifaces_in -m mark --mark 0x0/0xff00 -j mwan3_iface_in_$1 - - $IPT4 -F mwan3_iface_out_$1 - $IPT4 -A mwan3_iface_out_$1 -s $src_ip -m mark --mark 0x0/0xff00 -m comment --comment "$1" -j MARK --set-xmark $(($id*256))/0xff00 - - $IPT4 -D mwan3_ifaces_out -m mark --mark 0x0/0xff00 -j mwan3_iface_out_$1 &> /dev/null - $IPT4 -A mwan3_ifaces_out -m mark --mark 0x0/0xff00 -j mwan3_iface_out_$1 - fi - - if [ "$family" == "ipv6" ]; then - - ubus call network.interface.${1}_6 status &>/dev/null - if [ "$?" -eq "0" ]; then - network_get_ipaddr6 src_ipv6 ${1}_6 - else - network_get_ipaddr6 src_ipv6 $1 - fi - - $IPS -! create mwan3_connected_v6 hash:net family inet6 - - if ! $IPT6 -S mwan3_ifaces_in &> /dev/null; then - $IPT6 -N mwan3_ifaces_in - fi - - if ! $IPT6 -S mwan3_ifaces_out &> /dev/null; then - $IPT6 -N mwan3_ifaces_out - fi - - if ! $IPT6 -S mwan3_iface_in_$1 &> /dev/null; then - $IPT6 -N mwan3_iface_in_$1 - fi - - if ! $IPT6 -S mwan3_iface_out_$1 &> /dev/null; then - $IPT6 -N mwan3_iface_out_$1 - fi - - $IPT6 -F mwan3_iface_in_$1 - $IPT6 -A mwan3_iface_in_$1 -i $2 -m set --match-set mwan3_connected_v6 src -m mark --mark 0x0/0xff00 -m comment --comment "default" -j MARK --set-xmark 0xff00/0xff00 - $IPT6 -A mwan3_iface_in_$1 -i $2 -m mark --mark 0x0/0xff00 -m comment --comment "$1" -j MARK --set-xmark $(($id*256))/0xff00 - - $IPT6 -D mwan3_ifaces_in -m mark --mark 0x0/0xff00 -j mwan3_iface_in_$1 &> /dev/null - $IPT6 -A mwan3_ifaces_in -m mark --mark 0x0/0xff00 -j mwan3_iface_in_$1 - - $IPT6 -F mwan3_iface_out_$1 - $IPT6 -A mwan3_iface_out_$1 -s $src_ipv6 -m mark --mark 0x0/0xff00 -m comment --comment "$1" -j MARK --set-xmark $(($id*256))/0xff00 - - $IPT6 -D mwan3_ifaces_out -m mark --mark 0x0/0xff00 -j mwan3_iface_out_$1 &> /dev/null - $IPT6 -A mwan3_ifaces_out -m mark --mark 0x0/0xff00 -j mwan3_iface_out_$1 - fi -} - -mwan3_delete_iface_iptables() -{ - config_get family $1 family ipv4 - - if [ "$family" == "ipv4" ]; then - - $IPT4 -D mwan3_ifaces_in -m mark --mark 0x0/0xff00 -j mwan3_iface_in_$1 &> /dev/null - $IPT4 -F mwan3_iface_in_$1 &> /dev/null - $IPT4 -X mwan3_iface_in_$1 &> /dev/null - - $IPT4 -D mwan3_ifaces_out -m mark --mark 0x0/0xff00 -j mwan3_iface_out_$1 &> /dev/null - $IPT4 -F mwan3_iface_out_$1 &> /dev/null - $IPT4 -X mwan3_iface_out_$1 &> /dev/null - fi - - if [ "$family" == "ipv6" ]; then - - $IPT6 -D mwan3_ifaces_in -m mark --mark 0x0/0xff00 -j mwan3_iface_in_$1 &> /dev/null - $IPT6 -F mwan3_iface_in_$1 &> /dev/null - $IPT6 -X mwan3_iface_in_$1 &> /dev/null - - $IPT6 -D mwan3_ifaces_out -m mark --mark 0x0/0xff00 -j mwan3_iface_out_$1 &> /dev/null - $IPT6 -F mwan3_iface_out_$1 &> /dev/null - $IPT6 -X mwan3_iface_out_$1 &> /dev/null - fi -} - -mwan3_create_iface_route() -{ - local id route_args - - config_get family $1 family ipv4 - mwan3_get_iface_id id $1 - - [ -n "$id" ] || return 0 - - if [ "$family" == "ipv4" ]; then - ubus call network.interface.${1}_4 status &>/dev/null - if [ "$?" -eq "0" ]; then - network_get_gateway route_args ${1}_4 - else - network_get_gateway route_args $1 - fi - - route_args="via $route_args dev $2" - - $IP4 route flush table $id - $IP4 route add table $id default $route_args - fi - - if [ "$family" == "ipv6" ]; then - - ubus call network.interface.${1}_6 status &>/dev/null - if [ "$?" -eq "0" ]; then - network_get_gateway6 route_args ${1}_6 - else - network_get_gateway6 route_args $1 - fi - - route_args="via $route_args dev $2" - - $IP6 route flush table $id - $IP6 route add table $id default $route_args - fi -} - -mwan3_delete_iface_route() -{ - local id - - config_get family $1 family ipv4 - mwan3_get_iface_id id $1 - - [ -n "$id" ] || return 0 - - if [ "$family" == "ipv4" ]; then - $IP4 route flush table $id - fi - - if [ "$family" == "ipv6" ]; then - $IP6 route flush table $id - fi -} - -mwan3_create_iface_rules() -{ - local id family - - config_get family $1 family ipv4 - mwan3_get_iface_id id $1 - - [ -n "$id" ] || return 0 - - if [ "$family" == "ipv4" ]; then - - while [ -n "$($IP4 rule list | awk '$1 == "'$(($id+1000)):'"')" ]; do - $IP4 rule del pref $(($id+1000)) - done - - while [ -n "$($IP4 rule list | awk '$1 == "'$(($id+2000)):'"')" ]; do - $IP4 rule del pref $(($id+2000)) - done - - $IP4 rule add pref $(($id+1000)) iif $2 lookup main - $IP4 rule add pref $(($id+2000)) fwmark $(($id*256))/0xff00 lookup $id - fi - - if [ "$family" == "ipv6" ]; then - - while [ -n "$($IP6 rule list | awk '$1 == "'$(($id+1000)):'"')" ]; do - $IP6 rule del pref $(($id+1000)) - done - - while [ -n "$($IP6 rule list | awk '$1 == "'$(($id+2000)):'"')" ]; do - $IP6 rule del pref $(($id+2000)) - done - - $IP6 rule add pref $(($id+1000)) iif $2 lookup main - $IP6 rule add pref $(($id+2000)) fwmark $(($id*256))/0xff00 lookup $id - fi -} - -mwan3_delete_iface_rules() -{ - local id family - - config_get family $1 family ipv4 - mwan3_get_iface_id id $1 - - [ -n "$id" ] || return 0 - - if [ "$family" == "ipv4" ]; then - - while [ -n "$($IP4 rule list | awk '$1 == "'$(($id+1000)):'"')" ]; do - $IP4 rule del pref $(($id+1000)) - done - - while [ -n "$($IP4 rule list | awk '$1 == "'$(($id+2000)):'"')" ]; do - $IP4 rule del pref $(($id+2000)) - done - fi - - if [ "$family" == "ipv6" ]; then - - while [ -n "$($IP6 rule list | awk '$1 == "'$(($id+1000)):'"')" ]; do - $IP6 rule del pref $(($id+1000)) - done - - while [ -n "$($IP6 rule list | awk '$1 == "'$(($id+2000)):'"')" ]; do - $IP6 rule del pref $(($id+2000)) - done - fi -} - -mwan3_delete_iface_ipset_entries() -{ - local id setname entry - - mwan3_get_iface_id id $1 - - [ -n "$id" ] || return 0 - - for setname in $(ipset -n list | grep ^mwan3_sticky_); do - for entry in $(ipset list $setname | grep "$(echo $(($id*256)) | awk '{ printf "0x%08x", $1; }')" | cut -d ' ' -f 1); do - $IPS del $setname $entry - done - done -} - -mwan3_track() -{ - local track_ip track_ips - - mwan3_list_track_ips() - { - track_ips="$1 $track_ips" - } - config_list_foreach $1 track_ip mwan3_list_track_ips - - kill $(pgrep -f "mwan3track $1") &> /dev/null - if [ -n "$track_ips" ]; then - [ -x /usr/sbin/mwan3track ] && /usr/sbin/mwan3track $1 $2 $track_ips & - fi -} - -mwan3_track_signal() -{ - local pid - - pid="$(pgrep -f "mwan3track $1")" - if [ "${pid}" != "" ]; then - kill -USR1 "${pid}" - else - $LOG warn "Unable to send signal USR1 to mwan3track on interface $1 with pid ${pid}" - fi -} - -mwan3_set_policy() -{ - local iface_count id iface family metric probability weight - - config_get iface $1 interface - config_get metric $1 metric 1 - config_get weight $1 weight 1 - - [ -n "$iface" ] || return 0 - - mwan3_get_iface_id id $iface - - [ -n "$id" ] || return 0 - - config_get family $iface family ipv4 - - if [ "$family" == "ipv4" ]; then - - if [ -n "$($IP4 route list table $id)" ]; then - if [ "$metric" -lt "$lowest_metric_v4" ]; then - - total_weight_v4=$weight - $IPT4 -F mwan3_policy_$policy - $IPT4 -A mwan3_policy_$policy -m mark --mark 0x0/0xff00 -m comment --comment "$iface $weight $weight" -j MARK --set-xmark $(($id*256))/0xff00 - - lowest_metric_v4=$metric - - elif [ "$metric" -eq "$lowest_metric_v4" ]; then - - total_weight_v4=$(($total_weight_v4+$weight)) - probability=$(($weight*1000/$total_weight_v4)) - - if [ "$probability" -lt 10 ]; then - probability="0.00$probability" - elif [ $probability -lt 100 ]; then - probability="0.0$probability" - elif [ $probability -lt 1000 ]; then - probability="0.$probability" - else - probability="1" - fi - - probability="-m statistic --mode random --probability $probability" - - $IPT4 -I mwan3_policy_$policy -m mark --mark 0x0/0xff00 $probability -m comment --comment "$iface $weight $total_weight_v4" -j MARK --set-xmark $(($id*256))/0xff00 - fi - fi - fi - - if [ "$family" == "ipv6" ]; then - - if [ -n "$($IP6 route list table $id)" ]; then - if [ "$metric" -lt "$lowest_metric_v6" ]; then - - total_weight_v6=$weight - $IPT6 -F mwan3_policy_$policy - $IPT6 -A mwan3_policy_$policy -m mark --mark 0x0/0xff00 -m comment --comment "$iface $weight $weight" -j MARK --set-xmark $(($id*256))/0xff00 - - lowest_metric_v6=$metric - - elif [ "$metric" -eq "$lowest_metric_v6" ]; then - - total_weight_v6=$(($total_weight_v6+$weight)) - probability=$(($weight*1000/$total_weight_v6)) - - if [ "$probability" -lt 10 ]; then - probability="0.00$probability" - elif [ $probability -lt 100 ]; then - probability="0.0$probability" - elif [ $probability -lt 1000 ]; then - probability="0.$probability" - else - probability="1" - fi - - probability="-m statistic --mode random --probability $probability" - - $IPT6 -I mwan3_policy_$policy -m mark --mark 0x0/0xff00 $probability -m comment --comment "$iface $weight $total_weight_v6" -j MARK --set-xmark $(($id*256))/0xff00 - fi - fi - fi -} - -mwan3_create_policies_iptables() -{ - local last_resort lowest_metric_v4 lowest_metric_v6 total_weight_v4 total_weight_v6 policy IPT - - policy="$1" - - config_get last_resort $1 last_resort unreachable - - if [ "$1" != $(echo "$1" | cut -c1-15) ]; then - $LOG warn "Policy $1 exceeds max of 15 chars. Not setting policy" && return 0 - fi - - for IPT in "$IPT4" "$IPT6"; do - - if ! $IPT -S mwan3_policy_$1 &> /dev/null; then - $IPT -N mwan3_policy_$1 - fi - - $IPT -F mwan3_policy_$1 - - case "$last_resort" in - blackhole) - $IPT -A mwan3_policy_$1 -m mark --mark 0x0/0xff00 -m comment --comment "blackhole" -j MARK --set-xmark 0xfd00/0xff00 - ;; - default) - $IPT -A mwan3_policy_$1 -m mark --mark 0x0/0xff00 -m comment --comment "default" -j MARK --set-xmark 0xff00/0xff00 - ;; - *) - $IPT -A mwan3_policy_$1 -m mark --mark 0x0/0xff00 -m comment --comment "unreachable" -j MARK --set-xmark 0xfe00/0xff00 - ;; - esac - done - - lowest_metric_v4=256 - total_weight_v4=0 - - lowest_metric_v6=256 - total_weight_v6=0 - - config_list_foreach $1 use_member mwan3_set_policy -} - -mwan3_set_policies_iptables() -{ - config_foreach mwan3_create_policies_iptables policy -} - -mwan3_set_sticky_iptables() -{ - local id iface - - for iface in $($IPT4 -S $policy | cut -s -d'"' -f2 | awk '{print $1}'); do - - if [ "$iface" == "$1" ]; then - - mwan3_get_iface_id id $1 - - [ -n "$id" ] || return 0 - - for IPT in "$IPT4" "$IPT6"; do - if [ -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" -a -n "$($IPT -S mwan3_iface_out_$1 2> /dev/null)" ]; then - $IPT -I mwan3_rule_$rule -m mark --mark $(($id*256))/0xff00 -m set ! --match-set mwan3_sticky_$rule src,src -j MARK --set-xmark 0x0/0xff00 - $IPT -I mwan3_rule_$rule -m mark --mark 0/0xff00 -j MARK --set-xmark $(($id*256))/0xff00 - fi - done - fi - done -} - -mwan3_set_user_iptables_rule() -{ - local ipset family proto policy src_ip src_port sticky dest_ip dest_port use_policy timeout rule policy IPT - - rule="$1" - - config_get sticky $1 sticky 0 - config_get timeout $1 timeout 600 - config_get ipset $1 ipset - config_get proto $1 proto all - config_get src_ip $1 src_ip 0.0.0.0/0 - config_get src_port $1 src_port 0:65535 - config_get dest_ip $1 dest_ip 0.0.0.0/0 - config_get dest_port $1 dest_port 0:65535 - config_get use_policy $1 use_policy - config_get family $1 family any - - if [ "$1" != $(echo "$1" | cut -c1-15) ]; then - $LOG warn "Rule $1 exceeds max of 15 chars. Not setting rule" && return 0 - fi - - if [ -n "$ipset" ]; then - ipset="-m set --match-set $ipset dst" - fi - - if [ -n "$use_policy" ]; then - if [ "$use_policy" == "default" ]; then - policy="MARK --set-xmark 0xff00/0xff00" - elif [ "$use_policy" == "unreachable" ]; then - policy="MARK --set-xmark 0xfe00/0xff00" - elif [ "$use_policy" == "blackhole" ]; then - policy="MARK --set-xmark 0xfd00/0xff00" - else - if [ "$sticky" -eq 1 ]; then - - policy="mwan3_policy_$use_policy" - - for IPT in "$IPT4" "$IPT6"; do - if ! $IPT -S $policy &> /dev/null; then - $IPT -N $policy - fi - - if ! $IPT -S mwan3_rule_$1 &> /dev/null; then - $IPT -N mwan3_rule_$1 - fi - - $IPT -F mwan3_rule_$1 - done - - $IPS -! create mwan3_sticky_v4_$rule hash:ip,mark markmask 0xff00 timeout $timeout - $IPS -! create mwan3_sticky_v6_$rule hash:ip,mark markmask 0xff00 timeout $timeout family inet6 - $IPS -! create mwan3_sticky_$rule list:set - $IPS -! add mwan3_sticky_$rule mwan3_sticky_v4_$rule - $IPS -! add mwan3_sticky_$rule mwan3_sticky_v6_$rule - - config_foreach mwan3_set_sticky_iptables interface - - for IPT in "$IPT4" "$IPT6"; do - $IPT -A mwan3_rule_$1 -m mark --mark 0/0xff00 -j $policy - $IPT -A mwan3_rule_$1 -m mark ! --mark 0xfc00/0xfc00 -j SET --del-set mwan3_sticky_$rule src,src - $IPT -A mwan3_rule_$1 -m mark ! --mark 0xfc00/0xfc00 -j SET --add-set mwan3_sticky_$rule src,src - done - - policy="mwan3_rule_$1" - else - policy="mwan3_policy_$use_policy" - - for IPT in "$IPT4" "$IPT6"; do - if ! $IPT -S $policy &> /dev/null; then - $IPT -N $policy - fi - done - - fi - fi - - if [ "$family" == "any" ]; then - - for IPT in "$IPT4" "$IPT6"; do - case $proto in - tcp|udp) - $IPT -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m multiport --sports $src_port -m multiport --dports $dest_port -m mark --mark 0/0xff00 -m comment --comment "$1" -j $policy &> /dev/null - ;; - *) - $IPT -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m mark --mark 0/0xff00 -m comment --comment "$1" -j $policy &> /dev/null - ;; - esac - done - - elif [ "$family" == "ipv4" ]; then - - case $proto in - tcp|udp) - $IPT4 -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m multiport --sports $src_port -m multiport --dports $dest_port -m mark --mark 0/0xff00 -m comment --comment "$1" -j $policy &> /dev/null - ;; - *) - $IPT4 -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m mark --mark 0/0xff00 -m comment --comment "$1" -j $policy &> /dev/null - ;; - esac - - elif [ "$family" == "ipv6" ]; then - - case $proto in - tcp|udp) - $IPT6 -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m multiport --sports $src_port -m multiport --dports $dest_port -m mark --mark 0/0xff00 -m comment --comment "$1" -j $policy &> /dev/null - ;; - *) - $IPT6 -A mwan3_rules -p $proto -s $src_ip -d $dest_ip $ipset -m mark --mark 0/0xff00 -m comment --comment "$1" -j $policy &> /dev/null - ;; - esac - fi - fi -} - -mwan3_set_user_rules() -{ - local IPT - - for IPT in "$IPT4" "$IPT6"; do - - if ! $IPT -S mwan3_rules &> /dev/null; then - $IPT -N mwan3_rules - fi - - $IPT -F mwan3_rules - done - - config_foreach mwan3_set_user_iptables_rule rule -} - -mwan3_report_iface_status() -{ - local device result track_ips tracking IP IPT - - mwan3_get_iface_id id $1 - network_get_device device $1 - config_get enabled "$1" enabled 0 - config_get family "$1" family ipv4 - - if [ "$family" == "ipv4" ]; then - IP="$IP4" - IPT="$IPT4" - fi - - if [ "$family" == "ipv6" ]; then - IP="$IP6" - IPT="$IPT6" - fi - - if [ -z "$id" -o -z "$device" ]; then - result="unknown" - elif [ -n "$($IP rule | awk '$1 == "'$(($id+1000)):'"')"i -a -n "$($IP rule | awk '$1 == "'$(($id+2000)):'"')" -a -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" -a -n "$($IPT -S mwan3_iface_out_$1 2> /dev/null)" -a -n "$($IP route list table $id default dev $device 2> /dev/null)" ]; then - result="online" - elif [ -n "$($IP rule | awk '$1 == "'$(($id+1000)):'"')" -o -n "$($IP rule | awk '$1 == "'$(($id+2000)):'"')" -o -n "$($IPT -S mwan3_iface_in_$1 2> /dev/null)" -o -n "$($IPT -S mwan3_iface_out_$1 2> /dev/null)" -o -n "$($IP route list table $id default dev $device 2> /dev/null)" ]; then - result="error" - else - if [ "$enabled" == "1" ]; then - result="offline" - else - result="disabled" - fi - fi - - mwan3_list_track_ips() - { - track_ips="$1 $track_ips" - } - config_list_foreach $1 track_ip mwan3_list_track_ips - - if [ -n "$track_ips" ]; then - if [ -n "$(ps -w | grep mwan3track | grep -v grep | sed '/.*\/usr\/sbin\/mwan3track \([^ ]*\) .*$/!d;s//\1/' | awk '$1 == "'$1'"')" ]; then - tracking="active" - else - tracking="down" - fi - else - tracking="not enabled" - fi - - echo " interface $1 is $result and tracking is $tracking" -} - -mwan3_report_policies_v4() -{ - local percent policy share total_weight weight iface - - for policy in $($IPT4 -S | awk '{print $2}' | grep mwan3_policy_ | sort -u); do - echo "$policy:" | sed 's/mwan3_policy_//' - - [ -n "$total_weight" ] || total_weight=$($IPT4 -S $policy | cut -s -d'"' -f2 | head -1 | awk '{print $3}') - - if [ ! -z "${total_weight##*[!0-9]*}" ]; then - for iface in $($IPT4 -S $policy | cut -s -d'"' -f2 | awk '{print $1}'); do - weight=$($IPT4 -S $policy | cut -s -d'"' -f2 | awk '$1 == "'$iface'"' | awk '{print $2}') - percent=$(($weight*100/$total_weight)) - echo " $iface ($percent%)" - done - else - echo " $($IPT4 -S $policy | sed '/.*--comment \([^ ]*\) .*$/!d;s//\1/;q')" - fi - - unset total_weight - - echo -e - done -} - -mwan3_report_policies_v6() -{ - local percent policy share total_weight weight iface - - for policy in $($IPT6 -S | awk '{print $2}' | grep mwan3_policy_ | sort -u); do - echo "$policy:" | sed 's/mwan3_policy_//' - - [ -n "$total_weight" ] || total_weight=$($IPT6 -S $policy | cut -s -d'"' -f2 | head -1 | awk '{print $3}') - - if [ ! -z "${total_weight##*[!0-9]*}" ]; then - for iface in $($IPT6 -S $policy | cut -s -d'"' -f2 | awk '{print $1}'); do - weight=$($IPT6 -S $policy | cut -s -d'"' -f2 | awk '$1 == "'$iface'"' | awk '{print $2}') - percent=$(($weight*100/$total_weight)) - echo " $iface ($percent%)" - done - else - echo " $($IPT6 -S $policy | sed '/.*--comment \([^ ]*\) .*$/!d;s//\1/;q')" - fi - - unset total_weight - - echo -e - done -} - -mwan3_report_connected_v4() -{ - local address - - if [ -n "$($IPT4 -S mwan3_connected 2> /dev/null)" ]; then - for address in $($IPS list mwan3_connected_v4 | egrep '[0-9]{1,3}(\.[0-9]{1,3}){3}'); do - echo " $address" - done - fi -} - -mwan3_report_connected_v6() -{ - local address - - if [ -n "$($IPT6 -S mwan3_connected 2> /dev/null)" ]; then - for address in $($IPS list mwan3_connected_v6 | egrep '([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])'); do - echo " $address" - done - fi -} - -mwan3_report_rules_v4() -{ - if [ -n "$($IPT4 -S mwan3_rules 2> /dev/null)" ]; then - $IPT4 -L mwan3_rules -n -v 2> /dev/null | tail -n+3 | sed 's/mark.*//' | sed 's/mwan3_policy_/- /' | sed 's/mwan3_rule_/S /' - fi -} - -mwan3_report_rules_v6() -{ - if [ -n "$($IPT6 -S mwan3_rules 2> /dev/null)" ]; then - $IPT6 -L mwan3_rules -n -v 2> /dev/null | tail -n+3 | sed 's/mark.*//' | sed 's/mwan3_policy_/- /' | sed 's/mwan3_rule_/S /' - fi -} - -mwan3_flush_conntrack() -{ - local flush_conntrack - - config_get flush_conntrack $1 flush_conntrack never - - if [ -e "$CONNTRACK_FILE" ]; then - case $flush_conntrack in - ifup) - [ "$3" = "ifup" ] && { - echo f > ${CONNTRACK_FILE} - $LOG info "connection tracking flushed on interface $1 ($2) $3" - } - ;; - ifdown) - [ "$3" = "ifdown" ] && { - echo f > ${CONNTRACK_FILE} - $LOG info "connection tracking flushed on interface $1 ($2) $3" - } - ;; - always) - echo f > ${CONNTRACK_FILE} - $LOG info "connection tracking flushed on interface $1 ($2) $3" - ;; - never) - $LOG info "connection tracking not flushed on interface $1 ($2) $3" - ;; - esac - else - $LOG warning "connection tracking not enabled" - fi -} diff --git a/net/mwan3/files/usr/libexec/rpcd/mwan3 b/net/mwan3/files/usr/libexec/rpcd/mwan3 deleted file mode 100755 index bbc570f..0000000 --- a/net/mwan3/files/usr/libexec/rpcd/mwan3 +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh -. /usr/share/libubox/jshn.sh - -MWAN3_STATUS_DIR="/var/run/mwan3track" -MWAN3_PID_FILE="/var/run/mwan3track" - -IPS="ipset" -IPT4="iptables -t mangle -w" -IPT6="ip6tables -t mangle -w" - -report_connected_v4() { - local address - - if [ -n "$($IPT4 -S mwan3_connected 2> /dev/null)" ]; then - for address in $($IPS list mwan3_connected_v4 | tail -n +8); do - json_add_string "" "${address}" - done - fi -} - -report_connected_v6() { - local address - - if [ -n "$($IPT6 -S mwan3_connected 2> /dev/null)" ]; then - for address in $($IPS list mwan3_connected_v6 | tail -n +8); do - json_add_string "" "${address}" - done - fi -} - -get_mwan3_status() { - local iface="${1}" - local iface_select="${2}" - local running="0" - local pid - - if [ "${iface}" = "${iface_select}" ] || [ "${iface_select}" = "" ]; then - pid="$(pgrep -f "mwan3track $iface_selected")" - if [ "${pid}" != "" ]; then - running="1" - fi - - json_add_object "${iface}" - json_add_string "score" "$(cat "$MWAN3_STATUS_DIR/${iface}/SCORE")" - json_add_string "lost" "$(cat "$MWAN3_STATUS_DIR/${iface}/LOST")" - json_add_string "turn" "$(cat "$MWAN3_STATUS_DIR/${iface}/TURN")" - json_add_string "status" "$(cat "$MWAN3_STATUS_DIR/${iface}/STATUS")" - json_add_boolean "running" "${running}" - json_add_array "track_ip" - for file in $MWAN3_STATUS_DIR/${iface}/*; do - track="${file#*/TRACK_}" - if [ "${track}" != "${file}" ]; then - json_add_object - json_add_string ip "${track}" - json_add_string status "$(cat "${file}")" - json_close_object - fi - done - json_close_array - json_close_object - fi -} - -case "$1" in - list) - json_init - json_add_object "status" - json_add_string "section" "x" - json_add_string "interface" "x" - json_close_object - json_dump - ;; - call) - case "$2" in - status) - local section iface - read input; - json_load "$input" - json_get_var section section - json_get_var iface interface - - config_load mwan3 - json_init - case "$section" in - interfaces) - json_add_object interfaces - config_foreach get_mwan3_status interface "${iface}" - json_close_object - ;; - connected) - json_add_object connected - json_add_array ipv4 - report_connected_v4 - json_close_array - json_add_array ipv6 - report_connected_v6 - json_close_array - json_close_object - ;; - *) - # interfaces - json_add_object interfaces - config_foreach get_mwan3_status interface - json_close_object - # connected - json_add_object connected - json_add_array ipv4 - report_connected_v4 - json_close_array - json_add_array ipv6 - report_connected_v6 - json_close_array - json_close_object - ;; - esac - json_dump - ;; - esac - ;; -esac diff --git a/net/mwan3/files/usr/sbin/mwan3 b/net/mwan3/files/usr/sbin/mwan3 deleted file mode 100755 index f23d2e7..0000000 --- a/net/mwan3/files/usr/sbin/mwan3 +++ /dev/null @@ -1,172 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh -. /lib/functions/network.sh -. /lib/mwan3/mwan3.sh - -help() -{ - cat < Load rules and routes for specific interface - ifdown Unload rules and routes for specific interface - interfaces Show interfaces status - policies Show currently active policy - connected Show directly connected networks - rules Show active rules - status Show all status - -EOF -} - -ifdown() -{ - if [ -z "$1" ]; then - echo "Error: Expecting interface. Usage: mwan3 ifdown " && exit 0 - fi - - if [ -n "$2" ]; then - echo "Error: Too many arguments. Usage: mwan3 ifdown " && exit 0 - fi - - ACTION=ifdown INTERFACE=$1 /sbin/hotplug-call iface - - kill $(pgrep -f "mwan3track $1") &> /dev/null -} - -ifup() -{ - local device enabled - - config_load mwan3 - - if [ -z "$1" ]; then - echo "Expecting interface. Usage: mwan3 ifup " && exit 0 - fi - - if [ -n "$2" ]; then - echo "Too many arguments. Usage: mwan3 ifup " && exit 0 - fi - - config_get enabled "$1" enabled 0 - - device=$(uci -p /var/state get network.$1.ifname) &> /dev/null - - if [ -n "$device" ] ; then - [ "$enabled" -eq 1 ] && ACTION=ifup INTERFACE=$1 DEVICE=$device /sbin/hotplug-call iface - fi -} - -interfaces() -{ - config_load mwan3 - - echo "Interface status:" - config_foreach mwan3_report_iface_status interface - echo -e -} - -policies() -{ - echo "Current ipv4 policies:" - mwan3_report_policies_v4 - echo -e - echo "Current ipv6 policies:" - mwan3_report_policies_v6 - echo -e -} - -connected() -{ - echo "Directly connected ipv4 networks:" - mwan3_report_connected_v4 - echo -e - echo "Directly connected ipv6 networks:" - mwan3_report_connected_v6 - echo -e -} - -rules() -{ - echo "Active ipv4 user rules:" - mwan3_report_rules_v4 - echo -e - echo "Active ipv6 user rules:" - mwan3_report_rules_v6 - echo -e -} - -status() -{ - interfaces - policies - connected - rules -} - -start() -{ - config_load mwan3 - config_foreach ifup interface -} - -stop() -{ - local ipset route rule table IP IPT - - killall mwan3track &> /dev/null - - for IP in "$IP4" "$IP6"; do - - for route in $($IP route list table all | sed 's/.*table \([^ ]*\) .*/\1/' | awk '{print $1}' | awk '{for(i=1;i<=NF;i++) if($i+0>0) if($i+0<255) {print;break}}'); do - $IP route flush table $route &> /dev/null - done - - for rule in $($IP rule list | egrep '^[1-2][0-9]{3}\:' | cut -d ':' -f 1); do - $IP rule del pref $rule &> /dev/null - done - done - - for IPT in "$IPT4" "$IPT6"; do - - $IPT -D PREROUTING -j mwan3_hook &> /dev/null - $IPT -D OUTPUT -j mwan3_hook &> /dev/null - - for table in $($IPT -S | awk '{print $2}' | grep mwan3 | sort -u); do - $IPT -F $table &> /dev/null - done - - for table in $($IPT -S | awk '{print $2}' | grep mwan3 | sort -u); do - $IPT -X $table &> /dev/null - done - done - - for ipset in $($IPS -n list | grep mwan3_); do - $IPS -q destroy $ipset - done - - for ipset in $($IPS -n list | grep mwan3 | grep -E '_v4|_v6'); do - $IPS -q destroy $ipset - done -} - -restart() { - stop - start -} - -case "$1" in - ifup|ifdown|interfaces|policies|connected|rules|status|start|stop|restart) - $* - ;; - *) - help - ;; -esac - -exit 0 diff --git a/net/mwan3/files/usr/sbin/mwan3track b/net/mwan3/files/usr/sbin/mwan3track deleted file mode 100755 index 8afe901..0000000 --- a/net/mwan3/files/usr/sbin/mwan3track +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh - -LOG="logger -t $(basename "$0")[$$] -p" -INTERFACE="" -DEVICE="" - -IFDOWN_EVENT=0 - -clean_up() { - $LOG notice "Stopping mwan3track for interface \"${INTERFACE}\"" - if [ "$(pgrep -f "mwan3track ${INTERFACE}")" = "" ]; then - rm -rf "/var/run/mwan3track/${INTERFACE}" &> /dev/null - fi - if [ -z "$(ls -A "/var/run/mwan3track")" ]; then - rm -rf "/var/run/mwan3track" - fi - exit 0 -} - -if_down() { - $LOG info "Detect ifdown event on interface ${INTERFACE} (${DEVICE})" - IFDOWN_EVENT=1 -} - -main() { - local reliability count timeout interval failure_interval - local recovery_interval down up size - - [ -z "$3" ] && echo "Error: should not be started manually" && exit 0 - - INTERFACE=$1 - DEVICE=$2 - mkdir -p /var/run/mwan3track/$1 - trap clean_up SIGINT SIGTERM - trap if_down SIGUSR1 - - config_load mwan3 - config_get reliability $1 reliability 1 - config_get count $1 count 1 - config_get timeout $1 timeout 4 - config_get interval $1 interval 10 - config_get down $1 down 5 - config_get up $1 up 5 - config_get size $1 size 56 - config_get failure_interval $1 failure_interval $interval - config_get recovery_interval $1 recovery_interval $interval - - local score=$(($down+$up)) - local track_ips=$(echo $* | cut -d ' ' -f 3-99) - local host_up_count=0 - local lost=0 - local sleep_time=0 - local turn=0 - - echo "offline" > /var/run/mwan3track/$1/STATUS - while true; do - - sleep_time=$interval - - for track_ip in $track_ips; do - ping -I $2 -c $count -W $timeout -s $size -q $track_ip &> /dev/null - if [ $? -eq 0 ]; then - let host_up_count++ - echo "up" > /var/run/mwan3track/$1/TRACK_${track_ip} - else - let lost++ - echo "down" > /var/run/mwan3track/$1/TRACK_${track_ip} - fi - done - - if [ $host_up_count -lt $reliability ]; then - let score-- - - if [ $score -lt $up ]; then - score=0 - else - sleep_time=$failure_interval - fi - - if [ $score -eq $up ]; then - echo "offline" > /var/run/mwan3track/$1/STATUS - $LOG notice "Interface $1 ($2) is offline" - env -i ACTION=ifdown INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface - score=0 - fi - else - if [ $score -lt $(($down+$up)) ] && [ $lost -gt 0 ]; then - $LOG info "Lost $(($lost*$count)) ping(s) on interface $1 ($2)" - fi - - let score++ - lost=0 - - if [ $score -gt $up ]; then - echo "online" > /var/run/mwan3track/$1/STATUS - score=$(($down+$up)) - elif [ $score -le $up ]; then - sleep_time=$recovery_interval - fi - - if [ $score -eq $up ]; then - $LOG notice "Interface $1 ($2) is online" - env -i ACTION=ifup INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface - rm -rf "/var/run/mwan3track/${1}" &> /dev/null - exit 0 - fi - fi - - let turn++ - mkdir -p "/var/run/mwan3track/${1}" - echo "${lost}" > /var/run/mwan3track/$1/LOST - echo "${score}" > /var/run/mwan3track/$1/SCORE - echo "${turn}" > /var/run/mwan3track/$1/TURN - - host_up_count=0 - sleep "${sleep_time}" & - wait - - if [ "${IFDOWN_EVENT}" -eq 1 ]; then - score=0 - echo "offline" > /var/run/mwan3track/$1/STATUS - IFDOWN_EVENT=0 - fi - done -} - -main "$@" diff --git a/net/nbd/Makefile b/net/nbd/Makefile deleted file mode 100644 index 130b31b..0000000 --- a/net/nbd/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=nbd -PKG_VERSION:=3.11 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@SF/nbd -PKG_MD5SUM:=73d11644a28b9f335292cdb3bdc4b74b -PKG_LICENSE:=GPL-2.0+ -PKG_MAINTAINER:=Marcin Jurkowski - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -# -liconv due to glib2, to be revisited later -include $(INCLUDE_DIR)/nls.mk - -PKG_BUILD_DEPENDS:=glib2 libintl - -define Package/nbd - SECTION:=net - CATEGORY:=Network - TITLE:=Network Block Device utilities - URL:=http://nbd.sourceforge.net - DEPENDS:=+kmod-nbd -endef - -define Package/nbd/description - This package contains the network block device client. -endef - -define Package/nbd-server - SECTION:=net - CATEGORY:=Network - TITLE:=Network Block Device Server - URL:=http://nbd.sourceforge.net - DEPENDS:=+glib2 -endef - -define Package/nbd-server/description - This package contains the network block device server. -endef - -CONFIGURE_ARGS += \ - --disable-glibtest - -TARGET_CFLAGS += --std=gnu99 -DNODAEMON - -define Package/nbd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nbd-client $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/nbd-client.conf $(1)/etc/config/nbd-client - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/nbd-client.init $(1)/etc/init.d/nbd-client -endef - -define Package/nbd/conffiles -/etc/config/nbd-client -endef - -$(eval $(call BuildPackage,nbd)) - -define Package/nbd-server/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nbd-server $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/nbd-server.conf $(1)/etc/config/nbd-server - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/nbd-server.init $(1)/etc/init.d/nbd-server -endef - -define Package/nbd-server/conffiles -/etc/config/nbd-server -/etc/nbd-server/conf.d -/etc/nbd-server/allow -endef - -$(eval $(call BuildPackage,nbd-server)) diff --git a/net/nbd/files/nbd-client.conf b/net/nbd/files/nbd-client.conf deleted file mode 100644 index e355c61..0000000 --- a/net/nbd/files/nbd-client.conf +++ /dev/null @@ -1,9 +0,0 @@ -config nbd-client nbd0 - option enabled '0' - option server '127.0.0.1' - option port 10809 - option sdp 0 - option swap 0 - option persist 0 - option blocksize 1024 - option exportname foo diff --git a/net/nbd/files/nbd-client.init b/net/nbd/files/nbd-client.init deleted file mode 100644 index e10c220..0000000 --- a/net/nbd/files/nbd-client.init +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=90 -STOP=10 -USE_PROCD=1 - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}" -} - -append_bool() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get_bool val "$cfg" "$var" "$def" - [ "$val" = 1 ] && procd_append_param command "$opt" -} - -start_instance() { - local cfg="$1" - local enabled - - config_get_bool enabled "$cfg" 'enabled' '0' - [ "$enabled" = 0 ] && return 1 - - procd_open_instance - - procd_set_param command /usr/sbin/nbd-client - - append_arg "$cfg" server - append_arg "$cfg" port - # device path - procd_append_param command "/dev/$cfg" - procd_append_param command -nofork - append_bool "$cfg" sdp "-sdp" - append_bool "$cfg" swap "-swap" - append_bool "$cfg" persist "-persist" - append_arg "$cfg" blocksize "-block-size" - append_arg "$cfg" timeout "-timeout" - append_arg "$cfg" exportname "-name" - - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger "nbd-client" -} - -start_service() { - config_load nbd-client - config_foreach start_instance nbd-client -} - -stop_service() { - for dev in /dev/nbd*; do - nbd-client -d $dev 1>/dev/null 2>&1 - done -} diff --git a/net/nbd/files/nbd-server.conf b/net/nbd/files/nbd-server.conf deleted file mode 100644 index ec9a1c3..0000000 --- a/net/nbd/files/nbd-server.conf +++ /dev/null @@ -1,31 +0,0 @@ -config nbd-server - option enabled 0 -# option port 10809 -# option user root -# option group root -# option allowlist 0 -# option includedir '/etc/nbd-server/conf.d' -# option listenaddr '0.0.0.0' -# option oldstyle 0 - -config share usb_sda1 - option filename '/dev/sda1' -# option authfile '/etc/nbd-server/allow' -# option timeout 0 -# option flush 0 -# option fua 0 -# option rotational 0 -# option sync 0 -# option discard 0 -# option maxconnections 10 -# option filesize 1000000 -# option multifile 0 -# option copyonwrite 0 -# option sparse_cow 1 -# option readonly 0 -# option prerun '/bin/true' -# option postrun '/bin/true' -# option virtstyle 'ipliteral' -# option oldstyle_port 12345 -# option oldstyle_listenaddr '0.0.0.0' - diff --git a/net/nbd/files/nbd-server.init b/net/nbd/files/nbd-server.init deleted file mode 100644 index ae3db24..0000000 --- a/net/nbd/files/nbd-server.init +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=60 -STOP=40 -USE_PROCD=1 - -PROG=/usr/bin/nbd-server -CONFIGFILE="/var/etc/nbd-server.conf" - - -append_plain() { - echo "$1" >> $CONFIGFILE -} - -append_val_str() { - local resultname="$1" - local cfg="$2" - local uciname="${3:-$1}" - local value= - - config_get value "$cfg" "$uciname" - - if [ -z "$value" ]; then - return - fi - append_plain "$resultname = $value" -} - -append_val_bool() { - local resultname="$1" - local cfg="$2" - local uciname="${3:-$1}" - local value= - - config_get_bool value "$cfg" "$uciname" - if [ -z "$value" ]; then - return - fi - - [ $value == 1 ] && value="true" || value="false" - append_plain "$resultname = $value" -} - -config_handle_generic() { - local cfg="$1" - - append_plain "[generic]" - append_val_str user "$cfg" - append_val_str group "$cfg" - append_val_str port "$cfg" - append_val_str listenaddr "$cfg" - append_val_bool allowlist "$cfg" - append_val_str includedir "$cfg" - append_val_bool oldstyle "$cfg" - - config_get_bool SERVICE_ENABLED "$cfg" enabled 0 -} - -config_handle_share() { - local cfg="$1" - - append_plain - append_plain "[$cfg]" - append_val_str exportname "$cfg" filename - append_val_str timeout "$cfg" - append_val_str maxconnections "$cfg" - append_val_str authfile "$cfg" - append_val_str filesize "$cfg" - append_val_str readonly "$cfg" - append_val_str multifile "$cfg" - append_val_str copyonwrite "$cfg" - append_val_bool sparse_cow "$cfg" - append_val_bool flush "$cfg" - append_val_bool fua "$cfg" - append_val_bool rotational "$cfg" - append_val_bool sync "$cfg" - append_val_bool discard "$cfg" - append_val_str prerun "$cfg" - append_val_str postrun "$cfg" - append_val_str virtstyle "$cfg" - append_val_str port "$cfg" oldstyle_port - append_val_str listenaddr "$cfg" oldstyle_listenaddr -} - -start_instance() { - local cfg="$1" - local enabled - - config_get_bool enabled "$cfg" 'enabled' '0' - [ "$enabled" = 0 ] && return 1 - - procd_open_instance - procd_set_param command $PROG --config-file=$CONFIGFILE - procd_set_param file $CONFIGFILE - procd_close_instance -} - -start_service() { - config_load nbd-server - - mkdir -p $(dirname $CONFIGFILE) - echo "# auto-generated config file from /etc/config/nbd-server" > $CONFIGFILE - config_foreach config_handle_generic nbd-server - config_foreach config_handle_share share - - config_foreach start_instance nbd-server -} - -service_triggers() { - procd_add_reload_trigger "nbd-server" -} diff --git a/net/ncp/Makefile b/net/ncp/Makefile deleted file mode 100644 index 56bd08b..0000000 --- a/net/ncp/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ncp -PKG_VERSION:=1.2.4 -PKG_RELEASE:=1 - -PKG_LICENSE:=FREE -PKG_LICENSE_FILES:= - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://dl.fefe.de/ -PKG_MD5SUM:=421c4855bd3148b7d0a4342942b4bf13 - -PKG_BUILD_DEPENDS:=libowfat - -PKG_MAINTAINER:=Andreas Shimokawa - -include $(INCLUDE_DIR)/package.mk - -define Package/ncp - SECTION:=net - CATEGORY:=Network - TITLE:=copy files over the network - URL:=https://www.fefe.de/ncp/ -endef - -define Package/ncp/description - copy files over the network -endef - -define Build/Compile - cd $(PKG_BUILD_DIR); \ - $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -I$(STAGING_DIR)/usr/include/libowfat ncp.c -lowfat -o ncp -endef - -define Package/ncp/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ncp $(1)/usr/bin/ - ln -sf ncp $(1)/usr/bin/npush - ln -sf ncp $(1)/usr/bin/npoll -endef - -$(eval $(call BuildPackage,ncp)) diff --git a/net/net-snmp/Makefile b/net/net-snmp/Makefile deleted file mode 100644 index 3446d15..0000000 --- a/net/net-snmp/Makefile +++ /dev/null @@ -1,252 +0,0 @@ -# -# Copyright (C) 2006-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=net-snmp -PKG_VERSION:=5.7.3 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/net-snmp -PKG_MD5SUM:=d4a3459e1577d0efa8d96ca70a885e53 -PKG_MAINTAINER:=Stijn Tintel -PKG_LICENSE:=MIT BSD-3-Clause-Clear - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/net-snmp/Default - SECTION:=net - CATEGORY:=Network - URL:=http://www.net-snmp.org/ -endef - -define Package/net-snmp/Default/description - Simple Network Management Protocol (SNMP) is a widely used protocol for - monitoring the health and welfare of network equipment (eg. routers), - computer equipment and even devices like UPSs. Net-SNMP is a suite of - applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both - IPv4 and IPv6. -endef - - -define Package/libnetsnmp -$(call Package/net-snmp/Default) - SECTION:=libs - CATEGORY:=Libraries - DEPENDS:=+libnl-tiny - TITLE:=Open source SNMP implementation (libraries) -endef - -define Package/libnetsnmp/description -$(call Package/net-snmp/Default/description) - . - This package contains shared libraries, needed by other programs. -endef - - -define Package/snmp-mibs -$(call Package/net-snmp/Default) - TITLE:=Open source SNMP implementation (MIB-files) -endef - -define Package/snmp-mibs/description -$(call Package/net-snmp/Default/description) - . - This package contains SNMP MIB-Files. -endef - - -define Package/snmp-utils -$(call Package/net-snmp/Default) - DEPENDS:=+libnetsnmp - TITLE:=Open source SNMP implementation (utilities) -endef - -define Package/snmp-utils/description -$(call Package/net-snmp/Default/description) - . - This package contains SNMP client utilities. -endef - - -define Package/snmpd -$(call Package/net-snmp/Default) - DEPENDS:=+libnetsnmp - TITLE:=Open source SNMP implementation (daemon) -endef - -define Package/snmpd/description -$(call Package/net-snmp/Default/description) - . - This package contains the SNMP agent, dynamically linked. -endef - - -define Package/snmpd-static -$(call Package/net-snmp/Default) - DEPENDS:=+snmpd - TITLE:=Open source SNMP implementation (daemon) -endef - - - -SNMP_MIB_MODULES_INCLUDED = \ - agentx \ - host/hr_device \ - host/hr_disk \ - host/hr_filesys \ - host/hr_network \ - host/hr_partition \ - host/hr_proc \ - host/hr_storage \ - host/hr_system \ - ieee802dot11 \ - if-mib/ifXTable \ - mibII/at \ - mibII/icmp \ - mibII/ifTable \ - mibII/ip \ - mibII/snmp_mib \ - mibII/sysORTable \ - mibII/system_mib \ - mibII/tcp \ - mibII/udp \ - mibII/vacm_context \ - mibII/vacm_vars \ - snmpv3/snmpEngine \ - snmpv3/snmpMPDStats \ - snmpv3/usmConf \ - snmpv3/usmStats \ - snmpv3/usmUser \ - tunnel \ - ucd-snmp/disk \ - ucd-snmp/dlmod \ - ucd-snmp/extensible \ - ucd-snmp/loadave \ - ucd-snmp/memory \ - ucd-snmp/pass \ - ucd-snmp/pass_persist \ - ucd-snmp/proc \ - ucd-snmp/vmstat \ - util_funcs \ - utilities/execute \ - -SNMP_MIB_MODULES_EXCLUDED = \ - agent_mibs \ - disman/event \ - disman/schedule \ - hardware \ - host \ - if-mib \ - mibII \ - notification \ - notification-log-mib \ - snmpv3mibs \ - target \ - tcp-mib \ - ucd_snmp \ - udp-mib \ - utilities \ - -SNMP_TRANSPORTS_INCLUDED = Callback UDP Unix - -SNMP_TRANSPORTS_EXCLUDED = TCP TCPIPv6 - -TARGET_CFLAGS += $(FPIC) -TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libnl-tiny - -CONFIGURE_ARGS += \ - --enable-mfd-rewrites \ - --enable-shared \ - --enable-static \ - --with-endianness=$(if $(CONFIG_BIG_ENDIAN),big,little) \ - --with-logfile=/var/log/snmpd.log \ - --with-persistent-directory=/usr/lib/snmp/ \ - --with-default-snmp-version=1 \ - --with-sys-contact=root@localhost \ - --with-sys-location=Unknown \ - --enable-applications \ - --disable-debugging \ - --disable-manuals \ - --disable-scripts \ - --with-out-mib-modules="$(SNMP_MIB_MODULES_EXCLUDED)" \ - --with-mib-modules="$(SNMP_MIB_MODULES_INCLUDED)" \ - --with-out-transports="$(SNMP_TRANSPORTS_EXCLUDED)" \ - --with-transports="$(SNMP_TRANSPORTS_INCLUDED)" \ - --without-openssl \ - --without-libwrap \ - --without-rpm \ - --without-zlib \ - --with-nl \ - $(call autoconf_bool,CONFIG_IPV6,ipv6) \ - -CONFIGURE_VARS += \ - ac_cv_header_netlink_netlink_h=yes \ - netsnmp_cv_func_nl_connect_LIBS=-lnl-tiny \ - -ifeq ($(CONFIG_IPV6),y) -SNMP_TRANSPORTS_INCLUDED+= UDPIPv6 -endif - -TARGET_LDFLAGS += -L$(TOOLCHAIN_DIR)/usr/lib - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \ - LDFLAGS="$(TARGET_LDFLAGS) -lm -lc" \ - all install -endef - -define Build/InstallDev - $(INSTALL_DIR) $(2)/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/net-snmp-config $(2)/bin/ - $(SED) 's,=/usr,=$(STAGING_DIR)/usr,g' $(2)/bin/net-snmp-config - - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/net-snmp $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.{a,so*} $(1)/usr/lib/ -endef - -define Package/libnetsnmp/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnetsnmp{,agent,helpers,mibs}.so.* $(1)/usr/lib/ -endef - -define Package/snmp-mibs/install - $(INSTALL_DIR) $(1)/usr/share/snmp/mibs - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/snmp/mibs/* $(1)/usr/share/snmp/mibs/ -endef - -define Package/snmp-utils/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/snmp{get,set,status,test,trap,walk} $(1)/usr/bin/ -endef - -define Package/snmpd/conffiles -/etc/config/snmpd -endef - -define Package/snmpd/install - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/snmpd.conf $(1)/etc/config/snmpd - $(INSTALL_DIR) $(1)/etc/snmp - ln -sf /var/run/snmpd.conf $(1)/etc/snmp/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/snmpd $(1)/usr/sbin/snmpd -endef - -$(eval $(call BuildPackage,libnetsnmp)) -$(eval $(call BuildPackage,snmp-mibs)) -$(eval $(call BuildPackage,snmp-utils)) -$(eval $(call BuildPackage,snmpd)) -$(eval $(call BuildPackage,snmpd-static)) diff --git a/net/net-snmp/files/snmpd.conf b/net/net-snmp/files/snmpd.conf deleted file mode 100644 index ac152d8..0000000 --- a/net/net-snmp/files/snmpd.conf +++ /dev/null @@ -1,89 +0,0 @@ -config agent - option agentaddress UDP:161 - -config agentx - option agentxsocket /var/run/agentx.sock - -config com2sec public - option secname ro - option source default - option community public - -config com2sec private - option secname rw - option source localhost - option community private - -config group public_v1 - option group public - option version v1 - option secname ro - -config group public_v2c - option group public - option version v2c - option secname ro - -config group public_usm - option group public - option version usm - option secname ro - -config group private_v1 - option group private - option version v1 - option secname rw - -config group private_v2c - option group private - option version v2c - option secname rw - -config group private_usm - option group private - option version usm - option secname rw - -config view all - option viewname all - option type included - option oid .1 - -config access public_access - option group public - option context none - option version any - option level noauth - option prefix exact - option read all - option write none - option notify none - -config access private_access - option group private - option context none - option version any - option level noauth - option prefix exact - option read all - option write all - option notify all - -config system - option sysLocation 'office' - option sysContact 'bofh@example.com' - option sysName 'HeartOfGold' -# option sysServices 72 -# option sysDescr 'adult playground' -# option sysObjectID '1.2.3.4' - -config exec - option name filedescriptors - option prog /bin/cat - option args /proc/sys/fs/file-nr -# option miboid 1.2.3.4 - -config engineid -# option engineid 'LEDE' - option engineidtype '3' - option engineidnic 'eth0' diff --git a/net/net-snmp/files/snmpd.init b/net/net-snmp/files/snmpd.init deleted file mode 100644 index 7df67de..0000000 --- a/net/net-snmp/files/snmpd.init +++ /dev/null @@ -1,262 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008 OpenWrt.org -START=50 - -USE_PROCD=1 -PROG="/usr/sbin/snmpd" - -CONFIGFILE="/var/run/snmpd.conf" - -snmpd_agent_add() { - local cfg="$1" - - config_get agentaddress "$cfg" agentaddress - [ -n "$agentaddress" ] || return 0 - echo "agentaddress $agentaddress" >> $CONFIGFILE -} - -snmpd_agentx_add() { - local cfg="$1" - echo "master agentx" >> $CONFIGFILE - config_get agentxsocket "$cfg" agentxsocket - [ -n "$agentxsocket" ] && echo "agentXSocket $agentxsocket" >> $CONFIGFILE -} - -snmpd_system_add() { - local cfg="$1" - config_get syslocation "$cfg" sysLocation - [ -n "$syslocation" ] && echo "sysLocation $syslocation" >> $CONFIGFILE - config_get syscontact "$cfg" sysContact - [ -n "$syscontact" ] && echo "sysContact $syscontact" >> $CONFIGFILE - config_get sysname "$cfg" sysName - [ -n "$sysname" ] && echo "sysName $sysname" >> $CONFIGFILE - config_get sysservice "$cfg" sysService - [ -n "$sysservice" ] && echo "sysService $sysservice" >> $CONFIGFILE - config_get sysdescr "$cfg" sysDescr - [ -n "$sysdescr" ] && echo "sysDescr $sysdescr" >> $CONFIGFILE - config_get sysobjectid "$cfg" sysObjectID - [ -n "$sysobjectid" ] && echo "sysObjectID $sysobjectid" >> $CONFIGFILE -} - -snmpd_com2sec_add() { - local cfg="$1" - config_get secname "$cfg" secname - [ -n "$secname" ] || return 0 - config_get source "$cfg" source - [ -n "$source" ] || return 0 - config_get community "$cfg" community - [ -n "$community" ] || return 0 - echo "com2sec $secname $source $community" >> $CONFIGFILE -} - -snmpd_com2sec6_add() { - local cfg="$1" - config_get secname "$cfg" secname - [ -n "$secname" ] || return 0 - config_get source "$cfg" source - [ -n "$source" ] || return 0 - config_get community "$cfg" community - [ -n "$community" ] || return 0 - echo "com2sec6 $secname $source $community" >> $CONFIGFILE -} - -snmpd_group_add() { - local cfg="$1" - config_get group "$cfg" group - [ -n "$group" ] || return 0 - config_get version "$cfg" version - [ -n "$version" ] || return 0 - config_get secname "$cfg" secname - [ -n "$secname" ] || return 0 - echo "group $group $version $secname" >> $CONFIGFILE -} - -snmpd_view_add() { - local cfg="$1" - config_get viewname "$cfg" viewname - [ -n "$viewname" ] || return 0 - config_get type "$cfg" type - [ -n "$type" ] || return 0 - config_get oid "$cfg" oid - [ -n "$oid" ] || return 0 - # optional mask - config_get mask "$cfg" mask - echo "view $viewname $type $oid $mask" >> $CONFIGFILE -} - -snmpd_access_add() { - local cfg="$1" - config_get group "$cfg" group - [ -n "$group" ] || return 0 - config_get context "$cfg" context - [ -n $context ] || return 0 - [ "$context" == "none" ] && context='""' - config_get version "$cfg" version - [ -n "$version" ] || return 0 - config_get level "$cfg" level - [ -n "$level" ] || return 0 - config_get prefix "$cfg" prefix - [ -n "$prefix" ] || return 0 - config_get read "$cfg" read - [ -n "$read" ] || return 0 - config_get write "$cfg" write - [ -n "$write" ] || return 0 - config_get notify "$cfg" notify - [ -n "$notify" ] || return 0 - echo "access $group $context $version $level $prefix $read $write $notify" >> $CONFIGFILE -} - -snmpd_trap_hostname_add() { - local cfg="$1" - config_get hostname "$cfg" HostName - config_get port "$cfg" Port - config_get community "$cfg" Community - config_get type "$cfg" Type - echo "$type $hostname $community $port" >> $CONFIGFILE -} - -snmpd_trap_ip_add() { - local cfg="$1" - config_get host_ip "$cfg" HostIP - config_get port "$cfg" Port - config_get community "$cfg" Community - config_get type "$cfg" Type - echo "$type $host_ip $community $port" >> $CONFIGFILE -} - -snmpd_access_default_add() { - local cfg="$1" - config_get mode "$cfg" Mode - config_get community "$cfg" CommunityName - config_get oidrestrict "$cfg" RestrictOID - config_get oid "$cfg" RestrictedOID - echo -n "$mode $community default" >> $CONFIGFILE - [ "$oidrestrict" == "yes" ] && echo " $oid" >> $CONFIGFILE - [ "$oidrestrict" == "no" ] && echo "" >> $CONFIGFILE -} - -snmpd_access_HostName_add() { - local cfg="$1" - config_get hostname "$cfg" HostName - config_get mode "$cfg" Mode - config_get community "$cfg" CommunityName - config_get oidrestrict "$cfg" RestrictOID - config_get oid "$cfg" RestrictedOID - echo -n "$mode $community $hostname" >> $CONFIGFILE - [ "$oidrestrict" == "yes" ] && echo " $oid" >> $CONFIGFILE - [ "$oidrestrict" == "no" ] && echo "" >> $CONFIGFILE -} - -snmpd_access_HostIP_add() { - local cfg="$1" - config_get host_ip "$cfg" HostIP - config_get ip_mask "$cfg" IPMask - config_get mode "$cfg" Mode - config_get community "$cfg" CommunityName - config_get oidrestrict "$cfg" RestrictOID - config_get oid "$cfg" RestrictedOID - echo -n "$mode $community $host_ip/$ip_mask" >> $CONFIGFILE - [ "$oidrestrict" == "yes" ] && echo " $oid" >> $CONFIGFILE - [ "$oidrestrict" == "no" ] && echo "" >> $CONFIGFILE -} - -snmpd_pass_add() { - local cfg="$1" - local pass='pass' - - config_get miboid "$cfg" miboid - [ -n "$miboid" ] || return 0 - config_get prog "$cfg" prog - [ -n "$prog" ] || return 0 - config_get_bool persist "$cfg" persist 0 - [ $persist -ne 0 ] && pass='pass_persist' - config_get priority "$cfg" priority - priority=${priority:+-p $priority} - echo "$pass $priority $miboid $prog" >> $CONFIGFILE -} - -snmpd_exec_add() { - local cfg="$1" - - config_get name "$cfg" name - [ -n "$name" ] || return 0 - config_get prog "$cfg" prog - [ -n "$prog" ] || return 0 - config_get args "$cfg" args - config_get miboid "$cfg" miboid - echo "exec $miboid $name $prog $args" >> $CONFIGFILE -} - -snmpd_disk_add() { - local cfg="$1" - local disk='disk' - - config_get partition "$cfg" partition - [ -n "$partition" ] || return 0 - config_get size "$cfg" size - [ -n "$size" ] || return 0 - echo "$disk $partition $size" >> $CONFIGFILE -} - -snmpd_engineid_add() { - local cfg="$1" - - config_get engineid "$cfg" engineid - [ -n "$engineid" ] && echo "engineID $engineid" >> $CONFIGFILE - config_get engineidtype "$cfg" engineidtype - [ "$engineidtype" -ge 1 -a "$engineidtype" -le 3 ] && \ - echo "engineIDType $engineidtype" >> $CONFIGFILE - config_get engineidnic "$cfg" engineidnic - [ -n "$engineidnic" ] && echo "engineIDNic $engineidnic" >> $CONFIGFILE -} - -start_service() { - [ -f "$CONFIGFILE" ] && rm -f "$CONFIGFILE" - - procd_open_instance - - config_load snmpd - - config_foreach snmpd_agent_add agent - config_foreach snmpd_agentx_add agentx - config_foreach snmpd_system_add system - config_foreach snmpd_com2sec_add com2sec - config_foreach snmpd_com2sec6_add com2sec6 - config_foreach snmpd_group_add group - config_foreach snmpd_view_add view - config_foreach snmpd_access_add access - config_foreach snmpd_trap_hostname_add trap_HostName - config_foreach snmpd_trap_ip_add trap_HostIP - config_foreach snmpd_access_default_add access_default - config_foreach snmpd_access_HostName_add access_HostName - config_foreach snmpd_access_HostIP_add access_HostIP - config_foreach snmpd_pass_add pass - config_foreach snmpd_exec_add exec - config_foreach snmpd_disk_add disk - config_foreach snmpd_engineid_add engineid - - procd_set_param command $PROG -Lf /dev/null -f - procd_set_param file $CONFIGFILE - procd_set_param respawn - - for iface in $(ls /sys/class/net 2>/dev/null); do - procd_append_param netdev "$iface" - done - - procd_close_instance -} - -stop_service() { - [ -f "$CONFIGFILE" ] && rm -f "$CONFIGFILE" -} - -service_triggers(){ - local script=$(readlink "$initscript") - local name=$(basename ${script:-$initscript}) - - procd_open_trigger - procd_add_raw_trigger "interface.*" 2000 /etc/init.d/$name reload - procd_close_trigger - - procd_add_reload_trigger 'snmpd' -} diff --git a/net/net-snmp/patches/000-cross-compile.patch b/net/net-snmp/patches/000-cross-compile.patch deleted file mode 100644 index 2906220..0000000 --- a/net/net-snmp/patches/000-cross-compile.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: Jo-Philipp Wich -Date: Fri, 6 Jan 2017 13:41:00 +0100 -Subject: [PATCH] configure: allow overriding hardcoded /usr/include/libnl3 - -In a cross-compile setting we do not want to probe the host systems -/usr/include path, therfore allow to disable this include path by passing -ac_cv_header_netlink_netlink_h=yes to configure. - -Also disable the testing for libraries providing nl_connect when -netsnmp_cv_func_nl_connect_LIBS is predefined since the proprietary -NETSNMP_SEARCH_LIBS() macro will clobber the internal link flags upon -encountering predefined cache variables, causing all subsequent configure -link tests to fail due to a stray "no" word getting passed to the linker. - -Signed-off-by: Jo-Philipp Wich ---- a/configure.d/config_os_libs2 -+++ b/configure.d/config_os_libs2 -@@ -226,14 +226,22 @@ if test "x$with_nl" != "xno"; then - case $target_os in - linux*) # Check for libnl (linux) - netsnmp_save_CPPFLAGS="$CPPFLAGS" -- CPPFLAGS="-I/usr/include/libnl3 $CPPFLAGS" -- NETSNMP_SEARCH_LIBS(nl_connect, nl-3, -- [AC_CHECK_HEADERS(netlink/netlink.h) -- EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES -I/usr/include/libnl3"], -- [CPPFLAGS="$netsnmp_save_CPPFLAGS"], [], [], [LMIBLIBS]) -+ netsnmp_netlink_include_flags="" - if test "x$ac_cv_header_netlink_netlink_h" != xyes; then -- NETSNMP_SEARCH_LIBS(nl_connect, nl, [ -- AC_CHECK_HEADERS(netlink/netlink.h)], [], [], LMIBLIBS) -+ netsnmp_netlink_include_flags="-I/usr/include/libnl3" -+ fi -+ CPPFLAGS="$netsnmp_netlink_include_flags $CPPFLAGS" -+ if test "x$netsnmp_cv_func_nl_connect_LIBS" = x; then -+ NETSNMP_SEARCH_LIBS(nl_connect, nl-3, -+ [AC_CHECK_HEADERS(netlink/netlink.h) -+ EXTERNAL_MIBGROUP_INCLUDES="$EXTERNAL_MIBGROUP_INCLUDES $netsnmp_netlink_include_flags"], -+ [CPPFLAGS="$netsnmp_save_CPPFLAGS"], [], [], [LMIBLIBS]) -+ if test "x$ac_cv_header_netlink_netlink_h" != xyes; then -+ NETSNMP_SEARCH_LIBS(nl_connect, nl, [ -+ AC_CHECK_HEADERS(netlink/netlink.h)], [], [], LMIBLIBS) -+ fi -+ else -+ LMIBLIBS="$LMIBLIBS $netsnmp_cv_func_nl_connect_LIBS" - fi - if test "x$ac_cv_header_netlink_netlink_h" = xyes; then - AC_EGREP_HEADER([nl_socket_free], [netlink/socket.h], diff --git a/net/net-snmp/patches/100-debian-statistics.patch b/net/net-snmp/patches/100-debian-statistics.patch deleted file mode 100644 index c6e1db4..0000000 --- a/net/net-snmp/patches/100-debian-statistics.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/agent/mibgroup/mibII/interfaces.c -+++ b/agent/mibgroup/mibII/interfaces.c -@@ -1590,6 +1590,10 @@ Interface_Scan_Init(void) - struct ifnet *nnew; - char *stats, *ifstart = line; - -+ /* Ignore interfaces with no statistics. */ -+ if (strstr(line, "No statistics available.")) -+ continue; -+ - if (line[strlen(line) - 1] == '\n') - line[strlen(line) - 1] = '\0'; - -@@ -1622,7 +1622,7 @@ Interface_Scan_Init(void) - &coll) != 5)) { - if ((scan_line_to_use == scan_line_2_2) - && !strstr(line, "No statistics available")) -- snmp_log(LOG_ERR, -+ snmp_log(LOG_DEBUG, - "/proc/net/dev data format error, line ==|%s|", - line); - continue; diff --git a/net/net-snmp/patches/110-debian-makefiles.patch b/net/net-snmp/patches/110-debian-makefiles.patch deleted file mode 100644 index 5ace743..0000000 --- a/net/net-snmp/patches/110-debian-makefiles.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -uNr a/local/Makefile.in b/local/Makefile.in ---- a/local/Makefile.in 2014-02-20 08:36:42.000000000 +0800 -+++ b/local/Makefile.in 2014-05-27 13:21:34.245223503 +0800 -@@ -103,7 +103,7 @@ - - mib2c.made: $(srcdir)/mib2c - if test "x$(PERL)" != "x" ; then \ -- $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;' ${srcdir}/mib2c > mib2c.made; \ -+ $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;s#/usr/local/etc/snmp#$(SNMPCONFPATH)#;' ${srcdir}/mib2c > mib2c.made; \ - else \ - touch mib2c.made; \ - fi -diff -uNr a/Makefile.top b/Makefile.top ---- a/Makefile.top 2014-02-20 08:36:42.000000000 +0800 -+++ b/Makefile.top 2014-05-27 13:26:53.023737120 +0800 -@@ -27,6 +27,7 @@ - snmplibdir = $(datadir)/snmp - mibdir = $(snmplibdir)/mibs - persistentdir = @PERSISTENT_DIRECTORY@ -+sysconfdir = @sysconfdir@ - DESTDIR = @INSTALL_PREFIX@ - INSTALL_PREFIX = $(DESTDIR) - -diff -uNr a/mibs/Makefile.in b/mibs/Makefile.in ---- a/mibs/Makefile.in 2014-02-20 08:36:42.000000000 +0800 -+++ b/mibs/Makefile.in 2014-05-27 13:25:07.151988585 +0800 -@@ -49,11 +49,15 @@ - UCDMIBS = UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \ - UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt - -+EXTRAMIBS = BGP4-MIB.txt BRIDGE-MIB.txt GNOME-SMI.txt OSPF-MIB.txt \ -+ OSPF-TRAP-MIB.txt RIPv2-MIB.txt SOURCE-ROUTING-MIB.txt \ -+ LM-SENSORS-MIB.txt -+ - DEFAULTMIBS = @default_mibs_install@ - - MIBS = $(V1MIBS) $(V2MIBS) $(V3MIBS) $(RFCMIBS) \ - $(AGENTMIBS) $(IANAMIBS) \ -- $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS) -+ $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS) $(EXTRAMIBS) - - all: standardall - diff --git a/net/net-snmp/patches/120-debian-searchdirs.patch b/net/net-snmp/patches/120-debian-searchdirs.patch deleted file mode 100644 index b5e377f..0000000 --- a/net/net-snmp/patches/120-debian-searchdirs.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/local/mib2c -+++ b/local/mib2c -@@ -61,8 +61,9 @@ $currentlevel = -1; - if($ENV{MIB2C_DIR}) { - push @def_search_dirs, split(/:/, $ENV{MIB2C_DIR}); - } --push @def_search_dirs, "/usr/local/share/snmp/"; --push @def_search_dirs, "/usr/local/share/snmp/mib2c-data"; -+push @def_search_dirs, "/etc/snmp/"; -+push @def_search_dirs, "/usr/share/snmp/"; -+push @def_search_dirs, "/usr/share/snmp/mib2c-data"; - push @def_search_dirs, "./mib2c-conf.d"; - - sub usage { diff --git a/net/net-snmp/patches/130-debian-extramibs.patch b/net/net-snmp/patches/130-debian-extramibs.patch deleted file mode 100644 index 48fb907..0000000 --- a/net/net-snmp/patches/130-debian-extramibs.patch +++ /dev/null @@ -1,5183 +0,0 @@ ---- /dev/null -+++ b/mibs/BGP4-MIB.txt -@@ -0,0 +1,929 @@ -+ BGP4-MIB DEFINITIONS ::= BEGIN -+ -+ IMPORTS -+ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, -+ IpAddress, Integer32, Counter32, Gauge32, mib-2 -+ FROM SNMPv2-SMI -+ MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP -+ FROM SNMPv2-CONF; -+ -+ bgp MODULE-IDENTITY -+ LAST-UPDATED "9902100000Z" -+ ORGANIZATION "IETF IDR Working Group" -+ CONTACT-INFO "E-mail: idr@merit.net -+ -+ Susan Hares (Editor) -+ Merit Network -+ 4251 Plymouth Road -+ Suite C -+ Ann Arbor, MI 48105-2785 -+ Tel: +1 734 936 2095 -+ Fax: +1 734 647 3185 -+ E-mail: skh@merit.edu -+ -+ Jeff Johnson (Editor) -+ RedBack Networks, Inc. -+ 1389 Moffett Park Drive -+ Sunnyvale, CA 94089-1134 -+ Tel: +1 408 548 3516 -+ Fax: +1 408 548 3599 -+ E-mail: jeff@redback.com" -+ DESCRIPTION -+ "The MIB module for BGP-4." -+ REVISION "9902100000Z" -+ DESCRIPTION -+ "Corrected duplicate OBJECT IDENTIFIER -+ assignment in the conformance information." -+ REVISION "9601080000Z" -+ DESCRIPTION -+ "1) Fixed the definitions of the traps to -+ make them equivalent to their initial -+ definition in RFC 1269. -+ 2) Added compliance and conformance info." -+ ::= { mib-2 15 } -+ -+ bgpVersion OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (1..255)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Vector of supported BGP protocol version -+ numbers. Each peer negotiates the version -+ from this vector. Versions are identified -+ via the string of bits contained within this -+ object. The first octet contains bits 0 to -+ 7, the second octet contains bits 8 to 15, -+ and so on, with the most significant bit -+ referring to the lowest bit number in the -+ octet (e.g., the MSB of the first octet -+ refers to bit 0). If a bit, i, is present -+ and set, then the version (i+1) of the BGP -+ is supported." -+ ::= { bgp 1 } -+ -+ bgpLocalAs OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The local autonomous system number." -+ ::= { bgp 2 } -+ -+ -+ -+ -- BGP Peer table. This table contains, one entry per BGP -+ -- peer, information about the BGP peer. -+ -+ bgpPeerTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF BgpPeerEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "BGP peer table. This table contains, -+ one entry per BGP peer, information about the -+ connections with BGP peers." -+ ::= { bgp 3 } -+ -+ bgpPeerEntry OBJECT-TYPE -+ SYNTAX BgpPeerEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Entry containing information about the -+ connection with a BGP peer." -+ INDEX { bgpPeerRemoteAddr } -+ ::= { bgpPeerTable 1 } -+ -+ BgpPeerEntry ::= SEQUENCE { -+ bgpPeerIdentifier -+ IpAddress, -+ bgpPeerState -+ INTEGER, -+ bgpPeerAdminStatus -+ INTEGER, -+ bgpPeerNegotiatedVersion -+ Integer32, -+ bgpPeerLocalAddr -+ IpAddress, -+ bgpPeerLocalPort -+ INTEGER, -+ bgpPeerRemoteAddr -+ IpAddress, -+ bgpPeerRemotePort -+ INTEGER, -+ bgpPeerRemoteAs -+ INTEGER, -+ bgpPeerInUpdates -+ Counter32, -+ bgpPeerOutUpdates -+ Counter32, -+ bgpPeerInTotalMessages -+ Counter32, -+ bgpPeerOutTotalMessages -+ Counter32, -+ bgpPeerLastError -+ OCTET STRING, -+ bgpPeerFsmEstablishedTransitions -+ Counter32, -+ bgpPeerFsmEstablishedTime -+ Gauge32, -+ bgpPeerConnectRetryInterval -+ INTEGER, -+ bgpPeerHoldTime -+ INTEGER, -+ bgpPeerKeepAlive -+ INTEGER, -+ bgpPeerHoldTimeConfigured -+ INTEGER, -+ bgpPeerKeepAliveConfigured -+ INTEGER, -+ bgpPeerMinASOriginationInterval -+ INTEGER, -+ bgpPeerMinRouteAdvertisementInterval -+ INTEGER, -+ bgpPeerInUpdateElapsedTime -+ Gauge32 -+ } -+ -+ bgpPeerIdentifier OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The BGP Identifier of this entry's BGP peer." -+ ::= { bgpPeerEntry 1 } -+ -+ bgpPeerState OBJECT-TYPE -+ SYNTAX INTEGER { -+ idle(1), -+ connect(2), -+ active(3), -+ opensent(4), -+ openconfirm(5), -+ established(6) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The BGP peer connection state." -+ ::= { bgpPeerEntry 2 } -+ -+ bgpPeerAdminStatus OBJECT-TYPE -+ SYNTAX INTEGER { -+ stop(1), -+ start(2) -+ } -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The desired state of the BGP connection. A -+ transition from 'stop' to 'start' will cause -+ the BGP Start Event to be generated. A -+ transition from 'start' to 'stop' will cause -+ the BGP Stop Event to be generated. This -+ parameter can be used to restart BGP peer -+ connections. Care should be used in providing -+ write access to this object without adequate -+ authentication." -+ ::= { bgpPeerEntry 3 } -+ -+ bgpPeerNegotiatedVersion OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The negotiated version of BGP running between -+ the two peers." -+ ::= { bgpPeerEntry 4 } -+ -+ bgpPeerLocalAddr OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The local IP address of this entry's BGP -+ connection." -+ ::= { bgpPeerEntry 5 } -+ -+ bgpPeerLocalPort OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The local port for the TCP connection between -+ the BGP peers." -+ ::= { bgpPeerEntry 6 } -+ -+ bgpPeerRemoteAddr OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The remote IP address of this entry's BGP -+ peer." -+ ::= { bgpPeerEntry 7 } -+ -+ bgpPeerRemotePort OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The remote port for the TCP connection between -+ the BGP peers. Note that the objects -+ bgpPeerLocalAddr, bgpPeerLocalPort, -+ bgpPeerRemoteAddr and bgpPeerRemotePort -+ provide the appropriate reference to the -+ standard MIB TCP connection table." -+ ::= { bgpPeerEntry 8 } -+ -+ bgpPeerRemoteAs OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The remote autonomous system number." -+ ::= { bgpPeerEntry 9 } -+ -+ bgpPeerInUpdates OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of BGP UPDATE messages received on -+ this connection. This object should be -+ initialized to zero (0) when the connection is -+ established." -+ ::= { bgpPeerEntry 10 } -+ -+ bgpPeerOutUpdates OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of BGP UPDATE messages transmitted -+ on this connection. This object should be -+ initialized to zero (0) when the connection is -+ established." -+ ::= { bgpPeerEntry 11 } -+ -+ bgpPeerInTotalMessages OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of messages received from the -+ remote peer on this connection. This object -+ should be initialized to zero when the -+ connection is established." -+ ::= { bgpPeerEntry 12 } -+ -+ bgpPeerOutTotalMessages OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of messages transmitted to -+ the remote peer on this connection. This object -+ should be initialized to zero when the -+ connection is established." -+ ::= { bgpPeerEntry 13 } -+ -+ bgpPeerLastError OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (2)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The last error code and subcode seen by this -+ peer on this connection. If no error has -+ occurred, this field is zero. Otherwise, the -+ first byte of this two byte OCTET STRING -+ contains the error code, and the second byte -+ contains the subcode." -+ ::= { bgpPeerEntry 14 } -+ -+ bgpPeerFsmEstablishedTransitions OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of times the BGP FSM -+ transitioned into the established state." -+ ::= { bgpPeerEntry 15 } -+ -+ bgpPeerFsmEstablishedTime OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This timer indicates how long (in seconds) this -+ peer has been in the Established state or how long -+ since this peer was last in the Established state. -+ It is set to zero when a new peer is configured or -+ the router is booted." -+ ::= { bgpPeerEntry 16 } -+ -+ bgpPeerConnectRetryInterval OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the ConnectRetry -+ timer. The suggested value for this timer is -+ 120 seconds." -+ ::= { bgpPeerEntry 17 } -+ -+ bgpPeerHoldTime OBJECT-TYPE -+ SYNTAX INTEGER ( 0 | 3..65535 ) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the Hold Timer -+ established with the peer. The value of this -+ object is calculated by this BGP speaker by -+ using the smaller of the value in -+ bgpPeerHoldTimeConfigured and the Hold Time -+ received in the OPEN message. This value -+ must be at lease three seconds if it is not -+ zero (0) in which case the Hold Timer has -+ not been established with the peer, or, the -+ value of bgpPeerHoldTimeConfigured is zero (0)." -+ ::= { bgpPeerEntry 18 } -+ -+ bgpPeerKeepAlive OBJECT-TYPE -+ SYNTAX INTEGER ( 0 | 1..21845 ) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the KeepAlive -+ timer established with the peer. The value of -+ this object is calculated by this BGP speaker -+ such that, when compared with bgpPeerHoldTime, -+ it has the same proportion as what -+ bgpPeerKeepAliveConfigured has when compared -+ with bgpPeerHoldTimeConfigured. If the value -+ of this object is zero (0), it indicates that -+ the KeepAlive timer has not been established -+ with the peer, or, the value of -+ bgpPeerKeepAliveConfigured is zero (0)." -+ ::= { bgpPeerEntry 19 } -+ -+ bgpPeerHoldTimeConfigured OBJECT-TYPE -+ SYNTAX INTEGER ( 0 | 3..65535 ) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the Hold Time -+ configured for this BGP speaker with this peer. -+ This value is placed in an OPEN message sent to -+ this peer by this BGP speaker, and is compared -+ with the Hold Time field in an OPEN message -+ received from the peer when determining the Hold -+ Time (bgpPeerHoldTime) with the peer. This value -+ must not be less than three seconds if it is not -+ zero (0) in which case the Hold Time is NOT to be -+ established with the peer. The suggested value for -+ this timer is 90 seconds." -+ ::= { bgpPeerEntry 20 } -+ -+ bgpPeerKeepAliveConfigured OBJECT-TYPE -+ SYNTAX INTEGER ( 0 | 1..21845 ) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the KeepAlive timer -+ configured for this BGP speaker with this peer. -+ The value of this object will only determine the -+ KEEPALIVE messages' frequency relative to the value -+ specified in bgpPeerHoldTimeConfigured; the actual -+ time interval for the KEEPALIVE messages is -+ indicated by bgpPeerKeepAlive. A reasonable -+ maximum value for this timer would be configured to -+ be one third of that of bgpPeerHoldTimeConfigured. -+ If the value of this object is zero (0), no -+ periodical KEEPALIVE messages are sent to the peer -+ after the BGP connection has been established. The -+ suggested value for this timer is 30 seconds." -+ ::= { bgpPeerEntry 21 } -+ -+ bgpPeerMinASOriginationInterval OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the -+ MinASOriginationInterval timer. -+ The suggested value for this timer is 15 seconds." -+ ::= { bgpPeerEntry 22 } -+ -+ bgpPeerMinRouteAdvertisementInterval OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "Time interval in seconds for the -+ MinRouteAdvertisementInterval timer. -+ The suggested value for this timer is 30 seconds." -+ ::= { bgpPeerEntry 23 } -+ -+ bgpPeerInUpdateElapsedTime OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Elapsed time in seconds since the last BGP -+ UPDATE message was received from the peer. -+ Each time bgpPeerInUpdates is incremented, -+ the value of this object is set to zero (0)." -+ ::= { bgpPeerEntry 24 } -+ -+ -+ -+ bgpIdentifier OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The BGP Identifier of local system." -+ ::= { bgp 4 } -+ -+ -+ -+ -- Received Path Attribute Table. This table contains, -+ -- one entry per path to a network, path attributes -+ -- received from all peers running BGP version 3 or less. -+ -- This table is obsolete, having been replaced in -+ -- functionality with the bgp4PathAttrTable. -+ -+ bgpRcvdPathAttrTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF BgpPathAttrEntry -+ MAX-ACCESS not-accessible -+ STATUS obsolete -+ DESCRIPTION -+ "The BGP Received Path Attribute Table contains -+ information about paths to destination networks -+ received from all peers running BGP version 3 or -+ less." -+ ::= { bgp 5 } -+ -+ bgpPathAttrEntry OBJECT-TYPE -+ SYNTAX BgpPathAttrEntry -+ MAX-ACCESS not-accessible -+ STATUS obsolete -+ DESCRIPTION -+ "Information about a path to a network." -+ INDEX { bgpPathAttrDestNetwork, -+ bgpPathAttrPeer } -+ ::= { bgpRcvdPathAttrTable 1 } -+ -+ BgpPathAttrEntry ::= SEQUENCE { -+ bgpPathAttrPeer -+ IpAddress, -+ bgpPathAttrDestNetwork -+ IpAddress, -+ bgpPathAttrOrigin -+ INTEGER, -+ bgpPathAttrASPath -+ OCTET STRING, -+ bgpPathAttrNextHop -+ IpAddress, -+ bgpPathAttrInterASMetric -+ Integer32 -+ } -+ -+ bgpPathAttrPeer OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The IP address of the peer where the path -+ information was learned." -+ ::= { bgpPathAttrEntry 1 } -+ -+ bgpPathAttrDestNetwork OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The address of the destination network." -+ ::= { bgpPathAttrEntry 2 } -+ -+ bgpPathAttrOrigin OBJECT-TYPE -+ SYNTAX INTEGER { -+ igp(1),-- networks are interior -+ egp(2),-- networks learned via EGP -+ incomplete(3) -- undetermined -+ } -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The ultimate origin of the path information." -+ ::= { bgpPathAttrEntry 3 } -+ -+ bgpPathAttrASPath OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (2..255)) -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The set of ASs that must be traversed to reach -+ the network. This object is probably best -+ represented as SEQUENCE OF INTEGER. For SMI -+ compatibility, though, it is represented as -+ OCTET STRING. Each AS is represented as a pair -+ of octets according to the following algorithm: -+ -+ first-byte-of-pair = ASNumber / 256; -+ second-byte-of-pair = ASNumber & 255;" -+ ::= { bgpPathAttrEntry 4 } -+ -+ bgpPathAttrNextHop OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The address of the border router that should -+ be used for the destination network." -+ ::= { bgpPathAttrEntry 5 } -+ -+ bgpPathAttrInterASMetric OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The optional inter-AS metric. If this -+ attribute has not been provided for this route, -+ the value for this object is 0." -+ ::= { bgpPathAttrEntry 6 } -+ -+ -+ -+ -- BGP-4 Received Path Attribute Table. This table contains, -+ -- one entry per path to a network, path attributes -+ -- received from all peers running BGP-4. -+ -+ bgp4PathAttrTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Bgp4PathAttrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The BGP-4 Received Path Attribute Table contains -+ information about paths to destination networks -+ received from all BGP4 peers." -+ ::= { bgp 6 } -+ -+ bgp4PathAttrEntry OBJECT-TYPE -+ SYNTAX Bgp4PathAttrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information about a path to a network." -+ INDEX { bgp4PathAttrIpAddrPrefix, -+ bgp4PathAttrIpAddrPrefixLen, -+ bgp4PathAttrPeer } -+ ::= { bgp4PathAttrTable 1 } -+ -+ Bgp4PathAttrEntry ::= SEQUENCE { -+ bgp4PathAttrPeer -+ IpAddress, -+ bgp4PathAttrIpAddrPrefixLen -+ INTEGER, -+ bgp4PathAttrIpAddrPrefix -+ IpAddress, -+ bgp4PathAttrOrigin -+ INTEGER, -+ bgp4PathAttrASPathSegment -+ OCTET STRING, -+ bgp4PathAttrNextHop -+ IpAddress, -+ bgp4PathAttrMultiExitDisc -+ INTEGER, -+ bgp4PathAttrLocalPref -+ INTEGER, -+ bgp4PathAttrAtomicAggregate -+ INTEGER, -+ bgp4PathAttrAggregatorAS -+ INTEGER, -+ bgp4PathAttrAggregatorAddr -+ IpAddress, -+ bgp4PathAttrCalcLocalPref -+ INTEGER, -+ bgp4PathAttrBest -+ INTEGER, -+ bgp4PathAttrUnknown -+ OCTET STRING -+ } -+ -+ bgp4PathAttrPeer OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address of the peer where the path -+ information was learned." -+ ::= { bgp4PathAttrEntry 1 } -+ bgp4PathAttrIpAddrPrefixLen OBJECT-TYPE -+ SYNTAX INTEGER (0..32) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Length in bits of the IP address prefix in the -+ Network Layer Reachability Information field." -+ ::= { bgp4PathAttrEntry 2 } -+ -+ bgp4PathAttrIpAddrPrefix OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "An IP address prefix in the Network Layer -+ Reachability Information field. This object -+ is an IP address containing the prefix with -+ length specified by bgp4PathAttrIpAddrPrefixLen. -+ Any bits beyond the length specified by -+ bgp4PathAttrIpAddrPrefixLen are zeroed." -+ ::= { bgp4PathAttrEntry 3 } -+ -+ bgp4PathAttrOrigin OBJECT-TYPE -+ SYNTAX INTEGER { -+ igp(1),-- networks are interior -+ egp(2),-- networks learned via EGP -+ incomplete(3) -- undetermined -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The ultimate origin of the path information." -+ ::= { bgp4PathAttrEntry 4 } -+ -+ bgp4PathAttrASPathSegment OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (2..255)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The sequence of AS path segments. Each AS -+ path segment is represented by a triple -+ . -+ -+ The type is a 1-octet field which has two -+ possible values: -+ 1 AS_SET: unordered set of ASs a -+ route in the UPDATE message -+ has traversed -+ 2 AS_SEQUENCE: ordered set of ASs -+ a route in the UPDATE message -+ has traversed. -+ -+ The length is a 1-octet field containing the -+ number of ASs in the value field. -+ -+ The value field contains one or more AS -+ numbers, each AS is represented in the octet -+ string as a pair of octets according to the -+ following algorithm: -+ -+ first-byte-of-pair = ASNumber / 256; -+ second-byte-of-pair = ASNumber & 255;" -+ ::= { bgp4PathAttrEntry 5 } -+ -+ bgp4PathAttrNextHop OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The address of the border router that should -+ be used for the destination network." -+ ::= { bgp4PathAttrEntry 6 } -+ -+ bgp4PathAttrMultiExitDisc OBJECT-TYPE -+ SYNTAX INTEGER (-1..2147483647) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This metric is used to discriminate between -+ multiple exit points to an adjacent autonomous -+ system. A value of -1 indicates the absence of -+ this attribute." -+ ::= { bgp4PathAttrEntry 7 } -+ -+ bgp4PathAttrLocalPref OBJECT-TYPE -+ SYNTAX INTEGER (-1..2147483647) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The originating BGP4 speaker's degree of -+ preference for an advertised route. A value of -+ -1 indicates the absence of this attribute." -+ ::= { bgp4PathAttrEntry 8 } -+ -+ bgp4PathAttrAtomicAggregate OBJECT-TYPE -+ SYNTAX INTEGER { -+ lessSpecificRrouteNotSelected(1), -+ lessSpecificRouteSelected(2) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Whether or not a system has selected -+ a less specific route without selecting a -+ more specific route." -+ ::= { bgp4PathAttrEntry 9 } -+ -+ bgp4PathAttrAggregatorAS OBJECT-TYPE -+ SYNTAX INTEGER (0..65535) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The AS number of the last BGP4 speaker that -+ performed route aggregation. A value of zero (0) -+ indicates the absence of this attribute." -+ ::= { bgp4PathAttrEntry 10 } -+ -+ bgp4PathAttrAggregatorAddr OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address of the last BGP4 speaker that -+ performed route aggregation. A value of -+ 0.0.0.0 indicates the absence of this attribute." -+ ::= { bgp4PathAttrEntry 11 } -+ -+ bgp4PathAttrCalcLocalPref OBJECT-TYPE -+ SYNTAX INTEGER (-1..2147483647) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The degree of preference calculated by the -+ receiving BGP4 speaker for an advertised route. -+ A value of -1 indicates the absence of this -+ attribute." -+ ::= { bgp4PathAttrEntry 12 } -+ -+ bgp4PathAttrBest OBJECT-TYPE -+ SYNTAX INTEGER { -+ false(1),-- not chosen as best route -+ true(2) -- chosen as best route -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "An indication of whether or not this route -+ was chosen as the best BGP4 route." -+ ::= { bgp4PathAttrEntry 13 } -+ -+ bgp4PathAttrUnknown OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE(0..255)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "One or more path attributes not understood -+ by this BGP4 speaker. Size zero (0) indicates -+ the absence of such attribute(s). Octets -+ beyond the maximum size, if any, are not -+ recorded by this object." -+ ::= { bgp4PathAttrEntry 14 } -+ -+ -+ -- Traps. -+ -+ -- note that in RFC 1657, bgpTraps was incorrectly -+ -- assigned a value of { bgp 7 }, and each of the -+ -- traps had the bgpPeerRemoteAddr object inappropriately -+ -- removed from their OBJECTS clause. The following -+ -- definitions restore the semantics of the traps as -+ -- they were initially defined in RFC 1269. -+ -+ -- { bgp 7 } is unused -+ -+ bgpTraps OBJECT IDENTIFIER ::= { bgp 0 } -+ -+ bgpEstablished NOTIFICATION-TYPE -+ OBJECTS { bgpPeerRemoteAddr, -+ bgpPeerLastError, -+ bgpPeerState } -+ STATUS current -+ DESCRIPTION -+ "The BGP Established event is generated when -+ the BGP FSM enters the ESTABLISHED state." -+ ::= { bgpTraps 1 } -+ -+ bgpBackwardTransition NOTIFICATION-TYPE -+ OBJECTS { bgpPeerRemoteAddr, -+ bgpPeerLastError, -+ bgpPeerState } -+ STATUS current -+ DESCRIPTION -+ "The BGPBackwardTransition Event is generated -+ when the BGP FSM moves from a higher numbered -+ state to a lower numbered state." -+ ::= { bgpTraps 2 } -+ -+ -- conformance information -+ -+ bgpMIBConformance OBJECT IDENTIFIER ::= { bgp 8 } -+ bgpMIBCompliances OBJECT IDENTIFIER ::= { bgpMIBConformance 1 } -+ bgpMIBGroups OBJECT IDENTIFIER ::= { bgpMIBConformance 2 } -+ -+ -- compliance statements -+ -+ bgpMIBCompliance MODULE-COMPLIANCE -+ STATUS current -+ DESCRIPTION -+ "The compliance statement for entities which -+ implement the BGP4 mib." -+ MODULE -- this module -+ MANDATORY-GROUPS { bgp4MIBGlobalsGroup, -+ bgp4MIBPeerGroup, -+ bgp4MIBPathAttrGroup, -+ bgp4MIBNotificationGroup } -+ ::= { bgpMIBCompliances 1 } -+ -+ -- units of conformance -+ -+ bgp4MIBGlobalsGroup OBJECT-GROUP -+ OBJECTS { bgpVersion, -+ bgpLocalAs, -+ bgpIdentifier } -+ STATUS current -+ DESCRIPTION -+ "A collection of objects providing information -+ on global BGP state." -+ ::= { bgpMIBGroups 1 } -+ -+ bgp4MIBPeerGroup OBJECT-GROUP -+ OBJECTS { bgpPeerIdentifier, -+ bgpPeerState, -+ bgpPeerAdminStatus, -+ bgpPeerNegotiatedVersion, -+ bgpPeerLocalAddr, -+ bgpPeerLocalPort, -+ bgpPeerRemoteAddr, -+ bgpPeerRemotePort, -+ bgpPeerRemoteAs, -+ bgpPeerInUpdates, -+ bgpPeerOutUpdates, -+ bgpPeerInTotalMessages, -+ bgpPeerOutTotalMessages, -+ bgpPeerLastError, -+ bgpPeerFsmEstablishedTransitions, -+ bgpPeerFsmEstablishedTime, -+ bgpPeerConnectRetryInterval, -+ bgpPeerHoldTime, -+ bgpPeerKeepAlive, -+ bgpPeerHoldTimeConfigured, -+ bgpPeerKeepAliveConfigured, -+ bgpPeerMinASOriginationInterval, -+ bgpPeerMinRouteAdvertisementInterval, -+ bgpPeerInUpdateElapsedTime } -+ STATUS current -+ DESCRIPTION -+ "A collection of objects for managing -+ BGP peers." -+ ::= { bgpMIBGroups 2 } -+ -+ bgp4MIBRcvdPathAttrGroup OBJECT-GROUP -+ OBJECTS { bgpPathAttrPeer, -+ bgpPathAttrDestNetwork, -+ bgpPathAttrOrigin, -+ bgpPathAttrASPath, -+ bgpPathAttrNextHop, -+ bgpPathAttrInterASMetric } -+ STATUS obsolete -+ DESCRIPTION -+ "A collection of objects for managing BGP -+ path entries. -+ -+ This conformance group is obsolete, -+ replaced by bgp4MIBPathAttrGroup." -+ ::= { bgpMIBGroups 3 } -+ -+ bgp4MIBPathAttrGroup OBJECT-GROUP -+ OBJECTS { bgp4PathAttrPeer, -+ bgp4PathAttrIpAddrPrefixLen, -+ bgp4PathAttrIpAddrPrefix, -+ bgp4PathAttrOrigin, -+ bgp4PathAttrASPathSegment, -+ bgp4PathAttrNextHop, -+ bgp4PathAttrMultiExitDisc, -+ bgp4PathAttrLocalPref, -+ bgp4PathAttrAtomicAggregate, -+ bgp4PathAttrAggregatorAS, -+ bgp4PathAttrAggregatorAddr, -+ bgp4PathAttrCalcLocalPref, -+ bgp4PathAttrBest, -+ bgp4PathAttrUnknown } -+ STATUS current -+ DESCRIPTION -+ "A collection of objects for managing -+ BGP path entries." -+ ::= { bgpMIBGroups 4 } -+ -+ bgp4MIBNotificationGroup NOTIFICATION-GROUP -+ NOTIFICATIONS { bgpEstablished, -+ bgpBackwardTransition } -+ STATUS current -+ DESCRIPTION -+ "A collection of notifications for signaling -+ changes in BGP peer relationships." -+ ::= { bgpMIBGroups 5 } -+ -+ END ---- /dev/null -+++ b/mibs/GNOME-SMI.txt -@@ -0,0 +1,88 @@ -+GNOME-SMI DEFINITIONS ::= BEGIN -+ -+IMPORTS -+ MODULE-IDENTITY, -+ OBJECT-IDENTITY, -+ enterprises -+ FROM SNMPv2-SMI; -+ -+gnome MODULE-IDENTITY -+ LAST-UPDATED "200709070000Z" -+ ORGANIZATION "GNOME project" -+ CONTACT-INFO -+ "GNU Network Object Model Environment project -+ -+ see http://www.gnome.org for contact persons of a particular -+ area or subproject of GNOME. -+ -+ Administrative contact for MIB module: -+ -+ Jochen Friedrich -+ Ramsaystr. 9 -+ 63450 Hanau -+ Germany -+ -+ email: jochen@scram.de" -+ DESCRIPTION -+ "The Structure of GNOME." -+ -+ -- revision history -+ -+ REVISION "200709070000Z" -- Sep 07, 2007 -+ DESCRIPTION -+ "Fixed wrong enterprise number (how comes this -+ typo was unnoticed for so long?)." -+ -+ REVISION "200505070000Z" -- May 07, 2005 -+ DESCRIPTION -+ "Added gnomeLDAP subtree for LDAP definitions." -+ -+ REVISION "200312070000Z" -- December 07, 2003 -+ DESCRIPTION -+ "Added gnomeSysadmin subtree for GNOME project system administration. -+ Updated contact info." -+ -+ REVISION "9809010000Z" -- September 01, 1998 -+ DESCRIPTION -+ "Initial version." -+ -+ ::= { enterprises 3319 } -- assigned by IANA -+ -+gnomeProducts OBJECT-IDENTITY -+ STATUS current -+ DESCRIPTION -+ "gnomeProducts is the root OBJECT IDENTIFIER from -+ which sysObjectID values are assigned." -+ ::= { gnome 1 } -+ -+gnomeMgmt OBJECT-IDENTITY -+ STATUS current -+ DESCRIPTION -+ "gnomeMgmt defines the subtree for production GNOME related -+ MIB registrations." -+ ::= { gnome 2 } -+ -+gnomeTest OBJECT-IDENTITY -+ STATUS current -+ DESCRIPTION -+ "gnomeTest defines the subtree for testing GNOME related -+ MIB registrations." -+ ::= { gnome 3 } -+ -+gnomeSysadmin OBJECT-IDENTITY -+ STATUS current -+ DESCRIPTION -+ "gnomeSysadmin defines the subtree for GNOME related Sysadmin -+ MIB registrations." -+ ::= { gnome 4 } -+ -+gnomeLDAP OBJECT-IDENTITY -+ STATUS current -+ DESCRIPTION -+ "gnomeLDAP defines the subtree for GNOME related LDAP -+ registrations." -+ ::= { gnome 5 } -+ -+-- more to come if necessary. -+ -+END ---- /dev/null -+++ b/mibs/OSPF-MIB.txt -@@ -0,0 +1,2723 @@ -+OSPF-MIB DEFINITIONS ::= BEGIN -+ -+ IMPORTS -+ MODULE-IDENTITY, OBJECT-TYPE, Counter32, Gauge32, -+ Integer32, IpAddress -+ FROM SNMPv2-SMI -+ TEXTUAL-CONVENTION, TruthValue, RowStatus -+ FROM SNMPv2-TC -+ MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF -+ mib-2 FROM RFC1213-MIB; -+ -+-- This MIB module uses the extended OBJECT-TYPE macro as -+-- defined in [9]. -+ -+ospf MODULE-IDENTITY -+ LAST-UPDATED "9501201225Z" -- Fri Jan 20 12:25:50 PST 1995 -+ ORGANIZATION "IETF OSPF Working Group" -+ CONTACT-INFO -+ " Fred Baker -+ Postal: Cisco Systems -+ 519 Lado Drive -+ Santa Barbara, California 93111 -+ Tel: +1 805 681 0115 -+ E-Mail: fred@cisco.com -+ -+ Rob Coltun -+ Postal: RainbowBridge Communications -+ Tel: (301) 340-9416 -+ E-Mail: rcoltun@rainbow-bridge.com" -+ DESCRIPTION -+ "The MIB module to describe the OSPF Version 2 -+ Protocol" -+ ::= { mib-2 14 } -+ -+-- The Area ID, in OSPF, has the same format as an IP Address, -+-- but has the function of defining a summarization point for -+-- Link State Advertisements -+ -+AreaID ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "An OSPF Area Identifier." -+ SYNTAX IpAddress -+ -+ -+-- The Router ID, in OSPF, has the same format as an IP Address, -+-- but identifies the router independent of its IP Address. -+ -+RouterID ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "A OSPF Router Identifier." -+ SYNTAX IpAddress -+ -+ -+-- The OSPF Metric is defined as an unsigned value in the range -+ -+Metric ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The OSPF Internal Metric." -+ SYNTAX Integer32 (0..'FFFF'h) -+ -+BigMetric ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The OSPF External Metric." -+ SYNTAX Integer32 (0..'FFFFFF'h) -+ -+-- Status Values -+ -+Status ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The status of an interface: 'enabled' indicates that -+ it is willing to communicate with other OSPF Routers, -+ while 'disabled' indicates that it is not." -+ SYNTAX INTEGER { enabled (1), disabled (2) } -+ -+-- Time Durations measured in seconds -+ -+PositiveInteger ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "A positive integer. Values in excess are precluded as -+ unnecessary and prone to interoperability issues." -+ SYNTAX Integer32 (0..'7FFFFFFF'h) -+ -+HelloRange ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The range of intervals on which hello messages are -+ exchanged." -+ SYNTAX Integer32 (1..'FFFF'h) -+ -+UpToMaxAge ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The values that one might find or configure for -+ variables bounded by the maximum age of an LSA." -+ SYNTAX Integer32 (0..3600) -+ -+ -+-- The range of ifIndex -+ -+InterfaceIndex ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The range of ifIndex." -+ SYNTAX Integer32 -+ -+ -+-- Potential Priorities for the Designated Router Election -+ -+DesignatedRouterPriority ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "The values defined for the priority of a system for -+ becoming the designated router." -+ SYNTAX Integer32 (0..'FF'h) -+ -+TOSType ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "Type of Service is defined as a mapping to the IP Type of -+ Service Flags as defined in the IP Forwarding Table MIB -+ -+ +-----+-----+-----+-----+-----+-----+-----+-----+ -+ | | | | -+ | PRECEDENCE | TYPE OF SERVICE | 0 | -+ | | | | -+ +-----+-----+-----+-----+-----+-----+-----+-----+ -+ -+ IP TOS IP TOS -+ Field Policy Field Policy -+ -+ Contents Code Contents Code -+ 0 0 0 0 ==> 0 0 0 0 1 ==> 2 -+ 0 0 1 0 ==> 4 0 0 1 1 ==> 6 -+ 0 1 0 0 ==> 8 0 1 0 1 ==> 10 -+ 0 1 1 0 ==> 12 0 1 1 1 ==> 14 -+ 1 0 0 0 ==> 16 1 0 0 1 ==> 18 -+ 1 0 1 0 ==> 20 1 0 1 1 ==> 22 -+ 1 1 0 0 ==> 24 1 1 0 1 ==> 26 -+ 1 1 1 0 ==> 28 1 1 1 1 ==> 30 -+ -+ The remaining values are left for future definition." -+ SYNTAX Integer32 (0..30) -+ -+ -+-- OSPF General Variables -+ -+-- These parameters apply globally to the Router's -+-- OSPF Process. -+ -+ospfGeneralGroup OBJECT IDENTIFIER ::= { ospf 1 } -+ -+ -+ ospfRouterId OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "A 32-bit integer uniquely identifying the -+ router in the Autonomous System. -+ -+ By convention, to ensure uniqueness, this -+ should default to the value of one of the -+ router's IP interface addresses." -+ REFERENCE -+ "OSPF Version 2, C.1 Global parameters" -+ ::= { ospfGeneralGroup 1 } -+ -+ -+ ospfAdminStat OBJECT-TYPE -+ SYNTAX Status -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The administrative status of OSPF in the -+ router. The value 'enabled' denotes that the -+ OSPF Process is active on at least one inter- -+ face; 'disabled' disables it on all inter- -+ faces." -+ ::= { ospfGeneralGroup 2 } -+ -+ ospfVersionNumber OBJECT-TYPE -+ SYNTAX INTEGER { version2 (2) } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The current version number of the OSPF proto- -+ col is 2." -+ REFERENCE -+ "OSPF Version 2, Title" -+ ::= { ospfGeneralGroup 3 } -+ -+ -+ ospfAreaBdrRtrStatus OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A flag to note whether this router is an area -+ border router." -+ REFERENCE -+ "OSPF Version 2, Section 3 Splitting the AS into -+ Areas" -+ ::= { ospfGeneralGroup 4 } -+ -+ -+ ospfASBdrRtrStatus OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "A flag to note whether this router is config- -+ ured as an Autonomous System border router." -+ REFERENCE -+ "OSPF Version 2, Section 3.3 Classification of -+ routers" -+ ::= { ospfGeneralGroup 5 } -+ -+ ospfExternLsaCount OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of external (LS type 5) link-state -+ advertisements in the link-state database." -+ REFERENCE -+ "OSPF Version 2, Appendix A.4.5 AS external link -+ advertisements" -+ ::= { ospfGeneralGroup 6 } -+ -+ -+ ospfExternLsaCksumSum OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32-bit unsigned sum of the LS checksums of -+ the external link-state advertisements con- -+ tained in the link-state database. This sum -+ can be used to determine if there has been a -+ change in a router's link state database, and -+ to compare the link-state database of two -+ routers." -+ ::= { ospfGeneralGroup 7 } -+ -+ -+ ospfTOSSupport OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The router's support for type-of-service rout- -+ ing." -+ REFERENCE -+ "OSPF Version 2, Appendix F.1.2 Optional TOS -+ support" -+ ::= { ospfGeneralGroup 8 } -+ -+ ospfOriginateNewLsas OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of new link-state advertisements -+ that have been originated. This number is in- -+ cremented each time the router originates a new -+ LSA." -+ ::= { ospfGeneralGroup 9 } -+ -+ -+ ospfRxNewLsas OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of link-state advertisements re- -+ ceived determined to be new instantiations. -+ This number does not include newer instantia- -+ tions of self-originated link-state advertise- -+ ments." -+ ::= { ospfGeneralGroup 10 } -+ -+ ospfExtLsdbLimit OBJECT-TYPE -+ SYNTAX Integer32 (-1..'7FFFFFFF'h) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The maximum number of non-default AS- -+ external-LSAs entries that can be stored in the -+ link-state database. If the value is -1, then -+ there is no limit. -+ -+ When the number of non-default AS-external-LSAs -+ in a router's link-state database reaches -+ ospfExtLsdbLimit, the router enters Overflow- -+ State. The router never holds more than -+ ospfExtLsdbLimit non-default AS-external-LSAs -+ in its database. OspfExtLsdbLimit MUST be set -+ identically in all routers attached to the OSPF -+ backbone and/or any regular OSPF area. (i.e., -+ OSPF stub areas and NSSAs are excluded)." -+ DEFVAL { -1 } -+ ::= { ospfGeneralGroup 11 } -+ -+ ospfMulticastExtensions OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "A Bit Mask indicating whether the router is -+ forwarding IP multicast (Class D) datagrams -+ based on the algorithms defined in the Multi- -+ cast Extensions to OSPF. -+ -+ Bit 0, if set, indicates that the router can -+ forward IP multicast datagrams in the router's -+ directly attached areas (called intra-area mul- -+ ticast routing). -+ -+ Bit 1, if set, indicates that the router can -+ forward IP multicast datagrams between OSPF -+ areas (called inter-area multicast routing). -+ -+ Bit 2, if set, indicates that the router can -+ forward IP multicast datagrams between Auto- -+ nomous Systems (called inter-AS multicast rout- -+ ing). -+ -+ Only certain combinations of bit settings are -+ allowed, namely: 0 (no multicast forwarding is -+ enabled), 1 (intra-area multicasting only), 3 -+ (intra-area and inter-area multicasting), 5 -+ (intra-area and inter-AS multicasting) and 7 -+ (multicasting everywhere). By default, no mul- -+ ticast forwarding is enabled." -+ DEFVAL { 0 } -+ ::= { ospfGeneralGroup 12 } -+ -+ ospfExitOverflowInterval OBJECT-TYPE -+ SYNTAX PositiveInteger -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The number of seconds that, after entering -+ OverflowState, a router will attempt to leave -+ OverflowState. This allows the router to again -+ originate non-default AS-external-LSAs. When -+ set to 0, the router will not leave Overflow- -+ State until restarted." -+ DEFVAL { 0 } -+ ::= { ospfGeneralGroup 13 } -+ -+ -+ ospfDemandExtensions OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "The router's support for demand routing." -+ REFERENCE -+ "OSPF Version 2, Appendix on Demand Routing" -+ ::= { ospfGeneralGroup 14 } -+ -+ -+-- The OSPF Area Data Structure contains information -+-- regarding the various areas. The interfaces and -+-- virtual links are configured as part of these areas. -+-- Area 0.0.0.0, by definition, is the Backbone Area -+ -+ -+ ospfAreaTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfAreaEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information describing the configured parame- -+ ters and cumulative statistics of the router's -+ attached areas." -+ REFERENCE -+ "OSPF Version 2, Section 6 The Area Data Struc- -+ ture" -+ ::= { ospf 2 } -+ -+ -+ ospfAreaEntry OBJECT-TYPE -+ SYNTAX OspfAreaEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information describing the configured parame- -+ ters and cumulative statistics of one of the -+ router's attached areas." -+ INDEX { ospfAreaId } -+ ::= { ospfAreaTable 1 } -+ -+OspfAreaEntry ::= -+ SEQUENCE { -+ ospfAreaId -+ AreaID, -+ ospfAuthType -+ Integer32, -+ ospfImportAsExtern -+ INTEGER, -+ ospfSpfRuns -+ Counter32, -+ ospfAreaBdrRtrCount -+ Gauge32, -+ ospfAsBdrRtrCount -+ Gauge32, -+ ospfAreaLsaCount -+ Gauge32, -+ ospfAreaLsaCksumSum -+ Integer32, -+ ospfAreaSummary -+ INTEGER, -+ ospfAreaStatus -+ RowStatus -+ } -+ -+ ospfAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A 32-bit integer uniquely identifying an area. -+ Area ID 0.0.0.0 is used for the OSPF backbone." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaEntry 1 } -+ -+ -+ ospfAuthType OBJECT-TYPE -+ SYNTAX Integer32 -+ -- none (0), -+ -- simplePassword (1) -+ -- md5 (2) -+ -- reserved for specification by IANA (> 2) -+ MAX-ACCESS read-create -+ STATUS obsolete -+ DESCRIPTION -+ "The authentication type specified for an area. -+ Additional authentication types may be assigned -+ locally on a per Area basis." -+ REFERENCE -+ "OSPF Version 2, Appendix E Authentication" -+ DEFVAL { 0 } -- no authentication, by default -+ ::= { ospfAreaEntry 2 } -+ -+ ospfImportAsExtern OBJECT-TYPE -+ SYNTAX INTEGER { -+ importExternal (1), -+ importNoExternal (2), -+ importNssa (3) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The area's support for importing AS external -+ link- state advertisements." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ DEFVAL { importExternal } -+ ::= { ospfAreaEntry 3 } -+ -+ -+ ospfSpfRuns OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of times that the intra-area route -+ table has been calculated using this area's -+ link-state database. This is typically done -+ using Dijkstra's algorithm." -+ ::= { ospfAreaEntry 4 } -+ -+ -+ ospfAreaBdrRtrCount OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of area border routers reach- -+ able within this area. This is initially zero, -+ and is calculated in each SPF Pass." -+ ::= { ospfAreaEntry 5 } -+ -+ ospfAsBdrRtrCount OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of Autonomous System border -+ routers reachable within this area. This is -+ initially zero, and is calculated in each SPF -+ Pass." -+ ::= { ospfAreaEntry 6 } -+ -+ -+ ospfAreaLsaCount OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The total number of link-state advertisements -+ in this area's link-state database, excluding -+ AS External LSA's." -+ ::= { ospfAreaEntry 7 } -+ -+ -+ ospfAreaLsaCksumSum OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32-bit unsigned sum of the link-state ad- -+ vertisements' LS checksums contained in this -+ area's link-state database. This sum excludes -+ external (LS type 5) link-state advertisements. -+ The sum can be used to determine if there has -+ been a change in a router's link state data- -+ base, and to compare the link-state database of -+ two routers." -+ DEFVAL { 0 } -+ ::= { ospfAreaEntry 8 } -+ -+ ospfAreaSummary OBJECT-TYPE -+ SYNTAX INTEGER { -+ noAreaSummary (1), -+ sendAreaSummary (2) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The variable ospfAreaSummary controls the im- -+ port of summary LSAs into stub areas. It has -+ no effect on other areas. -+ -+ If it is noAreaSummary, the router will neither -+ originate nor propagate summary LSAs into the -+ stub area. It will rely entirely on its de- -+ fault route. -+ -+ If it is sendAreaSummary, the router will both -+ summarize and propagate summary LSAs." -+ DEFVAL { noAreaSummary } -+ ::= { ospfAreaEntry 9 } -+ -+ -+ ospfAreaStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfAreaEntry 10 } -+ -+ -+-- OSPF Area Default Metric Table -+ -+-- The OSPF Area Default Metric Table describes the metrics -+-- that a default Area Border Router will advertise into a -+-- Stub area. -+ -+ -+ ospfStubAreaTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfStubAreaEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The set of metrics that will be advertised by -+ a default Area Border Router into a stub area." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2, Area Parameters" -+ ::= { ospf 3 } -+ -+ -+ ospfStubAreaEntry OBJECT-TYPE -+ SYNTAX OspfStubAreaEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The metric for a given Type of Service that -+ will be advertised by a default Area Border -+ Router into a stub area." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2, Area Parameters" -+ INDEX { ospfStubAreaId, ospfStubTOS } -+ ::= { ospfStubAreaTable 1 } -+ -+OspfStubAreaEntry ::= -+ SEQUENCE { -+ ospfStubAreaId -+ AreaID, -+ ospfStubTOS -+ TOSType, -+ ospfStubMetric -+ BigMetric, -+ ospfStubStatus -+ RowStatus, -+ ospfStubMetricType -+ INTEGER -+ } -+ -+ ospfStubAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32 bit identifier for the Stub Area. On -+ creation, this can be derived from the in- -+ stance." -+ ::= { ospfStubAreaEntry 1 } -+ -+ -+ ospfStubTOS OBJECT-TYPE -+ SYNTAX TOSType -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Type of Service associated with the -+ metric. On creation, this can be derived from -+ the instance." -+ ::= { ospfStubAreaEntry 2 } -+ -+ -+ ospfStubMetric OBJECT-TYPE -+ SYNTAX BigMetric -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The metric value applied at the indicated type -+ of service. By default, this equals the least -+ metric at the type of service among the inter- -+ faces to other areas." -+ ::= { ospfStubAreaEntry 3 } -+ -+ -+ ospfStubStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfStubAreaEntry 4 } -+ -+ ospfStubMetricType OBJECT-TYPE -+ SYNTAX INTEGER { -+ ospfMetric (1), -- OSPF Metric -+ comparableCost (2), -- external type 1 -+ nonComparable (3) -- external type 2 -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the type of metric ad- -+ vertised as a default route." -+ DEFVAL { ospfMetric } -+ ::= { ospfStubAreaEntry 5 } -+ -+-- OSPF Link State Database -+ -+-- The Link State Database contains the Link State -+-- Advertisements from throughout the areas that the -+-- device is attached to. -+ -+ -+ ospfLsdbTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfLsdbEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The OSPF Process's Link State Database." -+ REFERENCE -+ "OSPF Version 2, Section 12 Link State Adver- -+ tisements" -+ ::= { ospf 4 } -+ -+ -+ ospfLsdbEntry OBJECT-TYPE -+ SYNTAX OspfLsdbEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A single Link State Advertisement." -+ INDEX { ospfLsdbAreaId, ospfLsdbType, -+ ospfLsdbLsid, ospfLsdbRouterId } -+ ::= { ospfLsdbTable 1 } -+ -+OspfLsdbEntry ::= -+ SEQUENCE { -+ ospfLsdbAreaId -+ AreaID, -+ ospfLsdbType -+ INTEGER, -+ ospfLsdbLsid -+ IpAddress, -+ ospfLsdbRouterId -+ RouterID, -+ ospfLsdbSequence -+ Integer32, -+ ospfLsdbAge -+ Integer32, -+ ospfLsdbChecksum -+ Integer32, -+ ospfLsdbAdvertisement -+ OCTET STRING -+ } -+ ospfLsdbAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32 bit identifier of the Area from which -+ the LSA was received." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfLsdbEntry 1 } -+ -+-- External Link State Advertisements are permitted -+-- for backward compatibility, but should be displayed in -+-- the ospfExtLsdbTable rather than here. -+ -+ ospfLsdbType OBJECT-TYPE -+ SYNTAX INTEGER { -+ routerLink (1), -+ networkLink (2), -+ summaryLink (3), -+ asSummaryLink (4), -+ asExternalLink (5), -- but see ospfExtLsdbTable -+ multicastLink (6), -+ nssaExternalLink (7) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The type of the link state advertisement. -+ Each link state type has a separate advertise- -+ ment format." -+ REFERENCE -+ "OSPF Version 2, Appendix A.4.1 The Link State -+ Advertisement header" -+ ::= { ospfLsdbEntry 2 } -+ -+ ospfLsdbLsid OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Link State ID is an LS Type Specific field -+ containing either a Router ID or an IP Address; -+ it identifies the piece of the routing domain -+ that is being described by the advertisement." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.4 Link State ID" -+ ::= { ospfLsdbEntry 3 } -+ ospfLsdbRouterId OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32 bit number that uniquely identifies the -+ originating router in the Autonomous System." -+ REFERENCE -+ "OSPF Version 2, Appendix C.1 Global parameters" -+ ::= { ospfLsdbEntry 4 } -+ -+-- Note that the OSPF Sequence Number is a 32 bit signed -+-- integer. It starts with the value '80000001'h, -+-- or -'7FFFFFFF'h, and increments until '7FFFFFFF'h -+-- Thus, a typical sequence number will be very negative. -+ -+ ospfLsdbSequence OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The sequence number field is a signed 32-bit -+ integer. It is used to detect old and dupli- -+ cate link state advertisements. The space of -+ sequence numbers is linearly ordered. The -+ larger the sequence number the more recent the -+ advertisement." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.6 LS sequence -+ number" -+ ::= { ospfLsdbEntry 5 } -+ -+ -+ ospfLsdbAge OBJECT-TYPE -+ SYNTAX Integer32 -- Should be 0..MaxAge -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This field is the age of the link state adver- -+ tisement in seconds." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.1 LS age" -+ ::= { ospfLsdbEntry 6 } -+ -+ ospfLsdbChecksum OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This field is the checksum of the complete -+ contents of the advertisement, excepting the -+ age field. The age field is excepted so that -+ an advertisement's age can be incremented -+ without updating the checksum. The checksum -+ used is the same that is used for ISO connec- -+ tionless datagrams; it is commonly referred to -+ as the Fletcher checksum." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.7 LS checksum" -+ ::= { ospfLsdbEntry 7 } -+ -+ -+ ospfLsdbAdvertisement OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (1..65535)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The entire Link State Advertisement, including -+ its header." -+ REFERENCE -+ "OSPF Version 2, Section 12 Link State Adver- -+ tisements" -+ ::= { ospfLsdbEntry 8 } -+ -+ -+-- Address Range Table -+ -+-- The Address Range Table acts as an adjunct to the Area -+-- Table; It describes those Address Range Summaries that -+-- are configured to be propagated from an Area to reduce -+-- the amount of information about it which is known beyond -+-- its borders. -+ -+ ospfAreaRangeTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfAreaRangeEntry -+ MAX-ACCESS not-accessible -+ STATUS obsolete -+ DESCRIPTION -+ "A range if IP addresses specified by an IP -+ address/IP network mask pair. For example, -+ class B address range of X.X.X.X with a network -+ mask of 255.255.0.0 includes all IP addresses -+ from X.X.0.0 to X.X.255.255" -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospf 5 } -+ ospfAreaRangeEntry OBJECT-TYPE -+ SYNTAX OspfAreaRangeEntry -+ MAX-ACCESS not-accessible -+ STATUS obsolete -+ DESCRIPTION -+ "A range if IP addresses specified by an IP -+ address/IP network mask pair. For example, -+ class B address range of X.X.X.X with a network -+ mask of 255.255.0.0 includes all IP addresses -+ from X.X.0.0 to X.X.255.255" -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ INDEX { ospfAreaRangeAreaId, ospfAreaRangeNet } -+ ::= { ospfAreaRangeTable 1 } -+ -+OspfAreaRangeEntry ::= -+ SEQUENCE { -+ ospfAreaRangeAreaId -+ AreaID, -+ ospfAreaRangeNet -+ IpAddress, -+ ospfAreaRangeMask -+ IpAddress, -+ ospfAreaRangeStatus -+ RowStatus, -+ ospfAreaRangeEffect -+ INTEGER -+ } -+ -+ ospfAreaRangeAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The Area the Address Range is to be found -+ within." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaRangeEntry 1 } -+ -+ -+ ospfAreaRangeNet OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS obsolete -+ DESCRIPTION -+ "The IP Address of the Net or Subnet indicated -+ by the range." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaRangeEntry 2 } -+ -+ -+ ospfAreaRangeMask OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-create -+ STATUS obsolete -+ DESCRIPTION -+ "The Subnet Mask that pertains to the Net or -+ Subnet." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaRangeEntry 3 } -+ -+ ospfAreaRangeStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS obsolete -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfAreaRangeEntry 4 } -+ -+ -+ ospfAreaRangeEffect OBJECT-TYPE -+ SYNTAX INTEGER { -+ advertiseMatching (1), -+ doNotAdvertiseMatching (2) -+ } -+ MAX-ACCESS read-create -+ STATUS obsolete -+ DESCRIPTION -+ "Subnets subsumed by ranges either trigger the -+ advertisement of the indicated summary (adver- -+ tiseMatching), or result in the subnet's not -+ being advertised at all outside the area." -+ DEFVAL { advertiseMatching } -+ ::= { ospfAreaRangeEntry 5 } -+ -+ -+ -+-- OSPF Host Table -+ -+-- The Host/Metric Table indicates what hosts are directly -+-- attached to the Router, and what metrics and types of -+-- service should be advertised for them. -+ -+ ospfHostTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfHostEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The list of Hosts, and their metrics, that the -+ router will advertise as host routes." -+ REFERENCE -+ "OSPF Version 2, Appendix C.6 Host route param- -+ eters" -+ ::= { ospf 6 } -+ -+ -+ ospfHostEntry OBJECT-TYPE -+ SYNTAX OspfHostEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A metric to be advertised, for a given type of -+ service, when a given host is reachable." -+ INDEX { ospfHostIpAddress, ospfHostTOS } -+ ::= { ospfHostTable 1 } -+ -+OspfHostEntry ::= -+ SEQUENCE { -+ ospfHostIpAddress -+ IpAddress, -+ ospfHostTOS -+ TOSType, -+ ospfHostMetric -+ Metric, -+ ospfHostStatus -+ RowStatus, -+ ospfHostAreaID -+ AreaID -+ } -+ -+ ospfHostIpAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of the Host." -+ REFERENCE -+ "OSPF Version 2, Appendix C.6 Host route parame- -+ ters" -+ ::= { ospfHostEntry 1 } -+ -+ -+ ospfHostTOS OBJECT-TYPE -+ SYNTAX TOSType -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Type of Service of the route being config- -+ ured." -+ REFERENCE -+ "OSPF Version 2, Appendix C.6 Host route parame- -+ ters" -+ ::= { ospfHostEntry 2 } -+ -+ -+ ospfHostMetric OBJECT-TYPE -+ SYNTAX Metric -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The Metric to be advertised." -+ REFERENCE -+ "OSPF Version 2, Appendix C.6 Host route parame- -+ ters" -+ ::= { ospfHostEntry 3 } -+ -+ ospfHostStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfHostEntry 4 } -+ -+ -+ ospfHostAreaID OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Area the Host Entry is to be found within. -+ By default, the area that a subsuming OSPF in- -+ terface is in, or 0.0.0.0" -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfHostEntry 5 } -+ -+ -+-- OSPF Interface Table -+ -+-- The OSPF Interface Table augments the ipAddrTable -+-- with OSPF specific information. -+ -+ ospfIfTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfIfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The OSPF Interface Table describes the inter- -+ faces from the viewpoint of OSPF." -+ REFERENCE -+ "OSPF Version 2, Appendix C.3 Router interface -+ parameters" -+ ::= { ospf 7 } -+ -+ -+ ospfIfEntry OBJECT-TYPE -+ SYNTAX OspfIfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The OSPF Interface Entry describes one inter- -+ face from the viewpoint of OSPF." -+ INDEX { ospfIfIpAddress, ospfAddressLessIf } -+ ::= { ospfIfTable 1 } -+ -+OspfIfEntry ::= -+ SEQUENCE { -+ ospfIfIpAddress -+ IpAddress, -+ ospfAddressLessIf -+ Integer32, -+ ospfIfAreaId -+ AreaID, -+ ospfIfType -+ INTEGER, -+ ospfIfAdminStat -+ Status, -+ ospfIfRtrPriority -+ DesignatedRouterPriority, -+ ospfIfTransitDelay -+ UpToMaxAge, -+ ospfIfRetransInterval -+ UpToMaxAge, -+ ospfIfHelloInterval -+ HelloRange, -+ ospfIfRtrDeadInterval -+ PositiveInteger, -+ ospfIfPollInterval -+ PositiveInteger, -+ ospfIfState -+ INTEGER, -+ ospfIfDesignatedRouter -+ IpAddress, -+ ospfIfBackupDesignatedRouter -+ IpAddress, -+ ospfIfEvents -+ Counter32, -+ ospfIfAuthType -+ INTEGER, -+ ospfIfAuthKey -+ OCTET STRING, -+ ospfIfStatus -+ RowStatus, -+ ospfIfMulticastForwarding -+ INTEGER, -+ ospfIfDemand -+ TruthValue -+ } -+ -+ ospfIfIpAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address of this OSPF interface." -+ ::= { ospfIfEntry 1 } -+ -+ ospfAddressLessIf OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "For the purpose of easing the instancing of -+ addressed and addressless interfaces; This -+ variable takes the value 0 on interfaces with -+ IP Addresses, and the corresponding value of -+ ifIndex for interfaces having no IP Address." -+ ::= { ospfIfEntry 2 } -+ ospfIfAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "A 32-bit integer uniquely identifying the area -+ to which the interface connects. Area ID -+ 0.0.0.0 is used for the OSPF backbone." -+ DEFVAL { '00000000'H } -- 0.0.0.0 -+ ::= { ospfIfEntry 3 } -+ -+ ospfIfType OBJECT-TYPE -+ SYNTAX INTEGER { -+ broadcast (1), -+ nbma (2), -+ pointToPoint (3), -+ pointToMultipoint (5) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The OSPF interface type. -+ -+ By way of a default, this field may be intuited -+ from the corresponding value of ifType. Broad- -+ cast LANs, such as Ethernet and IEEE 802.5, -+ take the value 'broadcast', X.25 and similar -+ technologies take the value 'nbma', and links -+ that are definitively point to point take the -+ value 'pointToPoint'." -+ ::= { ospfIfEntry 4 } -+ -+ -+ ospfIfAdminStat OBJECT-TYPE -+ SYNTAX Status -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The OSPF interface's administrative status. -+ The value formed on the interface, and the in- -+ terface will be advertised as an internal route -+ to some area. The value 'disabled' denotes -+ that the interface is external to OSPF." -+ DEFVAL { enabled } -+ ::= { ospfIfEntry 5 } -+ -+ ospfIfRtrPriority OBJECT-TYPE -+ SYNTAX DesignatedRouterPriority -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The priority of this interface. Used in -+ multi-access networks, this field is used in -+ the designated router election algorithm. The -+ value 0 signifies that the router is not eligi- -+ ble to become the designated router on this -+ particular network. In the event of a tie in -+ this value, routers will use their Router ID as -+ a tie breaker." -+ DEFVAL { 1 } -+ ::= { ospfIfEntry 6 } -+ -+ -+ ospfIfTransitDelay OBJECT-TYPE -+ SYNTAX UpToMaxAge -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The estimated number of seconds it takes to -+ transmit a link state update packet over this -+ interface." -+ DEFVAL { 1 } -+ ::= { ospfIfEntry 7 } -+ -+ -+ ospfIfRetransInterval OBJECT-TYPE -+ SYNTAX UpToMaxAge -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The number of seconds between link-state ad- -+ vertisement retransmissions, for adjacencies -+ belonging to this interface. This value is -+ also used when retransmitting database descrip- -+ tion and link-state request packets." -+ DEFVAL { 5 } -+ ::= { ospfIfEntry 8 } -+ -+ -+ ospfIfHelloInterval OBJECT-TYPE -+ SYNTAX HelloRange -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The length of time, in seconds, between the -+ Hello packets that the router sends on the in- -+ terface. This value must be the same for all -+ routers attached to a common network." -+ DEFVAL { 10 } -+ ::= { ospfIfEntry 9 } -+ -+ -+ ospfIfRtrDeadInterval OBJECT-TYPE -+ SYNTAX PositiveInteger -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The number of seconds that a router's Hello -+ packets have not been seen before it's neigh- -+ bors declare the router down. This should be -+ some multiple of the Hello interval. This -+ value must be the same for all routers attached -+ to a common network." -+ DEFVAL { 40 } -+ ::= { ospfIfEntry 10 } -+ -+ -+ ospfIfPollInterval OBJECT-TYPE -+ SYNTAX PositiveInteger -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The larger time interval, in seconds, between -+ the Hello packets sent to an inactive non- -+ broadcast multi- access neighbor." -+ DEFVAL { 120 } -+ ::= { ospfIfEntry 11 } -+ -+ -+ ospfIfState OBJECT-TYPE -+ SYNTAX INTEGER { -+ down (1), -+ loopback (2), -+ waiting (3), -+ pointToPoint (4), -+ designatedRouter (5), -+ backupDesignatedRouter (6), -+ otherDesignatedRouter (7) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The OSPF Interface State." -+ DEFVAL { down } -+ ::= { ospfIfEntry 12 } -+ -+ -+ ospfIfDesignatedRouter OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of the Designated Router." -+ DEFVAL { '00000000'H } -- 0.0.0.0 -+ ::= { ospfIfEntry 13 } -+ -+ -+ ospfIfBackupDesignatedRouter OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of the Backup Designated -+ Router." -+ DEFVAL { '00000000'H } -- 0.0.0.0 -+ ::= { ospfIfEntry 14 } -+ -+ ospfIfEvents OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of times this OSPF interface has -+ changed its state, or an error has occurred." -+ ::= { ospfIfEntry 15 } -+ -+ -+ ospfIfAuthKey OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE (0..256)) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The Authentication Key. If the Area's Author- -+ ization Type is simplePassword, and the key -+ length is shorter than 8 octets, the agent will -+ left adjust and zero fill to 8 octets. -+ -+ Note that unauthenticated interfaces need no -+ authentication key, and simple password authen- -+ tication cannot use a key of more than 8 oc- -+ tets. Larger keys are useful only with authen- -+ tication mechanisms not specified in this docu- -+ ment. -+ -+ When read, ospfIfAuthKey always returns an Oc- -+ tet String of length zero." -+ REFERENCE -+ "OSPF Version 2, Section 9 The Interface Data -+ Structure" -+ DEFVAL { '0000000000000000'H } -- 0.0.0.0.0.0.0.0 -+ ::= { ospfIfEntry 16 } -+ -+ ospfIfStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfIfEntry 17 } -+ -+ -+ ospfIfMulticastForwarding OBJECT-TYPE -+ SYNTAX INTEGER { -+ blocked (1), -- no multicast forwarding -+ multicast (2), -- using multicast address -+ unicast (3) -- to each OSPF neighbor -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The way multicasts should forwarded on this -+ interface; not forwarded, forwarded as data -+ link multicasts, or forwarded as data link uni- -+ casts. Data link multicasting is not meaning- -+ ful on point to point and NBMA interfaces, and -+ setting ospfMulticastForwarding to 0 effective- -+ ly disables all multicast forwarding." -+ DEFVAL { blocked } -+ ::= { ospfIfEntry 18 } -+ -+ -+ ospfIfDemand OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "Indicates whether Demand OSPF procedures (hel- -+ lo supression to FULL neighbors and setting the -+ DoNotAge flag on proogated LSAs) should be per- -+ formed on this interface." -+ DEFVAL { false } -+ ::= { ospfIfEntry 19 } -+ -+ -+ ospfIfAuthType OBJECT-TYPE -+ SYNTAX INTEGER (0..255) -+ -- none (0), -+ -- simplePassword (1) -+ -- md5 (2) -+ -- reserved for specification by IANA (> 2) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The authentication type specified for an in- -+ terface. Additional authentication types may -+ be assigned locally." -+ REFERENCE -+ "OSPF Version 2, Appendix E Authentication" -+ DEFVAL { 0 } -- no authentication, by default -+ ::= { ospfIfEntry 20 } -+ -+ -+-- OSPF Interface Metric Table -+ -+-- The Metric Table describes the metrics to be advertised -+-- for a specified interface at the various types of service. -+-- As such, this table is an adjunct of the OSPF Interface -+-- Table. -+ -+-- Types of service, as defined by RFC 791, have the ability -+-- to request low delay, high bandwidth, or reliable linkage. -+ -+-- For the purposes of this specification, the measure of -+-- bandwidth -+ -+-- Metric = 10^8 / ifSpeed -+ -+-- is the default value. For multiple link interfaces, note -+-- that ifSpeed is the sum of the individual link speeds. -+-- This yields a number having the following typical values: -+ -+-- Network Type/bit rate Metric -+ -+-- >= 100 MBPS 1 -+-- Ethernet/802.3 10 -+-- E1 48 -+-- T1 (ESF) 65 -+-- 64 KBPS 1562 -+-- 56 KBPS 1785 -+-- 19.2 KBPS 5208 -+-- 9.6 KBPS 10416 -+ -+-- Routes that are not specified use the default (TOS 0) metric -+ -+ ospfIfMetricTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfIfMetricEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The TOS metrics for a non-virtual interface -+ identified by the interface index." -+ REFERENCE -+ "OSPF Version 2, Appendix C.3 Router interface -+ parameters" -+ ::= { ospf 8 } -+ -+ ospfIfMetricEntry OBJECT-TYPE -+ SYNTAX OspfIfMetricEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A particular TOS metric for a non-virtual in- -+ terface identified by the interface index." -+ REFERENCE -+ "OSPF Version 2, Appendix C.3 Router interface -+ parameters" -+ INDEX { ospfIfMetricIpAddress, -+ ospfIfMetricAddressLessIf, -+ ospfIfMetricTOS } -+ ::= { ospfIfMetricTable 1 } -+ -+OspfIfMetricEntry ::= -+ SEQUENCE { -+ ospfIfMetricIpAddress -+ IpAddress, -+ ospfIfMetricAddressLessIf -+ Integer32, -+ ospfIfMetricTOS -+ TOSType, -+ ospfIfMetricValue -+ Metric, -+ ospfIfMetricStatus -+ RowStatus -+ } -+ -+ ospfIfMetricIpAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address of this OSPF interface. On row -+ creation, this can be derived from the in- -+ stance." -+ ::= { ospfIfMetricEntry 1 } -+ -+ ospfIfMetricAddressLessIf OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "For the purpose of easing the instancing of -+ addressed and addressless interfaces; This -+ variable takes the value 0 on interfaces with -+ IP Addresses, and the value of ifIndex for in- -+ terfaces having no IP Address. On row crea- -+ tion, this can be derived from the instance." -+ ::= { ospfIfMetricEntry 2 } -+ -+ -+ ospfIfMetricTOS OBJECT-TYPE -+ SYNTAX TOSType -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The type of service metric being referenced. -+ On row creation, this can be derived from the -+ instance." -+ ::= { ospfIfMetricEntry 3 } -+ -+ -+ ospfIfMetricValue OBJECT-TYPE -+ SYNTAX Metric -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The metric of using this type of service on -+ this interface. The default value of the TOS 0 -+ Metric is 10^8 / ifSpeed." -+ ::= { ospfIfMetricEntry 4 } -+ -+ ospfIfMetricStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfIfMetricEntry 5 } -+ -+ -+-- OSPF Virtual Interface Table -+ -+-- The Virtual Interface Table describes the virtual -+-- links that the OSPF Process is configured to -+-- carry on. -+ -+ ospfVirtIfTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfVirtIfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information about this router's virtual inter- -+ faces." -+ REFERENCE -+ "OSPF Version 2, Appendix C.4 Virtual link -+ parameters" -+ ::= { ospf 9 } -+ -+ -+ ospfVirtIfEntry OBJECT-TYPE -+ SYNTAX OspfVirtIfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information about a single Virtual Interface." -+ INDEX { ospfVirtIfAreaId, ospfVirtIfNeighbor } -+ ::= { ospfVirtIfTable 1 } -+ -+OspfVirtIfEntry ::= -+ SEQUENCE { -+ ospfVirtIfAreaId -+ AreaID, -+ ospfVirtIfNeighbor -+ RouterID, -+ ospfVirtIfTransitDelay -+ UpToMaxAge, -+ ospfVirtIfRetransInterval -+ UpToMaxAge, -+ ospfVirtIfHelloInterval -+ HelloRange, -+ ospfVirtIfRtrDeadInterval -+ PositiveInteger, -+ ospfVirtIfState -+ INTEGER, -+ ospfVirtIfEvents -+ Counter32, -+ ospfVirtIfAuthType -+ INTEGER, -+ ospfVirtIfAuthKey -+ OCTET STRING, -+ ospfVirtIfStatus -+ RowStatus -+ } -+ -+ ospfVirtIfAreaId OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Transit Area that the Virtual Link -+ traverses. By definition, this is not 0.0.0.0" -+ ::= { ospfVirtIfEntry 1 } -+ -+ -+ ospfVirtIfNeighbor OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Router ID of the Virtual Neighbor." -+ ::= { ospfVirtIfEntry 2 } -+ -+ -+ ospfVirtIfTransitDelay OBJECT-TYPE -+ SYNTAX UpToMaxAge -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The estimated number of seconds it takes to -+ transmit a link- state update packet over this -+ interface." -+ DEFVAL { 1 } -+ ::= { ospfVirtIfEntry 3 } -+ -+ -+ ospfVirtIfRetransInterval OBJECT-TYPE -+ SYNTAX UpToMaxAge -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The number of seconds between link-state ad- -+ vertisement retransmissions, for adjacencies -+ belonging to this interface. This value is -+ also used when retransmitting database descrip- -+ tion and link-state request packets. This -+ value should be well over the expected round- -+ trip time." -+ DEFVAL { 5 } -+ ::= { ospfVirtIfEntry 4 } -+ -+ -+ ospfVirtIfHelloInterval OBJECT-TYPE -+ SYNTAX HelloRange -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The length of time, in seconds, between the -+ Hello packets that the router sends on the in- -+ terface. This value must be the same for the -+ virtual neighbor." -+ DEFVAL { 10 } -+ ::= { ospfVirtIfEntry 5 } -+ -+ -+ ospfVirtIfRtrDeadInterval OBJECT-TYPE -+ SYNTAX PositiveInteger -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The number of seconds that a router's Hello -+ packets have not been seen before it's neigh- -+ bors declare the router down. This should be -+ some multiple of the Hello interval. This -+ value must be the same for the virtual neigh- -+ bor." -+ DEFVAL { 60 } -+ ::= { ospfVirtIfEntry 6 } -+ -+ -+ ospfVirtIfState OBJECT-TYPE -+ SYNTAX INTEGER { -+ down (1), -- these use the same encoding -+ pointToPoint (4) -- as the ospfIfTable -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "OSPF virtual interface states." -+ DEFVAL { down } -+ ::= { ospfVirtIfEntry 7 } -+ -+ -+ ospfVirtIfEvents OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of state changes or error events on -+ this Virtual Link" -+ ::= { ospfVirtIfEntry 8 } -+ -+ -+ ospfVirtIfAuthKey OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE(0..256)) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "If Authentication Type is simplePassword, the -+ device will left adjust and zero fill to 8 oc- -+ tets. -+ -+ Note that unauthenticated interfaces need no -+ authentication key, and simple password authen- -+ tication cannot use a key of more than 8 oc- -+ tets. Larger keys are useful only with authen- -+ tication mechanisms not specified in this docu- -+ ment. -+ -+ When read, ospfVifAuthKey always returns a -+ string of length zero." -+ REFERENCE -+ "OSPF Version 2, Section 9 The Interface Data -+ Structure" -+ DEFVAL { '0000000000000000'H } -- 0.0.0.0.0.0.0.0 -+ ::= { ospfVirtIfEntry 9 } -+ -+ -+ ospfVirtIfStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfVirtIfEntry 10 } -+ -+ -+ ospfVirtIfAuthType OBJECT-TYPE -+ SYNTAX INTEGER (0..255) -+ -- none (0), -+ -- simplePassword (1) -+ -- md5 (2) -+ -- reserved for specification by IANA (> 2) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The authentication type specified for a virtu- -+ al interface. Additional authentication types -+ may be assigned locally." -+ REFERENCE -+ "OSPF Version 2, Appendix E Authentication" -+ DEFVAL { 0 } -- no authentication, by default -+ ::= { ospfVirtIfEntry 11 } -+ -+ -+-- OSPF Neighbor Table -+ -+-- The OSPF Neighbor Table describes all neighbors in -+-- the locality of the subject router. -+ -+ ospfNbrTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfNbrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A table of non-virtual neighbor information." -+ REFERENCE -+ "OSPF Version 2, Section 10 The Neighbor Data -+ Structure" -+ ::= { ospf 10 } -+ -+ -+ ospfNbrEntry OBJECT-TYPE -+ SYNTAX OspfNbrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The information regarding a single neighbor." -+ REFERENCE -+ "OSPF Version 2, Section 10 The Neighbor Data -+ Structure" -+ INDEX { ospfNbrIpAddr, ospfNbrAddressLessIndex } -+ ::= { ospfNbrTable 1 } -+ -+OspfNbrEntry ::= -+ SEQUENCE { -+ ospfNbrIpAddr -+ IpAddress, -+ ospfNbrAddressLessIndex -+ InterfaceIndex, -+ ospfNbrRtrId -+ RouterID, -+ ospfNbrOptions -+ Integer32, -+ ospfNbrPriority -+ DesignatedRouterPriority, -+ ospfNbrState -+ INTEGER, -+ ospfNbrEvents -+ Counter32, -+ ospfNbrLsRetransQLen -+ Gauge32, -+ ospfNbmaNbrStatus -+ RowStatus, -+ ospfNbmaNbrPermanence -+ INTEGER, -+ ospfNbrHelloSuppressed -+ TruthValue -+ } -+ -+ ospfNbrIpAddr OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address this neighbor is using in its -+ IP Source Address. Note that, on addressless -+ links, this will not be 0.0.0.0, but the ad- -+ dress of another of the neighbor's interfaces." -+ ::= { ospfNbrEntry 1 } -+ -+ -+ ospfNbrAddressLessIndex OBJECT-TYPE -+ SYNTAX InterfaceIndex -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "On an interface having an IP Address, zero. -+ On addressless interfaces, the corresponding -+ value of ifIndex in the Internet Standard MIB. -+ On row creation, this can be derived from the -+ instance." -+ ::= { ospfNbrEntry 2 } -+ -+ -+ ospfNbrRtrId OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A 32-bit integer (represented as a type IpAd- -+ dress) uniquely identifying the neighboring -+ router in the Autonomous System." -+ DEFVAL { '00000000'H } -- 0.0.0.0 -+ ::= { ospfNbrEntry 3 } -+ -+ -+ ospfNbrOptions OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A Bit Mask corresponding to the neighbor's op- -+ tions field. -+ -+ Bit 0, if set, indicates that the system will -+ operate on Type of Service metrics other than -+ TOS 0. If zero, the neighbor will ignore all -+ metrics except the TOS 0 metric. -+ -+ Bit 1, if set, indicates that the associated -+ area accepts and operates on external informa- -+ tion; if zero, it is a stub area. -+ -+ Bit 2, if set, indicates that the system is ca- -+ pable of routing IP Multicast datagrams; i.e., -+ that it implements the Multicast Extensions to -+ OSPF. -+ -+ Bit 3, if set, indicates that the associated -+ area is an NSSA. These areas are capable of -+ carrying type 7 external advertisements, which -+ are translated into type 5 external advertise- -+ ments at NSSA borders." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.2 Options" -+ DEFVAL { 0 } -+ ::= { ospfNbrEntry 4 } -+ -+ -+ ospfNbrPriority OBJECT-TYPE -+ SYNTAX DesignatedRouterPriority -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The priority of this neighbor in the designat- -+ ed router election algorithm. The value 0 sig- -+ nifies that the neighbor is not eligible to be- -+ come the designated router on this particular -+ network." -+ DEFVAL { 1 } -+ ::= { ospfNbrEntry 5 } -+ -+ -+ ospfNbrState OBJECT-TYPE -+ SYNTAX INTEGER { -+ down (1), -+ attempt (2), -+ init (3), -+ twoWay (4), -+ exchangeStart (5), -+ exchange (6), -+ loading (7), -+ full (8) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The State of the relationship with this Neigh- -+ bor." -+ REFERENCE -+ "OSPF Version 2, Section 10.1 Neighbor States" -+ DEFVAL { down } -+ ::= { ospfNbrEntry 6 } -+ -+ -+ ospfNbrEvents OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of times this neighbor relationship -+ has changed state, or an error has occurred." -+ ::= { ospfNbrEntry 7 } -+ -+ -+ ospfNbrLsRetransQLen OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The current length of the retransmission -+ queue." -+ ::= { ospfNbrEntry 8 } -+ -+ -+ ospfNbmaNbrStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfNbrEntry 9 } -+ -+ -+ ospfNbmaNbrPermanence OBJECT-TYPE -+ SYNTAX INTEGER { -+ dynamic (1), -- learned through protocol -+ permanent (2) -- configured address -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. 'dynamic' and 'permanent' refer to how -+ the neighbor became known." -+ DEFVAL { permanent } -+ ::= { ospfNbrEntry 10 } -+ -+ -+ ospfNbrHelloSuppressed OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Indicates whether Hellos are being suppressed -+ to the neighbor" -+ ::= { ospfNbrEntry 11 } -+ -+ -+-- OSPF Virtual Neighbor Table -+ -+-- This table describes all virtual neighbors. -+-- Since Virtual Links are configured in the -+-- virtual interface table, this table is read-only. -+ -+ ospfVirtNbrTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfVirtNbrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A table of virtual neighbor information." -+ REFERENCE -+ "OSPF Version 2, Section 15 Virtual Links" -+ ::= { ospf 11 } -+ -+ -+ ospfVirtNbrEntry OBJECT-TYPE -+ SYNTAX OspfVirtNbrEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Virtual neighbor information." -+ INDEX { ospfVirtNbrArea, ospfVirtNbrRtrId } -+ ::= { ospfVirtNbrTable 1 } -+ -+OspfVirtNbrEntry ::= -+ SEQUENCE { -+ ospfVirtNbrArea -+ AreaID, -+ ospfVirtNbrRtrId -+ RouterID, -+ ospfVirtNbrIpAddr -+ IpAddress, -+ ospfVirtNbrOptions -+ Integer32, -+ ospfVirtNbrState -+ INTEGER, -+ ospfVirtNbrEvents -+ Counter32, -+ ospfVirtNbrLsRetransQLen -+ Gauge32, -+ ospfVirtNbrHelloSuppressed -+ TruthValue -+ } -+ -+ ospfVirtNbrArea OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Transit Area Identifier." -+ ::= { ospfVirtNbrEntry 1 } -+ -+ -+ ospfVirtNbrRtrId OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A 32-bit integer uniquely identifying the -+ neighboring router in the Autonomous System." -+ ::= { ospfVirtNbrEntry 2 } -+ -+ -+ ospfVirtNbrIpAddr OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address this Virtual Neighbor is us- -+ ing." -+ ::= { ospfVirtNbrEntry 3 } -+ -+ -+ ospfVirtNbrOptions OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "A Bit Mask corresponding to the neighbor's op- -+ tions field. -+ -+ Bit 1, if set, indicates that the system will -+ operate on Type of Service metrics other than -+ TOS 0. If zero, the neighbor will ignore all -+ metrics except the TOS 0 metric. -+ -+ Bit 2, if set, indicates that the system is -+ Network Multicast capable; ie, that it imple- -+ ments OSPF Multicast Routing." -+ ::= { ospfVirtNbrEntry 4 } -+ ospfVirtNbrState OBJECT-TYPE -+ SYNTAX INTEGER { -+ down (1), -+ attempt (2), -+ init (3), -+ twoWay (4), -+ exchangeStart (5), -+ exchange (6), -+ loading (7), -+ full (8) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The state of the Virtual Neighbor Relation- -+ ship." -+ ::= { ospfVirtNbrEntry 5 } -+ -+ -+ ospfVirtNbrEvents OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of times this virtual link has -+ changed its state, or an error has occurred." -+ ::= { ospfVirtNbrEntry 6 } -+ -+ -+ ospfVirtNbrLsRetransQLen OBJECT-TYPE -+ SYNTAX Gauge32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The current length of the retransmission -+ queue." -+ ::= { ospfVirtNbrEntry 7 } -+ -+ -+ ospfVirtNbrHelloSuppressed OBJECT-TYPE -+ SYNTAX TruthValue -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Indicates whether Hellos are being suppressed -+ to the neighbor" -+ ::= { ospfVirtNbrEntry 8 } -+ -+-- OSPF Link State Database, External -+ -+-- The Link State Database contains the Link State -+-- Advertisements from throughout the areas that the -+-- device is attached to. -+ -+-- This table is identical to the OSPF LSDB Table in -+-- format, but contains only External Link State -+-- Advertisements. The purpose is to allow external -+-- LSAs to be displayed once for the router rather -+-- than once in each non-stub area. -+ -+ ospfExtLsdbTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfExtLsdbEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "The OSPF Process's Links State Database." -+ REFERENCE -+ "OSPF Version 2, Section 12 Link State Adver- -+ tisements" -+ ::= { ospf 12 } -+ -+ -+ ospfExtLsdbEntry OBJECT-TYPE -+ SYNTAX OspfExtLsdbEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A single Link State Advertisement." -+ INDEX { ospfExtLsdbType, ospfExtLsdbLsid, ospfExtLsdbRouterId } -+ ::= { ospfExtLsdbTable 1 } -+ -+OspfExtLsdbEntry ::= -+ SEQUENCE { -+ ospfExtLsdbType -+ INTEGER, -+ ospfExtLsdbLsid -+ IpAddress, -+ ospfExtLsdbRouterId -+ RouterID, -+ ospfExtLsdbSequence -+ Integer32, -+ ospfExtLsdbAge -+ Integer32, -+ ospfExtLsdbChecksum -+ Integer32, -+ ospfExtLsdbAdvertisement -+ OCTET STRING -+ } -+ -+ ospfExtLsdbType OBJECT-TYPE -+ SYNTAX INTEGER { -+ asExternalLink (5) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The type of the link state advertisement. -+ Each link state type has a separate advertise- -+ ment format." -+ REFERENCE -+ "OSPF Version 2, Appendix A.4.1 The Link State -+ Advertisement header" -+ ::= { ospfExtLsdbEntry 1 } -+ -+ -+ ospfExtLsdbLsid OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Link State ID is an LS Type Specific field -+ containing either a Router ID or an IP Address; -+ it identifies the piece of the routing domain -+ that is being described by the advertisement." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.4 Link State ID" -+ ::= { ospfExtLsdbEntry 2 } -+ -+ -+ ospfExtLsdbRouterId OBJECT-TYPE -+ SYNTAX RouterID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The 32 bit number that uniquely identifies the -+ originating router in the Autonomous System." -+ REFERENCE -+ "OSPF Version 2, Appendix C.1 Global parameters" -+ ::= { ospfExtLsdbEntry 3 } -+ -+-- Note that the OSPF Sequence Number is a 32 bit signed -+-- integer. It starts with the value '80000001'h, -+-- or -'7FFFFFFF'h, and increments until '7FFFFFFF'h -+-- Thus, a typical sequence number will be very negative. -+ ospfExtLsdbSequence OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The sequence number field is a signed 32-bit -+ integer. It is used to detect old and dupli- -+ cate link state advertisements. The space of -+ sequence numbers is linearly ordered. The -+ larger the sequence number the more recent the -+ advertisement." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.6 LS sequence -+ number" -+ ::= { ospfExtLsdbEntry 4 } -+ -+ -+ ospfExtLsdbAge OBJECT-TYPE -+ SYNTAX Integer32 -- Should be 0..MaxAge -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This field is the age of the link state adver- -+ tisement in seconds." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.1 LS age" -+ ::= { ospfExtLsdbEntry 5 } -+ -+ -+ ospfExtLsdbChecksum OBJECT-TYPE -+ SYNTAX Integer32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "This field is the checksum of the complete -+ contents of the advertisement, excepting the -+ age field. The age field is excepted so that -+ an advertisement's age can be incremented -+ without updating the checksum. The checksum -+ used is the same that is used for ISO connec- -+ tionless datagrams; it is commonly referred to -+ as the Fletcher checksum." -+ REFERENCE -+ "OSPF Version 2, Section 12.1.7 LS checksum" -+ ::= { ospfExtLsdbEntry 6 } -+ -+ -+ ospfExtLsdbAdvertisement OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE(36)) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The entire Link State Advertisement, including -+ its header." -+ REFERENCE -+ "OSPF Version 2, Section 12 Link State Adver- -+ tisements" -+ ::= { ospfExtLsdbEntry 7 } -+ -+ -+-- OSPF Use of the CIDR Route Table -+ -+ospfRouteGroup OBJECT IDENTIFIER ::= { ospf 13 } -+ -+-- The IP Forwarding Table defines a number of objects for use by -+-- the routing protocol to externalize its information. Most of -+-- the variables (ipForwardDest, ipForwardMask, ipForwardPolicy, -+-- ipForwardNextHop, ipForwardIfIndex, ipForwardType, -+-- ipForwardProto, ipForwardAge, and ipForwardNextHopAS) are -+-- defined there. -+ -+-- Those that leave some discretion are defined here. -+ -+-- ipCidrRouteProto is, of course, ospf (13). -+ -+-- ipCidrRouteAge is the time since the route was first calculated, -+-- as opposed to the time since the last SPF run. -+ -+-- ipCidrRouteInfo is an OBJECT IDENTIFIER for use by the routing -+-- protocol. The following values shall be found there depending -+-- on the way the route was calculated. -+ -+ospfIntraArea OBJECT IDENTIFIER ::= { ospfRouteGroup 1 } -+ospfInterArea OBJECT IDENTIFIER ::= { ospfRouteGroup 2 } -+ospfExternalType1 OBJECT IDENTIFIER ::= { ospfRouteGroup 3 } -+ospfExternalType2 OBJECT IDENTIFIER ::= { ospfRouteGroup 4 } -+ -+-- ipCidrRouteMetric1 is, by definition, the primary routing -+-- metric. Therefore, it should be the metric that route -+-- selection is based on. For intra-area and inter-area routes, -+-- it is an OSPF metric. For External Type 1 (comparable value) -+-- routes, it is an OSPF metric plus the External Metric. For -+-- external Type 2 (non-comparable value) routes, it is the -+-- external metric. -+ -+-- ipCidrRouteMetric2 is, by definition, a secondary routing -+-- metric. Therefore, it should be the metric that breaks a tie -+-- among routes having equal metric1 values and the same -+-- calculation rule. For intra-area, inter-area routes, and -+-- External Type 1 (comparable value) routes, it is unused. For -+-- external Type 2 (non-comparable value) routes, it is the metric -+-- to the AS border router. -+ -+-- ipCidrRouteMetric3, ipCidrRouteMetric4, and ipCidrRouteMetric5 are -+-- unused. -+ -+-- -+-- The OSPF Area Aggregate Table -+-- -+-- This table replaces the OSPF Area Summary Table, being an -+-- extension of that for CIDR routers. -+ -+ ospfAreaAggregateTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF OspfAreaAggregateEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A range of IP addresses specified by an IP -+ address/IP network mask pair. For example, -+ class B address range of X.X.X.X with a network -+ mask of 255.255.0.0 includes all IP addresses -+ from X.X.0.0 to X.X.255.255. Note that if -+ ranges are configured such that one range sub- -+ sumes another range (e.g., 10.0.0.0 mask -+ 255.0.0.0 and 10.1.0.0 mask 255.255.0.0), the -+ most specific match is the preferred one." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospf 14 } -+ -+ -+ ospfAreaAggregateEntry OBJECT-TYPE -+ SYNTAX OspfAreaAggregateEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A range of IP addresses specified by an IP -+ address/IP network mask pair. For example, -+ class B address range of X.X.X.X with a network -+ mask of 255.255.0.0 includes all IP addresses -+ from X.X.0.0 to X.X.255.255. Note that if -+ ranges are range configured such that one range -+ subsumes another range (e.g., 10.0.0.0 mask -+ 255.0.0.0 and 10.1.0.0 mask 255.255.0.0), the -+ most specific match is the preferred one." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ INDEX { ospfAreaAggregateAreaID, ospfAreaAggregateLsdbType, -+ ospfAreaAggregateNet, ospfAreaAggregateMask } -+ ::= { ospfAreaAggregateTable 1 } -+ -+ -+OspfAreaAggregateEntry ::= -+ SEQUENCE { -+ ospfAreaAggregateAreaID -+ AreaID, -+ ospfAreaAggregateLsdbType -+ INTEGER, -+ ospfAreaAggregateNet -+ IpAddress, -+ ospfAreaAggregateMask -+ IpAddress, -+ ospfAreaAggregateStatus -+ RowStatus, -+ ospfAreaAggregateEffect -+ INTEGER -+ } -+ -+ ospfAreaAggregateAreaID OBJECT-TYPE -+ SYNTAX AreaID -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Area the Address Aggregate is to be found -+ within." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaAggregateEntry 1 } -+ -+ -+ ospfAreaAggregateLsdbType OBJECT-TYPE -+ SYNTAX INTEGER { -+ summaryLink (3), -+ nssaExternalLink (7) -+ } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The type of the Address Aggregate. This field -+ specifies the Lsdb type that this Address Ag- -+ gregate applies to." -+ REFERENCE -+ "OSPF Version 2, Appendix A.4.1 The Link State -+ Advertisement header" -+ ::= { ospfAreaAggregateEntry 2 } -+ -+ -+ ospfAreaAggregateNet OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of the Net or Subnet indicated -+ by the range." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaAggregateEntry 3 } -+ -+ -+ ospfAreaAggregateMask OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The Subnet Mask that pertains to the Net or -+ Subnet." -+ REFERENCE -+ "OSPF Version 2, Appendix C.2 Area parameters" -+ ::= { ospfAreaAggregateEntry 4 } -+ -+ -+ ospfAreaAggregateStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable displays the status of the en- -+ try. Setting it to 'invalid' has the effect of -+ rendering it inoperative. The internal effect -+ (row removal) is implementation dependent." -+ ::= { ospfAreaAggregateEntry 5 } -+ -+ -+ ospfAreaAggregateEffect OBJECT-TYPE -+ SYNTAX INTEGER { -+ advertiseMatching (1), -+ doNotAdvertiseMatching (2) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "Subnets subsumed by ranges either trigger the -+ advertisement of the indicated aggregate (ad- -+ vertiseMatching), or result in the subnet's not -+ being advertised at all outside the area." -+ DEFVAL { advertiseMatching } -+ ::= { ospfAreaAggregateEntry 6 } -+ -+ -+-- conformance information -+ -+ospfConformance OBJECT IDENTIFIER ::= { ospf 15 } -+ -+ospfGroups OBJECT IDENTIFIER ::= { ospfConformance 1 } -+ospfCompliances OBJECT IDENTIFIER ::= { ospfConformance 2 } -+ -+-- compliance statements -+ -+ ospfCompliance MODULE-COMPLIANCE -+ STATUS current -+ DESCRIPTION -+ "The compliance statement " -+ MODULE -- this module -+ MANDATORY-GROUPS { -+ ospfBasicGroup, -+ ospfAreaGroup, -+ ospfStubAreaGroup, -+ ospfIfGroup, -+ ospfIfMetricGroup, -+ ospfVirtIfGroup, -+ ospfNbrGroup, -+ ospfVirtNbrGroup, -+ ospfAreaAggregateGroup -+ } -+ ::= { ospfCompliances 1 } -+ -+ -+-- units of conformance -+ -+ ospfBasicGroup OBJECT-GROUP -+ OBJECTS { -+ ospfRouterId, -+ ospfAdminStat, -+ ospfVersionNumber, -+ ospfAreaBdrRtrStatus, -+ ospfASBdrRtrStatus, -+ ospfExternLsaCount, -+ ospfExternLsaCksumSum, -+ ospfTOSSupport, -+ ospfOriginateNewLsas, -+ ospfRxNewLsas, -+ ospfExtLsdbLimit, -+ ospfMulticastExtensions, -+ ospfExitOverflowInterval, -+ ospfDemandExtensions -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 1 } -+ -+ -+ ospfAreaGroup OBJECT-GROUP -+ OBJECTS { -+ ospfAreaId, -+ ospfImportAsExtern, -+ ospfSpfRuns, -+ ospfAreaBdrRtrCount, -+ ospfAsBdrRtrCount, -+ ospfAreaLsaCount, -+ ospfAreaLsaCksumSum, -+ ospfAreaSummary, -+ ospfAreaStatus -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems -+ supporting areas." -+ ::= { ospfGroups 2 } -+ -+ -+ ospfStubAreaGroup OBJECT-GROUP -+ OBJECTS { -+ ospfStubAreaId, -+ ospfStubTOS, -+ ospfStubMetric, -+ ospfStubStatus, -+ ospfStubMetricType -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems -+ supporting stub areas." -+ ::= { ospfGroups 3 } -+ -+ -+ ospfLsdbGroup OBJECT-GROUP -+ OBJECTS { -+ ospfLsdbAreaId, -+ ospfLsdbType, -+ ospfLsdbLsid, -+ ospfLsdbRouterId, -+ ospfLsdbSequence, -+ ospfLsdbAge, -+ ospfLsdbChecksum, -+ ospfLsdbAdvertisement -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems -+ that display their link state database." -+ ::= { ospfGroups 4 } -+ -+ -+ ospfAreaRangeGroup OBJECT-GROUP -+ OBJECTS { -+ ospfAreaRangeAreaId, -+ ospfAreaRangeNet, -+ ospfAreaRangeMask, -+ ospfAreaRangeStatus, -+ ospfAreaRangeEffect -+ } -+ STATUS obsolete -+ DESCRIPTION -+ "These objects are required for non-CIDR OSPF -+ systems that support multiple areas." -+ ::= { ospfGroups 5 } -+ -+ -+ ospfHostGroup OBJECT-GROUP -+ OBJECTS { -+ ospfHostIpAddress, -+ ospfHostTOS, -+ ospfHostMetric, -+ ospfHostStatus, -+ ospfHostAreaID -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems -+ that support attached hosts." -+ ::= { ospfGroups 6 } -+ -+ -+ ospfIfGroup OBJECT-GROUP -+ OBJECTS { -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfIfAreaId, -+ ospfIfType, -+ ospfIfAdminStat, -+ ospfIfRtrPriority, -+ ospfIfTransitDelay, -+ ospfIfRetransInterval, -+ ospfIfHelloInterval, -+ ospfIfRtrDeadInterval, -+ ospfIfPollInterval, -+ ospfIfState, -+ ospfIfDesignatedRouter, -+ ospfIfBackupDesignatedRouter, -+ ospfIfEvents, -+ ospfIfAuthType, -+ ospfIfAuthKey, -+ ospfIfStatus, -+ ospfIfMulticastForwarding, -+ ospfIfDemand -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 7 } -+ -+ -+ ospfIfMetricGroup OBJECT-GROUP -+ OBJECTS { -+ ospfIfMetricIpAddress, -+ ospfIfMetricAddressLessIf, -+ ospfIfMetricTOS, -+ ospfIfMetricValue, -+ ospfIfMetricStatus -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 8 } -+ -+ -+ ospfVirtIfGroup OBJECT-GROUP -+ OBJECTS { -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfVirtIfTransitDelay, -+ ospfVirtIfRetransInterval, -+ ospfVirtIfHelloInterval, -+ ospfVirtIfRtrDeadInterval, -+ ospfVirtIfState, -+ ospfVirtIfEvents, -+ ospfVirtIfAuthType, -+ ospfVirtIfAuthKey, -+ ospfVirtIfStatus -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 9 } -+ -+ -+ ospfNbrGroup OBJECT-GROUP -+ OBJECTS { -+ ospfNbrIpAddr, -+ ospfNbrAddressLessIndex, -+ ospfNbrRtrId, -+ ospfNbrOptions, -+ ospfNbrPriority, -+ ospfNbrState, -+ ospfNbrEvents, -+ ospfNbrLsRetransQLen, -+ ospfNbmaNbrStatus, -+ ospfNbmaNbrPermanence, -+ ospfNbrHelloSuppressed -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 10 } -+ -+ -+ ospfVirtNbrGroup OBJECT-GROUP -+ OBJECTS { -+ ospfVirtNbrArea, -+ ospfVirtNbrRtrId, -+ ospfVirtNbrIpAddr, -+ ospfVirtNbrOptions, -+ ospfVirtNbrState, -+ ospfVirtNbrEvents, -+ ospfVirtNbrLsRetransQLen, -+ ospfVirtNbrHelloSuppressed -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 11 } -+ -+ -+ ospfExtLsdbGroup OBJECT-GROUP -+ OBJECTS { -+ ospfExtLsdbType, -+ ospfExtLsdbLsid, -+ ospfExtLsdbRouterId, -+ ospfExtLsdbSequence, -+ ospfExtLsdbAge, -+ ospfExtLsdbChecksum, -+ ospfExtLsdbAdvertisement -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems -+ that display their link state database." -+ ::= { ospfGroups 12 } -+ -+ -+ ospfAreaAggregateGroup OBJECT-GROUP -+ OBJECTS { -+ ospfAreaAggregateAreaID, -+ ospfAreaAggregateLsdbType, -+ ospfAreaAggregateNet, -+ ospfAreaAggregateMask, -+ ospfAreaAggregateStatus, -+ ospfAreaAggregateEffect -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required for OSPF systems." -+ ::= { ospfGroups 13 } -+ -+END ---- /dev/null -+++ b/mibs/OSPF-TRAP-MIB.txt -@@ -0,0 +1,443 @@ -+OSPF-TRAP-MIB DEFINITIONS ::= BEGIN -+ -+ IMPORTS -+ MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, IpAddress -+ FROM SNMPv2-SMI -+ MODULE-COMPLIANCE, OBJECT-GROUP -+ FROM SNMPv2-CONF -+ ospfRouterId, ospfIfIpAddress, ospfAddressLessIf, ospfIfState, -+ ospfVirtIfAreaId, ospfVirtIfNeighbor, ospfVirtIfState, -+ ospfNbrIpAddr, ospfNbrAddressLessIndex, ospfNbrRtrId, -+ ospfNbrState, ospfVirtNbrArea, ospfVirtNbrRtrId, ospfVirtNbrState, -+ ospfLsdbType, ospfLsdbLsid, ospfLsdbRouterId, ospfLsdbAreaId, -+ ospfExtLsdbLimit, ospf -+ FROM OSPF-MIB; -+ -+ ospfTrap MODULE-IDENTITY -+ LAST-UPDATED "9501201225Z" -- Fri Jan 20 12:25:50 PST 1995 -+ ORGANIZATION "IETF OSPF Working Group" -+ CONTACT-INFO -+ " Fred Baker -+ Postal: Cisco Systems -+ 519 Lado Drive -+ Santa Barbara, California 93111 -+ Tel: +1 805 681 0115 -+ E-Mail: fred@cisco.com -+ -+ Rob Coltun -+ Postal: RainbowBridge Communications -+ Tel: (301) 340-9416 -+ E-Mail: rcoltun@rainbow-bridge.com" -+ DESCRIPTION -+ "The MIB module to describe traps for the OSPF -+ Version 2 Protocol." -+ ::= { ospf 16 } -+ -+-- Trap Support Objects -+ -+-- The following are support objects for the OSPF traps. -+ -+ospfTrapControl OBJECT IDENTIFIER ::= { ospfTrap 1 } -+ospfTraps OBJECT IDENTIFIER ::= { ospfTrap 2 } -+ -+ ospfSetTrap OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE(4)) -+ MAX-ACCESS read-write -+ STATUS current -+ DESCRIPTION -+ "A four-octet string serving as a bit map for -+ the trap events defined by the OSPF traps. This -+ object is used to enable and disable specific -+ OSPF traps where a 1 in the bit field -+ represents enabled. The right-most bit (least -+ significant) represents trap 0." -+ ::= { ospfTrapControl 1 } -+ -+ -+ ospfConfigErrorType OBJECT-TYPE -+ SYNTAX INTEGER { -+ badVersion (1), -+ areaMismatch (2), -+ unknownNbmaNbr (3), -- Router is Dr eligible -+ unknownVirtualNbr (4), -+ authTypeMismatch(5), -+ authFailure (6), -+ netMaskMismatch (7), -+ helloIntervalMismatch (8), -+ deadIntervalMismatch (9), -+ optionMismatch (10) } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "Potential types of configuration conflicts. -+ Used by the ospfConfigError and ospfConfigVir- -+ tError traps." -+ ::= { ospfTrapControl 2 } -+ -+ -+ ospfPacketType OBJECT-TYPE -+ SYNTAX INTEGER { -+ hello (1), -+ dbDescript (2), -+ lsReq (3), -+ lsUpdate (4), -+ lsAck (5) } -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "OSPF packet types." -+ ::= { ospfTrapControl 3 } -+ -+ -+ ospfPacketSrc OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP address of an inbound packet that can- -+ not be identified by a neighbor instance." -+ ::= { ospfTrapControl 4 } -+ -+ -+-- Traps -+ -+ -+ ospfIfStateChange NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfIfState -- The new state -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfStateChange trap signifies that there -+ has been a change in the state of a non-virtual -+ OSPF interface. This trap should be generated -+ when the interface state regresses (e.g., goes -+ from Dr to Down) or progresses to a terminal -+ state (i.e., Point-to-Point, DR Other, Dr, or -+ Backup)." -+ ::= { ospfTraps 16 } -+ -+ -+ ospfVirtIfStateChange NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfVirtIfState -- The new state -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfStateChange trap signifies that there -+ has been a change in the state of an OSPF vir- -+ tual interface. -+ This trap should be generated when the inter- -+ face state regresses (e.g., goes from Point- -+ to-Point to Down) or progresses to a terminal -+ state (i.e., Point-to-Point)." -+ ::= { ospfTraps 1 } -+ -+ -+ ospfNbrStateChange NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfNbrIpAddr, -+ ospfNbrAddressLessIndex, -+ ospfNbrRtrId, -+ ospfNbrState -- The new state -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfNbrStateChange trap signifies that -+ there has been a change in the state of a non- -+ virtual OSPF neighbor. This trap should be -+ generated when the neighbor state regresses -+ (e.g., goes from Attempt or Full to 1-Way or -+ Down) or progresses to a terminal state (e.g., -+ 2-Way or Full). When an neighbor transitions -+ from or to Full on non-broadcast multi-access -+ and broadcast networks, the trap should be gen- -+ erated by the designated router. A designated -+ router transitioning to Down will be noted by -+ ospfIfStateChange." -+ ::= { ospfTraps 2 } -+ -+ -+ ospfVirtNbrStateChange NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtNbrArea, -+ ospfVirtNbrRtrId, -+ ospfVirtNbrState -- The new state -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfStateChange trap signifies that there -+ has been a change in the state of an OSPF vir- -+ tual neighbor. This trap should be generated -+ when the neighbor state regresses (e.g., goes -+ from Attempt or Full to 1-Way or Down) or -+ progresses to a terminal state (e.g., Full)." -+ ::= { ospfTraps 3 } -+ ospfIfConfigError NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfPacketSrc, -- The source IP address -+ ospfConfigErrorType, -- Type of error -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfConfigError trap signifies that a -+ packet has been received on a non-virtual in- -+ terface from a router whose configuration -+ parameters conflict with this router's confi- -+ guration parameters. Note that the event op- -+ tionMismatch should cause a trap only if it -+ prevents an adjacency from forming." -+ ::= { ospfTraps 4 } -+ -+ -+ ospfVirtIfConfigError NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfConfigErrorType, -- Type of error -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfConfigError trap signifies that a pack- -+ et has been received on a virtual interface -+ from a router whose configuration parameters -+ conflict with this router's configuration -+ parameters. Note that the event optionMismatch -+ should cause a trap only if it prevents an ad- -+ jacency from forming." -+ ::= { ospfTraps 5 } -+ -+ -+ ospfIfAuthFailure NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfPacketSrc, -- The source IP address -+ ospfConfigErrorType, -- authTypeMismatch or -+ -- authFailure -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfAuthFailure trap signifies that a -+ packet has been received on a non-virtual in- -+ terface from a router whose authentication key -+ or authentication type conflicts with this -+ router's authentication key or authentication -+ type." -+ ::= { ospfTraps 6 } -+ -+ -+ ospfVirtIfAuthFailure NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfConfigErrorType, -- authTypeMismatch or -+ -- authFailure -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfVirtIfAuthFailure trap signifies that a -+ packet has been received on a virtual interface -+ from a router whose authentication key or au- -+ thentication type conflicts with this router's -+ authentication key or authentication type." -+ ::= { ospfTraps 7 } -+ -+ -+ ospfIfRxBadPacket NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfPacketSrc, -- The source IP address -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfIfRxBadPacket trap signifies that an -+ OSPF packet has been received on a non-virtual -+ interface that cannot be parsed." -+ ::= { ospfTraps 8 } -+ -+ ospfVirtIfRxBadPacket NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfPacketType -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfRxBadPacket trap signifies that an OSPF -+ packet has been received on a virtual interface -+ that cannot be parsed." -+ ::= { ospfTraps 9 } -+ -+ -+ ospfTxRetransmit NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfIfIpAddress, -+ ospfAddressLessIf, -+ ospfNbrRtrId, -- Destination -+ ospfPacketType, -+ ospfLsdbType, -+ ospfLsdbLsid, -+ ospfLsdbRouterId -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfTxRetransmit trap signifies than an -+ OSPF packet has been retransmitted on a non- -+ virtual interface. All packets that may be re- -+ transmitted are associated with an LSDB entry. -+ The LS type, LS ID, and Router ID are used to -+ identify the LSDB entry." -+ ::= { ospfTraps 10 } -+ -+ -+ ospfVirtIfTxRetransmit NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfVirtIfAreaId, -+ ospfVirtIfNeighbor, -+ ospfPacketType, -+ ospfLsdbType, -+ ospfLsdbLsid, -+ ospfLsdbRouterId -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfTxRetransmit trap signifies than an -+ OSPF packet has been retransmitted on a virtual -+ interface. All packets that may be retransmit- -+ ted are associated with an LSDB entry. The LS -+ type, LS ID, and Router ID are used to identify -+ the LSDB entry." -+ ::= { ospfTraps 11 } -+ -+ -+ ospfOriginateLsa NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfLsdbAreaId, -- 0.0.0.0 for AS Externals -+ ospfLsdbType, -+ ospfLsdbLsid, -+ ospfLsdbRouterId -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfOriginateLsa trap signifies that a new -+ LSA has been originated by this router. This -+ trap should not be invoked for simple refreshes -+ of LSAs (which happesn every 30 minutes), but -+ instead will only be invoked when an LSA is -+ (re)originated due to a topology change. Addi- -+ tionally, this trap does not include LSAs that -+ are being flushed because they have reached -+ MaxAge." -+ ::= { ospfTraps 12 } -+ -+ -+ ospfMaxAgeLsa NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfLsdbAreaId, -- 0.0.0.0 for AS Externals -+ ospfLsdbType, -+ ospfLsdbLsid, -+ ospfLsdbRouterId -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfMaxAgeLsa trap signifies that one of -+ the LSA in the router's link-state database has -+ aged to MaxAge." -+ ::= { ospfTraps 13 } -+ -+ -+ ospfLsdbOverflow NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfExtLsdbLimit -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfLsdbOverflow trap signifies that the -+ number of LSAs in the router's link-state data- -+ base has exceeded ospfExtLsdbLimit." -+ ::= { ospfTraps 14 } -+ -+ -+ ospfLsdbApproachingOverflow NOTIFICATION-TYPE -+ OBJECTS { -+ ospfRouterId, -- The originator of the trap -+ ospfExtLsdbLimit -+ } -+ STATUS current -+ DESCRIPTION -+ "An ospfLsdbApproachingOverflow trap signifies -+ that the number of LSAs in the router's link- -+ state database has exceeded ninety percent of -+ ospfExtLsdbLimit." -+ ::= { ospfTraps 15 } -+ -+ -+-- conformance information -+ -+ospfTrapConformance OBJECT IDENTIFIER ::= { ospfTrap 3 } -+ -+ospfTrapGroups OBJECT IDENTIFIER ::= { ospfTrapConformance 1 } -+ospfTrapCompliances OBJECT IDENTIFIER ::= { ospfTrapConformance 2 } -+ -+-- compliance statements -+ -+ ospfTrapCompliance MODULE-COMPLIANCE -+ STATUS current -+ DESCRIPTION -+ "The compliance statement " -+ MODULE -- this module -+ MANDATORY-GROUPS { ospfTrapControlGroup } -+ -+ -+ GROUP ospfTrapControlGroup -+ DESCRIPTION -+ "This group is optional but recommended for all -+ OSPF systems" -+ ::= { ospfTrapCompliances 1 } -+ -+ -+-- units of conformance -+ -+ ospfTrapControlGroup OBJECT-GROUP -+ OBJECTS { -+ ospfSetTrap, -+ ospfConfigErrorType, -+ ospfPacketType, -+ ospfPacketSrc -+ } -+ STATUS current -+ DESCRIPTION -+ "These objects are required to control traps -+ from OSPF systems." -+ ::= { ospfTrapGroups 1 } -+ -+ -+END ---- /dev/null -+++ b/mibs/RIPv2-MIB.txt -@@ -0,0 +1,530 @@ -+ RIPv2-MIB DEFINITIONS ::= BEGIN -+ -+ IMPORTS -+ MODULE-IDENTITY, OBJECT-TYPE, Counter32, -+ TimeTicks, IpAddress FROM SNMPv2-SMI -+ TEXTUAL-CONVENTION, RowStatus FROM SNMPv2-TC -+ MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF -+ mib-2 FROM RFC1213-MIB; -+ -+ -- This MIB module uses the extended OBJECT-TYPE macro as -+ -- defined in [9]. -+ -+ rip2 MODULE-IDENTITY -+ LAST-UPDATED "9407272253Z" -- Wed Jul 27 22:53:04 PDT 1994 -+ ORGANIZATION "IETF RIP-II Working Group" -+ CONTACT-INFO -+ " Fred Baker -+ Postal: Cisco Systems -+ 519 Lado Drive -+ Santa Barbara, California 93111 -+ Tel: +1 805 681 0115 -+ E-Mail: fbaker@cisco.com -+ -+ Postal: Gary Malkin -+ Xylogics, Inc. -+ 53 Third Avenue -+ Burlington, MA 01803 -+ -+ Phone: (617) 272-8140 -+ EMail: gmalkin@Xylogics.COM" -+ DESCRIPTION -+ "The MIB module to describe the RIP2 Version 2 Protocol" -+ ::= { mib-2 23 } -+ -+ -- RIP-2 Management Information Base -+ -+ -- the RouteTag type represents the contents of the -+ -- Route Domain field in the packet header or route entry. -+ -- The use of the Route Domain is deprecated. -+ -+ RouteTag ::= TEXTUAL-CONVENTION -+ STATUS current -+ DESCRIPTION -+ "the RouteTag type represents the contents of the Route Domain -+ field in the packet header or route entry" -+ SYNTAX OCTET STRING (SIZE (2)) -+ -+--4.1 Global Counters -+ -+-- The RIP-2 Globals Group. -+-- Implementation of this group is mandatory for systems -+-- which implement RIP-2. -+ -+-- These counters are intended to facilitate debugging quickly -+-- changing routes or failing neighbors -+ -+rip2Globals OBJECT IDENTIFIER ::= { rip2 1 } -+ -+ rip2GlobalRouteChanges OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of route changes made to the IP Route -+ Database by RIP. This does not include the refresh -+ of a route's age." -+ ::= { rip2Globals 1 } -+ -+ rip2GlobalQueries OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of responses sent to RIP queries -+ from other systems." -+ ::= { rip2Globals 2 } -+ -+--4.2 RIP Interface Tables -+ -+-- RIP Interfaces Groups -+-- Implementation of these Groups is mandatory for systems -+-- which implement RIP-2. -+ -+-- The RIP Interface Status Table. -+ -+ rip2IfStatTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Rip2IfStatEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A list of subnets which require separate -+ status monitoring in RIP." -+ ::= { rip2 2 } -+ -+ rip2IfStatEntry OBJECT-TYPE -+ SYNTAX Rip2IfStatEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A Single Routing Domain in a single Subnet." -+ INDEX { rip2IfStatAddress } -+ ::= { rip2IfStatTable 1 } -+ -+ Rip2IfStatEntry ::= -+ SEQUENCE { -+ rip2IfStatAddress -+ IpAddress, -+ rip2IfStatRcvBadPackets -+ Counter32, -+ rip2IfStatRcvBadRoutes -+ Counter32, -+ rip2IfStatSentUpdates -+ Counter32, -+ rip2IfStatStatus -+ RowStatus -+ } -+ -+ rip2IfStatAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of this system on the indicated -+ subnet. For unnumbered interfaces, the value 0.0.0.N, -+ where the least significant 24 bits (N) is the ifIndex -+ for the IP Interface in network byte order." -+ ::= { rip2IfStatEntry 1 } -+ -+ rip2IfStatRcvBadPackets OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of RIP response packets received by -+ the RIP process which were subsequently discarded -+ for any reason (e.g. a version 0 packet, or an -+ unknown command type)." -+ ::= { rip2IfStatEntry 2 } -+ -+ rip2IfStatRcvBadRoutes OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of routes, in valid RIP packets, -+ which were ignored for any reason (e.g. unknown -+ address family, or invalid metric)." -+ ::= { rip2IfStatEntry 3 } -+ -+ rip2IfStatSentUpdates OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of triggered RIP updates actually -+ sent on this interface. This explicitly does -+ NOT include full updates sent containing new -+ information." -+ ::= { rip2IfStatEntry 4 } -+ -+ rip2IfStatStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "Writing invalid has the effect of deleting -+ this interface." -+ ::= { rip2IfStatEntry 5 } -+ -+-- The RIP Interface Configuration Table. -+ -+ rip2IfConfTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Rip2IfConfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A list of subnets which require separate -+ configuration in RIP." -+ ::= { rip2 3 } -+ -+ rip2IfConfEntry OBJECT-TYPE -+ SYNTAX Rip2IfConfEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A Single Routing Domain in a single Subnet." -+ INDEX { rip2IfConfAddress } -+ ::= { rip2IfConfTable 1 } -+ -+ Rip2IfConfEntry ::= -+ SEQUENCE { -+ rip2IfConfAddress -+ IpAddress, -+ rip2IfConfDomain -+ RouteTag, -+ rip2IfConfAuthType -+ INTEGER, -+ rip2IfConfAuthKey -+ OCTET STRING (SIZE(0..16)), -+ rip2IfConfSend -+ INTEGER, -+ rip2IfConfReceive -+ INTEGER, -+ rip2IfConfDefaultMetric -+ INTEGER, -+ rip2IfConfStatus -+ RowStatus, -+ rip2IfConfSrcAddress -+ IpAddress -+ } -+ -+ rip2IfConfAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address of this system on the indicated -+ subnet. For unnumbered interfaces, the value 0.0.0.N, -+ where the least significant 24 bits (N) is the ifIndex -+ for the IP Interface in network byte order." -+ ::= { rip2IfConfEntry 1 } -+ -+ rip2IfConfDomain OBJECT-TYPE -+ SYNTAX RouteTag -+ MAX-ACCESS read-create -+ STATUS obsolete -+ DESCRIPTION -+ "Value inserted into the Routing Domain field -+ of all RIP packets sent on this interface." -+ DEFVAL { '0000'h } -+ ::= { rip2IfConfEntry 2 } -+ -+ rip2IfConfAuthType OBJECT-TYPE -+ SYNTAX INTEGER { -+ noAuthentication (1), -+ simplePassword (2), -+ md5 (3) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The type of Authentication used on this -+ interface." -+ DEFVAL { noAuthentication } -+ ::= { rip2IfConfEntry 3 } -+ -+ rip2IfConfAuthKey OBJECT-TYPE -+ SYNTAX OCTET STRING (SIZE(0..16)) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The value to be used as the Authentication Key -+ whenever the corresponding instance of -+ rip2IfConfAuthType has a value other than -+ noAuthentication. A modification of the corresponding -+ instance of rip2IfConfAuthType does not modify -+ the rip2IfConfAuthKey value. If a string shorter -+ than 16 octets is supplied, it will be left- -+ justified and padded to 16 octets, on the right, -+ with nulls (0x00). -+ -+ Reading this object always results in an OCTET -+ STRING of length zero; authentication may not -+ be bypassed by reading the MIB object." -+ DEFVAL { ''h } -+ ::= { rip2IfConfEntry 4 } -+ -+ rip2IfConfSend OBJECT-TYPE -+ SYNTAX INTEGER { -+ doNotSend (1), -+ ripVersion1 (2), -+ rip1Compatible (3), -+ ripVersion2 (4), -+ ripV1Demand (5), -+ ripV2Demand (6) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "What the router sends on this interface. -+ ripVersion1 implies sending RIP updates compliant -+ with RFC 1058. rip1Compatible implies -+ broadcasting RIP-2 updates using RFC 1058 route -+ subsumption rules. ripVersion2 implies -+ multicasting RIP-2 updates. ripV1Demand indicates -+ the use of Demand RIP on a WAN interface under RIP -+ Version 1 rules. ripV2Demand indicates the use of -+ Demand RIP on a WAN interface under Version 2 rules." -+ DEFVAL { rip1Compatible } -+ ::= { rip2IfConfEntry 5 } -+ -+ rip2IfConfReceive OBJECT-TYPE -+ SYNTAX INTEGER { -+ rip1 (1), -+ rip2 (2), -+ rip1OrRip2 (3), -+ doNotRecieve (4) -+ } -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This indicates which version of RIP updates -+ are to be accepted. Note that rip2 and -+ rip1OrRip2 implies reception of multicast -+ packets." -+ DEFVAL { rip1OrRip2 } -+ ::= { rip2IfConfEntry 6 } -+ -+ rip2IfConfDefaultMetric OBJECT-TYPE -+ SYNTAX INTEGER ( 0..15 ) -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "This variable indicates the metric that is to -+ be used for the default route entry in RIP updates -+ originated on this interface. A value of zero -+ indicates that no default route should be -+ originated; in this case, a default route via -+ another router may be propagated." -+ ::= { rip2IfConfEntry 7 } -+ -+ rip2IfConfStatus OBJECT-TYPE -+ SYNTAX RowStatus -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "Writing invalid has the effect of deleting -+ this interface." -+ ::= { rip2IfConfEntry 8 } -+ -+ rip2IfConfSrcAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-create -+ STATUS current -+ DESCRIPTION -+ "The IP Address this system will use as a source -+ address on this interface. If it is a numbered -+ interface, this MUST be the same value as -+ rip2IfConfAddress. On unnumbered interfaces, -+ it must be the value of rip2IfConfAddress for -+ some interface on the system." -+ ::= { rip2IfConfEntry 9 } -+ -+--4.3 Peer Table -+ -+-- Peer Table -+ -+-- The RIP Peer Group -+-- Implementation of this Group is Optional -+ -+-- This group provides information about active peer -+-- relationships intended to assist in debugging. An -+-- active peer is a router from which a valid RIP -+-- updated has been heard in the last 180 seconds. -+ -+ rip2PeerTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Rip2PeerEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "A list of RIP Peers." -+ ::= { rip2 4 } -+ -+ rip2PeerEntry OBJECT-TYPE -+ SYNTAX Rip2PeerEntry -+ MAX-ACCESS not-accessible -+ STATUS current -+ DESCRIPTION -+ "Information regarding a single routing peer." -+ INDEX { rip2PeerAddress, rip2PeerDomain } -+ ::= { rip2PeerTable 1 } -+ -+ Rip2PeerEntry ::= -+ SEQUENCE { -+ rip2PeerAddress -+ IpAddress, -+ rip2PeerDomain -+ RouteTag, -+ rip2PeerLastUpdate -+ TimeTicks, -+ rip2PeerVersion -+ INTEGER, -+ rip2PeerRcvBadPackets -+ Counter32, -+ rip2PeerRcvBadRoutes -+ Counter32 -+ } -+ -+ rip2PeerAddress OBJECT-TYPE -+ SYNTAX IpAddress -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The IP Address that the peer is using as its source -+ address. Note that on an unnumbered link, this may -+ not be a member of any subnet on the system." -+ ::= { rip2PeerEntry 1 } -+ -+ rip2PeerDomain OBJECT-TYPE -+ SYNTAX RouteTag -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The value in the Routing Domain field in RIP -+ packets received from the peer. As domain suuport -+ is deprecated, this must be zero." -+ ::= { rip2PeerEntry 2 } -+ -+ rip2PeerLastUpdate OBJECT-TYPE -+ SYNTAX TimeTicks -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The value of sysUpTime when the most recent -+ RIP update was received from this system." -+ ::= { rip2PeerEntry 3 } -+ -+ rip2PeerVersion OBJECT-TYPE -+ SYNTAX INTEGER ( 0..255 ) -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The RIP version number in the header of the -+ last RIP packet received." -+ ::= { rip2PeerEntry 4 } -+ -+ rip2PeerRcvBadPackets OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of RIP response packets from this -+ peer discarded as invalid." -+ ::= { rip2PeerEntry 5 } -+ -+ -+ rip2PeerRcvBadRoutes OBJECT-TYPE -+ SYNTAX Counter32 -+ MAX-ACCESS read-only -+ STATUS current -+ DESCRIPTION -+ "The number of routes from this peer that were -+ ignored because the entry format was invalid." -+ ::= { rip2PeerEntry 6 } -+ -+-- conformance information -+ -+rip2Conformance OBJECT IDENTIFIER ::= { rip2 5 } -+ -+rip2Groups OBJECT IDENTIFIER ::= { rip2Conformance 1 } -+rip2Compliances OBJECT IDENTIFIER ::= { rip2Conformance 2 } -+ -+-- compliance statements -+rip2Compliance MODULE-COMPLIANCE -+ STATUS current -+ DESCRIPTION -+ "The compliance statement " -+ MODULE -- this module -+ MANDATORY-GROUPS { -+ rip2GlobalGroup, -+ rip2IfStatGroup, -+ rip2IfConfGroup, -+ rip2PeerGroup -+ } -+ GROUP rip2GlobalGroup -+ DESCRIPTION -+ "This group defines global controls for RIP-II systems." -+ GROUP rip2IfStatGroup -+ DESCRIPTION -+ "This group defines interface statistics for RIP-II systems." -+ GROUP rip2IfConfGroup -+ DESCRIPTION -+ "This group defines interface configuration for RIP-II systems." -+ GROUP rip2PeerGroup -+ DESCRIPTION -+ "This group defines peer information for RIP-II systems." -+ ::= { rip2Compliances 1 } -+ -+-- units of conformance -+ -+rip2GlobalGroup OBJECT-GROUP -+ OBJECTS { -+ rip2GlobalRouteChanges, -+ rip2GlobalQueries -+ } -+ STATUS current -+ DESCRIPTION -+ "This group defines global controls for RIP-II systems." -+ ::= { rip2Groups 1 } -+rip2IfStatGroup OBJECT-GROUP -+ OBJECTS { -+ rip2IfStatAddress, -+ rip2IfStatRcvBadPackets, -+ rip2IfStatRcvBadRoutes, -+ rip2IfStatSentUpdates, -+ rip2IfStatStatus -+ } -+ STATUS current -+ DESCRIPTION -+ "This group defines interface statistics for RIP-II systems." -+ ::= { rip2Groups 2 } -+rip2IfConfGroup OBJECT-GROUP -+ OBJECTS { -+ rip2IfConfAddress, -+ rip2IfConfAuthType, -+ rip2IfConfAuthKey, -+ rip2IfConfSend, -+ rip2IfConfReceive, -+ rip2IfConfDefaultMetric, -+ rip2IfConfStatus, -+ rip2IfConfSrcAddress -+ } -+ STATUS current -+ DESCRIPTION -+ "This group defines interface configuration for RIP-II systems." -+ ::= { rip2Groups 3 } -+rip2PeerGroup OBJECT-GROUP -+ OBJECTS { -+ rip2PeerAddress, -+ rip2PeerDomain, -+ rip2PeerLastUpdate, -+ rip2PeerVersion, -+ rip2PeerRcvBadPackets, -+ rip2PeerRcvBadRoutes -+ } -+ STATUS current -+ DESCRIPTION -+ "This group defines peer information for RIP-II systems." -+ ::= { rip2Groups 4 } -+END ---- /dev/null -+++ b/mibs/SOURCE-ROUTING-MIB.txt -@@ -0,0 +1,452 @@ -+SOURCE-ROUTING-MIB DEFINITIONS ::= BEGIN -+ -+IMPORTS -+ Counter, Gauge -+ FROM RFC1155-SMI -+ dot1dBridge, dot1dSr -+ FROM BRIDGE-MIB -+ OBJECT-TYPE -+ FROM RFC-1212; -+ -+-- groups in the SR MIB -+ -+-- dot1dSr is imported from the Bridge MIB -+ -+dot1dPortPair OBJECT IDENTIFIER ::= { dot1dBridge 10 } -+ -+-- the dot1dSr group -+ -+-- this group is implemented by those bridges that -+-- support the source route bridging mode, including Source -+-- Routing and SRT bridges. -+ -+dot1dSrPortTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dSrPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains information about every -+ port that is associated with this source route -+ bridge." -+ ::= { dot1dSr 1 } -+ -+dot1dSrPortEntry OBJECT-TYPE -+ SYNTAX Dot1dSrPortEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A list of information for each port of a source -+ route bridge." -+ INDEX { dot1dSrPort } -+ -+ ::= { dot1dSrPortTable 1 } -+ -+Dot1dSrPortEntry ::= -+ SEQUENCE { -+ dot1dSrPort -+ INTEGER, -+ dot1dSrPortHopCount -+ INTEGER, -+ dot1dSrPortLocalSegment -+ INTEGER, -+ dot1dSrPortBridgeNum -+ INTEGER, -+ dot1dSrPortTargetSegment -+ INTEGER, -+ dot1dSrPortLargestFrame -+ INTEGER, -+ dot1dSrPortSTESpanMode -+ INTEGER, -+ dot1dSrPortSpecInFrames -+ Counter, -+ dot1dSrPortSpecOutFrames -+ Counter, -+ dot1dSrPortApeInFrames -+ Counter, -+ dot1dSrPortApeOutFrames -+ Counter, -+ dot1dSrPortSteInFrames -+ Counter, -+ dot1dSrPortSteOutFrames -+ Counter, -+ dot1dSrPortSegmentMismatchDiscards -+ Counter, -+ dot1dSrPortDuplicateSegmentDiscards -+ Counter, -+ dot1dSrPortHopCountExceededDiscards -+ Counter, -+ dot1dSrPortDupLanIdOrTreeErrors -+ Counter, -+ dot1dSrPortLanIdMismatches -+ Counter -+ } -+ -+dot1dSrPort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the port for which this entry -+ -+ contains Source Route management information." -+ ::= { dot1dSrPortEntry 1 } -+ -+dot1dSrPortHopCount OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The maximum number of routing descriptors allowed -+ in an All Paths or Spanning Tree Explorer frames." -+ ::= { dot1dSrPortEntry 2 } -+ -+dot1dSrPortLocalSegment OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The segment number that uniquely identifies the -+ segment to which this port is connected. Current -+ source routing protocols limit this value to the -+ range: 0 through 4095. (The value 0 is used by -+ some management applications for special test -+ cases.) A value of 65535 signifies that no segment -+ number is assigned to this port." -+ ::= { dot1dSrPortEntry 3 } -+ -+dot1dSrPortBridgeNum OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "A bridge number uniquely identifies a bridge when -+ more than one bridge is used to span the same two -+ segments. Current source routing protocols limit -+ this value to the range: 0 through 15. A value of -+ 65535 signifies that no bridge number is assigned -+ to this bridge." -+ ::= { dot1dSrPortEntry 4 } -+ -+dot1dSrPortTargetSegment OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The segment number that corresponds to the target -+ segment this port is considered to be connected to -+ by the bridge. Current source routing protocols -+ limit this value to the range: 0 through 4095. -+ -+ (The value 0 is used by some management -+ applications for special test cases.) A value of -+ 65535 signifies that no target segment is assigned -+ to this port." -+ ::= { dot1dSrPortEntry 5 } -+ -+-- It would be nice if we could use ifMtu as the size of the -+-- largest frame, but we can't because ifMtu is defined to be -+-- the size that the (inter-)network layer can use which can -+-- differ from the MAC layer (especially if several layers of -+-- encapsulation are used). -+ -+dot1dSrPortLargestFrame OBJECT-TYPE -+ SYNTAX INTEGER -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The maximum size of the INFO field (LLC and -+ above) that this port can send/receive. It does -+ not include any MAC level (framing) octets. The -+ value of this object is used by this bridge to -+ determine whether a modification of the -+ LargestFrame (LF, see [14]) field of the Routing -+ Control field of the Routing Information Field is -+ necessary. -+ -+ 64 valid values are defined by the IEEE 802.5M SRT -+ Addendum: 516, 635, 754, 873, 993, 1112, 1231, -+ 1350, 1470, 1542, 1615, 1688, 1761, 1833, 1906, -+ 1979, 2052, 2345, 2638, 2932, 3225, 3518, 3812, -+ 4105, 4399, 4865, 5331, 5798, 6264, 6730, 7197, -+ 7663, 8130, 8539, 8949, 9358, 9768, 10178, 10587, -+ 10997, 11407, 12199, 12992, 13785, 14578, 15370, -+ 16163, 16956, 17749, 20730, 23711, 26693, 29674, -+ 32655, 35637, 38618, 41600, 44591, 47583, 50575, -+ 53567, 56559, 59551, and 65535. -+ -+ An illegal value will not be accepted by the -+ bridge." -+ ::= { dot1dSrPortEntry 6 } -+ -+dot1dSrPortSTESpanMode OBJECT-TYPE -+ SYNTAX INTEGER { -+ auto-span(1), -+ disabled(2), -+ forced(3) -+ } -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "Determines how this port behaves when presented -+ with a Spanning Tree Explorer frame. The value -+ 'disabled(2)' indicates that the port will not -+ accept or send Spanning Tree Explorer packets; any -+ STE packets received will be silently discarded. -+ The value 'forced(3)' indicates the port will -+ always accept and propagate Spanning Tree Explorer -+ frames. This allows a manually configured -+ Spanning Tree for this class of packet to be -+ configured. Note that unlike transparent -+ bridging, this is not catastrophic to the network -+ if there are loops. The value 'auto-span(1)' can -+ only be returned by a bridge that both implements -+ the Spanning Tree Protocol and has use of the -+ protocol enabled on this port. The behavior of the -+ port for Spanning Tree Explorer frames is -+ determined by the state of dot1dStpPortState. If -+ the port is in the 'forwarding' state, the frame -+ will be accepted or propagated. Otherwise, it -+ will be silently discarded." -+ ::= { dot1dSrPortEntry 7 } -+ -+dot1dSrPortSpecInFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of Specifically Routed frames, also -+ referred to as Source Routed Frames, that have -+ been received from this port's segment." -+ ::= { dot1dSrPortEntry 8 } -+ -+dot1dSrPortSpecOutFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of Specifically Routed frames, also -+ referred to as Source Routed Frames, that this -+ port has transmitted on its segment." -+ ::= { dot1dSrPortEntry 9 } -+ -+dot1dSrPortApeInFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of All Paths Explorer frames, also -+ referred to as All Routes Explorer frames, that -+ have been received by this port from its segment." -+ ::= { dot1dSrPortEntry 10 } -+ -+dot1dSrPortApeOutFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of all Paths Explorer Frames, also -+ referred to as All Routes Explorer frames, that -+ have been transmitted by this port on its -+ segment." -+ ::= { dot1dSrPortEntry 11 } -+ -+dot1dSrPortSteInFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of spanning tree explorer frames that -+ have been received by this port from its segment." -+ ::= { dot1dSrPortEntry 12 } -+ -+dot1dSrPortSteOutFrames OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of spanning tree explorer frames that -+ have been transmitted by this port on its -+ segment." -+ ::= { dot1dSrPortEntry 13 } -+ -+dot1dSrPortSegmentMismatchDiscards OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of explorer frames that have been -+ discarded by this port because the routing -+ descriptor field contained an invalid adjacent -+ segment value." -+ ::= { dot1dSrPortEntry 14 } -+ -+dot1dSrPortDuplicateSegmentDiscards OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of frames that have been discarded by -+ this port because the routing descriptor field -+ contained a duplicate segment identifier." -+ ::= { dot1dSrPortEntry 15 } -+ -+dot1dSrPortHopCountExceededDiscards OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of explorer frames that have been -+ discarded by this port because the Routing -+ Information Field has exceeded the maximum route -+ descriptor length." -+ ::= { dot1dSrPortEntry 16 } -+ -+dot1dSrPortDupLanIdOrTreeErrors OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of duplicate LAN IDs or Tree errors. -+ This helps in detection of problems in networks -+ containing older IBM Source Routing Bridges." -+ ::= { dot1dSrPortEntry 17 } -+ -+dot1dSrPortLanIdMismatches OBJECT-TYPE -+ SYNTAX Counter -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The number of ARE and STE frames that were -+ discarded because the last LAN ID in the routing -+ information field did not equal the LAN-in ID. -+ This error can occur in implementations which do -+ only a LAN-in ID and Bridge Number check instead -+ of a LAN-in ID, Bridge Number, and LAN-out ID -+ check before they forward broadcast frames." -+ ::= { dot1dSrPortEntry 18 } -+ -+-- scalar object in dot1dSr -+ -+dot1dSrBridgeLfMode OBJECT-TYPE -+ SYNTAX INTEGER { -+ mode3(1), -+ mode6(2) -+ } -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "Indicates whether the bridge operates using older -+ 3 bit length negotiation fields or the newer 6 bit -+ length field in its RIF." -+ ::= { dot1dSr 2 } -+ -+-- The Port-Pair Database -+ -+-- Implementation of this group is optional. -+ -+-- This group is implemented by those bridges that support -+-- the direct multiport model of the source route bridging -+-- mode as defined in the IEEE 802.5 SRT Addendum to -+-- 802.1d. -+ -+-- Bridges implementing this group may report 65535 for -+-- dot1dSrPortBridgeNumber and dot1dSrPortTargetSegment, -+-- indicating that those objects are not applicable. -+ -+dot1dPortPairTableSize OBJECT-TYPE -+ SYNTAX Gauge -+ ACCESS read-only -+ STATUS mandatory -+ DESCRIPTION -+ "The total number of entries in the Bridge Port -+ Pair Database." -+ ::= { dot1dPortPair 1 } -+ -+-- the Bridge Port-Pair table -+ -+-- this table represents port pairs within a bridge forming -+-- a unique bridge path, as defined in the IEEE 802.5M SRT -+-- Addendum. -+ -+dot1dPortPairTable OBJECT-TYPE -+ SYNTAX SEQUENCE OF Dot1dPortPairEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A table that contains information about every -+ -+ port pair database entity associated with this -+ source routing bridge." -+ ::= { dot1dPortPair 2 } -+ -+dot1dPortPairEntry OBJECT-TYPE -+ SYNTAX Dot1dPortPairEntry -+ ACCESS not-accessible -+ STATUS mandatory -+ DESCRIPTION -+ "A list of information for each port pair entity -+ of a bridge." -+ INDEX { dot1dPortPairLowPort, dot1dPortPairHighPort } -+ ::= { dot1dPortPairTable 1 } -+ -+Dot1dPortPairEntry ::= -+ SEQUENCE { -+ dot1dPortPairLowPort -+ INTEGER, -+ dot1dPortPairHighPort -+ INTEGER, -+ dot1dPortPairBridgeNum -+ INTEGER, -+ dot1dPortPairBridgeState -+ INTEGER -+ } -+ -+dot1dPortPairLowPort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the lower numbered port for -+ which this entry contains port pair database -+ information." -+ ::= { dot1dPortPairEntry 1 } -+ -+dot1dPortPairHighPort OBJECT-TYPE -+ SYNTAX INTEGER (1..65535) -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The port number of the higher numbered port for -+ which this entry contains port pair database -+ information." -+ ::= { dot1dPortPairEntry 2 } -+ -+dot1dPortPairBridgeNum OBJECT-TYPE -+ SYNTAX INTEGER -+ -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "A bridge number that uniquely identifies the path -+ provided by this source routing bridge between the -+ segments connected to dot1dPortPairLowPort and -+ dot1dPortPairHighPort. The purpose of bridge -+ number is to disambiguate between multiple paths -+ connecting the same two LANs." -+ ::= { dot1dPortPairEntry 3 } -+ -+dot1dPortPairBridgeState OBJECT-TYPE -+ SYNTAX INTEGER { -+ enabled(1), -+ disabled(2), -+ invalid(3) -+ } -+ ACCESS read-write -+ STATUS mandatory -+ DESCRIPTION -+ "The state of dot1dPortPairBridgeNum. Writing -+ 'invalid(3)' to this object removes the -+ corresponding entry." -+ ::= { dot1dPortPairEntry 4 } -+ -+END diff --git a/net/net-snmp/patches/160-no_ldconfig.patch b/net/net-snmp/patches/160-no_ldconfig.patch deleted file mode 100644 index 7b65c18..0000000 --- a/net/net-snmp/patches/160-no_ldconfig.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure -+++ b/configure -@@ -14197,7 +14197,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' -- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ finish_cmds='' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - diff --git a/net/net-snmp/patches/170-ldflags.patch b/net/net-snmp/patches/170-ldflags.patch deleted file mode 100644 index 2d572c0..0000000 --- a/net/net-snmp/patches/170-ldflags.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.top -+++ b/Makefile.top -@@ -85,7 +85,7 @@ LIBCURRENT = 30 - LIBAGE = 0 - LIBREVISION = 3 - --LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o -+LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) $(LDFLAGS) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o - LIB_EXTENSION = la - LIB_VERSION = - LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(INSTALL_PREFIX)$(libdir) diff --git a/net/net-snmp/patches/750-ieee802dot11.patch b/net/net-snmp/patches/750-ieee802dot11.patch deleted file mode 100644 index a3c5c0a..0000000 --- a/net/net-snmp/patches/750-ieee802dot11.patch +++ /dev/null @@ -1,6156 +0,0 @@ ---- /dev/null -+++ b/agent/mibgroup/ieee802dot11.c -@@ -0,0 +1,4915 @@ -+/**************************************************************************** -+* * -+* File Name: ieee802dot11.c * -+* Used By: * -+* * -+* Operating System: * -+* Purpose: * -+* * -+* Comments: * -+* * -+* Author: Larry Simmons * -+* lsimmons@avantcom.com * -+* www.avantcom.com * -+* * -+* Creation Date: 09/02/03 * -+* * -+* Ver Date Inits Modification * -+* ----- -------- ----- ------------ * -+* 0.0.1 09/02/03 LRS created * -+* 0.0.2 09/24/03 LRS wouldn't build after fresh ./configure * -+****************************************************************************/ -+/**************************************************************************** -+* Includes * -+****************************************************************************/ -+#include -+#include -+#include -+#include "ieee802dot11.h" -+#include "iwlib.h" -+ -+/**************************************************************************** -+* Defines * -+****************************************************************************/ -+#define DISPLAYWIEXT // display wireless ext info -+#define TABLE_SIZE 1 -+//#define MINLOADFREQ 15 // min reload frequency in seconds -+#define MINLOADFREQ 5 // min reload frequency in seconds // for testing -+#define PROC_NET_DEV "/proc/net/dev" -+#define PROC_NET_WIRELESS "/proc/net/wireless" -+ -+#ifndef UCHAR -+ typedef unsigned char UCHAR; -+#endif -+ -+/**************************************************************************** -+* Private Functions * -+****************************************************************************/ -+static void loadTables(); -+static void loadWiExt ( int, char *, struct wireless_info * ); -+static void load80211Structs ( int, char *, struct wireless_info * ); -+static void initStructs(); -+ -+// Wireless Extensions Specific Functions -+static void loadWiExtTo80211Structs ( int, char *, struct wireless_info * ); -+static void displayWiExt ( struct wireless_info ); -+ -+// Linked List Functions -+static void addList ( char *, char *, int ); -+static void initLists(); // initialize all the linked lists -+static void flushLists(); // flush all the linked lists -+static void flushList ( char * ); // flush a single linked list -+ -+// Utility Functions -+static int openSocket ( void ); -+static int mWatt2dbm ( int ); -+static char *htob ( char * ); -+static int hasChanged ( char *, int ); -+ -+/**************************************************************************** -+* Private Variables * -+****************************************************************************/ -+static unsigned long lastLoad = 0; // ET in secs at last table load -+ -+static struct avNode *lastNode, *newNode, *np; -+ -+/**************************************************************************** -+* External Functions * -+****************************************************************************/ -+ -+/**************************************************************************** -+* ieee802dot11_variables_oid: * -+* this is the top level oid that we want to register under. This * -+* is essentially a prefix, with the suffix appearing in the * -+* variable below. * -+****************************************************************************/ -+oid ieee802dot11_variables_oid[] = { 1,2,840,10036 }; -+ -+/**************************************************************************** -+* variable7 ieee802dot11_variables: * -+* this variable defines function callbacks and type return information * -+* for the ieee802dot11 mib section * -+****************************************************************************/ -+struct variable7 ieee802dot11_variables[] = { -+/* magic number , variable type , ro/rw , callback fn , L, oidsuffix */ -+#define DOT11STATIONID 3 -+ { DOT11STATIONID , ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,1 } }, -+#define DOT11MEDIUMOCCUPANCYLIMIT 4 -+ { DOT11MEDIUMOCCUPANCYLIMIT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,2 } }, -+#define DOT11CFPOLLABLE 5 -+ { DOT11CFPOLLABLE , ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,3 } }, -+#define DOT11CFPPERIOD 6 -+ { DOT11CFPPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,4 } }, -+#define DOT11CFPMAXDURATION 7 -+ { DOT11CFPMAXDURATION , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,5 } }, -+#define DOT11AUTHENTICATIONRESPONSETIMEOUT 8 -+ { DOT11AUTHENTICATIONRESPONSETIMEOUT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,6 } }, -+#define DOT11PRIVACYOPTIONIMPLEMENTED 9 -+ { DOT11PRIVACYOPTIONIMPLEMENTED, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,7 } }, -+#define DOT11POWERMANAGEMENTMODE 10 -+ { DOT11POWERMANAGEMENTMODE, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,8 } }, -+#define DOT11DESIREDSSID 11 -+ { DOT11DESIREDSSID , ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,9 } }, -+#define DOT11DESIREDBSSTYPE 12 -+ { DOT11DESIREDBSSTYPE , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,10 } }, -+#define DOT11OPERATIONALRATESET 13 -+ { DOT11OPERATIONALRATESET, ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,11 } }, -+#define DOT11BEACONPERIOD 14 -+ { DOT11BEACONPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,12 } }, -+#define DOT11DTIMPERIOD 15 -+ { DOT11DTIMPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,13 } }, -+#define DOT11ASSOCIATIONRESPONSETIMEOUT 16 -+ { DOT11ASSOCIATIONRESPONSETIMEOUT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,14 } }, -+#define DOT11DISASSOCIATEREASON 17 -+ { DOT11DISASSOCIATEREASON, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,15 } }, -+#define DOT11DISASSOCIATESTATION 18 -+ { DOT11DISASSOCIATESTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,16 } }, -+#define DOT11DEAUTHENTICATEREASON 19 -+ { DOT11DEAUTHENTICATEREASON, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,17 } }, -+#define DOT11DEAUTHENTICATESTATION 20 -+ { DOT11DEAUTHENTICATESTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,18 } }, -+#define DOT11AUTHENTICATEFAILSTATUS 21 -+ { DOT11AUTHENTICATEFAILSTATUS, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,19 } }, -+#define DOT11AUTHENTICATEFAILSTATION 22 -+ { DOT11AUTHENTICATEFAILSTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,20 } }, -+ -+#define DOT11AUTHENTICATIONALGORITHM 26 -+ { DOT11AUTHENTICATIONALGORITHM, ASN_INTEGER , RONLY , var_dot11AuthenticationAlgorithmsTable, 4, { 1,2,1,2 } }, -+#define DOT11AUTHENTICATIONALGORITHMSENABLE 27 -+ { DOT11AUTHENTICATIONALGORITHMSENABLE, ASN_INTEGER , RWRITE, var_dot11AuthenticationAlgorithmsTable, 4, { 1,2,1,3 } }, -+ -+#define DOT11WEPDEFAULTKEYVALUE 31 -+ { DOT11WEPDEFAULTKEYVALUE, ASN_OCTET_STR , RWRITE, var_dot11WEPDefaultKeysTable, 4, { 1,3,1,2 } }, -+ -+#define DOT11WEPKEYMAPPINGADDRESS 35 -+ { DOT11WEPKEYMAPPINGADDRESS, ASN_OCTET_STR , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,2 } }, -+#define DOT11WEPKEYMAPPINGWEPON 36 -+ { DOT11WEPKEYMAPPINGWEPON, ASN_INTEGER , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,3 } }, -+#define DOT11WEPKEYMAPPINGVALUE 37 -+ { DOT11WEPKEYMAPPINGVALUE, ASN_OCTET_STR , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,4 } }, -+#define DOT11WEPKEYMAPPINGSTATUS 38 -+ { DOT11WEPKEYMAPPINGSTATUS, ASN_INTEGER , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,5 } }, -+ -+#define DOT11PRIVACYINVOKED 41 -+ { DOT11PRIVACYINVOKED , ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,1 } }, -+#define DOT11WEPDEFAULTKEYID 42 -+ { DOT11WEPDEFAULTKEYID, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,2 } }, -+#define DOT11WEPKEYMAPPINGLENGTH 43 -+ { DOT11WEPKEYMAPPINGLENGTH, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,3 } }, -+#define DOT11EXCLUDEUNENCRYPTED 44 -+ { DOT11EXCLUDEUNENCRYPTED, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,4 } }, -+#define DOT11WEPICVERRORCOUNT 45 -+ { DOT11WEPICVERRORCOUNT, ASN_COUNTER , RONLY , var_dot11PrivacyTable, 4, { 1,5,1,5 } }, -+#define DOT11WEPEXCLUDEDCOUNT 46 -+ { DOT11WEPEXCLUDEDCOUNT, ASN_COUNTER , RONLY , var_dot11PrivacyTable, 4, { 1,5,1,6 } }, -+ -+#define DOT11MACADDRESS 49 -+ { DOT11MACADDRESS , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,1 } }, -+#define DOT11RTSTHRESHOLD 50 -+ { DOT11RTSTHRESHOLD , ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,2 } }, -+#define DOT11SHORTRETRYLIMIT 51 -+ { DOT11SHORTRETRYLIMIT, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,3 } }, -+#define DOT11LONGRETRYLIMIT 52 -+ { DOT11LONGRETRYLIMIT , ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,4 } }, -+#define DOT11FRAGMENTATIONTHRESHOLD 53 -+ { DOT11FRAGMENTATIONTHRESHOLD, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,5 } }, -+#define DOT11MAXTRANSMITMSDULIFETIME 54 -+ { DOT11MAXTRANSMITMSDULIFETIME, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,6 } }, -+#define DOT11MAXRECEIVELIFETIME 55 -+ { DOT11MAXRECEIVELIFETIME, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,7 } }, -+#define DOT11MANUFACTURERID 56 -+ { DOT11MANUFACTURERID , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,8 } }, -+#define DOT11PRODUCTID 57 -+ { DOT11PRODUCTID , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,9 } }, -+ -+#define DOT11TRANSMITTEDFRAGMENTCOUNT 60 -+ { DOT11TRANSMITTEDFRAGMENTCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,1 } }, -+#define DOT11MULTICASTTRANSMITTEDFRAMECOUNT 61 -+ { DOT11MULTICASTTRANSMITTEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,2 } }, -+#define DOT11FAILEDCOUNT 62 -+ { DOT11FAILEDCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,3 } }, -+#define DOT11RETRYCOUNT 63 -+ { DOT11RETRYCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,4 } }, -+#define DOT11MULTIPLERETRYCOUNT 64 -+ { DOT11MULTIPLERETRYCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,5 } }, -+#define DOT11FRAMEDUPLICATECOUNT 65 -+ { DOT11FRAMEDUPLICATECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,6 } }, -+#define DOT11RTSSUCCESSCOUNT 66 -+ { DOT11RTSSUCCESSCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,7 } }, -+#define DOT11RTSFAILURECOUNT 67 -+ { DOT11RTSFAILURECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,8 } }, -+#define DOT11ACKFAILURECOUNT 68 -+ { DOT11ACKFAILURECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,9 } }, -+#define DOT11RECEIVEDFRAGMENTCOUNT 69 -+ { DOT11RECEIVEDFRAGMENTCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,10 } }, -+#define DOT11MULTICASTRECEIVEDFRAMECOUNT 70 -+ { DOT11MULTICASTRECEIVEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,11 } }, -+#define DOT11FCSERRORCOUNT 71 -+ { DOT11FCSERRORCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,12 } }, -+#define DOT11TRANSMITTEDFRAMECOUNT 72 -+ { DOT11TRANSMITTEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,13 } }, -+#define DOT11WEPUNDECRYPTABLECOUNT 73 -+ { DOT11WEPUNDECRYPTABLECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,14 } }, -+ -+#define DOT11ADDRESS 77 -+ { DOT11ADDRESS , ASN_OCTET_STR , RWRITE, var_dot11GroupAddressesTable, 4, { 2,3,1,2 } }, -+#define DOT11GROUPADDRESSESSTATUS 78 -+ { DOT11GROUPADDRESSESSTATUS, ASN_INTEGER , RWRITE, var_dot11GroupAddressesTable, 4, { 2,3,1,3 } }, -+ -+#define DOT11RESOURCETYPEIDNAME 79 -+ { DOT11RESOURCETYPEIDNAME, ASN_OCTET_STR , RONLY , var_ieee802dot11, 3, { 3,1,1 } }, -+#define DOT11MANUFACTUREROUI 82 -+ { DOT11MANUFACTUREROUI, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,1 } }, -+#define DOT11MANUFACTURERNAME 83 -+ { DOT11MANUFACTURERNAME, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,2 } }, -+#define DOT11MANUFACTURERPRODUCTNAME 84 -+ { DOT11MANUFACTURERPRODUCTNAME, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,3 } }, -+#define DOT11MANUFACTURERPRODUCTVERSION 85 -+ { DOT11MANUFACTURERPRODUCTVERSION, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,4 } }, -+ -+#define DOT11PHYTYPE 88 -+ { DOT11PHYTYPE , ASN_INTEGER , RONLY , var_dot11PhyOperationTable, 4, { 4,1,1,1 } }, -+#define DOT11CURRENTREGDOMAIN 89 -+ { DOT11CURRENTREGDOMAIN, ASN_INTEGER , RWRITE, var_dot11PhyOperationTable, 4, { 4,1,1,2 } }, -+#define DOT11TEMPTYPE 90 -+ { DOT11TEMPTYPE , ASN_INTEGER , RONLY , var_dot11PhyOperationTable, 4, { 4,1,1,3 } }, -+#define DOT11CURRENTTXANTENNA 93 -+ { DOT11CURRENTTXANTENNA, ASN_INTEGER , RWRITE, var_dot11PhyAntennaTable, 4, { 4,2,1,1 } }, -+#define DOT11DIVERSITYSUPPORT 94 -+ { DOT11DIVERSITYSUPPORT, ASN_INTEGER , RONLY , var_dot11PhyAntennaTable, 4, { 4,2,1,2 } }, -+#define DOT11CURRENTRXANTENNA 95 -+ { DOT11CURRENTRXANTENNA, ASN_INTEGER , RWRITE, var_dot11PhyAntennaTable, 4, { 4,2,1,3 } }, -+#define DOT11NUMBERSUPPORTEDPOWERLEVELS 98 -+ { DOT11NUMBERSUPPORTEDPOWERLEVELS, ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,1 } }, -+#define DOT11TXPOWERLEVEL1 99 -+ { DOT11TXPOWERLEVEL1 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,2 } }, -+#define DOT11TXPOWERLEVEL2 100 -+ { DOT11TXPOWERLEVEL2 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,3 } }, -+#define DOT11TXPOWERLEVEL3 101 -+ { DOT11TXPOWERLEVEL3 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,4 } }, -+#define DOT11TXPOWERLEVEL4 102 -+ { DOT11TXPOWERLEVEL4 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,5 } }, -+#define DOT11TXPOWERLEVEL5 103 -+ { DOT11TXPOWERLEVEL5 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,6 } }, -+#define DOT11TXPOWERLEVEL6 104 -+ { DOT11TXPOWERLEVEL6 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,7 } }, -+#define DOT11TXPOWERLEVEL7 105 -+ { DOT11TXPOWERLEVEL7 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,8 } }, -+#define DOT11TXPOWERLEVEL8 106 -+ { DOT11TXPOWERLEVEL8 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,9 } }, -+#define DOT11CURRENTTXPOWERLEVEL 107 -+ { DOT11CURRENTTXPOWERLEVEL, ASN_INTEGER , RWRITE, var_dot11PhyTxPowerTable, 4, { 4,3,1,10 } }, -+ -+#define DOT11HOPTIME 110 -+ { DOT11HOPTIME , ASN_INTEGER , RONLY , var_dot11PhyFHSSTable, 4, { 4,4,1,1 } }, -+#define DOT11CURRENTCHANNELNUMBER 111 -+ { DOT11CURRENTCHANNELNUMBER, ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,2 } }, -+#define DOT11MAXDWELLTIME 112 -+ { DOT11MAXDWELLTIME , ASN_INTEGER , RONLY , var_dot11PhyFHSSTable, 4, { 4,4,1,3 } }, -+#define DOT11CURRENTDWELLTIME 113 -+ { DOT11CURRENTDWELLTIME, ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,4 } }, -+#define DOT11CURRENTSET 114 -+ { DOT11CURRENTSET , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,5 } }, -+#define DOT11CURRENTPATTERN 115 -+ { DOT11CURRENTPATTERN , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,6 } }, -+#define DOT11CURRENTINDEX 116 -+ { DOT11CURRENTINDEX , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,7 } }, -+ -+#define DOT11CURRENTCHANNEL 119 -+ { DOT11CURRENTCHANNEL , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,1 } }, -+#define DOT11CCAMODESUPPORTED 120 -+ { DOT11CCAMODESUPPORTED, ASN_INTEGER , RONLY , var_dot11PhyDSSSTable, 4, { 4,5,1,2 } }, -+#define DOT11CURRENTCCAMODE 121 -+ { DOT11CURRENTCCAMODE , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,3 } }, -+#define DOT11EDTHRESHOLD 122 -+ { DOT11EDTHRESHOLD , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,4 } }, -+ -+#define DOT11CCAWATCHDOGTIMERMAX 125 -+ { DOT11CCAWATCHDOGTIMERMAX, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,1 } }, -+#define DOT11CCAWATCHDOGCOUNTMAX 126 -+ { DOT11CCAWATCHDOGCOUNTMAX, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,2 } }, -+#define DOT11CCAWATCHDOGTIMERMIN 127 -+ { DOT11CCAWATCHDOGTIMERMIN, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,3 } }, -+#define DOT11CCAWATCHDOGCOUNTMIN 128 -+ { DOT11CCAWATCHDOGCOUNTMIN, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,4 } }, -+ -+#define DOT11REGDOMAINSSUPPORTVALUE 132 -+ { DOT11REGDOMAINSSUPPORTVALUE, ASN_INTEGER , RONLY , var_dot11RegDomainsSupportedTable, 4, { 4,7,1,2 } }, -+ -+#define DOT11SUPPORTEDTXANTENNA 136 -+ { DOT11SUPPORTEDTXANTENNA, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,2 } }, -+#define DOT11SUPPORTEDRXANTENNA 137 -+ { DOT11SUPPORTEDRXANTENNA, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,3 } }, -+#define DOT11DIVERSITYSELECTIONRX 138 -+ { DOT11DIVERSITYSELECTIONRX, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,4 } }, -+ -+#define DOT11SUPPORTEDDATARATESTXVALUE 142 -+ { DOT11SUPPORTEDDATARATESTXVALUE, ASN_INTEGER , RONLY , var_dot11SupportedDataRatesTxTable, 4, { 4,9,1,2 } }, -+ -+#define DOT11SUPPORTEDDATARATESRXVALUE 146 -+ { DOT11SUPPORTEDDATARATESRXVALUE, ASN_INTEGER , RONLY , var_dot11SupportedDataRatesRxTable, 4, { 4,10,1,2 } }, -+}; -+// ( L = length of the oidsuffix ) -+ -+/**************************************************************************** -+* * -+* init_ieee802dot11() - perform any required initialization * -+* * -+****************************************************************************/ -+void init_ieee802dot11 ( void ) { -+ -+ /* register ourselves with the agent to handle our mib tree */ -+ REGISTER_MIB("ieee802dot11", ieee802dot11_variables, variable7, -+ ieee802dot11_variables_oid); -+ -+ initLists(); -+} -+ -+/**************************************************************************** -+* * -+* shutdown_ieee802dot11() - perform any required cleanup @ shutdown * -+* * -+****************************************************************************/ -+void shutdown_ieee802dot11 ( void ) -+{ -+ flushLists(); -+} -+ -+/**************************************************************************** -+* * -+* var_ieee802dot11() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_ieee802dot11 ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ loadTables(); -+ -+ if ( header_generic ( vp, name, length, exact,var_len,write_method ) -+ == MATCH_FAILED ) -+ return NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11RESOURCETYPEIDNAME: -+ if ( !haveResourceTypeIDName ) -+ return NULL; -+ *var_len = strlen ( resourceTypeIDName ); -+ return ( UCHAR * ) resourceTypeIDName; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11StationConfigTable() - return a variable value from the table * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11StationConfigTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ static char MACWork[17]; -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &scList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ sc = ( struct scTbl_data * ) np->data; -+ rName[vp->namelen] = sc->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ -+ switch ( vp->magic ) { // found requested OID, now check for requested variable -+ case DOT11STATIONID: -+ if ( sc->haveStationID ) found = TRUE; break; -+ case DOT11MEDIUMOCCUPANCYLIMIT: -+ if ( sc->haveMediumOccupancyLimit ) found = TRUE; break; -+ case DOT11CFPOLLABLE: -+ if ( sc->haveCFPPollable ) found = TRUE; break; -+ case DOT11CFPPERIOD: -+ if ( sc->haveCFPPeriod ) found = TRUE; break; -+ case DOT11CFPMAXDURATION: -+ if ( sc->haveMaxDuration ) found = TRUE; break; -+ case DOT11AUTHENTICATIONRESPONSETIMEOUT: -+ if ( sc->haveAuthenticationResponseTimeOut ) found = TRUE; break; -+ case DOT11PRIVACYOPTIONIMPLEMENTED: -+ if ( sc->havePrivacyOptionImplemented ) found = TRUE; break; -+ case DOT11POWERMANAGEMENTMODE: -+ if ( sc->havePowerManagementMode ) found = TRUE; break; -+ case DOT11DESIREDSSID: -+ if ( sc->haveDesiredSSID ) found = TRUE; break; -+ case DOT11DESIREDBSSTYPE: -+ if ( sc->haveDesiredBSSType ) found = TRUE; break; -+ case DOT11OPERATIONALRATESET: -+ if ( sc->haveOperationalRateSet ) found = TRUE; break; -+ case DOT11BEACONPERIOD: -+ if ( sc->haveBeaconPeriod ) found = TRUE; break; -+ case DOT11DTIMPERIOD: -+ if ( sc->haveDTIMPeriod ) found = TRUE; break; -+ case DOT11ASSOCIATIONRESPONSETIMEOUT: -+ if ( sc->haveAssociationResponseTimeOut ) found = TRUE; break; -+ case DOT11DISASSOCIATEREASON: -+ if ( sc->disAssociationReason ) found = TRUE; break; -+ case DOT11DISASSOCIATESTATION: -+ if ( sc->haveDisAssociationStation ) found = TRUE; break; -+ case DOT11DEAUTHENTICATEREASON: -+ if ( sc->deAuthenticationReason ) found = TRUE; break; -+ case DOT11DEAUTHENTICATESTATION: -+ if ( sc->haveDeAuthenticationStation ) found = TRUE; break; -+ case DOT11AUTHENTICATEFAILSTATUS: -+ if ( sc->authenticateFailStatus ) found = TRUE; break; -+ case DOT11AUTHENTICATEFAILSTATION: -+ if ( sc->haveAuthenticateFailStation ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11STATIONID: -+// *write_method = write_dot11StationID; -+ MACWork[ 0] = sc->stationID [ 0]; -+ MACWork[ 1] = sc->stationID [ 1]; -+ MACWork[ 2] = sc->stationID [ 3]; -+ MACWork[ 3] = sc->stationID [ 4]; -+ MACWork[ 4] = sc->stationID [ 6]; -+ MACWork[ 5] = sc->stationID [ 7]; -+ MACWork[ 6] = sc->stationID [ 9]; -+ MACWork[ 7] = sc->stationID [10]; -+ MACWork[ 8] = sc->stationID [12]; -+ MACWork[ 9] = sc->stationID [13]; -+ MACWork[10] = sc->stationID [15]; -+ MACWork[11] = sc->stationID [16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11MEDIUMOCCUPANCYLIMIT: -+// *write_method = write_dot11MediumOccupancyLimit; -+ sc->mediumOccupancyLimit = 5; -+ return ( UCHAR * ) &sc->mediumOccupancyLimit; -+ -+ case DOT11CFPOLLABLE: -+ return ( UCHAR * ) &sc->CFPPollable; -+ -+ case DOT11CFPPERIOD: -+// *write_method = write_dot11CFPPeriod; -+ return ( UCHAR * ) &sc->CFPPeriod; -+ -+ case DOT11CFPMAXDURATION: -+// *write_method = write_dot11CFPMaxDuration; -+ return ( UCHAR * ) &sc->maxDuration; -+ -+ case DOT11AUTHENTICATIONRESPONSETIMEOUT: -+// *write_method = write_dot11AuthenticationResponseTimeOut; -+ return ( UCHAR * ) &sc->authenticationResponseTimeOut; -+ -+ case DOT11PRIVACYOPTIONIMPLEMENTED: -+ return ( UCHAR * ) &sc->privacyOptionImplemented; -+ -+ case DOT11POWERMANAGEMENTMODE: -+// *write_method = write_dot11PowerManagementMode; -+ return ( UCHAR * ) &sc->powerManagementMode; -+ -+ case DOT11DESIREDSSID: -+// *write_method = write_dot11DesiredSSID; -+ *var_len = strlen ( sc->desiredSSID ); -+ return ( UCHAR * ) sc->desiredSSID; -+ -+ case DOT11DESIREDBSSTYPE: -+// *write_method = write_dot11DesiredBSSType; -+ return ( UCHAR * ) &sc->desiredBSSType; -+ -+ case DOT11OPERATIONALRATESET: -+// *write_method = write_dot11OperationalRateSet; -+ *var_len = strlen ( sc->operationalRateSet ); -+ return ( UCHAR * ) sc->operationalRateSet; -+ -+ case DOT11BEACONPERIOD: -+// *write_method = write_dot11BeaconPeriod; -+ return ( UCHAR * ) &sc->beaconPeriod; -+ -+ case DOT11DTIMPERIOD: -+// *write_method = write_dot11DTIMPeriod; -+ return ( UCHAR * ) &sc->DTIMPeriod; -+ -+ case DOT11ASSOCIATIONRESPONSETIMEOUT: -+// *write_method = write_dot11AssociationResponseTimeOut; -+ return ( UCHAR * ) &sc->associationResponseTimeOut; -+ -+ case DOT11DISASSOCIATEREASON: -+ return ( UCHAR * ) &sc->disAssociationReason; -+ -+ case DOT11DISASSOCIATESTATION: -+ MACWork[ 0] = sc->disAssociationStation[ 0]; -+ MACWork[ 1] = sc->disAssociationStation[ 1]; -+ MACWork[ 2] = sc->disAssociationStation[ 3]; -+ MACWork[ 3] = sc->disAssociationStation[ 4]; -+ MACWork[ 4] = sc->disAssociationStation[ 6]; -+ MACWork[ 5] = sc->disAssociationStation[ 7]; -+ MACWork[ 6] = sc->disAssociationStation[ 9]; -+ MACWork[ 7] = sc->disAssociationStation[10]; -+ MACWork[ 8] = sc->disAssociationStation[12]; -+ MACWork[ 9] = sc->disAssociationStation[13]; -+ MACWork[10] = sc->disAssociationStation[15]; -+ MACWork[11] = sc->disAssociationStation[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11DEAUTHENTICATEREASON: -+ return ( UCHAR * ) &sc->deAuthenticationReason; -+ -+ case DOT11DEAUTHENTICATESTATION: -+ MACWork[ 0] = sc->deAuthenticationStation[ 0]; -+ MACWork[ 1] = sc->deAuthenticationStation[ 1]; -+ MACWork[ 2] = sc->deAuthenticationStation[ 3]; -+ MACWork[ 3] = sc->deAuthenticationStation[ 4]; -+ MACWork[ 4] = sc->deAuthenticationStation[ 6]; -+ MACWork[ 5] = sc->deAuthenticationStation[ 7]; -+ MACWork[ 6] = sc->deAuthenticationStation[ 9]; -+ MACWork[ 7] = sc->deAuthenticationStation[10]; -+ MACWork[ 8] = sc->deAuthenticationStation[12]; -+ MACWork[ 9] = sc->deAuthenticationStation[13]; -+ MACWork[10] = sc->deAuthenticationStation[15]; -+ MACWork[11] = sc->deAuthenticationStation[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11AUTHENTICATEFAILSTATUS: -+ return ( UCHAR * ) &sc->authenticateFailStatus; -+ -+ case DOT11AUTHENTICATEFAILSTATION: -+ MACWork[ 0] = sc->authenticateFailStation[ 0]; -+ MACWork[ 1] = sc->authenticateFailStation[ 1]; -+ MACWork[ 2] = sc->authenticateFailStation[ 3]; -+ MACWork[ 3] = sc->authenticateFailStation[ 4]; -+ MACWork[ 4] = sc->authenticateFailStation[ 6]; -+ MACWork[ 5] = sc->authenticateFailStation[ 7]; -+ MACWork[ 6] = sc->authenticateFailStation[ 9]; -+ MACWork[ 7] = sc->authenticateFailStation[10]; -+ MACWork[ 8] = sc->authenticateFailStation[12]; -+ MACWork[ 9] = sc->authenticateFailStation[13]; -+ MACWork[10] = sc->authenticateFailStation[15]; -+ MACWork[11] = sc->authenticateFailStation[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11AuthenticationAlgorithmsTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11AuthenticationAlgorithmsTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &aaList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ aa = ( struct aaTbl_data * ) np->data; -+ rName[vp->namelen + 0] = aa->ifIndex; -+ rName[vp->namelen + 1] = aa->authenticationAlgorithmsIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11AUTHENTICATIONALGORITHM: -+ if ( aa->haveAuthenticationAlgorithm ) found = TRUE; break; -+ case DOT11AUTHENTICATIONALGORITHMSENABLE: -+ if ( aa->authenticationAlgorithmsEnable ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11AUTHENTICATIONALGORITHM: -+ return ( UCHAR * ) &aa->authenticationAlgorithm; -+ -+ case DOT11AUTHENTICATIONALGORITHMSENABLE: -+// *write_method = write_dot11AuthenticationAlgorithmsEnable; -+ return ( UCHAR * ) &aa->authenticationAlgorithmsEnable; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11WEPDefaultKeysTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11WEPDefaultKeysTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &dfList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ df = ( struct dfTbl_data * ) np->data; -+ rName[vp->namelen + 0] = df->ifIndex; -+ rName[vp->namelen + 1] = df->WEPDefaultKeyIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11WEPDEFAULTKEYVALUE: -+ if ( df->haveWEPDefaultKeyValue ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11WEPDEFAULTKEYVALUE: -+// *write_method = write_dot11WEPDefaultKeyValue; -+ *var_len = strlen ( df->WEPDefaultKeyValue ); -+ return ( UCHAR * ) df->WEPDefaultKeyValue; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11WEPKeyMappingsTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11WEPKeyMappingsTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ static char MACWork[17]; -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &kmList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ km = ( struct kmTbl_data * ) np->data; -+ rName[vp->namelen + 0] = km->ifIndex; -+ rName[vp->namelen + 1] = km->WEPKeyMappingIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11WEPKEYMAPPINGADDRESS: -+ if ( km->haveWEPKeyMappingAddress ) found = TRUE; break; -+ case DOT11WEPKEYMAPPINGWEPON: -+ if ( km->haveWEPKeyMappingWEPOn ) found = TRUE; break; -+ case DOT11WEPKEYMAPPINGVALUE: -+ if ( km->haveWEPKeyMappingValue ) found = TRUE; break; -+ case DOT11WEPKEYMAPPINGSTATUS: -+ if ( km->haveWEPKeyMappingStatus ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11WEPKEYMAPPINGADDRESS: -+// *write_method = write_dot11WEPKeyMappingAddress; -+ MACWork[ 0] = km->WEPKeyMappingAddress[ 0]; -+ MACWork[ 1] = km->WEPKeyMappingAddress[ 1]; -+ MACWork[ 2] = km->WEPKeyMappingAddress[ 3]; -+ MACWork[ 3] = km->WEPKeyMappingAddress[ 4]; -+ MACWork[ 4] = km->WEPKeyMappingAddress[ 6]; -+ MACWork[ 5] = km->WEPKeyMappingAddress[ 7]; -+ MACWork[ 6] = km->WEPKeyMappingAddress[ 9]; -+ MACWork[ 7] = km->WEPKeyMappingAddress[10]; -+ MACWork[ 8] = km->WEPKeyMappingAddress[12]; -+ MACWork[ 9] = km->WEPKeyMappingAddress[13]; -+ MACWork[10] = km->WEPKeyMappingAddress[15]; -+ MACWork[11] = km->WEPKeyMappingAddress[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11WEPKEYMAPPINGWEPON: -+// *write_method = write_dot11WEPKeyMappingWEPOn; -+ return ( UCHAR * ) &km->WEPKeyMappingWEPOn; -+ -+ case DOT11WEPKEYMAPPINGVALUE: -+// *write_method = write_dot11WEPKeyMappingValue; -+ *var_len = strlen ( km->WEPKeyMappingValue ); -+ return ( UCHAR * ) km->WEPKeyMappingValue; -+ -+ case DOT11WEPKEYMAPPINGSTATUS: -+// *write_method = write_dot11WEPKeyMappingStatus; -+ return ( UCHAR * ) &km->WEPKeyMappingStatus; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PrivacyTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PrivacyTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &prList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pr = ( struct prTbl_data * ) np->data; -+ rName[vp->namelen] = pr->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11PRIVACYINVOKED: -+ if ( pr->havePrivacyInvoked ) found = TRUE; break; -+ case DOT11WEPDEFAULTKEYID: -+ if ( pr->haveWEPDefaultKeyID ) found = TRUE; break; -+ case DOT11WEPKEYMAPPINGLENGTH: -+ if ( pr->haveWEPKeyMappingLength ) found = TRUE; break; -+ case DOT11EXCLUDEUNENCRYPTED: -+ if ( pr->haveExcludeUnencrypted ) found = TRUE; break; -+ case DOT11WEPICVERRORCOUNT: -+ if ( pr->haveWEPICVErrorCount ) found = TRUE; break; -+ case DOT11WEPEXCLUDEDCOUNT: -+ if ( pr->haveWEPExcludedCount ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11PRIVACYINVOKED: -+// *write_method = write_dot11PrivacyInvoked; -+ return ( UCHAR * ) &pr->privacyInvoked; -+ -+ case DOT11WEPDEFAULTKEYID: -+// *write_method = write_dot11WEPDefaultKeyID; -+ return ( UCHAR * ) &pr->WEPDefaultKeyID; -+ -+ case DOT11WEPKEYMAPPINGLENGTH: -+// *write_method = write_dot11WEPKeyMappingLength; -+ return ( UCHAR * ) &pr->WEPKeyMappingLength; -+ -+ case DOT11EXCLUDEUNENCRYPTED: -+// *write_method = write_dot11ExcludeUnencrypted; -+ return ( UCHAR * ) &pr->excludeUnencrypted; -+ -+ case DOT11WEPICVERRORCOUNT: -+ return ( UCHAR * ) &pr->WEPICVErrorCount; -+ -+ case DOT11WEPEXCLUDEDCOUNT: -+ return ( UCHAR * ) &pr->WEPExcludedCount; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11OperationTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11OperationTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ static char MACWork[17]; -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &opList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ op = ( struct opTbl_data * ) np->data; -+ rName[vp->namelen] = op->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ -+ switch ( vp->magic ) { // found requested OID, now check for requested variable -+ case DOT11MACADDRESS: -+ if ( op->haveMACAddress ) found = TRUE; break; -+ case DOT11RTSTHRESHOLD: -+ if ( op->haveRTSThreshold ) found = TRUE; break; -+ case DOT11SHORTRETRYLIMIT: -+ if ( op->haveShortRetryLimit ) found = TRUE; break; -+ case DOT11LONGRETRYLIMIT: -+ if ( op->haveLongRetryLimit ) found = TRUE; break; -+ case DOT11FRAGMENTATIONTHRESHOLD: -+ if ( op->haveFragmentationThreshold ) found = TRUE; break; -+ case DOT11MAXTRANSMITMSDULIFETIME: -+ if ( op->haveMaxTransmitMSDULifetime ) found = TRUE; break; -+ case DOT11MAXRECEIVELIFETIME: -+ if ( op->haveMaxReceiveLifetime ) found = TRUE; break; -+ case DOT11MANUFACTURERID: -+ if ( op->haveManufacturerID ) found = TRUE; break; -+ case DOT11PRODUCTID: -+ if ( op->haveProductID ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11MACADDRESS: -+ MACWork[ 0] = op->MACAddress[ 0]; -+ MACWork[ 1] = op->MACAddress[ 1]; -+ MACWork[ 2] = op->MACAddress[ 3]; -+ MACWork[ 3] = op->MACAddress[ 4]; -+ MACWork[ 4] = op->MACAddress[ 6]; -+ MACWork[ 5] = op->MACAddress[ 7]; -+ MACWork[ 6] = op->MACAddress[ 9]; -+ MACWork[ 7] = op->MACAddress[10]; -+ MACWork[ 8] = op->MACAddress[12]; -+ MACWork[ 9] = op->MACAddress[13]; -+ MACWork[10] = op->MACAddress[15]; -+ MACWork[11] = op->MACAddress[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11RTSTHRESHOLD: -+// *write_method = write_dot11RTSThreshold; -+ return ( UCHAR * ) &op->RTSThreshold; -+ -+ case DOT11SHORTRETRYLIMIT: -+// *write_method = write_dot11ShortRetryLimit; -+ return ( UCHAR * ) &op->shortRetryLimit; -+ -+ case DOT11LONGRETRYLIMIT: -+// *write_method = write_dot11LongRetryLimit; -+ return ( UCHAR * ) &op->longRetryLimit; -+ -+ case DOT11FRAGMENTATIONTHRESHOLD: -+// *write_method = write_dot11FragmentationThreshold; -+ return ( UCHAR * ) &op->fragmentationThreshold; -+ -+ case DOT11MAXTRANSMITMSDULIFETIME: -+// *write_method = write_dot11MaxTransmitMSDULifetime; -+ return ( UCHAR * ) &op->maxTransmitMSDULifetime; -+ -+ case DOT11MAXRECEIVELIFETIME: -+// *write_method = write_dot11MaxReceiveLifetime; -+ return ( UCHAR * ) &op->maxReceiveLifetime; -+ -+ case DOT11MANUFACTURERID: -+ *var_len = strlen ( op->manufacturerID ); -+ return ( UCHAR * ) op->manufacturerID; -+ -+ case DOT11PRODUCTID: -+ *var_len = strlen ( op->productID ); -+ return ( UCHAR * ) op->productID; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11CountersTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11CountersTable(struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &coList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ co = ( struct coTbl_data * ) np->data; -+ rName[vp->namelen] = co->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11TRANSMITTEDFRAGMENTCOUNT: -+ if ( co->haveTransmittedFragmentCount ) found = TRUE; break; -+ case DOT11MULTICASTTRANSMITTEDFRAMECOUNT: -+ if ( co->haveTransmittedFrameCount ) found = TRUE; break; -+ case DOT11FAILEDCOUNT: -+ if ( co->haveFailedCount ) found = TRUE; break; -+ case DOT11RETRYCOUNT: -+ if ( co->haveRetryCount ) found = TRUE; break; -+ case DOT11MULTIPLERETRYCOUNT: -+ if ( co->haveMultipleRetryCount ) found = TRUE; break; -+ case DOT11FRAMEDUPLICATECOUNT: -+ if ( co->haveFrameDuplicateCount ) found = TRUE; break; -+ case DOT11RTSSUCCESSCOUNT: -+ if ( co->haveRTSSuccessCount ) found = TRUE; break; -+ case DOT11RTSFAILURECOUNT: -+ if ( co->haveRTSFailureCount ) found = TRUE; break; -+ case DOT11ACKFAILURECOUNT: -+ if ( co->haveACKFailureCount ) found = TRUE; break; -+ case DOT11RECEIVEDFRAGMENTCOUNT: -+ if ( co->haveReceivedFragmentCount ) found = TRUE; break; -+ case DOT11MULTICASTRECEIVEDFRAMECOUNT: -+ if ( co->haveMulticastReceivedFrameCount ) found = TRUE; break; -+ case DOT11FCSERRORCOUNT: -+ if ( co->haveFCSErrorCount ) found = TRUE; break; -+ case DOT11TRANSMITTEDFRAMECOUNT: -+ if ( co->haveTransmittedFrameCount ) found = TRUE; break; -+ case DOT11WEPUNDECRYPTABLECOUNT: -+ if ( co->haveWEPUndecryptableCount ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11TRANSMITTEDFRAGMENTCOUNT: return ( UCHAR * ) &co->transmittedFragmentCount; -+ case DOT11MULTICASTTRANSMITTEDFRAMECOUNT: return ( UCHAR * ) &co->transmittedFrameCount; -+ case DOT11FAILEDCOUNT: return ( UCHAR * ) &co->failedCount; -+ case DOT11RETRYCOUNT: return ( UCHAR * ) &co->retryCount; -+ case DOT11MULTIPLERETRYCOUNT: return ( UCHAR * ) &co->multipleRetryCount; -+ case DOT11FRAMEDUPLICATECOUNT: return ( UCHAR * ) &co->frameDuplicateCount; -+ case DOT11RTSSUCCESSCOUNT: return ( UCHAR * ) &co->RTSSuccessCount; -+ case DOT11RTSFAILURECOUNT: return ( UCHAR * ) &co->RTSFailureCount; -+ case DOT11ACKFAILURECOUNT: return ( UCHAR * ) &co->ACKFailureCount; -+ case DOT11RECEIVEDFRAGMENTCOUNT: return ( UCHAR * ) &co->receivedFragmentCount; -+ case DOT11MULTICASTRECEIVEDFRAMECOUNT: return ( UCHAR * ) &co->multicastReceivedFrameCount; -+ case DOT11FCSERRORCOUNT: return ( UCHAR * ) &co->FCSErrorCount; -+ case DOT11TRANSMITTEDFRAMECOUNT: return ( UCHAR * ) &co->transmittedFrameCount; -+ case DOT11WEPUNDECRYPTABLECOUNT: return ( UCHAR * ) &co->WEPUndecryptableCount; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11GroupAddressesTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11GroupAddressesTable(struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ static char MACWork[17]; -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &gaList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ ga = ( struct gaTbl_data * ) np->data; -+ rName[vp->namelen + 0] = ga->ifIndex; -+ rName[vp->namelen + 1] = ga->groupAddressesIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11ADDRESS: -+ if ( ga->haveAddress ) found = TRUE; break; -+ case DOT11GROUPADDRESSESSTATUS: -+ if ( ga->haveGroupAddressesStatus ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11ADDRESS: -+// *write_method = write_dot11Address; -+ MACWork[ 0] = ga->address[ 0]; -+ MACWork[ 1] = ga->address[ 1]; -+ MACWork[ 2] = ga->address[ 3]; -+ MACWork[ 3] = ga->address[ 4]; -+ MACWork[ 4] = ga->address[ 6]; -+ MACWork[ 5] = ga->address[ 7]; -+ MACWork[ 6] = ga->address[ 9]; -+ MACWork[ 7] = ga->address[10]; -+ MACWork[ 8] = ga->address[12]; -+ MACWork[ 9] = ga->address[13]; -+ MACWork[10] = ga->address[15]; -+ MACWork[11] = ga->address[16]; -+ MACWork[12] = '\0'; -+ *var_len = 6; -+ return ( UCHAR * ) htob ( MACWork ); -+ -+ case DOT11GROUPADDRESSESSTATUS: -+// *write_method = write_dot11GroupAddressesStatus; -+ return ( UCHAR * ) &ga->groupAddressesStatus; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11ResourceInfoTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11ResourceInfoTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &riList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ ri = ( struct riTbl_data * ) np->data; -+ rName[vp->namelen] = ri->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11MANUFACTUREROUI: -+ if ( ri->haveManufacturerOUI ) found = TRUE; break; -+ case DOT11MANUFACTURERNAME: -+ if ( ri->haveManufacturerName ) found = TRUE; break; -+ case DOT11MANUFACTURERPRODUCTNAME: -+ if ( ri->haveManufacturerProductName ) found = TRUE; break; -+ case DOT11MANUFACTURERPRODUCTVERSION: -+ if ( ri->haveManufacturerProductVersion ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11MANUFACTUREROUI: -+ *var_len = strlen ( ri->manufacturerOUI ); -+ return ( UCHAR * ) ri->manufacturerOUI; -+ -+ case DOT11MANUFACTURERNAME: -+ *var_len = strlen ( ri->manufacturerName ); -+ return ( UCHAR * ) ri->manufacturerName; -+ -+ case DOT11MANUFACTURERPRODUCTNAME: -+ *var_len = strlen ( ri->manufacturerProductName ); -+ return ( UCHAR * ) ri->manufacturerProductName; -+ -+ case DOT11MANUFACTURERPRODUCTVERSION: -+ *var_len = strlen ( ri->manufacturerProductVersion ); -+ return ( UCHAR * ) ri->manufacturerProductVersion; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyOperationTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyOperationTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &poList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ po = ( struct poTbl_data * ) np->data; -+ rName[vp->namelen] = po->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11PHYTYPE: -+ if ( po->havePHYType ) found = TRUE; break; -+ case DOT11CURRENTREGDOMAIN: -+ if ( po->haveCurrentRegDomain ) found = TRUE; break; -+ case DOT11TEMPTYPE: -+ if ( po->haveTempType ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11PHYTYPE: -+ return ( UCHAR * ) &po->PHYType; -+ -+ case DOT11CURRENTREGDOMAIN: -+// *write_method = write_dot11CurrentRegDomain; -+ return ( UCHAR * ) &po->currentRegDomain; -+ -+ case DOT11TEMPTYPE: -+ return ( UCHAR * ) &po->tempType; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyAntennaTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyAntennaTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &paList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pa = ( struct paTbl_data * ) np->data; -+ rName[vp->namelen] = pa->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11CURRENTTXANTENNA: -+ if ( pa->haveCurrentTxAntenna ) found = TRUE; break; -+ case DOT11DIVERSITYSUPPORT: -+ if ( pa->haveDiversitySupport ) found = TRUE; break; -+ case DOT11CURRENTRXANTENNA: -+ if ( pa->haveCurrentRxAntenna ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11CURRENTTXANTENNA: -+// *write_method = write_dot11CurrentTxAntenna; -+ return ( UCHAR * ) &pa->currentTxAntenna; -+ -+ case DOT11DIVERSITYSUPPORT: -+ return ( UCHAR * ) &pa->diversitySupport; -+ -+ case DOT11CURRENTRXANTENNA: -+// *write_method = write_dot11CurrentRxAntenna; -+ return ( UCHAR * ) &pa->currentRxAntenna; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyTxPowerTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyTxPowerTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &ptList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pt = ( struct ptTbl_data * ) np->data; -+ rName[vp->namelen] = pt->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11NUMBERSUPPORTEDPOWERLEVELS: -+ if ( pt->haveNumberSupportedPowerLevels ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL1: -+ if ( pt->haveTxPowerLevel1 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL2: -+ if ( pt->haveTxPowerLevel2 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL3: -+ if ( pt->haveTxPowerLevel3 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL4: -+ if ( pt->haveTxPowerLevel4 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL5: -+ if ( pt->haveTxPowerLevel5 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL6: -+ if ( pt->haveTxPowerLevel6 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL7: -+ if ( pt->haveTxPowerLevel7 ) found = TRUE; break; -+ case DOT11TXPOWERLEVEL8: -+ if ( pt->haveTxPowerLevel8 ) found = TRUE; break; -+ case DOT11CURRENTTXPOWERLEVEL: -+ if ( pt->currentTxPowerLevel ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11NUMBERSUPPORTEDPOWERLEVELS: -+ return ( UCHAR * ) &pt->numberSupportedPowerLevels; -+ -+ case DOT11TXPOWERLEVEL1: return ( UCHAR * ) &pt->TxPowerLevel1; -+ case DOT11TXPOWERLEVEL2: return ( UCHAR * ) &pt->TxPowerLevel2; -+ case DOT11TXPOWERLEVEL3: return ( UCHAR * ) &pt->TxPowerLevel3; -+ case DOT11TXPOWERLEVEL4: return ( UCHAR * ) &pt->TxPowerLevel4; -+ case DOT11TXPOWERLEVEL5: return ( UCHAR * ) &pt->TxPowerLevel5; -+ case DOT11TXPOWERLEVEL6: return ( UCHAR * ) &pt->TxPowerLevel6; -+ case DOT11TXPOWERLEVEL7: return ( UCHAR * ) &pt->TxPowerLevel7; -+ case DOT11TXPOWERLEVEL8: return ( UCHAR * ) &pt->TxPowerLevel8; -+ -+ case DOT11CURRENTTXPOWERLEVEL: -+// *write_method = write_dot11CurrentTxPowerLevel; -+ return ( UCHAR * ) &pt->currentTxPowerLevel; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyFHSSTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyFHSSTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &pfList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pf = ( struct pfTbl_data * ) np->data; -+ rName[vp->namelen] = pf->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11HOPTIME: -+ if ( pf->haveHopTime ) found = TRUE; break; -+ case DOT11CURRENTCHANNELNUMBER: -+ if ( pf->haveCurrentChannelNumber ) found = TRUE; break; -+ case DOT11MAXDWELLTIME: -+ if ( pf->haveMaxDwellTime ) found = TRUE; break; -+ case DOT11CURRENTDWELLTIME: -+ if ( pf->haveCurrentDwellTime ) found = TRUE; break; -+ case DOT11CURRENTSET: -+ if ( pf->haveCurrentSet ) found = TRUE; break; -+ case DOT11CURRENTPATTERN: -+ if ( pf->haveCurrentPattern ) found = TRUE; break; -+ case DOT11CURRENTINDEX: -+ if ( pf->haveCurrentIndex ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11HOPTIME: -+ return ( UCHAR * ) &pf->hopTime; -+ -+ case DOT11CURRENTCHANNELNUMBER: -+// *write_method = write_dot11CurrentChannelNumber; -+ return ( UCHAR * ) &pf->currentChannelNumber; -+ -+ case DOT11MAXDWELLTIME: -+ return ( UCHAR * ) &pf->maxDwellTime; -+ -+ case DOT11CURRENTDWELLTIME: -+// *write_method = write_dot11CurrentDwellTime; -+ return ( UCHAR * ) &pf->currentDwellTime; -+ -+ case DOT11CURRENTSET: -+// *write_method = write_dot11CurrentSet; -+ return ( UCHAR * ) &pf->currentSet; -+ -+ case DOT11CURRENTPATTERN: -+// *write_method = write_dot11CurrentPattern; -+ return ( UCHAR * ) &pf->currentPattern; -+ -+ case DOT11CURRENTINDEX: -+// *write_method = write_dot11CurrentIndex; -+ return ( UCHAR * ) &pf->currentIndex; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyDSSSTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyDSSSTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &pdList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pd = ( struct pdTbl_data * ) np->data; -+ rName[vp->namelen] = pd->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11CURRENTCHANNEL: -+ if ( pd->haveCurrentChannel ) found = TRUE; break; -+ case DOT11CCAMODESUPPORTED: -+ if ( pd->haveCCAModeSupported ) found = TRUE; break; -+ case DOT11CURRENTCCAMODE: -+ if ( pd->haveCurrentCCAMode ) found = TRUE; break; -+ case DOT11EDTHRESHOLD: -+ if ( pd->haveEDThreshold ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11CURRENTCHANNEL: -+// *write_method = write_dot11CurrentChannel; -+ return ( UCHAR * ) &pd->currentChannel; -+ -+ case DOT11CCAMODESUPPORTED: -+ return ( UCHAR * ) &pd->CCAModeSupported; -+ -+ case DOT11CURRENTCCAMODE: -+// *write_method = write_dot11CurrentCCAMode; -+ return ( UCHAR * ) &pd->currentCCAMode; -+ -+ case DOT11EDTHRESHOLD: -+// *write_method = write_dot11EDThreshold; -+ return ( UCHAR * ) &pd->EDThreshold; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11PhyIRTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11PhyIRTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &piList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ pi = ( struct piTbl_data * ) np->data; -+ rName[vp->namelen] = pi->ifIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11CCAWATCHDOGTIMERMAX: -+ if ( pi->CCAWatchdogTimerMax ) found = TRUE; break; -+ case DOT11CCAWATCHDOGCOUNTMAX: -+ if ( pi->CCAWatchdogCountMax ) found = TRUE; break; -+ case DOT11CCAWATCHDOGTIMERMIN: -+ if ( pi->CCAWatchdogTimerMin ) found = TRUE; break; -+ case DOT11CCAWATCHDOGCOUNTMIN: -+ if ( pi->CCAWatchdogCountMin ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid )); -+ *length = vp->namelen + 1; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11CCAWATCHDOGTIMERMAX: -+// *write_method = write_dot11CCAWatchdogTimerMax; -+ return ( UCHAR * ) &pi->CCAWatchdogTimerMax; -+ -+ case DOT11CCAWATCHDOGCOUNTMAX: -+// *write_method = write_dot11CCAWatchdogCountMax; -+ return ( UCHAR * ) &pi->CCAWatchdogCountMax; -+ -+ case DOT11CCAWATCHDOGTIMERMIN: -+// *write_method = write_dot11CCAWatchdogTimerMin; -+ return ( UCHAR * ) &pi->CCAWatchdogTimerMin; -+ -+ case DOT11CCAWATCHDOGCOUNTMIN: -+// *write_method = write_dot11CCAWatchdogCountMin; -+ return ( UCHAR * ) &pi->CCAWatchdogCountMin; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11RegDomainsSupportedTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11RegDomainsSupportedTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &rdList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ rd = ( struct rdTbl_data * ) np->data; -+ rName[vp->namelen + 0] = rd->ifIndex; -+ rName[vp->namelen + 1] = rd->regDomainsSupportIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11REGDOMAINSSUPPORTVALUE: -+ if ( rd->haveRegDomainsSupportValue ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11REGDOMAINSSUPPORTVALUE: -+ return ( UCHAR * ) &rd->regDomainsSupportValue; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11AntennasListTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11AntennasListTable(struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &alList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ al = ( struct alTbl_data * ) np->data; -+ rName[vp->namelen + 0] = al->ifIndex; -+ rName[vp->namelen + 1] = al->antennaListIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11SUPPORTEDTXANTENNA: -+ if ( al->haveSupportedTxAntenna ) found = TRUE; break; -+ case DOT11SUPPORTEDRXANTENNA: -+ if ( al->haveSupportedRxAntenna ) found = TRUE; break; -+ case DOT11DIVERSITYSELECTIONRX: -+ if ( al->haveDiversitySelectionRx ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11SUPPORTEDTXANTENNA: -+// *write_method = write_dot11SupportedTxAntenna; -+ return ( UCHAR * ) &al->supportedTxAntenna; -+ -+ case DOT11SUPPORTEDRXANTENNA: -+// *write_method = write_dot11SupportedRxAntenna; -+ return ( UCHAR * ) &al->supportedRxAntenna; -+ -+ case DOT11DIVERSITYSELECTIONRX: -+// *write_method = write_dot11DiversitySelectionRx; -+ return ( UCHAR * ) &al->diversitySelectionRx; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11SupportedDataRatesTxTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11SupportedDataRatesTxTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &rtList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ rt = ( struct rtTbl_data * ) np->data; -+ rName[vp->namelen + 0] = rt->ifIndex; -+ rName[vp->namelen + 1] = rt->supportedDataRatesTxIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11SUPPORTEDDATARATESTXVALUE: -+ if ( rt->haveSupportedDataRatesTxValue ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11SUPPORTEDDATARATESTXVALUE: -+ return ( UCHAR * ) &rt->supportedDataRatesTxValue; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+* var_dot11SupportedDataRatesRxTable() - * -+* * -+****************************************************************************/ -+unsigned char * -+var_dot11SupportedDataRatesRxTable ( struct variable *vp, -+ oid *name, -+ size_t *length, -+ int exact, -+ size_t *var_len, -+ WriteMethod **write_method ) -+{ -+ int found = FALSE; -+ oid rName [ MAX_OID_LEN ]; // OID to be returned -+ -+ loadTables(); -+ memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid )); -+ for ( np = LIST_FIRST ( &rrList ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ rr = ( struct rrTbl_data * ) np->data; -+ rName[vp->namelen + 0] = rr->ifIndex; -+ rName[vp->namelen + 1] = rr->supportedDataRatesRxIndex; -+ if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) || -+ ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) { -+ switch ( vp->magic ) { -+ case DOT11SUPPORTEDDATARATESRXVALUE: -+ if ( rr->haveSupportedDataRatesRxValue ) found = TRUE; break; -+ } -+ } -+ if ( found ) -+ break; -+ } -+ -+ if ( !found ) -+ return NULL; -+ -+ memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid )); -+ *length = vp->namelen + 2; -+ *var_len = sizeof ( long ); -+ *write_method = NULL; -+ -+ switch ( vp->magic ) { -+ -+ case DOT11SUPPORTEDDATARATESRXVALUE: -+ return ( UCHAR * ) &rr->supportedDataRatesRxValue; -+ -+ default: -+ ERROR_MSG ( "" ); -+ } -+ -+ return NULL; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11StationID(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11StationID not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )) { -+ fprintf ( stderr,"write to dot11StationID: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11MediumOccupancyLimit(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11MediumOccupancyLimit not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11MediumOccupancyLimit: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CFPPeriod(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CFPPeriod not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CFPPeriod: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CFPMaxDuration(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CFPMaxDuration not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CFPMaxDuration: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11AuthenticationResponseTimeOut(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11AuthenticationResponseTimeOut not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11AuthenticationResponseTimeOut: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11PowerManagementMode(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11PowerManagementMode not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )) { -+ fprintf ( stderr, "write to dot11PowerManagementMode: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11DesiredSSID(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11DesiredSSID not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )){ -+ fprintf ( stderr, "write to dot11DesiredSSID: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11DesiredBSSType(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11DesiredBSSType not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11DesiredBSSType: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11OperationalRateSet(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11OperationalRateSet not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )){ -+ fprintf ( stderr, "write to dot11OperationalRateSet: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11BeaconPeriod(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11BeaconPeriod not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11BeaconPeriod: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11DTIMPeriod(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11DTIMPeriod not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11DTIMPeriod: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11AssociationResponseTimeOut(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11AssociationResponseTimeOut not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )) { -+ fprintf ( stderr,"write to dot11AssociationResponseTimeOut: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11AuthenticationAlgorithmsEnable(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11AuthenticationAlgorithmsEnable not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11AuthenticationAlgorithmsEnable: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPDefaultKeyValue(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11WEPDefaultKeyValue not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )){ -+ fprintf ( stderr,"write to dot11WEPDefaultKeyValue: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPKeyMappingAddress(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingAddress not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )) { -+ fprintf ( stderr,"write to dot11WEPKeyMappingAddress: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPKeyMappingWEPOn(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingWEPOn not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11WEPKeyMappingWEPOn: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPKeyMappingValue(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingValue not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingValue: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPKeyMappingStatus(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingStatus not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11WEPKeyMappingStatus: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11PrivacyInvoked(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11PrivacyInvoked not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11PrivacyInvoked: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPDefaultKeyID(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11WEPDefaultKeyID not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11WEPDefaultKeyID: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11WEPKeyMappingLength(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11WEPKeyMappingLength not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11WEPKeyMappingLength: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11ExcludeUnencrypted(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11ExcludeUnencrypted not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11ExcludeUnencrypted: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11RTSThreshold(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ){ -+ fprintf ( stderr, "write to dot11RTSThreshold not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11RTSThreshold: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11ShortRetryLimit(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11ShortRetryLimit not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11ShortRetryLimit: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11LongRetryLimit(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11LongRetryLimit not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11LongRetryLimit: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11FragmentationThreshold(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11FragmentationThreshold not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11FragmentationThreshold: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11MaxTransmitMSDULifetime(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11MaxTransmitMSDULifetime not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11MaxTransmitMSDULifetime: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11MaxReceiveLifetime(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11MaxReceiveLifetime not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11MaxReceiveLifetime: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11Address(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static unsigned char string[SPRINT_MAX_LEN]; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_OCTET_STR ) { -+ fprintf ( stderr, "write to dot11Address not ASN_OCTET_STR\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( string )){ -+ fprintf ( stderr, "write to dot11Address: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11GroupAddressesStatus(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11GroupAddressesStatus not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11GroupAddressesStatus: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentRegDomain(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentRegDomain not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentRegDomain: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentTxAntenna(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentTxAntenna not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentTxAntenna: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentRxAntenna(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentRxAntenna not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11CurrentRxAntenna: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentTxPowerLevel(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentTxPowerLevel not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentTxPowerLevel: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentChannelNumber(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentChannelNumber not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11CurrentChannelNumber: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentDwellTime(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentDwellTime not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentDwellTime: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentSet(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentSet not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentSet: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentPattern(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentPattern not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentPattern: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentIndex(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentIndex not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentIndex: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentChannel(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentChannel not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CurrentChannel: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CurrentCCAMode(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CurrentCCAMode not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11CurrentCCAMode: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11EDThreshold(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11EDThreshold not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11EDThreshold: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CCAWatchdogTimerMax(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CCAWatchdogTimerMax not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CCAWatchdogTimerMax: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CCAWatchdogCountMax(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CCAWatchdogCountMax not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CCAWatchdogCountMax: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CCAWatchdogTimerMin(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CCAWatchdogTimerMin not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CCAWatchdogTimerMin: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11CCAWatchdogCountMin(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11CCAWatchdogCountMin not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11CCAWatchdogCountMin: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11SupportedTxAntenna(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11SupportedTxAntenna not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11SupportedTxAntenna: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11SupportedRxAntenna(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11SupportedRxAntenna not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr,"write to dot11SupportedRxAntenna: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+int -+write_dot11DiversitySelectionRx(int action, -+ u_char *var_val, -+ u_char var_val_type, -+ size_t var_val_len, -+ u_char *statP, -+ oid *name, -+ size_t name_len) -+{ -+ static long *long_ret; -+ int size; -+ -+ switch ( action ) { -+ -+ case RESERVE1: -+ if ( var_val_type != ASN_INTEGER ) { -+ fprintf ( stderr, "write to dot11DiversitySelectionRx not ASN_INTEGER\n" ); -+ return SNMP_ERR_WRONGTYPE; -+ } -+ if ( var_val_len > sizeof ( long_ret )){ -+ fprintf ( stderr, "write to dot11DiversitySelectionRx: bad length\n" ); -+ return SNMP_ERR_WRONGLENGTH; -+ } -+ break; -+ -+ case RESERVE2: -+ case FREE: -+ case ACTION: -+ case UNDO: -+ break; -+ -+ case COMMIT: -+ break; -+ } -+ -+ return SNMP_ERR_NOERROR; -+} -+ -+/**************************************************************************** -+* * -+* loadTables() - Load the Tables * -+* * -+****************************************************************************/ -+static void loadTables() -+{ -+ int skfd; // generic raw socket desc -+ struct iwreq wrq; // ioctl request structure -+ struct ifreq ifr; -+ struct timeval et; // elapsed time -+ struct wireless_info info; // workarea for wireless ioctl information -+ FILE *fp; -+ char bfr[1024], ifName[1024]; -+ char *s, *t; -+ -+ gettimeofday ( &et, ( struct timezone * ) 0 ); // get time-of-day -+ if ( et.tv_sec < lastLoad + MINLOADFREQ ) // only reload so often -+ return; -+ lastLoad = et.tv_sec; -+ -+ skfd = openSocket(); // open socket -+ if ( skfd < 0 ) { -+ syslog ( LOG_ERR, "SNMP ieee802dot11.loadTables() - %s\n", "socket open failure" ); -+ return; -+ } -+ -+ flushLists(); -+ -+ // find interfaces in /proc/net/dev and find the wireless interfaces -+ fp = fopen ( PROC_NET_DEV, "r" ); -+ if ( fp ) { -+ while ( fgets ( bfr, sizeof ( bfr ), fp )) { -+ if ( strstr ( bfr, ":" )) { -+ s = bfr; t = ifName; -+ while ( isspace ( *s )) // discard white space -+ *s++; -+ while ( *s != ':' ) // get interface name -+ *t++ = *s++; -+ *t = '\0'; -+ -+ // verify as a wireless device -+ memset (( char * ) &info, 0, sizeof ( struct wireless_info )); -+ strncpy ( wrq.ifr_name, ifName, IFNAMSIZ ); -+ if ( ioctl ( skfd, SIOCGIWNAME, &wrq ) >= 0 ) { -+ printf ( "%s ifName: %s\n", "loadTables() -", ifName ); -+ initStructs(); -+ loadWiExt( skfd, ifName, &info ); -+ displayWiExt ( info ); -+ load80211Structs ( skfd, ifName, &info ); -+ } -+ } -+ } -+ fclose ( fp ); -+ } -+ -+ close ( skfd ); -+} -+ -+/**************************************************************************** -+* * -+* load80211Structs() - load the 802.11 structures * -+* * -+****************************************************************************/ -+static void -+load80211Structs ( int skfd, char *ifName, struct wireless_info *wi ) -+{ -+ int rc, ifIndex = 0; -+ struct ifreq ifr; -+ char MACAddress [ MACADDR_LEN + 1 ]; -+ -+ strcpy ( ifr.ifr_name, ifName ); -+ rc = ioctl ( skfd, SIOCGIFHWADDR, &ifr ); -+ if ( rc >= 0 ) { -+ -+ sprintf ( MACAddress, "%02X:%02X:%02X:%02X:%02X:%02X\0", -+ ( UCHAR ) ifr.ifr_hwaddr.sa_data[0], ( UCHAR ) ifr.ifr_hwaddr.sa_data[1], -+ ( UCHAR ) ifr.ifr_hwaddr.sa_data[2], ( UCHAR ) ifr.ifr_hwaddr.sa_data[3], -+ ( UCHAR ) ifr.ifr_hwaddr.sa_data[4], ( UCHAR ) ifr.ifr_hwaddr.sa_data[5] ); -+ -+ nSc.haveStationID = TRUE; -+ strcpy ( nSc.stationID, MACAddress ); -+ nOp.haveMACAddress = TRUE; -+ strcpy ( nOp.MACAddress, MACAddress ); -+ nRi.haveManufacturerOUI = TRUE; -+ strncpy ( nRi.manufacturerOUI, MACAddress, MAN_OUI_LEN ); -+ -+ ifIndex = if_nametoindex ( ifName ); -+ if ( !ifIndex ) { -+ syslog ( LOG_ERR, "SNMP %s - %s %s\n", -+ "ieee802dot11.load80211Structs()", ifName, "has no ifIndex" ); -+ return; -+ } -+ -+ loadWiExtTo80211Structs ( ifIndex, ifName, wi ); -+ -+ if ( hasChanged (( char * ) &nSc, sizeof ( nSc ))) { -+ nSc.ifIndex = ifIndex; -+ sprintf ( nSc.UID, "%04d\0", nSc.ifIndex ); -+ strcpy ( nSc.ifName, ifName ); -+ addList (( char * ) &scList, ( char * ) &nSc, sizeof ( nSc )); -+ } -+ -+ if ( hasChanged (( char * ) &nPr, sizeof ( nPr ))) { -+ nPr.ifIndex = ifIndex; -+ sprintf ( nPr.UID, "%04d\0", nPr.ifIndex ); -+ strcpy ( nPr.ifName, ifName ); -+ addList (( char * ) &prList, ( char * ) &nPr, sizeof ( nPr )); -+ } -+ -+ if ( hasChanged (( char * ) &nOp, sizeof ( nOp ))) { -+ nOp.ifIndex = ifIndex; -+ sprintf ( nOp.UID, "%04d\0", nOp.ifIndex ); -+ strcpy ( nOp.ifName, ifName ); -+ addList (( char * ) &opList, ( char * ) &nOp, sizeof ( nOp )); -+ } -+ -+ if ( hasChanged (( char * ) &nCo, sizeof ( nCo ))) { -+ nCo.ifIndex = ifIndex; -+ sprintf ( nCo.UID, "%04d\0", nCo.ifIndex ); -+ strcpy ( nCo.ifName, ifName ); -+ addList (( char * ) &coList, ( char * ) &nCo, sizeof ( nCo )); -+ } -+ -+ if ( hasChanged (( char * ) &nRi, sizeof ( nRi ))) { -+ nRi.ifIndex = ifIndex; -+ sprintf ( nRi.UID, "%04d\0", nRi.ifIndex ); -+ strcpy ( nRi.ifName, ifName ); -+ addList (( char * ) &riList, ( char * ) &nRi, sizeof ( nRi )); -+ } -+ -+ if ( hasChanged (( char * ) &nPo, sizeof ( nPo ))) { -+ nPo.ifIndex = ifIndex; -+ sprintf ( nPo.UID, "%04d\0", nPo.ifIndex ); -+ strcpy ( nPo.ifName, ifName ); -+ addList (( char * ) &poList, ( char * ) &nPo, sizeof ( nPo )); -+ } -+ -+ if ( hasChanged (( char * ) &nPa, sizeof ( nPa ))) { -+ nPa.ifIndex = ifIndex; -+ sprintf ( nPa.UID, "%04d\0", nPa.ifIndex ); -+ strcpy ( nPa.ifName, ifName ); -+ addList (( char * ) &paList, ( char * ) &nPa, sizeof ( nPa )); -+ } -+ -+ if ( hasChanged (( char * ) &nPt, sizeof ( nPt ))) { -+ nPt.ifIndex = ifIndex; -+ sprintf ( nPt.UID, "%04d\0", nPt.ifIndex ); -+ strcpy ( nPt.ifName, ifName ); -+ addList (( char * ) &ptList, ( char * ) &nPt, sizeof ( nPt )); -+ } -+ -+ if ( hasChanged (( char * ) &nPf, sizeof ( nPf ))) { -+ nPf.ifIndex = ifIndex; -+ sprintf ( nPf.UID, "%04d\0", nPf.ifIndex ); -+ strcpy ( nPf.ifName, ifName ); -+ addList (( char * ) &pfList, ( char * ) &nPf, sizeof ( nPf )); -+ } -+ -+ if ( hasChanged (( char * ) &nPd, sizeof ( nPd ))) { -+ nPd.ifIndex = ifIndex; -+ sprintf ( nPd.UID, "%04d\0", nPd.ifIndex ); -+ strcpy ( nPd.ifName, ifName ); -+ addList (( char * ) &pdList, ( char * ) &nPd, sizeof ( nPd )); -+ } -+ -+ if ( hasChanged (( char * ) &nPi, sizeof ( nPi ))) { -+ nPi.ifIndex = ifIndex; -+ sprintf ( nPi.UID, "%04d\0", nPi.ifIndex ); -+ strcpy ( nPi.ifName, ifName ); -+ addList (( char * ) &piList, ( char * ) &nPi, sizeof ( nPi )); -+ } -+ } -+ -+//printf ( "%s - ifIndex: %d ifName: %s UID: %s\n", -+// "load80211Structs() - HASCHANGED", ifIndex, ifName, nSc.UID ); -+} -+ -+/**************************************************************************** -+* * -+* initStructs() - initialize structures * -+* * -+****************************************************************************/ -+static void initStructs() -+{ -+ int i; -+ -+ // 802.11 MIB Stuctures -+ memset (( char * ) &nSc, 0, sizeof ( nSc )); memset (( char * ) &nAa, 0, sizeof ( nAa )); -+ memset (( char * ) &nDf, 0, sizeof ( nDf )); memset (( char * ) &nKm, 0, sizeof ( nKm )); -+ memset (( char * ) &nPr, 0, sizeof ( nPr )); memset (( char * ) &nOp, 0, sizeof ( nOp )); -+ memset (( char * ) &nCo, 0, sizeof ( nCo )); memset (( char * ) &nGa, 0, sizeof ( nGa )); -+ memset (( char * ) &nRi, 0, sizeof ( nRi )); memset (( char * ) &nPo, 0, sizeof ( nPo )); -+ memset (( char * ) &nPa, 0, sizeof ( nPa )); memset (( char * ) &nPt, 0, sizeof ( nPt )); -+ memset (( char * ) &nPf, 0, sizeof ( nPf )); memset (( char * ) &nPd, 0, sizeof ( nPd )); -+ memset (( char * ) &nPi, 0, sizeof ( nPi )); memset (( char * ) &nRd, 0, sizeof ( nRd )); -+ memset (( char * ) &nAl, 0, sizeof ( nAl )); memset (( char * ) &nRt, 0, sizeof ( nRt )); -+ memset (( char * ) &nRr, 0, sizeof ( nRr )); -+ -+ // Wireless Extensions -+ wepCurrentKey = 0; -+ haveWepCurrentKey = FALSE; -+ for ( i = 0; i < MAX_WEP_KEYS; i++ ) { -+ wep[i].len = 0; -+ wep[i].key[0] = '\0'; -+ wep[i].haveKey = FALSE; -+ } -+} -+ -+/**************************************************************************** -+* * -+* Wireless Extensions Specific Functions * -+* * -+****************************************************************************/ -+/**************************************************************************** -+* * -+* loadWiExtTo80211Structs() - load wireless extensions to 802.11 structures * -+* * -+****************************************************************************/ -+static void -+loadWiExtTo80211Structs ( int ifIndex, char *ifName, struct wireless_info *wi ) -+{ -+ int i, j = 0; -+ -+ // dot11Smt Group -+ // dot11StationConfigTable -+ nSc.havePrivacyOptionImplemented = TRUE; -+ nSc.privacyOptionImplemented = 1; // assume we support WEP -+ -+ if ( wi->has_power ) { -+ nSc.havePowerManagementMode = TRUE; -+ nSc.powerManagementMode = 1; // assume power is active -+ if ( !wi->power.disabled && -+ wi->power.flags & IW_POWER_MIN ) -+ nSc.powerManagementMode = 2; // power save mode -+ } -+ -+ if ( wi->has_essid && strlen ( wi->essid )) { -+ nSc.haveDesiredSSID = TRUE; -+ strcpy ( nSc.desiredSSID, wi->essid ); -+ } -+ -+ if ( wi->has_mode ) { -+ nSc.haveDesiredBSSType = TRUE; -+ if ( wi->mode == IW_MODE_ADHOC ) -+ nSc.desiredBSSType = 2; // independent -+ else if ( wi->has_ap_addr ) -+ nSc.desiredBSSType = 1; // infrastructure -+ else -+ nSc.desiredBSSType = 3; // any -+ } -+ -+ if ( wi->has_range ) { -+ for ( i = 0; i < wi->range.num_bitrates && j < 126; i++ ) { -+ nSc.haveOperationalRateSet = TRUE; -+ nSc.operationalRateSet[j++] = ( char ) ( wi->range.bitrate[i] / 500000L ); -+ } -+ } -+ -+ // dot11AuthenticationAlgorithmsTable -+ nAa.haveAuthenticationAlgorithm = TRUE; // it's a rule to always have -+ nAa.haveAuthenticationAlgorithmsEnable = TRUE; // 'open' supported -+ nAa.ifIndex = ifIndex; -+ nAa.authenticationAlgorithmsIndex = 1; // index number one -+ nAa.authenticationAlgorithm = 1; // 1 => open key -+ sprintf ( nAa.UID, "%04d%04d\0", nAa.ifIndex, nAa.authenticationAlgorithmsIndex ); -+ nAa.authenticationAlgorithmsEnable = 1; // enabled by default -+ if ( ( wi->has_key ) && -+ ( wi->key_size != 0 ) && -+ !( wi->key_flags & IW_ENCODE_DISABLED )) -+ nAa.authenticationAlgorithmsEnable = 2; -+ addList (( char * ) &aaList, ( char * ) &nAa, sizeof ( nAa )); -+ -+ nAa.haveAuthenticationAlgorithm = TRUE; // I'm gonna assume we always support WEP -+ nAa.haveAuthenticationAlgorithmsEnable = TRUE; -+ nAa.ifIndex = ifIndex; -+ nAa.authenticationAlgorithmsIndex = 2; // index number 2 -+ nAa.authenticationAlgorithm = 2; // 2 => shared key -+ sprintf ( nAa.UID, "%04d%04d\0", nAa.ifIndex, nAa.authenticationAlgorithmsIndex ); -+ nAa.authenticationAlgorithmsEnable = 2; -+ if ( ( wi->has_key ) && -+ ( wi->key_size != 0 ) && -+ !( wi->key_flags & IW_ENCODE_DISABLED )) -+ nAa.authenticationAlgorithmsEnable = 1; // disabled by default -+ addList (( char * ) &aaList, ( char * ) &nAa, sizeof ( nAa )); -+ -+ //dot11WEPDefaultKeysTable -+ if ( wi->has_range ) { -+ for ( i = 0; i < MAX_WEP_KEYS; i++ ) { -+ nDf.haveWEPDefaultKeyValue = TRUE; -+ nDf.ifIndex = ifIndex; -+ nDf.WEPDefaultKeyIndex = i + 1; // index number -+ sprintf ( nDf.UID, "%04d%04d\0", nDf.ifIndex, nDf.WEPDefaultKeyIndex ); -+ if ( wep[i].haveKey ) -+ strcpy ( nDf.WEPDefaultKeyValue, "*****" ); -+ else -+ nDf.WEPDefaultKeyValue[0] = '\0'; -+ addList (( char * ) &dfList, ( char * ) &nDf, sizeof ( nDf )); -+ } -+ } -+ -+ // dot11PrivacyTable -+ nPr.havePrivacyInvoked = TRUE; -+ nPr.privacyInvoked = 2; // 2 => FALSE -+ nPr.haveWEPDefaultKeyID = TRUE; -+ nPr.WEPDefaultKeyID = 0; -+ nPr.haveExcludeUnencrypted = TRUE; -+ nPr.excludeUnencrypted = 2; // 2 => FALSE -+ if ( wi->has_range ) { -+ if ( ( wi->key_size != 0 ) && -+ !( wi->key_flags & IW_ENCODE_DISABLED )) { -+ nPr.privacyInvoked = 1; -+ if ( wi->key_flags & IW_ENCODE_RESTRICTED ) -+ nPr.excludeUnencrypted = 1; -+ nPr.WEPDefaultKeyID = wepCurrentKey; -+ } -+ } -+ -+ // dot11Mac Group -+ // dot11OperationTable -+ if ( wi->has_range ) { -+ nOp.haveRTSThreshold = TRUE; -+ nOp.RTSThreshold = wi->range.max_rts; -+ } -+ -+ if ( wi->has_frag && wi->frag.value ) { -+ nOp.haveFragmentationThreshold = TRUE; -+ nOp.fragmentationThreshold = wi->frag.value; -+ } -+ -+ // dot11Phy Group -+ // dot11PhyOperationTable -+ if ( strstr ( wi->name, "IEEE 802.11-FS" )) nPo.PHYType = 1; // So what if I -+ if ( strstr ( wi->name, "IEEE 802.11-DS" )) nPo.PHYType = 2; // made up a couple? -+ if ( strstr ( wi->name, "IEEE 802.11-IR" )) nPo.PHYType = 3; -+ if ( strstr ( wi->name, "IEEE 802.11-OFDM" )) nPo.PHYType = 4; // 802.11a -+ if ( strstr ( wi->name, "IEEE 802.11-OFDM/DS" )) nPo.PHYType = 5; // 802.11g -+ if ( strstr ( wi->name, "IEEE 802.11-TURBO" )) nPo.PHYType = 6; // Atheros TURBO mode -+ if ( nPo.PHYType ) nPo.havePHYType = TRUE; -+ -+ // dot11PhyDSSSTable -+ if ( wi->has_range ) { // && wi->freq <= ( double ) 2483000000 ) { // DSSS frequencies only -+ for ( i = 0; i < wi->range.num_frequency; i++ ) { -+ if ((( double ) ( wi->range.freq[i].e * 10 ) * ( double ) wi->range.freq[i].m ) == wi->freq ) { -+ nPd.haveCurrentChannel = TRUE; -+ nPd.currentChannel = wi->range.freq[i].i; -+ } -+ } -+ } -+ -+ // dot11SupportedDataRatesTxTable -+ if ( wi->has_range ) { -+ for ( i = 0; i < wi->range.num_bitrates; i++ ) { -+ nRt.ifIndex = ifIndex; -+ nRt.supportedDataRatesTxIndex = i + 1; -+ nRt.supportedDataRatesTxValue = wi->range.bitrate[i] / 500000L; -+ nRt.haveSupportedDataRatesTxValue = TRUE; -+ sprintf ( nRt.UID, "%04d%04d\0", nRt.ifIndex, nRt.supportedDataRatesTxIndex ); -+ strcpy ( nRt.ifName, ifName ); -+ addList (( char * ) &rtList, ( char * ) &nRt, sizeof ( nRt )); -+ } -+ } -+ -+ // dot11SupportedDataRatesRxTable -+ if ( wi->has_range ) { -+ for ( i = 0; i < wi->range.num_bitrates; i++ ) { -+ nRr.ifIndex = ifIndex; -+ nRr.supportedDataRatesRxIndex = i + 1; -+ nRr.supportedDataRatesRxValue = wi->range.bitrate[i] / 500000L; -+ nRr.haveSupportedDataRatesRxValue = TRUE; -+ sprintf ( nRr.UID, "%04d%04d\0", nRr.ifIndex, nRr.supportedDataRatesRxIndex ); -+ strcpy ( nRr.ifName, ifName ); -+ addList (( char * ) &rrList, ( char * ) &nRr, sizeof ( nRr )); -+ } -+ } -+ -+//printf ( "%s max_encoding_tokens: %d\n", -+// "loadWiExtTo80211Structs() - ", wi->range.max_encoding_tokens ); -+} -+ -+/**************************************************************************** -+* * -+* loadWiExt() - load wireless extensions structures; * -+* use ioctl calls and read /proc/net/wireless * -+* * -+****************************************************************************/ -+static void loadWiExt ( int skfd, char *ifname, struct wireless_info *wi ) -+{ -+ struct iwreq wrq; // ioctl request structure -+ FILE *fp; -+ char bfr[1024]; -+ char buffer[sizeof ( iwrange ) * 2]; /* Large enough */ -+ char *s, *t; -+ int i, j; -+ -+ strncpy ( wrq.ifr_name, ifname, IFNAMSIZ ); -+ -+ /* Get wireless name */ -+ if ( ioctl ( skfd, SIOCGIWNAME, &wrq ) >= 0 ) { -+ strncpy ( wi->name, wrq.u.name, IFNAMSIZ ); -+ wi->name[IFNAMSIZ] = '\0'; -+ } -+ -+ /* Get ranges */ // NOTE: some version checking in iwlib.c -+ memset ( buffer, 0, sizeof ( buffer )); -+ wrq.u.data.pointer = ( caddr_t ) &buffer; -+ wrq.u.data.length = sizeof ( buffer ); -+ wrq.u.data.flags = 0; -+ if ( ioctl ( skfd, SIOCGIWRANGE, &wrq ) >= 0 ) { -+ memcpy (( char * ) &wi->range, buffer, sizeof ( iwrange )); -+ wi->has_range = 1; -+ } -+ -+ /* Get network ID */ -+ if ( ioctl ( skfd, SIOCGIWNWID, &wrq ) >= 0 ) { -+ memcpy ( &wi->nwid, &wrq.u.nwid, sizeof ( iwparam )); -+ wi->has_nwid = 1; -+ } -+ -+ /* Get frequency / channel */ // THIS NUMBER LOOKS FUNNY -+ if ( ioctl ( skfd, SIOCGIWFREQ, &wrq ) >= 0 ) { -+ wi->has_freq = 1; -+ wi->freq = (( double ) wrq.u.freq.m ) * pow ( 10, wrq.u.freq.e ); -+ } -+ -+ /* Get sensitivity */ -+ if ( ioctl ( skfd, SIOCGIWSENS, &wrq ) >= 0 ) { -+ wi->has_sens = 1; -+ memcpy ( &wi->sens, &wrq.u.sens, sizeof ( iwparam )); -+ } -+ -+ /* Get encryption information */ -+ wrq.u.data.pointer = ( caddr_t ) &wi->key; -+ wrq.u.data.length = IW_ENCODING_TOKEN_MAX; -+ wrq.u.data.flags = 0; -+ if ( ioctl ( skfd, SIOCGIWENCODE, &wrq ) >= 0 ) { -+ wi->has_key = 1; -+ wi->key_size = wrq.u.data.length; -+ wi->key_flags = wrq.u.data.flags; -+ wepCurrentKey = wrq.u.data.flags & IW_ENCODE_INDEX; -+ } -+ -+ for ( i = 0; i < wi->range.max_encoding_tokens; i++ ) { -+ wrq.u.data.pointer = ( caddr_t ) &wi->key; -+ wrq.u.data.length = IW_ENCODING_TOKEN_MAX; -+ wrq.u.data.flags = i; -+ if ( ioctl ( skfd, SIOCGIWENCODE, &wrq ) >= 0 ) { -+ if ( ( wrq.u.data.length != 0 ) && -+ !( wrq.u.data.flags & IW_ENCODE_DISABLED )) { -+ wep[i].len = wrq.u.data.length; -+ wep[i].haveKey = TRUE; -+ t = wep[i].key; -+ for ( j = 0; j < wrq.u.data.length; j++ ) { -+ if (( j & 0x1 ) == 0 && j != 0 ) -+ strcpy ( t++, "-"); -+ sprintf ( t, "%.2X", wi->key[j] ); -+ t += 2; -+ } -+ t = '\0'; -+ } -+ } -+ } -+ -+ /* Get ESSID */ -+ wrq.u.essid.pointer = ( caddr_t ) &wi->essid; -+ wrq.u.essid.length = IW_ESSID_MAX_SIZE + 1; -+ wrq.u.essid.flags = 0; -+ if ( ioctl ( skfd, SIOCGIWESSID, &wrq ) >= 0 ) { -+ wi->has_essid = 1; -+ wi->essid_on = wrq.u.data.flags; -+ } -+ -+ /* Get AP address */ -+ if ( ioctl ( skfd, SIOCGIWAP, &wrq ) >= 0 ) { -+ wi->has_ap_addr = 1; -+ memcpy ( &wi->ap_addr, &wrq.u.ap_addr, sizeof ( sockaddr )); -+ } -+ -+ /* Get NickName */ -+ wrq.u.essid.pointer = ( caddr_t ) &wi->nickname; -+ wrq.u.essid.length = IW_ESSID_MAX_SIZE + 1; -+ wrq.u.essid.flags = 0; -+ if ( ioctl ( skfd, SIOCGIWNICKN, &wrq ) >= 0 ) { -+ if ( wrq.u.data.length > 1 ) -+ wi->has_nickname = 1; -+ } -+ -+ /* Get bit rate */ -+ if ( ioctl ( skfd, SIOCGIWRATE, &wrq ) >= 0 ) { -+ wi->has_bitrate = 1; -+ memcpy ( &wi->bitrate, &wrq.u.bitrate, sizeof ( iwparam )); -+ } -+ -+ /* Get RTS threshold */ -+ if ( ioctl ( skfd, SIOCGIWRTS, &wrq ) >= 0 ) { -+ wi->has_rts = 1; -+ memcpy ( &wi->rts, &wrq.u.rts, sizeof ( iwparam )); -+ } -+ -+ /* Get fragmentation threshold */ -+ if ( ioctl ( skfd, SIOCGIWFRAG, &wrq ) >= 0 ) { -+ wi->has_frag = 1; -+ memcpy ( &wi->frag, &wrq.u.frag, sizeof ( iwparam )); -+ } -+ -+ /* Get operation mode */ -+ if ( ioctl ( skfd, SIOCGIWMODE, &wrq ) >= 0 ) { -+ wi->mode = wrq.u.mode; -+ if ( wi->mode < IW_NUM_OPER_MODE && wi->mode >= 0 ) -+ wi->has_mode = 1; -+ } -+ -+ /* Get Power Management settings */ // #if WIRELESS_EXT > 9 -+ wrq.u.power.flags = 0; -+ if ( ioctl ( skfd, SIOCGIWPOWER, &wrq ) >= 0 ) { -+ wi->has_power = 1; -+ memcpy ( &wi->power, &wrq.u.power, sizeof ( iwparam )); -+ } -+ -+ /* Get retry limit/lifetime */ // #if WIRELESS_EXT > 10 -+ if ( ioctl ( skfd, SIOCGIWRETRY, &wrq ) >= 0 ) { -+ wi->has_retry = 1; -+ memcpy ( &wi->retry, &wrq.u.retry, sizeof ( iwparam )); -+ } -+ -+ /* Get stats */ // #if WIRELESS_EXT > 11 -+ wrq.u.data.pointer = ( caddr_t ) &wi->stats; -+ wrq.u.data.length = 0; -+ wrq.u.data.flags = 1; /* Clear updated flag */ -+ if ( ioctl ( skfd, SIOCGIWSTATS, &wrq ) < 0 ) -+ wi->has_stats = 1; -+ -+ if ( !wi->has_stats ) { // no ioctl support, go to file -+ fp = fopen ( PROC_NET_WIRELESS, "r" ); -+ if ( fp ) { -+ while ( fgets ( bfr, sizeof ( bfr ), fp )) { -+ bfr [ sizeof ( bfr ) - 1 ] = '\0'; // no buffer overruns here! -+ strtok (( char * ) &bfr, "\n" ); // '\n' => '\0' -+ if ( strstr ( bfr, ifname ) && strstr ( bfr, ":" )) { -+ wi->has_stats = 1; -+ s = bfr; -+ s = strchr ( s, ':' ); s++; /* Skip ethX: */ -+ s = strtok ( s, " " ); /* ' ' => '\0' */ -+ sscanf ( s, "%X", &wi->stats.status ); // status -+ -+ s = strtok ( NULL, " " ); // link quality -+ if ( strchr ( s, '.' ) != NULL ) -+ wi->stats.qual.updated |= 1; -+ sscanf ( s, "%d", &wi->stats.qual.qual ); -+ -+ s = strtok ( NULL, " " ); // signal level -+ if ( strchr ( s,'.' ) != NULL ) -+ wi->stats.qual.updated |= 2; -+ sscanf ( s, "%d", &wi->stats.qual.level ); -+ -+ s = strtok ( NULL, " " ); // noise level -+ if ( strchr ( s, '.' ) != NULL ) -+ wi->stats.qual.updated += 4; -+ sscanf ( s, "%d", &wi->stats.qual.noise ); -+ -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.nwid ); -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.code ); -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.fragment ); -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.retries ); -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.discard.misc ); -+ s = strtok ( NULL, " " ); sscanf ( s, "%d", &wi->stats.miss.beacon ); -+ } -+ } -+ fclose ( fp ); -+ } -+ } -+ -+// printf ( "%s bfr: %s\n", "loadTables()", bfr ); -+} -+ -+/**************************************************************************** -+* * -+* displayWiExt() - show what I got from Wireless Extensions * -+* * -+****************************************************************************/ -+static void displayWiExt ( struct wireless_info info ) -+{ -+#ifdef DISPLAYWIEXT -+ int i; -+ char title[] = "displayWiExt() -"; -+ -+ printf ( "========================================\n" ); -+ printf ( "===> Wireless Extension IOCTL calls <===\n" ); -+ printf ( "========================================\n" ); -+ -+ if ( strlen ( info.name )) -+ printf ( "%s name: %s\n", "SIOCGIWNAME", info.name ); -+ else -+ printf ( "%s\n", "no info.name support" ); -+ -+ if ( info.has_nickname = 1 ) -+ printf ( "%s nickname: %s\n", "SIOCGIWNICKN", info.nickname ); -+ else -+ printf ( "%s %s\n", "SIOCGIWNICKN", " ===> no info.nickname support" ); -+ -+ if ( info.has_essid ) -+ printf ( "%s essid_on: %d essid: %s\n", "SIOCGIWESSID", info.essid_on, info.essid ); -+ else -+ printf ( "%s %s\n", "SIOCGIWESSID", " ===> no info.essid support" ); -+ -+ if ( info.has_range ) { -+ printf ( "%s throughput: %d\n", "SIOCGIWRANGE", info.range.throughput ); -+ printf ( "%s min_nwid: %d\n", "SIOCGIWRANGE", info.range.min_nwid ); -+ printf ( "%s max_nwid: %d\n", "SIOCGIWRANGE", info.range.max_nwid ); -+ printf ( "%s sensitivity: %d\n", "SIOCGIWRANGE", info.range.sensitivity ); -+ printf ( "%s num_bitrates: %d\n", "SIOCGIWRANGE", info.range.num_bitrates ); -+ for ( i = 0; i < info.range.num_bitrates; i++ ) -+ printf ( "%s bitrate[%d]: %d\n", "SIOCGIWRANGE", i, info.range.bitrate[i] ); -+ printf ( "%s min_rts: %d\n", "SIOCGIWRANGE", info.range.min_rts ); -+ printf ( "%s max_rts: %d\n", "SIOCGIWRANGE", info.range.max_rts ); -+ printf ( "%s min_frag: %d\n", "SIOCGIWRANGE", info.range.min_frag ); -+ printf ( "%s max_frag: %d\n", "SIOCGIWRANGE", info.range.max_frag ); -+ printf ( "%s min_pmp: %d\n", "SIOCGIWRANGE", info.range.min_pmp ); -+ printf ( "%s max_pmp: %d\n", "SIOCGIWRANGE", info.range.max_pmp ); -+ printf ( "%s min_pmt: %d\n", "SIOCGIWRANGE", info.range.min_pmt ); -+ printf ( "%s max_pmt: %d\n", "SIOCGIWRANGE", info.range.max_pmt ); -+ printf ( "%s pmp_flags: %d\n", "SIOCGIWRANGE", info.range.pmp_flags ); -+ printf ( "%s pmt_flags: %d\n", "SIOCGIWRANGE", info.range.pmt_flags ); -+ printf ( "%s pm_capa: %d\n", "SIOCGIWRANGE", info.range.pm_capa ); -+ printf ( "%s num_encoding_sizes: %d\n", "SIOCGIWRANGE", info.range.num_encoding_sizes ); -+ for ( i = 0; i < info.range.num_encoding_sizes; i++ ) -+ printf ( "%s encoding_size[%d]: %d\n", "SIOCGIWRANGE", i, info.range.encoding_size[i] ); -+ printf ( "%s max_encoding_tokens: %d\n", "SIOCGIWRANGE", info.range.max_encoding_tokens ); -+// printf ( "%s encoding_login_index: %d\n", "SIOCGIWRANGE", info.range.encoding_login_index ); -+ printf ( "%s txpower_capa: %d\n", "SIOCGIWRANGE", info.range.txpower_capa ); -+ printf ( "%s num_txpower: %d dBm\n", "SIOCGIWRANGE", info.range.num_txpower ); -+ for ( i = 0; i < info.range.num_txpower; i++ ) -+ printf ( "%s txpower[%d]: %d\n", "SIOCGIWRANGE", i, info.range.txpower[i] ); -+ printf ( "%s we_version_compiled: %d\n", "SIOCGIWRANGE", info.range.we_version_compiled ); -+ printf ( "%s we_version_source: %d\n", "SIOCGIWRANGE", info.range.we_version_source ); -+ printf ( "%s retry_capa: %d\n", "SIOCGIWRANGE", info.range.retry_capa ); -+ printf ( "%s retry_flags: %d\n", "SIOCGIWRANGE", info.range.retry_flags ); -+ printf ( "%s r_time_flags: %d\n", "SIOCGIWRANGE", info.range.r_time_flags ); -+ printf ( "%s min_retry: %d\n", "SIOCGIWRANGE", info.range.min_retry ); -+ printf ( "%s max_retry: %d\n", "SIOCGIWRANGE", info.range.max_retry ); -+ printf ( "%s min_r_time: %d\n", "SIOCGIWRANGE", info.range.min_r_time ); -+ printf ( "%s max_r_time: %d\n", "SIOCGIWRANGE", info.range.max_r_time ); -+ printf ( "%s num_channels: %d\n", "SIOCGIWRANGE", info.range.num_channels ); -+ printf ( "%s num_frequency: %d\n", "SIOCGIWRANGE", info.range.num_frequency ); -+ for ( i = 0; i < info.range.num_frequency; i++ ) -+ printf ( "%s freq[%d].i: %d freq[%d].e: %d freq[%d].m: %d\n", "SIOCGIWRANGE", -+ i, info.range.freq[i].i, i, info.range.freq[i].e, i, info.range.freq[i].m ); -+ } -+ else -+ printf ( "%s %s\n", "SIOCGIWRANGE", " ===> no info.range support" ); -+ -+ if ( info.has_nwid ) -+ printf ( "%s nwid - disabled: %d value: %X\n", "SIOCGIWNWID", info.nwid.disabled, info.nwid.value ); -+ else -+ printf ( "%s %s\n", "SIOCGIWNWID", " ===> no info.nwid support" ); -+ -+ if ( info.has_freq ) { -+// printf ( "%s freq: %g\n", "SIOCGIWFREQ", info.freq / GIGA ); -+ printf ( "%s freq: %g\n", "SIOCGIWFREQ", info.freq ); -+ } -+ else -+ printf ( "%s %s\n", "SIOCGIWFREQ", " ===> no info.freq support" ); -+ -+ if ( info.has_sens ) -+ printf ( "%s sens: %d\n", "SIOCGIWSENS", info.sens ); -+ else -+ printf ( "%s %s\n", "SIOCGIWSENS", " ===> no info.sens support" ); -+ -+ if ( info.has_key ) { -+ printf ( "%s key_size: %d key_flags: %d wepCurrentKey: %d\n", -+ "SIOCGIWENCODE", info.key_size, info.key_flags, wepCurrentKey ); -+ printf ( "%s MODE: %d DISABLED: %d INDEX: %d OPEN: %d RESTRICTED: %d NOKEY: %d TEMP: %d\n", -+ "SIOCGIWENCODE", info.key_flags & IW_ENCODE_MODE, -+ info.key_flags & IW_ENCODE_DISABLED ? 1:0, info.key_flags & IW_ENCODE_INDEX, -+ info.key_flags & IW_ENCODE_OPEN ? 1:0, info.key_flags & IW_ENCODE_RESTRICTED ? 1:0, -+ info.key_flags & IW_ENCODE_NOKEY ? 1:0, info.key_flags & IW_ENCODE_TEMP ? 1:0 ); -+ } -+ else -+ printf ( "%s %s\n", "SIOCGIWENCODE", " ===> no info.key support" ); -+ -+ for ( i = 0; i < MAX_WEP_KEYS; i++ ) { -+ if ( wep[i].haveKey ) -+ printf ( "%s wep[%d].len: %d wep[%d].key: %s\n", -+ "SIOCGIWENCODE", i, wep[i].len, i, wep[i].key ); -+ } -+ -+ if ( info.has_ap_addr ) -+ printf ( "%s ap_addr.sa_data: %02X:%02X:%02X:%02X:%02X:%02X ap_addr.sa_family: %d\n", -+ "SIOCGIWAP", ( UCHAR ) info.ap_addr.sa_data[0], ( UCHAR ) info.ap_addr.sa_data[1], -+ ( UCHAR ) info.ap_addr.sa_data[2], ( UCHAR ) info.ap_addr.sa_data[3], -+ ( UCHAR ) info.ap_addr.sa_data[4], ( UCHAR ) info.ap_addr.sa_data[5], -+ info.ap_addr.sa_family ); -+ else -+ printf ( "%s %s\n", "SIOCGIWAP", " ===> no ap_addr information" ); -+ -+ if ( info.has_bitrate ) -+ printf ( "%s bitrate: %d value: %d fixed: %d disabled: %d flags: %d\n", -+ "SIOCGIWRATE", info.bitrate, info.bitrate.value, info.bitrate.fixed, -+ info.bitrate.disabled, info.bitrate.flags ); -+ else -+ printf ( "%s %s\n", "SIOCGIWRATE", " ===> no info.bitrate support" ); -+ -+ if ( info.has_rts ) -+ printf ( "%s rts: %d\n", "SIOCGIWRTS", info.rts ); -+ else -+ printf ( "%s %s\n", "SIOCGIWRTS", " ===> no info.rts support" ); -+ -+ if ( info.has_frag ) -+ printf ( "%s frag: %d\n", "SIOCGIWFRAG", info.frag ); -+ else -+ printf ( "%s %s\n", "SIOCGIWFRAG", " ===> no info.frag support" ); -+ -+ if ( info.has_mode ) -+ printf ( "%s mode: %d\n", "SIOCGIWMODE", info.mode ); -+ else -+ printf ( "%s %s\n", "SIOCGIWMODE", " ===> no info.mode support" ); -+ -+ if ( info.has_power ) { -+ printf ( "%s power: %d\n", "SIOCGIWPOWER", info.power ); -+ printf ( "%s disabled: %d MIN: %d MAX: %d TIMEOUT: %d RELATIVE: %d\n", -+ "SIOCGIWPOWER", -+ info.power.disabled ? 1:0, -+ info.power.flags & IW_POWER_MIN ? 1:0, -+ info.power.flags & IW_POWER_MAX ? 1:0, -+ info.power.flags & IW_POWER_TIMEOUT ? 1:0, -+ info.power.flags & IW_POWER_RELATIVE ? 1:0 ); -+ printf ( "%s UNICAST: %d MULTICAST: %d ALL: %d FORCE: %d REPEATER: %d\n", -+ "SIOCGIWPOWER", -+ info.power.flags & IW_POWER_UNICAST_R ? 1:0, -+ info.power.flags & IW_POWER_MULTICAST_R ? 1:0, -+ info.power.flags & IW_POWER_ALL_R ? 1:0, -+ info.power.flags & IW_POWER_FORCE_S ? 1:0, -+ info.power.flags & IW_POWER_REPEATER ? 1:0 ); -+ } -+ else -+ printf ( "%s %s\n", "SIOCGIWPOWER", " ===> no info.power support" ); -+ -+ if ( info.has_retry ) -+ printf ( "%s retry: %d\n", "SIOCGIWRETRY", info.retry ); -+ else -+ printf ( "%s %s\n", "SIOCGIWRETRY", " ===> no info.retry support" ); -+ -+ if ( info.has_stats ) { -+ printf ( "%s status: %d\n", "SIOCGIWSTATS", info.stats.status ); -+ printf ( "%s qual.level: %d\n", "SIOCGIWSTATS", info.stats.qual.level ); -+ printf ( "%s qual.noise: %d\n", "SIOCGIWSTATS", info.stats.qual.noise ); -+ printf ( "%s qual.qual: %d\n", "SIOCGIWSTATS", info.stats.qual.qual ); -+ printf ( "%s qual.updated: %d\n", "SIOCGIWSTATS", info.stats.qual.updated ); -+ printf ( "%s discard.code: %d\n", "SIOCGIWSTATS", info.stats.discard.code ); -+ printf ( "%s discard.fragment: %d\n", "SIOCGIWSTATS", info.stats.discard.fragment ); -+ printf ( "%s discard.misc: %d\n", "SIOCGIWSTATS", info.stats.discard.misc ); -+ printf ( "%s discard.nwid: %d\n", "SIOCGIWSTATS", info.stats.discard.nwid ); -+ printf ( "%s discard.retries: %d\n", "SIOCGIWSTATS", info.stats.discard.retries ); -+ printf ( "%s miss.beacon: %d\n", "SIOCGIWSTATS", info.stats.miss.beacon ); -+ } -+ else -+ printf ( "%s %s\n", "SIOCGIWSTATS", " ===> no info.stats support" ); -+ -+ if ( info.txpower.flags & IW_TXPOW_MWATT ) -+ printf ( "%s txpower1: %d dBm disabled: %d fixed: %d flags: %d\n", "SIOCGIWRANGE", -+ mWatt2dbm ( info.txpower.value ), info.txpower.disabled, info.txpower.fixed, info.txpower.flags); -+ else -+ printf ( "%s txpower2: %d dBm disabled: %d fixed: %d flags: %d\n", "SIOCGIWRANGE", info.txpower.value, info.txpower.disabled, info.txpower.fixed, info.txpower.flags ); -+ -+ if ( info.has_range ) -+ if ( info.sens.value < 0 ) -+ printf ( "%s sens: %d dBm\n", "SIOCGIWRANGE", info.sens.value ); -+ else -+ printf ( "%s sens: %d/%d\n", "SIOCGIWRANGE", info.sens.value, info.range.sensitivity ); -+ -+ if ( info.has_range && ( info.stats.qual.level != 0 )) -+ if ( info.stats.qual.level > info.range.max_qual.level ) -+ /* Statistics are in dBm (absolute power measurement) */ -+ printf ( "%s Quality: %d/%d Signal level: %d dBm Noise level: %d dBm\n", -+ "SIOCGIWRANGE", -+ info.stats.qual.qual, info.range.max_qual.qual, -+ info.stats.qual.level - 0x100, -+ info.stats.qual.noise - 0x100 ); -+ else -+ printf ( "%s Quality: %d/%d Signal level: %d/%d Noise level: %d/%d", -+ "SIOCGIWRANGE", -+ info.stats.qual.qual, info.range.max_qual.qual, -+ info.stats.qual.level, info.range.max_qual.level, -+ info.stats.qual.noise, info.range.max_qual.noise ); -+ -+#endif // #ifdef DISPLAYWIEXT -+} -+ -+/**************************************************************************** -+* * -+* Linked List Functions * -+* * -+****************************************************************************/ -+/**************************************************************************** -+* * -+* addList() - add an entry to a linked list * -+* * -+****************************************************************************/ -+static void -+addList ( char *l, char *data, int len ) -+{ -+ char uid[256]; -+ LIST_HEAD ( , avNode ) *list; -+ -+ // NOTE: this assumes the UID is at the beginning of the -+ // data structure and that UIDs are strings -+ -+ list = ( LIST_HEAD ( , avNode ) * ) l; // NOTE: don't know how to get -+ strcpy ( uid, data ); // rid of compiler warning on -+ // LISTHEAD typecast -+ // create a new node and the data that goes in it -+ newNode = malloc ( sizeof ( struct avNode )); -+ newNode->data = malloc ( len ); -+ memcpy ( newNode->data, data, len ); -+ -+ // this deals with an empty list -+ if ( LIST_EMPTY ( list )) { -+ LIST_INSERT_HEAD ( list, newNode, nodes ); -+ return; -+ } -+ -+ // this deals with UIDs that match -+ for ( np = LIST_FIRST ( list ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ if ( strncmp ( uid, np->data, strlen ( uid )) == 0 ) { // found matching UID -+ LIST_INSERT_AFTER ( np, newNode, nodes ); -+ if ( np->data ) -+ free ( np->data ); -+ LIST_REMOVE ( np, nodes ); -+ free ( np ); -+ return; -+ } -+ } -+ -+ // this deals with inserting a new UID in the list -+ for ( np = LIST_FIRST ( list ); np != NULL; np = LIST_NEXT ( np, nodes )) { -+ lastNode = np; -+ if ( strncmp ( np->data, uid, strlen ( uid )) > 0 ) { // old ID > new ID AND -+ LIST_INSERT_BEFORE ( np, newNode, nodes ); -+ return; -+ } -+ } -+ -+ // this deals with a UID that needs to go on the end of the list -+ LIST_INSERT_AFTER ( lastNode, newNode, nodes ); -+ -+ return; -+} -+ -+/**************************************************************************** -+* * -+* initLists() - initialize all the linked lists * -+* * -+****************************************************************************/ -+static void initLists() -+{ -+ LIST_INIT ( &scList ); LIST_INIT ( &aaList ); LIST_INIT ( &dfList ); -+ LIST_INIT ( &kmList ); LIST_INIT ( &prList ); -+ LIST_INIT ( &opList ); LIST_INIT ( &coList ); -+ LIST_INIT ( &gaList ); LIST_INIT ( &riList ); LIST_INIT ( &poList ); -+ LIST_INIT ( &paList ); LIST_INIT ( &ptList ); LIST_INIT ( &pfList ); -+ LIST_INIT ( &pdList ); LIST_INIT ( &piList ); LIST_INIT ( &rdList ); -+ LIST_INIT ( &alList ); LIST_INIT ( &rtList ); LIST_INIT ( &rrList ); -+} -+/**************************************************************************** -+* * -+* flushLists() - flush all linked lists * -+* * -+****************************************************************************/ -+static void flushLists() -+{ -+ flushList (( char * ) &scList ); flushList (( char * ) &aaList ); -+ flushList (( char * ) &dfList ); flushList (( char * ) &kmList ); -+ flushList (( char * ) &prList ); -+ flushList (( char * ) &opList ); flushList (( char * ) &coList ); -+ flushList (( char * ) &gaList ); flushList (( char * ) &riList ); -+ flushList (( char * ) &poList ); flushList (( char * ) &paList ); -+ flushList (( char * ) &ptList ); flushList (( char * ) &pfList ); -+ flushList (( char * ) &pdList ); flushList (( char * ) &piList ); -+ flushList (( char * ) &rdList ); flushList (( char * ) &alList ); -+ flushList (( char * ) &rtList ); flushList (( char * ) &rrList ); -+} -+ -+/**************************************************************************** -+* * -+* flushList() - flush a linked list * -+* * -+****************************************************************************/ -+static void flushList ( char *l ) -+{ -+ LIST_HEAD ( , avNode ) *list; -+ -+ list = ( LIST_HEAD ( , avNode ) * ) l; // NOTE: don't know how to get -+ while ( !LIST_EMPTY ( list )) { // rid of compiler warning on -+ np = LIST_FIRST ( list ); // LISTHEAD typecast -+ if ( np->data ) -+ free ( np->data ); -+ LIST_REMOVE ( np, nodes ); -+ free ( np ); -+ } -+} -+ -+/**************************************************************************** -+* * -+* Utility Functions * -+* * -+****************************************************************************/ -+/**************************************************************************** -+* * -+* The following two routines were taken directly from iwlib.c * -+* * -+****************************************************************************/ -+ /* -+ * Open a socket. -+ * Depending on the protocol present, open the right socket. The socket -+ * will allow us to talk to the driver. -+ */ -+static int openSocket ( void ) -+{ -+ static const int families[] = { -+ AF_INET, AF_IPX, AF_AX25, AF_APPLETALK -+ }; -+ unsigned int i; -+ int sock; -+ -+ /* -+ * Now pick any (exisiting) useful socket family for generic queries -+ * Note : don't open all the socket, only returns when one matches, -+ * all protocols might not be valid. -+ * Workaround by Jim Kaba -+ * Note : in 99% of the case, we will just open the inet_sock. -+ * The remaining 1% case are not fully correct... -+ */ -+ -+ /* Try all families we support */ -+ for(i = 0; i < sizeof(families)/sizeof(int); ++i) { -+ /* Try to open the socket, if success returns it */ -+ sock = socket(families[i], SOCK_DGRAM, 0); -+ if(sock >= 0) -+ return sock; -+ } -+ -+ return -1; -+} -+ -+/*------------------------------------------------------------------*/ -+/* -+ * Convert a value in milliWatt to a value in dBm. -+ */ -+static int mWatt2dbm ( int in ) -+{ -+#ifdef WE_NOLIBM -+ /* Version without libm : slower */ -+ double fin = (double) in; -+ int res = 0; -+ -+ /* Split integral and floating part to avoid accumulating rounding errors */ -+ while(fin > 10.0) -+ { -+ res += 10; -+ fin /= 10.0; -+ } -+ while(fin > 1.000001) /* Eliminate rounding errors, take ceil */ -+ { -+ res += 1; -+ fin /= LOG10_MAGIC; -+ } -+ return(res); -+#else /* WE_NOLIBM */ -+ /* Version with libm : faster */ -+ return((int) (ceil(10.0 * log10((double) in)))); -+#endif /* WE_NOLIBM */ -+} -+ -+/**************************************************************************** -+* * -+* htob - converts hex string to binary * -+* * -+****************************************************************************/ -+static char *htob ( char *s ) -+{ -+ char nibl, *byt; -+ static char bin[20]; -+ -+ byt = bin; -+ -+ while ((nibl = *s++) && nibl != ' ') { /* While not end of string. */ -+ nibl -= ( nibl > '9') ? ('A' - 10): '0'; -+ *byt = nibl << 4; /* place high nibble */ -+ if((nibl = *s++) && nibl != ' ') { -+ nibl -= ( nibl > '9') ? ('A' - 10): '0'; -+ *byt |= nibl; /* place low nibble */ -+ } -+ else break; -+ ++byt; -+ } -+ *++byt = '\0'; -+ return ( bin ); -+} -+ -+/**************************************************************************** -+* * -+* hasChanged() - see if area has been changed from NULLs * -+* * -+****************************************************************************/ -+static int hasChanged ( char *loc, int len ) -+{ -+ char *wrk; -+ int changed = TRUE; -+ -+ wrk = malloc ( len ); -+ memset ( wrk, 0, len ); -+ if ( memcmp ( loc, wrk, len ) == 0 ) -+ changed = FALSE; -+ free ( wrk ); -+ -+ return ( changed ); -+} -+ ---- /dev/null -+++ b/agent/mibgroup/ieee802dot11.h -@@ -0,0 +1,730 @@ -+/**************************************************************************** -+* * -+* File Name: ieee802dot11.h * -+* Used By: * -+* * -+* Operating System: * -+* Purpose: * -+* * -+* Comments: * -+* * -+* Author: Larry Simmons * -+* lsimmons@avantcom.com * -+* www.avantcom.com * -+* * -+* Creation Date: 09/02/03 * -+* * -+* Ver Date Inits Modification * -+* ----- -------- ----- ------------ * -+* 0.0.1 09/02/03 LRS created * -+* 0.0.2 09/24/03 LRS wouldn't build after fresh ./configure * -+****************************************************************************/ -+/* This file was generated by mib2c and is intended for use as a mib module -+ for the ucd-snmp snmpd agent. */ -+#ifndef _MIBGROUP_IEEE802DOT11_H -+#define _MIBGROUP_IEEE802DOT11_H -+/* we may use header_generic and header_simple_table from the util_funcs module */ -+ -+/**************************************************************************** -+* Includes * -+****************************************************************************/ -+#include -+ -+/**************************************************************************** -+* Linked List Defines * -+****************************************************************************/ -+// here are some Linked List MACROS I wanted to use, -+// but curiously were not in /usr/includes/sys/queue.h -+ -+#ifndef LIST_EMPTY -+ #define LIST_EMPTY(head) ((head)->lh_first == NULL) -+#endif -+ -+#ifndef LIST_NEXT -+ #define LIST_NEXT(elm, field) ((elm)->field.le_next) -+#endif -+ -+#ifndef LIST_INSERT_BEFORE -+ #define LIST_INSERT_BEFORE(listelm, elm, field) do { \ -+ (elm)->field.le_prev = (listelm)->field.le_prev; \ -+ LIST_NEXT((elm), field) = (listelm); \ -+ *(listelm)->field.le_prev = (elm); \ -+ (listelm)->field.le_prev = &LIST_NEXT((elm), field); \ -+ } while (0) -+#endif -+ -+#ifndef LIST_FIRST -+ #define LIST_FIRST(head) ((head)->lh_first) -+#endif -+ -+/**************************************************************************** -+* 802.11 MIB Defines * -+****************************************************************************/ -+#define SYS_STRING_LEN 256 -+#define MACADDR_LEN ( 6 * 2 ) + 5 -+#define OPER_RATE_SET_LEN 126 -+#define MAN_OUI_LEN ( 3 * 2 ) + 2 -+#define WEP_STR_LEN 64 -+#define SNMP_STR_LEN 128 -+#define TEXT_LEN 80 -+#define IFINDEX_LEN 4 -+#define IFNAME_LEN 16 -+#define MAX_WEP_KEYS 4 -+ -+#define AUTHENICATION_ALGORITHMS_INDEX_LEN 4 -+#define WEP_DEFAULT_KEY_INDEX_LEN 4 -+#define WEP_KEY_MAPPING_INDEX_LEN 4 -+#define GROUP_ADDRESS_INDEX_LEN 4 -+#define REG_DOMAIN_SUPPORT_INDEX_LEN 4 -+#define ANTENNA_LIST_INDEX_LEN 4 -+#define SUPPORTED_DATA_RATES_TX_INDEX_LEN 4 -+#define SUPPORTED_DATA_RATES_RX_INDEX_LEN 4 -+ -+#define SC_UID_LEN IFINDEX_LEN -+#define AA_UID_LEN IFINDEX_LEN + AUTHENICATION_ALGORITHMS_INDEX_LEN -+#define DF_UID_LEN IFINDEX_LEN + WEP_DEFAULT_KEY_INDEX_LEN -+#define KM_UID_LEN IFINDEX_LEN + WEP_KEY_MAPPING_INDEX_LEN -+#define PR_UID_LEN IFINDEX_LEN -+#define OP_UID_LEN IFINDEX_LEN -+#define CO_UID_LEN IFINDEX_LEN -+#define GA_UID_LEN IFINDEX_LEN + GROUP_ADDRESS_INDEX_LEN -+#define RI_UID_LEN IFINDEX_LEN -+#define PO_UID_LEN IFINDEX_LEN -+#define PA_UID_LEN IFINDEX_LEN -+#define PT_UID_LEN IFINDEX_LEN -+#define PF_UID_LEN IFINDEX_LEN -+#define PD_UID_LEN IFINDEX_LEN -+#define PI_UID_LEN IFINDEX_LEN -+#define RD_UID_LEN IFINDEX_LEN + REG_DOMAIN_SUPPORT_INDEX_LEN -+#define AL_UID_LEN IFINDEX_LEN + ANTENNA_LIST_INDEX_LEN -+#define RT_UID_LEN IFINDEX_LEN + SUPPORTED_DATA_RATES_TX_INDEX_LEN -+#define RR_UID_LEN IFINDEX_LEN + SUPPORTED_DATA_RATES_RX_INDEX_LEN -+ -+/**************************************************************************** -+* Linked List Structure * -+****************************************************************************/ -+static struct avNode { -+ LIST_ENTRY ( avNode ) nodes; -+ char *data; // pointer to data -+}; -+ -+typedef LIST_HEAD ( , avNode ) avList_t; -+ -+/**************************************************************************** -+* 802.11 MIB structures * -+****************************************************************************/ -+/**************************************************************************** -+* dot11Smt Group * -+****************************************************************************/ -+/**************************************************************************** -+* dot11StationConfigTable * -+****************************************************************************/ -+static struct scTbl_data { -+ -+ char UID [ SC_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ char stationID [ MACADDR_LEN + 1 ]; // Default actual MacAddr -+ long mediumOccupancyLimit; -+ long CFPPollable; -+ long CFPPeriod; -+ long maxDuration; -+ long authenticationResponseTimeOut; -+ long privacyOptionImplemented; -+ long powerManagementMode; -+ char desiredSSID [ SNMP_STR_LEN + 1 ]; -+ long desiredBSSType; -+ char operationalRateSet [ OPER_RATE_SET_LEN + 1]; -+ long beaconPeriod; -+ long DTIMPeriod; -+ long associationResponseTimeOut; -+ long disAssociationReason; -+ char disAssociationStation [ MACADDR_LEN + 1 ]; -+ long deAuthenticationReason; -+ char deAuthenticationStation [ MACADDR_LEN + 1 ]; -+ long authenticateFailStatus; -+ char authenticateFailStation [ MACADDR_LEN + 1 ]; -+ -+ long haveStationID; -+ long haveMediumOccupancyLimit; -+ long haveCFPPollable; -+ long haveCFPPeriod; -+ long haveMaxDuration; -+ long haveAuthenticationResponseTimeOut; -+ long havePrivacyOptionImplemented; -+ long havePowerManagementMode; -+ long haveDesiredSSID; -+ long haveDesiredBSSType; -+ long haveOperationalRateSet; -+ long haveBeaconPeriod; -+ long haveDTIMPeriod; -+ long haveAssociationResponseTimeOut; -+ long haveDisAssociationReason; -+ long haveDisAssociationStation; -+ long haveDeAuthenticationReason; -+ long haveDeAuthenticationStation; -+ long haveAuthenticateFailStatus; -+ long haveAuthenticateFailStation; -+ -+} nSc, *sc = &nSc; -+ -+static avList_t scList; -+ -+/**************************************************************************** -+* dot11AuthenticationAlgorithmsTable * -+****************************************************************************/ -+static struct aaTbl_data { -+ -+ char UID [ AA_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ long authenticationAlgorithmsIndex; -+ -+ long authenticationAlgorithm; -+ long authenticationAlgorithmsEnable; -+ -+ long haveAuthenticationAlgorithm; -+ long haveAuthenticationAlgorithmsEnable; -+ -+} nAa, *aa = &nAa; -+ -+static avList_t aaList; -+ -+/**************************************************************************** -+* dot11WEPDefaultKeysTable * -+****************************************************************************/ -+static struct dfTbl_data { -+ -+ char UID [ DF_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long WEPDefaultKeyIndex; -+ -+ char WEPDefaultKeyValue [ WEP_STR_LEN + 1 ]; -+ long haveWEPDefaultKeyValue; -+ -+} nDf, *df = &nDf; -+ -+static avList_t dfList; -+ -+/**************************************************************************** -+* dot11WEPKeyMappingsTable * -+****************************************************************************/ -+static struct kmTbl_data { -+ -+ char UID [ KM_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; -+ long WEPKeyMappingIndex; -+ -+ char WEPKeyMappingAddress [ MACADDR_LEN + 1 ]; -+ long WEPKeyMappingWEPOn; -+ char WEPKeyMappingValue [ WEP_STR_LEN + 1 ]; -+ long WEPKeyMappingStatus; -+ -+ long haveWEPKeyMappingIndex; -+ long haveWEPKeyMappingAddress; -+ long haveWEPKeyMappingWEPOn; -+ long haveWEPKeyMappingValue; -+ long haveWEPKeyMappingStatus; -+ -+} nKm, *km = &nKm; -+ -+static avList_t kmList; -+ -+/**************************************************************************** -+* dot11PrivacyTable * -+****************************************************************************/ -+static struct prTbl_data { -+ -+ char UID [ PR_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; -+ -+ long privacyInvoked; -+ long WEPDefaultKeyID; -+ long WEPKeyMappingLength; -+ long excludeUnencrypted; -+ unsigned long WEPICVErrorCount; -+ unsigned long WEPExcludedCount; -+ -+ long havePrivacyInvoked; -+ long haveWEPDefaultKeyID; -+ long haveWEPKeyMappingLength; -+ long haveExcludeUnencrypted; -+ long haveWEPICVErrorCount; -+ long haveWEPExcludedCount; -+ -+} nPr, *pr = &nPr; -+ -+static avList_t prList; -+ -+/**************************************************************************** -+* dot11Mac Group * -+****************************************************************************/ -+/**************************************************************************** -+* dot11OperationTable * -+****************************************************************************/ -+static struct opTbl_data { -+ -+ char UID [ OP_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ char MACAddress [ MACADDR_LEN + 1 ]; -+ long RTSThreshold; -+ long shortRetryLimit; -+ long longRetryLimit; -+ long fragmentationThreshold; -+ long maxTransmitMSDULifetime; -+ long maxReceiveLifetime; -+ char manufacturerID [ SNMP_STR_LEN + 1 ]; -+ char productID [ SNMP_STR_LEN + 1 ]; -+ -+ long haveMACAddress; -+ long haveRTSThreshold; -+ long haveShortRetryLimit; -+ long haveLongRetryLimit; -+ long haveFragmentationThreshold; -+ long haveMaxTransmitMSDULifetime; -+ long haveMaxReceiveLifetime; -+ long haveManufacturerID; -+ long haveProductID; -+ -+} nOp, *op = &nOp; -+ -+static avList_t opList; -+ -+/**************************************************************************** -+* dot11CountersTable * -+****************************************************************************/ -+static struct coTbl_data { -+ -+ char UID [ CO_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ unsigned long transmittedFragmentCount; -+ unsigned long multicastTransmittedFrameCount; -+ unsigned long failedCount; -+ unsigned long retryCount; -+ unsigned long multipleRetryCount; -+ unsigned long frameDuplicateCount; -+ unsigned long RTSSuccessCount; -+ unsigned long RTSFailureCount; -+ unsigned long ACKFailureCount; -+ unsigned long receivedFragmentCount; -+ unsigned long multicastReceivedFrameCount; -+ unsigned long FCSErrorCount; -+ unsigned long transmittedFrameCount; -+ unsigned long WEPUndecryptableCount; -+ -+ long haveTransmittedFragmentCount; -+ long haveMulticastTransmittedFrameCount; -+ long haveFailedCount; -+ long haveRetryCount; -+ long haveMultipleRetryCount; -+ long haveFrameDuplicateCount; -+ long haveRTSSuccessCount; -+ long haveRTSFailureCount; -+ long haveACKFailureCount; -+ long haveReceivedFragmentCount; -+ long haveMulticastReceivedFrameCount; -+ long haveFCSErrorCount; -+ long haveTransmittedFrameCount; -+ long haveWEPUndecryptableCount; -+ -+} nCo, *co = &nCo; -+ -+static avList_t coList; -+ -+/**************************************************************************** -+* dot11GroupAddressesTable * -+****************************************************************************/ -+static struct gaTbl_data { -+ -+ char UID [ GA_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long groupAddressesIndex; -+ -+ char address [ MACADDR_LEN + 1 ]; -+ long groupAddressesStatus; -+ -+ long haveAddress; -+ long haveGroupAddressesStatus; -+ -+} nGa, *ga = &nGa; -+ -+static avList_t gaList; -+ -+/**************************************************************************** -+* dot11Res Group * -+****************************************************************************/ -+static char resourceTypeIDName[] = "RTID"; -+static long haveResourceTypeIDName = 1; -+ -+/**************************************************************************** -+* dot11ResourceInfoTable * -+****************************************************************************/ -+static struct riTbl_data { -+ -+ char UID [ RI_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ char manufacturerOUI [ MAN_OUI_LEN + 1 ]; -+ char manufacturerName [ SYS_STRING_LEN + 1 ]; -+ char manufacturerProductName [ SYS_STRING_LEN + 1 ]; -+ char manufacturerProductVersion [ SYS_STRING_LEN + 1 ]; -+ -+ char haveManufacturerOUI; -+ char haveManufacturerName; -+ char haveManufacturerProductName; -+ char haveManufacturerProductVersion; -+ -+} nRi, *ri = &nRi; -+ -+static avList_t riList; -+ -+/**************************************************************************** -+* dot11Phy Group * -+****************************************************************************/ -+/**************************************************************************** -+* dot11PhyOperationTable * -+****************************************************************************/ -+static struct poTbl_data { -+ -+ char UID [ PO_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long PHYType; -+ long currentRegDomain; -+ long tempType; -+ -+ long havePHYType; -+ long haveCurrentRegDomain; -+ long haveTempType; -+ -+} nPo, *po = &nPo; -+ -+static avList_t poList; -+ -+/**************************************************************************** -+* dot11PhyAntennaEntry * -+****************************************************************************/ -+static struct paTbl_data { -+ -+ char UID [ PA_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long currentTxAntenna; -+ long diversitySupport; -+ long currentRxAntenna; -+ -+ long haveCurrentTxAntenna; -+ long haveDiversitySupport; -+ long haveCurrentRxAntenna; -+ -+} nPa, *pa = &nPa; -+ -+static avList_t paList; -+ -+/**************************************************************************** -+* dot11PhyTxPowerTable * -+****************************************************************************/ -+static struct ptTbl_data { -+ -+ char UID [ PT_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long numberSupportedPowerLevels; -+ long TxPowerLevel1; -+ long TxPowerLevel2; -+ long TxPowerLevel3; -+ long TxPowerLevel4; -+ long TxPowerLevel5; -+ long TxPowerLevel6; -+ long TxPowerLevel7; -+ long TxPowerLevel8; -+ long currentTxPowerLevel; -+ -+ long haveNumberSupportedPowerLevels; -+ long haveTxPowerLevel1; -+ long haveTxPowerLevel2; -+ long haveTxPowerLevel3; -+ long haveTxPowerLevel4; -+ long haveTxPowerLevel5; -+ long haveTxPowerLevel6; -+ long haveTxPowerLevel7; -+ long haveTxPowerLevel8; -+ long haveCurrentTxPowerLevel ; -+ -+} nPt, *pt = &nPt; -+ -+static avList_t ptList; -+ -+/**************************************************************************** -+* dot11PhyFHSSTable * -+****************************************************************************/ -+static struct pfTbl_data { -+ -+ char UID [ PF_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long hopTime; -+ long currentChannelNumber; -+ long maxDwellTime; -+ long currentDwellTime; -+ long currentSet; -+ long currentPattern; -+ long currentIndex; -+ -+ long haveHopTime; -+ long haveCurrentChannelNumber; -+ long haveMaxDwellTime; -+ long haveCurrentDwellTime; -+ long haveCurrentSet; -+ long haveCurrentPattern; -+ long haveCurrentIndex; -+ -+} nPf, *pf = &nPf; -+ -+static avList_t pfList; -+ -+/**************************************************************************** -+* dot11PhyDSSSTable * -+****************************************************************************/ -+static struct pdTbl_data { -+ -+ char UID [ PD_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long currentChannel; -+ long CCAModeSupported; -+ long currentCCAMode; -+ long EDThreshold; -+ -+ long haveCurrentChannel; -+ long haveCCAModeSupported ; -+ long haveCurrentCCAMode; -+ long haveEDThreshold; -+ -+} nPd, *pd = &nPd; -+ -+static avList_t pdList; -+ -+/**************************************************************************** -+* dot11PhyIRTable * -+****************************************************************************/ -+static struct piTbl_data { -+ -+ char UID [ PI_UID_LEN + 1 ]; // unique ID -+ char ifName [ IFNAME_LEN + 1 ]; // ifName of card -+ -+ long ifIndex; // ifindex of card -+ -+ long CCAWatchdogTimerMax; -+ long CCAWatchdogCountMax; -+ long CCAWatchdogTimerMin; -+ long CCAWatchdogCountMin; -+ -+ long haveCCAWatchdogTimerMax; -+ long haveCCAWatchdogCountMax; -+ long haveCCAWatchdogTimerMin; -+ long haveCCAWatchdogCountMin; -+ -+} nPi, *pi = &nPi; -+ -+static avList_t piList; -+ -+/**************************************************************************** -+* dot11RegDomainsSupportedTable * -+****************************************************************************/ -+static struct rdTbl_data { -+ -+ char UID [ RD_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long regDomainsSupportIndex; -+ -+ long regDomainsSupportValue; -+ long haveRegDomainsSupportValue; -+ -+} nRd, *rd = &nRd; -+ -+static avList_t rdList; -+ -+/**************************************************************************** -+* dot11AntennasListTable * -+****************************************************************************/ -+static struct alTbl_data { -+ -+ char UID [ AL_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long antennaListIndex; -+ -+ long supportedTxAntenna; -+ long supportedRxAntenna; -+ long diversitySelectionRx ; -+ -+ long haveSupportedTxAntenna; -+ long haveSupportedRxAntenna; -+ long haveDiversitySelectionRx ; -+ -+} nAl, *al = &nAl; -+ -+static avList_t alList; -+ -+/**************************************************************************** -+* dot11SupportedDataRatesTxTable * -+****************************************************************************/ -+static struct rtTbl_data { -+ -+ char UID [ RT_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long supportedDataRatesTxIndex; -+ -+ long supportedDataRatesTxValue; -+ long haveSupportedDataRatesTxValue; -+ -+} nRt, *rt = &nRt; -+ -+static avList_t rtList; -+ -+/**************************************************************************** -+* dot11SupportedDataRatesRxTable * -+****************************************************************************/ -+static struct rrTbl_data { -+ -+ char UID [ RR_UID_LEN + 1 ]; -+ char ifName [ IFNAME_LEN + 1 ]; -+ -+ long ifIndex; // ifindex of card -+ long supportedDataRatesRxIndex; -+ -+ long supportedDataRatesRxValue; -+ long haveSupportedDataRatesRxValue; -+ -+} nRr, *rr = &nRr; -+ -+static avList_t rrList; -+ -+/**************************************************************************** -+* Wireless Extensions Structures * -+****************************************************************************/ -+static long wepCurrentKey; -+static long haveWepCurrentKey; -+static struct wepTbl_data { -+ -+ long len; -+ char key [ WEP_STR_LEN + 1 ]; -+ long haveKey; -+ -+} wep[4]; -+ -+/**************************************************************************** -+* * -+****************************************************************************/ -+config_require(util_funcs) -+ -+/* function prototypes */ -+ -+void init_ieee802dot11 ( void ); -+FindVarMethod var_ieee802dot11; -+FindVarMethod var_dot11StationConfigTable; -+FindVarMethod var_dot11AuthenticationAlgorithmsTable; -+FindVarMethod var_dot11WEPDefaultKeysTable; -+FindVarMethod var_dot11WEPKeyMappingsTable; -+FindVarMethod var_dot11PrivacyTable; -+FindVarMethod var_dot11OperationTable; -+FindVarMethod var_dot11CountersTable; -+FindVarMethod var_dot11GroupAddressesTable; -+FindVarMethod var_dot11ResourceInfoTable; -+FindVarMethod var_dot11PhyOperationTable; -+FindVarMethod var_dot11PhyAntennaTable; -+FindVarMethod var_dot11PhyTxPowerTable; -+FindVarMethod var_dot11PhyFHSSTable; -+FindVarMethod var_dot11PhyDSSSTable; -+FindVarMethod var_dot11PhyIRTable; -+FindVarMethod var_dot11RegDomainsSupportedTable; -+FindVarMethod var_dot11AntennasListTable; -+FindVarMethod var_dot11SupportedDataRatesTxTable; -+FindVarMethod var_dot11SupportedDataRatesRxTable; -+ -+WriteMethod write_dot11StationID; -+WriteMethod write_dot11MediumOccupancyLimit; -+WriteMethod write_dot11CFPPeriod; -+WriteMethod write_dot11CFPMaxDuration; -+WriteMethod write_dot11AuthenticationResponseTimeOut; -+WriteMethod write_dot11PowerManagementMode; -+WriteMethod write_dot11DesiredSSID; -+WriteMethod write_dot11DesiredBSSType; -+WriteMethod write_dot11OperationalRateSet; -+WriteMethod write_dot11BeaconPeriod; -+WriteMethod write_dot11DTIMPeriod; -+WriteMethod write_dot11AssociationResponseTimeOut; -+WriteMethod write_dot11AuthenticationAlgorithmsEnable; -+WriteMethod write_dot11WEPDefaultKeyValue; -+WriteMethod write_dot11WEPKeyMappingAddress; -+WriteMethod write_dot11WEPKeyMappingWEPOn; -+WriteMethod write_dot11WEPKeyMappingValue; -+WriteMethod write_dot11WEPKeyMappingStatus; -+WriteMethod write_dot11PrivacyInvoked; -+WriteMethod write_dot11WEPDefaultKeyID; -+WriteMethod write_dot11WEPKeyMappingLength; -+WriteMethod write_dot11ExcludeUnencrypted; -+WriteMethod write_dot11RTSThreshold; -+WriteMethod write_dot11ShortRetryLimit; -+WriteMethod write_dot11LongRetryLimit; -+WriteMethod write_dot11FragmentationThreshold; -+WriteMethod write_dot11MaxTransmitMSDULifetime; -+WriteMethod write_dot11MaxReceiveLifetime; -+WriteMethod write_dot11Address; -+WriteMethod write_dot11GroupAddressesStatus; -+WriteMethod write_dot11CurrentRegDomain; -+WriteMethod write_dot11CurrentTxAntenna; -+WriteMethod write_dot11CurrentRxAntenna; -+WriteMethod write_dot11CurrentTxPowerLevel; -+WriteMethod write_dot11CurrentChannelNumber; -+WriteMethod write_dot11CurrentDwellTime; -+WriteMethod write_dot11CurrentSet; -+WriteMethod write_dot11CurrentPattern; -+WriteMethod write_dot11CurrentIndex; -+WriteMethod write_dot11CurrentChannel; -+WriteMethod write_dot11CurrentCCAMode; -+WriteMethod write_dot11EDThreshold; -+WriteMethod write_dot11CCAWatchdogTimerMax; -+WriteMethod write_dot11CCAWatchdogCountMax; -+WriteMethod write_dot11CCAWatchdogTimerMin; -+WriteMethod write_dot11CCAWatchdogCountMin; -+WriteMethod write_dot11SupportedTxAntenna; -+WriteMethod write_dot11SupportedRxAntenna; -+WriteMethod write_dot11DiversitySelectionRx; -+ -+#endif /* _MIBGROUP_IEEE802DOT11_H */ ---- /dev/null -+++ b/agent/mibgroup/iwlib.h -@@ -0,0 +1,502 @@ -+/* -+ * Wireless Tools -+ * -+ * Jean II - HPLB 97->99 - HPL 99->02 -+ * -+ * Common header for the Wireless Extension library... -+ * -+ * This file is released under the GPL license. -+ * Copyright (c) 1997-2002 Jean Tourrilhes -+ */ -+ -+#ifndef IWLIB_H -+#define IWLIB_H -+ -+/*#include "CHANGELOG.h"*/ -+ -+/***************************** INCLUDES *****************************/ -+ -+/* Standard headers */ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include /* gethostbyname, getnetbyname */ -+#include /* struct ether_addr */ -+#include /* struct timeval */ -+#include -+ -+/* This is our header selection. Try to hide the mess and the misery :-( -+ * Don't look, you would go blind ;-) */ -+ -+#ifndef LINUX_VERSION_CODE -+#include -+#endif -+ -+/* Kernel headers 2.4.X + Glibc 2.2 - Mandrake 8.0, Debian 2.3, RH 7.1 -+ * Kernel headers 2.2.X + Glibc 2.2 - Slackware 8.0 */ -+#if defined(__GLIBC__) \ -+ && __GLIBC__ == 2 \ -+ && __GLIBC_MINOR__ >= 2 \ -+ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) -+//#define GLIBC22_HEADERS -+#define GENERIC_HEADERS -+ -+/* Kernel headers 2.4.X + Glibc 2.1 - Debian 2.2 upgraded, RH 7.0 -+ * Kernel headers 2.2.X + Glibc 2.1 - Debian 2.2, RH 6.1 */ -+#elif defined(__GLIBC__) \ -+ && __GLIBC__ == 2 \ -+ && __GLIBC_MINOR__ == 1 \ -+ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0) -+//#define GLIBC_HEADERS -+#define GENERIC_HEADERS -+ -+/* Kernel headers 2.2.X + Glibc 2.0 - Debian 2.1 */ -+#elif defined(__GLIBC__) \ -+ && __GLIBC__ == 2 \ -+ && __GLIBC_MINOR__ == 0 \ -+ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0) \ -+ && LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) -+#define GLIBC_HEADERS -+#define KLUDGE_HEADERS -+ -+/* Note : is it really worth supporting kernel 2.0.X, knowing that -+ * we require WE v9, which is only available in 2.2.X and higher ? -+ * I guess one could use 2.0.x with an upgraded wireless.h... */ -+ -+/* Kernel headers 2.0.X + Glibc 2.0 - Debian 2.0, RH 5 */ -+#elif defined(__GLIBC__) \ -+ && __GLIBC__ == 2 \ -+ && __GLIBC_MINOR__ == 0 \ -+ && LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) \ -+ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0) -+#define GLIBC_HEADERS -+ -+/* Kernel headers 2.0.X + libc5 - old systems */ -+#elif defined(_LINUX_C_LIB_VERSION_MAJOR) \ -+ && _LINUX_C_LIB_VERSION_MAJOR == 5 \ -+ && LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,0) \ -+ && LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) -+#define LIBC5_HEADERS -+ -+/* Unsupported combination */ -+#else -+#error "Your kernel/libc combination is not supported" -+#endif -+ -+#ifdef GENERIC_HEADERS -+/* Proposed by Dr. Michael Rietz , 27.3.2 */ -+/* If this works for all, it might be more stable on the long term - Jean II */ -+#include /* For ARPHRD_ETHER */ -+#include /* For AF_INET & struct sockaddr */ -+#include /* For struct sockaddr_in */ -+#include -+#endif /* GENERIC_HEADERS */ -+ -+#ifdef GLIBC22_HEADERS -+/* Added by Ross G. Miller , 3/28/01 */ -+#include /* For ARPHRD_ETHER */ -+#include /* For AF_INET & struct sockaddr */ -+#include -+#endif /* GLIBC22_HEADERS */ -+ -+#ifdef KLUDGE_HEADERS -+#include -+#endif /* KLUDGE_HEADERS */ -+ -+#ifdef GLIBC_HEADERS -+#include /* For ARPHRD_ETHER */ -+#include /* For AF_INET & struct sockaddr */ -+#include /* For struct sockaddr_in */ -+#endif /* KLUDGE_HEADERS || GLIBC_HEADERS */ -+ -+#ifdef LIBC5_HEADERS -+#include /* For AF_INET & struct sockaddr & socket() */ -+#include /* For ARPHRD_ETHER */ -+#include /* For struct sockaddr_in */ -+#endif /* LIBC5_HEADERS */ -+ -+/* Those 3 headers were previously included in wireless.h */ -+#include /* for "caddr_t" et al */ -+#include /* for "struct sockaddr" et al */ -+#include /* for IFNAMSIZ and co... */ -+ -+#ifdef WEXT_HEADER -+/* Private copy of Wireless extensions */ -+#include WEXT_HEADER -+#else /* !WEXT_HEADER */ -+/* System wide Wireless extensions */ -+#include -+#endif /* !WEXT_HEADER */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/****************************** DEBUG ******************************/ -+ -+ -+/************************ CONSTANTS & MACROS ************************/ -+ -+/* Paths */ -+#define PROC_NET_WIRELESS "/proc/net/wireless" -+#define PROC_NET_DEV "/proc/net/dev" -+ -+/* Some useful constants */ -+#define KILO 1e3 -+#define MEGA 1e6 -+#define GIGA 1e9 -+/* For doing log10/exp10 without libm */ -+#define LOG10_MAGIC 1.25892541179 -+ -+/* Backward compatibility for Wireless Extension 9 */ -+#ifndef IW_POWER_MODIFIER -+#define IW_POWER_MODIFIER 0x000F /* Modify a parameter */ -+#define IW_POWER_MIN 0x0001 /* Value is a minimum */ -+#define IW_POWER_MAX 0x0002 /* Value is a maximum */ -+#define IW_POWER_RELATIVE 0x0004 /* Value is not in seconds/ms/us */ -+#endif /* IW_POWER_MODIFIER */ -+ -+#ifndef IW_ENCODE_NOKEY -+#define IW_ENCODE_NOKEY 0x0800 /* Key is write only, so not here */ -+#define IW_ENCODE_MODE 0xF000 /* Modes defined below */ -+#endif /* IW_ENCODE_NOKEY */ -+#ifndef IW_ENCODE_TEMP -+#define IW_ENCODE_TEMP 0x0400 /* Temporary key */ -+#endif /* IW_ENCODE_TEMP */ -+ -+/* More backward compatibility */ -+#ifndef SIOCSIWCOMMIT -+#define SIOCSIWCOMMIT SIOCSIWNAME -+#endif /* SIOCSIWCOMMIT */ -+ -+/****************************** TYPES ******************************/ -+ -+/* Shortcuts */ -+typedef struct iw_statistics iwstats; -+typedef struct iw_range iwrange; -+typedef struct iw_param iwparam; -+typedef struct iw_freq iwfreq; -+typedef struct iw_quality iwqual; -+typedef struct iw_priv_args iwprivargs; -+typedef struct sockaddr sockaddr; -+ -+/* Structure for storing all wireless information for each device -+ * This is pretty exhaustive... */ -+typedef struct wireless_info -+{ -+ char name[IFNAMSIZ + 1]; /* Wireless/protocol name */ -+ int has_nwid; -+ iwparam nwid; /* Network ID */ -+ int has_freq; -+ double freq; /* Frequency/channel */ -+ int has_sens; -+ iwparam sens; /* sensitivity */ -+ int has_key; -+ unsigned char key[IW_ENCODING_TOKEN_MAX]; /* Encoding key used */ -+ int key_size; /* Number of bytes */ -+ int key_flags; /* Various flags */ -+ int has_essid; -+ int essid_on; -+ char essid[IW_ESSID_MAX_SIZE + 1]; /* ESSID (extended network) */ -+ int has_nickname; -+ char nickname[IW_ESSID_MAX_SIZE + 1]; /* NickName */ -+ int has_ap_addr; -+ sockaddr ap_addr; /* Access point address */ -+ int has_bitrate; -+ iwparam bitrate; /* Bit rate in bps */ -+ int has_rts; -+ iwparam rts; /* RTS threshold in bytes */ -+ int has_frag; -+ iwparam frag; /* Fragmentation threshold in bytes */ -+ int has_mode; -+ int mode; /* Operation mode */ -+ int has_power; -+ iwparam power; /* Power management parameters */ -+ int has_txpower; -+ iwparam txpower; /* Transmit Power in dBm */ -+ int has_retry; -+ iwparam retry; /* Retry limit or lifetime */ -+ -+ /* Stats */ -+ iwstats stats; -+ int has_stats; -+ iwrange range; -+ int has_range; -+} wireless_info; -+ -+/* Structure for storing all wireless information for each device -+ * This is a cut down version of the one above, containing only -+ * the things *truly* needed to configure a card. -+ * Don't add other junk, I'll remove it... */ -+typedef struct wireless_config -+{ -+ char name[IFNAMSIZ + 1]; /* Wireless/protocol name */ -+ int has_nwid; -+ iwparam nwid; /* Network ID */ -+ int has_freq; -+ double freq; /* Frequency/channel */ -+ int has_key; -+ unsigned char key[IW_ENCODING_TOKEN_MAX]; /* Encoding key used */ -+ int key_size; /* Number of bytes */ -+ int key_flags; /* Various flags */ -+ int has_essid; -+ int essid_on; -+ char essid[IW_ESSID_MAX_SIZE + 1]; /* ESSID (extended network) */ -+ int has_mode; -+ int mode; /* Operation mode */ -+} wireless_config; -+ -+typedef struct stream_descr -+{ -+ char * end; /* End of the stream */ -+ char * current; /* Current event in stream of events */ -+ char * value; /* Current value in event */ -+} stream_descr; -+ -+/* Prototype for handling display of each single interface on the -+ * system - see iw_enum_devices() */ -+typedef int (*iw_enum_handler)(int skfd, -+ char * ifname, -+ char * args[], -+ int count); -+ -+/**************************** PROTOTYPES ****************************/ -+/* -+ * All the functions in iwcommon.c -+ */ -+ -+/* ---------------------- SOCKET SUBROUTINES -----------------------*/ -+int -+ iw_sockets_open(void); -+void -+ iw_enum_devices(int skfd, -+ iw_enum_handler fn, -+ char * args[], -+ int count); -+/* --------------------- WIRELESS SUBROUTINES ----------------------*/ -+int -+ iw_get_range_info(int skfd, -+ char * ifname, -+ iwrange * range); -+int -+ iw_print_version_info(char * toolname); -+int -+ iw_get_priv_info(int skfd, -+ char * ifname, -+ iwprivargs * priv, -+ int maxpriv); -+int -+ iw_get_basic_config(int skfd, -+ char * ifname, -+ wireless_config * info); -+int -+ iw_set_basic_config(int skfd, -+ char * ifname, -+ wireless_config * info); -+/* --------------------- PROTOCOL SUBROUTINES --------------------- */ -+int -+ iw_protocol_compare(char * protocol1, -+ char * protocol2); -+/* -------------------- FREQUENCY SUBROUTINES --------------------- */ -+void -+ iw_float2freq(double in, -+ iwfreq * out); -+double -+ iw_freq2float(iwfreq * in); -+void -+ iw_print_freq(char * buffer, -+ double freq); -+int -+ iw_freq_to_channel(double freq, -+ struct iw_range * range); -+void -+ iw_print_bitrate(char * buffer, -+ int bitrate); -+/* ---------------------- POWER SUBROUTINES ----------------------- */ -+int -+ iw_dbm2mwatt(int in); -+int -+ iw_mwatt2dbm(int in); -+/* -------------------- STATISTICS SUBROUTINES -------------------- */ -+int -+ iw_get_stats(int skfd, -+ char * ifname, -+ iwstats * stats); -+void -+ iw_print_stats(char * buffer, -+ iwqual * qual, -+ iwrange * range, -+ int has_range); -+/* --------------------- ENCODING SUBROUTINES --------------------- */ -+void -+ iw_print_key(char * buffer, -+ unsigned char * key, -+ int key_size, -+ int key_flags); -+int -+ iw_in_key(char * input, -+ unsigned char * key); -+int -+ iw_in_key_full(int skfd, -+ char * ifname, -+ char * input, -+ unsigned char * key, -+ __u16 * flags); -+/* ----------------- POWER MANAGEMENT SUBROUTINES ----------------- */ -+void -+ iw_print_pm_value(char * buffer, -+ int value, -+ int flags); -+void -+ iw_print_pm_mode(char * buffer, -+ int flags); -+/* --------------- RETRY LIMIT/LIFETIME SUBROUTINES --------------- */ -+#if WIRELESS_EXT > 10 -+void -+ iw_print_retry_value(char * buffer, -+ int value, -+ int flags); -+#endif -+/* ----------------------- TIME SUBROUTINES ----------------------- */ -+void -+ iw_print_timeval(char * buffer, -+ const struct timeval * time); -+/* --------------------- ADDRESS SUBROUTINES ---------------------- */ -+int -+ iw_check_mac_addr_type(int skfd, -+ char * ifname); -+int -+ iw_check_if_addr_type(int skfd, -+ char * ifname); -+#if 0 -+int -+ iw_check_addr_type(int skfd, -+ char * ifname); -+#endif -+void -+ iw_ether_ntop(const struct ether_addr* eth, char* buf); -+char* -+ iw_ether_ntoa(const struct ether_addr* eth); -+int -+ iw_ether_aton(const char* bufp, struct ether_addr* eth); -+int -+ iw_in_inet(char *bufp, struct sockaddr *sap); -+int -+ iw_in_addr(int skfd, -+ char * ifname, -+ char * bufp, -+ struct sockaddr * sap); -+/* ----------------------- MISC SUBROUTINES ------------------------ */ -+int -+ iw_get_priv_size(int args); -+ -+#if WIRELESS_EXT > 13 -+/* ---------------------- EVENT SUBROUTINES ---------------------- */ -+void -+ iw_init_event_stream(struct stream_descr * stream, -+ char * data, -+ int len); -+int -+ iw_extract_event_stream(struct stream_descr * stream, -+ struct iw_event * iwe); -+#endif /* WIRELESS_EXT > 13 */ -+ -+/**************************** VARIABLES ****************************/ -+ -+extern const char * const iw_operation_mode[]; -+#define IW_NUM_OPER_MODE 7 -+ -+/************************* INLINE FUNTIONS *************************/ -+/* -+ * Functions that are so simple that it's more efficient inlining them -+ */ -+ -+/* -+ * Note : I've defined wrapper for the ioctl request so that -+ * it will be easier to migrate to other kernel API if needed -+ */ -+ -+/*------------------------------------------------------------------*/ -+/* -+ * Wrapper to push some Wireless Parameter in the driver -+ */ -+static inline int -+iw_set_ext(int skfd, /* Socket to the kernel */ -+ char * ifname, /* Device name */ -+ int request, /* WE ID */ -+ struct iwreq * pwrq) /* Fixed part of the request */ -+{ -+ /* Set device name */ -+ strncpy(pwrq->ifr_name, ifname, IFNAMSIZ); -+ /* Do the request */ -+ return(ioctl(skfd, request, pwrq)); -+} -+ -+/*------------------------------------------------------------------*/ -+/* -+ * Wrapper to extract some Wireless Parameter out of the driver -+ */ -+static inline int -+iw_get_ext(int skfd, /* Socket to the kernel */ -+ char * ifname, /* Device name */ -+ int request, /* WE ID */ -+ struct iwreq * pwrq) /* Fixed part of the request */ -+{ -+ /* Set device name */ -+ strncpy(pwrq->ifr_name, ifname, IFNAMSIZ); -+ /* Do the request */ -+ return(ioctl(skfd, request, pwrq)); -+} -+ -+/*------------------------------------------------------------------*/ -+/* Backwards compatibility -+ * Actually, those form are much easier to use when dealing with -+ * struct sockaddr... */ -+static inline char* -+iw_pr_ether(char* bufp, const unsigned char* addr) -+{ -+ iw_ether_ntop((const struct ether_addr *) addr, bufp); -+ return bufp; -+} -+/* Backwards compatibility */ -+static inline int -+iw_in_ether(const char *bufp, struct sockaddr *sap) -+{ -+ sap->sa_family = ARPHRD_ETHER; -+ return iw_ether_aton(bufp, (struct ether_addr *) sap->sa_data) ? 0 : -1; -+} -+ -+/*------------------------------------------------------------------*/ -+/* -+ * Create an Ethernet broadcast address -+ */ -+static inline void -+iw_broad_ether(struct sockaddr *sap) -+{ -+ sap->sa_family = ARPHRD_ETHER; -+ memset((char *) sap->sa_data, 0xFF, ETH_ALEN); -+} -+ -+/*------------------------------------------------------------------*/ -+/* -+ * Create an Ethernet NULL address -+ */ -+static inline void -+iw_null_ether(struct sockaddr *sap) -+{ -+ sap->sa_family = ARPHRD_ETHER; -+ memset((char *) sap->sa_data, 0x00, ETH_ALEN); -+} -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* IWLIB_H */ diff --git a/net/net-snmp/patches/900-musl-compat.patch b/net/net-snmp/patches/900-musl-compat.patch deleted file mode 100644 index fa9a01e..0000000 --- a/net/net-snmp/patches/900-musl-compat.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/agent/mibgroup/iwlib.h -+++ b/agent/mibgroup/iwlib.h -@@ -85,6 +85,11 @@ - && LINUX_VERSION_CODE < KERNEL_VERSION(2,1,0) - #define LIBC5_HEADERS - -+/* Musl */ -+#elif !defined(__GLIBC__) && !defined(__UCLIBC__) \ -+ && LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0) -+#define GENERIC_HEADERS -+ - /* Unsupported combination */ - #else - #error "Your kernel/libc combination is not supported" diff --git a/net/netatalk/Makefile b/net/netatalk/Makefile deleted file mode 100644 index ddfedbf..0000000 --- a/net/netatalk/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -# -# Copyright (C) 2009-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=netatalk -PKG_VERSION:=3.1.10 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/netatalk -PKG_MD5SUM:=2b40161985bb32cff5660bf689a4704f15c33bb87565efc7805dd5c75ad1fcc7 - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/netatalk - SECTION:=net - CATEGORY:=Network - SUBMENU:=Filesystem - DEPENDS:=+libattr +libdb47 +libgcrypt +libopenssl $(LIBRPC_DEPENDS) - TITLE:=netatalk - URL:=http://netatalk.sourceforge.net - MAINTAINER:=Daniel Golle -endef - -define Package/netatalk/decription - Netatalk is a freely-available Open Source AFP fileserver. - It also provides a kernel level implementation of the AppleTalk - Protocol Suite. -endef - -define Package/netatalk/conffiles -/etc/netatalk/afpd.conf -endef - -TARGET_CFLAGS += -std=gnu99 -TARGET_LDFLAGS += $(LIBRPC) - -CONFIGURE_ARGS += \ - --disable-afs \ - --enable-hfs \ - --disable-debugging \ - --disable-shell-check \ - --disable-timelord \ - --disable-a2boot \ - --disable-cups \ - --disable-tcp-wrappers \ - --with-cnid-default-backend=dbd \ - --with-bdb="$(STAGING_DIR)/usr/" \ - --with-libgcrypt-dir="$(STAGING_DIR)/usr" \ - --with-ssl-dir="$(STAGING_DIR)/usr" \ - --with-uams-path="/usr/lib/uams" \ - --without-acls \ - --without-kerberos \ - --without-mysql \ - --with-mysql-config=false \ - --without-pam \ - --disable-admin-group \ - --disable-srvloc \ - --disable-zeroconf \ - $(if $(CONFIG_SHADOW_PASSWORDS),--with-shadow,--without-shadow) \ - --without-ldap - -define Package/netatalk/conffiles -/etc/afp.conf -/etc/extmap.conf -/etc/netatalk/ -endef - -define Package/netatalk/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_DIR) $(1)/usr/lib/uams - $(INSTALL_DIR) $(1)/etc/init.d - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libatalk.so* $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/bin/dbd $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ad $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/afppasswd $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/afpd $(1)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/cnid_dbd $(1)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/cnid_metad $(1)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/uams/*.so $(1)/usr/lib/uams/ - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/afp.conf $(1)/etc/ - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/extmap.conf $(1)/etc/ - $(INSTALL_BIN) ./files/afpd.init $(1)/etc/init.d/afpd -endef - -$(eval $(call BuildPackage,netatalk)) diff --git a/net/netatalk/files/afpd.init b/net/netatalk/files/afpd.init deleted file mode 100644 index 8fab349..0000000 --- a/net/netatalk/files/afpd.init +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2010-2012 OpenWrt.org - -START=80 -STOP=10 - -USE_PROCD=1 - -start_service() { - mkdir -p /var/netatalk/CNID/ - - procd_open_instance - procd_set_param command /usr/sbin/afpd -d -F /etc/afp.conf - procd_set_param file /etc/afp.conf - procd_set_param respawn - procd_close_instance - - procd_open_instance - procd_set_param command /usr/sbin/cnid_metad -d - procd_set_param respawn - procd_close_instance -} - diff --git a/net/netatalk/patches/001-automake-compat.patch b/net/netatalk/patches/001-automake-compat.patch deleted file mode 100644 index 28c107a..0000000 --- a/net/netatalk/patches/001-automake-compat.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/macros/iconv.m4 -+++ b/macros/iconv.m4 -@@ -115,6 +115,5 @@ int main() { - - CFLAGS="$savedcflags" - LDFLAGS="$savedldflags" -- CPPFLAGS="$saved_CPPFLAGS" - - ]) diff --git a/net/netatalk/patches/002-ld_library_path.patch b/net/netatalk/patches/002-ld_library_path.patch deleted file mode 100644 index 73be55a..0000000 --- a/net/netatalk/patches/002-ld_library_path.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/macros/db3-check.m4 -+++ b/macros/db3-check.m4 -@@ -148,9 +148,9 @@ if test "x$bdb_required" = "xyes"; then - dnl -- LD_LIBRARY_PATH on many platforms. This will be fairly - dnl -- portable hopefully. Reference: - dnl -- http://lists.gnu.org/archive/html/autoconf/2009-03/msg00040.html -- eval export $shlibpath_var=$bdblibdir -+# eval export $shlibpath_var=$bdblibdir - NETATALK_BDB_TRY_LINK -- eval export $shlibpath_var=$saved_shlibpath_var -+# eval export $shlibpath_var=$saved_shlibpath_var - - if test x"${atalk_cv_bdb_version}" = x"yes"; then - BDB_CFLAGS="-I${bdbdir}/include${subdir}" -@@ -177,9 +177,9 @@ if test "x$bdb_required" = "xyes"; then - CPPFLAGS="-I${bdbdir}/include${subdir} $CPPFLAGS" - LDFLAGS="-L$bdblibdir $LDFLAGS" - -- eval export $shlibpath_var=$bdblibdir -+# eval export $shlibpath_var=$bdblibdir - NETATALK_BDB_TRY_LINK -- eval export $shlibpath_var=$saved_shlibpath_var -+# eval export $shlibpath_var=$saved_shlibpath_var - - if test x"${atalk_cv_bdb_version}" = x"yes"; then - BDB_CFLAGS="-I${bdbdir}/include${subdir}" diff --git a/net/netcat/Makefile b/net/netcat/Makefile index 0248f0d..5a56317 100644 --- a/net/netcat/Makefile +++ b/net/netcat/Makefile @@ -13,7 +13,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_MD5SUM:=0a29eff1736ddb5effd0b1ec1f6fe0ef +PKG_HASH:=b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb PKG_MAINTAINER:=Adam Gensler PKG_LICENSE:=GPL-2.0 PKG_INSTALL:=1 diff --git a/net/netdiscover/Makefile b/net/netdiscover/Makefile deleted file mode 100644 index 8002d84..0000000 --- a/net/netdiscover/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=netdiscover -PKG_VERSION:=0.3-pre-beta7 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-LINUXONLY.tar.gz -PKG_SOURCE_URL:=@SF/netdiscover -PKG_MD5SUM:=8780e66d00496e933b4064cfe9ae61da -PKG_MAINTAINER:=Mislav Novakovic -PKG_LICENSE:=GPL-2.0 - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/netdiscover - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libpcap +libnet-1.2.x +libpthread - TITLE:=An active/passive address reconnaissance tool - URL:=https://sourceforge.net/projects/netdiscover -endef - -CONFIGURE_VARS+= \ - CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libnet-1.2.x/lib" \ - LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libnet-1.2.x/lib" - -define Package/netdiscover/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdiscover $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,netdiscover)) diff --git a/net/netperf/Makefile b/net/netperf/Makefile index f50b7e8..5f15333 100644 --- a/net/netperf/Makefile +++ b/net/netperf/Makefile @@ -14,7 +14,7 @@ PKG_LICENSE:=Custom PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=ftp://ftp.netperf.org/netperf/ -PKG_MD5SUM:=ad1c5342d61f297c417a93133aeba65a +PKG_HASH:=842af17655835c8be7203808c3393e6cb327a8067f3ed1f1053eb78b4e40375a include $(INCLUDE_DIR)/package.mk diff --git a/net/nfs-kernel-server/Makefile b/net/nfs-kernel-server/Makefile deleted file mode 100644 index e58c6eb..0000000 --- a/net/nfs-kernel-server/Makefile +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright (C) 2009-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=nfs-kernel-server -PKG_VERSION:=2.1.1 -PKG_RELEASE:=1 -PKG_MD5SUM:=1157abcfaa8670f990f408cf280426b4 - -PKG_SOURCE_URL:=@SF/nfs -PKG_SOURCE:=nfs-utils-$(PKG_VERSION).tar.bz2 - -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/nfs-utils-$(PKG_VERSION) -PKG_BUILD_DIR:=$(BUILD_DIR)/nfs-utils-$(PKG_VERSION) -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_DEPENDS:=$(PKG_NAME)/host - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/nfs-kernel-server/Default - SECTION:=net - CATEGORY:=Network - SUBMENU:=Filesystem - DEPENDS:=+libwrap +libblkid +libuuid $(LIBRPC_DEPENDS) - URL:=http://nfs.sourceforge.net/ - MAINTAINER:=Peter Wagner -endef - -define Package/nfs-kernel-server - $(call Package/nfs-kernel-server/Default) - TITLE:=Kernel NFS server support - DEPENDS+= +kmod-fs-nfsd +kmod-fs-nfs +portmap -endef - -define Package/nfs-kernel-server/description - Kernel NFS server support -endef - -define Package/nfs-kernel-server-utils - $(call Package/nfs-kernel-server/Default) - TITLE:=NFS server utils - DEPENDS:=nfs-kernel-server -endef - -define Package/nfs-kernel-server-utils/description - NFS server utils -endef - -define Package/nfs-kernel-server/conffiles -/etc/exports -endef - -define Package/nfs-utils - $(call Package/nfs-kernel-server/Default) - SECTION:=utils - CATEGORY:=Utilities - DEPENDS+= +libevent2 +USE_UCLIBC:librpc - TITLE:=updated mount utility (includes nfs4) -endef - -define Package/nfs-utils/description - Updated mount.nfs command - allows mounting nfs4 volumes -endef - -TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib -I$(STAGING_DIR)/usr/include/libevent \ - -I$(STAGING_DIR)/usr/include/ -Drpc_uint=uint -TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(LIBRPC) \ - -L$(STAGING_DIR)/usr/lib/libevent - -CONFIGURE_ARGS += \ - --disable-gss \ - --disable-nfsv4 \ - --disable-nfsv41 \ - --disable-ipv6 \ - --enable-static \ - --enable-shared \ - --disable-caps \ - --disable-tirpc \ - --disable-nfsdcld - -CONFIGURE_VARS += \ - libblkid_cv_is_recent=yes \ - CONFIG_SQLITE3_TRUE="\#" \ - CONFIG_NFSDCLD_TRUE="\#" - -MAKE_FLAGS += \ - OPT="$(TARGET_CFLAGS)" \ - INSTALLSUID="install -m 4755" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - RPCGEN_PATH=$(STAGING_DIR_HOSTPKG)/bin/rpcgen \ - RPCGEN=$(STAGING_DIR_HOSTPKG)/bin/rpcgen - -HOST_CFLAGS += -Dlinux - -HOST_CONFIGURE_ARGS += \ - --disable-gss \ - --disable-nfsv4 \ - --disable-nfsv41 \ - --disable-ipv6 \ - --disable-tirpc \ - --without-tcp-wrappers - -HOST_CONFIGURE_VARS += \ - ac_cv_lib_event_event_dispatch=yes \ - ac_cv_lib_nfsidmap_nfs4_init_name_mapping=yes \ - ac_cv_lib_blkid_blkid_get_library_version=yes \ - ac_cv_header_event_h=yes \ - ac_cv_header_nfsidmap_h=yes \ - ac_cv_header_blkid_blkid_h=yes \ - GSSGLUE_CFLAGS=" " \ - GSSGLUE_LIBS=" " \ - RPCSECGSS_CFLAGS=" " \ - RPCSECGSS_LIBS=" " \ - CONFIG_SQLITE3_TRUE="\#" \ - CONFIG_NFSDCLD_TRUE="\#" - -define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR)/tools/rpcgen all -endef - -define Host/Install - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin - $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/rpcgen/rpcgen $(STAGING_DIR_HOSTPKG)/bin/rpcgen -endef - -define Package/nfs-kernel-server/install - $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin - $(INSTALL_DATA) ./files/nfsd.exports $(1)/etc/exports - $(INSTALL_BIN) ./files/nfsd.init $(1)/etc/init.d/nfsd - $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/sm-notify $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/statd/statd $(1)/usr/sbin/rpc.statd - $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsd/nfsd $(1)/usr/sbin/rpc.nfsd - $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/mountd/mountd $(1)/usr/sbin/rpc.mountd - $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/exportfs/exportfs $(1)/usr/sbin/ -endef - -define Package/nfs-kernel-server-utils/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/showmount/showmount $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/utils/nfsstat/nfsstat $(1)/usr/sbin -endef - -define Package/nfs-utils/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/mount.nfs $(1)/sbin/ - (cd $(1)/sbin; ln -sf mount.nfs mount.nfs4; ln -sf mount.nfs umount.nfs; ln -sf mount.nfs umount.nfs4) -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,nfs-kernel-server)) -$(eval $(call BuildPackage,nfs-kernel-server-utils)) -$(eval $(call BuildPackage,nfs-utils)) diff --git a/net/nfs-kernel-server/files/nfsd.exports b/net/nfs-kernel-server/files/nfsd.exports deleted file mode 100644 index 0453e04..0000000 --- a/net/nfs-kernel-server/files/nfsd.exports +++ /dev/null @@ -1 +0,0 @@ -/mnt *(ro,all_squash,insecure,sync) diff --git a/net/nfs-kernel-server/files/nfsd.init b/net/nfs-kernel-server/files/nfsd.init deleted file mode 100644 index af36c12..0000000 --- a/net/nfs-kernel-server/files/nfsd.init +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org - -START=99 -STOP=60 - -USE_PROCD=1 - -NFS_D=/var/lib/nfs -LOCK_D=/var/lib/nfs/sm - -start_service() { - grep -q /proc/fs/nfsd /proc/mounts || \ - mount -t nfsd nfsd /proc/fs/nfsd - mkdir -p $NFS_D - mkdir -p $LOCK_D - touch $NFS_D/rmtab - - sysctl -w fs.nfs.nlm_tcpport=32777 fs.nfs.nlm_udpport=32777 > /dev/null - - procd_open_instance - procd_set_param command /usr/sbin/rpc.statd -p 32778 -o 32779 -F - procd_close_instance - - /usr/sbin/exportfs -r - /usr/sbin/rpc.nfsd - - procd_open_instance - procd_set_param command /usr/sbin/rpc.mountd -p 32780 -F - procd_close_instance -} - -stop_service() { - rpc.nfsd 0 2> /dev/null - /usr/sbin/exportfs -au - grep -q /proc/fs/nfsd /proc/mounts && \ - umount /proc/fs/nfsd -} diff --git a/net/nfs-kernel-server/patches/100-no_malloc_h.patch b/net/nfs-kernel-server/patches/100-no_malloc_h.patch deleted file mode 100644 index afe4c98..0000000 --- a/net/nfs-kernel-server/patches/100-no_malloc_h.patch +++ /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 - #include - #include --#include - #include - #include "rpc_parse.h" - #include "rpc_util.h" diff --git a/net/nfs-kernel-server/patches/101-musl-getservbyport.patch b/net/nfs-kernel-server/patches/101-musl-getservbyport.patch deleted file mode 100644 index efe565c..0000000 --- a/net/nfs-kernel-server/patches/101-musl-getservbyport.patch +++ /dev/null @@ -1,18 +0,0 @@ -Musl will always return something with getservbyport so we cannot skip -ports that returns non-null. - -diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c -index fd576d9..d72a0bf 100644 ---- a/utils/statd/rmtcall.c -+++ b/utils/statd/rmtcall.c -@@ -90,8 +90,10 @@ statd_get_socket(void) - __func__); - break; - } -+#if defined(__GLIBC__) || defined(__UCLIBC__) - se = getservbyport(sin.sin_port, "udp"); - if (se == NULL) -+#endif - break; - /* rather not use that port, try again */ - diff --git a/net/nginx/Config.in b/net/nginx/Config.in deleted file mode 100644 index bf6b834..0000000 --- a/net/nginx/Config.in +++ /dev/null @@ -1,185 +0,0 @@ -# -# Copyright (C) 2010-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -menu "Configuration" - depends on PACKAGE_nginx - -config NGINX_SSL - bool - prompt "Enable SSL module" - help - Enable HTTPS/SSL support. - default n - -config NGINX_DAV - bool - prompt "Enable WebDAV module" - help - Enable the HTTP and WebDAV methods PUT, DELETE, MKCOL, COPY and MOVE. - default n - -config NGINX_FLV - bool - prompt "Enable FLV module" - help - Provides the ability to seek within FLV (Flash) files using time-based offsets. - default n - -config NGINX_STUB_STATUS - bool - prompt "Enable stub status module" - help - Enable the stub status module which gives some status from the server. - default n - -config NGINX_HTTP_CHARSET - bool - prompt "Enable HTTP charset module" - default y - -config NGINX_HTTP_GZIP - bool - prompt "Enable HTTP gzip module" - default y - -config NGINX_HTTP_SSI - bool - prompt "Enable HTTP ssi module" - default y - -config NGINX_HTTP_USERID - bool - prompt "Enable HTTP userid module" - default y - -config NGINX_HTTP_ACCESS - bool - prompt "Enable HTTP access module" - default y - -config NGINX_HTTP_AUTH_BASIC - bool - prompt "Enable HTTP auth basic" - default y - -config NGINX_HTTP_AUTOINDEX - bool - prompt "Enable HTTP autoindex module" - default y - -config NGINX_HTTP_GEO - bool - prompt "Enable HTTP geo module" - default y - -config NGINX_HTTP_MAP - bool - prompt "Enable HTTP map module" - default y - -config NGINX_HTTP_SPLIT_CLIENTS - bool - prompt "Enable HTTP split clients" - default y - -config NGINX_HTTP_REFERER - bool - prompt "Enable HTTP referer module" - default y - -config NGINX_HTTP_REWRITE - bool - prompt "Enable HTTP rewrite module" - select NGINX_PCRE - default y - -config NGINX_HTTP_PROXY - bool - prompt "Enable HTTP proxy module" - default y - -config NGINX_HTTP_FASTCGI - bool - prompt "Enable HTTP fastcgi module" - default y - -config NGINX_HTTP_UWSGI - bool - prompt "Enable HTTP uwsgi module" - default y - -config NGINX_HTTP_SCGI - bool - prompt "Enable HTTP scgi module" - default y - -config NGINX_HTTP_MEMCACHED - bool - prompt "Enable HTTP memcached module" - default y - -config NGINX_HTTP_LIMIT_CONN - bool - prompt "Enable HTTP limit conn" - default y - -config NGINX_HTTP_LIMIT_REQ - bool - prompt "Enable HTTP limit req" - default y - -config NGINX_HTTP_EMPTY_GIF - bool - prompt "Enable HTTP empty gif" - default y - -config NGINX_HTTP_BROWSER - bool - prompt "Enable HTTP browser module" - default y - -config NGINX_HTTP_UPSTREAM_HASH - bool - prompt "Enable HTTP hash module" - default y - -config NGINX_HTTP_UPSTREAM_IP_HASH - bool - prompt "Enable HTTP IP hash module" - default y - -config NGINX_HTTP_UPSTREAM_LEAST_CONN - bool - prompt "Enable HTTP least conn module" - default y - -config NGINX_HTTP_UPSTREAM_KEEPALIVE - bool - prompt "Enable HTTP keepalive module" - default y - -config NGINX_HTTP_CACHE - bool - prompt "Enable HTTP cache" - default y - -config NGINX_PCRE - bool - prompt "Enable PCRE library usage" - default y - -config NGINX_NAXSI - bool - prompt "Enable NAXSI module" - default y - -config NGINX_LUA - bool - prompt "Enable Lua module" - default n - -endmenu diff --git a/net/nginx/Makefile b/net/nginx/Makefile deleted file mode 100644 index 5ebdaa5..0000000 --- a/net/nginx/Makefile +++ /dev/null @@ -1,270 +0,0 @@ -# -# Copyright (C) 2012-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=nginx -PKG_VERSION:=1.10.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://nginx.org/download/ -PKG_MD5SUM:=e8f5f4beed041e63eb97f9f4f55f3085 -PKG_MAINTAINER:=Thomas Heil -PKG_LICENSE:=2-clause BSD-like license - -PKG_BUILD_DIR:=$(BUILD_DIR)/nginx-$(PKG_VERSION) - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -PKG_CONFIG_DEPENDS := \ - CONFIG_NGINX_SSL \ - CONFIG_NGINX_DAV \ - CONFIG_NGINX_FLV \ - CONFIG_NGINX_STUB_STATUS \ - CONFIG_NGINX_HTTP_CHARSET \ - CONFIG_NGINX_HTTP_GZIP \ - CONFIG_NGINX_HTTP_SSI \ - CONFIG_NGINX_HTTP_USERID \ - CONFIG_NGINX_HTTP_ACCESS \ - CONFIG_NGINX_HTTP_AUTH_BASIC \ - CONFIG_NGINX_HTTP_AUTOINDEX \ - CONFIG_NGINX_HTTP_GEO \ - CONFIG_NGINX_HTTP_MAP \ - CONFIG_NGINX_HTTP_SPLIT_CLIENTS \ - CONFIG_NGINX_HTTP_REFERER \ - CONFIG_NGINX_HTTP_REWRITE \ - CONFIG_NGINX_HTTP_PROXY \ - CONFIG_NGINX_HTTP_FASTCGI \ - CONFIG_NGINX_HTTP_UWSGI \ - CONFIG_NGINX_HTTP_SCGI \ - CONFIG_NGINX_HTTP_MEMCACHED \ - CONFIG_NGINX_HTTP_LIMIT_CONN \ - CONFIG_NGINX_HTTP_LIMIT_REQ \ - CONFIG_NGINX_HTTP_EMPTY_GIF \ - CONFIG_NGINX_HTTP_BROWSER \ - CONFIG_NGINX_HTTP_UPSTREAM_HASH \ - CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH \ - CONFIG_NGINX_HTTP_UPSTREAM_LEAST_CONN \ - CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE \ - CONFIG_NGINX_HTTP_UPSTREAM_ZONE \ - CONFIG_NGINX_HTTP_CACHE \ - CONFIG_NGINX_PCRE \ - CONFIG_NGINX_NAXSI \ - CONFIG_NGINX_LUA - -include $(INCLUDE_DIR)/package.mk - -define Package/nginx - SECTION:=net - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - TITLE:=Nginx web server - URL:=http://nginx.org/ - DEPENDS:=+NGINX_PCRE:libpcre +(NGINX_SSL||NGINX_HTTP_CACHE||NGINX_HTTP_AUTH_BASIC):libopenssl +NGINX_HTTP_GZIP:zlib +NGINX_LUA:liblua +libpthread - MENU:=1 -endef - -define Package/nginx/description - nginx is an HTTP and reverse proxy server, as well as a mail proxy server, - written by Igor Sysoev. -endef - -define Package/nginx/config - source "$(SOURCE)/Config.in" -endef - -config_files=nginx.conf mime.types - -define Package/nginx/conffiles -/etc/nginx/ -endef - -ADDITIONAL_MODULES:= -ifeq ($(CONFIG_NGINX_NAXSI),y) - ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/nginx-naxsi/naxsi_src -endif -ifeq ($(CONFIG_NGINX_LUA),y) - ADDITIONAL_MODULES += --add-module=$(PKG_BUILD_DIR)/lua-nginx -endif -ifeq ($(CONFIG_IPV6),y) - ADDITIONAL_MODULES += --with-ipv6 -endif -ifeq ($(CONFIG_NGINX_STUB_STATUS),y) - ADDITIONAL_MODULES += --with-http_stub_status_module -endif -ifeq ($(CONFIG_NGINX_FLV),y) - ADDITIONAL_MODULES += --with-http_flv_module -endif -ifeq ($(CONFIG_NGINX_SSL),y) - ADDITIONAL_MODULES += --with-http_ssl_module -endif -ifeq ($(CONFIG_NGINX_DAV),y) - ADDITIONAL_MODULES += --with-http_dav_module -endif -ifneq ($(CONFIG_NGINX_HTTP_CACHE),y) - ADDITIONAL_MODULES += --without-http-cache -endif -ifneq ($(CONFIG_NGINX_PCRE),y) - ADDITIONAL_MODULES += --without-pcre -endif -ifneq ($(CONFIG_NGINX_HTTP_CHARSET),y) - ADDITIONAL_MODULES += --without-http_charset_module -else - config_files += koi-utf koi-win win-utf -endif -ifneq ($(CONFIG_NGINX_HTTP_GZIP),y) - ADDITIONAL_MODULES += --without-http_gzip_module -endif -ifneq ($(CONFIG_NGINX_HTTP_SSI),y) - ADDITIONAL_MODULES += --without-http_ssi_module -endif -ifneq ($(CONFIG_NGINX_HTTP_USERID),y) - ADDITIONAL_MODULES += --without-http_userid_module -endif -ifneq ($(CONFIG_NGINX_HTTP_ACCESS),y) - ADDITIONAL_MODULES += --without-http_access_module -endif -ifneq ($(CONFIG_NGINX_HTTP_AUTH_BASIC),y) - ADDITIONAL_MODULES += --without-http_auth_basic_module -endif -ifneq ($(CONFIG_NGINX_HTTP_AUTOINDEX),y) - ADDITIONAL_MODULES += --without-http_autoindex_module -endif -ifneq ($(CONFIG_NGINX_HTTP_GEO),y) - ADDITIONAL_MODULES += --without-http_geo_module -endif -ifneq ($(CONFIG_NGINX_HTTP_MAP),y) - ADDITIONAL_MODULES += --without-http_map_module -endif -ifneq ($(CONFIG_NGINX_HTTP_SPLIT_CLIENTS),y) - ADDITIONAL_MODULES += --without-http_split_clients_module -endif -ifneq ($(CONFIG_NGINX_HTTP_REFERER),y) - ADDITIONAL_MODULES += --without-http_referer_module -endif -ifneq ($(CONFIG_NGINX_HTTP_REWRITE),y) - ADDITIONAL_MODULES += --without-http_rewrite_module -endif -ifneq ($(CONFIG_NGINX_HTTP_PROXY),y) - ADDITIONAL_MODULES += --without-http_proxy_module -endif -ifneq ($(CONFIG_NGINX_HTTP_FASTCGI),y) - ADDITIONAL_MODULES += --without-http_fastcgi_module -else - config_files += fastcgi_params -endif -ifneq ($(CONFIG_NGINX_HTTP_UWSGI),y) - ADDITIONAL_MODULES += --without-http_uwsgi_module -endif -ifneq ($(CONFIG_NGINX_HTTP_SCGI),y) - ADDITIONAL_MODULES += --without-http_scgi_module -endif -ifneq ($(CONFIG_NGINX_HTTP_MEMCACHED),y) - ADDITIONAL_MODULES += --without-http_memcached_module -endif -ifneq ($(CONFIG_NGINX_HTTP_LIMIT_CONN),y) - ADDITIONAL_MODULES += --without-http_limit_conn_module -endif -ifneq ($(CONFIG_NGINX_HTTP_LIMIT_REQ),y) - ADDITIONAL_MODULES += --without-http_limit_req_module -endif -ifneq ($(CONFIG_NGINX_HTTP_EMPTY_GIF),y) - ADDITIONAL_MODULES += --without-http_empty_gif_module -endif -ifneq ($(CONFIG_NGINX_HTTP_BROWSER),y) - ADDITIONAL_MODULES += --without-http_browser_module -endif -ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_HASH),y) - ADDITIONAL_MODULES += --without-http_upstream_hash_module -endif -ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_IP_HASH),y) - ADDITIONAL_MODULES += --without-http_upstream_ip_hash_module -endif -ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_LEAST_CONN),y) - ADDITIONAL_MODULES += --without-http_upstream_least_conn_module -endif -ifneq ($(CONFIG_NGINX_HTTP_UPSTREAM_KEEPALIVE),y) - ADDITIONAL_MODULES += --without-http_upstream_keepalive_module -endif - -TARGET_CFLAGS += -fvisibility=hidden -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK -TARGET_LDFLAGS += -Wl,--gc-sections - -define Build/Configure - ( cd $(PKG_BUILD_DIR) ; \ - $(if $(CONFIG_NGINX_LUA),LUA_INC=$(STAGING_DIR)/usr/include LUA_LIB=$(STAGING_DIR)/usr/lib) \ - ./configure \ - --crossbuild=Linux::$(ARCH) \ - --prefix=/usr \ - --conf-path=/etc/nginx/nginx.conf \ - $(ADDITIONAL_MODULES) \ - --error-log-path=/var/log/nginx/error.log \ - --pid-path=/var/run/nginx.pid \ - --lock-path=/var/lock/nginx.lock \ - --http-log-path=/var/log/nginx/access.log \ - --http-client-body-temp-path=/var/lib/nginx/body \ - --http-proxy-temp-path=/var/lib/nginx/proxy \ - --http-fastcgi-temp-path=/var/lib/nginx/fastcgi \ - --with-cc="$(TARGET_CC)" \ - --with-cc-opt="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ - --with-ld-opt="$(TARGET_LDFLAGS)" \ - --without-http_upstream_zone_module \ - ) -endef - -define Package/nginx/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nginx $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/nginx - $(INSTALL_DATA) $(addprefix $(PKG_INSTALL_DIR)/etc/nginx/,$(config_files)) $(1)/etc/nginx/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/nginx.init $(1)/etc/init.d/nginx -ifeq ($(CONFIG_NGINX_NAXSI),y) - $(INSTALL_DIR) $(1)/etc/nginx - $(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx - chmod 0640 $(1)/etc/nginx/naxsi_core.rules -endif - $(if $(CONFIG_NGINX_NAXSI),$($(INSTALL_BIN) $(PKG_BUILD_DIR)/nginx-naxsi/naxsi_config/naxsi_core.rules $(1)/etc/nginx)) - $(if $(CONFIG_NGINX_NAXSI),$(chmod 0640 $(1)/etc/nginx/naxsi_core.rules)) -endef - -define Build/Prepare - $(call Build/Prepare/Default) - $(if $(CONFIG_NGINX_NAXSI),$(call Prepare/nginx-naxsi)) - $(if $(CONFIG_NGINX_LUA),$(call Prepare/lua-nginx)) -endef - -define Download/nginx-naxsi - VERSION:=cf73f9c8664127252c2a4958d2e169516d3845a1 - SUBDIR:=nginx-naxsi - FILE:=nginx-naxsi-module-$(PKG_VERSION)-$$(VERSION).tar.gz - URL:=https://github.com/nbs-system/naxsi.git - PROTO:=git -endef - -define Prepare/nginx-naxsi - $(eval $(call Download,nginx-naxsi)) - gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) -endef - -define Download/lua-nginx - VERSION:=1967998b0eedab1ff51bff8fafa5fc3db47976aa - SUBDIR:=lua-nginx - FILE:=lua-nginx-module-$(PKG_VERSION)-$$(VERSION).tar.gz - URL:=https://github.com/openresty/lua-nginx-module.git - PROTO:=git -endef - -define Prepare/lua-nginx - $(eval $(call Download,lua-nginx)) - gzip -dc $(DL_DIR)/$(FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) - $(call PatchDir,$(PKG_BUILD_DIR),./patches-lua-nginx) -endef - -$(eval $(call BuildPackage,nginx)) diff --git a/net/nginx/files/nginx.init b/net/nginx/files/nginx.init deleted file mode 100644 index 40d3897..0000000 --- a/net/nginx/files/nginx.init +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=80 - -USE_PROCD=1 - -start_service() { - [ -d /var/log/nginx ] || mkdir -p /var/log/nginx - [ -d /var/lib/nginx ] || mkdir -p /var/lib/nginx - - procd_open_instance - procd_set_param command /usr/sbin/nginx -c /etc/nginx/nginx.conf -g 'daemon off;' - procd_set_param file /etc/nginx/nginx.conf - procd_set_param respawn - procd_close_instance -} diff --git a/net/nginx/patches-lua-nginx/100-no_by_lua_block.patch b/net/nginx/patches-lua-nginx/100-no_by_lua_block.patch deleted file mode 100644 index fef983f..0000000 --- a/net/nginx/patches-lua-nginx/100-no_by_lua_block.patch +++ /dev/null @@ -1,195 +0,0 @@ ---- a/lua-nginx/src/ngx_http_lua_module.c -+++ b/lua-nginx/src/ngx_http_lua_module.c -@@ -157,14 +157,14 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - offsetof(ngx_http_lua_loc_conf_t, log_socket_errors), - NULL }, -- -+#ifndef NGX_LUA_NO_BY_LUA_BLOCK - { ngx_string("init_by_lua_block"), - NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, - ngx_http_lua_init_by_lua_block, - NGX_HTTP_MAIN_CONF_OFFSET, - 0, - (void *) ngx_http_lua_init_by_inline }, -- -+#endif - { ngx_string("init_by_lua"), - NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, - ngx_http_lua_init_by_lua, -@@ -178,14 +178,14 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_MAIN_CONF_OFFSET, - 0, - (void *) ngx_http_lua_init_by_file }, -- -+#ifndef NGX_LUA_NO_BY_LUA_BLOCK - { ngx_string("init_worker_by_lua_block"), - NGX_HTTP_MAIN_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, - ngx_http_lua_init_worker_by_lua_block, - NGX_HTTP_MAIN_CONF_OFFSET, - 0, - (void *) ngx_http_lua_init_worker_by_inline }, -- -+#endif - { ngx_string("init_worker_by_lua"), - NGX_HTTP_MAIN_CONF|NGX_CONF_TAKE1, - ngx_http_lua_init_worker_by_lua, -@@ -201,6 +201,7 @@ static ngx_command_t ngx_http_lua_cmds[] - (void *) ngx_http_lua_init_worker_by_file }, - - #if defined(NDK) && NDK -+#ifndef NGX_LUA_NO_BY_LUA_BLOCK - /* set_by_lua $res { inline Lua code } [$arg1 [$arg2 [...]]] */ - { ngx_string("set_by_lua_block"), - NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF -@@ -209,7 +210,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_filter_set_by_lua_inline }, -- -+#endif - /* set_by_lua $res [$arg1 [$arg2 [...]]] */ - { ngx_string("set_by_lua"), - NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF -@@ -237,7 +238,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_rewrite_handler_inline }, -- -+#ifndef NGX_LUA_NO_BY_LUA_BLOCK - /* rewrite_by_lua_block { } */ - { ngx_string("rewrite_by_lua_block"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF -@@ -246,7 +247,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_rewrite_handler_inline }, -- -+#endif - /* access_by_lua "" */ - { ngx_string("access_by_lua"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF -@@ -255,7 +256,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_access_handler_inline }, -- -+#ifndef NGX_LUA_NO_BY_LUA_BLOCK - /* access_by_lua_block { } */ - { ngx_string("access_by_lua_block"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF -@@ -264,7 +265,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_access_handler_inline }, -- -+#endif - /* content_by_lua "" */ - { ngx_string("content_by_lua"), - NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_TAKE1, -@@ -272,7 +273,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_content_handler_inline }, -- -+#ifndef NGX_LUA_NO_BY_LUA_BLOCK - /* content_by_lua_block { } */ - { ngx_string("content_by_lua_block"), - NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, -@@ -280,7 +281,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_content_handler_inline }, -- -+#endif - /* log_by_lua */ - { ngx_string("log_by_lua"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF -@@ -289,7 +290,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_log_handler_inline }, -- -+#ifndef NGX_LUA_NO_BY_LUA_BLOCK - /* log_by_lua_block { } */ - { ngx_string("log_by_lua_block"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF -@@ -298,7 +299,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_log_handler_inline }, -- -+#endif - { ngx_string("rewrite_by_lua_file"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF - |NGX_CONF_TAKE1, -@@ -353,7 +354,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_header_filter_inline }, -- -+#ifndef NGX_LUA_NO_BY_LUA_BLOCK - /* header_filter_by_lua_block { } */ - { ngx_string("header_filter_by_lua_block"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF -@@ -362,7 +363,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_header_filter_inline }, -- -+#endif - { ngx_string("header_filter_by_lua_file"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF - |NGX_CONF_TAKE1, -@@ -378,7 +379,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_body_filter_inline }, -- -+#ifndef NGX_LUA_NO_BY_LUA_BLOCK - /* body_filter_by_lua_block { } */ - { ngx_string("body_filter_by_lua_block"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF -@@ -387,7 +388,7 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_body_filter_inline }, -- -+#endif - { ngx_string("body_filter_by_lua_file"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF - |NGX_CONF_TAKE1, -@@ -395,14 +396,14 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - 0, - (void *) ngx_http_lua_body_filter_file }, -- -+#ifndef NGX_LUA_NO_BY_LUA_BLOCK - { ngx_string("balancer_by_lua_block"), - NGX_HTTP_UPS_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, - ngx_http_lua_balancer_by_lua_block, - NGX_HTTP_SRV_CONF_OFFSET, - 0, - (void *) ngx_http_lua_balancer_handler_inline }, -- -+#endif - { ngx_string("balancer_by_lua_file"), - NGX_HTTP_UPS_CONF|NGX_CONF_TAKE1, - ngx_http_lua_balancer_by_lua, -@@ -509,14 +510,14 @@ static ngx_command_t ngx_http_lua_cmds[] - NGX_HTTP_LOC_CONF_OFFSET, - offsetof(ngx_http_lua_loc_conf_t, ssl_ciphers), - NULL }, -- -+#ifndef NGX_LUA_NO_BY_LUA_BLOCK - { ngx_string("ssl_certificate_by_lua_block"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_BLOCK|NGX_CONF_NOARGS, - ngx_http_lua_ssl_cert_by_lua_block, - NGX_HTTP_SRV_CONF_OFFSET, - 0, - (void *) ngx_http_lua_ssl_cert_handler_inline }, -- -+#endif - { ngx_string("ssl_certificate_by_lua_file"), - NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1, - ngx_http_lua_ssl_cert_by_lua, diff --git a/net/nginx/patches/101-feature_test_fix.patch b/net/nginx/patches/101-feature_test_fix.patch deleted file mode 100644 index 2c692bc..0000000 --- a/net/nginx/patches/101-feature_test_fix.patch +++ /dev/null @@ -1,107 +0,0 @@ ---- a/auto/cc/name -+++ b/auto/cc/name -@@ -7,7 +7,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then - - ngx_feature="C compiler" - ngx_feature_name= -- ngx_feature_run=yes -+ ngx_feature_run= - ngx_feature_incs= - ngx_feature_path= - ngx_feature_libs= ---- a/auto/cc/conf -+++ b/auto/cc/conf -@@ -200,7 +200,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then - else - ngx_feature="C99 variadic macros" - ngx_feature_name="NGX_HAVE_C99_VARIADIC_MACROS" -- ngx_feature_run=yes -+ ngx_feature_run=no - ngx_feature_incs="#include - #define var(dummy, ...) sprintf(__VA_ARGS__)" - ngx_feature_path= -@@ -214,7 +214,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then - - ngx_feature="gcc variadic macros" - ngx_feature_name="NGX_HAVE_GCC_VARIADIC_MACROS" -- ngx_feature_run=yes -+ ngx_feature_run=no - ngx_feature_incs="#include - #define var(dummy, args...) sprintf(args)" - ngx_feature_path= ---- a/auto/os/linux -+++ b/auto/os/linux -@@ -36,7 +36,7 @@ fi - - ngx_feature="epoll" - ngx_feature_name="NGX_HAVE_EPOLL" --ngx_feature_run=yes -+ngx_feature_run=no - ngx_feature_incs="#include " - ngx_feature_path= - ngx_feature_libs= -@@ -93,7 +93,7 @@ ngx_feature_test="int fd; struct stat sb - CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE" - ngx_feature="sendfile()" - ngx_feature_name="NGX_HAVE_SENDFILE" --ngx_feature_run=yes -+ngx_feature_run=no - ngx_feature_incs="#include - #include " - ngx_feature_path= -@@ -114,7 +114,7 @@ fi - CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64" - ngx_feature="sendfile64()" - ngx_feature_name="NGX_HAVE_SENDFILE64" --ngx_feature_run=yes -+ngx_feature_run=no - ngx_feature_incs="#include - #include " - ngx_feature_path= -@@ -132,7 +132,7 @@ ngx_include="sys/prctl.h"; . auto/includ - - ngx_feature="prctl(PR_SET_DUMPABLE)" - ngx_feature_name="NGX_HAVE_PR_SET_DUMPABLE" --ngx_feature_run=yes -+ngx_feature_run=no - ngx_feature_incs="#include " - ngx_feature_path= - ngx_feature_libs= ---- a/auto/unix -+++ b/auto/unix -@@ -735,7 +735,7 @@ ngx_feature_test="void *p; p = memalign( - - ngx_feature="mmap(MAP_ANON|MAP_SHARED)" - ngx_feature_name="NGX_HAVE_MAP_ANON" --ngx_feature_run=yes -+ngx_feature_run=no - ngx_feature_incs="#include " - ngx_feature_path= - ngx_feature_libs= -@@ -748,7 +748,7 @@ ngx_feature_test="void *p; - - ngx_feature='mmap("/dev/zero", MAP_SHARED)' - ngx_feature_name="NGX_HAVE_MAP_DEVZERO" --ngx_feature_run=yes -+ngx_feature_run=no - ngx_feature_incs="#include - #include - #include " -@@ -763,7 +763,7 @@ ngx_feature_test='void *p; int fd; - - ngx_feature="System V shared memory" - ngx_feature_name="NGX_HAVE_SYSVSHM" --ngx_feature_run=yes -+ngx_feature_run=no - ngx_feature_incs="#include - #include " - ngx_feature_path= -@@ -777,7 +777,7 @@ ngx_feature_test="int id; - - ngx_feature="POSIX semaphores" - ngx_feature_name="NGX_HAVE_POSIX_SEM" --ngx_feature_run=yes -+ngx_feature_run=no - ngx_feature_incs="#include " - ngx_feature_path= - ngx_feature_libs= diff --git a/net/nginx/patches/102-sizeof_test_fix.patch b/net/nginx/patches/102-sizeof_test_fix.patch deleted file mode 100644 index 36d7aaf..0000000 --- a/net/nginx/patches/102-sizeof_test_fix.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/auto/types/sizeof -+++ b/auto/types/sizeof -@@ -25,8 +25,14 @@ $NGX_INCLUDE_UNISTD_H - $NGX_INCLUDE_INTTYPES_H - $NGX_INCLUDE_AUTO_CONFIG_H - -+char object_code_block[] = { -+ '\n', 'e', '4', 'V', 'A', -+ '0', 'x', ('0' + sizeof($ngx_type)), -+ 'Y', '3', 'p', 'M', '\n' -+}; -+ - int main() { -- printf("%d", (int) sizeof($ngx_type)); -+ printf("dummy use of object_code_block to avoid gc-section: %c", object_code_block[0]); - return 0; - } - -@@ -40,7 +45,7 @@ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>& - - - if [ -x $NGX_AUTOTEST ]; then -- ngx_size=`$NGX_AUTOTEST` -+ ngx_size=`sed -ne 's/^e4VA0x\(.\)Y3pM$/\1/p' < $NGX_AUTOTEST` - echo " $ngx_size bytes" - fi - diff --git a/net/nginx/patches/103-sys_nerr.patch b/net/nginx/patches/103-sys_nerr.patch deleted file mode 100644 index 5f5d106..0000000 --- a/net/nginx/patches/103-sys_nerr.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/src/os/unix/ngx_errno.c -+++ b/src/os/unix/ngx_errno.c -@@ -8,6 +8,9 @@ - #include - #include - -+#ifndef NGX_SYS_NERR -+#define NGX_SYS_NERR 128 -+#endif - - /* - * The strerror() messages are copied because: diff --git a/net/nginx/patches/200-config.patch b/net/nginx/patches/200-config.patch deleted file mode 100644 index f350095..0000000 --- a/net/nginx/patches/200-config.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/conf/nginx.conf -+++ b/conf/nginx.conf -@@ -1,5 +1,5 @@ - --#user nobody; -+user nobody nogroup; - worker_processes 1; - - #error_log logs/error.log; -@@ -16,7 +16,7 @@ events { - - http { - include mime.types; -- default_type application/octet-stream; -+ #default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' diff --git a/net/nginx/patches/300-max-processes.patch b/net/nginx/patches/300-max-processes.patch deleted file mode 100644 index f7465d4..0000000 --- a/net/nginx/patches/300-max-processes.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/os/unix/ngx_process.h -+++ b/src/os/unix/ngx_process.h -@@ -44,7 +44,7 @@ typedef struct { - } ngx_exec_ctx_t; - - --#define NGX_MAX_PROCESSES 1024 -+#define NGX_MAX_PROCESSES 8 - - #define NGX_PROCESS_NORESPAWN -1 - #define NGX_PROCESS_JUST_SPAWN -2 diff --git a/net/ngircd/Makefile b/net/ngircd/Makefile deleted file mode 100644 index 3778609..0000000 --- a/net/ngircd/Makefile +++ /dev/null @@ -1,109 +0,0 @@ -# -# Copyright (C) 2008-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ngircd -PKG_VERSION:=23 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Claudio Leite -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:= \ - http://ngircd.barton.de/pub/ngircd/ \ - ftp://ftp.berlios.de/pub/ngircd/ -PKG_MD5SUM:=a58e0075fea60176fa7df092ca7e2c6a - -PKG_INSTALL:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/ngircd/Default - SECTION:=net - CATEGORY:=Network - SUBMENU:=Instant Messaging - DEPENDS:=+zlib - TITLE:=Next Generation IRC Server - URL:=http://ngircd.barton.de -endef - -define Package/ngircd/Default/description - ngIRCd is an Open Source server for the Internet Relay Chat (IRC), which - is developed and published under the terms of the GNU General Public Licence. - ngIRCd means "next generation IRC daemon", it's written from scratch and - not deduced from the "grandfather of IRC daemons", the daemon of the IRCNet. -endef - -define Package/ngircd - $(call Package/ngircd/Default) - TITLE+= (with OpenSSL support) - DEPENDS+= +libopenssl - VARIANT:=ssl -endef - -define Package/ngircd/conffiles -/etc/ngircd.conf -endef - -define Package/ngircd/description - $(call Package/ngircd/Default/description) - This package is built with OpenSSL support. -endef - -define Package/ngircd-nossl -$(call Package/ngircd/Default) - TITLE+= (without OpenSSL support) - VARIANT:=nossl -endef - -Package/ngircd-nossl/conffiles = $(Package/ngircd/conffiles) - -define Package/ngircd-nossl/description - $(call Package/ngircd/Default/description) - This package is built without OpenSSL support. -endef - -ifeq ($(CONFIG_IPV6),y) - CONFIGURE_ARGS += \ - --enable-ipv6 -endif - -ifeq ($(BUILD_VARIANT),ssl) - CONFIGURE_ARGS += \ - --with-openssl="$(STAGING_DIR)/usr" -endif - -ifeq ($(BUILD_VARIANT),nossl) - CONFIGURE_ARGS += \ - --without-openssl -endif - -# The test for HAVE_WORKING_GETADDRINFO fails -# when cross-compiling. -# -define Build/Configure - $(call Build/Configure/Default) - $(SED) 's/\/\* #undef HAVE_WORKING_GETADDRINFO \*\//#define HAVE_WORKING_GETADDRINFO 1/' $(PKG_BUILD_DIR)/src/config.h -endef - -define Package/ngircd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ngircd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ngircd.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/ngircd.init $(1)/etc/init.d/ngircd -endef - -Package/ngircd-nossl/install = $(Package/ngircd/install) - -$(eval $(call BuildPackage,ngircd)) -$(eval $(call BuildPackage,ngircd-nossl)) diff --git a/net/ngircd/files/ngircd.init b/net/ngircd/files/ngircd.init deleted file mode 100644 index 6a21358..0000000 --- a/net/ngircd/files/ngircd.init +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=65 - -start() { - service_start /usr/sbin/ngircd -} - -stop() { - service_stop /usr/sbin/ngircd -} diff --git a/net/nmap/Makefile b/net/nmap/Makefile deleted file mode 100644 index 6fa208b..0000000 --- a/net/nmap/Makefile +++ /dev/null @@ -1,145 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -#TODO -# -# * uClibcpp not supported, performance +100x slower. libstdcpp is being used. https://bugs.busybox.net/show_bug.cgi?id=2545 -# * liblua is still not recognized/blindly accepted. Impossible to compile with support -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=nmap -PKG_VERSION:=7.31 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Nuno Goncalves - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://nmap.org/dist/ -PKG_MD5SUM:=f2f6660142a777862342a58cc54258ea -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -NMAP_DEPENDS:=+libpcap +libstdcpp -NCAT_DEPENDS:=+libpcap -NPING_DEPENDS:=+libpcap +libpthread +libstdcpp -NDIFF_DEPENDS:=+python - -define Package/nmap/default - SUBMENU:=NMAP Suite - SECTION:=net - CATEGORY:=Network - URL:=http://nmap.org/ -endef - -define Package/nmap -$(call Package/nmap/default) - DEPENDS:=$(NMAP_DEPENDS) - VARIANT:=nossl - TITLE:=Utility for network exploration or security auditing -endef - -define Package/nmap-ssl -$(call Package/nmap/default) - DEPENDS:=$(NMAP_DEPENDS) +libopenssl - VARIANT:=ssl - TITLE:=Nmap (with OpenSSL support) -endef - -define Package/ncat -$(call Package/nmap/default) - DEPENDS:=$(NCAT_DEPENDS) - VARIANT:=nossl - TITLE:=Much-improved reimplementation of Netcat -endef - -define Package/ncat-ssl -$(call Package/nmap/default) - DEPENDS:=$(NCAT_DEPENDS) +libopenssl - VARIANT:=ssl - TITLE:=Ncat (with OpenSSL support) -endef - -define Package/nping -$(call Package/nmap/default) - DEPENDS:=$(NPING_DEPENDS) - VARIANT:=nossl - TITLE:=Network packet generation tool / ping utility -endef - -define Package/ndiff -$(call Package/nmap/default) - DEPENDS:=$(NDIFF_DEPENDS) - VARIANT:=nossl - TITLE:=Utility to compare the results of Nmap scans -endef - -CONFIGURE_ARGS += \ - --with-libdnet=included \ - --with-libpcre=included \ - --with-libpcap="$(STAGING_DIR)/usr" \ - --without-liblua \ - --without-zenmap - -CONFIGURE_VARS += \ - ac_cv_dnet_bsd_bpf=no \ - CXXFLAGS="$$$$CXXFLAGS -fno-builtin" - -ifeq ($(BUILD_VARIANT),ssl) - CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS += --without-openssl -endif - -define Package/nmap/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/nmap - $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/ -endef - -define Package/nmap-ssl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/nmap - $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/ -endef - -define Package/ncat/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/ -endef - -define Package/ncat-ssl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/ncat - $(CP) $(PKG_INSTALL_DIR)/usr/share/ncat/ca-bundle.crt $(1)/usr/share/ncat/ -endef - -define Package/ndiff/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndiff $(1)/usr/bin/ -endef - -define Package/nping/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nping $(1)/usr/bin/ -endef - - -$(eval $(call BuildPackage,nmap)) -$(eval $(call BuildPackage,nmap-ssl)) -$(eval $(call BuildPackage,ncat)) -$(eval $(call BuildPackage,ncat-ssl)) -$(eval $(call BuildPackage,nping)) -$(eval $(call BuildPackage,ndiff)) diff --git a/net/nmap/patches/001-fix-missing-includes.patch b/net/nmap/patches/001-fix-missing-includes.patch deleted file mode 100644 index 3985bad..0000000 --- a/net/nmap/patches/001-fix-missing-includes.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/ncat/ncat_ssl.c b/ncat/ncat_ssl.c -index ee8ca97..9ff495c 100644 ---- a/ncat/ncat_ssl.c -+++ b/ncat/ncat_ssl.c -@@ -128,7 +128,9 @@ - - #include - #include -+#include - #include -+#include - #include - #include - #include diff --git a/net/nsd/Makefile b/net/nsd/Makefile index b8bd8f9..334ba87 100644 --- a/net/nsd/Makefile +++ b/net/nsd/Makefile @@ -13,7 +13,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/nsd -PKG_MD5SUM:=a3f2a9885bc8664ba4a25c938d26a587 +PKG_HASH:=c45cd4ba2101a027e133b2be44db9378e27602e05f09a5ef25019e1ae45291af PKG_FIXUP:=autoreconf PKG_INSTALL:=1 diff --git a/net/ntpclient/Makefile b/net/ntpclient/Makefile deleted file mode 100644 index bca4b65..0000000 --- a/net/ntpclient/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ntpclient -PKG_VERSION:=2010_365 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://doolittle.icarus.com/ntpclient/ -PKG_MD5SUM:=a64689398f2df8933ee0d8da246e9eaa - -PKG_MAINTAINER:=Ted Hess - -PKG_LICENSE:=GPL-2.0 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-2010 - -include $(INCLUDE_DIR)/package.mk - -define Package/ntpclient - SUBMENU:=Time Synchronization - SECTION:=net - CATEGORY:=Network - TITLE:=NTP (Network Time Protocol) client - URL:=http://doolittle.icarus.com/ntpclient/ - DEPENDS:=+librt -endef - -define Package/ntpclient/description - NTP client for setting system time from NTP servers. -endef - -define Package/ntpclient/conffiles -/etc/config/ntpclient -endef - -MAKE_FLAGS += \ - all adjtimex - -define Package/ntpclient/install - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_DATA) ./files/ntpclient.hotplug $(1)/etc/hotplug.d/iface/20-ntpclient - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/ntpclient.config $(1)/etc/config/ntpclient - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpclient $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/adjtimex $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/rate.awk $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,ntpclient)) diff --git a/net/ntpclient/files/ntpclient.config b/net/ntpclient/files/ntpclient.config deleted file mode 100644 index 10be886..0000000 --- a/net/ntpclient/files/ntpclient.config +++ /dev/null @@ -1,23 +0,0 @@ -config ntpserver - option hostname '0.openwrt.pool.ntp.org' - option port '123' - -config ntpserver - option hostname '1.openwrt.pool.ntp.org' - option port '123' - -config ntpserver - option hostname '2.openwrt.pool.ntp.org' - option port '123' - -config ntpserver - option hostname '3.openwrt.pool.ntp.org' - option port '123' - -config ntpdrift - option freq '0' - -config ntpclient - option interval 600 - #option count 10 - #option interface wan diff --git a/net/ntpclient/files/ntpclient.hotplug b/net/ntpclient/files/ntpclient.hotplug deleted file mode 100644 index cdf18ee..0000000 --- a/net/ntpclient/files/ntpclient.hotplug +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh -# Copyright (C) 2006-2014 OpenWrt.org - -. /lib/functions.sh - -unset SERVER -unset PORT -unset INTERVAL -unset COUNT -unset INTERFACE_GLOBAL - -NTPC=`which ntpclient` - -check_server() { - local hostname - local port - local interface - [ -n "$SERVER" ] && return - config_get hostname $1 hostname - config_get port $1 port - config_get interface $1 interface - - [ -z "$interface" ] && interface=$INTERFACE_GLOBAL - - [ -n "$interface" ] && { - # $INTERFACE is passed from hotplug event - [ "$interface" = "$INTERFACE" ] || return - } - - [ -z "$hostname" ] && return - $NTPC -c 1 -p ${port:-123} -i 2 -h $hostname > /dev/null && { SERVER=$hostname; PORT=${port:-123}; } -} - -set_drift() { - config_get freq $1 freq - [ -n "$freq" ] && adjtimex -f $freq >/dev/null -} - -start_ntpclient() { - config_foreach set_drift ntpdrift - config_foreach check_server ntpserver - [ -z "$SERVER" ] && exit 0 - logger starting ntpclient - $NTPC ${COUNT:+-c $COUNT} ${INTERVAL:+-i $INTERVAL} -s -l -D -p $PORT -h $SERVER 2> /dev/null -} - -stop_ntpclient() { - logger stopping ntpclient - killall ntpclient -} - -load_settings() { - local interval - local count - local iface - - config_get interval $1 interval - config_get count $1 count - config_get interface $1 interface - - [ -n "$count" ] && COUNT=$count - [ -n "$interval" ] && INTERVAL=$interval - [ -n "$interface" ] && INTERFACE_GLOBAL=$interface -} - -config_load ntpclient -config_foreach load_settings ntpclient - -NTP_RUNNING=`ps | grep $NTPC | grep -v grep` - -case "${ACTION:-ifup}" in - ifup) - [ -z "$NTP_RUNNING" ] && start_ntpclient - ;; - ifdown) - [ -n "$NTP_RUNNING" ] && stop_ntpclient - ;; -esac diff --git a/net/ntpclient/patches/100-daemon.patch b/net/ntpclient/patches/100-daemon.patch deleted file mode 100644 index aa35f96..0000000 --- a/net/ntpclient/patches/100-daemon.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/ntpclient.c -+++ b/ntpclient.c -@@ -611,7 +611,7 @@ int main(int argc, char *argv[]) { - ntpc.cross_check=1; - - for (;;) { -- c = getopt( argc, argv, "c:" DEBUG_OPTION "f:g:h:i:lp:q:" REPLAY_OPTION "st"); -+ c = getopt( argc, argv, "c:" DEBUG_OPTION "f:g:h:i:lp:q:" REPLAY_OPTION "stD"); - if (c == EOF) break; - switch (c) { - case 'c': -@@ -660,6 +660,10 @@ int main(int argc, char *argv[]) { - (ntpc.cross_check)=0; - break; - -+ case 'D': -+ daemon(0, 0); -+ break; -+ - default: - usage(argv[0]); - exit(1); diff --git a/net/ntpd/Makefile b/net/ntpd/Makefile deleted file mode 100644 index f1e57ad..0000000 --- a/net/ntpd/Makefile +++ /dev/null @@ -1,162 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ntp -PKG_VERSION:=4.2.8p9 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ -PKG_HASH:=b724287778e1bac625b447327c9851eedef020517a3545625e9f652a90f30b72 - -PKG_LICENSE:=Unique -PKG_LICENSE_FILES:=COPYRIGHT html/copyright.html - -PKG_FIXUP:=autoreconf -PKG_LIBTOOL_PATHS:=. sntp -PKG_CHECK_FORMAT_SECURITY:=0 - -include $(INCLUDE_DIR)/package.mk - -define Package/ntpd/Default - SUBMENU:=Time Synchronization - SECTION:=net - CATEGORY:=Network - TITLE:=ISC ntp - MAINTAINER:=Peter Wagner - URL:=http://www.ntp.org/ - DEPENDS:=+libopenssl +libpthread +libcap -endef - -define Package/ntpd/Default/description - The ISC ntp suite is a collection of tools used to synchronize the - system clock with remote NTP time servers and run/monitor local NTP - servers. -endef - -define Package/ntpd -$(call Package/ntpd/Default) - TITLE+= server - USERID:=ntp=123:ntp=123 -endef - -define Package/ntpd/description -$(call Package/ntpd/Default/description) - . - This package contains the ntpd server. -endef - -define Package/ntpdate -$(call Package/ntpd/Default) - TITLE+=date -endef - -define Package/ntpdate/description -$(call Package/ntpd/Default/description) - . - This package contains ntpdate. -endef - -define Package/ntp-utils -$(call Package/ntpd/Default) - TITLE+= utilities -endef - -define Package/ntp-utils/description -$(call Package/ntpd/Default/description) - . - This package contains ntpdc, ntpq and ntptime. -endef - -define Package/ntp-keygen -$(call Package/ntpd/Default) - TITLE+=keygen - DEPENDS+= +libevent2-core -endef - -define Package/ntp-keygen/description -$(call Package/ntpd/Default/description) - . - This package contains the ntp-keygen. -endef - -define Package/ntpd/conffiles -/etc/ntp.conf -endef - -CONFIGURE_VARS += \ - ac_cv_header_md5_h=no \ - ac_cv_lib_rt_sched_setscheduler=no \ - ac_cv_header_dns_sd_h=no \ - hw_cv_func_snprintf_c99=yes \ - hw_cv_func_vsnprintf_c99=yes \ - -CONFIGURE_ARGS += \ - --disable-all-clocks \ - --disable-parse-clocks \ - --without-ntpsnmpd \ - --without-lineeditlibs \ - --enable-NMEA \ - --enable-LOCAL-CLOCK \ - --enable-SHM \ - --enable-ATOM \ - --enable-linuxcaps \ - --with-yielding-select=yes \ - --with-crypto \ - --with-openssl-incdir="$(STAGING_DIR)/usr/include" \ - --with-openssl-libdir="$(STAGING_DIR)/usr/lib" - -define Package/ntpd/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/sbin/ - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/ - $(INSTALL_BIN) ./files/ntpd.hotplug-helper $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) ./files/ntp.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd -endef - -define Package/ntpd/postinst -#!/bin/sh -[ -L "$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f "$${IPKG_INSTROOT}/usr/sbin/ntpd" -exit 0 -endef - -define Package/ntpd/postrm -#!/bin/sh -/bin/busybox ntpd -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/sbin/ntpd -exit 0 -endef - -define Package/ntpdate/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/ntpdate.init $(1)/etc/init.d/ntpdate -endef - -define Package/ntp-utils/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntptime $(1)/usr/sbin/ -endef - -define Package/ntp-keygen/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntp-keygen $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,ntpd)) -$(eval $(call BuildPackage,ntpdate)) -$(eval $(call BuildPackage,ntp-utils)) -$(eval $(call BuildPackage,ntp-keygen)) diff --git a/net/ntpd/files/ntp.conf b/net/ntpd/files/ntp.conf deleted file mode 100644 index 8bfb8e3..0000000 --- a/net/ntpd/files/ntp.conf +++ /dev/null @@ -1,26 +0,0 @@ -# use a random selection of 4 public stratum 2 servers -# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers - -#restrict default nomodify notrap noquery -#restrict default noquery - -restrict 127.0.0.1 - -driftfile /var/lib/ntp/ntp.drift - -server 0.openwrt.pool.ntp.org iburst -server 1.openwrt.pool.ntp.org iburst -server 2.openwrt.pool.ntp.org iburst -server 3.openwrt.pool.ntp.org iburst - - -# GPS(NMEA)+PPS -#server 127.127.20.0 minpoll 4 prefer -#fudge 127.127.20.0 flag3 1 flag2 0 - -# SMA PPS -#server 127.127.28.0 minpoll 4 prefer -#fudge 127.127.28.0 refid PPS flag3 1 - -#server 192.168.1.253 - diff --git a/net/ntpd/files/ntpd.hotplug b/net/ntpd/files/ntpd.hotplug deleted file mode 100644 index 975be75..0000000 --- a/net/ntpd/files/ntpd.hotplug +++ /dev/null @@ -1,10 +0,0 @@ -NAME=ntpd -CONFIG=/etc/ntp.conf -COMMAND=/sbin/$NAME - -[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && { - [ -x $COMMAND ] && [ -r $CONFIG ] && { - killall ntpd - /etc/init.d/ntpd start - } & -} diff --git a/net/ntpd/files/ntpd.hotplug-helper b/net/ntpd/files/ntpd.hotplug-helper deleted file mode 100644 index 555825c..0000000 --- a/net/ntpd/files/ntpd.hotplug-helper +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -while true -do - STATUS="$(/usr/sbin/ntpq -c 'rv 0 stratum'|awk -F '=' '{ print $2 }')" - - if [ -n "$STATUS" ] && [ "$STATUS" -lt "16" ] - then - ACTION="stratum" /sbin/hotplug-call ntp - exit 0 - fi - sleep 10 -done diff --git a/net/ntpd/files/ntpd.init b/net/ntpd/files/ntpd.init deleted file mode 100644 index 55dd3e8..0000000 --- a/net/ntpd/files/ntpd.init +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=65 -STOP=65 - -USE_PROCD=1 -PROG=/sbin/ntpd -HOTPLUG_HELPER=/usr/sbin/ntpd.hotplug-helper - -start_service() { - mkdir -p /var/lib/ntp - chown -R ntp:ntp /var/lib/ntp - - procd_open_instance - procd_set_param command $PROG -g -u ntp:ntp -p /var/run/ntpd.pid -n - procd_close_instance - - procd_open_instance - procd_set_param command $HOTPLUG_HELPER - procd_close_instance -} diff --git a/net/ntpd/files/ntpdate.init b/net/ntpd/files/ntpdate.init deleted file mode 100644 index 2f33210..0000000 --- a/net/ntpd/files/ntpdate.init +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2008 OpenWrt.org - -START=60 - -STEP_SERVERS="0.openwrt.pool.ntp.org 1.openwrt.pool.ntp.org 2.openwrt.pool.ntp.org" -TIMEOUT="2" # in seconds - -start() { - for s in $STEP_SERVERS ; do - /usr/sbin/ntpdate -s -b -u -t "$TIMEOUT" "$s" && break - done -} diff --git a/net/ntripcaster/Makefile b/net/ntripcaster/Makefile deleted file mode 100644 index 7828a25..0000000 --- a/net/ntripcaster/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2011 segal.ubi.pt -# Copyright (C) 2010-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ntripcaster -PKG_VERSION:=0.1.5 - -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/nunojpg/ntripcaster.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=03878920195cf854b38a1ea424f1cae57353fa87 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_LICENSE:=GPL-2.0+ - -PKG_MAINTAINER:=Nuno Goncalves - -include $(INCLUDE_DIR)/package.mk - -define Package/ntripcaster - SECTION:=net - CATEGORY:=Network - SUBMENU:=NTRIP - TITLE:=Standard Ntrip Broadcaster - URL:=http://igs.bkg.bund.de/ntrip/download - DEPENDS:=+libpthread -endef - -define Package/ntripcaster/description - BKG Standard Ntrip Broadcaster -endef - -define Package/ntripcaster/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ntripcaster $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/ntripcaster/conf - $(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/ntripcaster.conf.dist $(1)/usr/share/ntripcaster/conf/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/sourcetable.dat.dist $(1)/usr/share/ntripcaster/conf/ -endef - -$(eval $(call BuildPackage,ntripcaster)) diff --git a/net/ntripclient/Makefile b/net/ntripclient/Makefile deleted file mode 100644 index f0d92d5..0000000 --- a/net/ntripclient/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2011 segal.ubi.pt -# Copyright (C) 2010-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ntripclient -PKG_VERSION:=1.5.0 - -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/nunojpg/ntripclient.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=dcfb2cb3e6f31b7291a94e7f86379c78ffc0d44e -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_LICENSE:=GPL-2.0+ - -PKG_MAINTAINER:=Nuno Goncalves - -include $(INCLUDE_DIR)/package.mk - -define Package/ntripclient - SECTION:=net - CATEGORY:=Network - SUBMENU:=NTRIP - TITLE:=Ntrip Version 2.0 Command Line Client - URL:=http://igs.bkg.bund.de/ntrip/download -endef - -define Package/ntripclient/description - Ntrip Version 2.0 Command Line Client, reading from Ntrip Version 1.0 or 2.0 Caster -endef - -MAKE_FLAGS += \ - OPTS="$(TARGET_CFLAGS)" - -define Package/ntripclient/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntripclient $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,ntripclient)) diff --git a/net/ntripclient/patches/100-musl-compat.patch b/net/ntripclient/patches/100-musl-compat.patch deleted file mode 100644 index 10f690f..0000000 --- a/net/ntripclient/patches/100-musl-compat.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/ntripclient.c -+++ b/ntripclient.c -@@ -44,6 +44,7 @@ - #include - #include - #include -+ #include - #include - #include - #include diff --git a/net/ntripserver/Makefile b/net/ntripserver/Makefile deleted file mode 100644 index a3e3cf9..0000000 --- a/net/ntripserver/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2011 segal.ubi.pt -# Copyright (C) 2010-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ntripserver -PKG_VERSION:=1.5.1 - -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/nunojpg/ntripserver.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=c3034ab575e8442222eb8c2ee9e224cac99cfa6d -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_LICENSE:=GPL-2.0+ - -PKG_MAINTAINER:=Nuno Goncalves - -include $(INCLUDE_DIR)/package.mk - -define Package/ntripserver - SECTION:=net - CATEGORY:=Network - SUBMENU:=NTRIP - TITLE:=Ntrip Version 2.0 Command Line Server - URL:=http://igs.bkg.bund.de/ntrip/download -endef - -define Package/ntripserver/description - Ntrip Version 2.0 Command Line Server, reading from SISNeT Server, TCP/UDP IP - Port, Serial port, or NtripCaster to support an Ntrip Version 1.0 or 2.0 Caster -endef - -MAKE_FLAGS += \ - OPTS="$(TARGET_CFLAGS)" - -define Package/ntripserver/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntripserver $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,ntripserver)) diff --git a/net/nut/Config.in b/net/nut/Config.in deleted file mode 100644 index b48102f..0000000 --- a/net/nut/Config.in +++ /dev/null @@ -1,100 +0,0 @@ - config NUT_SERVER - depends on PACKAGE_nut - bool "Include server components (upsd)" - help - upsd is responsible for serving the data from the drivers to the - clients. It connects to each driver and maintains a local cache of the - current state. Queries from the clients are served from this cache, so - delays are minimal. This program is essential, and must be running at - all times to actually make any use out of the drivers and clients. - default y - - config NUT_CLIENTS_UPSC - depends on PACKAGE_nut - bool "Include command line client (upsc)" - help - upsc is provided as a quick way to poll the status of a UPS server. It - can be used inside shell scripts and other programs that need UPS data - but don't want to include the full interface. - default y - - config NUT_CLIENTS_UPSLOG - depends on PACKAGE_nut - bool "Include logging client (upslog)" - help - upslog is a daemon that will poll a UPS at periodic intervals, fetch the - variables that interest you, format them, and write them to a file. - default n - - config NUT_CLIENTS_UPSCMD - depends on PACKAGE_nut - bool "Include UPS controller (upscmd)" - help - upscmd allows you to invoke "instant commands" in your UPS hardware. Not - all hardware supports this, so check the list with -l to see if anything - will work on your equipment. On hardware that supports it, you can use - this program to start and stop battery tests, invoke a front panel test - (beep!), turn the load on or off, and more. - default n - - config NUT_CLIENTS_UPSRW - depends on PACKAGE_nut - bool "Include UPS variable editor (upsrw)" - help - upsrw allows you to view and change the read/write variables inside your - UPS. It sends commands via the upsd to your driver, which configures the - hardware for you. The list of variables that allow you to change their - values is based on the capabilities of your UPS equipment. Not all - models support this feature. Typically, cheaper hardware does not - support any of them. - default n - - config NUT_CLIENTS_UPSMON - depends on PACKAGE_nut - bool "Include monitor and shutdown controller (upsmon)" - help - upsmon is the client process that is responsible for the most important - part of UPS monitoring--shutting down the system when the power goes - out. It can call out to other helper programs for notification purposes - during power events. upsmon can monitor multiple systems using a single - process. Every UPS that is defined in the upsmon.conf configuration file - is assigned a power value and a type (slave or master). - default y - - config NUT_CLIENTS_UPSSCHED - depends on NUT_CLIENTS_UPSMON - bool "Include helper for triggering events from upsmon (upssched)" - help - upssched was created to allow users to execute programs at times relative - to events being monitored by upsmon. The original purpose was to allow - for a shutdown to occur after some fixed period on battery, but there are - other uses that are possible. - You can alternatively write your own script and save some space. - default n - - config NUT_SSL - depends on PACKAGE_nut - bool "Build with support for OpenSSL" - help - SSL allows sessions between upsd and clients to be encrypted and can - also be used to authenticate servers. This means that stealing port - 3493 from upsd will no longer net you interesting passwords. SSL is - available via OpenSSL on OpenWRT (NSS doesn't seem to work). If you - are happy with using passwords to authenticate clients, you can save - some space and build NUT without SSL support. - default n - - config NUT_DRIVER_USB - depends on PACKAGE_nut - bool "Build with support for USB drivers" - help - If you have a UPS connected via USB, select this. - default y - - config NUT_DRIVER_SNMP - depends on PACKAGE_nut - bool "Build with support for SNMP drivers" - help - If you have a UPS you can connect to via SNMP, select this. - default n - diff --git a/net/nut/Makefile b/net/nut/Makefile deleted file mode 100644 index a6ed1c6..0000000 --- a/net/nut/Makefile +++ /dev/null @@ -1,352 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=nut -PKG_VERSION:=2.7.4 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/ -PKG_MD5SUM:=3ba53656933d7471f95140b32a5b8d5c -PKG_MAINTAINER:=Martin Rowe -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=LICENSE-GPL2 - -PKG_BUILD_DIR:=$(BUILD_DIR)/nut-$(PKG_VERSION) -PKG_INSTALL:=1 - -PKG_CONFIG_DEPENDS:= \ - CONFIG_NUT_CLIENTS_UPSC \ - CONFIG_NUT_CLIENTS_UPSCMD \ - CONFIG_NUT_CLIENTS_UPSLOG \ - CONFIG_NUT_CLIENTS_UPSMON \ - CONFIG_NUT_CLIENTS_UPSRW \ - CONFIG_NUT_CLIENTS_UPSSCHED \ - CONFIG_NUT_DRIVER_SNMP \ - CONFIG_NUT_DRIVER_USB \ - CONFIG_NUT_SERVER \ - CONFIG_NUT_SSL - -include $(INCLUDE_DIR)/package.mk - -define Package/nut/Default - SECTION:=net - CATEGORY:=Network - URL:=http://www.networkupstools.org/ - DEPENDS:=nut -endef - -define Package/nut/description -Network UPS Tools (NUT) is a client/server monitoring system that -allows computers to share uninterruptible power supply (UPS) and -power distribution unit (PDU) hardware. Clients access the hardware -through the server, and are notified whenever the power status -changes. -endef - -define Package/nut - $(call Package/nut/Default) - TITLE:=Network UPS Tools - DEPENDS:= \ - +libpthread \ - +NUT_DRIVER_SNMP:libnetsnmp \ - +NUT_DRIVER_USB:libusb-compat \ - +NUT_SSL:libopenssl - MENU:=1 -endef - -define Package/nut/config - source "$(SOURCE)/Config.in" -endef - -define Package/nut/conffiles -/etc/nut/nut.conf -$(if $(CONFIG_NUT_CLIENTS_UPSMON),/etc/nut/upsmon.conf) -$(if $(CONFIG_NUT_CLIENTS_UPSSCHED),/etc/nut/upssched.conf) -$(if $(CONFIG_NUT_SERVER),/etc/nut/ups.conf) -$(if $(CONFIG_NUT_SERVER),/etc/nut/upsd.conf) -$(if $(CONFIG_NUT_SERVER),/etc/nut/upsd.users) -endef - -define Package/nut/install - $(INSTALL_DIR) $(1)/etc/nut - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/nut.conf.sample $(1)/etc/nut/nut.conf - $(if $(or $(CONFIG_NUT_CLIENTS_UPSC),\ - $(CONFIG_NUT_CLIENTS_UPSCMD),\ - $(CONFIG_NUT_CLIENTS_LOG),\ - $(CONFIG_NUT_CLIENTS_UPSRW),\ - $(CONFIG_NUT_CLIENTS_UPSMON),\ - $(CONFIG_NUT_CLIENTS_UPSSCHED)),$(CP) $(PKG_INSTALL_DIR)/usr/lib/libupsclient.so* $(1)/usr/lib/) - $(if $(or $(CONFIG_NUT_SERVER),\ - $(CONFIG_NUT_CLIENTS_UPSMON)),$(INSTALL_DIR) $(1)/etc/init.d) - $(if $(CONFIG_NUT_SERVER),$(INSTALL_DIR) $(1)/lib/nut) - $(if $(CONFIG_NUT_SERVER),$(INSTALL_DIR) $(1)/usr/share/nut) - $(if $(CONFIG_NUT_SERVER),$(CP) ./files/nut-server.init $(1)/etc/init.d/) - $(if $(CONFIG_NUT_SERVER),$(CP) $(PKG_INSTALL_DIR)/usr/sbin/upsd $(1)/usr/sbin) - $(if $(CONFIG_NUT_SERVER),$(CP) $(PKG_INSTALL_DIR)/usr/sbin/upsdrvctl $(1)/usr/sbin) - $(if $(CONFIG_NUT_SERVER),$(CP) $(PKG_INSTALL_DIR)/usr/share/nut/cmdvartab $(1)/usr/share/nut/) - $(if $(CONFIG_NUT_SERVER),$(CP) $(PKG_INSTALL_DIR)/usr/share/nut/driver.list $(1)/usr/share/nut/) - $(if $(CONFIG_NUT_SERVER),$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/ups.conf.sample $(1)/etc/nut/ups.conf) - $(if $(CONFIG_NUT_SERVER),$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsd.conf.sample $(1)/etc/nut/upsd.conf) - $(if $(CONFIG_NUT_SERVER),$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsd.users.sample $(1)/etc/nut/upsd.users) - $(if $(CONFIG_NUT_CLIENTS_UPSC),$(CP) $(PKG_INSTALL_DIR)/usr/bin/upsc $(1)/usr/bin/) - $(if $(CONFIG_NUT_CLIENTS_UPSCMD),$(CP) $(PKG_INSTALL_DIR)/usr/bin/upscmd $(1)/usr/bin/) - $(if $(CONFIG_NUT_CLIENTS_UPSLOG),$(CP) $(PKG_INSTALL_DIR)/usr/bin/upslog $(1)/usr/bin/) - $(if $(CONFIG_NUT_CLIENTS_UPSRW),$(CP) $(PKG_INSTALL_DIR)/usr/bin/upsrw $(1)/usr/bin/) - $(if $(CONFIG_NUT_CLIENTS_UPSMON),$(CP) ./files/nut-monitor.init $(1)/etc/init.d/) - $(if $(CONFIG_NUT_CLIENTS_UPSMON),$(CP) $(PKG_INSTALL_DIR)/usr/sbin/upsmon $(1)/usr/sbin/) - $(if $(CONFIG_NUT_CLIENTS_UPSMON),$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsmon.conf.sample $(1)/etc/nut/upsmon.conf) - $(if $(CONFIG_NUT_CLIENTS_UPSSCHED),$(CP) $(PKG_INSTALL_DIR)/usr/bin/upssched-cmd $(1)/usr/bin/) - $(if $(CONFIG_NUT_CLIENTS_UPSSCHED),$(CP) $(PKG_INSTALL_DIR)/usr/sbin/upssched $(1)/usr/sbin/) - $(if $(CONFIG_NUT_CLIENTS_UPSSCHED),$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upssched.conf.sample $(1)/etc/nut/upssched.conf) -endef - -define Package/nut-web-cgi - $(call Package/nut/Default) - TITLE+= Web CGI interface - DEPENDS+=+libgd -endef - -define Package/nut-web-cgi/description -The CGI programs are clients that run through your web server. -They allow you to see UPS status and perform certain administrative -commands from any web browser. Javascript and cookies are not required. -endef - -define Package/nut-web-cgi/conffiles -/etc/nut/hosts.conf -/etc/nut/upsset.conf -/etc/nut/upsstats.html -/etc/nut/upsstats-single.html -endef - -define Package/nut-web-cgi/install - $(INSTALL_DIR) $(1)/etc/nut - $(INSTALL_DIR) $(1)/usr/share/www/cgi-bin - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/hosts.conf.sample $(1)/etc/nut/hosts.conf - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsset.conf.sample $(1)/etc/nut/upsset.conf - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsstats.html.sample $(1)/etc/nut/upsstats.html - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/nut/upsstats-single.html.sample $(1)/etc/nut/upsstats-single.html - $(CP) $(PKG_INSTALL_DIR)/usr/share/www/nut $(1)/usr/share/www/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/www/cgi-bin/nut $(1)/usr/share/www/cgi-bin/ -endef - -define Package/nut-avahi-service - $(call Package/nut/Default) - TITLE+= (Avahi service) - DEPENDS+=+avahi-daemon -endef - -define Package/nut-avahi-service/description -This package contains the service definition for announcing the -attached UPS via mDNS/DNS-SD. -endef - -define Package/nut-avahi-service/conffiles -/etc/avahi/services/nut.service -endef - -define Package/nut-avahi-service/install - $(INSTALL_DIR) $(1)/etc/avahi/services - $(INSTALL_CONF) ./files/nut.service $(1)/etc/avahi/services/ -endef - -# Dealing with all of the drivers is very repetitive, but the previous -# maintainer had a neat solution which just needed some tweaking. -define DriverPackage - define Package/nut-driver-$(2) - $(call Package/nut/Default) - TITLE:=$(2) (NUT $(1) driver) - $(if $(filter $(1),snmp),DEPENDS+= @NUT_DRIVER_SNMP) - $(if $(filter $(1),usb),DEPENDS+= @NUT_DRIVER_USB) - endef - # Deliberately empty description in order to trigger a build failure. - # It should be overridden by the list below, and when updating to a - # new version of nut we will need to provide descriptions for any new - # drivers. - define Package/nut-driver-$(2)/description - - endef - define Package/nut-driver-$(2)/install - $(INSTALL_DIR) $$(1)/lib/nut - $(CP) $$(PKG_INSTALL_DIR)/lib/nut/$(2) $$(1)/lib/nut/ - $(if $(filter $(2),clone),$(CP) $$(PKG_INSTALL_DIR)/lib/nut/$(2)-outlet $$(1)/lib/nut/) - endef -endef -define DriverDescription - define Package/nut-driver-$(2)/description - $(3) - endef -endef -# These lists are lifted *directly* from drivers/Makefile.am in the nut -# source tree. This it to make it simpler to keep in sync when updating -# to a newer version of nut. Do not edit this manually. -# -# DO NOT EDIT (except to update with a fresh cut/paste)! -SERIAL_DRIVERLIST = al175 bcmxcp belkin belkinunv bestfcom \ - bestfortress bestuferrups bestups dummy-ups etapro everups \ - gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys \ - oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino \ - safenet skel solis tripplite tripplitesu upscode2 victronups powerpanel \ - blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser \ - nutdrv_qx -SNMP_DRIVERLIST = snmp-ups -USB_LIBUSB_DRIVERLIST = usbhid-ups bcmxcp_usb tripplite_usb \ - blazer_usb richcomm_usb riello_usb \ - nutdrv_atcl_usb \ - nutdrv_qx -# END: DO NOT EDIT! -SERIAL_DRIVERLIST_IGNORE:=skel clone-outlet nutdrv_qx -# nutdrv_qx can be either USB or serial. Given most routers have USB -# instead of serial ports, and not wanting two identical packages with -# different names that conflict with each other, only the option for the -# driver with USB bindings is provided. If you really want to save that -# tiny bit of space and build it without USB support, remove nutdrv_qx -# from the previous line. - -$(foreach d,$(filter-out $(SERIAL_DRIVERLIST_IGNORE),$(SERIAL_DRIVERLIST)),$(eval $(call DriverPackage,serial,$(d)))) -$(foreach d,$(SNMP_DRIVERLIST),$(eval $(call DriverPackage,snmp,$(d)))) -$(foreach d,$(USB_LIBUSB_DRIVERLIST),$(eval $(call DriverPackage,usb,$(d)))) - -$(eval $(call DriverDescription,serial,al175,\ - Driver for Eltek UPS models with AL175 alarm module)) -$(eval $(call DriverDescription,serial,bcmxcp,\ - Driver for UPSes supporting the serial BCM/XCP protocol)) -$(eval $(call DriverDescription,serial,belkin,\ - Driver for Belkin serial UPS equipment)) -$(eval $(call DriverDescription,serial,belkinunv,\ - Driver for Belkin "Universal UPS" and compatible)) -$(eval $(call DriverDescription,serial,bestfcom,\ - Driver for Best Power Fortress/Ferrups)) -$(eval $(call DriverDescription,serial,bestfortress,\ - Driver for old Best Fortress UPS equipment)) -$(eval $(call DriverDescription,serial,bestuferrups,\ - Driver for Best Power Micro-Ferrups)) -$(eval $(call DriverDescription,serial,bestups,\ - Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment)) -$(eval $(call DriverDescription,serial,dummy-ups,\ - Driver for multi-purpose UPS emulation)) -$(eval $(call DriverDescription,serial,etapro,\ - Driver for ETA UPS equipment)) -$(eval $(call DriverDescription,serial,everups,\ - Driver for Ever UPS models)) -$(eval $(call DriverDescription,serial,gamatronic,\ - Driver for Gamatronic UPS equipment)) -$(eval $(call DriverDescription,serial,genericups,\ - Driver for contact-closure UPS equipment)) -$(eval $(call DriverDescription,serial,isbmex,\ - Driver for ISBMEX UPS equipment)) -$(eval $(call DriverDescription,serial,liebert,\ - Driver for Liebert contact-closure UPS equipment)) -$(eval $(call DriverDescription,serial,liebert-esp2,\ - Driver for Liebert UPS, using the ESP-II serial protocol)) -$(eval $(call DriverDescription,serial,masterguard,\ - Driver for Masterguard UPS equipment)) -$(eval $(call DriverDescription,serial,metasys,\ - Driver for Meta System UPS equipment)) -$(eval $(call DriverDescription,serial,oldmge-shut,\ - Driver for SHUT Protocol UPS equipment, deprecated, use mge-shut)) -$(eval $(call DriverDescription,serial,mge-utalk,\ - Driver for MGE UPS SYSTEMS UTalk protocol equipment)) -$(eval $(call DriverDescription,serial,microdowell,\ - Driver for Microdowell Enterprise UPS series)) -$(eval $(call DriverDescription,serial,mge-shut,\ - Driver for SHUT Protocol UPS equipment)) -$(eval $(call DriverDescription,serial,oneac,\ - Driver for Oneac UPS equipment)) -$(eval $(call DriverDescription,serial,optiups,\ - Driver for Opti-UPS (Viewsonic) UPS and Zinto D (ONLINE-USV) equipment)) -$(eval $(call DriverDescription,serial,powercom,\ - Driver for serial Powercom/Trust/Advice UPS equipment)) -$(eval $(call DriverDescription,serial,rhino,\ - Driver for Brazilian Microsol RHINO UPS equipment)) -$(eval $(call DriverDescription,serial,safenet,\ - Driver for SafeNet compatible UPS equipment)) -$(eval $(call DriverDescription,serial,solis,\ - Driver for Brazilian Microsol SOLIS UPS equipment)) -$(eval $(call DriverDescription,serial,tripplite,\ - Driver for Tripp-Lite SmartPro UPS equipment)) -$(eval $(call DriverDescription,serial,tripplitesu,\ - Driver for Tripp-Lite SmartOnline (SU) UPS equipment)) -$(eval $(call DriverDescription,serial,upscode2,\ - Driver for UPScode II compatible UPS equipment)) -$(eval $(call DriverDescription,serial,victronups,\ - Driver for IMV/Victron UPS unit Match, Match Lite, NetUps)) -$(eval $(call DriverDescription,serial,powerpanel,\ - Driver for PowerPanel Plus compatible UPS equipment)) -$(eval $(call DriverDescription,serial,blazer_ser,\ - Driver for Megatec/Q1 protocol serial based UPS equipment)) -$(eval $(call DriverDescription,serial,clone,\ - UPS driver clone)) -$(eval $(call DriverDescription,serial,ivtscd,\ - Driver for the IVT Solar Controller Device)) -$(eval $(call DriverDescription,serial,apcsmart,\ - Driver for American Power Conversion Smart Protocol UPS equipment)) -$(eval $(call DriverDescription,serial,apcsmart-old,\ - Driver for American Power Conversion Smart Protocol UPS equipment)) -$(eval $(call DriverDescription,serial,apcupsd-ups,\ - Driver for apcupsd client access)) -$(eval $(call DriverDescription,serial,riello_ser,\ - Driver for Riello UPS Protocol UPS equipment)) -$(eval $(call DriverDescription,snmp,snmp-ups,\ - Multi-MIB Driver for SNMP UPS equipment)) -$(eval $(call DriverDescription,usb,usbhid-ups,\ - Driver for USB/HID UPS equipment)) -$(eval $(call DriverDescription,usb,bcmxcp_usb,\ - Experimental driver for UPSes supporting the BCM/XCP protocol over USB)) -$(eval $(call DriverDescription,usb,tripplite_usb,\ - Driver for older Tripp Lite USB UPSes (not PDC HID))) -$(eval $(call DriverDescription,usb,blazer_usb,\ - Driver for Megatec/Q1 protocol USB based UPS equipment)) -$(eval $(call DriverDescription,usb,richcomm_usb,\ - Driver for UPS equipment using Richcomm dry-contact to USB solution)) -$(eval $(call DriverDescription,usb,riello_usb,\ - Driver for Riello UPS Protocol UPS equipment via USB)) -$(eval $(call DriverDescription,usb,nutdrv_atcl_usb,\ - Driver for ATCL FOR UPS equipment)) -$(eval $(call DriverDescription,usb,nutdrv_qx,\ - Driver for Q* protocol serial and USB based UPS equipment)) - -CONFIGURE_ARGS += \ - --sysconfdir=/etc/nut \ - --datadir=/usr/share/nut \ - --with-dev \ - --$(if $(CONFIG_NUT_DRIVER_USB),with,without)-usb \ - --without-avahi \ - --$(if $(CONFIG_NUT_DRIVER_SNMP),with,without)-snmp \ - --without-neon \ - --without-powerman \ - --without-ipmi \ - --without-freeipmi \ - --$(if $(CONFIG_NUT_SSL),with,without)-ssl $(if $(CONFIG_NUT_SSL),--with-openssl) \ - --without-libltdl \ - --$(if $(CONFIG_PACKAGE_nut-web-cgi),with,without)-cgi \ - --with-statepath=/var/run \ - --with-drvpath=/lib/nut \ - --with-cgipath=/usr/share/www/cgi-bin/nut \ - --with-htmlpath=/usr/share/www/nut \ - --with-user=root \ - --with-group=root - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/ -endef - -$(eval $(call BuildPackage,nut)) -$(eval $(call BuildPackage,nut-web-cgi)) -$(eval $(call BuildPackage,nut-avahi-service)) -$(foreach d,$(filter-out $(SERIAL_DRIVERLIST_IGNORE),$(SERIAL_DRIVERLIST)),$(eval $(call BuildPackage,nut-driver-$(d)))) -$(foreach d,$(SNMP_DRIVERLIST),$(eval $(call BuildPackage,nut-driver-$(d)))) -$(foreach d,$(USB_LIBUSB_DRIVERLIST),$(eval $(call BuildPackage,nut-driver-$(d)))) diff --git a/net/nut/files/nut-monitor.init b/net/nut/files/nut-monitor.init deleted file mode 100755 index e9fdb33..0000000 --- a/net/nut/files/nut-monitor.init +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=60 -USE_PROCD=1 - -restart() { - stop_service - start_service -} - -start_service() { - upsmon -p -} - -stop_service() { - upsmon -c stop -} - -reload_service() { - upsmon -c reload -} diff --git a/net/nut/files/nut-server.init b/net/nut/files/nut-server.init deleted file mode 100755 index f9971be..0000000 --- a/net/nut/files/nut-server.init +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=50 -USE_PROCD=1 - -restart() { - stop_service - start_service -} - -start_service() { - upsdrvctl start - upsd -} - -stop_service() { - upsd -c stop - upsdrvctl stop -} - -reload_service() { - upsd -c reload -} diff --git a/net/nut/files/nut.service b/net/nut/files/nut.service deleted file mode 100644 index 5ad6b31..0000000 --- a/net/nut/files/nut.service +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - %h - - - _nut._tcp - 3493 - - - diff --git a/net/obfsproxy/Makefile b/net/obfsproxy/Makefile deleted file mode 100644 index 51facf5..0000000 --- a/net/obfsproxy/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=obfsproxy -PKG_VERSION:=0.2.13 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://pypi.python.org/packages/source/o/obfsproxy -PKG_MD5SUM:=f596aeeda7bf03cdf0e78e68e6e7ac9f - -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Jeffery To - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/obfsproxy - SECTION:=net - CATEGORY:=Network - TITLE:=A pluggable transport proxy written in Python - URL:=https://www.torproject.org/projects/obfsproxy.html.en - DEPENDS:=+python-light +python-crypto +python-pyptlib +python-setuptools +python-yaml +twisted -endef - -define Package/obfsproxy/description -obfsproxy is a tool that attempts to circumvent censorship, by -transforming the Tor traffic between the client and the bridge. This -way, censors, who usually monitor traffic between the client and the -bridge, will see innocent-looking transformed traffic instead of the -actual Tor traffic. -endef - -define Package/obfsproxy/conffiles -/etc/config/obfsproxy -endef - -define Build/Compile - $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)") -endef - -define PyPackage/obfsproxy/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/obfsproxy $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/obfsproxy.conf $(1)/etc/config/obfsproxy - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/obfsproxy.init $(1)/etc/init.d/obfsproxy -endef - -$(eval $(call PyPackage,obfsproxy)) -$(eval $(call BuildPackage,obfsproxy)) diff --git a/net/obfsproxy/files/obfsproxy.conf b/net/obfsproxy/files/obfsproxy.conf deleted file mode 100644 index 1eed142..0000000 --- a/net/obfsproxy/files/obfsproxy.conf +++ /dev/null @@ -1,57 +0,0 @@ -# To use Obfsproxy with Tor, follow the instructions at: -# -# https://www.torproject.org/projects/obfsproxy-instructions.html.en -# -# instead of setting up a separate instance of Obfsproxy. - -config obfsproxy 'obfsproxy' - # Set to 1 to enable this instance - option enabled 0 - - # One of: managed, dummy, b64, obfs2, obfs3, scramblesuit - option transport 'scramblesuit' - - # Shared secret / password - # For obfs2 (as the shared secret parameter) and scramblesuit only - option password 'EXAMPLEPASSWORDNOTREAL' - - # One of: server, ext_server, client, socks - option mode 'socks' - - # Destination address - # Required for all modes except 'socks' - #option dest_host '0.0.0.0' - #option dest_port '80' - - # Extended ORPort authentication cookie file location - # Required for 'ext_server' mode - #option ext_cookie_file '' - - # Listener address - option listen_host '127.0.0.1' - option listen_port '8080' - - # Set to log to a file instead of syslog - #option log_file '/var/log/obfsproxy.log' - - # Minimum logging severity - # One of: error, warning, info, debug - #option log_min_severity 'info' - - # Set to 1 to disable logging - #option no_log 0 - - # Set to 1 to disable safe (scrubbed address) logging - #option no_safe_logging 0 - - # Run as a different user - #option user 'nobody' - - # Outgoing proxy - # proxy_scheme is one of: socks4a, socks5, http - # txsocksx is required for socks4a or socks5 - #option proxy_scheme '' - #option proxy_username '' - #option proxy_password '' - #option proxy_host '' - #option proxy_port '' diff --git a/net/obfsproxy/files/obfsproxy.init b/net/obfsproxy/files/obfsproxy.init deleted file mode 100644 index 4901c07..0000000 --- a/net/obfsproxy/files/obfsproxy.init +++ /dev/null @@ -1,158 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2016 OpenWrt.org - -START=80 -STOP=20 -USE_PROCD=1 - -PROG=/usr/bin/obfsproxy - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}" -} - -append_bool() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get_bool val "$cfg" "$var" "$def" - [ "$val" = 1 ] && procd_append_param command "$opt" -} - -append_plain() { - procd_append_param command "$1" -} - -append_param() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param "$opt" "${val:-$def}" -} - -append_proxy_spec() { - local cfg="$1" - local scheme_var="$2" - local username_var="$3" - local password_var="$4" - local host_var="$5" - local port_var="$6" - local opt="$7" - local def="$8" - local scheme - local username - local password - local host - local port - local login - local val - - config_get scheme "$cfg" "$scheme_var" - config_get username "$cfg" "$username_var" - config_get password "$cfg" "$password_var" - config_get host "$cfg" "$host_var" - config_get port "$cfg" "$port_var" - [ "$username" ] && login="$username${password:+:$password}@" - [ -n "$scheme" -a -n "$host" -a -n "$port" ] && val="$scheme://$login$host:$port" - [ -n "$val" -o -n "$def" ] && procd_append_param command "$opt" "${val:-$def}" -} - -append_host_port() { - local cfg="$1" - local host_var="$2" - local port_var="$3" - local opt="$4" - local def="$5" - local host - local port - local val - - config_get host "$cfg" "$host_var" - config_get port "$cfg" "$port_var" - [ -n "$host" -a -n "$port" ] && val="$host:$port" - [ -n "$val" -o -n "$def" ] && { - [ "$opt" ] && procd_append_param command "$opt" - procd_append_param command "${val:-$def}" - } -} - -start_instance() { - local cfg="$1" - local lib_dir="/var/lib/obfsproxy/$cfg" - local redirect=0 - local enabled - local user - local transport - local password - local log_min_severity - - config_get_bool enabled "$cfg" 'enabled' '0' - [ "$enabled" = 0 ] && return 1 - - config_get user "$cfg" 'user' 'root' - config_get transport "$cfg" 'transport' - [ "$transport" = "scramblesuit" ] && config_get password "$cfg" 'password' - - [ -d "$lib_dir" ] || { - mkdir -m 0755 -p "$lib_dir/data" - chmod -R 0700 "$lib_dir" - } - [ "$password" ] && { - echo "$password" > "$lib_dir/secret" - chmod 0600 "$lib_dir/secret" - } - chown -R "$user:" "$lib_dir" - - config_get log_min_severity "$cfg" 'log_min_severity' - [ "$log_min_severity" = "debug" ] && redirect=1 - - procd_open_instance - - procd_set_param command "$PROG" --data-dir "$lib_dir/data" --syslog "obfsproxy($cfg)" - - append_arg "$cfg" log_file "--log-file" - append_arg "$cfg" log_min_severity "--log-min-severity" - append_bool "$cfg" no_log "--no-log" - append_bool "$cfg" no_safe_logging "--no-safe-logging" - append_proxy_spec "$cfg" proxy_scheme proxy_username proxy_password proxy_host proxy_port "--proxy" - - append_param "$cfg" transport command - [ "$transport" = "obfs2" ] && append_arg "$cfg" password "--shared-secret" - [ "$password" ] && procd_append_param command "--password-file" "$lib_dir/secret" - - append_param "$cfg" mode command - append_host_port "$cfg" dest_host dest_port "--dest" - append_arg "$cfg" ext_cookie_file "--ext-cookie-file" - - append_host_port "$cfg" listen_host listen_port - - procd_set_param respawn - procd_set_param stdout $redirect - procd_set_param stderr $redirect - append_param "$cfg" user user - - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger obfsproxy -} - -start_service() { - config_load obfsproxy - config_foreach start_instance obfsproxy -} diff --git a/net/obfsproxy/patches/001-exclude-tests.patch b/net/obfsproxy/patches/001-exclude-tests.patch deleted file mode 100644 index 445c554..0000000 --- a/net/obfsproxy/patches/001-exclude-tests.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup.py b/setup.py -index 2353a29..9d2a9a9 100644 ---- a/setup.py -+++ b/setup.py -@@ -21,7 +21,7 @@ setup( - version=versioneer.get_version(), - cmdclass=versioneer.get_cmdclass(), - -- packages = find_packages(), -+ packages = find_packages(exclude=['*.test', '*.test.*']), - entry_points = { - 'console_scripts': [ - 'obfsproxy = obfsproxy.pyobfsproxy:run' diff --git a/net/obfsproxy/patches/002-fix-python-path.patch b/net/obfsproxy/patches/002-fix-python-path.patch deleted file mode 100644 index 4a8f9ac..0000000 --- a/net/obfsproxy/patches/002-fix-python-path.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/setup.py b/setup.py -index 2353a29..8d3d56d 100644 ---- a/setup.py -+++ b/setup.py -@@ -27,6 +27,11 @@ setup( - 'obfsproxy = obfsproxy.pyobfsproxy:run' - ] - }, -+ options = { -+ 'build_scripts': { -+ 'executable': '/usr/bin/python' -+ }, -+ }, - - install_requires = [ - 'setuptools', diff --git a/net/obfsproxy/patches/003-remove-argparse-dependency-test.patch b/net/obfsproxy/patches/003-remove-argparse-dependency-test.patch deleted file mode 100644 index 20fe481..0000000 --- a/net/obfsproxy/patches/003-remove-argparse-dependency-test.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/setup.py b/setup.py -index 2353a29..e04c5f5 100644 ---- a/setup.py -+++ b/setup.py -@@ -32,7 +32,6 @@ setup( - 'setuptools', - 'PyCrypto', - 'Twisted', -- 'argparse', - 'pyptlib >= 0.0.6', - 'pyyaml' - ], diff --git a/net/obfsproxy/patches/004-add-syslog-support.patch b/net/obfsproxy/patches/004-add-syslog-support.patch deleted file mode 100644 index b7240cb..0000000 --- a/net/obfsproxy/patches/004-add-syslog-support.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/obfsproxy/common/log.py b/obfsproxy/common/log.py -index bb30296..79193d2 100644 ---- a/obfsproxy/common/log.py -+++ b/obfsproxy/common/log.py -@@ -1,5 +1,6 @@ - """obfsproxy logging code""" - import logging -+import logging.handlers - import sys - - from twisted.python import log -@@ -50,6 +51,18 @@ class ObfsLogger(object): - - self.obfslogger.addHandler(log_handler) - -+ def set_syslog(self, progname): -+ """Set up our logger so that it starts logging to syslog instead.""" -+ -+ # remove the default handler, and add the SysLogHandler: -+ self.obfslogger.removeHandler(self.default_handler) -+ -+ log_handler = logging.handlers.SysLogHandler(address='/dev/log') -+ formatter = logging.Formatter(progname + "[%(process)d]: %(message)s") -+ log_handler.setFormatter(formatter) -+ -+ self.obfslogger.addHandler(log_handler) -+ - - def set_log_severity(self, sev_string): - """Update our minimum logging severity to 'sev_string'.""" -diff --git a/obfsproxy/pyobfsproxy.py b/obfsproxy/pyobfsproxy.py -index 4a2faf6..eaf8a44 100755 ---- a/obfsproxy/pyobfsproxy.py -+++ b/obfsproxy/pyobfsproxy.py -@@ -42,6 +42,7 @@ def set_up_cli_parsing(): - - parser.add_argument('-v', '--version', action='version', version=__version__) - parser.add_argument('--log-file', help='set logfile') -+ parser.add_argument('--syslog', metavar='PROGNAME', help='use syslog') - parser.add_argument('--log-min-severity', - choices=['error', 'warning', 'info', 'debug'], - help='set minimum logging severity (default: %(default)s)') -@@ -110,6 +111,8 @@ def consider_cli_args(args): - - if args.log_file: - log.set_log_file(args.log_file) -+ elif args.syslog: -+ log.set_syslog(args.syslog) - if args.log_min_severity: - log.set_log_severity(args.log_min_severity) - if args.no_log: diff --git a/net/ocserv/Config.in b/net/ocserv/Config.in deleted file mode 100644 index b6460cd..0000000 --- a/net/ocserv/Config.in +++ /dev/null @@ -1,26 +0,0 @@ -# ocserv avanced configuration - -menu "Configuration" - depends on PACKAGE_ocserv - -config OCSERV_PAM - bool "enable PAM" - default n - -config OCSERV_SECCOMP - bool "enable seccomp" - default n - -config OCSERV_RADIUS - bool "enable radius authentication" - default n - -config OCSERV_PROTOBUF - bool "use external libprotobuf" - default y - -config OCSERV_HTTP_PARSER - bool "use external libhttp-parser" - default y - -endmenu diff --git a/net/ocserv/Makefile b/net/ocserv/Makefile deleted file mode 100644 index a5767f7..0000000 --- a/net/ocserv/Makefile +++ /dev/null @@ -1,111 +0,0 @@ -# -# Copyright (C) 2007-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ocserv -PKG_VERSION:=0.11.8 -PKG_RELEASE:=1 -PKG_USE_MIPS16:=0 - -PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/ -PKG_HASH:=735b9b88a004d5bc8a91d4093d07ea0e2c9fac370a35d84beccc394ed24420c7 - -PKG_LICENSE:=GPLv2+ -PKG_LICENSE_FILES:=COPYING -PKG_FIXUP:=autoreconf - -PKG_CONFIG_DEPENDS:= \ - CONFIG_OCSERV_PAM \ - CONFIG_OCSERV_SECCOMP \ - CONFIG_OCSERV_PROTOBUF \ - -include $(INCLUDE_DIR)/package.mk - -define Package/ocserv/config - source "$(SOURCE)/Config.in" -endef - -define Package/ocserv - SECTION:=net - CATEGORY:=Network - SUBMENU:=VPN - TITLE:=OpenConnect VPN server - URL:=http://www.infradead.org/ocserv/ - MAINTAINER:=Nikos Mavrogiannopoulos - DEPENDS:= +OCSERV_RADIUS:libradcli +OCSERV_HTTP_PARSER:libhttp-parser +OCSERV_SECCOMP:libseccomp +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c +libev +kmod-tun - USERID:=ocserv=72:ocserv=72 -endef - -define Package/ocserv/description - OpenConnect server (ocserv) is an SSL VPN server. Its purpose is to be - a secure, small, fast and configurable VPN server. It implements the - OpenConnect SSL VPN protocol, and has also (currently experimental) - compatibility with clients using the AnyConnect SSL VPN protocol. The - OpenConnect VPN protocol uses the standard IETF security protocols such - as TLS 1.2, and Datagram TLS to provide the secure VPN service. -endef - -EXTRA_CPPFLAGS+=-I$(STAGING_DIR)/usr/include/readline/ -EXTRA_LDFLAGS+=-lncurses - -CONFIGURE_ARGS+= \ - --with-pager="" \ - --enable-local-libopts \ - --with-libreadline-prefix="$(STAGING_DIR)/" \ - --without-libnl \ - --without-lz4 \ - --without-gssapi \ - --with-libcrypt-prefix="$(STAGING_DIR)/" \ - --with-libev-prefix="$(STAGING_DIR)/" \ - --without-lz4 \ - --with-local-talloc \ - -ifneq ($(CONFIG_OCSERV_PAM),y) -CONFIGURE_ARGS += --without-pam -endif - -ifneq ($(CONFIG_OCSERV_RADIUS),y) -CONFIGURE_ARGS += --without-radius -endif - -ifneq ($(CONFIG_OCSERV_SECCOMP),y) -CONFIGURE_ARGS += --disable-seccomp -endif - -ifneq ($(CONFIG_OCSERV_PROTOBUF),y) -CONFIGURE_ARGS += --without-protobuf -endif - -ifneq ($(CONFIG_OCSERV_HTTP_PARSER),y) -CONFIGURE_ARGS += --without-http-parser -endif - -define Package/ocserv/conffiles -/etc/config/ocserv -endef - -define Package/ocserv/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv-fw $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd/ocpasswd $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl/occtl $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/ocserv.init $(1)/etc/init.d/ocserv - $(INSTALL_DIR) $(1)/etc/ocserv - $(INSTALL_CONF) ./files/ocserv.conf.template $(1)/etc/ocserv/ocserv.conf.template - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/config $(1)/etc/config/ocserv - $(INSTALL_DIR) $(1)/lib/upgrade/keep.d - $(INSTALL_DATA) ./files/ocserv.upgrade $(1)/lib/upgrade/keep.d/ocserv -endef - -$(eval $(call BuildPackage,ocserv)) diff --git a/net/ocserv/README b/net/ocserv/README deleted file mode 100644 index a883a07..0000000 --- a/net/ocserv/README +++ /dev/null @@ -1,198 +0,0 @@ -Setting up OpenConnect VPN server -================================= - -The openconnect server expects to be configured using the uci interface. - -It is recommended to setup a dynamic DNS address with openwrt prior -to starting the server. That is because during the first startup -a certificate file which will contain the dynamic DNS name will be -created. You can always regenerate the certificate by deleting -/etc/ocserv/server-key.pem. - -There are two approaches to setup the VPN. The proxy-arp approach (1) -which provides clients with addresses of the LAN, and the "forwarding" -approach (2) which provides clients with addresses of a separate private -network. The former is suitable when you have "roadwarrior" type of clients -connecting to the LAN, and the latter when you may need to connect -multiple networks with the LAN. - -If for the client side you use OpenWRT it is recommended to check you -have the latest vpnc-scripts and openconnect packages. - - -1. Proxy-ARP Approach -===================== - -[This option is available since ocserv-0.10.9-2 package] - -To setup a server the provides access to LAN with network address -10.100.2.0/255.255.255.0 add the following to /etc/config/ocserv. -The following setup will assign the upper 62 addresses for VPN use. - -``` -----/etc/config/ocserv------------------------------------------- -config ocserv 'config' - option port '443' - option dpd '120' - option max_clients '8' - option max_same '2' - option netmask '255.255.255.192' - option ipaddr '10.100.2.192' - option auth 'plain' - option default_domain 'lan' - option compression '1' - option proxy_arp '1' - option ping_leases '1' - option enable '1' - -config dns - option ip '10.100.2.1' - -config routes - option ip '10.100.2.0' - option netmask '255.255.255.0' - -config ocservusers - option name 'test' - option password '$5$unl8uKAGNsdTh9zm$PnUHEGhDc5VHbFE2EfWwW38Bub6Y6EZ5hrFwZE1r2F1' - ------------------------------------------------------------------ -``` - -This setup re-utilizes the addresses assigned to LAN for the VPN clients. -To ensure that there are no conflicts with the DHCP server use the following -commands. These will set the maximum address assigned by DHCP to be 10.100.2.191 -which is below the first VPN assigned address (10.100.2.192). - -``` -# uci set dhcp.lan.start=100 -# uci set dhcp.lan.limit=91 -``` - -For simple networks like that you may also leave the 'netmask' and 'ipaddr' -fields empty and ocserv on startup will set the necessary values. - - -2. Forwarding Approach -====================== - -To setup a server the provides access to LAN with network address -10.100.2.0/255.255.255.0 using the VPN address range -10.100.3.0/255.255.255.0 add the following to /etc/config/ocserv: - -``` -----/etc/config/ocserv------------------------------------------- -config ocserv 'config' - option port '443' - option dpd '120' - option max_clients '8' - option max_same '2' - option netmask '255.255.255.0' - option ipaddr '10.100.3.0' - option auth 'plain' - option default_domain 'lan' - option compression '1' - option enable '1' - -config dns - option ip '10.100.2.1' - -config routes - option ip '10.100.2.0' - option netmask '255.255.255.0' - -config ocservusers - option name 'test' - option password '$5$unl8uKAGNsdTh9zm$PnUHEGhDc5VHbFE2EfWwW38Bub6Y6EZ5hrFwZE1r2F1' - ------------------------------------------------------------------ -``` - -Setting up split-dns -==================== - -To allow the clients to resolv with the local domain add the following -to the ocserv configuration file. - -``` -----/etc/config/ocserv------------------------------------------- -config ocserv 'config' - option split_dns '1' - option default_domain 'mydomain' -``` - -The ```default_domain``` is optional and if not set, it will be autodetected -from dnsmasq's configuration. - - -Setting up the firewall -======================= - -Since the connected users will be assigned to other interfaces than the LAN -one, it is required to assign the VPN clients to an interface, and enable -forwarding for them. That is, you should setup an unmanaged interface (e.g., -called vpn), which will have assigned the 'vpns+' interfaces (i.e., all vpns -interfaces). Then a zone called vpn should be setup to handle interactions -with lan. An example, which alls all forwarding between LAN and VPN clients, -follows. - -``` -----/etc/config/network------------------------------------------ -config interface 'vpn' - option proto 'none' - option ifname 'vpns+' ------------------------------------------------------------------ - -----/etc/config/firewall----------------------------------------- -config zone - option input 'ACCEPT' - option forward 'ACCEPT' - option output 'ACCEPT' - option name 'vpn' - option device 'vpns+' - option network 'vpn' - -config forwarding - option dest 'lan' - option src 'vpn' - -config forwarding - option dest 'vpn' - option src 'lan' - -config rule - option target 'ACCEPT' - option src 'wan' - option proto 'tcp' - option dest_port '443' - option name 'vpn' - -config rule - option target 'ACCEPT' - option src 'wan' - option proto 'udp' - option dest_port '443' - option name 'vpn' ------------------------------------------------------------------ -``` - -Note, that the last two rules, enable connections to port 443 from the -Internet. That is the port used by OpenConnect VPN. - - -Starting the server -=================== - -Note that both configurations above add the user "test" with password "test". The -password is specified in the crypt(3) format. - -The server can be enabled and started using: -# /etc/init.d/ocserv enable -# /etc/init.d/ocserv start - -For any custom configuration options of ocserv you may add values in -/etc/ocserv/ocserv.conf.local. - -There is a luci plugin to allow configuring the server from -the web environment; see the package luci-app-ocserv. - diff --git a/net/ocserv/files/config b/net/ocserv/files/config deleted file mode 100644 index 4814459..0000000 --- a/net/ocserv/files/config +++ /dev/null @@ -1,17 +0,0 @@ - -config ocserv 'config' - option port '4443' - option dpd '180' - option max_clients '8' - option max_same '2' - option enable '0' - option zone 'lan' - -config ocservusers - -config dns - option ip '8.8.8.8' - -config routes - option ip '192.168.1.0' - option netmask '255.255.255.0' diff --git a/net/ocserv/files/ocserv.conf.template b/net/ocserv/files/ocserv.conf.template deleted file mode 100644 index a3b7692..0000000 --- a/net/ocserv/files/ocserv.conf.template +++ /dev/null @@ -1,415 +0,0 @@ -############################################################################ -# NOTE: Do not modify this file to configure ocserv. Add new directives # -# in /etc/ocserv/ocserv.conf.local and these will be included in ocserv's # -# configuration # -############################################################################ - - -# User authentication method. Could be set multiple times and in that case -# all should succeed. -# Options: certificate, pam. -#auth = "certificate" -#auth = "pam" - -# The gid-min option is used by auto-select-group option, in order to -# select the minimum group ID. -#auth = "pam[gid-min=1000]" - -# The plain option requires specifying a password file which contains -# entries of the following format. -# "username:groupname:encoded-password" -# One entry must be listed per line, and 'ocpasswd' can be used -# to generate password entries. -auth = "|AUTH|" - -# A banner to be displayed on clients -banner = "Welcome to OpenWRT" - -#isolate-workers = true - -# When the server has a dynamic DNS address (that may change), -# should set that to true to ask the client to resolve again on -# reconnects. -listen-host-is-dyndns = |DYNDNS| - -# Use listen-host to limit to specific IPs or to the IPs of a provided -# hostname. -#listen-host = [IP|HOSTNAME] - -# Limit the number of clients. Unset or set to zero for unlimited. -#max-clients = 1024 -max-clients = |MAX_CLIENTS| - -# Limit the number of client connections to one every X milliseconds -# (X is the provided value). Set to zero for no limit. -rate-limit-ms = 100 - -# Limit the number of identical clients (i.e., users connecting -# multiple times). Unset or set to zero for unlimited. -max-same-clients = |MAX_SAME| - -# TCP and UDP port number -tcp-port = |PORT| -|UDP|udp-port = |PORT| - -# Stats report time. The number of seconds after which each -# worker process will report its usage statistics (number of -# bytes transferred etc). This is useful when accounting like -# radius is in use. -#stats-report-time = 360 - -# Stats reset time. The period of time statistics kept by main/sec-mod -# processes will be reset. These are the statistics shown by cmd -# 'occtl show stats'. For daily: 86400, weekly: 604800 -# This is unrelated to stats-report-time. -server-stats-reset-time = 604800 - -# Keepalive in seconds -keepalive = 32400 - -# Dead peer detection in seconds. -dpd = |DPD| - -# Dead peer detection for mobile clients. The needs to -# be much higher to prevent such clients being awaken too -# often by the DPD messages, and save battery. -# (clients that send the X-AnyConnect-Identifier-DeviceType) -mobile-dpd = 1800 - -# If using DTLS, and no UDP traffic is received for this -# many seconds, attempt to send future traffic over the TCP -# connection instead, in an attempt to wake up the client -# in the case that there is a NAT and the UDP translation -# was deleted. If this is unset, do not attempt to use this -# recovery mechanism. -switch-to-tcp-timeout = 25 - -# MTU discovery (DPD must be enabled) -try-mtu-discovery = false - -# The key and the certificates of the server -# The key may be a file, or any URL supported by GnuTLS (e.g., -# tpmkey:uuid=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx;storage=user -# or pkcs11:object=my-vpn-key;object-type=private) -# -# There may be multiple certificate and key pairs and each key -# should correspond to the preceding certificate. -server-cert = /etc/ocserv/server-cert.pem -server-key = /etc/ocserv/server-key.pem - -# Diffie-Hellman parameters. Only needed if you require support -# for the DHE ciphersuites (by default this server supports ECDHE). -# Can be generated using: -# certtool --generate-dh-params --outfile /path/to/dh.pem -#dh-params = /path/to/dh.pem - -# If you have a certificate from a CA that provides an OCSP -# service you may provide a fresh OCSP status response within -# the TLS handshake. That will prevent the client from connecting -# independently on the OCSP server. -# You can update this response periodically using: -# ocsptool --ask --load-cert=your_cert --load-issuer=your_ca --outfile response -# Make sure that you replace the following file in an atomic way. -#ocsp-response = /path/to/ocsp.der - -# In case PKCS #11 or TPM keys are used the PINs should be available -# in files. The srk-pin-file is applicable to TPM keys only, and is the -# storage root key. -#pin-file = /path/to/pin.txt -#srk-pin-file = /path/to/srkpin.txt - -# The Certificate Authority that will be used to verify -# client certificates (public keys) if certificate authentication -# is set. -#ca-cert = /etc/ocserv/ca.pem - -# The object identifier that will be used to read the user ID in the client -# certificate. The object identifier should be part of the certificate's DN -# Useful OIDs are: -# CN = 2.5.4.3, UID = 0.9.2342.19200300.100.1.1 -#cert-user-oid = 0.9.2342.19200300.100.1.1 - -# The object identifier that will be used to read the user group in the -# client certificate. The object identifier should be part of the certificate's -# DN. Useful OIDs are: -# OU (organizational unit) = 2.5.4.11 -#cert-group-oid = 2.5.4.11 - -# The revocation list of the certificates issued by the 'ca-cert' above. -#crl = /etc/ocserv/crl.pem - -# Uncomment this to enable compression negotiation (LZS, LZ4). -|COMPRESSION|compression = true - -# GnuTLS priority string -tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-VERS-SSL3.0" - -# To enforce perfect forward secrecy (PFS) on the main channel. -#tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-VERS-SSL3.0:-RSA" - -# The time (in seconds) that a client is allowed to stay connected prior -# to authentication -auth-timeout = 240 - -# The time (in seconds) that a client is allowed to stay idle (no traffic) -# before being disconnected. Unset to disable. -#idle-timeout = 1200 - -# The time (in seconds) that a mobile client is allowed to stay idle (no -# traffic) before being disconnected. Unset to disable. -#mobile-idle-timeout = 2400 - -# The time (in seconds) that a client is not allowed to reconnect after -# a failed authentication attempt. -min-reauth-time = 360 - -# Banning clients in ocserv works with a point system. IP addresses -# that get a score over that configured number are banned for -# min-reauth-time seconds. By default a wrong password attempt is 10 points, -# a KKDCP POST is 1 point, and a connection is 1 point. Note that -# due to difference processes being involved the count of points -# will not be real-time precise. -# -# Score banning cannot be reliably used when receiving proxied connections -# locally from an HTTP server (i.e., when listen-clear-file is used). -# -# Set to zero to disable. -max-ban-score = 80 - -# The time (in seconds) that all score kept for a client is reset. -ban-reset-time = 1200 - -# In case you'd like to change the default points. -#ban-points-wrong-password = 10 -#ban-points-connection = 1 -#ban-points-kkdcp = 1 - -# Cookie timeout (in seconds) -# Once a client is authenticated he's provided a cookie with -# which he can reconnect. That cookie will be invalidated if not -# used within this timeout value. This cookie remains valid, during -# the user's connected time, and after user disconnection it -# remains active for this amount of time. That setting should allow a -# reasonable amount of time for roaming between different networks. -cookie-timeout = 300 - -# If this is enabled (not recommended) the cookies will stay -# valid even after a user manually disconnects, and until they -# expire. This may improve roaming with some broken clients. -#persistent-cookies = true - -# Whether roaming is allowed, i.e., if true a cookie is -# restricted to a single IP address and cannot be re-used -# from a different IP. -deny-roaming = false - -# ReKey time (in seconds) -# ocserv will ask the client to refresh keys periodically once -# this amount of seconds is elapsed. Set to zero to disable (note -# that, some clients fail if rekey is disabled). -rekey-time = 172800 - -# ReKey method -# Valid options: ssl, new-tunnel -# ssl: Will perform an efficient rehandshake on the channel allowing -# a seamless connection during rekey. -# new-tunnel: Will instruct the client to discard and re-establish the channel. -# Use this option only if the connecting clients have issues with the ssl -# option. -rekey-method = ssl - -# Script to call when a client connects and obtains an IP -# Parameters are passed on the environment. -# REASON, USERNAME, GROUPNAME, HOSTNAME (the hostname selected by client), -# DEVICE, IP_REAL (the real IP of the client), IP_LOCAL (the local IP -# in the P-t-P connection), IP_REMOTE (the VPN IP of the client), -# ID (a unique numeric ID); REASON may be "connect" or "disconnect". - -# These scripts are not needed if you have setup an interface for all vpns+ -# devices. -#connect-script = /usr/bin/ocserv-script -#disconnect-script = /usr/bin/ocserv-script - -# UTMP -use-utmp = false - -# Whether to enable support for the occtl tool (i.e., either through D-BUS, -# or via a unix socket). -use-occtl = true - -# socket file used for IPC with occtl. You only need to set that, -# if you use more than a single servers. -occtl-socket-file = /var/run/occtl.socket - -# PID file. It can be overriden in the command line. -pid-file = /var/run/ocserv.pid - -# The default server directory. Does not require any devices present. -chroot-dir = /var/lib/ocserv - -# socket file used for IPC, will be appended with .PID -# It must be accessible within the chroot environment (if any) -#socket-file = /var/run/ocserv-socket -socket-file = ocserv-socket - -# The user the worker processes will be run as. It should be -# unique (no other services run as this user). -run-as-user = ocserv -run-as-group = ocserv - -# Set the protocol-defined priority (SO_PRIORITY) for packets to -# be sent. That is a number from 0 to 6 with 0 being the lowest -# priority. Alternatively this can be used to set the IP Type- -# Of-Service, by setting it to a hexadecimal number (e.g., 0x20). -# This can be set per user/group or globally. -#net-priority = 3 - -# Set the VPN worker process into a specific cgroup. This is Linux -# specific and can be set per user/group or globally. -#cgroup = "cpuset,cpu:test" - -# -# Network settings -# - -# The name of the tun device -device = vpns - -# Whether the generated IPs will be predictable, i.e., IP stays the -# same for the same user when possible. -predictable-ips = |PREDICTABLE_IPS| - -# The default domain to be advertised -|ENABLE_DEFAULT_DOMAIN|default-domain = |DEFAULT_DOMAIN| - -# The pool of addresses that leases will be given from. -ipv4-network = |IPV4ADDR| -ipv4-netmask = |NETMASK| - -# The advertized DNS server. Use multiple lines for -# multiple servers. -# dns = fc00::4be0 -#dns = 192.168.1.2 - -# The NBNS server (if any) -#nbns = 192.168.1.3 - -# The IPv6 subnet that leases will be given from. -|ENABLE_IPV6|ipv6-network = |IPV6ADDR| - -# The domains over which the provided DNS should be used. Use -# multiple lines for multiple domains. -|ENABLE_SPLIT_DNS|split-dns = |DEFAULT_DOMAIN| - -# Prior to leasing any IP from the pool ping it to verify that -# it is not in use by another (unrelated to this server) host. -ping-leases = |PING_LEASES| - -# Whether to tunnel all DNS queries via the VPN. This is the default -# when a default route is set. -#tunnel-all-dns = true - -# Unset to assign the default MTU of the device -# mtu = - -# Unset to enable bandwidth restrictions (in bytes/sec). The -# setting here is global, but can also be set per user or per group. -#rx-data-per-sec = 40000 -#tx-data-per-sec = 40000 - -# The number of packets (of MTU size) that are available in -# the output buffer. The default is low to improve latency. -# Setting it higher will improve throughput. -#output-buffer = 10 - -# Routes to be forwarded to the client. If you need the -# client to forward routes to the server, you may use the -# config-per-user/group or even connect and disconnect scripts. -# -# To set the server as the default gateway for the client just -# comment out all routes from the server. -#route = 192.168.1.0/255.255.255.0 -#route = 192.168.5.0/255.255.255.0 -#route = fef4:db8:1000:1001::/64 - -# Configuration files that will be applied per user connection or -# per group. Each file name on these directories must match the username -# or the groupname. -# The options allowed in the configuration files are dns, nbns, -# ipv?-network, ipv4-netmask, ipv6-prefix, rx/tx-per-sec, iroute, route, -# net-priority and cgroup. -# -# Note that the 'iroute' option allows to add routes on the server -# based on a user or group. The syntax depends on the input accepted -# by the commands route-add-cmd and route-del-cmd (see below). - -config-per-user = /etc/ocserv/config-per-user/ -config-per-group = /etc/ocserv/config-per-group/ - -# When config-per-xxx is specified and there is no group or user that -# matches, then utilize the following configuration. - -#default-user-config = /etc/ocserv/defaults/user.conf -#default-group-config = /etc/ocserv/defaults/group.conf - -# Groups that a client is allowed to select from. -# A client may belong in multiple groups, and in certain use-cases -# it is needed to switch between them. For these cases the client can -# select prior to authentication. Add multiple entries for multiple groups. -#select-group = group1 -#select-group = group2[My group 2] -#select-group = tost[The tost group] - -# The name of the group that if selected it would allow to use -# the assigned by default group. -#default-select-group = DEFAULT - -# Instead of specifying manually all the allowed groups, you may instruct -# ocserv to scan all available groups and include the full list. That -# option is only functional on plain authentication. -#auto-select-group = true - -# The system command to use to setup a route. %{R} will be replaced with the -# route/mask and %{D} with the (tun) device. -# -# The following example is from linux systems. %{R} should be something -# like 192.168.2.0/24 - -#route-add-cmd = "/usr/sbin/ip route add %{R} dev %{D}" -#route-del-cmd = "/usr/sbin/ip route delete %{R} dev %{D}" - -route-add-cmd = "/sbin/route add -net %{RI} dev %{D}" -route-del-cmd = "/sbin/route del -net %{RI} dev %{D}" - -# This option allows to forward a proxy. The special strings '%{U}' -# and '%{G}', if present will be replaced by the username and group name. -#proxy-url = http://example.com/ -#proxy-url = http://example.com/%{U}/%{G}/hello - -# -# The following options are for (experimental) AnyConnect client -# compatibility. - -# Client profile xml. A sample file exists in doc/profile.xml. -# This file must be accessible from inside the worker's chroot. -# It is not used by the openconnect client. -#user-profile = profile.xml - -# Binary files that may be downloaded by the CISCO client. Must -# be within any chroot environment. -#binary-files = /path/to/binaries - -# Unless set to false it is required for clients to present their -# certificate even if they are authenticating via a previously granted -# cookie and complete their authentication in the same TCP connection. -# Legacy CISCO clients do not do that, and thus this option should be -# set for them. -cisco-client-compat = |CISCO_COMPAT| - -#Advanced options - -# Option to allow sending arbitrary custom headers to the client after -# authentication and prior to VPN tunnel establishment. -#custom-header = "X-My-Header: hi there" - -expose-iroutes = true diff --git a/net/ocserv/files/ocserv.init b/net/ocserv/files/ocserv.init deleted file mode 100644 index bce9339..0000000 --- a/net/ocserv/files/ocserv.init +++ /dev/null @@ -1,212 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=50 -USE_PROCD=1 - -setup_config() { - config_get port $1 port "4443" - config_get max_clients $1 max_clients "8" - config_get max_same $1 max_same "2" - config_get dpd $1 dpd "120" - config_get predictable_ips $1 predictable_ips "1" - config_get compression $1 compression "0" - config_get udp $1 udp "1" - config_get auth $1 auth "plain" - config_get cisco_compat $1 cisco_compat "1" - config_get ipaddr $1 ipaddr "" - config_get netmask $1 netmask "" - config_get ip6addr $1 ip6addr "" - config_get proxy_arp $1 proxy_arp "0" - config_get ping_leases $1 ping_leases "0" - config_get split_dns $1 split_dns "0" - config_get default_domain $1 default_domain "" - - # Enable proxy arp, and make sure that ping leases is set to true in that case, - # to prevent conflicts. - if test "$proxy_arp" = 1;then - local ip - # IP address is empty. Auto-configure LAN + VPN. - if test -z "$ipaddr";then - local mask - mask=$(uci get network.lan.netmask) - if test "$mask" = "255.255.255.0";then - uci set dhcp.lan.start=100 - uci set dhcp.lan.limit=91 - fi - ip=$(uci get network.lan.ipaddr) - ipaddr="$(echo $ip|cut -d . -f1,2,3).192" - netmask="255.255.255.192" - uci set ocserv.config.ipaddr="$ipaddr" - uci set ocserv.config.netmask="$netmask" - uci commit - fi - - if test -z "$ip6addr";then - ip6addr=$(uci get network.lan.ip6addr 2>/dev/null) - test -n "$ip6addr" && uci set ocserv.config.ip6addr="$ip6addr" - uci commit - fi - - ping_leases=1 - test -n "$ipaddr" && sysctl -w "net.ipv4.conf.$(uci get network.lan.ifname).proxy_arp"=1 >/dev/null - test -n "$ip6addr" && sysctl -w "net.ipv6.conf.$(uci get network.lan.ifname).proxy_ndp"=1 >/dev/null - else - test "$ipaddr" = "" && ipaddr="192.168.100.0" - test "$netmask" = "" && ipaddr="255.255.255.0" - fi - - enable_default_domain="#" - enable_udp="#" - enable_compression="#" - enable_split_dns="#" - test $predictable_ips = "0" && predictable_ips="false" - test $predictable_ips = "1" && predictable_ips="true" - test $cisco_compat = "0" && cisco_compat="false" - test $cisco_compat = "1" && cisco_compat="true" - test $ping_leases = "0" && ping_leases="false" - test $ping_leases = "1" && ping_leases="true" - test $udp = "1" && enable_udp="" - test $split_dns = "1" && enable_split_dns="" - test $compression = "1" && enable_compression="" - - test -z $default_domain && default_domain=$(uci get dhcp.@dnsmasq[0].domain) - test -n $default_domain && enable_default_domain="" - test -z $ip6addr && enable_ipv6="#" - - test $auth = "plain" && authsuffix="\[passwd=/var/etc/ocpasswd\]" - - dyndns="false" - hostname=`uci show ddns 2>/dev/null|grep domain|head -1|cut -d '=' -f 2` - [ -n "$hostname" ] && dyndns="true" - - mkdir -p /var/etc - sed -e "s/|PORT|/$port/g" \ - -e "s/|MAX_CLIENTS|/$max_clients/g" \ - -e "s/|MAX_SAME|/$max_same/g" \ - -e "s/|DPD|/$dpd/g" \ - -e "s#|AUTH|#$auth$authsuffix#g" \ - -e "s#|DYNDNS|#$dyndns#g" \ - -e "s/|PREDICTABLE_IPS|/$predictable_ips/g" \ - -e "s/|DEFAULT_DOMAIN|/$default_domain/g" \ - -e "s/|ENABLE_DEFAULT_DOMAIN|/$enable_default_domain/g" \ - -e "s/|ENABLE_SPLIT_DNS|/$enable_split_dns/g" \ - -e "s/|CISCO_COMPAT|/$cisco_compat/g" \ - -e "s/|PING_LEASES|/$ping_leases/g" \ - -e "s/|UDP|/$enable_udp/g" \ - -e "s/|COMPRESSION|/$enable_compression/g" \ - -e "s/|IPV4ADDR|/$ipaddr/g" \ - -e "s/|NETMASK|/$netmask/g" \ - -e "s#|IPV6ADDR|#$ip6addr#g" \ - -e "s/|ENABLE_IPV6|/$enable_ipv6/g" \ - /etc/ocserv/ocserv.conf.template > /var/etc/ocserv.conf - - test -f /etc/ocserv/ocserv.conf.local && cat /etc/ocserv/ocserv.conf.local >> /var/etc/ocserv.conf -} - -setup_users() { - local name - local group - local password - - config_get name $1 name - config_get group $1 group '*' - config_get password $1 password - - [ -z "$name" -o -z "$password" ] && return - - echo "$name:$group:$password" >> /var/etc/ocpasswd -} - -setup_routes() { - local routes - - config_get ip $1 ip - config_get netmask $1 netmask - - [ -z "$ip" -o -z "$netmask" ] && return - - echo "route = $ip/$netmask" >> /var/etc/ocserv.conf -} - -setup_dns() { - local routes - - config_get ip $1 ip - - [ -z "$ip" ] && return - - echo "dns = $ip" >> /var/etc/ocserv.conf -} - -start_service() { - local hostname iface - - hostname=`uci show ddns 2>/dev/null|grep domain|head -1|cut -d '=' -f 2` - [ -z "$hostname" ] && hostname=`uci get system.@system[0].hostname 2>/dev/null` - - [ -f /etc/config/ocserv-dir/ca-key.pem ] && mv /etc/config/ocserv-dir/ca-key.pem /etc/ocserv/ca-key.pem - [ -f /etc/config/ocserv-dir/ca.pem ] && mv /etc/config/ocserv-dir/ca.pem /etc/ocserv/ca.pem - [ -f /etc/config/ocserv-dir/server-key.pem ] && mv /etc/config/ocserv-dir/server-key.pem /etc/ocserv/server-key.pem - [ -f /etc/config/ocserv-dir/server-cert.pem ] && mv /etc/config/ocserv-dir/server-cert.pem /etc/ocserv/server-cert.pem - [ -d /etc/config/ocserv-dir ] && rmdir /etc/config/ocserv-dir - - [ ! -f /etc/ocserv/ca-key.pem ] && [ -x /usr/bin/certtool ] && { - logger -t ocserv "Generating CA certificate..." - mkdir -p /etc/ocserv/pki/ - certtool --bits 2048 --generate-privkey --outfile /etc/ocserv/ca-key.pem >/dev/null 2>&1 - echo "cn=$hostname CA" >/etc/ocserv/pki/ca.tmpl - echo "expiration_days=-1" >>/etc/ocserv/pki/ca.tmpl - echo "serial=1" >>/etc/ocserv/pki/ca.tmpl - echo "ca" >>/etc/ocserv/pki/ca.tmpl - echo "cert_signing_key" >>/etc/ocserv/pki/ca.tmpl - - certtool --template /etc/ocserv/pki/ca.tmpl \ - --generate-self-signed --load-privkey /etc/ocserv/ca-key.pem \ - --outfile /etc/ocserv/ca.pem >/dev/null 2>&1 - } - - #generate server certificate/key - [ ! -f /etc/ocserv/server-key.pem ] && [ -x /usr/bin/certtool ] && { - logger -t ocserv "Generating server certificate..." - mkdir -p /etc/ocserv/pki/ - certtool --bits 2048 --generate-privkey --outfile /etc/ocserv/server-key.pem >/dev/null 2>&1 - echo "cn=$hostname" >/etc/ocserv/pki/server.tmpl - echo "serial=2" >>/etc/ocserv/pki/server.tmpl - echo "expiration_days=-1" >>/etc/ocserv/pki/server.tmpl - echo "signing_key" >>/etc/ocserv/pki/server.tmpl - echo "encryption_key" >>/etc/ocserv/pki/server.tmpl - certtool --template /etc/ocserv/pki/server.tmpl \ - --generate-certificate --load-privkey /etc/ocserv/server-key.pem \ - --load-ca-certificate /etc/ocserv/ca.pem --load-ca-privkey \ - /etc/ocserv/ca-key.pem --outfile /etc/ocserv/server-cert.pem >/dev/null 2>&1 - } - - [ -f /var/run/ocserv.pid ] || { - touch /var/run/ocserv.pid - chown ocserv:ocserv /var/run/ocserv.pid - } - [ -d /var/lib/ocserv ] || { - mkdir -m 0755 -p /var/lib/ocserv - chmod 0700 /var/lib/ocserv - chown ocserv:ocserv /var/lib/ocserv - } - - config_load "ocserv" - - rm -f /var/etc/ocserv.conf - touch /var/etc/ocserv.conf - setup_config config - config_foreach setup_routes routes - config_foreach setup_dns dns - - rm -f /var/etc/ocpasswd - touch /var/etc/ocpasswd - chmod 600 /var/etc/ocpasswd - config_foreach setup_users ocservusers - - procd_open_instance - procd_set_param command /usr/sbin/ocserv -f -c /var/etc/ocserv.conf - procd_set_param respawn - procd_close_instance -} - diff --git a/net/ocserv/files/ocserv.upgrade b/net/ocserv/files/ocserv.upgrade deleted file mode 100644 index fdffcb2..0000000 --- a/net/ocserv/files/ocserv.upgrade +++ /dev/null @@ -1,8 +0,0 @@ -/etc/ocserv/ca-key.pem -/etc/ocserv/ca.pem -/etc/ocserv/server-key.pem -/etc/ocserv/server-cert.pem -/etc/ocserv/ocserv.conf.local -/etc/ocserv/config-per-user/* -/etc/ocserv/config-per-group/* -/etc/ocserv/crl.pem diff --git a/net/opennhrp/Makefile b/net/opennhrp/Makefile deleted file mode 100644 index 4c2b9e8..0000000 --- a/net/opennhrp/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2009-2015 OpenWrt.org -# Copyright (C) 2009 Jakob Pfeiffer -# Copyright (C) 2014 Artem Makhutov -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=opennhrp -PKG_VERSION:=0.14.1 -PKG_RELEASE:=2 -PKG_MAINTAINER:=Artem Makhutov -PKG_LICENSE:=MIT License - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/opennhrp -PKG_MD5SUM:=eb42ddb13e07ceb415b9ebb8eaca28ee - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/opennhrp - SECTION:=net - CATEGORY:=Network - SUBMENU:=VPN - DEPENDS:=+libcares +ipsec-tools +ip +kmod-gre - KCONFIG:=CONFIG_ARPD=y - TITLE:=NBMA Next Hop Resolution Protocol - URL:=http://opennhrp.sourceforge.net/ -endef - -define Package/opennhrp/description - OpenNHRP implements NBMA Next Hop Resolution Protocol (as defined in RFC 2332). - It makes it possible to create dynamic multipoint VPN Linux router using NHRP, - GRE and IPsec. It aims to be Cisco DMVPN compatible. -endef - -define Package/opennhrp/conffiles -/etc/opennhrp/opennhrp.conf -endef - -define Package/opennhrp/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/opennhrp{,ctl} $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/opennhrp - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/opennhrp/opennhrp.conf $(1)/etc/opennhrp/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/opennhrp/opennhrp-script $(1)/etc/opennhrp/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/opennhrp/racoon-ph1down.sh $(1)/etc/opennhrp/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/opennhrp/racoon-ph1dead.sh $(1)/etc/opennhrp/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/opennhrp.init $(1)/etc/init.d/opennhrp -endef - -$(eval $(call BuildPackage,opennhrp)) diff --git a/net/opennhrp/files/opennhrp.init b/net/opennhrp/files/opennhrp.init deleted file mode 100644 index 8831287..0000000 --- a/net/opennhrp/files/opennhrp.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2009-2011 OpenWrt.org -# Copyright (C) 2009 Jakob Pfeiffer - -START=50 - -SERVICE_USE_PID=1 - -start() { - service_start /usr/sbin/opennhrp -d -} - -stop() { - service_stop /usr/sbin/opennhrp -} diff --git a/net/opennhrp/patches/100-musl-compat.patch b/net/opennhrp/patches/100-musl-compat.patch deleted file mode 100644 index 8be0f71..0000000 --- a/net/opennhrp/patches/100-musl-compat.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/nhrp/opennhrp.c -+++ b/nhrp/opennhrp.c -@@ -9,6 +9,7 @@ - #include - #include - #include -+#include - #include - #include - #include ---- a/nhrp/nhrp_common.h -+++ b/nhrp/nhrp_common.h -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - #include - - struct nhrp_interface; diff --git a/net/openssh/Makefile b/net/openssh/Makefile deleted file mode 100644 index b6881c2..0000000 --- a/net/openssh/Makefile +++ /dev/null @@ -1,292 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openssh -PKG_VERSION:=7.4p1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://ftp.spline.de/pub/OpenBSD/OpenSSH/portable/ \ - https://anorien.csc.warwick.ac.uk/pub/OpenBSD/OpenSSH/portable/ \ - https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ -PKG_MD5SUM:=b2db2a83caf66a208bb78d6d287cdaa3 - -PKG_LICENSE:=BSD ISC -PKG_LICENSE_FILES:=LICENCE - - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_BUILD_DEPENDS:=libopenssl - -include $(INCLUDE_DIR)/package.mk - -define Package/openssh/Default - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libopenssl +zlib - TITLE:=OpenSSH - MAINTAINER:=Peter Wagner - URL:=http://www.openssh.com/ - SUBMENU:=SSH - VARIANT:=without-pam -endef - -define Package/openssh-moduli - $(call Package/openssh/Default) - DEPENDS+= +openssh-keygen - TITLE+= moduli file -endef - -define Package/openssh-moduli/description -OpenSSH server moduli file. -endef - -define Package/openssh-client - $(call Package/openssh/Default) - TITLE+= client -endef - -define Package/openssh-client/description -OpenSSH client. -endef - -define Package/openssh-client/conffiles -/etc/ssh/ssh_config -endef - -define Package/openssh-client-utils - $(call Package/openssh/Default) - DEPENDS+= +openssh-client +openssh-keygen - TITLE+= client utilities -endef - -define Package/openssh-client-utils/description -OpenSSH client utilities. -endef - -define Package/openssh-keygen - $(call Package/openssh/Default) - TITLE+= keygen -endef - -define Package/openssh-keygen/description -OpenSSH keygen. -endef - -define Package/openssh-server - $(call Package/openssh/Default) - DEPENDS+= +openssh-keygen - TITLE+= server - USERID:=sshd=22:sshd=22 -endef - -define Package/openssh-server/description -OpenSSH server. -endef - -define Package/openssh-server/conffiles -/etc/ssh/sshd_config -endef - -define Package/openssh-server-pam - $(call Package/openssh/Default) - DEPENDS+= +libpthread +openssh-keygen +libpam - TITLE+= server (with PAM support) - VARIANT:=with-pam - USERID:=sshd=22:sshd=22 -endef - -define Package/openssh-server-pam/description -OpenSSH server (with PAM support). -endef - -define Package/openssh-server-pam/conffiles -/etc/pam.d/sshd -/etc/security/access-sshd-local.conf -/etc/ssh/sshd_config -endef - -define Package/openssh-sftp-client - $(call Package/openssh/Default) - TITLE+= SFTP client -endef - -define Package/openssh-sftp-client/description -OpenSSH SFTP client. -endef - -define Package/openssh-sftp-server - $(call Package/openssh/Default) - TITLE+= SFTP server - # Strip dependencies to avoid pulling in OpenSSL etc. - DEPENDS:= -endef - -define Package/openssh-sftp-server/description -OpenSSH SFTP server. -endef - -define Package/openssh-sftp-avahi-service - $(call Package/openssh/Default) - TITLE+= (SFTP Avahi service) - DEPENDS:=+openssh-sftp-server +avahi-daemon -endef - -define Package/openssh-sftp-avahi-service/description - This package contains the service definition for announcing - SFTP support via mDNS/DNS-SD. -endef - -define Package/openssh-sftp-avahi-service/conffiles -/etc/avahi/services/sftp-ssh.service -endef - -CONFIGURE_ARGS+= \ - $(DISABLE_NLS) \ - --sysconfdir=/etc/ssh \ - --with-privsep-user=sshd \ - --with-privsep-path=/var/empty \ - --enable-shared \ - --disable-static \ - --disable-debug \ - --disable-strip \ - --disable-etc-default-login \ - --disable-lastlog \ - --disable-utmp \ - --disable-utmpx \ - --disable-wtmp \ - --disable-wtmpx \ - --without-bsd-auth \ - --without-kerberos5 \ - --without-x - -ifeq ($(BUILD_VARIANT),with-pam) -CONFIGURE_ARGS += \ - --with-pam -else -CONFIGURE_ARGS += \ - --without-pam -endif - -ifeq ($(CONFIG_OPENSSL_ENGINE),y) -CONFIGURE_ARGS+= \ - --with-ssl-engine -endif - -ifneq ($(CONFIG_SSP_SUPPORT),y) -CONFIGURE_ARGS += \ - --without-stackprotect -endif - -CONFIGURE_VARS += LD="$(TARGET_CC)" - -ifeq ($(BUILD_VARIANT),with-pam) -TARGET_LDFLAGS += -lpthread -endif - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - LIBS="" \ - sftp-server - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - STRIP_OPT="" \ - all install -endef - -define Package/openssh-client/preinst -#!/bin/sh -if [ -L $${IPKG_INSTROOT}/usr/bin/ssh ] && [ -L $${IPKG_INSTROOT}/usr/bin/scp ]; then - rm -f $${IPKG_INSTROOT}/usr/bin/ssh $${IPKG_INSTROOT}/usr/bin/scp; -fi -exit 0 -endef - -define Package/openssh-client/postrm -#!/bin/sh -rm -f $${IPKG_INSTROOT}/usr/bin/ssh $${IPKG_INSTROOT}/usr/bin/scp; -if [ -x $${IPKG_INSTROOT}/usr/sbin/dropbear ] ; then - ln -s /usr/sbin/dropbear $${IPKG_INSTROOT}/usr/bin/ssh; - ln -s /usr/sbin/dropbear $${IPKG_INSTROOT}/usr/bin/scp; -fi -exit 0 -endef - -define Package/openssh-moduli/install - $(INSTALL_DIR) $(1)/etc/ssh - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/moduli $(1)/etc/ssh/ -endef - -define Package/openssh-client/install - $(INSTALL_DIR) $(1)/etc/ssh - chmod 0700 $(1)/etc/ssh - $(CP) $(PKG_INSTALL_DIR)/etc/ssh/ssh_config $(1)/etc/ssh/ - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scp $(1)/usr/bin/ -endef - -define Package/openssh-client-utils/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(foreach bin,add agent keyscan keysign,$(PKG_BUILD_DIR)/ssh-$(bin)) $(1)/usr/bin/ -endef - -define Package/openssh-keygen/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ssh-keygen $(1)/usr/bin/ -endef - -define Package/openssh-server/install - $(INSTALL_DIR) $(1)/etc/ssh - chmod 0700 $(1)/etc/ssh - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/ssh/sshd_config $(1)/etc/ssh/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/sshd.init $(1)/etc/init.d/sshd - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sshd $(1)/usr/sbin/ -endef - -define Package/openssh-server-pam/install - $(call Package/openssh-server/install,$(1)) - sed -i 's,#PasswordAuthentication yes,PasswordAuthentication no,g' $(1)/etc/ssh/sshd_config - sed -i 's,#UsePAM no,UsePAM yes,g' $(1)/etc/ssh/sshd_config - $(INSTALL_DIR) $(1)/etc/pam.d - $(INSTALL_DATA) ./files/sshd.pam $(1)/etc/pam.d/sshd - $(INSTALL_DIR) $(1)/etc/security - $(INSTALL_DATA) ./files/sshd.pam-access $(1)/etc/security/access-sshd-local.conf -endef - -define Package/openssh-sftp-client/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sftp $(1)/usr/bin/ -endef - -define Package/openssh-sftp-server/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/sftp-server $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/libexec - ln -sf ../lib/sftp-server $(1)/usr/libexec/sftp-server -endef - -define Package/openssh-sftp-avahi-service/install - $(INSTALL_DIR) $(1)/etc/avahi/services - $(INSTALL_DATA) ./files/sftp-ssh.service $(1)/etc/avahi/services/ -endef - -$(eval $(call BuildPackage,openssh-client)) -$(eval $(call BuildPackage,openssh-moduli)) -$(eval $(call BuildPackage,openssh-client-utils)) -$(eval $(call BuildPackage,openssh-keygen)) -$(eval $(call BuildPackage,openssh-server)) -$(eval $(call BuildPackage,openssh-server-pam)) -$(eval $(call BuildPackage,openssh-sftp-client)) -$(eval $(call BuildPackage,openssh-sftp-server)) -$(eval $(call BuildPackage,openssh-sftp-avahi-service)) diff --git a/net/openssh/files/sftp-ssh.service b/net/openssh/files/sftp-ssh.service deleted file mode 100644 index 17e0927..0000000 --- a/net/openssh/files/sftp-ssh.service +++ /dev/null @@ -1,9 +0,0 @@ - - - - %h - - _sftp-ssh._tcp - 22 - - diff --git a/net/openssh/files/sshd.init b/net/openssh/files/sshd.init deleted file mode 100644 index c4354bb..0000000 --- a/net/openssh/files/sshd.init +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=50 -STOP=50 - -USE_PROCD=1 -PROG=/usr/sbin/sshd - -start_service() { - for type in rsa ecdsa ed25519; do { - # check for keys - key=/etc/ssh/ssh_host_${type}_key - [ ! -f $key ] && { - # generate missing keys - [ -x /usr/bin/ssh-keygen ] && { - /usr/bin/ssh-keygen -N '' -t $type -f $key 2>&- >&- - } - } - }; done - mkdir -m 0700 -p /var/empty - - procd_open_instance - procd_set_param command $PROG -D - procd_close_instance -} - -shutdown() { - local pid - local pids - local pid_mine - - stop - - # kill active clients - pid_mine="$$" - pids="$(pidof sshd)" - for pid in $pids; do - [ "$pid" = "$pid_mine" ] && continue - [ -e "/proc/$pid/stat" ] && kill $pid - done -} diff --git a/net/openssh/files/sshd.pam b/net/openssh/files/sshd.pam deleted file mode 100644 index 387ff2e..0000000 --- a/net/openssh/files/sshd.pam +++ /dev/null @@ -1,41 +0,0 @@ -# PAM configuration for the Secure Shell service - -# Read environment variables from /etc/environment and -# /etc/security/pam_env.conf. -auth required pam_env.so - -# Skip Google Authenticator if logging in from the local network. -# auth [success=1 default=ignore] pam_access.so accessfile=/etc/security/access-sshd-local.conf -# Google Authenticator 2-step verification. -# auth requisite pam_google_authenticator.so - -# Standard Un*x authentication. -auth include common-auth - -# Disallow non-root logins when /etc/nologin exists. -account required pam_nologin.so - -# Uncomment and edit /etc/security/access.conf if you need to set complex -# access limits that are hard to express in sshd_config. -# account required pam_access.so - -# Standard Un*x authorization. -account include common-account - -# Standard Un*x session setup and teardown. -session include common-session - -# Print the message of the day upon successful login. -session optional pam_motd.so - -# Print the status of the user's mailbox upon successful login. -session optional pam_mail.so standard noenv - -# Set up user limits from /etc/security/limits.conf. -session required pam_limits.so - -# Set up SELinux capabilities (need modified pam) -# session required pam_selinux.so multiple - -# Standard Un*x password updating. -password include common-password diff --git a/net/openssh/files/sshd.pam-access b/net/openssh/files/sshd.pam-access deleted file mode 100644 index 425ff11..0000000 --- a/net/openssh/files/sshd.pam-access +++ /dev/null @@ -1,4 +0,0 @@ -# Skip Google Authenticator for local network -#+ : ALL : 192.168.1.0/24 -+ : ALL : LOCAL -- : ALL : ALL diff --git a/net/openssh/patches/130-implicit_memset_decl_fix.patch b/net/openssh/patches/130-implicit_memset_decl_fix.patch deleted file mode 100644 index 7d46d20..0000000 --- a/net/openssh/patches/130-implicit_memset_decl_fix.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/includes.h -+++ b/includes.h -@@ -60,6 +60,9 @@ - /* - *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively - */ -+#ifdef HAVE_STRING_H -+# include -+#endif - #ifdef HAVE_STRINGS_H - # include - #endif diff --git a/net/openssh/patches/140-pam_uclibc_pthreads_fix.patch b/net/openssh/patches/140-pam_uclibc_pthreads_fix.patch deleted file mode 100644 index 1319b52..0000000 --- a/net/openssh/patches/140-pam_uclibc_pthreads_fix.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- a/auth-pam.c -+++ b/auth-pam.c -@@ -159,7 +159,7 @@ sshpam_sigchld_handler(int sig) - } - if (WIFSIGNALED(sshpam_thread_status) && - WTERMSIG(sshpam_thread_status) == SIGTERM) -- return; /* terminated by pthread_cancel */ -+ return; /* terminated by pthread2_cancel */ - if (!WIFEXITED(sshpam_thread_status)) - sigdie("PAM: authentication thread exited unexpectedly"); - if (WEXITSTATUS(sshpam_thread_status) != 0) -@@ -168,14 +168,14 @@ sshpam_sigchld_handler(int sig) - - /* ARGSUSED */ - static void --pthread_exit(void *value) -+pthread2_exit(void *value) - { - _exit(0); - } - - /* ARGSUSED */ - static int --pthread_create(sp_pthread_t *thread, const void *attr, -+pthread2_create(sp_pthread_t *thread, const void *attr, - void *(*thread_start)(void *), void *arg) - { - pid_t pid; -@@ -201,7 +201,7 @@ pthread_create(sp_pthread_t *thread, con - } - - static int --pthread_cancel(sp_pthread_t thread) -+pthread2_cancel(sp_pthread_t thread) - { - signal(SIGCHLD, sshpam_oldsig); - return (kill(thread, SIGTERM)); -@@ -209,7 +209,7 @@ pthread_cancel(sp_pthread_t thread) - - /* ARGSUSED */ - static int --pthread_join(sp_pthread_t thread, void **value) -+pthread2_join(sp_pthread_t thread, void **value) - { - int status; - -@@ -510,7 +510,7 @@ sshpam_thread(void *ctxtp) - /* XXX - can't do much about an error here */ - ssh_msg_send(ctxt->pam_csock, sshpam_err, &buffer); - buffer_free(&buffer); -- pthread_exit(NULL); -+ pthread2_exit(NULL); - - auth_fail: - buffer_put_cstring(&buffer, -@@ -521,7 +521,7 @@ sshpam_thread(void *ctxtp) - else - ssh_msg_send(ctxt->pam_csock, PAM_AUTH_ERR, &buffer); - buffer_free(&buffer); -- pthread_exit(NULL); -+ pthread2_exit(NULL); - - return (NULL); /* Avoid warning for non-pthread case */ - } -@@ -533,8 +533,8 @@ sshpam_thread_cleanup(void) - - debug3("PAM: %s entering", __func__); - if (ctxt != NULL && ctxt->pam_thread != 0) { -- pthread_cancel(ctxt->pam_thread); -- pthread_join(ctxt->pam_thread, NULL); -+ pthread2_cancel(ctxt->pam_thread); -+ pthread2_join(ctxt->pam_thread, NULL); - close(ctxt->pam_psock); - close(ctxt->pam_csock); - memset(ctxt, 0, sizeof(*ctxt)); -@@ -698,7 +698,7 @@ sshpam_init_ctx(Authctxt *authctxt) - } - ctxt->pam_psock = socks[0]; - ctxt->pam_csock = socks[1]; -- if (pthread_create(&ctxt->pam_thread, NULL, sshpam_thread, ctxt) == -1) { -+ if (pthread2_create(&ctxt->pam_thread, NULL, sshpam_thread, ctxt) == -1) { - error("PAM: failed to start authentication thread: %s", - strerror(errno)); - close(socks[0]); diff --git a/net/openssh/patches/200-dscp-qos.patch b/net/openssh/patches/200-dscp-qos.patch deleted file mode 100644 index 827a668..0000000 --- a/net/openssh/patches/200-dscp-qos.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/ssh_config -+++ b/ssh_config -@@ -46,3 +46,6 @@ - # VisualHostKey no - # ProxyCommand ssh -q -W %h:%p gateway.example.com - # RekeyLimit 1G 1h -+ -+# enable DSCP QoS values (per RFC-4594) -+#IPQoS AF21 AF11 ---- a/sshd_config -+++ b/sshd_config -@@ -122,6 +122,9 @@ UsePrivilegeSeparation sandbox # Defaul - # no default banner path - #Banner none - -+# enable DSCP QoS values (per RFC-4594) -+#IPQoS AF21 AF11 -+ - # override default of no subsystems - Subsystem sftp /usr/libexec/sftp-server - diff --git a/net/opentracker/Makefile b/net/opentracker/Makefile deleted file mode 100644 index e476332..0000000 --- a/net/opentracker/Makefile +++ /dev/null @@ -1,106 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=opentracker -PKG_VERSION:=20151211 -PKG_RELEASE:=2 -PKG_REV:=ba25d2b2a84a31eac2956b71cb12b4b0748b35f5 -PKG_MAINTAINER:=Daniel Golle -PKG_LICENSE:=Beerware - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=git://erdgeist.org/opentracker -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_PROTO:=git -PKG_BUILD_DEPENDS:=libowfat -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/opentracker/Default - SUBMENU:=BitTorrent - SECTION:=net - CATEGORY:=Network - TITLE:=opentracker - URL:=http://erdgeist.org/arts/software/opentracker/ - DEPENDS:=+zlib +libpthread -endef - -define Package/opentracker -$(call Package/opentracker/Default) - VARIANT:=ipv4 -endef - -define Package/opentracker6 -$(call Package/opentracker/Default) - TITLE+= (IPv6 build) - VARIANT:=ipv6 -endef - - -define Package/opentracker-default/description - opentracker - An open and free bittorrent tracker - - opentracker is an open and free bittorrent tracker project. - It aims for minimal resource usage and is intended to run at your wlan router. - Currently it is deployed as an open and free tracker instance. - Read our free and open tracker blog and announce your torrents there - (but do not hesitate to setup your own free trackers!). -endef - -define Package/opentracker/description - $(call Package/opentracker-default/description) - - This package contains the IPv4-build of opentracker. - -endef - -define Package/opentracker6/description - $(call Package/opentracker-default/description) - - This package contains the IPv6-build of opentracker. - -endef - - -MAKE_FLAGS += PREFIX="$(STAGING_DIR)/usr" - -ifeq ($(BUILD_VARIANT),ipv6) - MAKE_FLAGS += FEATURES="-DWANT_V6" -endif - -define Package/opentracker/conffiles -/etc/opentracker.conf -endef - -define Package/opentracker6/conffiles -/etc/opentracker6.conf -endef - -define Package/opentracker/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/opentracker $(1)/usr/bin - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/opentracker.conf.sample $(1)/etc/opentracker.conf - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/opentracker.init $(1)/etc/init.d/opentracker -endef - -define Package/opentracker6/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/opentracker $(1)/usr/bin/opentracker6 - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/opentracker.conf.sample $(1)/etc/opentracker6.conf - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/opentracker6.init $(1)/etc/init.d/opentracker6 -endef - -$(eval $(call BuildPackage,opentracker)) -$(eval $(call BuildPackage,opentracker6)) diff --git a/net/opentracker/files/opentracker.init b/net/opentracker/files/opentracker.init deleted file mode 100755 index 91fb386..0000000 --- a/net/opentracker/files/opentracker.init +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=10 -STOP=15 - -NAME="opentracker" -PROG="/usr/bin/opentracker" -OPTIONS="-f /etc/opentracker.conf" -USE_PROCD=1 - -start_service() -{ - procd_open_instance - procd_set_param command $PROG $OPTIONS - procd_close_instance -} diff --git a/net/opentracker/files/opentracker6.init b/net/opentracker/files/opentracker6.init deleted file mode 100755 index 02417f3..0000000 --- a/net/opentracker/files/opentracker6.init +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=10 -STOP=15 - -NAME="opentracker6" -PROG="/usr/bin/opentracker6" -OPTIONS="-f /etc/opentracker6.conf" -USE_PROCD=1 - -start_service() -{ - procd_open_instance - procd_set_param command $PROG $OPTIONS - procd_close_instance -} diff --git a/net/opentracker/patches/100-makefile.patch b/net/opentracker/patches/100-makefile.patch deleted file mode 100644 index bbaf8d9..0000000 --- a/net/opentracker/patches/100-makefile.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -9,13 +9,13 @@ CC?=gcc - - # BSD flavour - # PREFIX?=/usr/local --# LIBOWFAT_HEADERS=$(PREFIX)/include/libowfat --# LIBOWFAT_LIBRARY=$(PREFIX)/lib -+LIBOWFAT_HEADERS=$(PREFIX)/include/libowfat -+LIBOWFAT_LIBRARY=$(PREFIX)/lib - - # Debug flavour --PREFIX?=.. --LIBOWFAT_HEADERS=$(PREFIX)/libowfat --LIBOWFAT_LIBRARY=$(PREFIX)/libowfat -+# PREFIX?=.. -+# LIBOWFAT_HEADERS=$(PREFIX)/libowfat -+# LIBOWFAT_LIBRARY=$(PREFIX)/libowfat - - BINDIR?=$(PREFIX)/bin - -@@ -66,7 +66,7 @@ CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $ - - $(BINARY): $(OBJECTS) $(HEADERS) - $(CC) -o $@ $(OBJECTS) $(LDFLAGS) -- strip $@ -+ $(STRIP) $@ - $(BINARY).debug: $(OBJECTS_debug) $(HEADERS) - $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS) - proxy: $(OBJECTS_proxy) $(HEADERS) diff --git a/net/openvswitch/Makefile b/net/openvswitch/Makefile deleted file mode 100644 index 2a0fcf6..0000000 --- a/net/openvswitch/Makefile +++ /dev/null @@ -1,229 +0,0 @@ -# -# Copyright (C) 2013 Julius Schulz-Zander -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# $Id: Makefile $ - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=openvswitch - -PKG_RELEASE:=7 -PKG_VERSION:=2.5.0 -PKG_RELEASE=$(PKG_SOURCE_VERSION) -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=COPYING -PKG_USE_MIPS16:=0 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/openvswitch/ovs -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=22d4614ddf83988a3771fb379ea029e663b4455a -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -# Upstream package supports kernels between 2.6.32 and 4.3 -# see https://github.com/openvswitch/ovs/blob/master/FAQ.md -# This list is pruned to only those kernels used in OpenWRT -# Support for kernel 4.4 is backported -SUPPORTED_KERNELS:=LINUX_3_18||LINUX_4_1||LINUX_4_3||LINUX_4_4 - -# If only kmod-openvswitch is enabled, then override default make path to only -# build and install the datapath/linux subdirectory which cuts down compilation -# time dramatically. -ifeq ($(CONFIG_PACKAGE_openvswitch-base),) - ifneq ($(CONFIG_PACKAGE_kmod-openvswitch),) - MAKE_PATH := datapath/linux - endif -endif - -# Additionally register PKG_CONFIG_DEPENDS to trigger a rebuild of the code -# base if the package selection changes. -PKG_CONFIG_DEPENDS := \ - CONFIG_PACKAGE_openvswitch-base \ - CONFIG_PACKAGE_kmod-openvswitch - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/openvswitch/Default - SECTION:=net - SUBMENU:=Open vSwitch - CATEGORY:=Network - URL:=http://openvswitch.org/ - MAINTAINER:=Alexandru Ardelean -endef - -define Package/openvswitch/Default/description - Open vSwitch is a production quality, multilayer, software-based, Ethernet - virtual switch. It is designed to enable massive network automation through - programmatic extension, while still supporting standard management interfaces - and protocols (e.g. NetFlow, sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag). In - addition, it is designed to support distribution across multiple physical - servers similar to VMware's vNetwork distributed vswitch or Cisco's Nexus - 1000V. -endef - -define Package/openvswitch-base - $(call Package/openvswitch/Default) - TITLE:=Open vSwitch Userspace Package (base) - DEPENDS:=+libpcap +libopenssl +librt +kmod-openvswitch @($(SUPPORTED_KERNELS)) -endef - -define Package/openvswitch-base/description - Provides the main userspace components required for Open vSwitch to function. - The main OVS tools (ovs-vsctl, ovs-ofctl, etc) are packaged separately - to conserve some room and allow more configurability. -endef - -define Package/openvswitch-python - $(call Package/openvswitch/Default) - TITLE:=Open vSwitch Python Support - DEPENDS:=+openvswitch +PACKAGE_openvswitch-python: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 GRE through IPsec tool - DEPENDS:=+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 flow setup benchmark utility - DEPENDS:=+openvswitch -endef - -define Package/openvswitch-benchmark/description - Utility for running OpenVSwitch benchmarking -endef - -OVS_BIN_TOOLS:=ovs-appctl ovs-ofctl ovs-dpctl ovs-vsctl ovsdb-client -define Package/openvswitch - $(call Package/openvswitch/Default) - TITLE:=Open vSwitch Userspace Package - DEPENDS:=+openvswitch-base $(foreach t,$(OVS_BIN_TOOLS),+openvswitch-$(t)) -endef - -define Package/openvswitch/description - Provides the main userspace components required for Open vSwitch to function. - Includes also the main OVS utilities (ovs-appctl, ovs-vsctl, etc). -endef - -define KernelPackage/openvswitch - SECTION:=kernel - CATEGORY:=Kernel modules - SUBMENU:=Network Support - TITLE:=Open vSwitch Kernel Package - KCONFIG:=CONFIG_BRIDGE - DEPENDS:=+kmod-stp @IPV6 +kmod-gre +kmod-lib-crc32c +kmod-vxlan +kmod-nf-conntrack +kmod-nf-conntrack6 @($(SUPPORTED_KERNELS)) - FILES:= \ - $(PKG_BUILD_DIR)/datapath/linux/openvswitch.$(LINUX_KMOD_SUFFIX) - AUTOLOAD:=$(call AutoLoad,21,openvswitch) -endef - -define KernelPackage/openvswitch/description - This package contains the Open vSwitch kernel moodule and bridge compat - module. Furthermore, it supports OpenFlow. -endef - -CONFIGURE_ARGS += --with-linux=$(LINUX_DIR) --with-rundir=/var/run -CONFIGURE_ARGS += --enable-ndebug -CONFIGURE_ARGS += --disable-ssl -CONFIGURE_ARGS += --enable-shared - -TARGET_CFLAGS += -flto -std=gnu99 - -CONFIGURE_VARS += KARCH=$(LINUX_KARCH) -MAKE_FLAGS += ARCH="$(LINUX_KARCH)" - -define OvsBinUtility - define Package/openvswitch-$(1) - $(call Package/openvswitch/Default) - TITLE:=$(2) - DEPENDS:=+openvswitch-base - endef - - define Package/openvswitch-$(1)/description - $(2) - endef - - define Package/openvswitch-$(1)/install - $(INSTALL_DIR) $$(1)/usr/bin/ ;\ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/ - endef -endef - -define Package/openvswitch-base/install - $(INSTALL_DIR) $(1)/etc/openvswitch - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/etc/init.d/openvswitch.init $(1)/etc/init.d/openvswitch - - $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libofproto.so* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopenvswitch.so* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libovsdb.so* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsflow.so* $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ovsdb-tool $(1)/usr/bin/ - - $(INSTALL_DIR) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ovs-vswitchd $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ovsdb-server $(1)/usr/sbin/ - - $(INSTALL_DIR) $(1)/usr/share/openvswitch/ - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/share/openvswitch/vswitch.ovsschema $(1)/usr/share/openvswitch/ -endef - -define Package/openvswitch-python/install - $(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/ovs - $(CP) $(PKG_INSTALL_DIR)/usr/share/openvswitch/python/ovs/* $(1)/usr/lib/python$(PYTHON_VERSION)/ovs -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_INSTALL_DIR)/usr/bin/ovs-benchmark $(1)/usr/bin/ -endef - -define Package/openvswitch/install - : -endef - -$(eval $(call OvsBinUtility,ovs-appctl,Open vSwitch app control utility)) -$(eval $(call OvsBinUtility,ovs-ofctl,Open vSwitch OpenFlow control utility)) -$(eval $(call OvsBinUtility,ovs-dpctl,Open vSwitch datapath management utility)) -$(eval $(call OvsBinUtility,ovs-vsctl,Open vSwitch ovs-vswitchd management utility)) -$(eval $(call OvsBinUtility,ovsdb-client,Open vSwitch database JSON-RPC client)) - -$(foreach t,$(OVS_BIN_TOOLS),$(eval $(call BuildPackage,openvswitch-$(t)))) - -$(eval $(call BuildPackage,openvswitch-base)) -$(eval $(call BuildPackage,openvswitch-python)) -$(eval $(call BuildPackage,openvswitch-ipsec)) -$(eval $(call BuildPackage,openvswitch-benchmark)) -$(eval $(call BuildPackage,openvswitch)) -$(eval $(call KernelPackage,openvswitch)) - diff --git a/net/openvswitch/files/etc/init.d/openvswitch.init b/net/openvswitch/files/etc/init.d/openvswitch.init deleted file mode 100644 index ffe879a..0000000 --- a/net/openvswitch/files/etc/init.d/openvswitch.init +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2013 Julius Schulz-Zander -# Copyright (C) 2014 OpenWrt.org - -START=15 -USE_PROCD=1 - -start_service() { - [ -x /var/run/openvswitch ] || mkdir -p /var/run/openvswitch - [ -e /etc/openvswitch/conf.db ] || { - /usr/bin/ovsdb-tool create /etc/openvswitch/conf.db /usr/share/openvswitch/vswitch.ovsschema - } - - # ovsdb-server - procd_open_instance - procd_set_param command /usr/sbin/ovsdb-server - procd_append_param command --remote=punix:/var/run/db.sock - procd_append_param command --remote=db:Open_vSwitch,Open_vSwitch,manager_options - procd_append_param command --pidfile=/var/run/ovsdb-server.pid - procd_set_param respawn - procd_append_param respawn 3600 - procd_append_param respawn 5 - procd_append_param respawn -1 - procd_set_param nice - procd_append_param nice -10 - procd_close_instance - - # ovs-vswitchd - procd_open_instance - procd_set_param command /usr/sbin/ovs-vswitchd - procd_append_param command --pidfile=/var/run/ovs-vswitchd.pid - procd_set_param respawn - procd_append_param respawn 3600 - procd_append_param respawn 5 - procd_append_param respawn -1 - procd_set_param nice - procd_append_param nice -10 - procd_close_instance - -} - diff --git a/net/openvswitch/patches/0001-netdev-linux-Use-unsigned-int-for-ifi_flags.patch b/net/openvswitch/patches/0001-netdev-linux-Use-unsigned-int-for-ifi_flags.patch deleted file mode 100644 index ed537d1..0000000 --- a/net/openvswitch/patches/0001-netdev-linux-Use-unsigned-int-for-ifi_flags.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 12edcd800d924f69630768eeece842373dee5bb0 Mon Sep 17 00:00:00 2001 -From: Helmut Schaa -Date: Wed, 8 Jan 2014 13:48:33 +0100 -Subject: [PATCH 1/2] netdev-linux: Use unsigned int for ifi_flags - -ifi_flags is unsigned, the local equivalents should do the same. - -Signed-off-by: Helmut Schaa ---- - lib/netdev-linux.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c -index 9bdbbdf..9eaac33 100644 ---- a/lib/netdev-linux.c -+++ b/lib/netdev-linux.c -@@ -2709,7 +2709,7 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off, - enum netdev_flags on, enum netdev_flags *old_flagsp) - OVS_REQUIRES(netdev->mutex) - { -- int old_flags, new_flags; -+ unsigned int old_flags, new_flags; - int error = 0; - - old_flags = netdev->ifi_flags; --- -1.8.1.4 - diff --git a/net/openvswitch/patches/0002-netdev-linux-Let-interface-flag-survive-internal-por.patch b/net/openvswitch/patches/0002-netdev-linux-Let-interface-flag-survive-internal-por.patch deleted file mode 100644 index b31816a..0000000 --- a/net/openvswitch/patches/0002-netdev-linux-Let-interface-flag-survive-internal-por.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b9284f535e93c337ab21f330753e60e1038f9a27 Mon Sep 17 00:00:00 2001 -From: Helmut Schaa -Date: Wed, 8 Jan 2014 13:48:49 +0100 -Subject: [PATCH 2/2] netdev-linux: Let interface flag survive internal port - setup - -Due to a race condition when bringing up an internal port on Linux -some interface flags (e.g. IFF_MULTICAST) are falsely reset. This -happens because netlink events may be processed after the according -netdev has been brought up (which sets interface flags). - -Fix this by reading the interface flags just before updating them -if they have not been updated by from the kernel yet. - -Signed-off-by: Helmut Schaa ---- - lib/netdev-linux.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c -index 9eaac33..423e72e 100644 ---- a/lib/netdev-linux.c -+++ b/lib/netdev-linux.c -@@ -2712,7 +2712,13 @@ update_flags(struct netdev_linux *netdev, enum netdev_flags off, - unsigned int old_flags, new_flags; - int error = 0; - -- old_flags = netdev->ifi_flags; -+ if (!(netdev->cache_valid & VALID_DRVINFO)) { -+ /* Most likely the debvice flags are not in sync yet, fetch them now */ -+ get_flags(&netdev->up, &old_flags); -+ } else { -+ old_flags = netdev->ifi_flags; -+ } -+ - *old_flagsp = iff_to_nd_flags(old_flags); - new_flags = (old_flags & ~nd_to_iff_flags(off)) | nd_to_iff_flags(on); - if (new_flags != old_flags) { --- -1.8.1.4 - diff --git a/net/openvswitch/patches/0004-musl-compatibility.patch b/net/openvswitch/patches/0004-musl-compatibility.patch deleted file mode 100644 index ddcc5fc..0000000 --- a/net/openvswitch/patches/0004-musl-compatibility.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index e6a23a6..8a7c6d6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -118,7 +118,6 @@ OVS_CHECK_XENSERVER_VERSION - OVS_CHECK_GROFF - OVS_CHECK_GNU_MAKE - OVS_CHECK_TLS --OVS_CHECK_ATOMIC_LIBS - OVS_CHECK_GCC4_ATOMICS - OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(1) - OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(2) -diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c -index 712cb5a..e840f10 100644 ---- a/lib/netdev-linux.c -+++ b/lib/netdev-linux.c -@@ -40,7 +40,9 @@ - #include - #include - #include -+#if defined(__UCLIBC__) || defined(__GLIBC__) - #include -+#endif - #include - #include - #include -diff --git a/lib/ovs-atomic.h b/lib/ovs-atomic.h -index 9ead907..0a131d7 100644 ---- a/lib/ovs-atomic.h -+++ b/lib/ovs-atomic.h -@@ -318,7 +318,7 @@ - #include "util.h" - - #define IN_OVS_ATOMIC_H -- #if __CHECKER__ -+ #if 1 - /* sparse doesn't understand some GCC extensions we use. */ - #include "ovs-atomic-pthreads.h" - #elif __has_extension(c_atomic) diff --git a/net/openvswitch/patches/0008-add-back-old-gfp-this-node-define.patch b/net/openvswitch/patches/0008-add-back-old-gfp-this-node-define.patch deleted file mode 100644 index ec7d325..0000000 --- a/net/openvswitch/patches/0008-add-back-old-gfp-this-node-define.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/datapath/flow.c b/datapath/flow.c -index a7a2063..8db8041 100644 ---- a/datapath/flow.c -+++ b/datapath/flow.c -@@ -51,6 +51,14 @@ - - #include "vlan.h" - -+#ifndef GFP_THISNODE -+#ifdef CONFIG_NUMA -+#define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY) -+#else -+#define GFP_THISNODE ((__force gfp_t)0) -+#endif -+#endif -+ - u64 ovs_flow_used_time(unsigned long flow_jiffies) - { - struct timespec cur_ts; diff --git a/net/openvswitch/patches/0009-fix-test-ovn.patch b/net/openvswitch/patches/0009-fix-test-ovn.patch deleted file mode 100644 index 10bd37a..0000000 --- a/net/openvswitch/patches/0009-fix-test-ovn.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/tests/test-ovn.c -+++ b/tests/test-ovn.c -@@ -1043,7 +1043,7 @@ wait_pid(pid_t *pids, int *n) - int status; - pid_t pid; - -- pid = waitpid(WAIT_ANY, &status, 0); -+ pid = waitpid(-1, &status, 0); - if (pid < 0) { - ovs_fatal(errno, "waitpid failed"); - } else if (WIFEXITED(status)) { diff --git a/net/openvswitch/patches/0010-lib-ovs-thread-Ensure-that-thread-stacks-are-always-.patch b/net/openvswitch/patches/0010-lib-ovs-thread-Ensure-that-thread-stacks-are-always-.patch deleted file mode 100644 index 88f5d26..0000000 --- a/net/openvswitch/patches/0010-lib-ovs-thread-Ensure-that-thread-stacks-are-always-.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 8147cec9ee8feea9440cf79365709ddc32ff57d5 Mon Sep 17 00:00:00 2001 -From: Alexandru Ardelean -Date: Thu, 4 Feb 2016 09:20:34 +0200 -Subject: [PATCH] lib/ovs-thread: Ensure that thread stacks are always at least - 512 kB. - -This makes a difference for libc implementations (such as musl libc) that -have a really small default pthread stack size. - -Will reference this discussion: -http://patchwork.ozlabs.org/patch/572340/ - -Reported-by: Robert McKay -Signed-off-by: Alexandru Ardelean -[blp@ovn.org made style changes] -Signed-off-by: Ben Pfaff ---- - lib/ovs-thread.c | 29 +++++++++++++++++++++++++++++ - 1 file changed, 29 insertions(+) - -diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c -index 6ebda07..b0e10ee 100644 ---- a/lib/ovs-thread.c -+++ b/lib/ovs-thread.c -@@ -340,6 +340,25 @@ ovsthread_wrapper(void *aux_) - return aux.start(aux.arg); - } - -+static void -+set_min_stack_size(pthread_attr_t *attr, size_t min_stacksize) -+{ -+ size_t stacksize; -+ int error; -+ -+ error = pthread_attr_getstacksize(attr, &stacksize); -+ if (error) { -+ ovs_abort(error, "pthread_attr_getstacksize failed"); -+ } -+ -+ if (stacksize < min_stacksize) { -+ error = pthread_attr_setstacksize(attr, min_stacksize); -+ if (error) { -+ ovs_abort(error, "pthread_attr_setstacksize failed"); -+ } -+ } -+} -+ - /* Starts a thread that calls 'start(arg)'. Sets the thread's name to 'name' - * (suffixed by its ovsthread_id()). Returns the new thread's pthread_t. */ - pthread_t -@@ -358,10 +377,20 @@ ovs_thread_create(const char *name, void *(*start)(void *), void *arg) - aux->arg = arg; - ovs_strlcpy(aux->name, name, sizeof aux->name); - -- error = pthread_create(&thread, NULL, ovsthread_wrapper, aux); -+ /* Some small systems use a default stack size as small as 80 kB, but OVS -+ * requires approximately 384 kB according to the following analysis: -+ * http://openvswitch.org/pipermail/dev/2016-January/065049.html -+ * -+ * We use 512 kB to give us some margin of error. */ -+ pthread_attr_t attr; -+ pthread_attr_init(&attr); -+ set_min_stack_size(&attr, 512 * 1024); -+ -+ error = pthread_create(&thread, &attr, ovsthread_wrapper, aux); - if (error) { - ovs_abort(error, "pthread_create failed"); - } -+ pthread_attr_destroy(&attr); - return thread; - } - --- -2.1.4 - diff --git a/net/openvswitch/patches/0011-kernel-4-4-support.patch b/net/openvswitch/patches/0011-kernel-4-4-support.patch deleted file mode 100644 index 1a492e4..0000000 --- a/net/openvswitch/patches/0011-kernel-4-4-support.patch +++ /dev/null @@ -1,279 +0,0 @@ -diff --git a/acinclude.m4 b/acinclude.m4 -index 11c7787..07dd647 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -134,10 +134,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [ - AC_MSG_RESULT([$kversion]) - - if test "$version" -ge 4; then -- if test "$version" = 4 && test "$patchlevel" -le 3; then -+ if test "$version" = 4 && test "$patchlevel" -le 4; then - : # Linux 4.x - else -- AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.3.x is not supported (please refer to the FAQ for advice)]) -+ AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.4.x is not supported (please refer to the FAQ for advice)]) - fi - elif test "$version" = 3; then - : # Linux 3.x -diff --git a/datapath/actions.c b/datapath/actions.c -index 20413c9..719c43d 100644 ---- a/datapath/actions.c -+++ b/datapath/actions.c -@@ -706,7 +706,8 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru, - skb_dst_set_noref(skb, &ovs_dst); - IPCB(skb)->frag_max_size = mru; - -- ip_do_fragment(skb->sk, skb, ovs_vport_output); -+ ip_do_fragment(NET_ARG(dev_net(ovs_dst.dev)) -+ skb->sk, skb, ovs_vport_output); - refdst_drop(orig_dst); - } else if (ethertype == htons(ETH_P_IPV6)) { - const struct nf_ipv6_ops *v6ops = nf_get_ipv6_ops(); -@@ -727,7 +728,8 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru, - skb_dst_set_noref(skb, &ovs_rt.dst); - IP6CB(skb)->frag_max_size = mru; - -- v6ops->fragment(skb->sk, skb, ovs_vport_output); -+ v6ops->fragment(NET_ARG(dev_net(ovs_rt.dst.dev)) -+ skb->sk, skb, ovs_vport_output); - refdst_drop(orig_dst); - } else { - WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.", -diff --git a/datapath/conntrack.c b/datapath/conntrack.c -index 795ed91..3b9bfba 100644 ---- a/datapath/conntrack.c -+++ b/datapath/conntrack.c -@@ -323,7 +323,7 @@ static int handle_fragments(struct net *net, struct sw_flow_key *key, - int err; - - memset(IPCB(skb), 0, sizeof(struct inet_skb_parm)); -- err = ip_defrag(skb, user); -+ err = ip_defrag(NET_ARG(net) skb, user); - if (err) - return err; - -@@ -374,7 +374,7 @@ ovs_ct_expect_find(struct net *net, const struct nf_conntrack_zone *zone, - { - struct nf_conntrack_tuple tuple; - -- if (!nf_ct_get_tuplepr(skb, skb_network_offset(skb), proto, &tuple)) -+ if (!nf_ct_get_tuplepr(skb, skb_network_offset(skb), proto, NET_ARG(net) &tuple)) - return NULL; - return __nf_ct_expect_find(net, zone, &tuple); - } -diff --git a/datapath/datapath.c b/datapath/datapath.c -index e3d3c8c..a4157f4 100644 ---- a/datapath/datapath.c -+++ b/datapath/datapath.c -@@ -96,8 +96,12 @@ static bool ovs_must_notify(struct genl_family *family, struct genl_info *info, - static void ovs_notify(struct genl_family *family, struct genl_multicast_group *grp, - struct sk_buff *skb, struct genl_info *info) - { -- genl_notify(family, skb, genl_info_net(info), -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) -+ genl_notify(family, skb, info, GROUP_ID(grp), GFP_KERNEL); -+#else -+ genl_notify(family, skb, genl_info_net(info), - info->snd_portid, GROUP_ID(grp), info->nlhdr, GFP_KERNEL); -+#endif - } - - /** -diff --git a/datapath/linux/compat/include/linux/netfilter_ipv6.h b/datapath/linux/compat/include/linux/netfilter_ipv6.h -index 3939e14..b724623 100644 ---- a/datapath/linux/compat/include/linux/netfilter_ipv6.h -+++ b/datapath/linux/compat/include/linux/netfilter_ipv6.h -@@ -13,7 +13,7 @@ - * the callback parameter needs to be in the form that older kernels accept. - * We don't backport the other ipv6_ops as they're currently unused by OVS. */ - struct ovs_nf_ipv6_ops { -- int (*fragment)(struct sock *sk, struct sk_buff *skb, -+ int (*fragment)(NET_ARG(net) struct sock *sk, struct sk_buff *skb, - int (*output)(OVS_VPORT_OUTPUT_PARAMS)); - }; - #define nf_ipv6_ops ovs_nf_ipv6_ops -diff --git a/datapath/linux/compat/include/net/ip.h b/datapath/linux/compat/include/net/ip.h -index cd87bcc..b749301 100644 ---- a/datapath/linux/compat/include/net/ip.h -+++ b/datapath/linux/compat/include/net/ip.h -@@ -66,8 +66,20 @@ static inline unsigned int rpl_ip_skb_dst_mtu(const struct sk_buff *skb) - #define ip_skb_dst_mtu rpl_ip_skb_dst_mtu - #endif /* HAVE_IP_SKB_DST_MTU */ - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) -+#define NET_PARAM(x) struct net *x, -+#define NET_ARG(x) x, -+#define NET_DEV_NET(x) dev_net(x) -+#define NET_DECLARE_INIT(x,y) -+#else -+#define NET_PARAM(x) -+#define NET_ARG(x) -+#define NET_DEV_NET(x) -+#define NET_DECLARE_INIT(x,y) struct net *x = y; -+#endif -+ - #ifdef HAVE_IP_FRAGMENT_TAKES_SOCK --#define OVS_VPORT_OUTPUT_PARAMS struct sock *sock, struct sk_buff *skb -+#define OVS_VPORT_OUTPUT_PARAMS NET_PARAM(net) struct sock *sock, struct sk_buff *skb - #else - #define OVS_VPORT_OUTPUT_PARAMS struct sk_buff *skb - #endif -@@ -89,12 +101,13 @@ static inline bool ip_defrag_user_in_between(u32 user, - #endif /* < v4.2 */ - - #ifndef HAVE_IP_DO_FRAGMENT --static inline int rpl_ip_do_fragment(struct sock *sk, struct sk_buff *skb, -+static inline int rpl_ip_do_fragment(NET_PARAM(net) struct sock *sk, struct sk_buff *skb, - int (*output)(OVS_VPORT_OUTPUT_PARAMS)) - { - unsigned int mtu = ip_skb_dst_mtu(skb); - struct iphdr *iph = ip_hdr(skb); - struct rtable *rt = skb_rtable(skb); - struct net_device *dev = rt->dst.dev; -+ NET_DECLARE_INIT(net, dev_net(dev)); - - if (unlikely(((iph->frag_off & htons(IP_DF)) && !skb->ignore_df) || -@@ -102,7 +115,7 @@ static inline int rpl_ip_do_fragment(struct sock *sk, struct sk_buff *skb, - IPCB(skb)->frag_max_size > mtu))) { - - pr_warn("Dropping packet in ip_do_fragment()\n"); -- IP_INC_STATS(dev_net(dev), IPSTATS_MIB_FRAGFAILS); -+ IP_INC_STATS(net, IPSTATS_MIB_FRAGFAILS); - kfree_skb(skb); - return -EMSGSIZE; - } -@@ -116,8 +129,7 @@ static inline int rpl_ip_do_fragment(struct sock *sk, struct sk_buff *skb, - #define ip_do_fragment rpl_ip_do_fragment - #endif /* IP_DO_FRAGMENT */ - --int rpl_ip_defrag(struct sk_buff *skb, u32 user); --#define ip_defrag rpl_ip_defrag -+int rpl_ip_defrag(NET_PARAM(net) struct sk_buff *skb, u32 user); - - int __init rpl_ipfrag_init(void); - void rpl_ipfrag_fini(void); -@@ -127,14 +139,15 @@ void rpl_ipfrag_fini(void); - * ("inet: frag: Always orphan skbs inside ip_defrag()"), but it should be - * always included in kernels 4.5+. */ - #if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0) --static inline int rpl_ip_defrag(struct sk_buff *skb, u32 user) -+static inline int rpl_ip_defrag(NET_PARAM(net) struct sk_buff *skb, u32 user) - { - skb_orphan(skb); -- return ip_defrag(skb, user); -+ return ip_defrag(NET_ARG(net) skb, user); - } --#define ip_defrag rpl_ip_defrag - #endif - -+#define ip_defrag rpl_ip_defrag -+ - static inline int rpl_ipfrag_init(void) { return 0; } - static inline void rpl_ipfrag_fini(void) { } - #endif /* HAVE_CORRECT_MRU_HANDLING && OVS_FRAGMENT_BACKPORT */ -diff --git a/datapath/linux/compat/include/net/ip6_tunnel.h b/datapath/linux/compat/include/net/ip6_tunnel.h -index ce65087..eacf9ca 100644 ---- a/datapath/linux/compat/include/net/ip6_tunnel.h -+++ b/datapath/linux/compat/include/net/ip6_tunnel.h -@@ -17,11 +17,15 @@ static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb, - - pkt_len = skb->len - skb_inner_network_offset(skb); - /* TODO: Fix GSO for ipv6 */ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) -+ err = ip6_local_out(dev_net(dev), sk, skb); -+#else - #ifdef HAVE_IP6_LOCAL_OUT_SK - err = ip6_local_out_sk(sk, skb); - #else - err = ip6_local_out(skb); - #endif -+#endif /* >= kernel 4.4 */ - if (net_xmit_eval(err) != 0) - pkt_len = net_xmit_eval(err); - else -diff --git a/datapath/linux/compat/include/net/vxlan.h b/datapath/linux/compat/include/net/vxlan.h -index b50cd17..230f3ad 100644 ---- a/datapath/linux/compat/include/net/vxlan.h -+++ b/datapath/linux/compat/include/net/vxlan.h -@@ -218,10 +218,20 @@ struct vxlan_dev { - struct net_device *rpl_vxlan_dev_create(struct net *net, const char *name, - u8 name_assign_type, struct vxlan_config *conf); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) -+static inline __be16 vxlan_dev_dst_port(struct vxlan_dev *vxlan, -+ unsigned short family) -+{ -+ if (family == AF_INET6) -+ return inet_sk(vxlan->vn6_sock->sock->sk)->inet_sport; -+ return inet_sk(vxlan->vn4_sock->sock->sk)->inet_sport; -+} -+#else - static inline __be16 vxlan_dev_dst_port(struct vxlan_dev *vxlan) - { - return inet_sport(vxlan->vn_sock->sock->sk); - } -+#endif - - static inline netdev_features_t vxlan_features_check(struct sk_buff *skb, - netdev_features_t features) -diff --git a/datapath/linux/compat/ip_fragment.c b/datapath/linux/compat/ip_fragment.c -index cf2daaa..e168196 100644 ---- a/datapath/linux/compat/ip_fragment.c -+++ b/datapath/linux/compat/ip_fragment.c -@@ -674,11 +674,11 @@ out_fail: - } - - /* Process an incoming IP datagram fragment. */ --int rpl_ip_defrag(struct sk_buff *skb, u32 user) -+int rpl_ip_defrag(NET_ARG(net) struct sk_buff *skb, u32 user) - { - struct net_device *dev = skb->dev ? : skb_dst(skb)->dev; - int vif = vrf_master_ifindex_rcu(dev); -- struct net *net = dev_net(dev); -+ NET_DECLARE_INIT(net, dev_net(dev)); - struct ipq *qp; - - IP_INC_STATS_BH(net, IPSTATS_MIB_REASMREQDS); -diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c -index eb397e8..5ea3c52 100644 ---- a/datapath/linux/compat/stt.c -+++ b/datapath/linux/compat/stt.c -@@ -1450,7 +1450,11 @@ static void clean_percpu(struct work_struct *work) - } - - #ifdef HAVE_NF_HOOKFN_ARG_OPS -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) -+#define FIRST_PARAM void *priv -+#else - #define FIRST_PARAM const struct nf_hook_ops *ops -+#endif /* >= kernel 4.4 */ - #else - #define FIRST_PARAM unsigned int hooknum - #endif -@@ -1498,7 +1502,9 @@ static unsigned int nf_ip_hook(FIRST_PARAM, struct sk_buff *skb, LAST_PARAM) - - static struct nf_hook_ops nf_hook_ops __read_mostly = { - .hook = nf_ip_hook, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) - .owner = THIS_MODULE, -+#endif - .pf = NFPROTO_IPV4, - .hooknum = NF_INET_LOCAL_IN, - .priority = INT_MAX, -diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c -index c05f5d4..3cbb568 100644 ---- a/datapath/vport-vxlan.c -+++ b/datapath/vport-vxlan.c -@@ -153,7 +153,12 @@ static int vxlan_get_egress_tun_info(struct vport *vport, struct sk_buff *skb, - { - struct vxlan_dev *vxlan = netdev_priv(vport->dev); - struct net *net = ovs_dp_get_net(vport->dp); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0) -+ unsigned short family = ip_tunnel_info_af(upcall->egress_tun_info); -+ __be16 dst_port = vxlan_dev_dst_port(vxlan, family); -+#else - __be16 dst_port = vxlan_dev_dst_port(vxlan); -+#endif - __be16 src_port; - int port_min; - int port_max; diff --git a/net/p910nd/Makefile b/net/p910nd/Makefile deleted file mode 100644 index 2cdaaa9..0000000 --- a/net/p910nd/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (C) 2009-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=p910nd -PKG_VERSION:=0.97 -PKG_RELEASE:=5 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/p910nd -PKG_LICENSE:=GPLv2 -PKG_LICENSE_FILES:=COPYING -PKG_MD5SUM:=69461a6c54dca0b13ecad5b83864b43e -PKG_MAINTAINER:=Philipp Kerling - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/p910nd - SECTION:=net - CATEGORY:=Network - SUBMENU:=Printing - TITLE:=A small non-spooling printer server - URL:=http://p910nd.sourceforge.net -endef - -define Package/p910nd/conffiles -/etc/config/p910nd -endef - -define Package/p910nd/description - p910nd is a small daemon that copies any data received on - the port it is listening on to the corresponding printer - port. It is primarily intended for diskless Linux hosts - running as printer drivers but there is no reason why it - could not be used on diskful hosts. Port 9100 is copied - to /dev/lp0, 9101 to /dev/lp1 and 9102 to /dev/lp2. The - default is port 9100 to /dev/lp0. -endef - -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) -DLOCKFILE_DIR=\"\\\"/tmp\"\\\"" - -define Package/p910nd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/p910nd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/p910nd.config $(1)/etc/config/p910nd - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/p910nd.init $(1)/etc/init.d/p910nd -endef - -$(eval $(call BuildPackage,p910nd)) diff --git a/net/p910nd/files/p910nd.config b/net/p910nd/files/p910nd.config deleted file mode 100644 index d509035..0000000 --- a/net/p910nd/files/p910nd.config +++ /dev/null @@ -1,5 +0,0 @@ -config p910nd - option device /dev/usb/lp0 - option port 0 - option bidirectional 1 - option enabled 0 diff --git a/net/p910nd/files/p910nd.init b/net/p910nd/files/p910nd.init deleted file mode 100644 index f028903..0000000 --- a/net/p910nd/files/p910nd.init +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2007 OpenWrt.org -START=50 -USE_PROCD=1 - -append_bool() { - local section="$1" - local option="$2" - local value="$3" - local _val - config_get_bool _val "$section" "$option" '0' - [ "$_val" -gt 0 ] && append args "$3" -} - -append_string() { - local section="$1" - local option="$2" - local value="$3" - local _val - config_get _val "$section" "$option" - [ -n "$_val" ] && append args "$3$_val" -} - -start_service() { - config_load "p910nd" - config_foreach start_p910nd p910nd -} - - -start_p910nd() { - local section="$1" - config_get_bool "enabled" "$section" "enabled" '1' - if [ "$enabled" -gt 0 ]; then - args="-d " - config_get port "$section" port - name=p910${port}d - append_bool "$section" bidirectional "-b" - append_string "$section" device "-f " - append_string "$section" bind "-i " - append_string "$section" port "" - procd_open_instance $name - procd_set_param command /usr/sbin/p910nd $args - procd_close_instance - fi -} diff --git a/net/pen/Makefile b/net/pen/Makefile deleted file mode 100644 index 48d622c..0000000 --- a/net/pen/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pen -PKG_VERSION:=0.34.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://siag.nu/pub/pen/ -PKG_HASH:=a3306bfb02619b103ff431002bb91079048bf2dd24f739bf38e373860558cd27 - -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/pen - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libopenssl - TITLE:=Simple TCP load balancer - URL:=http://morestuff.siag.nu/category/pen/ -endef - -define Package/pen/description - This is pen, a load balancer for "simple" TCP based protocols - such as HTTP or SMTP. It allows several servers to appear as - one to the outside and automatically detects servers that are - down and distributes clients among the available servers. - This gives high availability and scalable performance. -endef - -CONFIGURE_ARGS += \ - --with-poll \ - --with-ssl="$(STAGING_DIR)/usr" \ - --without-geoip \ - -define Package/pen/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/mergelogs $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/pen $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/penctl $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/penlog $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/penlogd $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/penctl.cgi $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/penstats $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,pen)) diff --git a/net/pingcheck/Makefile b/net/pingcheck/Makefile deleted file mode 100644 index f6e152d..0000000 --- a/net/pingcheck/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (C) 2015 Bruno Randolf (br1@einfach.org) -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pingcheck -PKG_VERSION:=0.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/br101/pingcheck.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=0f099998782f550e2abebdc65bcc3e969b798769 - -PKG_MAINTAINER:=Bruno Randolf -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/pingcheck - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libubus +libuci - MAINTAINER:=Bruno Randolf - TITLE:=Check Internet and interface connectivity -endef - -define Package/pingcheck/description -Checks by using "ping" (ICMP echo) wether a configured host (normally on the -internet) can be reached via a specific interface. Then makes this information -available via ubus and triggers "online" and "offline" scripts. -endef - -define Package/pingcheck/conffiles -/etc/config/pingcheck -endef - -define Package/pingcheck/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/pingcheck $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./pingcheck.init $(1)/etc/init.d/pingcheck - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) $(PKG_BUILD_DIR)/pingcheck.config $(1)/etc/config/pingcheck -endef - -$(eval $(call BuildPackage,pingcheck)) diff --git a/net/pingcheck/pingcheck.init b/net/pingcheck/pingcheck.init deleted file mode 100755 index edb04b1..0000000 --- a/net/pingcheck/pingcheck.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 - -USE_PROCD=1 -PROG=/usr/sbin/pingcheck -CONFFILE=/etc/config/pingcheck - -start_service() { - procd_open_instance - procd_set_param command $PROG - procd_set_param file $CONFFILE - procd_set_param respawn - procd_close_instance -} diff --git a/net/polipo/Makefile b/net/polipo/Makefile deleted file mode 100644 index 48c24a1..0000000 --- a/net/polipo/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (C) 2007-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=polipo -PKG_VERSION:=1.1.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/$(PKG_NAME)/ -PKG_MD5SUM:=86939e331e656f638271f578b6e3f893 - -include $(INCLUDE_DIR)/package.mk - -define Package/polipo - SUBMENU:=Web Servers/Proxies - SECTION:=net - CATEGORY:=Network - TITLE:=A caching web proxy - URL:=http://www.pps.univ-paris-diderot.fr/~jch/software/polipo/ - MAINTAINER:=Gabriel Kerneis -endef - -define Package/polipo/description - Polipo is a small and fast caching web proxy (a web cache, an HTTP proxy, - a proxy server). While Polipo was designed to be used by one person or a - small group of people, there is nothing that prevents it from being used - by a larger group. -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - polipo -endef - -define Package/polipo/conffiles -/etc/config/polipo -/etc/polipo/config -endef - -define Package/polipo/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/polipo $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/polipo - $(INSTALL_CONF) $(PKG_BUILD_DIR)/config.sample $(1)/etc/polipo/config - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/polipo.config $(1)/etc/config/polipo - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/polipo.init $(1)/etc/init.d/polipo -endef - -$(eval $(call BuildPackage,polipo)) diff --git a/net/polipo/files/polipo.config b/net/polipo/files/polipo.config deleted file mode 100644 index 47f4a57..0000000 --- a/net/polipo/files/polipo.config +++ /dev/null @@ -1,42 +0,0 @@ -# polipo daemon configuration -config 'polipo' 'daemon' - # daemonise polipo (fork in background) - option 'daemonise' '1' - # where polipo will store its process pid - option 'pidFile' '/var/run/polipo.pid' - -config 'polipo' 'general' - option 'enabled' '1' - # address on which polipo will listen, 0.0.0.0 means all addresses - option 'proxyAddress' '0.0.0.0' - # port on which polipo will listen, default is 8123 - #option 'proxyPort' '8123' - # list of allowed clients to connect - list 'allowedClients' '192.168.1.0/24' - #list 'allowedClients' '127.0.0.1' - #list 'allowedClients' '192.168.2.1' - # how much RAM memory should Polipo use (in bytes). - option 'chunkHighMark' '1048576' - # enable disk cache index and serverlist of integrated polipo web interface - #option 'disableIndexing' '0' - #option 'disableServersList' '0' - # disable loging to syslog - option 'logSyslog' '0' - # set log file location (disabled when not set) - #option 'logFile' '/mnt/usbdrive/polipo/log' - -config 'polipo' 'cache' - # disk cache location, you should always use external storage device - # (disabled when not set) - #option 'diskCacheRoot' '/mnt/usbdrive-p2/polipo/cache' - # disk cache cleanup settings - #option 'diskCacheUnlinkTime' '20d' - #option 'diskCacheTruncateTime' '5d' - #option 'diskCacheTruncateSize' '3145728' - # set to 1 if proxy is used by multiple users - #option 'cacheIsShared' '1' - -config 'polipo' 'pmm' - # poor man's multiplexing semgnet size to fetch - #option 'pmmSize' '8192' - diff --git a/net/polipo/files/polipo.init b/net/polipo/files/polipo.init deleted file mode 100644 index 3cd73d4..0000000 --- a/net/polipo/files/polipo.init +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008-2011 OpenWrt.org - -START=99 - -CFGFILE=/var/etc/polipo.conf - -start() { - config_load 'polipo' - - config_get_bool enabled "general" 'enabled' '0' - [ $enabled -gt 0 ] || return 1 - - mkdir -m 0755 -p /var/etc/ - echo '### AUTOGENERATED CONFIGURATION' > $CFGFILE - echo '### DO NOT EDIT' >> $CFGFILE - echo '### SEE /etc/config/polipo INSTEAD' >> $CFGFILE - echo '' >> $CFGFILE - - config_foreach polipo_config 'polipo' - - # handle values that are disabled when not defined or empty - echo "### VALUES THAT ARE DISABLED WHEN EMPTY" >> $CFGFILE - polipo_atom "cache" "diskCacheRoot" '"' "1" >> $CFGFILE - polipo_atom "general" "logFile" '"' "1" >> $CFGFILE - polipo_atom "general" "localDocumentRoot" '"' "1" >> $CFGFILE - - service_start /usr/sbin/polipo -c "$CFGFILE" -} - -stop() { - service_stop /usr/sbin/polipo -c "$CFGFILE" -} - -polipo_config() { - echo "### SECTION $1" >> $CFGFILE - - string_options='authCredentials authRealm dnsNameServer forbiddenFile - forbiddenUrl logFacility pidFile parentAuthCredentials parentProxy - proxyAddress proxyName redirector socksParentProxy socksProxyType - socksUserName uncachableFile' - - number_options='bigBufferSize chunkCriticalMark chunkHighMark chunkLowMark - diskCacheDirectoryPermissions diskCacheFilePermissions - diskCacheTruncateSize diskCacheWriteoutOnClose forbiddenRedirectCode - logFilePermissions logLevel maxDiskCacheEntrySize maxDiskEntries - maxObjectsWhenIdle maxPipelineTrain maxSideBuffering maxWriteoutWhenIdle - objectHashTableSize objectHighMark pmmFirstSize pmmSize proxyPort - publicObjectLowMark redirectorRedirectCode replyUnpipelineSize - serverMaxSlots serverSlots serverSlots1 maxAgeFraction' - - time_options='clientTimeout diskCacheTruncateTime diskCacheUnlinkTime - dnsGethostbynameTtl dnsMaxTimeout dnsNegativeTtl idleTime maxAge - maxConnectionAge maxConnectionRequests maxExpiresAge maxNoModifiedAge - replyUnpipelineTime serverExpireTime serverIdleTimeout serverTimeout - smallRequestTime' - - multistate_options='censorReferer dnsQueryIPv6 dnsUseGethostbyname - dontTrustVaryETag expectContinue pipelineAdditionalRequests - useTemporarySourceAddress relaxTransparency' - - boolean_options='cacheIsShared daemonise disableConfiguration disableIndexing - disableLocalInterface disableProxy disableServersList disableVia - dontCacheCookies dontCacheRedirects logSyslog mindlesslyCacheVary - preciseExpiry proxyOffline scrubLogs laxHttpParser' - - string_list_options='allowedClients censoredHeaders' - - number_list_options='allowedPorts tunnelAllowedPorts' - - for option in $string_options; do - polipo_atom "$1" "$option" '"' >> $CFGFILE - done - - for option in $number_options; do - polipo_atom "$1" "$option" >> $CFGFILE - done - - for option in $time_options; do - polipo_atom "$1" "$option" >> $CFGFILE - done - - for option in $multistate_options; do - polipo_atom "$1" "$option" >> $CFGFILE - done - - for option in $boolean_options; do - polipo_boolean "$1" "$option" >> $CFGFILE - done - - for option in $string_list_options; do - polipo_list "$1" "$option" '"' >> $CFGFILE - done - - for option in $number_list_options; do - polipo_list "$1" "$option" >> $CFGFILE - done -} - -polipo_atom() { - local SECTION=$1 - local OPTION=$2 - local QUOTE=$3 - local EMPTY_DISABLED=${4:-0} - - config_get _value "$SECTION" "$OPTION" - [ -n "$_value" -o "$EMPTY_DISABLED" -eq "1" ] && { - echo "$OPTION = ${QUOTE}${_value}${QUOTE}" - } -} - -polipo_boolean() { - local SECTION=$1 - local OPTION=$2 - - config_get_bool _value "$SECTION" "$OPTION" - [ -n "$_value" ] && { - [ "$_value" -eq "1" ] && _value="true" || _value="false" - echo "$OPTION = $_value" - } -} - -polipo_list() { - local SECTION=$1 - local OPTION=$2 - local QUOTE=$3 - - config_get _value "$SECTION" "$OPTION" - - [ "$SECTION" = general ] && [ "$OPTION" = allowedClients ] && { - case "$_value" in - *127.0.0.1*) : ;; - *) _value="127.0.0.1 $_value" ;; - esac - } - - [ -n "$_value" ] && { - echo -n "$OPTION = " - - local FIRST=1 - for entry in $_value; do - [ "$FIRST" -ne "1" ] && echo -n ", " || FIRST=0 - - echo -n "${QUOTE}${entry}${QUOTE}" - done - - echo '' - } -} - diff --git a/net/port-mirroring/Makefile b/net/port-mirroring/Makefile deleted file mode 100644 index fdc4b39..0000000 --- a/net/port-mirroring/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright (c) 2015 OpenWrt.org -# -# This is free software, licensed under the BSD 2-Clause License. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=port-mirroring -PKG_VERSION:=1.4.2 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Mike Maraya -PKG_LICENSE:=BSD-2-Clause -PKG_LICENSE_FILES:=LICENSE -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=git://github.com/mmaraya/port-mirroring.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=f6ead68b7760fa86e8da73ac1e062349f243ac93 -PKG_FIXUP:=autoreconf -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/port-mirroring - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libpcap +libpthread - TITLE:=Copy network packets with optional support for TaZmen Sniffer Protocol (TZSP) - URL:=https://github.com/mmaraya/port-mirroring - MENU:=1 -endef - -define Package/port-mirroring/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/port-mirroring $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) $(PKG_BUILD_DIR)/port-mirroring.conf $(1)/etc/config/port-mirroring - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_BUILD_DIR)/port-mirroringd $(1)/etc/init.d/port_mirroring -endef - -$(eval $(call BuildPackage,port-mirroring)) - diff --git a/net/portmap/Makefile b/net/portmap/Makefile deleted file mode 100644 index 03969f7..0000000 --- a/net/portmap/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2006-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=portmap -PKG_VERSION:=6.0 -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://neil.brown.name/portmap/ -PKG_MD5SUM:=ac108ab68bf0f34477f8317791aaf1ff - -PKG_LICENSE:=BSD-4c -PKG_LICENSE_FILES:=portmap.man - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/portmap - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libwrap $(LIBRPC_DEPENDS) - TITLE:=The RPC Portmapper - URL:=http://neil.brown.name/portmap/ - MAINTAINER:=Peter Wagner - USERID:=rpc=65533:rpc=65533 -endef - -define Package/portmap/description - Portmap is a server that converts RPC (Remote Procedure Call) program - numbers into DARPA protocol port numbers. -endef - -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DHOSTS_ACCESS -DFACILITY=LOG_DAEMON -DIGNORE_SIGCHLD" \ - RPCUSER="rpc" \ - LDLIBS="$(TARGET_LDFLAGS) -lwrap $(LIBRPC)" \ - all - -define Package/portmap/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/portmap $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/portmap.init $(1)/etc/init.d/portmap -endef - -$(eval $(call BuildPackage,portmap)) diff --git a/net/portmap/files/portmap.init b/net/portmap/files/portmap.init deleted file mode 100644 index 621c313..0000000 --- a/net/portmap/files/portmap.init +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=19 -STOP=19 - -USE_PROCD=1 - -start_service() { - procd_open_instance - procd_set_param command /usr/sbin/portmap -f - procd_close_instance -} diff --git a/net/portmap/patches/101-no_pie.patch b/net/portmap/patches/101-no_pie.patch deleted file mode 100644 index 6cbdece..0000000 --- a/net/portmap/patches/101-no_pie.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur portmap_6.0.org/Makefile portmap_6.0/Makefile ---- portmap_6.0.org/Makefile 2008-04-19 22:44:35.000000000 +0200 -+++ portmap_6.0/Makefile 2008-04-19 00:02:01.000000000 +0200 -@@ -127,7 +127,7 @@ - CPPFLAGS += $(HOSTS_ACCESS) - portmap: CFLAGS += -fpie - portmap: LDLIBS += $(WRAP_LIB) --portmap: LDFLAGS += -pie -+#portmap: LDFLAGS += -pie - portmap: portmap.o pmap_check.o from_local.o - - from_local: CPPFLAGS += -DTEST diff --git a/net/pppossh/Makefile b/net/pppossh/Makefile deleted file mode 100644 index a4a048f..0000000 --- a/net/pppossh/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pppossh -PKG_RELEASE:=2 -PKG_MAINTAINER:=Yousong Zhou -PKG_LICENSE:=GPLv2 - -include $(INCLUDE_DIR)/package.mk - -define Package/pppossh - SECTION:=net - CATEGORY:=Network - TITLE:=PPPoSSH (Point-to-Point Protocol over SSH) - DEPENDS:=+ppp +resolveip @(PACKAGE_dropbear||PACKAGE_openssh-client) -endef - -define Package/pppossh/description -This package adds protocol support for PPP over SSH. The protocol name is -'pppossh' as in netifd interface config option 'proto'. -endef - -define Build/Compile -endef - -define Package/pppossh/install - $(INSTALL_DIR) $(1)/lib/netifd/proto - $(INSTALL_BIN) ./files/pppossh.sh $(1)/lib/netifd/proto -endef - -$(eval $(call BuildPackage,pppossh)) diff --git a/net/pppossh/README.md b/net/pppossh/README.md deleted file mode 100644 index 4902ba6..0000000 --- a/net/pppossh/README.md +++ /dev/null @@ -1,68 +0,0 @@ -This package will add the so-called `pppossh` protocol support to OpenWrt. The idea is mainly from [`pvpn` project](https://github.com/halhen/pvpn) (poor man's VPN over SSH). - -PPPoSSH is generally not considered a network setup for production use mainly due to the TCP-over-TCP styles of traffic transport, but it can be quite handy for personal use. And with what's already in OpenWrt, it is really easy and takes little extra space to configure it up running. - -## Prerequisites and dependency. - -`pppossh` depends on either `dropbear` or `openssh-client`; `dropbear` is normally enabled in OpenWrt by default. - -The following requirements need to be fulfilled for it to work. - -- A SSH account on the remote machine with `CAP_NET_ADMIN` capability is required. -- Public key authentication must be enabled and setup properly. - - Public key of the one generated automatially by dropbear can be induced by the following command. But you can always use your own (dropbear can work with OpenSSH public key). - - dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key - -- SSH server's fingerprint has to be present in `~/.ssh/known_hosts` for the authentication to proceed in an unattended way. - - Manually logging in at least once to the remote server from OpenWrt should do this for you. - -## How to use it. - -The protocol name to use in `/etc/config/network` is `pppossh`. Options are as described below. - -- `server`, SSH server name -- `port`, SSH server port (defaults to `22`). -- `sshuser`, SSH login username -- `identity`, list of client private key files. `~/.ssh/id_{rsa,dsa}` will - be used if no identity file was specified and at least one of them must be - valid for the public key authentication to proceed. -- `ipaddr`, local ip address to be assigned. -- `peeraddr`, peer ip address to be assigned. -- `ssh_options`, extra options for the ssh client. -- `use_hostdep`, set it to `0` to disable the use of `proto_add_host_dependency`. This is mainly for the case that the appropriate route to `server` is not registered to `netifd` and thus causing a incorrect route being setup. - -## Tips - -An `uci batch` command template for your reference. Modify it to suite your situation. - - uci batch <&2 - exit 1 -} - -. /lib/functions.sh -. ../netifd-proto.sh -init_proto "$@" - -INCLUDE_ONLY=1 - -. ./ppp.sh - -proto_pppossh_init_config() { - ppp_generic_init_config - config_add_string server sshuser ipaddr peeraddr ssh_options - config_add_array 'identity:list(string)' - config_add_int port use_hostdep - available=1 - no_device=1 -} - -proto_pppossh_setup() { - local config="$1" - local iface="$2" - local user="$(id -nu)" - local home=$(sh -c "echo ~$user") - local server port sshuser ipaddr peeraddr ssh_options identity use_hostdep - local ip fn errmsg opts pty - - json_get_vars port sshuser ipaddr peeraddr ssh_options use_hostdep - json_get_var server server && { - [ -z "$use_hostdep" ] && use_hostdep=1 - for ip in $(resolveip -t 5 "$server"); do - if [ "$use_hostdep" -gt 0 ]; then - ( proto_add_host_dependency "$config" "$ip" ) - else - break - fi - done - } - [ -n "$ip" ] || errmsg="${errmsg}Could not resolve $server\n" - [ -n "$sshuser" ] || errmsg="${errmsg}Missing sshuser option\n" - - json_get_values identity identity - [ -z "$identity" ] && identity="$home/.ssh/id_rsa $home/.ssh/id_dsa" - for fn in $identity; do - [ -f "$fn" ] && opts="$opts -i $fn" - done - [ -n "$opts" ] || errmsg="${errmsg}Cannot find valid identity file\n" - - [ -n "$errmsg" ] && { - echo -ne "$errmsg" >&2 - proto_setup_failed "$config" - exit 1 - } - opts="$opts ${port:+-p $port}" - opts="$opts ${ssh_options}" - opts="$opts $sshuser@$server" - pty="exec env 'HOME=$home' $SSH $opts pppd nodetach notty noauth" - - ppp_generic_setup "$config" noauth pty "$pty" "$ipaddr:$peeraddr" -} - -proto_pppossh_teardown() { - ppp_generic_teardown "$@" -} - -add_protocol pppossh diff --git a/net/pptpd/Makefile b/net/pptpd/Makefile deleted file mode 100644 index f188cc0..0000000 --- a/net/pptpd/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pptpd -PKG_VERSION:=1.4.0 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/poptop -PKG_MD5SUM:=36f9f45c6ffa92bc3b6e24ae2d053505 - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -PKG_MAINTAINER:=Luka Perkov - -include $(INCLUDE_DIR)/package.mk - -define Package/pptpd - SECTION:=net - CATEGORY:=Network - DEPENDS:=+kmod-ppp +kmod-gre +kmod-mppe +ppp - TITLE:=PopTop pptp server - URL:=http://poptop.sourceforge.net/ - SUBMENU:=VPN -endef - -CONFIGURE_ARGS += \ - --enable-bcrelay \ - -CONFIGURE_VARS += \ - ac_cv_header_libintl_h=no \ - -MAKE_FLAGS += \ - COPTS="$(TARGET_CFLAGS)" \ - INSTALL="install" \ - -define Package/pptpd/conffiles -/etc/pptpd.conf -/etc/ppp/options.pptpd -/etc/config/pptpd -endef - -define Package/pptpd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) \ - $(PKG_INSTALL_DIR)/usr/sbin/bcrelay \ - $(PKG_INSTALL_DIR)/usr/sbin/pptpctrl \ - $(PKG_INSTALL_DIR)/usr/sbin/pptpd \ - $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/usr/lib/pptpd - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pptpd/* $(1)/usr/lib/pptpd/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/pptpd.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/pptpd.init $(1)/etc/init.d/pptpd - $(INSTALL_DIR) $(1)/etc/ppp - $(INSTALL_DATA) ./files/options.pptpd $(1)/etc/ppp/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/pptpd.config $(1)/etc/config/pptpd -endef - -$(eval $(call BuildPackage,pptpd)) diff --git a/net/pptpd/files/options.pptpd b/net/pptpd/files/options.pptpd deleted file mode 100644 index 7f82594..0000000 --- a/net/pptpd/files/options.pptpd +++ /dev/null @@ -1,21 +0,0 @@ -#debug -#logfile /tmp/pptp-server.log -auth -name "pptp-server" -lcp-echo-failure 3 -lcp-echo-interval 60 -default-asyncmap -mtu 1482 -mru 1482 -nobsdcomp -nodeflate -#noproxyarp -#nomppc -require-mschap-v2 -refuse-chap -refuse-mschap -refuse-eap -refuse-pap -#ms-dns 172.16.1.1 -#plugin radius.so -#radius-config-file /etc/radius.conf diff --git a/net/pptpd/files/pptpd.conf b/net/pptpd/files/pptpd.conf deleted file mode 100644 index 398ae9d..0000000 --- a/net/pptpd/files/pptpd.conf +++ /dev/null @@ -1,4 +0,0 @@ -#debug -speed 115200 -stimeout 10 -#localip & remoteip are not needed, ip management is done by pppd diff --git a/net/pptpd/files/pptpd.config b/net/pptpd/files/pptpd.config deleted file mode 100644 index b2d5df5..0000000 --- a/net/pptpd/files/pptpd.config +++ /dev/null @@ -1,8 +0,0 @@ -config service 'pptpd' - option 'enabled' '0' - option 'localip' '192.168.0.1' - option 'remoteip' '192.168.0.20-30' - -config 'login' - option 'username' 'youruser' - option 'password' 'yourpass' diff --git a/net/pptpd/files/pptpd.init b/net/pptpd/files/pptpd.init deleted file mode 100644 index 294b00f..0000000 --- a/net/pptpd/files/pptpd.init +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=60 -USE_PROCD=1 - -BIN=/usr/sbin/pptpd -CONFIG=/var/etc/pptpd.conf -CHAP_SECRETS=/var/etc/chap-secrets -OPTIONS_PPTP=/var/etc/options.pptpd - -validate_login_section() { - uci_validate_section pptpd login "${1}" \ - 'username:string' \ - 'password:string' -} - -validate_pptpd_section() { - uci_validate_section pptpd service "${1}" \ - 'enabled:uinteger' \ - 'localip:string' \ - 'remoteip:string' \ - 'mppe:list(string):required no40 no56 stateless' \ - 'logwtmp:uinteger' -} - -setup_login() { - validate_login_section "${1}" || { - echo "validation failed" - return 1 - } - - [ -n "${username}" ] || return 0 - [ -n "${password}" ] || return 0 - - echo "${username} pptp-server ${password} *" >> $CHAP_SECRETS -} - -setup_config() { - local enabled localip remoteip mppe - - validate_pptpd_section "${1}" || { - echo "validation failed" - return 1 - } - - [ "$enabled" -eq 0 ] && return 1 - - mkdir -p /var/etc - cp /etc/pptpd.conf $CONFIG - cp /etc/ppp/options.pptpd $OPTIONS_PPTP - - [ -n "$localip" ] && echo "localip $localip" >> $CONFIG - [ -n "$remoteip" ] && echo "remoteip $remoteip" >> $CONFIG - [ "$logwtmp" -eq 1 ] && echo "logwtmp" >> $CONFIG - - echo "mppe $(echo $mppe | sed -e 's/\s/,/g')" >> $OPTIONS_PPTP - - return 0 -} - -start_service() { - config_load pptpd - setup_config pptpd || return - config_foreach setup_login login - - ln -sfn $CHAP_SECRETS /etc/ppp/chap-secrets - - procd_open_instance - procd_set_param command $BIN -c $CONFIG --fg -o $OPTIONS_PPTP - procd_close_instance -} diff --git a/net/pptpd/patches/001-bad_pqueue_debug.patch b/net/pptpd/patches/001-bad_pqueue_debug.patch deleted file mode 100644 index 50d5252..0000000 --- a/net/pptpd/patches/001-bad_pqueue_debug.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/pqueue.c -+++ b/pqueue.c -@@ -7,13 +7,11 @@ - #include "pqueue.h" - - #ifdef DEBUG_PQUEUE --#define DEBUG_ON 1 -+#define DEBUG_CMD(_a) { _a } - #else --#define DEBUG_ON 0 -+#define DEBUG_CMD(_a) - #endif - --#define DEBUG_CMD(_a) if (DEBUG_ON) { _a } -- - #define MIN_CAPACITY 128 /* min allocated buffer for a packet */ - - static int pqueue_alloc (int seq, unsigned char *packet, int packlen, pqueue_t **new); diff --git a/net/pptpd/patches/002-makefile_fix.patch b/net/pptpd/patches/002-makefile_fix.patch deleted file mode 100644 index 74e3335..0000000 --- a/net/pptpd/patches/002-makefile_fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/plugins/Makefile -+++ b/plugins/Makefile -@@ -18,7 +18,7 @@ all: $(PLUGINS) - %.so: %.c - $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD) - --LIBDIR ?= $(DESTDIR)$(prefix)/lib/pptpd -+LIBDIR = $(DESTDIR)$(prefix)/lib/pptpd - - install: $(PLUGINS) - $(INSTALL) -d $(LIBDIR) diff --git a/net/pptpd/patches/003-opt_flags.patch b/net/pptpd/patches/003-opt_flags.patch deleted file mode 100644 index cc136c5..0000000 --- a/net/pptpd/patches/003-opt_flags.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -153,7 +153,7 @@ AUTOMAKE = @AUTOMAKE@ - AWK = @AWK@ - CC = @CC@ - CCDEPMODE = @CCDEPMODE@ --CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -+CFLAGS = $(COPTS) -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' - CPP = @CPP@ - CPPFLAGS = @CPPFLAGS@ - CYGPATH_W = @CYGPATH_W@ diff --git a/net/pptpd/patches/100-musl-compat.patch b/net/pptpd/patches/100-musl-compat.patch deleted file mode 100644 index 6ce625a..0000000 --- a/net/pptpd/patches/100-musl-compat.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/bcrelay.c -+++ b/bcrelay.c -@@ -667,7 +667,7 @@ static void mainloop(int argc, char **ar - * there is no need to concern about the physical/link layer header because it is - * filled in automatically (based on the contents of sa). - */ -- if ((nrsent = sendto(cur_ifsnr[j].sock_nr, ipp_p, rlen, MSG_DONTWAIT|MSG_TRYHARD, (struct sockaddr *)&sa, salen)) < 0) -+ if ((nrsent = sendto(cur_ifsnr[j].sock_nr, ipp_p, rlen, MSG_DONTWAIT|MSG_DONTROUTE, (struct sockaddr *)&sa, salen)) < 0) - { - if (errno == ENETDOWN) { - syslog(LOG_NOTICE, "ignored ENETDOWN from sendto(), a network interface was going down?"); ---- a/compat.c -+++ b/compat.c -@@ -11,10 +11,10 @@ - #include "compat.h" - #include "our_syslog.h" - --#ifndef HAVE_STRLCPY - #include - #include - -+#ifndef HAVE_STRLCPY - void strlcpy(char *dst, const char *src, size_t size) - { - strncpy(dst, src, size - 1); ---- /dev/null -+++ b/net/ppp_defs.h -@@ -0,0 +1,10 @@ -+#ifndef _NET_PPP_DEFS_H -+#define _NET_PPP_DEFS_H 1 -+ -+#define __need_time_t -+#include -+ -+#include -+#include -+ -+#endif /* net/ppp_defs.h */ diff --git a/net/privoxy/Config.in b/net/privoxy/Config.in deleted file mode 100644 index b4a629d..0000000 --- a/net/privoxy/Config.in +++ /dev/null @@ -1,115 +0,0 @@ -if PACKAGE_privoxy - - comment "Shared libraries settings" - - config PRIVOXY_disable-pthread - bool "Don't use POSIX libpthread (-5489b)" - default n - - config PRIVOXY_disable-dynamic-pcre - bool "Use the built-in, static pcre, even if libpcre is available (+25669b)" - default n - - config PRIVOXY_disable-zlib - bool "Don't use zlib to decompress data before filtering. (-1336b)" - default n - - comment "Config options. Overwrites/ignore configuration file settings" - - config PRIVOXY_disable-toggle - bool "Don't support temporary disable (+2797b)" - default n - - config PRIVOXY_disable-force - bool "Don't allow single-page disable (-434b)" - default n - - config PRIVOXY_disable-fast-redirects - bool "Don't support fast redirects (-1393b)" - default n - - config PRIVOXY_disable-stats - bool "Don't keep statistics (+2870b)" - default n - - config PRIVOXY_enable-ie-images - bool "Enable MS IE image handling. !Read help! (+2694b)" - help - Enable a quick but not always reliable auto-detect whether - requests from MS Internet Explorer are for an image or not. - default n - - config PRIVOXY_disable-image-blocking - bool "Don't check for image request - assume HTML (-655b)" - help - Don't try to figure out whether a request is - for an image or HTML - assume HTML. - default n - - config PRIVOXY_disable-acl-support - bool "Disable ACL access control (-3496b)" - help - Prevents the use of ACLs to control access to Privoxy by IP address. - default n - - config PRIVOXY_disable-trust-files - bool "Prevents the use of trust files. (-1302b)" - default n - - config PRIVOXY_disable-editor - bool "Disable web-based editor. !Read help! (-44979b)" - help - Prevents the use of the web-based actions file - editor and web-based temporary disable setting. - default n - - config PRIVOXY_enable-no-gifs - bool "Use politically correct PNG format. !Read help! (+112b)" - help - Use politically correct PNG format instead of GIF - for built-in images. May not work with all browsers. - default n - - config PRIVOXY_enable-graceful-termination - bool "Allow to shutdown Privoxy through the webinterface. (+1685b)" - default n - - config PRIVOXY_enable-extended-host-patterns - bool "Enable and require PCRE syntax in host patterns. !Read help! (-1329b)" - help - Enable and require PCRE syntax in host patterns. This feature hasn't - been announced yet and it's not clear if it's a good idea. It's expected - to work, but undocumented. You should only enable it if you know what - PCRE is and are sure that you need it for your host patterns. You can - use tools/url-pattern-translator.pl to convert existing action files to - use PCRE host patterns. Please don't enable this option when creating - packages for others that may not be expecting it. - default n - - config PRIVOXY_enable-external-filters - bool "Allow to filter content with scripts and programs. Experimental. (+4821b)" - default n - - config PRIVOXY_enable-accept-filter - bool "Try to use accf_http(9) if supported. (+-0b)" - default n - - config PRIVOXY_enable-strptime-sanity-checks - bool "Only trust strptime() results if ... !Read help! (+407b)" - help - Only trust strptime() results if an additional strftime()/strptime() - conversion doesn't change the result. Can be useful if strptime() is - known or suspected to be broken. - default n - - config PRIVOXY_enable-compression - bool "Allow Privoxy to compress buffered content. (+1275b)" - help - Allow Privoxy to compress buffered content - if the client supports it. Requires zlib support. - depends on !PRIVOXY_no_zlib - default n - - -endif - \ No newline at end of file diff --git a/net/privoxy/Makefile b/net/privoxy/Makefile deleted file mode 100644 index 8d48208..0000000 --- a/net/privoxy/Makefile +++ /dev/null @@ -1,164 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=privoxy -PKG_VERSION:=3.0.26 -PKG_RELEASE:=2 - -PKG_SOURCE:=privoxy-$(PKG_VERSION)-stable-src.tar.gz -PKG_SOURCE_URL:=@SF/ijbswa -PKG_MD5SUM:=8a1c842112ccea68c19b7ceb4a0e999f -PKG_BUILD_DIR:=$(BUILD_DIR)/privoxy-$(PKG_VERSION)-stable -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=LICENSE - -PKG_MAINTAINER:=Christian Schoenebeck - -PKG_CONFIG_DEPENDS:= \ - CONFIG_IPV6 \ - \ - CONFIG_PRIVOXY_disable-pthread \ - CONFIG_PRIVOXY_disable-dynamic-pcre \ - CONFIG_PRIVOXY_disable-zlib \ - \ - CONFIG_PRIVOXY_disable-toggle \ - CONFIG_PRIVOXY_disable-force \ - CONFIG_PRIVOXY_disable-fast-redirects \ - CONFIG_PRIVOXY_disable-stats \ - CONFIG_PRIVOXY_enable-ie-images \ - CONFIG_PRIVOXY_disable-image-blocking \ - CONFIG_PRIVOXY_disable-acl-support \ - CONFIG_PRIVOXY_disable-trust-files \ - CONFIG_PRIVOXY_disable-editor \ - CONFIG_PRIVOXY_enable-no-gifs \ - CONFIG_PRIVOXY_enable-graceful-termination \ - CONFIG_PRIVOXY_enable-extended-host-patterns \ - CONFIG_PRIVOXY_enable-external-filters \ - CONFIG_PRIVOXY_enable-accept-filter \ - CONFIG_PRIVOXY_enable-strptime-sanity-checks \ - CONFIG_PRIVOXY_enable-compression - -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - SECTION:=net - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - TITLE:=Privoxy WEB Proxy - URL:=http://www.privoxy.org/ - USERID:=privoxy=8118:privoxy=8118 - MENU:=1 - DEPENDS:=+!PRIVOXY_no_pcre:libpcre +!PRIVOXY_no_pthread:libpthread +!PRIVOXY_no_zlib:zlib -endef - -# shown in LuCI package description -define Package/$(PKG_NAME)/description -$(TITLE) - Homepage: www.privoxy.org -endef - -# shown in make menuconfig -define Package/$(PKG_NAME)/config - help - Privoxy is a web proxy with advanced filtering capabilities for protecting - privacy, modifying web page content, managing cookies, controlling access, - and removing ads, banners, pop-ups and other obnoxious Internet junk. - Privoxy has a very flexible configuration and can be customized to suit - individual needs and tastes. - Privoxy has application for both stand-alone systems and multi-user networks. - Run as : $(USERID) - Version: $(PKG_VERSION)-$(PKG_RELEASE) - Home : $(URL) - $(PKG_MAINTAINER) - - source "$(SOURCE)/Config.in" -endef - -CONFIGURE_ARGS += \ - --sysconfdir=/etc/privoxy \ - $(if $(CONFIG_IPV6),,--disable-ipv6-support) \ - \ - $(if $(CONFIG_PRIVOXY_disable-pthread),--disable-pthread) \ - $(if $(CONFIG_PRIVOXY_disable-dynamic-pcre),--disable-dynamic-pcre) \ - $(if $(CONFIG_PRIVOXY_disable-zlib),--disable-zlib) \ - \ - $(if $(CONFIG_PRIVOXY_disable-toggle),--disable-toggle) \ - $(if $(CONFIG_PRIVOXY_disable-force),--disable-force) \ - $(if $(CONFIG_PRIVOXY_disable-fast-redirects),--disable-fast-redirects) \ - $(if $(CONFIG_PRIVOXY_disable-stats),--disable-stats) \ - $(if $(CONFIG_PRIVOXY_enable-ie-images),--enable-ie-images) \ - $(if $(CONFIG_PRIVOXY_disable-image-blocking),--disable-image-blocking) \ - $(if $(CONFIG_PRIVOXY_disable-acl-support),--disable-acl-support) \ - $(if $(CONFIG_PRIVOXY_disable-trust-files),--disable-trust-files) \ - $(if $(CONFIG_PRIVOXY_disable-editor),--disable-editor) \ - $(if $(CONFIG_PRIVOXY_enable-no-gifs),--enable-no-gifs) \ - $(if $(CONFIG_PRIVOXY_enable-graceful-termination),--enable-graceful-termination) \ - $(if $(CONFIG_PRIVOXY_enable-extended-host-patterns),--enable-extended-host-patterns) \ - $(if $(CONFIG_PRIVOXY_enable-external-filters),--enable-external-filters) \ - $(if $(CONFIG_PRIVOXY_enable-accept-filter),--enable-accept-filter) \ - $(if $(CONFIG_PRIVOXY_enable-strptime-sanity-checks),--enable-strptime-sanity-checks) \ - $(if $(CONFIG_PRIVOXY_enable-compression),--enable-compression) - -# needed otherwise errors during compile -MAKE_FLAGS:= - -define Package/$(PKG_NAME)/conffiles -/etc/config/privoxy -/etc/privoxy/user.action -/etc/privoxy/user.filter -/etc/privoxy/user.trust -endef - -define Package/$(PKG_NAME)/preinst - #!/bin/sh - [ -n "$${IPKG_INSTROOT}" ] && exit 0 # if run within buildroot exit - - # stop service if PKG_UPGRADE - [ "$${PKG_UPGRADE}" = "1" ] && /etc/init.d/privoxy stop >/dev/null 2>&1 - - exit 0 # suppress errors from stop command -endef - -define Package/$(PKG_NAME)/install - if [ -f $(PKG_INSTALL_DIR)/etc/privoxy/trust ]; then \ - mv -f $(PKG_INSTALL_DIR)/etc/privoxy/trust $(PKG_INSTALL_DIR)/etc/privoxy/user.trust; \ - fi - if [ -f $(PKG_INSTALL_DIR)/etc/privoxy/config ]; then \ - rm -f $(PKG_INSTALL_DIR)/etc/privoxy/config; \ - fi - - $(INSTALL_DIR) \ - $(1)/usr/sbin\ - $(1)/etc/privoxy/templates - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/privoxy $(1)/usr/sbin/ - find $(PKG_INSTALL_DIR)/etc/privoxy/templates -maxdepth 1 -type f \ - -exec $(INSTALL_DATA) -t $(1)/etc/privoxy/templates {} \; - find $(PKG_INSTALL_DIR)/etc/privoxy -maxdepth 1 -type f \ - -exec install -m0664 -t $(1)/etc/privoxy {} \; - - $(INSTALL_DIR) \ - $(1)/lib/upgrade/keep.d \ - $(1)/etc/init.d \ - $(1)/etc/hotplug.d/iface \ - $(1)/etc/config - $(INSTALL_DATA) ./files/privoxy.upgrade $(1)/lib/upgrade/keep.d/privoxy - $(INSTALL_BIN) ./files/privoxy.init $(1)/etc/init.d/privoxy - $(INSTALL_BIN) ./files/privoxy.hotplug $(1)/etc/hotplug.d/iface/95-privoxy - $(INSTALL_CONF) ./files/privoxy.config $(1)/etc/config/privoxy -endef - -define Package/$(PKG_NAME)/postinst - #!/bin/sh - grep -i privoxy $${IPKG_INSTROOT}/etc/services >/dev/null 2>&1 || \ - echo -e "privoxy\t8118" >> $${IPKG_INSTROOT}/etc/services -endef - -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/net/privoxy/files/privoxy.config b/net/privoxy/files/privoxy.config deleted file mode 100644 index 95b6cf1..0000000 --- a/net/privoxy/files/privoxy.config +++ /dev/null @@ -1,44 +0,0 @@ -# this file support all available configuration options of Privoxy web-proxy -# the scripts move all options to the final privoxy readable configuration file -# -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# !!! privoxy uses "-" in option names but uci only support "_" !!! -# !!! privoxy "listen-address" must be uci "listen_address" !!! -# !!! !!! -# !!! if you add entries please use !!! -# !!! option for options with one parameter (option confdir) !!! -# !!! list for options with multiple parameters (list listen_address) !!! -# !!! !!! -# !!! special handling for debug option !!! -# !!! privoxy option "debug 1024" must be uci option debug_1024 '1' !!! -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# -config privoxy 'privoxy' - option confdir '/etc/privoxy' - option logdir '/var/log' - option logfile 'privoxy.log' - list filterfile 'default.filter' -# list filterfile 'user.filter' - list actionsfile 'match-all.action' - list actionsfile 'default.action' -# list actionsfile 'user.action' -# list listen_address '127.0.0.1:8118' - list listen_address '192.168.1.1:8118' - option toggle '1' - option enable_remote_toggle '1' - option enable_remote_http_toggle '0' - option enable_edit_actions '1' - option enforce_blocks '0' - option buffer_limit '4096' - option forwarded_connect_retries '0' - option accept_intercepted_requests '0' - option allow_cgi_request_crunching '0' - option split_large_forms '0' - option keep_alive_timeout '300' - option socket_timeout '300' - list permit_access '192.168.1.0/24' - option debug_1 '0' - option debug_512 '1' - option debug_1024 '0' - option debug_4096 '1' - option debug_8192 '1' diff --git a/net/privoxy/files/privoxy.hotplug b/net/privoxy/files/privoxy.hotplug deleted file mode 100644 index 2673b20..0000000 --- a/net/privoxy/files/privoxy.hotplug +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# only (re-)start on ifup -[ "$ACTION" = "ifup" ] || exit 0 -# only start if boot_delay is done -[ -f /tmp/privoxy.hotplug ] || exit 0 - -PIDFILE=/var/run/privoxy.pid - -_PID=$(cat $PIDFILE 2>/dev/null) -kill -1 $_PID 2>/dev/null -if [ $? -eq 0 ]; then - # only restart if already running - logger -p daemon.info -t "privoxy[$_PID]" \ - "Restart request due to '$ACTION' of interface '$INTERFACE'" - /etc/init.d/privoxy restart -else - # only start if enabled - /etc/init.d/privoxy enabled && /etc/init.d/privoxy start -fi diff --git a/net/privoxy/files/privoxy.init b/net/privoxy/files/privoxy.init deleted file mode 100644 index b2592b3..0000000 --- a/net/privoxy/files/privoxy.init +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=95 -STOP=10 - -PIDFILE=/var/run/privoxy.pid -CFGFILE=/var/etc/privoxy.conf -CFGTEMP=/var/etc/privoxy.conf.tmp - -_uci2conf() { - # redefined callback for options when calling config_load - config_cb() { - if [ ."$2" != ."privoxy" ]; then - option_cb() { return 0; } - else - option_cb() - { - # $1 name of variable - # $2 value - local __OPT="$1" - local __VAL="$2" - case $__OPT in - confdir|templdir|temporary_directory|logdir|logfile) - # needs to be handled separately because we need to set permissions - # AND needs to be defined first because of a BUG inside privoxy - # require directories to be defined first inside config - ;; - debug_*) - [ $__VAL -eq 0 ] && return # not set ignore - echo -e "debug\t$(echo $__OPT | sed -e 's#debug_##g')" >> $CFGTEMP ;; - *) - # detect list options (LENGTH) and ignore - echo $__OPT | grep -i "_LENGTH" >/dev/null 2>&1 && return - # detect list options (ITEM) and ignore - echo $__OPT | grep -i "_ITEM" >/dev/null 2>&1 && __OPT=$(echo $__OPT | sed -e "s#_ITEM.*##g") - # uci only accept "_" but we need "-" - local __OPT=$(echo $__OPT | sed -e "s#_#-#g") - # write to config - echo -e "$__OPT\t$__VAL" >> $CFGTEMP - ;; - esac - } - fi - } - - # temporary config file - # privoxy need read access - mkdir -m0755 -p /var/etc - echo "" > $CFGTEMP - chmod 644 $CFGTEMP - chgrp privoxy $CFGTEMP - - echo '### AUTO-GENERATED CONFIGURATION' >> $CFGTEMP - echo '### USED BY PRIVOXY' >> $CFGTEMP - echo '### DO NOT EDIT' >> $CFGTEMP - echo '### SEE /etc/config/privoxy INSTEAD' >> $CFGTEMP - echo '' >> $CFGTEMP - - # logdir and logfile - # privoxy needs read/write access - _LOGDIR=$(uci -q get privoxy.privoxy.logdir) || _LOGDIR="/var/log" - _LOGFILE=$(uci -q get privoxy.privoxy.logfile) || _LOGFILE="privoxy.log" - mkdir -m0755 -p $_LOGDIR - touch $_LOGDIR/$_LOGFILE - chmod 664 $_LOGDIR/$_LOGFILE - chown privoxy:privoxy $_LOGDIR/$_LOGFILE - echo -e "logdir\t$_LOGDIR" >> $CFGTEMP - echo -e "logfile\t$_LOGFILE" >> $CFGTEMP - - # confdir - # privoxy needs read access (possibly write access) - _CONFDIR=$(uci -q get privoxy.privoxy.confdir) || _CONFDIR="/etc/privoxy" - chmod 755 $_CONFDIR - chmod 664 $_CONFDIR/* - chgrp privoxy $_CONFDIR $_CONFDIR/* - echo -e "confdir\t$_CONFDIR" >> $CFGTEMP - - # templdir - # privoxy need read access - _TEMPLDIR=$(uci -q get privoxy.privoxy.templdir) # no default needed - if [ -z "$_TEMPLDIR" ]; then - chmod 755 $_CONFDIR/templates - chmod 644 $_CONFDIR/templates/* - chgrp privoxy $_CONFDIR/templates $_CONFDIR/templates/* - else - chmod 755 $_TEMPLDIR - chmod 644 $_TEMPLDIR/* - chgrp privoxy $_TEMPLDIR $_TEMPLDIR/* - echo -e "templdir\t$_TEMPLDIR" >> $CFGTEMP - fi - - # temporary-directory - # privoxy needs read/write access - _TMP_DIR=$(uci -q get privoxy.privoxy.temporary_directory) # no default needed - if [ -n "$_TMP_DIR" ]; then - mkdir -m0750 -p $_TMP_DIR - chown privoxy:privoxy $_TMP_DIR - echo -e "temporary-directory\t$_TMP_DIR" >> $CFGTEMP - fi - - config_load "privoxy" # calling above option_cb() and write the rest into $CFGTEMP - - # move temp to final privoxy readable configuration - mv -f $CFGTEMP $CFGFILE - return 0 -} - -boot() { - # wait a given time (default 10 seconds) before startup - # to wait for interfaces to come up / not using hotplug events during boot - _start() { - [ $1 -gt 0 ] && { - logger -p daemon.info -t "privoxy[]" "Scheduled startup in $1 seconds" - sleep $1 - } - start - } - - local _DELAY - _DELAY=$(uci_get "privoxy" "system" "boot_delay" "10") - _start $_DELAY & - return 0 -} - -shutdown() { - rm -f /tmp/privoxy.hotplug - stop -} - -start() { - # if already running do nothing - local _PID=$(cat $PIDFILE 2>/dev/null) - kill -1 $_PID 2>/dev/null && return 0 - - _uci2conf - /usr/sbin/privoxy --pidfile $PIDFILE --user privoxy.privoxy $CFGFILE - touch /tmp/privoxy.hotplug - - # verify startup - _PID=$(cat $PIDFILE 2>/dev/null) - kill -1 $_PID 2>/dev/null - local _ERR=$? - [ $_ERR -eq 0 ] \ - && logger -p daemon.notice -t "privoxy[$_PID]" "Started successfully"\ - || logger -p daemon.warn -t "privoxy[]" "Failed to start" - return $_ERR -} - -reload() { - # reload is also used by luci-app-privoxy - local _PID=$(cat $PIDFILE 2>/dev/null) - kill -1 $_PID 2>/dev/null - if [ $? -eq 0 ]; then - # only restart if already running - restart - else - # only start if enabled - enabled && start - fi - return 0 -} - -stop() { - local _PID=$(cat $PIDFILE 2>/dev/null) - kill -15 $_PID 2>/dev/null - sleep 1 # give time to shutdown - local _tmp=$(pgrep privoxy | tr "\n" " ") - if [ -z "$_tmp" ]; then - logger -p daemon.notice -t "privoxy[$_PID]" "Shutdown successfully" - else - kill -9 $_tmp # Normally never come here - logger -p daemon.warn -t "privoxy[$_tmp]" "Shutdown forced by KILL" - fi - return 0 -} diff --git a/net/privoxy/files/privoxy.upgrade b/net/privoxy/files/privoxy.upgrade deleted file mode 100644 index ef198a2..0000000 --- a/net/privoxy/files/privoxy.upgrade +++ /dev/null @@ -1,4 +0,0 @@ -/etc/config/privoxy -/etc/privoxy/user.action -/etc/privoxy/user.filter -/etc/privoxy/user.trust diff --git a/net/prosody/Makefile b/net/prosody/Makefile deleted file mode 100644 index b35fd03..0000000 --- a/net/prosody/Makefile +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (C) 2009-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=prosody -PKG_VERSION:=0.9.12 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://prosody.im/downloads/source -PKG_MD5SUM:=d743adea6cfbaacc3a24cc0c3928bb1b -PKG_MAINTAINER:=Thomas Heil -PKG_LICENSE:=MIT/X11 - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/prosody - SECTION:=net - CATEGORY:=Network - SUBMENU:=Instant Messaging - DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua - TITLE:=XMPP server - URL:=http://prosody.im/ - USERID:=prosody=54:prosody=54 -endef - -define Package/prosody/description - Prosody is an exciting new server for Jabber/XMPP - written in Lua. It aims to be easy to use, and light - on resources -endef - -define Package/prosody/conffiles -/etc/prosody/prosody.cfg.lua -endef - -TARGET_CFLAGS += $(FPIC) - -TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib - - -define Build/Configure - # this is *NOT* GNU autoconf stuff - (cd $(PKG_BUILD_DIR); ./configure \ - --prefix=/usr \ - --with-lua="$(STAGING_DIR_HOSTPKG)/bin" \ - --with-lua-include="$(STAGING_DIR)/usr/include" \ - --with-lua-lib="$(STAGING_DIR)/usr/lib" \ - --cflags="$(TARGET_CFLAGS)" \ - --ldflags="$(TARGET_LDFLAGS) -llua -lm -ldl -shared" \ - --c-compiler="$(CC)" \ - --linker="$(LD)" \ - --datadir="/etc/prosody/data" \ - ) -endef -# LDFLAGS="$(TARGET_LDFLAGS) -llua -lm -ldl" \ - -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \ - PREFIX="/usr" \ - -define Package/prosody/install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/prosody.init $(1)/etc/init.d/prosody - $(INSTALL_DIR) $(1)/etc/prosody - #$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/prosody/prosody.cfg.lua $(1)/etc/prosody/ - $(INSTALL_CONF) ./files/prosody.cfg.lua $(1)/etc/prosody/ - $(INSTALL_DIR) $(1)/etc/prosody/certs - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/prosody/certs/localhost.{crt,key} $(1)/etc/prosody/certs/ - $(INSTALL_DIR) $(1)/etc/prosody/data - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prosody{,ctl} $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib/prosody - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/prosody.version $(1)/usr/lib/prosody/ - $(INSTALL_DIR) $(1)/usr/lib/prosody/core - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/core/*.lua $(1)/usr/lib/prosody/core/ - $(INSTALL_DIR) $(1)/usr/lib/prosody/fallbacks - #$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/fallbacks/*.lua $(1)/usr/lib/prosody/fallbacks/ - $(INSTALL_DIR) $(1)/usr/lib/prosody/modules - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/*.lua $(1)/usr/lib/prosody/modules/ - $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/adhoc - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/adhoc/*.lua $(1)/usr/lib/prosody/modules/adhoc/ - $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/mod_s2s - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/mod_s2s/*.lua $(1)/usr/lib/prosody/modules/mod_s2s/ - $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/muc - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/muc/*.lua $(1)/usr/lib/prosody/modules/muc/ - $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/storage - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/storage/*.lua $(1)/usr/lib/prosody/modules/storage/ - $(INSTALL_DIR) $(1)/usr/lib/prosody/net - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/*.lua $(1)/usr/lib/prosody/net/ - $(INSTALL_DIR) $(1)/usr/lib/prosody/net/http - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/http/*.lua $(1)/usr/lib/prosody/net/http/ - $(INSTALL_DIR) $(1)/usr/lib/prosody/util - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.lua $(1)/usr/lib/prosody/util/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.so $(1)/usr/lib/prosody/util/ - $(INSTALL_DIR) $(1)/usr/lib/prosody/util/sasl - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.lua $(1)/usr/lib/prosody/util/sasl/ - #$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/sasl/*.so $(1)/usr/lib/prosody/util/sasl/ -endef - -define Package/prosody/postinst -#!/bin/sh -[ -n "$${IPKG_INSTROOT}" ] || { - echo "Fixing lua with paxctl if needed!!!" - [ -f /sbin/paxctl ] && { - paxctl -v /usr/bin/ > /dev/null 2>&1 - [ $$? -ne 0 ] && { - cp /usr/bin/lua /tmp - paxctl -c -m /tmp/lua > /dev/null 2>&1 - cp -f /tmp/lua /usr/bin/lua - } - } - exit 0 -} -endef - -$(eval $(call BuildPackage,prosody)) diff --git a/net/prosody/files/prosody.cfg.lua b/net/prosody/files/prosody.cfg.lua deleted file mode 100644 index 0fe4216..0000000 --- a/net/prosody/files/prosody.cfg.lua +++ /dev/null @@ -1,170 +0,0 @@ --- Prosody Example Configuration File --- --- Information on configuring Prosody can be found on our --- website at http://prosody.im/doc/configure --- --- Tip: You can check that the syntax of this file is correct --- when you have finished by running: luac -p prosody.cfg.lua --- If there are any errors, it will let you know what and where --- they are, otherwise it will keep quiet. --- --- The only thing left to do is rename this file to remove the .dist ending, and fill in the --- blanks. Good luck, and happy Jabbering! - - ----------- Server-wide settings ---------- --- Settings in this section apply to the whole server and are the default settings --- for any virtual hosts - --- This is a (by default, empty) list of accounts that are admins --- for the server. Note that you must create the accounts separately --- (see http://prosody.im/doc/creating_accounts for info) --- Example: admins = { "user1@example.com", "user2@example.net" } -admins = { } - --- Enable use of libevent for better performance under high load --- For more information see: http://prosody.im/doc/libevent ---use_libevent = true; - --- This is the list of modules Prosody will load on startup. --- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too. --- Documentation on modules can be found at: http://prosody.im/doc/modules -modules_enabled = { - - -- Generally required - "roster"; -- Allow users to have a roster. Recommended ;) - "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in. - "tls"; -- Add support for secure TLS on c2s/s2s connections - "dialback"; -- s2s dialback support - "disco"; -- Service discovery - - -- Not essential, but recommended - "private"; -- Private XML storage (for room bookmarks, etc.) - "vcard"; -- Allow users to set vCards - --"privacy"; -- Support privacy lists - --"compression"; -- Stream compression - - -- Nice to have - "legacyauth"; -- Legacy authentication. Only used by some old clients and bots. - "version"; -- Replies to server version requests - "uptime"; -- Report how long server has been running - "time"; -- Let others know the time here on this server - "ping"; -- Replies to XMPP pings with pongs - "pep"; -- Enables users to publish their mood, activity, playing music and more - "register"; -- Allow users to register on this server using a client and change passwords - "adhoc"; -- Support for "ad-hoc commands" that can be executed with an XMPP client - - -- Admin interfaces - "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands - --"admin_telnet"; -- Opens telnet console interface on localhost port 5582 - - -- Other specific functionality - "posix"; -- POSIX functionality, sends server to background, enables syslog, etc. - --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP" - --"httpserver"; -- Serve static files from a directory over HTTP - --"groups"; -- Shared roster support - --"announce"; -- Send announcement to all online users - --"welcome"; -- Welcome users who register accounts - --"watchregistrations"; -- Alert admins of registrations - --"motd"; -- Send a message to users when they log in -}; - --- These modules are auto-loaded, should you --- (for some mad reason) want to disable --- them then uncomment them below -modules_disabled = { - -- "presence"; -- Route user/contact status information - -- "message"; -- Route messages - -- "iq"; -- Route info queries - -- "offline"; -- Store offline messages -}; - --- Disable account creation by default, for security --- For more information see http://prosody.im/doc/creating_accounts -allow_registration = false; - --- Only allow encrypted streams? Encryption is already used when --- available. These options will cause Prosody to deny connections that --- are not encrypted. Note that some servers do not support s2s --- encryption or have it disabled, including gmail.com and Google Apps --- domains. - ---c2s_require_encryption = false ---s2s_require_encryption = false - --- Select the authentication backend to use. The 'internal' providers --- use Prosody's configured data storage to store the authentication data. --- To allow Prosody to offer secure authentication mechanisms to clients, the --- default provider stores passwords in plaintext. If you do not trust your --- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed --- for information about using the hashed backend. --- See http://prosody.im/doc/authentication for other possibilities including --- Cyrus SASL. - -authentication = "internal_plain" - --- Select the storage backend to use. By default Prosody uses flat files --- in its configured data directory, but it also supports more backends --- through modules. An "sql" backend is included by default, but requires --- additional dependencies. See http://prosody.im/doc/storage for more info. - ---storage = "sql" -- Default is "internal" - --- For the "sql" backend, you can uncomment *one* of the below to configure: ---sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename. ---sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" } ---sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" } - --- Logging configuration --- For advanced logging see http://prosody.im/doc/logging -log = { - info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging - error = "/var/log/prosody/prosody.err"; - -- "*syslog"; -- Uncomment this for logging to syslog; needs mod_posix - -- "*console"; -- Log to the console, useful for debugging with daemonize=false -} - --- Pidfile, used by prosodyctl and the init.d script -pidfile = "/var/run/prosody/prosody.pid" - --- User and group, used for daemon -prosody_user = "prosody" -prosody_group = "prosody" - ------------ Virtual hosts ----------- --- You need to add a VirtualHost entry for each domain you wish Prosody to serve. --- Settings under each VirtualHost entry apply *only* to that host. - -VirtualHost "localhost" - -VirtualHost "example.com" - enabled = false -- Remove this line to enable this host - - -- Assign this host a certificate for TLS, otherwise it would use the one - -- set in the global section (if any). - -- Note that old-style SSL on port 5223 only supports one certificate, and will always - -- use the global one. - ssl = { - key = "/etc/prosody/certs/example.com.key"; - certificate = "/etc/prosody/certs/example.com.crt"; - } - ------- Components ------ --- You can specify components to add hosts that provide special services, --- like multi-user conferences, and transports. --- For more information on components, see http://prosody.im/doc/components - ----Set up a MUC (multi-user chat) room server on conference.example.com: ---Component "conference.example.com" "muc" - --- Set up a SOCKS5 bytestream proxy for server-proxied file transfers: ---Component "proxy.example.com" "proxy65" - ----Set up an external component (default component port is 5347) --- --- External components allow adding various services, such as gateways/ --- transports to other networks like ICQ, MSN and Yahoo. For more info --- see: http://prosody.im/doc/components#adding_an_external_component --- ---Component "gateway.example.com" --- component_secret = "password" diff --git a/net/prosody/files/prosody.init b/net/prosody/files/prosody.init deleted file mode 100644 index 322c3d2..0000000 --- a/net/prosody/files/prosody.init +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2011-2016 OpenWrt.org - -START=99 - -USE_PROCD=1 - -BIN=/usr/bin/prosodyctl -LOG_D=/var/log/prosody -RUN_D=/var/run/prosody -PID_F=$RUN_D/prosody.pid -RUN_USER=prosody -RUN_GROUP=prosody - -start_service() { - [ -d /var/run/prosody ] || { - mkdir -m 0755 -p /var/run/prosody - chown prosody:prosody /var/run/prosody - } - [ -d /var/log/prosody ] || { - mkdir -m 0755 -p /var/log/prosody - chown prosody:prosody /var/log/prosody - } - - [ -d /var/log/prosody ] && { - chown -R prosody:prosody /etc/prosody - } - - [ -f /sbin/paxctl ] && { - paxctl -v /usr/bin/ > /dev/null 2>&1 - [ $? -ne 0 ] && { - cp /usr/bin/lua /tmp - paxctl -c -m /tmp/lua - cp -f /tmp/lua /usr/bin/lua - } - } - - procd_open_instance - procd_set_param command "$BIN" start - procd_set_param file /etc/prosody/prosody.cfg.lua - procd_close_instance -} - -stop_service() { - ${BIN} stop -} diff --git a/net/quassel-irssi/Makefile b/net/quassel-irssi/Makefile deleted file mode 100644 index 09e5937..0000000 --- a/net/quassel-irssi/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2016 Ben Rosser -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=quassel-irssi - -# quassel-irssi upstream doesn't release versions (at least, at the moment), -# so use commit date for PKG_VERSION and embed commit hash into PKG_RELEASE. -PKG_VERSION:=2016-09-11 -PKG_SOURCE_VERSION:=cbd9bd7f4ac44260d9fcafb809fdf153cde193e5 -PKG_RELEASE:=1.$(PKG_SOURCE_VERSION) - -PKG_LICENSE:=GPL-3.0+ - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/phhusson/quassel-irssi -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.bz2 - -PKG_MAINTAINER:=Ben Rosser - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -MAKE_PATH := core -MAKE_VARS += SYSTEM_QUASSELC=1 IRSSI_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" IRSSI_INCLUDE=$(STAGING_DIR)/usr/include/irssi - -define Package/quassel-irssi - SECTION:=net - CATEGORY:=Network - DEPENDS:=+irssi +quasselc - SUBMENU:=Instant Messaging - URL:=https://github.com/phhusson/quassel-irssi - TITLE:=An irssi plugin to connect to quassel core -endef - -define Package/quassel-irssi/description - An irssi plugin that supports connecting to a quassel core. -endef - -define Package/quassel-irssi/install - $(INSTALL_DIR) $(1)/usr/lib/irssi/modules/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/irssi/modules/libquassel_core.so* $(1)/usr/lib/irssi/modules/ -endef - -$(eval $(call BuildPackage,quassel-irssi)) diff --git a/net/quassel-irssi/patches/001-respect-cflags.patch b/net/quassel-irssi/patches/001-respect-cflags.patch deleted file mode 100644 index b945915..0000000 --- a/net/quassel-irssi/patches/001-respect-cflags.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/core/Makefile b/core/Makefile -index 6133087..389855c 100644 ---- a/core/Makefile -+++ b/core/Makefile -@@ -3,7 +3,7 @@ DESTDIR ?= - LIBDIR ?= /usr/lib - - #IRSSI_INCLUDE:=/home/phh/irssi-0.8.16-rc1.phh/ --IRSSI_INCLUDE:=/usr/include/irssi/ -+IRSSI_INCLUDE?=/usr/include/irssi/ - IRSSI_LIB?=$(DESTDIR)/$(LIBDIR)/irssi - IRSSI_CFLAGS+=-I$(IRSSI_INCLUDE)/src/ - IRSSI_CFLAGS+=-I$(IRSSI_INCLUDE)/src/core/ -@@ -26,7 +26,7 @@ else - LDFLAGS += -lquasselc - endif - --CFLAGS=-std=gnu11 -Wall -Wextra -Werror -g -O2 $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations -+CFLAGS+=-std=gnu11 -Wall -Wextra -Werror -g $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations - - TARGET=libquassel_core.so - diff --git a/net/quassel-irssi/patches/002-use-cc-var.patch b/net/quassel-irssi/patches/002-use-cc-var.patch deleted file mode 100644 index 6acb434..0000000 --- a/net/quassel-irssi/patches/002-use-cc-var.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/core/Makefile b/core/Makefile -index 389855c..2f81417 100644 ---- a/core/Makefile -+++ b/core/Makefile -@@ -44,7 +44,7 @@ irssi/network-openssl.o: CFLAGS:=$(IRSSI_CFLAGS) - quasselc-connector.o: CFLAGS:=$(CFLAGS) - - $(TARGET): $(OBJECTS) -- gcc -shared $^ -o $@ -lz $(LDFLAGS) -+ $(CC) -shared $^ -o $@ -lz $(LDFLAGS) - - install: $(TARGET) - $(INSTALL) -d $(IRSSI_LIB)/modules diff --git a/net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch b/net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch deleted file mode 100644 index 3aef014..0000000 --- a/net/quassel-irssi/patches/003-use-pkgconfig-ldflags-quasselc.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/core/Makefile b/core/Makefile -index 2f81417..aa62201 100644 ---- a/core/Makefile -+++ b/core/Makefile -@@ -23,7 +23,7 @@ ifndef SYSTEM_QUASSELC - QUASSELC_FLAGS:=-Ilib - else - QUASSELC_FLAGS:=$(shell pkg-config --cflags quasselc) -- LDFLAGS += -lquasselc -+ LDFLAGS += $(shell pkg-config --libs quasselc) - endif - - CFLAGS+=-std=gnu11 -Wall -Wextra -Werror -g -O2 $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations diff --git a/net/radicale/Makefile b/net/radicale/Makefile deleted file mode 100644 index 26cacd7..0000000 --- a/net/radicale/Makefile +++ /dev/null @@ -1,146 +0,0 @@ -# -# Copyright (C) 2008-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=radicale -PKG_VERSION:=1.1.1 -PKG_RELEASE:=2 -PKG_MAINTAINER:=Christian Schoenebeck - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING - -PKG_SOURCE:=Radicale-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://pypi.python.org/packages/source/R/Radicale/ -PKG_MD5SUM:=a29dd538377ea24cec83237a636122ae - -# needed for "r"adicale <-> "R"adicale -PKG_BUILD_DIR:=$(BUILD_DIR)/Radicale-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) - -# no default dependencies -PKG_DEFAULT_DEPENDS:= - -define Package/$(PKG_NAME)/Default - SECTION:=net - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - URL:=http://radicale.org/ - TITLE:=Radicale CalDAV/CardDAV server - PKGARCH:=all - USERID:=radicale=5232:radicale=5232 -endef -define Package/$(PKG_NAME)-py2 - $(call Package/$(PKG_NAME)/Default) - TITLE+= (Python 2) - VARIANT:=2 - DEPENDS:=+python-logging +python-openssl +python-xml +python-codecs -endef -define Package/$(PKG_NAME)-py3 - $(call Package/$(PKG_NAME)/Default) - TITLE+= (Python 3) - VARIANT:=3 - DEPENDS:=+python3-logging +python3-openssl +python3-xml +python3-codecs +python3-email -endef - -# shown in LuCI package description -define Package/$(PKG_NAME)-py2/description -Radicale CalDAV/CardDAV server (Python 2) - Homepage: http://radicale.org/ -endef -define Package/$(PKG_NAME)-py3/description -Radicale CalDAV/CardDAV server (Python 3) - Homepage: http://radicale.org/ -endef - -# shown in make menuconfig -define Package/$(PKG_NAME)-py2/config - help - The Radicale Project is a CalDAV (calendar) and CardDAV (contact) server. - It aims to be a light solution, easy to use, easy to install, easy to configure. - As a consequence, it requires few software dependances and is pre-configured to work out-of-the-box. - !!! Will install and use Python $(VARIANT) !!! - . - Version : $(PKG_VERSION) - Homepage: http://radicale.org/ -endef -Package/$(PKG_NAME)-py3/config = $(Package/$(PKG_NAME)-py2/config) - -define Package/$(PKG_NAME)-py2/conffiles -/etc/config/radicale -/etc/radicale/users -/etc/radicale/rights -endef -Package/$(PKG_NAME)-py3/conffiles = $(Package/$(PKG_NAME)-py2/conffiles) - -define Build/Configure - # nothing to configure -endef -define Build/Compile - # nothing to compile -endef - -define Package/$(PKG_NAME)-py2/preinst - #!/bin/sh - [ -n "$${IPKG_INSTROOT}" ] && exit 0 # if run within buildroot exit - - # stop service if PKG_UPGRADE - [ "$${PKG_UPGRADE}" = "1" ] && /etc/init.d/radicale stop >/dev/null 2>&1 - - exit 0 # suppress errors from stop command -endef -define Package/$(PKG_NAME)-py3/preinst -$(call Package/$(PKG_NAME)-py2/preinst) -endef - -define Package/$(PKG_NAME)/inst_all - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/radicale.init $(1)/etc/init.d/radicale - - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_BIN) ./files/radicale.hotplug $(1)/etc/hotplug.d/iface/80-radicale - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/radicale.config $(1)/etc/config/radicale - - $(INSTALL_DIR) $(1)/lib/upgrade/keep.d - $(INSTALL_DATA) ./files/radicale.upgrade $(1)/lib/upgrade/keep.d/radicale - - $(INSTALL_DIR) $(1)/etc/radicale/ssl - $(INSTALL_DATA) ./files/config.template $(1)/etc/radicale/config.template - $(INSTALL_DATA) ./files/logging.template $(1)/etc/radicale/logging.template - $(INSTALL_DATA) ./files/radicale.users $(1)/etc/radicale/users - $(INSTALL_DATA) ./files/radicale.rights $(1)/etc/radicale/rights - - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/radicale $(1)/usr/bin/ -endef -define Package/$(PKG_NAME)-py2/install - $(call Package/$(PKG_NAME)/inst_all, $(1)) - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)/radicale - $(CP) $(PKG_BUILD_DIR)/radicale/* $(1)$(PYTHON_PKG_DIR)/radicale -endef -define Package/$(PKG_NAME)-py3/install - $(call Package/$(PKG_NAME)/inst_all, $(1)) - $(INSTALL_DIR) $(1)$(PYTHON3_PKG_DIR)/radicale - $(CP) $(PKG_BUILD_DIR)/radicale/* $(1)$(PYTHON3_PKG_DIR)/radicale -endef - -define Package/$(PKG_NAME)-py2/postinst - #!/bin/sh - # patch /usr/bin/radicale force run using python2 - /bin/sed -i 's/python/python2/' $${IPKG_INSTROOT}/usr/bin/radicale -endef -define Package/$(PKG_NAME)-py3/postinst - #!/bin/sh - # patch /usr/bin/radicale force run using python3 - /bin/sed -i 's/python/python3/' $${IPKG_INSTROOT}/usr/bin/radicale -endef - -$(eval $(call BuildPackage,$(PKG_NAME)-py2)) -$(eval $(call BuildPackage,$(PKG_NAME)-py3)) diff --git a/net/radicale/files/config.template b/net/radicale/files/config.template deleted file mode 100644 index 1b8fcf2..0000000 --- a/net/radicale/files/config.template +++ /dev/null @@ -1,30 +0,0 @@ -# -*- mode: conf -*- -# vim:ft=cfg - -### AUTO-GENERATED CONFIGURATION -### USED BY RADICALE -### DO NOT EDIT -### SEE /etc/config/radicale INSTEAD - -[server] -# daemon # handled by /etc/init.d/radicale -# pid # handled by /etc/init.d/radicale - -[encoding] - -[well-known] - -[auth] -# htpasswd_filename # hard-coded /etc/radicale/users - -[git] - -[rights] -# file # hard-coded /etc/radicale/rights - -[storage] - -[logging] -# config # hard-coded /var/etc/radicale/logging - -[headers] diff --git a/net/radicale/files/logging.template b/net/radicale/files/logging.template deleted file mode 100644 index a730ca0..0000000 --- a/net/radicale/files/logging.template +++ /dev/null @@ -1,47 +0,0 @@ -# -*- mode: conf -*- -# vim:ft=cfg - -### AUTO-GENERATED CONFIGURATION -### USED BY RADICALE -### DO NOT EDIT -### SEE /etc/config/radicale INSTEAD - -[loggers] -keys = root - -[handlers] -keys = console,file,syslog - -[formatters] -keys = simple,full,syslog - -[logger_root] -level = DEBUG -handlers = console,file,syslog - -[handler_console] -class = StreamHandler -args = (sys.stdout,) -formatter = simple -# level = WARNING # set via /etc/config/radicale - -[handler_file] -class = handlers.RotatingFileHandler -formatter = full -# level = INFO # set via /etc/config/radicale -# args = ('[filename]','a',[maxbytes],[backupcount]) # set via /etc/config/radicale - -[handler_syslog] -class = handlers.SysLogHandler -args = ('/dev/log', handlers.SysLogHandler.LOG_DAEMON) -formatter = syslog -# level = WARNING # set via /etc/config/radicale - -[formatter_simple] -format = %(message)s - -[formatter_full] -format = %(asctime)s - %(levelname)s: %(message)s - -[formatter_syslog] -format = radicale [%(process)d]: %(message)s diff --git a/net/radicale/files/radicale.config b/net/radicale/files/radicale.config deleted file mode 100644 index 149ce2b..0000000 --- a/net/radicale/files/radicale.config +++ /dev/null @@ -1,200 +0,0 @@ -# -# You find additional information on Radicale Homepage -# http://radicale.org -# -# OpenWrt's wiki needs to be setup/updated ;-) -# -# if setting additional options please remember that UCI does not support -# section names and option names with "-" (Dash) inside their name -# to use them anyway replace "-" with "_" (Underscore) -# Each Radicale's config [section] is setup as UCI config setting 'section' -# - -#################################################### -# OpenWrt specific settings -# not part of radicale package -# -config system 'radicale' - # delayed startup at boot (default 10 seconds) - # to wait for netifd to bring up interfaces - # during this time iface hotplug events are ignored -# option boot_delay '10' - -#################################################### -# Server options -# -config setting 'server' - - # hostname:port - # IPv4 syntax: address:port - # IPv6 syntax: [address]:port - # ATTENTION: - # only use ports > 1024 (non-privileged Ports) - # because this implementation is running as non-root user - # Default: 0.0.0.0:5232 -# list hosts '0.0.0.0:5232' -# list hosts 'localhost:5232' - - # SSL flag, enable HTTPS protocol - # Default: 0 (disabled) -# option ssl '1' - - # SSL Protocol used. See python's ssl module for available values - # Default: PROTOCOL_SSLv23 -# option protocol 'PROTOCOL_SSLv23' - - # Ciphers available. See python's ssl module for available ciphers -# option ciphers '' - - # SSL certificate path and file -# option certificate '/etc/radicale/ssl/server.crt' - - # SSL private key path and file -# option key '/etc/radicale/ssl/server.key' - - # Reverse DNS to resolve client address in logs - # Default: 0 (disabled) -# option dns_lookup '1' - - # Message displayed in the client when a password is needed -# option realm 'Radicale - Password Required' - - -#################################################### -# Encoding options -# -config setting 'encoding' - - # Encoding for responding requests -# option request 'utf-8' - - # Encoding for storing local collections -# option stock 'utf-8' - - -#################################################### -# Authentication options -# -config setting 'auth' - - # Authentication method - # Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom - # Default: None - # if setting 'htpasswd' the file /etc/radicale/users is used (hardcoded) - - # Htpasswd encryption method - # Value: plain | sha1 | ssha | crypt -# option htpasswd_encryption 'crypt' - - # for other authenication methods consult Radicale documentation - # and set options here - - -#################################################### -# Git default options -# -config setting 'git' - - # Git default options -# option committer 'Radicale ' - - -#################################################### -# Rights backend -# -config setting 'rights' - - # Value: None | authenticated | owner_only | owner_write | from_file | custom - # Default: None - # if setting 'from_file' the file /etc/radicale/rights is used (hardcoded) - - # Custom rights handler -# option custom_handler '' - - -#################################################### -# Storage backend -# ------- -# WARNING: ONLY "filesystem" IS DOCUMENTED AND TESTED, -# OTHER BACKENDS ARE NOT READY FOR PRODUCTION. -# ------- -# -config setting 'storage' - # Value: filesystem | multifilesystem | database | custom - option type 'filesystem' - option filesystem_folder '/srv/radicale' - - -#################################################### -# Additional HTTP headers -# -config setting 'headers' - # enable all if using CardDavMATE-, CalDavZAP- or InfCloud- WEBclient -# list Access_Control_Allow_Origin '*' -# list Access_Control_Allow_Methods 'GET' -# list Access_Control_Allow_Methods 'POST' -# list Access_Control_Allow_Methods 'OPTIONS' -# list Access_Control_Allow_Methods 'PROPFIND' -# list Access_Control_Allow_Methods 'PROPPATCH' -# list Access_Control_Allow_Methods 'REPORT' -# list Access_Control_Allow_Methods 'PUT' -# list Access_Control_Allow_Methods 'MOVE' -# list Access_Control_Allow_Methods 'DELETE' -# list Access_Control_Allow_Methods 'LOCK' -# list Access_Control_Allow_Methods 'UNLOCK' -# list Access_Control_Allow_Headers 'User-Agent' -# list Access_Control_Allow_Headers 'Authorization' -# list Access_Control_Allow_Headers 'Content-type' -# list Access_Control_Allow_Headers 'Depth' -# list Access_Control_Allow_Headers 'If-match' -# list Access_Control_Allow_Headers 'If-None-Match' -# list Access_Control_Allow_Headers 'Lock-Token' -# list Access_Control_Allow_Headers 'Timeout' -# list Access_Control_Allow_Headers 'Destination' -# list Access_Control_Allow_Headers 'Overwrite' -# list Access_Control_Allow_Headers 'X-client' -# list Access_Control_Allow_Headers 'X-Requested-With' -# list Access_Control_Expose_Headers 'Etag' - - -#################################################### -# Global logging options -# -config setting 'logging' - - # Set the default logging level to debug for all outputs (ignore output level settings) - # Default: 0 (disabled) -# option debug '1' - # Log all environment variables (including those set in the shell) when starting - # Default: 0 (disabled) -# option full_environment '1' - - -#################################################### -# Spezial logging options -# !!! not documented in Radicale documentation -# !!! special settings for this implementation -# -config logging 'logger' - - # Level: DEBUG | INFO | WARNING | ERROR | CRITICAL - # To nearly disable logging set level to critical - - # log level on console -# option console_level 'ERROR' - - # Here we use Rotating Logfiles in this implementation - # !!! if maxbytes and/or backupcount is set to 0 !!! - # !!! file rotation is disabled and logfile grows endless !!! - # log level -# option file_level 'INFO' - # directory where log files are written -# option file_path '/var/log/radicale' - # max size of each logfile (see warning above) -# option file_maxbytes '8196' - # number of backup files to create (see warning above) -# option file_backupcount '1' - - # log level for syslog logging -# option syslog_level 'WARNING' - diff --git a/net/radicale/files/radicale.hotplug b/net/radicale/files/radicale.hotplug deleted file mode 100644 index aeb7c41..0000000 --- a/net/radicale/files/radicale.hotplug +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# only (re-)start on ifup -[ "$ACTION" = "ifup" ] || exit 0 -# only start if boot_delay is done -[ -f /tmp/radicale.hotplug ] || exit 0 - -_PID=$(ps | grep '[p]ython.*[r]adicale' 2>/dev/null | awk '{print $1}') -kill -1 $_PID 2>/dev/null -if [ $? -eq 0 ]; then - # only restart if already running - logger -p user.info -t "radicale[$_PID]" \ - "Restart request due to '$ACTION' of interface '$INTERFACE'" - /etc/init.d/radicale restart -else - # only start if enabled - /etc/init.d/radicale enabled && /etc/init.d/radicale start -fi diff --git a/net/radicale/files/radicale.init b/net/radicale/files/radicale.init deleted file mode 100755 index 4fb9bbb..0000000 --- a/net/radicale/files/radicale.init +++ /dev/null @@ -1,236 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2016 OpenWrt.org - -START=80 -STOP=10 - -CFGDIR=/var/etc/radicale -SYSCFG=$CFGDIR/config -LOGCFG=$CFGDIR/logging - -DATADIR="/srv/radicale" -LOGDIR="" - -PGREP="ps | grep '[p]ython.*[r]adicale' 2>/dev/null | awk '{print \$1}' " - -# we could start with empty configuration file using defaults -[ -f /etc/config/radicale ] || touch /etc/config/radicale - -_uci2radicale() { - local _SYSTMP="$SYSCFG.tmp" - local _LOGTMP="$LOGCFG.tmp" - local _LOPT # list option name - local _LVAL # list option value - local _STYPE # section type - local _SNAME # section name - local _console_level="ERROR" # logging console level - local _file_level="INFO" # logging file level - local _file_path="/var/log/radicale" # logging file path - local _file_maxbytes="8196" # logging file maxBytes - local _file_backupcount="1" # logging file backupCount - local _syslog_level="WARNING" # logging syslog level - - # write list values to config - _write_list() { - _write_value "$_LOPT" "$_LVAL" # there might be spaces in _LVAL - _LOPT="" - _LVAL="" - } - - _write_value() { - # $1 option - # $2 value - local __OPT=$1 - local __VAL=$2 - # section "server" ignore option "daemon" and "pid" - [ "$_SNAME" = "server" -a "$__OPT" = "daemon" ] && return 0 - [ "$_SNAME" = "server" -a "$__OPT" = "pid" ] && return 0 - # section "logging" ignore option "config" (logging config file) - [ "$_SNAME" = "logging" -a "$__OPT" = "config" ] && return 0 - # section "auth" ignore option "htpasswd_filename" (htpasswd file) - [ "$_SNAME" = "auth" -a "$__OPT" = "htpasswd_filename" ] && return 0 - # section "rights" ignore option "file" (reg-based rights file) - [ "$_SNAME" = "rights" -a "$__OPT" = "file" ] && return 0 - # section "headers" replace "_" with "-" in option (UCI problem) - [ "$_SNAME" = "headers" ] && __OPT=$(echo "$__OPT" | sed -e "s#_#-#g") - # save data driectory - [ "$_SNAME" = "storage" -a "$__OPT" = "filesystem_folder" ] && DATADIR="$__VAL" - # special handling for well-known, value needs single quotes - [ "$_SNAME" = "well-known" -a "${__VAL#*\%\(}" != "$__VAL" ] && __VAL="'$__VAL'" - # handling of log settings - if [ "$_STYPE" = "logging" -a "$_SNAME" = "logger" ]; then - eval "_$__OPT='$__VAL'" # set to environment for later use - else - # handle bool - [ "$__VAL" = "0" ] && __VAL="False" - [ "$__VAL" = "1" ] && __VAL="True" - # append data to the corresponding section - sed -i "/\[$_SNAME\]/a $__OPT = $__VAL" $_SYSTMP - fi - } - - # redefined callback for sections when calling config_load - config_cb() { - # $1 "Type" - # $2 "Name" - # write out last list option - [ -n "$_LOPT" ] && _write_list - # mark invalid - _STYPE="" - _SNAME="" - # check section type - [ "$1" = "setting" -o "$1" = "logging" ] && { - _STYPE="$1" - _SNAME="$2" - } - # translate section name - [ "$2" = "well_known" ] && _SNAME="well-known" - return 0 - } - - # redefined callback for lists when calling config_load - list_cb() { - # $1 name of variable - # $2 value - # invalid section type then ignore - [ -z "$_STYPE" -o -z "$_SNAME" ] && return 0 - # write out last list option if new list starts - [ -n "$_LOPT" -a "$_LOPT" != "$1" ] && _write_list - # new list option - if [ -z "$_LOPT" ]; then - _LOPT="$1" - _LVAL="$2" - else - _LVAL="$_LVAL, $2" - fi - return 0 - } - - # redefined callback for options when calling config_load - option_cb() { - # $1 name of variable - # $2 value - local __OPT="$1" - local __VAL="$2" - # invalid section type then ignore - [ -z "$_STYPE" -o -z "$_SNAME" ] && return 0 - # ignore list entrys will be handled by list_cb() - [ "${__OPT#*_ITEM}" != "$__OPT" ] && return 0 # ignore lists *_ITEM* - [ "${__OPT#*_LENGTH}" != "$__OPT" ] && return 0 # ignore lists *_LENGTH - # write out last list option and clear - [ -n "$_LOPT" ] && _write_list - # write to file - _write_value "$__OPT" "$__VAL" # there might be spaces in __VAL - return 0 - } - - # temporary config file - # radicale need read access - mkdir -m0755 -p $CFGDIR - - cp /etc/radicale/config.template $_SYSTMP - config_load radicale # calling above config_cb()/option_cb()/list_cb() and write into $_SYSTMP - sed -i "/\[logging\]/a config = /var/etc/radicale/logging" $_SYSTMP # hard-code logging config - sed -i "/\[auth\]/a htpasswd_filename = /etc/radicale/users" $_SYSTMP # hard-code htpasswd - sed -i "/\[rights\]/a file = /etc/radicale/rights" $_SYSTMP # hard-code regexp-based rights - - # temporary logging config file - cp /etc/radicale/logging.template $_LOGTMP - LOGDIR="$_file_path" - sed -i "/\[handler_console\]/a level = $_console_level" $_LOGTMP - sed -i "/\[handler_file\]/a level = $_file_level" $_LOGTMP - sed -i "/\[handler_file\]/a args = ('$_file_path/radicale','a',$_file_maxbytes,$_file_backupcount)" $_LOGTMP - sed -i "/\[handler_syslog\]/a level = $_syslog_level" $_LOGTMP - - # move tmp to final - mv -f $_SYSTMP $SYSCFG - mv -f $_LOGTMP $LOGCFG -} - -_set_permission() { - # config file permissions (read access for group) - chmod 644 $SYSCFG $LOGCFG - chgrp -R radicale $CFGDIR - # log directory (full access and owner) - [ -d $LOGDIR ] || mkdir -m0755 -p $LOGDIR - chown -R radicale:radicale $LOGDIR - # data directory does not exist - [ -d $DATADIR ] || { - logger -p user.error -t "radicale[----]" "Data directory '$DATADIR' does not exists. Startup failed !!!" - exit 1 - } - chgrp -R radicale $DATADIR -} - -boot() { - # wait a given time (default 10 seconds) before startup - # to wait for interfaces to come up / not using hotplug events during boot - _start() { - [ $1 -gt 0 ] && sleep $1 - start - } - - local _DELAY - _DELAY=$(uci_get "radicale" "system" "boot_delay" "10") - _start $_DELAY & - return 0 -} - -shutdown() { - rm -f /tmp/radicale.hotplug - stop -} - -start() { - _running() { - sleep 2 # give radicale time to completely come up - local _PID=$(eval "$PGREP") - kill -1 $_PID 2>/dev/null - [ $? -eq 0 ] \ - && logger -p user.notice -t "radicale[$_PID]" "Service started successfully"\ - || logger -p user.warn -t "radicale[----]" "Service failed to start" - } - - # if already running do nothing - local _PID=$(eval "$PGREP") - kill -1 $_PID 2>/dev/null && return 0 - - _uci2radicale - _set_permission - - radicale --daemon --config=$SYSCFG - touch /tmp/radicale.hotplug - - _running & # check if running and syslog - - return 0 -} - -reload() { - # reload is also used by luci - local _PID=$(eval "$PGREP") - kill -1 $_PID 2>/dev/null - if [ $? -eq 0 ]; then - # only restart if already running - restart - else - # only start if enabled - enabled && start - fi - return 0 -} - -stop() { - local _PID=$(eval "$PGREP") - [ -z "$_PID" ] && return 0 # not running - kill -15 $_PID 2>/dev/null - sleep 3 # give time to shutdown - local _tmp=$(eval "$PGREP") - if [ -z "$_tmp" ]; then - logger -p user.notice -t "radicale[$_PID]" "Service shutdown successfully" - else - kill -9 $_tmp # Normally never come here - logger -p user.warn -t "radicale[----]" "Service shutdown FORCED" - fi - return 0 -} diff --git a/net/radicale/files/radicale.rights b/net/radicale/files/radicale.rights deleted file mode 100644 index 3de3955..0000000 --- a/net/radicale/files/radicale.rights +++ /dev/null @@ -1,49 +0,0 @@ -# -# Authentication login is matched against the "user" key, and collection's path is matched against the "collection" key. -# You can use Python's ConfigParser interpolation values %(login)s and %(path)s. -# You can also get groups from the user regex in the collection with {0}, {1}, etc. -# -# For example, for the "user" key, ".+" means "authenticated user" and ".*" means "anybody" (including anonymous users). -# -# Section names are only used for naming the rule. -# Leading or ending slashes are trimmed from collection's path. -# - -# This means all users starting with "admin" may read any collection -[admin] -user: ^admin.*$ -collection: .* -permission: r - -# This means all users may read and write any collection starting with public. -# We do so by just not testing against the user string. -[public] -user: .* -collection: ^public(/.+)?$ -permission: rw - -# A little more complex: give read access to users from a domain for all -# collections of all the users (ie. user@domain.tld can read domain/\*). -[domain-wide-access] -user: ^.+@(.+)\..+$ -collection: ^{0}/.+$ -permission: r - -# Allow authenticated user to read all collections -[allow-everyone-read] -user: .+ -collection: .* -permission: r - -# Give write access to owners -[owner-write] -user: .+ -collection: ^%(login)s(/.+)?$ -permission: rw - -# Allow CardDavMATE-, CalDavZAP- or InfCloud- WEBclient to work -# anonymous users have read access to "/" but no files or subdir -[infcloud] -user: .* -collection: / -permission: r diff --git a/net/radicale/files/radicale.upgrade b/net/radicale/files/radicale.upgrade deleted file mode 100644 index 760782f..0000000 --- a/net/radicale/files/radicale.upgrade +++ /dev/null @@ -1,4 +0,0 @@ -/etc/config/radicale -/etc/radicale/users -/etc/radicale/rights - diff --git a/net/radicale/files/radicale.users b/net/radicale/files/radicale.users deleted file mode 100644 index 7722176..0000000 --- a/net/radicale/files/radicale.users +++ /dev/null @@ -1,6 +0,0 @@ -# -# Sample File -# - -user1:password1 -user2:password2 \ No newline at end of file diff --git a/net/radicale/patches/010-Run-as-user-group-radicale-radicale.patch b/net/radicale/patches/010-Run-as-user-group-radicale-radicale.patch deleted file mode 100644 index e1f1c21..0000000 --- a/net/radicale/patches/010-Run-as-user-group-radicale-radicale.patch +++ /dev/null @@ -1,30 +0,0 @@ -Subject: [PATCH] Run as user radicale and group radicale - -Patch to run Radicale service as radicale:radicale non root user - -Signed-off-by: Christian Schoenebeck ---- - bin/radicale | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/bin/radicale b/bin/radicale -index 619aca5..7466020 100755 ---- a/bin/radicale -+++ b/bin/radicale -@@ -26,6 +26,13 @@ Launch the server according to configuration and command-line options. - - """ - -+# inserted to run as user radicale -+import pwd, grp, os -+uid = pwd.getpwnam('radicale').pw_uid -+gid = grp.getgrnam('radicale').gr_gid -+os.setegid(gid) -+os.seteuid(uid) -+ - import radicale.__main__ - - --- -2.1.0 - diff --git a/net/radsecproxy/Makefile b/net/radsecproxy/Makefile deleted file mode 100644 index 7387e03..0000000 --- a/net/radsecproxy/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2008-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=radsecproxy -PKG_VERSION:=1.6.8 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://software.uninett.no/radsecproxy/ -PKG_MD5SUM:=b868f7faf4887a10376d1bd96ef75368 - -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=LICENSE - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/radsecproxy - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libopenssl +libpthread - TITLE:=radsecproxy - URL:=http://software.uninett.no/radsecproxy - MAINTAINER:=Toke Høiland-Jørgensen -endef - -define Package/radsecproxy/description - A generic radius proxy for UDP/TLS (RadSec) -endef - -CONFIGURE_ARGS+= \ - --with-ssl="$(STAGING_DIR)/usr" - -#TARGET_CFLAGS += -ansi -#TARGET_CFLAGS += -std=c99 -TARGET_CFLAGS += -Wno-long-long - - -define Package/radsecproxy/install - $(INSTALL_DIR) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radsecproxy $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/config/ - $(INSTALL_DATA) ./files/radsecproxy.conf $(1)/etc/config/radsecproxy - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/radsecproxy.init $(1)/etc/init.d/radsecproxy -endef - -define Package/radsecproxy/conffiles -/etc/config/radsecproxy -endef - -$(eval $(call BuildPackage,radsecproxy)) - diff --git a/net/radsecproxy/files/radsecproxy.conf b/net/radsecproxy/files/radsecproxy.conf deleted file mode 100644 index 33e7e27..0000000 --- a/net/radsecproxy/files/radsecproxy.conf +++ /dev/null @@ -1,43 +0,0 @@ -# Sample radsecproxy configuration - -#Basic options -config options - option include '/etc/radsecproxy.conf' - #option LogLevel '3' - #option LogDestination 'x-syslog:///' - #list ListenUDP '127.0.0.1:1812' - #list ListenTLS '0.0.0.0:2083' - #list ListenTLS '[::]:2083' - -#config tls -# option name 'default' -# option CACertificatePath '/etc/ssl/certs' -# option certificateFile '/etc/ssl/certs/host.example.com.pem' -# option certificateKeyFile '/etc/ssl/private/host.example.com.key.pem' - -#config client -# option name 'localhost' -# option type 'udp' -# option secret 'mysecret' - -#config server -# option name '[2001:db8::1]' -# option type 'tls' -# option secret 'radsec' -# option statusServer '1' - -# Please note that ordering of realm blocks is important - -#config realm -# option name '/myabc\.com$' -# option replyMessage 'Misconfigured client: default realm of Intel PRO/Wireless supplicant!' -# - -#config realm -# option name '/^$/' -# option replyMessage 'Misconfigured client: empty realm!' -# - -#config realm -# option name '*' -# list server '[2001:db8::1]' diff --git a/net/radsecproxy/files/radsecproxy.init b/net/radsecproxy/files/radsecproxy.init deleted file mode 100644 index 7b22396..0000000 --- a/net/radsecproxy/files/radsecproxy.init +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=70 - -USE_PROCD=1 -PROG=/usr/sbin/radsecproxy -CONFFILE=/var/etc/radsecproxy.conf -LIST_SEP=" -" -append_params() { - local param - local value - local section="$1" - shift - for param in $*; do - config_get value "$section" "$param" - [ -z "$value" ] && { - param=$(echo $param | tr [A-Z] [a-z]) - config_get value "$section" "$param" - } - IFS="$LIST_SEP" - for value in $value; do - [ -n "$value" ] && echo " $param '$value'" >> "$CONFFILE" - done - unset IFS - done -} - -append_bools() { - local param - local value - local section="$1" - shift - for param in $*; do - config_get_bool value "$section" "$param" - [ -z "$value" ] && { - param=$(echo $param | tr [A-Z] [a-z]) - config_get_bool value "$section" "$param" - } - [ -n "$value" ] && { - [ "$value" -eq 0 ] && echo " $param off" >> "$CONFFILE" - [ "$value" -eq 1 ] && echo " $param on" >> "$CONFFILE" - } - done -} - -radsecproxy_options() { - local cfg="$1" - append_params "$cfg" \ - Include PidFile LogLevel LogDestination FTicksReporting FTicksMAC FTicksKey \ - FTicksSyslogFacility ListenUDP ListenTCP ListenTLS ListenDTLS SourceUDP \ - SourceTCP SourceTLS SourceDTLS TTLAttribute AddTTL - append_bools "$cfg" \ - LoopPrevention IPv4Only IPv6Only -} - -tls_block() { - local cfg="$1" - local name - config_get name "$cfg" name - echo "tls '$name' {" >> "$CONFFILE" - append_params "$cfg" \ - Include CACertificateFile CACertificatePath certificateFile certificateKeyFile \ - certificateKeyPassword cacheExpiry policyOID - append_bools "$cfg" \ - CRLCheck - echo "}" >> "$CONFFILE" -} - -rewrite_block() { - local cfg="$1" - local name - config_get name "$cfg" name - echo "rewrite '$name' {" >> "$CONFFILE" - append_params "$cfg" \ - Include addAttribute addVendorAttribute removeAttribute removeVendorAttribute \ - modifyAttribute - echo "}" >> "$CONFFILE" -} - -client_block() { - local cfg="$1" - local name - config_get name "$cfg" name - echo "client '$name' {" >> "$CONFFILE" - append_params "$cfg" \ - Include host type secret tls matchCertificateAttribute duplicateInterval \ - AddTTL fticksVISCOUNTRY fticksVISINST rewrite rewriteIn rewriteOut \ - rewriteAttribute - append_bools "$cfg" \ - IPv4Only IPv6Only certificateNameCheck - echo "}" >> "$CONFFILE" -} - -server_block() { - local cfg="$1" - local name - config_get name "$cfg" name - echo "server '$name' {" >> "$CONFFILE" - append_params "$cfg" \ - Include host port type secret tls matchCertificateAttribute \ - AddTTL rewrite rewriteIn rewriteOut retryCount dynamicLookupCommand \ - retryInterval - append_bools "$cfg" \ - IPv4Only IPv6Only certificateNameCheck statusServer LoopPrevention - echo "}" >> "$CONFFILE" -} - -realm_block() { - local cfg="$1" - local name - config_get name "$cfg" name - echo "realm '$name' {" >> "$CONFFILE" - append_params "$cfg" \ - Include server accountingServer replyMessage - append_bools "$cfg" \ - accountingResponse - echo "}" >> "$CONFFILE" -} - -start_service() { - mkdir -p $(dirname $CONFFILE) - echo "# auto-generated config file from /etc/config/radsecproxy" > $CONFFILE - config_load 'radsecproxy' - config_foreach radsecproxy_options options - config_foreach tls_block tls - config_foreach rewrite_block rewrite - config_foreach client_block client - config_foreach server_block server - config_foreach realm_block realm - - procd_open_instance - procd_set_param command $PROG -f -c $CONFFILE - procd_set_param file $CONFFILE - procd_set_param respawn - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger 'radsecproxy' -} diff --git a/net/radsecproxy/patches/100-missing-return.patch b/net/radsecproxy/patches/100-missing-return.patch deleted file mode 100644 index 871fc6e..0000000 --- a/net/radsecproxy/patches/100-missing-return.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- a/dtls.c -+++ b/dtls.c -@@ -523,6 +523,7 @@ void *udpdtlsserverrd(void *arg) { - free(params); - cacheexpire(sessioncache, &lastexpiry); - } -+ return NULL; - } - - int dtlsconnect(struct server *server, struct timeval *when, int timeout, char *text) { -@@ -642,6 +643,7 @@ void *udpdtlsclientrd(void *arg) { - if (udp2bio(s, conf->servers->rbios, cnt)) - debug(DBG_DBG, "radudpget: got DTLS in UDP from %s", addr2string((struct sockaddr *)&from)); - } -+ return NULL; - } - - void *dtlsclientrd(void *arg) { ---- a/radsecproxy.c -+++ b/radsecproxy.c -@@ -3203,6 +3203,8 @@ void *sighandler(void *arg) { - debug(DBG_WARN, "sighandler: ignoring signal %d", sig); - } - } -+ -+ return NULL; - } - - int createpidfile(const char *pidfile) { -@@ -3289,6 +3291,8 @@ int radsecproxy_main(int argc, char **ar - /* just hang around doing nothing, anything to do here? */ - for (;;) - sleep(1000); -+ -+ return 0; - } - - /* Local Variables: */ ---- a/udp.c -+++ b/udp.c -@@ -266,6 +266,8 @@ void *udpclientrd(void *arg) { - buf = radudpget(*s, NULL, &server, NULL); - replyh(server, buf); - } -+ -+ return NULL; - } - - void *udpserverrd(void *arg) { -@@ -310,6 +312,8 @@ void *udpserverwr(void *arg) { - debug(DBG_DBG, "udpserverwr: refcount %d", reply->refcount); - freerq(reply); - } -+ -+ return NULL; - } - - void addclientudp(struct client *client) { diff --git a/net/radsecproxy/patches/200-logdest-on-foreground.patch b/net/radsecproxy/patches/200-logdest-on-foreground.patch deleted file mode 100644 index 6678448..0000000 --- a/net/radsecproxy/patches/200-logdest-on-foreground.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/radsecproxy.c b/radsecproxy.c -index 563c4a8..9fa076d 100644 ---- a/radsecproxy.c -+++ b/radsecproxy.c -@@ -3382,18 +3382,16 @@ int radsecproxy_main(int argc, char **argv) { - options.loglevel = loglevel; - else if (options.loglevel) - debug_set_level(options.loglevel); -- if (!foreground) { -- debug_set_destination(options.logdestination -- ? options.logdestination -- : "x-syslog:///", LOG_TYPE_DEBUG); -+ debug_set_destination(options.logdestination -+ ? options.logdestination -+ : "x-syslog:///", LOG_TYPE_DEBUG); - #if defined(WANT_FTICKS) -- if (options.ftickssyslogfacility) { -- debug_set_destination(options.ftickssyslogfacility, -- LOG_TYPE_FTICKS); -- free(options.ftickssyslogfacility); -- } --#endif -+ if (options.ftickssyslogfacility) { -+ debug_set_destination(options.ftickssyslogfacility, -+ LOG_TYPE_FTICKS); -+ free(options.ftickssyslogfacility); - } -+#endif - free(options.logdestination); - - if (!list_first(clconfs)) diff --git a/net/reaver/Makefile b/net/reaver/Makefile index 1a499de..79af9f8 100644 --- a/net/reaver/Makefile +++ b/net/reaver/Makefile @@ -1,5 +1,6 @@ # # Copyright (C) 2012-2015 OpenWrt.org +# Copyright (C) 2017 Yousong Zhou # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,46 +9,50 @@ include $(TOPDIR)/rules.mk PKG_NAME:=reaver -PKG_VERSION:=1.4 -PKG_RELEASE:=2 +PKG_VERSION:=1.6.4 +PKG_RELEASE:=1 PKG_MAINTAINER:=Yousong Zhou -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/reaver-wps -PKG_MD5SUM:=05441dda7bacfcbe1e831c85d1ea3bc9 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/t6x/reaver-wps-fork-t6x/releases/download/v$(PKG_VERSION) +PKG_HASH:=bf63b3d5a5596b0bd292a995f778dc99b0b89af88237cc2cfd7c4abbce942bb2 + PKG_LICENSE:=GPL-2.0 +PKG_LICENSE_FILES:=docs/LICENSE PKG_USE_MIPS16:=0 PKG_AUTOMAKE_PATHS:=src PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk - CONFIGURE_PATH:=src MAKE_PATH:=src +CONFIGURE_ARGS += --enable-savetocurrent + define Package/reaver SECTION:=net CATEGORY:=Network SUBMENU:=wireless TITLE:=Efficient brute force attack against Wifi Protected Setup - URL:=https://code.google.com/p/reaver-wps/ - DEPENDS:=+libpcap +libsqlite3 + URL:=https://github.com/t6x/reaver-wps-fork-t6x + DEPENDS:=+libpcap endef define Package/reaver/description - Reaver targets the external registrar functionality mandated by the WiFi - Protected Setup specification. - Access points will provide authenticated registrars with their current - wireless configuration (including the WPA PSK), and also accept a new - configuration from the registrar. + Reaver has been designed to be a robust and practical attack against Wi-Fi + Protected Setup (WPS) registrar PINs in order to recover WPA/WPA2 + passphrases. It has been tested against a wide variety of access points and + WPS implementations. + + This is reaver-wps-fork-t6x, a community forked version, which has included + various bug fixes and additional attack method (the offline Pixie Dust + attack). endef define Package/reaver/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/{reaver,wash} $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/reaver - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/reaver.db $(1)/etc/reaver/ endef $(eval $(call BuildPackage,reaver)) diff --git a/net/reaver/patches/0001-wpscrack-big-endian-fixes.patch b/net/reaver/patches/0001-wpscrack-big-endian-fixes.patch deleted file mode 100644 index da76c2e..0000000 --- a/net/reaver/patches/0001-wpscrack-big-endian-fixes.patch +++ /dev/null @@ -1,565 +0,0 @@ -From 4e7af9f022996cb0a03b30f6af265b757807dfa2 Mon Sep 17 00:00:00 2001 -From: Paul Fertser -Date: Wed, 27 Jun 2012 17:44:55 +0400 -Subject: [PATCH 1/3] wpscrack: big-endian fixes - -This should fix access to the radiotap, 802.11, LLC/SNAP and WFA -headers' fields. Run-time tested on an ar71xx BE system. - -Signed-off-by: Paul Fertser ---- - src/80211.c | 65 +++++++++++++++++++------------ - src/builder.c | 23 +++++------ - src/defs.h | 116 +++++++++++++++++++++++++++++++++++++++----------------- - src/exchange.c | 23 ++++++----- - src/wpsmon.c | 13 ++++-- - 5 files changed, 151 insertions(+), 89 deletions(-) - -diff --git a/src/80211.c b/src/80211.c -index c2aff59..19f1e92 100644 ---- a/src/80211.c -+++ b/src/80211.c -@@ -90,17 +90,19 @@ void read_ap_beacon() - if(header.len >= MIN_BEACON_SIZE) - { - rt_header = (struct radio_tap_header *) radio_header(packet, header.len); -- frame_header = (struct dot11_frame_header *) (packet + rt_header->len); -- -+ size_t rt_header_len = __le16_to_cpu(rt_header->len); -+ frame_header = (struct dot11_frame_header *) (packet + rt_header_len); -+ - if(is_target(frame_header)) - { -- if(frame_header->fc.type == MANAGEMENT_FRAME && frame_header->fc.sub_type == SUBTYPE_BEACON) -+ if((frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == -+ __cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON)) - { -- beacon = (struct beacon_management_frame *) (packet + rt_header->len + sizeof(struct dot11_frame_header)); -+ beacon = (struct beacon_management_frame *) (packet + rt_header_len + sizeof(struct dot11_frame_header)); - set_ap_capability(beacon->capability); - - /* Obtain the SSID and channel number from the beacon packet */ -- tag_offset = rt_header->len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame); -+ tag_offset = rt_header_len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame); - channel = parse_beacon_tags(packet, header.len); - - /* If no channel was manually specified, switch to the AP's current channel */ -@@ -135,29 +137,31 @@ int8_t signal_strength(const u_char *packet, size_t len) - { - header = (struct radio_tap_header *) packet; - -- if((header->flags & SSI_FLAG) == SSI_FLAG) -+ uint32_t flags = __le32_to_cpu(header->flags); -+ -+ if((flags & SSI_FLAG) == SSI_FLAG) - { -- if((header->flags & TSFT_FLAG) == TSFT_FLAG) -+ if((flags & TSFT_FLAG) == TSFT_FLAG) - { - offset += TSFT_SIZE; - } - -- if((header->flags & FLAGS_FLAG) == FLAGS_FLAG) -+ if((flags & FLAGS_FLAG) == FLAGS_FLAG) - { - offset += FLAGS_SIZE; - } - -- if((header->flags & RATE_FLAG) == RATE_FLAG) -+ if((flags & RATE_FLAG) == RATE_FLAG) - { - offset += RATE_SIZE; - } - -- if((header->flags & CHANNEL_FLAG) == CHANNEL_FLAG) -+ if((flags & CHANNEL_FLAG) == CHANNEL_FLAG) - { - offset += CHANNEL_SIZE; - } - -- if((header->flags & FHSS_FLAG) == FHSS_FLAG) -+ if((flags & FHSS_FLAG) == FHSS_FLAG) - { - offset += FHSS_FLAG; - } -@@ -196,11 +200,13 @@ int is_wps_locked() - if(header.len >= MIN_BEACON_SIZE) - { - rt_header = (struct radio_tap_header *) radio_header(packet, header.len); -- frame_header = (struct dot11_frame_header *) (packet + rt_header->len); -+ size_t rt_header_len = __le16_to_cpu(rt_header->len); -+ frame_header = (struct dot11_frame_header *) (packet + rt_header_len); - - if(memcmp(frame_header->addr3, get_bssid(), MAC_ADDR_LEN) == 0) - { -- if(frame_header->fc.type == MANAGEMENT_FRAME && frame_header->fc.sub_type == SUBTYPE_BEACON) -+ if((frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == -+ __cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON)) - { - if(parse_wps_parameters(packet, header.len, &wps)) - { -@@ -411,24 +417,30 @@ int associate_recv_loop() - if(header.len >= MIN_AUTH_SIZE) - { - rt_header = (struct radio_tap_header *) radio_header(packet, header.len); -- dot11_frame = (struct dot11_frame_header *) (packet + rt_header->len); -+ size_t rt_header_len = __le16_to_cpu(rt_header->len); -+ dot11_frame = (struct dot11_frame_header *) (packet + rt_header_len); - - if((memcmp(dot11_frame->addr3, get_bssid(), MAC_ADDR_LEN) == 0) && - (memcmp(dot11_frame->addr1, get_mac(), MAC_ADDR_LEN) == 0)) - { -- if(dot11_frame->fc.type == MANAGEMENT_FRAME) -+ if((dot11_frame->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE)) == -+ __cpu_to_le16(IEEE80211_FTYPE_MGMT)) - { -- auth_frame = (struct authentication_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header->len); -- assoc_frame = (struct association_response_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header->len); -+ auth_frame = (struct authentication_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header_len); -+ assoc_frame = (struct association_response_management_frame *) (packet + sizeof(struct dot11_frame_header) + rt_header_len); - - /* Did we get an authentication packet with a successful status? */ -- if((dot11_frame->fc.sub_type == SUBTYPE_AUTHENTICATION) && (auth_frame->status == AUTHENTICATION_SUCCESS)) -+ if((dot11_frame->fc & __cpu_to_le16(IEEE80211_FCTL_STYPE)) == -+ __cpu_to_le16(IEEE80211_STYPE_AUTH) -+ && (auth_frame->status == __cpu_to_le16(AUTHENTICATION_SUCCESS))) - { - ret_val = AUTH_OK; - break; - } - /* Did we get an association packet with a successful status? */ -- else if((dot11_frame->fc.sub_type == SUBTYPE_ASSOCIATION) && (assoc_frame->status == ASSOCIATION_SUCCESS)) -+ else if((dot11_frame->fc & __cpu_to_le16(IEEE80211_FCTL_STYPE)) == -+ __cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP) -+ && (assoc_frame->status == __cpu_to_le16(ASSOCIATION_SUCCESS))) - { - ret_val = ASSOCIATE_OK; - break; -@@ -455,13 +467,14 @@ enum encryption_type supported_encryption(const u_char *packet, size_t len) - if(len > MIN_BEACON_SIZE) - { - rt_header = (struct radio_tap_header *) radio_header(packet, len); -- beacon = (struct beacon_management_frame *) (packet + rt_header->len + sizeof(struct dot11_frame_header)); -- offset = tag_offset = rt_header->len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame); -+ size_t rt_header_len = __le16_to_cpu(rt_header->len); -+ beacon = (struct beacon_management_frame *) (packet + rt_header_len + sizeof(struct dot11_frame_header)); -+ offset = tag_offset = rt_header_len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame); - - tag_len = len - tag_offset; - tag_data = (const u_char *) (packet + tag_offset); - -- if((beacon->capability & CAPABILITY_WEP) == CAPABILITY_WEP) -+ if((__le16_to_cpu(beacon->capability) & CAPABILITY_WEP) == CAPABILITY_WEP) - { - enc = WEP; - -@@ -509,7 +522,7 @@ int parse_beacon_tags(const u_char *packet, size_t len) - struct radio_tap_header *rt_header = NULL; - - rt_header = (struct radio_tap_header *) radio_header(packet, len); -- tag_offset = rt_header->len + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame); -+ tag_offset = __le16_to_cpu(rt_header->len) + sizeof(struct dot11_frame_header) + sizeof(struct beacon_management_frame); - - if(tag_offset < len) - { -@@ -548,7 +561,7 @@ int parse_beacon_tags(const u_char *packet, size_t len) - { - if(ie_len == 1) - { -- memcpy((int *) &channel, channel_data, ie_len); -+ channel = *(uint8_t*)channel_data; - } - free(channel_data); - } -@@ -603,13 +616,13 @@ int check_fcs(const u_char *packet, size_t len) - if(len > 4) - { - /* Get the packet's reported FCS (last 4 bytes of the packet) */ -- memcpy((uint32_t *) &fcs, (packet + (len-4)), 4); -+ fcs = __le32_to_cpu(*(uint32_t*)(packet + (len-4))); - - /* FCS is not calculated over the radio tap header */ - if(has_rt_header()) - { - rt_header = (struct radio_tap_header *) packet; -- offset += rt_header->len; -+ offset += __le16_to_cpu(rt_header->len); - } - - if(len > offset) -diff --git a/src/builder.c b/src/builder.c -index 37f2de7..6bf89e7 100644 ---- a/src/builder.c -+++ b/src/builder.c -@@ -44,9 +44,8 @@ const void *build_radio_tap_header(size_t *len) - memset((void *) buf, 0, sizeof(struct radio_tap_header)); - rt_header = (struct radio_tap_header *) buf; - -- rt_header->len = sizeof(struct radio_tap_header); -- -- *len = rt_header->len; -+ *len = sizeof(struct radio_tap_header); -+ rt_header->len = __cpu_to_le16(*len); - } - - return buf; -@@ -67,9 +66,9 @@ const void *build_dot11_frame_header(uint16_t fc, size_t *len) - - frag_seq += SEQ_MASK; - -- header->duration = DEFAULT_DURATION; -- memcpy((void *) &header->fc, (void *) &fc, sizeof(struct frame_control)); -- header->frag_seq = frag_seq; -+ header->duration = __cpu_to_le16(DEFAULT_DURATION); -+ header->fc = __cpu_to_le16(fc); -+ header->frag_seq = __cpu_to_le16(frag_seq); - - memcpy((void *) header->addr1, get_bssid(), MAC_ADDR_LEN); - memcpy((void *) header->addr2, get_mac(), MAC_ADDR_LEN); -@@ -91,8 +90,8 @@ const void *build_authentication_management_frame(size_t *len) - memset((void *) buf, 0, *len); - frame = (struct authentication_management_frame *) buf; - -- frame->algorithm = OPEN_SYSTEM; -- frame->sequence = 1; -+ frame->algorithm = __cpu_to_le16(OPEN_SYSTEM); -+ frame->sequence = __cpu_to_le16(1); - frame->status = 0; - } - -@@ -111,8 +110,8 @@ const void *build_association_management_frame(size_t *len) - memset((void *) buf, 0, *len); - frame = (struct association_request_management_frame *) buf; - -- frame->capability = get_ap_capability(); -- frame->listen_interval = LISTEN_INTERVAL; -+ frame->capability = __cpu_to_le16(get_ap_capability()); -+ frame->listen_interval = __cpu_to_le16(LISTEN_INTERVAL); - } - - return buf; -@@ -133,7 +132,7 @@ const void *build_llc_header(size_t *len) - header->dsap = LLC_SNAP; - header->ssap = LLC_SNAP; - header->control_field = UNNUMBERED_FRAME; -- header->type = DOT1X_AUTHENTICATION; -+ header->type = __cpu_to_be16(DOT1X_AUTHENTICATION); - - } - -@@ -279,7 +278,7 @@ const void *build_wfa_header(uint8_t op_code, size_t *len) - header = (struct wfa_expanded_header *) buf; - - memcpy(header->id, WFA_VENDOR_ID, sizeof(header->id)); -- header->type = SIMPLE_CONFIG; -+ header->type = __cpu_to_be32(SIMPLE_CONFIG); - header->opcode = op_code; - } - -diff --git a/src/defs.h b/src/defs.h -index b2f45ea..0c628e7 100644 ---- a/src/defs.h -+++ b/src/defs.h -@@ -41,6 +41,7 @@ - #include - #include - #include -+#include - - #include "wps.h" - -@@ -65,10 +66,10 @@ - #define MANAGEMENT_FRAME 0x00 - #define SUBTYPE_BEACON 0x08 - --#define DOT1X_AUTHENTICATION 0x8E88 -+#define DOT1X_AUTHENTICATION 0x888E - #define DOT1X_EAP_PACKET 0x00 - --#define SIMPLE_CONFIG 0x01000000 -+#define SIMPLE_CONFIG 0x00000001 - - #define P1_SIZE 10000 - #define P2_SIZE 1000 -@@ -282,66 +283,111 @@ enum wfa_elements - WEP_TRANSMIT_KEY = 0x10064 - }; - -+#define IEEE80211_FCTL_VERS 0x0003 -+#define IEEE80211_FCTL_FTYPE 0x000c -+#define IEEE80211_FCTL_STYPE 0x00f0 -+#define IEEE80211_FCTL_TODS 0x0100 -+#define IEEE80211_FCTL_FROMDS 0x0200 -+#define IEEE80211_FCTL_MOREFRAGS 0x0400 -+#define IEEE80211_FCTL_RETRY 0x0800 -+#define IEEE80211_FCTL_PM 0x1000 -+#define IEEE80211_FCTL_MOREDATA 0x2000 -+#define IEEE80211_FCTL_PROTECTED 0x4000 -+#define IEEE80211_FCTL_ORDER 0x8000 -+ -+#define IEEE80211_SCTL_FRAG 0x000F -+#define IEEE80211_SCTL_SEQ 0xFFF0 -+ -+#define IEEE80211_FTYPE_MGMT 0x0000 -+#define IEEE80211_FTYPE_CTL 0x0004 -+#define IEEE80211_FTYPE_DATA 0x0008 -+ -+/* management */ -+#define IEEE80211_STYPE_ASSOC_REQ 0x0000 -+#define IEEE80211_STYPE_ASSOC_RESP 0x0010 -+#define IEEE80211_STYPE_REASSOC_REQ 0x0020 -+#define IEEE80211_STYPE_REASSOC_RESP 0x0030 -+#define IEEE80211_STYPE_PROBE_REQ 0x0040 -+#define IEEE80211_STYPE_PROBE_RESP 0x0050 -+#define IEEE80211_STYPE_BEACON 0x0080 -+#define IEEE80211_STYPE_ATIM 0x0090 -+#define IEEE80211_STYPE_DISASSOC 0x00A0 -+#define IEEE80211_STYPE_AUTH 0x00B0 -+#define IEEE80211_STYPE_DEAUTH 0x00C0 -+#define IEEE80211_STYPE_ACTION 0x00D0 -+ -+/* control */ -+#define IEEE80211_STYPE_BACK_REQ 0x0080 -+#define IEEE80211_STYPE_BACK 0x0090 -+#define IEEE80211_STYPE_PSPOLL 0x00A0 -+#define IEEE80211_STYPE_RTS 0x00B0 -+#define IEEE80211_STYPE_CTS 0x00C0 -+#define IEEE80211_STYPE_ACK 0x00D0 -+#define IEEE80211_STYPE_CFEND 0x00E0 -+#define IEEE80211_STYPE_CFENDACK 0x00F0 -+ -+/* data */ -+#define IEEE80211_STYPE_DATA 0x0000 -+#define IEEE80211_STYPE_DATA_CFACK 0x0010 -+#define IEEE80211_STYPE_DATA_CFPOLL 0x0020 -+#define IEEE80211_STYPE_DATA_CFACKPOLL 0x0030 -+#define IEEE80211_STYPE_NULLFUNC 0x0040 -+#define IEEE80211_STYPE_CFACK 0x0050 -+#define IEEE80211_STYPE_CFPOLL 0x0060 -+#define IEEE80211_STYPE_CFACKPOLL 0x0070 -+#define IEEE80211_STYPE_QOS_DATA 0x0080 -+#define IEEE80211_STYPE_QOS_DATA_CFACK 0x0090 -+#define IEEE80211_STYPE_QOS_DATA_CFPOLL 0x00A0 -+#define IEEE80211_STYPE_QOS_DATA_CFACKPOLL 0x00B0 -+#define IEEE80211_STYPE_QOS_NULLFUNC 0x00C0 -+#define IEEE80211_STYPE_QOS_CFACK 0x00D0 -+#define IEEE80211_STYPE_QOS_CFPOLL 0x00E0 -+#define IEEE80211_STYPE_QOS_CFACKPOLL 0x00F0 -+ - #pragma pack(1) - struct radio_tap_header - { - uint8_t revision; - uint8_t pad; -- uint16_t len; -- uint32_t flags; --}; -- --struct frame_control --{ -- unsigned version : 2; -- unsigned type : 2; -- unsigned sub_type : 4; -- -- unsigned to_ds : 1; -- unsigned from_ds : 1; -- unsigned more_frag : 1; -- unsigned retry : 1; -- unsigned pwr_mgt : 1; -- unsigned more_data : 1; -- unsigned protected_frame : 1; -- unsigned order : 1; -+ __le16 len; -+ __le32 flags; - }; - - struct dot11_frame_header - { -- struct frame_control fc; -- uint16_t duration; -+ __le16 fc; -+ __le16 duration; - unsigned char addr1[MAC_ADDR_LEN]; - unsigned char addr2[MAC_ADDR_LEN]; - unsigned char addr3[MAC_ADDR_LEN]; -- uint16_t frag_seq; -+ __le16 frag_seq; - }; - - struct authentication_management_frame - { -- uint16_t algorithm; -- uint16_t sequence; -- uint16_t status; -+ __le16 algorithm; -+ __le16 sequence; -+ __le16 status; - }; - - struct association_request_management_frame - { -- uint16_t capability; -- uint16_t listen_interval; -+ __le16 capability; -+ __le16 listen_interval; - }; - - struct association_response_management_frame - { -- uint16_t capability; -- uint16_t status; -- uint16_t id; -+ __le16 capability; -+ __le16 status; -+ __le16 id; - }; - - struct beacon_management_frame - { - unsigned char timestamp[TIMESTAMP_LEN]; -- uint16_t beacon_interval; -- uint16_t capability; -+ __le16 beacon_interval; -+ __le16 capability; - }; - - struct llc_header -@@ -350,7 +396,7 @@ struct llc_header - uint8_t ssap; - uint8_t control_field; - unsigned char org_code[3]; -- uint16_t type; -+ __be16 type; - }; - - struct dot1X_header -@@ -371,7 +417,7 @@ struct eap_header - struct wfa_expanded_header - { - unsigned char id[3]; -- uint32_t type; -+ __be32 type; - uint8_t opcode; - uint8_t flags; - }; -diff --git a/src/exchange.c b/src/exchange.c -index 23c87e9..4f9a82b 100644 ---- a/src/exchange.c -+++ b/src/exchange.c -@@ -306,26 +306,27 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header) - - /* Cast the radio tap and 802.11 frame headers and parse out the Frame Control field */ - rt_header = (struct radio_tap_header *) packet; -- frame_header = (struct dot11_frame_header *) (packet+rt_header->len); -+ size_t rt_header_len = __le16_to_cpu(rt_header->len); -+ frame_header = (struct dot11_frame_header *) (packet+rt_header_len); - - /* Does the BSSID/source address match our target BSSID? */ - if(memcmp(frame_header->addr3, get_bssid(), MAC_ADDR_LEN) == 0) - { - /* Is this a data packet sent to our MAC address? */ -- if(frame_header->fc.type == DATA_FRAME && -- frame_header->fc.sub_type == SUBTYPE_DATA && -- (memcmp(frame_header->addr1, get_mac(), MAC_ADDR_LEN) == 0)) -+ if (((frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == -+ __cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA)) && -+ (memcmp(frame_header->addr1, get_mac(), MAC_ADDR_LEN) == 0)) - { - llc = (struct llc_header *) (packet + -- rt_header->len + -+ rt_header_len + - sizeof(struct dot11_frame_header) - ); - - /* All packets in our exchanges will be 802.1x */ -- if(llc->type == DOT1X_AUTHENTICATION) -+ if(llc->type == __cpu_to_be16(DOT1X_AUTHENTICATION)) - { - dot1x = (struct dot1X_header *) (packet + -- rt_header->len + -+ rt_header_len + - sizeof(struct dot11_frame_header) + - sizeof(struct llc_header) - ); -@@ -334,7 +335,7 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header) - if(dot1x->type == DOT1X_EAP_PACKET && (header->len >= EAP_PACKET_SIZE)) - { - eap = (struct eap_header *) (packet + -- rt_header->len + -+ rt_header_len + - sizeof(struct dot11_frame_header) + - sizeof(struct llc_header) + - sizeof(struct dot1X_header) -@@ -366,7 +367,7 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header) - else if((eap->type == EAP_EXPANDED) && (header->len > WFA_PACKET_SIZE)) - { - wfa = (struct wfa_expanded_header *) (packet + -- rt_header->len + -+ rt_header_len + - sizeof(struct dot11_frame_header) + - sizeof(struct llc_header) + - sizeof(struct dot1X_header) + -@@ -374,14 +375,14 @@ enum wps_type process_packet(const u_char *packet, struct pcap_pkthdr *header) - ); - - /* Verify that this is a WPS message */ -- if(wfa->type == SIMPLE_CONFIG) -+ if(wfa->type == __cpu_to_be32(SIMPLE_CONFIG)) - { - wps_msg_len = (size_t) ntohs(eap->len) - - sizeof(struct eap_header) - - sizeof(struct wfa_expanded_header); - - wps_msg = (const void *) (packet + -- rt_header->len + -+ rt_header_len + - sizeof(struct dot11_frame_header) + - sizeof(struct llc_header) + - sizeof(struct dot1X_header) + -diff --git a/src/wpsmon.c b/src/wpsmon.c -index d976924..22a394f 100644 ---- a/src/wpsmon.c -+++ b/src/wpsmon.c -@@ -295,7 +295,8 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char * - } - - rt_header = (struct radio_tap_header *) radio_header(packet, header->len); -- frame_header = (struct dot11_frame_header *) (packet + rt_header->len); -+ size_t rt_header_len = __le16_to_cpu(rt_header->len); -+ frame_header = (struct dot11_frame_header *) (packet + rt_header_len); - - /* If a specific BSSID was specified, only parse packets from that BSSID */ - if(!is_target(frame_header)) -@@ -323,15 +324,17 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char * - channel_changed = 1; - } - -- if(frame_header->fc.sub_type == PROBE_RESPONSE || -- frame_header->fc.sub_type == SUBTYPE_BEACON) -+ unsigned fsub_type = frame_header->fc & __cpu_to_le16(IEEE80211_FCTL_STYPE); -+ -+ if(fsub_type == __cpu_to_le16(IEEE80211_STYPE_PROBE_RESP) || -+ fsub_type == __cpu_to_le16(IEEE80211_STYPE_BEACON)) - { - wps_parsed = parse_wps_parameters(packet, header->len, wps); - } - - if(!is_done(bssid) && (get_channel() == channel || source == PCAP_FILE)) - { -- if(frame_header->fc.sub_type == SUBTYPE_BEACON && -+ if(fsub_type == __cpu_to_le16(IEEE80211_STYPE_BEACON) && - mode == SCAN && - !passive && - should_probe(bssid)) -@@ -369,7 +372,7 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char * - * If there was no WPS information, then the AP does not support WPS and we should ignore it from here on. - * If this was a probe response, then we've gotten all WPS info we can get from this AP and should ignore it from here on. - */ -- if(!wps_parsed || frame_header->fc.sub_type == PROBE_RESPONSE) -+ if(!wps_parsed || fsub_type == __cpu_to_le16(IEEE80211_STYPE_PROBE_RESP)) - { - mark_ap_complete(bssid); - } --- -1.7.7 - diff --git a/net/reaver/patches/0002-Use-the-current-directory-for-storing-and-loading-se.patch b/net/reaver/patches/0002-Use-the-current-directory-for-storing-and-loading-se.patch deleted file mode 100644 index dd1bb42..0000000 --- a/net/reaver/patches/0002-Use-the-current-directory-for-storing-and-loading-se.patch +++ /dev/null @@ -1,53 +0,0 @@ -From cd444949f3176790101b8bdc9656831a03d8c01d Mon Sep 17 00:00:00 2001 -From: Paul Fertser -Date: Tue, 10 Jul 2012 11:13:29 +0400 -Subject: [PATCH 2/3] Use the current directory for storing and loading - sessions - -This allows the user to always explicitely choose (by changing the -current directory before launching the program) where the session -files should go. Useful e.g. to avoid hogging the precious space on -embedded devices, just cd /tmp before starting the app. - -Signed-off-by: Paul Fertser ---- - src/session.c | 16 +++------------- - 1 files changed, 3 insertions(+), 13 deletions(-) - -diff --git a/src/session.c b/src/session.c -index d3af0c3..308f213 100644 ---- a/src/session.c -+++ b/src/session.c -@@ -62,7 +62,7 @@ int restore_session() - memset(file, 0, FILENAME_MAX); - - bssid = mac2str(get_bssid(), '\0'); -- snprintf(file, FILENAME_MAX, "%s/%s.%s", CONF_DIR, bssid, CONF_EXT); -+ snprintf(file, FILENAME_MAX, "%s.%s", bssid, CONF_EXT); - free(bssid); - } - -@@ -199,18 +199,8 @@ int save_session() - } - else - { -- /* -- * If the configuration directory exists, save the session file there; else, save it to the -- * current working directory. -- */ -- if(configuration_directory_exists()) -- { -- snprintf((char *) &file_name, FILENAME_MAX, "%s/%s.%s", CONF_DIR, bssid, CONF_EXT); -- } -- else -- { -- snprintf((char *) &file_name, FILENAME_MAX, "%s.%s", bssid, CONF_EXT); -- } -+ /* save session to the current directory */ -+ snprintf((char *) &file_name, FILENAME_MAX, "%s.%s", bssid, CONF_EXT); - } - - /* Don't bother saving anything if nothing has been done */ --- -1.7.7 - diff --git a/net/reaver/patches/0003-wash-wpsmon-use-less-useless-spaces-in-output-to-fit.patch b/net/reaver/patches/0003-wash-wpsmon-use-less-useless-spaces-in-output-to-fit.patch deleted file mode 100644 index 64b290b..0000000 --- a/net/reaver/patches/0003-wash-wpsmon-use-less-useless-spaces-in-output-to-fit.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 638bb8d70d6c7e5dc99975e0bf57d8ce0455e2cc Mon Sep 17 00:00:00 2001 -From: Paul Fertser -Date: Tue, 10 Jul 2012 11:25:00 +0400 -Subject: [PATCH 3/3] wash/wpsmon: use less useless spaces in output to fit - narrow terminals - -Signed-off-by: Paul Fertser ---- - src/wpsmon.c | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/wpsmon.c b/src/wpsmon.c -index 22a394f..e0948b3 100644 ---- a/src/wpsmon.c -+++ b/src/wpsmon.c -@@ -262,8 +262,8 @@ void monitor(char *bssid, int passive, int source, int channel, int mode) - - if(!header_printed) - { -- cprintf(INFO, "BSSID Channel RSSI WPS Version WPS Locked ESSID\n"); -- cprintf(INFO, "---------------------------------------------------------------------------------------------------------------\n"); -+ cprintf(INFO, "BSSID Channel RSSI WPS Version WPS Locked ESSID\n"); -+ cprintf(INFO, "--------------------------------------------------------------------------------------\n"); - header_printed = 1; - } - -@@ -360,7 +360,7 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char * - break; - } - -- cprintf(INFO, "%17s %2d %.2d %d.%d %s %s\n", bssid, channel, rssi, (wps->version >> 4), (wps->version & 0x0F), lock_display, ssid); -+ cprintf(INFO, "%17s %2d %.2d %d.%d %s %s\n", bssid, channel, rssi, (wps->version >> 4), (wps->version & 0x0F), lock_display, ssid); - } - - if(probe_sent) --- -1.7.7 - diff --git a/net/reaver/patches/0004-Fixed-probe-request-bug-in-wash.patch b/net/reaver/patches/0004-Fixed-probe-request-bug-in-wash.patch deleted file mode 100644 index 9b51d06..0000000 --- a/net/reaver/patches/0004-Fixed-probe-request-bug-in-wash.patch +++ /dev/null @@ -1,46 +0,0 @@ -From a8edcc1ce2a55e0e02ee13c46c6a5f22dd7920e9 Mon Sep 17 00:00:00 2001 -From: "cheffner@tacnetsol.com" - -Date: Tue, 27 Mar 2012 16:25:10 +0000 -Subject: [PATCH] Fixed probe request bug in wash. - -git-svn-id: http://reaver-wps.googlecode.com/svn/trunk@113 027a3e96-2d37-f1c0-85d6-5ce5a08386c2 ---- - src/wpsmon.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/wpsmon.c b/src/wpsmon.c -index da688b9..d976924 100644 ---- a/src/wpsmon.c -+++ b/src/wpsmon.c -@@ -132,6 +132,11 @@ int main(int argc, char *argv[]) - usage(argv[0]); - goto end; - } -+ else if(get_iface()) -+ { -+ /* Get the MAC address of the specified interface */ -+ read_iface_mac(); -+ } - - if(get_iface() && source == PCAP_FILE) - { -@@ -300,6 +305,7 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char * - - set_ssid(NULL); - bssid = (char *) mac2str(frame_header->addr3, ':'); -+ set_bssid((unsigned char *) frame_header->addr3); - - if(bssid) - { -@@ -383,6 +389,7 @@ void parse_wps_settings(const u_char *packet, struct pcap_pkthdr *header, char * - - end: - if(wps) free(wps); -+ set_bssid((unsigned char *) NULL_MAC); - - return; - } --- -2.6.4 - diff --git a/net/reaver/patches/0100-Include-sys-types.h-for-definition-of-u_char.patch b/net/reaver/patches/0100-Include-sys-types.h-for-definition-of-u_char.patch deleted file mode 100644 index 541968a..0000000 --- a/net/reaver/patches/0100-Include-sys-types.h-for-definition-of-u_char.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 811f5c0b0a226edfbf5aa2f316e083f30ec3cd8d Mon Sep 17 00:00:00 2001 -From: Yousong Zhou -Date: Tue, 18 Aug 2015 14:34:26 +0800 -Subject: [PATCH] Include for definition of u_char. - -Fixes build with musl-libc. - -Signed-off-by: Yousong Zhou ---- - src/libwps/libwps.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/libwps/libwps.h b/src/libwps/libwps.h -index b04dd8b..bdd7b9a 100755 ---- a/src/libwps/libwps.h -+++ b/src/libwps/libwps.h -@@ -17,6 +17,7 @@ - #include - #include - #include -+#include - - #define LIBWPS_MAX_STR_LEN 256 - --- -1.7.10.4 - diff --git a/net/reaver/patches/0101-pcap-use-65536-as-snaplen.patch b/net/reaver/patches/0101-pcap-use-65536-as-snaplen.patch deleted file mode 100644 index 03f4318..0000000 --- a/net/reaver/patches/0101-pcap-use-65536-as-snaplen.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/init.c.orig 2016-12-08 13:23:17.386891467 +0800 -+++ b/src/init.c 2016-12-08 13:23:20.850892551 +0800 -@@ -121,7 +121,7 @@ pcap_t *capture_init(char *capture_sourc - pcap_t *handle = NULL; - char errbuf[PCAP_ERRBUF_SIZE] = { 0 }; - -- handle = pcap_open_live(capture_source, BUFSIZ, 1, 0, errbuf); -+ handle = pcap_open_live(capture_source, 65536, 1, 0, errbuf); - if(!handle) - { - handle = pcap_open_offline(capture_source, errbuf); diff --git a/net/redsocks/Makefile b/net/redsocks/Makefile deleted file mode 100644 index 4f5f563..0000000 --- a/net/redsocks/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2014-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=redsocks -PKG_VERSION:=0.4-20150907 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/darkk/redsocks.git -PKG_SOURCE_VERSION:=2118c616b4970a0436eceaa57a6e3451ec98ad2b - -PKG_MAINTAINER:=Johannes Morgenroth -PKG_LICENSE:=Apache-2.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/redsocks - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libevent2 - TITLE:=Redirect any TCP connection to a SOCKS or HTTPS proxy server -endef - -define Package/redsocks/conffiles -/etc/redsocks.conf -endef - -define Package/redsocks/description - Redsocks is a daemon running on the local system, that will transparently - tunnel any TCP connection via a remote SOCKS4, SOCKS5 or HTTP proxy server. It - uses the system firewall's redirection facility to intercept TCP connections, - thus the redirection is system-wide, with fine-grained control, and does - not depend on LD_PRELOAD libraries. - - Redsocks supports tunneling TCP connections and UDP packets. It has - authentication support for both, SOCKS and HTTP proxies. - - Also included is a small DNS server returning answers with the "truncated" flag - set for any UDP query, forcing the resolver to use TCP. -endef - -define Package/redsocks/install - $(INSTALL_DIR) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/redsocks $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) files/redsocks.init $(1)/etc/init.d/redsocks - $(INSTALL_CONF) files/redsocks.conf $(1)/etc/ -endef - -$(eval $(call BuildPackage,redsocks)) diff --git a/net/redsocks/files/redsocks.conf b/net/redsocks/files/redsocks.conf deleted file mode 100644 index 64307c7..0000000 --- a/net/redsocks/files/redsocks.conf +++ /dev/null @@ -1,108 +0,0 @@ -base { - // debug: connection progress & client list on SIGUSR1 - log_debug = off; - - // info: start and end of client session - log_info = on; - - /* possible `log' values are: - * stderr - * "file:/path/to/file" - * syslog:FACILITY facility is any of "daemon", "local0"..."local7" - */ - // log = stderr; - // log = "file:/path/to/file"; - log = "syslog:local7"; - - // detach from console - daemon = on; - - /* Change uid, gid and root directory, these options require root - * privilegies on startup. - * Note, your chroot may requre /etc/localtime if you write log to syslog. - * Log is opened before chroot & uid changing. - */ - // user = nobody; - // group = nobody; - // chroot = "/var/chroot"; - - /* possible `redirector' values are: - * iptables - for Linux - * ipf - for FreeBSD - * pf - for OpenBSD - * generic - some generic redirector that MAY work - */ - redirector = iptables; -} - -redsocks { - /* `local_ip' defaults to 127.0.0.1 for security reasons, - * use 0.0.0.0 if you want to listen on every interface. - * `local_*' are used as port to redirect to. - */ - local_ip = 127.0.0.1; - local_port = 12345; - - // listen() queue length. Default value is SOMAXCONN and it should be - // good enough for most of us. - // listenq = 128; // SOMAXCONN equals 128 on my Linux box. - - // `max_accept_backoff` is a delay to retry `accept()` after accept - // failure (e.g. due to lack of file descriptors). It's measured in - // milliseconds and maximal value is 65535. `min_accept_backoff` is - // used as initial backoff value and as a damper for `accept() after - // close()` logic. - // min_accept_backoff = 100; - // max_accept_backoff = 60000; - - // `ip' and `port' are IP and tcp-port of proxy-server - // You can also use hostname instead of IP, only one (random) - // address of multihomed host will be used. - ip = example.org; - port = 1080; - - - // known types: socks4, socks5, http-connect, http-relay - type = socks5; - - // login = "foobar"; - // password = "baz"; -} - -redudp { - // `local_ip' should not be 0.0.0.0 as it's also used for outgoing - // packets that are sent as replies - and it should be fixed - // if we want NAT to work properly. - local_ip = 127.0.0.1; - local_port = 10053; - - // `ip' and `port' of socks5 proxy server. - ip = 10.0.0.1; - port = 1080; - login = username; - password = pazzw0rd; - - // redsocks knows about two options while redirecting UDP packets at - // linux: TPROXY and REDIRECT. TPROXY requires more complex routing - // configuration and fresh kernel (>= 2.6.37 according to squid - // developers[1]) but has hack-free way to get original destination - // address, REDIRECT is easier to configure, but requires `dest_ip` and - // `dest_port` to be set, limiting packet redirection to single - // destination. - // [1] http://wiki.squid-cache.org/Features/Tproxy4 - dest_ip = 8.8.8.8; - dest_port = 53; - - udp_timeout = 30; - udp_timeout_stream = 180; -} - -dnstc { - // fake and really dumb DNS server that returns "truncated answer" to - // every query via UDP, RFC-compliant resolver should repeat same query - // via TCP in this case. - local_ip = 127.0.0.1; - local_port = 5300; -} - -// you can add more `redsocks' and `redudp' sections if you need. diff --git a/net/redsocks/files/redsocks.init b/net/redsocks/files/redsocks.init deleted file mode 100644 index 56c9de3..0000000 --- a/net/redsocks/files/redsocks.init +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2007 OpenWrt.org - -START=90 - -# check if configuration exists -[ -e "/etc/redsocks.conf" ] || exit 0 - -start() { - if [ -e "/var/run/redsocks.pid" ]; then - echo "redsocks is already running" - exit 0 - fi - - /bin/echo -n "running redsocks ..." - - # startup the safety-wrapper for the daemon - /usr/sbin/redsocks -p /var/run/redsocks.pid - - /bin/echo " done" -} - -stop() { - if [ ! -e "/var/run/redsocks.pid" ]; then - echo "redsocks is not running" - exit 0 - fi - - /bin/echo -n "stopping redsocks ..." - - # kill the process - /bin/kill $(cat /var/run/redsocks.pid) - rm /var/run/redsocks.pid - - echo " done" -} diff --git a/net/redsocks/patches/0006-fix_default_config_location.patch b/net/redsocks/patches/0006-fix_default_config_location.patch deleted file mode 100644 index 987085f..0000000 --- a/net/redsocks/patches/0006-fix_default_config_location.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: change the default config file location - redsocks by default looks for ./redsocks.conf. Change this to - /etc/redsocks.conf for a more deterministic behaviour. -Author: Apollon Oikonomopoulos -Forwared: no -Last-Update: 2013-04-23 ---- a/main.c -+++ b/main.c -@@ -39,7 +39,7 @@ app_subsys *subsystems[] = { - &dnstc_subsys, - }; - --static const char *confname = "redsocks.conf"; -+static const char *confname = "/etc/redsocks.conf"; - static const char *pidfile = NULL; - - static void terminate(int sig, short what, void *_arg) diff --git a/net/remserial/Makefile b/net/remserial/Makefile deleted file mode 100644 index 4fe476d..0000000 --- a/net/remserial/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -include $(TOPDIR)/rules.mk - -PKG_NAME:=remserial -PKG_VERSION:=1.4 -PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0+ - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://lpccomp.bc.ca/remserial/ -PKG_MD5SUM:=b19b57fd118329c5ea3aaf9887f946a6 - -PKG_MAINTAINER:=Nuno Goncalves - -include $(INCLUDE_DIR)/package.mk - -define Package/remserial - SECTION:=net - CATEGORY:=Network - TITLE:=Bridge TCP/IP port with a device - URL:=http://lpccomp.bc.ca/remserial/ -endef - -define Package/remserial/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/remserial $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,remserial)) diff --git a/net/rp-pppoe/Makefile b/net/rp-pppoe/Makefile deleted file mode 100644 index c35bafb..0000000 --- a/net/rp-pppoe/Makefile +++ /dev/null @@ -1,147 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rp-pppoe -PKG_VERSION:=3.12 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Daniel Dickinson -PKG_LICENSE:=LGPL-2.0+ - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://roaringpenguin.com/files/download -PKG_MD5SUM:=00794e04031546b0e9b8cf286f2a6d1ccfc4a621b2a3abb2d7ef2a7ab7cc86c2 - -PKG_BUILD_DEPENDS:=ppp - -include $(INCLUDE_DIR)/package.mk - -define Package/rp-pppoe/Default - SECTION:=net - CATEGORY:=Network - TITLE:=PPPoE (PPP over Ethernet) - URL:=http://roaringpenguin.com/products/pppoe - SUBMENU:=dial-in/up -endef - -define Package/rp-pppoe/Default/description - Dubbed RP-PPPoE, this open-source product is ideal for Linux users with - a DSL "modem" whose Internet service provider uses PPPoE. -endef - -define Package/rp-pppoe-common - $(call Package/rp-pppoe/Default) - TITLE+= common - DEPENDS:=+ppp -endef - -define Package/rp-pppoe-common/description -$(call Package/rp-pppoe/Default/description) - - This package contains files common to server and relay. -endef - -define Package/rp-pppoe-common/conffiles -/etc/config/pppoe -endef - -define Package/rp-pppoe-relay - $(call Package/rp-pppoe/Default) - DEPENDS:=+rp-pppoe-common - TITLE+= relay - DEFAULT:=n -endef - -define Package/rp-pppoe-relay/description -$(call Package/rp-pppoe/Default/description) - - This package contains pppoe-relay. -endef - -define Package/rp-pppoe-relay/conffiles -/etc/default/pppoe-relay -endef - -define Package/rp-pppoe-server - $(call Package/rp-pppoe/Default) - DEPENDS:=+rp-pppoe-common - TITLE+= server -endef - -define Package/rp-pppoe-server/conffiles -/etc/ppp/pppoe-server-options -/etc/ppp/options -/etc/ppp/pap-secrets -/etc/ppp/chap-secrets -/etc/default/pppoe-server -endef - -define Package/rp-pppoe-server/description -$(call Package/rp-pppoe/Default/description) - - This package contains pppoe-server. -endef - -define Package/rp-pppoe-sniff - $(call Package/rp-pppoe/Default) - DEPENDS:=+ppp @BROKEN - TITLE+= sniffer -endef - -define Package/rp-pppoe-sniff/description -$(call Package/rp-pppoe/Default/description) - - This package contains pppoe-sniff. -endef - -TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/src/libevent -isystem $(PKG_BUILD_DIR)/missing-headers -CONFIGURE_PATH := ./src -CONFIGURE_ARGS += ac_cv_path_PPPD=/usr/sbin/pppd --enable-plugin=$(STAGING_DIR)/usr/include/ -MAKE_FLAGS := DESTDIR="$(PKG_INSTALL_DIR)" install -MAKE_PATH := ./src - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR)/missing-headers/net - $(CP) ./files/ppp_defs.h $(PKG_BUILD_DIR)/missing-headers/net/ - $(call Build/Prepare/Default,$(1),$(2),$(3)) -endef - -define Package/rp-pppoe-common/install - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/pppoe.config $(1)/etc/config/pppoe -endef - -define Package/rp-pppoe-relay/install - $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/uci-defaults - $(INSTALL_BIN) ./files/pppoe-relay.init $(1)/etc/init.d/pppoe-relay - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-relay $(1)/usr/sbin/ - $(INSTALL_DATA) ./files/pppoe-relay.default $(1)/etc/uci-defaults/ -endef - -define Package/rp-pppoe-server/install - $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/uci-defaults - $(INSTALL_BIN) ./files/pppoe-server.init $(1)/etc/init.d/pppoe-server - $(INSTALL_DIR) $(1)/etc/ppp - $(INSTALL_CONF) ./files/ppp/{options,pap-secrets,pppoe-server-options} $(1)/etc/ppp/ - $(INSTALL_DIR) $(1)/etc/ppp/plugins - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-server $(1)/usr/sbin/ - $(CP) $(PKG_INSTALL_DIR)/etc/ppp/plugins/rp-pppoe.so $(1)/etc/ppp/plugins/ - $(INSTALL_DATA) ./files/pppoe-server.default $(1)/etc/uci-defaults/ -endef - -define Package/rp-pppoe-sniff/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-sniff $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,rp-pppoe-common)) -$(eval $(call BuildPackage,rp-pppoe-relay)) -$(eval $(call BuildPackage,rp-pppoe-server)) -$(eval $(call BuildPackage,rp-pppoe-sniff)) diff --git a/net/rp-pppoe/files/ppp/options b/net/rp-pppoe/files/ppp/options deleted file mode 100644 index 6b93f7b..0000000 --- a/net/rp-pppoe/files/ppp/options +++ /dev/null @@ -1,10 +0,0 @@ -#debug -logfile /dev/null -noipdefault -noaccomp -nopcomp -nocrtscts -lock -maxfail 0 -lcp-echo-failure 5 -lcp-echo-interval 1 diff --git a/net/rp-pppoe/files/ppp/pap-secrets b/net/rp-pppoe/files/ppp/pap-secrets deleted file mode 100644 index 14b11d1..0000000 --- a/net/rp-pppoe/files/ppp/pap-secrets +++ /dev/null @@ -1,2 +0,0 @@ -# client server secret IP addresses -* * * * diff --git a/net/rp-pppoe/files/ppp/pppoe-server-options b/net/rp-pppoe/files/ppp/pppoe-server-options deleted file mode 100644 index a4b1da4..0000000 --- a/net/rp-pppoe/files/ppp/pppoe-server-options +++ /dev/null @@ -1,9 +0,0 @@ -# PPP options for the PPPoE server -# LIC: GPL -require-pap -login -lcp-echo-interval 10 -lcp-echo-failure 2 -mru 1492 -mtu 1492 - diff --git a/net/rp-pppoe/files/ppp_defs.h b/net/rp-pppoe/files/ppp_defs.h deleted file mode 100644 index 3a1e758..0000000 --- a/net/rp-pppoe/files/ppp_defs.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _NET_PPP_DEFS_H -#define _NET_PPP_DEFS_H - -#define __need_time_t -#include - -#include -#include - -#endif - diff --git a/net/rp-pppoe/files/pppoe-relay.default b/net/rp-pppoe/files/pppoe-relay.default deleted file mode 100644 index c7a286a..0000000 --- a/net/rp-pppoe/files/pppoe-relay.default +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -if [ -e /etc/default/pppoe-relay ]; then - if [ -z "$(uci get pppoe.@pppoe_relay[-1] 2>/dev/null)" ]; then - uci add pppoe pppoe_relay - fi - uci set pppoe.@pppoe-relay[-1].use_non_uci_config=1 - uci commit pppoe -fi - diff --git a/net/rp-pppoe/files/pppoe-relay.init b/net/rp-pppoe/files/pppoe-relay.init deleted file mode 100755 index 4aeeee8..0000000 --- a/net/rp-pppoe/files/pppoe-relay.init +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=50 -USE_PROCD=1 - -pppoe_triggers() { - local cfg="$1" - local interface server_interfaces client_interfaces both_interfaces - config_get server_interfaces "$cfg" server_interface - config_get client_interfaces "$cfg" client_interface - config_get both_interfaces "$cfg" both_interfaces - for interface in $server_interfaces; do - append interfaces "$interface" "|" - done - for interface in $client_interfaces; do - append interfaces "$interface" "|" - done - for interface in $both_interfaces; do - append interfaces "$interface" "|" - done -} - -pppoe_relay_instance() { - local cfg="$1" - local interface server_interfaces client_interfaces both_interfaces maxsessions timeout OPTIONS - config_get server_interfaces "$cfg" server_interface - config_get client_interfaces "$cfg" client_interface - config_get both_interfaces "$cfg" both_interfaces - config_get maxsessions "$cfg" maxsesssions - config_get timeout "$cfg" timeout - config_get_bool use_non_uci_config "$cfg" use_non_uci_config 0 - - if [ "$use_non_uci_config" -gt 0 ]; then - . /etc/default/pppoe-relay - else - [ -z "${server_interfaces}${client_interfaces}${both_interfaces}" ] && return 1 - for interface in $server_interfaces; do - append OPTIONS "-S $interface" - done - for interface in $client_interfaces; do - append OPTIONS "-C $interface" - done - for interface in $both_interfaces; do - append OPTIONS "-B $interface" - done - [ -n "$maxsesssions" ] && append OPTIONS "-n $maxsesssions" - [ -n "$timeout" ] && append OPTIONS "-i $timeout" - fi - - procd_open_instance - procd_set_param command /usr/sbin/pppoe-relay -F - procd_append_param command $OPTIONS - procd_close_instance -} - -start_service() { - local use_non_uci_config - - config_load pppoe - config_foreach pppoe_relay_instance pppoe_relay -} - -reload_triggers() { - local interfaces - - config_load pppoe - config_foreach pppoe_triggers pppoe_relay - - procd_add_reload_trigger "pppoe" - procd_add_interface_trigger "$interfaces" -} diff --git a/net/rp-pppoe/files/pppoe-server.default b/net/rp-pppoe/files/pppoe-server.default deleted file mode 100644 index 36c9b5a..0000000 --- a/net/rp-pppoe/files/pppoe-server.default +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -if [ -e /etc/default/pppoe-server ]; then - if [ -z "$(uci get pppoe.@pppoe_server[-1] 2>/dev/null)" ]; then - uci add pppoe pppoe_server_ - fi - uci set pppoe.@pppoe-server[-1].use_non_uci_config=1 - uci commit pppoe -fi - diff --git a/net/rp-pppoe/files/pppoe-server.init b/net/rp-pppoe/files/pppoe-server.init deleted file mode 100755 index dd2568e..0000000 --- a/net/rp-pppoe/files/pppoe-server.init +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=50 -USE_PROCD=1 - -pppoe_triggers() { - local cfg="$1" - local interface - config_get interface "$cfg" interface -} - -pppoe_instance() { - local cfg="$1" - local interface ac_name service_names service_name maxsessionsperpeer localip firstremoteip maxsessions optionsfiles randomsession unit offset timeout mss sync OPTIONS - config_get interface "$cfg" interface - config_get ac_name "$cfg" ac_name - config_get service_names "$cfg" service_name - config_get maxsessionsperpeer "$cfg" maxsesssionsperpeer - config_get localip "$cfg" localip - config_get firstremoteip "$cfg" firstremoteip - config_get maxsessions "$cfg" maxsessions - config_get optionsfile "$cfg" optionsfile - config_get_bool randomsession "$cfg" randomsession 1 - config_get_bool unit "$cfg" unit 0 - config_get offset "$cfg" offset - config_get timeout "$cfg" timeout - config_get mss "$cfg" mss - config_get_bool sync "$cfg" sync 0 - config_get use_non_uci_config "$cfg" use_non_uci_config 0 - - if [ "$use_non_uci_config" -gt 0 ]; then - . /etc/default/pppoe-server - else - [ -z "$interface" ] && return 1 - [ -n "$ac_name" ] && append OPTIONS "-C $ac_name" - for service_name in $service_names; do - append OPTIONS "-S $service_name" - done - append OPTIONS "-I $interface" - [ -n "$maxsesssionsperpeer" ] && append OPTIONS "-x $maxsesssionsperpeer" - [ -n "$localip" ] && append OPTIONS "-L $localip" - [ -n "$firstremoteip" ] && append OPTIONS "-R $firstremoteip" - [ -n "maxsessions" ] && append OPTIONS "-N $maxsessions" - [ -n "optionsfile" ] && append OPTIONS "-O $optionsfile" - [ "$randomsession" = "1" ] && append OPTIONS "-r" - [ "$unit" = "1" ] && append OPTIONS "-u" - [ -n "$offset" ] && append OPTIONS "-o $offset" - [ -n "$timeout" ] && append OPTIONS "-T $timeout" - [ -n "$mss" ] && append OPTIONS "-m $mss" - [ "$sync" = "1" ] && append OPTIONS "-s" - fi - - procd_open_instance - procd_set_param command /usr/sbin/pppoe-server -F - procd_append_param command $OPTIONS - procd_set_param file /etc/ppp/options - procd_append_param file /etc/ppp/pppoe-server-options - procd_close_instance -} - -start_service() { - config_load pppoe - config_foreach pppoe_instance pppoe_server -} - -service_triggers() { - local interface - config_load pppoe - config_foreach pppoe_triggers pppoe_server - - procd_add_reload_trigger "pppoe" - procd_add_interface_trigger "$interface" -} diff --git a/net/rp-pppoe/files/pppoe.config b/net/rp-pppoe/files/pppoe.config deleted file mode 100644 index e5d1a38..0000000 --- a/net/rp-pppoe/files/pppoe.config +++ /dev/null @@ -1,23 +0,0 @@ -#config pppoe_server -# option interface eth1 -# option ac_name access-concentrator-name -# list service_name service-name1 -# list service_name service-name2 -# option maxsessionsperpeer 0 -# option localip 192.168.2.1 -# option firsremoteip 192.168.2.2 -# option maxsessions 64 -# option optionsfile /etc/ppp/pppoe-server-options -# option randomsessions 1 -# option unit 0 -# option offset 0 -# option timeout 60 -# option mss 1468 -# option sync 0 - -#config pppoe_relay -# list server_interface eth1 -# list client_interface eth0 -# list both_interface eth2 -# option maxsessions 64 -# option timeout 60 diff --git a/net/rp-pppoe/patches/100-configure.patch b/net/rp-pppoe/patches/100-configure.patch deleted file mode 100644 index d45593a..0000000 --- a/net/rp-pppoe/patches/100-configure.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/src/configure -+++ b/src/configure -@@ -3661,7 +3661,7 @@ done - - for ac_header in linux/if.h - do : -- ac_fn_c_check_header_compile "$LINENO" "linux/if.h" "ac_cv_header_linux_if_h" "#include -+ ac_fn_c_check_header_compile "$LINENO" "linux/if.h" "ac_cv_header_linux_if_h" "#include - " - if test "x$ac_cv_header_linux_if_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -@@ -3675,10 +3675,11 @@ done - for ac_header in linux/if_pppox.h - do : - ac_fn_c_check_header_compile "$LINENO" "linux/if_pppox.h" "ac_cv_header_linux_if_pppox_h" " --#include --#include --#include --#include -+#include -+#include -+#include -+#include -+#include - - " - if test "x$ac_cv_header_linux_if_pppox_h" = x""yes; then : -@@ -4611,7 +4612,7 @@ esac - $as_echo_n "checking packing order of bit fields... " >&6; } - if test "${rpppoe_cv_pack_bitfields+set}" != set ; then - if test "$cross_compiling" = yes; then : -- $ECHO "no defaults for cross-compiling"; exit 0 -+ rpppoe_cv_pack_bitfields="$ac_cv_pack_bitfields" - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ diff --git a/net/rp-pppoe/patches/110-Makefile.patch b/net/rp-pppoe/patches/110-Makefile.patch deleted file mode 100644 index 9dc1c72..0000000 --- a/net/rp-pppoe/patches/110-Makefile.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -71,7 +71,7 @@ pppoe-sniff: pppoe-sniff.o if.o common.o - @CC@ -o $@ $^ $(LDFLAGS) - - pppoe-server: pppoe-server.o if.o debug.o common.o md5.o libevent/libevent.a @PPPOE_SERVER_DEPS@ -- @CC@ -o $@ @RDYNAMIC@ $^ $(LDFLAGS) $(PPPOE_SERVER_LIBS) -Llibevent -levent -+ @CC@ -o $@ @RDYNAMIC@ $^ $(LDFLAGS) $(PPPOE_SERVER_LIBS) - - pppoe: pppoe.o if.o debug.o common.o ppp.o discovery.o - @CC@ -o $@ $^ $(LDFLAGS) diff --git a/net/rp-pppoe/patches/120-use-linux-ether-not-netinet.patch b/net/rp-pppoe/patches/120-use-linux-ether-not-netinet.patch deleted file mode 100644 index c9a5f69..0000000 --- a/net/rp-pppoe/patches/120-use-linux-ether-not-netinet.patch +++ /dev/null @@ -1,40 +0,0 @@ -Index: rp-pppoe-3.11/src/configure -=================================================================== ---- rp-pppoe-3.11.orig/src/configure 2016-05-21 23:42:58.142423086 -0400 -+++ rp-pppoe-3.11/src/configure 2016-05-21 23:42:58.178423086 -0400 -@@ -3646,7 +3646,7 @@ - done - - --for ac_header in fcntl.h sys/dlpi.h sys/ioctl.h sys/time.h syslog.h unistd.h net/if_arp.h netinet/if_ether.h getopt.h sys/uio.h sys/param.h fcntl.h net/bpf.h netpacket/packet.h net/ethernet.h asm/types.h linux/if_packet.h linux/if_ether.h sys/socket.h sys/cdefs.h net/if.h net/if_dl.h net/if_ether.h net/if_types.h netinet/if_ether.h net/if_types.h net/if_dl.h -+for ac_header in fcntl.h sys/dlpi.h sys/ioctl.h sys/time.h syslog.h unistd.h net/if_arp.h getopt.h sys/uio.h sys/param.h fcntl.h net/bpf.h netpacket/packet.h asm/types.h linux/if_packet.h linux/if_ether.h sys/socket.h sys/cdefs.h net/if.h net/if_dl.h net/if_types.h net/if_types.h net/if_dl.h - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -Index: rp-pppoe-3.11/src/if.c -=================================================================== ---- rp-pppoe-3.11.orig/src/if.c 2012-08-17 14:31:25.000000000 -0400 -+++ rp-pppoe-3.11/src/if.c 2016-05-21 23:45:13.546423086 -0400 -@@ -30,10 +30,6 @@ - #include - #endif - --#ifdef HAVE_NET_ETHERNET_H --#include --#endif -- - #ifdef HAVE_ASM_TYPES_H - #include - #endif -Index: rp-pppoe-3.11/src/plugin.c -=================================================================== ---- rp-pppoe-3.11.orig/src/plugin.c 2012-08-17 14:31:25.000000000 -0400 -+++ rp-pppoe-3.11/src/plugin.c 2016-05-21 23:43:55.314423086 -0400 -@@ -49,7 +49,6 @@ - #include - #include - #include --#include - #include - #include - #include diff --git a/net/rsync/Config.in b/net/rsync/Config.in deleted file mode 100644 index dfbfdf1..0000000 --- a/net/rsync/Config.in +++ /dev/null @@ -1,25 +0,0 @@ -if PACKAGE_rsync - - config RSYNC_xattr - bool - prompt "Enable xattr support" - default n - - config RSYNC_acl - bool - prompt "Enable ACL support" - default n - - config RSYNC_zlib - bool - prompt "Enable system zlib" - help - Use the system's zlib library instead of rsync's internal copy. Enabling - this may create compatibility errors when using compression with older - clients, or those using the current default of the bundled zlib. - - rsync's upstream default is to use their bundled zlib. OpenWrt uses the - system zlib for space reasons. The system zlib will eventually become - default for upstream as well. - default y -endif diff --git a/net/rsync/Makefile b/net/rsync/Makefile deleted file mode 100644 index aa4f00a..0000000 --- a/net/rsync/Makefile +++ /dev/null @@ -1,104 +0,0 @@ -# -# Copyright (C) 2007-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rsync -PKG_VERSION:=3.1.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://download.samba.org/pub/rsync/src -PKG_MD5SUM:=0f758d7e000c0f7f7d3792610fad70cb -PKG_MAINTAINER:=Maxim Storchak -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/rsync - SECTION:=net - CATEGORY:=Network - SUBMENU:=File Transfer - TITLE:=Fast remote file copy program (like rcp) - DEPENDS:=+libpopt +RSYNC_xattr:libattr +RSYNC_acl:libacl +RSYNC_zlib:zlib - URL:=http://rsync.samba.org/ - MENU:=1 -endef - -define Package/rsync/config - source "$(SOURCE)/Config.in" -endef - -CONFIGURE_ARGS += \ - --with-included-popt=no \ - --disable-debug \ - --disable-locale \ - -ifeq ($(CONFIG_RSYNC_xattr),y) - CONFIGURE_ARGS+= --enable-xattr-support -else - CONFIGURE_ARGS+= --disable-xattr-support -endif - -ifeq ($(CONFIG_RSYNC_acl),y) - CONFIGURE_ARGS+= --enable-acl-support -else - CONFIGURE_ARGS+= --disable-acl-support -endif - -ifeq ($(CONFIG_RSYNC_zlib),y) - CONFIGURE_ARGS+= --with-included-zlib=no -else - CONFIGURE_ARGS+= --with-included-zlib=yes -endif - -define Package/rsyncd - SECTION:=net - CATEGORY:=Network - SUBMENU:=File Transfer - TITLE:=Rsync daemon - DEPENDS:=+rsync - URL:=http://rsync.samba.org/ -endef - -define Package/rsync/description - rsync is a program that allows files to be copied to and from remote machines - in much the same way as rcp. It has many more options than rcp, and uses the - rsync remote-update protocol to greatly speed up file transfers when the - destination file already exists. - - The rsync remote-update protocol allows rsync to transfer just the differences - between two sets of files across the network link. -endef - -define Package/rsync/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ -endef - -define Package/rsyncd/description - rsyncd is a configuration file and initscript to utilize rsync as a daemon. It - uses the same binary as rsync. -endef - -define Package/rsyncd/conffiles -/etc/rsyncd.conf -endef - -define Package/rsyncd/install - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/rsyncd.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/rsyncd.init $(1)/etc/init.d/rsyncd -endef - -$(eval $(call BuildPackage,rsync)) -$(eval $(call BuildPackage,rsyncd)) diff --git a/net/rsync/files/rsyncd.conf b/net/rsync/files/rsyncd.conf deleted file mode 100644 index 2f4cd9e..0000000 --- a/net/rsync/files/rsyncd.conf +++ /dev/null @@ -1,16 +0,0 @@ -# /etc/rsyncd.conf -# Minimal configuration for rsync daemon - -# Next line required for init script -pid file = /var/run/rsyncd.pid -log file = /var/log/rsyncd.log -use chroot = yes -uid = nobody -gid = nogroup -read only = yes - -# Simple example to configure server -#[openwrt-etc] -#path = /etc -#comment = OpenWrt Configuration Files -#exclude = /init.d diff --git a/net/rsync/files/rsyncd.init b/net/rsync/files/rsyncd.init deleted file mode 100644 index d226d0f..0000000 --- a/net/rsync/files/rsyncd.init +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2011-2014 OpenWrt.org - -START=90 -STOP=10 - -USE_PROCD=1 -PROG=/usr/bin/rsync - -start_service() { - procd_open_instance - procd_set_param command "$PROG" --daemon --no-detach - procd_close_instance -} diff --git a/net/rsyslog/Makefile b/net/rsyslog/Makefile deleted file mode 100644 index 1e33215..0000000 --- a/net/rsyslog/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rsyslog -PKG_VERSION:=8.18.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.rsyslog.com/files/download/rsyslog/ -PKG_MD5SUM:=750d552bdcbf255c85f464ffbe21168a - -PKG_MAINTAINER:=Dov Murik -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/rsyslog - SECTION:=net - CATEGORY:=Network - TITLE:=Enhanced system logging and kernel message trapping daemons - URL:=http://www.rsyslog.com/ - DEPENDS:=+libestr +libfastjson +libuuid +zlib +USE_UCLIBC:libpthread +USE_UCLIBC:librt -endef - -define Package/rsyslog/conffiles -/etc/rsyslog.conf -endef - -CONFIGURE_ARGS+= \ - --disable-libgcrypt \ - --disable-liblogging-stdlog - -TARGET_CFLAGS += \ - -std=c99 - -define Package/rsyslog/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/rsyslogd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/usr/lib/rsyslog - $(CP) $(PKG_INSTALL_DIR)/usr/lib/rsyslog/* $(1)/usr/lib/rsyslog/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) ./files/rsyslog.conf $(1)/etc - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/rsyslog.init $(1)/etc/init.d/rsyslog -endef - -$(eval $(call BuildPackage,rsyslog)) diff --git a/net/rsyslog/files/rsyslog.conf b/net/rsyslog/files/rsyslog.conf deleted file mode 100644 index 5aaed41..0000000 --- a/net/rsyslog/files/rsyslog.conf +++ /dev/null @@ -1,18 +0,0 @@ -module(load="imuxsock") -module(load="imklog") -module(load="imudp") -input(type="imudp" port="514") -#module(load="imtcp") -#input(type="imtcp" port="514") - -$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat - -*.info;mail.none;authpriv.none;cron.none /var/log/messages - -authpriv.* /var/log/secure - -mail.* /var/log/maillog - -cron.* /var/log/cron - -local7.* /var/log/boot.log diff --git a/net/rsyslog/files/rsyslog.init b/net/rsyslog/files/rsyslog.init deleted file mode 100644 index 20eb2a4..0000000 --- a/net/rsyslog/files/rsyslog.init +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=20 - -USE_PROCD=1 - -start_service() { - procd_open_instance - procd_set_param command /usr/sbin/rsyslogd -n - procd_close_instance -} diff --git a/net/rtorrent/Makefile b/net/rtorrent/Makefile deleted file mode 100644 index 596854e..0000000 --- a/net/rtorrent/Makefile +++ /dev/null @@ -1,92 +0,0 @@ -# -# Copyright (C) 2007-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rtorrent -PKG_VERSION:=0.9.6-git-1 -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/rakshasa/rtorrent.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=62cb5a4605c0664bc522e0e0da9c72f09cf643a9 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/rtorrent/Default - SUBMENU:=BitTorrent - SECTION:=net - CATEGORY:=Network - TITLE:=BitTorrent client for ncurses - URL:=http://libtorrent.rakshasa.no/ - DEPENDS:=+libcurl +libtorrent +libncursesw +libsigcxx +libpthread - MAINTAINER:=Peter Wagner -endef - -define Package/rtorrent/Default/description - rTorrent is a BitTorrent client for ncurses, using the libtorrent library. - The client and library is written in C++ with emphasis on speed and - efficiency, while delivering equivalent features to those found in GUI based - clients in an ncurses client. -endef - -define Package/rtorrent -$(call Package/rtorrent/Default) - VARIANT:=norpc -endef - -define Package/rtorrent/description -$(call Package/rtorrent/Default/description) - This package is built without xmlrpc support -endef - -define Package/rtorrent-rpc -$(call Package/rtorrent/Default) - VARIANT:=rpc - DEPENDS+=+xmlrpc-c-server - TITLE+=(with rpc support) -endef - -define Package/rtorrent-rpc/description -$(call Package/rtorrent/Default/description) - This package is built with xmlrpc support -endef - -TARGET_LDFLAGS += -lz -lpthread -Wl,-rpath-link=$(STAGING_DIR)/usr/lib - -CONFIGURE_ARGS+= \ - --enable-shared \ - --disable-static \ - --disable-debug \ - --disable-ipv6 - -ifeq ($(BUILD_VARIANT),rpc) - CONFIGURE_ARGS += \ - --with-xmlrpc-c -endif - - -define Package/rtorrent/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rtorrent $(1)/usr/bin/ -endef - -Package/rtorrent-rpc/install = $(Package/rtorrent/install) - -$(eval $(call BuildPackage,rtorrent)) -$(eval $(call BuildPackage,rtorrent-rpc)) diff --git a/net/rtorrent/patches/100-fix-cross_compile.patch b/net/rtorrent/patches/100-fix-cross_compile.patch deleted file mode 100644 index 82dcc76..0000000 --- a/net/rtorrent/patches/100-fix-cross_compile.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -4,7 +4,6 @@ AC_DEFINE(API_VERSION, 9, api version) - - AM_INIT_AUTOMAKE - AC_CONFIG_HEADERS(config.h) --AM_PATH_CPPUNIT(1.9.6) - - AC_PROG_CXX - AC_PROG_LIBTOOL ---- a/scripts/common.m4 -+++ b/scripts/common.m4 -@@ -153,7 +153,7 @@ dnl Need to fix this so that it uses t - AC_DEFUN([TORRENT_CHECK_EXECINFO], [ - AC_MSG_CHECKING(for execinfo.h) - -- AC_RUN_IFELSE([AC_LANG_SOURCE([ -+ AC_LINK_IFELSE([AC_LANG_SOURCE([ - #include - int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} - ])], -@@ -168,7 +168,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [ - AC_DEFUN([TORRENT_CHECK_ALIGNED], [ - AC_MSG_CHECKING(the byte alignment) - -- AC_RUN_IFELSE([AC_LANG_SOURCE([ -+ AC_LINK_IFELSE([AC_LANG_SOURCE([ - #include - int main() { - char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 }; diff --git a/net/rtorrent/patches/120-fix-ncurses.patch b/net/rtorrent/patches/120-fix-ncurses.patch deleted file mode 100644 index f491de3..0000000 --- a/net/rtorrent/patches/120-fix-ncurses.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/display/canvas.h -+++ b/src/display/canvas.h -@@ -48,7 +48,7 @@ class Canvas { - public: - typedef std::vector attributes_list; - -- Canvas(int x = 0, int y = 0, int width = 0, int height = 0); -+ Canvas(int x = 0, int y = 0, int width = 1, int height = 1); - ~Canvas() { delwin(m_window); } - - void refresh() { wnoutrefresh(m_window); } diff --git a/net/scapy/Makefile b/net/scapy/Makefile deleted file mode 100644 index 4771e8d..0000000 --- a/net/scapy/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=scapy -PKG_VERSION:=2.3.1 -PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=PKG-INFO - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip -PKG_SOURCE_URL:=https://bitbucket.org/secdev/scapy/downloads/ -PKG_MD5SUM:=a30d828e59801d1d092219b349f1da9e - -PKG_BUILD_DEPENDS:=python python-setuptools - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/scapy - SECTION:=net - CATEGORY:=Network - TITLE:=Interactive packet manipulation tool and network scanner - MAINTAINER:=W. Michael Petullo - URL:=http://www.secdev.org/projects/scapy/ - DEPENDS:=+python -endef - -define Package/scapy/description - Scapy is a powerful interactive packet manipulation program built on top - of the Python interpreter. It can be used to forge or decode packets of - a wide number of protocols, send them over the wire, capture them, match - requests and replies, and much more. -endef - -define Build/Compile - $(call Build/Compile/PyMod,., \ - install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \ - ) -endef - -define Package/scapy/install - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(INSTALL_DIR) $(1)/usr/bin - $(CP) \ - $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \ - $(1)$(PYTHON_PKG_DIR)/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin -endef - -$(eval $(call BuildPackage,scapy)) diff --git a/net/seafile-ccnet/Makefile b/net/seafile-ccnet/Makefile deleted file mode 100644 index 384fe46..0000000 --- a/net/seafile-ccnet/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=seafile-ccnet -PKG_VERSION:=5.1.4 -PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 -PKG_LICENSE:=GPL-3.0 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/haiwen/ccnet.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=44f74fdc5160c1bf16a92e71d79b856763ddbc15 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -$(call include_mk, python-package.mk) - -define Package/seafile-ccnet - SECTION:=net - CATEGORY:=Network - TITLE:=Seafile server - ccnet component - MAINTAINER:=Gergely Kiss - URL:=http://seafile.com/ - DEPENDS:=+libsearpc +libevent2 +libopenssl \ - +glib2 +python +libzdb +libuuid \ - +libpthread +libsqlite3 +jansson $(ICONV_DEPENDS) - EXTRA_DEPENDS:=libsearpc (=5.1.4-8998e7b2c5587f0b94c48db24e2952d08def5add-1) -endef - -define Package/seafile-ccnet/description - Ccnet is a framework for writing networked applications in C. -endef - -CONFIGURE_ARGS += --disable-client \ - --enable-server \ - --disable-ldap \ - --disable-cluster \ - --enable-python \ - --disable-server-pkg \ - --disable-static-build \ - --disable-compile-demo \ - --disable-console - -PKG_BUILD_DEPENDS:=vala/host - -TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -liconv \ - -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient -lz - -define Package/seafile-ccnet/install - $(INSTALL_DIR) $(1)/usr/{bin,lib} - $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR) - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ccnet* $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/ccnet $(1)$(PYTHON_PKG_DIR) - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.so* $(1)/usr/lib/ - find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/include/ccnet* $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libccnet.pc $(1)/usr/lib/pkgconfig/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,seafile-ccnet)) diff --git a/net/seafile-ccnet/patches/010-Makefile.patch b/net/seafile-ccnet/patches/010-Makefile.patch deleted file mode 100644 index a30abbd..0000000 --- a/net/seafile-ccnet/patches/010-Makefile.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -rupN seafile-ccnet-5.1.1.orig/lib/Makefile.am seafile-ccnet-5.1.1/lib/Makefile.am ---- seafile-ccnet-5.1.1.orig/lib/Makefile.am 2016-04-21 11:04:46.000000000 +0200 -+++ seafile-ccnet-5.1.1/lib/Makefile.am 2016-04-22 10:02:52.583732050 +0200 -@@ -1,3 +1,4 @@ -+include $(TOPDIR)/rules.mk - - AM_CPPFLAGS = @GLIB2_CFLAGS@ -I$(top_srcdir)/include \ - -I$(top_srcdir)/include/ccnet \ -@@ -72,11 +73,11 @@ ccnet-client.c: ccnet-object.h - - ccnet-object.h: ${ccnet_object_define} - rm -f $@ -- valac --pkg posix ${ccnet_object_define} -C -H ccnet-object.h -+ "$(STAGING_DIR_HOSTPKG)/bin/valac" --pkg posix ${ccnet_object_define} -C -H ccnet-object.h - - ccnetobj.c: ${ccnet_object_define} - rm -f $@ -- valac -C --pkg posix ${ccnet_object_define} -+ "$(STAGING_DIR_HOSTPKG)/bin/valac" -C --pkg posix ${ccnet_object_define} - - searpc_gen = searpc-signature.h searpc-marshal.h - -@@ -86,7 +87,7 @@ rpc_table.stamp: ${top_srcdir}/lib/rpc_t - @rm -f rpc_table.tmp - @touch rpc_table.tmp - @echo "[libsearpc]: generating rpc header files" -- @PYTHON@ `which searpc-codegen.py` ${top_srcdir}/lib/rpc_table.py -+ @PYTHON@ "$(STAGING_DIR)/usr/bin/searpc-codegen.py" ${top_srcdir}/lib/rpc_table.py - @echo "[libsearpc]: done" - @mv -f rpc_table.tmp $@ - diff --git a/net/seafile-seahub/Makefile b/net/seafile-seahub/Makefile deleted file mode 100644 index 09458b6..0000000 --- a/net/seafile-seahub/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=seafile-seahub -PKG_VERSION:=5.1.4 -PKG_RELEASE=$(PKG_SOURCE_VERSION)-1 -PKG_LICENSE:=Apache-2.0 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/haiwen/seahub.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=1e1c02aa4f2a0256ffa29a28224aad2d678f43a0 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) - -define Package/seafile-seahub - SECTION:=net - CATEGORY:=Network - TITLE:=Seafile server - seahub component - MAINTAINER:=Gergely Kiss - URL:=http://seafile.com/ - DEPENDS:=+simplejson +python +pillow +chardet +django +django-appconf \ - +django-compressor +django-constance +django-jsonfield +django-picklefield \ - +django-postoffice +django-restframework +django-statici18n +et_xmlfile \ - +flup +gunicorn +jdcal +openpyxl +python-dateutil +python-mysql +pytz +rcssmin -endef - -define Build/Configure -endef - -define Build/Compile - $(call Build/Compile/Default,locale) -endef - -define Package/seafile-seahub/description - The web end of seafile server. - - NOTE: in order to have better performance, localization support is turned off by default. - Please set 'USE_I18N = True' in seahub_settings.py if you intend to use languages other than English. -endef - -define Package/seafile-seahub/install - $(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server/seahub - $(CP) $(PKG_BUILD_DIR)/{locale,media,fabfile,seahub,sql,tests,thirdpart,tools} $(1)/usr/share/seafile/seafile-server/seahub/ - $(CP) $(PKG_BUILD_DIR)/*.{sh,template,py,txt} $(1)/usr/share/seafile/seafile-server/seahub/ - $(CP) $(PKG_BUILD_DIR)/{CONTRIBUTORS,HACKING,README.markdown} $(1)/usr/share/seafile/seafile-server/seahub/ - $(CP) $(PKG_BUILD_DIR)/pylintrc* $(1)/usr/share/seafile/seafile-server/seahub/ - find $(1) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f - $(SED) "s/\(SEAFILE_VERSION\s*=\s*\)'\([0-9]\.[0-9]\.[0-9]\)'/\1'$(PKG_VERSION)'/g" $(1)/usr/share/seafile/seafile-server/seahub/seahub/settings.py -endef - -$(eval $(call BuildPackage,seafile-seahub)) diff --git a/net/seafile-seahub/patches/010-default-config.patch b/net/seafile-seahub/patches/010-default-config.patch deleted file mode 100644 index 4168dc1..0000000 --- a/net/seafile-seahub/patches/010-default-config.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -rupN seahub-3.1.7-server.orig/seahub/settings.py seahub-3.1.7-server/seahub/settings.py ---- seahub-3.1.7-server.orig/seahub/settings.py 2014-10-20 09:32:35.000000000 +0200 -+++ seahub-3.1.7-server/seahub/settings.py 2014-12-10 15:47:21.625104606 +0100 -@@ -46,7 +46,7 @@ SITE_ID = 1 - - # If you set this to False, Django will make some optimizations so as not - # to load the internationalization machinery. --USE_I18N = True -+USE_I18N = False - - # If you set this to False, Django will not format dates, numbers and - # calendars according to the current locale. -@@ -209,7 +209,7 @@ SHOW_REPO_DOWNLOAD_BUTTON = False - REPO_PASSWORD_MIN_LENGTH = 8 - - # mininum length for user's password --USER_PASSWORD_MIN_LENGTH = 6 -+USER_PASSWORD_MIN_LENGTH = 8 - - # LEVEL based on four types of input: - # num, upper letter, lower letter, other symbols -@@ -218,7 +218,7 @@ USER_PASSWORD_STRENGTH_LEVEL = 3 - - # default False, only check USER_PASSWORD_MIN_LENGTH - # when True, check password strength level, STRONG(or above) is allowed --USER_STRONG_PASSWORD_REQUIRED = False -+USER_STRONG_PASSWORD_REQUIRED = True - - # Using server side crypto by default, otherwise, let user choose crypto method. - FORCE_SERVER_CRYPTO = True diff --git a/net/seafile-seahub/patches/020-Makefile-fixes.patch b/net/seafile-seahub/patches/020-Makefile-fixes.patch deleted file mode 100644 index 49b67f8..0000000 --- a/net/seafile-seahub/patches/020-Makefile-fixes.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -rupN seafile-seahub-5.1.1.orig/Makefile seafile-seahub-5.1.1/Makefile ---- seafile-seahub-5.1.1.orig/Makefile 2016-04-26 23:59:48.000000000 +0200 -+++ seafile-seahub-5.1.1/Makefile 2016-04-28 09:03:35.507105416 +0200 -@@ -1,3 +1,6 @@ -+include $(TOPDIR)/rules.mk -+$(call include_mk, python-package.mk) -+ - PROJECT=seahub - - develop: setup-git -@@ -9,7 +12,7 @@ dist: locale uglify statici18n collectst - - locale: - @echo "--> Compile locales" -- django-admin.py compilemessages -+ $(call HostPython,,$(STAGING_DIR)/usr/bin/django-admin.py compilemessages) - @echo "" - - uglify: -@@ -19,7 +22,7 @@ uglify: - - statici18n: - @echo "--> Generate JS locale files in static/scripts/i18n" -- python manage.py compilejsi18n -+ $(call HostPython,,manage.py compilejsi18n) - - collectstatic: - @echo "--> Collect django static files to media/assets" diff --git a/net/ser2net/Makefile b/net/ser2net/Makefile deleted file mode 100644 index 61def0e..0000000 --- a/net/ser2net/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ser2net -PKG_VERSION:=3.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/ser2net -PKG_MD5SUM:=8daf1cfd70d2b220b184c412c64faf2c -PKG_HASH:=3d1cef5f48df8291e57d4d7d4eac2fc809ae644a5524ffca4aebef0f4e4153dc - -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Michael Heimpold - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/ser2net - SECTION:=net - CATEGORY:=Network - TITLE:=Serial to Network Proxy - URL:=http://sourceforge.net/projects/ser2net/ - DEPENDS:=+USE_UCLIBC:libpthread +USE_UCLIBC:librt -endef - -define Package/ser2net/description - This project provides a proxy that allows telnet/tcp connections to be made to - serial ports on a machine. -endef - -define Package/ser2net/conffiles -/etc/ser2net.conf -endef - -define Package/ser2net/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ser2net $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/ser2net.conf $(1)/etc/ -endef - -$(eval $(call BuildPackage,ser2net)) diff --git a/net/shadowsocks-client/Makefile b/net/shadowsocks-client/Makefile deleted file mode 100644 index 3e8c9be..0000000 --- a/net/shadowsocks-client/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=shadowsocks-client -PKG_VERSION:=0.6 -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/zhao-gang/shadowsocks-tiny.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=b59d754f838213d60b908aed0b7d4d5a81f273e2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MAINTAINER:=Zhao, Gang - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/shadowsocks-client - SECTION:=net - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - TITLE:=shadowsocks client for router - URL:=https://github.com/zhao-gang/shadowsocks-tiny - DEPENDS:=+libopenssl -endef - -define Package/shadowsocks-client/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/sslocal $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/sslocal.config $(1)/etc/config/sslocal - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/sslocal.init $(1)/etc/init.d/sslocal -endef - -$(eval $(call BuildPackage,shadowsocks-client)) diff --git a/net/shadowsocks-client/files/sslocal.config b/net/shadowsocks-client/files/sslocal.config deleted file mode 100644 index 28dc261..0000000 --- a/net/shadowsocks-client/files/sslocal.config +++ /dev/null @@ -1,7 +0,0 @@ -config sslocal - option server_addr '' - option server_port '' - option local_addr '' - option local_port '' - option password '' - option method '' diff --git a/net/shadowsocks-client/files/sslocal.init b/net/shadowsocks-client/files/sslocal.init deleted file mode 100755 index ac845e5..0000000 --- a/net/shadowsocks-client/files/sslocal.init +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2012 OpenWrt.org -# Copyright (C) 2014 Zhao, Gang - -START=99 - -USE_PROCD=1 -PROG=/usr/bin/sslocal - -validate_section_sslocal() { - uci_validate_section sslocal sslocal "${1}" \ - 'server_addr:host' \ - 'server_port:port' \ - 'local_addr:host' \ - 'local_port:port' \ - 'password:string' \ - 'method:string' \ - 'log_level:range(0,7):5' - - return $? -} - -sslocal_instance() { - local server_addr server_port local_addr local_port - local password method log_level - - validate_section_sslocal "${1}" || { - echo "validation failed" - return 1 - } - - procd_open_instance - procd_set_param command "$PROG" - procd_append_param command -s "${server_addr}" -p "${server_port}" - procd_append_param command -u "${local_addr}" -b "${local_port}" - procd_append_param command -k "${password}" -m "${method}" - procd_append_param command -l "${log_level}" - procd_set_param respawn - procd_close_instance -} - -start_service() { - config_load sslocal - - config_foreach sslocal_instance sslocal -} - -service_triggers() -{ - procd_add_reload_trigger "sslocal" - procd_add_validation validate_section_sslocal -} diff --git a/net/shadowsocks-libev/Makefile b/net/shadowsocks-libev/Makefile deleted file mode 100644 index 5287ec6..0000000 --- a/net/shadowsocks-libev/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=shadowsocks-libev -PKG_VERSION:=2.6.1 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) -PKG_SOURCE_VERSION:=a3bf80cf11e0a88589abdd87266b5351f270197c -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_MAINTAINER:=Jian Chang -PKG_MIRROR_MD5SUM:=fc60936d8b990fdecd69b908bc6b770b1c1e54598da6622cc9669750c76fa2d1 - -PKG_LICENSE:=GPLv2 -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) - -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf -PKG_USE_MIPS16:=0 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/shadowsocks-libev/Default - SECTION:=net - CATEGORY:=Network - TITLE:=Lightweight Secured Socks5 Proxy $(2) - URL:=https://github.com/shadowsocks/shadowsocks-libev - VARIANT:=$(1) - DEPENDS:=$(3) +libpthread +ipset +ip +iptables-mod-tproxy +libpcre +zlib -endef - -CONFIGURE_ARGS += \ - --disable-documentation \ - -Package/shadowsocks-libev = $(call Package/shadowsocks-libev/Default,openssl,(OpenSSL),+libopenssl) -Package/shadowsocks-libev-mbedtls = $(call Package/shadowsocks-libev/Default,mbedtls,(mbed TLS),+libmbedtls) - -define Package/shadowsocks-libev/description -Shadowsocks-libev is a lightweight secured socks5 proxy for embedded devices and low end boxes. -endef - -Package/shadowsocks-libev-mbedtls/description = $(Package/shadowsocks-libev/description) - -define Package/shadowsocks-libev/conffiles -/etc/config/shadowsocks-libev -endef - -Package/shadowsocks-libev-mbedtls/conffiles = $(Package/shadowsocks-libev/conffiles) - -define Package/shadowsocks-libev/postinst -#!/bin/sh -uci -q batch <<-EOF >/dev/null - delete firewall.shadowsocks_libev - set firewall.shadowsocks_libev=include - set firewall.shadowsocks_libev.type=script - set firewall.shadowsocks_libev.path=/usr/share/shadowsocks-libev/firewall.include - set firewall.shadowsocks_libev.reload=1 - commit firewall -EOF -exit 0 -endef - -Package/shadowsocks-libev-mbedtls/postinst = $(Package/shadowsocks-libev/postinst) - -ifeq ($(BUILD_VARIANT),mbedtls) - CONFIGURE_ARGS += --with-crypto-library=mbedtls -endif - -define Package/shadowsocks-libev/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-{redir,tunnel} $(1)/usr/bin - $(INSTALL_BIN) ./files/ss-rules $(1)/usr/bin - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/shadowsocks-libev.config $(1)/etc/config/shadowsocks-libev - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/shadowsocks-libev.init $(1)/etc/init.d/shadowsocks-libev - $(INSTALL_DIR) $(1)/usr/share/shadowsocks-libev - $(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/shadowsocks-libev/firewall.include -endef - -Package/shadowsocks-libev-mbedtls/install = $(Package/shadowsocks-libev/install) - -$(eval $(call BuildPackage,shadowsocks-libev)) -$(eval $(call BuildPackage,shadowsocks-libev-mbedtls)) diff --git a/net/shadowsocks-libev/files/firewall.include b/net/shadowsocks-libev/files/firewall.include deleted file mode 100644 index 3a00e80..0000000 --- a/net/shadowsocks-libev/files/firewall.include +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -if pidof ss-redir>/dev/null; then - /etc/init.d/shadowsocks-libev rules - logger -t ShadowSocks-libev "Reloading ShadowSocks-libev due to restart of firewall" -fi diff --git a/net/shadowsocks-libev/files/shadowsocks-libev.config b/net/shadowsocks-libev/files/shadowsocks-libev.config deleted file mode 100644 index 95aec7b..0000000 --- a/net/shadowsocks-libev/files/shadowsocks-libev.config +++ /dev/null @@ -1,15 +0,0 @@ - -config shadowsocks-libev - option enable '1' - option server '127.0.0.1' - option server_port '8388' - option local_port '1080' - option password 'barfoo!' - option timeout '60' - option encrypt_method 'rc4-md5' - option ignore_list '/dev/null' - option udp_mode '0' - option tunnel_enable '1' - option tunnel_port '5300' - option tunnel_forward '8.8.4.4:53' - option lan_ac_mode '0' diff --git a/net/shadowsocks-libev/files/shadowsocks-libev.init b/net/shadowsocks-libev/files/shadowsocks-libev.init deleted file mode 100644 index 9a64038..0000000 --- a/net/shadowsocks-libev/files/shadowsocks-libev.init +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=90 -STOP=15 - -SERVICE_USE_PID=1 -SERVICE_WRITE_PID=1 -SERVICE_DAEMONIZE=1 -EXTRA_COMMANDS="rules" -CONFIG_FILE=/var/etc/shadowsocks-libev.json - -get_config() { - config_get_bool enable $1 enable - config_get server $1 server - config_get server_port $1 server_port - config_get local_port $1 local_port - config_get timeout $1 timeout - config_get password $1 password - config_get encrypt_method $1 encrypt_method - config_get ignore_list $1 ignore_list - config_get udp_mode $1 udp_mode - config_get udp_server $1 udp_server - config_get udp_server_port $1 udp_server_port - config_get udp_local_port $1 udp_local_port - config_get udp_timeout $1 udp_timeout - config_get udp_password $1 udp_password - config_get udp_encrypt_method $1 udp_encrypt_method - config_get_bool tunnel_enable $1 tunnel_enable - config_get tunnel_port $1 tunnel_port - config_get tunnel_forward $1 tunnel_forward - config_get lan_ac_mode $1 lan_ac_mode - config_get lan_ac_ip $1 lan_ac_ip - config_get wan_bp_ip $1 wan_bp_ip - config_get wan_fw_ip $1 wan_fw_ip - config_get ipt_ext $1 ipt_ext - : ${timeout:=60} - : ${udp_timeout:=60} - : ${tunnel_port:=5300} - : ${tunnel_forward:=8.8.4.4:53} -} - -start_rules() { - local ac_args - - if [ -n "$lan_ac_ip" ]; then - case $lan_ac_mode in - 1) ac_args="w$lan_ac_ip" - ;; - 2) ac_args="b$lan_ac_ip" - ;; - esac - fi - /usr/bin/ss-rules \ - -s "$server" \ - -l "$local_port" \ - -S "$udp_server" \ - -L "$udp_local_port" \ - -i "$ignore_list" \ - -a "$ac_args" \ - -b "$wan_bp_ip" \ - -w "$wan_fw_ip" \ - -e "$ipt_ext" \ - -o $udp - return $? -} - -start_redir() { - cat <<-EOF >$CONFIG_FILE - { - "server": "$server", - "server_port": $server_port, - "local_address": "0.0.0.0", - "local_port": $local_port, - "password": "$password", - "timeout": $timeout, - "method": "$encrypt_method" - } -EOF - if [ "$udp_mode" = 2 ]; then - /usr/bin/ss-redir \ - -c $CONFIG_FILE \ - -f /var/run/ss-redir_t.pid - cat <<-EOF >$CONFIG_FILE - { - "server": "$udp_server", - "server_port": $udp_server_port, - "local_address": "0.0.0.0", - "local_port": $udp_local_port, - "password": "$udp_password", - "timeout": $udp_timeout, - "method": "$udp_encrypt_method" - } -EOF - fi - /usr/bin/ss-redir \ - -c $CONFIG_FILE \ - -f /var/run/ss-redir.pid \ - $udp - return $? -} - -start_tunnel() { - : ${udp:="-u"} - /usr/bin/ss-tunnel \ - -c $CONFIG_FILE \ - -l $tunnel_port \ - -L $tunnel_forward \ - -f /var/run/ss-tunnel.pid \ - $udp - return $? -} - -rules() { - config_load shadowsocks-libev - config_foreach get_config shadowsocks-libev - [ "$enable" = 1 ] || exit 0 - mkdir -p /var/run /var/etc - - : ${server:?} - : ${server_port:?} - : ${local_port:?} - : ${password:?} - : ${encrypt_method:?} - case $udp_mode in - 1) udp="-u" - ;; - 2) - udp="-U" - : ${udp_server:?} - : ${udp_server_port:?} - : ${udp_local_port:?} - : ${udp_password:?} - : ${udp_encrypt_method:?} - ;; - esac - - start_rules -} - -boot() { - until iptables-save -t nat | grep -q "^:zone_lan_prerouting"; do - sleep 1 - done - start -} - -start() { - rules && start_redir - [ "$tunnel_enable" = 1 ] && start_tunnel -} - -stop() { - /usr/bin/ss-rules -f - killall -q -9 ss-redir - killall -q -9 ss-tunnel -} diff --git a/net/shadowsocks-libev/files/ss-rules b/net/shadowsocks-libev/files/ss-rules deleted file mode 100644 index 8ce1000..0000000 --- a/net/shadowsocks-libev/files/ss-rules +++ /dev/null @@ -1,219 +0,0 @@ -#!/bin/sh - -usage() { - cat <<-EOF - Usage: ss-rules [options] - - Valid options are: - - -s hostname or ip of shadowsocks remote server - -l port number of shadowsocks local server - -i a file content is bypassed ip list - -a lan ip of access control, need a prefix to - define access control mode - -b wan ip of will be bypassed - -w wan ip of will be forwarded - -e extra options for iptables - -o apply the rules to the OUTPUT chain - -u enable udprelay mode, TPROXY is required - -U enable udprelay mode, using different IP - and ports for TCP and UDP - -f flush the rules -EOF -} - -loger() { - # 1.alert 2.crit 3.err 4.warn 5.notice 6.info 7.debug - logger -st ss-rules[$$] -p$1 $2 -} - -ipt_n="iptables -t nat" -ipt_m="iptables -t mangle" - -flush_r() { - local IPT - - IPT=$(iptables-save -t nat) - eval $(echo "$IPT" | grep "_SS_SPEC_RULE_" | \ - sed -e 's/^-A/$ipt_n -D/' -e 's/$/;/') - - for chain in $(echo "$IPT" | awk '/^:SS_SPEC/{print $1}'); do - $ipt_n -F ${chain:1} 2>/dev/null && $ipt_n -X ${chain:1} - done - - IPT=$(iptables-save -t mangle) - eval $(echo "$IPT" | grep "_SS_SPEC_RULE_" | \ - sed -e 's/^-A/$ipt_m -D/' -e 's/$/;/') - - for chain in $(echo "$IPT" | awk '/^:SS_SPEC/{print $1}'); do - $ipt_m -F ${chain:1} 2>/dev/null && $ipt_m -X ${chain:1} - done - - ip rule del fwmark 0x01/0x01 table 100 2>/dev/null - ip route del local 0.0.0.0/0 dev lo table 100 2>/dev/null - ipset -X ss_spec_lan_ac 2>/dev/null - ipset -X ss_spec_wan_ac 2>/dev/null - return 0 -} - -ipset_r() { - ipset -! -R <<-EOF || return 1 - create ss_spec_wan_ac hash:net - $(echo -e "$IPLIST" | sed -e "s/^/add ss_spec_wan_ac /") - $(for ip in $WAN_FW_IP; do echo "add ss_spec_wan_ac $ip nomatch"; done) -EOF - $ipt_n -N SS_SPEC_WAN_AC && \ - $ipt_n -A SS_SPEC_WAN_AC -m set --match-set ss_spec_wan_ac dst -j RETURN && \ - $ipt_n -A SS_SPEC_WAN_AC -j SS_SPEC_WAN_FW - return $? -} - -fw_rule() { - $ipt_n -N SS_SPEC_WAN_FW && \ - $ipt_n -A SS_SPEC_WAN_FW -p tcp \ - -j REDIRECT --to-ports $local_port 2>/dev/null || { - loger 3 "Can't redirect, please check the iptables." - exit 1 - } - return $? -} - -ac_rule() { - local TAG ROUTECHAIN - - if [ -n "$LAN_AC_IP" ]; then - if [ "${LAN_AC_IP:0:1}" = "w" ]; then - TAG="nomatch" - else - if [ "${LAN_AC_IP:0:1}" != "b" ]; then - loger 3 "Bad argument \`-a $LAN_AC_IP\`." - return 2 - fi - fi - fi - - ROUTECHAIN=PREROUTING - if iptables-save -t nat | grep -q "^:zone_lan_prerouting"; then - ROUTECHAIN=zone_lan_prerouting - fi - - ipset -! -R <<-EOF || return 1 - create ss_spec_lan_ac hash:net - $(for ip in ${LAN_AC_IP:1}; do echo "add ss_spec_lan_ac $ip $TAG"; done) -EOF - $ipt_n -A $ROUTECHAIN -p tcp $EXT_ARGS \ - -m set ! --match-set ss_spec_lan_ac src \ - -m comment --comment "_SS_SPEC_RULE_" -j SS_SPEC_WAN_AC - - if [ "$OUTPUT" = 1 ]; then - $ipt_n -A OUTPUT -p tcp $EXT_ARGS \ - -m comment --comment "_SS_SPEC_RULE_" -j SS_SPEC_WAN_AC - fi - return $? -} - -tp_rule() { - [ -n "$TPROXY" ] || return 0 - ip rule add fwmark 0x01/0x01 table 100 - ip route add local 0.0.0.0/0 dev lo table 100 - $ipt_m -N SS_SPEC_TPROXY - $ipt_m -A SS_SPEC_TPROXY -p udp -m set ! --match-set ss_spec_wan_ac dst \ - -j TPROXY --on-port $LOCAL_PORT --tproxy-mark 0x01/0x01 - $ipt_m -A PREROUTING -p udp $EXT_ARGS \ - -m set ! --match-set ss_spec_lan_ac src \ - -m comment --comment "_SS_SPEC_RULE_" -j SS_SPEC_TPROXY - return $? -} - -while getopts ":s:l:S:L:i:e:a:b:w:ouUf" arg; do - case $arg in - s) - server=$OPTARG - ;; - l) - local_port=$OPTARG - ;; - S) - SERVER=$OPTARG - ;; - L) - LOCAL_PORT=$OPTARG - ;; - i) - IGNORE=$OPTARG - ;; - e) - EXT_ARGS=$OPTARG - ;; - a) - LAN_AC_IP=$OPTARG - ;; - b) - WAN_BP_IP=$(for ip in $OPTARG; do echo $ip; done) - ;; - w) - WAN_FW_IP=$OPTARG - ;; - o) - OUTPUT=1 - ;; - u) - TPROXY=1 - ;; - U) - TPROXY=2 - ;; - f) - flush_r - exit 0 - ;; - esac -done - -if [ -z "$server" -o -z "$local_port" ]; then - usage - exit 2 -fi - -if [ "$TPROXY" = 1 ]; then - SERVER=$server - LOCAL_PORT=$local_port -fi - -if [ "$TPROXY" = 2 ]; then - if [ -z "$SERVER" -o -z "$LOCAL_PORT" ]; then - loger 3 "Please use -S and -L specifies IP and port for UDP." - fi -fi - -if [ -f "$IGNORE" ]; then - IGNORE_IP=$(cat $IGNORE 2>/dev/null) -fi - -IPLIST=$(cat <<-EOF | grep -E "^([0-9]{1,3}\.){3}[0-9]{1,3}" - $server - $SERVER - 0.0.0.0/8 - 10.0.0.0/8 - 100.64.0.0/10 - 127.0.0.0/8 - 169.254.0.0/16 - 172.16.0.0/12 - 192.0.0.0/24 - 192.0.2.0/24 - 192.88.99.0/24 - 192.168.0.0/16 - 198.18.0.0/15 - 198.51.100.0/24 - 203.0.113.0/24 - 224.0.0.0/4 - 240.0.0.0/4 - 255.255.255.255 - $WAN_BP_IP - $IGNORE_IP -EOF -) - -flush_r && fw_rule && ipset_r && ac_rule && tp_rule - -exit $? diff --git a/net/siit/Makefile b/net/siit/Makefile deleted file mode 100644 index a2a4c50..0000000 --- a/net/siit/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=siit -PKG_VERSION:=1.2 -PKG_RELEASE:=1 -PKG_LICENSE:=GPLv2+ - -include $(INCLUDE_DIR)/package.mk - -define KernelPackage/siit - SUBMENU:=Network Devices - TITLE:=Stateless IP ICMP Translation Algorithm - DEPENDS:= @(!(TARGET_ps3||TARGET_pxcab)) - FILES:=$(PKG_BUILD_DIR)/siit.ko - AUTOLOAD:=$(call AutoLoad,50,siit) - MAINTAINER:=Vladimir Ulrich -endef - -include $(INCLUDE_DIR)/kernel-defaults.mk - -define KernelPackage/siit/description - Stateless IP ICMP Translation Algorithm -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - cp src/Makefile src/siit.h src/siit.c $(PKG_BUILD_DIR)/ -endef - -define Build/Compile - $(MAKE) $(KERNEL_MAKEOPTS) SUBDIRS="$(PKG_BUILD_DIR)" modules -endef - -$(eval $(call KernelPackage,siit)) diff --git a/net/siit/src/Makefile b/net/siit/src/Makefile deleted file mode 100644 index 06c36f1..0000000 --- a/net/siit/src/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -obj-m := siit.o -ifeq ($(MAKING_MODULES),1) --include $(TOPDIR)/Rules.make -endif - diff --git a/net/siit/src/siit.c b/net/siit/src/siit.c deleted file mode 100644 index ea68b74..0000000 --- a/net/siit/src/siit.c +++ /dev/null @@ -1,1429 +0,0 @@ -/* - * siit.c: the Stateless IP/ICMP Translator (SIIT) module for Linux. - * - * - */ - -#include -#include -#include -#include /* printk() */ -#include - -#include /* error codes */ -#include /* size_t */ -#include /* mark_bh */ -#include -#include -#include /* struct device, and other headers */ -#include /* eth_type_trans */ -#include /* struct iphdr */ -#include /* struct icmphdr */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "siit.h" - -MODULE_AUTHOR("Dmitriy Moscalev, Grigory Klyuchnikov, Felix Fietkau"); - -/* - * If tos_ignore_flag != 0, we don't copy TOS and Traffic Class - * from origin paket and set it to 0 - */ -int tos_ignore_flag = 0; - -#define siit_stats(_dev) (&(_dev)->stats) - -/* - * The Utility stuff - */ - -#ifdef SIIT_DEBUG -/* print dump bytes (data point data area sizeof len and message - * before dump. - */ -static int siit_print_dump(char *data, int len, char *message) -{ - int i; - int j = 0, k = 1; - - len = len > BUFF_SIZE ? BUFF_SIZE : len; - printk("%s:\n", message); - for (i=0; i < len; i++, k++) { - if( i == len-1 || k == 16) { - printk("%02x\n", (~(~0 << 8) & *(data+i))); - j = 0; - k = 0; - } - else if (j) { - printk("%02x ", (~(~0 << 8) & *(data+i))); - j--; - } - else { - printk("%02x", (~(~0 << 8) & *(data+i))); - j++; - } - } - return 0; -} -#endif - -/* - * Open and close - */ -static int siit_open(struct net_device *dev) -{ - netif_start_queue(dev); - return 0; -} - - -static int siit_release(struct net_device *dev) -{ - netif_stop_queue(dev); /* can't transmit any more */ - return 0; -} - -/* - * Translation IPv4 to IPv6 stuff - * - * ip4_ip6 (src, len, dst, include_flag) - * - * where - * src - buffer with original IPv4 packet, - * len - size of original packet, - * dst - new buffer for IPv6 packet, - * include_flag - if = 1, dst point to IPv4 packet that is ICMP error - * included IP packet, else = 0 - */ - -static int ip4_ip6(char *src, int len, char *dst, int include_flag) -{ - struct iphdr *ih4 = (struct iphdr *) src; /* point to current IPv4 header struct */ - struct icmphdr *icmp_hdr; /* point to current ICMPv4 header struct */ - struct udphdr *udp_hdr; /* point to current IPv4 UDP header struct */ - - struct ipv6hdr *ih6 = (struct ipv6hdr *) dst; /* point to current IPv6 header struct */ - struct frag_hdr *ih6_frag = (struct frag_hdr *)(dst+sizeof(struct ipv6hdr)); - /* point to current IPv6 fragment header struct */ - struct icmp6hdr *icmp6_hdr; /* point to current ICMPv6 header */ - - int hdr_len = (int)(ih4->ihl * 4); /* IPv4 header length */ - int icmp_len; /* ICMPv4 packet length */ - int plen; /* payload length */ - - unsigned int csum; /* need to calculate ICMPv6 and UDP checksum */ - int fl_csum = 0; /* flag to calculate UDP checksum */ - int icmperr = 1; /* flag to indicate ICMP error message and to need - translate ICMP included IP packet */ - int fr_flag = 0; /* fragment flag, if = 0 - don't add - fragment header */ - __u16 new_tot_len; /* need to calculate IPv6 total length */ - __u8 new_nexthdr; /* next header code */ - __u16 icmp_ptr = 0; /* Pointer field in ICMP_PARAMETERPROB */ - -#ifdef SIIT_DEBUG /* print IPv4 header dump */ - siit_print_dump(src, hdr_len, "siit: ip4_ip6() (in) ip4 header dump"); -#endif - - /* If DF == 1 && MF == 0 && Fragment Offset == 0 - * or this packet is ICMP included IP packet - * we don't need fragment header */ - if (ntohs(ih4->frag_off) == IP_DF || include_flag ) { - /* not fragment and we need not to add Fragment - * Header to IPv6 packet. */ - /* total length = total length from IPv4 packet */ - new_tot_len = ntohs(ih4->tot_len); - - if (ih4->protocol == IPPROTO_ICMP) - new_nexthdr = NEXTHDR_ICMP; - else - new_nexthdr = ih4->protocol; - } - else { - /* need to add Fragment Header */ - fr_flag = 1; - /* total length = total length from IPv4 packet + - length of Fragment Header */ - new_tot_len = ntohs(ih4->tot_len) + sizeof(struct frag_hdr); - /* IPv6 Header NextHeader = NEXTHDR_FRAGMENT */ - new_nexthdr = NEXTHDR_FRAGMENT; - /* Fragment Header NextHeader copy from IPv4 packet */ - if (ih4->protocol == IPPROTO_ICMP) - ih6_frag->nexthdr = NEXTHDR_ICMP; - else - ih6_frag->nexthdr = ih4->protocol; - - /* copy frag offset from IPv4 packet */ - ih6_frag->frag_off = htons((ntohs(ih4->frag_off) & IP_OFFSET) << 3); - /* copy MF flag from IPv4 packet */ - ih6_frag->frag_off = htons((ntohs(ih6_frag->frag_off) | - ((ntohs(ih4->frag_off) & IP_MF) >> 13))); - /* copy Identification field from IPv4 packet */ - ih6_frag->identification = htonl(ntohs(ih4->id)); - /* reserved field initialized to zero */ - ih6_frag->reserved = 0; - } - - /* Form rest IPv6 fields */ - - /* - * At this point we need to add checking of unxpired source - * route optin and if it is, send ICMPv4 "destination - * unreacheble/source route failes" Type 3/Code 5 and - * drop packet. (NOT RELEASED YET) - */ - - /* IP version = 6 */ - ih6->version = 6; - - if (tos_ignore_flag) { - ih6->priority = 0; - ih6->flow_lbl[0] = 0; - } else { - ih6->priority = (ih4->tos & 0xf0) >> 4; - ih6->flow_lbl[0] = (ih4->tos & 0x0f) << 4; - } - ih6->flow_lbl[1] = 0; - ih6->flow_lbl[2] = 0; - - /* Hop Limit = IPv4 TTL */ - ih6->hop_limit = ih4->ttl; - - /* Translate source destination addresses, - for IPv6 host it's IPv4-translated IPv6 address, - for IPv4 host it's IPv4-mapped IPv6 address - - !!WARNING!! Instead IPv4-mapped IPv6 addresses we use addreesses - with unused prefix ::ffff:ffff:0:0/96, because KAME implementation - doesn't support IPv4-mapped addresses in IPv6 packets and discard them. - - */ - - if (include_flag) { - /* - It's ICMP included IP packet and there is a diffirence - in src/dst addresses then src/dst in normal direction - */ - - /* - Source address - is IPv4-translated IPv6 address because packet traveled - from IPv6 to IPv4 area - */ - ih6->saddr.in6_u.u6_addr32[0] = 0; - ih6->saddr.in6_u.u6_addr32[1] = 0; - ih6->saddr.in6_u.u6_addr32[2] = htonl(TRANSLATED_PREFIX); /* to network order bytes */ - ih6->saddr.in6_u.u6_addr32[3] = ih4->saddr; - - /* - Destination address - is IPv4-mapped address (but it's not IPv4- mapped, we use - prefix ::ffff:ffff:0:0/96 - */ - ih6->daddr.in6_u.u6_addr32[0] = 0; - ih6->daddr.in6_u.u6_addr32[1] = 0; - ih6->daddr.in6_u.u6_addr32[2] = htonl(MAPPED_PREFIX); /* to network order bytes */ - ih6->daddr.in6_u.u6_addr32[3] = ih4->daddr; - } - else { - - /* - This is normal case (packet isn't included IP packet) - - Source address - is IPv4-mapped address (but it's not IPv4- mapped, we use - prefix ::ffff:ffff:0:0/96) - */ - ih6->saddr.in6_u.u6_addr32[0] = 0; - ih6->saddr.in6_u.u6_addr32[1] = 0; - ih6->saddr.in6_u.u6_addr32[2] = htonl(MAPPED_PREFIX); /* to network order bytes */ - ih6->saddr.in6_u.u6_addr32[3] = ih4->saddr; - - /* Destination address - is is IPv4-translated IPv6 address - */ - ih6->daddr.in6_u.u6_addr32[0] = 0; - ih6->daddr.in6_u.u6_addr32[1] = 0; - ih6->daddr.in6_u.u6_addr32[2] = htonl(TRANSLATED_PREFIX); /* to network order bytes */ - ih6->daddr.in6_u.u6_addr32[3] = ih4->daddr; - } - - /* Payload Length */ - plen = new_tot_len - hdr_len; /* Payload length = IPv4 total len - IPv4 header len */ - ih6->payload_len = htons(plen); - - /* Next Header */ - ih6->nexthdr = new_nexthdr; /* Next Header */ - - /* Process ICMP protocols data */ - - switch (ih4->protocol) { - case IPPROTO_ICMP: - if ( (ntohs(ih4->frag_off) & IP_OFFSET) != 0 || (ntohs(ih4->frag_off) & IP_MF) != 0 ) { - PDEBUG("ip4_ip6(): don't translate ICMPv4 fragments - packet dropped.\n"); - return -1; - } - - icmp_hdr = (struct icmphdr *) (src+hdr_len); /* point to ICMPv4 header */ - csum = 0; - icmp_len = ntohs(ih4->tot_len) - hdr_len; /* ICMPv4 packet length */ - icmp6_hdr = (struct icmp6hdr *)(dst+sizeof(struct ipv6hdr) - +fr_flag*sizeof(struct frag_hdr)); /* point to ICMPv6 header */ - - if (include_flag) { - /* ICMPv4 packet cannot be included in ICMPv4 Error message */ - /* !!! May be it's WRONG !!! ICMPv4 QUERY packet can be included - in ICMPv4 Error message */ - PDEBUG("ip4_ip6(): It's included ICMPv4 in ICMPv4 Error message - packet dropped.\n"); - return -1; - } - - /* Check ICMPv4 Type field */ - switch (icmp_hdr->type) { - /* ICMP Error messages */ - /* Destination Unreachable (Type 3) */ - case ICMP_DEST_UNREACH: - icmp6_hdr->icmp6_type = ICMPV6_DEST_UNREACH; /* to Type 1 */ - icmp6_hdr->icmp6_unused = 0; - switch (icmp_hdr->code) - { - case ICMP_NET_UNREACH: /* Code 0 */ - case ICMP_HOST_UNREACH: /* Code 1 */ - case ICMP_SR_FAILED: /* Code 5 */ - case ICMP_NET_UNKNOWN: /* Code 6 */ - case ICMP_HOST_UNKNOWN: /* Code 7 */ - case ICMP_HOST_ISOLATED: /* Code 8 */ - case ICMP_NET_UNR_TOS: /* Code 11 */ - case ICMP_HOST_UNR_TOS: /* Code 12 */ - icmp6_hdr->icmp6_code = ICMPV6_NOROUTE; /* to Code 0 */ - break; - case ICMP_PROT_UNREACH: /* Code 2 */ - icmp6_hdr->icmp6_type = ICMPV6_PARAMPROB; /* to Type 4 */ - icmp6_hdr->icmp6_code = ICMPV6_UNK_NEXTHDR; /* to Code 1 */ - /* Set pointer filed to 6, it's octet offset IPv6 Next Header field */ - icmp6_hdr->icmp6_pointer = htonl(6); - break; - case ICMP_PORT_UNREACH: /* Code 3 */ - icmp6_hdr->icmp6_code = ICMPV6_PORT_UNREACH; /* to Code 4 */ - break; - case ICMP_FRAG_NEEDED: /* Code 4 */ - icmp6_hdr->icmp6_type = ICMPV6_PKT_TOOBIG; /* to Type 2 */ - icmp6_hdr->icmp6_code = 0; - /* Correct MTU */ - if (icmp_hdr->un.frag.mtu == 0) - /* we use minimum MTU for IPv4 PMTUv4 RFC1191, section 5; - IPv6 implementation wouldn't accept Path MTU < 1280, - but it records info correctly to always include - a fragment header */ - icmp6_hdr->icmp6_mtu = htonl(576); - else - /* needs to adjusted for difference between IPv4/IPv6 headers - * SIIT RFC2765, section 3.3, - * we assume that difference is 20 bytes */ - icmp6_hdr->icmp6_mtu = htonl(ntohs(icmp_hdr->un.frag.mtu)+IP4_IP6_HDR_DIFF); - - break; - case ICMP_NET_ANO: /* Code 9 */ - case ICMP_HOST_ANO: /* Code 10 */ - icmp6_hdr->icmp6_code = ICMPV6_ADM_PROHIBITED; /* to Code 1 */ - break; - default: /* discard any other Code */ - PDEBUG("ip4_ip6(): Unknown ICMPv4 Type %d Code %d - packet dropped.\n", - ICMP_DEST_UNREACH, icmp_hdr->code); - return -1; - } - break; - /* Time Exceeded (Type 11) */ - case ICMP_TIME_EXCEEDED: - icmp6_hdr->icmp6_type = ICMPV6_TIME_EXCEED; - icmp6_hdr->icmp6_code = icmp_hdr->code; - break; - /* Parameter Problem (Type 12) */ - case ICMP_PARAMETERPROB: - icmp6_hdr->icmp6_type = ICMPV6_PARAMPROB; - icmp6_hdr->icmp6_code = icmp_hdr->code; - - icmp_ptr = ntohs(icmp_hdr->un.echo.id) >> 8; - switch (icmp_ptr) { - case 0: - icmp6_hdr->icmp6_pointer = 0; /* IPv4 Version -> IPv6 Version */ - break; - case 2: - icmp6_hdr->icmp6_pointer = __constant_htonl(4); /* IPv4 length -> IPv6 Payload Length */ - break; - case 8: - icmp6_hdr->icmp6_pointer = __constant_htonl(7); /* IPv4 TTL -> IPv6 Hop Limit */ - break; - case 9: - icmp6_hdr->icmp6_pointer = __constant_htonl(6); /* IPv4 Protocol -> IPv6 Next Header */ - break; - case 12: - icmp6_hdr->icmp6_pointer = __constant_htonl(8); /* IPv4 Src Addr -> IPv6 Src Addr */ - break; - case 16: - icmp6_hdr->icmp6_pointer = __constant_htonl(24); /* IPv4 Dst Addr -> IPv6 Dst Addr */ - break; - default: - icmp6_hdr->icmp6_pointer = 0xffffffff; /* set to all ones in any other cases */ - break; - } - break; - case ICMP_ECHO: - icmperr = 0; - icmp6_hdr->icmp6_type = ICMPV6_ECHO_REQUEST; - icmp6_hdr->icmp6_code = 0; - /* Copy rest ICMP data to new IPv6 packet without changing */ - memcpy(((char *)icmp6_hdr)+4, ((char *)icmp_hdr)+4, len - hdr_len - 4); - break; - - case ICMP_ECHOREPLY: - icmperr = 0; - icmp6_hdr->icmp6_type = ICMPV6_ECHO_REPLY; - icmp6_hdr->icmp6_code = 0; - /* Copy rest ICMP data to new IPv6 packet without changing */ - memcpy(((char *)icmp6_hdr)+4, ((char *)icmp_hdr)+4, len - hdr_len - 4); - break; - - /* Discard any other ICMP messages */ - default: - PDEBUG("ip4_ip6(): Unknown ICMPv4 packet Type %x - packet dropped.\n", icmp_hdr->type); - return -1; - } - - /* Now if it's ICMPv4 Error message we must translate included IP packet */ - - if (icmperr) { - /* Call our ip4_ip6() to translate included IP packet */ - if (ip4_ip6(src+hdr_len+sizeof(struct icmphdr), len - hdr_len - sizeof(struct icmphdr), - dst+sizeof(struct ipv6hdr)+fr_flag*sizeof(struct frag_hdr) - +sizeof(struct icmp6hdr), 1) == -1) { - PDEBUG("ip4_ip6(): Uncorrect translation of ICMPv4 Error message - packet dropped.\n"); - return -1; - } - /* correct ICMPv6 packet length for diffirence between IPv4 and IPv6 headers - in included IP packet - */ - icmp_len += 20; - /* and correct Payload length for diffirence between IPv4 and IPv6 headers */ - plen += 20; - ih6->payload_len = htons(plen); - } - - /* Calculate ICMPv6 checksum */ - - icmp6_hdr->icmp6_cksum = 0; - csum = 0; - - csum = csum_partial((u_char *)icmp6_hdr, icmp_len, csum); - icmp6_hdr->icmp6_cksum = csum_ipv6_magic(&ih6->saddr, &ih6->daddr, icmp_len, - IPPROTO_ICMPV6, csum); - break; - - /* Process TCP protocols data */ - case IPPROTO_TCP: - /* Copy TCP data to new IPv6 packet without changing */ - memcpy(dst+sizeof(struct ipv6hdr)+fr_flag*sizeof(struct frag_hdr), - src+hdr_len, len - hdr_len); - break; - - /* Process UDP protocols data */ - case IPPROTO_UDP: - udp_hdr = (struct udphdr *)(src+hdr_len); - if ((ntohs(ih4->frag_off) & IP_OFFSET) == 0) { - if ((ntohs(ih4->frag_off) & IP_MF) != 0) { - /* It's a first fragment */ - if (udp_hdr->check == 0) { - /* System management event */ - printk("siit: First fragment of UDP with zero checksum - packet droped\n"); - printk("siit: addr: %x src port: %d dst port: %d\n", - htonl(ih4->saddr), htons(udp_hdr->source), htons(udp_hdr->dest)); - return -1; - } - } - else if (udp_hdr->check == 0) - fl_csum = 1; - } - - /* Copy UDP data to new IPv6 packet */ - udp_hdr = (struct udphdr *)(dst+sizeof(struct ipv6hdr) - + fr_flag*sizeof(struct frag_hdr)); - memcpy((char *)udp_hdr, src+hdr_len, len - hdr_len); - - /* Calculate UDP checksum if UDP checksum in IPv4 packet was ZERO - and if it isn't included IP packet - */ - if (fl_csum && (!include_flag)) { - udp_hdr->check = 0; - csum = 0; - csum = csum_partial((unsigned char *)udp_hdr, plen - fr_flag*sizeof(struct frag_hdr), csum); - udp_hdr->check = csum_ipv6_magic(&ih6->saddr, &ih6->daddr, plen - - fr_flag*sizeof(struct frag_hdr), IPPROTO_UDP, csum); - } - break; - - /* Discard packets with any other protocol */ - default: - PDEBUG("ip4_ip6(): Unknown upper protocol - packet dropped.\n"); - return -1; - } - -#ifdef SIIT_DEBUG - siit_print_dump(dst, sizeof(struct ipv6hdr), "siit: ip4_ip6(): (out) ipv6 header dump"); -#endif - - return 0; -} - -/* - * Translation IPv6 to IPv4 stuff - * - * ip6_ip4(src, len, dst, include_flag) - * - * where - * src - buffer with original IPv6 packet, - * len - size of original packet, - * dst - new buffer for IPv4 packet, - * include_flag - if = 1, dst point to IPv6 packet that is ICMP error - * included IP packet, else = 0 - * - */ - -static int ip6_ip4(char *src, int len, char *dst, int include_flag) -{ - struct ipv6hdr *ip6_hdr; /* point to current IPv6 header struct */ - struct iphdr *ip_hdr; /* point to current IPv4 header struct */ - int opts_len = 0; /* to sum Option Headers length */ - int icmperr = 1; /* if = 1, indicate that packet is ICMP Error message, else = 0 */ - int ntot_len = 0; /* to calculate IPv6 Total Length field */ - int real_len; - int len_delta; - int ip6_payload_len; - int inc_opts_len = 0; /* to sum Option Headers length in ICMP included IP packet */ - __u8 next_hdr; /* Next Header */ - -#ifdef SIIT_DEBUG - siit_print_dump(src, sizeof(struct ipv6hdr), "siit: ip6_ip4(): (in) ipv6 header dump"); -#endif - - if ( (len_delta = len - sizeof(struct ipv6hdr)) >= 0) - { - ip6_hdr = (struct ipv6hdr *)src; - ip_hdr = (struct iphdr *)dst; - - real_len = sizeof(struct iphdr); - - /* Check validation of Saddr & Daddr? is a packet to fall under our translation? */ - if (include_flag) { /* It's ICMP included IP packet, - about process include_flag see comment in ip4_ip6() */ - if (ip6_hdr->saddr.s6_addr32[2] != htonl(MAPPED_PREFIX)) { - PDEBUG("ip6_ip4(): Included IP packet Src addr isn't mapped addr: %x%x%x%x, packet dropped.\n", - ip6_hdr->saddr.s6_addr32[0], ip6_hdr->saddr.s6_addr32[1], - ip6_hdr->saddr.s6_addr32[2], ip6_hdr->saddr.s6_addr32[3]); - return -1; - } - if ( ip6_hdr->daddr.s6_addr32[2] != htonl(TRANSLATED_PREFIX)) { - PDEBUG("ip6_ip4(): Included IP packet Dst addr isn't translated addr: %x%x%x%x, packet dropped.\n", - ip6_hdr->daddr.s6_addr32[0], ip6_hdr->daddr.s6_addr32[1], - ip6_hdr->daddr.s6_addr32[2], ip6_hdr->daddr.s6_addr32[3]); - return -1; - } - } - else { /* It's normal IP packet (not included in ICMP) */ - if (ip6_hdr->saddr.s6_addr32[2] != htonl(TRANSLATED_PREFIX)) { - PDEBUG("ip6_ip4(): Src addr isn't translated addr: %x%x%x%x, packet dropped.\n", - ip6_hdr->saddr.s6_addr32[0], ip6_hdr->saddr.s6_addr32[1], - ip6_hdr->saddr.s6_addr32[2], ip6_hdr->saddr.s6_addr32[3]); - return -1; - } - if ( ip6_hdr->daddr.s6_addr32[2] != htonl(MAPPED_PREFIX)) { - PDEBUG("ip6_ip4(): Dst addr isn't mapped addr: %x%x%x%x, packet dropped.\n", - ip6_hdr->daddr.s6_addr32[0], ip6_hdr->daddr.s6_addr32[1], - ip6_hdr->daddr.s6_addr32[2], ip6_hdr->daddr.s6_addr32[3]); - return -1; - } - } - - /* Set IPv4 Fragment Offset and ID to 0 - before process any Option Headers */ - ip_hdr->frag_off = 0; - ip_hdr->id = 0; - - /* - * We process only Fragment Header. Any other options headers - * are ignored, i.e. there is no attempt to translate them. - * However, the Total Length field and the Protocol field would - * have to be adjusted to "skip" these extension headers. - */ - - next_hdr = ip6_hdr->nexthdr; - - /* Hop_by_Hop options header (ip6_hdr->nexthdr = 0). It must - * appear only in IPv6 header's Next Header field. - */ - if (next_hdr == NEXTHDR_HOP) { - if ( (len_delta - sizeof(struct ipv6_opt_hdr)) >= 0) - { - struct ipv6_opt_hdr *ip6h = - (struct ipv6_opt_hdr *)(src+sizeof(struct ipv6hdr) + opts_len); - if ( (len_delta -= ip6h->hdrlen*8 + 8) >= 0) - { - opts_len += ip6h->hdrlen*8 + 8; /* See RFC 2460 page 11: - Hdr Ext Len 8-bit unsigned integer. Length of the Hop-by- - Hop Options header in 8-octet units, not - including the first 8 octets. - */ - next_hdr = ip6h->nexthdr; - } - else - { - PDEBUG("ip6_ip4(): hop_by_hop header error, packet droped"); - /* Generate ICMP Parameter Problem */ - return -1; - } - } - } - - if (len_delta > 0) - { - while(next_hdr != NEXTHDR_ICMP && next_hdr != NEXTHDR_TCP - && next_hdr != NEXTHDR_UDP) - { - /* Destination options header */ - if (next_hdr == NEXTHDR_DEST) - { - if ( (len_delta - sizeof(struct ipv6_opt_hdr)) >= 0) - { - struct ipv6_opt_hdr *ip6d = - (struct ipv6_opt_hdr *)(src + sizeof(struct ipv6hdr) + opts_len); - if ( (len_delta -= ip6d->hdrlen*8 + 8) >= 0) - { - opts_len += ip6d->hdrlen*8 + 8; - next_hdr = ip6d->nexthdr; - } - } - else - { - PDEBUG("ip6_ip4(): destination header error, packet droped"); - /* Generate ICMP Parameter Problem */ - return -1; - } - } - /* Routing options header */ - else if (next_hdr == NEXTHDR_ROUTING) - { - if ( (len_delta - sizeof(struct ipv6_rt_hdr)) >= 0) - { - struct ipv6_rt_hdr *ip6rt = - (struct ipv6_rt_hdr *)(src+sizeof(struct ipv6hdr) + opts_len); - /* RFC 2765 SIIT, 4.1: - If a routing header with a non-zero Segments Left field is present - then the packet MUST NOT be translated, and an ICMPv6 "parameter - problem/ erroneous header field encountered" (Type 4/Code 0) error - message, with the Pointer field indicating the first byte of the - Segments Left field, SHOULD be returned to the sender. - */ - if (ip6rt->segments_left != 0) { - /* Build ICMPv6 "Parameter Problem/Erroneous Header - Field Encountered" & drop the packet */ - /* !!! We don't send ICMPv6 "Parameter Problem" !!! */ - PDEBUG("ip6_ip4(): routing header type != 0\n"); - return -1; - } - if ( (len_delta -= ip6rt->hdrlen*8 + 8) >= 0) - { - opts_len += ip6rt->hdrlen*8 + 8; - next_hdr = ip6rt->nexthdr; - } - else - { - PDEBUG("ip6_ip4(): routing header error, packet droped"); - /* Generate ICMP Parameter Problem */ - return -1; - } - } - } - /* Fragment options header */ - else if (next_hdr == NEXTHDR_FRAGMENT) - { - if ( (len_delta -= sizeof(struct frag_hdr)) >= 0) - { - struct frag_hdr *ip6f = - (struct frag_hdr *)(src+sizeof(struct ipv6hdr)+opts_len); - - opts_len += sizeof(struct frag_hdr); /* Frag Header Length = 8 */ - ip_hdr->id = htons(ntohl(ip6f->identification)); /* ID field */ - ip_hdr->frag_off = htons((ntohs(ip6f->frag_off) & IP6F_OFF_MASK) >> 3); - /* fragment offset */ - ip_hdr->frag_off = htons(ntohs(ip_hdr->frag_off) | - ((ntohs(ip6f->frag_off) & IP6F_MORE_FRAG) << 13)); - /* more fragments flag */ - next_hdr = ip6f->nexthdr; - } - else - { - PDEBUG("ip6_ip4(): fragment header error, packet droped"); - /* Generate ICMP Parameter Problem */ - return -1; - } - } - /* No Next Header */ - else if (next_hdr == NEXTHDR_NONE) - { - /* RFC 2460 IPv6 Specification, 4.7 - 4.7 No Next Header - - The value 59 in the Next Header field of an IPv6 header or any - extension header indicates that there is nothing following that - header. If the Payload Length field of the IPv6 header indicates the - presence of octets past the end of a header whose Next Header field - contains 59, those octets must be ignored, and passed on unchanged if - the packet is forwarded. - */ - break; - } - else if (next_hdr == NEXTHDR_ESP || next_hdr == NEXTHDR_AUTH) - { - PDEBUG("ip6_ip4(): cannot translate AUTH or ESP extension header, packet dropped\n"); - return -1; - } - else if (next_hdr == NEXTHDR_IPV6) - { - PDEBUG("ip6_ip4(): cannot translate IPv6-IPv6 packet, packet dropped\n"); - return -1; - } - else if (next_hdr == 0) - { - /* As say RFC 2460 (IPv6 Spec) we should discard the packet and send an - ICMP Parameter Problem message to the source of the packet, with an - ICMP Code value of 1 ("unrecognized Next Header type encountered") - and the ICMP Pointer field containing the offset of the unrecognized - value within the original packet - */ - /* NOT IMPLEMENTED */ - PDEBUG("ip6_ip4(): NEXTHDR in extension header = 0, packet dropped\n"); - return -1; - } - else - { - PDEBUG("ip6_ip4(): cannot translate extension header = %d, packet dropped\n", next_hdr); - return -1; - } - } - } - } - else - { - PDEBUG("ip6_ip4(): error packet len, packet dropped.\n"); - return -1; - } - - /* Building ipv4 packet */ - - ip_hdr->version = IPVERSION; - ip_hdr->ihl = 5; - - /* TOS see comment about TOS in ip4_ip6() */ - if (tos_ignore_flag) - ip_hdr->tos = 0; - else { - ip_hdr->tos = ip6_hdr->priority << 4; - ip_hdr->tos = ip_hdr->tos | (ip6_hdr->flow_lbl[0] >> 4); - } - - /* IPv4 Total Len = IPv6 Payload Len + - IPv4 Header Len (without options) - Options Headers Len */ - ip6_payload_len = ntohs(ip6_hdr->payload_len); - - if (ip6_payload_len == 0) - ntot_len = 0; - else - ntot_len = ip6_payload_len + IP4_IP6_HDR_DIFF - opts_len; - - ip_hdr->tot_len = htons(ntot_len); - - /* IPv4 TTL = IPv6 Hop Limit */ - ip_hdr->ttl = ip6_hdr->hop_limit; - - /* IPv4 Protocol = Next Header that will point to upper layer protocol */ - ip_hdr->protocol = next_hdr; - - /* IPv4 Src addr = last 4 bytes from IPv6 Src addr */ - ip_hdr->saddr = ip6_hdr->saddr.s6_addr32[3]; - /* IPv4 Dst addr = last 4 bytes from IPv6 Dst addr */ - ip_hdr->daddr = ip6_hdr->daddr.s6_addr32[3]; - - /* Calculate IPv4 header checksum */ - ip_hdr->check = 0; - ip_hdr->check = ip_fast_csum((unsigned char *)ip_hdr, ip_hdr->ihl); - - if (len_delta > 0) - { - /* PROCESS ICMP */ - - if (next_hdr == NEXTHDR_ICMP) - { - struct icmp6hdr *icmp6_hdr; - struct icmphdr *icmp_hdr; - - if ((len_delta -= sizeof(struct icmp6hdr)) >= 0) - { - icmp6_hdr = (struct icmp6hdr *)(src + sizeof(struct ipv6hdr) + opts_len); - icmp_hdr = (struct icmphdr *)(dst + sizeof(struct iphdr)); - - real_len += len_delta + sizeof(struct icmphdr); - - /* There is diffirent between ICMPv4/ICMPv6 protocol codes - IPPROTO_ICMP = 1 - IPPROTO_ICMPV6 = 58 */ - ip_hdr->protocol = IPPROTO_ICMP; - - if (include_flag) { - /* !!! Warnig !!! We discard ICMP packets with any ICMP as included - in ICMP Error. But ICMP Error messages can include ICMP Query message - */ - if (icmp6_hdr->icmp6_type != ICMPV6_ECHO_REQUEST) - { - PDEBUG("ip6_ip4(): included ICMPv6 in ICMPv6 Error message, packet dropped\n"); - return -1; - } - } - - /* Translate ICMPv6 to ICMPv4 */ - switch (icmp6_hdr->icmp6_type) - { -/* ICMP Error messages */ - /* Destination Unreachable (Type 1) */ - case ICMPV6_DEST_UNREACH: /* Type 1 */ - icmp_hdr->type = ICMP_DEST_UNREACH; /* to Type 3 */ - icmp_hdr->un.echo.id = 0; - icmp_hdr->un.echo.sequence = 0; - switch (icmp6_hdr->icmp6_code) - { - case ICMPV6_NOROUTE: /* Code 0 */ - case ICMPV6_NOT_NEIGHBOUR: /* Code 2 */ - case ICMPV6_ADDR_UNREACH: /* Code 3 */ - icmp_hdr->code = ICMP_HOST_UNREACH; /* To Code 1 */ - break; - case ICMPV6_ADM_PROHIBITED: /* Code 1 */ - icmp_hdr->code = ICMP_HOST_ANO; /* To Code 10 */ - break; - case ICMPV6_PORT_UNREACH: /* Code 4 */ - icmp_hdr->code = ICMP_PORT_UNREACH; /* To Code 3 */ - - break; - default: /* discard any other codes */ - PDEBUG("ip6_ip4(): Unknown ICMPv6 Type %d Code %d - packet dropped.\n", - ICMPV6_DEST_UNREACH, icmp6_hdr->icmp6_code); - return -1; - } - break; - /* Packet Too Big (Type 2) */ - case ICMPV6_PKT_TOOBIG: /* Type 2 */ - icmp_hdr->type = ICMP_DEST_UNREACH; /* to Type 3 */ - icmp_hdr->code = ICMP_FRAG_NEEDED; /* to Code 4 */ - /* Change MTU, RFC 2765 (SIIT), 4.2: - The MTU field needs to be adjusted for the difference between - the IPv4 and IPv6 header sizes taking into account whether or - not the packet in error includes a Fragment header. - */ - /* !!! Don't implement !!! */ - icmp_hdr->un.frag.mtu = (__u16) icmp6_hdr->icmp6_mtu; - break; - /* Time Exceeded (Type 3) */ - case ICMPV6_TIME_EXCEED: - icmp_hdr->type = ICMP_TIME_EXCEEDED; /* to Type 11 */ - icmp_hdr->code = icmp6_hdr->icmp6_code; /* Code unchanged */ - break; - /* Parameter Problem (Type 4) */ - case ICMPV6_PARAMPROB: - switch (icmp6_hdr->icmp6_code) { - case ICMPV6_UNK_NEXTHDR: /* Code 1 */ - icmp_hdr->type = ICMP_DEST_UNREACH; /* to Type 3 */ - icmp_hdr->code = ICMP_PROT_UNREACH; /* to Code 2 */ - break; - default: /* if Code != 1 */ - icmp_hdr->type = ICMP_PARAMETERPROB; /* to Type 12 */ - icmp_hdr->code = 0; /* to Code 0 */ - /* Update Pointer field - RFC 2765 (SIIT), 4.2: - The Pointer needs to be updated to point to the corresponding - field in the translated include IP header. - */ - switch (ntohl(icmp6_hdr->icmp6_pointer)) - { - case 0: /* IPv6 Version -> IPv4 Version */ - icmp_hdr->un.echo.id = 0; - break; - case 4: /* IPv6 PayloadLength -> IPv4 Total Length */ - icmp_hdr->un.echo.id = 0x0002; /* 2 */ - break; - case 6: /* IPv6 Next Header-> IPv4 Protocol */ - icmp_hdr->un.echo.id = 0x0009; /* 9 */ - break; - case 7: /* IPv6 Hop Limit -> IPv4 TTL */ - icmp_hdr->un.echo.id = 0x0008; /* 8 */ - break; - case 8: /* IPv6 Src addr -> IPv4 Src addr */ - icmp_hdr->un.echo.id = 0x000c; /* 12 */ - break; - case 24: /* IPv6 Dst addr -> IPv4 Dst addr*/ - icmp_hdr->un.echo.id = 0x0010; /* 16 */ - break; - default: /* set all ones in other cases */ - icmp_hdr->un.echo.id = 0xff; - break; - } - break; - } - break; - -/* End of ICMP Error messages */ - - /* Echo Request and Echo Reply (Type 128 and 129) */ - case ICMPV6_ECHO_REQUEST: - icmperr = 0; /* not error ICMP message */ - icmp_hdr->type = ICMP_ECHO; /* to Type 8 */ - icmp_hdr->code = 0; /* to Code 0 */ - icmp_hdr->un.echo.id = icmp6_hdr->icmp6_identifier; - icmp_hdr->un.echo.sequence = icmp6_hdr->icmp6_sequence; - /* copy rest of ICMP data to result packet */ - if (len_delta > 0) - memcpy(((char *)icmp_hdr) + sizeof(struct icmphdr), - ((char *)icmp6_hdr) + sizeof(struct icmp6hdr), len_delta); - break; - case ICMPV6_ECHO_REPLY: - icmperr = 0; /* not error ICMP message */ - icmp_hdr->type = ICMP_ECHOREPLY; /* to Type 0 */ - icmp_hdr->code = 0; /* to Code 0 */ - icmp_hdr->un.echo.id = icmp6_hdr->icmp6_identifier; - icmp_hdr->un.echo.sequence = icmp6_hdr->icmp6_sequence; - /* copy rest of ICMP data */ - if (len_delta > 0) - memcpy(((char *)icmp_hdr) + sizeof(struct icmphdr), - ((char *)icmp6_hdr) + sizeof(struct icmp6hdr), len_delta); - break; - default: - /* Unknown error messages. Silently drop. */ - PDEBUG("ip6_ip4(): unknown ICMPv6 Type %d, packet dropped.\n", icmp6_hdr->icmp6_type); - return -1; - } - - if (icmperr) - { - /* If ICMP Error message, we translate IP included packet*/ - if (len_delta >= sizeof(struct ipv6hdr)) - { - if((inc_opts_len = ip6_ip4((char *)icmp6_hdr + sizeof(struct icmp6hdr), len_delta, - (char *)icmp_hdr + sizeof(struct icmphdr), 1)) == -1) { - PDEBUG("ip6_ip4(): incorrect translation of ICMPv6 Error message, packet dropped\n"); - return -1; - } - /* correct IPv4 Total Len that = old Total Len - - Options Headers Len in included IP packet - - diffirence between IPv6 Header Len and IPv4 Header Len - */ - if (ntot_len != 0) - ip_hdr->tot_len = htons(ntot_len - inc_opts_len - IP4_IP6_HDR_DIFF); - real_len = real_len - inc_opts_len - IP4_IP6_HDR_DIFF; - } - else if (len_delta > 0) - { - /* May be it need set 0x0 to rest area in result IPv4 packet, - * but we copy rest data unchanged - */ - memcpy(((char *)icmp_hdr) + sizeof(struct icmphdr), - ((char *)icmp6_hdr) + sizeof(struct icmp6hdr), len_delta); - } - } - - /* Calculate IPv4 Header checksum */ - ip_hdr->check = 0; - ip_hdr->check = ip_fast_csum((unsigned char *)ip_hdr, ip_hdr->ihl); - - /* Calculate ICMPv4 checksum */ - if (ntot_len != 0) - { - icmp_hdr->checksum = 0; - icmp_hdr->checksum = ip_compute_csum((unsigned char *)icmp_hdr, ntohs(ip_hdr->tot_len) - - sizeof(struct iphdr)); - } - } - else - { - PDEBUG("ip6_ip4(): error length ICMP packet, packet dropped.\n"); - return -1; - } - - } - /* PROCESS TCP and UDP (and rest data) */ - - else { - real_len += len_delta; - /* we copy rest data to IPv4 packet without changing */ - memcpy(dst+sizeof(struct iphdr), src + sizeof(struct ipv6hdr) + opts_len, len_delta); - } - } - - if (include_flag) /* if it's included IP packet */ - return opts_len; /* return options headers length */ - else - return real_len; /* result packet len */ -} - -/* - * ip4_fragment(skb, len, hdr_len, dev, eth_h) - * to fragment original IPv4 packet if result IPv6 packet will be > 1280 - */ - -static int ip4_fragment(struct sk_buff *skb, int len, int hdr_len, struct net_device *dev, struct ethhdr *eth_h) -{ - struct sk_buff *skb2 = NULL; /* pointer to new struct sk_buff for transleded packet */ - char buff[FRAG_BUFF_SIZE+hdr_len]; /* buffer to form new fragment packet */ - char *cur_ptr = skb->data+hdr_len; /* pointter to current packet data with len = frag_len */ - struct iphdr *ih4 = (struct iphdr *) skb->data; - struct iphdr *new_ih4 = (struct iphdr *) buff; /* point to new IPv4 hdr */ - struct ethhdr *new_eth_h; /* point to ether hdr, need to set hard header data in fragment */ - int data_len = len - hdr_len; /* origin packet data len */ - int rest_len = data_len; /* rest data to fragment */ - int frag_len = 0; /* current fragment len */ - int last_frag = 0; /* last fragment flag, if = 1, it's last fragment */ - int flag_last_mf = 0; - __u16 new_id = 0; /* to generate identification field */ - __u16 frag_offset = 0; /* fragment offset */ - unsigned int csum; - unsigned short udp_len; - -#ifdef SIIT_DEBUG - printk("siit: it's DF == 0 and result IPv6 packet will be > 1280\n"); - siit_print_dump(skb->data, hdr_len, "siit: (orig) ipv4_hdr dump"); -#endif - - if ((ntohs(ih4->frag_off) & IP_MF) == 0 ) - /* it's a case we'll clear MF flag in our last packet */ - flag_last_mf = 1; - - if (ih4->protocol == IPPROTO_UDP) { - if ( (ntohs(ih4->frag_off) & IP_OFFSET) == 0) { - struct udphdr *udp_hdr = (struct udphdr *)((char *)ih4 + hdr_len); - if (!flag_last_mf) { - if (udp_hdr->check == 0) { - /* it's a first fragment with ZERO checksum and we drop packet */ - printk("siit: First fragment of UDP with zero checksum - packet droped\n"); - printk("siit: addr: %x src port: %d dst port: %d\n", - htonl(ih4->saddr), htons(udp_hdr->source), htons(udp_hdr->dest)); - return -1; - } - } - else if (udp_hdr->check == 0) { - /* Calculate UDP checksum only if it's not fragment */ - udp_len = ntohs(udp_hdr->len); - csum = 0; - csum = csum_partial((unsigned char *)udp_hdr, udp_len, csum); - udp_hdr->check = csum_tcpudp_magic(ih4->saddr, ih4->daddr, udp_len, IPPROTO_UDP, csum); - } - } - } - - frag_offset = ntohs(ih4->frag_off) & IP_OFFSET; - - new_id = ih4->id; - - while(1) { - if (rest_len <= FRAG_BUFF_SIZE) { - /* it's last fragmen */ - frag_len = rest_len; /* rest data */ - last_frag = 1; - } - else - frag_len = FRAG_BUFF_SIZE; - - /* copy IP header to buffer */ - memcpy(buff, skb->data, hdr_len); - /* copy data to buffer with len = frag_len */ - memcpy(buff + hdr_len, cur_ptr, frag_len); - - /* set id field in new IPv4 header*/ - new_ih4->id = new_id; - - /* is it last fragmet */ - if(last_frag && flag_last_mf) - /* clear MF flag */ - new_ih4->frag_off = htons(frag_offset & (~IP_MF)); - else - /* set MF flag */ - new_ih4->frag_off = htons(frag_offset | IP_MF); - - /* change packet total length */ - new_ih4->tot_len = htons(frag_len+hdr_len); - - /* rebuild the header checksum (IP needs it) */ - new_ih4->check = 0; - new_ih4->check = ip_fast_csum((unsigned char *)new_ih4,new_ih4->ihl); - - /* Allocate new sk_buff to compose translated packet */ - skb2 = dev_alloc_skb(frag_len+hdr_len+dev->hard_header_len+IP4_IP6_HDR_DIFF+IP6_FRAGMENT_SIZE); - if (!skb2) { - printk(KERN_DEBUG "%s: alloc_skb failure - packet dropped.\n", dev->name); - dev_kfree_skb(skb2); - return -1; - } - /* allocate skb->data portion for IP header len, fragment data len and ether header len - * and copy to head ether header from origin skb - */ - memcpy(skb_put(skb2, frag_len+hdr_len+dev->hard_header_len+IP4_IP6_HDR_DIFF+IP6_FRAGMENT_SIZE), (char *) eth_h, - dev->hard_header_len); - /* correct ether header data, ether protocol field to ETH_P_IPV6 */ - new_eth_h = (struct ethhdr *)skb2->data; - new_eth_h->h_proto = htons(ETH_P_IPV6); - - /* reset the mac header */ - skb_reset_mac_header(skb2); - - /* pull ether header from new skb->data */ - skb_pull(skb2, dev->hard_header_len); - /* set skb protocol to IPV6 */ - skb2->protocol = htons(ETH_P_IPV6); - - /* call translation function */ - if ( ip4_ip6(buff, frag_len+hdr_len, skb2->data, 0) == -1) { - dev_kfree_skb(skb2); - return -1; - } - - /* - * Set needed fields in new sk_buff - */ - skb2->dev = dev; - skb2->ip_summed = CHECKSUM_UNNECESSARY; - skb2->pkt_type = PACKET_HOST; - - /* Add transmit statistic */ - siit_stats(dev)->tx_packets++; - siit_stats(dev)->tx_bytes += skb2->len; - - /* send packet to upper layer */ - netif_rx(skb2); - - /* exit if it was last fragment */ - if (last_frag) - break; - - /* correct current data pointer */ - cur_ptr += frag_len; - /* rest data len */ - rest_len -= frag_len; - /* current fragment offset */ - frag_offset = (frag_offset*8 + frag_len)/8; - } - - return 0; -} -/* - * Transmit a packet (called by the kernel) - * - * siit_xmit(skb, dev) - * - * where - * skb - pointer to struct sk_buff with incomed packet - * dev - pointer to struct device on which packet revieved - * - * Statistic: - * for all incoming packes: - * stats.rx_bytes+=skb->len - * stats.rx_packets++ - * for packets we can't transle: - * stats.tx_errors++ - * device busy: - * stats.tx_errors++ - * for packets we can't allocate sk_buff: - * stats.tx_dropped++ - * for outgoing packes: - * stats.tx_packets++ - * stats.tx_bytes+=skb2->len !!! But we don't set skb2->len !!! - */ - -static int siit_xmit(struct sk_buff *skb, struct net_device *dev) -{ - struct sk_buff *skb2 = NULL;/* pointer to new struct sk_buff for transleded packet */ - struct ethhdr *eth_h; /* pointer to incoming Ether header */ - int len; /* original packets length */ - int new_packet_len; - int skb_delta = 0; /* delta size for allocate new skb */ - char new_packet_buff[2048]; - - /* Check pointer to sk_buff and device structs */ - if (skb == NULL || dev == NULL) - return -EINVAL; - - /* Add receive statistic */ - siit_stats(dev)->rx_bytes += skb->len; - siit_stats(dev)->rx_packets++; - - dev->trans_start = jiffies; - - /* Upper layer (IP) protocol forms sk_buff for outgoing packet - * and sets IP header + Ether header too. IP layer sets outgoing - * device in sk_buff->dev. - * In function (from linux/net/core/dev.c) ther is a call to - * device transmit function (dev->hard_start_xmit): - * - * dev_queue_xmit(struct sk_buff *skb) - * { - * ... - * device *dev = skb->dev; - * ... - * dev->hard_start_xmit(skb, dev); - * ... - * } - * We save pointer to ether header in eth_h and skb_pull ether header - * from data field of skb_buff - */ - - eth_h = (struct ethhdr *)skb->data; /* point to incoming packet Ether Header */ - -#ifdef SIIT_DEBUG - siit_print_dump(skb->data, ETH_HLEN, "siit: eth_hdr dump"); -#endif - - /* Remove hardware header from origin sk_buff */ - skb_pull(skb,dev->hard_header_len); - - /* - * Process IPv4 paket - */ - if (ntohs(skb->protocol) == ETH_P_IP) { - int hdr_len; /* IPv4 header length */ - int data_len; /* IPv4 data length */ - struct iphdr *ih4; /* pointer to IPv4 header */ - struct icmphdr *icmp_hdr; /* point to current ICMPv4 header struct */ - - ih4 = (struct iphdr *)skb->data; /* point to incoming packet's IPv4 header */ - - /* Check IPv4 Total Length */ - if (skb->len != ntohs(ih4->tot_len)) { - PDEBUG("siit_xmit(): Different skb_len %x and ip4 tot_len %x - packet dropped.\n", - skb->len, ih4->tot_len); - siit_stats(dev)->tx_errors++; - dev_kfree_skb(skb); - return 0; - } - - len = skb->len; /* packet's total len */ - hdr_len = (int)(ih4->ihl * 4); /* packet's header len */ - data_len = len - hdr_len; /* packet's data len */ - - /* If DF == 0 */ - if ( (ntohs(ih4->frag_off) & IP_DF) == 0 ) { - /* If result IPv6 packet will be > 1280 - we need to fragment original IPv4 packet - */ - if ( data_len > FRAG_BUFF_SIZE ) { - /* call function that fragment packet and translate to IPv6 each fragment - * and send to upper layer - */ - if ( ip4_fragment(skb, len, hdr_len, dev, eth_h) == -1) { - siit_stats(dev)->tx_errors++; - } - /* Free incoming skb */ - dev_kfree_skb(skb); - /* Device can accept a new packet */ - - return 0; - - } - } - /* If DF == 1 && MF == 0 && Fragment Offset == 0 - * we don't include fragment header - */ - if ( ntohs(ih4->frag_off) == IP_DF ) - skb_delta = IP4_IP6_HDR_DIFF; /* delta is +20 */ - else - skb_delta = IP4_IP6_HDR_DIFF + IP6_FRAGMENT_SIZE; /* delta is +20 and +8 */ - - /* If it's ICMP, check is it included IP packet in it */ - if ( ih4->protocol == IPPROTO_ICMP) { - icmp_hdr = (struct icmphdr *) (skb->data+hdr_len); /* point to ICMPv4 header */ - if ( icmp_hdr->type != ICMP_ECHO && icmp_hdr->type != ICMP_ECHOREPLY) { - /* - * It's ICMP Error that has included IP packet - * we'll add only +20 because we don't include Fragment Header - * into translated included IP packet - */ - skb_delta += IP4_IP6_HDR_DIFF; - } - } - - /* Allocate new sk_buff to compose translated packet */ - skb2 = dev_alloc_skb(len+dev->hard_header_len+skb_delta); - if (!skb2) { - printk(KERN_DEBUG "%s: alloc_skb failure - packet dropped.\n", dev->name); - dev_kfree_skb(skb); - siit_stats(dev)->rx_dropped++; - - return 0; - } - /* allocate skb->data portion = IPv4 packet len + ether header len - * + skb_delta (max = two times (diffirence between IPv4 header and - * IPv6 header + Frag Header), second for included packet, - * and copy to head of skb->data ether header from origin skb - */ - memcpy(skb_put(skb2, len+dev->hard_header_len+skb_delta), (char *)eth_h, dev->hard_header_len); - /* correct ether header data, ether protocol field to ETH_P_IPV6 */ - eth_h = (struct ethhdr *)skb2->data; - eth_h->h_proto = htons(ETH_P_IPV6); - skb_reset_mac_header(skb2); - /* remove ether header from new skb->data, - * NOTE! data will rest, pointer to data and data len will change - */ - skb_pull(skb2,dev->hard_header_len); - /* set skb protocol to IPV6 */ - skb2->protocol = htons(ETH_P_IPV6); - - /* call translation function */ - if (ip4_ip6(skb->data, len, skb2->data, 0) == -1 ) { - dev_kfree_skb(skb); - dev_kfree_skb(skb2); - siit_stats(dev)->rx_errors++; - - return 0; - } - } - /* - * IPv6 paket - */ - else if (ntohs(skb->protocol) == ETH_P_IPV6) { - -#ifdef SIIT_DEBUG - siit_print_dump(skb->data, sizeof(struct ipv6hdr), "siit: (in) ip6_hdr dump"); -#endif - /* packet len = skb->data len*/ - len = skb->len; - - /* call translation function */ - if ((new_packet_len = ip6_ip4(skb->data, len, new_packet_buff, 0)) == -1 ) - { - PDEBUG("siit_xmit(): error translation ipv6->ipv4, packet dropped.\n"); - siit_stats(dev)->rx_dropped++; - goto end; - } - - /* Allocate new sk_buff to compose translated packet */ - skb2 = dev_alloc_skb(new_packet_len + dev->hard_header_len); - if (!skb2) { - printk(KERN_DEBUG "%s: alloc_skb failure, packet dropped.\n", dev->name); - siit_stats(dev)->rx_dropped++; - goto end; - } - memcpy(skb_put(skb2, new_packet_len + dev->hard_header_len), (char *)eth_h, dev->hard_header_len); - eth_h = (struct ethhdr *)skb2->data; - eth_h->h_proto = htons(ETH_P_IP); - skb_reset_mac_header(skb2); - skb_pull(skb2, dev->hard_header_len); - memcpy(skb2->data, new_packet_buff, new_packet_len); - skb2->protocol = htons(ETH_P_IP); - } - else { - PDEBUG("siit_xmit(): unsupported protocol family %x, packet dropped.\n", skb->protocol); - goto end; - } - - /* - * Set needed fields in new sk_buff - */ - skb2->pkt_type = PACKET_HOST; - skb2->dev = dev; - skb2->ip_summed = CHECKSUM_UNNECESSARY; - - /* Add transmit statistic */ - siit_stats(dev)->tx_packets++; - siit_stats(dev)->tx_bytes += skb2->len; - - /* Send packet to upper layer protocol */ - netif_rx(skb2); - -end: - dev_kfree_skb(skb); - - return 0; -} - -static bool header_ops_init = false; -static struct header_ops siit_header_ops ____cacheline_aligned; - -static const struct net_device_ops siit_netdev_ops = { - .ndo_open = siit_open, - .ndo_stop = siit_release, - .ndo_start_xmit = siit_xmit, -}; - -/* - * The init function initialize of the SIIT device.. - * It is invoked by register_netdev() - */ - -static void -siit_init(struct net_device *dev) -{ - ether_setup(dev); /* assign some of the fields */ - random_ether_addr(dev->dev_addr); - - /* - * Assign device function. - */ - dev->netdev_ops = &siit_netdev_ops; - dev->flags |= IFF_NOARP; /* ARP not used */ - dev->tx_queue_len = 10; - - if (!header_ops_init) { - memcpy(&siit_header_ops, dev->header_ops, sizeof(struct header_ops)); - siit_header_ops.cache = NULL; - } - dev->header_ops = &siit_header_ops; -} - -/* - * Finally, the module stuff - */ -static struct net_device *siit_dev = NULL; - -int init_module(void) -{ - int res = -ENOMEM; - int priv_size; - - priv_size = sizeof(struct header_ops); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) - siit_dev = alloc_netdev(priv_size, "siit%d", NET_NAME_UNKNOWN, siit_init); -#else - siit_dev = alloc_netdev(priv_size, "siit%d", siit_init); -#endif - if (!siit_dev) - goto err_alloc; - - res = register_netdev(siit_dev); - if (res) - goto err_register; - - return 0; - -err_register: - free_netdev(siit_dev); -err_alloc: - printk(KERN_ERR "Error creating siit device: %d\n", res); - return res; -} - -void cleanup_module(void) -{ - unregister_netdev(siit_dev); - free_netdev(siit_dev); -} - -MODULE_LICENSE("GPL"); diff --git a/net/siit/src/siit.h b/net/siit/src/siit.h deleted file mode 100644 index 47cf776..0000000 --- a/net/siit/src/siit.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * siit.h -- definitions for the SIIT module - * - * - */ - -/* - * Constants - */ - -/* SIIT_ETH control the name of SIIT interface: - * 0 - interface name is siit0, - * 1 - interface name is ethX. - */ -#define SIIT_ETH 0 - -#define BUFF_SIZE 4096 -#define FRAG_BUFF_SIZE 1232 /* IPv6 max fragment size without IPv6 header - * to fragmanet IPv4 if result IPv6 packet will be > 1280 - */ - -#define TRANSLATED_PREFIX 0x0000ffff /* third byte in IPv4-translated addr prefix */ -#define MAPPED_PREFIX 0x0000ffff /* third byte in IPv4-mapped addr prefix */ - -#define IP4_IP6_HDR_DIFF 20 /* diffirence between IPv4 and IPv6 headers */ -#define IP6_FRAGMENT_SIZE 8 /* size of Fragment Header */ - -/* IPv6 header fields masks */ -#define IP6F_OFF_MASK 0xfff8 /* mask out offset from frag_off */ -#define IP6F_RESERVED_MASK 0x0006 /* reserved bits in frag_off */ -#define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */ - - - -/* - * Macros to help debugging - */ - -#undef PDEBUG /* undef it, just in case */ -#ifdef SIIT_DEBUG -# ifdef __KERNEL__ - /* This one if debugging is on, and kernel space */ -# define PDEBUG(fmt, args...) printk(KERN_DEBUG "siit: " fmt, ## args) -# else - /* This one for user space */ -# define PDEBUG(fmt, args...) fprintf(stderr, fmt, ## args) -# endif -#else -# define PDEBUG(fmt, args...) /* not debugging: nothing */ -#endif - -#undef PDEBUGG -#define PDEBUGG(fmt, args...) - - - - - - - - diff --git a/net/sipgrep/Makefile b/net/sipgrep/Makefile deleted file mode 100644 index 272eefe..0000000 --- a/net/sipgrep/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (C) 2016 Daniel Engberg -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sipgrep -PKG_VERSION:=20160914-devel -PKG_RELEASE:=1 -PKG_MAINTAINER:=Daniel Engberg -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=https://github.com/sipcapture/sipgrep -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=df8a95b066569be92aa38cad01086ea595b36863 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/sipgrep - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libpcap +libpcre +libncursesw - TITLE:=Display and Troubleshoot SIP signaling in CLI - URL:=https://github.com/sipcapture/sipgrep -endef - -define Package/sipgrep/description - SipGrep is a utility for displaying and troubleshooting SIP signaling. -endef - -CONFIGURE_ARGS += \ - --enable-ncurses - -define Package/sipgrep/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sipgrep $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,sipgrep)) diff --git a/net/smartsnmpd/Makefile b/net/smartsnmpd/Makefile deleted file mode 100644 index 9be39cb..0000000 --- a/net/smartsnmpd/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=smartsnmpd -PKG_VERSION:=2014-08-13 -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/credosemi/smartsnmp.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=fb93473d895f058b2d8975d3cfa280ae2a8ae98d -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MIRROR_MD5SUM:= - - -PKG_MAINTAINER:=Xiongfei Guo -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=LICENSE - - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/scons.mk - -define Package/smartsnmpd - SECTION:=net - CATEGORY:=Network - DEPENDS+=+lua +liblua +libubox +libuci-lua +libubus-lua - TITLE:=Smart-SNMP (Agent) - URL:=https://github.com/credosemi/smartsnmp -endef - -define Package/smartsnmpd/description -smartsnmpd is an implementation of SNMP Agent. Its goal is "Easily -writing boring SNMP MIB with Lua". This package add native support -for OpenWrt. Include using ubus and uci to get system info/status. -And, it use libubox/uloop as low level event-driven library. -endef - -SCONS_OPTIONS += --transport=uloop - -define Build/Configure - (cd $(PKG_BUILD_DIR); \ - $(SCONS_VARS) \ - scons \ - prefix=/usr \ - $(SCONS_OPTIONS) \ - ) -endef - -define Package/smartsnmpd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/smartsnmpd $(1)/usr/sbin/smartsnmpd - - $(INSTALL_DIR) $(1)/usr/lib/lua/smartsnmp - $(INSTALL_BIN) $(PKG_BUILD_DIR)/build/smartsnmp/core.so $(1)/usr/lib/lua/smartsnmp/core.so - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lualib/smartsnmp/*.lua $(1)/usr/lib/lua/smartsnmp/ - - $(INSTALL_DIR) $(1)/usr/lib/lua/smartsnmp/mibs - $(INSTALL_BIN) ./files/mibs/*.lua $(1)/usr/lib/lua/smartsnmp/mibs/ - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/smartsnmpd.conf $(1)/etc/config/smartsnmpd - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/smartsnmpd.init $(1)/etc/init.d/smartsnmpd -endef - -$(eval $(call BuildPackage,smartsnmpd)) - diff --git a/net/smartsnmpd/files/mibs/dummy.lua b/net/smartsnmpd/files/mibs/dummy.lua deleted file mode 100644 index e49ca68..0000000 --- a/net/smartsnmpd/files/mibs/dummy.lua +++ /dev/null @@ -1,24 +0,0 @@ --- --- This file is part of SmartSNMP --- Copyright (C) 2014, Credo Semiconductor Inc. --- --- 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. --- - -local mib = require "smartsnmp" - -local dummy = {} - -return dummy diff --git a/net/smartsnmpd/files/mibs/interfaces.lua b/net/smartsnmpd/files/mibs/interfaces.lua deleted file mode 100644 index 01cea6a..0000000 --- a/net/smartsnmpd/files/mibs/interfaces.lua +++ /dev/null @@ -1,125 +0,0 @@ --- --- This file is part of SmartSNMP --- Copyright (C) 2014, Credo Semiconductor Inc. --- --- 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. --- - -local mib = require "smartsnmp" -require "ubus" -require "uloop" - -uloop.init() - -local conn = ubus.connect() -if not conn then - error("Failed to connect to ubusd") -end - -local if_cache = {} -local if_status_cache = {} -local if_index_cache = {} - -local last_load_time = os.time() -local function need_to_reload() - if os.time() - last_load_time >= 3 then - last_load_time = os.time() - return true - else - return false - end -end - -local function load_config() - if need_to_reload() == true then - if_cache = {} - if_status_cache = {} - if_index_cache = {} - - -- if description - for k, v in pairs(conn:call("network.device", "status", {})) do - if_status_cache[k] = {} - end - - for name_ in pairs(if_status_cache) do - for k, v in pairs(conn:call("network.device", "status", { name = name_ })) do - if k == 'mtu' then - if_status_cache[name_].mtu = v - elseif k == 'macaddr' then - if_status_cache[name_].macaddr = v - elseif k == 'up' then - if v == true then - if_status_cache[name_].up = 1 - else - if_status_cache[name_].up = 2 - end - elseif k == 'statistics' then - for item, stat in pairs(v) do - if item == 'rx_bytes' then - if_status_cache[name_].in_octet = stat - elseif item == 'tx_bytes' then - if_status_cache[name_].out_octet = stat - elseif item == 'rx_errors' then - if_status_cache[name_].in_errors = stat - elseif item == 'tx_errors' then - if_status_cache[name_].out_errors = stat - elseif item == 'rx_dropped' then - if_status_cache[name_].in_discards = stat - elseif item == 'tx_dropped' then - if_status_cache[name_].out_discards = stat - end - end - end - end - end - - if_cache['desc'] = {} - for name, status in pairs(if_status_cache) do - table.insert(if_cache['desc'], name) - for k, v in pairs(status) do - if if_cache[k] == nil then if_cache[k] = {} end - table.insert(if_cache[k], v) - end - end - - -- if index - for i in ipairs(if_cache['desc']) do - table.insert(if_index_cache, i) - end - end -end - -mib.module_methods.or_table_reg("1.3.6.1.2.1.2", "The MIB module for managing Interfaces implementations") - -local ifGroup = { - [1] = mib.ConstInt(function () load_config() return #if_index_cache end), - [2] = { - [1] = { - [1] = mib.ConstIndex(function () load_config() return if_index_cache end), - [2] = mib.ConstString(function (i) load_config() return if_cache['desc'][i] end), - [4] = mib.ConstInt(function (i) load_config() return if_cache['mtu'][i] end), - [6] = mib.ConstString(function (i) load_config() return if_cache['macaddr'][i] end), - [8] = mib.ConstInt(function (i) load_config() return if_cache['up'][i] end), - [10] = mib.ConstCount(function (i) load_config() return if_cache['in_octet'][i] end), - [13] = mib.ConstCount(function (i) load_config() return if_cache['in_discards'][i] end), - [14] = mib.ConstCount(function (i) load_config() return if_cache['in_errors'][i] end), - [16] = mib.ConstCount(function (i) load_config() return if_cache['out_octet'][i] end), - [19] = mib.ConstCount(function (i) load_config() return if_cache['out_discards'][i] end), - [20] = mib.ConstCount(function (i) load_config() return if_cache['out_errors'][i] end), - } - } -} - -return ifGroup diff --git a/net/smartsnmpd/files/mibs/system.lua b/net/smartsnmpd/files/mibs/system.lua deleted file mode 100644 index 5b0a4af..0000000 --- a/net/smartsnmpd/files/mibs/system.lua +++ /dev/null @@ -1,176 +0,0 @@ --- --- This file is part of SmartSNMP --- Copyright (C) 2014, Credo Semiconductor Inc. --- --- 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. --- - -local mib = require "smartsnmp" -local uci = require "uci" - --- System config -local context = uci.cursor("/etc/config", "/tmp/.uci") - --- scalar index -local sysDesc = 1 -local sysObjectID = 2 -local sysUpTime = 3 -local sysContact = 4 -local sysName = 5 -local sysLocation = 6 -local sysServices = 7 -local sysORLastChange = 8 - --- table index -local sysORTable = 9 - --- entry index -local sysOREntry = 1 - --- list index -local sysORIndex = 1 -local sysORID = 2 -local sysORDesc = 3 -local sysORUpTime = 4 - -local startup_time = 0 -local or_last_changed_time = 0 - -local function mib_system_startup(time) - startup_time = time - or_last_changed_time = time -end - -mib_system_startup(os.time()) - -local sysGroup = {} -local or_oid_cache = {} -local or_index_cache = {} -local or_table_cache = {} - -local or_table_reg = function (oid, desc) - local row = {} - row['oid'] = {} - for i in string.gmatch(oid, "%d") do - table.insert(row['oid'], tonumber(i)) - end - row['desc'] = desc - row['uptime'] = os.time() - table.insert(or_table_cache, row) - - or_last_changed_time = os.time() - - or_oid_cache[oid] = #or_table_cache - - or_index_cache = {} - for i in ipairs(or_table_cache) do - table.insert(or_index_cache, i) - end -end - -local or_table_unreg = function (oid) - local or_idx = or_oid_cache[oid] - - if or_table_cache[or_idx] ~= nil then - table.remove(or_table_cache, or_idx) - or_last_changed_time = os.time() - - or_index_cache = {} - for i in ipairs(or_table_cache) do - table.insert(or_index_cache, i) - end - end -end - -local last_load_time = os.time() -local function need_to_reload() - if os.difftime(os.time(), last_load_time) < 3 then - return false - else - last_load_time = os.time() - return true - end -end - -local function load_config() - if need_to_reload() == true then - context:load("smartsnmpd") - end -end - -context:load("smartsnmpd") - -local sysMethods = { - ["or_table_reg"] = or_table_reg, - ["or_table_unreg"] = or_table_unreg -} -mib.module_method_register(sysMethods) - -sysGroup = { - rocommunity = 'public', - [sysDesc] = mib.ConstString(function () load_config() return mib.sh_call("uname -a") end), - [sysObjectID] = mib.ConstOid(function () - load_config() - local oid - local objectid - context:foreach("smartsnmpd", "smartsnmpd", function (s) - objectid = s.objectid - end) - if objectid ~= nil then - oid = {} - for i in string.gmatch(objectid, "%d+") do - table.insert(oid, tonumber(i)) - end - end - return oid - end), - [sysUpTime] = mib.ConstTimeticks(function () load_config() return os.difftime(os.time(), startup_time) * 100 end), - [sysContact] = mib.ConstString(function () - load_config() - local contact - context:foreach("smartsnmpd", "smartsnmpd", function (s) - contact = s.contact - end) - return contact - end), - [sysName] = mib.ConstString(function () load_config() return mib.sh_call("uname -n") end), - [sysLocation] = mib.ConstString(function () - load_config() - local location - context:foreach("smartsnmpd", "smartsnmpd", function (s) - location = s.location - end) - return location - end), - [sysServices] = mib.ConstInt(function () - load_config() - local services - context:foreach("smartsnmpd", "smartsnmpd", function (s) - services = tonumber(s.services) - end) - return services - end), - [sysORLastChange] = mib.ConstTimeticks(function () load_config() return os.difftime(os.time(), or_last_changed_time) * 100 end), - [sysORTable] = { - [sysOREntry] = { - [sysORIndex] = mib.UnaIndex(function () load_config() return or_index_cache end), - [sysORID] = mib.ConstOid(function (i) load_config() return or_table_cache[i].oid end), - [sysORDesc] = mib.ConstString(function (i) load_config() return or_table_cache[i].desc end), - [sysORUpTime] = mib.ConstTimeticks(function (i) load_config() return os.difftime(os.time(), or_table_cache[i].uptime) * 100 end), - } - } -} - -return sysGroup diff --git a/net/smartsnmpd/files/smartsnmpd.conf b/net/smartsnmpd/files/smartsnmpd.conf deleted file mode 100644 index aace5a6..0000000 --- a/net/smartsnmpd/files/smartsnmpd.conf +++ /dev/null @@ -1,21 +0,0 @@ -config smartsnmpd - option port '161' - option ro_community 'public' - option rw_community 'private' - option mib_module_path 'mibs' - option objectid '1.2.3.4' - option contact 'Me ' - option location 'Shanghai' - option services '72' - -config smartsnmpd_module - option oid "1.3.6.1.2.1.1" - option module 'system' - -config smartsnmpd_module - option oid "1.3.6.1.2.1.2" - option module 'interfaces' - -config smartsnmpd_module - option oid "1.3.6.1.1" - option module 'dummy' diff --git a/net/smartsnmpd/files/smartsnmpd.init b/net/smartsnmpd/files/smartsnmpd.init deleted file mode 100755 index dbe3af8..0000000 --- a/net/smartsnmpd/files/smartsnmpd.init +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=97 - -USE_PROCD=1 -PROG=/usr/sbin/smartsnmpd -CONFIGFILE=/etc/smartsnmpd.conf - -smartsnmpd_mib_module() { - local cfg="$1" - config_get OID "$cfg" oid - config_get MODULE "$cfg" module - echo " ['$OID'] = '$MODULE'," >> $CONFIGFILE -} - -start_service() { - include /lib/functions - - config_load smartsnmpd - - procd_open_instance - procd_set_param command $PROG -c $CONFIGFILE - procd_set_param file $CONFIGFILE - procd_set_param respawn - procd_close_instance - - # before we can call xappend - mkdir -p $(dirname $CONFIGFILE) - - echo "-- auto-generated config file from /etc/config/smartsnmpd" > $CONFIGFILE - - config_get PORT smartsnmpd port 161 - echo "port = $PORT" >> $CONFIGFILE - - config_get RO_COMMUNITY smartsnmpd ro_community 'public' - config_get RW_COMMUNITY smartsnmpd rw_community 'private' - echo "ro_community = '$RO_COMMUNITY'" >> $CONFIGFILE - echo "rw_community = '$RW_COMMUNITY'" >> $CONFIGFILE - - config_get MIB_MODULE_PATH smartsnmpd mib_module_path '/usr/lib/lua/smartsnmp/mibs/' - echo "mib_module_path = '$MIB_MODULE_PATH'" >> $CONFIGFILE - - echo "mib_modules = {" >> $CONFIGFILE - config_foreach smartsnmpd_mib_module smartsnmpd_module - echo "}" >> $CONFIGFILE -} diff --git a/net/sngrep/Makefile b/net/sngrep/Makefile deleted file mode 100644 index e1b2c9a..0000000 --- a/net/sngrep/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (C) 2016 Daniel Engberg -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sngrep -PKG_VERSION=1.4.2 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Daniel Engberg -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=https://github.com/irontec/sngrep -PKG_SOURCE_SUBDIR=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=da791185cabeea5a6fcc7372157340b2d1369df7 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_MD5SUM:=2cc640e065f33cae4a3a8e14bdc740e49269cd850eee2ffa9eb821427caaa371 - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/sngrep - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libpcap +libpthread +libpcre +libncursesw - TITLE:=Display SIP calls message flows - URL:=https://github.com/irontec/sngrep -endef - -define Package/sngrep/description - sngrep is a tool for displaying SIP calls message flows from terminal. - It supports live capture to display realtime SIP packets and can also be used as PCAP viewer. -endef - -CONFIGURE_ARGS += \ - --with-pcre \ - --enable-unicode \ - -define Package/sngrep/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sngrep $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,sngrep)) diff --git a/net/snort/Config.in b/net/snort/Config.in deleted file mode 100644 index a79e51d..0000000 --- a/net/snort/Config.in +++ /dev/null @@ -1,11 +0,0 @@ -menu "Configuration" - depends on PACKAGE_snort - -config SNORT_LZMA - bool "Enable LZMA support" - default n - help - This option enables LZMA decompression. - Disabled by default. - -endmenu diff --git a/net/snort/Makefile b/net/snort/Makefile deleted file mode 100644 index d37829e..0000000 --- a/net/snort/Makefile +++ /dev/null @@ -1,156 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=snort -PKG_VERSION:=2.9.7.2 -PKG_RELEASE:=4 - -PKG_LICENSE:=GPL-2.0 -PKG_MAINTAINER:=Luka Perkov - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \ - @SF/$(PKG_NAME) -PKG_MD5SUM:=b01e9964827394c39194a0147bc15705 - -PKG_BUILD_DEPENDS:=librpc -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION) -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/snort - SUBMENU:=Firewall - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libdaq +libdnet +libopenssl +libpcap +libpcre +libpthread +libuuid +zlib +SNORT_LZMA:liblzma - TITLE:=Lightweight Network Intrusion Detection System - URL:=http://www.snort.org/ - MENU:=1 -endef - -define Package/snort/description - Snort is an open source network intrusion detection and prevention system. - It is capable of performing real-time traffic analysis, alerting, blocking - and packet logging on IP networks. It utilizes a combination of protocol - analysis and pattern matching in order to detect anomalies, misuse and - attacks. -endef - -define Package/snort/config - source "$(SOURCE)/Config.in" -endef - -CONFIGURE_ARGS += \ - --prefix="/usr" \ - --enable-flexresp \ - --with-dnet-includes="$(STAGING_DIR)/usr/include" \ - --with-dnet-libraries="$(STAGING_DIR)/usr/lib" \ - --with-libpcap-includes="$(STAGING_DIR)/usr/include" \ - --with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \ - --with-libpcre-includes="$(STAGING_DIR)/usr/include" \ - --with-libpcre-libraries="$(STAGING_DIR)/usr/lib" \ - --with-daq-includes="$(STAGING_DIR)/usr/include" \ - --with-daq-libraries="$(STAGING_DIR)/usr/lib" \ - --disable-static-daq - -ifeq ($(CONFIG_SNORT_LZMA),) -CONFIGURE_ARGS += \ - --disable-lzma -endif - -CONFIGURE_VARS += \ - PATH="$(STAGING_DIR)/usr/lib/libnet-1.0.x/bin:$$$$PATH" - -MAKE_FLAGS += \ - extra_incl="" - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR)/usr/include/snort/dynamic_preproc - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/snort/dynamic_preproc/* \ - $(STAGING_DIR)/usr/include/snort/dynamic_preproc/ - $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/snort/dynamic_preproc - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/snort/dynamic_preproc/* \ - $(STAGING_DIR)/usr/lib/snort/dynamic_preproc/ - $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/snort_dynamicengine - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/snort_dynamicengine/* \ - $(STAGING_DIR)/usr/lib/snort_dynamicengine/ - $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/snort_dynamicpreprocessor - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/snort_dynamicpreprocessor/* \ - $(STAGING_DIR)/usr/lib/snort_dynamicpreprocessor/ -endef - -define Package/snort/conffiles -/etc/config/snort -/etc/snort/snort.conf -endef - -define Package/snort/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/snort \ - $(1)/usr/bin/snort - - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/u2{boat,spewfoo} \ - $(1)/usr/bin - - $(INSTALL_DIR) $(1)/usr/lib/snort_dynamicengine - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/snort_dynamicengine/libsf_engine.so* \ - $(1)/usr/lib/snort_dynamicengine/ - - $(INSTALL_DIR) $(1)/usr/lib/snort_dynamicpreprocessor - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/snort_dynamicpreprocessor/libsf*.so* \ - $(1)/usr/lib/snort_dynamicpreprocessor/ - - $(INSTALL_DIR) $(1)/etc/snort - $(INSTALL_CONF) \ - $(PKG_BUILD_DIR)/etc/snort.conf \ - $(1)/etc/snort/ - $(INSTALL_CONF) \ - $(PKG_BUILD_DIR)/etc/attribute_table.dtd \ - $(1)/etc/snort/ - $(INSTALL_CONF) \ - $(PKG_BUILD_DIR)/etc/classification.config \ - $(1)/etc/snort/ - $(INSTALL_CONF) \ - $(PKG_BUILD_DIR)/etc/gen-msg.map \ - $(1)/etc/snort/ - $(INSTALL_CONF) \ - $(PKG_BUILD_DIR)/etc/reference.config \ - $(1)/etc/snort/ - $(INSTALL_CONF) \ - $(PKG_BUILD_DIR)/etc/unicode.map \ - $(1)/etc/snort/ - - $(INSTALL_DIR) $(1)/etc/snort/preproc_rules - $(INSTALL_CONF) \ - $(PKG_BUILD_DIR)/preproc_rules/*.rules \ - $(1)/etc/snort/preproc_rules/ - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) \ - ./files/snort.init \ - $(1)/etc/init.d/snort - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) \ - ./files/snort.config \ - $(1)/etc/config/snort -endef - -$(eval $(call BuildPackage,snort)) - diff --git a/net/snort/files/snort.config b/net/snort/files/snort.config deleted file mode 100644 index cda7441..0000000 --- a/net/snort/files/snort.config +++ /dev/null @@ -1,3 +0,0 @@ -config snort 'snort' - option config_file '/etc/snort/snort.conf' - option interface 'lo' diff --git a/net/snort/files/snort.init b/net/snort/files/snort.init deleted file mode 100644 index fcdb090..0000000 --- a/net/snort/files/snort.init +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=90 -STOP=10 - -USE_PROCD=1 -PROG=/usr/bin/snort - -validate_snort_section() { - uci_validate_section snort snort "${1}" \ - 'config_file:string' \ - 'interface:string' -} - -start_service() { - local config_file interface - - validate_snort_section snort || { - echo "validation failed" - return 1 - } - - procd_open_instance - procd_set_param command $PROG "-q" "--daq-dir" "/usr/lib/daq/" "-i" "$interface" "-s" "-N" - procd_set_param file $CONFIGFILE - procd_set_param respawn - procd_close_instance -} - -stop_service() -{ - service_stop ${PROG} -} - -service_triggers() -{ - procd_add_reload_trigger "snort" - procd_add_validation validate_snort_section -} diff --git a/net/snort/patches/001-compile.patch b/net/snort/patches/001-compile.patch deleted file mode 100644 index 06d283a..0000000 --- a/net/snort/patches/001-compile.patch +++ /dev/null @@ -1,105 +0,0 @@ ---- /dev/null -+++ b/acinclude.m4 -@@ -0,0 +1 @@ -+sinclude(m4/libprelude.m4) ---- a/configure.in -+++ b/configure.in -@@ -285,21 +285,7 @@ AC_CHECK_TYPES([int8_t,int16_t,int32_t,i - AC_CHECK_TYPES([boolean]) - - # In case INADDR_NONE is not defined (like on Solaris) --have_inaddr_none="no" --AC_MSG_CHECKING([for INADDR_NONE]) --AC_RUN_IFELSE( --[AC_LANG_PROGRAM( --[[ --#include --#include --#include --]], --[[ -- if (inet_addr("10,5,2") == INADDR_NONE); -- return 0; --]])], --[have_inaddr_none="yes"], --[have_inaddr_none="no"]) -+have_inaddr_none="yes" - AC_MSG_RESULT($have_inaddr_none) - if test "x$have_inaddr_none" = "xno"; then - AC_DEFINE([INADDR_NONE],[-1],[For INADDR_NONE definition]) -@@ -433,16 +419,7 @@ if test "x$LPCAP" = "xno"; then - fi - - AC_MSG_CHECKING([for pcap_lex_destroy]) --AC_RUN_IFELSE( --[AC_LANG_PROGRAM( --[[ --#include --]], --[[ -- pcap_lex_destroy(); --]])], --[have_pcap_lex_destroy="yes"], --[have_pcap_lex_destroy="no"]) -+have_pcap_lex_destroy="yes" - AC_MSG_RESULT($have_pcap_lex_destroy) - if test "x$have_pcap_lex_destroy" = "xyes"; then - AC_DEFINE([HAVE_PCAP_LEX_DESTROY],[1],[Can cleanup lex buffer stack created by pcap bpf filter]) -@@ -727,54 +704,21 @@ if test "x$ac_cv_func_daq_dp_add_dc" = " - - fi - --AC_MSG_CHECKING([for daq address space ID]) --AC_RUN_IFELSE( --[AC_LANG_PROGRAM( --[[ --#include --]], --[[ -- DAQ_PktHdr_t hdr; -- hdr.address_space_id = 0; --]])], --[have_daq_address_space_id="yes"], --[have_daq_address_space_id="no"]) -+have_daq_address_space_id="yes" - AC_MSG_RESULT($have_daq_address_space_id) - if test "x$have_daq_address_space_id" = "xyes"; then - AC_DEFINE([HAVE_DAQ_ADDRESS_SPACE_ID],[1], - [DAQ version supports address space ID in header.]) - fi - --AC_MSG_CHECKING([for daq flow ID]) --AC_RUN_IFELSE( --[AC_LANG_PROGRAM( --[[ --#include --]], --[[ -- DAQ_PktHdr_t hdr; -- hdr.flow_id = 0; --]])], --[have_daq_flow_id="yes"], --[have_daq_flow_id="no"]) -+have_daq_flow_id="yes" - AC_MSG_RESULT($have_daq_flow_id) - if test "x$have_daq_flow_id" = "xyes"; then - AC_DEFINE([HAVE_DAQ_FLOW_ID],[1], - [DAQ version supports flow ID in header.]) - fi - --AC_MSG_CHECKING([for DAQ_VERDICT_RETRY]) --AC_RUN_IFELSE( --[AC_LANG_PROGRAM( --[[ --#include --]], --[[ -- DAQ_Verdict verdict; -- verdict = DAQ_VERDICT_RETRY; --]])], --[have_daq_verdict_retry="yes"], --[have_daq_verdict_retry="no"]) -+have_daq_verdict_retry="yes" - AC_MSG_RESULT($have_daq_verdict_retry) - if test "x$have_daq_verdict_retry" = "xyes"; then - AC_DEFINE([HAVE_DAQ_VERDICT_RETRY],[1], diff --git a/net/snort/patches/100-autoconf-fixes.patch b/net/snort/patches/100-autoconf-fixes.patch deleted file mode 100644 index 414c0c1..0000000 --- a/net/snort/patches/100-autoconf-fixes.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/configure.in -+++ b/configure.in -@@ -11,14 +11,6 @@ AM_INIT_AUTOMAKE(snort,2.9.7.2) - NO_OPTIMIZE="no" - ADD_WERROR="no" - --# Test for -Werror and sed it out for now since some of the auto tests, --# for example AC_CHECK_LIB, will fail because of --# warning: conflicting types for built-in function --if eval "echo $CFLAGS | grep -e -Werror"; then -- CFLAGS=`echo $CFLAGS | sed -e "s/-Werror//g"` -- ADD_WERROR="yes" --fi -- - # Disable annoying practice of recursively re-running the autotools - AM_MAINTAINER_MODE - AC_PROG_CC_STDC diff --git a/net/socat/Makefile b/net/socat/Makefile deleted file mode 100644 index ede942c..0000000 --- a/net/socat/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=socat -PKG_VERSION:=1.7.3.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download -PKG_MD5SUM:=d2da659540c38139f388e9437bfaae16bb458d174d056cb3228432a8f489fbaa - -PKG_MAINTAINER:= Ted Hess - -PKG_LICENSE:=GPL-2.0 OpenSSL -PKG_LICENSE_FILES:=COPYING COPYING.OpenSSL - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/socat - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libpthread +librt +SOCAT_SSL:libopenssl - TITLE:=A multipurpose relay (SOcket CAT) - URL:=http://www.dest-unreach.org/socat/ -endef - -define Package/socat/description - SoCat (for SOcket CAT) establishes two bidirectional byte streams and - transfers data between them. - Data channels may be files, pipes, devices (terminal or modem, etc.), or - sockets (Unix, IPv4, IPv6, raw, UDP, TCP, SSL). It provides forking, - logging and tracing, different modes for interprocess communication and - many more options. -endef - -define Package/socat/config -config SOCAT_SSL - bool "SSL support" - depends on PACKAGE_socat - default n - help - Implements SSL support in socat (using libopenssl). -endef - -define Package/socat/conffiles -/etc/config/socat -endef - -CONFIGURE_ARGS += \ - --disable-libwrap \ - --disable-readline \ - --enable-termios - -ifneq ($(CONFIG_SOCAT_SSL),y) - CONFIGURE_ARGS+= --disable-openssl -endif - -CONFIGURE_VARS += \ - sc_cv_termios_ispeed="no" \ - sc_cv_sys_crdly_shift=9 \ - sc_cv_sys_tabdly_shift=11 \ - sc_cv_sys_csize_shift=4 - -TARGET_CFLAGS += \ - -include stddef.h - -define Package/socat/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/socat.config $(1)/etc/config/socat - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/socat.init $(1)/etc/init.d/socat -endef - -$(eval $(call BuildPackage,socat)) diff --git a/net/socat/files/socat.config b/net/socat/files/socat.config deleted file mode 100644 index 7df6358..0000000 --- a/net/socat/files/socat.config +++ /dev/null @@ -1,5 +0,0 @@ -# forward port 8000 on IPv6 to IPv4 host port 80 -# change enable to '1' to use this example -config socat 'http' - option enable '0' - option SocatOptions '-d -d TCP6-LISTEN:8000,fork TCP4:192.168.1.20:80' diff --git a/net/socat/files/socat.init b/net/socat/files/socat.init deleted file mode 100644 index 379dc07..0000000 --- a/net/socat/files/socat.init +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008-2014 OpenWrt.org - -START=99 -STOP=99 - -USE_PROCD=1 -PROG=/usr/bin/socat -NAME=socat - -validate_section_socat() -{ - uci_validate_section socat socat "${1}" \ - 'enable:bool:1' \ - 'SocatOptions:string' - return $? -} - -socat_instance() -{ - local SocatOptions enable - - validate_section_socat "${1}" || { - echo "validation failed" - return 1 - } - - [ "${enable}" = "0" ] && return 1 - - procd_open_instance - procd_set_param command "$PROG" - procd_append_param command ${SocatOptions} - procd_close_instance -} - -start_service () { - config_load "${NAME}" - config_foreach socat_instance socat -} diff --git a/net/socat/patches/100-musl-compat.patch b/net/socat/patches/100-musl-compat.patch deleted file mode 100644 index ae5c8d0..0000000 --- a/net/socat/patches/100-musl-compat.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/sysincludes.h -+++ b/sysincludes.h -@@ -79,6 +79,9 @@ - #endif - #if HAVE_NETDB_H && (_WITH_IP4 || _WITH_IP6) - #include /* struct hostent, gethostbyname() */ -+#if !(__UCLIBC__ || __GLIBC__) -+#define NETDB_INTERNAL -1 -+#endif - #endif - #if HAVE_SYS_UN_H && WITH_UNIX - #include /* struct sockaddr_un, unix domain sockets */ -@@ -139,8 +142,10 @@ - #include - #endif - #if HAVE_NETINET_IF_ETHER_H -+#if defined(__UCLIBC__) || defined(__GLIBC__) - #include - #endif -+#endif - #if HAVE_LINUX_IF_TUN_H - #include - #endif diff --git a/net/socat/patches/110-drop_egd_sslv3_support.patch b/net/socat/patches/110-drop_egd_sslv3_support.patch deleted file mode 100644 index f81f2eb..0000000 --- a/net/socat/patches/110-drop_egd_sslv3_support.patch +++ /dev/null @@ -1,184 +0,0 @@ ---- a/sslcls.c -+++ b/sslcls.c -@@ -55,6 +55,7 @@ const SSL_METHOD *sycSSLv2_server_method - } - #endif - -+#ifdef HAVE_SSLv3_client_method - const SSL_METHOD *sycSSLv3_client_method(void) { - const SSL_METHOD *result; - Debug("SSLv3_client_method()"); -@@ -62,7 +63,9 @@ const SSL_METHOD *sycSSLv3_client_method - Debug1("SSLv3_client_method() -> %p", result); - return result; - } -+#endif - -+#ifdef HAVE_SSLv3_server_method - const SSL_METHOD *sycSSLv3_server_method(void) { - const SSL_METHOD *result; - Debug("SSLv3_server_method()"); -@@ -70,6 +73,7 @@ const SSL_METHOD *sycSSLv3_server_method - Debug1("SSLv3_server_method() -> %p", result); - return result; - } -+#endif - - const SSL_METHOD *sycSSLv23_client_method(void) { - const SSL_METHOD *result; -@@ -331,14 +335,6 @@ void sycSSL_free(SSL *ssl) { - return; - } - --int sycRAND_egd(const char *path) { -- int result; -- Debug1("RAND_egd(\"%s\")", path); -- result = RAND_egd(path); -- Debug1("RAND_egd() -> %d", result); -- return result; --} -- - DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u) { - DH *result; - Debug4("PEM_read_bio_DHparams(%p, %p, %p, %p)", -@@ -375,7 +371,7 @@ int sycFIPS_mode_set(int onoff) { - } - #endif /* WITH_FIPS */ - --#if OPENSSL_VERSION_NUMBER >= 0x00908000L -+#if (OPENSSL_VERSION_NUMBER >= 0x00908000L) && !defined(OPENSSL_NO_COMP) - const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl) { - const COMP_METHOD *result; - Debug1("SSL_get_current_compression(%p)", ssl); ---- a/sslcls.h -+++ b/sslcls.h -@@ -47,7 +47,6 @@ X509 *sycSSL_get_peer_certificate(SSL *s - int sycSSL_shutdown(SSL *ssl); - void sycSSL_CTX_free(SSL_CTX *ctx); - void sycSSL_free(SSL *ssl); --int sycRAND_egd(const char *path); - - DH *sycPEM_read_bio_DHparams(BIO *bp, DH **x, pem_password_cb *cb, void *u); - -@@ -55,7 +54,7 @@ BIO *sycBIO_new_file(const char *filenam - - int sycFIPS_mode_set(int onoff); - --#if OPENSSL_VERSION_NUMBER >= 0x00908000L -+#if (OPENSSL_VERSION_NUMBER >= 0x00908000L) && !defined(OPENSSL_NO_COMP) - const COMP_METHOD *sycSSL_get_current_compression(SSL *ssl); - const COMP_METHOD *sycSSL_get_current_expansion(SSL *ssl); - const char *sycSSL_COMP_get_name(const COMP_METHOD *comp); -@@ -98,7 +97,6 @@ const char *sycSSL_COMP_get_name(const C - #define sycSSL_shutdown(s) SSL_shutdown(s) - #define sycSSL_CTX_free(c) SSL_CTX_free(c) - #define sycSSL_free(s) SSL_free(s) --#define sycRAND_egd(p) RAND_egd(p) - - #define sycPEM_read_bio_DHparams(b,x,p,u) PEM_read_bio_DHparams(b,x,p,u) - ---- a/test.sh -+++ b/test.sh -@@ -576,9 +576,6 @@ filloptionvalues() { - *,dh,*) OPTS=$(echo "$OPTS" |sed "s/,dh,/,dh=/tmp/hugo,/g");; - esac - case "$OPTS" in -- *,egd,*) OPTS=$(echo "$OPTS" |sed "s/,egd,/,egd=/tmp/hugo,/g");; -- esac -- case "$OPTS" in - *,compress,*) OPTS=$(echo "$OPTS" |sed "s/,compress,/,compress=none,/g");; - esac - # PROXY ---- a/xio-openssl.c -+++ b/xio-openssl.c -@@ -108,7 +108,6 @@ const struct optdesc opt_openssl_key - const struct optdesc opt_openssl_dhparam = { "openssl-dhparam", "dh", OPT_OPENSSL_DHPARAM, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC }; - const struct optdesc opt_openssl_cafile = { "openssl-cafile", "cafile", OPT_OPENSSL_CAFILE, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC }; - const struct optdesc opt_openssl_capath = { "openssl-capath", "capath", OPT_OPENSSL_CAPATH, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC }; --const struct optdesc opt_openssl_egd = { "openssl-egd", "egd", OPT_OPENSSL_EGD, GROUP_OPENSSL, PH_SPEC, TYPE_FILENAME, OFUNC_SPEC }; - const struct optdesc opt_openssl_pseudo = { "openssl-pseudo", "pseudo", OPT_OPENSSL_PSEUDO, GROUP_OPENSSL, PH_SPEC, TYPE_BOOL, OFUNC_SPEC }; - #if OPENSSL_VERSION_NUMBER >= 0x00908000L - const struct optdesc opt_openssl_compress = { "openssl-compress", "compress", OPT_OPENSSL_COMPRESS, GROUP_OPENSSL, PH_SPEC, TYPE_STRING, OFUNC_SPEC }; -@@ -147,7 +146,7 @@ int xio_reset_fips_mode(void) { - static void openssl_conn_loginfo(SSL *ssl) { - Notice1("SSL connection using %s", SSL_get_cipher(ssl)); - --#if OPENSSL_VERSION_NUMBER >= 0x00908000L -+#if (OPENSSL_VERSION_NUMBER >= 0x00908000L) && !defined(OPENSSL_NO_COMP) - { - const COMP_METHOD *comp, *expansion; - -@@ -722,7 +721,6 @@ int - char *opt_dhparam = NULL; /* file name of DH params */ - char *opt_cafile = NULL; /* certificate authority file */ - char *opt_capath = NULL; /* certificate authority directory */ -- char *opt_egd = NULL; /* entropy gathering daemon socket path */ - #if OPENSSL_VERSION_NUMBER >= 0x00908000L - char *opt_compress = NULL; /* compression method */ - #endif -@@ -741,7 +739,6 @@ int - retropt_string(opts, OPT_OPENSSL_CAPATH, &opt_capath); - retropt_string(opts, OPT_OPENSSL_KEY, &opt_key); - retropt_string(opts, OPT_OPENSSL_DHPARAM, &opt_dhparam); -- retropt_string(opts, OPT_OPENSSL_EGD, &opt_egd); - retropt_bool(opts,OPT_OPENSSL_PSEUDO, &opt_pseudo); - #if OPENSSL_VERSION_NUMBER >= 0x00908000L - retropt_string(opts, OPT_OPENSSL_COMPRESS, &opt_compress); -@@ -877,10 +874,6 @@ int - } - } - -- if (opt_egd) { -- sycRAND_egd(opt_egd); -- } -- - if (opt_pseudo) { - long int randdata; - /* initialize libc random from actual microseconds */ -@@ -1105,7 +1098,7 @@ static int openssl_SSL_ERROR_SSL(int lev - if (e == ((ERR_LIB_RAND<<24)| - (RAND_F_SSLEAY_RAND_BYTES<<12)| - (RAND_R_PRNG_NOT_SEEDED)) /*0x24064064*/) { -- Error("too few entropy; use options \"egd\" or \"pseudo\""); -+ Error("too few entropy; use option \"pseudo\""); - stat = STAT_NORETRY; - } else { - Msg2(level, "%s(): %s", funcname, ERR_error_string(e, buf)); ---- a/xio-openssl.h -+++ b/xio-openssl.h -@@ -21,7 +21,6 @@ extern const struct optdesc opt_openssl_ - extern const struct optdesc opt_openssl_dhparam; - extern const struct optdesc opt_openssl_cafile; - extern const struct optdesc opt_openssl_capath; --extern const struct optdesc opt_openssl_egd; - extern const struct optdesc opt_openssl_pseudo; - #if OPENSSL_VERSION_NUMBER >= 0x00908000L - extern const struct optdesc opt_openssl_compress; ---- a/xioopts.c -+++ b/xioopts.c -@@ -412,7 +412,6 @@ const struct optname optionnames[] = { - #ifdef ECHOPRT - IF_TERMIOS("echoprt", &opt_echoprt) - #endif -- IF_OPENSSL("egd", &opt_openssl_egd) - IF_ANY ("end-close", &opt_end_close) - IF_TERMIOS("eof", &opt_veof) - IF_TERMIOS("eol", &opt_veol) -@@ -1102,7 +1101,6 @@ const struct optname optionnames[] = { - IF_OPENSSL("openssl-compress", &opt_openssl_compress) - #endif - IF_OPENSSL("openssl-dhparam", &opt_openssl_dhparam) -- IF_OPENSSL("openssl-egd", &opt_openssl_egd) - #if WITH_FIPS - IF_OPENSSL("openssl-fips", &opt_openssl_fips) - #endif ---- a/xioopts.h -+++ b/xioopts.h -@@ -478,7 +478,6 @@ enum e_optcode { - OPT_OPENSSL_COMPRESS, - #endif - OPT_OPENSSL_DHPARAM, -- OPT_OPENSSL_EGD, - OPT_OPENSSL_FIPS, - OPT_OPENSSL_KEY, - OPT_OPENSSL_METHOD, diff --git a/net/softethervpn/Makefile b/net/softethervpn/Makefile deleted file mode 100644 index c896e09..0000000 --- a/net/softethervpn/Makefile +++ /dev/null @@ -1,152 +0,0 @@ -# -# Copyright (C) 2008-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# Based on the initial porting done by el1n - -include $(TOPDIR)/rules.mk - -PKG_NAME:=softethervpn -PKG_VERSION:=4.25-9656 -PKG_VERREL:=rtm -PKG_VERDATE:=2018.01.15 -PKG_RELEASE:=1 - -PKG_SOURCE:=softether-src-v$(PKG_VERSION)-$(PKG_VERREL).tar.gz -PKG_SOURCE_URL:=http://www.softether-download.com/files/softether/v$(PKG_VERSION)-$(PKG_VERREL)-$(PKG_VERDATE)-tree/Source_Code/ -PKG_HASH:=b946dec3da5833ad2be69125224784b8a8e2a4149297d0c0a907ba0e1c4535f8 - -PKG_BUILD_DIR:=$(BUILD_DIR)/v$(PKG_VERSION) -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/v$(PKG_VERSION) - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_BUILD_DEPENDS:=softethervpn/host - -HAMCORE_SE2:=$(STAGING_DIR_HOST)/share/softethervpn/hamcore.se2 - -include $(INCLUDE_DIR)/nls.mk -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk - - -# Override CC to add fake libreadline to linker search path -HOSTCC += -L./src/readline - -# Add defines to turn add_history() and readline() calls into no-ops -HOSTCC += -D'add_history(x)' -D'readline(x)=\"\"' - -# Execute in host build directory -HOST_MAKE_FLAGS += -C $(HOST_BUILD_DIR) - -# Select 32 or 64 bit Makefile for host build depending on host architecture -HOST_MAKE_FLAGS += -f src/makefiles/linux_$(if $(shell uname -m | grep 64),64,32)bit.mak - -# Prevent calling upstream configure -define Host/Configure -endef - -define Host/Compile - # Prepare fake readline headers and library - mkdir -p $(HOST_BUILD_DIR)/src/readline - touch $(HOST_BUILD_DIR)/src/readline/readline.h - touch $(HOST_BUILD_DIR)/src/readline/history.h - ar rcs $(HOST_BUILD_DIR)/src/readline/libreadline.a - - # Build hamcorebuilder using host compiler and let it generate - # the hamcore.se2 archive file - CC="$(HOSTCC)" $(MAKE) $(HOST_MAKE_FLAGS) \ - src/bin/BuiltHamcoreFiles/unix/hamcore.se2 -endef - -define Host/Install - $(INSTALL_DIR) $(STAGING_DIR_HOST)/share/softethervpn - $(INSTALL_DATA) $(HOST_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix/hamcore.se2 $(HAMCORE_SE2) -endef - - -# Tune CFLAGS for target -TARGET_CFLAGS += \ - $(if $(CONFIG_OPENSSL_WITH_SSL3),,-DSSL_OP_NO_SSLv3) \ - $(if $(filter mips mipsel,$(ARCH)),-minterlink-mips16) - -# Select 32 or 64 bit Makefile for target build depending on 64bit config symbol -MAKE_FLAGS += \ - -f src/makefiles/linux_$(if $(CONFIG_ARCH_64BIT),64,32)bit.mak - -# Map nonstandard CCFLAGS variable to standard TARGET_CFLAGS -MAKE_FLAGS += \ - CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)" - -define Build/Configure - # Fetch prebuilt hamcore.se2 from staging dir - $(INSTALL_DIR) $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix - $(CP) $(HAMCORE_SE2) $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix/hamcore.se2 - - # Portably set hamcore.se2 modtime to one day in the future - # to prevent rebuilding it - perl -e 'utime(time() + 86400, time() + 86400, $$$$ARGV[0])' \ - $(PKG_BUILD_DIR)/src/bin/BuiltHamcoreFiles/unix/hamcore.se2 -endef - - -define Package/softethervpn - SECTION:=net - CATEGORY:=Network - SUBMENU:=VPN - DEPENDS:=+libpthread +librt +libreadline +libopenssl +libncurses +kmod-tun +zlib $(ICONV_DEPENDS) - TITLE:=Free Cross-platform Multi-protocol VPN server and client - URL:=http://www.softether.org/ - MAINTAINER:=Federico Di Marco -endef - -define Package/softethervpn/description -SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most powerful and easy-to-use multi-protocol VPN software developed as an academic -project from University of Tsukuba, Japan. SoftEther VPN has strong compatibility to today's most popular VPN products among the world. It has the interoperability -with OpenVPN, L2TP, IPsec, EtherIP, L2TPv3, Cisco VPN Routers and MS-SSTP VPN Clients. SoftEther VPN is the world's only VPN software which supports SSL-VPN, -OpenVPN, L2TP, EtherIP, L2TPv3 and IPsec as a single VPN software. SoftEther VPN is not only an alternative VPN server to existing VPN products (OpenVPN, -IPsec and MS-SSTP), but has also original strong SSL-VPN protocol to penetrate any kinds of firewalls. Ultra-optimized SSL-VPN Protocol of SoftEther VPN -has very fast throughput, low latency and firewall resistance. -endef - - -define Package/softethervpn/conffiles -/usr/libexec/softethervpn/vpn_server.config -/usr/libexec/softethervpn/vpn_client.config -/usr/libexec/softethervpn/vpn_bridge.config -/usr/libexec/softethervpn/lang.config -endef - -define Package/softethervpn/install - $(INSTALL_DIR) $(1)/usr/libexec/softethervpn - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnserver/vpnserver $(1)/usr/libexec/softethervpn - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnserver/hamcore.se2 $(1)/usr/libexec/softethervpn - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnclient/vpnclient $(1)/usr/libexec/softethervpn - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpnbridge/vpnbridge $(1)/usr/libexec/softethervpn - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vpncmd/vpncmd $(1)/usr/libexec/softethervpn - $(INSTALL_BIN) files/launcher.sh $(1)/usr/libexec/softethervpn - - $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_server.config - $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_bridge.config - $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/vpn_client.config - $(INSTALL_DATA) files/dummy $(1)/usr/libexec/softethervpn/lang.config - - $(INSTALL_DIR) $(1)/usr/bin - - #$(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpnserver - #$(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpnclient - #$(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpnbridge - $(LN) ../../usr/libexec/softethervpn/launcher.sh $(1)/usr/bin/vpncmd - - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) files/vpnserver.init $(1)/etc/init.d/softethervpnserver - $(INSTALL_BIN) files/vpnbridge.init $(1)/etc/init.d/softethervpnbridge - $(INSTALL_BIN) files/vpnclient.init $(1)/etc/init.d/softethervpnclient -endef - -$(eval $(call BuildPackage,softethervpn)) -$(eval $(call HostBuild)) diff --git a/net/softethervpn/files/dummy b/net/softethervpn/files/dummy deleted file mode 100644 index e69de29..0000000 diff --git a/net/softethervpn/files/launcher.sh b/net/softethervpn/files/launcher.sh deleted file mode 100755 index 7970792..0000000 --- a/net/softethervpn/files/launcher.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec "/usr/libexec/softethervpn/${0##*/}" "$@" diff --git a/net/softethervpn/files/vpnbridge.init b/net/softethervpn/files/vpnbridge.init deleted file mode 100644 index 9e5c44f..0000000 --- a/net/softethervpn/files/vpnbridge.init +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh /etc/rc.common -START=60 - -start(){ - logger -t 'softethervpn' "Starting softether vpnbridge service." - /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnbridge start -} - -stop(){ - logger -t 'softethervpn' "Stopping softether vpnbridge service." - /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnbridge stop -} diff --git a/net/softethervpn/files/vpnclient.init b/net/softethervpn/files/vpnclient.init deleted file mode 100644 index 1a3296d..0000000 --- a/net/softethervpn/files/vpnclient.init +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh /etc/rc.common -START=60 - -start(){ - logger -t 'softethervpn' "Starting softether vpnclient service." - /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnclient start -} - -stop(){ - logger -t 'softethervpn' "Stopping softether vpnclient service." - /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnclient stop -} diff --git a/net/softethervpn/files/vpnserver.init b/net/softethervpn/files/vpnserver.init deleted file mode 100644 index 6dc180a..0000000 --- a/net/softethervpn/files/vpnserver.init +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh /etc/rc.common -START=60 - -start(){ - logger -t 'softethervpn' "Starting softether vpnserver service." - /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnserver start -} - -stop(){ - logger -t 'softethervpn' "Stopping softether vpnserver service." - /usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnserver stop -} diff --git a/net/softethervpn/patches/103-noeucjp.patch b/net/softethervpn/patches/103-noeucjp.patch deleted file mode 100644 index f403dfb..0000000 --- a/net/softethervpn/patches/103-noeucjp.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/src/Mayaqua/Internat.c -+++ b/src/Mayaqua/Internat.c -@@ -123,7 +123,7 @@ - #include - - extern LOCK *token_lock; --static char charset[MAX_SIZE] = "EUCJP"; -+static char charset[MAX_SIZE] = "utf-8"; - static LOCK *iconv_lock = NULL; - void *iconv_cache_wide_to_str = 0; - void *iconv_cache_str_to_wide = 0; -@@ -938,7 +938,7 @@ void InitInternational() - #ifdef UNIX_MACOS - StrCpy(charset, sizeof(charset), "utf-8"); - #else // UNIX_MACOS -- StrCpy(charset, sizeof(charset), "EUCJP"); -+ StrCpy(charset, sizeof(charset), "utf-8"); - #endif // UNIX_MACOS - d = IconvWideToStrInternal(); - if (d == (void *)-1) -@@ -1198,7 +1198,7 @@ void GetCurrentCharSet(char *name, UINT - } - else - { -- StrCpy(name, size, "eucJP"); -+ StrCpy(name, size, "utf-8"); - } - } - FreeToken(t); diff --git a/net/softethervpn/patches/105-nossl3.patch b/net/softethervpn/patches/105-nossl3.patch deleted file mode 100644 index e602580..0000000 --- a/net/softethervpn/patches/105-nossl3.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: v4.25-9656/src/Mayaqua/Network.c -=================================================================== ---- v4.25-9656.orig/src/Mayaqua/Network.c -+++ v4.25-9656/src/Mayaqua/Network.c -@@ -13025,7 +13025,7 @@ bool StartSSLEx(SOCK *sock, X *x, K *pri - { - if (client_tls == false) - { --#if OPENSSL_VERSION_NUMBER < 0x10100000L -+#ifndef SSL_OP_NO_SSLv3 - SSL_CTX_set_ssl_version(ssl_ctx, SSLv3_method()); - #else - SSL_CTX_set_ssl_version(ssl_ctx, SSLv23_method()); diff --git a/net/softflowd/Makefile b/net/softflowd/Makefile deleted file mode 100644 index aa45787..0000000 --- a/net/softflowd/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -# -# Copyright (C) 2007-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=softflowd -PKG_VERSION:=0.9.9 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://softflowd.googlecode.com/files/ -PKG_MD5SUM:=ba83e2715e6250e6645ebcaa9ae1009d -PKG_MAINTAINER:=Ross Vandegrift -PKG_LICENSE:=BSD-3-Clause - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/softflowd - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libpcap - TITLE:=softflowd - URL:=http://code.google.com/p/softflowd/ -endef - -define Package/softflowd/description - Software netflow exporter -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" softflowd softflowctl -endef - -define Package/softflowd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/softflowd $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/softflowctl $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) -endef - -define Package/softflowd/conffiles -/etc/config/softflowd -endef - -$(eval $(call BuildPackage,softflowd)) diff --git a/net/softflowd/files/softflowd.config b/net/softflowd/files/softflowd.config deleted file mode 100644 index 61a2ee4..0000000 --- a/net/softflowd/files/softflowd.config +++ /dev/null @@ -1,14 +0,0 @@ -config softflowd - option enabled '0' - option interface 'br-lan' - option pcap_file '' - option timeout '' - option max_flows '8192' - option host_port '' - option pid_file '/var/run/softflowd.pid' - option control_socket '/var/run/softflowd.ctl' - option export_version '5' - option hoplimit '' - option tracking_level 'full' - option track_ipv6 '0' - option sampling_rate '100' diff --git a/net/softflowd/files/softflowd.init b/net/softflowd/files/softflowd.init deleted file mode 100755 index 98b4e34..0000000 --- a/net/softflowd/files/softflowd.init +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2007-2011 OpenWrt.org - -USE_PROCD=1 -START=50 - -append_bool() { - local section="$1" - local option="$2" - local value="$3" - local _val - config_get_bool _val "$section" "$option" '0' - [ "$_val" -gt 0 ] && append args "$3" -} - -append_string() { - local section="$1" - local option="$2" - local value="$3" - local _val - config_get _val "$section" "$option" - [ -n "$_val" ] && append args "$3 $_val" -} - -start_instance() { - local section="$1" - - config_get_bool enabled "$section" 'enabled' '0' - [ $enabled -gt 0 ] || return 1 - - config_get pid_file "$section" 'pid_file' - - args="" - append_string "$section" 'interface' '-i' - append_string "$section" 'pcap_file' '-r' - append_string "$section" 'timeout' '-t' - append_string "$section" 'max_flows' '-m' - append_string "$section" 'host_port' '-n' - append_string "$section" 'pid_file' '-p' - append_string "$section" 'control_socket' '-c' - append_string "$section" 'export_version' '-v' - append_string "$section" 'hoplimit' '-L' - append_string "$section" 'tracking_level' '-T' - append_string "$section" 'sampling_rate' '-s' - append_bool "$section" track_ipv6 '-6' - - procd_open_instance - procd_set_param command /usr/sbin/softflowd -d $args${pid_file:+ -p $pid_file} - procd_set_param respawn - procd_close_instance -} - -start_service() { - mkdir -m 0755 -p /var/empty - - config_load 'softflowd' - config_foreach start_instance 'softflowd' -} diff --git a/net/spawn-fcgi/Makefile b/net/spawn-fcgi/Makefile deleted file mode 100644 index 54c9ab7..0000000 --- a/net/spawn-fcgi/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=spawn-fcgi -PKG_VERSION:=1.6.4 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://download.lighttpd.net/spawn-fcgi/releases-1.6.x/ -PKG_MD5SUM:=a67c098a50cd625fd12adf61b5dd4c32 - -PKG_LICENSE:=BSD-3c -PKG_LICENSE_FILES:=COPYING - -PKG_MAINTAINER:=Daniel Golle - -include $(INCLUDE_DIR)/package.mk - -define Package/spawn-fcgi - SUBMENU:=Web Servers/Proxies - SECTION:=net - CATEGORY:=Network - TITLE:=Tool to spawn fastcgi applications - URL:=http://redmine.lighttpd.net/projects/spawn-fcgi -endef - -define Package/spawn-fcgi/description - spawn-fcgi is used to spawn fastcgi applications -endef - -define Package/spawn-fcgi/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/spawn-fcgi $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,spawn-fcgi)) diff --git a/net/sqm-scripts-extra/Makefile b/net/sqm-scripts-extra/Makefile deleted file mode 100644 index 28e6ccb..0000000 --- a/net/sqm-scripts-extra/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sqm-scripts-extra -PKG_VERSION:=2016-06-08 -PKG_RELEASE:=1 -PKG_LICENSE:=GPLv2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) - -include $(INCLUDE_DIR)/package.mk - -define Package/sqm-scripts-extra - SECTION:=net - CATEGORY:=Base system - DEPENDS:=+sqm-scripts - TITLE:=SQM Scripts - additional experimental scripts for testing - PKGARCH:=all - MAINTAINER:=Kevin Darbyshire-Bryant , \ - Sebastian Moeller -endef - -define Package/sqm-scripts-extra/description - A set of experimental scripts for sqm-scripts QoS package. The contents of this package may - change as new qdiscs like 'cake' are developed and tested. -endef - -define Package/sqm-scripts-extra/download -endef - -define Build/Prepare -endef - -define Build/Compile -endef - -define Package/sqm-scripts-extra/install - $(INSTALL_DIR) $(1)/usr/lib/sqm - $(INSTALL_DATA) ./src/* $(1)/usr/lib/sqm/ -endef - -$(eval $(call BuildPackage,sqm-scripts-extra)) - diff --git a/net/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos b/net/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos deleted file mode 100644 index 4f1380d..0000000 --- a/net/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -################################################################################ -# test_LAN_triple-isolate__piece_of_cake.qos (Cero3 Shaper) -# -# Abstract: -# This is a one band cake and ipv6 enabled shaping script for Ethernet -# gateways. This exists for the purpose of testing cake's different isolation -# options, specifically the non-directional triple-isolate feature that promises -# to finally tackle the bit-torrent hole in simple.qos. -# This specific version is supposed to be used on LAN interfaces: -# the script's ingress direction equals the internet/WAN upload direction -# the script's egress direction equals the internet/WAN download direction -# -# NOTE: Shaping on a LAN interface only affects machines connected via that -# LAN interface, so typically WIFI/WLAN traffic will not be shaped! -# -################################################################################ -# -# 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-2016 -# Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller -# -################################################################################ - -. ${SQM_LIB_DIR}/defaults.sh - -################################################################################ - - -# this will only work with cake as qdisc... -QDISC=cake - - -# to keep this as simple as possible we ignore the *_CAKE_OPTS from defaults.sh -INGRESS_CAKE_OPTS="besteffort dual-srchost" -EGRESS_CAKE_OPTS="besteffort dual-dsthost" - - -egress() { - sqm_debug "egress" - $TC qdisc del dev $IFACE root 2>/dev/null - $TC qdisc add dev $IFACE root $( get_stab_string ) cake bandwidth ${UPLINK}kbit $( get_cake_lla_string ) ${EGRESS_CAKE_OPTS} ${EQDISC_OPTS} -} - - -ingress() { - sqm_debug "ingress" - $TC qdisc del dev $IFACE handle ffff: ingress 2>/dev/null - $TC qdisc add dev $IFACE handle ffff: ingress - $TC qdisc del dev $DEV root 2>/dev/null - $TC qdisc add dev $DEV root $( get_stab_string ) cake bandwidth ${DOWNLINK}kbit $( get_cake_lla_string ) ${INGRESS_CAKE_OPTS} ${IQDISC_OPTS} - - $IP link set dev $DEV up - - # redirect all IP packets arriving in $IFACE to ifb0 - - $TC filter add dev $IFACE parent ffff: protocol all prio 10 u32 \ - match u32 0 0 flowid 1:1 action mirred egress redirect dev $DEV -} - -sqm_start() { - - #sm: flip upload and download bandwith so that the GUI values reflect directionality in regard to the ISP - #sm: NOTE this is ugly and should be performed in defaults.sh or functions.sh if at all - #sm: but for quick and dirty testing this should do - local ORIG_UPLINK=${UPLINK} - local ORIG_DOWNLINK=${DOWNLINK} - UPLINK=${ORIG_DOWNLINK} - DOWNLINK=${ORIG_UPLINK} - - - [ -n "$IFACE" ] || return 1 - do_modules - verify_qdisc $QDISC "cake" || return 1 - sqm_debug "Starting ${SCRIPT}" - - [ -z "$DEV" ] && DEV=$( get_ifb_for_if ${IFACE} ) - - - if [ "${UPLINK}" -ne 0 ]; - then - egress - sqm_debug "egress shaping activated" - else - sqm_debug "egress shaping deactivated" - $TC qdisc del dev ${IFACE} root 2> /dev/null - fi - if [ "${DOWNLINK}" -ne 0 ]; - then - verify_qdisc ingress "ingress" || return 1 - ingress - sqm_debug "ingress shaping activated" - else - sqm_debug "ingress shaping deactivated" - $TC qdisc del dev ${DEV} root 2> /dev/null - $TC qdisc del dev ${IFACE} ingress 2> /dev/null - fi - return 0 -} diff --git a/net/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos.help b/net/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos.help deleted file mode 100644 index 616b5e4..0000000 --- a/net/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos.help +++ /dev/null @@ -1,12 +0,0 @@ -test_LAN_dual-isolate__piece_of_cake.qos (Cero3 Shaper) - -Abstract: -This is a one band cake and ipv6 enabled shaping script for Ethernet gateways. -This exists for the purpose of testing cake's different isolation options, -specifically the non-directional dual-[src|dst]host feature that promises to finally -tackle the bit-torrent hole in simple.qos. -This specific version is supposed to be used on LAN interfaces: - the script's ingress direction equals the internet/WAN upload direction - the script's egress direction equals the internet/WAN download direction -NOTE: Shaping on a LAN interface only affects machines connected via that -LAN interface, so typically WIFI/WLAN traffic will not be shaped! diff --git a/net/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos b/net/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos deleted file mode 100644 index 761b27d..0000000 --- a/net/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -################################################################################ -# test_LAN_triple-isolate__piece_of_cake.qos (Cero3 Shaper) -# -# Abstract: -# This is a one band cake and ipv6 enabled shaping script for Ethernet -# gateways. This exists for the purpose of testing cake's different isolation -# options, specifically the non-directional triple-isolate feature that promises -# to finally tackle the bit-torrent hole in simple.qos. -# This specific version is supposed to be used on LAN interfaces: -# the script's ingress direction equals the internet/WAN upload direction -# the script's egress direction equals the internet/WAN download direction -# -# NOTE: Shaping on a LAN interface only affects machines connected via that -# LAN interface, so typically WIFI/WLAN traffic will not be shaped! -# -################################################################################ -# -# 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-2016 -# Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller -# -################################################################################ - -. ${SQM_LIB_DIR}/defaults.sh - -################################################################################ - - -# this will only work with cake as qdisc... -QDISC=cake - - -# to keep this as simple as possible we ignore the *_CAKE_OPTS from defaults.sh -INGRESS_CAKE_OPTS="besteffort triple-isolate" -EGRESS_CAKE_OPTS="besteffort triple-isolate" - - -egress() { - sqm_debug "egress" - $TC qdisc del dev $IFACE root 2>/dev/null - $TC qdisc add dev $IFACE root $( get_stab_string ) cake bandwidth ${UPLINK}kbit $( get_cake_lla_string ) ${EGRESS_CAKE_OPTS} ${EQDISC_OPTS} -} - - -ingress() { - sqm_debug "ingress" - $TC qdisc del dev $IFACE handle ffff: ingress 2>/dev/null - $TC qdisc add dev $IFACE handle ffff: ingress - $TC qdisc del dev $DEV root 2>/dev/null - $TC qdisc add dev $DEV root $( get_stab_string ) cake bandwidth ${DOWNLINK}kbit $( get_cake_lla_string ) ${INGRESS_CAKE_OPTS} ${IQDISC_OPTS} - - $IP link set dev $DEV up - - # redirect all IP packets arriving in $IFACE to ifb0 - - $TC filter add dev $IFACE parent ffff: protocol all prio 10 u32 \ - match u32 0 0 flowid 1:1 action mirred egress redirect dev $DEV -} - -sqm_start() { - - #sm: flip upload and download bandwith so that the GUI values reflect directionality in regard to the ISP - #sm: NOTE this is ugly and should be performed in defaults.sh or functions.sh if at all - #sm: but for quick and dirty testing this should do - local ORIG_UPLINK=${UPLINK} - local ORIG_DOWNLINK=${DOWNLINK} - UPLINK=${ORIG_DOWNLINK} - DOWNLINK=${ORIG_UPLINK} - - - [ -n "$IFACE" ] || return 1 - do_modules - verify_qdisc $QDISC "cake" || return 1 - sqm_debug "Starting ${SCRIPT}" - - [ -z "$DEV" ] && DEV=$( get_ifb_for_if ${IFACE} ) - - - if [ "${UPLINK}" -ne 0 ]; - then - egress - sqm_debug "egress shaping activated" - else - sqm_debug "egress shaping deactivated" - $TC qdisc del dev ${IFACE} root 2> /dev/null - fi - if [ "${DOWNLINK}" -ne 0 ]; - then - verify_qdisc ingress "ingress" || return 1 - ingress - sqm_debug "ingress shaping activated" - else - sqm_debug "ingress shaping deactivated" - $TC qdisc del dev ${DEV} root 2> /dev/null - $TC qdisc del dev ${IFACE} ingress 2> /dev/null - fi - return 0 -} diff --git a/net/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos.help b/net/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos.help deleted file mode 100644 index a3501dc..0000000 --- a/net/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos.help +++ /dev/null @@ -1,12 +0,0 @@ -test_LAN_triple-isolate__piece_of_cake.qos (Cero3 Shaper) - -Abstract: -This is a one band cake and ipv6 enabled shaping script for Ethernet gateways. -This exists for the purpose of testing cake's different isolation options, -specifically the non-directional triple-isolate feature that promises to finally -tackle the bit-torrent hole in simple.qos. -This specific version is supposed to be used on LAN interfaces: - the script's ingress direction equals the internet/WAN upload direction - the script's egress direction equals the internet/WAN download direction -NOTE: Shaping on a LAN interface only affects machines connected via that -LAN interface, so typically WIFI/WLAN traffic will not be shaped! diff --git a/net/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos b/net/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos deleted file mode 100644 index 87eaebf..0000000 --- a/net/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh -################################################################################ -# test_WAN_dual-isolate__piece_of_cake.qos (Cero3 Shaper) -# -# Abstract: -# This is a one band cake and ipv6 enabled shaping script for Ethernet -# gateways. This exists for the purpose of testing cake's different isolation -# options, specifically the directional dual-[src|dst]host feature that promises -# to finally tackle the bit-torrent hole in simple.qos. -# This specific version is supposed to be used on WAN interfaces: -# the script's ingress direction equals the internet/WAN download direction -# the script's egress direction equals the internet/WAN upload direction -# -################################################################################ -# -# 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-2016 -# Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller -# -################################################################################ - -. ${SQM_LIB_DIR}/defaults.sh - -################################################################################ - - -# this will only work with cake as qdisc... -QDISC=cake - - -# to keep this as simple as possible we ignore the *_CAKE_OPTS from defaults.sh -INGRESS_CAKE_OPTS="besteffort dual-dsthost" -EGRESS_CAKE_OPTS="besteffort dual-srchost" - - -egress() { - sqm_debug "egress" - $TC qdisc del dev $IFACE root 2>/dev/null - $TC qdisc add dev $IFACE root $( get_stab_string ) cake bandwidth ${UPLINK}kbit $( get_cake_lla_string ) ${EGRESS_CAKE_OPTS} ${EQDISC_OPTS} -} - - -ingress() { - sqm_debug "ingress" - $TC qdisc del dev $IFACE handle ffff: ingress 2>/dev/null - $TC qdisc add dev $IFACE handle ffff: ingress - $TC qdisc del dev $DEV root 2>/dev/null - $TC qdisc add dev $DEV root $( get_stab_string ) cake bandwidth ${DOWNLINK}kbit $( get_cake_lla_string ) ${INGRESS_CAKE_OPTS} ${IQDISC_OPTS} - - $IP link set dev $DEV up - - # redirect all IP packets arriving in $IFACE to ifb0 - - $TC filter add dev $IFACE parent ffff: protocol all prio 10 u32 \ - match u32 0 0 flowid 1:1 action mirred egress redirect dev $DEV -} - -sqm_start() { - [ -n "$IFACE" ] || return 1 - do_modules - verify_qdisc $QDISC "cake" || return 1 - sqm_debug "Starting ${SCRIPT}" - - [ -z "$DEV" ] && DEV=$( get_ifb_for_if ${IFACE} ) - - - if [ "${UPLINK}" -ne 0 ]; - then - egress - sqm_debug "egress shaping activated" - else - sqm_debug "egress shaping deactivated" - $TC qdisc del dev ${IFACE} root 2> /dev/null - fi - if [ "${DOWNLINK}" -ne 0 ]; - then - verify_qdisc ingress "ingress" || return 1 - ingress - sqm_debug "ingress shaping activated" - else - sqm_debug "ingress shaping deactivated" - $TC qdisc del dev ${DEV} root 2> /dev/null - $TC qdisc del dev ${IFACE} ingress 2> /dev/null - fi - return 0 -} diff --git a/net/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos.help b/net/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos.help deleted file mode 100644 index c239917..0000000 --- a/net/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos.help +++ /dev/null @@ -1,10 +0,0 @@ -test_WAN_dual-isolate__piece_of_cake.qos (Cero3 Shaper) - -Abstract: -This is a one band cake and ipv6 enabled shaping script for Ethernet gateways. -This exists for the purpose of testing cake's different isolation options, -specifically the directional dual-[src|dst]host feature that promises to finally -tackle the bit-torrent hole in simple.qos. -This specific version is supposed to be used on WAN interfaces: - the script's ingress direction equals the internet/WAN download direction - the script's egress direction equals the internet/WAN upload direction diff --git a/net/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos b/net/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos deleted file mode 100644 index 5f0d7d7..0000000 --- a/net/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh -################################################################################ -# test_WAN_triple-isolate__piece_of_cake.qos (Cero3 Shaper) -# -# Abstract: -# This is a one band cake and ipv6 enabled shaping script for Ethernet -# gateways. This exists for the purpose of testing cake's different isolation -# options, specifically the non-directional triple-isolate feature that promises -# to finally tackle the bit-torrent hole in simple.qos. -# This specific version is supposed to be used on WAN interfaces: -# the script's ingress direction equals the internet/WAN download direction -# the script's egress direction equals the internet/WAN upload direction -# -################################################################################ -# -# 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-2016 -# Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller -# -################################################################################ - -. ${SQM_LIB_DIR}/defaults.sh - -################################################################################ - - -# this will only work with cake as qdisc... -QDISC=cake - - -# to keep this as simple as possible we ignore the *_CAKE_OPTS from defaults.sh -INGRESS_CAKE_OPTS="besteffort triple-isolate" -EGRESS_CAKE_OPTS="besteffort triple-isolate" - - -egress() { - sqm_debug "egress" - $TC qdisc del dev $IFACE root 2>/dev/null - $TC qdisc add dev $IFACE root $( get_stab_string ) cake bandwidth ${UPLINK}kbit $( get_cake_lla_string ) ${EGRESS_CAKE_OPTS} ${EQDISC_OPTS} -} - - -ingress() { - sqm_debug "ingress" - $TC qdisc del dev $IFACE handle ffff: ingress 2>/dev/null - $TC qdisc add dev $IFACE handle ffff: ingress - $TC qdisc del dev $DEV root 2>/dev/null - $TC qdisc add dev $DEV root $( get_stab_string ) cake bandwidth ${DOWNLINK}kbit $( get_cake_lla_string ) ${INGRESS_CAKE_OPTS} ${IQDISC_OPTS} - - $IP link set dev $DEV up - - # redirect all IP packets arriving in $IFACE to ifb0 - - $TC filter add dev $IFACE parent ffff: protocol all prio 10 u32 \ - match u32 0 0 flowid 1:1 action mirred egress redirect dev $DEV -} - -sqm_start() { - [ -n "$IFACE" ] || return 1 - do_modules - verify_qdisc $QDISC "cake" || return 1 - sqm_debug "Starting ${SCRIPT}" - - [ -z "$DEV" ] && DEV=$( get_ifb_for_if ${IFACE} ) - - - if [ "${UPLINK}" -ne 0 ]; - then - egress - sqm_debug "egress shaping activated" - else - sqm_debug "egress shaping deactivated" - $TC qdisc del dev ${IFACE} root 2> /dev/null - fi - if [ "${DOWNLINK}" -ne 0 ]; - then - verify_qdisc ingress "ingress" || return 1 - ingress - sqm_debug "ingress shaping activated" - else - sqm_debug "ingress shaping deactivated" - $TC qdisc del dev ${DEV} root 2> /dev/null - $TC qdisc del dev ${IFACE} ingress 2> /dev/null - fi - return 0 -} diff --git a/net/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos.help b/net/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos.help deleted file mode 100644 index 72df509..0000000 --- a/net/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos.help +++ /dev/null @@ -1,10 +0,0 @@ -test_WAN_triple-isolate__piece_of_cake.qos (Cero3 Shaper) - -Abstract: -This is a one band cake and ipv6 enabled shaping script for Ethernet gateways. -This exists for the purpose of testing cake's different isolation options, -specifically the non-directional triple-isolate feature that promises to finally -tackle the bit-torrent hole in simple.qos. -This specific version is supposed to be used on WAN interfaces: - the script's ingress direction equals the internet/WAN download direction - the script's egress direction equals the internet/WAN upload direction diff --git a/net/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos b/net/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos deleted file mode 100644 index df17b39..0000000 --- a/net/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh -################################################################################ -# test_triple_isolated_llt_cake.qos -# One bin cake shaper for ethernet gateways -# using cake qdisc with triple-isolate and diffserv-llt (Latency-Loss-Tradeoff) -# -################################################################################ -# -# 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-2016 -# Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller -# -################################################################################ - -. ${SQM_LIB_DIR}/defaults.sh - -################################################################################ - - -# this will only work with cake as qdisc... -QDISC=cake - - -# to keep this as simple as possible we ignore the *_CAKE_OPTS from defaults.sh -INGRESS_CAKE_OPTS="diffserv-llt triple-isolate" -EGRESS_CAKE_OPTS="diffserv-llt triple-isolate" - - -egress() { - sqm_debug "egress" - $TC qdisc del dev $IFACE root 2>/dev/null - $TC qdisc add dev $IFACE root $( get_stab_string ) cake bandwidth ${UPLINK}kbit $( get_cake_lla_string ) ${EGRESS_CAKE_OPTS} ${EQDISC_OPTS} -} - - -ingress() { - sqm_debug "ingress" - $TC qdisc del dev $IFACE handle ffff: ingress 2>/dev/null - $TC qdisc add dev $IFACE handle ffff: ingress - $TC qdisc del dev $DEV root 2>/dev/null - $TC qdisc add dev $DEV root $( get_stab_string ) cake bandwidth ${DOWNLINK}kbit $( get_cake_lla_string ) ${INGRESS_CAKE_OPTS} ${IQDISC_OPTS} - - $IP link set dev $DEV up - - # redirect all IP packets arriving in $IFACE to ifb0 - - $TC filter add dev $IFACE parent ffff: protocol all prio 10 u32 \ - match u32 0 0 flowid 1:1 action mirred egress redirect dev $DEV -} - -sqm_start() { - [ -n "$IFACE" ] || return 1 - do_modules - verify_qdisc $QDISC "cake" || return 1 - sqm_debug "Starting ${SCRIPT}" - - [ -z "$DEV" ] && DEV=$( get_ifb_for_if ${IFACE} ) - - - if [ "${UPLINK}" -ne 0 ]; - then - egress - sqm_debug "egress shaping activated" - else - sqm_debug "egress shaping deactivated" - $TC qdisc del dev ${IFACE} root 2> /dev/null - fi - if [ "${DOWNLINK}" -ne 0 ]; - then - verify_qdisc ingress "ingress" || return 1 - ingress - sqm_debug "ingress shaping activated" - else - sqm_debug "ingress shaping deactivated" - $TC qdisc del dev ${DEV} root 2> /dev/null - $TC qdisc del dev ${IFACE} ingress 2> /dev/null - fi - return 0 -} diff --git a/net/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos.help b/net/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos.help deleted file mode 100644 index 06ffdad..0000000 --- a/net/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos.help +++ /dev/null @@ -1,3 +0,0 @@ -Cake qdisc with triple-isolate and diffserv-llt (Latency-Loss-Tradeoff) -options as the shaper and fq_codel as leaf qdisc. This script requires -that cake is selected as qdisc. diff --git a/net/sqm-scripts/Makefile b/net/sqm-scripts/Makefile deleted file mode 100644 index 3aa81b1..0000000 --- a/net/sqm-scripts/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sqm-scripts -PKG_SOURCE_VERSION:=8217081f7e52af342c362b29480461575c496387 -PKG_VERSION:=1.1.3 -PKG_RELEASE:=1 -PKG_LICENSE:=GPLv2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz -PKG_SOURCE_URL:=https://github.com/tohojo/sqm-scripts.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) - -include $(INCLUDE_DIR)/package.mk - -define Package/sqm-scripts - SECTION:=net - CATEGORY:=Base system - DEPENDS:=+tc +kmod-sched-core +kmod-sched-cake +kmod-ifb +iptables \ - +iptables-mod-ipopt +iptables-mod-conntrack-extra - TITLE:=SQM Scripts (QoS) - PKGARCH:=all - MAINTAINER:=Toke Høiland-Jørgensen -endef - -define Package/sqm-scripts/description - A set of scripts that does simple SQM configuration. -endef - -define Package/sqm-scripts/conffiles -/etc/config/sqm -/etc/sqm/sqm.conf -endef - -define Package/sqm-scripts/install - make -C $(PKG_BUILD_DIR) DESTDIR=$(1) PLATFORM=openwrt install -endef - -define Package/luci-app-sqm - SECTION:=luci - CATEGORY:=LuCI - TITLE:=SQM Scripts - LuCI interface - MAINTAINER:=Toke Høiland-Jørgensen - PKGARCH:=all - DEPENDS:= lua luci-base +sqm-scripts - SUBMENU:=3. Applications -endef - -define Package/luci-app-sqm/description - Luci interface for the SQM scripts queue management configuration package. -endef - -define Package/luci-app-sqm/install - make -C $(PKG_BUILD_DIR) DESTDIR=$(1) PLATFORM=openwrt install-luci -endef - -define Package/luci-app-sqm/postinst -#!/bin/sh -which uci > /dev/null || exit 0 -uci -q get ucitrack.@sqm[0] > /dev/null || { - uci add ucitrack sqm > /dev/null - uci set ucitrack.@sqm[0].init=sqm - uci add_list ucitrack.@firewall[0].affects=sqm - uci commit -} -endef - -define Package/luci-app-sqm/postrm -#!/bin/sh -which uci > /dev/null || exit 0 -uci -q get ucitrack.@sqm[0] > /dev/null && { - uci delete ucitrack.@sqm[0] - uci del_list ucitrack.@firewall[0].affects=sqm - uci commit -} -endef - -$(eval $(call BuildPackage,sqm-scripts)) -$(eval $(call BuildPackage,luci-app-sqm)) diff --git a/net/squid/Makefile b/net/squid/Makefile index dcf138a..b9cedd7 100644 --- a/net/squid/Makefile +++ b/net/squid/Makefile @@ -8,15 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=squid -PKG_VERSION:=3.5.12 +PKG_VERSION:=3.5.27 PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0 -PKG_MAINTAINER:=Luka Perkov +PKG_MAINTAINER:=Marko Ratkaj PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://www.squid-cache.org/Versions/v3/3.5/ -PKG_MD5SUM:=50016bf6e2d3a3a186a6c7236d251f63 +PKG_SOURCE_URL:=http://www3.us.squid-cache.org/Versions/v3/3.5/ \ + http://www2.pl.squid-cache.org/Versions/v3/3.5/ \ + http://www.squid-cache.org/Versions/v3/3.5/ +PKG_HASH:=5ddb4367f2dc635921f9ca7a59d8b87edb0412fa203d1543393ac3c7f9fef0ec PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -28,11 +30,11 @@ define Package/squid/Default CATEGORY:=Network SUBMENU:=Web Servers/Proxies URL:=http://www.squid-cache.org/ + MENU:=1 endef define Package/squid $(call Package/squid/Default) - MENU:=1 DEPENDS:=+libopenssl +libpthread +librt +libltdl +libstdcpp TITLE:=full-featured Web proxy cache endef diff --git a/net/squid/files/squid.config b/net/squid/files/squid.config index e781860..327ecef 100644 --- a/net/squid/files/squid.config +++ b/net/squid/files/squid.config @@ -3,6 +3,7 @@ config squid 'squid' option http_port '3128' option coredump_dir '/tmp/squid' option visible_hostname 'OpenWrt' + option mime_table '/etc/squid/mime.conf' #option http_port_options 'intercept' #option ssldb '/tmp/squid/ssldb' #option ssldb_options '-M 4MB' diff --git a/net/squid/files/squid.init b/net/squid/files/squid.init index 76ec756..711347b 100644 --- a/net/squid/files/squid.init +++ b/net/squid/files/squid.init @@ -7,6 +7,7 @@ STOP=10 USE_PROCD=1 PROG=/usr/sbin/squid CONFIGFILE="/tmp/squid/squid.conf" +MIMETABLE="/tmp/squid/mime.conf" validate_squid_section() { uci_validate_section squid squid "${1}" \ @@ -17,7 +18,8 @@ validate_squid_section() { 'ssldb_options:string' \ 'coredump_dir:string' \ 'visible_hostname:string:OpenWrt' \ - 'pinger_enable:string:off' + 'pinger_enable:string:off' \ + 'mime_table:string:/etc/squid/mime.conf' } start_service() { @@ -38,6 +40,8 @@ start_service() { echo coredump_dir $coredump_dir >> $CONFIGFILE echo visible_hostname $visible_hostname >> $CONFIGFILE echo pinger_enable $pinger_enable >> $CONFIGFILE + cat $mime_table > $MIMETABLE + echo mime_table $MIMETABLE >> $CONFIGFILE [ "$ssldb" ] && echo sslcrtd_program /usr/lib/squid/ssl_crtd -s $ssldb $ssldb_options >> $CONFIGFILE $PROG -s -f $CONFIGFILE -N -z 2>/dev/null diff --git a/net/squid/patches/001-cross_compile.patch b/net/squid/patches/001-cross_compile.patch index c7493bb..be9fdcd 100644 --- a/net/squid/patches/001-cross_compile.patch +++ b/net/squid/patches/001-cross_compile.patch @@ -1,24 +1,40 @@ --- a/src/Makefile.in +++ b/src/Makefile.in -@@ -7761,3 +7761,3 @@ cache_cf.o: cf_parser.cci +@@ -7984,7 +7984,7 @@ cache_cf.o: cf_parser.cci + + # cf_gen builds the configuration files. cf_gen$(EXEEXT): $(cf_gen_SOURCES) $(cf_gen_DEPENDENCIES) cf_gen_defines.cci - $(BUILDCXX) $(BUILDCXXFLAGS) -o $@ $(srcdir)/cf_gen.cc -I$(srcdir) -I$(top_builddir)/include/ -I$(top_builddir)/src + g++ -o $@ $(srcdir)/cf_gen.cc -I$(srcdir) -I$(top_builddir)/include/ -I$(top_builddir)/src + # squid.conf.default is built by cf_gen when making cf_parser.cci + squid.conf.default squid.conf.documented: cf_parser.cci --- a/configure +++ b/configure -@@ -20133,3 +20133,3 @@ if test "$cross_compiling" = yes; then : +@@ -20842,7 +20842,7 @@ else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling +_as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -@@ -28289,3 +28289,3 @@ else + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -29142,7 +29142,7 @@ else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling +_as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } -@@ -28314,3 +28314,3 @@ else + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -29167,7 +29167,7 @@ else + if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling +_as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/net/squid/patches/100-mime.patch b/net/squid/patches/100-mime.patch deleted file mode 100644 index 1138a41..0000000 --- a/net/squid/patches/100-mime.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/src/mime.conf.default -+++ b/src/mime.conf.default -@@ -1,20 +1,3 @@ --## Copyright (C) 1996-2015 The Squid Software Foundation and contributors --## --## Squid software is distributed under GPLv2+ license and includes --## contributions from numerous individuals and organizations. --## Please see the COPYING and CONTRIBUTORS files for details. --## --# --# This file associates URL patterns for servers or services --# that don't automatically include Content-Type (like ftp) with a mime type --# and a graphical icon. --# --# Content-Encodings are taken from section 3.1 of RFC2068 (HTTP/1.1) --# --# This file has the format : --# --# regexp content-type icon encoding mode actions --#-------------------------------------------------------------------------------------------------------- - \.gif$ image/gif silk/image.png - image +download - \.mime$ www/mime silk/page_white_text.png - ascii +download - ^internal-dirup$ - silk/arrow_up.png - - -@@ -191,6 +174,4 @@ README text/plain silk/information.pn - \.xml$ text/xml silk/page_world.png - ascii +download - \.xsl$ text/xml silk/layout.png - ascii +download - \.xyz$ chemical/x-xyz silk/chart_line.png - image +download --# --# the default - . text/plain silk/bullet_red.png - image +download +view diff --git a/net/sshfs/Makefile b/net/sshfs/Makefile deleted file mode 100644 index 4403847..0000000 --- a/net/sshfs/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sshfs -PKG_VERSION:=2.8 -PKG_RELEASE:=1 - -PKG_LICENSE:=GPL-2.0 -PKG_MAINTAINER:=Zoltan HERPAI - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/libfuse/sshfs/releases/download/$(PKG_NAME)_$(PKG_VERSION) -PKG_MD5SUM:=0ba25e848ee59e2595d6576c8f6284b6 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/sshfs - TITLE:=SSHFS - DEPENDS:=+libfuse +fuse-utils +glib2 +libpthread - SECTION:=net - CATEGORY:=Network - SUBMENU:=Filesystem - URL:=http://fuse.sourceforge.net/ -endef - -define Package/sshfs/description - Mount remote system over sftp. -endef - -CONFIGURE_VARS += \ - SSHFS_CFLAGS=" \ - -D_FILE_OFFSET_BITS=64 \ - -I$(STAGING_DIR)/usr/include/glib-2.0 \ - -I$(STAGING_DIR)/usr/lib/glib-2.0/include \ - -I$(STAGING_DIR)/usr/include/fuse" \ - SSHFS_LIBS=" \ - -lglib-2.0 -liconv $(if $(INTL_FULL),-lintl) -lfuse -pthread -lgthread-2.0 \ - -L$(STAGING_DIR)/usr/lib" - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all install -endef - -define Package/sshfs/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sshfs $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,sshfs)) diff --git a/net/sshtunnel/Makefile b/net/sshtunnel/Makefile deleted file mode 100644 index b277e22..0000000 --- a/net/sshtunnel/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (C) 2010-2015 OpenWrt.org -# Copyright (C) 2010 segal.di.ubi.pt -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sshtunnel -PKG_VERSION:=4 -PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0+ - -PKG_MAINTAINER:=Nuno Goncalves - -include $(INCLUDE_DIR)/package.mk - -define Package/sshtunnel - SECTION:=net - CATEGORY:=Network - SUBMENU:=SSH - TITLE:=Manages Local and Remote openssh ssh(1) tunnels - DEPENDS:=+openssh-client -endef - -define Package/sshtunnel/description -Creates openssh ssh(1) Local and Remote tunnels configured in UCI file. Can be used to allow remote connections, possibly over NATed connections or without public IP/DNS -endef - -define Package/sshtunnel/conffiles -/etc/config/sshtunnel -endef - -define Build/Compile -endef - -define Package/sshtunnel/install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/sshtunnel.init $(1)/etc/init.d/sshtunnel - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/uci_sshtunnel $(1)/etc/config/sshtunnel -endef - -$(eval $(call BuildPackage,sshtunnel)) diff --git a/net/sshtunnel/files/sshtunnel.init b/net/sshtunnel/files/sshtunnel.init deleted file mode 100644 index a6d9aa7..0000000 --- a/net/sshtunnel/files/sshtunnel.init +++ /dev/null @@ -1,213 +0,0 @@ -#!/bin/sh /etc/rc.common -# -# Copyright (C) 2010-2015 OpenWrt.org -# Copyright (C) 2010 segal.di.ubi.pt -# - -START=99 -STOP=01 -USE_PROCD=1 - -PROG=/usr/bin/ssh - -_log() { - logger -p daemon.info -t sshtunnel "$@" -} - -_err() { - logger -p daemon.err -t sshtunnel "$@" -} - -append_params() { - local p v args - for p in $*; do - eval "v=\$$p" - [ -n "$v" ] && args="$args -o $p=$v" - done - - ARGS_options="${args# *}" -} - -append_string() { - local varname="$1"; local add="$2"; local separator="${3:- }"; local actual - eval "actual=\$$varname" - - new="${actual:+$actual$separator}$add" - eval "$varname=\$new" -} - -validate_server_section() { - uci_validate_section sshtunnel server "$1" \ - 'user:string(1)' \ - 'hostname:host' \ - 'port:port' \ - 'retrydelay:min(1):60' \ - 'PKCS11Provider:file' \ - 'CheckHostIP:or("yes", "no")' \ - 'Compression:or("yes", "no")' \ - 'CompressionLevel:range(1,9)' \ - 'IdentityFile:file' \ - 'LogLevel:or("QUIET", "FATAL", "ERROR", "INFO", "VERBOSE", "DEBUG", "DEBUG1", "DEBUG2", "DEBUG3"):INFO' \ - 'ServerAliveCountMax:min(1)' \ - 'ServerAliveInterval:min(1)' \ - 'StrictHostKeyChecking:or("yes", "no")' \ - 'TCPKeepAlive:or("yes", "no")' \ - 'VerifyHostKeyDNS:or("yes", "no")' -} - -validate_tunnelR_section() { - uci_validate_section sshtunnel tunnelR "$1" \ - 'remoteaddress:or(host, "*"):*' \ - 'remoteport:port' \ - 'localaddress:host' \ - 'localport:port' -} - -validate_tunnelL_section() { - uci_validate_section sshtunnel tunnelL "$1" \ - 'remoteaddress:host' \ - 'remoteport:port' \ - 'localaddress:or(host, "*"):*' \ - 'localport:port' -} - -validate_tunnelD_section() { - uci_validate_section sshtunnel tunnelD "$1" \ - 'localaddress:or(host, "*"):*' \ - 'localport:port' -} - -validate_tunnelW_section() { - uci_validate_section sshtunnel tunnelW "$1" \ - 'vpntype:or("ethernet", "point-to-point"):point-to-point' \ - 'localdev:or("any", min(1))' \ - 'remotedev:or("any", min(1))' -} - -load_tunnelR() { - config_get section_server "$1" "server" - - # continue to read next section if this is not for the current server - [ "$server" = "$section_server" ] || return 0 - - # validate and load this remote tunnel config - local remoteaddress remoteport localaddress localport - validate_tunnelR_section "$1" || { _err "tunnelR ${1}: validation failed"; return 1; } - - [ -n "$remoteport" -a -n "$localport" -a -n "$remoteaddress" ] || { _err "tunnelR ${1}: missing required options"; return 1; } - - # count nr of valid sections to make sure there are at least one - let count++ - - _log "tunnelR at ${server}: -R $remoteaddress:$remoteport:$localaddress:$localport" - append_string "ARGS_tunnels" "-R $remoteaddress:$remoteport:$localaddress:$localport" -} - -load_tunnelL() { - config_get section_server "$1" "server" - - # continue to read next section if this is not for the current server - [ "$server" = "$section_server" ] || return 0 - - # validate and load this remote tunnel config - local remoteaddress remoteport localaddress localport - validate_tunnelL_section "$1" || { _err "tunnelL ${1}: validation failed"; return 1; } - - [ -n "$remoteport" -a -n "$localport" -a -n "$remoteaddress" ] || { _err "tunnelL ${1}: missing required options"; return 1; } - - # count nr of valid sections to make sure there are at least one - let count++ - - _log "tunnelL at ${server}: -L $localaddress:$localport:$remoteaddress:$remoteport" - append_string "ARGS_tunnels" "-L $localaddress:$localport:$remoteaddress:$remoteport" -} - -load_tunnelD() { - config_get section_server "$1" "server" - - # continue to read next section if this is not for the current server - [ "$server" = "$section_server" ] || return 0 - - # validate and load this remote tunnel config - local localaddress localport - validate_tunnelD_section "$1" || { _err "tunnelD ${1}: validation failed"; return 1; } - - [ -n "$localport" ] || { _err "tunnelD ${1}: missing localport"; return 1; } - - # count nr of valid sections to make sure there are at least one - let count++ - - _log "proxy via ${server}: -D $localaddress:$localport" - append_string "ARGS_tunnels" "-D $localaddress:$localport" -} - -load_tunnelW() { - config_get section_server "$1" "server" - - # continue to read next section if this is not for the current server - [ "$server" = "$section_server" ] || return 0 - - # validate and load this remote tunnel config - local localdev remotedev vpntype - validate_tunnelW_section "$1" || { _err "tunnelW ${1}: validation failed"; return 1; } - - [ -n "$vpntype" -a -n "$localdev" -a -n "$remotedev" ] || { _err "tunnelW $1: missing or bad options"; return 1; } - - [ "$user" == "root" ] || { _err "tunnelW ${1}: root is required for tun"; return 1; } - - # count nr of valid sections to make sure there are at least one - let count++ - - _log "tunnelW to ${server}: -w $localdev:$remotedev -o Tunnel=$vpntype" - append_string "ARGS_tunnels" "-w $localdev:$remotedev -o Tunnel=$vpntype" -} - -load_server() { - server="$1" - local user hostname port retrydelay PKCS11Provider CheckHostIP Compression \ - CompressionLevel IdentityFile LogLevel ServerAliveCountMax \ - ServerAliveInterval StrictHostKeyChecking TCPKeepAlive VerifyHostKeyDNS - - validate_server_section "$server" || { _err "server ${server}: validation failed"; return 1; } - - ARGS="" - ARGS_options="" - ARGS_tunnels="" - count=0 - - config_foreach load_tunnelR "tunnelR" - config_foreach load_tunnelL "tunnelL" - config_foreach load_tunnelD "tunnelD" - config_foreach load_tunnelW "tunnelW" - [ "$count" -eq 0 ] && { _err "tunnels to ${server} not started - no tunnels defined"; return 1; } - - append_params CheckHostIP Compression CompressionLevel IdentityFile \ - LogLevel PKCS11Provider ServerAliveCountMax ServerAliveInterval \ - StrictHostKeyChecking TCPKeepAlive VerifyHostKeyDNS - - ARGS="$ARGS_options -o ExitOnForwardFailure=yes -o BatchMode=yes -nN $ARGS_tunnels -p $port $user@$hostname" - - procd_open_instance "$server" - procd_set_param command "$PROG" $ARGS - procd_set_param stdout 1 - procd_set_param stderr 1 - procd_set_param respawn 0 "$retrydelay" 1 - procd_close_instance -} - -start_service() { - config_load "sshtunnel" - config_foreach load_server "server" -} - -service_triggers() { - procd_add_reload_trigger "sshtunnel" - - procd_open_validate - validate_server_section - validate_tunnelR_section - validate_tunnelL_section - validate_tunnelD_section - validate_tunnelW_section - procd_close_validate -} diff --git a/net/sshtunnel/files/uci_sshtunnel b/net/sshtunnel/files/uci_sshtunnel deleted file mode 100644 index 52e6881..0000000 --- a/net/sshtunnel/files/uci_sshtunnel +++ /dev/null @@ -1,63 +0,0 @@ -# -# password authentication is not possible, public key authentication must be used. -# set "option IdentityFile" to he file from which the identity (private key) for RSA or DSA authentication is read. -# The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2. -# ssh will also try to load certificate information from the filename obtained by appending -cert.pub to identity filenames. -# - -#config server disney -# option user mourinho -# option hostname server.disney.com -# option port 22 -# option retrydelay 1 -# option CheckHostIP yes -# option Compression no -# option CompressionLevel 6 -# option IdentityFile ~/.ssh/id_rsa -# option LogLevel INFO -# option PKCS11Provider /lib/pteidpkcs11.so -# option ServerAliveCountMax 3 -# option ServerAliveInterval 0 -# option StrictHostKeyChecking ask -# option TCPKeepAlive yes -# option VerifyHostKeyDNS yes - -# tunnelR(emote) - when the connection will be initiated to the R(emote) endpoint at -# remoteaddress:remoteport and then forwarded to localaddress:localport -# -#config tunnelR http -# option server disney -# option remoteaddress * -# option remoteport 9009 -# option localaddress 192.168.1.13 -# option localport 80 - -# tunnelL(ocal) - when the connection will be initiated to the L(ocal) endpoint at -# localaddress:localport and then forwarded to remoteaddress:remoteport -# -#config tunnelL test -# option server disney -# option localaddress * -# option localport 1022 -# option remoteaddress secretserver.disney.com -# option remoteport 22 - -# tunnelD(ynamic) - when the connection will be initiated with the SOCKS4 or SOCKS5 protocol -# to the local endpoint at localaddress:localport and then forwarded over the remote host -# -#config tunnelD proxy -# option server disney -# option localaddress * -# option localport 4055 - -# tunnelW - creates TUN/TAP devices on client and server to establish a VPN tunnel between them -# vpntypes: -# point-to-point = TUN -# ethernet = TAP -# -#config tunnelW proxy -# option server disney -# option vpntype point-to-point|ethernet -# option localdev any|0|1|2|... -# option remotedev any|0|1|2|... - diff --git a/net/sslh/Makefile b/net/sslh/Makefile deleted file mode 100644 index d7edfee..0000000 --- a/net/sslh/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (C) 2009-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sslh -PKG_VERSION:=v1.17 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://rutschle.net/tech/ -PKG_MD5SUM:=1fc3ada4bafaca5a9786cc1431f48ed4 -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/sslh - SECTION:=net - CATEGORY:=Network - SUBMENU:=Routing and Redirection - TITLE:=SSL/SSH multiplexer - URL:=http://rutschle.net/tech/sslh.shtml - PKG_MAINTAINER:=Jonathan McCrohan -endef - -define Package/sslh/conffiles -/etc/config/sslh -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - USELIBCONFIG= \ - USELIBWRAP= \ - USELIBPCRE= \ - all -endef - -define Package/sslh/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/sslh-fork $(1)/usr/sbin/sslh - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) -endef - -$(eval $(call BuildPackage,sslh)) diff --git a/net/sslh/files/sslh.config b/net/sslh/files/sslh.config deleted file mode 100644 index 07ed02b..0000000 --- a/net/sslh/files/sslh.config +++ /dev/null @@ -1,30 +0,0 @@ -package 'sslh' - -config 'sslh' 'default' - # disable or enable - option 'enable' '1' - # listen defaults to '0.0.0.0:443' (all interfaces) - # multiple -p arguments may be supplied using a uci list - # -p : - option 'listen' '' - # ssh defaults to 'localhost:22' - # --ssh : - option 'ssh' '' - # ssl defaults to 'localhost:443' - # --ssl : - option 'ssl' '' - # openvpn defaults to 'localhost:1194' - # --openvpn : - option 'openvpn' '' - # tinc defaults to 'localhost:655' - # --tinc : - option 'tinc' '' - # xmpp defaults to 'localhost:5222' - # --xmpp : - option 'xmpp' '' - # timeout (for ssh, then ssl is assumed) defaults to 2 - # -t - option 'timeout' '' - # verbose defaults to off - # -v - option 'verbose' '0' diff --git a/net/sslh/files/sslh.init b/net/sslh/files/sslh.init deleted file mode 100644 index f7fc647..0000000 --- a/net/sslh/files/sslh.init +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2009-2012 OpenWrt.org - -START=95 - -# XXX: pid-files are useless because sslh forks after creating them -SERVICE_USE_PID= - -start_instance() { - local section="$1" - - # check if section is enabled (default) - local enable - config_get_bool enable "${section}" 'enable' '0' - [ ${enable} -gt 0 ] || return 1 - - local args="" - local val - # A) listen parameter - config_get vals "${section}" listen - [ -n "${vals}" ] && for val in $vals; do append args "-p${val}"; done - # B) ssh parameter - config_get val "${section}" ssh - [ -n "${val}" ] && append args "--ssh ${val}" - # C) ssl parameter - config_get val "${section}" ssl - [ -n "${val}" ] && append args "--ssl ${val}" - # D) openvpn parameter - config_get val "${section}" openvpn - [ -n "${val}" ] && append args "--openvpn ${val}" - # E) tinc parameter - config_get val "${section}" tinc - [ -n "${val}" ] && append args "--tinc ${val}" - # F) xmpp parameter - config_get val "${section}" xmpp - [ -n "${val}" ] && append args "--xmpp ${val}" - # G) timeout (before a connection is considered to be SSH) - config_get val "${section}" timeout - [ -n "${val}" ] && append args "-t ${val}" - # H) verbose parameter - local verbosed - config_get_bool verbosed "${section}" verbose 0 - [ "${verbosed}" -ne 0 ] && append args "-v" - - # Defaults were removed for --user and --pidfile options - # in sslh 1.11; Define them here instead. - append args "--user nobody" - append args "--pidfile /var/run/sslh.pid" - - # XXX: allow more that one instance to run simultaneously - SERVICE_MATCH_NAME=1 SERVICE_NAME="sslh-dummy-$$" \ - service_start /usr/sbin/sslh ${args} -} - -start() { - config_load 'sslh' - config_foreach start_instance 'sslh' -} - -stop() { - service_stop /usr/sbin/sslh -} diff --git a/net/sslh/patches/001-no_sslh_select.patch b/net/sslh/patches/001-no_sslh_select.patch deleted file mode 100644 index 2b461f6..0000000 --- a/net/sslh/patches/001-no_sslh_select.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -45,16 +45,12 @@ all: sslh $(MAN) echosrv - version.h: - ./genver.sh >version.h - --sslh: sslh-fork sslh-select -+sslh: sslh-fork - - sslh-fork: version.h $(OBJS) sslh-fork.o Makefile common.h - $(CC) $(CFLAGS) $(LDFLAGS) -o sslh-fork sslh-fork.o $(OBJS) $(LIBS) - #strip sslh-fork - --sslh-select: version.h $(OBJS) sslh-select.o Makefile common.h -- $(CC) $(CFLAGS) $(LDFLAGS) -o sslh-select sslh-select.o $(OBJS) $(LIBS) -- #strip sslh-select -- - echosrv: $(OBJS) echosrv.o - $(CC) $(CFLAGS) $(LDFLAGS) -o echosrv echosrv.o probe.o common.o $(LIBS) - -@@ -85,7 +81,7 @@ distclean: clean - rm -f tags cscope.* - - clean: -- rm -f sslh-fork sslh-select echosrv version.h $(MAN) *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info -+ rm -f sslh-fork echosrv version.h $(MAN) *.o *.gcov *.gcno *.gcda *.png *.html *.css *.info - - tags: - ctags --globals -T *.[ch] diff --git a/net/sslh/patches/002-no_regex_probes.patch b/net/sslh/patches/002-no_regex_probes.patch deleted file mode 100644 index 130c311..0000000 --- a/net/sslh/patches/002-no_regex_probes.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 3aefaf300478cd6fbc4892d5baaf70521ed323af Mon Sep 17 00:00:00 2001 -From: Yves Rutschle -Date: Thu, 9 Jul 2015 15:31:42 +0200 -Subject: [PATCH] Added Makefile option to build without libpcre - ---- ---- a/Makefile -+++ b/Makefile -@@ -2,6 +2,7 @@ - - VERSION=$(shell ./genver.sh -r) - USELIBCONFIG=1 # Use libconfig? (necessary to use configuration files) -+USELIBPCRE=1 # Use libpcre? (necessary to use regex probe) - USELIBWRAP?= # Use libwrap? - USELIBCAP= # Use libcap? - COV_TEST= # Perform test coverage? -@@ -27,6 +28,10 @@ ifneq ($(strip $(USELIBWRAP)),) - CPPFLAGS+=-DLIBWRAP - endif - -+ifneq ($(strip $(USELIBPCRE)),) -+ CPPFLAGS+=-DLIBPCRE -+endif -+ - ifneq ($(strip $(USELIBCONFIG)),) - LIBS:=$(LIBS) -lconfig - CPPFLAGS+=-DLIBCONFIG ---- a/probe.c -+++ b/probe.c -@@ -21,7 +21,9 @@ - - #define _GNU_SOURCE - #include -+#ifdef LIBPCRE - #include -+#endif - #include - #include "probe.h" - -@@ -226,6 +228,7 @@ static int is_tls_protocol(const char *p - - static int regex_probe(const char *p, int len, struct proto *proto) - { -+#ifdef LIBPCRE - regex_t **probe = proto->data; - regmatch_t pos = { 0, len }; - -@@ -233,6 +236,11 @@ static int regex_probe(const char *p, in - /* try them all */; - - return (*probe != NULL); -+#else -+ /* Should never happen as we check when loading config file */ -+ fprintf(stderr, "FATAL: regex probe called but not built in\n"); -+ exit(5); -+#endif - } - - /* ---- a/sslh-main.c -+++ b/sslh-main.c -@@ -25,7 +25,9 @@ - #ifdef LIBCONFIG - #include - #endif -+#ifdef LIBPCRE - #include -+#endif - - #include "common.h" - #include "probe.h" -@@ -174,6 +176,7 @@ static int config_listen(config_t *confi - #ifdef LIBCONFIG - static void setup_regex_probe(struct proto *p, config_setting_t* probes) - { -+#ifdef LIBPCRE - int num_probes, errsize, i, res; - char *err; - const char * expr; -@@ -201,6 +204,10 @@ static void setup_regex_probe(struct pro - exit(1); - } - } -+#else -+ fprintf(stderr, "line %d: regex probe specified but not compiled in\n", config_setting_source_line(probes)); -+ exit(5); -+#endif - } - #endif - diff --git a/net/sstp-client/Makefile b/net/sstp-client/Makefile deleted file mode 100644 index 081c324..0000000 --- a/net/sstp-client/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sstp-client -PKG_VERSION:=1.0.11 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/sstp-client/$(PKG_VERSION) -PKG_MD5SUM:=4ddbc2fe33eb27d5a4f38d2241005970 -PKG_LICENSE=GPLv2 - -include $(INCLUDE_DIR)/package.mk - -TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)/include - -define Package/sstp-client - SECTION:=net - CATEGORY:=Network - SUBMENU:=VPN - DEPENDS=+libevent2 +libopenssl +ppp - TITLE:=SSTP-Client is a SSTP client for Linux. - URL:=http://sstp-client.sourceforge.net/ - MAINTAINER:=Federico Di Marco -endef - -define Package/sstp-client/description -The advantage of SSTP compared to other vpn protocols like PPTP and L2TP is that it cannot be easily blocked by firewalls since the traffic is transmitted over HTTPS on port 443. -This software has a similar commandline and configuration to the standard linux pptp-client software. - -Features: -- Connect to Microsoft RAS network using SSTP -- Use HTTPS with strong encryption over port 443 -- Asynchronous HDLC frame support -- Integration with pon/poff - -endef - -define Package/sstp-client/conffiles -/etc/ppp/chap-secrets -/etc/ppp/peers/peer-sstp-example-nopty.txt -/etc/ppp/peers/peer-sstp-example.txt -endef - -define Package/sstp-client/install - $(INSTALL_DIR) $(1)/usr/{bin,lib} - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/sstpc $(1)/usr/bin/ - $(CP) $(PKG_BUILD_DIR)/src/libsstp-api/.libs/*.so* $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/src/pppd-plugin/.libs/*.so* $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/etc - $(CP) files/etc $(1) -endef - -$(eval $(call BuildPackage,sstp-client)) diff --git a/net/sstp-client/files/etc/ppp/chap-secrets b/net/sstp-client/files/etc/ppp/chap-secrets deleted file mode 100644 index 3b93768..0000000 --- a/net/sstp-client/files/etc/ppp/chap-secrets +++ /dev/null @@ -1,4 +0,0 @@ -# Secrets for authentication using CHAP -# client (domain\\username) server secret (password) acceptable local IP addresses -# SSTP-TEST\\JonDoe sstp-test 'testme1234!' * - diff --git a/net/sstp-client/files/etc/ppp/peers/peer-sstp-example-nopty.txt b/net/sstp-client/files/etc/ppp/peers/peer-sstp-example-nopty.txt deleted file mode 100644 index 0149220..0000000 --- a/net/sstp-client/files/etc/ppp/peers/peer-sstp-example-nopty.txt +++ /dev/null @@ -1,14 +0,0 @@ -remotename sstp-test -linkname sstp-test -ipparam sstp-test -name SSTP-TEST\\jdoe -plugin sstp-pppd-plugin.so -sstp-sock /tmp/sstp-uds-sock -usepeerdns -require-mppe -noauth -refuse-eap -debug - -# adopt defaults from the pptp-linux package -file /etc/ppp/options.pptp diff --git a/net/sstp-client/files/etc/ppp/peers/peer-sstp-example.txt b/net/sstp-client/files/etc/ppp/peers/peer-sstp-example.txt deleted file mode 100644 index e96e188..0000000 --- a/net/sstp-client/files/etc/ppp/peers/peer-sstp-example.txt +++ /dev/null @@ -1,15 +0,0 @@ -remotename sstp-test -linkname sstp-test -ipparam sstp-test -pty "sstpc --server n3zz-dc1.sstp-test.net --nolaunchpppd " -name SSTP-TEST\\jdoe -plugin sstp-pppd-plugin.so -sstp-sock /tmp/sstpc-uds-sock -usepeerdns -require-mppe -refuse-eap -noauth -debug - -# adopt defaults from the pptp-linux package -file /etc/ppp/options.pptp diff --git a/net/sstp-client/patches/100-musl-compat.patch b/net/sstp-client/patches/100-musl-compat.patch deleted file mode 100644 index d19b2fa..0000000 --- a/net/sstp-client/patches/100-musl-compat.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- /dev/null -+++ b/include/net/ppp_defs.h -@@ -0,0 +1,10 @@ -+#ifndef _NET_PPP_DEFS_H -+#define _NET_PPP_DEFS_H 1 -+ -+#define __need_time_t -+#include -+ -+#include -+#include -+ -+#endif /* net/ppp_defs.h */ ---- a/src/libsstp-log/sstp-log-syslog.c -+++ b/src/libsstp-log/sstp-log-syslog.c -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - #include - - #include ---- a/src/libsstp-log/sstp-log-std.c -+++ b/src/libsstp-log/sstp-log-std.c -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - #include - #include - diff --git a/net/strongswan/Config.in b/net/strongswan/Config.in deleted file mode 100644 index 5bb78ae..0000000 --- a/net/strongswan/Config.in +++ /dev/null @@ -1,16 +0,0 @@ -menu "Configuration" - depends on PACKAGE_strongswan - -# --with-routing-table -config STRONGSWAN_ROUTING_TABLE - string - prompt "Set the IPsec routing table ID" - default "220" - -# --with-routing-table-prio -config STRONGSWAN_ROUTING_TABLE_PRIO - string - prompt "Set the IPsec routing table priority" - default "220" - -endmenu diff --git a/net/strongswan/Makefile b/net/strongswan/Makefile deleted file mode 100644 index 5289d3f..0000000 --- a/net/strongswan/Makefile +++ /dev/null @@ -1,577 +0,0 @@ -# -# Copyright (C) 2012-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=strongswan -PKG_VERSION:=5.5.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://download.strongswan.org/ http://download2.strongswan.org/ -PKG_MD5SUM:=4eba9474f7dc6c8c8d7037261358e68d -PKG_LICENSE:=GPL-2.0+ -PKG_MAINTAINER:=Stijn Tintel - -PKG_MOD_AVAILABLE:= \ - addrblock \ - aes \ - af-alg \ - agent \ - attr \ - attr-sql \ - blowfish \ - ccm \ - cmac \ - constraints \ - connmark \ - coupling \ - ctr \ - curl \ - des \ - dhcp \ - dnskey \ - duplicheck \ - eap-identity \ - eap-md5 \ - eap-mschapv2 \ - eap-radius \ - eap-tls \ - farp \ - fips-prf \ - forecast \ - gcm \ - gcrypt \ - gmp \ - gmpdh \ - ha \ - hmac \ - kernel-libipsec \ - kernel-netlink \ - ldap \ - led \ - load-tester \ - nonce \ - md4 \ - md5 \ - mysql \ - openssl \ - pem \ - pgp \ - pkcs1 \ - pkcs7 \ - pkcs8 \ - pkcs11 \ - pkcs12 \ - pubkey \ - random \ - rc2 \ - resolve \ - revocation \ - sha1 \ - sha2 \ - smp \ - socket-default \ - socket-dynamic \ - sql \ - sqlite \ - sshkey \ - stroke \ - test-vectors \ - unity \ - uci \ - updown \ - whitelist \ - x509 \ - xauth-eap \ - xauth-generic \ - xcbc - -PKG_CONFIG_DEPENDS:= \ - CONFIG_STRONGSWAN_ROUTING_TABLE \ - CONFIG_STRONGSWAN_ROUTING_TABLE_PRIO \ - $(patsubst %,CONFIG_PACKAGE_strongswan-mod-%,$(PKG_MOD_AVAILABLE)) \ - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/strongswan/Default - SUBMENU:=VPN - SECTION:=net - CATEGORY:=Network - TITLE:=StrongSwan - URL:=http://www.strongswan.org/ -endef - -define Package/strongswan/description/Default - StrongSwan is an OpenSource IPsec implementation for the Linux operating system. -endef - -define Package/strongswan -$(call Package/strongswan/Default) - DEPENDS:= +libpthread +ip \ - +kmod-crypto-authenc \ - +kmod-ipsec +kmod-ipsec4 +IPV6:kmod-ipsec6 \ - +kmod-ipt-ipsec +iptables-mod-ipsec -endef - -define Package/strongswan/config - source "$(SOURCE)/Config.in" -endef - -define Package/strongswan/description -$(call Package/strongswan/description/Default) - This package contains shared libraries and scripts. -endef - -define Package/strongswan-full -$(call Package/strongswan/Default) - TITLE+= (full) - DEPENDS:= +strongswan \ - +strongswan-charon \ - +strongswan-mod-addrblock \ - +strongswan-mod-aes \ - +strongswan-mod-af-alg \ - +strongswan-mod-agent \ - +strongswan-mod-attr \ - +strongswan-mod-attr-sql \ - +strongswan-mod-blowfish \ - +strongswan-mod-ccm \ - +strongswan-mod-cmac \ - +strongswan-mod-constraints \ - +strongswan-mod-connmark \ - +strongswan-mod-coupling \ - +strongswan-mod-ctr \ - +strongswan-mod-curl \ - +strongswan-mod-des \ - +strongswan-mod-dhcp \ - +strongswan-mod-dnskey \ - +strongswan-mod-duplicheck \ - +strongswan-mod-eap-identity \ - +strongswan-mod-eap-md5 \ - +strongswan-mod-eap-mschapv2 \ - +strongswan-mod-eap-radius \ - +strongswan-mod-eap-tls \ - +strongswan-mod-farp \ - +strongswan-mod-fips-prf \ - +strongswan-mod-forecast \ - +strongswan-mod-gcm \ - +strongswan-mod-gcrypt \ - +strongswan-mod-gmp \ - +strongswan-mod-ha \ - +strongswan-mod-hmac \ - +strongswan-mod-kernel-netlink \ - +strongswan-mod-ldap \ - +strongswan-mod-led \ - +strongswan-mod-load-tester \ - +strongswan-mod-nonce \ - +strongswan-mod-md4 \ - +strongswan-mod-md5 \ - +strongswan-mod-mysql \ - +strongswan-mod-openssl \ - +strongswan-mod-pem \ - +strongswan-mod-pgp \ - +strongswan-mod-pkcs1 \ - +strongswan-mod-pkcs7 \ - +strongswan-mod-pkcs8 \ - +strongswan-mod-pkcs11 \ - +strongswan-mod-pkcs12 \ - +strongswan-mod-pubkey \ - +strongswan-mod-random \ - +strongswan-mod-rc2 \ - +strongswan-mod-resolve \ - +strongswan-mod-revocation \ - +strongswan-mod-sha1 \ - +strongswan-mod-sha2 \ - +strongswan-mod-smp \ - +strongswan-mod-socket-default \ - +strongswan-mod-sql \ - +strongswan-mod-sqlite \ - +strongswan-mod-sshkey \ - +strongswan-mod-stroke \ - +strongswan-mod-test-vectors \ - +strongswan-mod-uci \ - +strongswan-mod-unity \ - +strongswan-mod-updown \ - +strongswan-mod-whitelist \ - +strongswan-mod-x509 \ - +strongswan-mod-xauth-eap \ - +strongswan-mod-xauth-generic \ - +strongswan-mod-xcbc \ - +strongswan-utils \ - @DEVEL -endef - -define Package/strongswan-full/description -$(call Package/strongswan/description/Default) - This meta-package contains dependencies for all of the strongswan plugins - except kernel-libipsec, - socket-dynamic and which are omitted in favor of the kernel-netlink and - socket-default plugins. -endef - - -define Package/strongswan-default -$(call Package/strongswan/Default) - TITLE+= (default) - DEPENDS:= +strongswan \ - +strongswan-charon \ - +strongswan-mod-aes \ - +strongswan-mod-attr \ - +strongswan-mod-connmark \ - +strongswan-mod-constraints \ - +strongswan-mod-des \ - +strongswan-mod-dnskey \ - +strongswan-mod-fips-prf \ - +strongswan-mod-gmp \ - +strongswan-mod-hmac \ - +strongswan-mod-kernel-netlink \ - +strongswan-mod-md5 \ - +strongswan-mod-nonce \ - +strongswan-mod-pem \ - +strongswan-mod-pgp \ - +strongswan-mod-pkcs1 \ - +strongswan-mod-pubkey \ - +strongswan-mod-random \ - +strongswan-mod-rc2 \ - +strongswan-mod-resolve \ - +strongswan-mod-revocation \ - +strongswan-mod-sha1 \ - +strongswan-mod-sha2 \ - +strongswan-mod-socket-default \ - +strongswan-mod-sshkey \ - +strongswan-mod-stroke \ - +strongswan-mod-updown \ - +strongswan-mod-x509 \ - +strongswan-mod-xauth-generic \ - +strongswan-mod-xcbc \ - +strongswan-utils -endef - -define Package/strongswan-default/description -$(call Package/strongswan/description/Default) - This meta-package contains only dependencies to match upstream defaults. -endef - - -define Package/strongswan-isakmp -$(call Package/strongswan/Default) - TITLE+= (isakmp) - DEPENDS:= +strongswan \ - +strongswan-charon \ - +strongswan-mod-aes \ - +strongswan-mod-des \ - +strongswan-mod-gmpdh \ - +strongswan-mod-hmac \ - +strongswan-mod-kernel-netlink \ - +strongswan-mod-md5 \ - +strongswan-mod-nonce \ - +strongswan-mod-pubkey \ - +strongswan-mod-random \ - +strongswan-mod-sha1 \ - +strongswan-mod-socket-default \ - +strongswan-mod-stroke \ - +strongswan-mod-uci \ - +strongswan-mod-updown \ - +strongswan-utils -endef - -define Package/strongswan-isakmp/description -$(call Package/strongswan/description/Default) - This meta-package contains only dependencies to establish ISAKMP / - IKE PSK connections, dropping other capabilities in favor of small size - Can fit most routers even with 4Mb flash (after removing IPv6 support). -endef - - -define Package/strongswan-minimal -$(call Package/strongswan/Default) - TITLE+= (minimal) - DEPENDS:= +strongswan \ - +strongswan-charon \ - +strongswan-mod-aes \ - +strongswan-mod-gmp \ - +strongswan-mod-hmac \ - +strongswan-mod-kernel-netlink \ - +strongswan-mod-nonce \ - +strongswan-mod-pubkey \ - +strongswan-mod-random \ - +strongswan-mod-sha1 \ - +strongswan-mod-socket-default \ - +strongswan-mod-stroke \ - +strongswan-mod-updown \ - +strongswan-mod-x509 \ - +strongswan-mod-xcbc -endef - -define Package/strongswan-minimal/description -$(call Package/strongswan/description/Default) - This meta-package contains only dependencies for a minimal IKEv2 setup. -endef - -define Package/strongswan-charon -$(call Package/strongswan/Default) - TITLE+= IKEv1/IKEv2 keying daemon - DEPENDS:= +strongswan -endef - -define Package/strongswan-charon/description -$(call Package/strongswan/description/Default) - This package contains charon, an IKEv2 keying daemon. -endef - -define Package/strongswan-utils -$(call Package/strongswan/Default) - TITLE+= utilities - DEPENDS:= +strongswan -endef - -define Package/strongswan-utils/description -$(call Package/strongswan/description/Default) - This package contains the pki & scepclient utilities. -endef - -define Package/strongswan-libtls -$(call Package/strongswan/Default) - TITLE+= libtls - DEPENDS:= +strongswan -endef - -define Package/strongswan-libtls/description -$(call Package/strongswan/description/Default) - This package contains libtls for strongSwan plugins eap-tls, eap-ttls, - eap-peap, tnc-tnccs -endef - -define BuildPlugin - define Package/strongswan-mod-$(1) - $$(call Package/strongswan/Default) - TITLE:= StrongSwan $(2) plugin - DEPENDS:= +strongswan $(3) - endef - - define Package/strongswan-mod-$(1)/install - $(INSTALL_DIR) $$(1)/etc/strongswan.d/charon - if [ -f $(PKG_INSTALL_DIR)/etc/strongswan.d/charon/$(1).conf ]; then \ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/strongswan.d/charon/$(1).conf $$(1)/etc/strongswan.d/charon/; fi - $(INSTALL_DIR) $$(1)/usr/lib/ipsec/plugins - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-$(1).so \ - $$(1)/usr/lib/ipsec/plugins/ - $(call Plugin/$(1)/install,$$(1)) - endef - - $$(eval $$(call BuildPackage,strongswan-mod-$(1))) -endef - -CONFIGURE_ARGS+= \ - --disable-scripts \ - --disable-static \ - --disable-fast \ - --enable-mediation \ - --with-systemdsystemunitdir=no \ - $(if $(CONFIG_PACKAGE_strongswan-utils),--enable-pki --enable-scepclient,--disable-pki --disable-scepclient) \ - --with-random-device=/dev/random \ - --with-urandom-device=/dev/urandom \ - --with-routing-table="$(call qstrip,$(CONFIG_STRONGSWAN_ROUTING_TABLE))" \ - --with-routing-table-prio="$(call qstrip,$(CONFIG_STRONGSWAN_ROUTING_TABLE_PRIO))" \ - $(foreach m,$(PKG_MOD_AVAILABLE), \ - $(if $(CONFIG_PACKAGE_strongswan-mod-$(m)),--enable-$(m),--disable-$(m)) \ - ) \ - ac_cv_search___atomic_load=no - -EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib - -define Package/strongswan/conffiles -/etc/ipsec.d/ -/etc/ipsec.conf -/etc/ipsec.secrets -/etc/ipsec.user -/etc/strongswan.conf -/etc/strongswan.d/ -endef - -define Package/strongswan/install - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ipsec.conf $(1)/etc/ - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/strongswan.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/usr/lib/ipsec - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libstrongswan.so.* $(1)/usr/lib/ipsec/ - $(INSTALL_CONF) ./files/ipsec.secrets $(1)/etc/ - $(INSTALL_CONF) ./files/ipsec.user $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec -endef - -define Package/strongswan-default/install - true -endef - -define Package/strongswan-full/install - true -endef - -define Package/strongswan-isakmp/install - true -endef - -define Package/strongswan-minimal/install - true -endef - -define Package/strongswan-charon/install - $(INSTALL_DIR) $(1)/usr/lib/ipsec - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/charon $(1)/usr/lib/ipsec/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libcharon.so.* $(1)/usr/lib/ipsec/ -endef - -define Package/strongswan-utils/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ipsec $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pki $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib/ipsec - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/scepclient $(1)/usr/lib/ipsec/ -endef - -define Package/strongswan-libtls/install - $(INSTALL_DIR) $(1)/usr/lib/ipsec - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libtls.so.* $(1)/usr/lib/ipsec/ -endef - -define Plugin/duplicheck/install - $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/duplicheck $(1)/usr/lib/ipsec/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-duplicheck.so $(1)/usr/lib/ipsec/plugins/ -endef - -define Plugin/eap-radius/install - $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libradius.so.* $(1)/usr/lib/ipsec/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-eap-radius.so $(1)/usr/lib/ipsec/plugins/ -endef - -define Plugin/attr-sql/install - $(INSTALL_DIR) $(1)/usr/lib/ipsec - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/pool $(1)/usr/lib/ipsec/ -endef - -define Plugin/stroke/install - $(INSTALL_DIR) $(1)/etc/ipsec.d/aacerts - $(INSTALL_DIR) $(1)/etc/ipsec.d/acerts - $(INSTALL_DIR) $(1)/etc/ipsec.d/cacerts - $(INSTALL_DIR) $(1)/etc/ipsec.d/certs - $(INSTALL_DIR) $(1)/etc/ipsec.d/crls - $(INSTALL_DIR) $(1)/etc/ipsec.d/ocspcerts - $(INSTALL_DIR) $(1)/etc/ipsec.d/private - $(INSTALL_DIR) $(1)/etc/ipsec.d/reqs - - $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{starter,stroke} $(1)/usr/lib/ipsec/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-stroke.so $(1)/usr/lib/ipsec/plugins/ -endef - -define Plugin/updown/install - $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/_updown $(1)/usr/lib/ipsec/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-updown.so $(1)/usr/lib/ipsec/plugins/ - $(INSTALL_DIR) $(1)/etc -endef - -define Plugin/whitelist/install - $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/whitelist $(1)/usr/lib/ipsec/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-whitelist.so $(1)/usr/lib/ipsec/plugins/ -endef - -define Plugin/kernel-libipsec/install - $(INSTALL_DIR) $(1)/usr/lib/ipsec - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libipsec.so.* $(1)/usr/lib/ipsec/ -endef - -$(eval $(call BuildPackage,strongswan)) -$(eval $(call BuildPackage,strongswan-default)) -$(eval $(call BuildPackage,strongswan-full)) -$(eval $(call BuildPackage,strongswan-minimal)) -$(eval $(call BuildPackage,strongswan-isakmp)) -$(eval $(call BuildPackage,strongswan-charon)) -$(eval $(call BuildPackage,strongswan-utils)) -$(eval $(call BuildPackage,strongswan-libtls)) -$(eval $(call BuildPlugin,addrblock,RFC 3779 address block constraint support,)) -$(eval $(call BuildPlugin,aes,AES crypto,)) -$(eval $(call BuildPlugin,af-alg,AF_ALG crypto interface to Linux Crypto API,+kmod-crypto-user)) -$(eval $(call BuildPlugin,agent,SSH agent signing,)) -$(eval $(call BuildPlugin,attr,file based config,)) -$(eval $(call BuildPlugin,attr-sql,SQL based config,+strongswan-charon)) -$(eval $(call BuildPlugin,blowfish,Blowfish crypto,)) -$(eval $(call BuildPlugin,ccm,CCM AEAD wrapper crypto,)) -$(eval $(call BuildPlugin,cmac,CMAC crypto,)) -$(eval $(call BuildPlugin,connmark,netfilter connection marking,)) -$(eval $(call BuildPlugin,constraints,advanced X509 constraint checking,)) -$(eval $(call BuildPlugin,coupling,IKEv2 plugin to couple peer certificates permanently to authentication,)) -$(eval $(call BuildPlugin,ctr,Counter Mode wrapper crypto,)) -$(eval $(call BuildPlugin,curl,cURL fetcher plugin,+PACKAGE_strongswan-mod-curl:libcurl)) -$(eval $(call BuildPlugin,des,DES crypto,)) -$(eval $(call BuildPlugin,dhcp,DHCP based attribute provider,)) -$(eval $(call BuildPlugin,dnskey,DNS RR key decoding,)) -$(eval $(call BuildPlugin,duplicheck,advanced duplicate checking,)) -$(eval $(call BuildPlugin,eap-identity,EAP identity helper,)) -$(eval $(call BuildPlugin,eap-md5,EAP MD5 (CHAP) EAP auth,)) -$(eval $(call BuildPlugin,eap-mschapv2,EAP MS-CHAPv2 EAP auth,+strongswan-mod-md4 +strongswan-mod-des)) -$(eval $(call BuildPlugin,eap-radius,EAP RADIUS auth,)) -$(eval $(call BuildPlugin,eap-tls,EAP TLS auth,+strongswan-libtls)) -$(eval $(call BuildPlugin,farp,fake arp respsonses,)) -$(eval $(call BuildPlugin,fips-prf,FIPS PRF crypto,+strongswan-mod-sha1)) -$(eval $(call BuildPlugin,forecast,forward multi/broadcast traffic,+kmod-ipt-conntrack-extra)) -$(eval $(call BuildPlugin,gcm,GCM AEAD wrapper crypto,)) -$(eval $(call BuildPlugin,gcrypt,libgcrypt,+PACKAGE_strongswan-mod-gcrypt:libgcrypt)) -$(eval $(call BuildPlugin,gmp,libgmp,+PACKAGE_strongswan-mod-gmp:libgmp)) -$(eval $(call BuildPlugin,gmpdh,DH-Groups; no libgmp dep,)) -$(eval $(call BuildPlugin,ha,high availability cluster,)) -$(eval $(call BuildPlugin,hmac,HMAC crypto,)) -$(eval $(call BuildPlugin,kernel-libipsec,libipsec kernel interface,)) -$(eval $(call BuildPlugin,kernel-netlink,netlink kernel interface,)) -$(eval $(call BuildPlugin,ldap,LDAP,+PACKAGE_strongswan-mod-ldap:libopenldap)) -$(eval $(call BuildPlugin,led,LED blink on IKE activity,)) -$(eval $(call BuildPlugin,load-tester,load testing,)) -$(eval $(call BuildPlugin,nonce,nonce genereation,)) -$(eval $(call BuildPlugin,md4,MD4 crypto,)) -$(eval $(call BuildPlugin,md5,MD5 crypto,)) -$(eval $(call BuildPlugin,mysql,MySQL database interface,+strongswan-mod-sql +PACKAGE_strongswan-mod-mysql:libmysqlclient-r)) -$(eval $(call BuildPlugin,openssl,OpenSSL crypto,+PACKAGE_strongswan-mod-openssl:libopenssl)) -$(eval $(call BuildPlugin,pem,PEM decoding,)) -$(eval $(call BuildPlugin,pgp,PGP key decoding,)) -$(eval $(call BuildPlugin,pkcs1,PKCS1 key decoding,)) -$(eval $(call BuildPlugin,pkcs7,PKCS7 key decoding,)) -$(eval $(call BuildPlugin,pkcs8,PKCS8 key decoding,)) -$(eval $(call BuildPlugin,pkcs11,PKCS11 key decoding,)) -$(eval $(call BuildPlugin,pkcs12,PKCS12 key decoding,)) -$(eval $(call BuildPlugin,pubkey,raw public key,)) -$(eval $(call BuildPlugin,random,RNG,)) -$(eval $(call BuildPlugin,rc2,RC2 crypto,)) -$(eval $(call BuildPlugin,resolve,DNS resolver,)) -$(eval $(call BuildPlugin,revocation,X509 CRL/OCSP revocation,)) -$(eval $(call BuildPlugin,sha1,SHA1 crypto,)) -$(eval $(call BuildPlugin,sha2,SHA2 crypto,)) -$(eval $(call BuildPlugin,smp,SMP configuration and control interface,+PACKAGE_strongswan-mod-smp:libxml2)) -$(eval $(call BuildPlugin,socket-default,default socket implementation for charon,)) -$(eval $(call BuildPlugin,socket-dynamic,dynamic socket implementation for charon,)) -$(eval $(call BuildPlugin,sql,SQL database interface,)) -$(eval $(call BuildPlugin,sqlite,SQLite database interface,+strongswan-mod-sql +PACKAGE_strongswan-mod-sqlite:libsqlite3)) -$(eval $(call BuildPlugin,sshkey,SSH key decoding,)) -$(eval $(call BuildPlugin,stroke,Stroke,+strongswan-charon +strongswan-utils)) -$(eval $(call BuildPlugin,test-vectors,crypto test vectors,)) -$(eval $(call BuildPlugin,uci,UCI config interface,+PACKAGE_strongswan-mod-uci:libuci)) -$(eval $(call BuildPlugin,unity,Cisco Unity extension,)) -$(eval $(call BuildPlugin,updown,updown firewall,)) -$(eval $(call BuildPlugin,whitelist,peer identity whitelisting,)) -$(eval $(call BuildPlugin,x509,x509 certificate,)) -$(eval $(call BuildPlugin,xauth-eap,EAP XAuth backend,)) -$(eval $(call BuildPlugin,xauth-generic,generic XAuth backend,)) -$(eval $(call BuildPlugin,xcbc,xcbc crypto,)) diff --git a/net/strongswan/files/ipsec.init b/net/strongswan/files/ipsec.init deleted file mode 100644 index 391a2ae..0000000 --- a/net/strongswan/files/ipsec.init +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=90 -STOP=10 - -start() { - ipsec start -} - -stop() { - ipsec stop -} - -restart() { - ipsec restart -} - -reload() { - ipsec update -} diff --git a/net/strongswan/files/ipsec.secrets b/net/strongswan/files/ipsec.secrets deleted file mode 100644 index ddd4956..0000000 --- a/net/strongswan/files/ipsec.secrets +++ /dev/null @@ -1 +0,0 @@ -# /etc/ipsec.secrets - strongSwan IPsec secrets file diff --git a/net/strongswan/files/ipsec.user b/net/strongswan/files/ipsec.user deleted file mode 100644 index 4351ace..0000000 --- a/net/strongswan/files/ipsec.user +++ /dev/null @@ -1,6 +0,0 @@ -# This file is interpreted as shell script. -# Put your custom ip rules here, they will -# be executed with each call to the script -# /usr/lib/ipsec/_updown which by default -# strongswan executes. - diff --git a/net/strongswan/patches/101-musl-fixes.patch b/net/strongswan/patches/101-musl-fixes.patch deleted file mode 100644 index e48d22b..0000000 --- a/net/strongswan/patches/101-musl-fixes.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- a/src/libstrongswan/library.h -+++ b/src/libstrongswan/library.h -@@ -118,6 +118,7 @@ - #include "utils/leak_detective.h" - #include "plugins/plugin_loader.h" - #include "settings/settings.h" -+#include "musl.h" - - typedef struct library_t library_t; - ---- /dev/null -+++ b/src/libstrongswan/musl.h -@@ -0,0 +1,38 @@ -+#include -+ -+#define crypt x_crypt -+#define encrypt x_encrypt -+#include -+ -+#define fd_set x_fd_set -+#define ino_t x_ino_t -+#define off_t x_off_t -+#define loff_t x_loff_t -+#define dev_t x_dev_t -+#define mode_t x_mode_t -+#define uid_t x_uid_t -+#define gid_t x_gid_t -+#define uint64_t x_uint64_t -+#define u_int64_t x_u_int64_t -+#define int64_t x_int64_t -+#define nlink_t x_nlink_t -+#define timer_t x_timer_t -+#define blkcnt_t x_blkcnt_t -+ -+#include -+ -+#undef fd_set -+#undef ino_t -+#undef off_t -+#undef dev_t -+#undef mode_t -+#undef uid_t -+#undef gid_t -+#undef uint64_t -+#undef u_int64_t -+#undef int64_t -+#undef nlink_t -+#undef timer_t -+#undef blkcnt_t -+#undef crypt -+#undef encrypt ---- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c -+++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c -@@ -19,6 +19,7 @@ - */ - - #define _GNU_SOURCE -+#include - #include - #include - #include ---- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c -+++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c -@@ -37,6 +37,8 @@ - * THE SOFTWARE. - */ - -+#include "musl.h" -+ - #include - #include - #include ---- a/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c -+++ b/src/libcharon/plugins/kernel_netlink/kernel_netlink_shared.c -@@ -15,6 +15,8 @@ - * for more details. - */ - -+#include "musl.h" -+ - #include - #include - #include diff --git a/net/strongswan/patches/201-kmodloader.patch b/net/strongswan/patches/201-kmodloader.patch deleted file mode 100644 index cd74f27..0000000 --- a/net/strongswan/patches/201-kmodloader.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/src/starter/netkey.c -+++ b/src/starter/netkey.c -@@ -30,7 +30,7 @@ bool starter_netkey_init(void) - /* af_key module makes the netkey proc interface visible */ - if (stat(PROC_MODULES, &stb) == 0) - { -- ignore_result(system("modprobe -qv af_key")); -+ ignore_result(system("modprobe af_key 2>&1 >/dev/null")); - } - - /* now test again */ -@@ -44,11 +44,11 @@ bool starter_netkey_init(void) - /* make sure that all required IPsec modules are loaded */ - if (stat(PROC_MODULES, &stb) == 0) - { -- ignore_result(system("modprobe -qv ah4")); -- ignore_result(system("modprobe -qv esp4")); -- ignore_result(system("modprobe -qv ipcomp")); -- ignore_result(system("modprobe -qv xfrm4_tunnel")); -- ignore_result(system("modprobe -qv xfrm_user")); -+ ignore_result(system("modprobe ah4 2>&1 >/dev/null")); -+ ignore_result(system("modprobe esp4 2>&1 >/dev/null")); -+ ignore_result(system("modprobe ipcomp 2>&1 >/dev/null")); -+ ignore_result(system("modprobe xfrm4_tunnel 2>&1 >/dev/null")); -+ ignore_result(system("modprobe xfrm_user 2>&1 >/dev/null")); - } - - DBG2(DBG_APP, "found netkey IPsec stack"); diff --git a/net/strongswan/patches/203-uci.patch b/net/strongswan/patches/203-uci.patch deleted file mode 100644 index 274ea86..0000000 --- a/net/strongswan/patches/203-uci.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/libcharon/plugins/uci/uci_parser.c -+++ b/src/libcharon/plugins/uci/uci_parser.c -@@ -78,7 +78,7 @@ METHOD(enumerator_t, section_enumerator_ - if (uci_lookup(this->ctx, &element, this->package, - this->current->name, "name") == UCI_OK) - { /* use "name" attribute as config name if available ... */ -- *value = uci_to_option(element)->value; -+ *value = uci_to_option(element)->v.string; - } - else - { /* ... or the section name becomes config name */ -@@ -93,7 +93,7 @@ METHOD(enumerator_t, section_enumerator_ - if (value && uci_lookup(this->ctx, &element, this->package, - this->current->name, this->keywords[i]) == UCI_OK) - { -- *value = uci_to_option(element)->value; -+ *value = uci_to_option(element)->v.string; - } - } - va_end(args); diff --git a/net/strongswan/patches/210-sleep.patch b/net/strongswan/patches/210-sleep.patch deleted file mode 100644 index d8adec3..0000000 --- a/net/strongswan/patches/210-sleep.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/ipsec/_ipsec.in -+++ b/src/ipsec/_ipsec.in -@@ -259,7 +259,7 @@ stop) - loop=110 - while [ $loop -gt 0 ] ; do - kill -0 $spid 2>/dev/null || break -- sleep 0.1 2>/dev/null -+ sleep 1 2>/dev/null - if [ $? -ne 0 ] - then - sleep 1 diff --git a/net/strongswan/patches/300-include-ipsec-user-script.patch b/net/strongswan/patches/300-include-ipsec-user-script.patch deleted file mode 100644 index 6835e02..0000000 --- a/net/strongswan/patches/300-include-ipsec-user-script.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/src/_updown/_updown.in -+++ b/src/_updown/_updown.in -@@ -16,11 +16,9 @@ - # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - # for more details. - --# CAUTION: Installing a new version of strongSwan will install a new --# copy of this script, wiping out any custom changes you make. If --# you need changes, make a copy of this under another name, and customize --# that, and use the (left/right)updown parameters in ipsec.conf to make --# strongSwan use yours instead of this default one. -+# Add your custom ip rules to the /etc/ipsec.user file if you need that functionality. -+ -+[ -e /etc/ipsec.user ] && . /etc/ipsec.user "$1" - - # PLUTO_VERSION - # indicates what version of this interface is being diff --git a/net/strongswan/patches/305-minimal_dh_plugin.patch b/net/strongswan/patches/305-minimal_dh_plugin.patch deleted file mode 100644 index 597510f..0000000 --- a/net/strongswan/patches/305-minimal_dh_plugin.patch +++ /dev/null @@ -1,221 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -133,6 +133,7 @@ ARG_DISBL_SET([fips-prf], [disable - ARG_ENABL_SET([gcm], [enables the GCM AEAD wrapper crypto plugin.]) - ARG_ENABL_SET([gcrypt], [enables the libgcrypt plugin.]) - ARG_DISBL_SET([gmp], [disable GNU MP (libgmp) based crypto implementation plugin.]) -+ARG_DISBL_SET([gmpdh], [disable GNU MP (libgmp) based static-linked crypto DH minimal implementation plugin.]) - ARG_DISBL_SET([hmac], [disable HMAC crypto implementation plugin.]) - ARG_ENABL_SET([md4], [enable MD4 software implementation plugin.]) - ARG_DISBL_SET([md5], [disable MD5 software implementation plugin.]) -@@ -1347,6 +1348,7 @@ ADD_PLUGIN([gcrypt], [s ch - ADD_PLUGIN([af-alg], [s charon scepclient pki scripts medsrv attest nm cmd aikgen]) - ADD_PLUGIN([fips-prf], [s charon nm cmd]) - ADD_PLUGIN([gmp], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen]) -+ADD_PLUGIN([gmpdh], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen]) - ADD_PLUGIN([agent], [s charon nm cmd]) - ADD_PLUGIN([keychain], [s charon cmd]) - ADD_PLUGIN([chapoly], [s charon scripts nm cmd]) -@@ -1480,6 +1482,7 @@ AM_CONDITIONAL(USE_SHA2, test x$sha2 = x - AM_CONDITIONAL(USE_SHA3, test x$sha3 = xtrue) - AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue) - AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue) -+AM_CONDITIONAL(USE_GMPDH, test x$gmpdh = xtrue) - AM_CONDITIONAL(USE_RDRAND, test x$rdrand = xtrue) - AM_CONDITIONAL(USE_AESNI, test x$aesni = xtrue) - AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue) -@@ -1733,6 +1736,7 @@ AC_CONFIG_FILES([ - src/libstrongswan/plugins/sha3/Makefile - src/libstrongswan/plugins/fips_prf/Makefile - src/libstrongswan/plugins/gmp/Makefile -+ src/libstrongswan/plugins/gmpdh/Makefile - src/libstrongswan/plugins/rdrand/Makefile - src/libstrongswan/plugins/aesni/Makefile - src/libstrongswan/plugins/random/Makefile ---- a/src/libstrongswan/Makefile.am -+++ b/src/libstrongswan/Makefile.am -@@ -307,6 +307,13 @@ if MONOLITHIC - endif - endif - -+if USE_GMPDH -+ SUBDIRS += plugins/gmpdh -+if MONOLITHIC -+ libstrongswan_la_LIBADD += plugins/gmpdh/libstrongswan-gmpdh.la -+endif -+endif -+ - if USE_RDRAND - SUBDIRS += plugins/rdrand - if MONOLITHIC ---- /dev/null -+++ b/src/libstrongswan/plugins/gmpdh/Makefile.am -@@ -0,0 +1,19 @@ -+AM_CPPFLAGS = \ -+ -I$(top_srcdir)/src/libstrongswan -+ -+AM_CFLAGS = \ -+ $(PLUGIN_CFLAGS) -+ -+if MONOLITHIC -+noinst_LTLIBRARIES = libstrongswan-gmpdh.la -+else -+plugin_LTLIBRARIES = libstrongswan-gmpdh.la -+endif -+ -+libstrongswan_gmpdh_la_SOURCES = \ -+ gmpdh_plugin.h gmpdh_plugin.c \ -+ ../gmp/gmp_diffie_hellman.c ../gmp/gmp_diffie_hellman.h -+ -+ -+libstrongswan_gmpdh_la_LDFLAGS = -module -avoid-version -Wl,-Bstatic -Wl,-lgmp -Wl,-Bdynamic -Wl,--as-needed -+libstrongswan_gmpdh_la_LIBADD = ---- /dev/null -+++ b/src/libstrongswan/plugins/gmpdh/gmpdh_plugin.c -@@ -0,0 +1,101 @@ -+/* -+ * Copyright (C) 2008-2009 Martin Willi -+ * Hochschule fuer Technik Rapperswil -+ * -+ * 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. See . -+ * -+ * 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. -+ */ -+ -+#include "gmpdh_plugin.h" -+ -+#include -+#include "../gmp/gmp_diffie_hellman.h" -+ -+typedef struct private_gmpdh_plugin_t private_gmpdh_plugin_t; -+ -+/** -+ * private data of gmp_plugin -+ */ -+struct private_gmpdh_plugin_t { -+ -+ /** -+ * public functions -+ */ -+ gmpdh_plugin_t public; -+}; -+ -+METHOD(plugin_t, get_name, char*, -+ private_gmpdh_plugin_t *this) -+{ -+ return "gmpdh"; -+} -+ -+METHOD(plugin_t, get_features, int, -+ private_gmpdh_plugin_t *this, plugin_feature_t *features[]) -+{ -+ static plugin_feature_t f[] = { -+ /* DH groups */ -+ PLUGIN_REGISTER(DH, gmp_diffie_hellman_create), -+ PLUGIN_PROVIDE(DH, MODP_2048_BIT), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ PLUGIN_PROVIDE(DH, MODP_2048_224), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ PLUGIN_PROVIDE(DH, MODP_2048_256), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ PLUGIN_PROVIDE(DH, MODP_1536_BIT), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ PLUGIN_PROVIDE(DH, MODP_3072_BIT), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ PLUGIN_PROVIDE(DH, MODP_4096_BIT), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ PLUGIN_PROVIDE(DH, MODP_6144_BIT), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ PLUGIN_PROVIDE(DH, MODP_8192_BIT), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ PLUGIN_PROVIDE(DH, MODP_1024_BIT), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ PLUGIN_PROVIDE(DH, MODP_1024_160), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ PLUGIN_PROVIDE(DH, MODP_768_BIT), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ PLUGIN_REGISTER(DH, gmp_diffie_hellman_create_custom), -+ PLUGIN_PROVIDE(DH, MODP_CUSTOM), -+ PLUGIN_DEPENDS(RNG, RNG_STRONG), -+ }; -+ *features = f; -+ return countof(f); -+} -+ -+METHOD(plugin_t, destroy, void, -+ private_gmpdh_plugin_t *this) -+{ -+ free(this); -+} -+ -+/* -+ * see header file -+ */ -+plugin_t *gmpdh_plugin_create() -+{ -+ private_gmpdh_plugin_t *this; -+ -+ INIT(this, -+ .public = { -+ .plugin = { -+ .get_name = _get_name, -+ .get_features = _get_features, -+ .destroy = _destroy, -+ }, -+ }, -+ ); -+ -+ return &this->public.plugin; -+} -+ ---- /dev/null -+++ b/src/libstrongswan/plugins/gmpdh/gmpdh_plugin.h -@@ -0,0 +1,42 @@ -+/* -+ * Copyright (C) 2008 Martin Willi -+ * Hochschule fuer Technik Rapperswil -+ * -+ * 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. See . -+ * -+ * 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. -+ */ -+ -+/** -+ * @defgroup gmpdh_p gmpdh -+ * @ingroup plugins -+ * -+ * @defgroup gmpdh_plugin gmpdh_plugin -+ * @{ @ingroup gmpdh_p -+ */ -+ -+#ifndef GMPDH_PLUGIN_H_ -+#define GMPDH_PLUGIN_H_ -+ -+#include -+ -+typedef struct gmpdh_plugin_t gmpdh_plugin_t; -+ -+/** -+ * Plugin implementing asymmetric crypto algorithms using the GNU MP library. -+ */ -+struct gmpdh_plugin_t { -+ -+ /** -+ * implements plugin interface -+ */ -+ plugin_t plugin; -+}; -+ -+#endif /** GMPDH_PLUGIN_H_ @}*/ diff --git a/net/stunnel/Makefile b/net/stunnel/Makefile deleted file mode 100644 index 0c4ec19..0000000 --- a/net/stunnel/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=stunnel -PKG_VERSION:=5.40 -PKG_RELEASE:=1 - -PKG_LICENSE:=GPL-2.0+ -PKG_MAINTAINER:=Daniel Engberg -PKG_LICENSE_FILES:=COPYING COPYRIGHT.GPL - -PKG_SOURCE_URL:= \ - http://ftp.nluug.nl/pub/networking/stunnel/ \ - http://www.usenix.org.uk/mirrors/stunnel/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=23acdb390326ffd507d90f8984ecc90e0d9993f6bd6eac1d0a642456565c45ff - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/stunnel - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libopenssl +zlib +libpthread - TITLE:=SSL TCP Wrapper - URL:=http://www.stunnel.org/ -endef - -define Package/stunnel/description - Stunnel is a program that allows you to encrypt arbitrary TCP - connections inside SSL (Secure Sockets Layer) available on both Unix - and Windows. Stunnel can allow you to secure non-SSL aware daemons and - protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the - encryption, requiring no changes to the daemon's code. -endef - -define Package/stunnel/conffiles -/etc/stunnel/stunnel.conf -endef - - -CONFIGURE_ARGS+= \ - --with-random=/dev/urandom \ - --with-threads=pthread \ - --with-ssl=$(STAGING_DIR)/usr \ - --disable-libwrap \ - --disable-systemd - -ifeq ($(CONFIG_IPV6),n) -CONFIGURE_ARGS+= \ - --disable-ipv6 -endif - -define Build/Compile - mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel - echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem - $(call Build/Compile/Default) -endef - -define Package/stunnel/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stunnel $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib/stunnel - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/stunnel/libstunnel.so $(1)/usr/lib/stunnel/ - $(INSTALL_DIR) $(1)/etc/stunnel - $(INSTALL_CONF) ./files/stunnel.conf $(1)/etc/stunnel/stunnel.conf - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/stunnel.init $(1)/etc/init.d/stunnel -endef - -$(eval $(call BuildPackage,stunnel)) diff --git a/net/stunnel/files/stunnel.conf b/net/stunnel/files/stunnel.conf deleted file mode 100644 index 2f10800..0000000 --- a/net/stunnel/files/stunnel.conf +++ /dev/null @@ -1,45 +0,0 @@ -; Drop privileges -setuid = nobody -setgid = nogroup - -; When running under procd, stay in foreground -foreground = yes - -; Don't log to stderr, use syslog -syslog = yes - -; 1-7. Use 7 for greatest verbosity -;debug = 5 - -; Starting here, enter your services or uncomment the examples - -; Example: -; If your local httpd does not support HTTPS, use stunnel in remote -; mode to forward TLS connections coming in on port 443 to non-TLS -; on port 80. -; Make sure that the cert is available. -;[httpd] -;accept = 443 -;connect = 127.0.0.1:80 -;cert = /etc/stunnel/stunnel.pem - -; Example: -; If your local email client does not support TLS, -; use stunnel in client mode to forward non-TLS connections on -; port 143 to TLS-enabled servername:993. -;[imap] -;client = yes -;accept = 143 -;connect = servername:993 -; Disable peer verification - be sure to understand the limitations of peer -; verification in stunnel when enabling. -;verify = 0 - -; Default client section: -; stunnel requires at least one section to start successfully. -; You can safely remove this section once you have configured -; your own. We use client mode here as server requires a certificate. -[dummy] -client = yes -accept = localhost:6000 -connect = localhost:6001 diff --git a/net/stunnel/files/stunnel.init b/net/stunnel/files/stunnel.init deleted file mode 100644 index e622205..0000000 --- a/net/stunnel/files/stunnel.init +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2008 OpenWrt.org - -START=90 -USE_PROCD=1 - -start_service() { - procd_open_instance - procd_set_param command /usr/bin/stunnel /etc/stunnel/stunnel.conf - procd_set_param respawn # respawn automatically if something died - procd_close_instance -} diff --git a/net/subversion/Makefile b/net/subversion/Makefile deleted file mode 100644 index 976ca3b..0000000 --- a/net/subversion/Makefile +++ /dev/null @@ -1,142 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=subversion -PKG_RELEASE:=2 -PKG_VERSION:=1.9.7 -PKG_SOURCE_URL:=@APACHE/subversion -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_HASH:=c3b118333ce12e501d509e66bb0a47bcc34d053990acab45559431ac3e491623 -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:= - -PKG_FIXUP:=autoreconf -PKG_MACRO_PATHS:=build/ac-macros - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - - -define Package/subversion/Default - SECTION:=net - CATEGORY:=Network - SUBMENU:=Version Control Systems - TITLE:=A compelling replacement for CVS - DEPENDS:=+zlib +libsqlite3 +PACKAGE_unixodbc:unixodbc +libapr +libaprutil +libmagic \ - $(ICONV_DEPENDS) $(INTL_DEPENDS) - URL:=http://subversion.apache.org/ -endef - -define Package/subversion/Default/description - Subversion is a free/open-source version control system. That is, - Subversion manages files and directories, and the changes made to them, - over time. This allows you to recover older versions of your data, or - examine the history of how your data changed. In this regard, many - people think of a version control system as a sort of time machine. -endef - -define Package/subversion-libs - $(call Package/subversion/Default) - TITLE:=subversion libs -endef - -define Package/subversion-libs/description - $(call Package/subversion/Default/description) - This package contains the Subversion libraries. -endef - -define Package/subversion-client - $(call Package/subversion/Default) - DEPENDS:=+subversion-libs - TITLE:=subversion client tools -endef - -define Package/subversion-client/description - $(call Package/subversion/Default/description) - This package contains the Subversion client tools. -endef - -define Package/subversion-server - $(call Package/subversion/Default) - DEPENDS:=+subversion-libs - TITLE:=subversion server -endef - -define Package/subversion-server/description - $(call Package/subversion/Default/description) - This package contains the Subversion server. -endef - -define Package/subversion-server/conffiles -/etc/config/subversion -endef - -TARGET_CFLAGS += $(FPIC) -TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -APU_LIBS=$(shell $(STAGING_DIR)/usr/bin/apu-1-config --link-libtool --libs) - -CONFIGURE_ARGS += \ - --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \ - --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \ - --with-libmagic="$(STAGING_DIR)/usr" \ - --disable-mod-activation \ - --without-ruby-sitedir \ - --without-swig \ - --without-jikes \ - --without-junit \ - --without-berkeley-db \ - --without-apxs \ - --without-sasl - -ifdef $(INTL_FULL) - CONFIGURE_ARGS += --enable-nls -else - CONFIGURE_ARGS += --disable-nls -endif - -CONFIGURE_VARS += \ - LDFLAGS="$(TARGET_LDFLAGS) $(APU_LIBS) -lcrypt -lm \ - -lz -lpthread $(if $(INTL_FULL),-lintl)" - CPPFLAGS="$(TARGET_CPPFLAGS)" - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all local-install -endef - -define Package/subversion-libs/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/ -endef - -define Package/subversion-client/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{svn,svnversion,svnsync} $(1)/usr/bin/ -endef - -define Package/subversion-server/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/svn{look,admin,dumpfilter,serve} $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/subversion.config $(1)/etc/config/subversion - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/subversion.init $(1)/etc/init.d/subversion -endef - -define Package/subversion-server/prerm -#!/bin/sh - ps | grep '\(/svnserve$\| svnserve\)' | grep -cvq grep >/dev/null && /etc/init.d/subversion stop - /etc/init.d/subversion disable -endef - -$(eval $(call BuildPackage,subversion-libs)) -$(eval $(call BuildPackage,subversion-client)) -$(eval $(call BuildPackage,subversion-server)) diff --git a/net/subversion/files/subversion.config b/net/subversion/files/subversion.config deleted file mode 100644 index 3297c8d..0000000 --- a/net/subversion/files/subversion.config +++ /dev/null @@ -1,3 +0,0 @@ -config subversion - option path '/var/local/svn' - option port '3690' diff --git a/net/subversion/files/subversion.init b/net/subversion/files/subversion.init deleted file mode 100644 index 660a297..0000000 --- a/net/subversion/files/subversion.init +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2016 OpenWrt.org - -START=50 - -start_instance () { - local section="$1" - config_get path "$section" 'path' - config_get port "$section" 'port' - - if [ ! -d "$path" ]; then - echo "The subversion repository (${path}) does not exist." - echo "Create a new repository and/or change the path in /etc/config/subversion" - echo - echo "Create a new subversion repository with:" - echo " mkdir -p ${path}" - echo " svnadmin create --fs-type fsfs ${path}" - echo - echo "Changing the path using UCI (default path is: /var/local/svn):" - echo " uci set subversion.@[0].path="/srv/svn"" - echo " uci commit" - echo " /etc/init.d/subversion restart" - return 1 - fi - - service_start /usr/bin/svnserve -d --listen-port ${port} -r ${path} -} - -start() { - config_load 'subversion' - config_foreach start_instance 'subversion' -} - -stop() { - SERVICE_SIG_STOP="INT" \ - service_stop /usr/bin/svnserve -} diff --git a/net/subversion/patches/301-cross-compilation-macos.patch b/net/subversion/patches/301-cross-compilation-macos.patch deleted file mode 100644 index b964949..0000000 --- a/net/subversion/patches/301-cross-compilation-macos.patch +++ /dev/null @@ -1,97 +0,0 @@ ---- a/build/ac-macros/macosx.m4 2016-02-09 01:24:13.181409245 -0500 -+++ b/build/ac-macros/macosx.m4 2016-02-09 01:25:15.873408288 -0500 -@@ -17,94 +17,4 @@ dnl specific language governing permis - dnl under the License. - dnl =================================================================== - dnl --dnl Mac OS X specific checks - --dnl SVN_LIB_MACHO_ITERATE --dnl Check for _dyld_image_name and _dyld_image_header availability --AC_DEFUN(SVN_LIB_MACHO_ITERATE, --[ -- AC_MSG_CHECKING([for Mach-O dynamic module iteration functions]) -- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -- #include -- #include -- ]],[[ -- const struct mach_header *header = _dyld_get_image_header(0); -- const char *name = _dyld_get_image_name(0); -- if (name && header) return 0; -- return 1; -- ]])],[ -- AC_DEFINE([SVN_HAVE_MACHO_ITERATE], [1], -- [Is Mach-O low-level _dyld API available?]) -- AC_MSG_RESULT([yes]) -- ],[ -- AC_MSG_RESULT([no]) -- ]) --]) -- --dnl SVN_LIB_MACOS_PLIST --dnl Assign variables for Mac OS property list support --AC_DEFUN(SVN_LIB_MACOS_PLIST, --[ -- AC_MSG_CHECKING([for Mac OS property list utilities]) -- -- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -- #include -- #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \ -- || !defined(MAC_OS_X_VERSION_10_0) \ -- || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_0) -- #error ProperyList API unavailable. -- #endif -- ]],[[]])],[ -- dnl ### Hack. We should only need to pass the -framework options when -- dnl linking libsvn_subr, since it is the only library that uses Keychain. -- dnl -- dnl Unfortunately, libtool 1.5.x doesn't track transitive dependencies for -- dnl OS X frameworks like it does for normal libraries, so we need to -- dnl explicitly pass the option to all the users of libsvn_subr to allow -- dnl static builds to link successfully. -- dnl -- dnl This does mean that all executables we link will be linked directly -- dnl to these frameworks - even when building shared libraries - but that -- dnl shouldn't cause any problems. -- -- LIBS="$LIBS -framework CoreFoundation" -- AC_DEFINE([SVN_HAVE_MACOS_PLIST], [1], -- [Is Mac OS property list API available?]) -- AC_MSG_RESULT([yes]) -- ],[ -- AC_MSG_RESULT([no]) -- ]) --]) -- --dnl SVN_LIB_MACOS_KEYCHAIN --dnl Check configure options and assign variables related to Keychain support -- --AC_DEFUN(SVN_LIB_MACOS_KEYCHAIN, --[ -- AC_ARG_ENABLE(keychain, -- AS_HELP_STRING([--disable-keychain], -- [Disable use of Mac OS KeyChain for auth credentials]), -- [enable_keychain=$enableval],[enable_keychain=yes]) -- -- AC_MSG_CHECKING([for Mac OS KeyChain Services]) -- -- if test "$enable_keychain" = "yes"; then -- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -- #include -- #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \ -- || !defined(MAC_OS_X_VERSION_10_2) \ -- || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2) -- #error KeyChain API unavailable. -- #endif -- ]],[[]])],[ -- dnl ### Hack, see SVN_LIB_MACOS_PLIST -- LIBS="$LIBS -framework Security" -- LIBS="$LIBS -framework CoreServices" -- AC_DEFINE([SVN_HAVE_KEYCHAIN_SERVICES], [1], [Is Mac OS KeyChain support enabled?]) -- AC_MSG_RESULT([yes]) -- ],[ -- enable_keychain=no -- AC_MSG_RESULT([no]) -- ]) -- fi --]) diff --git a/net/tcpproxy/Makefile b/net/tcpproxy/Makefile deleted file mode 100644 index 77ef825..0000000 --- a/net/tcpproxy/Makefile +++ /dev/null @@ -1,85 +0,0 @@ -# -# Copyright (C) 2010 Christian Pointner, -# -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# This Makefile builds tcpproxy Package for OpenWRT -# -# $Id: $ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tcpproxy -PKG_VERSION:=1.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.spreadspace.org/tcpproxy/releases/ -PKG_MD5SUM:=14f734a61350c52556909e2ed5bff361 -PKG_MAINTAINER:=Christian Pointner -PKG_LICENSE:=GPL-3.0+ -PKG_LICENSE_FILES:=LICENSE -include $(INCLUDE_DIR)/package.mk - - -define Package/tcpproxy - SECTION:=net - CATEGORY:=Network - SUBMENU:=Routing and Redirection - TITLE:=IPv4/IPv6 tcp connection proxy - URL:=http://www.spreadspace.org/tcpproxy/ -endef - -define Package/tcpproxy/conffiles -/etc/config/tcpproxy -endef - -define Package/tcpproxy/description -tcpproxy is a simple tcp connection proxy which combines the features of rinetd and 6tunnel. - tcpproxy supports IPv4 and IPv6 and also supports connections from IPv6 to IPv4 endpoints and vice versa. -endef - -define Package/tcpproxy/configure -endef - -define Build/Configure - (cd $(PKG_BUILD_DIR)/src; \ - touch include.mk; \ - echo '#ifndef TCPPROXY_config_h_INCLUDED' > config.h; \ - echo '#define TCPPROXY_config_h_INCLUDED' >> config.h; \ - echo '' >> config.h; \ - echo '#define VERSION_STRING_0 "tcpproxy version '`cat $(PKG_BUILD_DIR)/version`'"' >> config.h; \ - echo '#define VERSION_STRING_1 "built on '`hostname`', '`date +"%d.%m.%Y %H:%M:%S %Z"`'"' >> config.h; \ - echo '' >> config.h; \ - echo '#define TARGET "linux"' >> config.h; \ - echo '#define PREFIX "/usr"' >> config.h; \ - echo '#define BINDIR "/usr/bin"' >> config.h; \ - echo '#define SYSTEMDDIR "/tmp"' >> config.h; \ - echo '#define ETCDIR "/etc"' >> config.h; \ - echo '#define CONFFILE "/etc/tcpproxy.conf"' >> config.h; \ - echo '' >> config.h; \ - echo '#endif' >> config.h \ - ) -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/src \ - $(TARGET_CONFIGURE_OPTS) \ - TARGET=Linux \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" - $(STRIP) $(PKG_BUILD_DIR)/src/tcpproxy -endef - -define Package/tcpproxy/install - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/tcpproxy.config $(1)/etc/config/tcpproxy - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(2)/src/tcpproxy $(1)/usr/bin/tcpproxy - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/tcpproxy.init $(1)/etc/init.d/tcpproxy -endef - -$(eval $(call BuildPackage,tcpproxy)) diff --git a/net/tcpproxy/files/tcpproxy.config b/net/tcpproxy/files/tcpproxy.config deleted file mode 100644 index cd3f67c..0000000 --- a/net/tcpproxy/files/tcpproxy.config +++ /dev/null @@ -1,26 +0,0 @@ -config tcpproxy - option username 'nobody' - option groupname 'nogroup' -# option chroot "/var/run/tcpproxy" -# option log 'syslog:3,tcpproxy,daemon' - -config listen - option disabled 1 - - option local_port '8000' - option resolv 'ipv4' - - option remote_addr 'www.google.at' - option remote_port '80' - option remote_resolv 'ipv6' - option source_addr '2a02:3e0:2002:1:215:58ff:fe31:2ce7' - -config listen - option disabled 1 - - option local_addr '2a02:3e0:2002:1:215:58ff:fe31:2ce7' - option local_port '1234' - - option remote_addr 'www.google.at' - option remote_port '80' - option remote_resolv 'ipv4' diff --git a/net/tcpproxy/files/tcpproxy.init b/net/tcpproxy/files/tcpproxy.init deleted file mode 100644 index 4587a1c..0000000 --- a/net/tcpproxy/files/tcpproxy.init +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh /etc/rc.common -START=50 - -BIN=tcpproxy -DAEMON=/usr/bin/$BIN -DAEMON_ARGS="" -DESC=$BIN -RUN_D=/var/run -CONFIG_DIR=/var/etc -CONFIG_FILE=$CONFIG_DIR/$BIN.conf - -tcpproxy_write_config() { - local cfg="$1" - - config_get_bool value "$cfg" disabled 0 - [ "$value" -ne 0 ] && return - - local local_addr="" - local resolv="" - local local_port="" - local remote_addr="" - local remote_resolv="" - local remote_port="" - local source_addr="" - - config_get local_addr "$cfg" local_addr - config_get local_port "$cfg" local_port - config_get resolv "$cfg" resolv - config_get remote_addr "$cfg" remote_addr - config_get remote_port "$cfg" remote_port - config_get remote_resolv "$cfg" remote_resolv - config_get source_addr "$cfg" source_addr - - if [ -z "$local_addr" ]; then - local_addr="*" - fi - - echo "listen $local_addr $local_port" >> $CONFIG_FILE - echo "{" >> $CONFIG_FILE - if [ -n "$resolv" ]; then - echo " resolv: $resolv;" >> $CONFIG_FILE - fi - echo " remote: $remote_addr $remote_port;" >> $CONFIG_FILE - if [ -n "$remote_resolv" ]; then - echo " remote-resolv: $remote_resolv;" >> $CONFIG_FILE - fi - if [ -n "$source_addr" ]; then - echo " source: $source_addr;" >> $CONFIG_FILE - fi - echo "};" >> $CONFIG_FILE - echo "" >> $CONFIG_FILE -} - -tcpproxy_generate_args() { - local cfg="$1" - local option - local value - - for option in username groupname chroot log - do - config_get value "$cfg" "$option" - option=`echo $option | tr '_' '-'` - if [ -n "$value" ]; then - DAEMON_ARGS="$DAEMON_ARGS --$option $value" - fi - done -} - -tcpproxy_rebuild_config() { - mkdir -p $CONFIG_DIR - rm -f $CONFIG_FILE - touch $CONFIG_FILE - config_load $BIN - config_foreach tcpproxy_write_config listen -} - -start() { - echo -n "Starting $DESC " - tcpproxy_rebuild_config - config_foreach tcpproxy_generate_args $BIN - $DAEMON $DAEMON_ARGS --config $CONFIG_FILE --write-pid "$RUN_D/$BIN.pid" - echo "." -} - -reload() { - echo -n "Reloading $DESC " - tcpproxy_rebuild_config - kill -SIGHUP `cat "$RUN_D/$BIN.pid"` - echo "." -} - -stop() { - echo -n "Stopping $DESC " - kill `cat $RUN_D/$BIN.pid` > /dev/null 2>&1 - echo "." -} diff --git a/net/tcpproxy/patches/001-ragel_generated.patch b/net/tcpproxy/patches/001-ragel_generated.patch deleted file mode 100644 index 600e602..0000000 --- a/net/tcpproxy/patches/001-ragel_generated.patch +++ /dev/null @@ -1,1378 +0,0 @@ -diff -Nur tcpproxy-1.2.orig/src/cfg_parser.c tcpproxy-1.2/src/cfg_parser.c ---- tcpproxy-1.2.orig/src/cfg_parser.c 1970-01-01 01:00:00.000000000 +0100 -+++ tcpproxy-1.2/src/cfg_parser.c 2015-05-17 18:10:54.933307372 +0200 -@@ -0,0 +1,1374 @@ -+ -+#line 1 "cfg_parser.rl" -+/* -+ * tcpproxy -+ * -+ * tcpproxy is a simple tcp connection proxy which combines the -+ * features of rinetd and 6tunnel. tcpproxy supports IPv4 and -+ * IPv6 and also supports connections from IPv6 to IPv4 -+ * endpoints and vice versa. -+ * -+ * -+ * Copyright (C) 2010-2015 Christian Pointner -+ * -+ * This file is part of tcpproxy. -+ * -+ * tcpproxy 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 3 of the License, or -+ * any later version. -+ * -+ * tcpproxy 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 tcpproxy. If not, see . -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "datatypes.h" -+#include "log.h" -+#include "options.h" -+#include "tcp.h" -+#include "listener.h" -+ -+struct listener { -+ char* la_; -+ resolv_type_t lrt_; -+ char* lp_; -+ char* ra_; -+ resolv_type_t rrt_; -+ char* rp_; -+ char* sa_; -+}; -+ -+static void init_listener_struct(struct listener* l) -+{ -+ if(!l) return; -+ -+ l->la_ = NULL; -+ l->lrt_ = ANY; -+ l->lp_ = NULL; -+ l->ra_ = NULL; -+ l->rrt_ = ANY; -+ l->rp_ = NULL; -+ l->sa_ = NULL; -+} -+ -+static void clear_listener_struct(struct listener* l) -+{ -+ if(!l) return; -+ -+ if(l->la_) -+ free(l->la_); -+ if(l->lp_) -+ free(l->lp_); -+ if(l->ra_) -+ free(l->ra_); -+ if(l->rp_) -+ free(l->rp_); -+ if(l->sa_) -+ free(l->sa_); -+ -+ init_listener_struct(l); -+} -+ -+static int owrt_string(char** dest, char* start, char* end) -+{ -+ if(!dest || start >= end) -+ return -1; -+ -+ if(*dest) free(*dest); -+ int n = end - start; -+ *dest = malloc(n+1); -+ if(!(*dest)) -+ return -2; -+ -+ memcpy(*dest, start, n); -+ (*dest)[n] = 0; -+ -+ return 0; -+} -+ -+ -+#line 162 "cfg_parser.rl" -+ -+ -+ -+int parse_listener(char* p, char* pe, listeners_t* listener) -+{ -+ int cs, ret = 0, cur_line = 1; -+ -+ -+#line 114 "cfg_parser.c" -+static const int cfg_parser_start = 67; -+static const int cfg_parser_first_final = 67; -+static const int cfg_parser_error = 0; -+ -+static const int cfg_parser_en_main = 67; -+ -+ -+#line 170 "cfg_parser.rl" -+ -+#line 124 "cfg_parser.c" -+ { -+ cs = cfg_parser_start; -+ } -+ -+#line 171 "cfg_parser.rl" -+ -+ char* cpy_start = NULL; -+ struct listener lst; -+ init_listener_struct(&lst); -+ -+ char* eof = pe; -+ -+#line 137 "cfg_parser.c" -+ { -+ if ( p == pe ) -+ goto _test_eof; -+ goto _resume; -+ -+_again: -+ switch ( cs ) { -+ case 67: goto st67; -+ case 0: goto st0; -+ case 1: goto st1; -+ case 2: goto st2; -+ case 3: goto st3; -+ case 4: goto st4; -+ case 5: goto st5; -+ case 6: goto st6; -+ case 7: goto st7; -+ case 8: goto st8; -+ case 9: goto st9; -+ case 10: goto st10; -+ case 11: goto st11; -+ case 12: goto st12; -+ case 13: goto st13; -+ case 14: goto st14; -+ case 15: goto st15; -+ case 16: goto st16; -+ case 17: goto st17; -+ case 18: goto st18; -+ case 19: goto st19; -+ case 20: goto st20; -+ case 21: goto st21; -+ case 22: goto st22; -+ case 23: goto st23; -+ case 24: goto st24; -+ case 25: goto st25; -+ case 26: goto st26; -+ case 27: goto st27; -+ case 28: goto st28; -+ case 29: goto st29; -+ case 30: goto st30; -+ case 31: goto st31; -+ case 32: goto st32; -+ case 33: goto st33; -+ case 34: goto st34; -+ case 35: goto st35; -+ case 36: goto st36; -+ case 37: goto st37; -+ case 38: goto st38; -+ case 39: goto st39; -+ case 40: goto st40; -+ case 41: goto st41; -+ case 42: goto st42; -+ case 43: goto st43; -+ case 44: goto st44; -+ case 45: goto st45; -+ case 46: goto st46; -+ case 47: goto st47; -+ case 48: goto st48; -+ case 49: goto st49; -+ case 50: goto st50; -+ case 51: goto st51; -+ case 52: goto st52; -+ case 53: goto st53; -+ case 54: goto st54; -+ case 55: goto st55; -+ case 56: goto st56; -+ case 57: goto st57; -+ case 58: goto st58; -+ case 59: goto st59; -+ case 60: goto st60; -+ case 61: goto st61; -+ case 62: goto st62; -+ case 63: goto st63; -+ case 64: goto st64; -+ case 65: goto st65; -+ case 66: goto st66; -+ default: break; -+ } -+ -+ if ( ++p == pe ) -+ goto _test_eof; -+_resume: -+ switch ( cs ) -+ { -+tr1: -+#line 127 "cfg_parser.rl" -+ {cur_line++;} -+ goto st67; -+tr90: -+#line 114 "cfg_parser.rl" -+ { -+ ret = listeners_add(listener, lst.la_, lst.lrt_, lst.lp_, lst.ra_, lst.rrt_, lst.rp_, lst.sa_); -+ clear_listener_struct(&lst); -+ } -+ goto st67; -+st67: -+ if ( ++p == pe ) -+ goto _test_eof67; -+case 67: -+#line 236 "cfg_parser.c" -+ switch( (*p) ) { -+ case 10: goto tr1; -+ case 32: goto st67; -+ case 35: goto st1; -+ case 108: goto st2; -+ } -+ if ( 9 <= (*p) && (*p) <= 13 ) -+ goto st67; -+ goto tr2; -+tr2: -+#line 118 "cfg_parser.rl" -+ { -+ if(p == eof) -+ log_printf(ERROR, "config file syntax error: unexpected end of file"); -+ else -+ log_printf(ERROR, "config file syntax error at line %d", cur_line); -+ -+ {cs = (cfg_parser_error); goto _again;} -+ } -+ goto st0; -+#line 257 "cfg_parser.c" -+st0: -+cs = 0; -+ goto _out; -+st1: -+ if ( ++p == pe ) -+ goto _test_eof1; -+case 1: -+ if ( (*p) == 10 ) -+ goto tr1; -+ goto st1; -+st2: -+ if ( ++p == pe ) -+ goto _test_eof2; -+case 2: -+ if ( (*p) == 105 ) -+ goto st3; -+ goto tr2; -+st3: -+ if ( ++p == pe ) -+ goto _test_eof3; -+case 3: -+ if ( (*p) == 115 ) -+ goto st4; -+ goto tr2; -+st4: -+ if ( ++p == pe ) -+ goto _test_eof4; -+case 4: -+ if ( (*p) == 116 ) -+ goto st5; -+ goto tr2; -+st5: -+ if ( ++p == pe ) -+ goto _test_eof5; -+case 5: -+ if ( (*p) == 101 ) -+ goto st6; -+ goto tr2; -+st6: -+ if ( ++p == pe ) -+ goto _test_eof6; -+case 6: -+ if ( (*p) == 110 ) -+ goto st7; -+ goto tr2; -+st7: -+ if ( ++p == pe ) -+ goto _test_eof7; -+case 7: -+ switch( (*p) ) { -+ case 9: goto st8; -+ case 32: goto st8; -+ } -+ goto tr2; -+st8: -+ if ( ++p == pe ) -+ goto _test_eof8; -+case 8: -+ switch( (*p) ) { -+ case 9: goto st8; -+ case 32: goto st8; -+ case 42: goto st9; -+ case 58: goto tr12; -+ } -+ if ( (*p) < 65 ) { -+ if ( (*p) > 46 ) { -+ if ( 48 <= (*p) && (*p) <= 57 ) -+ goto tr11; -+ } else if ( (*p) >= 45 ) -+ goto tr10; -+ } else if ( (*p) > 70 ) { -+ if ( (*p) < 97 ) { -+ if ( 71 <= (*p) && (*p) <= 90 ) -+ goto tr10; -+ } else if ( (*p) > 102 ) { -+ if ( 103 <= (*p) && (*p) <= 122 ) -+ goto tr10; -+ } else -+ goto tr11; -+ } else -+ goto tr11; -+ goto tr2; -+st9: -+ if ( ++p == pe ) -+ goto _test_eof9; -+case 9: -+ switch( (*p) ) { -+ case 9: goto st10; -+ case 32: goto st10; -+ } -+ goto tr2; -+tr91: -+#line 105 "cfg_parser.rl" -+ { ret = owrt_string(&(lst.la_), cpy_start, p); cpy_start = NULL; } -+ goto st10; -+st10: -+ if ( ++p == pe ) -+ goto _test_eof10; -+case 10: -+#line 357 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto st10; -+ case 32: goto st10; -+ case 45: goto tr14; -+ } -+ if ( (*p) < 65 ) { -+ if ( 48 <= (*p) && (*p) <= 57 ) -+ goto tr14; -+ } else if ( (*p) > 90 ) { -+ if ( 97 <= (*p) && (*p) <= 122 ) -+ goto tr14; -+ } else -+ goto tr14; -+ goto tr2; -+tr14: -+#line 104 "cfg_parser.rl" -+ { cpy_start = p; } -+ goto st11; -+st11: -+ if ( ++p == pe ) -+ goto _test_eof11; -+case 11: -+#line 380 "cfg_parser.c" -+ switch( (*p) ) { -+ case 10: goto tr16; -+ case 32: goto tr15; -+ case 35: goto tr17; -+ case 45: goto st11; -+ case 123: goto tr19; -+ } -+ if ( (*p) < 48 ) { -+ if ( 9 <= (*p) && (*p) <= 13 ) -+ goto tr15; -+ } else if ( (*p) > 57 ) { -+ if ( (*p) > 90 ) { -+ if ( 97 <= (*p) && (*p) <= 122 ) -+ goto st11; -+ } else if ( (*p) >= 65 ) -+ goto st11; -+ } else -+ goto st11; -+ goto tr2; -+tr21: -+#line 127 "cfg_parser.rl" -+ {cur_line++;} -+ goto st12; -+tr15: -+#line 106 "cfg_parser.rl" -+ { ret = owrt_string(&(lst.lp_), cpy_start, p); cpy_start = NULL; } -+ goto st12; -+tr16: -+#line 106 "cfg_parser.rl" -+ { ret = owrt_string(&(lst.lp_), cpy_start, p); cpy_start = NULL; } -+#line 127 "cfg_parser.rl" -+ {cur_line++;} -+ goto st12; -+st12: -+ if ( ++p == pe ) -+ goto _test_eof12; -+case 12: -+#line 418 "cfg_parser.c" -+ switch( (*p) ) { -+ case 10: goto tr21; -+ case 32: goto st12; -+ case 35: goto st13; -+ case 123: goto st14; -+ } -+ if ( 9 <= (*p) && (*p) <= 13 ) -+ goto st12; -+ goto tr2; -+tr17: -+#line 106 "cfg_parser.rl" -+ { ret = owrt_string(&(lst.lp_), cpy_start, p); cpy_start = NULL; } -+ goto st13; -+st13: -+ if ( ++p == pe ) -+ goto _test_eof13; -+case 13: -+#line 436 "cfg_parser.c" -+ if ( (*p) == 10 ) -+ goto tr21; -+ goto st13; -+tr24: -+#line 127 "cfg_parser.rl" -+ {cur_line++;} -+ goto st14; -+tr19: -+#line 106 "cfg_parser.rl" -+ { ret = owrt_string(&(lst.lp_), cpy_start, p); cpy_start = NULL; } -+ goto st14; -+tr48: -+#line 110 "cfg_parser.rl" -+ { ret = owrt_string(&(lst.rp_), cpy_start, p); cpy_start = NULL; } -+ goto st14; -+tr87: -+#line 113 "cfg_parser.rl" -+ { ret = owrt_string(&(lst.sa_), cpy_start, p); cpy_start = NULL; } -+ goto st14; -+st14: -+ if ( ++p == pe ) -+ goto _test_eof14; -+case 14: -+#line 460 "cfg_parser.c" -+ switch( (*p) ) { -+ case 10: goto tr24; -+ case 32: goto st14; -+ case 35: goto st15; -+ case 114: goto st16; -+ case 115: goto st52; -+ case 125: goto st63; -+ } -+ if ( 9 <= (*p) && (*p) <= 13 ) -+ goto st14; -+ goto tr2; -+st15: -+ if ( ++p == pe ) -+ goto _test_eof15; -+case 15: -+ if ( (*p) == 10 ) -+ goto tr24; -+ goto st15; -+st16: -+ if ( ++p == pe ) -+ goto _test_eof16; -+case 16: -+ if ( (*p) == 101 ) -+ goto st17; -+ goto tr2; -+st17: -+ if ( ++p == pe ) -+ goto _test_eof17; -+case 17: -+ switch( (*p) ) { -+ case 109: goto st18; -+ case 115: goto st43; -+ } -+ goto tr2; -+st18: -+ if ( ++p == pe ) -+ goto _test_eof18; -+case 18: -+ if ( (*p) == 111 ) -+ goto st19; -+ goto tr2; -+st19: -+ if ( ++p == pe ) -+ goto _test_eof19; -+case 19: -+ if ( (*p) == 116 ) -+ goto st20; -+ goto tr2; -+st20: -+ if ( ++p == pe ) -+ goto _test_eof20; -+case 20: -+ if ( (*p) == 101 ) -+ goto st21; -+ goto tr2; -+st21: -+ if ( ++p == pe ) -+ goto _test_eof21; -+case 21: -+ switch( (*p) ) { -+ case 9: goto st22; -+ case 32: goto st22; -+ case 45: goto st31; -+ case 58: goto st23; -+ } -+ goto tr2; -+st22: -+ if ( ++p == pe ) -+ goto _test_eof22; -+case 22: -+ switch( (*p) ) { -+ case 9: goto st22; -+ case 32: goto st22; -+ case 58: goto st23; -+ } -+ goto tr2; -+st23: -+ if ( ++p == pe ) -+ goto _test_eof23; -+case 23: -+ switch( (*p) ) { -+ case 9: goto st24; -+ case 32: goto st24; -+ } -+ goto tr2; -+st24: -+ if ( ++p == pe ) -+ goto _test_eof24; -+case 24: -+ switch( (*p) ) { -+ case 9: goto st24; -+ case 32: goto st24; -+ case 58: goto tr41; -+ } -+ if ( (*p) < 65 ) { -+ if ( (*p) > 46 ) { -+ if ( 48 <= (*p) && (*p) <= 57 ) -+ goto tr40; -+ } else if ( (*p) >= 45 ) -+ goto tr39; -+ } else if ( (*p) > 70 ) { -+ if ( (*p) < 97 ) { -+ if ( 71 <= (*p) && (*p) <= 90 ) -+ goto tr39; -+ } else if ( (*p) > 102 ) { -+ if ( 103 <= (*p) && (*p) <= 122 ) -+ goto tr39; -+ } else -+ goto tr40; -+ } else -+ goto tr40; -+ goto tr2; -+tr39: -+#line 104 "cfg_parser.rl" -+ { cpy_start = p; } -+ goto st25; -+st25: -+ if ( ++p == pe ) -+ goto _test_eof25; -+case 25: -+#line 581 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto tr42; -+ case 32: goto tr42; -+ } -+ if ( (*p) < 48 ) { -+ if ( 45 <= (*p) && (*p) <= 46 ) -+ goto st25; -+ } else if ( (*p) > 57 ) { -+ if ( (*p) > 90 ) { -+ if ( 97 <= (*p) && (*p) <= 122 ) -+ goto st25; -+ } else if ( (*p) >= 65 ) -+ goto st25; -+ } else -+ goto st25; -+ goto tr2; -+tr42: -+#line 109 "cfg_parser.rl" -+ { ret = owrt_string(&(lst.ra_), cpy_start, p); cpy_start = NULL; } -+ goto st26; -+st26: -+ if ( ++p == pe ) -+ goto _test_eof26; -+case 26: -+#line 606 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto st26; -+ case 32: goto st26; -+ case 45: goto tr45; -+ } -+ if ( (*p) < 65 ) { -+ if ( 48 <= (*p) && (*p) <= 57 ) -+ goto tr45; -+ } else if ( (*p) > 90 ) { -+ if ( 97 <= (*p) && (*p) <= 122 ) -+ goto tr45; -+ } else -+ goto tr45; -+ goto tr2; -+tr45: -+#line 104 "cfg_parser.rl" -+ { cpy_start = p; } -+ goto st27; -+st27: -+ if ( ++p == pe ) -+ goto _test_eof27; -+case 27: -+#line 629 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto tr46; -+ case 32: goto tr46; -+ case 45: goto st27; -+ case 59: goto tr48; -+ } -+ if ( (*p) < 65 ) { -+ if ( 48 <= (*p) && (*p) <= 57 ) -+ goto st27; -+ } else if ( (*p) > 90 ) { -+ if ( 97 <= (*p) && (*p) <= 122 ) -+ goto st27; -+ } else -+ goto st27; -+ goto tr2; -+tr46: -+#line 110 "cfg_parser.rl" -+ { ret = owrt_string(&(lst.rp_), cpy_start, p); cpy_start = NULL; } -+ goto st28; -+tr63: -+#line 111 "cfg_parser.rl" -+ { lst.rrt_ = IPV4_ONLY; } -+ goto st28; -+tr64: -+#line 112 "cfg_parser.rl" -+ { lst.rrt_ = IPV6_ONLY; } -+ goto st28; -+tr73: -+#line 107 "cfg_parser.rl" -+ { lst.lrt_ = IPV4_ONLY; } -+ goto st28; -+tr74: -+#line 108 "cfg_parser.rl" -+ { lst.lrt_ = IPV6_ONLY; } -+ goto st28; -+tr85: -+#line 113 "cfg_parser.rl" -+ { ret = owrt_string(&(lst.sa_), cpy_start, p); cpy_start = NULL; } -+ goto st28; -+st28: -+ if ( ++p == pe ) -+ goto _test_eof28; -+case 28: -+#line 673 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto st28; -+ case 32: goto st28; -+ case 59: goto st14; -+ } -+ goto tr2; -+tr40: -+#line 104 "cfg_parser.rl" -+ { cpy_start = p; } -+ goto st29; -+st29: -+ if ( ++p == pe ) -+ goto _test_eof29; -+case 29: -+#line 688 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto tr42; -+ case 32: goto tr42; -+ case 58: goto st30; -+ } -+ if ( (*p) < 65 ) { -+ if ( (*p) > 46 ) { -+ if ( 48 <= (*p) && (*p) <= 57 ) -+ goto st29; -+ } else if ( (*p) >= 45 ) -+ goto st25; -+ } else if ( (*p) > 70 ) { -+ if ( (*p) < 97 ) { -+ if ( 71 <= (*p) && (*p) <= 90 ) -+ goto st25; -+ } else if ( (*p) > 102 ) { -+ if ( 103 <= (*p) && (*p) <= 122 ) -+ goto st25; -+ } else -+ goto st29; -+ } else -+ goto st29; -+ goto tr2; -+tr41: -+#line 104 "cfg_parser.rl" -+ { cpy_start = p; } -+ goto st30; -+st30: -+ if ( ++p == pe ) -+ goto _test_eof30; -+case 30: -+#line 720 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto tr42; -+ case 32: goto tr42; -+ } -+ if ( (*p) < 65 ) { -+ if ( 48 <= (*p) && (*p) <= 58 ) -+ goto st30; -+ } else if ( (*p) > 70 ) { -+ if ( 97 <= (*p) && (*p) <= 102 ) -+ goto st30; -+ } else -+ goto st30; -+ goto tr2; -+st31: -+ if ( ++p == pe ) -+ goto _test_eof31; -+case 31: -+ if ( (*p) == 114 ) -+ goto st32; -+ goto tr2; -+st32: -+ if ( ++p == pe ) -+ goto _test_eof32; -+case 32: -+ if ( (*p) == 101 ) -+ goto st33; -+ goto tr2; -+st33: -+ if ( ++p == pe ) -+ goto _test_eof33; -+case 33: -+ if ( (*p) == 115 ) -+ goto st34; -+ goto tr2; -+st34: -+ if ( ++p == pe ) -+ goto _test_eof34; -+case 34: -+ if ( (*p) == 111 ) -+ goto st35; -+ goto tr2; -+st35: -+ if ( ++p == pe ) -+ goto _test_eof35; -+case 35: -+ if ( (*p) == 108 ) -+ goto st36; -+ goto tr2; -+st36: -+ if ( ++p == pe ) -+ goto _test_eof36; -+case 36: -+ if ( (*p) == 118 ) -+ goto st37; -+ goto tr2; -+st37: -+ if ( ++p == pe ) -+ goto _test_eof37; -+case 37: -+ switch( (*p) ) { -+ case 9: goto st37; -+ case 32: goto st37; -+ case 58: goto st38; -+ } -+ goto tr2; -+st38: -+ if ( ++p == pe ) -+ goto _test_eof38; -+case 38: -+ switch( (*p) ) { -+ case 9: goto st39; -+ case 32: goto st39; -+ } -+ goto tr2; -+st39: -+ if ( ++p == pe ) -+ goto _test_eof39; -+case 39: -+ switch( (*p) ) { -+ case 9: goto st39; -+ case 32: goto st39; -+ case 73: goto st40; -+ case 105: goto st40; -+ } -+ goto tr2; -+st40: -+ if ( ++p == pe ) -+ goto _test_eof40; -+case 40: -+ switch( (*p) ) { -+ case 80: goto st41; -+ case 112: goto st41; -+ } -+ goto tr2; -+st41: -+ if ( ++p == pe ) -+ goto _test_eof41; -+case 41: -+ switch( (*p) ) { -+ case 86: goto st42; -+ case 118: goto st42; -+ } -+ goto tr2; -+st42: -+ if ( ++p == pe ) -+ goto _test_eof42; -+case 42: -+ switch( (*p) ) { -+ case 52: goto tr63; -+ case 54: goto tr64; -+ } -+ goto tr2; -+st43: -+ if ( ++p == pe ) -+ goto _test_eof43; -+case 43: -+ if ( (*p) == 111 ) -+ goto st44; -+ goto tr2; -+st44: -+ if ( ++p == pe ) -+ goto _test_eof44; -+case 44: -+ if ( (*p) == 108 ) -+ goto st45; -+ goto tr2; -+st45: -+ if ( ++p == pe ) -+ goto _test_eof45; -+case 45: -+ if ( (*p) == 118 ) -+ goto st46; -+ goto tr2; -+st46: -+ if ( ++p == pe ) -+ goto _test_eof46; -+case 46: -+ switch( (*p) ) { -+ case 9: goto st46; -+ case 32: goto st46; -+ case 58: goto st47; -+ } -+ goto tr2; -+st47: -+ if ( ++p == pe ) -+ goto _test_eof47; -+case 47: -+ switch( (*p) ) { -+ case 9: goto st48; -+ case 32: goto st48; -+ } -+ goto tr2; -+st48: -+ if ( ++p == pe ) -+ goto _test_eof48; -+case 48: -+ switch( (*p) ) { -+ case 9: goto st48; -+ case 32: goto st48; -+ case 73: goto st49; -+ case 105: goto st49; -+ } -+ goto tr2; -+st49: -+ if ( ++p == pe ) -+ goto _test_eof49; -+case 49: -+ switch( (*p) ) { -+ case 80: goto st50; -+ case 112: goto st50; -+ } -+ goto tr2; -+st50: -+ if ( ++p == pe ) -+ goto _test_eof50; -+case 50: -+ switch( (*p) ) { -+ case 86: goto st51; -+ case 118: goto st51; -+ } -+ goto tr2; -+st51: -+ if ( ++p == pe ) -+ goto _test_eof51; -+case 51: -+ switch( (*p) ) { -+ case 52: goto tr73; -+ case 54: goto tr74; -+ } -+ goto tr2; -+st52: -+ if ( ++p == pe ) -+ goto _test_eof52; -+case 52: -+ if ( (*p) == 111 ) -+ goto st53; -+ goto tr2; -+st53: -+ if ( ++p == pe ) -+ goto _test_eof53; -+case 53: -+ if ( (*p) == 117 ) -+ goto st54; -+ goto tr2; -+st54: -+ if ( ++p == pe ) -+ goto _test_eof54; -+case 54: -+ if ( (*p) == 114 ) -+ goto st55; -+ goto tr2; -+st55: -+ if ( ++p == pe ) -+ goto _test_eof55; -+case 55: -+ if ( (*p) == 99 ) -+ goto st56; -+ goto tr2; -+st56: -+ if ( ++p == pe ) -+ goto _test_eof56; -+case 56: -+ if ( (*p) == 101 ) -+ goto st57; -+ goto tr2; -+st57: -+ if ( ++p == pe ) -+ goto _test_eof57; -+case 57: -+ switch( (*p) ) { -+ case 9: goto st57; -+ case 32: goto st57; -+ case 58: goto st58; -+ } -+ goto tr2; -+st58: -+ if ( ++p == pe ) -+ goto _test_eof58; -+case 58: -+ switch( (*p) ) { -+ case 9: goto st59; -+ case 32: goto st59; -+ } -+ goto tr2; -+st59: -+ if ( ++p == pe ) -+ goto _test_eof59; -+case 59: -+ switch( (*p) ) { -+ case 9: goto st59; -+ case 32: goto st59; -+ case 58: goto tr84; -+ } -+ if ( (*p) < 65 ) { -+ if ( (*p) > 46 ) { -+ if ( 48 <= (*p) && (*p) <= 57 ) -+ goto tr83; -+ } else if ( (*p) >= 45 ) -+ goto tr82; -+ } else if ( (*p) > 70 ) { -+ if ( (*p) < 97 ) { -+ if ( 71 <= (*p) && (*p) <= 90 ) -+ goto tr82; -+ } else if ( (*p) > 102 ) { -+ if ( 103 <= (*p) && (*p) <= 122 ) -+ goto tr82; -+ } else -+ goto tr83; -+ } else -+ goto tr83; -+ goto tr2; -+tr82: -+#line 104 "cfg_parser.rl" -+ { cpy_start = p; } -+ goto st60; -+st60: -+ if ( ++p == pe ) -+ goto _test_eof60; -+case 60: -+#line 1000 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto tr85; -+ case 32: goto tr85; -+ case 59: goto tr87; -+ } -+ if ( (*p) < 48 ) { -+ if ( 45 <= (*p) && (*p) <= 46 ) -+ goto st60; -+ } else if ( (*p) > 57 ) { -+ if ( (*p) > 90 ) { -+ if ( 97 <= (*p) && (*p) <= 122 ) -+ goto st60; -+ } else if ( (*p) >= 65 ) -+ goto st60; -+ } else -+ goto st60; -+ goto tr2; -+tr83: -+#line 104 "cfg_parser.rl" -+ { cpy_start = p; } -+ goto st61; -+st61: -+ if ( ++p == pe ) -+ goto _test_eof61; -+case 61: -+#line 1026 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto tr85; -+ case 32: goto tr85; -+ case 58: goto st62; -+ case 59: goto tr87; -+ } -+ if ( (*p) < 65 ) { -+ if ( (*p) > 46 ) { -+ if ( 48 <= (*p) && (*p) <= 57 ) -+ goto st61; -+ } else if ( (*p) >= 45 ) -+ goto st60; -+ } else if ( (*p) > 70 ) { -+ if ( (*p) < 97 ) { -+ if ( 71 <= (*p) && (*p) <= 90 ) -+ goto st60; -+ } else if ( (*p) > 102 ) { -+ if ( 103 <= (*p) && (*p) <= 122 ) -+ goto st60; -+ } else -+ goto st61; -+ } else -+ goto st61; -+ goto tr2; -+tr84: -+#line 104 "cfg_parser.rl" -+ { cpy_start = p; } -+ goto st62; -+st62: -+ if ( ++p == pe ) -+ goto _test_eof62; -+case 62: -+#line 1059 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto tr85; -+ case 32: goto tr85; -+ case 59: goto tr87; -+ } -+ if ( (*p) < 65 ) { -+ if ( 48 <= (*p) && (*p) <= 58 ) -+ goto st62; -+ } else if ( (*p) > 70 ) { -+ if ( 97 <= (*p) && (*p) <= 102 ) -+ goto st62; -+ } else -+ goto st62; -+ goto tr2; -+st63: -+ if ( ++p == pe ) -+ goto _test_eof63; -+case 63: -+ if ( (*p) == 59 ) -+ goto tr90; -+ goto tr2; -+tr10: -+#line 104 "cfg_parser.rl" -+ { cpy_start = p; } -+ goto st64; -+st64: -+ if ( ++p == pe ) -+ goto _test_eof64; -+case 64: -+#line 1089 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto tr91; -+ case 32: goto tr91; -+ } -+ if ( (*p) < 48 ) { -+ if ( 45 <= (*p) && (*p) <= 46 ) -+ goto st64; -+ } else if ( (*p) > 57 ) { -+ if ( (*p) > 90 ) { -+ if ( 97 <= (*p) && (*p) <= 122 ) -+ goto st64; -+ } else if ( (*p) >= 65 ) -+ goto st64; -+ } else -+ goto st64; -+ goto tr2; -+tr11: -+#line 104 "cfg_parser.rl" -+ { cpy_start = p; } -+ goto st65; -+st65: -+ if ( ++p == pe ) -+ goto _test_eof65; -+case 65: -+#line 1114 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto tr91; -+ case 32: goto tr91; -+ case 58: goto st66; -+ } -+ if ( (*p) < 65 ) { -+ if ( (*p) > 46 ) { -+ if ( 48 <= (*p) && (*p) <= 57 ) -+ goto st65; -+ } else if ( (*p) >= 45 ) -+ goto st64; -+ } else if ( (*p) > 70 ) { -+ if ( (*p) < 97 ) { -+ if ( 71 <= (*p) && (*p) <= 90 ) -+ goto st64; -+ } else if ( (*p) > 102 ) { -+ if ( 103 <= (*p) && (*p) <= 122 ) -+ goto st64; -+ } else -+ goto st65; -+ } else -+ goto st65; -+ goto tr2; -+tr12: -+#line 104 "cfg_parser.rl" -+ { cpy_start = p; } -+ goto st66; -+st66: -+ if ( ++p == pe ) -+ goto _test_eof66; -+case 66: -+#line 1146 "cfg_parser.c" -+ switch( (*p) ) { -+ case 9: goto tr91; -+ case 32: goto tr91; -+ } -+ if ( (*p) < 65 ) { -+ if ( 48 <= (*p) && (*p) <= 58 ) -+ goto st66; -+ } else if ( (*p) > 70 ) { -+ if ( 97 <= (*p) && (*p) <= 102 ) -+ goto st66; -+ } else -+ goto st66; -+ goto tr2; -+ } -+ _test_eof67: cs = 67; goto _test_eof; -+ _test_eof1: cs = 1; goto _test_eof; -+ _test_eof2: cs = 2; goto _test_eof; -+ _test_eof3: cs = 3; goto _test_eof; -+ _test_eof4: cs = 4; goto _test_eof; -+ _test_eof5: cs = 5; goto _test_eof; -+ _test_eof6: cs = 6; goto _test_eof; -+ _test_eof7: cs = 7; goto _test_eof; -+ _test_eof8: cs = 8; goto _test_eof; -+ _test_eof9: cs = 9; goto _test_eof; -+ _test_eof10: cs = 10; goto _test_eof; -+ _test_eof11: cs = 11; goto _test_eof; -+ _test_eof12: cs = 12; goto _test_eof; -+ _test_eof13: cs = 13; goto _test_eof; -+ _test_eof14: cs = 14; goto _test_eof; -+ _test_eof15: cs = 15; goto _test_eof; -+ _test_eof16: cs = 16; goto _test_eof; -+ _test_eof17: cs = 17; goto _test_eof; -+ _test_eof18: cs = 18; goto _test_eof; -+ _test_eof19: cs = 19; goto _test_eof; -+ _test_eof20: cs = 20; goto _test_eof; -+ _test_eof21: cs = 21; goto _test_eof; -+ _test_eof22: cs = 22; goto _test_eof; -+ _test_eof23: cs = 23; goto _test_eof; -+ _test_eof24: cs = 24; goto _test_eof; -+ _test_eof25: cs = 25; goto _test_eof; -+ _test_eof26: cs = 26; goto _test_eof; -+ _test_eof27: cs = 27; goto _test_eof; -+ _test_eof28: cs = 28; goto _test_eof; -+ _test_eof29: cs = 29; goto _test_eof; -+ _test_eof30: cs = 30; goto _test_eof; -+ _test_eof31: cs = 31; goto _test_eof; -+ _test_eof32: cs = 32; goto _test_eof; -+ _test_eof33: cs = 33; goto _test_eof; -+ _test_eof34: cs = 34; goto _test_eof; -+ _test_eof35: cs = 35; goto _test_eof; -+ _test_eof36: cs = 36; goto _test_eof; -+ _test_eof37: cs = 37; goto _test_eof; -+ _test_eof38: cs = 38; goto _test_eof; -+ _test_eof39: cs = 39; goto _test_eof; -+ _test_eof40: cs = 40; goto _test_eof; -+ _test_eof41: cs = 41; goto _test_eof; -+ _test_eof42: cs = 42; goto _test_eof; -+ _test_eof43: cs = 43; goto _test_eof; -+ _test_eof44: cs = 44; goto _test_eof; -+ _test_eof45: cs = 45; goto _test_eof; -+ _test_eof46: cs = 46; goto _test_eof; -+ _test_eof47: cs = 47; goto _test_eof; -+ _test_eof48: cs = 48; goto _test_eof; -+ _test_eof49: cs = 49; goto _test_eof; -+ _test_eof50: cs = 50; goto _test_eof; -+ _test_eof51: cs = 51; goto _test_eof; -+ _test_eof52: cs = 52; goto _test_eof; -+ _test_eof53: cs = 53; goto _test_eof; -+ _test_eof54: cs = 54; goto _test_eof; -+ _test_eof55: cs = 55; goto _test_eof; -+ _test_eof56: cs = 56; goto _test_eof; -+ _test_eof57: cs = 57; goto _test_eof; -+ _test_eof58: cs = 58; goto _test_eof; -+ _test_eof59: cs = 59; goto _test_eof; -+ _test_eof60: cs = 60; goto _test_eof; -+ _test_eof61: cs = 61; goto _test_eof; -+ _test_eof62: cs = 62; goto _test_eof; -+ _test_eof63: cs = 63; goto _test_eof; -+ _test_eof64: cs = 64; goto _test_eof; -+ _test_eof65: cs = 65; goto _test_eof; -+ _test_eof66: cs = 66; goto _test_eof; -+ -+ _test_eof: {} -+ if ( p == eof ) -+ { -+ switch ( cs ) { -+ case 1: -+ case 2: -+ case 3: -+ case 4: -+ case 5: -+ case 6: -+ case 7: -+ case 8: -+ case 9: -+ case 10: -+ case 11: -+ case 12: -+ case 13: -+ case 14: -+ case 15: -+ case 16: -+ case 17: -+ case 18: -+ case 19: -+ case 20: -+ case 21: -+ case 22: -+ case 23: -+ case 24: -+ case 25: -+ case 26: -+ case 27: -+ case 28: -+ case 29: -+ case 30: -+ case 31: -+ case 32: -+ case 33: -+ case 34: -+ case 35: -+ case 36: -+ case 37: -+ case 38: -+ case 39: -+ case 40: -+ case 41: -+ case 42: -+ case 43: -+ case 44: -+ case 45: -+ case 46: -+ case 47: -+ case 48: -+ case 49: -+ case 50: -+ case 51: -+ case 52: -+ case 53: -+ case 54: -+ case 55: -+ case 56: -+ case 57: -+ case 58: -+ case 59: -+ case 60: -+ case 61: -+ case 62: -+ case 63: -+ case 64: -+ case 65: -+ case 66: -+#line 118 "cfg_parser.rl" -+ { -+ if(p == eof) -+ log_printf(ERROR, "config file syntax error: unexpected end of file"); -+ else -+ log_printf(ERROR, "config file syntax error at line %d", cur_line); -+ -+ {cs = (cfg_parser_error); goto _again;} -+ } -+ break; -+#line 1309 "cfg_parser.c" -+ } -+ } -+ -+ _out: {} -+ } -+ -+#line 178 "cfg_parser.rl" -+ -+ if(cs == cfg_parser_error) { -+ listeners_revert(listener); -+ ret = 1; -+ } -+ else -+ ret = listeners_update(listener); -+ -+ clear_listener_struct(&lst); -+ -+ return ret; -+} -+ -+int read_configfile(const char* filename, listeners_t* listener) -+{ -+ int fd = open(filename, 0); -+ if(fd < 0) { -+ log_printf(ERROR, "open('%s') failed: %s", filename, strerror(errno)); -+ return -1; -+ } -+ -+ struct stat sb; -+ if(fstat(fd, &sb) == -1) { -+ log_printf(ERROR, "fstat() error: %s", strerror(errno)); -+ close(fd); -+ return -1; -+ } -+ -+ if(!sb.st_size) { -+ log_printf(ERROR, "config file %s is empty", filename); -+ close(fd); -+ return -1; -+ } -+ -+ if(!S_ISREG(sb.st_mode)) { -+ log_printf(ERROR, "config file %s is not a regular file", filename); -+ close(fd); -+ return -1; -+ } -+ -+ char* p = (char*)mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0); -+ if(p == MAP_FAILED) { -+ log_printf(ERROR, "mmap() error: %s", strerror(errno)); -+ close(fd); -+ return -1; -+ } -+ close(fd); -+ -+ log_printf(DEBUG, "mapped %ld bytes from file %s at address 0x%08lX", sb.st_size, filename, p); -+ int ret = parse_listener(p, p + sb.st_size, listener); -+ -+ if(munmap(p, sb.st_size) == -1) { -+ log_printf(ERROR, "munmap() error: %s", strerror(errno)); -+ return -1; -+ } -+ log_printf(DEBUG, "unmapped file %s", filename); -+ -+ return ret; -+} diff --git a/net/tcpreplay/Makefile b/net/tcpreplay/Makefile deleted file mode 100644 index d7dce05..0000000 --- a/net/tcpreplay/Makefile +++ /dev/null @@ -1,158 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tcpreplay -PKG_VERSION:=4.1.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/appneta/tcpreplay/releases/download/v$(PKG_VERSION) -PKG_MD5SUM:=3105b10b07dbc0b07ce2da07a2368359 - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=docs/LICENSE - -PKG_FIXUP:=libtool -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -TCPREPLAY_MODULES:= \ - tcpbridge tcpcapinfo tcpliveplay tcpprep \ - tcpreplay tcpreplay-edit tcprewrite - -define Package/tcpreplay/default - SUBMENU:=tcprelay - SECTION:=net - CATEGORY:=Network - URL:=http://tcpreplay.appneta.com/ - MAINTAINER:=Alexandru Ardelean - DEPENDS:=+librt +libpcap -endef - -define Package/tcpbridge -$(call Package/tcpreplay/default) - TITLE:=Bridge network traffic across two interfaces -endef - -define Package/tcpcapinfo -$(call Package/tcpreplay/default) - TITLE:=Pcap file dissector for debugging broken pcap files -endef - -define Package/tcpliveplay -$(call Package/tcpreplay/default) - TITLE:=Replays network traffic stored in a pcap file on live networks using new TCP connections -endef - -define Package/tcpprep -$(call Package/tcpreplay/default) - TITLE:=Create a tcpreplay cache file from a pcap file -endef - -define Package/tcpreplay -$(call Package/tcpreplay/default) - TITLE:=Replay network traffic stored in pcap files -endef - -define Package/tcpreplay-edit -$(call Package/tcpreplay/default) - TITLE:=Replay network traffic stored in pcap files -endef - -define Package/tcprewrite -$(call Package/tcpreplay/default) - TITLE:=Rewrite the packets in a pcap file -endef - -define Package/tcpreplay-all -$(call Package/tcpreplay/default) - TITLE:=Pcap editing and replaying utilities - DEPENDS:=$(foreach m,$(TCPREPLAY_MODULES),+$(m)) -endef - -define Package/tcpbridge/description - tcpbridge is a tool for selectively briding network traffic across two - interfaces and optionally modifying the packets in between -endef - -define Package/tcpcapinfo/description - tcpcapinfo is a tool for decoding the structure of a pcap(3) file with a - focus on finding broken pcap files and determining how two related pcap - files might differ. -endef - -define Package/tcpliveplay/description - This program, 'tcpliveplay' replays a captured set of packets using new TCP - connections with the captured TCP payloads against a remote host in order - to do comprehensive vulnerability testings. -endef - -define Package/tcpprep/description - tcpprep is a ``pcap(3)'' file pre-processor which creates a cache file - which provides "rules" for ``tcprewrite(1)'' and ``tcpreplay(1)'' on how to - process and send packets. -endef - -define Package/tcpreplay/description - tcpreplay is a tool for replaying network traffic from files saved with - tcpdump or other tools which write pcap(3) files. -endef - -define Package/tcpreplay-edit/description - tcpreplay-edit includes all the functionality of both tcpreplay - and tcprewrite. -endef - -define Package/tcprewrite/description - Rewrite/edit the packets in a pcap file -endef - -define Package/tcpreplay-all/description - Tcpreplay is a suite of free Open Source utilities for - editing and replaying previously captured network traffic. - Originally designed to replay malicious traffic patterns to - Intrusion Detection/Prevention Systems, it has seen many evolutions - including capabilities to replay to web servers. - - Version 4.0.0 introduces features and performance enhancements - to support switches, routers, and IP Flow/NetFlow appliances. -endef - -CONFIGURE_VARS += \ - ac_cv_lib_nl_nl_cache_alloc=no \ - ac_cv_lib_nl_genl_3_genl_connect=no \ - ac_cv_lib_nl_3_nl_cache_alloc=no \ - ac_cv_lib_dbus_1_dbus_malloc=no - -CONFIGURE_ARGS += \ - --enable-force-pf \ - --enable-dynamic-link \ - --prefix="$(PKG_INSTALL_DIR)/usr" \ - --exec-prefix="$(PKG_INSTALL_DIR)/usr" \ - --with-libpcap="$(STAGING_DIR)/usr" - -define tcpreplayTemplate - define Package/$(1)/install - $(INSTALL_DIR) $$(1)/usr/bin ; \ - $(CP) $$(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin - endef -endef - -define Package/tcpreplay-all/install - : -endef - -$(foreach m, $(TCPREPLAY_MODULES), \ - $(eval $(call tcpreplayTemplate,$(m))) \ - $(eval $(call BuildPackage,$(m))) \ -) - -$(eval $(call BuildPackage,tcpreplay-all)) - diff --git a/net/tgt/Makefile b/net/tgt/Makefile deleted file mode 100644 index 3a01173..0000000 --- a/net/tgt/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (C) 2012-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tgt -PKG_VERSION:=1.0.65 -PKG_REV:=c8f86393d2ea3f37b64963f66af240f17d88b43d -PKG_RELEASE:=1 -PKG_USE_MIPS16:=0 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/fujita/tgt.git - -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_MAINTAINER:=Maxim Storchak -PKG_LICENSE:=GPL-2.0 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) - -include $(INCLUDE_DIR)/package.mk - -define Package/tgt - SECTION:=net - CATEGORY:=Network - URL:=http://stgt.sourceforge.net/ - TITLE:=userspace iSCSI target - DEPENDS:=+libpthread +libaio @KERNEL_AIO @KERNEL_DIRECT_IO -endef - -define Package/tgt/description -Linux SCSI target framework (tgt) aims to simplify various SCSI target driver (iSCSI, Fibre Channel, SRP, etc) creation and maintenance. -Key goals of the project are the clean integration into the scsi-mid layer and implementing a great portion of tgt in user space. -Tgt consists of kernel-space and user-space code. The kernel-space component is included in upstream as of 2.6.20. -Note that if you are interested in only iSCSI (probably you are), you need only the user-space code (any kernel version is fine). -endef - -define Build/Compile - CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - LD="$(TARGET_CC)" \ - install-programs -endef - -define Package/tgt/conffiles -/etc/config/tgt -endef - -define Package/tgt/install - $(INSTALL_DIR) $(1)/ - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) ./files/* $(1)/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtd $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tgtadm $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,tgt)) diff --git a/net/tgt/files/etc/config/tgt b/net/tgt/files/etc/config/tgt deleted file mode 100644 index de5239d..0000000 --- a/net/tgt/files/etc/config/tgt +++ /dev/null @@ -1,64 +0,0 @@ -config options 'tgt' -# iothreads limits number of worker threads per rdwr target, default is 16 -# which seems to be too much for an avarage router - option iothreads '2' -# option nop_count '3' -# option nop_interval '1' -# list portal '[::1]' -# list portal '127.0.0.1:3261' -# list portal '0.0.0.0:3262' -# list portal '[::]:3263' - -config target 1 - option name 'iqn.2012-06.org.openwrt:target1' -# list allow_name 'iqn.1994-05.org.example:fedcba987654' -# list allow_address '192.168.2.128/27' - -#config target 2 -# option name 'iqn.2012-06.org.openwrt:t2' - -# all options are set to default, except for the device -# lun "name" is constructed as TGTID_LUN -#config lun 1_1 -# option 'device' '/dev/sda' -# type of scsi device. available options: disk, cd, pt (sg passthrough) -# option 'type' 'disk' -# backing store access method: rdwr (read-write), aio (async IO), sg (for pt type only, device must be /dev/sgN) -# option 'bstype' 'aio' -# set sync and/or direct flags when opening device, affect only rdwr -# option 'sync' '0' -# option 'direct' '0' -# block size for lun, default is 512 -# option 'blocksize' 4096 -# override SCSI mode page, see tgtadm man page for details -# option 'mode_page' 'string' -# vendor, product, revision, SCSI ID and SCSI Serial number -# option 'vendor_id' 'string' -# option 'product_id' 'string' -# option 'product_rev' 'string' -# option 'scsi_id' 'string' -# option 'scsi_sn' 'string' -# refuse write attempts. applies only to disk type -# option 'readonly' '0' -# Disk devices default to non-removable, cd - to removable -# option 'removable' '0' -# 0 = Classic sense format, 1 = Support descriptor format. -# option 'sense_format' '0' - -#config lun 2_1 -# option device /mnt/iscsi.img - -#config lun 2_2 -# option device /dev/sdc - -#config account -# list target 1 -# list target 2 -# option user "username1" -# option password "pass1" - -#config account -# option target 2 -# option user "user2" -# option password "pwd2" -# option outgoing 1 diff --git a/net/tgt/files/etc/init.d/tgt b/net/tgt/files/etc/init.d/tgt deleted file mode 100755 index bd5f983..0000000 --- a/net/tgt/files/etc/init.d/tgt +++ /dev/null @@ -1,237 +0,0 @@ -#!/bin/sh /etc/rc.common -START=91 -STOP=10 - -EXTRA_COMMANDS="show" -EXTRA_HELP=" show Show current configuration of tgtd" - -NAME=tgt -PROG=/usr/sbin/tgtd -USE_PROCD=1 - -tgtadm="/usr/sbin/tgtadm --lld iscsi" -logger="logger -p daemon.err -s -t $NAME" - -validate_lun_section() { - uci_validate_section tgt lun $1 \ - 'device:or(file, device)' \ - 'type:or("disk", "cd", "pt"):disk' \ - 'bstype:or("rdwr", "aio", "sg"):rdwr' \ - 'sync:bool:0' \ - 'direct:bool:0' \ - 'blocksize:uinteger' \ - 'mode_page:string' \ - 'product_id:string' \ - 'product_rev:string' \ - 'readonly:bool:0' \ - 'removable:bool' \ - 'scsi_id:string' \ - 'scsi_sn:string' \ - 'sense_format:range(0, 1)' \ - 'vendor_id:string' -} - -handle_lun() { - local tgt_lun=$1 - local tgtid=$2 - local readonly device type bstype sync direct - local my_tgtid=${tgt_lun%_*} - local lun=${tgt_lun#*_} - - [ $my_tgtid -eq $tgtid ] || return 0 - - validate_lun_section $tgt_lun || { - $logger "Validation failed for LUN $tgt_lun" - return 1 - } - [ "$device" ] || { - $logger "Device is required for target $tgt_lun" - return 1 - } - - if [ $sync -ne 0 -o $direct -ne 0 ]; then - local bsoflags - [ $sync -ne 0 ] && bsoflags="sync" - [ $direct -ne 0 ] && bsoflags="direct" - [ $sync -ne 0 -a $direct -ne 0 ] && bsoflags="sync:direct" - bsoflags="--bsoflags $bsoflags" - fi - - blocksize=${blocksize+--blocksize=$blocksize} - local params='' i - for i in mode_page product_id product_rev readonly removable scsi_id scsi_sn sense_format vendor_id; do - eval params=\${$i+$i=\$$i,}\$params - done - - local _tgtadm="$tgtadm --mode logicalunit --tid $tgtid --lun $lun" - $_tgtadm --op new --backing-store $device --device-type $type --bstype $bstype --bstype $bstype $bsoflags $blocksize || { - $logger "Failed to create lun $tgt_lun" - return 1 - } - $_tgtadm --op update --param $params || { - $logger "Failed to update lun $tgt_lun" - return 1 - } -} - -validate_account_section () { - uci_validate_section tgt account $1 \ - 'target:list(uinteger)' \ - 'user:string' \ - 'password:string' \ - 'outgoing:bool:0' -} - -handle_account() { - local _tgtadm="$tgtadm --mode account" - local user password target outgoing - - validate_account_section $1 || { - $logger "Validation failed for account ${user:-$1}" - return 1 - } - [ "$user" ] || { - $logger "User is required for account $1. Run 'uci show tgt.$1' and check options" - return 1 - } - [ "$target" ] || { - $logger "Target is required for account $user" - return 1 - } - [ "$password" ] || { - $logger "Password is required for account $user" - return 1 - } - $_tgtadm --op new --user "$user" --password "$password" || { - $logger "Failed to create user $username" - return 1 - } -} - -bind_account_to_target() { - local _tgtadm="$tgtadm --mode account" - local tgtid=$2 user password outgoing - - validate_account_section $1 || { - $logger "Validation failed for account ${user:-$1}" - return 1 - } - - [ "$outgoing" -ne 0 ] && outgoing=--outgoing || outgoing="" - local t - for t in $target; do - [ "$t" -eq "$tgtid" ] && { - $_tgtadm --op bind --tid $tgtid --user "$user" $outgoing || { - $logger "Failed to bind user $username to target $tgtid" - return 1 - } - } - done - return 0 -} - -validate_target_section() { - uci_validate_section tgt target $1 \ - 'name:string:iqn.2012-06.org.openwrt' \ - 'allow_address:list(string):ALL' \ - 'allow_name:list(string)' -} - -handle_target() { - local tgtid=$1 - local _tgtadm="$tgtadm --mode target" - local name allow - - [ $tgtid -ge 0 ] || return 1 - validate_target_section $tgtid || { - $logger "Validation failed for target $tgtid" - return 1 - } - $_tgtadm --op new --tid $tgtid --targetname $name || { - $logger "Failed to create target $tgtid" - return 1 - } - local i - for i in $allow_address; do - $_tgtadm --op bind --tid $tgtid --initiator-address $i || { - $logger "Failed to set allow $i to connect to target $tgtid" - return 1 - } - done - for i in $allow_name; do - $_tgtadm --op bind --tid $tgtid --initiator-name $i || { - $logger "Failed to set allow $i to connect to target $tgtid" - return 1 - } - done - config_foreach handle_lun lun $tgtid || return 1 - config_foreach bind_account_to_target account $tgtid || return 1 -} - -configure() { - config_load $NAME - $tgtadm --mode sys --op update --name State -v offline || { - $logger "Failed to set system state to Offline" - return 1 - } - config_foreach handle_account account || return 1 - config_foreach handle_target target || return 1 - $tgtadm --mode sys --op update --name State -v ready || { - $logger "Failed to set system state to Ready" - return 1 - } - return 0 -} - -validate_tgt_section() { - uci_validate_section tgt options $1 \ - 'iothreads:uinteger' \ - 'portal:list(string)' \ - 'nop_interval:uinteger' \ - 'nop_count:uinteger' -} - -start_service() { - local iothreads portal nop_interval nop_count - validate_tgt_section tgt || { - $logger "Validation failed for tgt options" - return 1 - } - procd_open_instance - procd_set_param command $PROG -f - [ "$iothreads" ] && procd_append_param command -t $iothreads - [ "${portal}${nop_interval}${nop_count}" ] && { - local iscsi="" i - for i in nop_interval nop_count; do - eval iscsi=\${$i+$i=\$$i,}\$iscsi - done - for i in $portal; do - iscsi="portal=$i,$iscsi" - done - procd_append_param command --iscsi $iscsi - } - procd_set_param respawn - procd_close_instance - logger -p daemon.info -t $NAME -s "Configuration will be loaded in seconds" - ( sleep 5; configure || { stop_service; exit 1; } ) & -} - -stop_service() { - $tgtadm --mode sys --op update --name State -v offline || { - $logger "Failed to set system state to Offline" - return 1 - } - $tgtadm --mode target --op show \ - | awk '$1 == "Target" {sub(/:/,"",$2); print $2}' \ - | xargs -r -n1 $tgtadm --mode target --op delete --force --tid - $tgtadm --mode sys --op delete -} - -reload_service() { - stop_service - start_service -} - -show() { - $tgtadm --mode target --op show -} diff --git a/net/tgt/patches/020-usr_Makefile.patch b/net/tgt/patches/020-usr_Makefile.patch deleted file mode 100644 index 0120595..0000000 --- a/net/tgt/patches/020-usr_Makefile.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff --git a/usr/Makefile b/usr/Makefile -index d4e3eaf..ec1c9a3 100644 ---- a/usr/Makefile -+++ b/usr/Makefile -@@ -1,11 +1,11 @@ - sbindir ?= $(PREFIX)/sbin - libdir ?= $(PREFIX)/lib/tgt - --ifneq ($(shell test -e /usr/include/linux/signalfd.h && echo 1),) -+ifneq ($(shell test -n $(shell find $(STAGING_DIR)/usr/include -name "signalfd.h" | head -n1) && echo 1),) - CFLAGS += -DUSE_SIGNALFD - endif - --ifneq ($(shell test -n $(shell find /usr/include -name "timerfd.h" | head -n1) && echo 1),) -+ifneq ($(shell test -n $(shell find $(STAGING_DIR)/usr/include -name "timerfd.h" | head -n1) && echo 1),) - CFLAGS += -DUSE_TIMERFD - endif - -@@ -25,7 +25,7 @@ ifneq ($(SD_NOTIFY),) - CFLAGS += -DUSE_SYSTEMD - endif - --ifneq ($(shell test -e /usr/include/sys/eventfd.h && test -e /usr/include/libaio.h && echo 1),) -+ifneq ($(shell test -n $(shell find $(STAGING_DIR)/usr/include -name "eventfd.h" | head -n1) && test -n $(shell find $(STAGING_DIR)/usr/include -name "libaio.h" | head -n1) && echo 1),) - CFLAGS += -DUSE_EVENTFD - TGTD_OBJS += bs_aio.o - LIBS += -laio -@@ -55,7 +55,7 @@ ifneq ($(SD_NOTIFY),) - LIBS += -lsystemd - endif - --PROGRAMS += tgtd tgtadm tgtimg -+PROGRAMS += tgtd tgtadm - TGTD_OBJS += tgtd.o mgmt.o target.o scsi.o log.o driver.o util.o work.o \ - concat_buf.o parser.o spc.o sbc.o mmc.o osd.o scc.o smc.o \ - ssc.o libssc.o bs_rdwr.o bs_ssc.o \ -@@ -82,14 +82,6 @@ tgtadm: $(TGTADM_OBJS) - - -include $(TGTADM_DEP) - --TGTIMG_OBJS = tgtimg.o libssc.o libcrc32c.o --TGTIMG_DEP = $(TGTIMG_OBJS:.o=.d) -- --tgtimg: $(TGTIMG_OBJS) -- $(CC) $^ -o $@ -- ---include $(TGTIMG_DEP) -- - %.o: %.c - $(CC) -c $(CFLAGS) $*.c -o $*.o - @$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c diff --git a/net/tgt/patches/030-Makefile.patch b/net/tgt/patches/030-Makefile.patch deleted file mode 100644 index ab54f22..0000000 --- a/net/tgt/patches/030-Makefile.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- tgt-1.0.48.orig/Makefile 2014-06-04 15:03:53.000000000 +0300 -+++ tgt-1.0.48/Makefile 2014-06-04 15:18:13.132963670 +0300 -@@ -64,7 +64,7 @@ - $(MAKE) -C conf clean - - .PHONY: install --install: install-programs install-doc install-conf install-scripts -+install: install-programs - - .PHONY: rpm - rpm: diff --git a/net/tgt/patches/100-musl-compat.patch b/net/tgt/patches/100-musl-compat.patch deleted file mode 100644 index f606207..0000000 --- a/net/tgt/patches/100-musl-compat.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/usr/tgtd.h b/usr/tgtd.h -index d8b2ac1..c6eee54 100644 ---- a/usr/tgtd.h -+++ b/usr/tgtd.h -@@ -9,6 +9,10 @@ - #include - #endif - -+#ifndef __WORDSIZE -+#include -+#endif -+ - struct concat_buf; - - #define NR_SCSI_OPCODES 256 -diff --git a/usr/util.h b/usr/util.h -index 0e34c35..3e2e63b 100644 ---- a/usr/util.h -+++ b/usr/util.h -@@ -16,6 +16,10 @@ - #include - #include - -+#ifndef __WORDSIZE -+#include -+#endif -+ - #include "be_byteshift.h" - - #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) diff --git a/net/tinc/Makefile b/net/tinc/Makefile deleted file mode 100644 index d8f4c00..0000000 --- a/net/tinc/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2007-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tinc -PKG_VERSION:=1.0.30 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.tinc-vpn.org/packages -PKG_MD5SUM:=f3ca1fc1154ed1f2cac408ea06a1c1ca - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/tinc - SECTION:=net - CATEGORY:=Network - DEPENDS:=+liblzo +libopenssl +kmod-tun +zlib - TITLE:=VPN tunneling daemon - URL:=http://www.tinc-vpn.org/ - MAINTAINER:=Saverio Proto - SUBMENU:=VPN -endef - -define Package/tinc/description - tinc is a Virtual Private Network (VPN) daemon that uses tunnelling and - encryption to create a secure private network between hosts on the Internet. -endef - -TARGET_CFLAGS += -std=gnu99 - -CONFIGURE_ARGS += \ - --with-kernel="$(LINUX_DIR)" \ - --with-zlib="$(STAGING_DIR)/usr" \ - --with-lzo-include="$(STAGING_DIR)/usr/include/lzo" - -define Package/tinc/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tincd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) - $(INSTALL_DIR) $(1)/etc/tinc - $(INSTALL_DIR) $(1)/lib/upgrade/keep.d - $(INSTALL_DATA) files/tinc.upgrade $(1)/lib/upgrade/keep.d/tinc -endef - -define Package/tinc/conffiles -/etc/config/tinc -endef - -$(eval $(call BuildPackage,tinc)) diff --git a/net/tinc/files/tinc.config b/net/tinc/files/tinc.config deleted file mode 100644 index 1894078..0000000 --- a/net/tinc/files/tinc.config +++ /dev/null @@ -1,56 +0,0 @@ -config tinc-net NETNAME - option enabled 0 - - ## Daemon Configuration (cmd arguments) - #option generate_keys 0 - #option key_size 2048 - #option logfile /tmp/log/tinc.NETNAME.log - #option debug 3 - - ## Server Configuration (tinc.conf) - #option AddressFamily any - #option BindToAddress 127.0.0.1 - #option BindToInterface lo - - #list ConnectTo peer1 - - #option DirectOnly 0 - #option Forwarding internal - #option GraphDumpFile /tmp/log/tinc.NETNAME.dot - #option Hostnames 0 - #option IffOneQueue 0 - #option Interface NETNAME - #option KeyExpire 3600 - #option MACExpire 600 - #option MaxTimeout 900 - #option Mode router - - option Name NODENAME - - #option PingInterval 60 - #option PingTimeout 5 - #option PriorityInheritance 0 - #option PrivateKeyFile /etc/tinc/NETNAME/rsa_key.priv - #option ProcessPriority normal - #option ReplayWindow 16 - #option StrictSubnets 0 - #option TunnelServer 0 - #option UDPRcvBuf x - #option UDPSndBuf x - -config tinc-host NODENAME - option enabled 0 - - option net NETNAME - - #list Address example.com - #option Cipher blowfish - #option ClampMSS yes - #option Compression 0 - #option Digest sha1 - #option IndirectData 0 - #option MACLength 4 - #option PMTU 1514 - #option PMTUDiscovery yes - #option Port 655 - #option Subnet 192.168.1.0/24 diff --git a/net/tinc/files/tinc.init b/net/tinc/files/tinc.init deleted file mode 100644 index e49b358..0000000 --- a/net/tinc/files/tinc.init +++ /dev/null @@ -1,239 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2011 OpenWrt.org -# Copyright (C) 2011 Linus Lüssing -# Based on Jo-Philipp Wich's OpenVPN init script -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -START=42 - -SERVICE_USE_PID=1 - -BIN=/usr/sbin/tincd -EXTRA_COMMANDS="up down" - -LIST_SEP=" -" -TMP_TINC="/tmp/tinc" - -append_param() { - local v="$1" - case "$v" in - *_*_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;; - *_*_*) v=${v%%_*}-${v#*_}; v=${v%%_*}-${v#*_} ;; - *_*) v=${v%%_*}-${v#*_} ;; - esac - ARGS="$ARGS --$v" - return 0 -} - -append_conf_bools() { - local p; local v; local s="$1"; local f="$2"; shift; shift - for p in $*; do - config_get_bool v "$s" "$p" - [ "$v" == 1 ] && echo "$p = yes" >> "$f" - [ "$v" == 0 ] && echo "$p = no" >> "$f" - done -} - -append_params() { - local p; local v; local s="$1"; shift - for p in $*; do - config_get v "$s" "$p" - IFS="$LIST_SEP" - for v in $v; do - [ -n "$v" ] && append_param "$p" && ARGS="$ARGS=$v" - done - unset IFS - done -} - -append_conf_params() { - local p; local v; local s="$1"; local f="$2"; shift; shift - for p in $*; do - config_get v "$s" "$p" - IFS="$LIST_SEP" - for v in $v; do - # Look up OpenWRT interface names - [ "$p" = "BindToInterface" ] && { - local ifname=$(uci -P /var/state get network.$v.ifname 2>&-) - [ -n "$ifname" ] && v="$ifname" - } - - [ -n "$v" ] && echo "$p = $v" >> "$f" - done - unset IFS - done -} - -section_enabled() { - config_get_bool enabled "$1" 'enabled' 0 - [ $enabled -gt 0 ] -} - -prepare_host() { - local s="$1" - local n - - # net disabled? - config_get n "$s" net - section_enabled "$n" || return 1 - - if [ "$#" = "2" ]; then - [ "$2" != "$n" ] && return 1 - fi - - # host disabled? - section_enabled "$s" || { - [ -f "$TMP_TINC/$n/hosts/$s" ] && rm "$TMP_TINC/$n/hosts/$s" - return 1 - } - - [ ! -f "/etc/tinc/$n/hosts/$s" ] && { - echo -n "tinc: Warning, public key for $s for network $n " - echo -n "missing in /etc/tinc/$n/hosts/$s, " - echo "skipping configuration of $s" - return 1 - } - - # append flags - append_conf_bools "$s" "$TMP_TINC/$n/hosts/$s" \ - ClampMSS IndirectData PMTUDiscovery TCPOnly - - # append params - append_conf_params "$s" "$TMP_TINC/$n/hosts/$s" \ - Address Cipher Compression Digest MACLength PMTU \ - Port PublicKey PublicKeyFile Subnet -} - -check_gen_own_key() { - local s="$1"; local n; local k - - config_get n "$s" Name - config_get_bool k "$s" generate_keys 0 - [ "$k" == 0 ] && return 0 - - ([ -z "$n" ] || [ -f "$TMP_TINC/$s/hosts/$n" ] || [ -f "$TMP_TINC/$s/rsa_key.priv" ]) && \ - return 0 - [ ! -d "$TMP_TINC/$s/hosts" ] && mkdir -p "$TMP_TINC/$s/hosts" - - config_get k "$s" key_size - if [ -z "$k" ]; then - $BIN -c "$TMP_TINC/$s" --generate-keys - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/tinyproxy - SUBMENU:=Web Servers/Proxies - SECTION:=net - CATEGORY:=Network - TITLE:=Tinyproxy is a lightweight HTTP and HTTPS proxy - URL:=http://tinyproxy.sourceforge.net/ -endef - -define Package/tinyproxy/conffiles -/etc/config/tinyproxy -endef - -CONFIGURE_ARGS+= \ - --enable-filter \ - --enable-transparent \ - --disable-regexcheck \ - -define Package/tinyproxy/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/tinyproxy $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/usr/share/tinyproxy - $(CP) $(PKG_INSTALL_DIR)/usr/share/tinyproxy/*.html $(1)/usr/share/tinyproxy/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/tinyproxy.config $(1)/etc/config/tinyproxy - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/tinyproxy.init $(1)/etc/init.d/tinyproxy -endef - -$(eval $(call BuildPackage,tinyproxy)) diff --git a/net/tinyproxy/files/tinyproxy.config b/net/tinyproxy/files/tinyproxy.config deleted file mode 100644 index ac7b46f..0000000 --- a/net/tinyproxy/files/tinyproxy.config +++ /dev/null @@ -1,251 +0,0 @@ -config tinyproxy - -# -# Enable the proxy -# -option enabled 0 - -# -# Name of the user the tinyproxy daemon should switch to after the port -# has been bound. -# -option User nobody -option Group nogroup - -# -# Port to listen on. -# -option Port 8888 - -# -# If you have multiple interfaces this allows you to bind to only one. If -# this is commented out, tinyproxy will bind to all interfaces present. -# -#option Listen 192.168.0.1 - -# -# The Bind directive allows you to bind the outgoing connections to a -# particular IP address. -# -#option Bind 192.168.0.1 - -# -# Timeout: The number of seconds of inactivity a connection is allowed to -# have before it closed by tinyproxy. -# -option Timeout 600 - -# -# ErrorFile: Defines the HTML file to send when a given HTTP error -# occurs. You will probably need to customize the location to your -# particular install. The usual locations to check are: -# /usr/local/share/tinyproxy -# /usr/share/tinyproxy -# /etc/tinyproxy -# -#option ErrorFile_404 "/usr/share/tinyproxy/404.html" -#option ErrorFile_400 "/usr/share/tinyproxy/400.html" -#option ErrorFile_503 "/usr/share/tinyproxy/503.html" -#option ErrorFile_403 "/usr/share/tinyproxy/403.html" -#option ErrorFile_408 "/usr/share/tinyproxy/408.html" - -# -# DefaultErrorFile: The HTML file that gets sent if there is no -# HTML file defined with an ErrorFile keyword for the HTTP error -# that has occurred. -# -option DefaultErrorFile "/usr/share/tinyproxy/default.html" - -# -# StatFile: The HTML file that gets sent when a request is made -# for the stathost. If this file doesn't exist a basic page is -# hardcoded in tinyproxy. -# -option StatFile "/usr/share/tinyproxy/stats.html" - -# -# Where to log the information. Either LogFile or Syslog should be set, -# but not both. -# -option LogFile "/var/log/tinyproxy.log" -#option Syslog 1 - -# -# Set the logging level. Allowed settings are: -# Critical (least verbose) -# Error -# Warning -# Notice -# Connect (to log connections without Info's noise) -# Info (most verbose) -# The LogLevel logs from the set level and above. For example, if the LogLevel -# was set to Warning, than all log messages from Warning to Critical would be -# output, but Notice and below would be suppressed. -# -option LogLevel Info - -# -# Include the X-Tinyproxy header, which has the client's IP address when -# connecting to the sites listed. -# -# list XTinyproxy mydomain.com - -# -# This is the absolute highest number of threads which will be created. In -# other words, only MaxClients number of clients can be connected at the -# same time. -# -option MaxClients 100 - -# -# These settings set the upper and lower limit for the number of -# spare servers which should be available. If the number of spare servers -# falls below MinSpareServers then new ones will be created. If the number -# of servers exceeds MaxSpareServers then the extras will be killed off. -# -option MinSpareServers 5 -option MaxSpareServers 20 - -# -# Number of servers to start initially. -# -option StartServers 10 - -# -# MaxRequestsPerChild is the number of connections a thread will handle -# before it is killed. In practise this should be set to 0, which disables -# thread reaping. If you do notice problems with memory leakage, then set -# this to something like 10000 -# -option MaxRequestsPerChild 0 - -# -# The following is the authorization controls. If there are any access -# control keywords then the default action is to DENY. Otherwise, the -# default action is ALLOW. -# -# Also the order of the controls are important. The incoming connections -# are tested against the controls based on order. -# -list Allow 127.0.0.1 -#list Allow 192.168.0.0/16 -#list Allow 172.16.0.0/12 -#list Allow 10.0.0.0/8 - -# -# The "Via" header is required by the HTTP RFC, but using the real host name -# is a security concern. If the following directive is enabled, the string -# supplied will be used as the host name in the Via header; otherwise, the -# server's host name will be used. -# -option ViaProxyName "tinyproxy" - -# -# The location of the filter file. -# -#option Filter "/etc/tinyproxy/filter" - -# -# Filter based on URLs rather than domains. -# -#option FilterURLs 1 - -# -# Use POSIX Extended regular expressions rather than basic. -# -#option FilterExtended 1 - -# -# Use case sensitive regular expressions. -# -#option FilterCaseSensitive 1 - -# -# Change the default policy of the filtering system. If this directive is -# commented out, or is set to "0" then the default policy is to allow -# everything which is not specifically denied by the filter file. -# -# However, by setting this directive to "1" the default policy becomes to -# deny everything which is _not_ specifically allowed by the filter file. -# -#option FilterDefaultDeny 1 - -# -# If an Anonymous keyword is present, then anonymous proxying is enabled. -# The headers listed are allowed through, while all others are denied. If -# no Anonymous keyword is present, then all header are allowed through. -# You must include quotes around the headers. -# -#list Anonymous "Host" -#list Anonymous "Authorization" - -# -# This is a list of ports allowed by tinyproxy when the CONNECT method -# is used. To disable the CONNECT method altogether, set the value to 0. -# If no ConnectPort line is found, all ports are allowed (which is not -# very secure.) -# -# The following two ports are used by SSL. -# -list ConnectPort 443 -list ConnectPort 563 - -# -# Turns on upstream proxy support. -# -# The upstream rules allow you to selectively route upstream connections -# based on the host/domain of the site being accessed. -# -# For example: -# # connection to test domain goes through testproxy -# -#config upstream -# option type proxy -# option via testproxy:8008 -# option target ".test.domain.invalid" -# -#config upstream -# option type proxy -# option via testproxy:8008 -# option target ".our_testbed.example.com" -# -#config upstream -# option type proxy -# option via testproxy:8008 -# option target "192.168.128.0/255.255.254.0" -# -# # no upstream proxy for internal websites and unqualified hosts -# -#config upstream -# option type reject -# option target ".internal.example.com" -# -#config upstream -# option type reject -# option target "www.example.com" -# -#config upstream -# option type reject -# option target "10.0.0.0/8" -# -#config upstream -# option type reject -# option target "192.168.0.0/255.255.254.0" -# -#config upstream -# option type reject -# option target "." -# -# # default upstream is internet firewall -# -#config upstream -# option type proxy -# option via firewall.internal.example.com:80 -# -# The LAST matching rule wins the route decision. As you can see, you -# can use a host, or a domain: -# name matches host exactly -# .name matches any host in domain "name" -# . matches any host with no domain (in 'empty' domain) -# IP/bits matches network/mask -# IP/mask matches network/mask diff --git a/net/tinyproxy/files/tinyproxy.init b/net/tinyproxy/files/tinyproxy.init deleted file mode 100644 index 73f38c6..0000000 --- a/net/tinyproxy/files/tinyproxy.init +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008-2011 OpenWrt.org - -START=50 - -CFGFILE=/var/etc/tinyproxy.conf - -section_enabled() { - config_get_bool enabled "$1" 'enabled' 0 - [ $enabled -gt 0 ] -} - -start() { - config_load 'tinyproxy' - config_foreach start_proxy 'tinyproxy' -} - -stop() { - service_stop /usr/sbin/tinyproxy -} - -start_proxy() { - section_enabled "$1" || return 1 - - mkdir -m0755 -p /var/etc - echo '### AUTOGENERATED CONFIGURATION' > $CFGFILE - echo '### DO NOT EDIT' >> $CFGFILE - echo '### SEE /etc/config/tinyproxy INSTEAD' >> $CFGFILE - echo '' >> $CFGFILE - - proxy_atom "$1" User >> $CFGFILE - proxy_atom "$1" Group >> $CFGFILE - proxy_atom "$1" Port 8888 >> $CFGFILE - proxy_atom "$1" Listen >> $CFGFILE - proxy_atom "$1" Bind >> $CFGFILE - proxy_atom "$1" Timeout >> $CFGFILE - - proxy_string "$1" ErrorFile_400 "ErrorFile 400" >> $CFGFILE - proxy_string "$1" ErrorFile_403 "ErrorFile 403" >> $CFGFILE - proxy_string "$1" ErrorFile_404 "ErrorFile 404" >> $CFGFILE - proxy_string "$1" ErrorFile_408 "ErrorFile 408" >> $CFGFILE - proxy_string "$1" ErrorFile_503 "ErrorFile 503" >> $CFGFILE - - proxy_string "$1" DefaultErrorFile >> $CFGFILE - proxy_string "$1" StatHost StatHost 127.0.0.1 >> $CFGFILE - proxy_string "$1" StatFile >> $CFGFILE - proxy_string "$1" LogFile >> $CFGFILE - - proxy_flag "$1" Syslog >> $CFGFILE - - proxy_atom "$1" LogLevel >> $CFGFILE - - proxy_list "$1" XTinyproxy >> $CFGFILE - - proxy_atom "$1" MaxClients >> $CFGFILE - proxy_atom "$1" MinSpareServers >> $CFGFILE - proxy_atom "$1" MaxSpareServers >> $CFGFILE - proxy_atom "$1" StartServers >> $CFGFILE - proxy_atom "$1" MaxRequestsPerChild >> $CFGFILE - proxy_list "$1" Allow >> $CFGFILE - - proxy_string "$1" ViaProxyName >> $CFGFILE - proxy_string "$1" Filter >> $CFGFILE - - proxy_flag "$1" FilterURLs >> $CFGFILE - proxy_flag "$1" FilterExtended >> $CFGFILE - proxy_flag "$1" FilterCaseSensitive >> $CFGFILE - proxy_flag "$1" FilterDefaultDeny Yes No >> $CFGFILE - - proxy_list "$1" Anonymous '"' >> $CFGFILE - proxy_list "$1" ConnectPort >> $CFGFILE - - config_foreach write_upstream upstream - - service_start /usr/sbin/tinyproxy -c "$CFGFILE" -} - -write_upstream() { - local type - local via - local target - - config_get "type" "$1" "type" - config_get via "$1" via - config_get target "$1" target - [ -n "$target" ] && target=' "'"$target"'"' - - [ "$type" == "proxy" -a -n "$via" ] && \ - echo "upstream $via$target" >> $CFGFILE - - [ "$type" == "reject" -a -n "$target" ] && \ - echo "no upstream$target" >> $CFGFILE -} - -proxy_atom() { - local SECTION=$1 - local OPTION=$2 - local DEFAULT=$3 - - config_get _value "$SECTION" "$OPTION" - [ -z "$_value" ] && _value="$DEFAULT" - [ -n "$_value" ] && echo "$OPTION $_value" -} - -proxy_string() { - local SECTION=$1 - local OPTION=$2 - local ALIAS=$3 - local DEFAULT=$4 - - config_get _value "$SECTION" "$OPTION" - [ -z "$_value" ] && _value="$DEFAULT" - [ -n "$_value" ] && echo "${ALIAS:-${OPTION}} "'"'"$_value"'"' - [ -n "$_value" -a "$OPTION" = "LogFile" ] && { - touch $_value - chmod 666 $_value - } -} - -proxy_flag() { - local SECTION=$1 - local OPTION=$2 - local TRUE="${3:-On}" - local FALSE="${4:-Off}" - - config_get_bool _value "$SECTION" "$OPTION" 0 - [ "$_value" -eq "1" ] && _value="$TRUE" || _value="$FALSE" - echo "$OPTION $_value" -} - -proxy_list() { - local SECTION=$1 - local OPTION=$2 - local ENCLOSE=$3 - - config_get _value "$SECTION" "$OPTION" - [ -n "$_value" ] && { - for entry in $_value; do - echo "$OPTION ${ENCLOSE}${entry}${ENCLOSE}" - done - } -} diff --git a/net/tinyproxy/patches/010-no-docs-and-tests.patch b/net/tinyproxy/patches/010-no-docs-and-tests.patch deleted file mode 100644 index cbb0dd1..0000000 --- a/net/tinyproxy/patches/010-no-docs-and-tests.patch +++ /dev/null @@ -1,86 +0,0 @@ ---- a/configure -+++ b/configure -@@ -6815,59 +6815,8 @@ fi - - - --# Check for asciidoc --# Extract the first word of "a2x", so it can be a program name with args. --set dummy a2x; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_path_A2X+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- case $A2X in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_A2X="$A2X" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_A2X="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- test -z "$ac_cv_path_A2X" && ac_cv_path_A2X="no" -- ;; --esac --fi --A2X=$ac_cv_path_A2X --if test -n "$A2X"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A2X" >&5 --$as_echo "$A2X" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- -- if test "x$A2X" != "xno"; then -- HAVE_A2X_TRUE= -- HAVE_A2X_FALSE='#' --else - HAVE_A2X_TRUE='#' - HAVE_A2X_FALSE= --fi -- --if test x"$A2X" = x"no"; then -- as_fn_error $? "Test for asciidoc failed. See the file 'INSTALL' for help." "$LINENO" 5 --fi - - ac_config_files="$ac_config_files Makefile src/Makefile data/Makefile data/templates/Makefile etc/Makefile docs/Makefile docs/man5/Makefile docs/man5/tinyproxy.conf.txt docs/man8/Makefile docs/man8/tinyproxy.txt m4macros/Makefile tests/Makefile tests/scripts/Makefile" - ---- a/Makefile.am -+++ b/Makefile.am -@@ -2,9 +2,7 @@ SUBDIRS = \ - src \ - data \ - etc \ -- docs \ - m4macros \ -- tests - - # tools want this on a single line - ACLOCAL_AMFLAGS = -I m4macros ---- a/Makefile.in -+++ b/Makefile.in -@@ -222,9 +222,7 @@ SUBDIRS = \ - src \ - data \ - etc \ -- docs \ - m4macros \ -- tests - - - # tools want this on a single line diff --git a/net/tinyproxy/patches/020-config_and_pid-path.patch b/net/tinyproxy/patches/020-config_and_pid-path.patch deleted file mode 100644 index 3ab7482..0000000 --- a/net/tinyproxy/patches/020-config_and_pid-path.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/main.c -+++ b/src/main.c -@@ -326,8 +326,8 @@ static void initialize_config_defaults ( - conf->errorpages = NULL; - conf->stathost = safestrdup (TINYPROXY_STATHOST); - conf->idletimeout = MAX_IDLE_TIME; -- conf->logf_name = safestrdup (LOCALSTATEDIR "/log/tinyproxy/tinyproxy.log"); -- conf->pidpath = safestrdup (LOCALSTATEDIR "/run/tinyproxy/tinyproxy.pid"); -+ conf->logf_name = safestrdup (LOCALSTATEDIR "/log/tinyproxy.log"); -+ conf->pidpath = safestrdup (LOCALSTATEDIR "/tinyproxy.pid"); - } - - /** diff --git a/net/tinyproxy/patches/030-allow_bind_in_transparent_mode.patch b/net/tinyproxy/patches/030-allow_bind_in_transparent_mode.patch deleted file mode 100644 index 68d89db..0000000 --- a/net/tinyproxy/patches/030-allow_bind_in_transparent_mode.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/src/conf.c -+++ b/src/conf.c -@@ -865,7 +865,6 @@ static HANDLE_FUNC (handle_deny) - - static HANDLE_FUNC (handle_bind) - { --#ifndef TRANSPARENT_PROXY - int r = set_string_arg (&conf->bind_address, line, &match[2]); - - if (r) -@@ -873,11 +872,6 @@ static HANDLE_FUNC (handle_bind) - log_message (LOG_INFO, - "Outgoing connections bound to IP %s", conf->bind_address); - return 0; --#else -- fprintf (stderr, -- "\"Bind\" cannot be used with transparent support enabled.\n"); -- return 1; --#endif - } - - static HANDLE_FUNC (handle_listen) diff --git a/net/tinyproxy/patches/120-fix_INET6.patch b/net/tinyproxy/patches/120-fix_INET6.patch deleted file mode 100644 index 1c26835..0000000 --- a/net/tinyproxy/patches/120-fix_INET6.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/src/sock.c -+++ b/src/sock.c -@@ -39,8 +39,7 @@ - * returned if the bind succeeded. Otherwise, -1 is returned - * to indicate an error. - */ --static int --bind_socket (int sockfd, const char *addr, int family) -+static int bind_socket (int sockfd, const char *addr) - { - struct addrinfo hints, *res, *ressave; - -@@ -48,7 +47,7 @@ bind_socket (int sockfd, const char *add - assert (addr != NULL && strlen (addr) != 0); - - memset (&hints, 0, sizeof (struct addrinfo)); -- hints.ai_family = family; -+ hints.ai_family = AF_UNSPEC; - hints.ai_socktype = SOCK_STREAM; - - /* The local port it not important */ -@@ -106,14 +105,12 @@ int opensock (const char *host, int port - - /* Bind to the specified address */ - if (bind_to) { -- if (bind_socket (sockfd, bind_to, -- res->ai_family) < 0) { -+ if (bind_socket (sockfd, bind_to) < 0) { - close (sockfd); - continue; /* can't bind, so try again */ - } - } else if (config.bind_address) { -- if (bind_socket (sockfd, config.bind_address, -- res->ai_family) < 0) { -+ if (bind_socket (sockfd, config.bind_address) < 0) { - close (sockfd); - continue; /* can't bind, so try again */ - } diff --git a/net/tinyproxy/patches/CVE-2012-3505-tiniproxy-randomized-hashmaps.patch b/net/tinyproxy/patches/CVE-2012-3505-tiniproxy-randomized-hashmaps.patch deleted file mode 100644 index 4737b8b..0000000 --- a/net/tinyproxy/patches/CVE-2012-3505-tiniproxy-randomized-hashmaps.patch +++ /dev/null @@ -1,101 +0,0 @@ ---- a/src/child.c -+++ b/src/child.c -@@ -20,6 +20,9 @@ - * processing incoming connections. - */ - -+#include -+#include -+ - #include "main.h" - - #include "child.h" -@@ -196,6 +199,7 @@ static void child_main (struct child_s * - } - - ptr->connects = 0; -+ srand(time(NULL)); - - while (!config.quit) { - ptr->status = T_WAITING; ---- a/src/hashmap.c -+++ b/src/hashmap.c -@@ -25,6 +25,8 @@ - * don't try to free the data, or realloc the memory. :) - */ - -+#include -+ - #include "main.h" - - #include "hashmap.h" -@@ -50,6 +52,7 @@ struct hashbucket_s { - }; - - struct hashmap_s { -+ uint32_t seed; - unsigned int size; - hashmap_iter end_iterator; - -@@ -65,7 +68,7 @@ struct hashmap_s { - * - * If any of the arguments are invalid a negative number is returned. - */ --static int hashfunc (const char *key, unsigned int size) -+static int hashfunc (const char *key, unsigned int size, uint32_t seed) - { - uint32_t hash; - -@@ -74,7 +77,7 @@ static int hashfunc (const char *key, un - if (size == 0) - return -ERANGE; - -- for (hash = tolower (*key++); *key != '\0'; key++) { -+ for (hash = seed; *key != '\0'; key++) { - uint32_t bit = (hash & 1) ? (1 << (sizeof (uint32_t) - 1)) : 0; - - hash >>= 1; -@@ -104,6 +107,7 @@ hashmap_t hashmap_create (unsigned int n - if (!ptr) - return NULL; - -+ ptr->seed = (uint32_t)rand(); - ptr->size = nbuckets; - ptr->buckets = (struct hashbucket_s *) safecalloc (nbuckets, - sizeof (struct -@@ -201,7 +205,7 @@ hashmap_insert (hashmap_t map, const cha - if (!data || len < 1) - return -ERANGE; - -- hash = hashfunc (key, map->size); -+ hash = hashfunc (key, map->size, map->seed); - if (hash < 0) - return hash; - -@@ -382,7 +386,7 @@ ssize_t hashmap_search (hashmap_t map, c - if (map == NULL || key == NULL) - return -EINVAL; - -- hash = hashfunc (key, map->size); -+ hash = hashfunc (key, map->size, map->seed); - if (hash < 0) - return hash; - -@@ -416,7 +420,7 @@ ssize_t hashmap_entry_by_key (hashmap_t - if (!map || !key || !data) - return -EINVAL; - -- hash = hashfunc (key, map->size); -+ hash = hashfunc (key, map->size, map->seed); - if (hash < 0) - return hash; - -@@ -451,7 +455,7 @@ ssize_t hashmap_remove (hashmap_t map, c - if (map == NULL || key == NULL) - return -EINVAL; - -- hash = hashfunc (key, map->size); -+ hash = hashfunc (key, map->size, map->seed); - if (hash < 0) - return hash; - diff --git a/net/tinyproxy/patches/CVE-2012-3505-tinyproxy-limit-headers.patch b/net/tinyproxy/patches/CVE-2012-3505-tinyproxy-limit-headers.patch deleted file mode 100644 index b8023ab..0000000 --- a/net/tinyproxy/patches/CVE-2012-3505-tinyproxy-limit-headers.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/src/reqs.c -+++ b/src/reqs.c -@@ -610,6 +610,11 @@ add_header_to_connection (hashmap_t hash - return hashmap_insert (hashofheaders, header, sep, len); - } - -+/* define max number of headers. big enough to handle legitimate cases, -+ * but limited to avoid DoS -+ */ -+#define MAX_HEADERS 10000 -+ - /* - * Read all the headers from the stream - */ -@@ -617,6 +622,7 @@ static int get_all_headers (int fd, hash - { - char *line = NULL; - char *header = NULL; -+ int count; - char *tmp; - ssize_t linelen; - ssize_t len = 0; -@@ -625,7 +631,7 @@ static int get_all_headers (int fd, hash - assert (fd >= 0); - assert (hashofheaders != NULL); - -- for (;;) { -+ for (count = 0; count < MAX_HEADERS; count++) { - if ((linelen = readline (fd, &line)) <= 0) { - safefree (header); - safefree (line); -@@ -691,6 +697,12 @@ static int get_all_headers (int fd, hash - - safefree (line); - } -+ -+ /* if we get there, this is we reached MAX_HEADERS count. -+ bail out with error */ -+ safefree (header); -+ safefree (line); -+ return -1; - } - - /* diff --git a/net/tor/Makefile b/net/tor/Makefile deleted file mode 100644 index b6ab886..0000000 --- a/net/tor/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# -# Copyright (C) 2008-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tor -PKG_VERSION:=0.2.9.9 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://dist.torproject.org/ \ - https://archive.torproject.org/tor-package-archive -PKG_MD5SUM:=33325d2b250fd047ba2ddc5d11c2190c4e2951f4b03ec48ebd8bf0666e990d43 -PKG_MAINTAINER:=Hauke Mehrtens -PKG_LICENSE_FILES:=LICENSE - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/tor/Default - SECTION:=net - CATEGORY:=Network - URL:=https://www.torproject.org/ - USERID:=tor=52:tor=52 -endef - -define Package/tor/Default/description - Tor is a toolset for a wide range of organizations and people that want to - improve their safety and security on the Internet. Using Tor can help you - anonymize web browsing and publishing, instant messaging, IRC, SSH, and - more. Tor also provides a platform on which software developers can build - new applications with built-in anonymity, safety, and privacy features. -endef - -define Package/tor -$(call Package/tor/Default) - TITLE:=An anonymous Internet communication system - DEPENDS:=+libevent2 +libopenssl +libpthread +librt +zlib +libcap -endef - -define Package/tor/description -$(call Package/tor/Default/description) - This package contains the tor daemon. -endef - -define Package/tor-gencert -$(call Package/tor/Default) - TITLE:=Tor certificate generation - DEPENDS:=+tor -endef - -define Package/tor-gencert/description -$(call Package/tor/Default/description) - Generate certs and keys for Tor directory authorities -endef - -define Package/tor-resolve -$(call Package/tor/Default) - TITLE:=tor hostname resolve - DEPENDS:=+tor -endef - -define Package/tor-resolve/description -$(call Package/tor/Default/description) - Resolve a hostname to an IP address via tor -endef - -define Package/tor-geoip -$(call Package/tor/Default) - TITLE:=GeoIP db for tor - DEPENDS:=+tor -endef - -define Package/tor-geoip/description -$(call Package/tor/Default/description) - This package contains a GeoIP database mapping IP addresses to countries. -endef - -define Package/tor/conffiles -/etc/tor/torrc -/var/lib/tor/fingerprint -/var/lib/tor/keys/* -endef - -CONFIGURE_ARGS += \ - --with-libevent-dir="$(STAGING_DIR)/usr" \ - --with-ssl-dir="$(STAGING_DIR)/usr" \ - --with-openssl-dir="$(STAGING_DIR)/usr" \ - --with-zlib-dir="$(STAGING_DIR)/usr" \ - --disable-asciidoc \ - --disable-seccomp \ - --disable-libscrypt \ - --disable-unittests \ - --disable-largefile \ - --with-tor-user=tor \ - --with-tor-group=tor - -EXTRA_CFLAGS += -std=gnu99 - -ifneq ($(CONFIG_SSP_SUPPORT),y) - CONFIGURE_ARGS += \ - --disable-gcc-hardening -else - EXTRA_CFLAGS += -fPIC -endif - -CONFIGURE_VARS += \ - CROSS_COMPILE="yes" - -define Package/tor/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/torify $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/tor.init $(1)/etc/init.d/tor - $(INSTALL_DIR) $(1)/etc/tor - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/tor/torrc.sample $(1)/etc/tor/torrc -endef - -define Package/tor-gencert/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor-gencert $(1)/usr/sbin/ -endef - -define Package/tor-resolve/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor-resolve $(1)/usr/sbin/ -endef - -define Package/tor-geoip/install - $(INSTALL_DIR) $(1)/usr/share/tor - $(CP) $(PKG_INSTALL_DIR)/usr/share/tor/geoip $(1)/usr/share/tor/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/tor/geoip6 $(1)/usr/share/tor/ -endef - -$(eval $(call BuildPackage,tor)) -$(eval $(call BuildPackage,tor-gencert)) -$(eval $(call BuildPackage,tor-resolve)) -$(eval $(call BuildPackage,tor-geoip)) diff --git a/net/tor/files/tor.init b/net/tor/files/tor.init deleted file mode 100644 index 6974057..0000000 --- a/net/tor/files/tor.init +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=50 -STOP=50 - -USE_PROCD=1 - -start_service() { - [ -f /var/run/tor.pid ] || { - touch /var/run/tor.pid - chown tor:tor /var/run/tor.pid - } - [ -d /var/lib/tor ] || { - mkdir -m 0755 -p /var/lib/tor - chmod 0700 /var/lib/tor - chown tor:tor /var/lib/tor - } - [ -d /var/log/tor ] || { - mkdir -m 0755 -p /var/log/tor - chown tor:tor /var/log/tor - } - procd_open_instance - procd_set_param command /usr/sbin/tor --runasdaemon 0 - procd_close_instance -} diff --git a/net/tor/patches/001-torrc.patch b/net/tor/patches/001-torrc.patch deleted file mode 100644 index 1a784d2..0000000 --- a/net/tor/patches/001-torrc.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/src/config/torrc.sample.in -+++ b/src/config/torrc.sample.in -@@ -39,7 +39,7 @@ - ## Send every possible message to @LOCALSTATEDIR@/log/tor/debug.log - #Log debug file @LOCALSTATEDIR@/log/tor/debug.log - ## Use the system log instead of Tor's logfiles --#Log notice syslog -+Log notice syslog - ## To send all messages to stderr: - #Log debug stderr - -@@ -50,7 +50,7 @@ - - ## The directory for keeping all the keys/etc. By default, we store - ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows. --#DataDirectory @LOCALSTATEDIR@/lib/tor -+DataDirectory @LOCALSTATEDIR@/lib/tor - - ## The port on which Tor will listen for local connections from Tor - ## controller applications, as documented in control-spec.txt. -@@ -204,3 +204,4 @@ - ## address manually to your friends, uncomment this line: - #PublishServerDescriptor 0 - -+User tor diff --git a/net/transmission/Makefile b/net/transmission/Makefile deleted file mode 100644 index 596b71e..0000000 --- a/net/transmission/Makefile +++ /dev/null @@ -1,204 +0,0 @@ -# -# Copyright (C) 2009-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=transmission -PKG_VERSION:=2.92+git -PKG_RELEASE:=4 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/transmission/transmission.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=35fea28d1a37875ef7480ac061754df617805b19 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_MIRROR_MD5SUM:=aeeb8dfd918bd2cf4fb6fbdf58bd822e9b509df1ba5ec408888edd161123ef8e - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/transmission/template - SUBMENU:=BitTorrent - SECTION:=net - CATEGORY:=Network - TITLE:=BitTorrent client - URL:=http://www.transmissionbt.com - MAINTAINER:=Cezary Jackiewicz -endef - -define Package/transmission-daemon/Default - $(call Package/transmission/template) - DEPENDS:=+libcurl +libpthread +libevent2 +librt +zlib - USERID:=transmission=224:transmission=224 -endef - -define Package/transmission-daemon-openssl - $(call Package/transmission-daemon/Default) - TITLE+= (with OpenSSL) - DEPENDS+=+libopenssl - VARIANT:=openssl -endef - -define Package/transmission-daemon-mbedtls - $(call Package/transmission-daemon/Default) - TITLE+= (with mbed TLS) - DEPENDS+=+libmbedtls - VARIANT:=mbedtls -endef - -define Package/transmission-cli/Default - $(call Package/transmission/template) - DEPENDS:=+libcurl +libpthread +libevent2 +librt +zlib -endef - -define Package/transmission-cli-openssl - $(call Package/transmission-cli/Default) - TITLE+= (with OpenSSL) - DEPENDS+=+libopenssl - VARIANT:=openssl -endef - -define Package/transmission-cli-mbedtls - $(call Package/transmission-cli/Default) - TITLE+= (with mbed TLS) - DEPENDS+=+libmbedtls - VARIANT:=mbedtls -endef - -define Package/transmission-remote/Default - $(call Package/transmission/template) - DEPENDS:=+libcurl +libpthread +libevent2 +librt +zlib -endef - -define Package/transmission-remote-openssl - $(call Package/transmission-remote/Default) - TITLE+= (with OpenSSL) - DEPENDS+=+libopenssl - VARIANT:=openssl -endef - -define Package/transmission-remote-mbedtls - $(call Package/transmission-remote/Default) - TITLE+= (with mbed TLS) - DEPENDS+=+libmbedtls - VARIANT:=mbedtls -endef - -define Package/transmission-web - $(call Package/transmission/template) - TITLE+= (webinterface) - DEPENDS:=@(PACKAGE_transmission-daemon-openssl||PACKAGE_transmission-daemon-mbedtls) -endef - - -define Package/transmission-daemon/Default/description - Transmission is a simple BitTorrent client. - It features a very simple, intuitive interface - on top on an efficient, cross-platform back-end. - This package contains the daemon itself. -endef -Package/transmission-daemon-openssl/description = $(Package/transmission-daemon/Default/description) -Package/transmission-daemon-mbedtls/description = $(Package/transmission-daemon/Default/description) - -define Package/transmission-cli/Default/description - CLI utilities for transmission. -endef -Package/transmission-cli-openssl/description = $(Package/transmission-cli/Default/description) -Package/transmission-cli-mbedtls/description = $(Package/transmission-cli/Default/description) - -define Package/transmission-remote/Default/description - CLI remote interface for transmission. -endef -Package/transmission-remote-openssl/description = $(Package/transmission-remote/Default/description) -Package/transmission-remote-mbedtls/description = $(Package/transmission-remote/Default/description) - -define Package/transmission-web/description - Webinterface resources for transmission. -endef - -define Package/transmission-daemon-openssl/conffiles -/etc/config/transmission -endef -Package/transmission-daemon-mbedtls/conffiles = $(Package/transmission-daemon-openssl/conffiles) - - -CONFIGURE_VARS += \ - LIBEVENT_LIBS="$(STAGING_DIR)/usr/lib/libevent-2.0.so.5" - -CONFIGURE_ARGS += \ - --enable-daemon \ - --enable-cli \ - --without-gtk \ - --enable-largefile \ - --enable-lightweight - -ifeq ($(BUILD_VARIANT),openssl) - CONFIGURE_ARGS += \ - --with-crypto=openssl -endif - -ifeq ($(BUILD_VARIANT),mbedtls) - CONFIGURE_ARGS += \ - --with-crypto=polarssl - CONFIGURE_VARS += \ - MBEDTLS_CFLAGS="-I$(STAGING_DIR)/usr/include/mbedtls" \ - MBEDTLS_LIBS="-lmbedtls -lmbedcrypto" -endif - -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" - -TARGET_CFLAGS += -std=gnu99 - -define Build/Configure - ( cd $(PKG_BUILD_DIR); ./autogen.sh $(CONFIGURE_ARGS)) - $(call Build/Configure/Default,$CONFIGURE_ARGS) -endef - -define Package/transmission-daemon-openssl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) files/transmission.init $(1)/etc/init.d/transmission - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) files/transmission.config $(1)/etc/config/transmission -endef -Package/transmission-daemon-mbedtls/install = $(Package/transmission-daemon-openssl/install) - -define Package/transmission-cli-openssl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-cli \ - $(PKG_INSTALL_DIR)/usr/bin/transmission-create \ - $(PKG_INSTALL_DIR)/usr/bin/transmission-edit \ - $(PKG_INSTALL_DIR)/usr/bin/transmission-show \ - $(1)/usr/bin/ -endef -Package/transmission-cli-mbedtls/install = $(Package/transmission-cli-openssl/install) - -define Package/transmission-remote-openssl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-remote $(1)/usr/bin/ -endef -Package/transmission-remote-mbedtls/install = $(Package/transmission-remote-openssl/install) - -define Package/transmission-web/install - $(INSTALL_DIR) $(1)/usr/share/transmission - $(CP) $(PKG_INSTALL_DIR)/usr/share/transmission/web $(1)/usr/share/transmission/ -endef - -$(eval $(call BuildPackage,transmission-daemon-openssl)) -$(eval $(call BuildPackage,transmission-daemon-mbedtls)) -$(eval $(call BuildPackage,transmission-cli-openssl)) -$(eval $(call BuildPackage,transmission-cli-mbedtls)) -$(eval $(call BuildPackage,transmission-remote-openssl)) -$(eval $(call BuildPackage,transmission-remote-mbedtls)) -$(eval $(call BuildPackage,transmission-web)) diff --git a/net/transmission/files/transmission.config b/net/transmission/files/transmission.config deleted file mode 100644 index 2ea69d0..0000000 --- a/net/transmission/files/transmission.config +++ /dev/null @@ -1,74 +0,0 @@ -config transmission - option enabled 0 - option config_dir '/tmp/transmission' - #option user 'nobody' - option mem_percentage 50 - option nice 10 - option ionice_flags '-c 3' - option alt_speed_down 50 - option alt_speed_enabled false - option alt_speed_time_begin 540 - option alt_speed_time_day 127 - option alt_speed_time_enabled false - option alt_speed_time_end 1020 - option alt_speed_up 50 - option bind_address_ipv4 '0.0.0.0' - option bind_address_ipv6 '::' - option blocklist_enabled false - option blocklist_url '' - option cache_size_mb 2 - option dht_enabled true - option download_dir '/tmp/transmission/done' - option download_queue_enabled true - option download_queue_size 4 - option encryption 1 - option idle_seeding_limit 30 - option idle_seeding_limit_enabled false - option incomplete_dir '/tmp/transmission/incomplete' - option incomplete_dir_enabled false - option lazy_bitfield_enabled true - option lpd_enabled false - option message_level 1 - option peer_congestion_algorithm '' - option peer_limit_global 240 - option peer_limit_per_torrent 60 - option peer_port 51413 - option peer_port_random_high 65535 - option peer_port_random_low 49152 - option peer_port_random_on_start false - option peer_socket_tos 'default' - option pex_enabled true - option port_forwarding_enabled true - option preallocation 1 - option prefetch_enabled true - option queue_stalled_enabled true - option queue_stalled_minutes 30 - option ratio_limit 2.0000 - option ratio_limit_enabled false - option rename_partial_files true - option rpc_authentication_required false - option rpc_bind_address '0.0.0.0' - option rpc_enabled true - option rpc_password '' - option rpc_port 9091 - option rpc_url '/transmission/' - option rpc_username '' - option rpc_whitelist '127.0.0.1,192.168.1.*' - option rpc_whitelist_enabled true - option scrape_paused_torrents_enabled true - option script_torrent_done_enabled false - option script_torrent_done_filename '' - option seed_queue_enabled false - option seed_queue_size 10 - option speed_limit_down 100 - option speed_limit_down_enabled false - option speed_limit_up 20 - option speed_limit_up_enabled false - option start_added_torrents true - option trash_original_torrent_files false - option umask 18 - option upload_slots_per_torrent 14 - option utp_enabled true - option scrape_paused_torrents true - option watch_dir_enabled false - option watch_dir '' diff --git a/net/transmission/files/transmission.init b/net/transmission/files/transmission.init deleted file mode 100644 index f7b1d41..0000000 --- a/net/transmission/files/transmission.init +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2010-2015 OpenWrt.org - -START=99 -USE_PROCD=1 - - -LIST_SEP=" -" - -append_params() { - local p; local v; local s="$1"; shift - for p in $*; do - config_get v "$s" "$p" - IFS="$LIST_SEP" - for v in $v; do - [ -n "$v" ] && ( - echo "\""$p"\": "$v"," | sed -e 's|_|-|g' >> $config_file - ) - done - unset IFS - done -} - -append_params_quotes() { - local p; local v; local s="$1"; shift - for p in $*; do - config_get v "$s" "$p" - IFS="$LIST_SEP" - for v in $v; do - [ -n "$v" ] && ( - echo -n "\""$p | sed -e 's|/|\\/|g;s|_|-|g' >> $config_file; \ - echo "\": \""$v"\"," >> $config_file - ) - done - unset IFS - done -} - -section_enabled() { - config_get_bool enabled "$1" 'enabled' 0 - [ $enabled -gt 0 ] -} - -transmission() { - local cfg="$1" - local USE - - local user - local download_dir config_dir - local mem_percentage - local config_overwrite nice ionice_flags - local cmdline - - section_enabled "$section" || return 1 - - config_get config_dir "$cfg" 'config_dir' '/var/etc/transmission' - config_get user "$cfg" 'user' - config_get download_dir "$cfg" 'download_dir' '/var/etc/transmission' - config_get mem_percentage "$cfg" 'mem_percentage' '50' - config_get config_overwrite "$cfg" config_overwrite 1 - config_get nice "$cfg" nice 0 - config_get ionice_flags "$cfg" ionice_flags '' - which ionice > /dev/null || ionice_flags='' - - local MEM=$(sed -ne 's!^MemTotal:[[:space:]]*\([0-9]*\) kB$!\1!p' /proc/meminfo) - if test "$MEM" -gt 1;then - USE=$(expr $MEM \* $mem_percentage \* 10) - fi - - config_file="$config_dir/settings.json" - [ -d $config_dir ] || { - mkdir -m 0755 -p "$config_dir" - touch $config_file - [ -z "$user" ] || chown -R $user $config_dir - } - - [ "$config_overwrite" == 0 ] || { - - echo "{" > $config_file - - append_params "$cfg" \ - alt_speed_down alt_speed_enabled alt_speed_time_begin alt_speed_time_day \ - alt_speed_time_enabled alt_speed_time_end alt_speed_up blocklist_enabled \ - cache_size_mb download_queue_enabled download_queue_size \ - dht_enabled encryption idle_seeding_limit idle_seeding_limit_enabled \ - incomplete_dir_enabled lazy_bitfield_enabled lpd_enabled message_level \ - peer_limit_global peer_limit_per_torrent peer_port \ - peer_port_random_high peer_port_random_low peer_port_random_on_start \ - pex_enabled port_forwarding_enabled preallocation prefetch_enabled \ - ratio_limit ratio_limit_enabled rename_partial_files rpc_authentication_required \ - rpc_enabled rpc_port rpc_whitelist_enabled queue_stalled_enabled \ - queue_stalled_minutes scrape_paused_torrents_enabled script_torrent_done_enabled \ - seed_queue_enabled seed_queue_size \ - speed_limit_down speed_limit_down_enabled speed_limit_up \ - speed_limit_up_enabled start_added_torrents trash_original_torrent_files \ - umask upload_slots_per_torrent utp_enabled scrape_paused_torrents \ - watch_dir_enabled - - append_params_quotes "$cfg" \ - blocklist_url bind_address_ipv4 bind_address_ipv6 download_dir incomplete_dir \ - peer_congestion_algorithm peer_socket_tos rpc_bind_address rpc_password rpc_url \ - rpc_username rpc_whitelist script_torrent_done_filename watch_dir - - echo "\""invalid-key"\": false" >> $config_file - echo "}" >> $config_file - - } - - cmdline="/usr/bin/transmission-daemon -g $config_dir -f" - [ "$ionice_flags" ] && cmdline="ionice $ionice_flags $cmdline" - procd_open_instance - procd_set_param command $cmdline - procd_set_param respawn retry=60 - procd_set_param user "$user" - procd_set_param nice "$nice" - if test -z "$USE";then - procd_set_param limits core="0 0" - else - procd_set_param limits core="0 0" as="$USE $USE" - logger -t transmission "Starting with $USE virt mem" - fi - - procd_add_jail transmission log - procd_add_jail_mount $config_file - procd_add_jail_mount_rw $download_dir - procd_close_instance -} - -start_service() { - config_load 'transmission' - config_foreach transmission 'transmission' -} - diff --git a/net/transmission/patches/020-use-internal-miniupnp.patch b/net/transmission/patches/020-use-internal-miniupnp.patch deleted file mode 100644 index d3a2c8e..0000000 --- a/net/transmission/patches/020-use-internal-miniupnp.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -386,7 +386,7 @@ dnl See if ANY version of miniupnpc is i - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([#include ], - [struct UPNPDev dev;])], -- [upnp_version="unknown"], -+ [upnp_version="none"], - [upnp_version="none"] - ) - diff --git a/net/transmission/patches/030-fix-musl-build.patch b/net/transmission/patches/030-fix-musl-build.patch deleted file mode 100644 index f03aebc..0000000 --- a/net/transmission/patches/030-fix-musl-build.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/libtransmission/bitfield.c -+++ b/libtransmission/bitfield.c -@@ -6,6 +6,8 @@ - * - */ - -+#define __NEED_ssize_t -+ - #include - #include /* memset */ - -@@ -13,6 +15,7 @@ - #include "bitfield.h" - #include "utils.h" /* tr_new0 () */ - -+ - const tr_bitfield TR_BITFIELD_INIT = { NULL, 0, 0, 0, false, false }; - - /**** ---- a/libtransmission/fdlimit.h -+++ b/libtransmission/fdlimit.h -@@ -10,6 +10,8 @@ - #error only libtransmission should #include this header. - #endif - -+#define __NEED_off_t -+ - #include "transmission.h" - #include "file.h" - #include "net.h" diff --git a/net/transmission/patches/040-fix-for-mbedtls.patch b/net/transmission/patches/040-fix-for-mbedtls.patch deleted file mode 100644 index c766786..0000000 --- a/net/transmission/patches/040-fix-for-mbedtls.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -154,24 +154,8 @@ AS_IF([test "x$want_crypto" = "xauto" -o - AS_IF([test "x$want_crypto" = "xauto" -o "x$want_crypto" = "xpolarssl"], [ - PKG_CHECK_MODULES(MBEDTLS, [mbedtls >= $POLARSSL_MINIMUM], - [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS="$MBEDTLS_CFLAGS"; CRYPTO_LIBS="$MBEDTLS_LIBS"; POLARSSL_IS_MBEDTLS=yes], -- [AC_CHECK_HEADER([polarssl/version.h], -- [AC_EGREP_CPP([version_ok], [#include -- #if defined (POLARSSL_VERSION_NUMBER) && POLARSSL_VERSION_NUMBER >= $POLARSSL_MINIMUM -- version_ok -- #endif], -- [AC_CHECK_LIB([polarssl], [dhm_calc_secret], -- [want_crypto="polarssl"; CRYPTO_PKG="polarssl"; CRYPTO_CFLAGS=""; CRYPTO_LIBS="-lpolarssl"], -- [AS_IF([test "x$want_crypto" = "xpolarssl"], -- [AC_MSG_ERROR([PolarSSL support requested, but library not found.])] -- )] -- )], -- [AS_IF([test "x$want_crypto" = "xpolarssl"], -- [AC_MSG_ERROR([PolarSSL support requested, but version not suitable.])] -- )] -- )], -- [AS_IF([test "x$want_crypto" = "xpolarssl"], -- [AC_MSG_ERROR([PolarSSL support requested, but headers not found.])] -- )] -+ [AS_IF([test "x$want_crypto" = "xpolarssl"], -+ [AC_MSG_ERROR([PolarSSL support requested, but library not found.])] - )] - ) - ]) diff --git a/net/transmission/patches/050-mask-as-release.patch b/net/transmission/patches/050-mask-as-release.patch deleted file mode 100644 index 7f25535..0000000 --- a/net/transmission/patches/050-mask-as-release.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -42,8 +42,8 @@ set(TR_NAME ${PROJECT_NAME}) - # "Z" for unsupported trunk builds, - # "0" for stable, supported releases - # these should be the only two lines you need to change --set(TR_USER_AGENT_PREFIX "2.92+") --set(TR_PEER_ID_PREFIX "-TR292Z-") -+set(TR_USER_AGENT_PREFIX "2.92") -+set(TR_PEER_ID_PREFIX "-TR2920-") - - string(REGEX MATCH "^([0-9]+)\\.([0-9]+).*" TR_VERSION "${TR_USER_AGENT_PREFIX}") - set(TR_VERSION_MAJOR "${CMAKE_MATCH_1}") ---- a/configure.ac -+++ b/configure.ac -@@ -3,8 +3,8 @@ dnl STATUS: "X" for prerelease beta buil - dnl "Z" for unsupported trunk builds, - dnl "0" for stable, supported releases - dnl these should be the only two lines you need to change --m4_define([user_agent_prefix],[2.92+]) --m4_define([peer_id_prefix],[-TR292Z-]) -+m4_define([user_agent_prefix],[2.92]) -+m4_define([peer_id_prefix],[-TR2920-]) - - AC_INIT([transmission],[user_agent_prefix],[https://trac.transmissionbt.com/newticket]) - AC_SUBST(USERAGENT_PREFIX,[user_agent_prefix]) diff --git a/net/travelmate/Makefile b/net/travelmate/Makefile deleted file mode 100644 index 6f2d2a0..0000000 --- a/net/travelmate/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) 2016-2017 Dirk Brenken (dev@brenken.org) -# This is free software, licensed under the GNU General Public License v3. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=travelmate -PKG_VERSION:=0.3.2 -PKG_RELEASE:=1 -PKG_LICENSE:=GPL-3.0+ -PKG_MAINTAINER:=Dirk Brenken - -include $(INCLUDE_DIR)/package.mk - -define Package/$(PKG_NAME) - SECTION:=net - CATEGORY:=Network - TITLE:=A wlan connection manager for travel router - PKGARCH:=all -endef - -define Package/$(PKG_NAME)/description -A wlan connection manager for travel router. -Please see https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md for further information. - -endef - -define Package/$(PKG_NAME)/conffiles -/etc/config/travelmate -endef - -define Build/Prepare -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) ./files/travelmate.sh $(1)/usr/bin/ - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/travelmate.init $(1)/etc/init.d/travelmate - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/travelmate.conf $(1)/etc/config/travelmate -endef - -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/net/travelmate/files/README.md b/net/travelmate/files/README.md deleted file mode 100644 index 4cd39d6..0000000 --- a/net/travelmate/files/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# travelmate, a wlan connection manager for travel router - -## Description -If you’re planning an upcoming vacation or a business trip, taking your laptop, tablet or smartphone give you the ability to connect with friends or complete work on the go. But many hotels don’t have a secure wireless network setup or you’re limited on using a single device at once. Investing in a portable, mini travel router is a great way to connect all of your devices at once while having total control over your own personalized wireless network. -A logical combination of AP+STA mode on one physical radio allows most of OpenWrt/LEDE supported router devices to connect to a wireless hotspot/station (STA) and provide a wireless access point (AP) from that hotspot at the same time. Downside of this solution: whenever the STA interface looses the connection it will go into an active scan cycle which renders the radio unusable for AP mode operation, therefore the AP is taken down if the STA looses its association. -To avoid these kind of deadlocks, travelmate set all station interfaces in an "always off" mode and connects automatically to available/configured hotspots. - -## Main Features -* STA interfaces operating in an "always off" mode, to make sure that the AP is always accessible -* easy setup within normal OpenWrt/LEDE environment -* fast uplink connections -* procd init system support -* procd based hotplug support, the travelmate start will be triggered by interface triggers -* status & debug logging to syslog - -## Prerequisites -* [OpenWrt](https://openwrt.org) or [LEDE](https://www.lede-project.org) trunk -* iw (default) or iwinfo for wlan scanning - -## OpenWrt / LEDE trunk Installation & Usage -* download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/packages) -* install 'travelmate' (_opkg install travelmate_) -* configure your network to support (multiple) wlan uplinks and set travelmate config options (details see below) -* set 'trm\_enabled' option in travelmate config to '1' -* travelmate starts automatically during boot and will be triggered by procd interface triggers - -## LuCI travelmate companion package -* download the package [here](https://downloads.lede-project.org/snapshots/packages/x86_64/luci) -* install 'luci-app-travelmate' (_opkg install luci-app-travelmate_) -* the application is located in LuCI under 'Services' menu -* _Thanks to Hannu Nyman for this great LuCI frontend!_ - -## Chaos Calmer installation notes -* 'travelmate' and 'luci-app-travelmate' are _not_ available as ipk packages in the Chaos Calmer download repository -* download the packages from a development snapshot directory (see download links above) -* manually transfer the packages to your routers temp directory (with tools like _sshfs_ or _winscp_) -* install the packages as described above - -## Travelmate config options -* travelmate config options: - * trm\_enabled => main switch to enable/disable the travelmate service (default: '0', disabled) - * trm\_debug => enable/disable debug logging (default: '0', disabled) - * trm\_maxwait => how long (in seconds) should travelmate wait for wlan interface reload action (default: '20') - * trm\_maxretry => how many times should travelmate try to find an uplink after a trigger event (default: '3') - * trm\_iw => set this option to '0' to use iwinfo for wlan scanning (default: '1', use iw) - * trm\_iface => restrict the procd interface trigger to a (list of) certain wan interface(s) or disable it at all (default: not set, disabled) - -## Setup -**1. configure a wwan interface in /etc/config/network:** -

-[...]
-config interface 'wwan'
-        option proto 'dhcp'
-[...]
-
- -**2. add this interface to your firewall configuration in /etc/config/firewall:** -

-[...]
-config zone
-        option name 'wan'
-        option input 'REJECT'
-        option output 'ACCEPT'
-        option forward 'REJECT'
-        option masq '1'
-        option mtu_fix '1'
-        option network 'wan wan6 wwan'
-[...]
-
- -**3. add required ap and wwan stations to your wireless configuration in etc/config/wireless:** -

-[...]
-config wifi-iface
-        option device 'radio0'
-        option network 'lan'
-        option ifname 'wlan0'
-        option mode 'ap'
-        option ssid 'example_ap'
-        option encryption 'psk2+ccmp'
-        option key 'abc'
-        option disabled '0'
-[...]
-config wifi-iface
-        option device 'radio0'
-        option network 'wwan'
-        option mode 'sta'
-        option ssid 'example_01'
-        option ifname 'wwan01'
-        option encryption 'psk2+ccmp'
-        option key 'abc'
-        option disabled '1'
-config wifi-iface
-        option device 'radio0'
-        option network 'wwan'
-        option mode 'sta'
-        option ssid 'example_02'
-        option ifname 'wwan02'
-        option encryption 'psk2+ccmp'
-        option key 'xyz'
-        option disabled '1'
-config wifi-iface
-        option device 'radio0'
-        option network 'wwan'
-        option mode 'sta'
-        option ssid 'example_03'
-        option ifname 'wwan03'
-        option encryption 'none'
-        option disabled '1'
-[...]
-
- -**4. reload network configuration & start travelmate:** -

-/etc/init.d/network reload
-/etc/init.d/travelmate start
-
- -## Support -Please join the travelmate discussion in this [forum thread](https://forum.openwrt.org/viewtopic.php?id=67697) or contact me by [mail](mailto:dev@brenken.org) - -## Removal -* stop the travelmate daemon with _/etc/init.d/travelmate stop_ -* optional: remove the travelmate package (_opkg remove travelmate_) - -Have fun! -Dirk diff --git a/net/travelmate/files/travelmate.conf b/net/travelmate/files/travelmate.conf deleted file mode 100644 index c63000f..0000000 --- a/net/travelmate/files/travelmate.conf +++ /dev/null @@ -1,9 +0,0 @@ -# travelmate configuration, for further information -# see 'https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md' - -config travelmate 'global' - option trm_enabled '0' - option trm_debug '0' - option trm_maxwait '20' - option trm_maxretry '3' - option trm_iw '1' diff --git a/net/travelmate/files/travelmate.init b/net/travelmate/files/travelmate.init deleted file mode 100755 index 255a641..0000000 --- a/net/travelmate/files/travelmate.init +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=85 -USE_PROCD=1 - -trm_script="/usr/bin/travelmate.sh" - -boot() -{ - ubus -t 30 wait_for network.interface - rc_procd start_service -} - -start_service() -{ - procd_open_instance "travelmate" - procd_set_param env trm_procd="true" - procd_set_param command "${trm_script}" "${@}" - procd_set_param stdout 1 - procd_set_param stderr 1 - procd_close_instance -} - -service_triggers() -{ - local iface="$(uci -q get travelmate.global.trm_iface)" - - if [ -z "${iface}" ] - then - procd_add_raw_trigger "interface.*.down" 1000 /etc/init.d/travelmate start - else - for name in ${iface} - do - procd_add_interface_trigger "interface.*.down" "${name}" /etc/init.d/travelmate start - done - fi - - procd_add_config_trigger "config.change" "travelmate" /etc/init.d/travelmate start -} diff --git a/net/travelmate/files/travelmate.sh b/net/travelmate/files/travelmate.sh deleted file mode 100755 index f626f39..0000000 --- a/net/travelmate/files/travelmate.sh +++ /dev/null @@ -1,204 +0,0 @@ -#!/bin/sh -# travelmate, a wlan connection manager for travel router -# written by Dirk Brenken (dev@brenken.org) - -# This is free software, licensed under the GNU General Public License v3. -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# prepare environment -# -LC_ALL=C -PATH="/usr/sbin:/usr/bin:/sbin:/bin" -trm_ver="0.3.2" -trm_enabled=1 -trm_debug=0 -trm_maxwait=20 -trm_maxretry=3 -trm_iw=1 - -f_envload() -{ - # source required system libraries - # - if [ -r "/lib/functions.sh" ] - then - . "/lib/functions.sh" - else - f_log "error" "status ::: required system library not found" - fi - - # load uci config and check 'enabled' option - # - option_cb() - { - local option="${1}" - local value="${2}" - eval "${option}=\"${value}\"" - } - config_load travelmate - - if [ ${trm_enabled} -ne 1 ] - then - f_log "info " "status ::: travelmate is currently disabled, please set 'trm_enabled' to '1' to use this service" - exit 0 - fi - - # check for preferred wireless tool - # - if [ ${trm_iw} -eq 1 ] - then - trm_scanner="$(which iw)" - else - trm_scanner="$(which iwinfo)" - fi - if [ -z "${trm_scanner}" ] - then - f_log "error" "status ::: no wireless tool for wlan scanning found, please install 'iw' or 'iwinfo'" - fi -} - -# function to bring down all STA interfaces -# -f_prepare() -{ - local config="${1}" - local mode="$(uci -q get wireless."${config}".mode)" - local network="$(uci -q get wireless."${config}".network)" - local disabled="$(uci -q get wireless."${config}".disabled)" - - if [ "${mode}" = "sta" ] && [ -n "${network}" ] - then - trm_stalist="${trm_stalist} ${config}_${network}" - if [ -z "${disabled}" ] || [ "${disabled}" = "0" ] - then - uci -q set wireless."${config}".disabled=1 - f_log "debug" "prepare ::: config: ${config}, interface: ${network}" - fi - fi -} - -f_check() -{ - local ifname cnt=1 mode="${1}" - trm_ifstatus="false" - - while [ ${cnt} -le ${trm_maxwait} ] - do - if [ "${mode}" = "ap" ] - then - trm_ifstatus="$(ubus -S call network.wireless status | jsonfilter -l1 -e '@.*.up')" - else - ifname="$(ubus -S call network.wireless status | jsonfilter -l1 -e '@.*.interfaces[@.config.mode="sta"].ifname')" - if [ -n "${ifname}" ] - then - trm_ifstatus="$(ubus -S call network.interface dump | jsonfilter -e "@.interface[@.device=\"${ifname}\"].up")" - fi - fi - if [ "${mode}" = "initial" ] || [ "${trm_ifstatus}" = "true" ] - then - break - fi - cnt=$((cnt+1)) - sleep 1 - done - f_log "debug" "check ::: mode: ${mode}, name: ${ifname}, status: ${trm_ifstatus}, count: ${cnt}, max-wait: ${trm_maxwait}" -} - -# function to write to syslog -# -f_log() -{ - local class="${1}" - local log_msg="${2}" - - if [ -n "${log_msg}" ] && ([ "${class}" != "debug" ] || [ ${trm_debug} -eq 1 ]) - then - logger -t "travelmate-[${trm_ver}] ${class}" "${log_msg}" - if [ "${class}" = "error" ] - then - exit 255 - fi - fi -} - -f_main() -{ - local ap_list ssid_list config network ssid cnt=1 - local sysver="$(ubus -S call system board | jsonfilter -e '@.release.description')" - - f_check "initial" - if [ "${trm_ifstatus}" != "true" ] - then - config_load wireless - config_foreach f_prepare wifi-iface - if [ -n "$(uci -q changes wireless)" ] - then - uci -q commit wireless - ubus call network reload - fi - f_check "ap" - ap_list="$(ubus -S call network.wireless status | jsonfilter -e '@.*.interfaces[@.config.mode="ap"].ifname')" - f_log "debug" "main ::: ap-list: ${ap_list}, sta-list: ${trm_stalist}" - if [ -z "${ap_list}" ] || [ -z "${trm_stalist}" ] - then - f_log "error" "status ::: no usable AP/STA configuration found" - fi - for ap in ${ap_list} - do - while [ ${cnt} -le ${trm_maxretry} ] - do - if [ ${trm_iw} -eq 1 ] - then - ssid_list="$(${trm_scanner} dev "${ap}" scan 2>/dev/null | \ - awk '/SSID: /{if(!seen[$0]++){printf "\"";for(i=2; i<=NF; i++)if(i==2)printf $i;else printf " "$i;printf "\" "}}')" - else - ssid_list="$(${trm_scanner} "${ap}" scan | \ - awk '/ESSID: ".*"/{ORS=" ";if (!seen[$0]++) for(i=2; i<=NF; i++) print $i}')" - fi - f_log "debug" "main ::: scan-tool: ${trm_scanner}, ssidlist: ${ssid_list}" - if [ -n "${ssid_list}" ] - then - for sta in ${trm_stalist} - do - config="${sta%%_*}" - network="${sta##*_}" - ssid="\"$(uci -q get wireless."${config}".ssid)\"" - if [ -n "$(printf "${ssid_list}" | grep -Fo "${ssid}")" ] - then - uci -q set wireless."${config}".disabled=0 - uci -q commit wireless - ubus call network reload - f_check "sta" - if [ "${trm_ifstatus}" = "true" ] - then - f_log "info " "status ::: wwan interface connected to uplink ${ssid} (${cnt}/${trm_maxretry}, ${sysver})" - sleep 5 - return 0 - else - uci -q set wireless."${config}".disabled=1 - uci -q commit wireless - ubus call network reload - f_log "info " "status ::: wwan interface can't connect to uplink ${ssid} (${cnt}/${trm_maxretry}, ${sysver})" - fi - fi - done - else - f_log "info " "status ::: empty uplink list (${cnt}/${trm_maxretry}, ${sysver})" - fi - cnt=$((cnt+1)) - sleep 5 - done - done - f_log "info " "status ::: no wwan uplink found (${sysver})" - else - f_log "info " "status ::: wwan uplink still connected (${sysver})" - fi -} - -if [ "${trm_procd}" = "true" ] -then - f_envload - f_main -fi -exit 0 \ No newline at end of file diff --git a/net/u2pnpd/Makefile b/net/u2pnpd/Makefile deleted file mode 100644 index 3f77ba3..0000000 --- a/net/u2pnpd/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=u2pnpd -PKG_VERSION:=0.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://github.com/mhei/u2pnpd/releases/download/v$(PKG_VERSION) -PKG_MD5SUM:=ac6f378590d3e4e38b40e4b13f03b369 - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_MAINTAINER:=Michael Heimpold - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/u2pnpd - SECTION:=net - CATEGORY:=Network - TITLE:=Announce device via UPnP on the network - URL:=https://github.com/mhei/u2pnpd - DEPENDS:=+libupnp -endef - -define Package/u2pnpd/description - This tools announces a device via UPnP on the local network, thus it is possible - to find it within the network neightboorhood of a well-known OS and the user - can easily double-click on an icon to open the web frontend of this device without - knowing the IP address. -endef - -define Package/u2pnpd/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/u2pnpd $(1)/usr/bin/ - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/u2pnpd.init $(1)/etc/init.d/u2pnpd - - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(INSTALL_DATA) ./files/u2pnpd.defaults $(1)/etc/uci-defaults/u2pnpd - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/u2pnpd.config $(1)/etc/config/u2pnpd -endef - -define Package/u2pnpd/postinst -#!/bin/sh -[ -n "$${IPKG_INSTROOT}" ] || (. /etc/uci-defaults/u2pnpd) && rm -f /etc/uci-defaults/u2pnpd -exit 0 -endef - -$(eval $(call BuildPackage,u2pnpd)) diff --git a/net/u2pnpd/files/u2pnpd.config b/net/u2pnpd/files/u2pnpd.config deleted file mode 100644 index 8c0d561..0000000 --- a/net/u2pnpd/files/u2pnpd.config +++ /dev/null @@ -1,11 +0,0 @@ -config u2pnpd -# option interface br-lan -# option use_https no -# option manufacturer 'OpenWrt' -# option manufacturerURL 'http://www.openwrt.org/' -# option modelDescription '' -# option modelName 'Generic' -# option modelNumber '' -# option modelURL '' -# option serialNumber '' -# option uuid '' diff --git a/net/u2pnpd/files/u2pnpd.defaults b/net/u2pnpd/files/u2pnpd.defaults deleted file mode 100644 index 322b0bc..0000000 --- a/net/u2pnpd/files/u2pnpd.defaults +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -uuid=$(cat /proc/sys/kernel/random/uuid) - -uci -q batch <<-EOF >/dev/null - set u2pnpd.@u2pnpd[0].uuid=$uuid - commit u2pnpd -EOF - -exit 0 diff --git a/net/u2pnpd/files/u2pnpd.init b/net/u2pnpd/files/u2pnpd.init deleted file mode 100644 index 01437fd..0000000 --- a/net/u2pnpd/files/u2pnpd.init +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=50 -STOP=20 - -SERVICE_DAEMONIZE=1 -SERVICE_PID_FILE=/var/run/u2pnpd.pid -SERVICE_USE_PID=1 -SERVICE_WRITE_PID=1 - -start_instance() { - local section="$1" - local enabled - local interface manufacturer manufacturerURL modelDescription - local modelName modelNumber modelURL serialNumber friendlyName - local uuid httpsURL - local i - - config_get_bool enabled "$section" 'enabled' 1 - [ "$enabled" -gt 0 ] || return 0 - - for i in interface httpsURL manufacturer manufacturerURL modelDescription \ - modelName modelNumber modelURL serialNumber friendlyName uuid; do - config_get "$i" "$section" "$i" - done - - [ -n "$interface" ] && SERVICE_PID_FILE="/var/run/u2pnpd.$interface.pid" - - service_start /usr/bin/u2pnpd ${httpsURL:+-s} \ - ${interface:+--interface="$interface"} \ - ${manufacturer:+--manufacturer="$manufacturer"} \ - ${manufacturerURL:+--manufacturerURL="$manufacturerURL"} \ - ${modelDescription:+--modelDescription="$modelDescription"} \ - ${modelName:+--modelName="$modelName"} \ - ${modelNumber:+--modelNumber="$modelNumber"} \ - ${modelURL:+--modelURL="$modelURL"} \ - ${serialNumber:+--serialNumber="$serialNumber"} \ - ${friendlyName:+--friendlyName="$friendlyName"} \ - ${uuid:+--uuid="$uuid"} -} - -stop_instance() { - local section="$1" - local interface - - config_get interface "$section" 'interface' - [ -n "$interface" ] && SERVICE_PID_FILE="/var/run/u2pnpd.$interface.pid" - - service_stop /usr/bin/u2pnpd - rm -f "$SERVICE_PID_FILE" -} - -start() { - config_load 'u2pnpd' - config_foreach start_instance 'u2pnpd' -} - -stop() { - config_load 'u2pnpd' - config_foreach stop_instance 'u2pnpd' -} diff --git a/net/uanytun/Makefile b/net/uanytun/Makefile deleted file mode 100644 index d9b8c98..0000000 --- a/net/uanytun/Makefile +++ /dev/null @@ -1,175 +0,0 @@ -# -# Copyright (C) 2008-2014 Christian Pointner, -# -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# This Makefile builds uAnytun Package for OpenWRT -# -# $Id: $ - -include $(TOPDIR)/rules.mk - -PKG_NAME:=uanytun -PKG_VERSION:=0.3.5 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.anytun.org/download/ -PKG_MD5SUM:=ce47ad45003ff1d84eaf5276941b9ddf -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -PKG_MAINTAINER:=Christian Pointner -PKG_LICENSE:=GPL-3.0+ -PKG_LICENSE_FILES:=LICENSE -include $(INCLUDE_DIR)/package.mk - - -define Package/uanytun/template - SECTION:=net - CATEGORY:=Network - SUBMENU:=VPN - DEPENDS:=+kmod-tun - TITLE:=micro anycast tunneling daemon - URL:=http://www.anytun.org/ -endef - - -define Package/uanytun - $(call Package/uanytun/template) - TITLE+= (gcrypt) - VARIANT:=gcrypt - DEPENDS+=+libgcrypt -endef - -define Package/uanytun/conffiles -/etc/config/uanytun -endef - -define Package/uanytun/description -uAnytun is a tiny implementation of SATP the secure anycast tunneling protocol. - SATP defines a protocol used for communication between any combination of - unicast and anycast tunnel endpoints. It has less protocol overhead than - IPSec in Tunnel mode and allows tunneling of every ETHER TYPE protocol (e.g. - ethernet, ip, arp ...). SATP directly includes cryptography and message - authentication based on the methods used by SRTP. It is intended to deliver - a generic, scalable and secure solution for tunneling and relaying of packets - of any protocol. - Unlike Anytun which is a full featured implementation uAnytun has no support - for multiple connections or synchronisation. It is a small single threaded - implementation intended to act as a client on small platforms. -endef - - -define Package/uanytun-nettle - $(call Package/uanytun/template) - TITLE+= (nettle) - VARIANT:=nettle - DEPENDS+=+libnettle -endef - -Package/uanytun-nettle/conffiles=$(Package/uanytun/conffiles) -Package/uanytun-nettle/description=$(Package/uanytun/description) - - -define Package/uanytun-sslcrypt - $(call Package/uanytun/template) - TITLE+= (openssl) - VARIANT:=sslcrypt - DEPENDS+=+libopenssl -endef - -Package/uanytun-sslcrypt/conffiles=$(Package/uanytun/conffiles) -Package/uanytun-sslcrypt/description=$(Package/uanytun/description) - - -define Package/uanytun-nocrypt - $(call Package/uanytun/template) - TITLE+= (no crypt) - VARIANT:=nocrypt -endef - -Package/uanytun-nocrypt/conffiles=$(Package/uanytun/conffiles) -Package/uanytun-nocrypt/description=$(Package/uanytun/description) - - - -define Build/Configure - (cd $(PKG_BUILD_DIR)/src; \ - touch include.mk; \ - ln -s linux/tun.c .; \ - echo '#ifndef UANYTUN_version_h_INCLUDED' > version.h; \ - echo '#define UANYTUN_version_h_INCLUDED' >> version.h; \ - echo '' >> version.h; \ - echo '#define VERSION_STRING_0 "uanytun version '`cat $(PKG_BUILD_DIR)/version`'"' >> version.h; \ - echo '#define VERSION_STRING_1 "built on '`hostname`', '`date +"%d.%m.%Y %H:%M:%S %Z"`'"' >> version.h; \ - echo '' >> version.h; \ - echo '#endif' >> version.h \ - ) -endef - -VARIANT_CFLAGS:= -VARIANT_LDFLAGS:=-ldl -VARIANT_MAKE_OPTS:= - -ifeq ($(BUILD_VARIANT),gcrypt) -VARIANT_CFLAGS+=-DUSE_GCRYPT -VARIANT_LDFLAGS+=-lgpg-error -lgcrypt -endif - -ifeq ($(BUILD_VARIANT),nettle) -VARIANT_CFLAGS+=-DUSE_NETTLE -VARIANT_LDFLAGS+=-lnettle -endif - -ifeq ($(BUILD_VARIANT),sslcrypt) -VARIANT_CFLAGS+=-DUSE_SSL_CRYPTO -VARIANT_LDFLAGS+=-lcrypto -endif - -ifeq ($(BUILD_VARIANT),nocrypt) -VARIANT_CFLAGS+=-DNO_CRYPT -VARIANT_MAKE_OPTS+=NO_CRYPT_OBJ=1 -endif - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/src \ - $(TARGET_CONFIGURE_OPTS) \ - $(VARIANT_MAKE_OPTS) \ - TARGET=Linux \ - CFLAGS="$(TARGET_CFLAGS) $(VARIANT_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS) $(VARIANT_LDFLAGS)" - $(STRIP) $(PKG_BUILD_DIR)/src/uanytun -endef - - -define Package/uanytun/install-generic - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/$(2) $(1)/etc/config/$(PKG_NAME) - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/uanytun $(1)/usr/sbin/$(PKG_NAME) - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/uanytun.init $(1)/etc/init.d/$(PKG_NAME) -endef - -define Package/uanytun/install - $(call Package/uanytun/install-generic,$(1),uanytun.config) -endef - -define Package/uanytun-nettle/install - $(call Package/uanytun/install-generic,$(1),uanytun.config) -endef - -define Package/uanytun-sslcrypt/install - $(call Package/uanytun/install-generic,$(1),uanytun.config) -endef - -define Package/uanytun-nocrypt/install - $(call Package/uanytun/install-generic,$(1),uanytun-nocrypt.config) -endef - - -$(eval $(call BuildPackage,uanytun)) -$(eval $(call BuildPackage,uanytun-nettle)) -$(eval $(call BuildPackage,uanytun-sslcrypt)) -$(eval $(call BuildPackage,uanytun-nocrypt)) diff --git a/net/uanytun/files/uanytun-nocrypt.config b/net/uanytun/files/uanytun-nocrypt.config deleted file mode 100644 index 9792d1f..0000000 --- a/net/uanytun/files/uanytun-nocrypt.config +++ /dev/null @@ -1,88 +0,0 @@ -config "client1" - option disabled 0 - option username 'nobody' - option groupname 'nogroup' -# option chroot "/var/run/uanytun" - -# option interface '' -# option port '4444' -# option sender_id '1' - -# option dev 'anytun0' - option type 'tun' - option ifconfig '192.168.123.1/24' -# option post-up-script '/etc/uanytun/client1-post-up.sh' - - option remote_host 'example.com' - option remote_port '4444' - - option window_size 0 - option mux 1 - - option log 'syslog:3,anytun-client1,daemon' - - -config "client2" - option disabled 1 - option username 'nobody' - option groupname 'nogroup' - - option type 'tun' - option ifconfig '192.168.123.2/24' - - option remote_host 'example.com' - option remote_port '4444' - - option window_size 0 - option mux 2 - - option log 'syslog:3,anytun-client2,daemon' - - -config "client3" - option disabled 1 - option username 'nobody' - option groupname 'nogroup' - - option type 'tun' - option ifconfig '192.168.123.3/24' - - option remote_host 'example.com' - option remote_port '4444' - - option window_size 0 - option mux 3 - - option log 'syslog:3,anytun-client3,daemon' - - -config "p2p-a" - option disabled 1 - option username 'nobody' - option groupname 'nogroup' - - option type 'tun' - option ifconfig '192.168.223.1/24' - - option remote_host 'p2p-b.example.com' - option remote_port '4444' - - option window_size 0 - - option log 'syslog:3,anytun-p2p-a,daemon' - - -config "p2p-b" - option disabled 1 - option username 'nobody' - option groupname 'nogroup' - - option type 'tun' - option ifconfig '192.168.223.2/24' - - option remote_host 'p2p-a.example.com' - option remote_port '4444' - - option window_size 0 - - option log 'syslog:3,anytun-p2p-b,daemon' diff --git a/net/uanytun/files/uanytun.config b/net/uanytun/files/uanytun.config deleted file mode 100644 index c53db37..0000000 --- a/net/uanytun/files/uanytun.config +++ /dev/null @@ -1,116 +0,0 @@ -config "client1" - option disabled 0 -# option username 'nobody' -# option groupname 'nogroup' -# option chroot "/var/run/uanytun" - -# option interface '' -# option port '4444' -# option sender_id '1' - - option cipher 'aes-ctr' -# option cipher 'null' -# option cipher 'aes-ctr-128' -# option cipher 'aes-ctr-192' -# option cipher 'aes-ctr-256' - option auth_algo 'sha1' -# option auth_algo 'null' -# option auth_tag_length 10 - -# option dev 'anytun0' - option type 'tun' - option ifconfig '192.168.123.1/24' -# option post-up-script '/etc/uanytun/client1-post-up.sh' - - option remote_host 'example.com' - option remote_port '4444' - - option window_size 0 - option mux 1 - - option role 'client' -# option kd_prf 'null' -# option kd_prf 'aes-ctr' -# option kd_prf 'aes-ctr-128' -# option kd_prf 'aes-ctr-192' -# option kd_prf 'aes-ctr-256' -# option ld_kdr '0' -# option key '0123456789ABCDEF0123456789ABCDEF' -# option salt '0123456789ABCD0123456789ABCD' - option passphrase 'Creating_VPN_Tunnels_With_Anytun_Is_Easy' - - option log 'syslog:3,anytun-client1,daemon' - - -config "client2" - option disabled 1 - - option cipher 'aes-ctr' - option auth_algo 'sha1' - option type 'tun' - option ifconfig '192.168.123.2/24' - - option remote_host 'example.com' - option remote_port '4444' - - option window_size 0 - option mux 2 - option role 'client' - option passphrase 'Creating_VPN_Tunnels_With_Anytun_Is_Easy' - - option log 'syslog:3,anytun-client2,daemon' - - -config "client3" - option disabled 1 - - option cipher 'aes-ctr' - option auth_algo 'sha1' - option type 'tun' - option ifconfig '192.168.123.3/24' - - option remote_host 'example.com' - option remote_port '4444' - - option window_size 0 - option mux 3 - option role 'client' - option passphrase 'Creating_VPN_Tunnels_With_Anytun_Is_Easy' - - option log 'syslog:3,anytun-client3,daemon' - - -config "p2p-a" - option disabled 1 - - option cipher 'aes-ctr' - option auth_algo 'sha1' - option type 'tun' - option ifconfig '192.168.223.1/24' - - option remote_host 'p2p-b.example.com' - option remote_port '4444' - - option window_size 0 - option role 'alice' - option passphrase 'Creating_P2P_VPN_Tunnels_With_Anytun_Is_Easy' - - option log 'syslog:3,anytun-p2p-a,daemon' - - -config "p2p-b" - option disabled 1 - - option cipher 'aes-ctr' - option auth_algo 'sha1' - option type 'tun' - option ifconfig '192.168.223.2/24' - - option remote_host 'p2p-a.example.com' - option remote_port '4444' - - option window_size 0 - option role 'bob' - option passphrase 'Creating_P2P_VPN_Tunnels_With_Anytun_Is_Easy' - - option log 'syslog:3,anytun-p2p-b,daemon' diff --git a/net/uanytun/files/uanytun.init b/net/uanytun/files/uanytun.init deleted file mode 100644 index 21609ca..0000000 --- a/net/uanytun/files/uanytun.init +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh /etc/rc.common -START=50 - -BIN=uanytun -DAEMON=/usr/sbin/$BIN -DESC=$BIN -RUN_D=/var/run - - -option_cb() { - local varname="$1" - local value="$2" - - if ! echo "$CONFIG_OPTIONS" | grep " $varname " > /dev/null; then - CONFIG_OPTIONS="$CONFIG_OPTIONS $varname " - fi -} - -foreach_config_forced() { - foreach_config $1 "forced" -} - -foreach_config() { - local cfg="$1" - local name - local option - local value - local args="" - local forced=0 - - if [ -n "$2" ] && [ "x$2" == "xforced" ]; then - forced=1 - fi - - config_get name "$cfg" TYPE - for option in $CONFIG_OPTIONS - do - config_get value "$cfg" "$option" - if [ "x$option" == "xdisabled" ]; then - if [ $forced -eq 0 ] && [ $value -eq 1 ]; then - echo -n " $name(disabled)" - return - fi - continue - fi - - option=`echo $option | tr '_' '-'` - if [ -n "$value" ]; then - args="$args --$option $value" - fi - done - echo -n " $name" - local status="OK" - $DAEMON --write-pid "$RUN_D/$BIN.$name.pid" $args || status="failed" - echo -n "($status)" -} - -stop_vpn() { - local name=$1 - local pidfile=$RUN_D/$BIN.$name.pid - echo -n " $name" - local status="OK" - if [ ! -f "$pidfile" ]; then - status="tunnel not active" - else - kill `cat $pidfile` > /dev/null 2>&1 || status="failed" - rm -f $pidfile - fi - echo -n "($status)" -} - -start() { - echo -n "Starting $DESC:" - config_load $BIN - if [ $# -gt 0 ]; then - while [ $# -gt 0 ]; do - config_foreach foreach_config_forced "$1" - shift - done - else - config_foreach foreach_config "" - fi - echo "." -} - -stop() { - echo -n "Stopping $DESC:" - local name - local pidfile - - if [ $# -gt 0 ]; then - while [ $# -gt 0 ]; do - stop_vpn $1 - shift - done - else - for pidfile in `ls $RUN_D/$BIN.*.pid 2> /dev/null`; do - name=${pidfile%%.pid} - name=${name##$RUN_D/$BIN.} - stop_vpn $name - done - fi - echo "." -} diff --git a/net/udpxy/Makefile b/net/udpxy/Makefile deleted file mode 100644 index 6bb5748..0000000 --- a/net/udpxy/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=udpxy -PKG_SOURCE_VERSION:=53e4672a7522311c40e9f6110ff256041c52c8b4 -PKG_VERSION:=2016-09-18-$(PKG_SOURCE_VERSION) -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/pcherenkov/udpxy.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MAINTAINER:=Álvaro Fernández Rojas - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=gpl.txt - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -MAKE_PATH:=chipmunk - -define Package/udpxy - SECTION:=net - CATEGORY:=Network - TITLE:=Convert UDP IPTV streams into HTTP streams - URL:=https://github.com/pcherenkov/udpxy -endef - -define Package/udpxy/description - udproxy makes it possible to convert UDP IPTV streams into HTTP - streams which can be viewed even over WLANs. HTTP streams do - not generate huge amounts of multicast traffic, so a sd stream - only takes about 300k. Interesting for peoply who have IPTV at - home and do not want to rent multiple decoders from their - provider but just use their own streaming client (for example - popcornhour/mediatomb/vlc). -endef - -define Package/udpxy/conffiles -/etc/config/udpxy -endef - -MAKE_FLAGS += \ - INSTALLROOT="$(PKG_INSTALL_DIR)/usr" \ - ALL_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" - -define Package/udpxy/install - $(INSTALL_DIR) $(1)/etc/init.d $(1)/etc/config - $(INSTALL_CONF) ./files/udpxy.conf $(1)/etc/config/udpxy - $(INSTALL_BIN) ./files/udpxy.init $(1)/etc/init.d/udpxy - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/udpxy $(1)/usr/bin/ - ln -sf udpxy $(1)/usr/bin/udpxrec -endef - -$(eval $(call BuildPackage,udpxy)) diff --git a/net/udpxy/files/udpxy.conf b/net/udpxy/files/udpxy.conf deleted file mode 100644 index 9117a53..0000000 --- a/net/udpxy/files/udpxy.conf +++ /dev/null @@ -1,15 +0,0 @@ -config udpxy - option disabled '1' - option respawn '1' - option verbose '0' - option status '1' - # option bind '0.0.0.0' - option port '4022' - # option source '0.0.0.0' - # option max_clients '3' - # option log_file '/var/log/udpxy' - # option buffer_size '4096' - # option buffer_messages '-1' - # option buffer_time '-1' - # option nice_increment '0' - # option mcsub_renew '0' diff --git a/net/udpxy/files/udpxy.init b/net/udpxy/files/udpxy.init deleted file mode 100644 index 6f911a6..0000000 --- a/net/udpxy/files/udpxy.init +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2014 OpenWrt.org - -START=50 -USE_PROCD=1 - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}" -} - -append_bool() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get_bool val "$cfg" "$var" "$def" - [ "$val" = 1 ] && procd_append_param command "$opt" -} - -start_instance() { - local cfg="$1" - local aux - - config_get_bool aux "$cfg" 'disabled' '0' - [ "$aux" = 1 ] && return 1 - - procd_open_instance - - procd_set_param command /usr/bin/udpxy - procd_append_param command "-T" - - append_bool "$cfg" verbose "-V" - append_bool "$cfg" status "-S" - append_arg "$cfg" bind "-a" - append_arg "$cfg" port "-p" - append_arg "$cfg" source "-m" - append_arg "$cfg" max_clients "-c" - append_arg "$cfg" log_file "-l" - append_arg "$cfg" buffer_size "-B" - append_arg "$cfg" buffer_messages "-R" - append_arg "$cfg" buffer_time "-H" - append_arg "$cfg" nice_increment "-n" - append_arg "$cfg" mcsub_renew "-M" - - config_get_bool aux "$cfg" 'respawn' '0' - [ "$aux" = 1 ] && procd_set_param respawn - - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger "udpxy" -} - -start_service() { - config_load udpxy - config_foreach start_instance udpxy -} diff --git a/net/ulogd/Makefile b/net/ulogd/Makefile deleted file mode 100644 index 2fa9f6c..0000000 --- a/net/ulogd/Makefile +++ /dev/null @@ -1,210 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ulogd -PKG_VERSION:=2.0.5 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=ftp://ftp.netfilter.org/pub/ulogd/ \ - ftp://ftp.be.netfilter.org/pub/netfilter/ulogd/ \ - ftp://ftp.de.netfilter.org/pub/netfilter/ulogd/ \ - ftp://ftp.no.netfilter.org/pub/netfilter/ulogd/ -PKG_MD5SUM:=f0f8fe1371fa28b5e06cb16aaa0111dd - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/ulogd/Default - SECTION:=net - CATEGORY:=Network - URL:=http://www.netfilter.org/projects/ulogd/index.html -endef - -define Package/ulogd - $(call Package/ulogd/Default) - DEPENDS:=+libmnl +libnfnetlink +libpthread - TITLE:=Netfilter userspace logging daemon - MENU:=1 -endef - -define Package/ulogd/conffiles -/etc/ulogd.conf -endef - -define Package/ulogd-mod-dbi - $(call Package/ulogd/Default) - DEPENDS:=ulogd +libdbi - TITLE:=Output plugin for logging to a database using libdbi -endef - -define Package/ulogd-mod-json - $(call Package/ulogd/Default) - DEPENDS:=ulogd +jansson - TITLE:=JSON output plugin -endef - -define Package/ulogd-mod-mysql - $(call Package/ulogd/Default) - DEPENDS:=ulogd +libmysqlclient - TITLE:=Output plugin for logging to a MySQL database -endef - -define Package/ulogd-mod-nfacct - $(call Package/ulogd/Default) - DEPENDS:=ulogd +libnetfilter-acct - TITLE:=Input plugin for flow-based logging (accounting) -endef - -define Package/ulogd-mod-nfct - $(call Package/ulogd/Default) - DEPENDS:=ulogd +libnetfilter-conntrack - TITLE:=Input plugin for flow-based logging (conntracking) -endef - -define Package/ulogd-mod-nflog - $(call Package/ulogd/Default) - DEPENDS:=ulogd +libnetfilter-log - TITLE:=Input plugin using NFLOG -endef - -define Package/ulogd-mod-pcap - $(call Package/ulogd/Default) - DEPENDS:=ulogd +libpcap - TITLE:=Output plugin for logging in pcap format -endef - -define Package/ulogd-mod-pgsql - $(call Package/ulogd/Default) - DEPENDS:=ulogd +libpq - TITLE:=Output plugin for logging to a PostgreSQL database -endef - -define Package/ulogd-mod-sqlite - $(call Package/ulogd/Default) - DEPENDS:=ulogd +libsqlite3 - TITLE:=Output plugin for logging to an SQLite database -endef - -define Package/ulogd-mod-syslog - $(call Package/ulogd/Default) - DEPENDS:=ulogd - TITLE:=Syslog output plugin -endef - -define Package/ulogd-mod-xml - $(call Package/ulogd/Default) - DEPENDS:=ulogd +libnetfilter-acct +libnetfilter-conntrack +libnetfilter-log - TITLE:=XML output plugin -endef - -define Package/ulogd-mod-extra - $(call Package/ulogd/Default) - DEPENDS:=ulogd - TITLE:=Extra plugins -endef - -PKG_BUILD_DEPENDS:=libnetfilter-acct libnetfilter-conntrack libnetfilter-log - -PKG_CONFIG_DEPENDS:= \ - CONFIG_PACKAGE_ulogd-mod-dbi \ - CONFIG_PACKAGE_ulogd-mod-mysql \ - CONFIG_PACKAGE_ulogd-mod-pgsql \ - CONFIG_PACKAGE_ulogd-mod-sqlite \ - -TARGET_CFLAGS += \ - -D_GNU_SOURCE \ - -CONFIGURE_ARGS += \ - --enable-nfacct \ - --enable-nfct \ - --enable-nflog \ - -ifneq ($(DEVELOPER)$(SDK)$(CONFIG_PACKAGE_ulogd-mod-dbi),) - CONFIGURE_ARGS += --with-dbi \ - --with-dbi-inc=$(STAGING_DIR)/usr/include/dbi \ - --with-dbi-lib=$(STAGING_DIR)/usr/lib -else - CONFIGURE_ARGS += --without-dbi -endif - -ifneq ($(DEVELOPER)$(SDK)$(CONFIG_PACKAGE_ulogd-mod-mysql),) - CONFIGURE_ARGS += --with-mysql="$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS += --without-mysql -endif - -ifneq ($(DEVELOPER)$(SDK)$(CONFIG_PACKAGE_ulogd-mod-pgsql),) - CONFIGURE_ARGS += --with-pgsql="$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS += --without-pgsql -endif - -ifneq ($(SDK)$(CONFIG_PACKAGE_ulogd-mod-sqlite),) - CONFIGURE_ARGS += --with-sqlite="$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS += --without-sqlite -endif - -define Package/ulogd/install - $(INSTALL_DIR) $(1)/etc - $(CP) $(PKG_BUILD_DIR)/ulogd.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ulogd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/usr/lib/ulogd - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_raw2packet_BASE.so $(1)/usr/lib/ulogd/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/ulogd.init $(1)/etc/init.d/ulogd -endef - -define BuildPlugin - define Package/ulogd-mod-$(1)/install - $(INSTALL_DIR) $$(1)/usr/lib/ulogd - for m in $(2); do \ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ulogd/ulogd_$$$$$$$${m}.so $$(1)/usr/lib/ulogd/ ; \ - done - endef - $$(eval $$(call BuildPackage,ulogd-mod-$(1))) -endef - -ULOGD_EXTRA_PLUGINS:= \ - filter_HWHDR \ - filter_IFINDEX \ - filter_IP2BIN \ - filter_IP2HBIN \ - filter_IP2STR \ - filter_MARK \ - filter_PRINTFLOW \ - filter_PRINTPKT \ - filter_PWSNIFF \ - inppkt_UNIXSOCK \ - output_GPRINT \ - output_GRAPHITE \ - output_LOGEMU \ - output_OPRINT \ - -$(eval $(call BuildPackage,ulogd)) -$(eval $(call BuildPlugin,dbi,output_DBI)) -$(eval $(call BuildPlugin,json,output_JSON)) -$(eval $(call BuildPlugin,mysql,output_MYSQL)) -$(eval $(call BuildPlugin,nfacct,inpflow_NFACCT)) -$(eval $(call BuildPlugin,nfct,inpflow_NFCT)) -$(eval $(call BuildPlugin,nflog,inppkt_NFLOG)) -$(eval $(call BuildPlugin,pcap,output_PCAP)) -$(eval $(call BuildPlugin,pgsql,output_PGSQL)) -$(eval $(call BuildPlugin,sqlite,output_SQLITE3)) -$(eval $(call BuildPlugin,syslog,output_SYSLOG)) -$(eval $(call BuildPlugin,xml,output_XML)) -$(eval $(call BuildPlugin,extra,$(ULOGD_EXTRA_PLUGINS))) diff --git a/net/ulogd/files/ulogd.init b/net/ulogd/files/ulogd.init deleted file mode 100644 index 3650322..0000000 --- a/net/ulogd/files/ulogd.init +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=20 - -USE_PROCD=1 - -start_service() { - procd_open_instance - procd_set_param command /usr/sbin/ulogd - procd_close_instance -} diff --git a/net/ulogd/patches/100-musl-compat.patch b/net/ulogd/patches/100-musl-compat.patch deleted file mode 100644 index 2f1c293..0000000 --- a/net/ulogd/patches/100-musl-compat.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- a/src/ulogd.c -+++ b/src/ulogd.c -@@ -83,7 +83,7 @@ static char *ulogd_logfile = NULL; - static const char *ulogd_configfile = ULOGD_CONFIGFILE; - static const char *ulogd_pidfile = NULL; - static int ulogd_pidfile_fd = -1; --static FILE syslog_dummy; -+static int ulogd_use_syslog = 0; - - static int info_mode = 0; - -@@ -427,7 +427,7 @@ void __ulogd_log(int level, char *file, - if (level < loglevel_ce.u.value) - return; - -- if (logfile == &syslog_dummy) { -+ if (ulogd_use_syslog) { - /* FIXME: this omits the 'file' string */ - va_start(ap, format); - vsyslog(ulogd2syslog_level(level), format, ap); -@@ -950,7 +950,7 @@ static int logfile_open(const char *name - logfile = stdout; - } else if (!strcmp(name, "syslog")) { - openlog("ulogd", LOG_PID, LOG_DAEMON); -- logfile = &syslog_dummy; -+ ulogd_use_syslog = 1; - } else { - logfile = fopen(ulogd_logfile, "a"); - if (!logfile) { -@@ -1240,7 +1240,7 @@ static void sigterm_handler(int signal) - unload_plugins(); - #endif - -- if (logfile != NULL && logfile != stdout && logfile != &syslog_dummy) { -+ if (logfile != NULL && logfile != stdout) { - fclose(logfile); - logfile = NULL; - } -@@ -1262,7 +1262,7 @@ static void signal_handler(int signal) - switch (signal) { - case SIGHUP: - /* reopen logfile */ -- if (logfile != stdout && logfile != &syslog_dummy) { -+ if (logfile != NULL && logfile != stdout) { - fclose(logfile); - logfile = fopen(ulogd_logfile, "a"); - if (!logfile) { ---- a/filter/raw2packet/ulogd_raw2packet_BASE.c -+++ b/filter/raw2packet/ulogd_raw2packet_BASE.c -@@ -42,6 +42,7 @@ - #include - #include - #include -+#include - #include - - enum input_keys { diff --git a/net/umurmur/Makefile b/net/umurmur/Makefile deleted file mode 100644 index 1dc5dc2..0000000 --- a/net/umurmur/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=umurmur -PKG_VERSION:=0.2.16-20161126 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/umurmur/umurmur.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=fac630135664fda26338d403041b6b6e558a2d6b -PKG_MIRROR_MD5SUM:=0e031baa5cebcdb4eb39a0cde572014f -PKG_MIRROR_HASH:=6773aebea9aea355a41425e946291bb47bc399f85483bd6532cf26dfc7c801e5 - -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf - -PKG_MAINTAINER:=Martin Johansson -PKG_LICENSE:=BSD-3-Clause - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/umurmur/Default - SECTION:=net - CATEGORY:=Network - SUBMENU:=Instant Messaging - TITLE:=uMurmur - DEPENDS:=+libconfig +libprotobuf-c - URL:=http://umurmur.net -endef - -define Package/umurmur/Default/description - Minimalistic Mumble server daemon. -endef - -define Package/umurmur-openssl - $(call Package/umurmur/Default) - TITLE+= (with OpenSSL support) - DEPENDS+= +libopenssl - VARIANT:=openssl -endef - -define Package/umurmur-openssl/description - $(call Package/umurmur/Default/description) - Uses OpenSSL library for SSL and crypto. -endef - -define Package/umurmur-mbedtls - $(call Package/umurmur/Default) - TITLE+= (with mbed TLS support) - DEPENDS+= +libmbedtls - VARIANT:=mbedtls -endef - -define Package/umurmur-mbedtls/description - $(call Package/umurmur/Default/description) - Uses the mbed TLS library for SSL and crypto. -endef - -define Build/Compile - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - $(MAKE) -C $(PKG_BUILD_DIR)/src all -endef - -define Package/umurmur-openssl/conffiles -/etc/umurmur.conf -endef - -Package/umurmur-mbedtls/conffiles = $(Package/umurmur-openssl/conffiles) - -define Package/umurmur-openssl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/umurmurd $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwrt/files/umurmur.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/files/umurmur.init $(1)/etc/init.d/umurmur - $(INSTALL_DIR) $(1)/etc/umurmur -endef - -Package/umurmur-mbedtls/install = $(Package/umurmur-openssl/install) - -ifeq ($(BUILD_VARIANT),openssl) - CONFIGURE_ARGS += \ - --with-ssl=openssl -endif - -ifeq ($(BUILD_VARIANT),mbedtls) - CONFIGURE_ARGS += \ - --with-ssl=mbedtls -endif - -$(eval $(call BuildPackage,umurmur-openssl)) -$(eval $(call BuildPackage,umurmur-mbedtls)) diff --git a/net/umurmur/patches/010-mbedtls_fix_includes.patch b/net/umurmur/patches/010-mbedtls_fix_includes.patch deleted file mode 100644 index 619517f..0000000 --- a/net/umurmur/patches/010-mbedtls_fix_includes.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/ssl.h -+++ b/src/ssl.h -@@ -90,7 +90,7 @@ typedef ssl_context SSL_handle_t; - - #elif defined(USE_MBEDTLS) - #include --#include -+#include - #include - - #if defined(MBEDTLS_VERSION_MAJOR) diff --git a/net/vncrepeater/Makefile b/net/vncrepeater/Makefile deleted file mode 100644 index b9c2884..0000000 --- a/net/vncrepeater/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vncrepeater -PKG_VERSION:=0.14 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Jirka Spicak -PKG_LICENSE:=GPL-2.0 - - -PKG_SOURCE:=repeater014.zip -PKG_SOURCE_URL:=http://jtko.mbnet.fi/uvncrepeater -PKG_MD5SUM:=3005ebbb2f9442cbea4cbcaa71925dbf - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/uclibc++.mk -include $(INCLUDE_DIR)/package.mk - -define Package/vncrepeater - SECTION:=net - CATEGORY:=Network - DEPENDS:=$(CXX_DEPENDS) - TITLE:=UltraVNC repeater for Linux - URL:=http://www.uvnc.com/addons/repeater.html -endef - -define Package/vncrepeater/conffiles -/etc/vncrepeater.conf -endef - -define Package/vncrepeater/description - Viewer can be behind Nat router or directly connected to the internet - instead of forwarding serveral ports, you only need to forward 1 port. - If the PC that runs the Repeater has access to the local DNS server, - you can use your local DNS names instead of 10.10.10.12. - This could be handy when you have a dynamic DHCP server allocating - ip adresses for your PC. -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - $(PKG_UNPACK) - $(CP) $(PKG_BUILD_DIR)/../Ver014/* $(PKG_BUILD_DIR)/ - rm -rf $(PKG_BUILD_DIR)/../Ver014/ - $(Build/Patch) -endef - -define Build/Compile - $(call Build/Compile/Default, \ - CC="$(TARGET_CXX)" \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -fno-rtti" \ - repeater \ - ) -endef - -define Package/vncrepeater/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/repeater $(1)/usr/sbin/$(PKG_NAME) - $(INSTALL_DIR) $(1)/etc - $(CP) $(PKG_BUILD_DIR)/uvncrepeater.ini $(1)/etc/vncrepeater.conf -endef - -$(eval $(call BuildPackage,vncrepeater)) diff --git a/net/vncrepeater/patches/001-uclibcxx_linking.patch b/net/vncrepeater/patches/001-uclibcxx_linking.patch deleted file mode 100644 index eca2c3a..0000000 --- a/net/vncrepeater/patches/001-uclibcxx_linking.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- vncrepeater-0.14/Makefile 2006-04-09 23:37:10.000000000 +0200 -+++ vncrepeater-0.14.new/Makefile 2016-11-09 19:59:13.000000000 +0100 -@@ -1,27 +1,28 @@ - CFLAGS=-Wall - repeater: repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o repeaterutil.o repeaterevents.o -- g++ $(CFLAGS) -o repeater repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o repeaterutil.o repeaterevents.o -+ $(CC) $(CFLAGS) -o repeater repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o repeaterutil.o repeaterevents.o $(LDFLAGS) - - repeater.o: repeater.cpp -- g++ $(CFLAGS) -c repeater.cpp -+ $(CC) $(CFLAGS) -c repeater.cpp - - repeaterproc.o: repeaterproc.cpp -- g++ $(CFLAGS) -c repeaterproc.cpp -+ $(CC) $(CFLAGS) -c repeaterproc.cpp - - openbsd_stringfuncs.o: openbsd_stringfuncs.cpp -- g++ $(CFLAGS) -c openbsd_stringfuncs.cpp -+ $(CC) $(CFLAGS) -c openbsd_stringfuncs.cpp - - iniparser.o: iniparser.cpp -- g++ $(CFLAGS) -c iniparser.cpp -+ $(CC) $(CFLAGS) -c iniparser.cpp - - readini.o: readini.cpp -- g++ $(CFLAGS) -c readini.cpp -+ $(CC) $(CFLAGS) -c readini.cpp - - repeaterutil.o: repeaterutil.cpp -- g++ $(CFLAGS) -c repeaterutil.cpp -+ $(CC) $(CFLAGS) -c repeaterutil.cpp - - repeaterevents.o: repeaterevents.cpp -- g++ $(CFLAGS) -c repeaterevents.cpp -+ $(CC) $(CFLAGS) -c repeaterevents.cpp - - clean: - rm -f *.o repeater -+ diff --git a/net/vncrepeater/patches/002-cfg-path.patch b/net/vncrepeater/patches/002-cfg-path.patch deleted file mode 100644 index 976504b..0000000 --- a/net/vncrepeater/patches/002-cfg-path.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- vncrepeater-0.14/repeater.cpp 2006-10-20 17:07:50.000000000 +0200 -+++ vncrepeater-0.14.new/repeater.cpp 2016-11-19 17:04:59.907871000 +0100 -@@ -593,7 +593,9 @@ - static long parseId(char *IdCode) - { - unsigned int ii; -- int retVal; -+ //PFaf 20101122: Minor correction due to compiler warning -+ //int retVal; -+ long retVal; - - debug(LEVEL_3, "parseId(): IdCode = %s\n", IdCode); - -@@ -998,9 +1000,13 @@ - allow = false; - - //server 0 == denied -- if ((srvAddr.a == 0) || (srvAddr.b == 0) || (srvAddr.c == 0) || (srvAddr.d == 0)) -+ //Fix by PFaf - 20101122 -+ //Server address can be X.0.0.Y i.e. 10.0.0.1 -+ //since these are valid addresses, so we should not exclude them. -+ //Only exclude addresses that start or end with zeros (0). -+ //if ((srvAddr.a == 0) || (srvAddr.b == 0) || (srvAddr.c == 0) || (srvAddr.d == 0)) -+ if ((srvAddr.a == 0) || (srvAddr.d == 0)) - allow = false; -- - - //allowed so far ? - if (allow) -@@ -1983,7 +1989,7 @@ - struct sigaction saInt; - - //ini file default -- char defaultIniFilePathAndName[] = "/etc/uvncrepeater.ini"; -+ char defaultIniFilePathAndName[] = "/etc/vncrepeater.conf"; - char tmpBuf[MAX_PATH]; - bool memoryOk; - diff --git a/net/vnstat/Makefile b/net/vnstat/Makefile deleted file mode 100644 index 921597d..0000000 --- a/net/vnstat/Makefile +++ /dev/null @@ -1,110 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vnstat -PKG_VERSION:=1.12 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://humdi.net/vnstat -PKG_MD5SUM:=a154b2196771e06a8accd1c24374009c -PKG_MAINTAINER:=Jo-Philipp Wich - -PKG_INSTALL:=1 - -PKG_BUILD_DEPENDS:=libgd -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/vnstat/Default - SECTION:=net - CATEGORY:=Network - URL:=http://humdi.net/vnstat/ -endef - -define Package/vnstat -$(call Package/vnstat/Default) - TITLE:=Console-based network traffic monitor -endef - -define Package/vnstat/description - vnStat is a network traffic monitor for Linux that keeps a log of daily - network traffic for the selected interface(s). vnStat isn't a packet - sniffer. The traffic information is analyzed from the /proc -filesystem, - so vnStat can be used without root permissions. -endef - -define Package/vnstati -$(call Package/vnstat/Default) - DEPENDS+=vnstat +libgd - TITLE:=PNG image output support for vnStat -endef - -define Package/vnstati/description - The purpose of vnstati is to provide image output support for statistics - collected using vnstat(1). However, the image file format is limited to - png. All basic outputs of vnStat are supported excluding live traffic - features. The image can be outputted either to a file or to standard - output. -endef - -define Package/vnstat/conffiles -/etc/vnstat.conf -/etc/config/vnstat -endef - -define Build/Compile/vnstat - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" -endef - -define Build/Compile/vnstati - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ - LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib" \ - all -endef - -define Build/Compile -$(call Build/Compile/vnstat) -$(call Build/Compile/vnstati) -endef - -define Package/vnstat/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/vnstat $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vnstatd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vnstat.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/vnstat.config $(1)/etc/config/vnstat - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/vnstat.init $(1)/etc/init.d/vnstat - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(INSTALL_BIN) ./files/vnstat.defaults $(1)/etc/uci-defaults/vnstat -endef - -define Package/vnstati/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/vnstati $(1)/usr/bin/ -endef - -define Package/vnstat/postinst -#!/bin/sh -[ -n "$${IPKG_INSTROOT}" ] || (. /etc/uci-defaults/vnstat) && rm -f /etc/uci-defaults/vnstat -exit 0 -endef - -$(eval $(call BuildPackage,vnstat)) -$(eval $(call BuildPackage,vnstati)) diff --git a/net/vnstat/files/vnstat.config b/net/vnstat/files/vnstat.config deleted file mode 100644 index 9da71ed..0000000 --- a/net/vnstat/files/vnstat.config +++ /dev/null @@ -1,5 +0,0 @@ -config vnstat - list interface br-lan -# list interface eth0.1 -# option remote http://example.org/vnstat/ -# option symlink /www/vnstat diff --git a/net/vnstat/files/vnstat.defaults b/net/vnstat/files/vnstat.defaults deleted file mode 100644 index e013b8e..0000000 --- a/net/vnstat/files/vnstat.defaults +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -wan="$(uci -P/var/state get network.wan.ifname)" - -if [ -n "$wan" ]; then - uci -q batch <<-EOF >/dev/null - del_list vnstat.@vnstat[-1].interface=$wan - add_list vnstat.@vnstat[-1].interface=$wan - commit vnstat - EOF -fi - -exit 0 diff --git a/net/vnstat/files/vnstat.init b/net/vnstat/files/vnstat.init deleted file mode 100644 index 7921cbc..0000000 --- a/net/vnstat/files/vnstat.init +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008-2011 OpenWrt.org - -START=99 - -vnstat_option() { - sed -ne "s/^[[:space:]]*$1[[:space:]]*['\"]\([^'\"]*\)['\"].*/\1/p" \ - /etc/vnstat.conf -} - -start() { - local lib="$(vnstat_option DatabaseDir)" - local pid="$(vnstat_option PidFile)" - - [ -n "$lib" ] || { - echo "Error: No DatabaseDir set in vnstat.conf" >&2 - exit 1 - } - - [ -n "$pid" ] || { - echo "Error: No PidFile set in vnstat.conf" >&2 - exit 1 - } - - mkdir -p "$lib" - - init_ifaces() { - local cfg="$1" - local url lnk - - init_iface() { - local ifn="$1" - - if [ -n "$url" ]; then - local try=0 - local max=3 - local hostname="$(cat /proc/sys/kernel/hostname)" - - while [ $((++try)) -le $max ]; do - if wget -q -O "$lib/$ifn" "$url/${hostname}_$ifn" 2>/dev/null && [ -e "$lib/$ifn" ]; then - logger -t "vnstat" "Downloaded backup for database $ifn" - break - else - logger -t "vnstat" "Download try $try/$max for database $ifn failed" - sleep 30 - fi - done - elif [ -n "$backup_dir" ]; then - if cp -f "$backup_dir/$ifn" "$lib/" &>/dev/null; then - logger -t "vnstat" "Restored backup for database $ifn" - else - logger -t "vnstat" "Restore of backup for database $ifn failed" - fi - fi - - /usr/bin/vnstat -u -i "$ifn" >/dev/null - - [ -n "$lnk" ] && { - mkdir -p "$lnk" - [ -L "$lnk/$ifn" ] || ln -s "$lib/$ifn" "$lnk/$ifn" - } - } - - config_get url "$cfg" remote - config_get lnk "$cfg" symlink - config_get backup_dir "$cfg" backup_dir - config_list_foreach "$cfg" interface init_iface - - return 1 - } - - config_load vnstat - config_foreach init_ifaces vnstat - - SERVICE_PID_FILE="${pid}" - service_start /usr/sbin/vnstatd -d -} - -stop() { - local pid="$(vnstat_option PidFile)" - - [ -n "$pid" ] || { - echo "Error: No PidFile set in vnstat.conf" >&2 - exit 1 - } - - SERVICE_PID_FILE="${pid}" - service_stop /usr/sbin/vnstatd -} diff --git a/net/vnstat/patches/001-conf.patch b/net/vnstat/patches/001-conf.patch deleted file mode 100644 index 5fb24c3..0000000 --- a/net/vnstat/patches/001-conf.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/cfg/vnstat.conf -+++ b/cfg/vnstat.conf -@@ -78,13 +78,13 @@ DaemonUser "" - DaemonGroup "" - - # how often (in seconds) interface data is updated --UpdateInterval 30 -+UpdateInterval 60 - - # how often (in seconds) interface status changes are checked --PollInterval 5 -+PollInterval 30 - - # how often (in minutes) data is saved to file --SaveInterval 5 -+SaveInterval 30 - - # how often (in minutes) data is saved when all interface are offline - OfflineSaveInterval 30 diff --git a/net/vnstat/patches/002-no_install_strip.patch b/net/vnstat/patches/002-no_install_strip.patch deleted file mode 100644 index 8f11de6..0000000 --- a/net/vnstat/patches/002-no_install_strip.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -66,11 +66,11 @@ install: - - # install everything else - install -d -m 755 $(BIN) $(SBIN) $(MAN)/man1 $(MAN)/man5 -- install -s -m 755 src/vnstat $(BIN) -- install -s -m 755 src/vnstatd $(SBIN) -+ install -m 755 src/vnstat $(BIN) -+ install -m 755 src/vnstatd $(SBIN) - @if [ -f "src/vnstati" ]; \ -- then echo install -s -m 755 src/vnstati $(BIN); \ -- install -s -m 755 src/vnstati $(BIN); \ -+ then echo install -m 755 src/vnstati $(BIN); \ -+ install -m 755 src/vnstati $(BIN); \ - fi - - # update man pages, gzip it if previous version was done so -@@ -139,12 +139,12 @@ bsdinstall: - - # install binaries - install -d -m 755 $(DESTDIR)/var/db/vnstat -- install -s -m 755 src/vnstat $(BIN_BSD) -- install -s -m 755 src/vnstatd $(SBIN_BSD) -+ install -m 755 src/vnstat $(BIN_BSD) -+ install -m 755 src/vnstatd $(SBIN_BSD) - - @if [ -f "src/vnstati" ]; \ -- then echo install -s -m 755 src/vnstati $(BIN_BSD); \ -- install -s -m 755 src/vnstati $(BIN_BSD); \ -+ then echo install -m 755 src/vnstati $(BIN_BSD); \ -+ install -m 755 src/vnstati $(BIN_BSD); \ - fi - - # install default config if such doesn't exist diff --git a/net/vnstat/patches/003-no_install_uname.patch b/net/vnstat/patches/003-no_install_uname.patch deleted file mode 100644 index 14c17d5..0000000 --- a/net/vnstat/patches/003-no_install_uname.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -33,12 +33,6 @@ debug: - install: - @echo "Installing vnStat..." - --# check that system is really Linux -- @if [ `uname` != "Linux" ]; \ -- then echo "This isn't a Linux system. Maybe 'make bsdinstall' is what you need?"; \ -- false; \ -- fi -- - # check that there's something to install - @if [ ! -f "src/vnstat" ] || [ ! -f "src/vnstatd" ]; \ - then echo "Nothing to install, run make first."; \ diff --git a/net/vnstat/patches/100-musl-compat.patch b/net/vnstat/patches/100-musl-compat.patch deleted file mode 100644 index 0512389..0000000 --- a/net/vnstat/patches/100-musl-compat.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/common.h -+++ b/src/common.h -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) - #include diff --git a/net/vpnc-scripts/Makefile b/net/vpnc-scripts/Makefile deleted file mode 100644 index 910aac1..0000000 --- a/net/vpnc-scripts/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vpnc-scripts -PKG_VERSION:=20151220 -PKG_RELEASE:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/vpnc-scripts - SECTION:=net - CATEGORY:=Network - TITLE:=VPN configuration script for vpnc and OpenConnect - MAINTAINER:=Nikos Mavrogiannopoulos - SUBMENU:=VPN -endef - -define Package/vpnc-scripts/description - This package contains the vpnc-script which is used by vpnc - and OpenConnect to configure the tunnel interface. -endef - -define Build/Compile -endef - -define Package/vpnc-scripts/install - $(INSTALL_DIR) $(1)/lib/netifd - $(INSTALL_BIN) ./files/vpnc-script $(1)/lib/netifd/ -endef - -$(eval $(call BuildPackage,vpnc-scripts)) diff --git a/net/vpnc-scripts/files/vpnc-script b/net/vpnc-scripts/files/vpnc-script deleted file mode 100755 index 5575c3c..0000000 --- a/net/vpnc-scripts/files/vpnc-script +++ /dev/null @@ -1,219 +0,0 @@ -#!/bin/sh -# List of parameters passed through environment -#* reason -- why this script was called, one of: pre-init connect disconnect -#* VPNGATEWAY -- vpn gateway address (always present) -#* TUNDEV -- tunnel device (always present) -#* INTERNAL_IP4_ADDRESS -- address (always present) -#* INTERNAL_IP4_MTU -- mtu (often unset) -#* INTERNAL_IP4_NETMASK -- netmask (often unset) -#* INTERNAL_IP4_NETMASKLEN -- netmask length (often unset) -#* INTERNAL_IP4_NETADDR -- address of network (only present if netmask is set) -#* INTERNAL_IP4_DNS -- list of dns servers -#* INTERNAL_IP4_NBNS -- list of wins servers -#* INTERNAL_IP6_ADDRESS -- IPv6 address -#* INTERNAL_IP6_NETMASK -- IPv6 netmask -#* INTERNAL_IP6_DNS -- IPv6 list of dns servers -#* CISCO_DEF_DOMAIN -- default domain name -#* CISCO_BANNER -- banner from server -#* CISCO_SPLIT_INC -- number of networks in split-network-list -#* CISCO_SPLIT_INC_%d_ADDR -- network address -#* CISCO_SPLIT_INC_%d_MASK -- subnet mask (for example: 255.255.255.0) -#* CISCO_SPLIT_INC_%d_MASKLEN -- subnet masklen (for example: 24) -#* CISCO_SPLIT_INC_%d_PROTOCOL -- protocol (often just 0) -#* CISCO_SPLIT_INC_%d_SPORT -- source port (often just 0) -#* CISCO_SPLIT_INC_%d_DPORT -- destination port (often just 0) -#* CISCO_IPV6_SPLIT_INC -- number of networks in IPv6 split-network-list -#* CISCO_IPV6_SPLIT_INC_%d_ADDR -- IPv6 network address -#* CISCO_IPV6_SPLIT_INC_$%d_MASKLEN -- IPv6 subnet masklen - -HOOKS_DIR=/etc/openconnect - -# FIXMEs: - -# Section A: route handling - -# 1) The 3 values CISCO_SPLIT_INC_%d_PROTOCOL/SPORT/DPORT are currently being ignored -# In order to use them, we'll probably need os specific solutions -# * Linux: iptables -t mangle -I PREROUTING -j ROUTE --oif $TUNDEV -# This would be an *alternative* to changing the routes (and thus 2) and 3) -# shouldn't be relevant at all) -# 2) There are two different functions to set routes: generic routes and the -# default route. Why isn't the defaultroute handled via the generic route case? -# 3) In the split tunnel case, all routes but the default route might get replaced -# without getting restored later. We should explicitely check and save them just -# like the defaultroute -# 4) Replies to a dhcp-server should never be sent into the tunnel - -# Section B: Split DNS handling - -# 1) We parse CISCO_SPLIT_DNS and use dnsmasq to set it - -do_connect() { - if [ -n "$CISCO_BANNER" ]; then - logger -t openconnect "Connect Banner:" - echo "$CISCO_BANNER" | while read LINE ; do logger -t openconnect "|" "$LINE" ; done - fi - - proto_init_update "$TUNDEV" 1 - - if [ -n "$INTERNAL_IP4_MTU" ]; then - MTU=$INTERNAL_IP4_MTU - fi - - if [ -z "$MTU" ]; then - MTU=1412 - fi - - proto_add_ipv4_address "$INTERNAL_IP4_ADDRESS" 32 "" "$INTERNAL_IP4_ADDRESS" - - if [ -n "$INTERNAL_IP4_NETMASKLEN" ]; then - proto_add_ipv4_route "$INTERNAL_IP4_NETADDR" "$INTERNAL_IP4_NETMASKLEN" - fi - - # If the netmask is provided, it contains the address _and_ netmask - if [ -n "$INTERNAL_IP6_ADDRESS" ] && [ -z "$INTERNAL_IP6_NETMASK" ]; then - INTERNAL_IP6_NETMASK="$INTERNAL_IP6_ADDRESS/128" - fi - - if [ -n "$INTERNAL_IP6_NETMASK" ]; then - addr="${INTERNAL_IP6_NETMASK%%/*}" - mask="${INTERNAL_IP6_NETMASK##*/}" - [[ "$addr" != "$mask" ]] && proto_add_ipv6_address "$addr" "$mask" - fi - - DNSMASQ_FILE="/tmp/dnsmasq.d/openconnect.$TUNDEV" - LOCAL_DOMAIN=$(uci get dhcp.@dnsmasq[0].domain) - rm -f $DNSMASQ_FILE - if [ -n "$CISCO_SPLIT_DNS" ] && [ -d "/tmp/dnsmasq.d/" ];then - SDNS=`echo $CISCO_SPLIT_DNS|sed 's/,/\n/g'` - echo "$SDNS" | while read i; do - if [ "$i" = "$LOCAL_DOMAIN" ];then - continue - fi - if [ -n "$INTERNAL_IP4_DNS" ];then - for dns in $INTERNAL_IP4_DNS;do - echo "server=/$i/$dns" >> $DNSMASQ_FILE - done - fi - if [ -n "$INTERNAL_IP6_DNS" ];then - for dns in $INTERNAL_IP6_DNS;do - echo "server=/$i/$dns" >> $DNSMASQ_FILE - done - fi - echo "rebind-domain-ok=$i" >> $DNSMASQ_FILE - done - /etc/init.d/dnsmasq restart - else - if [ -n "$INTERNAL_IP4_DNS" ];then - for dns in $INTERNAL_IP4_DNS;do - proto_add_dns_server "$dns" - done - fi - if [ -n "$INTERNAL_IP6_DNS" ];then - for dns in $INTERNAL_IP6_DNS;do - proto_add_dns_server "$dns" - done - fi - if [ -n "$CISCO_DEF_DOMAIN" ] && [ "$CISCO_DEF_DOMAIN" != "$LOCAL_DOMAIN" ];then - if [ -n "$INTERNAL_IP4_DNS" ];then - for dns in $INTERNAL_IP4_DNS;do - echo "server=/$CISCO_DEF_DOMAIN/$dns" >> $DNSMASQ_FILE - done - fi - if [ -n "$INTERNAL_IP6_DNS" ];then - for dns in $INTERNAL_IP6_DNS;do - echo "server=/$CISCO_DEF_DOMAIN/$dns" >> $DNSMASQ_FILE - done - fi - proto_add_dns_search "$CISCO_DEF_DOMAIN" - fi - fi - - if [ -n "$CISCO_SPLIT_INC" ]; then - i=0 - while [ $i -lt $CISCO_SPLIT_INC ] ; do - eval NETWORK="\${CISCO_SPLIT_INC_${i}_ADDR}" - eval NETMASK="\${CISCO_SPLIT_INC_${i}_MASK}" - eval NETMASKLEN="\${CISCO_SPLIT_INC_${i}_MASKLEN}" - if [ $NETWORK != "0.0.0.0" ]; then - proto_add_ipv4_route "$NETWORK" "$NETMASKLEN" - else - proto_add_ipv4_route "0.0.0.0" 0 - fi - i=$(($i + 1)) - done - elif [ -n "$INTERNAL_IP4_ADDRESS" ]; then - proto_add_ipv4_route "0.0.0.0" 0 - fi - if [ -n "$CISCO_IPV6_SPLIT_INC" ]; then - i=0 - while [ $i -lt $CISCO_IPV6_SPLIT_INC ] ; do - eval NETWORK="\${CISCO_IPV6_SPLIT_INC_${i}_ADDR}" - eval NETMASKLEN="\${CISCO_IPV6_SPLIT_INC_${i}_MASKLEN}" - if [ $NETMASKLEN -lt 128 ]; then - proto_add_ipv6_route "$NETWORK" "$NETMASKLEN" - else - proto_add_ipv6_route "::0" 0 - fi - i=$(($i + 1)) - done - elif [ -n "$INTERNAL_IP6_NETMASK" -o -n "$INTERNAL_IP6_ADDRESS" ]; then - proto_add_ipv6_route "::0" 0 - fi - proto_send_update "$INTERFACE" -} - -do_disconnect() { - rm -f "/tmp/dnsmasq.d/openconnect.$TUNDEV" - proto_init_update "$TUNDEV" 0 - proto_send_update "$INTERFACE" -} - -#### Hooks -run_hooks() { - HOOK="$1" - - if [ -d ${HOOKS_DIR}/${HOOK}.d ]; then - for script in ${HOOKS_DIR}/${HOOK}.d/* ; do - [ -f $script ] && . $script - done - fi -} - -#### Main - -if [ -z "$reason" ]; then - logger -t openconnect "this script must be called from vpnc" 1>&2 - exit 1 -fi -if [ -z "$INTERFACE" ]; then - logger -t openconnect "this script must be called for an active interface" - exit 1 -fi - -. /lib/netifd/netifd-proto.sh - -case "$reason" in - pre-init) - run_hooks pre-init - ;; - connect) - run_hooks connect - do_connect - run_hooks post-connect - ;; - disconnect) - run_hooks disconnect - do_disconnect - run_hooks post-disconnect - ;; - reconnect) - run_hooks reconnect - ;; - *) - logger -t openconnect "unknown reason '$reason'. Maybe vpnc-script is out of date" 1>&2 - exit 1 - ;; -esac - -exit 0 diff --git a/net/vpnc/Config.in b/net/vpnc/Config.in deleted file mode 100644 index 5eacd97..0000000 --- a/net/vpnc/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -# vpnc avanced configuration - -menu "Configuration" - depends on PACKAGE_vpnc - -choice - prompt "SSL library" - default VPNC_GNUTLS - -config VPNC_GNUTLS - bool "GnuTLS support" - -config VPNC_OPENSSL - bool "OpenSSL" - -endchoice - -endmenu diff --git a/net/vpnc/Makefile b/net/vpnc/Makefile deleted file mode 100644 index 147bca9..0000000 --- a/net/vpnc/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vpnc -PKG_REV:=550 -PKG_VERSION:=0.5.3.r$(PKG_REV) -PKG_RELEASE:=5 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://svn.unix-ag.uni-kl.de/vpnc/trunk/ -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_PROTO:=svn - -PKG_MAINTAINER:=Daniel Gimpelevich -PKG_LICENSE:=VARIOUS -PKG_LICENSE_FILES:=COPYING - -PKG_CONFIG_DEPENDS:= \ - CONFIG_VPNC_GNUTLS \ - CONFIG_VPNC_OPENSSL \ - - -include $(INCLUDE_DIR)/package.mk - -define Package/vpnc/config - source "$(SOURCE)/Config.in" -endef - -define Package/vpnc - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libgpg-error +libgcrypt +kmod-tun +VPNC_OPENSSL:libopenssl +VPNC_GNUTLS:libgnutls +vpnc-scripts +resolveip - TITLE:=VPN client for Cisco EasyVPN - URL:=http://www.unix-ag.uni-kl.de/~massar/vpnc/ - SUBMENU:=VPN -endef - -define Package/vpnc/description - A VPN client compatible with Cisco's EasyVPN equipment. - - Supports IPSec (ESP) with Mode Configuration and Xauth. Supports only - shared-secret IPSec authentication with Xauth, AES (256, 192, 128), - 3DES, 1DES, MD5, SHA1, DH1/2/5 and IP tunneling. -endef - -define Package/vpnc/conffiles -/etc/vpnc/default.conf -endef - -ifeq ($(CONFIG_VPNC_OPENSSL),y) -define Build/Compile - $(call Build/Compile/Default, \ - OFLAGS="$(TARGET_CFLAGS)" \ - OS="Linux" VERSION="$(PKG_VERSION)" \ - STAGING_DIR="$(STAGING_DIR)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - OPENSSL_GPL_VIOLATION=yes PREFIX=/usr \ - all install \ - ) -endef -else -define Build/Compile - $(call Build/Compile/Default, \ - OFLAGS="$(TARGET_CFLAGS)" \ - OS="Linux" VERSION="$(PKG_VERSION)" \ - STAGING_DIR="$(STAGING_DIR)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - PREFIX=/usr \ - all install \ - ) -endef -endif - -define Package/vpnc/install - $(INSTALL_DIR) $(1)/lib/netifd/proto - $(INSTALL_BIN) ./files/vpnc.sh $(1)/lib/netifd/proto/ - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/vpnc \ - $(PKG_INSTALL_DIR)/usr/sbin/vpnc-disconnect \ - $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/vpnc - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/vpnc/default.conf $(1)/etc/vpnc/ - $(INSTALL_DIR) $(1)/lib/upgrade/keep.d - $(INSTALL_DATA) ./files/vpnc.upgrade $(1)/lib/upgrade/keep.d/vpnc -endef - -$(eval $(call BuildPackage,vpnc)) diff --git a/net/vpnc/README b/net/vpnc/README deleted file mode 100644 index 975ee36..0000000 --- a/net/vpnc/README +++ /dev/null @@ -1,41 +0,0 @@ -The vpnc client expects to be configured using the uci interface. - -To setup a VPN connection, add the following to /etc/config/network: - -config interface 'MYVPN' - option proto 'vpnc' - option interface 'wan' - option server 'vpn.example.com' - option username 'test' - option password 'secret' # or: - option hexpasswd 'AE7FF6A0426F0A0CD0A02EB9EC3C5066FAEB0B25' - option authgroup 'DEFAULT' - option passgroup 'groupsecret' # or: - option hexpassgroup '52B0BEAF6605C3CE9BE20A0DC0A0F6240A6FF7EA' - option domain 'WORKGROUP' - option vendor 'cisco' # or 'netscreen' - option natt_mode 'natt' # or 'none' or 'force-natt' or 'cisco-udp' - option dh_group 'dh2' # or 'dh1' or 'dh5' - option pfs 'server' # or 'nopfs' or 'dh1' or 'dh2' or 'dh5' - option enable_single_des '0' - option enable_no_enc '0' # '1' to enable unencrypted VPN - option mtu '0' - option local_addr '0.0.0.0' - option local_port '500' # '0' to use a random port - option udp_port '10000' # '0' to use a random port - option dpd_idle '300' - option auth_mode 'psk' # or 'hybrid' - option target_network '0.0.0.0/0.0.0.0' # network/netmask or CIDR - -The additional file(s) are also used: -/etc/vpnc/ca-vpn-MYVPN.pem: The server's CA certificate (for auth_mode 'hybrid') - -After these are setup you can initiate the VPN using "ifup MYVPN", and -deinitialize it using ifdown. You may also use the luci web interface -(Network -> Interfaces -> MYVPN Connect). - -Note that you need to configure the firewall to allow communication between -the MYVPN interface and lan. - -If you install this package via opkg, there are reports that you must reboot -before it can be used. diff --git a/net/vpnc/files/vpnc.sh b/net/vpnc/files/vpnc.sh deleted file mode 100755 index 971b823..0000000 --- a/net/vpnc/files/vpnc.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/sh -. /lib/functions.sh -. ../netifd-proto.sh -init_proto "$@" - -proto_vpnc_init_config() { - proto_config_add_string "server" - proto_config_add_string "username" - proto_config_add_string "hexpasswd" - proto_config_add_string "authgroup" - proto_config_add_string "password" - proto_config_add_string "token_mode" - proto_config_add_string "token_secret" - proto_config_add_string "interface" - proto_config_add_string "passgroup" - proto_config_add_string "hexpassgroup" - proto_config_add_string "domain" - proto_config_add_string "vendor" - proto_config_add_string "natt_mode" - proto_config_add_string "dh_group" - proto_config_add_string "pfs" - proto_config_add_boolean "enable_single_des" - proto_config_add_boolean "enable_no_enc" - proto_config_add_int "mtu" - proto_config_add_string "local_addr" - proto_config_add_int "local_port" - proto_config_add_int "udp_port" - proto_config_add_int "dpd_idle" - proto_config_add_string "auth_mode" - proto_config_add_string "target_network" - proto_config_add_boolean "authfail" - no_device=1 - available=1 -} - -proto_vpnc_setup() { - local config="$1" - - json_get_vars server username hexpasswd authgroup password token_mode token_secret interface passgroup hexpassgroup domain vendor natt_mode dh_group pfs enable_single_des enable_no_enc mtu local_addr local_port udp_port dpd_idle auth_mode target_network authfail - - grep -q tun /proc/modules || insmod tun - - logger -t vpnc "initializing..." - serv_addr= - for ip in $(resolveip -t 10 "$server"); do - ( proto_add_host_dependency "vpn-$config" "$ip" $interface ) - serv_addr=1 - done - [ -n "$serv_addr" ] || { - logger -t vpnc "Could not resolve server address: '$server'" - sleep 60 - proto_setup_failed "$config" - exit 1 - } - - mkdir -p /var/etc - umask 077 - pwfile="/var/etc/vpnc-$config.conf" - echo "IPSec gateway $server" > "$pwfile" - cmdline="--no-detach --pid-file /var/run/vpnc-$config.pid --ifname vpn-$config --non-inter --script /lib/netifd/vpnc-script $pwfile" - - [ -f /etc/vpnc/ca-vpn-$config.pem ] && echo "CA-File /etc/vpnc/ca-vpn-$config.pem" >> "$pwfile" - [ -n "$hexpasswd" ] && echo "Xauth obfuscated password $hexpasswd" >> "$pwfile" - [ -n "$authgroup" ] && echo "IPSec ID $authgroup" >> "$pwfile" - [ -n "$username" ] && echo "Xauth username $username" >> "$pwfile" - [ -n "$password" ] && echo "Xauth password $password" >> "$pwfile" - [ -n "$passgroup" ] && echo "IPSec secret $passgroup" >> "$pwfile" - [ -n "$hexpassgroup" ] && echo "IPSec obfuscated secret $hexpassgroup" >> "$pwfile" - [ -n "$domain" ] && echo "Domain $domain" >> "$pwfile" - [ -n "$vendor" ] && echo "Vendor $vendor" >> "$pwfile" - [ -n "$natt_mode" ] && echo "NAT Traversal Mode $natt_mode" >> "$pwfile" - [ -n "$dh_group" ] && echo "IKE DH Group $dh_group" >> "$pwfile" - [ -n "$pfs" ] && echo "Perfect Forward Secrecy $pfs" >> "$pwfile" - [ "${enable_single_des:-0}" -gt 0 ] && echo "Enable Single DES" >> "$pwfile" - [ "${enable_no_enc:-0}" -gt 0 ] && echo "Enable no encryption" >> "$pwfile" - [ -n "$mtu" ] && echo "Interface MTU $mtu" >> "$pwfile" - [ -n "$local_addr" ] && echo "Local Addr $local_addr" >> "$pwfile" - [ -n "$local_port" ] && echo "Local Port $local_port" >> "$pwfile" - [ -n "$udp_port" ] && echo "Cisco UDP Encapsulation Port $udp_port" >> "$pwfile" - [ -n "$dpd_idle" ] && echo "DPD idle timeout (our side) $dpd_idle" >> "$pwfile" - [ -n "$auth_mode" ] && echo "IKE Authmode $auth_mode" >> "$pwfile" - [ -n "$target_network" ] && echo "IPSEC target network $target_network" >> "$pwfile" - - proto_export INTERFACE="$config" - logger -t vpnc "executing 'vpnc $cmdline'" - proto_run_command "$config" /usr/sbin/vpnc $cmdline -} - -proto_vpnc_teardown() { - local config="$1" - - pwfile="/var/etc/vpnc-$config.conf" - - json_get_var authfail authfail - # On error exit (vpnc only has success = 0 and error = 1, so - # we can't be fine-grained and say only auth error) - # and authfail setting true, then don't retry starting vpnc - # This is used for the case were the server blocks repeated - # failed authentication attempts (which will occur if the password - # is wrong, for example). - if [ ${ERROR:-0} -gt 0 ] && [ "${authfail:-0}" -gt 0 ]; then - proto_block_restart "$config" - fi - - rm -f $pwfile - logger -t vpnc "bringing down vpnc" - proto_kill_command "$config" 2 -} - -add_protocol vpnc diff --git a/net/vpnc/files/vpnc.upgrade b/net/vpnc/files/vpnc.upgrade deleted file mode 100644 index 585513d..0000000 --- a/net/vpnc/files/vpnc.upgrade +++ /dev/null @@ -1,2 +0,0 @@ -/etc/vpnc/ca-vpn-*.pem - diff --git a/net/vpnc/patches/001-cross.patch b/net/vpnc/patches/001-cross.patch deleted file mode 100644 index 33bcfee..0000000 --- a/net/vpnc/patches/001-cross.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -20,7 +20,7 @@ - # $Id: Makefile 539 2013-12-04 13:41:04Z Antonio Borneo $ - - DESTDIR= --PREFIX=/usr/local -+PREFIX=/usr - ETCDIR=/etc/vpnc - BINDIR=$(PREFIX)/bin - SBINDIR=$(PREFIX)/sbin -@@ -57,18 +57,15 @@ OBJS = $(addsuffix .o,$(basename $(SRCS) - CRYPTO_OBJS = $(addsuffix .o,$(basename $(CRYPTO_SRCS))) - BINOBJS = $(addsuffix .o,$(BINS)) - BINSRCS = $(addsuffix .c,$(BINS)) --VERSION := $(shell sh mk-version) - RELEASE_VERSION := $(shell cat VERSION) - - CC ?= gcc --CFLAGS ?= -O3 -g - CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings --CFLAGS += $(shell libgcrypt-config --cflags) $(CRYPTO_CFLAGS) -+CFLAGS += -O3 -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include $(OFLAGS) $(CRYPTO_CFLAGS) - CPPFLAGS += -DVERSION=\"$(VERSION)\" --LDFLAGS ?= -g --LIBS += $(shell libgcrypt-config --libs) $(CRYPTO_LDADD) -+LIBS += -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lgcrypt -lgpg-error $(CRYPTO_LDADD) - --ifeq ($(shell uname -s), SunOS) -+ifeq ($(OS), SunOS) - LIBS += -lnsl -lresolv -lsocket - endif - ifneq (,$(findstring Apple,$(shell $(CC) --version))) -@@ -82,7 +79,7 @@ vpnc : $(OBJS) vpnc.o - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) - - vpnc.8 : vpnc.8.template makeman.pl vpnc -- ./makeman.pl -+ touch vpnc.8 - - cisco-decrypt : cisco-decrypt.o decrypt-utils.o - $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) diff --git a/net/vpnc/patches/100-musl-compat.patch b/net/vpnc/patches/100-musl-compat.patch deleted file mode 100644 index 0a46770..0000000 --- a/net/vpnc/patches/100-musl-compat.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/sysdep.h -+++ b/sysdep.h -@@ -37,12 +37,14 @@ int tun_read(int fd, unsigned char *buf, - int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr); - - /***************************************************************************/ --#if defined(__linux__) || defined(__GLIBC__) -+#if defined(__GLIBC__) || defined(__UCLIBC__) - #include -+#define HAVE_ERROR 1 -+#endif - -+#if defined(__linux__) || defined(__GLIBC__) - #define HAVE_VASPRINTF 1 - #define HAVE_ASPRINTF 1 --#define HAVE_ERROR 1 - #define HAVE_UNSETENV 1 - #define HAVE_SETENV 1 - #endif ---- a/sysdep.c -+++ b/sysdep.c -@@ -59,6 +59,10 @@ - #if defined(__DragonFly__) - #include - #elif defined(__linux__) -+# if !defined(__GLIBC__) && !defined(__UCLIBC__) -+# define _LINUX_IF_ETHER_H -+# include -+# endif - #include - #elif defined(__APPLE__) - /* no header for tun */ ---- a/config.c -+++ b/config.c -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/net/vsftpd/Makefile b/net/vsftpd/Makefile deleted file mode 100644 index e41cf22..0000000 --- a/net/vsftpd/Makefile +++ /dev/null @@ -1,98 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vsftpd -PKG_VERSION:=3.0.3 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://security.appspot.com/downloads/ -PKG_HASH:=9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7 -PKG_LICENSE:=GPLv2 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/vsftpd/Default - SUBMENU:=File Transfer - SECTION:=net - CATEGORY:=Network - TITLE:=Fast and secure FTP server - URL:=https://security.appspot.com/vsftpd.html - MAINTAINER:=Cezary Jackiewicz -endef - - -define Package/vsftpd -$(call Package/vsftpd/Default) - VARIANT:=notls - TITLE+= (no TLS) -endef - -define Package/vsftpd-tls -$(call Package/vsftpd/Default) - VARIANT:=tls - TITLE+= (TLS) - DEPENDS+=+libopenssl -endef - -define Package/vsftpd/conffiles -/etc/vsftpd.conf -/etc/vsftpd -endef - -Package/vsftpd-tls/conffiles=$(Package/vsftpd/conffiles) - -ifneq ($(CONFIG_USE_MUSL),) - NLSSTRING:=-lcrypt -else - NLSSTRING:=-lcrypt -lnsl -endif - -TARGET_CFLAGS += -D_GNU_SOURCE -include fcntl.h - -ifeq ($(BUILD_VARIANT),notls) - define Build/Compile - $(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - vsftpd - endef -endif - -ifeq ($(BUILD_VARIANT),tls) - define Build/Compile - $(SED) 's/#undef VSF_BUILD_SSL/#define VSF_BUILD_SSL/' $(PKG_BUILD_DIR)/builddefs.h - $(SED) 's/-lcrypt -lnsl/-lcrypt -lnsl -lssl -lcrypto/' $(PKG_BUILD_DIR)/Makefile - $(SED) 's/-lcrypt -lnsl/$(NLSSTRING)/' $(PKG_BUILD_DIR)/Makefile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - vsftpd - endef -endif - -define Package/vsftpd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) ./files/$(PKG_NAME).conf $(1)/etc/$(PKG_NAME).conf - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) - $(INSTALL_DIR) $(1)/etc/vsftpd -endef - -Package/vsftpd-tls/install=$(Package/vsftpd/install) - -$(eval $(call BuildPackage,vsftpd)) -$(eval $(call BuildPackage,vsftpd-tls)) diff --git a/net/vsftpd/files/vsftpd.conf b/net/vsftpd/files/vsftpd.conf deleted file mode 100644 index e06ac35..0000000 --- a/net/vsftpd/files/vsftpd.conf +++ /dev/null @@ -1,30 +0,0 @@ -background=YES -listen=YES -anonymous_enable=NO -local_enable=YES -write_enable=YES -local_umask=022 -check_shell=NO -#dirmessage_enable=YES -#ftpd_banner=Welcome to blah FTP service. -session_support=NO -#syslog_enable=YES -#userlist_enable=YES -#userlist_deny=NO -#userlist_file=/etc/vsftpd/vsftpd.users -#xferlog_enable=YES -#xferlog_file=/var/log/vsftpd.log -#xferlog_std_format=YES -### -### TLS/SSL options -### example key generation: openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/vsftpd/vsftpd_privkey.pem -out /etc/vsftpd/vsftpd_cert.pem -subj /C="DE"/ST="Saxony"/L="Leipzig"/CN="OpenWrt" -#ssl_enable=YES -#allow_anon_ssl=NO -#force_local_data_ssl=NO -#force_local_logins_ssl=NO -#ssl_tlsv1=YES -#ssl_sslv2=NO -#ssl_sslv3=NO -#rsa_cert_file=/etc/vsftpd/vsftpd_cert.pem -#rsa_private_key_file=/etc/vsftpd/vsftpd_privkey.pem - diff --git a/net/vsftpd/files/vsftpd.init b/net/vsftpd/files/vsftpd.init deleted file mode 100644 index ad3e23d..0000000 --- a/net/vsftpd/files/vsftpd.init +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=50 - -start() { - mkdir -m 0755 -p /var/run/vsftpd - service_start /usr/sbin/vsftpd -} - -stop() { - service_stop /usr/sbin/vsftpd -} diff --git a/net/vsftpd/patches/001-destdir.patch b/net/vsftpd/patches/001-destdir.patch deleted file mode 100644 index b0274ac..0000000 --- a/net/vsftpd/patches/001-destdir.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -22,6 +22,8 @@ OBJS = main.o utility.o prelogin.o ftpcm - seccompsandbox.o - - -+DESTDIR = -+ - .c.o: - $(CC) -c $*.c $(CFLAGS) $(IFLAGS) - -@@ -29,21 +31,20 @@ vsftpd: $(OBJS) - $(CC) -o vsftpd $(OBJS) $(LINK) $(LDFLAGS) $(LIBS) - - install: -- if [ -x /usr/local/sbin ]; then \ -- $(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \ -- else \ -- $(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi -- if [ -x /usr/local/man ]; then \ -- $(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \ -- $(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \ -- elif [ -x /usr/share/man ]; then \ -- $(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \ -- $(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \ -- else \ -- $(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \ -- $(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi -- if [ -x /etc/xinetd.d ]; then \ -- $(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi -+ mkdir -p $(DESTDIR)/usr/sbin -+ $(INSTALL) -m 755 vsftpd $(DESTDIR)/usr/sbin/ -+ mkdir -p $(DESTDIR)/usr/share/man/man8 -+ $(INSTALL) -m 644 vsftpd.8 $(DESTDIR)/usr/share/man/man8/ -+ mkdir -p $(DESTDIR)/usr/share/man/man5 -+ $(INSTALL) -m 644 vsftpd.conf.5 $(DESTDIR)/usr/share/man/man5/ -+ mkdir -p $(DESTDIR)/etc/xinetd.d -+ $(INSTALL) -m 644 xinetd.d/vsftpd $(DESTDIR)/etc/xinetd.d/ -+ -+uninstall: -+ rm -f $(DESTDIR)/usr/sbin/vsftpd -+ rm -f $(DESTDIR)/usr/share/man/man8/vsftpd.8 -+ rm -f $(DESTDIR)/usr/share/man/man5/vsftpd.conf.5 -+ rm -f $(DESTDIR)/etc/xinetd.d/vsftpd - - clean: - rm -f *.o *.swp vsftpd diff --git a/net/vsftpd/patches/002-find_libs.patch b/net/vsftpd/patches/002-find_libs.patch deleted file mode 100644 index daf83ef..0000000 --- a/net/vsftpd/patches/002-find_libs.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -8,8 +8,8 @@ CFLAGS = -O2 -fPIE -fstack-protector --p - -D_FORTIFY_SOURCE=2 \ - #-pedantic -Wconversion - --LIBS = `./vsf_findlibs.sh` --LINK = -Wl,-s -+LIBS = -lcrypt -lnsl -+LINK = - LDFLAGS = -fPIE -pie -Wl,-z,relro -Wl,-z,now - - OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ diff --git a/net/vsftpd/patches/003-chroot.patch b/net/vsftpd/patches/003-chroot.patch deleted file mode 100644 index 8965da4..0000000 --- a/net/vsftpd/patches/003-chroot.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/tunables.c -+++ b/tunables.c -@@ -254,7 +254,7 @@ tunables_load_defaults() - /* -rw------- */ - tunable_chown_upload_mode = 0600; - -- install_str_setting("/usr/share/empty", &tunable_secure_chroot_dir); -+ install_str_setting("/var/run/vsftpd", &tunable_secure_chroot_dir); - install_str_setting("ftp", &tunable_ftp_username); - install_str_setting("root", &tunable_chown_username); - install_str_setting("/var/log/xferlog", &tunable_xferlog_file); diff --git a/net/vsftpd/patches/004-disable-capabilities.patch b/net/vsftpd/patches/004-disable-capabilities.patch deleted file mode 100644 index 7aa6330..0000000 --- a/net/vsftpd/patches/004-disable-capabilities.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/sysdeputil.c -+++ b/sysdeputil.c -@@ -165,6 +165,9 @@ - #endif - /* END config */ - -+#undef VSF_SYSDEP_HAVE_CAPABILITIES -+#undef VSF_SYSDEP_HAVE_LIBCAP -+ - /* PAM support - we include our own dummy version if the system lacks this */ - #include - diff --git a/net/vsftpd/patches/005-disable-pam.patch b/net/vsftpd/patches/005-disable-pam.patch deleted file mode 100644 index ebb7244..0000000 --- a/net/vsftpd/patches/005-disable-pam.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/builddefs.h -+++ b/builddefs.h -@@ -2,7 +2,7 @@ - #define VSF_BUILDDEFS_H - - #undef VSF_BUILD_TCPWRAPPERS --#define VSF_BUILD_PAM -+#undef VSF_BUILD_PAM - #undef VSF_BUILD_SSL - - #endif /* VSF_BUILDDEFS_H */ diff --git a/net/vsftpd/patches/006-musl-compatibility.patch b/net/vsftpd/patches/006-musl-compatibility.patch deleted file mode 100644 index 9eefec7..0000000 --- a/net/vsftpd/patches/006-musl-compatibility.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/sysdeputil.c -+++ b/sysdeputil.c -@@ -58,7 +58,9 @@ - #define VSF_SYSDEP_HAVE_SHADOW - #define VSF_SYSDEP_HAVE_USERSHELL - #define VSF_SYSDEP_HAVE_LIBCAP --#define VSF_SYSDEP_HAVE_UTMPX -+#if defined(__GLIBC__) || defined(__UCLIBC__) -+ #define VSF_SYSDEP_HAVE_UTMPX -+#endif - - #define __USE_GNU - #include diff --git a/net/vsftpd/patches/007-CVE-2015-1419.patch b/net/vsftpd/patches/007-CVE-2015-1419.patch deleted file mode 100644 index 173027a..0000000 --- a/net/vsftpd/patches/007-CVE-2015-1419.patch +++ /dev/null @@ -1,98 +0,0 @@ -Description: CVE-2015-1419: config option deny_file is not handled correctly -Author: Marcus Meissner -Origin: https://bugzilla.novell.com/show_bug.cgi?id=CVE-2015-1419 -Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776922 -Last-Update: 2015-02-24 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/ls.c -+++ b/ls.c -@@ -7,6 +7,7 @@ - * Would you believe, code to handle directory listing. - */ - -+#include - #include "ls.h" - #include "access.h" - #include "defs.h" -@@ -243,11 +244,42 @@ vsf_filename_passes_filter(const struct - struct mystr temp_str = INIT_MYSTR; - struct mystr brace_list_str = INIT_MYSTR; - struct mystr new_filter_str = INIT_MYSTR; -+ struct mystr normalize_filename_str = INIT_MYSTR; -+ const char *normname; -+ const char *path; - int ret = 0; - char last_token = 0; - int must_match_at_current_pos = 1; -+ - str_copy(&filter_remain_str, p_filter_str); -- str_copy(&name_remain_str, p_filename_str); -+ -+ /* normalize filepath */ -+ path = str_strdup(p_filename_str); -+ normname = realpath(path, NULL); -+ if (normname == NULL) -+ goto out; -+ str_alloc_text(&normalize_filename_str, normname); -+ -+ if (!str_isempty (&filter_remain_str) && !str_isempty(&normalize_filename_str)) { -+ if (str_get_char_at(p_filter_str, 0) == '/') { -+ if (str_get_char_at(&normalize_filename_str, 0) != '/') { -+ str_getcwd (&name_remain_str); -+ -+ if (str_getlen(&name_remain_str) > 1) /* cwd != root dir */ -+ str_append_char (&name_remain_str, '/'); -+ -+ str_append_str (&name_remain_str, &normalize_filename_str); -+ } -+ else -+ str_copy (&name_remain_str, &normalize_filename_str); -+ } else { -+ if (str_get_char_at(p_filter_str, 0) != '{') -+ str_basename (&name_remain_str, &normalize_filename_str); -+ else -+ str_copy (&name_remain_str, &normalize_filename_str); -+ } -+ } else -+ str_copy(&name_remain_str, &normalize_filename_str); - - while (!str_isempty(&filter_remain_str) && *iters < VSFTP_MATCHITERS_MAX) - { -@@ -360,6 +392,9 @@ vsf_filename_passes_filter(const struct - ret = 0; - } - out: -+ free(normname); -+ free(path); -+ str_free(&normalize_filename_str); - str_free(&filter_remain_str); - str_free(&name_remain_str); - str_free(&temp_str); ---- a/str.c -+++ b/str.c -@@ -711,3 +711,14 @@ str_replace_unprintable(struct mystr* p_ - } - } - -+void -+str_basename (struct mystr* d_str, const struct mystr* path) -+{ -+ static struct mystr tmp; -+ -+ str_copy (&tmp, path); -+ str_split_char_reverse(&tmp, d_str, '/'); -+ -+ if (str_isempty(d_str)) -+ str_copy (d_str, path); -+} ---- a/str.h -+++ b/str.h -@@ -100,6 +100,7 @@ void str_replace_unprintable(struct myst - int str_atoi(const struct mystr* p_str); - filesize_t str_a_to_filesize_t(const struct mystr* p_str); - unsigned int str_octal_to_uint(const struct mystr* p_str); -+void str_basename (struct mystr* d_str, const struct mystr* path); - - /* PURPOSE: Extract a line of text (delimited by \n or EOF) from a string - * buffer, starting at character position 'p_pos'. The extracted line will diff --git a/net/wavemon/Makefile b/net/wavemon/Makefile deleted file mode 100644 index 327a12f..0000000 --- a/net/wavemon/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2008-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wavemon -PKG_VERSION:=0.8.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/uoaerg/wavemon.git -PKG_SOURCE_VERSION:=v$(PKG_VERSION) - -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Jonathan McCrohan - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/wavemon - SECTION:=net - CATEGORY:=Network - TITLE:=N-curses based wireless network devices monitor - DEPENDS:=+libncurses +libpthread +libnl-genl - SUBMENU:=wireless - URL:=https://github.com/uoaerg/wavemon/releases -endef - -define Package/wavemon/description - wavemon is a ncurses-based monitoring application for wireless network - devices. It currently works under Linux with devices that are supported - by the wireless extensions by Jean Tourrilhes (included in Kernel 2.4 - and higher), e.g. the Lucent Orinoco cards. -endef - -CONFIGURE_VARS += \ - ac_cv_lib_cap_cap_get_flag=no - -TARGET_CFLAGS += -pthread -I$(STAGING_DIR)/usr/include/libnl3 - -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include" - -define Package/wavemon/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wavemon $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,wavemon)) diff --git a/net/wavemon/patches/musl-fix.patch b/net/wavemon/patches/musl-fix.patch deleted file mode 100644 index a0a7866..0000000 --- a/net/wavemon/patches/musl-fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/wavemon.h b/wavemon.h -index e7584f7..8c76d11 100644 ---- a/wavemon.h -+++ b/wavemon.h -@@ -19,6 +19,7 @@ - * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - #include -+#include - #include - #include - #include -@@ -33,7 +34,7 @@ - #include - #include - #include --#include -+#include - - #include "llist.h" - diff --git a/net/webui-aria2/Makefile b/net/webui-aria2/Makefile deleted file mode 100644 index 514ad18..0000000 --- a/net/webui-aria2/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=webui-aria2 -PKG_VERSION:=2016-10-11 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/ziahamza/webui-aria2.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=6a29c1b1d0224e1daa88906e88bc2e177ca2ad76 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Hsing-Wang Liao - -include $(INCLUDE_DIR)/package.mk - -define Package/webui-aria2 - SECTION:=net - CATEGORY:=Network - SUBMENU:=Download Manager - DEPENDS:= - TITLE:=An interface to interact with aria2 - URL:=https://github.com/ziahamza/webui-aria2 - PKGARCH:=all -endef - -define Package/webui-aria2/description - The aim for this project is to create the worlds best and hottest interface to interact with aria2. Very simple to use. -endef - -define Build/Compile -endef - -define Package/webui-aria2/install - $(INSTALL_DIR) $(1)/www/webui-aria2 - - $(CP) $(PKG_BUILD_DIR)/fonts $(1)/www/webui-aria2 - $(CP) $(PKG_BUILD_DIR)/flags $(1)/www/webui-aria2 - $(CP) $(PKG_BUILD_DIR)/js $(1)/www/webui-aria2 - $(CP) $(PKG_BUILD_DIR)/img $(1)/www/webui-aria2 - $(CP) $(PKG_BUILD_DIR)/css $(1)/www/webui-aria2 - $(CP) $(PKG_BUILD_DIR)/index.html $(1)/www/webui-aria2 - $(CP) $(PKG_BUILD_DIR)/favicon.ico $(1)/www/webui-aria2 - $(CP) $(PKG_BUILD_DIR)/configuration.js $(1)/www/webui-aria2 -endef - -$(eval $(call BuildPackage,webui-aria2)) diff --git a/net/wget/Makefile b/net/wget/Makefile index 052f2d8..64a6a08 100644 --- a/net/wget/Makefile +++ b/net/wget/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wget -PKG_VERSION:=1.18 -PKG_RELEASE:=2 +PKG_VERSION:=1.19.5 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_MD5SUM:=af9ca95a4bb8ac4a9bf10aeae66fa5ec -PKG_MAINTAINER:=Maxim Storchak +PKG_HASH:=b39212abe1a73f2b28f4c6cb223c738559caac91d6e416a6d91d4b9d55c9faee +PKG_MAINTAINER:=Peter Wagner PKG_LICENSE:=GPL-3.0+ PKG_LICENSE_FILES:=COPYING @@ -66,6 +66,7 @@ endef CONFIGURE_ARGS+= \ --disable-rpath \ --disable-iri \ + --with-included-libunistring \ --without-libuuid CONFIGURE_VARS += \ diff --git a/net/wifidog/Makefile b/net/wifidog/Makefile new file mode 100644 index 0000000..15b975a --- /dev/null +++ b/net/wifidog/Makefile @@ -0,0 +1,104 @@ +# +# Copyright (C) 2006,2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wifidog +PKG_VERSION:=1.3.0 +PKG_RELEASE:=3 + + +PKG_LICENSE:=GPL-2.0 +# Note: Packaging is maintained upstream at +# https://github.com/wifidog/packages +PKG_MAINTAINER:=Michael Haas +PKG_LICENSE_FILES:=COPYING + + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/wifidog/wifidog-gateway +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=1.3.0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz +PKG_MIRROR_HASH:=9ffd9f3ae54baceb723abb7a04e27a9b6a3ff1479f8a3bfda9b8a496e8b4050f + +PKG_FIXUP:=autoreconf +# do not run make install +PKG_INSTALL:=0 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/wifidog/Default + SUBMENU:=Captive Portals + SECTION:=net + CATEGORY:=Network + DEPENDS:=+iptables-mod-extra +iptables-mod-ipopt +iptables-mod-nat-extra +libpthread + TITLE:=A wireless captive portal solution + URL:=http://www.wifidog.org +endef + +define Package/wifidog +$(call Package/wifidog/Default) + VARIANT:=normal +endef + +define Package/wifidog-tls +$(call Package/wifidog/Default) + DEPENDS+= +libcyassl + VARIANT:=tls +endef + + +define Package/wifidog/description + The Wifidog project is a complete and embeddable captive + portal solution for wireless community groups or individuals + who wish to open a free Hotspot while still preventing abuse + of their Internet connection. +endef + +define Package/wifidog-tls/description +$(call Package/wifidog/description) + +This variant can talk TLS to the auth server. +endef + +define Package/wifidog/conffiles +/etc/wifidog.conf +endef + +Package/wifidog-tls/conffiles = $(Package/wifidog/conffiles) + + +define Package/wifidog/configure + $(call Build/Configure/Default) +endef + +ifeq ($(BUILD_VARIANT),tls) + +CONFIGURE_ARGS += \ + --enable-cyassl + +endif + +define Package/wifidog/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wifidog $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wdctl $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhttpd.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog.conf $(1)/etc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/wifidog-msg.html $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/wifidog.init $(1)/etc/init.d/wifidog +endef + +Package/wifidog-tls/install = $(Package/wifidog/install) + +$(eval $(call BuildPackage,wifidog)) +$(eval $(call BuildPackage,wifidog-tls)) diff --git a/net/wifidog/files/wifidog.init b/net/wifidog/files/wifidog.init new file mode 100644 index 0000000..6ebf64f --- /dev/null +++ b/net/wifidog/files/wifidog.init @@ -0,0 +1,22 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=65 + +USE_PROCD=1 + +EXTRA_COMMANDS="status" +EXTRA_HELP=" status Print the status of the service" + +start_service() { + procd_open_instance + # -s: log to syslog + # -f: run in foreground + procd_set_param command /usr/bin/wifidog -s -f + procd_set_param respawn # respawn automatically if something died + procd_set_param file /etc/wifidog.conf + procd_close_instance +} + +status() { + /usr/bin/wdctl status +} diff --git a/net/wifidog/patches/010-use-tls-above-1.patch b/net/wifidog/patches/010-use-tls-above-1.patch new file mode 100644 index 0000000..ba39750 --- /dev/null +++ b/net/wifidog/patches/010-use-tls-above-1.patch @@ -0,0 +1,38 @@ +diff --git a/configure.in b/configure.in +index bf5463a..43ec27c 100644 +--- a/configure.in ++++ b/configure.in +@@ -96,8 +96,8 @@ if test "x$enable_cyassl" = xyes; then + # the use the new naming scheme below as cyassl/ssl.h is not available for + # AC_SEARCH_LIBS + AC_CHECK_HEADERS(cyassl/ssl.h) +- AC_SEARCH_LIBS([CyaTLSv1_client_method], [cyassl], [], [ +- AC_SEARCH_LIBS([wolfTLSv1_client_method], [wolfssl], [], [ ++ AC_SEARCH_LIBS([CyaSSLv23_client_method], [cyassl], [], [ ++ AC_SEARCH_LIBS([wolfSSLv23_client_method], [wolfssl], [], [ + AC_MSG_ERROR([unable to locate SSL lib: either wolfSSL or CyaSSL needed.]) + ]) + ]) +@@ -110,7 +110,7 @@ if test "x$enable_cyassl" = xyes; then + ]], [[ + CYASSL_CTX *ctx; + CyaSSL_Init(); +- ctx = CyaSSL_CTX_new(CyaTLSv1_client_method()); ++ ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); + CyaSSL_CTX_UseSNI(ctx, CYASSL_SNI_HOST_NAME, "wifidog.org", 11); + ]])], [enabled_sni=yes], [enabled_sni=no]) + +diff --git a/src/simple_http.c b/src/simple_http.c +index f0e27ee..7271021 100644 +--- a/src/simple_http.c ++++ b/src/simple_http.c +@@ -162,8 +162,7 @@ get_cyassl_ctx(const char *hostname) + if (NULL == cyassl_ctx) { + CyaSSL_Init(); + /* Create the CYASSL_CTX */ +- /* Allow TLSv1.0 up to TLSv1.2 */ +- if ((cyassl_ctx = CyaSSL_CTX_new(CyaTLSv1_client_method())) == NULL) { ++ if ((cyassl_ctx = CyaSSL_CTX_new(CyaSSLv23_client_method())) == NULL) { + debug(LOG_ERR, "Could not create CYASSL context."); + UNLOCK_CYASSL_CTX(); + return NULL; diff --git a/net/wifischedule/LICENSE b/net/wifischedule/LICENSE deleted file mode 100644 index e313028..0000000 --- a/net/wifischedule/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright (c) 2016, prpl Foundation - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without -fee is hereby granted, provided that the above copyright notice and this permission notice appear -in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE -FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/net/wifischedule/Makefile b/net/wifischedule/Makefile deleted file mode 100644 index a9dd3f7..0000000 --- a/net/wifischedule/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright (c) 2016, prpl Foundation -# -# Permission to use, copy, modify, and/or distribute this software for any purpose with or without -# fee is hereby granted, provided that the above copyright notice and this permission notice appear -# in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE -# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE -# FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Author: Nils Koenig - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wifischedule -PKG_VERSION:=1 -PKG_RELEASE:=1 -PKG_LICENSE:=PRPL - -PKG_MAINTAINER:=Nils Koenig - -include $(INCLUDE_DIR)/package.mk - -define Package/wifischedule - SUBMENU:=wireless - TITLE:=Turns WiFi on and off according to a schedule - SECTION:=net - CATEGORY:=Network -endef - -define Package/wifischedule/description -Turns WiFi on and off according to a schedule defined in UCI. -endef - -define Package/wifischedule/conffiles -/etc/config/wifi_schedule -endef - -define Build/Compile -endef - -define Package/wifischedule/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) ./net/usr/bin/wifi_schedule.sh $(1)/usr/bin/wifi_schedule.sh - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./net/etc/config/wifi_schedule $(1)/etc/config/wifi_schedule -endef - -$(eval $(call BuildPackage,wifischedule)) diff --git a/net/wifischedule/README.md b/net/wifischedule/README.md deleted file mode 100644 index 591abb1..0000000 --- a/net/wifischedule/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# wifischedule -Turns WiFi on and off according to a schedule on an openwrt router - -## Components -* wifischedule: Shell script that creates cron jobs based on configuration provided in UCI and does all the other logic of enabling and disabling wifi with the use of `/sbin/wifi` and `/usr/bin/iwinfo`. Can be used standalone. -* luci-app-wifischedule: LUCI frontend for creating the UCI configuration and triggering the actions. Depends on wifischedule. - - -## Use cases -You can create user-defined events when to enable or disable WiFi. -There are various use cases why you would like to do so: - -1. Reduce power consumption and therefore reduce CO2 emissions. -2. Reduce emitted electromagnatic radiation. -3. Force busincess hours when WiFi is available. - -Regarding 1: Please note, that you need to unload the wireless driver modules in order to get the most effect of saving power. -In my test scenario only disabling WiFi saves about ~0.4 Watt, unloading the modules removes another ~0.4 Watt. - -Regarding 2: Think of a wireless accesspoint e.g. in your bedrom, kids room where you want to remove the ammount of radiation emitted. - -Regarding 3: E.g. in a company, why would wireless need to be enabled weekends if no one is there working? -Or think of an accesspoint in your kids room when you want the youngsters to sleep after 10 pm instead of facebooking... - -## Configuration -You can create an arbitrary number of schedule events. Please note that there is on sanity check done wheather the start / stop times overlap or make sense. -If start and stop time are equal, this leads to disabling the WiFi at the given time. - -Logging if enabled is done to the file `/var/log/wifi_schedule.log` and can be reviewed through the "View Logfile" tab. -The cron jobs created can be reviewed through the "View Cron Jobs" tab. - -Please note that the "Unload Modules" function is currently considered as experimental. You can manually add / remove modules in the text field. -The button "Determine Modules Automatically" tries to make a best guess determining regarding the driver module and its dependencies. -When un-/loading the modules, there is a certain number of retries (`module_load`) performed. - -The option "Force disabling wifi even if stations associated" does what it says - when activated it simply shuts down WiFi. -When unchecked, its checked every `recheck_interval` minutes if there are still stations associated. Once the stations disconnect, WiFi is disabled. - -Please note, that the parameters `module_load` and `recheck_interval` are only accessible through uci. - -## UCI Configuration `wifi_schedule` -UCI configuration file: `/etc/config/wifi_schedule`: - -``` -config global - option logging '0' - option enabled '0' - option recheck_interval '10' - option modules_retries '10' - -config entry 'Businesshours' - option enabled '0' - option daysofweek 'Monday Tuesday Wednesday Thursday Friday' - option starttime '06:00' - option stoptime '22:00' - option forcewifidown '0' - -config entry 'Weekend' - option enabled '0' - option daysofweek 'Saturday Sunday' - option starttime '00:00' - option stoptime '00:00' - option forcewifidown '1' -``` - -## Script: `wifi_schedule.sh` -This is the script that does the work. Make your changes to the UCI config file: `/etc/config/wifi_schedule` - -Then call the script as follows in order to get the necessary cron jobs created: - -`wifi_schedule.sh cron` - -All commands: - -``` -wifi_schedule.sh cron|start|stop|forcestop|recheck|getmodules|savemodules|help - - cron: Create cronjob entries. - start: Start wifi. - stop: Stop wifi gracefully, i.e. check if there are stations associated and if so keep retrying. - forcestop: Stop wifi immediately. - recheck: Recheck if wifi can be disabled now. - getmodules: Returns a list of modules used by the wireless driver(s) - savemodules: Saves a list of automatic determined modules to UCI - help: This description. -``` diff --git a/net/wifischedule/net/etc/config/wifi_schedule b/net/wifischedule/net/etc/config/wifi_schedule deleted file mode 100644 index 946a1ff..0000000 --- a/net/wifischedule/net/etc/config/wifi_schedule +++ /dev/null @@ -1,19 +0,0 @@ -config global - option logging '0' - option enabled '0' - option recheck_interval '10' - option modules_retries '10' - -config entry 'Businesshours' - option enabled '0' - option daysofweek 'Monday Tuesday Wednesday Thursday Friday' - option starttime '06:00' - option stoptime '22:00' - option forcewifidown '0' - -config entry 'Weekend' - option enabled '0' - option daysofweek 'Saturday Sunday' - option starttime '00:00' - option stoptime '00:00' - option forcewifidown '1' diff --git a/net/wifischedule/net/usr/bin/wifi_schedule.sh b/net/wifischedule/net/usr/bin/wifi_schedule.sh deleted file mode 100755 index 363f95d..0000000 --- a/net/wifischedule/net/usr/bin/wifi_schedule.sh +++ /dev/null @@ -1,321 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2016, prpl Foundation -# -# Permission to use, copy, modify, and/or distribute this software for any purpose with or without -# fee is hereby granted, provided that the above copyright notice and this permission notice appear -# in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE -# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE -# FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Author: Nils Koenig - -SCRIPT=$0 -LOCKFILE=/tmp/wifi_schedule.lock -LOGFILE=/tmp/log/wifi_schedule.log -LOGGING=0 #default is off -PACKAGE=wifi_schedule -GLOBAL=${PACKAGE}.@global[0] - -_log() -{ - if [ ${LOGGING} -eq 1 ]; then - local ts=$(date) - echo "$ts $@" >> ${LOGFILE} - fi -} - -_exit() -{ - local rc=$1 - lock -u ${LOCKFILE} - exit ${rc} -} - -_cron_restart() -{ - /etc/init.d/cron restart > /dev/null -} - -_add_cron_script() -{ - (crontab -l ; echo "$1") | sort | uniq | crontab - - _cron_restart -} - -_rm_cron_script() -{ - crontab -l | grep -v "$1" | sort | uniq | crontab - - _cron_restart -} - -_get_uci_value_raw() -{ - local value - value=$(uci get $1 2> /dev/null) - local rc=$? - echo ${value} - return ${rc} -} - -_get_uci_value() -{ - local value - value=$(_get_uci_value_raw $1) - local rc=$? - if [ ${rc} -ne 0 ]; then - _log "Could not determine UCI value $1" - return 1 - fi - echo ${value} -} - -_format_dow_list() -{ - local dow=$1 - local flist="" - local day - for day in ${dow} - do - if [ ! -z ${flist} ]; then - flist="${flist}," - fi - flist="${flist}${day:0:3}" - done - echo ${flist} -} - - -_enable_wifi_schedule() -{ - local entry=$1 - local starttime - local stoptime - starttime=$(_get_uci_value ${PACKAGE}.${entry}.starttime) || _exit 1 - stoptime=$(_get_uci_value ${PACKAGE}.${entry}.stoptime) || _exit 1 - - local dow - dow=$(_get_uci_value_raw ${PACKAGE}.${entry}.daysofweek) || _exit 1 - - local fdow=$(_format_dow_list "$dow") - local forcewifidown - forcewifidown=$(_get_uci_value ${PACKAGE}.${entry}.forcewifidown) - local stopmode="stop" - if [ $forcewifidown -eq 1 ]; then - stopmode="forcestop" - fi - - - local stop_cron_entry="$(echo ${stoptime} | awk -F':' '{print $2, $1}') * * ${fdow} ${SCRIPT} ${stopmode}" # ${entry}" - _add_cron_script "${stop_cron_entry}" - - if [[ $starttime != $stoptime ]] - then - local start_cron_entry="$(echo ${starttime} | awk -F':' '{print $2, $1}') * * ${fdow} ${SCRIPT} start" # ${entry}" - _add_cron_script "${start_cron_entry}" - fi - - return 0 -} - -_get_wireless_interfaces() -{ - local n=$(cat /proc/net/wireless | wc -l) - cat /proc/net/wireless | tail -n $(($n - 2))|awk -F':' '{print $1}'| sed 's/ //' -} - - -get_module_list() -{ - local mod_list - local _if - for _if in $(_get_wireless_interfaces) - do - local mod=$(basename $(readlink -f /sys/class/net/${_if}/device/driver)) - local mod_dep=$(modinfo ${mod} | awk '{if ($1 ~ /depends/) print $2}') - mod_list=$(echo -e "${mod_list}\n${mod},${mod_dep}" | sort | uniq) - done - echo $mod_list | tr ',' ' ' -} - -save_module_list_uci() -{ - local list=$(get_module_list) - uci set ${GLOBAL}.modules="${list}" - uci commit ${PACKAGE} -} - -_unload_modules() -{ - local list=$(_get_uci_value ${GLOBAL}.modules) - local retries - retries=$(_get_uci_value ${GLOBAL}.modules_retries) || _exit 1 - _log "unload_modules ${list} (retries: ${retries})" - local i=0 - while [[ ${i} -lt ${retries} && "${list}" != "" ]] - do - i=$(($i+1)) - local mod - local first=0 - for mod in ${list} - do - if [ $first -eq 0 ]; then - list="" - first=1 - fi - rmmod ${mod} > /dev/null 2>&1 - if [ $? -ne 0 ]; then - list="$list $mod" - fi - done - done -} - - -_load_modules() -{ - local list=$(_get_uci_value ${GLOBAL}.modules) - local retries - retries=$(_get_uci_value ${GLOBAL}.modules_retries) || _exit 1 - _log "load_modules ${list} (retries: ${retries})" - local i=0 - while [[ ${i} -lt ${retries} && "${list}" != "" ]] - do - i=$(($i+1)) - local mod - local first=0 - for mod in ${list} - do - if [ $first -eq 0 ]; then - list="" - first=1 - fi - modprobe ${mod} > /dev/null 2>&1 - rc=$? - if [ $rc -ne 255 ]; then - list="$list $mod" - fi - done - done -} - -_create_cron_entries() -{ - local entries=$(uci show ${PACKAGE} 2> /dev/null | awk -F'.' '{print $2}' | grep -v '=' | grep -v '@global\[0\]' | uniq | sort) - local _entry - for entry in ${entries} - do - local status - status=$(_get_uci_value ${PACKAGE}.${entry}.enabled) || _exit 1 - if [ ${status} -eq 1 ] - then - _enable_wifi_schedule ${entry} - fi - done -} - -check_cron_status() -{ - local global_enabled - global_enabled=$(_get_uci_value ${GLOBAL}.enabled) || _exit 1 - _rm_cron_script "${SCRIPT}" - if [ ${global_enabled} -eq 1 ]; then - _create_cron_entries - fi -} - -disable_wifi() -{ - _rm_cron_script "${SCRIPT} recheck" - /sbin/wifi down - local unload_modules - unload_modules=$(_get_uci_value_raw ${GLOBAL}.unload_modules) || _exit 1 - if [[ "${unload_modules}" == "1" ]]; then - _unload_modules - fi -} - -soft_disable_wifi() -{ - local _disable_wifi=1 - local iwinfo=/usr/bin/iwinfo - if [ ! -e ${iwinfo} ]; then - _log "${iwinfo} not available, skipping" - return 1 - fi - - # check if no stations are associated - local _if - for _if in $(_get_wireless_interfaces) - do - output=$(${iwinfo} ${_if} assoclist) - if [[ "$output" != "No station connected" ]] - then - _disable_wifi=0 - local stations=$(echo ${output}| grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | tr '\n' ' ') - _log "Station(s) ${stations}associated on ${_if}" - fi - done - - if [ ${_disable_wifi} -eq 1 ]; then - _log "No stations associated, disable wifi." - disable_wifi - else - _log "Could not disable wifi due to associated stations, retrying..." - local recheck_interval=$(_get_uci_value ${GLOBAL}.recheck_interval) - _add_cron_script "*/${recheck_interval} * * * * ${SCRIPT} recheck" - fi -} - -enable_wifi() -{ - _rm_cron_script "${SCRIPT} recheck" - local unload_modules - unload_modules=$(_get_uci_value_raw ${GLOBAL}.unload_modules) || _exit 1 - if [[ "${unload_modules}" == "1" ]]; then - _load_modules - fi - /sbin/wifi -} - -usage() -{ - echo "" - echo "$0 cron|start|stop|forcestop|recheck|getmodules|savemodules|help" - echo "" - echo " UCI Config File: /etc/config/${PACKAGE}" - echo "" - echo " cron: Create cronjob entries." - echo " start: Start wifi." - echo " stop: Stop wifi gracefully, i.e. check if there are stations associated and if so keep retrying." - echo " forcestop: Stop wifi immediately." - echo " recheck: Recheck if wifi can be disabled now." - echo " getmodules: Returns a list of modules used by the wireless driver(s)" - echo " savemodules: Saves a list of automatic determined modules to UCI" - echo " help: This description." - echo "" -} - -############################################################################### -# MAIN -############################################################################### -LOGGING=$(_get_uci_value ${GLOBAL}.logging) || _exit 1 -_log ${SCRIPT} $1 $2 -lock ${LOCKFILE} - -case "$1" in - cron) check_cron_status ;; - start) enable_wifi ;; - forcestop) disable_wifi ;; - stop) soft_disable_wifi ;; - recheck) soft_disable_wifi ;; - getmodules) get_module_list ;; - savemodules) save_module_list_uci ;; - help|--help|-h|*) usage ;; -esac - -_exit 0 diff --git a/net/wireguard/Makefile b/net/wireguard/Makefile deleted file mode 100644 index 8dacfeb..0000000 --- a/net/wireguard/Makefile +++ /dev/null @@ -1,110 +0,0 @@ -# -# Copyright (C) 2016 Jason A. Donenfeld -# Copyright (C) 2016 Baptiste Jonglez -# Copyright (C) 2016-2017 Dan Luedtke -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=wireguard - -PKG_VERSION:=0.0.20170115 -PKG_RELEASE:=1 - -PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/ -PKG_MD5SUM:=7e5f9f4699a2d4ace90d0df5d81bf0f67205ee08c45b95e0acc379bedef5ffe8 - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_BUILD_DIR:=$(BUILD_DIR)/WireGuard-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 - -# Wireguard's makefile needs this to know where to build the kernel module -export KERNELDIR:=$(LINUX_DIR) - -include $(INCLUDE_DIR)/package.mk - -define Package/wireguard/Default - SECTION:=net - CATEGORY:=Network - URL:=https://www.wireguard.io - MAINTAINER:=Baptiste Jonglez , \ - Dan Luedtke -endef - -define Package/wireguard/Default/description - WireGuard is a novel VPN that runs inside the Linux Kernel and utilizes - state-of-the-art cryptography. It aims to be faster, simpler, leaner, and - more useful than IPSec, while avoiding the massive headache. It intends to - be considerably more performant than OpenVPN. WireGuard is designed as a - general purpose VPN for running on embedded interfaces and super computers - alike, fit for many different circumstances. - It runs over UDP. -endef - -define Package/wireguard - $(call Package/wireguard/Default) - TITLE:=Wireguard meta-package - DEPENDS:=+wireguard-tools +kmod-wireguard -endef - -include $(INCLUDE_DIR)/kernel-defaults.mk -include $(INCLUDE_DIR)/package-defaults.mk - -# Used by Build/Compile/Default -MAKE_PATH:=src/tools - -define Build/Compile - $(MAKE) $(KERNEL_MAKEOPTS) M="$(PKG_BUILD_DIR)/src" modules - $(call Build/Compile/Default) -endef - -define Package/wireguard/description - $(call Package/wireguard/Default/description) -endef - -define Package/wireguard-tools - $(call Package/wireguard/Default) - TITLE:=Wireguard userspace control program (wg) - DEPENDS:=+libmnl -endef - -define Package/wireguard-tools/description - $(call Package/wireguard/Default/description) - - This package provides the userspace control program for wireguard, `wg`, - and a netifd protocol helper. -endef - -define Package/wireguard-tools/install - $(INSTALL_DIR) $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/wg $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/lib/netifd/proto/ - $(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/ -endef - -define KernelPackage/wireguard - SECTION:=kernel - CATEGORY:=Kernel modules - SUBMENU:=Network Support - TITLE:=Wireguard kernel module - DEPENDS:=+IPV6:kmod-udptunnel6 +kmod-udptunnel4 +kmod-ipt-hashlimit - FILES:= $(PKG_BUILD_DIR)/src/wireguard.$(LINUX_KMOD_SUFFIX) - AUTOLOAD:=$(call AutoProbe,wireguard) -endef - -define KernelPackage/wireguard/description - $(call Package/wireguard/Default/description) - - This package provides the kernel module for wireguard. -endef - -$(eval $(call BuildPackage,wireguard)) -$(eval $(call BuildPackage,wireguard-tools)) -$(eval $(call KernelPackage,wireguard)) diff --git a/net/wireguard/files/wireguard.sh b/net/wireguard/files/wireguard.sh deleted file mode 100644 index 2eb3024..0000000 --- a/net/wireguard/files/wireguard.sh +++ /dev/null @@ -1,183 +0,0 @@ -#!/bin/sh -# Copyright 2016-2017 Dan Luedtke -# Licensed to the public under the Apache License 2.0. - - -WG=/usr/bin/wg -if [ ! -x $WG ]; then - logger -t "wireguard" "error: missing wireguard-tools (${WG})" - exit 0 -fi - - -[ -n "$INCLUDE_ONLY" ] || { - . /lib/functions.sh - . ../netifd-proto.sh - init_proto "$@" -} - - -proto_wireguard_init_config() { - proto_config_add_string "private_key" - proto_config_add_int "listen_port" - proto_config_add_int "mtu" - proto_config_add_string "preshared_key" - available=1 - no_proto_task=1 -} - - -proto_wireguard_setup_peer() { - local peer_config="$1" - - local public_key - local allowed_ips - local route_allowed_ips - local endpoint_host - local endpoint_port - local persistent_keepalive - - config_get public_key "${peer_config}" "public_key" - config_get allowed_ips "${peer_config}" "allowed_ips" - config_get_bool route_allowed_ips "${peer_config}" "route_allowed_ips" 0 - config_get endpoint_host "${peer_config}" "endpoint_host" - config_get endpoint_port "${peer_config}" "endpoint_port" - config_get persistent_keepalive "${peer_config}" "persistent_keepalive" - - # peer configuration - echo "[Peer]" >> "${wg_cfg}" - echo "PublicKey=${public_key}" >> "${wg_cfg}" - for allowed_ip in $allowed_ips; do - echo "AllowedIPs=${allowed_ip}" >> "${wg_cfg}" - done - if [ "${endpoint_host}" ]; then - case "${endpoint_host}" in - *:*) - endpoint="[${endpoint_host}]" - ;; - *) - endpoint="${endpoint_host}" - ;; - esac - if [ "${endpoint_port}" ]; then - endpoint="${endpoint}:${endpoint_port}" - else - endpoint="${endpoint}:51820" - fi - echo "Endpoint=${endpoint}" >> "${wg_cfg}" - fi - if [ "${persistent_keepalive}" ]; then - echo "PersistentKeepalive=${persistent_keepalive}" >> "${wg_cfg}" - fi - - # add routes for allowed ips - if [ ${route_allowed_ips} -ne 0 ]; then - for allowed_ip in ${allowed_ips}; do - case "${allowed_ip}" in - *:*/*) - proto_add_ipv6_route "${allowed_ip%%/*}" "${allowed_ip##*/}" - ;; - */*) - proto_add_ipv4_route "${allowed_ip%%/*}" "${allowed_ip##*/}" - ;; - esac - done - fi -} - - -proto_wireguard_setup() { - local config="$1" - local wg_dir="/tmp/wireguard" - local wg_cfg="${wg_dir}/${config}" - - local private_key - local listen_port - local mtu - local preshared_key - - # load configuration - config_load network - config_get private_key "${config}" "private_key" - config_get listen_port "${config}" "listen_port" - config_get addresses "${config}" "addresses" - config_get mtu "${config}" "mtu" - config_get preshared_key "${config}" "preshared_key" - - # create interface - ip link del dev "${config}" 2>/dev/null - ip link add dev "${config}" type wireguard - - if [ "${mtu}" ]; then - ip link set mtu "${mtu}" dev "${config}" - fi - - proto_init_update "${config}" 1 - - # generate configuration file - umask 077 - mkdir -p "${wg_dir}" - echo "[Interface]" > "${wg_cfg}" - echo "PrivateKey=${private_key}" >> "${wg_cfg}" - if [ "${listen_port}" ]; then - echo "ListenPort=${listen_port}" >> "${wg_cfg}" - fi - if [ "${preshared_key}" ]; then - echo "PresharedKey=${preshared_key}" >> "${wg_cfg}" - fi - config_foreach proto_wireguard_setup_peer "wireguard_${config}" - - # apply configuration file - ${WG} setconf ${config} "${wg_cfg}" - WG_RETURN=$? - - # delete configuration file - rm -f "${wg_cfg}" - - # check status - if [ ${WG_RETURN} -ne 0 ]; then - sleep 5 - proto_setup_failed "${config}" - exit 1 - fi - - # add ip addresses - for address in ${addresses}; do - case "${address}" in - *:*/*) - proto_add_ipv6_address "${address%%/*}" "${address##*/}" - ;; - *.*/*) - proto_add_ipv4_address "${address%%/*}" "${address##*/}" - ;; - *:*) - proto_add_ipv6_address "${address%%/*}" "128" - ;; - *.*) - proto_add_ipv4_address "${address%%/*}" "32" - ;; - esac - done - - # endpoint dependency - wg show "${config}" endpoints | \ - sed -E 's/\[?([0-9.:a-f]+)\]?:([0-9]+)/\1 \2/' | \ - while IFS=$'\t ' read -r key address port; do - [ -n "${port}" ] || continue - echo "adding host depedency for ${address} at ${config}" - proto_add_host_dependency "${config}" "${address}" - done - - proto_send_update "${config}" -} - - -proto_wireguard_teardown() { - local config="$1" - ip link del dev "${config}" >/dev/null 2>&1 -} - - -[ -n "$INCLUDE_ONLY" ] || { - add_protocol wireguard -} diff --git a/net/wshaper/Makefile b/net/wshaper/Makefile deleted file mode 100644 index d897464..0000000 --- a/net/wshaper/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2007-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wshaper -PKG_VERSION:=1.1a -PKG_RELEASE:=1 - -PKG_MAINTAINER:=Jo-Philipp Wich - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk - -define Package/wshaper - SECTION:=net - CATEGORY:=Network - DEPENDS:=+kmod-sched +tc - TITLE:=wshaper - URL:=http://lartc.org/wondershaper/ - PKGARCH:=all -endef - -define Package/wshaper/description - A script to do traffing shaping with the HTB algorithm. - Wshaper attempts to: - * Maintain low latency for interfactive traffic at all times - * Allow 'surfing' at reasonable speeds while up or downloading - * Make sure uploads don't harm downloads, and the other way around -endef - -define Build/Prepare -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/wshaper/install - $(INSTALL_DIR) $(1)/usr/sbin/ $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/iface - $(INSTALL_BIN) ./files/wshaper.htb $(1)/usr/sbin/ - $(INSTALL_BIN) ./files/wshaper.init $(1)/etc/init.d/wshaper - $(INSTALL_BIN) ./files/wshaper.iface $(1)/etc/hotplug.d/iface/10-wshaper - $(INSTALL_DATA) ./files/wshaper.config $(1)/etc/config/wshaper -endef - -define Package/wshaper/conffiles -/etc/config/wshaper -endef - -$(eval $(call BuildPackage,wshaper)) diff --git a/net/wshaper/files/wshaper.config b/net/wshaper/files/wshaper.config deleted file mode 100644 index ed857c5..0000000 --- a/net/wshaper/files/wshaper.config +++ /dev/null @@ -1,4 +0,0 @@ -config 'wshaper' 'settings' - option 'network' 'wan' - option 'downlink' '2000' - option 'uplink' '240' diff --git a/net/wshaper/files/wshaper.htb b/net/wshaper/files/wshaper.htb deleted file mode 100755 index 4b63eee..0000000 --- a/net/wshaper/files/wshaper.htb +++ /dev/null @@ -1,166 +0,0 @@ -#!/bin/sh -# Wonder Shaper -# please read the README before filling out these values -# -# Set the following values to somewhat less than your actual download -# and uplink speed. In kilobits. Also set the device that is to be shaped. - -# All config needs to be done in /etc/config/wshaper - -. /lib/functions.sh -. /lib/functions/network.sh - -config_load wshaper -for s in downlink uplink network nopriohostdst nopriohostsrc noprioportdst noprioportsrc; do - config_get $s settings $s -done - -if ! network_get_device device "$network"; then - logger -t wondershaper "Error: Could not find the device for network $network, aborting." - exit 1 -fi - -[ -z "$downlink" ] && logger -t wondershaper "Error: Downlink speed not set, aborting." && exit 1 -[ -z "$uplink" ] && logger -t wondershaper "Error: Uplink speed not set, aborting." && exit 1 - -MODULES='sch_ingress sch_sfq sch_htb cls_u32 act_police' -DOWNLINK="$downlink" -UPLINK="$uplink" -DEV="$device" - -# low priority OUTGOING traffic - you can leave this blank if you want -# low priority source netmasks -NOPRIOHOSTSRC="$nopriohostsrc" - -# low priority destination netmasks -NOPRIOHOSTDST="$nopriohostdst" - -# low priority source ports -NOPRIOPORTSRC="$noprioportsrc" - -# low priority destination ports -NOPRIOPORTDST="$noprioportdst" - -if [ "$1" = "status" ] -then - tc -s qdisc ls dev $DEV - tc -s class ls dev $DEV - exit -fi - - -# clean existing down- and uplink qdiscs, hide errors -tc qdisc del dev $DEV root 2> /dev/null > /dev/null -tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null - -if [ "$1" = "stop" ] -then - for i in $MODULES ; do - rmmod $i - done - exit -fi - -for i in $MODULES ; do - insmod $i -done - -###### uplink - -# install root HTB, point default traffic to 1:20: - -tc qdisc add dev $DEV root handle 1: htb default 20 - -# shape everything at $UPLINK speed - this prevents huge queues in your -# DSL modem which destroy latency: - -tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst 6k - -# high prio class 1:10: - -tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \ - burst 6k prio 1 - -# bulk & default class 1:20 - gets slightly less traffic, -# and a lower priority: - -tc class add dev $DEV parent 1:1 classid 1:20 htb rate $((9*$UPLINK/10))kbit \ - burst 6k prio 2 - -tc class add dev $DEV parent 1:1 classid 1:30 htb rate $((8*$UPLINK/10))kbit \ - burst 6k prio 2 - -# all get Stochastic Fairness: -tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 -tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 -tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10 - -# TOS Minimum Delay (ssh, NOT scp) in 1:10: - -tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ - match ip tos 0x10 0xff flowid 1:10 - -# ICMP (ip protocol 1) in the interactive class 1:10 so we -# can do measurements & impress our friends: -tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ - match ip protocol 1 0xff flowid 1:10 - -# To speed up downloads while an upload is going on, put ACK packets in -# the interactive class: - -tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \ - match ip protocol 6 0xff \ - match u8 0x05 0x0f at 0 \ - match u16 0x0000 0xffc0 at 2 \ - match u8 0x10 0xff at 33 \ - flowid 1:10 - -# rest is 'non-interactive' ie 'bulk' and ends up in 1:20 - -# some traffic however suffers a worse fate -for a in $NOPRIOPORTDST -do - tc filter add dev $DEV parent 1: protocol ip prio 14 u32 \ - match ip dport $a 0xffff flowid 1:30 -done - -for a in $NOPRIOPORTSRC -do - tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \ - match ip sport $a 0xffff flowid 1:30 -done - -for a in $NOPRIOHOSTSRC -do - tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \ - match ip src $a flowid 1:30 -done - -for a in $NOPRIOHOSTDST -do - tc filter add dev $DEV parent 1: protocol ip prio 17 u32 \ - match ip dst $a flowid 1:30 -done - -# rest is 'non-interactive' ie 'bulk' and ends up in 1:20 - -tc filter add dev $DEV parent 1: protocol ip prio 18 u32 \ - match ip dst 0.0.0.0/0 flowid 1:20 - - -########## downlink ############# -# slow downloads down to somewhat less than the real speed to prevent -# queuing at our ISP. Tune to see how high you can set it. -# ISPs tend to have *huge* queues to make sure big downloads are fast -# -# attach ingress policer: - -tc qdisc add dev $DEV handle ffff: ingress - -# filter *everything* to it (0.0.0.0/0), drop everything that's -# coming in too fast: - -tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ - 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1 - -logger -t wondershaper "Wondershaper was started on device $device." diff --git a/net/wshaper/files/wshaper.iface b/net/wshaper/files/wshaper.iface deleted file mode 100644 index 2964005..0000000 --- a/net/wshaper/files/wshaper.iface +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -[ "$ACTION" = ifup ] && /etc/init.d/wshaper enabled && /etc/init.d/wshaper start || exit 0 diff --git a/net/wshaper/files/wshaper.init b/net/wshaper/files/wshaper.init deleted file mode 100644 index 638cef2..0000000 --- a/net/wshaper/files/wshaper.init +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=45 -start() { - wshaper.htb -} - -stop() { - wshaper.htb stop -} diff --git a/net/xinetd/Makefile b/net/xinetd/Makefile deleted file mode 100644 index c1586b7..0000000 --- a/net/xinetd/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=xinetd -PKG_VERSION:=2.3.15 -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.xinetd.org -PKG_MD5SUM:=77358478fd58efa6366accae99b8b04c -PKG_LICENSE:=xinetd -PKG_LICENSE_FILES:=COPYRIGHT - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/xinetd - SECTION:=net - CATEGORY:=Network - TITLE:=A powerful and secure super-server - URL:=http://www.xinetd.org/ - PKG_MAINTAINER:=Jonathan McCrohan -endef - -define Package/xinetd/description - xinetd has access control mechanisms, extensive logging capabilities, - the ability to make services available based on time, can place limits - on the number of servers that can be started, and has deployable - defence mechanisms to protect against port scanners, among other - things. -endef - -define Package/xinetd/conffiles -/etc/xinetd.conf -endef - -TARGET_CFLAGS += -DNO_RPC -TARGET_CPPFLAGS += -DHAVE_RLIM_T - -CONFIGURE_ARGS += \ - --without-libwrap \ - --with-loadavg - -CONFIGURE_VARS += \ - ac_cv_header_rpc_pmap_clnt_h=no \ - ac_cv_header_rpc_rpc_h=no \ - ac_cv_header_rpc_rpcent_h=no - -define Package/xinetd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/xinetd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/xinetd.conf $(1)/etc/xinetd.conf - $(INSTALL_DIR) $(1)/etc/xinetd.d - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/xinetd.init $(1)/etc/init.d/xinetd -endef - -$(eval $(call BuildPackage,xinetd)) diff --git a/net/xinetd/files/xinetd.conf b/net/xinetd/files/xinetd.conf deleted file mode 100644 index bd473ed..0000000 --- a/net/xinetd/files/xinetd.conf +++ /dev/null @@ -1,6 +0,0 @@ -defaults -{ - -} - -includedir /etc/xinetd.d diff --git a/net/xinetd/files/xinetd.init b/net/xinetd/files/xinetd.init deleted file mode 100644 index 1437f58..0000000 --- a/net/xinetd/files/xinetd.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=50 - -SERVICE_USE_PID=1 - -start() { - service_start /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -} - -stop() { - service_stop /usr/sbin/xinetd -} - diff --git a/net/xinetd/patches/001-ar.patch b/net/xinetd/patches/001-ar.patch deleted file mode 100644 index 4d961ba..0000000 --- a/net/xinetd/patches/001-ar.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- a/libs/src/misc/Makefile.in -+++ b/libs/src/misc/Makefile.in -@@ -62,7 +62,7 @@ libopt: clean - - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - install: $(LIBNAME) ---- a/libs/src/portable/Makefile.in -+++ b/libs/src/portable/Makefile.in -@@ -57,7 +57,7 @@ libopt: clean - - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - install: $(LIBNAME) ---- a/libs/src/pset/Makefile.in -+++ b/libs/src/pset/Makefile.in -@@ -53,7 +53,7 @@ libopt: clean - mv $(LIBNAME) $(LIBDIR)/optimized - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - install: $(LIBNAME) ---- a/libs/src/sio/Makefile.in -+++ b/libs/src/sio/Makefile.in -@@ -52,7 +52,7 @@ libopt: clean - $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - install: $(LIBNAME) ---- a/libs/src/str/Makefile.in -+++ b/libs/src/str/Makefile.in -@@ -63,7 +63,7 @@ libopt: clean - $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)-O - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - LINT_IGNORE=possible pointer alignment|RCSid unused ---- a/libs/src/xlog/Makefile.in -+++ b/libs/src/xlog/Makefile.in -@@ -58,7 +58,7 @@ libopt: clean - $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized - - $(LIBNAME): $(OBJECTS) -- ar r $@ $? -+ $(AR) r $@ $? - $(RANLIB) $@ - - install: $(LIBNAME) diff --git a/net/xinetd/patches/002-destdir.patch b/net/xinetd/patches/002-destdir.patch deleted file mode 100644 index 89075c8..0000000 --- a/net/xinetd/patches/002-destdir.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -75,15 +75,15 @@ dlibxlog: dlibsio dlibstr - - install: build - for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \ -- test -d $$i || mkdir -p $$i ; done -- $(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR) -- $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR) -- $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR) -- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5 -- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8 -- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8 -- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8 -- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8 -+ test -d $(DESTDIR)$$i || mkdir -p $(DESTDIR)$$i ; done -+ $(INSTALL_CMD) -m 755 xinetd/xinetd $(DESTDIR)$(DAEMONDIR) -+ $(INSTALL_CMD) -m 755 xinetd/itox $(DESTDIR)$(DAEMONDIR) -+ $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DESTDIR)$(DAEMONDIR) -+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5 -+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(DESTDIR)$(MANDIR)/man8/xinetd.log.8 -+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(DESTDIR)$(MANDIR)/man8/xinetd.8 -+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(DESTDIR)$(MANDIR)/man8/itox.8 -+ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(DESTDIR)$(MANDIR)/man8/xconv.pl.8 - @echo "You must put your xinetd.conf in /etc/xinetd.conf" - @echo "There is a sample config file in xinetd/sample.conf and you can" - @echo "use xconv.pl to convert your old inetd.conf file to an xinetd format" diff --git a/net/xinetd/patches/003-rpc_fix.patch b/net/xinetd/patches/003-rpc_fix.patch deleted file mode 100644 index 11f47e7..0000000 --- a/net/xinetd/patches/003-rpc_fix.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/xinetd/confparse.c -+++ b/xinetd/confparse.c -@@ -745,7 +745,7 @@ static status_e check_entry( struct serv - } - } - --/* #ifndef NO_RPC */ -+#ifndef NO_RPC - #if defined(HAVE_RPC_RPCENT_H) || defined(HAVE_NETDB_H) - if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) ) - { -@@ -759,6 +759,7 @@ static status_e check_entry( struct serv - SC_RPCDATA( scp )->rd_program_number = rep->r_number ; - } - else -+#endif - #endif /* ! NO_RPC */ - { - if ( !SC_IS_UNLISTED( scp ) ) diff --git a/net/xinetd/patches/004-ident-bind.patch b/net/xinetd/patches/004-ident-bind.patch deleted file mode 100644 index 0da0148..0000000 --- a/net/xinetd/patches/004-ident-bind.patch +++ /dev/null @@ -1,42 +0,0 @@ -xinetd: socket bind: Invalid argument (errno = 22) when using USERID on ipv6 - -Use right size of addresses in bind() call. Also use getpeername addresses when -connecting to ident service to prevent address family mismatch between socket(), -bind() and connect() calls. - -Author: Jan Safranek -Reviewed-By: Adam Tkac - -#diff -up xinetd-2.3.14/xinetd/ident.c.orig xinetd-2.3.14/xinetd/ident.c ---- a/xinetd/ident.c -+++ b/xinetd/ident.c -@@ -97,7 +97,13 @@ idresult_e log_remote_user( const struct - } - - CLEAR( sin_contact ); -- sin_remote = *CONN_XADDRESS( SERVER_CONNECTION( serp ) ) ; -+ -+ sin_len = sizeof( sin_remote ); -+ if ( getpeername( SERVER_FD( serp ), &sin_remote.sa, &sin_len ) == -1 ) -+ { -+ msg( LOG_ERR, func, "(%d) getpeername: %m", getpid() ) ; -+ return( IDR_ERROR ) ; -+ } - sin_contact = sin_remote; - memcpy( &sin_bind, &sin_local, sizeof(sin_bind) ) ; - local_port = 0; -@@ -127,7 +133,13 @@ idresult_e log_remote_user( const struct - msg( LOG_ERR, func, "socket creation: %m" ) ; - return( IDR_ERROR ) ; - } -- if ( bind(sd, &sin_bind.sa, sizeof(sin_bind.sa)) == -1 ) -+ -+ if ( sin_bind.sa.sa_family == AF_INET ) -+ sin_len = sizeof( sin_bind.sa_in ) ; -+ else -+ sin_len = sizeof( sin_bind.sa_in6 ) ; -+ -+ if ( bind(sd, &sin_bind.sa, sin_len) == -1 ) - { - msg( LOG_ERR, func, "socket bind: %m" ) ; - (void) Sclose( sd ) ; diff --git a/net/xl2tpd/Makefile b/net/xl2tpd/Makefile deleted file mode 100644 index 50be12e..0000000 --- a/net/xl2tpd/Makefile +++ /dev/null @@ -1,90 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=xl2tpd -PKG_VERSION:=devel-20151125 -PKG_RELEASE:=3 -PKG_MAINTAINER:=Yousong Zhou -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=LICENSE - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/xelerance/xl2tpd.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=e2065bf0fc22ba33001ad503c01bba01648024a8 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/xl2tpd - SECTION:=net - CATEGORY:=Network - TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon - URL:=http://www.xelerance.com/software/xl2tpd/ - SUBMENU:=VPN - DEPENDS:=+ppp-mod-pppol2tp +resolveip -endef - -define Package/xl2tpd/description -l2tpd is the open source implementation of the L2TP tunneling protocol (RFC2661). -It does implement both LAC and LNS role in a L2TP networking architecture. The -main goal of this protocol is to tunnel PPP frame trough an IP network. -endef - -# Use optimization options from OpenWrt build system -MAKE_FLAGS += OFLAGS="" - -ifneq (0,0) - # debugging options from Makefile of xl2tpd package - EXTRA_CFLAGS += \ - -DDEBUG_ZLB \ - -DDEBUG_HELLO \ - -DDEBUG_CLOSE \ - -DDEBUG_FLOW \ - -DDEBUG_FILE \ - -DDEBUG_AAA \ - -DDEBUG_PAYLOAD \ - -DDEBUG_CONTROL \ - -DDEBUG_PPPD \ - -DDEBUG_HIDDEN \ - -DDEBUG_ENTROPY \ - -DDEBUG_CONTROL_XMIT \ - -DDEBUG_MAGIC \ - -DDEBUG_FLOW_MORE \ - -DDEBUG_AUTH -endif - -define Package/xl2tpd/conffiles -/etc/xl2tpd/xl2tpd.conf -/etc/xl2tpd/xl2tp-secrets -/etc/ppp/options.xl2tpd -endef - -define Package/xl2tpd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/sbin/xl2tpd $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/sbin/xl2tpd-control $(1)/usr/sbin/ - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/xl2tpd.init $(1)/etc/init.d/xl2tpd - - $(INSTALL_DIR) $(1)/etc/xl2tpd - $(INSTALL_DATA) ./files/xl2tpd.conf $(1)/etc/xl2tpd/ - $(INSTALL_CONF) ./files/xl2tp-secrets $(1)/etc/xl2tpd/ - - $(INSTALL_DIR) $(1)/etc/ppp - $(INSTALL_DATA) ./files/options.xl2tpd $(1)/etc/ppp/ - - $(INSTALL_DIR) $(1)/lib/netifd/proto - $(INSTALL_BIN) ./files/l2tp.sh $(1)/lib/netifd/proto -endef - -$(eval $(call BuildPackage,xl2tpd)) diff --git a/net/xl2tpd/README b/net/xl2tpd/README deleted file mode 100644 index aadc26e..0000000 --- a/net/xl2tpd/README +++ /dev/null @@ -1,23 +0,0 @@ -OpenWRT Package for xl2tpd - -xl2tpd is a development from the original l2tpd package originally written by -Mark Spencer, subsequently forked by Scott Balmos and David Stipp, inherited -by Jeff McAdams, modified substantially by Jacco de Leeuw and then forked -again by Xelerance (after it was abandoned by l2tpd.org). - -Rationale for inclusion in OpenWRT: - -l2tpd has some serious alignment problems on RISC platforms. It also runs -purely in userspace. - -Some of the features added in this fork include: - -1. IPSec SA reference tracking inconjunction with openswan's IPSec transport - mode, which adds support for multiple clients behind the same NAT router - and multiple clients on the same internal IP behind different NAT routers. - -2. Support for the pppol2tp kernel mode L2TP. - -3. Alignment and endian problems resolved. - -hcg diff --git a/net/xl2tpd/files/l2tp.sh b/net/xl2tpd/files/l2tp.sh deleted file mode 100644 index 38c8025..0000000 --- a/net/xl2tpd/files/l2tp.sh +++ /dev/null @@ -1,127 +0,0 @@ -#!/bin/sh - -[ -x /usr/sbin/xl2tpd ] || exit 0 - -[ -n "$INCLUDE_ONLY" ] || { - . /lib/functions.sh - . ../netifd-proto.sh - init_proto "$@" -} - -proto_l2tp_init_config() { - proto_config_add_string "username" - proto_config_add_string "password" - proto_config_add_string "keepalive" - proto_config_add_string "pppd_options" - proto_config_add_boolean "ipv6" - proto_config_add_int "demand" - proto_config_add_int "mtu" - proto_config_add_int "checkup_interval" - proto_config_add_string "server" - available=1 - no_device=1 - no_proto_task=1 - teardown_on_l3_link_down=1 -} - -proto_l2tp_setup() { - local interface="$1" - local optfile="/tmp/l2tp/options.${interface}" - local ip serv_addr server host - - json_get_var server server - host="${server%:*}" - for ip in $(resolveip -t 5 "$host"); do - ( proto_add_host_dependency "$interface" "$ip" ) - serv_addr=1 - done - [ -n "$serv_addr" ] || { - echo "Could not resolve server address" >&2 - sleep 5 - proto_setup_failed "$interface" - exit 1 - } - - # Start and wait for xl2tpd - if [ ! -p /var/run/xl2tpd/l2tp-control -o -z "$(pidof xl2tpd)" ]; then - /etc/init.d/xl2tpd restart - - local wait_timeout=0 - while [ ! -p /var/run/xl2tpd/l2tp-control ]; do - wait_timeout=$(($wait_timeout + 1)) - [ "$wait_timeout" -gt 5 ] && { - echo "Cannot find xl2tpd control file." >&2 - proto_setup_failed "$interface" - exit 1 - } - sleep 1 - done - fi - - local ipv6 demand keepalive username password pppd_options mtu - json_get_vars ipv6 demand keepalive username password pppd_options mtu - [ "$ipv6" = 1 ] || ipv6="" - if [ "${demand:-0}" -gt 0 ]; then - demand="precompiled-active-filter /etc/ppp/filter demand idle $demand" - else - demand="persist" - fi - - local interval="${keepalive##*[, ]}" - [ "$interval" != "$keepalive" ] || interval=5 - - keepalive="${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}}" - username="${username:+user \"$username\" password \"$password\"}" - ipv6="${ipv6:++ipv6}" - mtu="${mtu:+mtu $mtu mru $mtu}" - - mkdir -p /tmp/l2tp - cat <"$optfile" -usepeerdns -nodefaultroute -ipparam "$interface" -ifname "l2tp-$interface" -ip-up-script /lib/netifd/ppp-up -ipv6-up-script /lib/netifd/ppp-up -ip-down-script /lib/netifd/ppp-down -ipv6-down-script /lib/netifd/ppp-down -# Don't wait for LCP term responses; exit immediately when killed. -lcp-max-terminate 0 -$keepalive -$username -$ipv6 -$mtu -$pppd_options -EOF - - xl2tpd-control add l2tp-${interface} pppoptfile=${optfile} lns=${server} || { - echo "xl2tpd-control: Add l2tp-$interface failed" >&2 - proto_setup_failed "$interface" - exit 1 - } - xl2tpd-control connect l2tp-${interface} || { - echo "xl2tpd-control: Connect l2tp-$interface failed" >&2 - proto_setup_failed "$interface" - exit 1 - } -} - -proto_l2tp_teardown() { - local interface="$1" - local optfile="/tmp/l2tp/options.${interface}" - - rm -f ${optfile} - if [ -p /var/run/xl2tpd/l2tp-control ]; then - xl2tpd-control remove l2tp-${interface} || { - echo "xl2tpd-control: Remove l2tp-$interface failed" >&2 - } - fi - # Wait for interface to go down - while [ -d /sys/class/net/l2tp-${interface} ]; do - sleep 1 - done -} - -[ -n "$INCLUDE_ONLY" ] || { - add_protocol l2tp -} diff --git a/net/xl2tpd/files/options.xl2tpd b/net/xl2tpd/files/options.xl2tpd deleted file mode 100644 index f0fc4f4..0000000 --- a/net/xl2tpd/files/options.xl2tpd +++ /dev/null @@ -1,13 +0,0 @@ -# - -lock -noauth -debug -dump -logfd 2 -logfile /var/log/xl2tpd.log -noccp -novj -novjccomp -nopcomp -noaccomp diff --git a/net/xl2tpd/files/xl2tp-secrets b/net/xl2tpd/files/xl2tp-secrets deleted file mode 100644 index 0fb513f..0000000 --- a/net/xl2tpd/files/xl2tp-secrets +++ /dev/null @@ -1,5 +0,0 @@ -# Secrets for authenticating l2tp tunnels -# us them secret -# * marko blah2 -# zeus marko blah -# * * interop diff --git a/net/xl2tpd/files/xl2tpd.conf b/net/xl2tpd/files/xl2tpd.conf deleted file mode 100644 index 2423ff6..0000000 --- a/net/xl2tpd/files/xl2tpd.conf +++ /dev/null @@ -1,23 +0,0 @@ -[global] -port = 1701 -auth file = /etc/xl2tpd/xl2tp-secrets -access control = no - -;[lns default] -;exclusive = yes -;ip range = 192.168.254.202-192.168.254.210 -;lac = 10.0.1.2 -;hidden bit = no -;local ip = 192.168.254.200 -;length bit = yes -;refuse authentication = yes -;name = VersaLink -;ppp debug = yes -;pppoptfile = /etc/ppp/options.xl2tpd - -;[lac left] -;lns = 10.0.1.2 -;refuse authentication = yes -;name = VersaLink -;ppp debug = yes -;pppoptfile = /etc/ppp/options.xl2tpd diff --git a/net/xl2tpd/files/xl2tpd.conf.sample b/net/xl2tpd/files/xl2tpd.conf.sample deleted file mode 100644 index 477afa5..0000000 --- a/net/xl2tpd/files/xl2tpd.conf.sample +++ /dev/null @@ -1,73 +0,0 @@ -; -; Sample l2tpd configuration file -; -; This example file should give you some idea of how the options for l2tpd -; should work. The best place to look for a list of all options is in -; the source code itself, until I have the time to write better documetation :) -; Specifically, the file "file.c" contains a list of commands at the end. -; -; You most definitely don't have to spell out everything as it is done here -; -; [global] ; Global parameters: -; port = 1701 ; * Bind to port 1701 -; auth file = /etc/xl2tpd/xl2tp-secrets ; * Where our challenge secrets are -; access control = yes ; * Refuse connections without IP match -; rand source = dev ; Source for entropy for random -; ; numbers, options are: -; ; dev - reads of /dev/urandom -; ; sys - uses rand() -; ; egd - reads from egd socket -; ; egd is not yet implemented -; -; [lns default] ; Our fallthrough LNS definition -; exclusive = no ; * Only permit one tunnel per host -; ip range = 192.168.0.1-192.168.0.20 ; * Allocate from this IP range -; no ip range = 192.168.0.3-192.168.0.9 ; * Except these hosts -; ip range = 192.168.0.5 ; * But this one is okay -; ip range = lac1-lac2 ; * And anything from lac1 to lac2's IP -; lac = 192.168.1.4 - 192.168.1.8 ; * These can connect as LAC's -; no lac = untrusted.marko.net ; * This guy can't connect -; hidden bit = no ; * Use hidden AVP's? -; local ip = 192.168.1.2 ; * Our local IP to use -; length bit = yes ; * Use length bit in payload? -; require chap = yes ; * Require CHAP auth. by peer -; refuse pap = yes ; * Refuse PAP authentication -; refuse chap = no ; * Refuse CHAP authentication -; refuse authentication = no ; * Refuse authentication altogether -; require authentication = yes ; * Require peer to authenticate -; unix authentication = no ; * Use /etc/passwd for auth. -; name = myhostname ; * Report this as our hostname -; ppp debug = no ; * Turn on PPP debugging -; pppoptfile = /etc/ppp/options.xl2tpd.lns ; * ppp options file -; call rws = 10 ; * RWS for call (-1 is valid) -; tunnel rws = 4 ; * RWS for tunnel (must be > 0) -; flow bit = yes ; * Include sequence numbers -; challenge = yes ; * Challenge authenticate peer ; -; -; [lac marko] ; Example VPN LAC definition -; lns = lns.marko.net ; * Who is our LNS? -; lns = lns2.marko.net ; * A backup LNS (not yet used) -; redial = yes ; * Redial if disconnected? -; redial timeout = 15 ; * Wait n seconds between redials -; max redials = 5 ; * Give up after n consecutive failures -; hidden bit = yes ; * User hidden AVP's? -; local ip = 192.168.1.1 ; * Force peer to use this IP for us -; remote ip = 192.168.1.2 ; * Force peer to use this as their IP -; length bit = no ; * Use length bit in payload? -; require pap = no ; * Require PAP auth. by peer -; require chap = yes ; * Require CHAP auth. by peer -; refuse pap = yes ; * Refuse PAP authentication -; refuse chap = no ; * Refuse CHAP authentication -; refuse authentication = no ; * Refuse authentication altogether -; require authentication = yes ; * Require peer to authenticate -; name = marko ; * Report this as our hostname -; ppp debug = no ; * Turn on PPP debugging -; pppoptfile = /etc/ppp/options.xl2tpd.marko ; * ppp options file for this lac -; call rws = 10 ; * RWS for call (-1 is valid) -; tunnel rws = 4 ; * RWS for tunnel (must be > 0) -; flow bit = yes ; * Include sequence numbers -; challenge = yes ; * Challenge authenticate peer -; -; [lac cisco] ; Another quick LAC -; lns = cisco.marko.net ; * Required, but can take from default -; require authentication = yes diff --git a/net/xl2tpd/files/xl2tpd.init b/net/xl2tpd/files/xl2tpd.init deleted file mode 100644 index 7d2e9ea..0000000 --- a/net/xl2tpd/files/xl2tpd.init +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2015 OpenWrt.org - -START=60 -USE_PROCD=1 - -BIN=xl2tpd -RUN_D="/var/run/xl2tpd" -PID_F="/var/run/xl2tpd.pid" - -start_service() { - rm -rf "$RUN_D" - mkdir -p "$RUN_D" - - procd_open_instance - procd_set_param command $BIN -D -l -p "$PID_F" - procd_set_param respawn - procd_close_instance -} - -stop_service() { - rm -rf "$RUN_D" - rm -rf "$PID_F" -} diff --git a/net/xl2tpd/patches/100-makefile_opt_flags.patch b/net/xl2tpd/patches/100-makefile_opt_flags.patch deleted file mode 100644 index f945d94..0000000 --- a/net/xl2tpd/patches/100-makefile_opt_flags.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -97,7 +97,8 @@ OSFLAGS+= -DUSE_KERNEL - - IPFLAGS?= -DIP_ALLOCATION - --CFLAGS+= $(DFLAGS) -Os -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS) -+OFLAGS=-Os -+CFLAGS+= $(DFLAGS) $(OFLAGS) -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS) - HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h - OBJS=xl2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o - SRCS=${OBJS:.o=.c} ${HDRS} diff --git a/net/xl2tpd/patches/110-makefile_dont_build_pfc.patch b/net/xl2tpd/patches/110-makefile_dont_build_pfc.patch deleted file mode 100644 index f76364f..0000000 --- a/net/xl2tpd/patches/110-makefile_dont_build_pfc.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -113,10 +113,10 @@ BINDIR?=$(DESTDIR)${PREFIX}/bin - MANDIR?=$(DESTDIR)${PREFIX}/share/man - - --all: $(EXEC) pfc $(CONTROL_EXEC) -+all: $(EXEC) $(CONTROL_EXEC) - - clean: -- rm -f $(OBJS) $(EXEC) pfc.o pfc $(CONTROL_EXEC) -+ rm -f $(OBJS) $(EXEC) $(CONTROL_EXEC) - - $(EXEC): $(OBJS) $(HDRS) - $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS) -@@ -124,14 +124,10 @@ $(EXEC): $(OBJS) $(HDRS) - $(CONTROL_EXEC): $(CONTROL_SRCS) - $(CC) $(CFLAGS) $(LDFLAGS) $(CONTROL_SRCS) -o $@ - --pfc: -- $(CC) $(CFLAGS) -c contrib/pfc.c -- $(CC) $(LDFLAGS) -o pfc pfc.o -lpcap $(LDLIBS) -- - romfs: - $(ROMFSINST) /bin/$(EXEC) - --install: ${EXEC} pfc ${CONTROL_EXEC} -+install: ${EXEC} ${CONTROL_EXEC} - install -d -m 0755 ${SBINDIR} - install -m 0755 $(EXEC) ${SBINDIR}/$(EXEC) - install -d -m 0755 ${MANDIR}/man5 -@@ -139,11 +135,6 @@ install: ${EXEC} pfc ${CONTROL_EXEC} - install -m 0644 doc/xl2tpd.8 ${MANDIR}/man8/ - install -m 0644 doc/xl2tpd.conf.5 doc/l2tp-secrets.5 \ - ${MANDIR}/man5/ -- # pfc -- install -d -m 0755 ${BINDIR} -- install -m 0755 pfc ${BINDIR}/pfc -- install -d -m 0755 ${MANDIR}/man1 -- install -m 0644 contrib/pfc.1 ${MANDIR}/man1/ - # control exec - install -d -m 0755 ${SBINDIR} - install -m 0755 $(CONTROL_EXEC) ${SBINDIR}/$(CONTROL_EXEC) diff --git a/net/xl2tpd/patches/120-no-bsd-signal-in-musl.patch b/net/xl2tpd/patches/120-no-bsd-signal-in-musl.patch deleted file mode 100644 index c8c4a7d..0000000 --- a/net/xl2tpd/patches/120-no-bsd-signal-in-musl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/xl2tpd.c -+++ b/xl2tpd.c -@@ -30,7 +30,7 @@ - #include - #include - #include --#if (__GLIBC__ < 2) -+#if defined (__GLIBC__) && (__GLIBC__ < 2) - # if defined(FREEBSD) || defined(OPENBSD) - # include - # elif defined(LINUX) diff --git a/net/xl2tpd/patches/200-xl2tpd-control-fix-xl2tpd-hanged-up-in-fopen.patch b/net/xl2tpd/patches/200-xl2tpd-control-fix-xl2tpd-hanged-up-in-fopen.patch deleted file mode 100644 index 8fa0fd3..0000000 --- a/net/xl2tpd/patches/200-xl2tpd-control-fix-xl2tpd-hanged-up-in-fopen.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 97adf987cf230e47a4800c2f0a0940a1d0d98109 Mon Sep 17 00:00:00 2001 -From: wendy2001011 -Date: Thu, 9 Feb 2017 17:32:14 +0800 -Subject: [PATCH] xl2tpd-control: fix xl2tpd hanged up in "fopen" - -This is a fix for xl2tpd hanged up in "fopen" result fifo while working -on xl2tpd with OpenWrt. - -Root cause is as followings, -1. xl2tpd-control open result fifo ##fifo readers=1 -2. xl2tpd-control read result fifo -3. xl2tpd-control close result fifo ##fifo readers=0 -4. xl2tpd fopen result fifo ##xl2tpd is hanged up here to wait readers -5. xl2tpd-control unlink result fifo - -The fix replaces the order of "unlink" and "close" when cleaning up to -avoid hang up issue in fopen, and add the retry waiting when reading -result fifo. - -[Yousong Zhou: 2s as the timeout and 10ms as the check interval] ---- - xl2tpd-control.c | 23 +++++++++++++++++++++-- - 1 file changed, 21 insertions(+), 2 deletions(-) - -diff --git a/xl2tpd-control.c b/xl2tpd-control.c -index 9fcab76..b8bf822 100644 ---- a/xl2tpd-control.c -+++ b/xl2tpd-control.c -@@ -35,6 +35,7 @@ - - #define TUNNEL_REQUIRED 1 - #define TUNNEL_NOT_REQUIRED 0 -+#define TIMEOUT 2000000 //timeout is 2s - - char result_filename[128]; - int result_fd = -1; -@@ -149,9 +150,9 @@ void help() - void cleanup(void) - { - /* cleaning up */ -- if (result_fd >= 0) -- close (result_fd); - unlink (result_filename); -+ if (result_fd >= 0) -+ close (result_fd); - } - - int main (int argc, char *argv[]) -@@ -340,6 +341,7 @@ void print_error (int level, const char *fmt, ...) - va_end (args); - } - -+ - int read_result(int result_fd, char* buf, ssize_t size) - { - /* read result from result_fd */ -@@ -348,6 +350,11 @@ int read_result(int result_fd, char* buf, ssize_t size) - */ - ssize_t readed = 0; - ssize_t len; -+ int write_pipe = 0; -+ struct timeval tvs; -+ struct timeval tve; -+ unsigned long diff; -+ gettimeofday(&tvs, NULL); - - do - { -@@ -360,8 +367,20 @@ int read_result(int result_fd, char* buf, ssize_t size) - "error: can't read command result: %s\n", strerror (errno)); - break; - } else if (len == 0) { -+ if(!write_pipe) { -+ gettimeofday(&tve, NULL); -+ diff = (tve.tv_sec - tvs.tv_sec) * 1000000 + (tve.tv_usec - tvs.tv_usec); -+ if (diff >= TIMEOUT) { -+ print_error (DEBUG_LEVEL, "error: read timout\n"); -+ break; -+ } else { -+ usleep(10000); -+ continue; -+ } -+ } - break; - } else { -+ write_pipe = 1; - readed += len; - if ((size - readed) <= 0) - break; --- -2.6.4 - diff --git a/net/yaaw/Makefile b/net/yaaw/Makefile deleted file mode 100644 index e78a7d6..0000000 --- a/net/yaaw/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=yaaw -PKG_VERSION:=2016-05-28 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Hsing-Wang Liao - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/binux/yaaw.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=c28cde2252b707fe0661693f78c5e5e3beee09a1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_LICENSE:=LGPL-3.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/yaaw - SECTION:=net - CATEGORY:=Network - SUBMENU:=Download Manager - DEPENDS:= - TITLE:=Yet another aria2 web frontend - URL:=https://github.com/binux/yaaw - PKGARCH:=all -endef - -define Package/yaaw/description - Yet Another Aria2 Web Frontend in pure HTML/CSS/Javascirpt. -endef - -define Build/Compile -endef - -define Package/yaaw/install - $(INSTALL_DIR) $(1)/www/yaaw - $(CP) $(PKG_BUILD_DIR)/js $(1)/www/yaaw - $(CP) $(PKG_BUILD_DIR)/img $(1)/www/yaaw - $(CP) $(PKG_BUILD_DIR)/css $(1)/www/yaaw - $(CP) $(PKG_BUILD_DIR)/index.html $(1)/www/yaaw - $(CP) $(PKG_BUILD_DIR)/offline.appcache $(1)/www/yaaw -endef - -$(eval $(call BuildPackage,yaaw)) diff --git a/net/zerotier/Config.in b/net/zerotier/Config.in deleted file mode 100644 index dd6f2ca..0000000 --- a/net/zerotier/Config.in +++ /dev/null @@ -1,24 +0,0 @@ -menu "Configuration" - depends on PACKAGE_zerotier - -config ZEROTIER_ENABLE_DEBUG - bool "Build in debug mode" - depends on PACKAGE_zerotier - default n - -config ZEROTIER_USE_MINIUPNPC - bool "Build with MiniUPnPc" - depends on PACKAGE_zerotier - default n - -config ZEROTIER_ENABLE_NETWORK_CONTROLLER - bool "Build with network controller" - depends on PACKAGE_zerotier - default n - -config ZEROTIER_ENABLE_SELFTEST - bool "Build a self test program" - depends on PACKAGE_zerotier - default n - -endmenu diff --git a/net/zerotier/Makefile b/net/zerotier/Makefile deleted file mode 100644 index f838ffc..0000000 --- a/net/zerotier/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=zerotier -PKG_VERSION:=1.1.14 -PKG_RELEASE:=4 - -PKG_LICENSE:=GPL-3.0 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/zerotier/ZeroTierOne -PKG_SOURCE_SUBDIR:=ZeroTierOne-$(PKG_VERSION) -PKG_SOURCE_VERSION:=ae491c277e6f35d1acbdcbf700e2b834957295ae -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_MD5SUM:=c8c3219c995a59161832d580a194f6280de7a4eef75cebece6f38400b64f003e -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) - -PKG_BUILD_DEPENDS:=uclibcxx -PKG_BUILD_PARALLEL:=1 -include $(INCLUDE_DIR)/package.mk - -define Package/zerotier - SECTION:=net - CATEGORY:=Network - DEPENDS:=+libpthread +kmod-tun +ip +ZEROTIER_ENABLE_NETWORK_CONTROLLER:libsqlite3 +ZEROTIER_USE_MINIUPNPC:libminiupnpc +ZEROTIER_USE_MINIUPNPC:libnatpmp - TITLE:=Create flat virtual Ethernet networks of almost unlimited size - URL:=https://www.zerotier.com - SUBMENU:=VPN - MAINTAINER:=Moritz Warning -endef - -define Package/zerotier/description - ZeroTier creates a global provider-independent virtual private cloud network. -endef - -define Package/zerotier/config - source "$(SOURCE)/Config.in" -endef - -ifeq ($(CONFIG_ZEROTIER_ENABLE_NETWORK_CONTROLLER),y) -MAKE_FLAGS += ZT_ENABLE_NETWORK_CONTROLLER=1 -MAKE_FLAGS += LDLIBS+=" -lsqlite3 " -endif - -ifeq ($(CONFIG_ZEROTIER_USE_MINIUPNPC),y) -MAKE_FLAGS += ZT_USE_MINIUPNPC=1 -endif - -ifeq ($(CONFIG_ZEROTIER_ENABLE_DEBUG),y) -TARGET_CXXFLAGS += -DZT_TRACE -ggdb3 -endif - -MAKE_FLAGS += \ - DEFS="" \ - LDFLAGS+=" -L$(STAGING_DIR)/usr/lib/uClibc++ -pthread " \ - LDLIBS+=" -fno-builtin -nodefaultlibs -Wl,-Bstatic -luClibc++ -Wl,-Bdynamic -lpthread -lm -lc -lsupc++ -lc -lgcc -lgcc_eh -lgcc_s -lssp_nonshared " \ - CXXFLAGS+=" -fno-builtin -nostdinc++ -I$(STAGING_DIR)/usr/include/uClibc++ -DGCC_HASCLASSVISIBILITY -Wall -fPIE -fvisibility=hidden " - -define Build/Compile - $(call Build/Compile/Default,one) -ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y) - $(call Build/Compile/Default,selftest) -endif -endef - -define Package/zerotier/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-one $(1)/usr/bin/ - $(LN) zerotier-one $(1)/usr/bin/zerotier-cli - $(LN) zerotier-one $(1)/usr/bin//zerotier-idtool - -ifeq ($(CONFIG_ZEROTIER_ENABLE_SELFTEST),y) - $(INSTALL_BIN) $(PKG_BUILD_DIR)/zerotier-selftest $(1)/usr/bin/ -endif - - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) files/zerotier.init $(1)/etc/init.d/zerotier - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) files/zerotier.config $(1)/etc/config/zerotier -endef - -$(eval $(call BuildPackage,zerotier)) - diff --git a/net/zerotier/files/zerotier.config b/net/zerotier/files/zerotier.config deleted file mode 100644 index d9c33de..0000000 --- a/net/zerotier/files/zerotier.config +++ /dev/null @@ -1,7 +0,0 @@ - -config zerotier sample_config - option enabled 1 - option interface 'wan' # restart ZT when wan status changed - #option port '9993' - option secret 'generate' # generate secret on first start - list join '8056c2e21c000001' # a public network called Earth diff --git a/net/zerotier/files/zerotier.init b/net/zerotier/files/zerotier.init deleted file mode 100644 index dd18327..0000000 --- a/net/zerotier/files/zerotier.init +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=90 - -USE_PROCD=1 - -LIST_SEP=" -" -ZT_COMMAND=/usr/bin/zerotier-one - -section_enabled() { - config_get_bool enabled "$1" 'enabled' 0 - [ $enabled -gt 0 ] -} - -start_instance() { - local cfg="$1" - local port secret interface - local ARGS="" - - section_enabled "$cfg" || return 1 - - mkdir -p /var/lib/zerotier-one/networks.d/ - - config_get_bool port $cfg 'port' - config_get secret $cfg 'secret' - config_get interface $cfg 'interface' - - if [ -n "$port" ]; then - ARGS="$ARGS -p$port" - fi - - if [ "$secret" = "generate" ]; then - echo "Generate secret - please wait..." - local tmp="/tmp/zt.$cfg.secret" - zerotier-idtool generate "$tmp" > /dev/null - secret="$(cat $tmp)" - rm "$tmp" - - uci set zerotier.$cfg.secret="$secret" - uci commit zerotier - fi - - if [ -n "$secret" ]; then - echo "$secret" > /var/lib/zerotier-one/identity.secret - #make sure there is not previous dentity.public - rm -f /var/lib/zerotier-one/identity.public - fi - - add_join() { - #an (empty) config file will cause ZT to join a network - touch /var/lib/zerotier-one/networks.d/$1.conf - } - - config_list_foreach $cfg 'join' add_join - - procd_open_instance - procd_add_reload_interface_trigger "$interface" - procd_set_param command $ZT_COMMAND $ARGS - procd_set_param nice -10 - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger zerotier -} - -start_service() { - config_load 'zerotier' - config_foreach start_instance 'zerotier' -} diff --git a/net/zerotier/patches/0001-Fix-for-running-under-MUSL-libc-e.g.-Alpine-Linux.patch b/net/zerotier/patches/0001-Fix-for-running-under-MUSL-libc-e.g.-Alpine-Linux.patch deleted file mode 100644 index 119491f..0000000 --- a/net/zerotier/patches/0001-Fix-for-running-under-MUSL-libc-e.g.-Alpine-Linux.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 830250759cd4c14ca2ae5ddf24f0a0427f258622 Mon Sep 17 00:00:00 2001 -From: Adam Ierymenko -Date: Tue, 26 Jul 2016 16:36:20 -0700 -Subject: [PATCH 1/2] Fix for running under MUSL libc (e.g. Alpine Linux) - ---- - osdep/Thread.hpp | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/osdep/Thread.hpp b/osdep/Thread.hpp -index 7fb38d8..4f90dc0 100644 ---- a/osdep/Thread.hpp -+++ b/osdep/Thread.hpp -@@ -125,6 +125,10 @@ public: - throw() - { - memset(&_tid,0,sizeof(_tid)); -+ pthread_attr_init(&_tattr); -+#ifdef __LINUX__ -+ pthread_attr_setstacksize(&_tattr,8388608); // for MUSL libc and others, has no effect in normal glibc environments -+#endif - _started = false; - } - -@@ -157,7 +161,7 @@ public: - { - Thread t; - t._started = true; -- if (pthread_create(&t._tid,(const pthread_attr_t *)0,&___zt_threadMain,instance)) -+ if (pthread_create(&t._tid,&t._tattr,&___zt_threadMain,instance)) - throw std::runtime_error("pthread_create() failed, unable to create thread"); - return t; - } -@@ -184,6 +188,7 @@ public: - - private: - pthread_t _tid; -+ pthread_attr_t _tattr; - volatile bool _started; - }; - --- -2.9.0 - diff --git a/net/zerotier/patches/0002-fix-build.patch b/net/zerotier/patches/0002-fix-build.patch deleted file mode 100644 index 34088c8..0000000 --- a/net/zerotier/patches/0002-fix-build.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 333bbabc6dfad0553fb63d560ab6442a50cc9e52 Mon Sep 17 00:00:00 2001 -From: Moritz Warning -Date: Fri, 22 Jul 2016 23:27:31 +0200 -Subject: [PATCH 2/2] fix build - ---- - make-linux.mk | 30 +++++++++++++++--------------- - 1 file changed, 15 insertions(+), 15 deletions(-) - ---- a/make-linux.mk -+++ b/make-linux.mk -@@ -39,24 +39,24 @@ include objects.mk - - # On Linux we auto-detect the presence of some libraries and if present we - # link against the system version. This works with our package build images. --ifeq ($(wildcard /usr/include/lz4.h),) -+#ifeq ($(wildcard $(STAGING_DIR)/usr/include/lz4.h),) - OBJS+=ext/lz4/lz4.o --else -- LDLIBS+=-llz4 -- DEFS+=-DZT_USE_SYSTEM_LZ4 --endif --ifeq ($(wildcard /usr/include/http_parser.h),) -+#else -+# LDLIBS+=-llz4 -+# DEFS+=-DZT_USE_SYSTEM_LZ4 -+#endif -+#ifeq ($(wildcard $(STAGING_DIR)/usr/include/http_parser.h),) - OBJS+=ext/http-parser/http_parser.o --else -- LDLIBS+=-lhttp_parser -- DEFS+=-DZT_USE_SYSTEM_HTTP_PARSER --endif --ifeq ($(wildcard /usr/include/json-parser/json.h),) -+#else -+# LDLIBS+=-lhttp_parser -+# DEFS+=-DZT_USE_SYSTEM_HTTP_PARSER -+#endif -+#ifeq ($(wildcard $(STAGING_DIR)/usr/include/json-parser/json.h),) - OBJS+=ext/json-parser/json.o --else -- LDLIBS+=-ljsonparser -- DEFS+=-DZT_USE_SYSTEM_JSON_PARSER --endif -+#else -+# LDLIBS+=-ljsonparser -+# DEFS+=-DZT_USE_SYSTEM_JSON_PARSER -+#endif - - ifeq ($(ZT_USE_MINIUPNPC),1) - OBJS+=osdep/PortMapper.o diff --git a/net/zerotier/patches/0003-workaround_to_avoid_seg_faults.patch b/net/zerotier/patches/0003-workaround_to_avoid_seg_faults.patch deleted file mode 100644 index e27f872..0000000 --- a/net/zerotier/patches/0003-workaround_to_avoid_seg_faults.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 21f4958bd48cae59b478b1b3445e00fa4fb18991 Mon Sep 17 00:00:00 2001 -From: muebau -Date: Fri, 5 Aug 2016 19:22:45 +0200 -Subject: [PATCH] OpenWRT workaround to avoid seg faults - ---- - service/OneService.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/service/OneService.cpp b/service/OneService.cpp -index 13820f5..9ba3238 100644 ---- a/service/OneService.cpp -+++ b/service/OneService.cpp -@@ -862,8 +862,8 @@ public: - } - - // Start two background threads to handle expensive ops out of line -- Thread::start(_node); -- Thread::start(_node); -+ //Thread::start(_node); -+ //Thread::start(_node); - - _nextBackgroundTaskDeadline = 0; - uint64_t clockShouldBe = OSUtils::now(); --- -2.7.4 - diff --git a/net/zerotier/patches/0005-use-external-miniupnpc-and-natpmp.patch b/net/zerotier/patches/0005-use-external-miniupnpc-and-natpmp.patch deleted file mode 100644 index 377abef..0000000 --- a/net/zerotier/patches/0005-use-external-miniupnpc-and-natpmp.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/make-linux.mk -+++ b/make-linux.mk -@@ -64,7 +64,8 @@ ifeq ($(ZT_USE_MINIUPNPC),1) - DEFS+=-DZT_USE_MINIUPNPC - - # Auto-detect libminiupnpc at least v2.0 -- MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1) -+ #MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1) -+ MINIUPNPC_IS_NEW_ENOUGH=1 - ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1) - DEFS+=-DZT_USE_SYSTEM_MINIUPNPC - LDLIBS+=-lminiupnpc -@@ -74,7 +75,7 @@ ifeq ($(ZT_USE_MINIUPNPC),1) - endif - - # Auto-detect libnatpmp -- ifeq ($(wildcard /usr/include/natpmp.h),) -+ ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),) - OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o - else - LDLIBS+=-lnatpmp ---- a/osdep/PortMapper.cpp -+++ b/osdep/PortMapper.cpp -@@ -180,7 +180,7 @@ public: - struct IGDdatas data; - - int upnpError = 0; -- UPNPDev *devlist = upnpDiscoverAll(5000,(const char *)0,(const char *)0,0,0,2,&upnpError); -+ UPNPDev *devlist = upnpDiscoverAll(5000,(const char *)0,(const char *)0,0,0,&upnpError); - if (devlist) { - - #ifdef ZT_PORTMAPPER_TRACE diff --git a/net/znc/Config.in b/net/znc/Config.in deleted file mode 100644 index 519de55..0000000 --- a/net/znc/Config.in +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (C) 2010-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -menu "Configuration" - depends on PACKAGE_znc - -config ZNC_ICU - bool - prompt "Enable ICU character encoding support." - help - Allows configuration of the charset used between clients and ZNC, and - between ZNC and the IRC server". - -endmenu diff --git a/net/znc/Makefile b/net/znc/Makefile deleted file mode 100644 index 2d0c34d..0000000 --- a/net/znc/Makefile +++ /dev/null @@ -1,313 +0,0 @@ -# -# Copyright (C) 2009-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=znc -PKG_VERSION:=1.6.3 -PKG_RELEASE:=5 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://znc.in/releases \ - http://znc.in/releases/archive -PKG_MD5SUM:=0dad0307e2faea26b9e304e308f7ec63 - -PKG_MAINTAINER:=Jonas Gorski -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE - -PKG_USE_MIPS16:=0 -PKG_BUILD_PARALLEL:=1 - -PKG_CONFIG_DEPENDS := CONFIG_ZNC_ICU - -define Package/znc/default - SUBMENU:=Instant Messaging - SECTION:=net - CATEGORY:=Network - TITLE:=ZNC - URL:=http://en.znc.in/ - USERID:=znc:znc -endef - -define Package/znc - $(Package/znc/default) - DEPENDS:=+libopenssl +libpthread +libstdcpp +ZNC_ICU:icu +zlib - MENU:=1 -endef - -define Package/znc/description - ZNC is an IRC bouncer with many advanced features like detaching, - multiple users, per channel playback buffer, SSL, IPv6, transparent DCC - bouncing, and c++ module support to name a few. -endef - -define Package/znc/config - source "$(SOURCE)/Config.in" -endef - -define Package/znc/conffiles -/etc/config/znc -endef - - -define Package/znc/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/znc $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/znc.init $(1)/etc/init.d/znc - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/znc.conf $(1)/etc/config/znc - $(INSTALL_DIR) $(1)/usr/lib/znc/ -endef - - -ZNC_MODULES := -ZNC_MODULE_TARGETS := - -define module - define Package/znc-mod-$(strip $(1)) - $(Package/znc/default) - TITLE+= ($(strip $(1)) plugin) - DEPENDS:=znc - endef - - define Package/znc-mod-$(strip $(1))/description - $(strip $(2)) - endef - - define Package/znc-mod-$(strip $(1))/install - $(INSTALL_DIR) $$(1)/usr/lib/znc/ - $(INSTALL_BIN) $$(PKG_BUILD_DIR)/modules/$(subst -,_,$(strip $(1))).so $$(1)/usr/lib/znc/ - # include webadmin page templates if existing - if [ -d $$(PKG_BUILD_DIR)/modules/data/$(subst -,_,$(strip $(1))) ]; then \ - $(INSTALL_DIR) $$(1)/usr/share/znc/modules ;\ - $(CP) $$(PKG_BUILD_DIR)/modules/data/$(subst -,_,$(strip $(1))) $$(1)/usr/share/znc/modules ;\ - fi - endef - - ZNC_MODULES += znc-mod-$(strip $(1)) - $(if $(CONFIG_PACKAGE_znc-mod-$(strip $(1))),ZNC_MODULE_TARGETS += $(subst -,_,$(strip $(1))).so) -endef - -define webadmin - define Package/znc-mod-webadmin - $(Package/znc/default) - TITLE+= (webadmin plugin) - DEPENDS:=znc - endef - - define Package/znc-mod-webadmin/description - Allows you to add/remove/edit users and settings on the fly via a web browser. - endef - - define Package/znc-mod-webadmin/install - $(INSTALL_DIR) $$(1)/usr/lib/znc/ - $(INSTALL_BIN) $$(PKG_BUILD_DIR)/modules/webadmin.so $$(1)/usr/lib/znc/ - $(INSTALL_DIR) $$(1)/usr/share/znc/modules - $(CP) $$(PKG_BUILD_DIR)/modules/data/webadmin $$(1)/usr/share/znc/modules - $(INSTALL_DIR) $$(1)/usr/share/znc/webskins/ - $(CP) $$(PKG_BUILD_DIR)/webskins/_default_ $$(1)/usr/share/znc/webskins/ - endef - - ZNC_MODULES += znc-mod-webadmin - $(if $(CONFIG_PACKAGE_znc-mod-webadmin),ZNC_MODULE_TARGETS += webadmin.so) -endef - -define webskin - define Package/znc-webskin-$(strip $(1)) - $(Package/znc/default) - TITLE+= ($(strip $(1)) webskin) - DEPENDS:=znc-mod-webadmin - endef - - define Package/znc-webskin-$(strip $(1))/description - $(strip $(1)) webskin for webadmin - endef - - define Package/znc-webskin-$(strip $(1))/install - $(INSTALL_DIR) $$(1)/usr/share/znc/webskins/ - $(CP) $$(PKG_BUILD_DIR)/webskins/$(strip $(1)) $$(1)/usr/share/znc/webskins/ - endef - ZNC_MODULES += znc-webskin-$(strip $(1)) -endef - -, := , - -$(eval $(call module,adminlog,Log user connects and disconnects and failed \ - logins to file or syslog.)) - -$(eval $(call module,alias,Provides bouncer-side command alias support.)) - -$(eval $(call module,autoattach,Reattaches you to channels on activity.)) - -$(eval $(call module,autocycle,Cycles a channel when you are the only one in \ - there and you don't have op.)) - -$(eval $(call module,autoop,Auto op the good guys.)) - -$(eval $(call module,autoreply,Gives a automatic reply if someone messages you \ - if you are away.)) - -$(eval $(call module,autovoice,Autovoices everyone who joins some channel.)) - -$(eval $(call module,awaynick,Change your nick while you are away.)) - -$(eval $(call module,awaystore,Stores messages while away$(,) also auto away.)) - -$(eval $(call module,block-motd,This module blocks the server's Message of the \ - Day.)) - -$(eval $(call module,blockuser,Blocks certain users from using ZNC saying \ - their account was disabled.)) - -$(eval $(call module,bouncedcc,Bounces dcc transfers through the znc server \ - instead of sending them directly to the user.)) - -$(eval $(call module,buffextras,Add nick changes$(,) joins$(,) parts$(,) topic \ - changes etc. to your playback buffer.)) - -$(eval $(call module,cert,Use a SSL certificate for connecting to a server.)) - -$(eval $(call module,certauth,This module allows users to log in to ZNC via \ - SSL client keys.)) - -$(eval $(call module,chansaver,Keeping config up to date when user joins and \ - parts.)) - -$(eval $(call module,clearbufferonmsg,This module keeps the buffer until the \ - next message from the client.)) - -$(eval $(call module,clientnotify,Notify about new incoming connections to \ - your user.)) - -$(eval $(call module,controlpanel,Allows you to add/remove/edit users and \ - settings on the fly via IRC messages.)) - -$(eval $(call module,crypt,Encryption for channel/private messages.)) - -$(eval $(call module,ctcpflood,This module tries to block ctcp floods.)) - -$(eval $(call module,dcc,Allows you to transfer files to and from ZNC.)) - -$(eval $(call module,disconkick,This module will kick your client from all \ - channels where you are$(,) in case if ZNC disconnects from server.)) - -$(eval $(call module,fail2ban,Block IPs for some time after a failed login.)) - -$(eval $(call module,flooddetach,This module detaches you from channels which \ - are flooded.)) - -$(eval $(call module,identfile,Places the ident of a user to a file when they \ - are trying to connect.)) - -$(eval $(call module,imapauth,Allow users to authenticate via IMAP.)) - -$(eval $(call module,keepnick,Tries to get you your primary nick.)) - -$(eval $(call module,kickrejoin,Implements auto-rejoin-on-kick.)) - -$(eval $(call module,lastseen,Logs when a user last logged in to ZNC.)) - -$(eval $(call module,listsockets,This module displays a list of all open \ - sockets in ZNC.)) - -$(eval $(call module,log,Log conversations to file.)) - -$(eval $(call module,missingmotd,Sends 422 to clients when they login.)) - -$(eval $(call module,modules_online,This module fakes the online status of \ - ZNC-*users.)) - -$(eval $(call module,nickserv,Auths you with NickServ.)) - -$(eval $(call module,notes,This modules stores and displays short notes using \ - a key/note pairs and shows them to you on connect.)) - -$(eval $(call module,notify-connect,Sends a notice to all admins when a user \ - logs in or out.)) - -$(eval $(call module,partyline,Allows ZNC users to join internal channels and \ - query other ZNC users on the same ZNC.)) - -$(eval $(call module,perform,Performs commands on connect.)) - -$(eval $(call module,playback,Avoid repetitive playback buffers on re-connect \ - with supported clients (e.g. mutter, colluquy))) - -$(eval $(call module,q,Auths you with Q (and a little more).)) - -$(eval $(call module,raw,View all of the raw traffic.)) - -$(eval $(call module,route-replies,Routes back answers to the right client \ - when connected with multiple clients.)) - -$(eval $(call module,sasl,The SASL module allows you to authenticate to an \ - IRC network via SASL.)) - -$(eval $(call module,savebuff,Saves your channel buffers into an encrypted \ - file so they can survive restarts and reboots.)) - -$(eval $(call module,schat,SSL (encrypted) DCC chats.)) - -$(eval $(call module,send-raw,Allows you to send raw traffic to IRC from \ - other users.)) - -$(eval $(call module,simple-away,This module will automatically set you away \ - on IRC while you are disconnected from the bouncer.)) - -$(eval $(call module,shell,Have your unix shell in a query window right inside \ - of your IRC client.)) - -$(eval $(call module,stickychan,Keeps you sticked to specific channels.)) - -$(eval $(call module,watch,Monitor activity for specific text patterns from \ - specific users and have the text sent to a special query window.)) - -$(eval $(call webadmin)) - -$(eval $(call webskin,dark-clouds)) -$(eval $(call webskin,forest)) -$(eval $(call webskin,ice)) - -PKG_CONFIG_DEPENDS += $(patsubst %,CONFIG_PACKAGE_%,$(ZNC_MODULES)) - -include $(INCLUDE_DIR)/package.mk - -CONFIGURE_VARS += \ - CXXFLAGS="$(TARGET_CFLAGS) -fno-builtin -fno-rtti" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-nodefaultlibs -lc -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ - LIBS="-lstdc++ -lm -lssl -lcrypto $(LIBGCC_S) -lc" - -CONFIGURE_ARGS += \ - $(if $(CONFIG_ZNC_ICU), --enable-charset, --disable-charset) \ - --disable-cyrus \ - --disable-debug \ - --enable-largefile \ - --disable-perl \ - --enable-poll \ - --disable-python \ - --enable-ssl \ - --disable-swig \ - --disable-tcl \ - --enable-tdns \ - --enable-zlib - -define Build/Configure - $(call Build/Configure/Default,) - $(call libtool_disable_rpath) -endef - -define Build/Compile - $(call Build/Compile/Default,znc) - +$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/modules \ - $(MAKE_FLAGS) $(ZNC_MODULE_TARGETS) -endef - -$(eval $(call BuildPackage,znc)) -$(foreach m,$(ZNC_MODULES),$(eval $(call BuildPackage,$(m)))) diff --git a/net/znc/files/znc.conf b/net/znc/files/znc.conf deleted file mode 100644 index 1b0d842..0000000 --- a/net/znc/files/znc.conf +++ /dev/null @@ -1,29 +0,0 @@ -config znc - # where to listen for connections - list listener '192.168.1.1 1234' - # If using SSL sockets, use the following certifcate: - # option znc_ssl_cert '/etc/znc.cert' - - # load global modules (You need to install them first): - # list module 'fail2ban' - - # remove this to enable the service - option disabled 1 - -config user 'sampleUser' - # Use either a plain text password or use the full sha256#... line. - # You can generate one with 'znc -s'. - option password 'changeme' - option nick 'sampleUser' - option altnick 'userSample' - option ident 'openwrt' - option realname 'John Doe' - - # This adds support for channels in znc configuration: - # list channel '#chan optional_password' - - # list of allowed servers: - # list server 'chat.freenode.net 6667' - - # load user modules (' [params...]'): - # list module 'simple_away -timer 10 disconnected' diff --git a/net/znc/files/znc.init b/net/znc/files/znc.init deleted file mode 100644 index 0277aff..0000000 --- a/net/znc/files/znc.init +++ /dev/null @@ -1,183 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2010 Openwrt.org - -START=60 - -USE_PROCD=1 - -ZNC_CONFIG_PATH=/tmp/etc/znc -PID_FILE=${ZNC_CONFIG_PATH}/znc.pid -ZNC_CONFIG=${ZNC_CONFIG_PATH}/configs/znc.conf - -EXTERNAL_CONFIG=0 -DISABLED= - -RUNAS_USER= -RUNAS_GROUP= - -add_param() { - echo "$1 = $2" >> $ZNC_CONFIG -} - -add_chan() { - chan=${1% *} - pass=${1#* } - echo " " >> $ZNC_CONFIG - [ "$chan" != "$pass" ] && echo " Key = $pass" >> $ZNC_CONFIG - echo " " >> $ZNC_CONFIG -} - -add_network() { - local current_user="$1" - local network="$2" - local user - local name - - config_get user "$network" user - - [ "$user" = "$current_user" ] || return 0 - - config_get name "$network" name - echo " " >> $ZNC_CONFIG - config_list_foreach "$network" server "add_param \" Server\"" - config_list_foreach "$network" fingerprint "add_param \" trustedserverfingerprint\"" - config_list_foreach "$network" channel "add_chan" - echo " " >> $ZNC_CONFIG -} - -znc_global() { - local znc="$1" - local anoniplimit - local maxbuffersize - local connectdelay - local serverthrottle - local znc_config_path - local znc_pem_file - - config_get_bool DISABLED "$znc" disabled 0 - - [ "$DISABLED" -eq 0 ] || return 0 - - config_get znc_config_path "$znc" znc_config_path - - config_get RUNAS_USER "$znc" runas_user znc - config_get RUNAS_GROUP "$znc" runas_group znc - - if [ "${znc_config_path}" ] - then - ZNC_CONFIG_PATH=$znc_config_path - EXTERNAL_CONFIG=1 - else - mkdir -p $ZNC_CONFIG_PATH/configs/ - [ ! -f "$ZNC_CONFIG" ] || rm "$ZNC_CONFIG" - - add_param "Version" "1.0" - - config_get anoniplimit "$znc" anoniplimit - config_get maxbuffersize "$znc" maxbuffersize - config_get connectdelay "$znc" connectdelay - config_get serverthrottle "$znc" serverthrottle - config_get znc_pem_file "$znc" znc_ssl_cert - - [ -z "$znc_pem_file" ] || ln -sf "$znc_pem_file" $ZNC_CONFIG_PATH/znc.pem - - [ -z $anoniplimit ] || echo "AnonIPLimit = $anoniplimit" >> $ZNC_CONFIG - [ -z $maxbuffersize ] || echo "MaxBufferSize = $maxbuffersize" >> $ZNC_CONFIG - [ -z $connectdelay ] || echo "ConnectDelay = $connectdelay" >> $ZNC_CONFIG - [ -z $serverthrottle ] || echo "ServerThrottle = $anoniplimit" >> $ZNC_CONFIG - - echo "PidFile = $PID_FILE" >> $ZNC_CONFIG - - config_list_foreach "$znc" listener "add_param Listener" - config_list_foreach "$znc" module "add_param LoadModule" - fi -} - -add_user() { - local user="$1" - local password - local nick - local altnick - local ident - local realname - local buffer - local quitmsg - local chanmodes - local vhost - local server - - config_get password "$user" password - config_get nick "$user" nick - config_get altnick "$user" altnick - config_get ident "$user" ident - config_get realname "$user" realname - config_get buffer "$user" buffer - config_get quitmsg "$user" quitmsg - config_get chanmodes "$user" chanmodes - config_get vhost "$user" vhost - config_get server "$user" server - - echo "" >> $ZNC_CONFIG - - case "$password" in - "md5#"* | "sha256#"* | "plain#"*) - add_param " Pass" "$password" - ;; - *) - add_param " Pass" "plain#$password" - ;; - esac - - add_param " Nick" "$nick" - add_param " AltNick" "${altnick:-$nick"_"}" - add_param " Ident" "${ident:-$nick}" - add_param " RealName" "${realname:-$nick}" - [ -z "$vhost" ] || add_param " VHost" "$vhost" - add_param " Buffer" "${buffer:-50}" - add_param " KeepBuffer" "false" - add_param " ChanModes" "${chanmodes:-"+stn"}" - [ -z "$quitmsg" ] || add_param " QuitMsg" "$quitmsg" - - config_list_foreach "$user" module "add_param \" LoadModule\"" - - # add legacy network - if [ "$server" ]; then - echo " " >> $ZNC_CONFIG - config_list_foreach "$user" server "add_param \" Server\"" - config_list_foreach "$user" fingerprint "add_param \" trustedserverfingerprint\"" - config_list_foreach "$user" channel "add_chan" - echo " " >> $ZNC_CONFIG - fi - - config_foreach "add_network \"$user\"" network - - echo "" >> $ZNC_CONFIG -} - -start_service() { - config_load znc - config_foreach znc_global znc - - [ "$DISABLED" -eq 0 ] || return 0 - - if [ "$EXTERNAL_CONFIG" -eq 0 ] - then - config_foreach add_listener listener - config_foreach add_user user - - fi - - chown -hR ${RUNAS_USER}:${RUNAS_GROUP} ${ZNC_CONFIG_PATH} || { - logger -s -t ZNC -p daemon.err "Invalid UID/GID. Aborting startup" - exit 1 - } - - procd_open_instance - procd_set_param file /etc/config/znc - [ "$EXTERNAL_CONFIG" -eq 1 ] && procd_set_param file "${ZNC_CONFIG}/configs/znc.conf" - procd_set_param command /usr/bin/znc - procd_append_param command -f -d$ZNC_CONFIG_PATH - procd_set_param user ${RUNAS_USER} - procd_set_param respawn - procd_close_instance -} diff --git a/net/znc/patches/100-move_rootcheck_after_config.patch b/net/znc/patches/100-move_rootcheck_after_config.patch deleted file mode 100644 index 6ef6630..0000000 --- a/net/znc/patches/100-move_rootcheck_after_config.patch +++ /dev/null @@ -1,52 +0,0 @@ -From adf42357c9043c38d9a9b47544a1b46445bdae19 Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Wed, 6 Apr 2011 04:10:23 +0200 -Subject: [PATCH] Move the root check to after config parsing - ---- - src/main.cpp | 27 ++++++++++++++------------- - 1 file changed, 14 insertions(+), 13 deletions(-) - ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -304,19 +304,6 @@ int main(int argc, char** argv) { - CUtils::PrintStatus(true, ""); - } - -- if (isRoot()) { -- CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid"); -- CUtils::PrintError("reasons for this and it can, in theory, cause great damage!"); -- if (!bAllowRoot) { -- CZNC::DestroyInstance(); -- return 1; -- } -- CUtils::PrintError("You have been warned."); -- CUtils::PrintError("Hit CTRL+C now if you don't want to run ZNC as root."); -- CUtils::PrintError("ZNC will start in 30 seconds."); -- sleep(30); -- } -- - if (bMakeConf) { - if (!pZNC->WriteNewConfig(sConfig)) { - CZNC::DestroyInstance(); -@@ -338,6 +325,20 @@ int main(int argc, char** argv) { - return 1; - } - -+ if (isRoot()) { -+ CUtils::PrintError("You are running ZNC as root! Don't do that! There are not many valid"); -+ CUtils::PrintError("reasons for this and it can, in theory, cause great damage!"); -+ if (!bAllowRoot) { -+ CZNC::DestroyInstance(); -+ return 1; -+ } -+ CUtils::PrintError("You have been warned."); -+ CUtils::PrintError("Hit CTRL+C now if you don't want to run ZNC as root."); -+ CUtils::PrintError("ZNC will start in 30 seconds."); -+ sleep(30); -+ } -+ -+ - if (bForeground) { - int iPid = getpid(); - CUtils::PrintMessage("Staying open for debugging [pid: " + CString(iPid) + "]"); diff --git a/net/znc/patches/101-Reduce_rebuild_time.patch b/net/znc/patches/101-Reduce_rebuild_time.patch deleted file mode 100644 index 60d335c..0000000 --- a/net/znc/patches/101-Reduce_rebuild_time.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 0527869a72c27bfb25b5f92fdd77a04c39d939db Mon Sep 17 00:00:00 2001 -From: Jonas Gorski -Date: Sat, 16 Apr 2011 05:51:04 +0200 -Subject: [PATCH] Don't rebuild everything when the Makefile's timestamp - changed - ---- - Makefile.in | 2 +- - modules/Makefile.in | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - ---- a/Makefile.in -+++ b/Makefile.in -@@ -112,7 +112,7 @@ clean: - distclean: clean - rm -rf $(DISTCLEAN) - --src/%.o: src/%.cpp Makefile include/znc/Csocket.h -+src/%.o: src/%.cpp include/znc/Csocket.h - @mkdir -p .depend src - $(E) Building core object $*... - $(Q)$(CXX) $(CXXFLAGS) -c -o $@ $< -MD -MF .depend/$*.dep -MT $@ ---- a/modules/Makefile.in -+++ b/modules/Makefile.in -@@ -112,12 +112,12 @@ install_datadir: - clean: - rm -rf $(CLEAN) - --%.o: %.cpp Makefile -+%.o: %.cpp - @mkdir -p .depend - $(E) Building module $(notdir $(basename $@))... - $(Q)$(CXX) $(MODFLAGS) -c -o $@ $< $($(notdir $(basename $@))CXXFLAGS) -MD -MF .depend/$(notdir $@).dep - --%.so: %.o Makefile -+%.so: %.o - $(E) "Linking module" $(notdir $(basename $@))... - $(Q)$(CXX) $(MODFLAGS) $(LDFLAGS) $(MODLINK) -o $@ $< $($(notdir $(basename $@))LDFLAGS) $(LIBS) - diff --git a/net/znc/patches/103-Csocket-Add-some-ifdef-feature-checks.patch b/net/znc/patches/103-Csocket-Add-some-ifdef-feature-checks.patch deleted file mode 100644 index a0dbe01..0000000 --- a/net/znc/patches/103-Csocket-Add-some-ifdef-feature-checks.patch +++ /dev/null @@ -1,71 +0,0 @@ -From d81a18d87d15bbf54ddbd675bfa829cf7dfdce9e Mon Sep 17 00:00:00 2001 -From: Edoardo Spadolini -Date: Mon, 8 Feb 2016 14:01:51 +0100 -Subject: [PATCH] Add some #ifdef feature checks to fix compilation with - BoringSSL - ---- - Csocket.cc | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - ---- a/src/Csocket.cpp -+++ b/src/Csocket.cpp -@@ -45,9 +45,12 @@ - - #ifdef HAVE_LIBSSL - #include -+#include - #include - #include -+#ifndef OPENSSL_NO_COMP - #include -+#endif - #endif /* HAVE_LIBSSL */ - - #ifdef HAVE_ICU -@@ -531,8 +534,12 @@ void ShutdownCsocket() - { - #ifdef HAVE_LIBSSL - ERR_remove_state( 0 ); -+#ifndef OPENSSL_NO_ENGINE - ENGINE_cleanup(); -+#endif -+#ifndef OPENSSL_IS_BORINGSSL - CONF_modules_unload( 1 ); -+#endif - ERR_free_strings(); - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); -@@ -573,6 +580,7 @@ bool InitSSL( ECompType eCompressionType - } - #endif /* _WIN32 */ - -+#ifndef OPENSSL_NO_COMP - COMP_METHOD *cm = NULL; - - if( CT_ZLIB & eCompressionType ) -@@ -588,6 +596,7 @@ bool InitSSL( ECompType eCompressionType - if( cm ) - SSL_COMP_add_compression_method( CT_RLE, cm ); - } -+#endif - - // setting this up once in the begining - s_iCsockSSLIdx = SSL_get_ex_new_index( 0, NULL, NULL, NULL, NULL ); -@@ -1724,6 +1733,8 @@ SSL_CTX * Csock::SetupServerCTX() - #ifndef OPENSSL_NO_ECDH - // Errors for the following block are non-fatal (ECDHE is nice to have - // but not a requirement) -+#ifndef OPENSSL_IS_BORINGSSL -+ // BoringSSL does this thing automatically - #if defined( SSL_CTX_set_ecdh_auto ) - // Auto-select sensible curve - if( !SSL_CTX_set_ecdh_auto( pCTX , 1 ) ) -@@ -1742,6 +1753,7 @@ SSL_CTX * Csock::SetupServerCTX() - ERR_clear_error(); - } - #endif /* SSL_CTX_set_tmp_ecdh */ -+#endif /* !OPENSSL_IS_BORINGSSL */ - #endif /* OPENSSL_NO_ECDH */ - - if( !ConfigureCTXOptions( pCTX ) ) diff --git a/net/znc/patches/104-disable-empty-modules-check.patch b/net/znc/patches/104-disable-empty-modules-check.patch deleted file mode 100644 index 22b5c38..0000000 --- a/net/znc/patches/104-disable-empty-modules-check.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -296,10 +296,12 @@ int main(int argc, char** argv) { - CUtils::PrintStatus(false, ""); - CUtils::PrintError("No modules found. Perhaps you didn't install ZNC properly?"); - CUtils::PrintError("Read http://wiki.znc.in/Installation for instructions."); -+#if 0 - if (!CUtils::GetBoolInput("Do you really want to run ZNC without any modules?", false)) { - CZNC::DestroyInstance(); - return 1; - } -+#endif - } - CUtils::PrintStatus(true, ""); - } diff --git a/net/znc/patches/110-add-playback-module.patch b/net/znc/patches/110-add-playback-module.patch deleted file mode 100644 index 41a4f36..0000000 --- a/net/znc/patches/110-add-playback-module.patch +++ /dev/null @@ -1,291 +0,0 @@ ---- /dev/null -+++ b/modules/playback.cpp -@@ -0,0 +1,288 @@ -+/* -+ * Copyright (C) 2015 J-P Nurmi -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#if (VERSION_MAJOR < 1) || (VERSION_MAJOR == 1 && VERSION_MINOR < 6) -+#error The playback module requires ZNC version 1.6.0 or later. -+#endif -+ -+static const char* PlaybackCap = "znc.in/playback"; -+ -+class CPlaybackMod : public CModule -+{ -+public: -+ MODCONSTRUCTOR(CPlaybackMod) -+ { -+ m_play = false; -+ AddHelpCommand(); -+ AddCommand("Clear", static_cast(&CPlaybackMod::ClearCommand), "", "Clears playback for given buffers."); -+ AddCommand("Play", static_cast(&CPlaybackMod::PlayCommand), " [from] [to]", "Sends playback for given buffers."); -+ AddCommand("List", static_cast(&CPlaybackMod::ListCommand), "[buffer(s)]", "Lists available/matching buffers."); -+ AddCommand("Limit", static_cast(&CPlaybackMod::LimitCommand), " [limit]", "Get/set the buffer limit (<= 0 to clear) for the given client."); -+ } -+ -+ void OnClientCapLs(CClient* client, SCString& caps) override -+ { -+ caps.insert(PlaybackCap); -+ } -+ -+ bool IsClientCapSupported(CClient* client, const CString& cap, bool state) override -+ { -+ return cap.Equals(PlaybackCap); -+ } -+ -+ EModRet OnChanBufferStarting(CChan& chan, CClient& client) override -+ { -+ if (!m_play && client.IsCapEnabled(PlaybackCap)) -+ return HALTCORE; -+ return CONTINUE; -+ } -+ -+ EModRet OnChanBufferPlayLine(CChan& chan, CClient& client, CString& line) override -+ { -+ if (!m_play && client.IsCapEnabled(PlaybackCap)) -+ return HALTCORE; -+ return CONTINUE; -+ } -+ -+ EModRet OnChanBufferEnding(CChan& chan, CClient& client) override -+ { -+ if (!m_play && client.IsCapEnabled(PlaybackCap)) -+ return HALTCORE; -+ return CONTINUE; -+ } -+ -+ EModRet OnPrivBufferPlayLine(CClient& client, CString& line) override -+ { -+ if (!m_play && client.IsCapEnabled(PlaybackCap)) -+ return HALTCORE; -+ return CONTINUE; -+ } -+ -+ void ClearCommand(const CString& line) -+ { -+ // CLEAR -+ const CString arg = line.Token(1); -+ if (arg.empty() || !line.Token(2).empty()) -+ return; -+ std::vector chans = FindChans(arg); -+ for (CChan* chan : chans) -+ chan->ClearBuffer(); -+ std::vector queries = FindQueries(arg); -+ for (CQuery* query : queries) -+ query->ClearBuffer(); -+ } -+ -+ void PlayCommand(const CString& line) -+ { -+ // PLAY [from] [to] -+ const CString arg = line.Token(1); -+ if (arg.empty() || !line.Token(4).empty()) -+ return; -+ double from = line.Token(2).ToDouble(); -+ double to = DBL_MAX; -+ if (!line.Token(3).empty()) -+ to = line.Token(3).ToDouble(); -+ int limit = -1; -+ if (CClient* client = GetClient()) -+ limit = GetLimit(client->GetIdentifier()); -+ std::vector chans = FindChans(arg); -+ for (CChan* chan : chans) { -+ if (chan->IsOn() && !chan->IsDetached()) { -+ CBuffer lines = GetLines(chan->GetBuffer(), from, to, limit); -+ m_play = true; -+ chan->SendBuffer(GetClient(), lines); -+ m_play = false; -+ } -+ } -+ std::vector queries = FindQueries(arg); -+ for (CQuery* query : queries) { -+ CBuffer lines = GetLines(query->GetBuffer(), from, to, limit); -+ m_play = true; -+ query->SendBuffer(GetClient(), lines); -+ m_play = false; -+ } -+ } -+ -+ void ListCommand(const CString& line) -+ { -+ // LIST [buffer(s)] -+ CString arg = line.Token(1); -+ if (arg.empty()) -+ arg = "*"; -+ std::vector chans = FindChans(arg); -+ for (CChan* chan : chans) { -+ if (chan->IsOn() && !chan->IsDetached()) { -+ CBuffer buffer = chan->GetBuffer(); -+ if (!buffer.IsEmpty()) { -+ timeval from = UniversalTime(buffer.GetBufLine(0).GetTime()); -+ timeval to = UniversalTime(buffer.GetBufLine(buffer.Size() - 1).GetTime()); -+ PutModule(chan->GetName() + " " + CString(Timestamp(from)) + " " + CString(Timestamp(to))); -+ } -+ } -+ } -+ std::vector queries = FindQueries(arg); -+ for (CQuery* query : queries) { -+ CBuffer buffer = query->GetBuffer(); -+ if (!buffer.IsEmpty()) { -+ timeval from = UniversalTime(buffer.GetBufLine(0).GetTime()); -+ timeval to = UniversalTime(buffer.GetBufLine(buffer.Size() - 1).GetTime()); -+ PutModule(query->GetName() + " " + CString(Timestamp(from)) + " " + CString(Timestamp(to))); -+ } -+ } -+ } -+ -+ void LimitCommand(const CString& line) -+ { -+ // LIMIT [limit] -+ const CString client = line.Token(1); -+ if (client.empty()) { -+ PutModule("Usage: LIMIT [limit]"); -+ return; -+ } -+ const CString arg = line.Token(2); -+ int limit = GetLimit(client); -+ if (!arg.empty()) { -+ limit = arg.ToInt(); -+ SetLimit(client, limit); -+ } -+ if (limit <= 0) -+ PutModule(client + " buffer limit: -"); -+ else -+ PutModule(client + " buffer limit: " + CString(limit)); -+ } -+ -+ EModRet OnSendToClient(CString& line, CClient& client) override -+ { -+ if (client.IsAttached() && client.IsCapEnabled(PlaybackCap) && !line.Token(0).Equals("CAP")) { -+ MCString tags = CUtils::GetMessageTags(line); -+ if (tags.find("time") == tags.end()) { -+ // CUtils::FormatServerTime() converts to UTC -+ tags["time"] = CUtils::FormatServerTime(LocalTime()); -+ CUtils::SetMessageTags(line, tags); -+ } -+ } -+ return CONTINUE; -+ } -+ -+private: -+ static double Timestamp(timeval tv) -+ { -+ return tv.tv_sec + tv.tv_usec / 1000000.0; -+ } -+ -+ static timeval LocalTime() -+ { -+ timeval tv; -+ if (gettimeofday(&tv, NULL) == -1) { -+ tv.tv_sec = time(NULL); -+ tv.tv_usec = 0; -+ } -+ return tv; -+ } -+ -+ static timeval UniversalTime(timeval tv = LocalTime()) -+ { -+ tm stm; -+ memset(&stm, 0, sizeof(stm)); -+ const time_t secs = tv.tv_sec; // OpenBSD has tv_sec as int, so explicitly convert it to time_t to make gmtime_r() happy -+ gmtime_r(&secs, &stm); -+ const char* tz = getenv("TZ"); -+ setenv("TZ", "UTC", 1); -+ tzset(); -+ tv.tv_sec = mktime(&stm); -+ if (tz) -+ setenv("TZ", tz, 1); -+ else -+ unsetenv("TZ"); -+ tzset(); -+ return tv; -+ } -+ -+ std::vector FindChans(const CString& arg) const -+ { -+ std::vector chans; -+ CIRCNetwork* network = GetNetwork(); -+ if (network) { -+ VCString vargs; -+ arg.Split(",", vargs, false); -+ -+ for (const CString& name : vargs) { -+ std::vector found = network->FindChans(name); -+ chans.insert(chans.end(), found.begin(), found.end()); -+ } -+ } -+ return chans; -+ } -+ -+ std::vector FindQueries(const CString& arg) const -+ { -+ std::vector queries; -+ CIRCNetwork* network = GetNetwork(); -+ if (network) { -+ VCString vargs; -+ arg.Split(",", vargs, false); -+ -+ for (const CString& name : vargs) { -+ std::vector found = network->FindQueries(name); -+ queries.insert(queries.end(), found.begin(), found.end()); -+ } -+ } -+ return queries; -+ } -+ -+ int GetLimit(const CString& client) const -+ { -+ return GetNV(client).ToInt(); -+ } -+ -+ void SetLimit(const CString& client, int limit) -+ { -+ if (limit > 0) -+ SetNV(client, CString(limit)); -+ else -+ DelNV(client); -+ } -+ -+ static CBuffer GetLines(const CBuffer& buffer, double from, double to, int limit) -+ { -+ CBuffer lines(buffer.Size()); -+ for (size_t i = 0; i < buffer.Size(); ++i) { -+ const CBufLine& line = buffer.GetBufLine(i); -+ timeval tv = UniversalTime(line.GetTime()); -+ if (from < Timestamp(tv) && to >= Timestamp(tv)) -+ lines.AddLine(line.GetFormat(), line.GetText(), &tv); -+ } -+ if (limit > 0) -+ lines.SetLineCount(limit); -+ return lines; -+ } -+ -+ bool m_play; -+}; -+ -+GLOBALMODULEDEFS(CPlaybackMod, "An advanced playback module for ZNC") diff --git a/sound/alsa-utils/Makefile b/sound/alsa-utils/Makefile deleted file mode 100644 index 0c01a6e..0000000 --- a/sound/alsa-utils/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=alsa-utils -PKG_VERSION:=1.1.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \ - http://alsa.cybermirror.org/utils/ -PKG_MD5SUM:=b9d6102fbbd0b68040bb77023ed30c0c -PKG_INSTALL:=1 -PKG_MAINTAINER:=Ted Hess - -include $(INCLUDE_DIR)/package.mk - -define Package/alsa-utils - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+alsa-lib +libncursesw +libpthread - TITLE:=ALSA (Advanced Linux Sound Architecture) utilities - URL:=http://www.alsa-project.org/ -endef - -define Package/alsa-utils-seq - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+alsa-lib +libpthread - TITLE:=ALSA sequencer utilities - URL:=http://www.alsa-project.org/ -endef - -define Package/alsa-utils-tests - SECTION:=sound - CATEGORY:=Sound - TITLE:=ALSA utilities test data (adds ~1.3M to image) - DEPENDS:=+alsa-lib +libpthread - URL:=http://www.alsa-project.org/ -endef - -CONFIGURE_ARGS+= \ - --disable-rpath \ - --disable-alsatest \ - --disable-bat \ - --disable-xmlto \ - --with-curses=ncursesw - -define Package/alsa-utils/install - $(INSTALL_DIR) $(1)/usr/{s,}bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amixer $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/alsamixer $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aplay $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arecord $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/alsactl $(1)/usr/sbin/ - - $(INSTALL_DIR) $(1)/usr/share/alsa/init - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/share/alsa/init/* \ - $(1)/usr/share/alsa/init/ -endef - -define Package/alsa-utils-seq/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aconnect $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amidi $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aplaymidi $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arecordmidi $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aseqdump $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aseqnet $(1)/usr/bin/ -endef - -define Package/alsa-utils-tests/install - $(INSTALL_DIR) $(1)/usr/{s,}bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/speaker-test $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/sounds/alsa - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/share/sounds/alsa/* \ - $(1)/usr/share/sounds/alsa/ -endef - -$(eval $(call BuildPackage,alsa-utils)) -$(eval $(call BuildPackage,alsa-utils-seq)) -$(eval $(call BuildPackage,alsa-utils-tests)) diff --git a/sound/alsa-utils/patches/100-uClibc-compat.patch b/sound/alsa-utils/patches/100-uClibc-compat.patch deleted file mode 100644 index 987c9b8..0000000 --- a/sound/alsa-utils/patches/100-uClibc-compat.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/alsamixer/volume_mapping.c -+++ b/alsamixer/volume_mapping.c -@@ -114,9 +114,9 @@ static double get_normalized_volume(snd_ - if (use_linear_dB_scale(min, max)) - return (value - min) / (double)(max - min); - -- normalized = exp10((value - max) / 6000.0); -+ normalized = pow(10, (value - max) / 6000.0); - if (min != SND_CTL_TLV_DB_GAIN_MUTE) { -- min_norm = exp10((min - max) / 6000.0); -+ min_norm = pow(10, (min - max) / 6000.0); - normalized = (normalized - min_norm) / (1 - min_norm); - } - -@@ -149,7 +149,7 @@ static int set_normalized_volume(snd_mix - } - - if (min != SND_CTL_TLV_DB_GAIN_MUTE) { -- min_norm = exp10((min - max) / 6000.0); -+ min_norm = pow(10, (min - max) / 6000.0); - volume = volume * (1 - min_norm) + min_norm; - } - value = lrint_dir(6000.0 * log10(volume), dir) + max; diff --git a/sound/espeak/Makefile b/sound/espeak/Makefile deleted file mode 100644 index fd06c6e..0000000 --- a/sound/espeak/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=espeak -PKG_VERSION:=1.48.04 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-source.zip -PKG_SOURCE_URL:=@SF/espeak -PKG_MD5SUM:=cadd7482eaafe9239546bdc09fa244c3 - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=License.txt -PKG_MAINTAINER:=Nicolas Thill - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-source -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/espeak - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+libpthread +libstdcpp +portaudio - TITLE:=Speech synthesizer - URL:=http://espeak.sourceforge.net/ -endef - -define Package/espeak/description - eSpeak is a compact open source software speech synthesizer for English and - other languages. -endef - -MAKE_FLAGS+= \ - AUDIO="portaudio" \ - DATADIR="/usr/share/espeak" \ - CXXFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - -MAKE_PATH:=./src - -define Package/espeak/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/espeak $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libespeak.so.* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/share - $(CP) $(PKG_INSTALL_DIR)/usr/share/espeak $(1)/usr/share/ -endef - -$(eval $(call BuildPackage,espeak)) diff --git a/sound/espeak/patches/101-portaudio.patch b/sound/espeak/patches/101-portaudio.patch deleted file mode 100644 index ff396b3..0000000 --- a/sound/espeak/patches/101-portaudio.patch +++ /dev/null @@ -1,2093 +0,0 @@ ---- a/src/portaudio.h -+++ /dev/null -@@ -1,466 +0,0 @@ --// NOTE: Copy this file to portaudio.h in order to compile with V18 portaudio -- -- --#ifndef PORT_AUDIO_H --#define PORT_AUDIO_H -- --#ifdef __cplusplus --extern "C" --{ --#endif /* __cplusplus */ -- --/* -- * $Id: portaudio.h,v 1.5 2002/03/26 18:04:22 philburk Exp $ -- * PortAudio Portable Real-Time Audio Library -- * PortAudio API Header File -- * Latest version available at: http://www.audiomulch.com/portaudio/ -- * -- * Copyright (c) 1999-2000 Ross Bencina and Phil Burk -- * -- * Permission is hereby granted, free of charge, to any person obtaining -- * a copy of this software and associated documentation files -- * (the "Software"), to deal in the Software without restriction, -- * including without limitation the rights to use, copy, modify, merge, -- * publish, distribute, sublicense, and/or sell copies of the Software, -- * and to permit persons to whom the Software is furnished to do so, -- * subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be -- * included in all copies or substantial portions of the Software. -- * -- * Any person wishing to distribute modifications to the Software is -- * requested to send the modifications to the original developer so that -- * they can be incorporated into the canonical version. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- * -- */ -- --typedef int PaError; --typedef enum { -- paNoError = 0, -- -- paHostError = -10000, -- paInvalidChannelCount, -- paInvalidSampleRate, -- paInvalidDeviceId, -- paInvalidFlag, -- paSampleFormatNotSupported, -- paBadIODeviceCombination, -- paInsufficientMemory, -- paBufferTooBig, -- paBufferTooSmall, -- paNullCallback, -- paBadStreamPtr, -- paTimedOut, -- paInternalError, -- paDeviceUnavailable --} PaErrorNum; -- --/* -- Pa_Initialize() is the library initialisation function - call this before -- using the library. -- --*/ -- --PaError Pa_Initialize( void ); -- --/* -- Pa_Terminate() is the library termination function - call this after -- using the library. -- --*/ -- --PaError Pa_Terminate( void ); -- --/* -- Pa_GetHostError() returns a host specific error code. -- This can be called after receiving a PortAudio error code of paHostError. -- --*/ -- --long Pa_GetHostError( void ); -- --/* -- Pa_GetErrorText() translates the supplied PortAudio error number -- into a human readable message. -- --*/ -- --const char *Pa_GetErrorText( PaError errnum ); -- --/* -- Sample formats -- -- These are formats used to pass sound data between the callback and the -- stream. Each device has a "native" format which may be used when optimum -- efficiency or control over conversion is required. -- -- Formats marked "always available" are supported (emulated) by all -- PortAudio implementations. -- -- The floating point representation (paFloat32) uses +1.0 and -1.0 as the -- maximum and minimum respectively. -- -- paUInt8 is an unsigned 8 bit format where 128 is considered "ground" -- --*/ -- --typedef unsigned long PaSampleFormat; --#define paFloat32 ((PaSampleFormat) (1<<0)) /*always available*/ --#define paInt16 ((PaSampleFormat) (1<<1)) /*always available*/ --#define paInt32 ((PaSampleFormat) (1<<2)) /*always available*/ --#define paInt24 ((PaSampleFormat) (1<<3)) --#define paPackedInt24 ((PaSampleFormat) (1<<4)) --#define paInt8 ((PaSampleFormat) (1<<5)) --#define paUInt8 ((PaSampleFormat) (1<<6)) --#define paCustomFormat ((PaSampleFormat) (1<<16)) -- --/* -- Device enumeration mechanism. -- -- Device ids range from 0 to Pa_CountDevices()-1. -- -- Devices may support input, output or both. -- --*/ -- --typedef int PaDeviceID; --#define paNoDevice -1 -- --int Pa_CountDevices( void ); -- --typedef struct --{ -- int structVersion; -- const char *name; -- int maxInputChannels; -- int maxOutputChannels; -- /* Number of discrete rates, or -1 if range supported. */ -- int numSampleRates; -- /* Array of supported sample rates, or {min,max} if range supported. */ -- const double *sampleRates; -- PaSampleFormat nativeSampleFormats; --} --PaDeviceInfo; -- --/* -- Pa_GetDefaultInputDeviceID(), Pa_GetDefaultOutputDeviceID() return the -- default device ids for input and output respectively, or paNoDevice if -- no device is available. -- The result can be passed to Pa_OpenStream(). -- -- On the PC, the user can specify a default device by -- setting an environment variable. For example, to use device #1. -- -- set PA_RECOMMENDED_OUTPUT_DEVICE=1 -- -- The user should first determine the available device ids by using -- the supplied application "pa_devs". -- --*/ -- --PaDeviceID Pa_GetDefaultInputDeviceID( void ); --PaDeviceID Pa_GetDefaultOutputDeviceID( void ); -- -- -- --/* -- Pa_GetDeviceInfo() returns a pointer to an immutable PaDeviceInfo structure -- for the device specified. -- If the device parameter is out of range the function returns NULL. -- -- PortAudio manages the memory referenced by the returned pointer, the client -- must not manipulate or free the memory. The pointer is only guaranteed to be -- valid between calls to Pa_Initialize() and Pa_Terminate(). -- --*/ -- --const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceID device ); -- --/* -- PaTimestamp is used to represent a continuous sample clock with arbitrary -- start time that can be used for syncronization. The type is used for the -- outTime argument to the PortAudioCallback and as the result of Pa_StreamTime() -- --*/ -- --typedef double PaTimestamp; -- --/* -- PortAudioCallback is implemented by PortAudio clients. -- -- inputBuffer and outputBuffer are arrays of interleaved samples, -- the format, packing and number of channels used by the buffers are -- determined by parameters to Pa_OpenStream() (see below). -- -- framesPerBuffer is the number of sample frames to be processed by the callback. -- -- outTime is the time in samples when the buffer(s) processed by -- this callback will begin being played at the audio output. -- See also Pa_StreamTime() -- -- userData is the value of a user supplied pointer passed to Pa_OpenStream() -- intended for storing synthesis data etc. -- -- return value: -- The callback can return a non-zero value to stop the stream. This may be -- useful in applications such as soundfile players where a specific duration -- of output is required. However, it is not necessary to utilise this mechanism -- as StopStream() will also terminate the stream. A callback returning a -- non-zero value must fill the entire outputBuffer. -- -- NOTE: None of the other stream functions may be called from within the -- callback function except for Pa_GetCPULoad(). -- --*/ -- --typedef int (PortAudioCallback)( -- void *inputBuffer, void *outputBuffer, -- unsigned long framesPerBuffer, -- PaTimestamp outTime, void *userData ); -- -- --/* -- Stream flags -- -- These flags may be supplied (ored together) in the streamFlags argument to -- the Pa_OpenStream() function. -- --*/ -- --#define paNoFlag (0) --#define paClipOff (1<<0) /* disable default clipping of out of range samples */ --#define paDitherOff (1<<1) /* disable default dithering */ --#define paPlatformSpecificFlags (0x00010000) --typedef unsigned long PaStreamFlags; -- --/* -- A single PortAudioStream provides multiple channels of real-time -- input and output audio streaming to a client application. -- Pointers to PortAudioStream objects are passed between PortAudio functions. --*/ -- --typedef void PortAudioStream; --#define PaStream PortAudioStream -- --/* -- Pa_OpenStream() opens a stream for either input, output or both. -- -- stream is the address of a PortAudioStream pointer which will receive -- a pointer to the newly opened stream. -- -- inputDevice is the id of the device used for input (see PaDeviceID above.) -- inputDevice may be paNoDevice to indicate that an input device is not required. -- -- numInputChannels is the number of channels of sound to be delivered to the -- callback. It can range from 1 to the value of maxInputChannels in the -- PaDeviceInfo record for the device specified by the inputDevice parameter. -- If inputDevice is paNoDevice numInputChannels is ignored. -- -- inputSampleFormat is the sample format of inputBuffer provided to the callback -- function. inputSampleFormat may be any of the formats described by the -- PaSampleFormat enumeration (see above). PortAudio guarantees support for -- the device's native formats (nativeSampleFormats in the device info record) -- and additionally 16 and 32 bit integer and 32 bit floating point formats. -- Support for other formats is implementation defined. -- -- inputDriverInfo is a pointer to an optional driver specific data structure -- containing additional information for device setup or stream processing. -- inputDriverInfo is never required for correct operation. If not used -- inputDriverInfo should be NULL. -- -- outputDevice is the id of the device used for output (see PaDeviceID above.) -- outputDevice may be paNoDevice to indicate that an output device is not required. -- -- numOutputChannels is the number of channels of sound to be supplied by the -- callback. See the definition of numInputChannels above for more details. -- -- outputSampleFormat is the sample format of the outputBuffer filled by the -- callback function. See the definition of inputSampleFormat above for more -- details. -- -- outputDriverInfo is a pointer to an optional driver specific data structure -- containing additional information for device setup or stream processing. -- outputDriverInfo is never required for correct operation. If not used -- outputDriverInfo should be NULL. -- -- sampleRate is the desired sampleRate. For full-duplex streams it is the -- sample rate for both input and output -- -- framesPerBuffer is the length in sample frames of all internal sample buffers -- used for communication with platform specific audio routines. Wherever -- possible this corresponds to the framesPerBuffer parameter passed to the -- callback function. -- -- numberOfBuffers is the number of buffers used for multibuffered communication -- with the platform specific audio routines. If you pass zero, then an optimum -- value will be chosen for you internally. This parameter is provided only -- as a guide - and does not imply that an implementation must use multibuffered -- i/o when reliable double buffering is available (such as SndPlayDoubleBuffer() -- on the Macintosh.) -- -- streamFlags may contain a combination of flags ORed together. -- These flags modify the behaviour of the streaming process. Some flags may only -- be relevant to certain buffer formats. -- -- callback is a pointer to a client supplied function that is responsible -- for processing and filling input and output buffers (see above for details.) -- -- userData is a client supplied pointer which is passed to the callback -- function. It could for example, contain a pointer to instance data necessary -- for processing the audio buffers. -- -- return value: -- Upon success Pa_OpenStream() returns PaNoError and places a pointer to a -- valid PortAudioStream in the stream argument. The stream is inactive (stopped). -- If a call to Pa_OpenStream() fails a non-zero error code is returned (see -- PaError above) and the value of stream is invalid. -- --*/ -- --PaError Pa_OpenStream( PortAudioStream** stream, -- PaDeviceID inputDevice, -- int numInputChannels, -- PaSampleFormat inputSampleFormat, -- void *inputDriverInfo, -- PaDeviceID outputDevice, -- int numOutputChannels, -- PaSampleFormat outputSampleFormat, -- void *outputDriverInfo, -- double sampleRate, -- unsigned long framesPerBuffer, -- unsigned long numberOfBuffers, -- PaStreamFlags streamFlags, -- PortAudioCallback *callback, -- void *userData ); -- -- --/* -- Pa_OpenDefaultStream() is a simplified version of Pa_OpenStream() that opens -- the default input and/or output devices. Most parameters have identical meaning -- to their Pa_OpenStream() counterparts, with the following exceptions: -- -- If either numInputChannels or numOutputChannels is 0 the respective device -- is not opened. This has the same effect as passing paNoDevice in the device -- arguments to Pa_OpenStream(). -- -- sampleFormat applies to both the input and output buffers. -- --*/ -- --PaError Pa_OpenDefaultStream( PortAudioStream** stream, -- int numInputChannels, -- int numOutputChannels, -- PaSampleFormat sampleFormat, -- double sampleRate, -- unsigned long framesPerBuffer, -- unsigned long numberOfBuffers, -- PortAudioCallback *callback, -- void *userData ); -- --/* -- Pa_CloseStream() closes an audio stream, flushing any pending buffers. -- --*/ -- --PaError Pa_CloseStream( PortAudioStream* ); -- --/* -- Pa_StartStream() and Pa_StopStream() begin and terminate audio processing. -- Pa_StopStream() waits until all pending audio buffers have been played. -- Pa_AbortStream() stops playing immediately without waiting for pending -- buffers to complete. -- --*/ -- --PaError Pa_StartStream( PortAudioStream *stream ); -- --PaError Pa_StopStream( PortAudioStream *stream ); -- --PaError Pa_AbortStream( PortAudioStream *stream ); -- --/* -- Pa_StreamActive() returns one (1) when the stream is active (ie playing -- or recording audio), zero (0) when not playing, or a negative error number -- if the stream is invalid. -- The stream is active between calls to Pa_StartStream() and Pa_StopStream(), -- but may also become inactive if the callback returns a non-zero value. -- In the latter case, the stream is considered inactive after the last -- buffer has finished playing. -- --*/ -- --PaError Pa_StreamActive( PortAudioStream *stream ); -- --/* -- Pa_StreamTime() returns the current output time in samples for the stream. -- This time may be used as a time reference (for example synchronizing audio to -- MIDI). -- --*/ -- --PaTimestamp Pa_StreamTime( PortAudioStream *stream ); -- --/* -- Pa_GetCPULoad() returns the CPU Load for the stream. -- The "CPU Load" is a fraction of total CPU time consumed by the stream's -- audio processing routines including, but not limited to the client supplied -- callback. -- A value of 0.5 would imply that PortAudio and the sound generating -- callback was consuming roughly 50% of the available CPU time. -- This function may be called from the callback function or the application. -- --*/ -- --double Pa_GetCPULoad( PortAudioStream* stream ); -- --/* -- Pa_GetMinNumBuffers() returns the minimum number of buffers required by -- the current host based on minimum latency. -- On the PC, for the DirectSound implementation, latency can be optionally set -- by user by setting an environment variable. -- For example, to set latency to 200 msec, put: -- -- set PA_MIN_LATENCY_MSEC=200 -- -- in the AUTOEXEC.BAT file and reboot. -- If the environment variable is not set, then the latency will be determined -- based on the OS. Windows NT has higher latency than Win95. -- --*/ -- --int Pa_GetMinNumBuffers( int framesPerBuffer, double sampleRate ); -- --/* -- Pa_Sleep() puts the caller to sleep for at least 'msec' milliseconds. -- You may sleep longer than the requested time so don't rely on this for -- accurate musical timing. -- -- Pa_Sleep() is provided as a convenience for authors of portable code (such as -- the tests and examples in the PortAudio distribution.) -- --*/ -- --void Pa_Sleep( long msec ); -- --/* -- Pa_GetSampleSize() returns the size in bytes of a single sample in the -- supplied PaSampleFormat, or paSampleFormatNotSupported if the format is -- no supported. -- --*/ -- --PaError Pa_GetSampleSize( PaSampleFormat format ); -- -- --#ifdef __cplusplus --} --#endif /* __cplusplus */ --#endif /* PORT_AUDIO_H */ ---- a/src/portaudio18.h -+++ /dev/null -@@ -1,466 +0,0 @@ --// NOTE: Copy this file to portaudio.h in order to compile with V18 portaudio -- -- --#ifndef PORT_AUDIO_H --#define PORT_AUDIO_H -- --#ifdef __cplusplus --extern "C" --{ --#endif /* __cplusplus */ -- --/* -- * $Id: portaudio.h,v 1.5 2002/03/26 18:04:22 philburk Exp $ -- * PortAudio Portable Real-Time Audio Library -- * PortAudio API Header File -- * Latest version available at: http://www.audiomulch.com/portaudio/ -- * -- * Copyright (c) 1999-2000 Ross Bencina and Phil Burk -- * -- * Permission is hereby granted, free of charge, to any person obtaining -- * a copy of this software and associated documentation files -- * (the "Software"), to deal in the Software without restriction, -- * including without limitation the rights to use, copy, modify, merge, -- * publish, distribute, sublicense, and/or sell copies of the Software, -- * and to permit persons to whom the Software is furnished to do so, -- * subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be -- * included in all copies or substantial portions of the Software. -- * -- * Any person wishing to distribute modifications to the Software is -- * requested to send the modifications to the original developer so that -- * they can be incorporated into the canonical version. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- * -- */ -- --typedef int PaError; --typedef enum { -- paNoError = 0, -- -- paHostError = -10000, -- paInvalidChannelCount, -- paInvalidSampleRate, -- paInvalidDeviceId, -- paInvalidFlag, -- paSampleFormatNotSupported, -- paBadIODeviceCombination, -- paInsufficientMemory, -- paBufferTooBig, -- paBufferTooSmall, -- paNullCallback, -- paBadStreamPtr, -- paTimedOut, -- paInternalError, -- paDeviceUnavailable --} PaErrorNum; -- --/* -- Pa_Initialize() is the library initialisation function - call this before -- using the library. -- --*/ -- --PaError Pa_Initialize( void ); -- --/* -- Pa_Terminate() is the library termination function - call this after -- using the library. -- --*/ -- --PaError Pa_Terminate( void ); -- --/* -- Pa_GetHostError() returns a host specific error code. -- This can be called after receiving a PortAudio error code of paHostError. -- --*/ -- --long Pa_GetHostError( void ); -- --/* -- Pa_GetErrorText() translates the supplied PortAudio error number -- into a human readable message. -- --*/ -- --const char *Pa_GetErrorText( PaError errnum ); -- --/* -- Sample formats -- -- These are formats used to pass sound data between the callback and the -- stream. Each device has a "native" format which may be used when optimum -- efficiency or control over conversion is required. -- -- Formats marked "always available" are supported (emulated) by all -- PortAudio implementations. -- -- The floating point representation (paFloat32) uses +1.0 and -1.0 as the -- maximum and minimum respectively. -- -- paUInt8 is an unsigned 8 bit format where 128 is considered "ground" -- --*/ -- --typedef unsigned long PaSampleFormat; --#define paFloat32 ((PaSampleFormat) (1<<0)) /*always available*/ --#define paInt16 ((PaSampleFormat) (1<<1)) /*always available*/ --#define paInt32 ((PaSampleFormat) (1<<2)) /*always available*/ --#define paInt24 ((PaSampleFormat) (1<<3)) --#define paPackedInt24 ((PaSampleFormat) (1<<4)) --#define paInt8 ((PaSampleFormat) (1<<5)) --#define paUInt8 ((PaSampleFormat) (1<<6)) --#define paCustomFormat ((PaSampleFormat) (1<<16)) -- --/* -- Device enumeration mechanism. -- -- Device ids range from 0 to Pa_CountDevices()-1. -- -- Devices may support input, output or both. -- --*/ -- --typedef int PaDeviceID; --#define paNoDevice -1 -- --int Pa_CountDevices( void ); -- --typedef struct --{ -- int structVersion; -- const char *name; -- int maxInputChannels; -- int maxOutputChannels; -- /* Number of discrete rates, or -1 if range supported. */ -- int numSampleRates; -- /* Array of supported sample rates, or {min,max} if range supported. */ -- const double *sampleRates; -- PaSampleFormat nativeSampleFormats; --} --PaDeviceInfo; -- --/* -- Pa_GetDefaultInputDeviceID(), Pa_GetDefaultOutputDeviceID() return the -- default device ids for input and output respectively, or paNoDevice if -- no device is available. -- The result can be passed to Pa_OpenStream(). -- -- On the PC, the user can specify a default device by -- setting an environment variable. For example, to use device #1. -- -- set PA_RECOMMENDED_OUTPUT_DEVICE=1 -- -- The user should first determine the available device ids by using -- the supplied application "pa_devs". -- --*/ -- --PaDeviceID Pa_GetDefaultInputDeviceID( void ); --PaDeviceID Pa_GetDefaultOutputDeviceID( void ); -- -- -- --/* -- Pa_GetDeviceInfo() returns a pointer to an immutable PaDeviceInfo structure -- for the device specified. -- If the device parameter is out of range the function returns NULL. -- -- PortAudio manages the memory referenced by the returned pointer, the client -- must not manipulate or free the memory. The pointer is only guaranteed to be -- valid between calls to Pa_Initialize() and Pa_Terminate(). -- --*/ -- --const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceID device ); -- --/* -- PaTimestamp is used to represent a continuous sample clock with arbitrary -- start time that can be used for syncronization. The type is used for the -- outTime argument to the PortAudioCallback and as the result of Pa_StreamTime() -- --*/ -- --typedef double PaTimestamp; -- --/* -- PortAudioCallback is implemented by PortAudio clients. -- -- inputBuffer and outputBuffer are arrays of interleaved samples, -- the format, packing and number of channels used by the buffers are -- determined by parameters to Pa_OpenStream() (see below). -- -- framesPerBuffer is the number of sample frames to be processed by the callback. -- -- outTime is the time in samples when the buffer(s) processed by -- this callback will begin being played at the audio output. -- See also Pa_StreamTime() -- -- userData is the value of a user supplied pointer passed to Pa_OpenStream() -- intended for storing synthesis data etc. -- -- return value: -- The callback can return a non-zero value to stop the stream. This may be -- useful in applications such as soundfile players where a specific duration -- of output is required. However, it is not necessary to utilise this mechanism -- as StopStream() will also terminate the stream. A callback returning a -- non-zero value must fill the entire outputBuffer. -- -- NOTE: None of the other stream functions may be called from within the -- callback function except for Pa_GetCPULoad(). -- --*/ -- --typedef int (PortAudioCallback)( -- void *inputBuffer, void *outputBuffer, -- unsigned long framesPerBuffer, -- PaTimestamp outTime, void *userData ); -- -- --/* -- Stream flags -- -- These flags may be supplied (ored together) in the streamFlags argument to -- the Pa_OpenStream() function. -- --*/ -- --#define paNoFlag (0) --#define paClipOff (1<<0) /* disable default clipping of out of range samples */ --#define paDitherOff (1<<1) /* disable default dithering */ --#define paPlatformSpecificFlags (0x00010000) --typedef unsigned long PaStreamFlags; -- --/* -- A single PortAudioStream provides multiple channels of real-time -- input and output audio streaming to a client application. -- Pointers to PortAudioStream objects are passed between PortAudio functions. --*/ -- --typedef void PortAudioStream; --#define PaStream PortAudioStream -- --/* -- Pa_OpenStream() opens a stream for either input, output or both. -- -- stream is the address of a PortAudioStream pointer which will receive -- a pointer to the newly opened stream. -- -- inputDevice is the id of the device used for input (see PaDeviceID above.) -- inputDevice may be paNoDevice to indicate that an input device is not required. -- -- numInputChannels is the number of channels of sound to be delivered to the -- callback. It can range from 1 to the value of maxInputChannels in the -- PaDeviceInfo record for the device specified by the inputDevice parameter. -- If inputDevice is paNoDevice numInputChannels is ignored. -- -- inputSampleFormat is the sample format of inputBuffer provided to the callback -- function. inputSampleFormat may be any of the formats described by the -- PaSampleFormat enumeration (see above). PortAudio guarantees support for -- the device's native formats (nativeSampleFormats in the device info record) -- and additionally 16 and 32 bit integer and 32 bit floating point formats. -- Support for other formats is implementation defined. -- -- inputDriverInfo is a pointer to an optional driver specific data structure -- containing additional information for device setup or stream processing. -- inputDriverInfo is never required for correct operation. If not used -- inputDriverInfo should be NULL. -- -- outputDevice is the id of the device used for output (see PaDeviceID above.) -- outputDevice may be paNoDevice to indicate that an output device is not required. -- -- numOutputChannels is the number of channels of sound to be supplied by the -- callback. See the definition of numInputChannels above for more details. -- -- outputSampleFormat is the sample format of the outputBuffer filled by the -- callback function. See the definition of inputSampleFormat above for more -- details. -- -- outputDriverInfo is a pointer to an optional driver specific data structure -- containing additional information for device setup or stream processing. -- outputDriverInfo is never required for correct operation. If not used -- outputDriverInfo should be NULL. -- -- sampleRate is the desired sampleRate. For full-duplex streams it is the -- sample rate for both input and output -- -- framesPerBuffer is the length in sample frames of all internal sample buffers -- used for communication with platform specific audio routines. Wherever -- possible this corresponds to the framesPerBuffer parameter passed to the -- callback function. -- -- numberOfBuffers is the number of buffers used for multibuffered communication -- with the platform specific audio routines. If you pass zero, then an optimum -- value will be chosen for you internally. This parameter is provided only -- as a guide - and does not imply that an implementation must use multibuffered -- i/o when reliable double buffering is available (such as SndPlayDoubleBuffer() -- on the Macintosh.) -- -- streamFlags may contain a combination of flags ORed together. -- These flags modify the behaviour of the streaming process. Some flags may only -- be relevant to certain buffer formats. -- -- callback is a pointer to a client supplied function that is responsible -- for processing and filling input and output buffers (see above for details.) -- -- userData is a client supplied pointer which is passed to the callback -- function. It could for example, contain a pointer to instance data necessary -- for processing the audio buffers. -- -- return value: -- Upon success Pa_OpenStream() returns PaNoError and places a pointer to a -- valid PortAudioStream in the stream argument. The stream is inactive (stopped). -- If a call to Pa_OpenStream() fails a non-zero error code is returned (see -- PaError above) and the value of stream is invalid. -- --*/ -- --PaError Pa_OpenStream( PortAudioStream** stream, -- PaDeviceID inputDevice, -- int numInputChannels, -- PaSampleFormat inputSampleFormat, -- void *inputDriverInfo, -- PaDeviceID outputDevice, -- int numOutputChannels, -- PaSampleFormat outputSampleFormat, -- void *outputDriverInfo, -- double sampleRate, -- unsigned long framesPerBuffer, -- unsigned long numberOfBuffers, -- PaStreamFlags streamFlags, -- PortAudioCallback *callback, -- void *userData ); -- -- --/* -- Pa_OpenDefaultStream() is a simplified version of Pa_OpenStream() that opens -- the default input and/or output devices. Most parameters have identical meaning -- to their Pa_OpenStream() counterparts, with the following exceptions: -- -- If either numInputChannels or numOutputChannels is 0 the respective device -- is not opened. This has the same effect as passing paNoDevice in the device -- arguments to Pa_OpenStream(). -- -- sampleFormat applies to both the input and output buffers. -- --*/ -- --PaError Pa_OpenDefaultStream( PortAudioStream** stream, -- int numInputChannels, -- int numOutputChannels, -- PaSampleFormat sampleFormat, -- double sampleRate, -- unsigned long framesPerBuffer, -- unsigned long numberOfBuffers, -- PortAudioCallback *callback, -- void *userData ); -- --/* -- Pa_CloseStream() closes an audio stream, flushing any pending buffers. -- --*/ -- --PaError Pa_CloseStream( PortAudioStream* ); -- --/* -- Pa_StartStream() and Pa_StopStream() begin and terminate audio processing. -- Pa_StopStream() waits until all pending audio buffers have been played. -- Pa_AbortStream() stops playing immediately without waiting for pending -- buffers to complete. -- --*/ -- --PaError Pa_StartStream( PortAudioStream *stream ); -- --PaError Pa_StopStream( PortAudioStream *stream ); -- --PaError Pa_AbortStream( PortAudioStream *stream ); -- --/* -- Pa_StreamActive() returns one (1) when the stream is active (ie playing -- or recording audio), zero (0) when not playing, or a negative error number -- if the stream is invalid. -- The stream is active between calls to Pa_StartStream() and Pa_StopStream(), -- but may also become inactive if the callback returns a non-zero value. -- In the latter case, the stream is considered inactive after the last -- buffer has finished playing. -- --*/ -- --PaError Pa_StreamActive( PortAudioStream *stream ); -- --/* -- Pa_StreamTime() returns the current output time in samples for the stream. -- This time may be used as a time reference (for example synchronizing audio to -- MIDI). -- --*/ -- --PaTimestamp Pa_StreamTime( PortAudioStream *stream ); -- --/* -- Pa_GetCPULoad() returns the CPU Load for the stream. -- The "CPU Load" is a fraction of total CPU time consumed by the stream's -- audio processing routines including, but not limited to the client supplied -- callback. -- A value of 0.5 would imply that PortAudio and the sound generating -- callback was consuming roughly 50% of the available CPU time. -- This function may be called from the callback function or the application. -- --*/ -- --double Pa_GetCPULoad( PortAudioStream* stream ); -- --/* -- Pa_GetMinNumBuffers() returns the minimum number of buffers required by -- the current host based on minimum latency. -- On the PC, for the DirectSound implementation, latency can be optionally set -- by user by setting an environment variable. -- For example, to set latency to 200 msec, put: -- -- set PA_MIN_LATENCY_MSEC=200 -- -- in the AUTOEXEC.BAT file and reboot. -- If the environment variable is not set, then the latency will be determined -- based on the OS. Windows NT has higher latency than Win95. -- --*/ -- --int Pa_GetMinNumBuffers( int framesPerBuffer, double sampleRate ); -- --/* -- Pa_Sleep() puts the caller to sleep for at least 'msec' milliseconds. -- You may sleep longer than the requested time so don't rely on this for -- accurate musical timing. -- -- Pa_Sleep() is provided as a convenience for authors of portable code (such as -- the tests and examples in the PortAudio distribution.) -- --*/ -- --void Pa_Sleep( long msec ); -- --/* -- Pa_GetSampleSize() returns the size in bytes of a single sample in the -- supplied PaSampleFormat, or paSampleFormatNotSupported if the format is -- no supported. -- --*/ -- --PaError Pa_GetSampleSize( PaSampleFormat format ); -- -- --#ifdef __cplusplus --} --#endif /* __cplusplus */ --#endif /* PORT_AUDIO_H */ ---- a/src/portaudio19.h -+++ /dev/null -@@ -1,1127 +0,0 @@ --// NOTE: Copy this file to portaudio.h in order to compile with V19 portaudio -- --#ifndef PORTAUDIO_H --#define PORTAUDIO_H --/* -- * $Id: portaudio.h 1061 2006-06-19 22:46:41Z lschwardt $ -- * PortAudio Portable Real-Time Audio Library -- * PortAudio API Header File -- * Latest version available at: http://www.portaudio.com/ -- * -- * Copyright (c) 1999-2002 Ross Bencina and Phil Burk -- * -- * Permission is hereby granted, free of charge, to any person obtaining -- * a copy of this software and associated documentation files -- * (the "Software"), to deal in the Software without restriction, -- * including without limitation the rights to use, copy, modify, merge, -- * publish, distribute, sublicense, and/or sell copies of the Software, -- * and to permit persons to whom the Software is furnished to do so, -- * subject to the following conditions: -- * -- * The above copyright notice and this permission notice shall be -- * included in all copies or substantial portions of the Software. -- * -- * Any person wishing to distribute modifications to the Software is -- * requested to send the modifications to the original developer so that -- * they can be incorporated into the canonical version. -- * -- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -- * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- */ -- --/** @file -- @brief The PortAudio API. --*/ -- -- --#ifdef __cplusplus --extern "C" --{ --#endif /* __cplusplus */ -- -- --/** Retrieve the release number of the currently running PortAudio build, -- eg 1900. --*/ --int Pa_GetVersion( void ); -- -- --/** Retrieve a textual description of the current PortAudio build, -- eg "PortAudio V19-devel 13 October 2002". --*/ --const char* Pa_GetVersionText( void ); -- -- --/** Error codes returned by PortAudio functions. -- Note that with the exception of paNoError, all PaErrorCodes are negative. --*/ -- --typedef int PaError; --typedef enum PaErrorCode --{ -- paNoError = 0, -- -- paNotInitialized = -10000, -- paUnanticipatedHostError, -- paInvalidChannelCount, -- paInvalidSampleRate, -- paInvalidDevice, -- paInvalidFlag, -- paSampleFormatNotSupported, -- paBadIODeviceCombination, -- paInsufficientMemory, -- paBufferTooBig, -- paBufferTooSmall, -- paNullCallback, -- paBadStreamPtr, -- paTimedOut, -- paInternalError, -- paDeviceUnavailable, -- paIncompatibleHostApiSpecificStreamInfo, -- paStreamIsStopped, -- paStreamIsNotStopped, -- paInputOverflowed, -- paOutputUnderflowed, -- paHostApiNotFound, -- paInvalidHostApi, -- paCanNotReadFromACallbackStream, /**< @todo review error code name */ -- paCanNotWriteToACallbackStream, /**< @todo review error code name */ -- paCanNotReadFromAnOutputOnlyStream, /**< @todo review error code name */ -- paCanNotWriteToAnInputOnlyStream, /**< @todo review error code name */ -- paIncompatibleStreamHostApi, -- paBadBufferPtr --} PaErrorCode; -- -- --/** Translate the supplied PortAudio error code into a human readable -- message. --*/ --const char *Pa_GetErrorText( PaError errorCode ); -- -- --/** Library initialization function - call this before using PortAudio. -- This function initialises internal data structures and prepares underlying -- host APIs for use. This function MUST be called before using any other -- PortAudio API functions. -- -- If Pa_Initialize() is called multiple times, each successful -- call must be matched with a corresponding call to Pa_Terminate(). -- Pairs of calls to Pa_Initialize()/Pa_Terminate() may overlap, and are not -- required to be fully nested. -- -- Note that if Pa_Initialize() returns an error code, Pa_Terminate() should -- NOT be called. -- -- @return paNoError if successful, otherwise an error code indicating the cause -- of failure. -- -- @see Pa_Terminate --*/ --PaError Pa_Initialize( void ); -- -- --/** Library termination function - call this when finished using PortAudio. -- This function deallocates all resources allocated by PortAudio since it was -- initializied by a call to Pa_Initialize(). In cases where Pa_Initialise() has -- been called multiple times, each call must be matched with a corresponding call -- to Pa_Terminate(). The final matching call to Pa_Terminate() will automatically -- close any PortAudio streams that are still open. -- -- Pa_Terminate() MUST be called before exiting a program which uses PortAudio. -- Failure to do so may result in serious resource leaks, such as audio devices -- not being available until the next reboot. -- -- @return paNoError if successful, otherwise an error code indicating the cause -- of failure. -- -- @see Pa_Initialize --*/ --PaError Pa_Terminate( void ); -- -- -- --/** The type used to refer to audio devices. Values of this type usually -- range from 0 to (Pa_DeviceCount-1), and may also take on the PaNoDevice -- and paUseHostApiSpecificDeviceSpecification values. -- -- @see Pa_DeviceCount, paNoDevice, paUseHostApiSpecificDeviceSpecification --*/ --typedef int PaDeviceIndex; -- -- --/** A special PaDeviceIndex value indicating that no device is available, -- or should be used. -- -- @see PaDeviceIndex --*/ --#define paNoDevice ((PaDeviceIndex)-1) -- -- --/** A special PaDeviceIndex value indicating that the device(s) to be used -- are specified in the host api specific stream info structure. -- -- @see PaDeviceIndex --*/ --#define paUseHostApiSpecificDeviceSpecification ((PaDeviceIndex)-2) -- -- --/* Host API enumeration mechanism */ -- --/** The type used to enumerate to host APIs at runtime. Values of this type -- range from 0 to (Pa_GetHostApiCount()-1). -- -- @see Pa_GetHostApiCount --*/ --typedef int PaHostApiIndex; -- -- --/** Retrieve the number of available host APIs. Even if a host API is -- available it may have no devices available. -- -- @return A non-negative value indicating the number of available host APIs -- or, a PaErrorCode (which are always negative) if PortAudio is not initialized -- or an error is encountered. -- -- @see PaHostApiIndex --*/ --PaHostApiIndex Pa_GetHostApiCount( void ); -- -- --/** Retrieve the index of the default host API. The default host API will be -- the lowest common denominator host API on the current platform and is -- unlikely to provide the best performance. -- -- @return A non-negative value ranging from 0 to (Pa_GetHostApiCount()-1) -- indicating the default host API index or, a PaErrorCode (which are always -- negative) if PortAudio is not initialized or an error is encountered. --*/ --PaHostApiIndex Pa_GetDefaultHostApi( void ); -- -- --/** Unchanging unique identifiers for each supported host API. This type -- is used in the PaHostApiInfo structure. The values are guaranteed to be -- unique and to never change, thus allowing code to be written that -- conditionally uses host API specific extensions. -- -- New type ids will be allocated when support for a host API reaches -- "public alpha" status, prior to that developers should use the -- paInDevelopment type id. -- -- @see PaHostApiInfo --*/ --typedef enum PaHostApiTypeId --{ -- paInDevelopment=0, /* use while developing support for a new host API */ -- paDirectSound=1, -- paMME=2, -- paASIO=3, -- paSoundManager=4, -- paCoreAudio=5, -- paOSS=7, -- paALSA=8, -- paAL=9, -- paBeOS=10, -- paWDMKS=11, -- paJACK=12, -- paWASAPI=13, -- paAudioScienceHPI=14 --} PaHostApiTypeId; -- -- --/** A structure containing information about a particular host API. */ -- --typedef struct PaHostApiInfo --{ -- /** this is struct version 1 */ -- int structVersion; -- /** The well known unique identifier of this host API @see PaHostApiTypeId */ -- PaHostApiTypeId type; -- /** A textual description of the host API for display on user interfaces. */ -- const char *name; -- -- /** The number of devices belonging to this host API. This field may be -- used in conjunction with Pa_HostApiDeviceIndexToDeviceIndex() to enumerate -- all devices for this host API. -- @see Pa_HostApiDeviceIndexToDeviceIndex -- */ -- int deviceCount; -- -- /** The default input device for this host API. The value will be a -- device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice -- if no default input device is available. -- */ -- PaDeviceIndex defaultInputDevice; -- -- /** The default output device for this host API. The value will be a -- device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice -- if no default output device is available. -- */ -- PaDeviceIndex defaultOutputDevice; -- --} PaHostApiInfo; -- -- --/** Retrieve a pointer to a structure containing information about a specific -- host Api. -- -- @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1) -- -- @return A pointer to an immutable PaHostApiInfo structure describing -- a specific host API. If the hostApi parameter is out of range or an error -- is encountered, the function returns NULL. -- -- The returned structure is owned by the PortAudio implementation and must not -- be manipulated or freed. The pointer is only guaranteed to be valid between -- calls to Pa_Initialize() and Pa_Terminate(). --*/ --const PaHostApiInfo * Pa_GetHostApiInfo( PaHostApiIndex hostApi ); -- -- --/** Convert a static host API unique identifier, into a runtime -- host API index. -- -- @param type A unique host API identifier belonging to the PaHostApiTypeId -- enumeration. -- -- @return A valid PaHostApiIndex ranging from 0 to (Pa_GetHostApiCount()-1) or, -- a PaErrorCode (which are always negative) if PortAudio is not initialized -- or an error is encountered. -- -- The paHostApiNotFound error code indicates that the host API specified by the -- type parameter is not available. -- -- @see PaHostApiTypeId --*/ --PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type ); -- -- --/** Convert a host-API-specific device index to standard PortAudio device index. -- This function may be used in conjunction with the deviceCount field of -- PaHostApiInfo to enumerate all devices for the specified host API. -- -- @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1) -- -- @param hostApiDeviceIndex A valid per-host device index in the range -- 0 to (Pa_GetHostApiInfo(hostApi)->deviceCount-1) -- -- @return A non-negative PaDeviceIndex ranging from 0 to (Pa_GetDeviceCount()-1) -- or, a PaErrorCode (which are always negative) if PortAudio is not initialized -- or an error is encountered. -- -- A paInvalidHostApi error code indicates that the host API index specified by -- the hostApi parameter is out of range. -- -- A paInvalidDevice error code indicates that the hostApiDeviceIndex parameter -- is out of range. -- -- @see PaHostApiInfo --*/ --PaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi, -- int hostApiDeviceIndex ); -- -- -- --/** Structure used to return information about a host error condition. --*/ --typedef struct PaHostErrorInfo{ -- PaHostApiTypeId hostApiType; /**< the host API which returned the error code */ -- long errorCode; /**< the error code returned */ -- const char *errorText; /**< a textual description of the error if available, otherwise a zero-length string */ --}PaHostErrorInfo; -- -- --/** Return information about the last host error encountered. The error -- information returned by Pa_GetLastHostErrorInfo() will never be modified -- asyncronously by errors occurring in other PortAudio owned threads -- (such as the thread that manages the stream callback.) -- -- This function is provided as a last resort, primarily to enhance debugging -- by providing clients with access to all available error information. -- -- @return A pointer to an immutable structure constaining information about -- the host error. The values in this structure will only be valid if a -- PortAudio function has previously returned the paUnanticipatedHostError -- error code. --*/ --const PaHostErrorInfo* Pa_GetLastHostErrorInfo( void ); -- -- -- --/* Device enumeration and capabilities */ -- --/** Retrieve the number of available devices. The number of available devices -- may be zero. -- -- @return A non-negative value indicating the number of available devices or, -- a PaErrorCode (which are always negative) if PortAudio is not initialized -- or an error is encountered. --*/ --PaDeviceIndex Pa_GetDeviceCount( void ); -- -- --/** Retrieve the index of the default input device. The result can be -- used in the inputDevice parameter to Pa_OpenStream(). -- -- @return The default input device index for the default host API, or paNoDevice -- if no default input device is available or an error was encountered. --*/ --PaDeviceIndex Pa_GetDefaultInputDevice( void ); -- -- --/** Retrieve the index of the default output device. The result can be -- used in the outputDevice parameter to Pa_OpenStream(). -- -- @return The default output device index for the defualt host API, or paNoDevice -- if no default output device is available or an error was encountered. -- -- @note -- On the PC, the user can specify a default device by -- setting an environment variable. For example, to use device #1. --
-- set PA_RECOMMENDED_OUTPUT_DEVICE=1
--
-- The user should first determine the available device ids by using -- the supplied application "pa_devs". --*/ --PaDeviceIndex Pa_GetDefaultOutputDevice( void ); -- -- --/** The type used to represent monotonic time in seconds that can be used -- for syncronisation. The type is used for the outTime argument to the -- PaStreamCallback and as the result of Pa_GetStreamTime(). -- -- @see PaStreamCallback, Pa_GetStreamTime --*/ --typedef double PaTime; -- -- --/** A type used to specify one or more sample formats. Each value indicates -- a possible format for sound data passed to and from the stream callback, -- Pa_ReadStream and Pa_WriteStream. -- -- The standard formats paFloat32, paInt16, paInt32, paInt24, paInt8 -- and aUInt8 are usually implemented by all implementations. -- -- The floating point representation (paFloat32) uses +1.0 and -1.0 as the -- maximum and minimum respectively. -- -- paUInt8 is an unsigned 8 bit format where 128 is considered "ground" -- -- The paNonInterleaved flag indicates that a multichannel buffer is passed -- as a set of non-interleaved pointers. -- -- @see Pa_OpenStream, Pa_OpenDefaultStream, PaDeviceInfo -- @see paFloat32, paInt16, paInt32, paInt24, paInt8 -- @see paUInt8, paCustomFormat, paNonInterleaved --*/ --typedef unsigned long PaSampleFormat; -- -- --#define paFloat32 ((PaSampleFormat) 0x00000001) /**< @see PaSampleFormat */ --#define paInt32 ((PaSampleFormat) 0x00000002) /**< @see PaSampleFormat */ --#define paInt24 ((PaSampleFormat) 0x00000004) /**< Packed 24 bit format. @see PaSampleFormat */ --#define paInt16 ((PaSampleFormat) 0x00000008) /**< @see PaSampleFormat */ --#define paInt8 ((PaSampleFormat) 0x00000010) /**< @see PaSampleFormat */ --#define paUInt8 ((PaSampleFormat) 0x00000020) /**< @see PaSampleFormat */ --#define paCustomFormat ((PaSampleFormat) 0x00010000)/**< @see PaSampleFormat */ -- --#define paNonInterleaved ((PaSampleFormat) 0x80000000) -- --/** A structure providing information and capabilities of PortAudio devices. -- Devices may support input, output or both input and output. --*/ --typedef struct PaDeviceInfo --{ -- int structVersion; /* this is struct version 2 */ -- const char *name; -- PaHostApiIndex hostApi; /* note this is a host API index, not a type id*/ -- -- int maxInputChannels; -- int maxOutputChannels; -- -- /* Default latency values for interactive performance. */ -- PaTime defaultLowInputLatency; -- PaTime defaultLowOutputLatency; -- /* Default latency values for robust non-interactive applications (eg. playing sound files). */ -- PaTime defaultHighInputLatency; -- PaTime defaultHighOutputLatency; -- -- double defaultSampleRate; --} PaDeviceInfo; -- -- --/** Retrieve a pointer to a PaDeviceInfo structure containing information -- about the specified device. -- @return A pointer to an immutable PaDeviceInfo structure. If the device -- parameter is out of range the function returns NULL. -- -- @param device A valid device index in the range 0 to (Pa_GetDeviceCount()-1) -- -- @note PortAudio manages the memory referenced by the returned pointer, -- the client must not manipulate or free the memory. The pointer is only -- guaranteed to be valid between calls to Pa_Initialize() and Pa_Terminate(). -- -- @see PaDeviceInfo, PaDeviceIndex --*/ --const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceIndex device ); -- -- --/** Parameters for one direction (input or output) of a stream. --*/ --typedef struct PaStreamParameters --{ -- /** A valid device index in the range 0 to (Pa_GetDeviceCount()-1) -- specifying the device to be used or the special constant -- paUseHostApiSpecificDeviceSpecification which indicates that the actual -- device(s) to use are specified in hostApiSpecificStreamInfo. -- This field must not be set to paNoDevice. -- */ -- PaDeviceIndex device; -- -- /** The number of channels of sound to be delivered to the -- stream callback or accessed by Pa_ReadStream() or Pa_WriteStream(). -- It can range from 1 to the value of maxInputChannels in the -- PaDeviceInfo record for the device specified by the device parameter. -- */ -- int channelCount; -- -- /** The sample format of the buffer provided to the stream callback, -- a_ReadStream() or Pa_WriteStream(). It may be any of the formats described -- by the PaSampleFormat enumeration. -- */ -- PaSampleFormat sampleFormat; -- -- /** The desired latency in seconds. Where practical, implementations should -- configure their latency based on these parameters, otherwise they may -- choose the closest viable latency instead. Unless the suggested latency -- is greater than the absolute upper limit for the device implementations -- should round the suggestedLatency up to the next practial value - ie to -- provide an equal or higher latency than suggestedLatency wherever possibe. -- Actual latency values for an open stream may be retrieved using the -- inputLatency and outputLatency fields of the PaStreamInfo structure -- returned by Pa_GetStreamInfo(). -- @see default*Latency in PaDeviceInfo, *Latency in PaStreamInfo -- */ -- PaTime suggestedLatency; -- -- /** An optional pointer to a host api specific data structure -- containing additional information for device setup and/or stream processing. -- hostApiSpecificStreamInfo is never required for correct operation, -- if not used it should be set to NULL. -- */ -- void *hostApiSpecificStreamInfo; -- --} PaStreamParameters; -- -- --/** Return code for Pa_IsFormatSupported indicating success. */ --#define paFormatIsSupported (0) -- --/** Determine whether it would be possible to open a stream with the specified -- parameters. -- -- @param inputParameters A structure that describes the input parameters used to -- open a stream. The suggestedLatency field is ignored. See PaStreamParameters -- for a description of these parameters. inputParameters must be NULL for -- output-only streams. -- -- @param outputParameters A structure that describes the output parameters used -- to open a stream. The suggestedLatency field is ignored. See PaStreamParameters -- for a description of these parameters. outputParameters must be NULL for -- input-only streams. -- -- @param sampleRate The required sampleRate. For full-duplex streams it is the -- sample rate for both input and output -- -- @return Returns 0 if the format is supported, and an error code indicating why -- the format is not supported otherwise. The constant paFormatIsSupported is -- provided to compare with the return value for success. -- -- @see paFormatIsSupported, PaStreamParameters --*/ --PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters, -- const PaStreamParameters *outputParameters, -- double sampleRate ); -- -- -- --/* Streaming types and functions */ -- -- --/** -- A single PaStream can provide multiple channels of real-time -- streaming audio input and output to a client application. A stream -- provides access to audio hardware represented by one or more -- PaDevices. Depending on the underlying Host API, it may be possible -- to open multiple streams using the same device, however this behavior -- is implementation defined. Portable applications should assume that -- a PaDevice may be simultaneously used by at most one PaStream. -- -- Pointers to PaStream objects are passed between PortAudio functions that -- operate on streams. -- -- @see Pa_OpenStream, Pa_OpenDefaultStream, Pa_OpenDefaultStream, Pa_CloseStream, -- Pa_StartStream, Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive, -- Pa_GetStreamTime, Pa_GetStreamCpuLoad -- --*/ --typedef void PaStream; -- -- --/** Can be passed as the framesPerBuffer parameter to Pa_OpenStream() -- or Pa_OpenDefaultStream() to indicate that the stream callback will -- accept buffers of any size. --*/ --#define paFramesPerBufferUnspecified (0) -- -- --/** Flags used to control the behavior of a stream. They are passed as -- parameters to Pa_OpenStream or Pa_OpenDefaultStream. Multiple flags may be -- ORed together. -- -- @see Pa_OpenStream, Pa_OpenDefaultStream -- @see paNoFlag, paClipOff, paDitherOff, paNeverDropInput, -- paPrimeOutputBuffersUsingStreamCallback, paPlatformSpecificFlags --*/ --typedef unsigned long PaStreamFlags; -- --/** @see PaStreamFlags */ --#define paNoFlag ((PaStreamFlags) 0) -- --/** Disable default clipping of out of range samples. -- @see PaStreamFlags --*/ --#define paClipOff ((PaStreamFlags) 0x00000001) -- --/** Disable default dithering. -- @see PaStreamFlags --*/ --#define paDitherOff ((PaStreamFlags) 0x00000002) -- --/** Flag requests that where possible a full duplex stream will not discard -- overflowed input samples without calling the stream callback. This flag is -- only valid for full duplex callback streams and only when used in combination -- with the paFramesPerBufferUnspecified (0) framesPerBuffer parameter. Using -- this flag incorrectly results in a paInvalidFlag error being returned from -- Pa_OpenStream and Pa_OpenDefaultStream. -- -- @see PaStreamFlags, paFramesPerBufferUnspecified --*/ --#define paNeverDropInput ((PaStreamFlags) 0x00000004) -- --/** Call the stream callback to fill initial output buffers, rather than the -- default behavior of priming the buffers with zeros (silence). This flag has -- no effect for input-only and blocking read/write streams. -- -- @see PaStreamFlags --*/ --#define paPrimeOutputBuffersUsingStreamCallback ((PaStreamFlags) 0x00000008) -- --/** A mask specifying the platform specific bits. -- @see PaStreamFlags --*/ --#define paPlatformSpecificFlags ((PaStreamFlags)0xFFFF0000) -- --/** -- Timing information for the buffers passed to the stream callback. --*/ --typedef struct PaStreamCallbackTimeInfo{ -- PaTime inputBufferAdcTime; -- PaTime currentTime; -- PaTime outputBufferDacTime; --} PaStreamCallbackTimeInfo; -- -- --/** -- Flag bit constants for the statusFlags to PaStreamCallback. -- -- @see paInputUnderflow, paInputOverflow, paOutputUnderflow, paOutputOverflow, -- paPrimingOutput --*/ --typedef unsigned long PaStreamCallbackFlags; -- --/** In a stream opened with paFramesPerBufferUnspecified, indicates that -- input data is all silence (zeros) because no real data is available. In a -- stream opened without paFramesPerBufferUnspecified, it indicates that one or -- more zero samples have been inserted into the input buffer to compensate -- for an input underflow. -- @see PaStreamCallbackFlags --*/ --#define paInputUnderflow ((PaStreamCallbackFlags) 0x00000001) -- --/** In a stream opened with paFramesPerBufferUnspecified, indicates that data -- prior to the first sample of the input buffer was discarded due to an -- overflow, possibly because the stream callback is using too much CPU time. -- Otherwise indicates that data prior to one or more samples in the -- input buffer was discarded. -- @see PaStreamCallbackFlags --*/ --#define paInputOverflow ((PaStreamCallbackFlags) 0x00000002) -- --/** Indicates that output data (or a gap) was inserted, possibly because the -- stream callback is using too much CPU time. -- @see PaStreamCallbackFlags --*/ --#define paOutputUnderflow ((PaStreamCallbackFlags) 0x00000004) -- --/** Indicates that output data will be discarded because no room is available. -- @see PaStreamCallbackFlags --*/ --#define paOutputOverflow ((PaStreamCallbackFlags) 0x00000008) -- --/** Some of all of the output data will be used to prime the stream, input -- data may be zero. -- @see PaStreamCallbackFlags --*/ --#define paPrimingOutput ((PaStreamCallbackFlags) 0x00000010) -- --/** -- Allowable return values for the PaStreamCallback. -- @see PaStreamCallback --*/ --typedef enum PaStreamCallbackResult --{ -- paContinue=0, -- paComplete=1, -- paAbort=2 --} PaStreamCallbackResult; -- -- --/** -- Functions of type PaStreamCallback are implemented by PortAudio clients. -- They consume, process or generate audio in response to requests from an -- active PortAudio stream. -- -- @param input and @param output are arrays of interleaved samples, -- the format, packing and number of channels used by the buffers are -- determined by parameters to Pa_OpenStream(). -- -- @param frameCount The number of sample frames to be processed by -- the stream callback. -- -- @param timeInfo The time in seconds when the first sample of the input -- buffer was received at the audio input, the time in seconds when the first -- sample of the output buffer will begin being played at the audio output, and -- the time in seconds when the stream callback was called. -- See also Pa_GetStreamTime() -- -- @param statusFlags Flags indicating whether input and/or output buffers -- have been inserted or will be dropped to overcome underflow or overflow -- conditions. -- -- @param userData The value of a user supplied pointer passed to -- Pa_OpenStream() intended for storing synthesis data etc. -- -- @return -- The stream callback should return one of the values in the -- PaStreamCallbackResult enumeration. To ensure that the callback continues -- to be called, it should return paContinue (0). Either paComplete or paAbort -- can be returned to finish stream processing, after either of these values is -- returned the callback will not be called again. If paAbort is returned the -- stream will finish as soon as possible. If paComplete is returned, the stream -- will continue until all buffers generated by the callback have been played. -- This may be useful in applications such as soundfile players where a specific -- duration of output is required. However, it is not necessary to utilise this -- mechanism as Pa_StopStream(), Pa_AbortStream() or Pa_CloseStream() can also -- be used to stop the stream. The callback must always fill the entire output -- buffer irrespective of its return value. -- -- @see Pa_OpenStream, Pa_OpenDefaultStream -- -- @note With the exception of Pa_GetStreamCpuLoad() it is not permissable to call -- PortAudio API functions from within the stream callback. --*/ --typedef int PaStreamCallback( -- const void *input, void *output, -- unsigned long frameCount, -- const PaStreamCallbackTimeInfo* timeInfo, -- PaStreamCallbackFlags statusFlags, -- void *userData ); -- -- --/** Opens a stream for either input, output or both. -- -- @param stream The address of a PaStream pointer which will receive -- a pointer to the newly opened stream. -- -- @param inputParameters A structure that describes the input parameters used by -- the opened stream. See PaStreamParameters for a description of these parameters. -- inputParameters must be NULL for output-only streams. -- -- @param outputParameters A structure that describes the output parameters used by -- the opened stream. See PaStreamParameters for a description of these parameters. -- outputParameters must be NULL for input-only streams. -- -- @param sampleRate The desired sampleRate. For full-duplex streams it is the -- sample rate for both input and output -- -- @param framesPerBuffer The number of frames passed to the stream callback -- function, or the preferred block granularity for a blocking read/write stream. -- The special value paFramesPerBufferUnspecified (0) may be used to request that -- the stream callback will recieve an optimal (and possibly varying) number of -- frames based on host requirements and the requested latency settings. -- Note: With some host APIs, the use of non-zero framesPerBuffer for a callback -- stream may introduce an additional layer of buffering which could introduce -- additional latency. PortAudio guarantees that the additional latency -- will be kept to the theoretical minimum however, it is strongly recommended -- that a non-zero framesPerBuffer value only be used when your algorithm -- requires a fixed number of frames per stream callback. -- -- @param streamFlags Flags which modify the behaviour of the streaming process. -- This parameter may contain a combination of flags ORed together. Some flags may -- only be relevant to certain buffer formats. -- -- @param streamCallback A pointer to a client supplied function that is responsible -- for processing and filling input and output buffers. If this parameter is NULL -- the stream will be opened in 'blocking read/write' mode. In blocking mode, -- the client can receive sample data using Pa_ReadStream and write sample data -- using Pa_WriteStream, the number of samples that may be read or written -- without blocking is returned by Pa_GetStreamReadAvailable and -- Pa_GetStreamWriteAvailable respectively. -- -- @param userData A client supplied pointer which is passed to the stream callback -- function. It could for example, contain a pointer to instance data necessary -- for processing the audio buffers. This parameter is ignored if streamCallback -- is NULL. -- -- @return -- Upon success Pa_OpenStream() returns paNoError and places a pointer to a -- valid PaStream in the stream argument. The stream is inactive (stopped). -- If a call to Pa_OpenStream() fails, a non-zero error code is returned (see -- PaError for possible error codes) and the value of stream is invalid. -- -- @see PaStreamParameters, PaStreamCallback, Pa_ReadStream, Pa_WriteStream, -- Pa_GetStreamReadAvailable, Pa_GetStreamWriteAvailable --*/ --PaError Pa_OpenStream( PaStream** stream, -- const PaStreamParameters *inputParameters, -- const PaStreamParameters *outputParameters, -- double sampleRate, -- unsigned long framesPerBuffer, -- PaStreamFlags streamFlags, -- PaStreamCallback *streamCallback, -- void *userData ); -- -- --/** A simplified version of Pa_OpenStream() that opens the default input -- and/or output devices. -- -- @param stream The address of a PaStream pointer which will receive -- a pointer to the newly opened stream. -- -- @param numInputChannels The number of channels of sound that will be supplied -- to the stream callback or returned by Pa_ReadStream. It can range from 1 to -- the value of maxInputChannels in the PaDeviceInfo record for the default input -- device. If 0 the stream is opened as an output-only stream. -- -- @param numOutputChannels The number of channels of sound to be delivered to the -- stream callback or passed to Pa_WriteStream. It can range from 1 to the value -- of maxOutputChannels in the PaDeviceInfo record for the default output dvice. -- If 0 the stream is opened as an output-only stream. -- -- @param sampleFormat The sample format of both the input and output buffers -- provided to the callback or passed to and from Pa_ReadStream and Pa_WriteStream. -- sampleFormat may be any of the formats described by the PaSampleFormat -- enumeration. -- -- @param sampleRate Same as Pa_OpenStream parameter of the same name. -- @param framesPerBuffer Same as Pa_OpenStream parameter of the same name. -- @param streamCallback Same as Pa_OpenStream parameter of the same name. -- @param userData Same as Pa_OpenStream parameter of the same name. -- -- @return As for Pa_OpenStream -- -- @see Pa_OpenStream, PaStreamCallback --*/ --PaError Pa_OpenDefaultStream( PaStream** stream, -- int numInputChannels, -- int numOutputChannels, -- PaSampleFormat sampleFormat, -- double sampleRate, -- unsigned long framesPerBuffer, -- PaStreamCallback *streamCallback, -- void *userData ); -- -- --/** Closes an audio stream. If the audio stream is active it -- discards any pending buffers as if Pa_AbortStream() had been called. --*/ --PaError Pa_CloseStream( PaStream *stream ); -- -- --/** Functions of type PaStreamFinishedCallback are implemented by PortAudio -- clients. They can be registered with a stream using the Pa_SetStreamFinishedCallback -- function. Once registered they are called when the stream becomes inactive -- (ie once a call to Pa_StopStream() will not block). -- A stream will become inactive after the stream callback returns non-zero, -- or when Pa_StopStream or Pa_AbortStream is called. For a stream providing audio -- output, if the stream callback returns paComplete, or Pa_StopStream is called, -- the stream finished callback will not be called until all generated sample data -- has been played. -- -- @param userData The userData parameter supplied to Pa_OpenStream() -- -- @see Pa_SetStreamFinishedCallback --*/ --typedef void PaStreamFinishedCallback( void *userData ); -- -- --/** Register a stream finished callback function which will be called when the -- stream becomes inactive. See the description of PaStreamFinishedCallback for -- further details about when the callback will be called. -- -- @param stream a pointer to a PaStream that is in the stopped state - if the -- stream is not stopped, the stream's finished callback will remain unchanged -- and an error code will be returned. -- -- @param streamFinishedCallback a pointer to a function with the same signature -- as PaStreamFinishedCallback, that will be called when the stream becomes -- inactive. Passing NULL for this parameter will un-register a previously -- registered stream finished callback function. -- -- @return on success returns paNoError, otherwise an error code indicating the cause -- of the error. -- -- @see PaStreamFinishedCallback --*/ --PaError Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback ); -- -- --/** Commences audio processing. --*/ --PaError Pa_StartStream( PaStream *stream ); -- -- --/** Terminates audio processing. It waits until all pending -- audio buffers have been played before it returns. --*/ --PaError Pa_StopStream( PaStream *stream ); -- -- --/** Terminates audio processing immediately without waiting for pending -- buffers to complete. --*/ --PaError Pa_AbortStream( PaStream *stream ); -- -- --/** Determine whether the stream is stopped. -- A stream is considered to be stopped prior to a successful call to -- Pa_StartStream and after a successful call to Pa_StopStream or Pa_AbortStream. -- If a stream callback returns a value other than paContinue the stream is NOT -- considered to be stopped. -- -- @return Returns one (1) when the stream is stopped, zero (0) when -- the stream is running or, a PaErrorCode (which are always negative) if -- PortAudio is not initialized or an error is encountered. -- -- @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive --*/ --PaError Pa_IsStreamStopped( PaStream *stream ); -- -- --/** Determine whether the stream is active. -- A stream is active after a successful call to Pa_StartStream(), until it -- becomes inactive either as a result of a call to Pa_StopStream() or -- Pa_AbortStream(), or as a result of a return value other than paContinue from -- the stream callback. In the latter case, the stream is considered inactive -- after the last buffer has finished playing. -- -- @return Returns one (1) when the stream is active (ie playing or recording -- audio), zero (0) when not playing or, a PaErrorCode (which are always negative) -- if PortAudio is not initialized or an error is encountered. -- -- @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamStopped --*/ --PaError Pa_IsStreamActive( PaStream *stream ); -- -- -- --/** A structure containing unchanging information about an open stream. -- @see Pa_GetStreamInfo --*/ -- --typedef struct PaStreamInfo --{ -- /** this is struct version 1 */ -- int structVersion; -- -- /** The input latency of the stream in seconds. This value provides the most -- accurate estimate of input latency available to the implementation. It may -- differ significantly from the suggestedLatency value passed to Pa_OpenStream(). -- The value of this field will be zero (0.) for output-only streams. -- @see PaTime -- */ -- PaTime inputLatency; -- -- /** The output latency of the stream in seconds. This value provides the most -- accurate estimate of output latency available to the implementation. It may -- differ significantly from the suggestedLatency value passed to Pa_OpenStream(). -- The value of this field will be zero (0.) for input-only streams. -- @see PaTime -- */ -- PaTime outputLatency; -- -- /** The sample rate of the stream in Hertz (samples per second). In cases -- where the hardware sample rate is inaccurate and PortAudio is aware of it, -- the value of this field may be different from the sampleRate parameter -- passed to Pa_OpenStream(). If information about the actual hardware sample -- rate is not available, this field will have the same value as the sampleRate -- parameter passed to Pa_OpenStream(). -- */ -- double sampleRate; -- --} PaStreamInfo; -- -- --/** Retrieve a pointer to a PaStreamInfo structure containing information -- about the specified stream. -- @return A pointer to an immutable PaStreamInfo structure. If the stream -- parameter invalid, or an error is encountered, the function returns NULL. -- -- @param stream A pointer to an open stream previously created with Pa_OpenStream. -- -- @note PortAudio manages the memory referenced by the returned pointer, -- the client must not manipulate or free the memory. The pointer is only -- guaranteed to be valid until the specified stream is closed. -- -- @see PaStreamInfo --*/ --const PaStreamInfo* Pa_GetStreamInfo( PaStream *stream ); -- -- --/** Determine the current time for the stream according to the same clock used -- to generate buffer timestamps. This time may be used for syncronising other -- events to the audio stream, for example synchronizing audio to MIDI. -- -- @return The stream's current time in seconds, or 0 if an error occurred. -- -- @see PaTime, PaStreamCallback --*/ --PaTime Pa_GetStreamTime( PaStream *stream ); -- -- --/** Retrieve CPU usage information for the specified stream. -- The "CPU Load" is a fraction of total CPU time consumed by a callback stream's -- audio processing routines including, but not limited to the client supplied -- stream callback. This function does not work with blocking read/write streams. -- -- This function may be called from the stream callback function or the -- application. -- -- @return -- A floating point value, typically between 0.0 and 1.0, where 1.0 indicates -- that the stream callback is consuming the maximum number of CPU cycles possible -- to maintain real-time operation. A value of 0.5 would imply that PortAudio and -- the stream callback was consuming roughly 50% of the available CPU time. The -- return value may exceed 1.0. A value of 0.0 will always be returned for a -- blocking read/write stream, or if an error occurrs. --*/ --double Pa_GetStreamCpuLoad( PaStream* stream ); -- -- --/** Read samples from an input stream. The function doesn't return until -- the entire buffer has been filled - this may involve waiting for the operating -- system to supply the data. -- -- @param stream A pointer to an open stream previously created with Pa_OpenStream. -- -- @param buffer A pointer to a buffer of sample frames. The buffer contains -- samples in the format specified by the inputParameters->sampleFormat field -- used to open the stream, and the number of channels specified by -- inputParameters->numChannels. If non-interleaved samples were requested, -- buffer is a pointer to the first element of an array of non-interleaved -- buffer pointers, one for each channel. -- -- @param frames The number of frames to be read into buffer. This parameter -- is not constrained to a specific range, however high performance applications -- will want to match this parameter to the framesPerBuffer parameter used -- when opening the stream. -- -- @return On success PaNoError will be returned, or PaInputOverflowed if input -- data was discarded by PortAudio after the previous call and before this call. --*/ --PaError Pa_ReadStream( PaStream* stream, -- void *buffer, -- unsigned long frames ); -- -- --/** Write samples to an output stream. This function doesn't return until the -- entire buffer has been consumed - this may involve waiting for the operating -- system to consume the data. -- -- @param stream A pointer to an open stream previously created with Pa_OpenStream. -- -- @param buffer A pointer to a buffer of sample frames. The buffer contains -- samples in the format specified by the outputParameters->sampleFormat field -- used to open the stream, and the number of channels specified by -- outputParameters->numChannels. If non-interleaved samples were requested, -- buffer is a pointer to the first element of an array of non-interleaved -- buffer pointers, one for each channel. -- -- @param frames The number of frames to be written from buffer. This parameter -- is not constrained to a specific range, however high performance applications -- will want to match this parameter to the framesPerBuffer parameter used -- when opening the stream. -- -- @return On success PaNoError will be returned, or paOutputUnderflowed if -- additional output data was inserted after the previous call and before this -- call. --*/ --PaError Pa_WriteStream( PaStream* stream, -- const void *buffer, -- unsigned long frames ); -- -- --/** Retrieve the number of frames that can be read from the stream without -- waiting. -- -- @return Returns a non-negative value representing the maximum number of frames -- that can be read from the stream without blocking or busy waiting or, a -- PaErrorCode (which are always negative) if PortAudio is not initialized or an -- error is encountered. --*/ --signed long Pa_GetStreamReadAvailable( PaStream* stream ); -- -- --/** Retrieve the number of frames that can be written to the stream without -- waiting. -- -- @return Returns a non-negative value representing the maximum number of frames -- that can be written to the stream without blocking or busy waiting or, a -- PaErrorCode (which are always negative) if PortAudio is not initialized or an -- error is encountered. --*/ --signed long Pa_GetStreamWriteAvailable( PaStream* stream ); -- -- --/* Miscellaneous utilities */ -- -- --/** Retrieve the size of a given sample format in bytes. -- -- @return The size in bytes of a single sample in the specified format, -- or paSampleFormatNotSupported if the format is not supported. --*/ --PaError Pa_GetSampleSize( PaSampleFormat format ); -- -- --/** Put the caller to sleep for at least 'msec' milliseconds. This function is -- provided only as a convenience for authors of portable code (such as the tests -- and examples in the PortAudio distribution.) -- -- The function may sleep longer than requested so don't rely on this for accurate -- musical timing. --*/ --void Pa_Sleep( long msec ); -- -- -- --#ifdef __cplusplus --} --#endif /* __cplusplus */ --#endif /* PORTAUDIO_H */ ---- a/src/wave.cpp -+++ b/src/wave.cpp -@@ -31,7 +31,10 @@ - #include - #include - --#include "portaudio.h" -+#ifdef USE_PORTAUDIO -+#include -+#endif -+ - #ifdef PLATFORM_WINDOWS - #include - #else ---- a/src/wavegen.cpp -+++ b/src/wavegen.cpp -@@ -40,7 +40,7 @@ - #endif - - #ifdef USE_PORTAUDIO --#include "portaudio.h" -+#include - #undef USE_PORTAUDIO - // determine portaudio version by looking for a #define which is not in V18 - #ifdef paNeverDropInput diff --git a/sound/forked-daapd/Makefile b/sound/forked-daapd/Makefile deleted file mode 100644 index b33bb44..0000000 --- a/sound/forked-daapd/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=forked-daapd -PKG_VERSION:=24.2 -PKG_RELEASE:=1 -PKG_REV:=1b6283752ed0b790a6658bed1f05946e1af193da - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/ejurgensen/forked-daapd.git -PKG_SOURCE_VERSION:=$(PKG_REV) - -PKG_BUILD_DEPENDS:=gperf/host -PKG_FIXUP:=autoreconf -PKG_USE_MIPS16:=0 -PKG_INSTALL:=1 - -PKG_MAINTAINER:=Espen Jürgensen -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/forked-daapd -SECTION:=sound -CATEGORY:=Sound -TITLE:=iTunes (DAAP) server for Apple Remote and AirPlay -URL:=https://github.com/ejurgensen/forked-daapd -DEPENDS:=+libgpg-error +libgcrypt +libgdbm +zlib +libexpat +libunistring \ - +libevent2 +libdaemon +libantlr3c +confuse +alsa-lib +libffmpeg-full \ - +mxml +libavahi-client +sqlite3-cli +libplist +libcurl +libjson-c \ - +libprotobuf-c +libgnutls $(ICONV_DEPENDS) -endef - -define Package/forked-daapd/description - forked-daapd is a Linux/FreeBSD DAAP (iTunes), MPD (Music Player Daemon) and - RSP (Roku) media server. It has support for AirPlay speakers, Chromecast, - Apple Remote (and compatibles), MPD clients, internet radio and LastFM. It - does not support AirPlay/Chromecast video. -endef - -define Package/forked-daapd/conffiles -/etc/forked-daapd.conf -endef - -CONFIGURE_ARGS += \ - --enable-itunes \ - --enable-lastfm \ - --enable-mpd \ - --enable-chromecast - -TARGET_CFLAGS += $(FPIC) -TARGET_LDFLAGS += -Wl,-rpath-link,$(STAGING_DIR)/usr/lib - -define Package/forked-daapd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/forked-daapd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) ./files/forked-daapd.conf $(1)/etc/forked-daapd.conf - $(INSTALL_DIR) $(1)/usr/lib/forked-daapd - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/forked-daapd/* $(1)/usr/lib/forked-daapd/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/forked-daapd.init $(1)/etc/init.d/forked-daapd -endef - -$(eval $(call BuildPackage,forked-daapd)) diff --git a/sound/forked-daapd/files/forked-daapd.conf b/sound/forked-daapd/files/forked-daapd.conf deleted file mode 100644 index 0f756e0..0000000 --- a/sound/forked-daapd/files/forked-daapd.conf +++ /dev/null @@ -1,187 +0,0 @@ -# A quick guide to configuring forked-daapd: -# -# For regular use, the most important setting to configure is "directories", -# which should be the location of your media. Whatever user you have set as -# "uid" must have read access to this location. If the location is a network -# mount, please see the README. -# -# In all likelihood, that's all you need to do! - -general { - # Username - # Make sure the user has read access to the library directories you set - # below, and full access to the databases, log and local audio - uid = "daapd" - - # Database location - db_path = "/var/cache/forked-daapd/songs3.db" - - # Log file and level - # Available levels: fatal, log, warning, info, debug, spam - logfile = "/var/log/forked-daapd.log" - loglevel = log - - # Admin password for the non-existent web interface - admin_password = "unused" - - # Enable/disable IPv6 - ipv6 = no - - # Location of cache database - cache_path = "/var/cache/forked-daapd/cache.db" - - # DAAP requests that take longer than this threshold (in msec) get their - # replies cached for next time. Set to 0 to disable caching. -# cache_daap_threshold = 1000 -} - -# Library configuration -library { - # Name of the library as displayed by the clients - # %h: hostname, %v: version - name = "My Music on %h" - - # TCP port to listen on. Default port is 3689 (daap) - port = 3689 - - # Password for the library. Optional. -# password = "" - - # Directories to index - directories = { "/srv/music" } - - # Directories containing podcasts - # For each directory that is indexed the path is matched against these - # names. If there is a match all items in the directory are marked as - # podcasts. Eg. if you index /srv/music, and your podcasts are in - # /srv/music/Podcasts, you can set this to "/Podcasts". - # (changing this setting only takes effect after rescan, see the README) - podcasts = { "/Podcasts" } - - # Directories containing audiobooks - # For each directory that is indexed the path is matched against these - # names. If there is a match all items in the directory are marked as - # audiobooks. - # (changing this setting only takes effect after rescan, see the README) - audiobooks = { "/Audiobooks" } - - # Directories containing compilations (eg soundtracks) - # For each directory that is indexed the path is matched against these - # names. If there is a match all items in the directory are marked as - # compilations. - # (changing this setting only takes effect after rescan, see the README) - compilations = { "/Compilations" } - - # Compilations usually have many artists, and if you don't want every - # artist to be listed when artist browsing in Remote, you can set - # a single name which will be used for all music in the compilation dir - # (changing this setting only takes effect after rescan, see the README) - compilation_artist = "Various artists" - - # Internet streams in your playlists will by default be shown in the - # "Radio" library, like iTunes does. However, some clients (like - # TunesRemote+) won't show the "Radio" library. If you would also like - # to have them shown like normal playlists, you can enable this option. -# radio_playlists = false - - # There are 5 default playlists: "Library", "Music", "Movies", "TV Shows" - # and "Podcasts". Here you can change the names of these playlists. -# name_library = "Library" -# name_music = "Music" -# name_movies = "Movies" -# name_tvshows = "TV Shows" -# name_podcasts = "Podcasts" -# name_audiobooks = "Audiobooks" -# name_radio = "Radio" - - # Artwork file names (without file type extension) - # forked-daapd will look for jpg and png files with these base names -# artwork_basenames = { "artwork", "cover", "Folder" } - - # Enable searching for artwork corresponding to each individual media - # file instead of only looking for album artwork. This is disabled by - # default to reduce cache size. -# artwork_individual = false - - # File types the scanner should ignore - # Non-audio files will never be added to the database, but here you - # can prevent the scanner from even probing them. This might improve - # scan time. By default .db, .ini, .db-journal and .pdf are ignored. -# filetypes_ignore = { ".db", ".ini", ".db-journal", ".pdf" } - - # File paths the scanner should ignore - # If you want to exclude files on a more advanced basis you can enter - # one or more POSIX regular expressions, and any file with a matching - # path will be ignored. -# filepath_ignore = { "myregex" } - - # Disable startup file scanning - # When forked-daapd starts it will do an initial file scan of your - # library (and then watch it for changes). If you are sure your library - # never changes while forked-daapd is not running, you can disable the - # initial file scan and save some system ressources. Disabling this scan - # may lead to forked-daapd's database coming out of sync with the - # library. If that happens read the instructions in the README on how - # to trigger a rescan. -# filescan_disable = false - - # Should iTunes metadata override ours? -# itunes_overrides = false - - # Formats: mp4a, mp4v, mpeg, alac, flac, mpc, ogg, wma, wmal, wmav, aif, wav - # Formats that should never be transcoded -# no_transcode = { "alac", "mp4a" } - # Formats that should always be transcoded -# force_transcode = { "ogg", "flac" } -} - -# Local audio output -audio { - # Name - used in the speaker list in Remote - nickname = "OpenWrt" - - # Audio device name for local audio output -# card = "default" - - # Mixer channel to use for volume control - ALSA/Linux only - # If not set, PCM will be used if available, otherwise Master. -# mixer = "" -} - -# AirPlay/Airport Express device settings -# (make sure you get the capitalization of the device name right) -#airplay "My AirPlay device" { - # forked-daapd's volume goes to 11! If that's more than you can handle - # you can set a lower value here -# max_volume = 11 - - # AirPlay password -# password = "s1kr3t" -#} - -# SQLite configuration (allows to modify the operation of the SQLite databases) -# Make sure to read the SQLite documentation for the corresponding PRAGMA statements as -# changing them from the defaults may increase the possibility of database corruptions! -# By default the SQLite default values are used. -sqlite { - # Cache size in number of db pages for the library database - # (SQLite default page size is 1024 bytes and cache size is 2000 pages) -# pragma_cache_size_library = 2000 - - # Cache size in number of db pages for the daap cache database - # (SQLite default page size is 1024 bytes and cache size is 2000 pages) -# pragma_cache_size_cache = 2000 - - # Sets the journal mode for the database - # DELETE (default), TRUNCATE, PERSIST, MEMORY, WAL, OFF -# pragma_journal_mode = DELETE - - # Change the setting of the "synchronous" flag - # 0: OFF, 1: NORMAL, 2: FULL (default) -# pragma_synchronous = 2 - - # Should the database be vacuumed on startup? (increases startup time, - # but may reduce database size). Default is yes. -# vacuum = yes -} - diff --git a/sound/forked-daapd/files/forked-daapd.init b/sound/forked-daapd/files/forked-daapd.init deleted file mode 100644 index 3ae38f9..0000000 --- a/sound/forked-daapd/files/forked-daapd.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=99 -BIN=/usr/sbin/forked-daapd -PID=/var/run/forked-daapd.pid -SSD=start-stop-daemon - -start() { - $SSD -p $PID -S -x $BIN -- -P $PID -} - -stop() { - $SSD -p $PID -K -s SIGINT -} diff --git a/sound/forked-daapd/patches/010-include_pregen.patch b/sound/forked-daapd/patches/010-include_pregen.patch deleted file mode 100644 index 762f625..0000000 --- a/sound/forked-daapd/patches/010-include_pregen.patch +++ /dev/null @@ -1,23739 +0,0 @@ -diff --git a/src/pregen/DAAP.u b/src/pregen/DAAP.u -new file mode 100644 -index 0000000..3de527b ---- /dev/null -+++ b/src/pregen/DAAP.u -@@ -0,0 +1,6 @@ -+DAAPParser.c : DAAP.g -+./DAAP.tokens : DAAP.g -+DAAPParser.h : DAAP.g -+DAAPLexer.c : DAAP.g -+DAAPLexer.h : DAAP.g -+ANTLR_PRODUCTS += DAAPParser.c ./DAAP.tokens DAAPParser.h DAAPLexer.c DAAPLexer.h -\ No newline at end of file -diff --git a/src/pregen/DAAP2SQL.c b/src/pregen/DAAP2SQL.c -new file mode 100644 -index 0000000..04d6153 ---- /dev/null -+++ b/src/pregen/DAAP2SQL.c -@@ -0,0 +1,975 @@ -+/** \file -+ * This C source file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : DAAP2SQL.g -+ * - On : 2016-01-01 12:23:43 -+ * - for the tree parser : DAAP2SQLTreeParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+*/ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+ -+/* ============================================================================= -+ * This is what the grammar programmer asked us to put at the top of every file. -+ */ -+ -+ #include -+ #include -+ #include -+ #include -+ #include -+ -+ #include "logger.h" -+ #include "db.h" -+ #include "daap_query.h" -+ -+/* End of Header action. -+ * ============================================================================= -+ */ -+/* ----------------------------------------- -+ * Include the ANTLR3 generated header file. -+ */ -+#include "DAAP2SQL.h" -+/* ----------------------------------------- */ -+ -+ -+ -+ -+ -+/* MACROS that hide the C interface implementations from the -+ * generated code, which makes it a little more understandable to the human eye. -+ * I am very much against using C pre-processor macros for function calls and bits -+ * of code as you cannot see what is happening when single stepping in debuggers -+ * and so on. The exception (in my book at least) is for generated code, where you are -+ * not maintaining it, but may wish to read and understand it. If you single step it, you know that input() -+ * hides some indirect calls, but is always referring to the input stream. This is -+ * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig -+ * the runtime interfaces without changing the generated code too often, without -+ * confusing the reader of the generated output, who may not wish to know the gory -+ * details of the interface inheritance. -+ */ -+ -+#define CTX ctx -+ -+/* Aids in accessing scopes for grammar programmers -+ */ -+#undef SCOPE_TYPE -+#undef SCOPE_STACK -+#undef SCOPE_TOP -+#define SCOPE_TYPE(scope) pDAAP2SQL_##scope##_SCOPE -+#define SCOPE_STACK(scope) pDAAP2SQL_##scope##Stack -+#define SCOPE_TOP(scope) ctx->pDAAP2SQL_##scope##Top -+#define SCOPE_SIZE(scope) ctx->pDAAP2SQL_##scope##Stack_limit -+#define SCOPE_INSTANCE(scope, i) (ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i)) -+ -+/* Macros for accessing things in the parser -+ */ -+ -+#undef PARSER -+#undef RECOGNIZER -+#undef HAVEPARSEDRULE -+#undef INPUT -+#undef STRSTREAM -+#undef HASEXCEPTION -+#undef EXCEPTION -+#undef MATCHT -+#undef MATCHANYT -+#undef FOLLOWSTACK -+#undef FOLLOWPUSH -+#undef FOLLOWPOP -+#undef PRECOVER -+#undef PREPORTERROR -+#undef LA -+#undef LT -+#undef CONSTRUCTEX -+#undef CONSUME -+#undef MARK -+#undef REWIND -+#undef REWINDLAST -+#undef PERRORRECOVERY -+#undef HASFAILED -+#undef FAILEDFLAG -+#undef RECOVERFROMMISMATCHEDSET -+#undef RECOVERFROMMISMATCHEDELEMENT -+#undef BACKTRACKING -+#undef ADAPTOR -+#undef RULEMEMO -+#undef SEEK -+#undef INDEX -+#undef DBG -+ -+#define PARSER ctx->pTreeParser -+#define RECOGNIZER PARSER->rec -+#define PSRSTATE RECOGNIZER->state -+#define HAVEPARSEDRULE(r) RECOGNIZER->alreadyParsedRule(RECOGNIZER, r) -+#define INPUT PARSER->ctnstream -+#define ISTREAM INPUT->tnstream->istream -+#define STRSTREAM INPUT->tnstream -+#define HASEXCEPTION() (PSRSTATE->error == ANTLR3_TRUE) -+#define EXCEPTION PSRSTATE->exception -+#define MATCHT(t, fs) RECOGNIZER->match(RECOGNIZER, t, fs) -+#define MATCHANYT() RECOGNIZER->matchAny(RECOGNIZER) -+#define FOLLOWSTACK PSRSTATE->following -+#define FOLLOWPUSH(x) FOLLOWSTACK->push(FOLLOWSTACK, ((void *)(&(x))), NULL) -+#define FOLLOWPOP() FOLLOWSTACK->pop(FOLLOWSTACK) -+#define PRECOVER() RECOGNIZER->recover(RECOGNIZER) -+#define PREPORTERROR() RECOGNIZER->reportError(RECOGNIZER) -+#define LA(n) ISTREAM->_LA(ISTREAM, n) -+#define LT(n) INPUT->tnstream->_LT(INPUT->tnstream, n) -+#define CONSTRUCTEX() RECOGNIZER->exConstruct(RECOGNIZER) -+#define CONSUME() ISTREAM->consume(ISTREAM) -+#define MARK() ISTREAM->mark(ISTREAM) -+#define REWIND(m) ISTREAM->rewind(ISTREAM, m) -+#define REWINDLAST() ISTREAM->rewindLast(ISTREAM) -+#define PERRORRECOVERY PSRSTATE->errorRecovery -+#define FAILEDFLAG PSRSTATE->failed -+#define HASFAILED() (FAILEDFLAG == ANTLR3_TRUE) -+#define BACKTRACKING PSRSTATE->backtracking -+#define RECOVERFROMMISMATCHEDSET(s) RECOGNIZER->recoverFromMismatchedSet(RECOGNIZER, s) -+#define RECOVERFROMMISMATCHEDELEMENT(e) RECOGNIZER->recoverFromMismatchedElement(RECOGNIZER, s) -+#define ADAPTOR INPUT->adaptor -+#define RULEMEMO PSRSTATE->ruleMemo -+#define SEEK(n) ISTREAM->seek(ISTREAM, n) -+#define INDEX() ISTREAM->index(ISTREAM) -+#define DBG RECOGNIZER->debugger -+ -+ -+#define TOKTEXT(tok, txt) tok, (pANTLR3_UINT8)txt -+ -+/* The 4 tokens defined below may well clash with your own #defines or token types. If so -+ * then for the present you must use different names for your defines as these are hard coded -+ * in the code generator. It would be better not to use such names internally, and maybe -+ * we can change this in a forthcoming release. I deliberately do not #undef these -+ * here as this will at least give you a redefined error somewhere if they clash. -+ */ -+#define UP ANTLR3_TOKEN_UP -+#define DOWN ANTLR3_TOKEN_DOWN -+#define EOR ANTLR3_TOKEN_EOR -+#define INVALID ANTLR3_TOKEN_INVALID -+ -+ -+/* ============================================================================= -+ * Functions to create and destroy scopes. First come the rule scopes, followed -+ * by the global declared scopes. -+ */ -+ -+ -+ -+/* ============================================================================= */ -+ -+/* ============================================================================= -+ * Start of recognizer -+ */ -+ -+ -+ -+/** \brief Table of all token names in symbolic order, mainly used for -+ * error reporting. -+ */ -+pANTLR3_UINT8 DAAP2SQLTokenNames[8+4] -+ = { -+ (pANTLR3_UINT8) "", /* String to print to indicate an invalid token */ -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "NEWLINE", -+ (pANTLR3_UINT8) "OPOR", -+ (pANTLR3_UINT8) "OPAND", -+ (pANTLR3_UINT8) "LPAR", -+ (pANTLR3_UINT8) "RPAR", -+ (pANTLR3_UINT8) "STR", -+ (pANTLR3_UINT8) "QUOTE", -+ (pANTLR3_UINT8) "ESCAPED" -+ }; -+ -+ -+ -+// Forward declare the locally static matching functions we have generated. -+// -+static pANTLR3_STRING query (pDAAP2SQL ctx); -+static DAAP2SQL_expr_return expr (pDAAP2SQL ctx); -+static void DAAP2SQLFree(pDAAP2SQL ctx); -+/* For use in tree output where we are accumulating rule labels via label += ruleRef -+ * we need a function that knows how to free a return scope when the list is destroyed. -+ * We cannot just use ANTLR3_FREE because in debug tracking mode, this is a macro. -+ */ -+static void ANTLR3_CDECL freeScope(void * scope) -+{ -+ ANTLR3_FREE(scope); -+} -+ -+/** \brief Name of the grammar file that generated this code -+ */ -+static const char fileName[] = "DAAP2SQL.g"; -+ -+/** \brief Return the name of the grammar file that generated this code. -+ */ -+static const char * getGrammarFileName() -+{ -+ return fileName; -+} -+/** \brief Create a new DAAP2SQL parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pDAAP2SQL -+DAAP2SQLNew (pANTLR3_COMMON_TREE_NODE_STREAM instream) -+{ -+ // See if we can create a new parser with the standard constructor -+ // -+ return DAAP2SQLNewSSD(instream, NULL); -+} -+ -+/** \brief Create a new DAAP2SQL parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pDAAP2SQL -+DAAP2SQLNewSSD (pANTLR3_COMMON_TREE_NODE_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state) -+{ -+ pDAAP2SQL ctx; /* Context structure we will build and return */ -+ -+ ctx = (pDAAP2SQL) ANTLR3_CALLOC(1, sizeof(DAAP2SQL)); -+ -+ if (ctx == NULL) -+ { -+ // Failed to allocate memory for parser context -+ // -+ return NULL; -+ } -+ -+ /* ------------------------------------------------------------------- -+ * Memory for basic structure is allocated, now to fill in -+ * the base ANTLR3 structures. We initialize the function pointers -+ * for the standard ANTLR3 parser function set, but upon return -+ * from here, the programmer may set the pointers to provide custom -+ * implementations of each function. -+ * -+ * We don't use the macros defined in DAAP2SQL.h here, in order that you can get a sense -+ * of what goes where. -+ */ -+ -+ /* Create a base Tree parser/recognizer, using the supplied tree node stream -+ */ -+ ctx->pTreeParser = antlr3TreeParserNewStream(ANTLR3_SIZE_HINT, instream, state); -+ /* Install the implementation of our DAAP2SQL interface -+ */ -+ ctx->query = query; -+ ctx->expr = expr; -+ ctx->free = DAAP2SQLFree; -+ ctx->getGrammarFileName = getGrammarFileName; -+ -+ /* Install the scope pushing methods. -+ */ -+ -+ -+ -+ -+ -+ /* Install the token table -+ */ -+ PSRSTATE->tokenNames = DAAP2SQLTokenNames; -+ -+ -+ /* Return the newly built parser to the caller -+ */ -+ return ctx; -+} -+ -+/** Free the parser resources -+ */ -+ static void -+ DAAP2SQLFree(pDAAP2SQL ctx) -+ { -+ /* Free any scope memory -+ */ -+ -+ -+ // Free this parser -+ // -+ ctx->pTreeParser->free(ctx->pTreeParser); -+ ANTLR3_FREE(ctx); -+ -+ /* Everything is released, so we can return -+ */ -+ return; -+ } -+ -+/** Return token names used by this tree parser -+ * -+ * The returned pointer is used as an index into the token names table (using the token -+ * number as the index). -+ * -+ * \return Pointer to first char * in the table. -+ */ -+static pANTLR3_UINT8 *getTokenNames() -+{ -+ return DAAP2SQLTokenNames; -+} -+ -+ -+ struct dmap_query_field_map { -+ char *dmap_field; -+ char *db_col; -+ int as_int; -+ }; -+ -+ /* gperf static hash, daap_query.gperf */ -+ #include "daap_query_hash.c" -+ -+ -+/* Declare the bitsets -+ */ -+ -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_query70 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_query70_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_query70 = { FOLLOW_expr_in_query70_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_OPAND_in_expr95 */ -+static ANTLR3_BITWORD FOLLOW_OPAND_in_expr95_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_OPAND_in_expr95 = { FOLLOW_OPAND_in_expr95_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_expr101 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_expr101_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000260) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_expr101 = { FOLLOW_expr_in_expr101_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_expr107 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_expr107_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_expr107 = { FOLLOW_expr_in_expr107_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_OPOR_in_expr118 */ -+static ANTLR3_BITWORD FOLLOW_OPOR_in_expr118_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_OPOR_in_expr118 = { FOLLOW_OPOR_in_expr118_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_expr124 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_expr124_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000260) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_expr124 = { FOLLOW_expr_in_expr124_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_expr130 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_expr130_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_expr130 = { FOLLOW_expr_in_expr130_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STR_in_expr140 */ -+static ANTLR3_BITWORD FOLLOW_STR_in_expr140_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_STR_in_expr140 = { FOLLOW_STR_in_expr140_bits, 1 }; -+ -+ -+ -+ -+/* ============================================== -+ * Parsing rules -+ */ -+/** -+ * $ANTLR start query -+ * DAAP2SQL.g:50:1: query returns [ pANTLR3_STRING result ] : e= expr ; -+ */ -+static pANTLR3_STRING -+query(pDAAP2SQL ctx) -+{ -+ pANTLR3_STRING result = NULL; -+ -+ DAAP2SQL_expr_return e; -+ #undef RETURN_TYPE_e -+ #define RETURN_TYPE_e DAAP2SQL_expr_return -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ result= NULL; -+ { -+ // DAAP2SQL.g:52:2: (e= expr ) -+ // DAAP2SQL.g:52:4: e= expr -+ { -+ FOLLOWPUSH(FOLLOW_expr_in_query70); -+ e=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulequeryEx; -+ } -+ -+ { -+ -+ if (!e.valid) -+ { -+ result= NULL; -+ } -+ else -+ { -+ result= e.result->factory->newRaw(e.result->factory); -+ result->append8(result, "("); -+ result->appendS(result, e.result); -+ result->append8(result, ")"); -+ } -+ -+ } -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulequeryEx; /* Prevent compiler warnings */ -+ rulequeryEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return result; -+} -+/* $ANTLR end query */ -+ -+/** -+ * $ANTLR start expr -+ * DAAP2SQL.g:68:1: expr returns [ pANTLR3_STRING result, int valid ] : ( ^( OPAND a= expr b= expr ) | ^( OPOR a= expr b= expr ) | STR ); -+ */ -+static DAAP2SQL_expr_return -+expr(pDAAP2SQL ctx) -+{ -+ DAAP2SQL_expr_return retval; -+ -+ pANTLR3_BASE_TREE STR1; -+ DAAP2SQL_expr_return a; -+ #undef RETURN_TYPE_a -+ #define RETURN_TYPE_a DAAP2SQL_expr_return -+ -+ DAAP2SQL_expr_return b; -+ #undef RETURN_TYPE_b -+ #define RETURN_TYPE_b DAAP2SQL_expr_return -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ retval.result= NULL; retval.valid= 1; -+ STR1 = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ { -+ { -+ // DAAP2SQL.g:70:2: ( ^( OPAND a= expr b= expr ) | ^( OPOR a= expr b= expr ) | STR ) -+ -+ ANTLR3_UINT32 alt1; -+ -+ alt1=3; -+ -+ switch ( LA(1) ) -+ { -+ case OPAND: -+ { -+ alt1=1; -+ } -+ break; -+ case OPOR: -+ { -+ alt1=2; -+ } -+ break; -+ case STR: -+ { -+ alt1=3; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleexprEx; -+ } -+ -+ switch (alt1) -+ { -+ case 1: -+ // DAAP2SQL.g:70:4: ^( OPAND a= expr b= expr ) -+ { -+ MATCHT(OPAND, &FOLLOW_OPAND_in_expr95); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expr_in_expr101); -+ a=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expr_in_expr107); -+ b=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ { -+ -+ if (a.valid && b.valid) -+ { -+ retval.result= a.result->factory->newRaw(a.result->factory); -+ retval.result->append8(retval.result, "("); -+ retval.result->appendS(retval.result, a.result); -+ retval.result->append8(retval.result, " AND "); -+ retval.result->appendS(retval.result, b.result); -+ retval.result->append8(retval.result, ")"); -+ } -+ else if (a.valid) -+ { -+ retval.result= a.result->factory->newRaw(a.result->factory); -+ retval.result->appendS(retval.result, a.result); -+ } -+ else if (b.valid) -+ { -+ retval.result= b.result->factory->newRaw(b.result->factory); -+ retval.result->appendS(retval.result, b.result); -+ } -+ else -+ { -+ retval.valid= 0; -+ } -+ -+ } -+ -+ } -+ break; -+ case 2: -+ // DAAP2SQL.g:96:4: ^( OPOR a= expr b= expr ) -+ { -+ MATCHT(OPOR, &FOLLOW_OPOR_in_expr118); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expr_in_expr124); -+ a=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expr_in_expr130); -+ b=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ { -+ -+ if (a.valid && b.valid) -+ { -+ retval.result= a.result->factory->newRaw(a.result->factory); -+ retval.result->append8(retval.result, "("); -+ retval.result->appendS(retval.result, a.result); -+ retval.result->append8(retval.result, " OR "); -+ retval.result->appendS(retval.result, b.result); -+ retval.result->append8(retval.result, ")"); -+ } -+ else if (a.valid) -+ { -+ retval.result= a.result->factory->newRaw(a.result->factory); -+ retval.result->appendS(retval.result, a.result); -+ } -+ else if (b.valid) -+ { -+ retval.result= b.result->factory->newRaw(b.result->factory); -+ retval.result->appendS(retval.result, b.result); -+ } -+ else -+ { -+ retval.valid= 0; -+ } -+ -+ } -+ -+ } -+ break; -+ case 3: -+ // DAAP2SQL.g:122:4: STR -+ { -+ STR1 = (pANTLR3_BASE_TREE) MATCHT(STR, &FOLLOW_STR_in_expr140); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ { -+ -+ pANTLR3_STRING str; -+ pANTLR3_UINT8 field; -+ pANTLR3_UINT8 val; -+ pANTLR3_UINT8 escaped; -+ ANTLR3_UINT8 op; -+ int neg_op; -+ const struct dmap_query_field_map *dqfm; -+ char *end; -+ long long llval; -+ -+ escaped = NULL; -+ -+ retval.result= (STR1->getText(STR1))->factory->newRaw((STR1->getText(STR1))->factory); -+ -+ str = (STR1->getText(STR1))->toUTF8((STR1->getText(STR1))); -+ -+ /* NOTE: the lexer delivers the string without quotes -+ which may not be obvious from the grammar due to embedded code -+ */ -+ -+ /* Make daap.songalbumid:0 a no-op */ -+ if (strcmp((char *)str->chars, "daap.songalbumid:0") == 0) -+ { -+ retval.result->append8(retval.result, "1 = 1"); -+ -+ goto STR_out; -+ } -+ -+ field = str->chars; -+ -+ val = field; -+ while ((*val != '\0') && ((*val == '.') -+ || (*val == '-') -+ || ((*val >= 'a') && (*val <= 'z')) -+ || ((*val >= 'A') && (*val <= 'Z')) -+ || ((*val >= '0') && (*val <= '9')))) -+ { -+ val++; -+ } -+ -+ if (*field == '\0') -+ { -+ DPRINTF(E_LOG, L_DAAP, "No field name found in clause '%s'\n", field); -+ retval.valid= 0; -+ goto STR_result_valid_0; /* ABORT */ -+ } -+ -+ if (*val == '\0') -+ { -+ DPRINTF(E_LOG, L_DAAP, "No operator found in clause '%s'\n", field); -+ retval.valid= 0; -+ goto STR_result_valid_0; /* ABORT */ -+ } -+ -+ op = *val; -+ *val = '\0'; -+ val++; -+ -+ if (op == '!') -+ { -+ if (*val == '\0') -+ { -+ DPRINTF(E_LOG, L_DAAP, "Negation found but operator missing in clause '%s%c'\n", field, op); -+ retval.valid= 0; -+ goto STR_result_valid_0; /* ABORT */ -+ } -+ -+ neg_op = 1; -+ op = *val; -+ val++; -+ } -+ else -+ neg_op = 0; -+ -+ /* Lookup DMAP field in the query field map */ -+ dqfm = daap_query_field_lookup((char *)field, strlen((char *)field)); -+ if (!dqfm) -+ { -+ DPRINTF(E_LOG, L_DAAP, "DMAP field '%s' is not a valid field in queries\n", field); -+ retval.valid= 0; -+ goto STR_result_valid_0; /* ABORT */ -+ } -+ -+ /* Empty values OK for string fields, NOK for integer */ -+ if (*val == '\0') -+ { -+ if (dqfm->as_int) -+ { -+ DPRINTF(E_LOG, L_DAAP, "No value given in clause '%s%s%c'\n", field, (neg_op) ? "!" : "", op); -+ retval.valid= 0; -+ goto STR_result_valid_0; /* ABORT */ -+ } -+ -+ /* No need to exclude empty artist and album, as forked-daapd makes sure there always exists an artist/album. */ -+ if (neg_op && op == ':' -+ && (strcmp((char *)field, "daap.songalbumartist") == 0 -+ || strcmp((char *)field, "daap.songartist") == 0 -+ || strcmp((char *)field, "daap.songalbum") == 0)) -+ { -+ DPRINTF(E_DBG, L_DAAP, "Ignoring clause '%s%s%c'\n", field, (neg_op) ? "!" : "", op); -+ retval.valid= 0; -+ goto STR_result_valid_0; -+ } -+ -+ /* Need to check against NULL too */ -+ if (op == ':') -+ retval.result->append8(retval.result, "("); -+ } -+ -+ /* Int field: check integer conversion */ -+ if (dqfm->as_int) -+ { -+ errno = 0; -+ llval = strtoll((const char *)val, &end, 10); -+ -+ if (((errno == ERANGE) && ((llval == LLONG_MAX) || (llval == LLONG_MIN))) -+ || ((errno != 0) && (llval == 0))) -+ { -+ DPRINTF(E_LOG, L_DAAP, "Value '%s' in clause '%s%s%c%s' does not convert to an integer type\n", -+ val, field, (neg_op) ? "!" : "", op, val); -+ retval.valid= 0; -+ goto STR_result_valid_0; /* ABORT */ -+ } -+ -+ if (end == (char *)val) -+ { -+ DPRINTF(E_LOG, L_DAAP, "Value '%s' in clause '%s%s%c%s' does not represent an integer value\n", -+ val, field, (neg_op) ? "!" : "", op, val); -+ retval.valid= 0; -+ goto STR_result_valid_0; /* ABORT */ -+ } -+ -+ *end = '\0'; /* Cut out potential garbage - we're being kind */ -+ -+ /* forked-daapd only has media_kind = 1 for music - so remove media_kind = 32 to imporve select query performance. */ -+ if (llval == 32 -+ && (strcmp((char *)field, "com.apple.itunes.mediakind") == 0 -+ || strcmp((char *)field, "com.apple.itunes.extended-media-kind") == 0)) -+ { -+ DPRINTF(E_DBG, L_DAAP, "Ignoring clause '%s%s%c%s'\n", field, (neg_op) ? "!" : "", op, val); -+ -+ if (neg_op) -+ retval.result->append8(retval.result, "1 = 1"); -+ else -+ retval.result->append8(retval.result, "1 = 0"); -+ -+ goto STR_out; -+ } -+ } -+ /* String field: escape string, check for '*' */ -+ else -+ { -+ if (op != ':') -+ { -+ DPRINTF(E_LOG, L_DAAP, "Operation '%c' not valid for string values\n", op); -+ retval.valid= 0; -+ goto STR_result_valid_0; /* ABORT */ -+ } -+ -+ escaped = (pANTLR3_UINT8)db_escape_string((char *)val); -+ if (!escaped) -+ { -+ DPRINTF(E_LOG, L_DAAP, "Could not escape value\n"); -+ retval.valid= 0; -+ goto STR_result_valid_0; /* ABORT */ -+ } -+ -+ val = escaped; -+ -+ if (val[0] == '*') -+ { -+ op = '%'; -+ val[0] = '%'; -+ } -+ -+ if (val[0] && val[1] && val[strlen((char *)val) - 1] == '*') -+ { -+ op = '%'; -+ val[strlen((char *)val) - 1] = '%'; -+ } -+ } -+ -+ retval.result->append8(retval.result, dqfm->db_col); -+ -+ switch(op) -+ { -+ case ':': -+ if (neg_op) -+ retval.result->append8(retval.result, " <> "); -+ else -+ retval.result->append8(retval.result, " = "); -+ break; -+ -+ case '+': -+ if (neg_op) -+ retval.result->append8(retval.result, " <= "); -+ else -+ retval.result->append8(retval.result, " > "); -+ break; -+ -+ case '-': -+ if (neg_op) -+ retval.result->append8(retval.result, " >= "); -+ else -+ retval.result->append8(retval.result, " < "); -+ break; -+ -+ case '%': -+ retval.result->append8(retval.result, " LIKE "); -+ break; -+ -+ default: -+ if (neg_op) -+ DPRINTF(E_LOG, L_DAAP, "Missing or unknown operator '%c' in clause '%s!%c%s'\n", op, field, op, val); -+ else -+ DPRINTF(E_LOG, L_DAAP, "Unknown operator '%c' in clause '%s%c%s'\n", op, field, op, val); -+ retval.valid= 0; -+ goto STR_result_valid_0; /* ABORT */ -+ break; -+ } -+ -+ if (!dqfm->as_int) -+ retval.result->append8(retval.result, "'"); -+ -+ retval.result->append8(retval.result, (const char *)val); -+ -+ if (!dqfm->as_int) -+ retval.result->append8(retval.result, "'"); -+ -+ /* For empty string value, we need to check against NULL too */ -+ if ((*val == '\0') && (op == ':')) -+ { -+ if (neg_op) -+ retval.result->append8(retval.result, " AND "); -+ else -+ retval.result->append8(retval.result, " OR "); -+ -+ retval.result->append8(retval.result, dqfm->db_col); -+ -+ if (neg_op) -+ retval.result->append8(retval.result, " IS NOT NULL"); -+ else -+ retval.result->append8(retval.result, " IS NULL"); -+ -+ retval.result->append8(retval.result, ")"); -+ } -+ -+ STR_result_valid_0: /* bail out label */ -+ ; -+ -+ if (escaped) -+ free(escaped); -+ -+ STR_out: /* get out of here */ -+ ; -+ -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleexprEx; /* Prevent compiler warnings */ -+ ruleexprEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end expr */ -+/* End of parsing rules -+ * ============================================== -+ */ -+ -+/* ============================================== -+ * Syntactic predicates -+ */ -+/* End of syntactic predicates -+ * ============================================== -+ */ -+ -+ -+ -+ -+ -+ -+/* End of code -+ * ============================================================================= -+ */ -diff --git a/src/pregen/DAAP2SQL.h b/src/pregen/DAAP2SQL.h -new file mode 100644 -index 0000000..e829049 ---- /dev/null -+++ b/src/pregen/DAAP2SQL.h -@@ -0,0 +1,195 @@ -+/** \file -+ * This C header file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : DAAP2SQL.g -+ * - On : 2016-01-01 12:23:43 -+ * - for the tree parser : DAAP2SQLTreeParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+ * The tree parser DAAP2SQL has the callable functions (rules) shown below, -+ * which will invoke the code for the associated rule in the source grammar -+ * assuming that the input stream is pointing to a token/text stream that could begin -+ * this rule. -+ * -+ * For instance if you call the first (topmost) rule in a parser grammar, you will -+ * get the results of a full parse, but calling a rule half way through the grammar will -+ * allow you to pass part of a full token stream to the parser, such as for syntax checking -+ * in editors and so on. -+ * -+ * The parser entry points are called indirectly (by function pointer to function) via -+ * a parser context typedef pDAAP2SQL, which is returned from a call to DAAP2SQLNew(). -+ * -+ * The methods in pDAAP2SQL are as follows: -+ * -+ * - pANTLR3_STRING pDAAP2SQL->query(pDAAP2SQL) -+ * - DAAP2SQL_expr_return pDAAP2SQL->expr(pDAAP2SQL) -+ * -+ * The return type for any particular rule is of course determined by the source -+ * grammar file. -+ */ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+#ifndef _DAAP2SQL_H -+#define _DAAP2SQL_H -+/* ============================================================================= -+ * Standard antlr3 C runtime definitions -+ */ -+#include -+ -+/* End of standard antlr 3 runtime definitions -+ * ============================================================================= -+ */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+// Forward declare the context typedef so that we can use it before it is -+// properly defined. Delegators and delegates (from import statements) are -+// interdependent and their context structures contain pointers to each other -+// C only allows such things to be declared if you pre-declare the typedef. -+// -+typedef struct DAAP2SQL_Ctx_struct DAAP2SQL, * pDAAP2SQL; -+ -+ -+ -+ #include -+ #include -+ #include -+ #include -+ #include -+ -+ #include "logger.h" -+ #include "db.h" -+ #include "daap_query.h" -+ -+ -+#ifdef ANTLR3_WINDOWS -+// Disable: Unreferenced parameter, - Rules with parameters that are not used -+// constant conditional, - ANTLR realizes that a prediction is always true (synpred usually) -+// initialized but unused variable - tree rewrite variables declared but not needed -+// Unreferenced local variable - lexer rule declares but does not always use _type -+// potentially unitialized variable used - retval always returned from a rule -+// unreferenced local function has been removed - susually getTokenNames or freeScope, they can go without warnigns -+// -+// These are only really displayed at warning level /W4 but that is the code ideal I am aiming at -+// and the codegen must generate some of these warnings by necessity, apart from 4100, which is -+// usually generated when a parser rule is given a parameter that it does not use. Mostly though -+// this is a matter of orthogonality hence I disable that one. -+// -+#pragma warning( disable : 4100 ) -+#pragma warning( disable : 4101 ) -+#pragma warning( disable : 4127 ) -+#pragma warning( disable : 4189 ) -+#pragma warning( disable : 4505 ) -+#pragma warning( disable : 4701 ) -+#endif -+typedef struct DAAP2SQL_expr_return_struct -+{ -+ pANTLR3_BASE_TREE start; -+ pANTLR3_BASE_TREE stop; -+ pANTLR3_STRING result; -+ int valid; -+} -+ DAAP2SQL_expr_return; -+ -+ -+ -+/** Context tracking structure for DAAP2SQL -+ */ -+struct DAAP2SQL_Ctx_struct -+{ -+ /** Built in ANTLR3 context tracker contains all the generic elements -+ * required for context tracking. -+ */ -+ pANTLR3_TREE_PARSER pTreeParser; -+ -+ -+ pANTLR3_STRING (*query) (struct DAAP2SQL_Ctx_struct * ctx); -+ DAAP2SQL_expr_return (*expr) (struct DAAP2SQL_Ctx_struct * ctx); -+ // Delegated rules -+ const char * (*getGrammarFileName)(); -+ void (*free) (struct DAAP2SQL_Ctx_struct * ctx); -+ -+}; -+ -+// Function protoypes for the constructor functions that external translation units -+// such as delegators and delegates may wish to call. -+// -+ANTLR3_API pDAAP2SQL DAAP2SQLNew (pANTLR3_COMMON_TREE_NODE_STREAM instream); -+ANTLR3_API pDAAP2SQL DAAP2SQLNewSSD (pANTLR3_COMMON_TREE_NODE_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state); -+ -+/** Symbolic definitions of all the tokens that the tree parser will work with. -+ * \{ -+ * -+ * Antlr will define EOF, but we can't use that as it it is too common in -+ * in C header files and that would be confusing. There is no way to filter this out at the moment -+ * so we just undef it here for now. That isn't the value we get back from C recognizers -+ * anyway. We are looking for ANTLR3_TOKEN_EOF. -+ */ -+#ifdef EOF -+#undef EOF -+#endif -+#ifdef Tokens -+#undef Tokens -+#endif -+#define STR 9 -+#define QUOTE 10 -+#define NEWLINE 4 -+#define LPAR 7 -+#define OPOR 5 -+#define RPAR 8 -+#define ESCAPED 11 -+#define OPAND 6 -+#define EOF -1 -+#ifdef EOF -+#undef EOF -+#define EOF ANTLR3_TOKEN_EOF -+#endif -+ -+#ifndef TOKENSOURCE -+#define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource -+#endif -+ -+/* End of token definitions for DAAP2SQL -+ * ============================================================================= -+ */ -+/** \} */ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -+ -+/* END - Note:Keep extra line feed to satisfy UNIX systems */ -diff --git a/src/pregen/DAAP2SQL.u b/src/pregen/DAAP2SQL.u -new file mode 100644 -index 0000000..385d80b ---- /dev/null -+++ b/src/pregen/DAAP2SQL.u -@@ -0,0 +1,5 @@ -+DAAP2SQL.g: DAAP.tokens -+DAAP2SQL.c : DAAP2SQL.g -+./DAAP2SQL.tokens : DAAP2SQL.g -+DAAP2SQL.h : DAAP2SQL.g -+ANTLR_PRODUCTS += DAAP2SQL.c ./DAAP2SQL.tokens DAAP2SQL.h -\ No newline at end of file -diff --git a/src/pregen/DAAPLexer.c b/src/pregen/DAAPLexer.c -new file mode 100644 -index 0000000..eab3ff4 ---- /dev/null -+++ b/src/pregen/DAAPLexer.c -@@ -0,0 +1,1101 @@ -+/** \file -+ * This C source file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : DAAP.g -+ * - On : 2016-01-01 12:23:41 -+ * - for the lexer : DAAPLexerLexer * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+*/ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+/* ----------------------------------------- -+ * Include the ANTLR3 generated header file. -+ */ -+#include "DAAPLexer.h" -+/* ----------------------------------------- */ -+ -+ -+ -+ -+ -+/* MACROS that hide the C interface implementations from the -+ * generated code, which makes it a little more understandable to the human eye. -+ * I am very much against using C pre-processor macros for function calls and bits -+ * of code as you cannot see what is happening when single stepping in debuggers -+ * and so on. The exception (in my book at least) is for generated code, where you are -+ * not maintaining it, but may wish to read and understand it. If you single step it, you know that input() -+ * hides some indirect calls, but is always referring to the input stream. This is -+ * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig -+ * the runtime interfaces without changing the generated code too often, without -+ * confusing the reader of the generated output, who may not wish to know the gory -+ * details of the interface inheritance. -+ */ -+ -+#define CTX ctx -+ -+/* Aids in accessing scopes for grammar programmers -+ */ -+#undef SCOPE_TYPE -+#undef SCOPE_STACK -+#undef SCOPE_TOP -+#define SCOPE_TYPE(scope) pDAAPLexer_##scope##_SCOPE -+#define SCOPE_STACK(scope) pDAAPLexer_##scope##Stack -+#define SCOPE_TOP(scope) ctx->pDAAPLexer_##scope##Top -+#define SCOPE_SIZE(scope) ctx->pDAAPLexer_##scope##Stack_limit -+#define SCOPE_INSTANCE(scope, i) (ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i)) -+ -+ -+/* Macros for accessing things in a lexer -+ */ -+#undef LEXER -+#undef RECOGNIZER -+#undef RULEMEMO -+#undef GETCHARINDEX -+#undef GETLINE -+#undef GETCHARPOSITIONINLINE -+#undef EMIT -+#undef EMITNEW -+#undef MATCHC -+#undef MATCHS -+#undef MATCHRANGE -+#undef LTOKEN -+#undef HASFAILED -+#undef FAILEDFLAG -+#undef INPUT -+#undef STRSTREAM -+#undef LA -+#undef HASEXCEPTION -+#undef EXCEPTION -+#undef CONSTRUCTEX -+#undef CONSUME -+#undef LRECOVER -+#undef MARK -+#undef REWIND -+#undef REWINDLAST -+#undef BACKTRACKING -+#undef MATCHANY -+#undef MEMOIZE -+#undef HAVEPARSEDRULE -+#undef GETTEXT -+#undef INDEX -+#undef SEEK -+#undef PUSHSTREAM -+#undef POPSTREAM -+#undef SETTEXT -+#undef SETTEXT8 -+ -+#define LEXER ctx->pLexer -+#define RECOGNIZER LEXER->rec -+#define LEXSTATE RECOGNIZER->state -+#define TOKSOURCE LEXSTATE->tokSource -+#define GETCHARINDEX() LEXER->getCharIndex(LEXER) -+#define GETLINE() LEXER->getLine(LEXER) -+#define GETTEXT() LEXER->getText(LEXER) -+#define GETCHARPOSITIONINLINE() LEXER->getCharPositionInLine(LEXER) -+#define EMIT() LEXSTATE->type = _type; LEXER->emit(LEXER) -+#define EMITNEW(t) LEXER->emitNew(LEXER, t) -+#define MATCHC(c) LEXER->matchc(LEXER, c) -+#define MATCHS(s) LEXER->matchs(LEXER, s) -+#define MATCHRANGE(c1,c2) LEXER->matchRange(LEXER, c1, c2) -+#define MATCHANY() LEXER->matchAny(LEXER) -+#define LTOKEN LEXSTATE->token -+#define HASFAILED() (LEXSTATE->failed == ANTLR3_TRUE) -+#define BACKTRACKING LEXSTATE->backtracking -+#define FAILEDFLAG LEXSTATE->failed -+#define INPUT LEXER->input -+#define STRSTREAM INPUT -+#define ISTREAM INPUT->istream -+#define INDEX() ISTREAM->index(ISTREAM) -+#define SEEK(n) ISTREAM->seek(ISTREAM, n) -+#define EOF_TOKEN &(LEXSTATE->tokSource->eofToken) -+#define HASEXCEPTION() (LEXSTATE->error == ANTLR3_TRUE) -+#define EXCEPTION LEXSTATE->exception -+#define CONSTRUCTEX() RECOGNIZER->exConstruct(RECOGNIZER) -+#define LRECOVER() LEXER->recover(LEXER) -+#define MARK() ISTREAM->mark(ISTREAM) -+#define REWIND(m) ISTREAM->rewind(ISTREAM, m) -+#define REWINDLAST() ISTREAM->rewindLast(ISTREAM) -+#define MEMOIZE(ri,si) RECOGNIZER->memoize(RECOGNIZER, ri, si) -+#define HAVEPARSEDRULE(r) RECOGNIZER->alreadyParsedRule(RECOGNIZER, r) -+#define PUSHSTREAM(str) LEXER->pushCharStream(LEXER, str) -+#define POPSTREAM() LEXER->popCharStream(LEXER) -+#define SETTEXT(str) LEXSTATE->text = str -+#define SKIP() LEXSTATE->token = &(TOKSOURCE->skipToken) -+#define USER1 LEXSTATE->user1 -+#define USER2 LEXSTATE->user2 -+#define USER3 LEXSTATE->user3 -+#define CUSTOM LEXSTATE->custom -+#define RULEMEMO LEXSTATE->ruleMemo -+#define DBG RECOGNIZER->debugger -+ -+/* If we have been told we can rely on the standard 8 bit or 16 bit input -+ * stream, then we can define our macros to use the direct pointers -+ * in the input object, which is much faster than indirect calls. This -+ * is really only significant to lexers with a lot of fragment rules (which -+ * do not place LA(1) in a temporary at the moment) and even then -+ * only if there is a lot of input (order of say 1M or so). -+ */ -+#if defined(ANTLR3_INLINE_INPUT_ASCII) || defined(ANTLR3_INLINE_INPUT_UTF16) -+ -+# ifdef ANTLR3_INLINE_INPUT_ASCII -+ -+/* 8 bit "ASCII" (actually any 8 bit character set) */ -+ -+# define NEXTCHAR ((pANTLR3_UINT8)(INPUT->nextChar)) -+# define DATAP ((pANTLR3_UINT8)(INPUT->data)) -+ -+# else -+ -+# define NEXTCHAR ((pANTLR3_UINT16)(INPUT->nextChar)) -+# define DATAP ((pANTLR3_UINT16)(INPUT->data)) -+ -+# endif -+ -+# define LA(n) ((NEXTCHAR + n) > (DATAP + INPUT->sizeBuf) ? ANTLR3_CHARSTREAM_EOF : (ANTLR3_UCHAR)(*(NEXTCHAR + n - 1))) -+# define CONSUME() \ -+{ \ -+ if (NEXTCHAR < (DATAP + INPUT->sizeBuf)) \ -+ { \ -+ INPUT->charPositionInLine++; \ -+ if ((ANTLR3_UCHAR)(*NEXTCHAR) == INPUT->newlineChar) \ -+ { \ -+ INPUT->line++; \ -+ INPUT->charPositionInLine = 0; \ -+ INPUT->currentLine = (void *)(NEXTCHAR + 1); \ -+ } \ -+ INPUT->nextChar = (void *)(NEXTCHAR + 1); \ -+ } \ -+} -+ -+#else -+ -+// Pick up the input character by calling the input stream implementation. -+// -+#define CONSUME() INPUT->istream->consume(INPUT->istream) -+#define LA(n) INPUT->istream->_LA(INPUT->istream, n) -+ -+#endif -+#define TOKTEXT(tok, txt) tok, (pANTLR3_UINT8)txt -+ -+/* The 4 tokens defined below may well clash with your own #defines or token types. If so -+ * then for the present you must use different names for your defines as these are hard coded -+ * in the code generator. It would be better not to use such names internally, and maybe -+ * we can change this in a forthcoming release. I deliberately do not #undef these -+ * here as this will at least give you a redefined error somewhere if they clash. -+ */ -+#define UP ANTLR3_TOKEN_UP -+#define DOWN ANTLR3_TOKEN_DOWN -+#define EOR ANTLR3_TOKEN_EOR -+#define INVALID ANTLR3_TOKEN_INVALID -+ -+ -+/* ============================================================================= -+ * Functions to create and destroy scopes. First come the rule scopes, followed -+ * by the global declared scopes. -+ */ -+ -+ -+ -+/* ============================================================================= */ -+ -+/* ============================================================================= -+ * Start of recognizer -+ */ -+ -+ -+/* Forward declare the locally static matching functions we have generated and any predicate functions. -+ */ -+static ANTLR3_INLINE void mQUOTE (pDAAPLexer ctx); -+static ANTLR3_INLINE void mLPAR (pDAAPLexer ctx); -+static ANTLR3_INLINE void mRPAR (pDAAPLexer ctx); -+static ANTLR3_INLINE void mOPAND (pDAAPLexer ctx); -+static ANTLR3_INLINE void mOPOR (pDAAPLexer ctx); -+static ANTLR3_INLINE void mNEWLINE (pDAAPLexer ctx); -+static ANTLR3_INLINE void mSTR (pDAAPLexer ctx); -+static ANTLR3_INLINE void mESCAPED (pDAAPLexer ctx); -+static ANTLR3_INLINE void mTokens (pDAAPLexer ctx); -+static void DAAPLexerFree(pDAAPLexer ctx); -+ -+/* ========================================================================= -+ * Lexer matching rules end. -+ * ========================================================================= -+ */ -+ -+ -+ -+static void -+DAAPLexerFree (pDAAPLexer ctx) -+{ -+ LEXER->free(LEXER); -+ -+ ANTLR3_FREE(ctx); -+} -+ -+/** \brief Name of the grammar file that generated this code -+ */ -+static const char fileName[] = "DAAP.g"; -+ -+/** \brief Return the name of the grammar file that generated this code. -+ */ -+static const char * getGrammarFileName() -+{ -+ return fileName; -+} -+ -+/** \brief Create a new lexer called DAAPLexer -+ * -+ * \param[in] instream Pointer to an initialized input stream -+ * \return -+ * - Success pDAAPLexer initialized for the lex start -+ * - Fail NULL -+ */ -+ANTLR3_API pDAAPLexer DAAPLexerNew -+(pANTLR3_INPUT_STREAM instream) -+{ -+ // See if we can create a new lexer with the standard constructor -+ // -+ return DAAPLexerNewSSD(instream, NULL); -+} -+ -+/** \brief Create a new lexer called DAAPLexer -+ * -+ * \param[in] instream Pointer to an initialized input stream -+ * \param[state] state Previously created shared recognizer stat -+ * \return -+ * - Success pDAAPLexer initialized for the lex start -+ * - Fail NULL -+ */ -+ANTLR3_API pDAAPLexer DAAPLexerNewSSD -+(pANTLR3_INPUT_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state) -+{ -+ pDAAPLexer ctx; // Context structure we will build and return -+ -+ ctx = (pDAAPLexer) ANTLR3_CALLOC(1, sizeof(DAAPLexer)); -+ -+ if (ctx == NULL) -+ { -+ // Failed to allocate memory for lexer context -+ return NULL; -+ } -+ -+ /* ------------------------------------------------------------------- -+ * Memory for basic structure is allocated, now to fill in -+ * in base ANTLR3 structures. We initialize the function pointers -+ * for the standard ANTLR3 lexer function set, but upon return -+ * from here, the programmer may set the pointers to provide custom -+ * implementations of each function. -+ * -+ * We don't use the macros defined in DAAPLexer.h here so you can get a sense -+ * of what goes where. -+ */ -+ -+ /* Create a base lexer, using the supplied input stream -+ */ -+ ctx->pLexer = antlr3LexerNewStream(ANTLR3_SIZE_HINT, instream, state); -+ -+ /* Check that we allocated the memory correctly -+ */ -+ if (ctx->pLexer == NULL) -+ { -+ ANTLR3_FREE(ctx); -+ return NULL; -+ } -+ /* Install the implementation of our DAAPLexer interface -+ */ -+ ctx->mQUOTE = mQUOTE; -+ ctx->mLPAR = mLPAR; -+ ctx->mRPAR = mRPAR; -+ ctx->mOPAND = mOPAND; -+ ctx->mOPOR = mOPOR; -+ ctx->mNEWLINE = mNEWLINE; -+ ctx->mSTR = mSTR; -+ ctx->mESCAPED = mESCAPED; -+ ctx->mTokens = mTokens; -+ -+ /** When the nextToken() call is made to this lexer's pANTLR3_TOKEN_SOURCE -+ * it will call mTokens() in this generated code, and will pass it the ctx -+ * pointer of this lexer, not the context of the base lexer, so store that now. -+ */ -+ ctx->pLexer->ctx = ctx; -+ -+ /**Install the token matching function -+ */ -+ ctx->pLexer->mTokens = (void (*) (void *))(mTokens); -+ -+ ctx->getGrammarFileName = getGrammarFileName; -+ ctx->free = DAAPLexerFree; -+ -+ -+ -+ -+ -+ /* Return the newly built lexer to the caller -+ */ -+ return ctx; -+} -+ -+ -+/* ========================================================================= -+ * Functions to match the lexer grammar defined tokens from the input stream -+ */ -+ -+// Comes from: 40:7: ( '\\'' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start QUOTE -+ * -+ * Looks to match the characters the constitute the token QUOTE -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mQUOTE(pDAAPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = QUOTE; -+ -+ -+ // DAAP.g:40:7: ( '\\'' ) -+ // DAAP.g:40:9: '\\'' -+ { -+ MATCHC('\''); -+ if (HASEXCEPTION()) -+ { -+ goto ruleQUOTEEx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleQUOTEEx; /* Prevent compiler warnings */ -+ ruleQUOTEEx: ; -+ -+} -+// $ANTLR end QUOTE -+ -+// Comes from: 41:6: ( '(' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start LPAR -+ * -+ * Looks to match the characters the constitute the token LPAR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mLPAR(pDAAPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = LPAR; -+ -+ -+ // DAAP.g:41:6: ( '(' ) -+ // DAAP.g:41:8: '(' -+ { -+ MATCHC('('); -+ if (HASEXCEPTION()) -+ { -+ goto ruleLPAREx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleLPAREx; /* Prevent compiler warnings */ -+ ruleLPAREx: ; -+ -+} -+// $ANTLR end LPAR -+ -+// Comes from: 42:6: ( ')' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start RPAR -+ * -+ * Looks to match the characters the constitute the token RPAR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mRPAR(pDAAPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = RPAR; -+ -+ -+ // DAAP.g:42:6: ( ')' ) -+ // DAAP.g:42:8: ')' -+ { -+ MATCHC(')'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleRPAREx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleRPAREx; /* Prevent compiler warnings */ -+ ruleRPAREx: ; -+ -+} -+// $ANTLR end RPAR -+ -+// Comes from: 44:7: ( '+' | ' ' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start OPAND -+ * -+ * Looks to match the characters the constitute the token OPAND -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mOPAND(pDAAPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = OPAND; -+ -+ -+ // DAAP.g:44:7: ( '+' | ' ' ) -+ // DAAP.g: -+ { -+ if ( LA(1) == ' ' || LA(1) == '+' ) -+ { -+ CONSUME(); -+ -+ } -+ else -+ { -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; -+ -+ LRECOVER(); goto ruleOPANDEx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleOPANDEx; /* Prevent compiler warnings */ -+ ruleOPANDEx: ; -+ -+} -+// $ANTLR end OPAND -+ -+// Comes from: 45:6: ( ',' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start OPOR -+ * -+ * Looks to match the characters the constitute the token OPOR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mOPOR(pDAAPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = OPOR; -+ -+ -+ // DAAP.g:45:6: ( ',' ) -+ // DAAP.g:45:8: ',' -+ { -+ MATCHC(','); -+ if (HASEXCEPTION()) -+ { -+ goto ruleOPOREx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleOPOREx; /* Prevent compiler warnings */ -+ ruleOPOREx: ; -+ -+} -+// $ANTLR end OPOR -+ -+// Comes from: 47:9: ( ( '\\r' )? '\\n' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start NEWLINE -+ * -+ * Looks to match the characters the constitute the token NEWLINE -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mNEWLINE(pDAAPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = NEWLINE; -+ -+ -+ // DAAP.g:47:9: ( ( '\\r' )? '\\n' ) -+ // DAAP.g:47:11: ( '\\r' )? '\\n' -+ { -+ -+ // DAAP.g:47:11: ( '\\r' )? -+ { -+ int alt1=2; -+ switch ( LA(1) ) -+ { -+ case '\r': -+ { -+ alt1=1; -+ } -+ break; -+ } -+ -+ switch (alt1) -+ { -+ case 1: -+ // DAAP.g:47:11: '\\r' -+ { -+ MATCHC('\r'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleNEWLINEEx; -+ } -+ -+ -+ } -+ break; -+ -+ } -+ } -+ MATCHC('\n'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleNEWLINEEx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleNEWLINEEx; /* Prevent compiler warnings */ -+ ruleNEWLINEEx: ; -+ -+} -+// $ANTLR end NEWLINE -+ -+// Comes from: 55:2: ( QUOTE (reg=~ ( '\\\\' | '\\'' ) | esc= ESCAPED )+ QUOTE ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start STR -+ * -+ * Looks to match the characters the constitute the token STR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mSTR(pDAAPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ pANTLR3_COMMON_TOKEN esc; -+ ANTLR3_UINT32 reg; -+ -+ -+ esc = NULL; -+ -+ _type = STR; -+ -+ pANTLR3_STRING unesc = GETTEXT()->factory->newRaw(GETTEXT()->factory); -+ -+ // DAAP.g:55:2: ( QUOTE (reg=~ ( '\\\\' | '\\'' ) | esc= ESCAPED )+ QUOTE ) -+ // DAAP.g:55:4: QUOTE (reg=~ ( '\\\\' | '\\'' ) | esc= ESCAPED )+ QUOTE -+ { -+ /* 55:4: QUOTE (reg=~ ( '\\\\' | '\\'' ) | esc= ESCAPED )+ QUOTE */ -+ mQUOTE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTREx; -+ } -+ -+ // DAAP.g:55:10: (reg=~ ( '\\\\' | '\\'' ) | esc= ESCAPED )+ -+ { -+ int cnt2=0; -+ -+ for (;;) -+ { -+ int alt2=3; -+ { -+ /* dfaLoopbackState(k,edges,eotPredictsAlt,description,stateNumber,semPredState) -+ */ -+ int LA2_0 = LA(1); -+ if ( (((LA2_0 >= 0x0000) && (LA2_0 <= '&')) || ((LA2_0 >= '(') && (LA2_0 <= '[')) || ((LA2_0 >= ']') && (LA2_0 <= 0xFFFF))) ) -+ { -+ alt2=1; -+ } -+ else if ( (LA2_0 == '\\') ) -+ { -+ alt2=2; -+ } -+ -+ } -+ switch (alt2) -+ { -+ case 1: -+ // DAAP.g:55:12: reg=~ ( '\\\\' | '\\'' ) -+ { -+ reg= LA(1); -+ if ( ((LA(1) >= 0x0000) && (LA(1) <= '&')) || ((LA(1) >= '(') && (LA(1) <= '[')) || ((LA(1) >= ']') && (LA(1) <= 0xFFFF)) ) -+ { -+ CONSUME(); -+ -+ } -+ else -+ { -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; -+ -+ LRECOVER(); goto ruleSTREx; -+ } -+ -+ { -+ unesc->addc(unesc, reg); -+ } -+ -+ } -+ break; -+ case 2: -+ // DAAP.g:56:6: esc= ESCAPED -+ { -+ /* 56:6: esc= ESCAPED */ -+ { -+ ANTLR3_MARKER escStart118 = GETCHARINDEX(); -+ mESCAPED(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTREx; -+ } -+ -+ esc = LEXSTATE->tokFactory->newToken(LEXSTATE->tokFactory); -+ esc->setType(esc, ANTLR3_TOKEN_INVALID); -+ esc->setStartIndex(esc, escStart118); -+ esc->setStopIndex(esc, GETCHARINDEX()-1); -+ esc->input = INPUT; -+ } -+ { -+ unesc->appendS(unesc, GETTEXT()); -+ } -+ -+ } -+ break; -+ -+ default: -+ -+ if ( cnt2 >= 1 ) -+ { -+ goto loop2; -+ } -+ /* mismatchedSetEx() -+ */ -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME; -+ -+ -+ goto ruleSTREx; -+ } -+ cnt2++; -+ } -+ loop2: ; /* Jump to here if this rule does not match */ -+ } -+ /* 55:4: QUOTE (reg=~ ( '\\\\' | '\\'' ) | esc= ESCAPED )+ QUOTE */ -+ mQUOTE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTREx; -+ } -+ -+ { -+ SETTEXT(unesc); -+ } -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleSTREx; /* Prevent compiler warnings */ -+ ruleSTREx: ; -+ -+ esc = NULL; -+ -+} -+// $ANTLR end STR -+ -+// Comes from: 59:9: ( '\\\\' ( '\\\\' | '\\'' ) ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start ESCAPED -+ * -+ * Looks to match the characters the constitute the token ESCAPED -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mESCAPED(pDAAPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ -+ // DAAP.g:59:9: ( '\\\\' ( '\\\\' | '\\'' ) ) -+ // DAAP.g:59:11: '\\\\' ( '\\\\' | '\\'' ) -+ { -+ MATCHC('\\'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleESCAPEDEx; -+ } -+ -+ -+ // DAAP.g:60:3: ( '\\\\' | '\\'' ) -+ { -+ int alt3=2; -+ switch ( LA(1) ) -+ { -+ case '\\': -+ { -+ alt3=1; -+ } -+ break; -+ case '\'': -+ { -+ alt3=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleESCAPEDEx; -+ } -+ -+ switch (alt3) -+ { -+ case 1: -+ // DAAP.g:60:5: '\\\\' -+ { -+ MATCHC('\\'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleESCAPEDEx; -+ } -+ -+ { -+ SETTEXT(GETTEXT()->factory->newStr8(GETTEXT()->factory, (pANTLR3_UINT8)"\\")); -+ } -+ -+ } -+ break; -+ case 2: -+ // DAAP.g:61:5: '\\'' -+ { -+ MATCHC('\''); -+ if (HASEXCEPTION()) -+ { -+ goto ruleESCAPEDEx; -+ } -+ -+ { -+ SETTEXT(GETTEXT()->factory->newStr8(GETTEXT()->factory, (pANTLR3_UINT8)"\'")); -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ -+ } -+ -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleESCAPEDEx; /* Prevent compiler warnings */ -+ ruleESCAPEDEx: ; -+ -+} -+// $ANTLR end ESCAPED -+ -+/** This is the entry point in to the lexer from an object that -+ * wants to generate the next token, such as a pCOMMON_TOKEN_STREAM -+ */ -+static void -+mTokens(pDAAPLexer ctx) -+{ -+ { -+ // DAAP.g:1:8: ( QUOTE | LPAR | RPAR | OPAND | OPOR | NEWLINE | STR ) -+ -+ ANTLR3_UINT32 alt4; -+ -+ alt4=7; -+ -+ switch ( LA(1) ) -+ { -+ case '\'': -+ { -+ -+ { -+ int LA4_1 = LA(2); -+ if ( (((LA4_1 >= 0x0000) && (LA4_1 <= '&')) || ((LA4_1 >= '(') && (LA4_1 <= 0xFFFF))) ) -+ { -+ alt4=7; -+ } -+ else -+ { -+ alt4=1; } -+ } -+ } -+ break; -+ case '(': -+ { -+ alt4=2; -+ } -+ break; -+ case ')': -+ { -+ alt4=3; -+ } -+ break; -+ case ' ': -+ case '+': -+ { -+ alt4=4; -+ } -+ break; -+ case ',': -+ { -+ alt4=5; -+ } -+ break; -+ case '\n': -+ case '\r': -+ { -+ alt4=6; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ switch (alt4) -+ { -+ case 1: -+ // DAAP.g:1:10: QUOTE -+ { -+ /* 1:10: QUOTE */ -+ mQUOTE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 2: -+ // DAAP.g:1:16: LPAR -+ { -+ /* 1:16: LPAR */ -+ mLPAR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 3: -+ // DAAP.g:1:21: RPAR -+ { -+ /* 1:21: RPAR */ -+ mRPAR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 4: -+ // DAAP.g:1:26: OPAND -+ { -+ /* 1:26: OPAND */ -+ mOPAND(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 5: -+ // DAAP.g:1:32: OPOR -+ { -+ /* 1:32: OPOR */ -+ mOPOR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 6: -+ // DAAP.g:1:37: NEWLINE -+ { -+ /* 1:37: NEWLINE */ -+ mNEWLINE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 7: -+ // DAAP.g:1:45: STR -+ { -+ /* 1:45: STR */ -+ mSTR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ -+ } -+ } -+ -+ -+ goto ruleTokensEx; /* Prevent compiler warnings */ -+ruleTokensEx: ; -+} -+ -+/* ========================================================================= -+ * Lexer matching rules end. -+ * ========================================================================= -+ */ -+/* End of Lexer code -+ * ================================================ -+ * ================================================ -+ */ -+ -+ -+/* End of code -+ * ============================================================================= -+ */ -diff --git a/src/pregen/DAAPLexer.h b/src/pregen/DAAPLexer.h -new file mode 100644 -index 0000000..685a0bc ---- /dev/null -+++ b/src/pregen/DAAPLexer.h -@@ -0,0 +1,188 @@ -+/** \file -+ * This C header file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : DAAP.g -+ * - On : 2016-01-01 12:23:41 -+ * - for the lexer : DAAPLexerLexer * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+ * The lexer DAAPLexer has the callable functions (rules) shown below, -+ * which will invoke the code for the associated rule in the source grammar -+ * assuming that the input stream is pointing to a token/text stream that could begin -+ * this rule. -+ * -+ * For instance if you call the first (topmost) rule in a parser grammar, you will -+ * get the results of a full parse, but calling a rule half way through the grammar will -+ * allow you to pass part of a full token stream to the parser, such as for syntax checking -+ * in editors and so on. -+ * -+ * The parser entry points are called indirectly (by function pointer to function) via -+ * a parser context typedef pDAAPLexer, which is returned from a call to DAAPLexerNew(). -+ * -+ * As this is a generated lexer, it is unlikely you will call it 'manually'. However -+ * the methods are provided anyway. -+ * * The methods in pDAAPLexer are as follows: -+ * -+ * - void pDAAPLexer->QUOTE(pDAAPLexer) -+ * - void pDAAPLexer->LPAR(pDAAPLexer) -+ * - void pDAAPLexer->RPAR(pDAAPLexer) -+ * - void pDAAPLexer->OPAND(pDAAPLexer) -+ * - void pDAAPLexer->OPOR(pDAAPLexer) -+ * - void pDAAPLexer->NEWLINE(pDAAPLexer) -+ * - void pDAAPLexer->STR(pDAAPLexer) -+ * - void pDAAPLexer->ESCAPED(pDAAPLexer) -+ * - void pDAAPLexer->Tokens(pDAAPLexer) -+ * -+ * The return type for any particular rule is of course determined by the source -+ * grammar file. -+ */ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+#ifndef _DAAPLexer_H -+#define _DAAPLexer_H -+/* ============================================================================= -+ * Standard antlr3 C runtime definitions -+ */ -+#include -+ -+/* End of standard antlr 3 runtime definitions -+ * ============================================================================= -+ */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+// Forward declare the context typedef so that we can use it before it is -+// properly defined. Delegators and delegates (from import statements) are -+// interdependent and their context structures contain pointers to each other -+// C only allows such things to be declared if you pre-declare the typedef. -+// -+typedef struct DAAPLexer_Ctx_struct DAAPLexer, * pDAAPLexer; -+ -+ -+ -+#ifdef ANTLR3_WINDOWS -+// Disable: Unreferenced parameter, - Rules with parameters that are not used -+// constant conditional, - ANTLR realizes that a prediction is always true (synpred usually) -+// initialized but unused variable - tree rewrite variables declared but not needed -+// Unreferenced local variable - lexer rule declares but does not always use _type -+// potentially unitialized variable used - retval always returned from a rule -+// unreferenced local function has been removed - susually getTokenNames or freeScope, they can go without warnigns -+// -+// These are only really displayed at warning level /W4 but that is the code ideal I am aiming at -+// and the codegen must generate some of these warnings by necessity, apart from 4100, which is -+// usually generated when a parser rule is given a parameter that it does not use. Mostly though -+// this is a matter of orthogonality hence I disable that one. -+// -+#pragma warning( disable : 4100 ) -+#pragma warning( disable : 4101 ) -+#pragma warning( disable : 4127 ) -+#pragma warning( disable : 4189 ) -+#pragma warning( disable : 4505 ) -+#pragma warning( disable : 4701 ) -+#endif -+ -+/** Context tracking structure for DAAPLexer -+ */ -+struct DAAPLexer_Ctx_struct -+{ -+ /** Built in ANTLR3 context tracker contains all the generic elements -+ * required for context tracking. -+ */ -+ pANTLR3_LEXER pLexer; -+ -+ -+ void (*mQUOTE) (struct DAAPLexer_Ctx_struct * ctx); -+ void (*mLPAR) (struct DAAPLexer_Ctx_struct * ctx); -+ void (*mRPAR) (struct DAAPLexer_Ctx_struct * ctx); -+ void (*mOPAND) (struct DAAPLexer_Ctx_struct * ctx); -+ void (*mOPOR) (struct DAAPLexer_Ctx_struct * ctx); -+ void (*mNEWLINE) (struct DAAPLexer_Ctx_struct * ctx); -+ void (*mSTR) (struct DAAPLexer_Ctx_struct * ctx); -+ void (*mESCAPED) (struct DAAPLexer_Ctx_struct * ctx); -+ void (*mTokens) (struct DAAPLexer_Ctx_struct * ctx); const char * (*getGrammarFileName)(); -+ void (*free) (struct DAAPLexer_Ctx_struct * ctx); -+ -+}; -+ -+// Function protoypes for the constructor functions that external translation units -+// such as delegators and delegates may wish to call. -+// -+ANTLR3_API pDAAPLexer DAAPLexerNew (pANTLR3_INPUT_STREAM instream); -+ANTLR3_API pDAAPLexer DAAPLexerNewSSD (pANTLR3_INPUT_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state); -+ -+/** Symbolic definitions of all the tokens that the lexer will work with. -+ * \{ -+ * -+ * Antlr will define EOF, but we can't use that as it it is too common in -+ * in C header files and that would be confusing. There is no way to filter this out at the moment -+ * so we just undef it here for now. That isn't the value we get back from C recognizers -+ * anyway. We are looking for ANTLR3_TOKEN_EOF. -+ */ -+#ifdef EOF -+#undef EOF -+#endif -+#ifdef Tokens -+#undef Tokens -+#endif -+#define STR 9 -+#define QUOTE 10 -+#define NEWLINE 4 -+#define LPAR 7 -+#define OPOR 5 -+#define RPAR 8 -+#define ESCAPED 11 -+#define OPAND 6 -+#define EOF -1 -+#ifdef EOF -+#undef EOF -+#define EOF ANTLR3_TOKEN_EOF -+#endif -+ -+#ifndef TOKENSOURCE -+#define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource -+#endif -+ -+/* End of token definitions for DAAPLexer -+ * ============================================================================= -+ */ -+/** \} */ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -+ -+/* END - Note:Keep extra line feed to satisfy UNIX systems */ -diff --git a/src/pregen/DAAPParser.c b/src/pregen/DAAPParser.c -new file mode 100644 -index 0000000..1091f05 ---- /dev/null -+++ b/src/pregen/DAAPParser.c -@@ -0,0 +1,1014 @@ -+/** \file -+ * This C source file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : DAAP.g -+ * - On : 2016-01-01 12:23:41 -+ * - for the parser : DAAPParserParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+*/ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+/* ----------------------------------------- -+ * Include the ANTLR3 generated header file. -+ */ -+#include "DAAPParser.h" -+/* ----------------------------------------- */ -+ -+ -+ -+ -+ -+/* MACROS that hide the C interface implementations from the -+ * generated code, which makes it a little more understandable to the human eye. -+ * I am very much against using C pre-processor macros for function calls and bits -+ * of code as you cannot see what is happening when single stepping in debuggers -+ * and so on. The exception (in my book at least) is for generated code, where you are -+ * not maintaining it, but may wish to read and understand it. If you single step it, you know that input() -+ * hides some indirect calls, but is always referring to the input stream. This is -+ * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig -+ * the runtime interfaces without changing the generated code too often, without -+ * confusing the reader of the generated output, who may not wish to know the gory -+ * details of the interface inheritance. -+ */ -+ -+#define CTX ctx -+ -+/* Aids in accessing scopes for grammar programmers -+ */ -+#undef SCOPE_TYPE -+#undef SCOPE_STACK -+#undef SCOPE_TOP -+#define SCOPE_TYPE(scope) pDAAPParser_##scope##_SCOPE -+#define SCOPE_STACK(scope) pDAAPParser_##scope##Stack -+#define SCOPE_TOP(scope) ctx->pDAAPParser_##scope##Top -+#define SCOPE_SIZE(scope) ctx->pDAAPParser_##scope##Stack_limit -+#define SCOPE_INSTANCE(scope, i) (ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i)) -+ -+/* Macros for accessing things in the parser -+ */ -+ -+#undef PARSER -+#undef RECOGNIZER -+#undef HAVEPARSEDRULE -+#undef MEMOIZE -+#undef INPUT -+#undef STRSTREAM -+#undef HASEXCEPTION -+#undef EXCEPTION -+#undef MATCHT -+#undef MATCHANYT -+#undef FOLLOWSTACK -+#undef FOLLOWPUSH -+#undef FOLLOWPOP -+#undef PRECOVER -+#undef PREPORTERROR -+#undef LA -+#undef LT -+#undef CONSTRUCTEX -+#undef CONSUME -+#undef MARK -+#undef REWIND -+#undef REWINDLAST -+#undef PERRORRECOVERY -+#undef HASFAILED -+#undef FAILEDFLAG -+#undef RECOVERFROMMISMATCHEDSET -+#undef RECOVERFROMMISMATCHEDELEMENT -+#undef INDEX -+#undef ADAPTOR -+#undef SEEK -+#undef RULEMEMO -+#undef DBG -+ -+#define PARSER ctx->pParser -+#define RECOGNIZER PARSER->rec -+#define PSRSTATE RECOGNIZER->state -+#define HAVEPARSEDRULE(r) RECOGNIZER->alreadyParsedRule(RECOGNIZER, r) -+#define MEMOIZE(ri,si) RECOGNIZER->memoize(RECOGNIZER, ri, si) -+#define INPUT PARSER->tstream -+#define STRSTREAM INPUT -+#define ISTREAM INPUT->istream -+#define INDEX() ISTREAM->index(INPUT->istream) -+#define HASEXCEPTION() (PSRSTATE->error == ANTLR3_TRUE) -+#define EXCEPTION PSRSTATE->exception -+#define MATCHT(t, fs) RECOGNIZER->match(RECOGNIZER, t, fs) -+#define MATCHANYT() RECOGNIZER->matchAny(RECOGNIZER) -+#define FOLLOWSTACK PSRSTATE->following -+#define FOLLOWPUSH(x) FOLLOWSTACK->push(FOLLOWSTACK, ((void *)(&(x))), NULL) -+#define FOLLOWPOP() FOLLOWSTACK->pop(FOLLOWSTACK) -+#define PRECOVER() RECOGNIZER->recover(RECOGNIZER) -+#define PREPORTERROR() RECOGNIZER->reportError(RECOGNIZER) -+#define LA(n) INPUT->istream->_LA(ISTREAM, n) -+#define LT(n) INPUT->_LT(INPUT, n) -+#define CONSTRUCTEX() RECOGNIZER->exConstruct(RECOGNIZER) -+#define CONSUME() ISTREAM->consume(ISTREAM) -+#define MARK() ISTREAM->mark(ISTREAM) -+#define REWIND(m) ISTREAM->rewind(ISTREAM, m) -+#define REWINDLAST() ISTREAM->rewindLast(ISTREAM) -+#define SEEK(n) ISTREAM->seek(ISTREAM, n) -+#define PERRORRECOVERY PSRSTATE->errorRecovery -+#define FAILEDFLAG PSRSTATE->failed -+#define HASFAILED() (FAILEDFLAG == ANTLR3_TRUE) -+#define BACKTRACKING PSRSTATE->backtracking -+#define RECOVERFROMMISMATCHEDSET(s) RECOGNIZER->recoverFromMismatchedSet(RECOGNIZER, s) -+#define RECOVERFROMMISMATCHEDELEMENT(e) RECOGNIZER->recoverFromMismatchedElement(RECOGNIZER, s) -+#define ADAPTOR ctx->adaptor -+#define RULEMEMO PSRSTATE->ruleMemo -+#define DBG RECOGNIZER->debugger -+ -+#define TOKTEXT(tok, txt) tok, (pANTLR3_UINT8)txt -+ -+/* The 4 tokens defined below may well clash with your own #defines or token types. If so -+ * then for the present you must use different names for your defines as these are hard coded -+ * in the code generator. It would be better not to use such names internally, and maybe -+ * we can change this in a forthcoming release. I deliberately do not #undef these -+ * here as this will at least give you a redefined error somewhere if they clash. -+ */ -+#define UP ANTLR3_TOKEN_UP -+#define DOWN ANTLR3_TOKEN_DOWN -+#define EOR ANTLR3_TOKEN_EOR -+#define INVALID ANTLR3_TOKEN_INVALID -+ -+ -+/* ============================================================================= -+ * Functions to create and destroy scopes. First come the rule scopes, followed -+ * by the global declared scopes. -+ */ -+ -+ -+ -+/* ============================================================================= */ -+ -+/* ============================================================================= -+ * Start of recognizer -+ */ -+ -+ -+ -+/** \brief Table of all token names in symbolic order, mainly used for -+ * error reporting. -+ */ -+pANTLR3_UINT8 DAAPParserTokenNames[8+4] -+ = { -+ (pANTLR3_UINT8) "", /* String to print to indicate an invalid token */ -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "NEWLINE", -+ (pANTLR3_UINT8) "OPOR", -+ (pANTLR3_UINT8) "OPAND", -+ (pANTLR3_UINT8) "LPAR", -+ (pANTLR3_UINT8) "RPAR", -+ (pANTLR3_UINT8) "STR", -+ (pANTLR3_UINT8) "QUOTE", -+ (pANTLR3_UINT8) "ESCAPED" -+ }; -+ -+ -+ -+// Forward declare the locally static matching functions we have generated. -+// -+static DAAPParser_query_return query (pDAAPParser ctx); -+static DAAPParser_expr_return expr (pDAAPParser ctx); -+static DAAPParser_aexpr_return aexpr (pDAAPParser ctx); -+static DAAPParser_crit_return crit (pDAAPParser ctx); -+static void DAAPParserFree(pDAAPParser ctx); -+/* For use in tree output where we are accumulating rule labels via label += ruleRef -+ * we need a function that knows how to free a return scope when the list is destroyed. -+ * We cannot just use ANTLR3_FREE because in debug tracking mode, this is a macro. -+ */ -+static void ANTLR3_CDECL freeScope(void * scope) -+{ -+ ANTLR3_FREE(scope); -+} -+ -+/** \brief Name of the grammar file that generated this code -+ */ -+static const char fileName[] = "DAAP.g"; -+ -+/** \brief Return the name of the grammar file that generated this code. -+ */ -+static const char * getGrammarFileName() -+{ -+ return fileName; -+} -+/** \brief Create a new DAAPParser parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pDAAPParser -+DAAPParserNew (pANTLR3_COMMON_TOKEN_STREAM instream) -+{ -+ // See if we can create a new parser with the standard constructor -+ // -+ return DAAPParserNewSSD(instream, NULL); -+} -+ -+/** \brief Create a new DAAPParser parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pDAAPParser -+DAAPParserNewSSD (pANTLR3_COMMON_TOKEN_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state) -+{ -+ pDAAPParser ctx; /* Context structure we will build and return */ -+ -+ ctx = (pDAAPParser) ANTLR3_CALLOC(1, sizeof(DAAPParser)); -+ -+ if (ctx == NULL) -+ { -+ // Failed to allocate memory for parser context -+ // -+ return NULL; -+ } -+ -+ /* ------------------------------------------------------------------- -+ * Memory for basic structure is allocated, now to fill in -+ * the base ANTLR3 structures. We initialize the function pointers -+ * for the standard ANTLR3 parser function set, but upon return -+ * from here, the programmer may set the pointers to provide custom -+ * implementations of each function. -+ * -+ * We don't use the macros defined in DAAPParser.h here, in order that you can get a sense -+ * of what goes where. -+ */ -+ -+ /* Create a base parser/recognizer, using the supplied token stream -+ */ -+ ctx->pParser = antlr3ParserNewStream(ANTLR3_SIZE_HINT, instream->tstream, state); -+ /* Install the implementation of our DAAPParser interface -+ */ -+ ctx->query = query; -+ ctx->expr = expr; -+ ctx->aexpr = aexpr; -+ ctx->crit = crit; -+ ctx->free = DAAPParserFree; -+ ctx->getGrammarFileName = getGrammarFileName; -+ -+ /* Install the scope pushing methods. -+ */ -+ ADAPTOR = ANTLR3_TREE_ADAPTORNew(instream->tstream->tokenSource->strFactory); -+ ctx->vectors = antlr3VectorFactoryNew(0); -+ -+ -+ -+ /* Install the token table -+ */ -+ PSRSTATE->tokenNames = DAAPParserTokenNames; -+ -+ -+ /* Return the newly built parser to the caller -+ */ -+ return ctx; -+} -+ -+/** Free the parser resources -+ */ -+ static void -+ DAAPParserFree(pDAAPParser ctx) -+ { -+ /* Free any scope memory -+ */ -+ -+ ctx->vectors->close(ctx->vectors); -+ /* We created the adaptor so we must free it -+ */ -+ ADAPTOR->free(ADAPTOR); -+ // Free this parser -+ // -+ ctx->pParser->free(ctx->pParser); -+ ANTLR3_FREE(ctx); -+ -+ /* Everything is released, so we can return -+ */ -+ return; -+ } -+ -+/** Return token names used by this parser -+ * -+ * The returned pointer is used as an index into the token names table (using the token -+ * number as the index). -+ * -+ * \return Pointer to first char * in the table. -+ */ -+static pANTLR3_UINT8 *getTokenNames() -+{ -+ return DAAPParserTokenNames; -+} -+ -+ -+/* Declare the bitsets -+ */ -+ -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_query42 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_query42_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_query42 = { FOLLOW_expr_in_query42_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_NEWLINE_in_query44 */ -+static ANTLR3_BITWORD FOLLOW_NEWLINE_in_query44_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000) }; -+static ANTLR3_BITSET_LIST FOLLOW_NEWLINE_in_query44 = { FOLLOW_NEWLINE_in_query44_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_EOF_in_query47 */ -+static ANTLR3_BITWORD FOLLOW_EOF_in_query47_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_EOF_in_query47 = { FOLLOW_EOF_in_query47_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_aexpr_in_expr62 */ -+static ANTLR3_BITWORD FOLLOW_aexpr_in_expr62_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000022) }; -+static ANTLR3_BITSET_LIST FOLLOW_aexpr_in_expr62 = { FOLLOW_aexpr_in_expr62_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_OPOR_in_expr65 */ -+static ANTLR3_BITWORD FOLLOW_OPOR_in_expr65_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000280) }; -+static ANTLR3_BITSET_LIST FOLLOW_OPOR_in_expr65 = { FOLLOW_OPOR_in_expr65_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_aexpr_in_expr68 */ -+static ANTLR3_BITWORD FOLLOW_aexpr_in_expr68_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000022) }; -+static ANTLR3_BITSET_LIST FOLLOW_aexpr_in_expr68 = { FOLLOW_aexpr_in_expr68_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_crit_in_aexpr80 */ -+static ANTLR3_BITWORD FOLLOW_crit_in_aexpr80_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000042) }; -+static ANTLR3_BITSET_LIST FOLLOW_crit_in_aexpr80 = { FOLLOW_crit_in_aexpr80_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_OPAND_in_aexpr83 */ -+static ANTLR3_BITWORD FOLLOW_OPAND_in_aexpr83_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000280) }; -+static ANTLR3_BITSET_LIST FOLLOW_OPAND_in_aexpr83 = { FOLLOW_OPAND_in_aexpr83_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_crit_in_aexpr86 */ -+static ANTLR3_BITWORD FOLLOW_crit_in_aexpr86_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000042) }; -+static ANTLR3_BITSET_LIST FOLLOW_crit_in_aexpr86 = { FOLLOW_crit_in_aexpr86_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAR_in_crit98 */ -+static ANTLR3_BITWORD FOLLOW_LPAR_in_crit98_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000280) }; -+static ANTLR3_BITSET_LIST FOLLOW_LPAR_in_crit98 = { FOLLOW_LPAR_in_crit98_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_crit100 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_crit100_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000100) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_crit100 = { FOLLOW_expr_in_crit100_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAR_in_crit102 */ -+static ANTLR3_BITWORD FOLLOW_RPAR_in_crit102_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_RPAR_in_crit102 = { FOLLOW_RPAR_in_crit102_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STR_in_crit112 */ -+static ANTLR3_BITWORD FOLLOW_STR_in_crit112_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_STR_in_crit112 = { FOLLOW_STR_in_crit112_bits, 1 }; -+ -+ -+ -+ -+/* ============================================== -+ * Parsing rules -+ */ -+/** -+ * $ANTLR start query -+ * DAAP.g:27:1: query : expr ( NEWLINE )? EOF -> expr ; -+ */ -+static DAAPParser_query_return -+query(pDAAPParser ctx) -+{ -+ DAAPParser_query_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN NEWLINE2; -+ pANTLR3_COMMON_TOKEN EOF3; -+ DAAPParser_expr_return expr1; -+ #undef RETURN_TYPE_expr1 -+ #define RETURN_TYPE_expr1 DAAPParser_expr_return -+ -+ pANTLR3_BASE_TREE NEWLINE2_tree; -+ pANTLR3_BASE_TREE EOF3_tree; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_NEWLINE; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_EOF; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_expr; -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ NEWLINE2 = NULL; -+ EOF3 = NULL; -+ expr1.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ NEWLINE2_tree = NULL; -+ EOF3_tree = NULL; -+ -+ stream_NEWLINE = NULL; -+ #define CREATE_stream_NEWLINE if (stream_NEWLINE == NULL) {stream_NEWLINE = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token NEWLINE"); } -+ stream_EOF = NULL; -+ #define CREATE_stream_EOF if (stream_EOF == NULL) {stream_EOF = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token EOF"); } -+ stream_expr = NULL; -+ #define CREATE_stream_expr if (stream_expr == NULL) {stream_expr = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule expr"); } -+ -+ retval.tree = NULL; -+ { -+ // DAAP.g:27:7: ( expr ( NEWLINE )? EOF -> expr ) -+ // DAAP.g:27:9: expr ( NEWLINE )? EOF -+ { -+ FOLLOWPUSH(FOLLOW_expr_in_query42); -+ expr1=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulequeryEx; -+ } -+ -+ CREATE_stream_expr; stream_expr->add(stream_expr, expr1.tree, NULL); -+ -+ // DAAP.g:27:14: ( NEWLINE )? -+ { -+ int alt1=2; -+ switch ( LA(1) ) -+ { -+ case NEWLINE: -+ { -+ alt1=1; -+ } -+ break; -+ } -+ -+ switch (alt1) -+ { -+ case 1: -+ // DAAP.g:27:14: NEWLINE -+ { -+ NEWLINE2 = (pANTLR3_COMMON_TOKEN) MATCHT(NEWLINE, &FOLLOW_NEWLINE_in_query44); -+ if (HASEXCEPTION()) -+ { -+ goto rulequeryEx; -+ } -+ -+ CREATE_stream_NEWLINE; stream_NEWLINE->add(stream_NEWLINE, NEWLINE2, NULL); -+ -+ -+ } -+ break; -+ -+ } -+ } -+ EOF3 = (pANTLR3_COMMON_TOKEN) MATCHT(EOF, &FOLLOW_EOF_in_query47); -+ if (HASEXCEPTION()) -+ { -+ goto rulequeryEx; -+ } -+ -+ CREATE_stream_EOF; stream_EOF->add(stream_EOF, EOF3, NULL); -+ -+ -+ -+ /* AST REWRITE -+ * elements : expr -+ * token labels : -+ * rule labels : retval -+ * token list labels : -+ * rule list labels : -+ */ -+ { -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_retval; -+ -+ stream_retval=antlr3RewriteRuleSubtreeStreamNewAEE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token retval", retval.tree != NULL ? retval.tree : NULL); -+ -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ retval.tree = root_0; -+ // 27:27: -> expr -+ { -+ ADAPTOR->addChild(ADAPTOR, root_0, stream_expr == NULL ? NULL : stream_expr->nextTree(stream_expr)); -+ -+ } -+ -+ retval.tree = root_0; // set result root -+ if (stream_retval != NULL) stream_retval->free(stream_retval); -+ -+ -+ } -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulequeryEx; /* Prevent compiler warnings */ -+ rulequeryEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ if (stream_NEWLINE != NULL) stream_NEWLINE->free(stream_NEWLINE); -+ if (stream_EOF != NULL) stream_EOF->free(stream_EOF); -+ if (stream_expr != NULL) stream_expr->free(stream_expr); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end query */ -+ -+/** -+ * $ANTLR start expr -+ * DAAP.g:30:1: expr : aexpr ( OPOR aexpr )* ; -+ */ -+static DAAPParser_expr_return -+expr(pDAAPParser ctx) -+{ -+ DAAPParser_expr_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN OPOR5; -+ DAAPParser_aexpr_return aexpr4; -+ #undef RETURN_TYPE_aexpr4 -+ #define RETURN_TYPE_aexpr4 DAAPParser_aexpr_return -+ -+ DAAPParser_aexpr_return aexpr6; -+ #undef RETURN_TYPE_aexpr6 -+ #define RETURN_TYPE_aexpr6 DAAPParser_aexpr_return -+ -+ pANTLR3_BASE_TREE OPOR5_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ OPOR5 = NULL; -+ aexpr4.tree = NULL; -+ -+ aexpr6.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ OPOR5_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ // DAAP.g:30:6: ( aexpr ( OPOR aexpr )* ) -+ // DAAP.g:30:8: aexpr ( OPOR aexpr )* -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_aexpr_in_expr62); -+ aexpr4=aexpr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, aexpr4.tree); -+ -+ // DAAP.g:30:14: ( OPOR aexpr )* -+ -+ for (;;) -+ { -+ int alt2=2; -+ switch ( LA(1) ) -+ { -+ case OPOR: -+ { -+ alt2=1; -+ } -+ break; -+ -+ } -+ -+ switch (alt2) -+ { -+ case 1: -+ // DAAP.g:30:15: OPOR aexpr -+ { -+ OPOR5 = (pANTLR3_COMMON_TOKEN) MATCHT(OPOR, &FOLLOW_OPOR_in_expr65); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ OPOR5_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, OPOR5)); -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, OPOR5_tree, root_0)); -+ -+ FOLLOWPUSH(FOLLOW_aexpr_in_expr68); -+ aexpr6=aexpr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, aexpr6.tree); -+ -+ } -+ break; -+ -+ default: -+ goto loop2; /* break out of the loop */ -+ break; -+ } -+ } -+ loop2: ; /* Jump out to here if this rule does not match */ -+ -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleexprEx; /* Prevent compiler warnings */ -+ ruleexprEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end expr */ -+ -+/** -+ * $ANTLR start aexpr -+ * DAAP.g:33:1: aexpr : crit ( OPAND crit )* ; -+ */ -+static DAAPParser_aexpr_return -+aexpr(pDAAPParser ctx) -+{ -+ DAAPParser_aexpr_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN OPAND8; -+ DAAPParser_crit_return crit7; -+ #undef RETURN_TYPE_crit7 -+ #define RETURN_TYPE_crit7 DAAPParser_crit_return -+ -+ DAAPParser_crit_return crit9; -+ #undef RETURN_TYPE_crit9 -+ #define RETURN_TYPE_crit9 DAAPParser_crit_return -+ -+ pANTLR3_BASE_TREE OPAND8_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ OPAND8 = NULL; -+ crit7.tree = NULL; -+ -+ crit9.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ OPAND8_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ // DAAP.g:33:7: ( crit ( OPAND crit )* ) -+ // DAAP.g:33:9: crit ( OPAND crit )* -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_crit_in_aexpr80); -+ crit7=crit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleaexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, crit7.tree); -+ -+ // DAAP.g:33:14: ( OPAND crit )* -+ -+ for (;;) -+ { -+ int alt3=2; -+ switch ( LA(1) ) -+ { -+ case OPAND: -+ { -+ alt3=1; -+ } -+ break; -+ -+ } -+ -+ switch (alt3) -+ { -+ case 1: -+ // DAAP.g:33:15: OPAND crit -+ { -+ OPAND8 = (pANTLR3_COMMON_TOKEN) MATCHT(OPAND, &FOLLOW_OPAND_in_aexpr83); -+ if (HASEXCEPTION()) -+ { -+ goto ruleaexprEx; -+ } -+ -+ OPAND8_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, OPAND8)); -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, OPAND8_tree, root_0)); -+ -+ FOLLOWPUSH(FOLLOW_crit_in_aexpr86); -+ crit9=crit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleaexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, crit9.tree); -+ -+ } -+ break; -+ -+ default: -+ goto loop3; /* break out of the loop */ -+ break; -+ } -+ } -+ loop3: ; /* Jump out to here if this rule does not match */ -+ -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleaexprEx; /* Prevent compiler warnings */ -+ ruleaexprEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end aexpr */ -+ -+/** -+ * $ANTLR start crit -+ * DAAP.g:36:1: crit : ( LPAR expr RPAR -> expr | STR ); -+ */ -+static DAAPParser_crit_return -+crit(pDAAPParser ctx) -+{ -+ DAAPParser_crit_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN LPAR10; -+ pANTLR3_COMMON_TOKEN RPAR12; -+ pANTLR3_COMMON_TOKEN STR13; -+ DAAPParser_expr_return expr11; -+ #undef RETURN_TYPE_expr11 -+ #define RETURN_TYPE_expr11 DAAPParser_expr_return -+ -+ pANTLR3_BASE_TREE LPAR10_tree; -+ pANTLR3_BASE_TREE RPAR12_tree; -+ pANTLR3_BASE_TREE STR13_tree; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_RPAR; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_LPAR; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_expr; -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ LPAR10 = NULL; -+ RPAR12 = NULL; -+ STR13 = NULL; -+ expr11.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ LPAR10_tree = NULL; -+ RPAR12_tree = NULL; -+ STR13_tree = NULL; -+ -+ stream_RPAR = NULL; -+ #define CREATE_stream_RPAR if (stream_RPAR == NULL) {stream_RPAR = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token RPAR"); } -+ stream_LPAR = NULL; -+ #define CREATE_stream_LPAR if (stream_LPAR == NULL) {stream_LPAR = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token LPAR"); } -+ stream_expr = NULL; -+ #define CREATE_stream_expr if (stream_expr == NULL) {stream_expr = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule expr"); } -+ -+ retval.tree = NULL; -+ { -+ { -+ // DAAP.g:36:6: ( LPAR expr RPAR -> expr | STR ) -+ -+ ANTLR3_UINT32 alt4; -+ -+ alt4=2; -+ -+ switch ( LA(1) ) -+ { -+ case LPAR: -+ { -+ alt4=1; -+ } -+ break; -+ case STR: -+ { -+ alt4=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 0; -+ -+ -+ goto rulecritEx; -+ } -+ -+ switch (alt4) -+ { -+ case 1: -+ // DAAP.g:36:8: LPAR expr RPAR -+ { -+ LPAR10 = (pANTLR3_COMMON_TOKEN) MATCHT(LPAR, &FOLLOW_LPAR_in_crit98); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ CREATE_stream_LPAR; stream_LPAR->add(stream_LPAR, LPAR10, NULL); -+ -+ FOLLOWPUSH(FOLLOW_expr_in_crit100); -+ expr11=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ CREATE_stream_expr; stream_expr->add(stream_expr, expr11.tree, NULL); -+ RPAR12 = (pANTLR3_COMMON_TOKEN) MATCHT(RPAR, &FOLLOW_RPAR_in_crit102); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ CREATE_stream_RPAR; stream_RPAR->add(stream_RPAR, RPAR12, NULL); -+ -+ -+ -+ /* AST REWRITE -+ * elements : expr -+ * token labels : -+ * rule labels : retval -+ * token list labels : -+ * rule list labels : -+ */ -+ { -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_retval; -+ -+ stream_retval=antlr3RewriteRuleSubtreeStreamNewAEE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token retval", retval.tree != NULL ? retval.tree : NULL); -+ -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ retval.tree = root_0; -+ // 36:24: -> expr -+ { -+ ADAPTOR->addChild(ADAPTOR, root_0, stream_expr == NULL ? NULL : stream_expr->nextTree(stream_expr)); -+ -+ } -+ -+ retval.tree = root_0; // set result root -+ if (stream_retval != NULL) stream_retval->free(stream_retval); -+ -+ -+ } -+ } -+ break; -+ case 2: -+ // DAAP.g:37:4: STR -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ STR13 = (pANTLR3_COMMON_TOKEN) MATCHT(STR, &FOLLOW_STR_in_crit112); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ STR13_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, STR13)); -+ ADAPTOR->addChild(ADAPTOR, root_0, STR13_tree); -+ -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulecritEx; /* Prevent compiler warnings */ -+ rulecritEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ if (stream_RPAR != NULL) stream_RPAR->free(stream_RPAR); -+ if (stream_LPAR != NULL) stream_LPAR->free(stream_LPAR); -+ if (stream_expr != NULL) stream_expr->free(stream_expr); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end crit */ -+/* End of parsing rules -+ * ============================================== -+ */ -+ -+/* ============================================== -+ * Syntactic predicates -+ */ -+/* End of syntactic predicates -+ * ============================================== -+ */ -+ -+ -+ -+ -+ -+ -+/* End of code -+ * ============================================================================= -+ */ -diff --git a/src/pregen/DAAPParser.h b/src/pregen/DAAPParser.h -new file mode 100644 -index 0000000..e206694 ---- /dev/null -+++ b/src/pregen/DAAPParser.h -@@ -0,0 +1,226 @@ -+/** \file -+ * This C header file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : DAAP.g -+ * - On : 2016-01-01 12:23:41 -+ * - for the parser : DAAPParserParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+ * The parser DAAPParser has the callable functions (rules) shown below, -+ * which will invoke the code for the associated rule in the source grammar -+ * assuming that the input stream is pointing to a token/text stream that could begin -+ * this rule. -+ * -+ * For instance if you call the first (topmost) rule in a parser grammar, you will -+ * get the results of a full parse, but calling a rule half way through the grammar will -+ * allow you to pass part of a full token stream to the parser, such as for syntax checking -+ * in editors and so on. -+ * -+ * The parser entry points are called indirectly (by function pointer to function) via -+ * a parser context typedef pDAAPParser, which is returned from a call to DAAPParserNew(). -+ * -+ * The methods in pDAAPParser are as follows: -+ * -+ * - DAAPParser_query_return pDAAPParser->query(pDAAPParser) -+ * - DAAPParser_expr_return pDAAPParser->expr(pDAAPParser) -+ * - DAAPParser_aexpr_return pDAAPParser->aexpr(pDAAPParser) -+ * - DAAPParser_crit_return pDAAPParser->crit(pDAAPParser) -+ * -+ * The return type for any particular rule is of course determined by the source -+ * grammar file. -+ */ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+#ifndef _DAAPParser_H -+#define _DAAPParser_H -+/* ============================================================================= -+ * Standard antlr3 C runtime definitions -+ */ -+#include -+ -+/* End of standard antlr 3 runtime definitions -+ * ============================================================================= -+ */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+// Forward declare the context typedef so that we can use it before it is -+// properly defined. Delegators and delegates (from import statements) are -+// interdependent and their context structures contain pointers to each other -+// C only allows such things to be declared if you pre-declare the typedef. -+// -+typedef struct DAAPParser_Ctx_struct DAAPParser, * pDAAPParser; -+ -+ -+ -+#ifdef ANTLR3_WINDOWS -+// Disable: Unreferenced parameter, - Rules with parameters that are not used -+// constant conditional, - ANTLR realizes that a prediction is always true (synpred usually) -+// initialized but unused variable - tree rewrite variables declared but not needed -+// Unreferenced local variable - lexer rule declares but does not always use _type -+// potentially unitialized variable used - retval always returned from a rule -+// unreferenced local function has been removed - susually getTokenNames or freeScope, they can go without warnigns -+// -+// These are only really displayed at warning level /W4 but that is the code ideal I am aiming at -+// and the codegen must generate some of these warnings by necessity, apart from 4100, which is -+// usually generated when a parser rule is given a parameter that it does not use. Mostly though -+// this is a matter of orthogonality hence I disable that one. -+// -+#pragma warning( disable : 4100 ) -+#pragma warning( disable : 4101 ) -+#pragma warning( disable : 4127 ) -+#pragma warning( disable : 4189 ) -+#pragma warning( disable : 4505 ) -+#pragma warning( disable : 4701 ) -+#endif -+typedef struct DAAPParser_query_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ DAAPParser_query_return; -+ -+typedef struct DAAPParser_expr_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ DAAPParser_expr_return; -+ -+typedef struct DAAPParser_aexpr_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ DAAPParser_aexpr_return; -+ -+typedef struct DAAPParser_crit_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ DAAPParser_crit_return; -+ -+ -+ -+/** Context tracking structure for DAAPParser -+ */ -+struct DAAPParser_Ctx_struct -+{ -+ /** Built in ANTLR3 context tracker contains all the generic elements -+ * required for context tracking. -+ */ -+ pANTLR3_PARSER pParser; -+ -+ -+ DAAPParser_query_return (*query) (struct DAAPParser_Ctx_struct * ctx); -+ DAAPParser_expr_return (*expr) (struct DAAPParser_Ctx_struct * ctx); -+ DAAPParser_aexpr_return (*aexpr) (struct DAAPParser_Ctx_struct * ctx); -+ DAAPParser_crit_return (*crit) (struct DAAPParser_Ctx_struct * ctx); -+ // Delegated rules -+ const char * (*getGrammarFileName)(); -+ void (*free) (struct DAAPParser_Ctx_struct * ctx); -+ /* @headerFile.members() */ -+ pANTLR3_BASE_TREE_ADAPTOR adaptor; -+ pANTLR3_VECTOR_FACTORY vectors; -+ /* End @headerFile.members() */ -+}; -+ -+// Function protoypes for the constructor functions that external translation units -+// such as delegators and delegates may wish to call. -+// -+ANTLR3_API pDAAPParser DAAPParserNew (pANTLR3_COMMON_TOKEN_STREAM instream); -+ANTLR3_API pDAAPParser DAAPParserNewSSD (pANTLR3_COMMON_TOKEN_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state); -+ -+/** Symbolic definitions of all the tokens that the parser will work with. -+ * \{ -+ * -+ * Antlr will define EOF, but we can't use that as it it is too common in -+ * in C header files and that would be confusing. There is no way to filter this out at the moment -+ * so we just undef it here for now. That isn't the value we get back from C recognizers -+ * anyway. We are looking for ANTLR3_TOKEN_EOF. -+ */ -+#ifdef EOF -+#undef EOF -+#endif -+#ifdef Tokens -+#undef Tokens -+#endif -+#define STR 9 -+#define QUOTE 10 -+#define LPAR 7 -+#define NEWLINE 4 -+#define OPOR 5 -+#define RPAR 8 -+#define ESCAPED 11 -+#define OPAND 6 -+#define EOF -1 -+#ifdef EOF -+#undef EOF -+#define EOF ANTLR3_TOKEN_EOF -+#endif -+ -+#ifndef TOKENSOURCE -+#define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource -+#endif -+ -+/* End of token definitions for DAAPParser -+ * ============================================================================= -+ */ -+/** \} */ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -+ -+/* END - Note:Keep extra line feed to satisfy UNIX systems */ -diff --git a/src/pregen/RSP.u b/src/pregen/RSP.u -new file mode 100644 -index 0000000..89256ff ---- /dev/null -+++ b/src/pregen/RSP.u -@@ -0,0 +1,6 @@ -+RSPParser.c : RSP.g -+./RSP.tokens : RSP.g -+RSPParser.h : RSP.g -+RSPLexer.c : RSP.g -+RSPLexer.h : RSP.g -+ANTLR_PRODUCTS += RSPParser.c ./RSP.tokens RSPParser.h RSPLexer.c RSPLexer.h -\ No newline at end of file -diff --git a/src/pregen/RSP2SQL.c b/src/pregen/RSP2SQL.c -new file mode 100644 -index 0000000..40958f9 ---- /dev/null -+++ b/src/pregen/RSP2SQL.c -@@ -0,0 +1,2546 @@ -+/** \file -+ * This C source file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : RSP2SQL.g -+ * - On : 2016-01-01 12:23:43 -+ * - for the tree parser : RSP2SQLTreeParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+*/ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+ -+/* ============================================================================= -+ * This is what the grammar programmer asked us to put at the top of every file. -+ */ -+ -+ /* Needs #define _GNU_SOURCE for strptime() */ -+ -+ #include -+ #include -+ #include -+ #include -+ -+ #include "logger.h" -+ #include "db.h" -+ #include "misc.h" -+ #include "rsp_query.h" -+ -+/* End of Header action. -+ * ============================================================================= -+ */ -+/* ----------------------------------------- -+ * Include the ANTLR3 generated header file. -+ */ -+#include "RSP2SQL.h" -+/* ----------------------------------------- */ -+ -+ -+ -+ -+ -+/* MACROS that hide the C interface implementations from the -+ * generated code, which makes it a little more understandable to the human eye. -+ * I am very much against using C pre-processor macros for function calls and bits -+ * of code as you cannot see what is happening when single stepping in debuggers -+ * and so on. The exception (in my book at least) is for generated code, where you are -+ * not maintaining it, but may wish to read and understand it. If you single step it, you know that input() -+ * hides some indirect calls, but is always referring to the input stream. This is -+ * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig -+ * the runtime interfaces without changing the generated code too often, without -+ * confusing the reader of the generated output, who may not wish to know the gory -+ * details of the interface inheritance. -+ */ -+ -+#define CTX ctx -+ -+/* Aids in accessing scopes for grammar programmers -+ */ -+#undef SCOPE_TYPE -+#undef SCOPE_STACK -+#undef SCOPE_TOP -+#define SCOPE_TYPE(scope) pRSP2SQL_##scope##_SCOPE -+#define SCOPE_STACK(scope) pRSP2SQL_##scope##Stack -+#define SCOPE_TOP(scope) ctx->pRSP2SQL_##scope##Top -+#define SCOPE_SIZE(scope) ctx->pRSP2SQL_##scope##Stack_limit -+#define SCOPE_INSTANCE(scope, i) (ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i)) -+ -+/* Macros for accessing things in the parser -+ */ -+ -+#undef PARSER -+#undef RECOGNIZER -+#undef HAVEPARSEDRULE -+#undef INPUT -+#undef STRSTREAM -+#undef HASEXCEPTION -+#undef EXCEPTION -+#undef MATCHT -+#undef MATCHANYT -+#undef FOLLOWSTACK -+#undef FOLLOWPUSH -+#undef FOLLOWPOP -+#undef PRECOVER -+#undef PREPORTERROR -+#undef LA -+#undef LT -+#undef CONSTRUCTEX -+#undef CONSUME -+#undef MARK -+#undef REWIND -+#undef REWINDLAST -+#undef PERRORRECOVERY -+#undef HASFAILED -+#undef FAILEDFLAG -+#undef RECOVERFROMMISMATCHEDSET -+#undef RECOVERFROMMISMATCHEDELEMENT -+#undef BACKTRACKING -+#undef ADAPTOR -+#undef RULEMEMO -+#undef SEEK -+#undef INDEX -+#undef DBG -+ -+#define PARSER ctx->pTreeParser -+#define RECOGNIZER PARSER->rec -+#define PSRSTATE RECOGNIZER->state -+#define HAVEPARSEDRULE(r) RECOGNIZER->alreadyParsedRule(RECOGNIZER, r) -+#define INPUT PARSER->ctnstream -+#define ISTREAM INPUT->tnstream->istream -+#define STRSTREAM INPUT->tnstream -+#define HASEXCEPTION() (PSRSTATE->error == ANTLR3_TRUE) -+#define EXCEPTION PSRSTATE->exception -+#define MATCHT(t, fs) RECOGNIZER->match(RECOGNIZER, t, fs) -+#define MATCHANYT() RECOGNIZER->matchAny(RECOGNIZER) -+#define FOLLOWSTACK PSRSTATE->following -+#define FOLLOWPUSH(x) FOLLOWSTACK->push(FOLLOWSTACK, ((void *)(&(x))), NULL) -+#define FOLLOWPOP() FOLLOWSTACK->pop(FOLLOWSTACK) -+#define PRECOVER() RECOGNIZER->recover(RECOGNIZER) -+#define PREPORTERROR() RECOGNIZER->reportError(RECOGNIZER) -+#define LA(n) ISTREAM->_LA(ISTREAM, n) -+#define LT(n) INPUT->tnstream->_LT(INPUT->tnstream, n) -+#define CONSTRUCTEX() RECOGNIZER->exConstruct(RECOGNIZER) -+#define CONSUME() ISTREAM->consume(ISTREAM) -+#define MARK() ISTREAM->mark(ISTREAM) -+#define REWIND(m) ISTREAM->rewind(ISTREAM, m) -+#define REWINDLAST() ISTREAM->rewindLast(ISTREAM) -+#define PERRORRECOVERY PSRSTATE->errorRecovery -+#define FAILEDFLAG PSRSTATE->failed -+#define HASFAILED() (FAILEDFLAG == ANTLR3_TRUE) -+#define BACKTRACKING PSRSTATE->backtracking -+#define RECOVERFROMMISMATCHEDSET(s) RECOGNIZER->recoverFromMismatchedSet(RECOGNIZER, s) -+#define RECOVERFROMMISMATCHEDELEMENT(e) RECOGNIZER->recoverFromMismatchedElement(RECOGNIZER, s) -+#define ADAPTOR INPUT->adaptor -+#define RULEMEMO PSRSTATE->ruleMemo -+#define SEEK(n) ISTREAM->seek(ISTREAM, n) -+#define INDEX() ISTREAM->index(ISTREAM) -+#define DBG RECOGNIZER->debugger -+ -+ -+#define TOKTEXT(tok, txt) tok, (pANTLR3_UINT8)txt -+ -+/* The 4 tokens defined below may well clash with your own #defines or token types. If so -+ * then for the present you must use different names for your defines as these are hard coded -+ * in the code generator. It would be better not to use such names internally, and maybe -+ * we can change this in a forthcoming release. I deliberately do not #undef these -+ * here as this will at least give you a redefined error somewhere if they clash. -+ */ -+#define UP ANTLR3_TOKEN_UP -+#define DOWN ANTLR3_TOKEN_DOWN -+#define EOR ANTLR3_TOKEN_EOR -+#define INVALID ANTLR3_TOKEN_INVALID -+ -+ -+/* ============================================================================= -+ * Functions to create and destroy scopes. First come the rule scopes, followed -+ * by the global declared scopes. -+ */ -+ -+ -+ -+/* ============================================================================= */ -+ -+/* ============================================================================= -+ * Start of recognizer -+ */ -+ -+ -+ -+/** \brief Table of all token names in symbolic order, mainly used for -+ * error reporting. -+ */ -+pANTLR3_UINT8 RSP2SQLTokenNames[30+4] -+ = { -+ (pANTLR3_UINT8) "", /* String to print to indicate an invalid token */ -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "NEWLINE", -+ (pANTLR3_UINT8) "OR", -+ (pANTLR3_UINT8) "AND", -+ (pANTLR3_UINT8) "LPAR", -+ (pANTLR3_UINT8) "RPAR", -+ (pANTLR3_UINT8) "FIELD", -+ (pANTLR3_UINT8) "STR", -+ (pANTLR3_UINT8) "NOT", -+ (pANTLR3_UINT8) "EQUAL", -+ (pANTLR3_UINT8) "INCLUDES", -+ (pANTLR3_UINT8) "STARTSW", -+ (pANTLR3_UINT8) "ENDSW", -+ (pANTLR3_UINT8) "INT", -+ (pANTLR3_UINT8) "LESS", -+ (pANTLR3_UINT8) "GREATER", -+ (pANTLR3_UINT8) "LTE", -+ (pANTLR3_UINT8) "GTE", -+ (pANTLR3_UINT8) "BEFORE", -+ (pANTLR3_UINT8) "AFTER", -+ (pANTLR3_UINT8) "DATE", -+ (pANTLR3_UINT8) "TODAY", -+ (pANTLR3_UINT8) "DAY", -+ (pANTLR3_UINT8) "WEEK", -+ (pANTLR3_UINT8) "MONTH", -+ (pANTLR3_UINT8) "YEAR", -+ (pANTLR3_UINT8) "QUOTE", -+ (pANTLR3_UINT8) "WS", -+ (pANTLR3_UINT8) "DIGIT19", -+ (pANTLR3_UINT8) "DIGIT09", -+ (pANTLR3_UINT8) "ESCAPED" -+ }; -+ -+ -+ -+// Forward declare the locally static matching functions we have generated. -+// -+static pANTLR3_STRING query (pRSP2SQL ctx); -+static RSP2SQL_expr_return expr (pRSP2SQL ctx); -+static RSP2SQL_strcrit_return strcrit (pRSP2SQL ctx); -+static pANTLR3_COMMON_TOKEN strop (pRSP2SQL ctx); -+static RSP2SQL_intcrit_return intcrit (pRSP2SQL ctx); -+static pANTLR3_COMMON_TOKEN intop (pRSP2SQL ctx); -+static RSP2SQL_datecrit_return datecrit (pRSP2SQL ctx); -+static pANTLR3_COMMON_TOKEN dateop (pRSP2SQL ctx); -+static RSP2SQL_datespec_return datespec (pRSP2SQL ctx); -+static RSP2SQL_dateref_return dateref (pRSP2SQL ctx); -+static RSP2SQL_dateintval_return dateintval (pRSP2SQL ctx); -+static void RSP2SQLFree(pRSP2SQL ctx); -+/* For use in tree output where we are accumulating rule labels via label += ruleRef -+ * we need a function that knows how to free a return scope when the list is destroyed. -+ * We cannot just use ANTLR3_FREE because in debug tracking mode, this is a macro. -+ */ -+static void ANTLR3_CDECL freeScope(void * scope) -+{ -+ ANTLR3_FREE(scope); -+} -+ -+/** \brief Name of the grammar file that generated this code -+ */ -+static const char fileName[] = "RSP2SQL.g"; -+ -+/** \brief Return the name of the grammar file that generated this code. -+ */ -+static const char * getGrammarFileName() -+{ -+ return fileName; -+} -+/** \brief Create a new RSP2SQL parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pRSP2SQL -+RSP2SQLNew (pANTLR3_COMMON_TREE_NODE_STREAM instream) -+{ -+ // See if we can create a new parser with the standard constructor -+ // -+ return RSP2SQLNewSSD(instream, NULL); -+} -+ -+/** \brief Create a new RSP2SQL parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pRSP2SQL -+RSP2SQLNewSSD (pANTLR3_COMMON_TREE_NODE_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state) -+{ -+ pRSP2SQL ctx; /* Context structure we will build and return */ -+ -+ ctx = (pRSP2SQL) ANTLR3_CALLOC(1, sizeof(RSP2SQL)); -+ -+ if (ctx == NULL) -+ { -+ // Failed to allocate memory for parser context -+ // -+ return NULL; -+ } -+ -+ /* ------------------------------------------------------------------- -+ * Memory for basic structure is allocated, now to fill in -+ * the base ANTLR3 structures. We initialize the function pointers -+ * for the standard ANTLR3 parser function set, but upon return -+ * from here, the programmer may set the pointers to provide custom -+ * implementations of each function. -+ * -+ * We don't use the macros defined in RSP2SQL.h here, in order that you can get a sense -+ * of what goes where. -+ */ -+ -+ /* Create a base Tree parser/recognizer, using the supplied tree node stream -+ */ -+ ctx->pTreeParser = antlr3TreeParserNewStream(ANTLR3_SIZE_HINT, instream, state); -+ /* Install the implementation of our RSP2SQL interface -+ */ -+ ctx->query = query; -+ ctx->expr = expr; -+ ctx->strcrit = strcrit; -+ ctx->strop = strop; -+ ctx->intcrit = intcrit; -+ ctx->intop = intop; -+ ctx->datecrit = datecrit; -+ ctx->dateop = dateop; -+ ctx->datespec = datespec; -+ ctx->dateref = dateref; -+ ctx->dateintval = dateintval; -+ ctx->free = RSP2SQLFree; -+ ctx->getGrammarFileName = getGrammarFileName; -+ -+ /* Install the scope pushing methods. -+ */ -+ -+ -+ -+ -+ -+ /* Install the token table -+ */ -+ PSRSTATE->tokenNames = RSP2SQLTokenNames; -+ -+ -+ /* Return the newly built parser to the caller -+ */ -+ return ctx; -+} -+ -+/** Free the parser resources -+ */ -+ static void -+ RSP2SQLFree(pRSP2SQL ctx) -+ { -+ /* Free any scope memory -+ */ -+ -+ -+ // Free this parser -+ // -+ ctx->pTreeParser->free(ctx->pTreeParser); -+ ANTLR3_FREE(ctx); -+ -+ /* Everything is released, so we can return -+ */ -+ return; -+ } -+ -+/** Return token names used by this tree parser -+ * -+ * The returned pointer is used as an index into the token names table (using the token -+ * number as the index). -+ * -+ * \return Pointer to first char * in the table. -+ */ -+static pANTLR3_UINT8 *getTokenNames() -+{ -+ return RSP2SQLTokenNames; -+} -+ -+ -+ #define RSP_TYPE_STRING 0 -+ #define RSP_TYPE_INT 1 -+ #define RSP_TYPE_DATE 2 -+ -+ struct rsp_query_field_map { -+ char *rsp_field; -+ int field_type; -+ /* RSP fields are named after the DB columns - or vice versa */ -+ }; -+ -+ /* gperf static hash, rsp_query.gperf */ -+ #include "rsp_query_hash.c" -+ -+ -+/* Declare the bitsets -+ */ -+ -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_query70 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_query70_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_query70 = { FOLLOW_expr_in_query70_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_AND_in_expr95 */ -+static ANTLR3_BITWORD FOLLOW_AND_in_expr95_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_AND_in_expr95 = { FOLLOW_AND_in_expr95_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_expr101 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_expr101_bits[] = { ANTLR3_UINT64_LIT(0x00000000007EF860) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_expr101 = { FOLLOW_expr_in_expr101_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_expr107 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_expr107_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_expr107 = { FOLLOW_expr_in_expr107_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_OR_in_expr118 */ -+static ANTLR3_BITWORD FOLLOW_OR_in_expr118_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_OR_in_expr118 = { FOLLOW_OR_in_expr118_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_expr124 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_expr124_bits[] = { ANTLR3_UINT64_LIT(0x00000000007EF860) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_expr124 = { FOLLOW_expr_in_expr124_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_expr130 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_expr130_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_expr130 = { FOLLOW_expr_in_expr130_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_strcrit_in_expr144 */ -+static ANTLR3_BITWORD FOLLOW_strcrit_in_expr144_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_strcrit_in_expr144 = { FOLLOW_strcrit_in_expr144_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_NOT_in_expr154 */ -+static ANTLR3_BITWORD FOLLOW_NOT_in_expr154_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_NOT_in_expr154 = { FOLLOW_NOT_in_expr154_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_strcrit_in_expr160 */ -+static ANTLR3_BITWORD FOLLOW_strcrit_in_expr160_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_strcrit_in_expr160 = { FOLLOW_strcrit_in_expr160_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_intcrit_in_expr174 */ -+static ANTLR3_BITWORD FOLLOW_intcrit_in_expr174_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_intcrit_in_expr174 = { FOLLOW_intcrit_in_expr174_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_NOT_in_expr184 */ -+static ANTLR3_BITWORD FOLLOW_NOT_in_expr184_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_NOT_in_expr184 = { FOLLOW_NOT_in_expr184_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_intcrit_in_expr190 */ -+static ANTLR3_BITWORD FOLLOW_intcrit_in_expr190_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_intcrit_in_expr190 = { FOLLOW_intcrit_in_expr190_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_datecrit_in_expr204 */ -+static ANTLR3_BITWORD FOLLOW_datecrit_in_expr204_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_datecrit_in_expr204 = { FOLLOW_datecrit_in_expr204_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_strop_in_strcrit233 */ -+static ANTLR3_BITWORD FOLLOW_strop_in_strcrit233_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_strop_in_strcrit233 = { FOLLOW_strop_in_strcrit233_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_FIELD_in_strcrit239 */ -+static ANTLR3_BITWORD FOLLOW_FIELD_in_strcrit239_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000400) }; -+static ANTLR3_BITSET_LIST FOLLOW_FIELD_in_strcrit239 = { FOLLOW_FIELD_in_strcrit239_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STR_in_strcrit245 */ -+static ANTLR3_BITWORD FOLLOW_STR_in_strcrit245_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_STR_in_strcrit245 = { FOLLOW_STR_in_strcrit245_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_EQUAL_in_strop274 */ -+static ANTLR3_BITWORD FOLLOW_EQUAL_in_strop274_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_EQUAL_in_strop274 = { FOLLOW_EQUAL_in_strop274_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INCLUDES_in_strop287 */ -+static ANTLR3_BITWORD FOLLOW_INCLUDES_in_strop287_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_INCLUDES_in_strop287 = { FOLLOW_INCLUDES_in_strop287_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STARTSW_in_strop300 */ -+static ANTLR3_BITWORD FOLLOW_STARTSW_in_strop300_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_STARTSW_in_strop300 = { FOLLOW_STARTSW_in_strop300_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_ENDSW_in_strop313 */ -+static ANTLR3_BITWORD FOLLOW_ENDSW_in_strop313_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_ENDSW_in_strop313 = { FOLLOW_ENDSW_in_strop313_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_intop_in_intcrit342 */ -+static ANTLR3_BITWORD FOLLOW_intop_in_intcrit342_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_intop_in_intcrit342 = { FOLLOW_intop_in_intcrit342_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_FIELD_in_intcrit348 */ -+static ANTLR3_BITWORD FOLLOW_FIELD_in_intcrit348_bits[] = { ANTLR3_UINT64_LIT(0x0000000000010000) }; -+static ANTLR3_BITSET_LIST FOLLOW_FIELD_in_intcrit348 = { FOLLOW_FIELD_in_intcrit348_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INT_in_intcrit354 */ -+static ANTLR3_BITWORD FOLLOW_INT_in_intcrit354_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_INT_in_intcrit354 = { FOLLOW_INT_in_intcrit354_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_EQUAL_in_intop383 */ -+static ANTLR3_BITWORD FOLLOW_EQUAL_in_intop383_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_EQUAL_in_intop383 = { FOLLOW_EQUAL_in_intop383_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_LESS_in_intop396 */ -+static ANTLR3_BITWORD FOLLOW_LESS_in_intop396_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_LESS_in_intop396 = { FOLLOW_LESS_in_intop396_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_GREATER_in_intop409 */ -+static ANTLR3_BITWORD FOLLOW_GREATER_in_intop409_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_GREATER_in_intop409 = { FOLLOW_GREATER_in_intop409_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_LTE_in_intop422 */ -+static ANTLR3_BITWORD FOLLOW_LTE_in_intop422_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_LTE_in_intop422 = { FOLLOW_LTE_in_intop422_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_GTE_in_intop435 */ -+static ANTLR3_BITWORD FOLLOW_GTE_in_intop435_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_GTE_in_intop435 = { FOLLOW_GTE_in_intop435_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateop_in_datecrit464 */ -+static ANTLR3_BITWORD FOLLOW_dateop_in_datecrit464_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateop_in_datecrit464 = { FOLLOW_dateop_in_datecrit464_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_FIELD_in_datecrit470 */ -+static ANTLR3_BITWORD FOLLOW_FIELD_in_datecrit470_bits[] = { ANTLR3_UINT64_LIT(0x0000000001FEF860) }; -+static ANTLR3_BITSET_LIST FOLLOW_FIELD_in_datecrit470 = { FOLLOW_FIELD_in_datecrit470_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_datespec_in_datecrit476 */ -+static ANTLR3_BITWORD FOLLOW_datespec_in_datecrit476_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_datespec_in_datecrit476 = { FOLLOW_datespec_in_datecrit476_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_BEFORE_in_dateop505 */ -+static ANTLR3_BITWORD FOLLOW_BEFORE_in_dateop505_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_BEFORE_in_dateop505 = { FOLLOW_BEFORE_in_dateop505_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_AFTER_in_dateop518 */ -+static ANTLR3_BITWORD FOLLOW_AFTER_in_dateop518_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_AFTER_in_dateop518 = { FOLLOW_AFTER_in_dateop518_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateref_in_datespec546 */ -+static ANTLR3_BITWORD FOLLOW_dateref_in_datespec546_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateref_in_datespec546 = { FOLLOW_dateref_in_datespec546_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateop_in_datespec560 */ -+static ANTLR3_BITWORD FOLLOW_dateop_in_datespec560_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateop_in_datespec560 = { FOLLOW_dateop_in_datespec560_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateref_in_datespec566 */ -+static ANTLR3_BITWORD FOLLOW_dateref_in_datespec566_bits[] = { ANTLR3_UINT64_LIT(0x0000000000010000) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateref_in_datespec566 = { FOLLOW_dateref_in_datespec566_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INT_in_datespec572 */ -+static ANTLR3_BITWORD FOLLOW_INT_in_datespec572_bits[] = { ANTLR3_UINT64_LIT(0x000000001E000000) }; -+static ANTLR3_BITSET_LIST FOLLOW_INT_in_datespec572 = { FOLLOW_INT_in_datespec572_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateintval_in_datespec578 */ -+static ANTLR3_BITWORD FOLLOW_dateintval_in_datespec578_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateintval_in_datespec578 = { FOLLOW_dateintval_in_datespec578_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATE_in_dateref607 */ -+static ANTLR3_BITWORD FOLLOW_DATE_in_dateref607_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATE_in_dateref607 = { FOLLOW_DATE_in_dateref607_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_TODAY_in_dateref616 */ -+static ANTLR3_BITWORD FOLLOW_TODAY_in_dateref616_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_TODAY_in_dateref616 = { FOLLOW_TODAY_in_dateref616_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DAY_in_dateintval640 */ -+static ANTLR3_BITWORD FOLLOW_DAY_in_dateintval640_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DAY_in_dateintval640 = { FOLLOW_DAY_in_dateintval640_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_WEEK_in_dateintval649 */ -+static ANTLR3_BITWORD FOLLOW_WEEK_in_dateintval649_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_WEEK_in_dateintval649 = { FOLLOW_WEEK_in_dateintval649_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_MONTH_in_dateintval658 */ -+static ANTLR3_BITWORD FOLLOW_MONTH_in_dateintval658_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_MONTH_in_dateintval658 = { FOLLOW_MONTH_in_dateintval658_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_YEAR_in_dateintval667 */ -+static ANTLR3_BITWORD FOLLOW_YEAR_in_dateintval667_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_YEAR_in_dateintval667 = { FOLLOW_YEAR_in_dateintval667_bits, 1 }; -+ -+ -+ -+ -+/* ============================================== -+ * Parsing rules -+ */ -+/** -+ * $ANTLR start query -+ * RSP2SQL.g:56:1: query returns [ pANTLR3_STRING result ] : e= expr ; -+ */ -+static pANTLR3_STRING -+query(pRSP2SQL ctx) -+{ -+ pANTLR3_STRING result = NULL; -+ -+ RSP2SQL_expr_return e; -+ #undef RETURN_TYPE_e -+ #define RETURN_TYPE_e RSP2SQL_expr_return -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ result= NULL; -+ { -+ // RSP2SQL.g:58:2: (e= expr ) -+ // RSP2SQL.g:58:4: e= expr -+ { -+ FOLLOWPUSH(FOLLOW_expr_in_query70); -+ e=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulequeryEx; -+ } -+ -+ { -+ -+ if (!e.valid) -+ { -+ result= NULL; -+ } -+ else -+ { -+ result= e.result->factory->newRaw(e.result->factory); -+ result->append8(result, "("); -+ result->appendS(result, e.result); -+ result->append8(result, ")"); -+ } -+ -+ } -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulequeryEx; /* Prevent compiler warnings */ -+ rulequeryEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return result; -+} -+/* $ANTLR end query */ -+ -+/** -+ * $ANTLR start expr -+ * RSP2SQL.g:74:1: expr returns [ pANTLR3_STRING result, int valid ] : ( ^( AND a= expr b= expr ) | ^( OR a= expr b= expr ) | c= strcrit | ^( NOT c= strcrit ) | i= intcrit | ^( NOT i= intcrit ) | d= datecrit ); -+ */ -+static RSP2SQL_expr_return -+expr(pRSP2SQL ctx) -+{ -+ RSP2SQL_expr_return retval; -+ -+ RSP2SQL_expr_return a; -+ #undef RETURN_TYPE_a -+ #define RETURN_TYPE_a RSP2SQL_expr_return -+ -+ RSP2SQL_expr_return b; -+ #undef RETURN_TYPE_b -+ #define RETURN_TYPE_b RSP2SQL_expr_return -+ -+ RSP2SQL_strcrit_return c; -+ #undef RETURN_TYPE_c -+ #define RETURN_TYPE_c RSP2SQL_strcrit_return -+ -+ RSP2SQL_intcrit_return i; -+ #undef RETURN_TYPE_i -+ #define RETURN_TYPE_i RSP2SQL_intcrit_return -+ -+ RSP2SQL_datecrit_return d; -+ #undef RETURN_TYPE_d -+ #define RETURN_TYPE_d RSP2SQL_datecrit_return -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ retval.result= NULL; retval.valid= 1; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ { -+ { -+ // RSP2SQL.g:76:2: ( ^( AND a= expr b= expr ) | ^( OR a= expr b= expr ) | c= strcrit | ^( NOT c= strcrit ) | i= intcrit | ^( NOT i= intcrit ) | d= datecrit ) -+ -+ ANTLR3_UINT32 alt1; -+ -+ alt1=7; -+ -+ switch ( LA(1) ) -+ { -+ case AND: -+ { -+ alt1=1; -+ } -+ break; -+ case OR: -+ { -+ alt1=2; -+ } -+ break; -+ case EQUAL: -+ { -+ switch ( LA(2) ) -+ { -+ case DOWN: -+ { -+ switch ( LA(3) ) -+ { -+ case FIELD: -+ { -+ switch ( LA(4) ) -+ { -+ case INT: -+ { -+ alt1=5; -+ } -+ break; -+ case STR: -+ { -+ alt1=3; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 10; -+ -+ -+ goto ruleexprEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 8; -+ -+ -+ goto ruleexprEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 3; -+ -+ -+ goto ruleexprEx; -+ } -+ -+ } -+ break; -+ case INCLUDES: -+ case STARTSW: -+ case ENDSW: -+ { -+ alt1=3; -+ } -+ break; -+ case NOT: -+ { -+ switch ( LA(2) ) -+ { -+ case DOWN: -+ { -+ switch ( LA(3) ) -+ { -+ case EQUAL: -+ { -+ switch ( LA(4) ) -+ { -+ case DOWN: -+ { -+ switch ( LA(5) ) -+ { -+ case FIELD: -+ { -+ switch ( LA(6) ) -+ { -+ case STR: -+ { -+ alt1=4; -+ } -+ break; -+ case INT: -+ { -+ alt1=6; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 15; -+ -+ -+ goto ruleexprEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 14; -+ -+ -+ goto ruleexprEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 11; -+ -+ -+ goto ruleexprEx; -+ } -+ -+ } -+ break; -+ case LESS: -+ case GREATER: -+ case LTE: -+ case GTE: -+ { -+ alt1=6; -+ } -+ break; -+ case INCLUDES: -+ case STARTSW: -+ case ENDSW: -+ { -+ alt1=4; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 9; -+ -+ -+ goto ruleexprEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 5; -+ -+ -+ goto ruleexprEx; -+ } -+ -+ } -+ break; -+ case LESS: -+ case GREATER: -+ case LTE: -+ case GTE: -+ { -+ alt1=5; -+ } -+ break; -+ case BEFORE: -+ case AFTER: -+ { -+ alt1=7; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleexprEx; -+ } -+ -+ switch (alt1) -+ { -+ case 1: -+ // RSP2SQL.g:76:4: ^( AND a= expr b= expr ) -+ { -+ MATCHT(AND, &FOLLOW_AND_in_expr95); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expr_in_expr101); -+ a=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expr_in_expr107); -+ b=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ { -+ -+ if (!a.valid || !b.valid) -+ { -+ retval.valid= 0; -+ } -+ else -+ { -+ retval.result= a.result->factory->newRaw(a.result->factory); -+ retval.result->append8(retval.result, "("); -+ retval.result->appendS(retval.result, a.result); -+ retval.result->append8(retval.result, " AND "); -+ retval.result->appendS(retval.result, b.result); -+ retval.result->append8(retval.result, ")"); -+ } -+ -+ } -+ -+ } -+ break; -+ case 2: -+ // RSP2SQL.g:92:4: ^( OR a= expr b= expr ) -+ { -+ MATCHT(OR, &FOLLOW_OR_in_expr118); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expr_in_expr124); -+ a=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expr_in_expr130); -+ b=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ { -+ -+ if (!a.valid || !b.valid) -+ { -+ retval.valid= 0; -+ } -+ else -+ { -+ retval.result= a.result->factory->newRaw(a.result->factory); -+ retval.result->append8(retval.result, "("); -+ retval.result->appendS(retval.result, a.result); -+ retval.result->append8(retval.result, " OR "); -+ retval.result->appendS(retval.result, b.result); -+ retval.result->append8(retval.result, ")"); -+ } -+ -+ } -+ -+ } -+ break; -+ case 3: -+ // RSP2SQL.g:108:4: c= strcrit -+ { -+ FOLLOWPUSH(FOLLOW_strcrit_in_expr144); -+ c=strcrit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ { -+ -+ retval.valid= c.valid; -+ retval.result= c.result; -+ -+ } -+ -+ } -+ break; -+ case 4: -+ // RSP2SQL.g:113:4: ^( NOT c= strcrit ) -+ { -+ MATCHT(NOT, &FOLLOW_NOT_in_expr154); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_strcrit_in_expr160); -+ c=strcrit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ { -+ -+ if (!c.valid) -+ { -+ retval.valid= 0; -+ } -+ else -+ { -+ retval.result= c.result->factory->newRaw(c.result->factory); -+ retval.result->append8(retval.result, "(NOT "); -+ retval.result->appendS(retval.result, c.result); -+ retval.result->append8(retval.result, ")"); -+ } -+ -+ } -+ -+ } -+ break; -+ case 5: -+ // RSP2SQL.g:127:4: i= intcrit -+ { -+ FOLLOWPUSH(FOLLOW_intcrit_in_expr174); -+ i=intcrit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ { -+ -+ retval.valid= i.valid; -+ retval.result= i.result; -+ -+ } -+ -+ } -+ break; -+ case 6: -+ // RSP2SQL.g:132:4: ^( NOT i= intcrit ) -+ { -+ MATCHT(NOT, &FOLLOW_NOT_in_expr184); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_intcrit_in_expr190); -+ i=intcrit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ { -+ -+ if (!i.valid) -+ { -+ retval.valid= 0; -+ } -+ else -+ { -+ retval.result= i.result->factory->newRaw(i.result->factory); -+ retval.result->append8(retval.result, "(NOT "); -+ retval.result->appendS(retval.result, i.result); -+ retval.result->append8(retval.result, ")"); -+ } -+ -+ } -+ -+ } -+ break; -+ case 7: -+ // RSP2SQL.g:146:4: d= datecrit -+ { -+ FOLLOWPUSH(FOLLOW_datecrit_in_expr204); -+ d=datecrit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ { -+ -+ retval.valid= d.valid; -+ retval.result= d.result; -+ -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleexprEx; /* Prevent compiler warnings */ -+ ruleexprEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end expr */ -+ -+/** -+ * $ANTLR start strcrit -+ * RSP2SQL.g:153:1: strcrit returns [ pANTLR3_STRING result, int valid ] : ^(o= strop f= FIELD s= STR ) ; -+ */ -+static RSP2SQL_strcrit_return -+strcrit(pRSP2SQL ctx) -+{ -+ RSP2SQL_strcrit_return retval; -+ -+ pANTLR3_BASE_TREE f; -+ pANTLR3_BASE_TREE s; -+ pANTLR3_COMMON_TOKEN o; -+ #undef RETURN_TYPE_o -+ #define RETURN_TYPE_o pANTLR3_COMMON_TOKEN -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ retval.result= NULL; retval.valid= 1; -+ f = NULL; -+ s = NULL; -+ o = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ { -+ // RSP2SQL.g:155:2: ( ^(o= strop f= FIELD s= STR ) ) -+ // RSP2SQL.g:155:4: ^(o= strop f= FIELD s= STR ) -+ { -+ FOLLOWPUSH(FOLLOW_strop_in_strcrit233); -+ o=strop(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ f = (pANTLR3_BASE_TREE) MATCHT(FIELD, &FOLLOW_FIELD_in_strcrit239); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ s = (pANTLR3_BASE_TREE) MATCHT(STR, &FOLLOW_STR_in_strcrit245); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ { -+ -+ char *op; -+ const struct rsp_query_field_map *rqfp; -+ pANTLR3_STRING field; -+ char *escaped; -+ ANTLR3_UINT32 optok; -+ -+ escaped = NULL; -+ -+ op = NULL; -+ optok = o->getType(o); -+ switch (optok) -+ { -+ case EQUAL: -+ op = " = "; -+ break; -+ -+ case INCLUDES: -+ case STARTSW: -+ case ENDSW: -+ op = " LIKE "; -+ break; -+ } -+ -+ field = f->getText(f); -+ -+ /* Field lookup */ -+ rqfp = rsp_query_field_lookup((char *)field->chars, strlen((char *)field->chars)); -+ if (!rqfp) -+ { -+ DPRINTF(E_LOG, L_RSP, "Field '%s' is not a valid field in queries\n", field->chars); -+ retval.valid= 0; -+ goto strcrit_valid_0; /* ABORT */ -+ } -+ -+ /* Check field type */ -+ if (rqfp->field_type != RSP_TYPE_STRING) -+ { -+ DPRINTF(E_LOG, L_RSP, "Field '%s' is not a string field\n", field->chars); -+ retval.valid= 0; -+ goto strcrit_valid_0; /* ABORT */ -+ } -+ -+ escaped = db_escape_string((char *)s->getText(s)->chars); -+ if (!escaped) -+ { -+ DPRINTF(E_LOG, L_RSP, "Could not escape value\n"); -+ retval.valid= 0; -+ goto strcrit_valid_0; /* ABORT */ -+ } -+ -+ retval.result= field->factory->newRaw(field->factory); -+ retval.result->append8(retval.result, "f."); -+ retval.result->appendS(retval.result, field); -+ retval.result->append8(retval.result, op); -+ retval.result->append8(retval.result, "'"); -+ if ((optok == INCLUDES) || (optok == STARTSW)) -+ retval.result->append8(retval.result, "%"); -+ -+ retval.result->append8(retval.result, escaped); -+ -+ if ((optok == INCLUDES) || (optok == ENDSW)) -+ retval.result->append8(retval.result, "%"); -+ retval.result->append8(retval.result, "'"); -+ -+ strcrit_valid_0: -+ ; -+ -+ if (escaped) -+ free(escaped); -+ -+ } -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulestrcritEx; /* Prevent compiler warnings */ -+ rulestrcritEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end strcrit */ -+ -+/** -+ * $ANTLR start strop -+ * RSP2SQL.g:229:1: strop returns [ pANTLR3_COMMON_TOKEN op ] : (n= EQUAL | n= INCLUDES | n= STARTSW | n= ENDSW ); -+ */ -+static pANTLR3_COMMON_TOKEN -+strop(pRSP2SQL ctx) -+{ -+ pANTLR3_COMMON_TOKEN op = NULL; -+ -+ pANTLR3_BASE_TREE n; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ op= NULL; -+ n = NULL; -+ -+ { -+ { -+ // RSP2SQL.g:231:2: (n= EQUAL | n= INCLUDES | n= STARTSW | n= ENDSW ) -+ -+ ANTLR3_UINT32 alt2; -+ -+ alt2=4; -+ -+ switch ( LA(1) ) -+ { -+ case EQUAL: -+ { -+ alt2=1; -+ } -+ break; -+ case INCLUDES: -+ { -+ alt2=2; -+ } -+ break; -+ case STARTSW: -+ { -+ alt2=3; -+ } -+ break; -+ case ENDSW: -+ { -+ alt2=4; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 2; -+ EXCEPTION->state = 0; -+ -+ -+ goto rulestropEx; -+ } -+ -+ switch (alt2) -+ { -+ case 1: -+ // RSP2SQL.g:231:4: n= EQUAL -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(EQUAL, &FOLLOW_EQUAL_in_strop274); -+ if (HASEXCEPTION()) -+ { -+ goto rulestropEx; -+ } -+ -+ { -+ op= n->getToken(n); -+ } -+ -+ } -+ break; -+ case 2: -+ // RSP2SQL.g:233:4: n= INCLUDES -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(INCLUDES, &FOLLOW_INCLUDES_in_strop287); -+ if (HASEXCEPTION()) -+ { -+ goto rulestropEx; -+ } -+ -+ { -+ op= n->getToken(n); -+ } -+ -+ } -+ break; -+ case 3: -+ // RSP2SQL.g:235:4: n= STARTSW -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(STARTSW, &FOLLOW_STARTSW_in_strop300); -+ if (HASEXCEPTION()) -+ { -+ goto rulestropEx; -+ } -+ -+ { -+ op= n->getToken(n); -+ } -+ -+ } -+ break; -+ case 4: -+ // RSP2SQL.g:237:4: n= ENDSW -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(ENDSW, &FOLLOW_ENDSW_in_strop313); -+ if (HASEXCEPTION()) -+ { -+ goto rulestropEx; -+ } -+ -+ { -+ op= n->getToken(n); -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulestropEx; /* Prevent compiler warnings */ -+ rulestropEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return op; -+} -+/* $ANTLR end strop */ -+ -+/** -+ * $ANTLR start intcrit -+ * RSP2SQL.g:241:1: intcrit returns [ pANTLR3_STRING result, int valid ] : ^(o= intop f= FIELD i= INT ) ; -+ */ -+static RSP2SQL_intcrit_return -+intcrit(pRSP2SQL ctx) -+{ -+ RSP2SQL_intcrit_return retval; -+ -+ pANTLR3_BASE_TREE f; -+ pANTLR3_BASE_TREE i; -+ pANTLR3_COMMON_TOKEN o; -+ #undef RETURN_TYPE_o -+ #define RETURN_TYPE_o pANTLR3_COMMON_TOKEN -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ retval.result= NULL; retval.valid= 1; -+ f = NULL; -+ i = NULL; -+ o = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ { -+ // RSP2SQL.g:243:2: ( ^(o= intop f= FIELD i= INT ) ) -+ // RSP2SQL.g:243:4: ^(o= intop f= FIELD i= INT ) -+ { -+ FOLLOWPUSH(FOLLOW_intop_in_intcrit342); -+ o=intop(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ f = (pANTLR3_BASE_TREE) MATCHT(FIELD, &FOLLOW_FIELD_in_intcrit348); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ i = (pANTLR3_BASE_TREE) MATCHT(INT, &FOLLOW_INT_in_intcrit354); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ { -+ -+ char *op; -+ const struct rsp_query_field_map *rqfp; -+ pANTLR3_STRING field; -+ -+ op = NULL; -+ switch (o->getType(o)) -+ { -+ case EQUAL: -+ op = " = "; -+ break; -+ -+ case LESS: -+ op = " < "; -+ break; -+ -+ case GREATER: -+ op = " > "; -+ break; -+ -+ case LTE: -+ op = " <= "; -+ break; -+ -+ case GTE: -+ op = " >= "; -+ break; -+ } -+ -+ field = f->getText(f); -+ -+ /* Field lookup */ -+ rqfp = rsp_query_field_lookup((char *)field->chars, strlen((char *)field->chars)); -+ if (!rqfp) -+ { -+ DPRINTF(E_LOG, L_RSP, "Field '%s' is not a valid field in queries\n", field->chars); -+ retval.valid= 0; -+ goto intcrit_valid_0; /* ABORT */ -+ } -+ -+ /* Check field type */ -+ if (rqfp->field_type != RSP_TYPE_INT) -+ { -+ DPRINTF(E_LOG, L_RSP, "Field '%s' is not an integer field\n", field->chars); -+ retval.valid= 0; -+ goto intcrit_valid_0; /* ABORT */ -+ } -+ -+ retval.result= field->factory->newRaw(field->factory); -+ retval.result->append8(retval.result, "f."); -+ retval.result->appendS(retval.result, field); -+ retval.result->append8(retval.result, op); -+ retval.result->appendS(retval.result, i->getText(i)); -+ -+ intcrit_valid_0: -+ ; -+ -+ } -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleintcritEx; /* Prevent compiler warnings */ -+ ruleintcritEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end intcrit */ -+ -+/** -+ * $ANTLR start intop -+ * RSP2SQL.g:303:1: intop returns [ pANTLR3_COMMON_TOKEN op ] : (n= EQUAL | n= LESS | n= GREATER | n= LTE | n= GTE ); -+ */ -+static pANTLR3_COMMON_TOKEN -+intop(pRSP2SQL ctx) -+{ -+ pANTLR3_COMMON_TOKEN op = NULL; -+ -+ pANTLR3_BASE_TREE n; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ op= NULL; -+ n = NULL; -+ -+ { -+ { -+ // RSP2SQL.g:305:2: (n= EQUAL | n= LESS | n= GREATER | n= LTE | n= GTE ) -+ -+ ANTLR3_UINT32 alt3; -+ -+ alt3=5; -+ -+ switch ( LA(1) ) -+ { -+ case EQUAL: -+ { -+ alt3=1; -+ } -+ break; -+ case LESS: -+ { -+ alt3=2; -+ } -+ break; -+ case GREATER: -+ { -+ alt3=3; -+ } -+ break; -+ case LTE: -+ { -+ alt3=4; -+ } -+ break; -+ case GTE: -+ { -+ alt3=5; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleintopEx; -+ } -+ -+ switch (alt3) -+ { -+ case 1: -+ // RSP2SQL.g:305:4: n= EQUAL -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(EQUAL, &FOLLOW_EQUAL_in_intop383); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintopEx; -+ } -+ -+ { -+ op= n->getToken(n); -+ } -+ -+ } -+ break; -+ case 2: -+ // RSP2SQL.g:307:4: n= LESS -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(LESS, &FOLLOW_LESS_in_intop396); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintopEx; -+ } -+ -+ { -+ op= n->getToken(n); -+ } -+ -+ } -+ break; -+ case 3: -+ // RSP2SQL.g:309:4: n= GREATER -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(GREATER, &FOLLOW_GREATER_in_intop409); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintopEx; -+ } -+ -+ { -+ op= n->getToken(n); -+ } -+ -+ } -+ break; -+ case 4: -+ // RSP2SQL.g:311:4: n= LTE -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(LTE, &FOLLOW_LTE_in_intop422); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintopEx; -+ } -+ -+ { -+ op= n->getToken(n); -+ } -+ -+ } -+ break; -+ case 5: -+ // RSP2SQL.g:313:4: n= GTE -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(GTE, &FOLLOW_GTE_in_intop435); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintopEx; -+ } -+ -+ { -+ op= n->getToken(n); -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleintopEx; /* Prevent compiler warnings */ -+ ruleintopEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return op; -+} -+/* $ANTLR end intop */ -+ -+/** -+ * $ANTLR start datecrit -+ * RSP2SQL.g:317:1: datecrit returns [ pANTLR3_STRING result, int valid ] : ^(o= dateop f= FIELD d= datespec ) ; -+ */ -+static RSP2SQL_datecrit_return -+datecrit(pRSP2SQL ctx) -+{ -+ RSP2SQL_datecrit_return retval; -+ -+ pANTLR3_BASE_TREE f; -+ pANTLR3_COMMON_TOKEN o; -+ #undef RETURN_TYPE_o -+ #define RETURN_TYPE_o pANTLR3_COMMON_TOKEN -+ -+ RSP2SQL_datespec_return d; -+ #undef RETURN_TYPE_d -+ #define RETURN_TYPE_d RSP2SQL_datespec_return -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ retval.result= NULL; retval.valid= 1; -+ f = NULL; -+ o = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ { -+ // RSP2SQL.g:319:2: ( ^(o= dateop f= FIELD d= datespec ) ) -+ // RSP2SQL.g:319:4: ^(o= dateop f= FIELD d= datespec ) -+ { -+ FOLLOWPUSH(FOLLOW_dateop_in_datecrit464); -+ o=dateop(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatecritEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatecritEx; -+ } -+ -+ f = (pANTLR3_BASE_TREE) MATCHT(FIELD, &FOLLOW_FIELD_in_datecrit470); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatecritEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_datespec_in_datecrit476); -+ d=datespec(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatecritEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatecritEx; -+ } -+ -+ { -+ -+ char *op; -+ const struct rsp_query_field_map *rqfp; -+ pANTLR3_STRING field; -+ char buf[32]; -+ int ret; -+ -+ op = NULL; -+ switch (o->getType(o)) -+ { -+ case BEFORE: -+ op = " < "; -+ break; -+ -+ case AFTER: -+ op = " > "; -+ break; -+ } -+ -+ field = f->getText(f); -+ -+ /* Field lookup */ -+ rqfp = rsp_query_field_lookup((char *)field->chars, strlen((char *)field->chars)); -+ if (!rqfp) -+ { -+ DPRINTF(E_LOG, L_RSP, "Field '%s' is not a valid field in queries\n", field->chars); -+ retval.valid= 0; -+ goto datecrit_valid_0; /* ABORT */ -+ } -+ -+ /* Check field type */ -+ if (rqfp->field_type != RSP_TYPE_DATE) -+ { -+ DPRINTF(E_LOG, L_RSP, "Field '%s' is not a date field\n", field->chars); -+ retval.valid= 0; -+ goto datecrit_valid_0; /* ABORT */ -+ } -+ -+ ret = snprintf(buf, sizeof(buf), "%ld", d.date); -+ if ((ret < 0) || (ret >= sizeof(buf))) -+ { -+ DPRINTF(E_LOG, L_RSP, "Date %ld too large for buffer, oops!\n", d.date); -+ retval.valid= 0; -+ goto datecrit_valid_0; /* ABORT */ -+ } -+ -+ retval.result= field->factory->newRaw(field->factory); -+ retval.result->append8(retval.result, "f."); -+ retval.result->appendS(retval.result, field); -+ retval.result->append8(retval.result, op); -+ retval.result->append8(retval.result, buf); -+ -+ datecrit_valid_0: -+ ; -+ -+ } -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledatecritEx; /* Prevent compiler warnings */ -+ ruledatecritEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end datecrit */ -+ -+/** -+ * $ANTLR start dateop -+ * RSP2SQL.g:377:1: dateop returns [ pANTLR3_COMMON_TOKEN op ] : (n= BEFORE | n= AFTER ); -+ */ -+static pANTLR3_COMMON_TOKEN -+dateop(pRSP2SQL ctx) -+{ -+ pANTLR3_COMMON_TOKEN op = NULL; -+ -+ pANTLR3_BASE_TREE n; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ op= NULL; -+ n = NULL; -+ -+ { -+ { -+ // RSP2SQL.g:379:2: (n= BEFORE | n= AFTER ) -+ -+ ANTLR3_UINT32 alt4; -+ -+ alt4=2; -+ -+ switch ( LA(1) ) -+ { -+ case BEFORE: -+ { -+ alt4=1; -+ } -+ break; -+ case AFTER: -+ { -+ alt4=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruledateopEx; -+ } -+ -+ switch (alt4) -+ { -+ case 1: -+ // RSP2SQL.g:379:4: n= BEFORE -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(BEFORE, &FOLLOW_BEFORE_in_dateop505); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateopEx; -+ } -+ -+ { -+ op= n->getToken(n); -+ } -+ -+ } -+ break; -+ case 2: -+ // RSP2SQL.g:381:4: n= AFTER -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(AFTER, &FOLLOW_AFTER_in_dateop518); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateopEx; -+ } -+ -+ { -+ op= n->getToken(n); -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledateopEx; /* Prevent compiler warnings */ -+ ruledateopEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return op; -+} -+/* $ANTLR end dateop */ -+ -+/** -+ * $ANTLR start datespec -+ * RSP2SQL.g:385:1: datespec returns [ time_t date, int valid ] : (r= dateref | ^(o= dateop r= dateref m= INT i= dateintval ) ); -+ */ -+static RSP2SQL_datespec_return -+datespec(pRSP2SQL ctx) -+{ -+ RSP2SQL_datespec_return retval; -+ -+ pANTLR3_BASE_TREE m; -+ RSP2SQL_dateref_return r; -+ #undef RETURN_TYPE_r -+ #define RETURN_TYPE_r RSP2SQL_dateref_return -+ -+ pANTLR3_COMMON_TOKEN o; -+ #undef RETURN_TYPE_o -+ #define RETURN_TYPE_o pANTLR3_COMMON_TOKEN -+ -+ RSP2SQL_dateintval_return i; -+ #undef RETURN_TYPE_i -+ #define RETURN_TYPE_i RSP2SQL_dateintval_return -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ retval.date= 0; retval.valid= 1; -+ m = NULL; -+ o = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ { -+ { -+ // RSP2SQL.g:387:2: (r= dateref | ^(o= dateop r= dateref m= INT i= dateintval ) ) -+ -+ ANTLR3_UINT32 alt5; -+ -+ alt5=2; -+ -+ switch ( LA(1) ) -+ { -+ case DATE: -+ case TODAY: -+ { -+ alt5=1; -+ } -+ break; -+ case BEFORE: -+ case AFTER: -+ { -+ alt5=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 5; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruledatespecEx; -+ } -+ -+ switch (alt5) -+ { -+ case 1: -+ // RSP2SQL.g:387:4: r= dateref -+ { -+ FOLLOWPUSH(FOLLOW_dateref_in_datespec546); -+ r=dateref(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ { -+ -+ if (!r.valid) -+ retval.valid= 0; -+ else -+ retval.date= r.date; -+ -+ } -+ -+ } -+ break; -+ case 2: -+ // RSP2SQL.g:394:4: ^(o= dateop r= dateref m= INT i= dateintval ) -+ { -+ FOLLOWPUSH(FOLLOW_dateop_in_datespec560); -+ o=dateop(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_dateref_in_datespec566); -+ r=dateref(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ m = (pANTLR3_BASE_TREE) MATCHT(INT, &FOLLOW_INT_in_datespec572); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_dateintval_in_datespec578); -+ i=dateintval(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ { -+ -+ int32_t val; -+ int ret; -+ -+ if (!r.valid || !i.valid) -+ { -+ retval.valid= 0; -+ goto datespec_valid_0; /* ABORT */ -+ } -+ -+ ret = safe_atoi32((char *)m->getText(m)->chars, &val); -+ if (ret < 0) -+ { -+ DPRINTF(E_LOG, L_RSP, "Could not convert '%s' to integer\n", (char *)m->getText(m)); -+ retval.valid= 0; -+ goto datespec_valid_0; /* ABORT */ -+ } -+ -+ switch (o->getType(o)) -+ { -+ case BEFORE: -+ retval.date= r.date - (val * i.period); -+ break; -+ -+ case AFTER: -+ retval.date= r.date + (val * i.period); -+ break; -+ } -+ -+ datespec_valid_0: -+ ; -+ -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledatespecEx; /* Prevent compiler warnings */ -+ ruledatespecEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end datespec */ -+ -+/** -+ * $ANTLR start dateref -+ * RSP2SQL.g:429:1: dateref returns [ time_t date, int valid ] : (n= DATE | TODAY ); -+ */ -+static RSP2SQL_dateref_return -+dateref(pRSP2SQL ctx) -+{ -+ RSP2SQL_dateref_return retval; -+ -+ pANTLR3_BASE_TREE n; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ retval.date= 0; retval.valid= 1; -+ n = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ { -+ { -+ // RSP2SQL.g:431:2: (n= DATE | TODAY ) -+ -+ ANTLR3_UINT32 alt6; -+ -+ alt6=2; -+ -+ switch ( LA(1) ) -+ { -+ case DATE: -+ { -+ alt6=1; -+ } -+ break; -+ case TODAY: -+ { -+ alt6=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 6; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruledaterefEx; -+ } -+ -+ switch (alt6) -+ { -+ case 1: -+ // RSP2SQL.g:431:4: n= DATE -+ { -+ n = (pANTLR3_BASE_TREE) MATCHT(DATE, &FOLLOW_DATE_in_dateref607); -+ if (HASEXCEPTION()) -+ { -+ goto ruledaterefEx; -+ } -+ -+ { -+ -+ struct tm tm; -+ char *ret; -+ -+ ret = strptime((char *)n->getText(n), "%Y-%m-%d", &tm); -+ if (!ret) -+ { -+ DPRINTF(E_LOG, L_RSP, "Date '%s' could not be interpreted\n", (char *)n->getText(n)); -+ retval.valid= 0; -+ goto dateref_valid_0; /* ABORT */ -+ } -+ else -+ { -+ if (*ret != '\0') -+ DPRINTF(E_LOG, L_RSP, "Garbage at end of date '%s' ?!\n", (char *)n->getText(n)); -+ -+ retval.date= mktime(&tm); -+ if (retval.date == (time_t) -1) -+ { -+ DPRINTF(E_LOG, L_RSP, "Date '%s' could not be converted to an epoch\n", (char *)n->getText(n)); -+ retval.valid= 0; -+ goto dateref_valid_0; /* ABORT */ -+ } -+ } -+ -+ dateref_valid_0: -+ ; -+ -+ } -+ -+ } -+ break; -+ case 2: -+ // RSP2SQL.g:460:4: TODAY -+ { -+ MATCHT(TODAY, &FOLLOW_TODAY_in_dateref616); -+ if (HASEXCEPTION()) -+ { -+ goto ruledaterefEx; -+ } -+ -+ { -+ retval.date= time(NULL); -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledaterefEx; /* Prevent compiler warnings */ -+ ruledaterefEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end dateref */ -+ -+/** -+ * $ANTLR start dateintval -+ * RSP2SQL.g:464:1: dateintval returns [ time_t period, int valid ] : ( DAY | WEEK | MONTH | YEAR ); -+ */ -+static RSP2SQL_dateintval_return -+dateintval(pRSP2SQL ctx) -+{ -+ RSP2SQL_dateintval_return retval; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ retval.period= 0; retval.valid= 1; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ { -+ { -+ // RSP2SQL.g:466:2: ( DAY | WEEK | MONTH | YEAR ) -+ -+ ANTLR3_UINT32 alt7; -+ -+ alt7=4; -+ -+ switch ( LA(1) ) -+ { -+ case DAY: -+ { -+ alt7=1; -+ } -+ break; -+ case WEEK: -+ { -+ alt7=2; -+ } -+ break; -+ case MONTH: -+ { -+ alt7=3; -+ } -+ break; -+ case YEAR: -+ { -+ alt7=4; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 7; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruledateintvalEx; -+ } -+ -+ switch (alt7) -+ { -+ case 1: -+ // RSP2SQL.g:466:4: DAY -+ { -+ MATCHT(DAY, &FOLLOW_DAY_in_dateintval640); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateintvalEx; -+ } -+ -+ { -+ retval.period= 24 * 60 * 60; -+ } -+ -+ } -+ break; -+ case 2: -+ // RSP2SQL.g:468:4: WEEK -+ { -+ MATCHT(WEEK, &FOLLOW_WEEK_in_dateintval649); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateintvalEx; -+ } -+ -+ { -+ retval.period= 7 * 24 * 60 * 60; -+ } -+ -+ } -+ break; -+ case 3: -+ // RSP2SQL.g:470:4: MONTH -+ { -+ MATCHT(MONTH, &FOLLOW_MONTH_in_dateintval658); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateintvalEx; -+ } -+ -+ { -+ retval.period= 30 * 24 * 60 * 60; -+ } -+ -+ } -+ break; -+ case 4: -+ // RSP2SQL.g:472:4: YEAR -+ { -+ MATCHT(YEAR, &FOLLOW_YEAR_in_dateintval667); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateintvalEx; -+ } -+ -+ { -+ retval.period= 365 * 24 * 60 * 60; -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledateintvalEx; /* Prevent compiler warnings */ -+ ruledateintvalEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end dateintval */ -+/* End of parsing rules -+ * ============================================== -+ */ -+ -+/* ============================================== -+ * Syntactic predicates -+ */ -+/* End of syntactic predicates -+ * ============================================== -+ */ -+ -+ -+ -+ -+ -+ -+/* End of code -+ * ============================================================================= -+ */ -diff --git a/src/pregen/RSP2SQL.h b/src/pregen/RSP2SQL.h -new file mode 100644 -index 0000000..08ac7bb ---- /dev/null -+++ b/src/pregen/RSP2SQL.h -@@ -0,0 +1,291 @@ -+/** \file -+ * This C header file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : RSP2SQL.g -+ * - On : 2016-01-01 12:23:43 -+ * - for the tree parser : RSP2SQLTreeParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+ * The tree parser RSP2SQL has the callable functions (rules) shown below, -+ * which will invoke the code for the associated rule in the source grammar -+ * assuming that the input stream is pointing to a token/text stream that could begin -+ * this rule. -+ * -+ * For instance if you call the first (topmost) rule in a parser grammar, you will -+ * get the results of a full parse, but calling a rule half way through the grammar will -+ * allow you to pass part of a full token stream to the parser, such as for syntax checking -+ * in editors and so on. -+ * -+ * The parser entry points are called indirectly (by function pointer to function) via -+ * a parser context typedef pRSP2SQL, which is returned from a call to RSP2SQLNew(). -+ * -+ * The methods in pRSP2SQL are as follows: -+ * -+ * - pANTLR3_STRING pRSP2SQL->query(pRSP2SQL) -+ * - RSP2SQL_expr_return pRSP2SQL->expr(pRSP2SQL) -+ * - RSP2SQL_strcrit_return pRSP2SQL->strcrit(pRSP2SQL) -+ * - pANTLR3_COMMON_TOKEN pRSP2SQL->strop(pRSP2SQL) -+ * - RSP2SQL_intcrit_return pRSP2SQL->intcrit(pRSP2SQL) -+ * - pANTLR3_COMMON_TOKEN pRSP2SQL->intop(pRSP2SQL) -+ * - RSP2SQL_datecrit_return pRSP2SQL->datecrit(pRSP2SQL) -+ * - pANTLR3_COMMON_TOKEN pRSP2SQL->dateop(pRSP2SQL) -+ * - RSP2SQL_datespec_return pRSP2SQL->datespec(pRSP2SQL) -+ * - RSP2SQL_dateref_return pRSP2SQL->dateref(pRSP2SQL) -+ * - RSP2SQL_dateintval_return pRSP2SQL->dateintval(pRSP2SQL) -+ * -+ * The return type for any particular rule is of course determined by the source -+ * grammar file. -+ */ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+#ifndef _RSP2SQL_H -+#define _RSP2SQL_H -+/* ============================================================================= -+ * Standard antlr3 C runtime definitions -+ */ -+#include -+ -+/* End of standard antlr 3 runtime definitions -+ * ============================================================================= -+ */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+// Forward declare the context typedef so that we can use it before it is -+// properly defined. Delegators and delegates (from import statements) are -+// interdependent and their context structures contain pointers to each other -+// C only allows such things to be declared if you pre-declare the typedef. -+// -+typedef struct RSP2SQL_Ctx_struct RSP2SQL, * pRSP2SQL; -+ -+ -+ -+ /* Needs #define _GNU_SOURCE for strptime() */ -+ -+ #include -+ #include -+ #include -+ #include -+ -+ #include "logger.h" -+ #include "db.h" -+ #include "misc.h" -+ #include "rsp_query.h" -+ -+ -+#ifdef ANTLR3_WINDOWS -+// Disable: Unreferenced parameter, - Rules with parameters that are not used -+// constant conditional, - ANTLR realizes that a prediction is always true (synpred usually) -+// initialized but unused variable - tree rewrite variables declared but not needed -+// Unreferenced local variable - lexer rule declares but does not always use _type -+// potentially unitialized variable used - retval always returned from a rule -+// unreferenced local function has been removed - susually getTokenNames or freeScope, they can go without warnigns -+// -+// These are only really displayed at warning level /W4 but that is the code ideal I am aiming at -+// and the codegen must generate some of these warnings by necessity, apart from 4100, which is -+// usually generated when a parser rule is given a parameter that it does not use. Mostly though -+// this is a matter of orthogonality hence I disable that one. -+// -+#pragma warning( disable : 4100 ) -+#pragma warning( disable : 4101 ) -+#pragma warning( disable : 4127 ) -+#pragma warning( disable : 4189 ) -+#pragma warning( disable : 4505 ) -+#pragma warning( disable : 4701 ) -+#endif -+typedef struct RSP2SQL_expr_return_struct -+{ -+ pANTLR3_BASE_TREE start; -+ pANTLR3_BASE_TREE stop; -+ pANTLR3_STRING result; -+ int valid; -+} -+ RSP2SQL_expr_return; -+ -+typedef struct RSP2SQL_strcrit_return_struct -+{ -+ pANTLR3_BASE_TREE start; -+ pANTLR3_BASE_TREE stop; -+ pANTLR3_STRING result; -+ int valid; -+} -+ RSP2SQL_strcrit_return; -+ -+typedef struct RSP2SQL_intcrit_return_struct -+{ -+ pANTLR3_BASE_TREE start; -+ pANTLR3_BASE_TREE stop; -+ pANTLR3_STRING result; -+ int valid; -+} -+ RSP2SQL_intcrit_return; -+ -+typedef struct RSP2SQL_datecrit_return_struct -+{ -+ pANTLR3_BASE_TREE start; -+ pANTLR3_BASE_TREE stop; -+ pANTLR3_STRING result; -+ int valid; -+} -+ RSP2SQL_datecrit_return; -+ -+typedef struct RSP2SQL_datespec_return_struct -+{ -+ pANTLR3_BASE_TREE start; -+ pANTLR3_BASE_TREE stop; -+ time_t date; -+ int valid; -+} -+ RSP2SQL_datespec_return; -+ -+typedef struct RSP2SQL_dateref_return_struct -+{ -+ pANTLR3_BASE_TREE start; -+ pANTLR3_BASE_TREE stop; -+ time_t date; -+ int valid; -+} -+ RSP2SQL_dateref_return; -+ -+typedef struct RSP2SQL_dateintval_return_struct -+{ -+ pANTLR3_BASE_TREE start; -+ pANTLR3_BASE_TREE stop; -+ time_t period; -+ int valid; -+} -+ RSP2SQL_dateintval_return; -+ -+ -+ -+/** Context tracking structure for RSP2SQL -+ */ -+struct RSP2SQL_Ctx_struct -+{ -+ /** Built in ANTLR3 context tracker contains all the generic elements -+ * required for context tracking. -+ */ -+ pANTLR3_TREE_PARSER pTreeParser; -+ -+ -+ pANTLR3_STRING (*query) (struct RSP2SQL_Ctx_struct * ctx); -+ RSP2SQL_expr_return (*expr) (struct RSP2SQL_Ctx_struct * ctx); -+ RSP2SQL_strcrit_return (*strcrit) (struct RSP2SQL_Ctx_struct * ctx); -+ pANTLR3_COMMON_TOKEN (*strop) (struct RSP2SQL_Ctx_struct * ctx); -+ RSP2SQL_intcrit_return (*intcrit) (struct RSP2SQL_Ctx_struct * ctx); -+ pANTLR3_COMMON_TOKEN (*intop) (struct RSP2SQL_Ctx_struct * ctx); -+ RSP2SQL_datecrit_return (*datecrit) (struct RSP2SQL_Ctx_struct * ctx); -+ pANTLR3_COMMON_TOKEN (*dateop) (struct RSP2SQL_Ctx_struct * ctx); -+ RSP2SQL_datespec_return (*datespec) (struct RSP2SQL_Ctx_struct * ctx); -+ RSP2SQL_dateref_return (*dateref) (struct RSP2SQL_Ctx_struct * ctx); -+ RSP2SQL_dateintval_return (*dateintval) (struct RSP2SQL_Ctx_struct * ctx); -+ // Delegated rules -+ const char * (*getGrammarFileName)(); -+ void (*free) (struct RSP2SQL_Ctx_struct * ctx); -+ -+}; -+ -+// Function protoypes for the constructor functions that external translation units -+// such as delegators and delegates may wish to call. -+// -+ANTLR3_API pRSP2SQL RSP2SQLNew (pANTLR3_COMMON_TREE_NODE_STREAM instream); -+ANTLR3_API pRSP2SQL RSP2SQLNewSSD (pANTLR3_COMMON_TREE_NODE_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state); -+ -+/** Symbolic definitions of all the tokens that the tree parser will work with. -+ * \{ -+ * -+ * Antlr will define EOF, but we can't use that as it it is too common in -+ * in C header files and that would be confusing. There is no way to filter this out at the moment -+ * so we just undef it here for now. That isn't the value we get back from C recognizers -+ * anyway. We are looking for ANTLR3_TOKEN_EOF. -+ */ -+#ifdef EOF -+#undef EOF -+#endif -+#ifdef Tokens -+#undef Tokens -+#endif -+#define STARTSW 14 -+#define WEEK 26 -+#define TODAY 24 -+#define YEAR 28 -+#define ENDSW 15 -+#define GTE 20 -+#define BEFORE 21 -+#define DAY 25 -+#define INT 16 -+#define NOT 11 -+#define AFTER 22 -+#define AND 6 -+#define EOF -1 -+#define LTE 19 -+#define MONTH 27 -+#define DIGIT19 31 -+#define INCLUDES 13 -+#define STR 10 -+#define QUOTE 29 -+#define GREATER 18 -+#define WS 30 -+#define LPAR 7 -+#define NEWLINE 4 -+#define EQUAL 12 -+#define OR 5 -+#define LESS 17 -+#define FIELD 9 -+#define RPAR 8 -+#define ESCAPED 33 -+#define DATE 23 -+#define DIGIT09 32 -+#ifdef EOF -+#undef EOF -+#define EOF ANTLR3_TOKEN_EOF -+#endif -+ -+#ifndef TOKENSOURCE -+#define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource -+#endif -+ -+/* End of token definitions for RSP2SQL -+ * ============================================================================= -+ */ -+/** \} */ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -+ -+/* END - Note:Keep extra line feed to satisfy UNIX systems */ -diff --git a/src/pregen/RSP2SQL.u b/src/pregen/RSP2SQL.u -new file mode 100644 -index 0000000..53d8cda ---- /dev/null -+++ b/src/pregen/RSP2SQL.u -@@ -0,0 +1,5 @@ -+RSP2SQL.g: RSP.tokens -+RSP2SQL.c : RSP2SQL.g -+./RSP2SQL.tokens : RSP2SQL.g -+RSP2SQL.h : RSP2SQL.g -+ANTLR_PRODUCTS += RSP2SQL.c ./RSP2SQL.tokens RSP2SQL.h -\ No newline at end of file -diff --git a/src/pregen/RSPLexer.c b/src/pregen/RSPLexer.c -new file mode 100644 -index 0000000..2e3faae ---- /dev/null -+++ b/src/pregen/RSPLexer.c -@@ -0,0 +1,4867 @@ -+/** \file -+ * This C source file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : RSP.g -+ * - On : 2016-01-01 12:23:42 -+ * - for the lexer : RSPLexerLexer * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+*/ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+/* ----------------------------------------- -+ * Include the ANTLR3 generated header file. -+ */ -+#include "RSPLexer.h" -+/* ----------------------------------------- */ -+ -+ -+/** String literals used by RSPLexer that we must do things like MATCHS() with. -+ * C will normally just lay down 8 bit characters, and you can use L"xxx" to -+ * get wchar_t, but wchar_t is 16 bits on Windows, which is not UTF32 and so -+ * we perform this little trick of defining the literals as arrays of UINT32 -+ * and passing in the address of these. -+ */ -+static ANTLR3_UCHAR lit_1[] = { 0x61, 0x6E, 0x64, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_2[] = { 0x6F, 0x72, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_3[] = { 0x69, 0x6E, 0x63, 0x6C, 0x75, 0x64, 0x65, 0x73, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_4[] = { 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x77, 0x69, 0x74, 0x68, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_5[] = { 0x65, 0x6E, 0x64, 0x73, 0x77, 0x69, 0x74, 0x68, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_6[] = { 0x3E, 0x3D, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_7[] = { 0x3C, 0x3D, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_8[] = { 0x62, 0x65, 0x66, 0x6F, 0x72, 0x65, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_9[] = { 0x61, 0x66, 0x74, 0x65, 0x72, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_10[] = { 0x64, 0x61, 0x79, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_11[] = { 0x64, 0x61, 0x79, 0x73, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_12[] = { 0x77, 0x65, 0x65, 0x6B, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_13[] = { 0x77, 0x65, 0x65, 0x6B, 0x73, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_14[] = { 0x6D, 0x6F, 0x6E, 0x74, 0x68, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_15[] = { 0x6D, 0x6F, 0x6E, 0x74, 0x68, 0x73, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_16[] = { 0x79, 0x65, 0x61, 0x72, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_17[] = { 0x79, 0x65, 0x61, 0x72, 0x73, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_18[] = { 0x74, 0x6F, 0x64, 0x61, 0x79, ANTLR3_STRING_TERMINATOR}; -+ -+ -+ -+ -+/* MACROS that hide the C interface implementations from the -+ * generated code, which makes it a little more understandable to the human eye. -+ * I am very much against using C pre-processor macros for function calls and bits -+ * of code as you cannot see what is happening when single stepping in debuggers -+ * and so on. The exception (in my book at least) is for generated code, where you are -+ * not maintaining it, but may wish to read and understand it. If you single step it, you know that input() -+ * hides some indirect calls, but is always referring to the input stream. This is -+ * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig -+ * the runtime interfaces without changing the generated code too often, without -+ * confusing the reader of the generated output, who may not wish to know the gory -+ * details of the interface inheritance. -+ */ -+ -+#define CTX ctx -+ -+/* Aids in accessing scopes for grammar programmers -+ */ -+#undef SCOPE_TYPE -+#undef SCOPE_STACK -+#undef SCOPE_TOP -+#define SCOPE_TYPE(scope) pRSPLexer_##scope##_SCOPE -+#define SCOPE_STACK(scope) pRSPLexer_##scope##Stack -+#define SCOPE_TOP(scope) ctx->pRSPLexer_##scope##Top -+#define SCOPE_SIZE(scope) ctx->pRSPLexer_##scope##Stack_limit -+#define SCOPE_INSTANCE(scope, i) (ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i)) -+ -+ -+/* Macros for accessing things in a lexer -+ */ -+#undef LEXER -+#undef RECOGNIZER -+#undef RULEMEMO -+#undef GETCHARINDEX -+#undef GETLINE -+#undef GETCHARPOSITIONINLINE -+#undef EMIT -+#undef EMITNEW -+#undef MATCHC -+#undef MATCHS -+#undef MATCHRANGE -+#undef LTOKEN -+#undef HASFAILED -+#undef FAILEDFLAG -+#undef INPUT -+#undef STRSTREAM -+#undef LA -+#undef HASEXCEPTION -+#undef EXCEPTION -+#undef CONSTRUCTEX -+#undef CONSUME -+#undef LRECOVER -+#undef MARK -+#undef REWIND -+#undef REWINDLAST -+#undef BACKTRACKING -+#undef MATCHANY -+#undef MEMOIZE -+#undef HAVEPARSEDRULE -+#undef GETTEXT -+#undef INDEX -+#undef SEEK -+#undef PUSHSTREAM -+#undef POPSTREAM -+#undef SETTEXT -+#undef SETTEXT8 -+ -+#define LEXER ctx->pLexer -+#define RECOGNIZER LEXER->rec -+#define LEXSTATE RECOGNIZER->state -+#define TOKSOURCE LEXSTATE->tokSource -+#define GETCHARINDEX() LEXER->getCharIndex(LEXER) -+#define GETLINE() LEXER->getLine(LEXER) -+#define GETTEXT() LEXER->getText(LEXER) -+#define GETCHARPOSITIONINLINE() LEXER->getCharPositionInLine(LEXER) -+#define EMIT() LEXSTATE->type = _type; LEXER->emit(LEXER) -+#define EMITNEW(t) LEXER->emitNew(LEXER, t) -+#define MATCHC(c) LEXER->matchc(LEXER, c) -+#define MATCHS(s) LEXER->matchs(LEXER, s) -+#define MATCHRANGE(c1,c2) LEXER->matchRange(LEXER, c1, c2) -+#define MATCHANY() LEXER->matchAny(LEXER) -+#define LTOKEN LEXSTATE->token -+#define HASFAILED() (LEXSTATE->failed == ANTLR3_TRUE) -+#define BACKTRACKING LEXSTATE->backtracking -+#define FAILEDFLAG LEXSTATE->failed -+#define INPUT LEXER->input -+#define STRSTREAM INPUT -+#define ISTREAM INPUT->istream -+#define INDEX() ISTREAM->index(ISTREAM) -+#define SEEK(n) ISTREAM->seek(ISTREAM, n) -+#define EOF_TOKEN &(LEXSTATE->tokSource->eofToken) -+#define HASEXCEPTION() (LEXSTATE->error == ANTLR3_TRUE) -+#define EXCEPTION LEXSTATE->exception -+#define CONSTRUCTEX() RECOGNIZER->exConstruct(RECOGNIZER) -+#define LRECOVER() LEXER->recover(LEXER) -+#define MARK() ISTREAM->mark(ISTREAM) -+#define REWIND(m) ISTREAM->rewind(ISTREAM, m) -+#define REWINDLAST() ISTREAM->rewindLast(ISTREAM) -+#define MEMOIZE(ri,si) RECOGNIZER->memoize(RECOGNIZER, ri, si) -+#define HAVEPARSEDRULE(r) RECOGNIZER->alreadyParsedRule(RECOGNIZER, r) -+#define PUSHSTREAM(str) LEXER->pushCharStream(LEXER, str) -+#define POPSTREAM() LEXER->popCharStream(LEXER) -+#define SETTEXT(str) LEXSTATE->text = str -+#define SKIP() LEXSTATE->token = &(TOKSOURCE->skipToken) -+#define USER1 LEXSTATE->user1 -+#define USER2 LEXSTATE->user2 -+#define USER3 LEXSTATE->user3 -+#define CUSTOM LEXSTATE->custom -+#define RULEMEMO LEXSTATE->ruleMemo -+#define DBG RECOGNIZER->debugger -+ -+/* If we have been told we can rely on the standard 8 bit or 16 bit input -+ * stream, then we can define our macros to use the direct pointers -+ * in the input object, which is much faster than indirect calls. This -+ * is really only significant to lexers with a lot of fragment rules (which -+ * do not place LA(1) in a temporary at the moment) and even then -+ * only if there is a lot of input (order of say 1M or so). -+ */ -+#if defined(ANTLR3_INLINE_INPUT_ASCII) || defined(ANTLR3_INLINE_INPUT_UTF16) -+ -+# ifdef ANTLR3_INLINE_INPUT_ASCII -+ -+/* 8 bit "ASCII" (actually any 8 bit character set) */ -+ -+# define NEXTCHAR ((pANTLR3_UINT8)(INPUT->nextChar)) -+# define DATAP ((pANTLR3_UINT8)(INPUT->data)) -+ -+# else -+ -+# define NEXTCHAR ((pANTLR3_UINT16)(INPUT->nextChar)) -+# define DATAP ((pANTLR3_UINT16)(INPUT->data)) -+ -+# endif -+ -+# define LA(n) ((NEXTCHAR + n) > (DATAP + INPUT->sizeBuf) ? ANTLR3_CHARSTREAM_EOF : (ANTLR3_UCHAR)(*(NEXTCHAR + n - 1))) -+# define CONSUME() \ -+{ \ -+ if (NEXTCHAR < (DATAP + INPUT->sizeBuf)) \ -+ { \ -+ INPUT->charPositionInLine++; \ -+ if ((ANTLR3_UCHAR)(*NEXTCHAR) == INPUT->newlineChar) \ -+ { \ -+ INPUT->line++; \ -+ INPUT->charPositionInLine = 0; \ -+ INPUT->currentLine = (void *)(NEXTCHAR + 1); \ -+ } \ -+ INPUT->nextChar = (void *)(NEXTCHAR + 1); \ -+ } \ -+} -+ -+#else -+ -+// Pick up the input character by calling the input stream implementation. -+// -+#define CONSUME() INPUT->istream->consume(INPUT->istream) -+#define LA(n) INPUT->istream->_LA(INPUT->istream, n) -+ -+#endif -+#define TOKTEXT(tok, txt) tok, (pANTLR3_UINT8)txt -+ -+/* The 4 tokens defined below may well clash with your own #defines or token types. If so -+ * then for the present you must use different names for your defines as these are hard coded -+ * in the code generator. It would be better not to use such names internally, and maybe -+ * we can change this in a forthcoming release. I deliberately do not #undef these -+ * here as this will at least give you a redefined error somewhere if they clash. -+ */ -+#define UP ANTLR3_TOKEN_UP -+#define DOWN ANTLR3_TOKEN_DOWN -+#define EOR ANTLR3_TOKEN_EOR -+#define INVALID ANTLR3_TOKEN_INVALID -+ -+ -+/* ============================================================================= -+ * Functions to create and destroy scopes. First come the rule scopes, followed -+ * by the global declared scopes. -+ */ -+ -+ -+ -+/* ============================================================================= */ -+ -+/* ============================================================================= -+ * Start of recognizer -+ */ -+ -+ -+/* Forward declare the locally static matching functions we have generated and any predicate functions. -+ */ -+static ANTLR3_INLINE void mQUOTE (pRSPLexer ctx); -+static ANTLR3_INLINE void mLPAR (pRSPLexer ctx); -+static ANTLR3_INLINE void mRPAR (pRSPLexer ctx); -+static ANTLR3_INLINE void mAND (pRSPLexer ctx); -+static ANTLR3_INLINE void mOR (pRSPLexer ctx); -+static ANTLR3_INLINE void mNOT (pRSPLexer ctx); -+static ANTLR3_INLINE void mEQUAL (pRSPLexer ctx); -+static ANTLR3_INLINE void mINCLUDES (pRSPLexer ctx); -+static ANTLR3_INLINE void mSTARTSW (pRSPLexer ctx); -+static ANTLR3_INLINE void mENDSW (pRSPLexer ctx); -+static ANTLR3_INLINE void mGREATER (pRSPLexer ctx); -+static ANTLR3_INLINE void mLESS (pRSPLexer ctx); -+static ANTLR3_INLINE void mGTE (pRSPLexer ctx); -+static ANTLR3_INLINE void mLTE (pRSPLexer ctx); -+static ANTLR3_INLINE void mBEFORE (pRSPLexer ctx); -+static ANTLR3_INLINE void mAFTER (pRSPLexer ctx); -+static ANTLR3_INLINE void mDAY (pRSPLexer ctx); -+static ANTLR3_INLINE void mWEEK (pRSPLexer ctx); -+static ANTLR3_INLINE void mMONTH (pRSPLexer ctx); -+static ANTLR3_INLINE void mYEAR (pRSPLexer ctx); -+static ANTLR3_INLINE void mTODAY (pRSPLexer ctx); -+static ANTLR3_INLINE void mNEWLINE (pRSPLexer ctx); -+static ANTLR3_INLINE void mWS (pRSPLexer ctx); -+static ANTLR3_INLINE void mFIELD (pRSPLexer ctx); -+static ANTLR3_INLINE void mINT (pRSPLexer ctx); -+static ANTLR3_INLINE void mDATE (pRSPLexer ctx); -+static ANTLR3_INLINE void mSTR (pRSPLexer ctx); -+static ANTLR3_INLINE void mESCAPED (pRSPLexer ctx); -+static ANTLR3_INLINE void mDIGIT09 (pRSPLexer ctx); -+static ANTLR3_INLINE void mDIGIT19 (pRSPLexer ctx); -+static ANTLR3_INLINE void mTokens (pRSPLexer ctx); -+static void RSPLexerFree(pRSPLexer ctx); -+ -+/* ========================================================================= -+ * Lexer matching rules end. -+ * ========================================================================= -+ */ -+ -+ -+ -+static void -+RSPLexerFree (pRSPLexer ctx) -+{ -+ LEXER->free(LEXER); -+ -+ ANTLR3_FREE(ctx); -+} -+ -+/** \brief Name of the grammar file that generated this code -+ */ -+static const char fileName[] = "RSP.g"; -+ -+/** \brief Return the name of the grammar file that generated this code. -+ */ -+static const char * getGrammarFileName() -+{ -+ return fileName; -+} -+ -+/** \brief Create a new lexer called RSPLexer -+ * -+ * \param[in] instream Pointer to an initialized input stream -+ * \return -+ * - Success pRSPLexer initialized for the lex start -+ * - Fail NULL -+ */ -+ANTLR3_API pRSPLexer RSPLexerNew -+(pANTLR3_INPUT_STREAM instream) -+{ -+ // See if we can create a new lexer with the standard constructor -+ // -+ return RSPLexerNewSSD(instream, NULL); -+} -+ -+/** \brief Create a new lexer called RSPLexer -+ * -+ * \param[in] instream Pointer to an initialized input stream -+ * \param[state] state Previously created shared recognizer stat -+ * \return -+ * - Success pRSPLexer initialized for the lex start -+ * - Fail NULL -+ */ -+ANTLR3_API pRSPLexer RSPLexerNewSSD -+(pANTLR3_INPUT_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state) -+{ -+ pRSPLexer ctx; // Context structure we will build and return -+ -+ ctx = (pRSPLexer) ANTLR3_CALLOC(1, sizeof(RSPLexer)); -+ -+ if (ctx == NULL) -+ { -+ // Failed to allocate memory for lexer context -+ return NULL; -+ } -+ -+ /* ------------------------------------------------------------------- -+ * Memory for basic structure is allocated, now to fill in -+ * in base ANTLR3 structures. We initialize the function pointers -+ * for the standard ANTLR3 lexer function set, but upon return -+ * from here, the programmer may set the pointers to provide custom -+ * implementations of each function. -+ * -+ * We don't use the macros defined in RSPLexer.h here so you can get a sense -+ * of what goes where. -+ */ -+ -+ /* Create a base lexer, using the supplied input stream -+ */ -+ ctx->pLexer = antlr3LexerNewStream(ANTLR3_SIZE_HINT, instream, state); -+ -+ /* Check that we allocated the memory correctly -+ */ -+ if (ctx->pLexer == NULL) -+ { -+ ANTLR3_FREE(ctx); -+ return NULL; -+ } -+ /* Install the implementation of our RSPLexer interface -+ */ -+ ctx->mQUOTE = mQUOTE; -+ ctx->mLPAR = mLPAR; -+ ctx->mRPAR = mRPAR; -+ ctx->mAND = mAND; -+ ctx->mOR = mOR; -+ ctx->mNOT = mNOT; -+ ctx->mEQUAL = mEQUAL; -+ ctx->mINCLUDES = mINCLUDES; -+ ctx->mSTARTSW = mSTARTSW; -+ ctx->mENDSW = mENDSW; -+ ctx->mGREATER = mGREATER; -+ ctx->mLESS = mLESS; -+ ctx->mGTE = mGTE; -+ ctx->mLTE = mLTE; -+ ctx->mBEFORE = mBEFORE; -+ ctx->mAFTER = mAFTER; -+ ctx->mDAY = mDAY; -+ ctx->mWEEK = mWEEK; -+ ctx->mMONTH = mMONTH; -+ ctx->mYEAR = mYEAR; -+ ctx->mTODAY = mTODAY; -+ ctx->mNEWLINE = mNEWLINE; -+ ctx->mWS = mWS; -+ ctx->mFIELD = mFIELD; -+ ctx->mINT = mINT; -+ ctx->mDATE = mDATE; -+ ctx->mSTR = mSTR; -+ ctx->mESCAPED = mESCAPED; -+ ctx->mDIGIT09 = mDIGIT09; -+ ctx->mDIGIT19 = mDIGIT19; -+ ctx->mTokens = mTokens; -+ -+ /** When the nextToken() call is made to this lexer's pANTLR3_TOKEN_SOURCE -+ * it will call mTokens() in this generated code, and will pass it the ctx -+ * pointer of this lexer, not the context of the base lexer, so store that now. -+ */ -+ ctx->pLexer->ctx = ctx; -+ -+ /**Install the token matching function -+ */ -+ ctx->pLexer->mTokens = (void (*) (void *))(mTokens); -+ -+ ctx->getGrammarFileName = getGrammarFileName; -+ ctx->free = RSPLexerFree; -+ -+ -+ -+ -+ -+ /* Return the newly built lexer to the caller -+ */ -+ return ctx; -+} -+ -+ -+/* ========================================================================= -+ * Functions to match the lexer grammar defined tokens from the input stream -+ */ -+ -+// Comes from: 85:7: ( '\"' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start QUOTE -+ * -+ * Looks to match the characters the constitute the token QUOTE -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mQUOTE(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = QUOTE; -+ -+ -+ // RSP.g:85:7: ( '\"' ) -+ // RSP.g:85:9: '\"' -+ { -+ MATCHC('"'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleQUOTEEx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleQUOTEEx; /* Prevent compiler warnings */ -+ ruleQUOTEEx: ; -+ -+} -+// $ANTLR end QUOTE -+ -+// Comes from: 86:6: ( '(' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start LPAR -+ * -+ * Looks to match the characters the constitute the token LPAR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mLPAR(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = LPAR; -+ -+ -+ // RSP.g:86:6: ( '(' ) -+ // RSP.g:86:8: '(' -+ { -+ MATCHC('('); -+ if (HASEXCEPTION()) -+ { -+ goto ruleLPAREx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleLPAREx; /* Prevent compiler warnings */ -+ ruleLPAREx: ; -+ -+} -+// $ANTLR end LPAR -+ -+// Comes from: 87:6: ( ')' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start RPAR -+ * -+ * Looks to match the characters the constitute the token RPAR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mRPAR(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = RPAR; -+ -+ -+ // RSP.g:87:6: ( ')' ) -+ // RSP.g:87:8: ')' -+ { -+ MATCHC(')'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleRPAREx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleRPAREx; /* Prevent compiler warnings */ -+ ruleRPAREx: ; -+ -+} -+// $ANTLR end RPAR -+ -+// Comes from: 89:5: ( 'and' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start AND -+ * -+ * Looks to match the characters the constitute the token AND -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mAND(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = AND; -+ -+ -+ // RSP.g:89:5: ( 'and' ) -+ // RSP.g:89:7: 'and' -+ { -+ MATCHS(lit_1); -+ if (HASEXCEPTION()) -+ { -+ goto ruleANDEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleANDEx; /* Prevent compiler warnings */ -+ ruleANDEx: ; -+ -+} -+// $ANTLR end AND -+ -+// Comes from: 90:4: ( 'or' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start OR -+ * -+ * Looks to match the characters the constitute the token OR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mOR(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = OR; -+ -+ -+ // RSP.g:90:4: ( 'or' ) -+ // RSP.g:90:6: 'or' -+ { -+ MATCHS(lit_2); -+ if (HASEXCEPTION()) -+ { -+ goto ruleOREx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleOREx; /* Prevent compiler warnings */ -+ ruleOREx: ; -+ -+} -+// $ANTLR end OR -+ -+// Comes from: 91:5: ( '!' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start NOT -+ * -+ * Looks to match the characters the constitute the token NOT -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mNOT(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = NOT; -+ -+ -+ // RSP.g:91:5: ( '!' ) -+ // RSP.g:91:7: '!' -+ { -+ MATCHC('!'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleNOTEx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleNOTEx; /* Prevent compiler warnings */ -+ ruleNOTEx: ; -+ -+} -+// $ANTLR end NOT -+ -+// Comes from: 94:7: ( '=' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start EQUAL -+ * -+ * Looks to match the characters the constitute the token EQUAL -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mEQUAL(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = EQUAL; -+ -+ -+ // RSP.g:94:7: ( '=' ) -+ // RSP.g:94:9: '=' -+ { -+ MATCHC('='); -+ if (HASEXCEPTION()) -+ { -+ goto ruleEQUALEx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleEQUALEx; /* Prevent compiler warnings */ -+ ruleEQUALEx: ; -+ -+} -+// $ANTLR end EQUAL -+ -+// Comes from: 97:9: ( 'includes' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start INCLUDES -+ * -+ * Looks to match the characters the constitute the token INCLUDES -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mINCLUDES(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = INCLUDES; -+ -+ -+ // RSP.g:97:9: ( 'includes' ) -+ // RSP.g:97:11: 'includes' -+ { -+ MATCHS(lit_3); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINCLUDESEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleINCLUDESEx; /* Prevent compiler warnings */ -+ ruleINCLUDESEx: ; -+ -+} -+// $ANTLR end INCLUDES -+ -+// Comes from: 98:9: ( 'startswith' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start STARTSW -+ * -+ * Looks to match the characters the constitute the token STARTSW -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mSTARTSW(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = STARTSW; -+ -+ -+ // RSP.g:98:9: ( 'startswith' ) -+ // RSP.g:98:11: 'startswith' -+ { -+ MATCHS(lit_4); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTARTSWEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleSTARTSWEx; /* Prevent compiler warnings */ -+ ruleSTARTSWEx: ; -+ -+} -+// $ANTLR end STARTSW -+ -+// Comes from: 99:7: ( 'endswith' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start ENDSW -+ * -+ * Looks to match the characters the constitute the token ENDSW -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mENDSW(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = ENDSW; -+ -+ -+ // RSP.g:99:7: ( 'endswith' ) -+ // RSP.g:99:9: 'endswith' -+ { -+ MATCHS(lit_5); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENDSWEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleENDSWEx; /* Prevent compiler warnings */ -+ ruleENDSWEx: ; -+ -+} -+// $ANTLR end ENDSW -+ -+// Comes from: 102:9: ( '>' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start GREATER -+ * -+ * Looks to match the characters the constitute the token GREATER -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mGREATER(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = GREATER; -+ -+ -+ // RSP.g:102:9: ( '>' ) -+ // RSP.g:102:11: '>' -+ { -+ MATCHC('>'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleGREATEREx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleGREATEREx; /* Prevent compiler warnings */ -+ ruleGREATEREx: ; -+ -+} -+// $ANTLR end GREATER -+ -+// Comes from: 103:6: ( '<' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start LESS -+ * -+ * Looks to match the characters the constitute the token LESS -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mLESS(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = LESS; -+ -+ -+ // RSP.g:103:6: ( '<' ) -+ // RSP.g:103:8: '<' -+ { -+ MATCHC('<'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleLESSEx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleLESSEx; /* Prevent compiler warnings */ -+ ruleLESSEx: ; -+ -+} -+// $ANTLR end LESS -+ -+// Comes from: 104:5: ( '>=' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start GTE -+ * -+ * Looks to match the characters the constitute the token GTE -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mGTE(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = GTE; -+ -+ -+ // RSP.g:104:5: ( '>=' ) -+ // RSP.g:104:7: '>=' -+ { -+ MATCHS(lit_6); -+ if (HASEXCEPTION()) -+ { -+ goto ruleGTEEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleGTEEx; /* Prevent compiler warnings */ -+ ruleGTEEx: ; -+ -+} -+// $ANTLR end GTE -+ -+// Comes from: 105:5: ( '<=' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start LTE -+ * -+ * Looks to match the characters the constitute the token LTE -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mLTE(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = LTE; -+ -+ -+ // RSP.g:105:5: ( '<=' ) -+ // RSP.g:105:7: '<=' -+ { -+ MATCHS(lit_7); -+ if (HASEXCEPTION()) -+ { -+ goto ruleLTEEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleLTEEx; /* Prevent compiler warnings */ -+ ruleLTEEx: ; -+ -+} -+// $ANTLR end LTE -+ -+// Comes from: 108:8: ( 'before' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start BEFORE -+ * -+ * Looks to match the characters the constitute the token BEFORE -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mBEFORE(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = BEFORE; -+ -+ -+ // RSP.g:108:8: ( 'before' ) -+ // RSP.g:108:10: 'before' -+ { -+ MATCHS(lit_8); -+ if (HASEXCEPTION()) -+ { -+ goto ruleBEFOREEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleBEFOREEx; /* Prevent compiler warnings */ -+ ruleBEFOREEx: ; -+ -+} -+// $ANTLR end BEFORE -+ -+// Comes from: 109:7: ( 'after' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start AFTER -+ * -+ * Looks to match the characters the constitute the token AFTER -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mAFTER(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = AFTER; -+ -+ -+ // RSP.g:109:7: ( 'after' ) -+ // RSP.g:109:9: 'after' -+ { -+ MATCHS(lit_9); -+ if (HASEXCEPTION()) -+ { -+ goto ruleAFTEREx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleAFTEREx; /* Prevent compiler warnings */ -+ ruleAFTEREx: ; -+ -+} -+// $ANTLR end AFTER -+ -+// Comes from: 110:5: ( 'day' | 'days' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start DAY -+ * -+ * Looks to match the characters the constitute the token DAY -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mDAY(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = DAY; -+ -+ -+ { -+ // RSP.g:110:5: ( 'day' | 'days' ) -+ -+ ANTLR3_UINT32 alt1; -+ -+ alt1=2; -+ -+ switch ( LA(1) ) -+ { -+ case 'd': -+ { -+ switch ( LA(2) ) -+ { -+ case 'a': -+ { -+ switch ( LA(3) ) -+ { -+ case 'y': -+ { -+ switch ( LA(4) ) -+ { -+ case 's': -+ { -+ alt1=2; -+ } -+ break; -+ -+ default: -+ alt1=1;} -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 2; -+ -+ -+ goto ruleDAYEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 1; -+ -+ -+ goto ruleDAYEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleDAYEx; -+ } -+ -+ switch (alt1) -+ { -+ case 1: -+ // RSP.g:110:7: 'day' -+ { -+ MATCHS(lit_10); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDAYEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:110:15: 'days' -+ { -+ MATCHS(lit_11); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDAYEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleDAYEx; /* Prevent compiler warnings */ -+ ruleDAYEx: ; -+ -+} -+// $ANTLR end DAY -+ -+// Comes from: 111:6: ( 'week' | 'weeks' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start WEEK -+ * -+ * Looks to match the characters the constitute the token WEEK -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mWEEK(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = WEEK; -+ -+ -+ { -+ // RSP.g:111:6: ( 'week' | 'weeks' ) -+ -+ ANTLR3_UINT32 alt2; -+ -+ alt2=2; -+ -+ switch ( LA(1) ) -+ { -+ case 'w': -+ { -+ switch ( LA(2) ) -+ { -+ case 'e': -+ { -+ switch ( LA(3) ) -+ { -+ case 'e': -+ { -+ switch ( LA(4) ) -+ { -+ case 'k': -+ { -+ switch ( LA(5) ) -+ { -+ case 's': -+ { -+ alt2=2; -+ } -+ break; -+ -+ default: -+ alt2=1;} -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 2; -+ EXCEPTION->state = 3; -+ -+ -+ goto ruleWEEKEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 2; -+ EXCEPTION->state = 2; -+ -+ -+ goto ruleWEEKEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 2; -+ EXCEPTION->state = 1; -+ -+ -+ goto ruleWEEKEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 2; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleWEEKEx; -+ } -+ -+ switch (alt2) -+ { -+ case 1: -+ // RSP.g:111:8: 'week' -+ { -+ MATCHS(lit_12); -+ if (HASEXCEPTION()) -+ { -+ goto ruleWEEKEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:111:17: 'weeks' -+ { -+ MATCHS(lit_13); -+ if (HASEXCEPTION()) -+ { -+ goto ruleWEEKEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleWEEKEx; /* Prevent compiler warnings */ -+ ruleWEEKEx: ; -+ -+} -+// $ANTLR end WEEK -+ -+// Comes from: 112:7: ( 'month' | 'months' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start MONTH -+ * -+ * Looks to match the characters the constitute the token MONTH -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mMONTH(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = MONTH; -+ -+ -+ { -+ // RSP.g:112:7: ( 'month' | 'months' ) -+ -+ ANTLR3_UINT32 alt3; -+ -+ alt3=2; -+ -+ switch ( LA(1) ) -+ { -+ case 'm': -+ { -+ switch ( LA(2) ) -+ { -+ case 'o': -+ { -+ switch ( LA(3) ) -+ { -+ case 'n': -+ { -+ switch ( LA(4) ) -+ { -+ case 't': -+ { -+ switch ( LA(5) ) -+ { -+ case 'h': -+ { -+ switch ( LA(6) ) -+ { -+ case 's': -+ { -+ alt3=2; -+ } -+ break; -+ -+ default: -+ alt3=1;} -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 4; -+ -+ -+ goto ruleMONTHEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 3; -+ -+ -+ goto ruleMONTHEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 2; -+ -+ -+ goto ruleMONTHEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 1; -+ -+ -+ goto ruleMONTHEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleMONTHEx; -+ } -+ -+ switch (alt3) -+ { -+ case 1: -+ // RSP.g:112:9: 'month' -+ { -+ MATCHS(lit_14); -+ if (HASEXCEPTION()) -+ { -+ goto ruleMONTHEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:112:19: 'months' -+ { -+ MATCHS(lit_15); -+ if (HASEXCEPTION()) -+ { -+ goto ruleMONTHEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleMONTHEx; /* Prevent compiler warnings */ -+ ruleMONTHEx: ; -+ -+} -+// $ANTLR end MONTH -+ -+// Comes from: 113:6: ( 'year' | 'years' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start YEAR -+ * -+ * Looks to match the characters the constitute the token YEAR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mYEAR(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = YEAR; -+ -+ -+ { -+ // RSP.g:113:6: ( 'year' | 'years' ) -+ -+ ANTLR3_UINT32 alt4; -+ -+ alt4=2; -+ -+ switch ( LA(1) ) -+ { -+ case 'y': -+ { -+ switch ( LA(2) ) -+ { -+ case 'e': -+ { -+ switch ( LA(3) ) -+ { -+ case 'a': -+ { -+ switch ( LA(4) ) -+ { -+ case 'r': -+ { -+ switch ( LA(5) ) -+ { -+ case 's': -+ { -+ alt4=2; -+ } -+ break; -+ -+ default: -+ alt4=1;} -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 3; -+ -+ -+ goto ruleYEAREx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 2; -+ -+ -+ goto ruleYEAREx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 1; -+ -+ -+ goto ruleYEAREx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleYEAREx; -+ } -+ -+ switch (alt4) -+ { -+ case 1: -+ // RSP.g:113:8: 'year' -+ { -+ MATCHS(lit_16); -+ if (HASEXCEPTION()) -+ { -+ goto ruleYEAREx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:113:17: 'years' -+ { -+ MATCHS(lit_17); -+ if (HASEXCEPTION()) -+ { -+ goto ruleYEAREx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleYEAREx; /* Prevent compiler warnings */ -+ ruleYEAREx: ; -+ -+} -+// $ANTLR end YEAR -+ -+// Comes from: 114:7: ( 'today' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start TODAY -+ * -+ * Looks to match the characters the constitute the token TODAY -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mTODAY(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = TODAY; -+ -+ -+ // RSP.g:114:7: ( 'today' ) -+ // RSP.g:114:9: 'today' -+ { -+ MATCHS(lit_18); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTODAYEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleTODAYEx; /* Prevent compiler warnings */ -+ ruleTODAYEx: ; -+ -+} -+// $ANTLR end TODAY -+ -+// Comes from: 116:9: ( ( '\\r' )? '\\n' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start NEWLINE -+ * -+ * Looks to match the characters the constitute the token NEWLINE -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mNEWLINE(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = NEWLINE; -+ -+ -+ // RSP.g:116:9: ( ( '\\r' )? '\\n' ) -+ // RSP.g:116:11: ( '\\r' )? '\\n' -+ { -+ -+ // RSP.g:116:11: ( '\\r' )? -+ { -+ int alt5=2; -+ switch ( LA(1) ) -+ { -+ case '\r': -+ { -+ alt5=1; -+ } -+ break; -+ } -+ -+ switch (alt5) -+ { -+ case 1: -+ // RSP.g:116:11: '\\r' -+ { -+ MATCHC('\r'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleNEWLINEEx; -+ } -+ -+ -+ } -+ break; -+ -+ } -+ } -+ MATCHC('\n'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleNEWLINEEx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleNEWLINEEx; /* Prevent compiler warnings */ -+ ruleNEWLINEEx: ; -+ -+} -+// $ANTLR end NEWLINE -+ -+// Comes from: 118:4: ( ( ' ' | '\\t' ) ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start WS -+ * -+ * Looks to match the characters the constitute the token WS -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mWS(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = WS; -+ -+ -+ // RSP.g:118:4: ( ( ' ' | '\\t' ) ) -+ // RSP.g:118:6: ( ' ' | '\\t' ) -+ { -+ if ( LA(1) == '\t' || LA(1) == ' ' ) -+ { -+ CONSUME(); -+ -+ } -+ else -+ { -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; -+ -+ LRECOVER(); goto ruleWSEx; -+ } -+ -+ { -+ LEXSTATE->channel = HIDDEN; -+ } -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleWSEx; /* Prevent compiler warnings */ -+ ruleWSEx: ; -+ -+} -+// $ANTLR end WS -+ -+// Comes from: 120:7: ( 'a' .. 'z' ( 'a' .. 'z' | '_' )* 'a' .. 'z' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start FIELD -+ * -+ * Looks to match the characters the constitute the token FIELD -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mFIELD(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = FIELD; -+ -+ -+ // RSP.g:120:7: ( 'a' .. 'z' ( 'a' .. 'z' | '_' )* 'a' .. 'z' ) -+ // RSP.g:120:9: 'a' .. 'z' ( 'a' .. 'z' | '_' )* 'a' .. 'z' -+ { -+ MATCHRANGE('a', 'z'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleFIELDEx; -+ } -+ -+ -+ // RSP.g:120:18: ( 'a' .. 'z' | '_' )* -+ -+ for (;;) -+ { -+ int alt6=2; -+ switch ( LA(1) ) -+ { -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ switch ( LA(2) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt6=1; -+ } -+ break; -+ -+ } -+ -+ } -+ break; -+ case '_': -+ { -+ alt6=1; -+ } -+ break; -+ -+ } -+ -+ switch (alt6) -+ { -+ case 1: -+ // RSP.g: -+ { -+ if ( LA(1) == '_' || ((LA(1) >= 'a') && (LA(1) <= 'z')) ) -+ { -+ CONSUME(); -+ -+ } -+ else -+ { -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; -+ -+ LRECOVER(); goto ruleFIELDEx; -+ } -+ -+ -+ } -+ break; -+ -+ default: -+ goto loop6; /* break out of the loop */ -+ break; -+ } -+ } -+ loop6: ; /* Jump out to here if this rule does not match */ -+ -+ MATCHRANGE('a', 'z'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleFIELDEx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleFIELDEx; /* Prevent compiler warnings */ -+ ruleFIELDEx: ; -+ -+} -+// $ANTLR end FIELD -+ -+// Comes from: 122:5: ( DIGIT19 ( DIGIT09 )* ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start INT -+ * -+ * Looks to match the characters the constitute the token INT -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mINT(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = INT; -+ -+ -+ // RSP.g:122:5: ( DIGIT19 ( DIGIT09 )* ) -+ // RSP.g:122:7: DIGIT19 ( DIGIT09 )* -+ { -+ /* 122:7: DIGIT19 ( DIGIT09 )* */ -+ mDIGIT19(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTEx; -+ } -+ -+ -+ // RSP.g:122:15: ( DIGIT09 )* -+ -+ for (;;) -+ { -+ int alt7=2; -+ switch ( LA(1) ) -+ { -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ { -+ alt7=1; -+ } -+ break; -+ -+ } -+ -+ switch (alt7) -+ { -+ case 1: -+ // RSP.g:122:15: DIGIT09 -+ { -+ /* 122:15: DIGIT09 */ -+ mDIGIT09(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTEx; -+ } -+ -+ -+ } -+ break; -+ -+ default: -+ goto loop7; /* break out of the loop */ -+ break; -+ } -+ } -+ loop7: ; /* Jump out to here if this rule does not match */ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleINTEx; /* Prevent compiler warnings */ -+ ruleINTEx: ; -+ -+} -+// $ANTLR end INT -+ -+// Comes from: 125:6: ( DIGIT19 DIGIT09 DIGIT09 DIGIT09 '-' ( '0' DIGIT19 | '1' '0' .. '2' ) '-' ( '0' DIGIT19 | '1' .. '2' DIGIT09 | '3' '0' .. '1' ) ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start DATE -+ * -+ * Looks to match the characters the constitute the token DATE -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mDATE(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = DATE; -+ -+ -+ // RSP.g:125:6: ( DIGIT19 DIGIT09 DIGIT09 DIGIT09 '-' ( '0' DIGIT19 | '1' '0' .. '2' ) '-' ( '0' DIGIT19 | '1' .. '2' DIGIT09 | '3' '0' .. '1' ) ) -+ // RSP.g:125:8: DIGIT19 DIGIT09 DIGIT09 DIGIT09 '-' ( '0' DIGIT19 | '1' '0' .. '2' ) '-' ( '0' DIGIT19 | '1' .. '2' DIGIT09 | '3' '0' .. '1' ) -+ { -+ /* 125:8: DIGIT19 DIGIT09 DIGIT09 DIGIT09 '-' ( '0' DIGIT19 | '1' '0' .. '2' ) '-' ( '0' DIGIT19 | '1' .. '2' DIGIT09 | '3' '0' .. '1' ) */ -+ mDIGIT19(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ /* 125:8: DIGIT19 DIGIT09 DIGIT09 DIGIT09 '-' ( '0' DIGIT19 | '1' '0' .. '2' ) '-' ( '0' DIGIT19 | '1' .. '2' DIGIT09 | '3' '0' .. '1' ) */ -+ mDIGIT09(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ /* 125:8: DIGIT19 DIGIT09 DIGIT09 DIGIT09 '-' ( '0' DIGIT19 | '1' '0' .. '2' ) '-' ( '0' DIGIT19 | '1' .. '2' DIGIT09 | '3' '0' .. '1' ) */ -+ mDIGIT09(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ /* 125:8: DIGIT19 DIGIT09 DIGIT09 DIGIT09 '-' ( '0' DIGIT19 | '1' '0' .. '2' ) '-' ( '0' DIGIT19 | '1' .. '2' DIGIT09 | '3' '0' .. '1' ) */ -+ mDIGIT09(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ MATCHC('-'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ // RSP.g:125:44: ( '0' DIGIT19 | '1' '0' .. '2' ) -+ { -+ int alt8=2; -+ switch ( LA(1) ) -+ { -+ case '0': -+ { -+ alt8=1; -+ } -+ break; -+ case '1': -+ { -+ alt8=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 8; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleDATEEx; -+ } -+ -+ switch (alt8) -+ { -+ case 1: -+ // RSP.g:125:45: '0' DIGIT19 -+ { -+ MATCHC('0'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ /* 125:45: '0' DIGIT19 */ -+ mDIGIT19(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:125:59: '1' '0' .. '2' -+ { -+ MATCHC('1'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ MATCHRANGE('0', '2'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ break; -+ -+ } -+ } -+ MATCHC('-'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ // RSP.g:125:77: ( '0' DIGIT19 | '1' .. '2' DIGIT09 | '3' '0' .. '1' ) -+ { -+ int alt9=3; -+ switch ( LA(1) ) -+ { -+ case '0': -+ { -+ alt9=1; -+ } -+ break; -+ case '1': -+ case '2': -+ { -+ alt9=2; -+ } -+ break; -+ case '3': -+ { -+ alt9=3; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 9; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleDATEEx; -+ } -+ -+ switch (alt9) -+ { -+ case 1: -+ // RSP.g:125:78: '0' DIGIT19 -+ { -+ MATCHC('0'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ /* 125:78: '0' DIGIT19 */ -+ mDIGIT19(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:125:92: '1' .. '2' DIGIT09 -+ { -+ MATCHRANGE('1', '2'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ /* 125:92: '1' .. '2' DIGIT09 */ -+ mDIGIT09(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ break; -+ case 3: -+ // RSP.g:125:111: '3' '0' .. '1' -+ { -+ MATCHC('3'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ MATCHRANGE('0', '1'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ break; -+ -+ } -+ } -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleDATEEx; /* Prevent compiler warnings */ -+ ruleDATEEx: ; -+ -+} -+// $ANTLR end DATE -+ -+// Comes from: 133:2: ( QUOTE (reg=~ ( '\\\\' | '\"' ) | esc= ESCAPED )+ QUOTE ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start STR -+ * -+ * Looks to match the characters the constitute the token STR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mSTR(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ pANTLR3_COMMON_TOKEN esc; -+ ANTLR3_UINT32 reg; -+ -+ -+ esc = NULL; -+ -+ _type = STR; -+ -+ pANTLR3_STRING unesc = GETTEXT()->factory->newRaw(GETTEXT()->factory); -+ -+ // RSP.g:133:2: ( QUOTE (reg=~ ( '\\\\' | '\"' ) | esc= ESCAPED )+ QUOTE ) -+ // RSP.g:133:4: QUOTE (reg=~ ( '\\\\' | '\"' ) | esc= ESCAPED )+ QUOTE -+ { -+ /* 133:4: QUOTE (reg=~ ( '\\\\' | '\"' ) | esc= ESCAPED )+ QUOTE */ -+ mQUOTE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTREx; -+ } -+ -+ // RSP.g:133:10: (reg=~ ( '\\\\' | '\"' ) | esc= ESCAPED )+ -+ { -+ int cnt10=0; -+ -+ for (;;) -+ { -+ int alt10=3; -+ { -+ /* dfaLoopbackState(k,edges,eotPredictsAlt,description,stateNumber,semPredState) -+ */ -+ int LA10_0 = LA(1); -+ if ( (((LA10_0 >= 0x0000) && (LA10_0 <= '!')) || ((LA10_0 >= '#') && (LA10_0 <= '[')) || ((LA10_0 >= ']') && (LA10_0 <= 0xFFFF))) ) -+ { -+ alt10=1; -+ } -+ else if ( (LA10_0 == '\\') ) -+ { -+ alt10=2; -+ } -+ -+ } -+ switch (alt10) -+ { -+ case 1: -+ // RSP.g:133:12: reg=~ ( '\\\\' | '\"' ) -+ { -+ reg= LA(1); -+ if ( ((LA(1) >= 0x0000) && (LA(1) <= '!')) || ((LA(1) >= '#') && (LA(1) <= '[')) || ((LA(1) >= ']') && (LA(1) <= 0xFFFF)) ) -+ { -+ CONSUME(); -+ -+ } -+ else -+ { -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; -+ -+ LRECOVER(); goto ruleSTREx; -+ } -+ -+ { -+ unesc->addc(unesc, reg); -+ } -+ -+ } -+ break; -+ case 2: -+ // RSP.g:134:6: esc= ESCAPED -+ { -+ /* 134:6: esc= ESCAPED */ -+ { -+ ANTLR3_MARKER escStart381 = GETCHARINDEX(); -+ mESCAPED(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTREx; -+ } -+ -+ esc = LEXSTATE->tokFactory->newToken(LEXSTATE->tokFactory); -+ esc->setType(esc, ANTLR3_TOKEN_INVALID); -+ esc->setStartIndex(esc, escStart381); -+ esc->setStopIndex(esc, GETCHARINDEX()-1); -+ esc->input = INPUT; -+ } -+ { -+ unesc->appendS(unesc, GETTEXT()); -+ } -+ -+ } -+ break; -+ -+ default: -+ -+ if ( cnt10 >= 1 ) -+ { -+ goto loop10; -+ } -+ /* mismatchedSetEx() -+ */ -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME; -+ -+ -+ goto ruleSTREx; -+ } -+ cnt10++; -+ } -+ loop10: ; /* Jump to here if this rule does not match */ -+ } -+ /* 133:4: QUOTE (reg=~ ( '\\\\' | '\"' ) | esc= ESCAPED )+ QUOTE */ -+ mQUOTE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTREx; -+ } -+ -+ { -+ SETTEXT(unesc); -+ } -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleSTREx; /* Prevent compiler warnings */ -+ ruleSTREx: ; -+ -+ esc = NULL; -+ -+} -+// $ANTLR end STR -+ -+// Comes from: 138:9: ( '\\\\' ( '\\\\' | '\"' ) ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start ESCAPED -+ * -+ * Looks to match the characters the constitute the token ESCAPED -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mESCAPED(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ -+ // RSP.g:138:9: ( '\\\\' ( '\\\\' | '\"' ) ) -+ // RSP.g:138:11: '\\\\' ( '\\\\' | '\"' ) -+ { -+ MATCHC('\\'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleESCAPEDEx; -+ } -+ -+ -+ // RSP.g:139:3: ( '\\\\' | '\"' ) -+ { -+ int alt11=2; -+ switch ( LA(1) ) -+ { -+ case '\\': -+ { -+ alt11=1; -+ } -+ break; -+ case '"': -+ { -+ alt11=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 11; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleESCAPEDEx; -+ } -+ -+ switch (alt11) -+ { -+ case 1: -+ // RSP.g:139:5: '\\\\' -+ { -+ MATCHC('\\'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleESCAPEDEx; -+ } -+ -+ { -+ SETTEXT(GETTEXT()->factory->newStr8(GETTEXT()->factory, (pANTLR3_UINT8)"\\")); -+ } -+ -+ } -+ break; -+ case 2: -+ // RSP.g:140:5: '\"' -+ { -+ MATCHC('"'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleESCAPEDEx; -+ } -+ -+ { -+ SETTEXT(GETTEXT()->factory->newStr8(GETTEXT()->factory, (pANTLR3_UINT8)"\"")); -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ -+ } -+ -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleESCAPEDEx; /* Prevent compiler warnings */ -+ ruleESCAPEDEx: ; -+ -+} -+// $ANTLR end ESCAPED -+ -+// Comes from: 145:9: ( '0' .. '9' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start DIGIT09 -+ * -+ * Looks to match the characters the constitute the token DIGIT09 -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mDIGIT09(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ -+ // RSP.g:145:9: ( '0' .. '9' ) -+ // RSP.g:145:11: '0' .. '9' -+ { -+ MATCHRANGE('0', '9'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDIGIT09Ex; -+ } -+ -+ -+ } -+ -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleDIGIT09Ex; /* Prevent compiler warnings */ -+ ruleDIGIT09Ex: ; -+ -+} -+// $ANTLR end DIGIT09 -+ -+// Comes from: 148:9: ( '1' .. '9' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start DIGIT19 -+ * -+ * Looks to match the characters the constitute the token DIGIT19 -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mDIGIT19(pRSPLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ -+ // RSP.g:148:9: ( '1' .. '9' ) -+ // RSP.g:148:11: '1' .. '9' -+ { -+ MATCHRANGE('1', '9'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDIGIT19Ex; -+ } -+ -+ -+ } -+ -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleDIGIT19Ex; /* Prevent compiler warnings */ -+ ruleDIGIT19Ex: ; -+ -+} -+// $ANTLR end DIGIT19 -+ -+/** This is the entry point in to the lexer from an object that -+ * wants to generate the next token, such as a pCOMMON_TOKEN_STREAM -+ */ -+static void -+mTokens(pRSPLexer ctx) -+{ -+ { -+ // RSP.g:1:8: ( QUOTE | LPAR | RPAR | AND | OR | NOT | EQUAL | INCLUDES | STARTSW | ENDSW | GREATER | LESS | GTE | LTE | BEFORE | AFTER | DAY | WEEK | MONTH | YEAR | TODAY | NEWLINE | WS | FIELD | INT | DATE | STR ) -+ -+ ANTLR3_UINT32 alt12; -+ -+ alt12=27; -+ -+ switch ( LA(1) ) -+ { -+ case '"': -+ { -+ -+ { -+ int LA12_1 = LA(2); -+ if ( (((LA12_1 >= 0x0000) && (LA12_1 <= '!')) || ((LA12_1 >= '#') && (LA12_1 <= 0xFFFF))) ) -+ { -+ alt12=27; -+ } -+ else -+ { -+ alt12=1; } -+ } -+ } -+ break; -+ case '(': -+ { -+ alt12=2; -+ } -+ break; -+ case ')': -+ { -+ alt12=3; -+ } -+ break; -+ case 'a': -+ { -+ switch ( LA(2) ) -+ { -+ case 'n': -+ { -+ switch ( LA(3) ) -+ { -+ case 'd': -+ { -+ switch ( LA(4) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=4;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ case 'f': -+ { -+ switch ( LA(3) ) -+ { -+ case 't': -+ { -+ switch ( LA(4) ) -+ { -+ case 'e': -+ { -+ switch ( LA(5) ) -+ { -+ case 'r': -+ { -+ switch ( LA(6) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=16;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 4; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'o': -+ { -+ switch ( LA(2) ) -+ { -+ case 'r': -+ { -+ switch ( LA(3) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=5;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 5; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case '!': -+ { -+ alt12=6; -+ } -+ break; -+ case '=': -+ { -+ alt12=7; -+ } -+ break; -+ case 'i': -+ { -+ switch ( LA(2) ) -+ { -+ case 'n': -+ { -+ switch ( LA(3) ) -+ { -+ case 'c': -+ { -+ switch ( LA(4) ) -+ { -+ case 'l': -+ { -+ switch ( LA(5) ) -+ { -+ case 'u': -+ { -+ switch ( LA(6) ) -+ { -+ case 'd': -+ { -+ switch ( LA(7) ) -+ { -+ case 'e': -+ { -+ switch ( LA(8) ) -+ { -+ case 's': -+ { -+ switch ( LA(9) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=8;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 8; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 's': -+ { -+ switch ( LA(2) ) -+ { -+ case 't': -+ { -+ switch ( LA(3) ) -+ { -+ case 'a': -+ { -+ switch ( LA(4) ) -+ { -+ case 'r': -+ { -+ switch ( LA(5) ) -+ { -+ case 't': -+ { -+ switch ( LA(6) ) -+ { -+ case 's': -+ { -+ switch ( LA(7) ) -+ { -+ case 'w': -+ { -+ switch ( LA(8) ) -+ { -+ case 'i': -+ { -+ switch ( LA(9) ) -+ { -+ case 't': -+ { -+ switch ( LA(10) ) -+ { -+ case 'h': -+ { -+ switch ( LA(11) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=9;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 9; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'e': -+ { -+ switch ( LA(2) ) -+ { -+ case 'n': -+ { -+ switch ( LA(3) ) -+ { -+ case 'd': -+ { -+ switch ( LA(4) ) -+ { -+ case 's': -+ { -+ switch ( LA(5) ) -+ { -+ case 'w': -+ { -+ switch ( LA(6) ) -+ { -+ case 'i': -+ { -+ switch ( LA(7) ) -+ { -+ case 't': -+ { -+ switch ( LA(8) ) -+ { -+ case 'h': -+ { -+ switch ( LA(9) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=10;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 10; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case '>': -+ { -+ switch ( LA(2) ) -+ { -+ case '=': -+ { -+ alt12=13; -+ } -+ break; -+ -+ default: -+ alt12=11;} -+ -+ } -+ break; -+ case '<': -+ { -+ switch ( LA(2) ) -+ { -+ case '=': -+ { -+ alt12=14; -+ } -+ break; -+ -+ default: -+ alt12=12;} -+ -+ } -+ break; -+ case 'b': -+ { -+ switch ( LA(2) ) -+ { -+ case 'e': -+ { -+ switch ( LA(3) ) -+ { -+ case 'f': -+ { -+ switch ( LA(4) ) -+ { -+ case 'o': -+ { -+ switch ( LA(5) ) -+ { -+ case 'r': -+ { -+ switch ( LA(6) ) -+ { -+ case 'e': -+ { -+ switch ( LA(7) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=15;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 13; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'd': -+ { -+ switch ( LA(2) ) -+ { -+ case 'a': -+ { -+ switch ( LA(3) ) -+ { -+ case 'y': -+ { -+ switch ( LA(4) ) -+ { -+ case 's': -+ { -+ switch ( LA(5) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=17;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=17;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ case '_': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 14; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'w': -+ { -+ switch ( LA(2) ) -+ { -+ case 'e': -+ { -+ switch ( LA(3) ) -+ { -+ case 'e': -+ { -+ switch ( LA(4) ) -+ { -+ case 'k': -+ { -+ switch ( LA(5) ) -+ { -+ case 's': -+ { -+ switch ( LA(6) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=18;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=18;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 15; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'm': -+ { -+ switch ( LA(2) ) -+ { -+ case 'o': -+ { -+ switch ( LA(3) ) -+ { -+ case 'n': -+ { -+ switch ( LA(4) ) -+ { -+ case 't': -+ { -+ switch ( LA(5) ) -+ { -+ case 'h': -+ { -+ switch ( LA(6) ) -+ { -+ case 's': -+ { -+ switch ( LA(7) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=19;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=19;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 16; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'y': -+ { -+ switch ( LA(2) ) -+ { -+ case 'e': -+ { -+ switch ( LA(3) ) -+ { -+ case 'a': -+ { -+ switch ( LA(4) ) -+ { -+ case 'r': -+ { -+ switch ( LA(5) ) -+ { -+ case 's': -+ { -+ switch ( LA(6) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=20;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=20;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 17; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 't': -+ { -+ switch ( LA(2) ) -+ { -+ case 'o': -+ { -+ switch ( LA(3) ) -+ { -+ case 'd': -+ { -+ switch ( LA(4) ) -+ { -+ case 'a': -+ { -+ switch ( LA(5) ) -+ { -+ case 'y': -+ { -+ switch ( LA(6) ) -+ { -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'o': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ alt12=21;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ -+ default: -+ alt12=24;} -+ -+ } -+ break; -+ case '_': -+ case 'a': -+ case 'b': -+ case 'c': -+ case 'd': -+ case 'e': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'i': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'm': -+ case 'n': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 's': -+ case 't': -+ case 'u': -+ case 'v': -+ case 'w': -+ case 'x': -+ case 'y': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 18; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case '\n': -+ case '\r': -+ { -+ alt12=22; -+ } -+ break; -+ case '\t': -+ case ' ': -+ { -+ alt12=23; -+ } -+ break; -+ case 'c': -+ case 'f': -+ case 'g': -+ case 'h': -+ case 'j': -+ case 'k': -+ case 'l': -+ case 'n': -+ case 'p': -+ case 'q': -+ case 'r': -+ case 'u': -+ case 'v': -+ case 'x': -+ case 'z': -+ { -+ alt12=24; -+ } -+ break; -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ { -+ switch ( LA(2) ) -+ { -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ { -+ switch ( LA(3) ) -+ { -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ { -+ switch ( LA(4) ) -+ { -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ { -+ switch ( LA(5) ) -+ { -+ case '-': -+ { -+ alt12=26; -+ } -+ break; -+ -+ default: -+ alt12=25;} -+ -+ } -+ break; -+ -+ default: -+ alt12=25;} -+ -+ } -+ break; -+ -+ default: -+ alt12=25;} -+ -+ } -+ break; -+ -+ default: -+ alt12=25;} -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ switch (alt12) -+ { -+ case 1: -+ // RSP.g:1:10: QUOTE -+ { -+ /* 1:10: QUOTE */ -+ mQUOTE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:1:16: LPAR -+ { -+ /* 1:16: LPAR */ -+ mLPAR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 3: -+ // RSP.g:1:21: RPAR -+ { -+ /* 1:21: RPAR */ -+ mRPAR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 4: -+ // RSP.g:1:26: AND -+ { -+ /* 1:26: AND */ -+ mAND(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 5: -+ // RSP.g:1:30: OR -+ { -+ /* 1:30: OR */ -+ mOR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 6: -+ // RSP.g:1:33: NOT -+ { -+ /* 1:33: NOT */ -+ mNOT(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 7: -+ // RSP.g:1:37: EQUAL -+ { -+ /* 1:37: EQUAL */ -+ mEQUAL(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 8: -+ // RSP.g:1:43: INCLUDES -+ { -+ /* 1:43: INCLUDES */ -+ mINCLUDES(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 9: -+ // RSP.g:1:52: STARTSW -+ { -+ /* 1:52: STARTSW */ -+ mSTARTSW(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 10: -+ // RSP.g:1:60: ENDSW -+ { -+ /* 1:60: ENDSW */ -+ mENDSW(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 11: -+ // RSP.g:1:66: GREATER -+ { -+ /* 1:66: GREATER */ -+ mGREATER(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 12: -+ // RSP.g:1:74: LESS -+ { -+ /* 1:74: LESS */ -+ mLESS(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 13: -+ // RSP.g:1:79: GTE -+ { -+ /* 1:79: GTE */ -+ mGTE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 14: -+ // RSP.g:1:83: LTE -+ { -+ /* 1:83: LTE */ -+ mLTE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 15: -+ // RSP.g:1:87: BEFORE -+ { -+ /* 1:87: BEFORE */ -+ mBEFORE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 16: -+ // RSP.g:1:94: AFTER -+ { -+ /* 1:94: AFTER */ -+ mAFTER(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 17: -+ // RSP.g:1:100: DAY -+ { -+ /* 1:100: DAY */ -+ mDAY(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 18: -+ // RSP.g:1:104: WEEK -+ { -+ /* 1:104: WEEK */ -+ mWEEK(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 19: -+ // RSP.g:1:109: MONTH -+ { -+ /* 1:109: MONTH */ -+ mMONTH(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 20: -+ // RSP.g:1:115: YEAR -+ { -+ /* 1:115: YEAR */ -+ mYEAR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 21: -+ // RSP.g:1:120: TODAY -+ { -+ /* 1:120: TODAY */ -+ mTODAY(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 22: -+ // RSP.g:1:126: NEWLINE -+ { -+ /* 1:126: NEWLINE */ -+ mNEWLINE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 23: -+ // RSP.g:1:134: WS -+ { -+ /* 1:134: WS */ -+ mWS(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 24: -+ // RSP.g:1:137: FIELD -+ { -+ /* 1:137: FIELD */ -+ mFIELD(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 25: -+ // RSP.g:1:143: INT -+ { -+ /* 1:143: INT */ -+ mINT(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 26: -+ // RSP.g:1:147: DATE -+ { -+ /* 1:147: DATE */ -+ mDATE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 27: -+ // RSP.g:1:152: STR -+ { -+ /* 1:152: STR */ -+ mSTR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ -+ } -+ } -+ -+ -+ goto ruleTokensEx; /* Prevent compiler warnings */ -+ruleTokensEx: ; -+} -+ -+/* ========================================================================= -+ * Lexer matching rules end. -+ * ========================================================================= -+ */ -+/* End of Lexer code -+ * ================================================ -+ * ================================================ -+ */ -+ -+ -+/* End of code -+ * ============================================================================= -+ */ -diff --git a/src/pregen/RSPLexer.h b/src/pregen/RSPLexer.h -new file mode 100644 -index 0000000..27bc791 ---- /dev/null -+++ b/src/pregen/RSPLexer.h -@@ -0,0 +1,254 @@ -+/** \file -+ * This C header file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : RSP.g -+ * - On : 2016-01-01 12:23:42 -+ * - for the lexer : RSPLexerLexer * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+ * The lexer RSPLexer has the callable functions (rules) shown below, -+ * which will invoke the code for the associated rule in the source grammar -+ * assuming that the input stream is pointing to a token/text stream that could begin -+ * this rule. -+ * -+ * For instance if you call the first (topmost) rule in a parser grammar, you will -+ * get the results of a full parse, but calling a rule half way through the grammar will -+ * allow you to pass part of a full token stream to the parser, such as for syntax checking -+ * in editors and so on. -+ * -+ * The parser entry points are called indirectly (by function pointer to function) via -+ * a parser context typedef pRSPLexer, which is returned from a call to RSPLexerNew(). -+ * -+ * As this is a generated lexer, it is unlikely you will call it 'manually'. However -+ * the methods are provided anyway. -+ * * The methods in pRSPLexer are as follows: -+ * -+ * - void pRSPLexer->QUOTE(pRSPLexer) -+ * - void pRSPLexer->LPAR(pRSPLexer) -+ * - void pRSPLexer->RPAR(pRSPLexer) -+ * - void pRSPLexer->AND(pRSPLexer) -+ * - void pRSPLexer->OR(pRSPLexer) -+ * - void pRSPLexer->NOT(pRSPLexer) -+ * - void pRSPLexer->EQUAL(pRSPLexer) -+ * - void pRSPLexer->INCLUDES(pRSPLexer) -+ * - void pRSPLexer->STARTSW(pRSPLexer) -+ * - void pRSPLexer->ENDSW(pRSPLexer) -+ * - void pRSPLexer->GREATER(pRSPLexer) -+ * - void pRSPLexer->LESS(pRSPLexer) -+ * - void pRSPLexer->GTE(pRSPLexer) -+ * - void pRSPLexer->LTE(pRSPLexer) -+ * - void pRSPLexer->BEFORE(pRSPLexer) -+ * - void pRSPLexer->AFTER(pRSPLexer) -+ * - void pRSPLexer->DAY(pRSPLexer) -+ * - void pRSPLexer->WEEK(pRSPLexer) -+ * - void pRSPLexer->MONTH(pRSPLexer) -+ * - void pRSPLexer->YEAR(pRSPLexer) -+ * - void pRSPLexer->TODAY(pRSPLexer) -+ * - void pRSPLexer->NEWLINE(pRSPLexer) -+ * - void pRSPLexer->WS(pRSPLexer) -+ * - void pRSPLexer->FIELD(pRSPLexer) -+ * - void pRSPLexer->INT(pRSPLexer) -+ * - void pRSPLexer->DATE(pRSPLexer) -+ * - void pRSPLexer->STR(pRSPLexer) -+ * - void pRSPLexer->ESCAPED(pRSPLexer) -+ * - void pRSPLexer->DIGIT09(pRSPLexer) -+ * - void pRSPLexer->DIGIT19(pRSPLexer) -+ * - void pRSPLexer->Tokens(pRSPLexer) -+ * -+ * The return type for any particular rule is of course determined by the source -+ * grammar file. -+ */ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+#ifndef _RSPLexer_H -+#define _RSPLexer_H -+/* ============================================================================= -+ * Standard antlr3 C runtime definitions -+ */ -+#include -+ -+/* End of standard antlr 3 runtime definitions -+ * ============================================================================= -+ */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+// Forward declare the context typedef so that we can use it before it is -+// properly defined. Delegators and delegates (from import statements) are -+// interdependent and their context structures contain pointers to each other -+// C only allows such things to be declared if you pre-declare the typedef. -+// -+typedef struct RSPLexer_Ctx_struct RSPLexer, * pRSPLexer; -+ -+ -+ -+#ifdef ANTLR3_WINDOWS -+// Disable: Unreferenced parameter, - Rules with parameters that are not used -+// constant conditional, - ANTLR realizes that a prediction is always true (synpred usually) -+// initialized but unused variable - tree rewrite variables declared but not needed -+// Unreferenced local variable - lexer rule declares but does not always use _type -+// potentially unitialized variable used - retval always returned from a rule -+// unreferenced local function has been removed - susually getTokenNames or freeScope, they can go without warnigns -+// -+// These are only really displayed at warning level /W4 but that is the code ideal I am aiming at -+// and the codegen must generate some of these warnings by necessity, apart from 4100, which is -+// usually generated when a parser rule is given a parameter that it does not use. Mostly though -+// this is a matter of orthogonality hence I disable that one. -+// -+#pragma warning( disable : 4100 ) -+#pragma warning( disable : 4101 ) -+#pragma warning( disable : 4127 ) -+#pragma warning( disable : 4189 ) -+#pragma warning( disable : 4505 ) -+#pragma warning( disable : 4701 ) -+#endif -+ -+/** Context tracking structure for RSPLexer -+ */ -+struct RSPLexer_Ctx_struct -+{ -+ /** Built in ANTLR3 context tracker contains all the generic elements -+ * required for context tracking. -+ */ -+ pANTLR3_LEXER pLexer; -+ -+ -+ void (*mQUOTE) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mLPAR) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mRPAR) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mAND) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mOR) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mNOT) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mEQUAL) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mINCLUDES) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mSTARTSW) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mENDSW) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mGREATER) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mLESS) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mGTE) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mLTE) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mBEFORE) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mAFTER) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mDAY) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mWEEK) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mMONTH) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mYEAR) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mTODAY) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mNEWLINE) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mWS) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mFIELD) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mINT) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mDATE) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mSTR) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mESCAPED) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mDIGIT09) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mDIGIT19) (struct RSPLexer_Ctx_struct * ctx); -+ void (*mTokens) (struct RSPLexer_Ctx_struct * ctx); const char * (*getGrammarFileName)(); -+ void (*free) (struct RSPLexer_Ctx_struct * ctx); -+ -+}; -+ -+// Function protoypes for the constructor functions that external translation units -+// such as delegators and delegates may wish to call. -+// -+ANTLR3_API pRSPLexer RSPLexerNew (pANTLR3_INPUT_STREAM instream); -+ANTLR3_API pRSPLexer RSPLexerNewSSD (pANTLR3_INPUT_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state); -+ -+/** Symbolic definitions of all the tokens that the lexer will work with. -+ * \{ -+ * -+ * Antlr will define EOF, but we can't use that as it it is too common in -+ * in C header files and that would be confusing. There is no way to filter this out at the moment -+ * so we just undef it here for now. That isn't the value we get back from C recognizers -+ * anyway. We are looking for ANTLR3_TOKEN_EOF. -+ */ -+#ifdef EOF -+#undef EOF -+#endif -+#ifdef Tokens -+#undef Tokens -+#endif -+#define STARTSW 14 -+#define WEEK 26 -+#define TODAY 24 -+#define YEAR 28 -+#define ENDSW 15 -+#define GTE 20 -+#define BEFORE 21 -+#define DAY 25 -+#define INT 16 -+#define NOT 11 -+#define AFTER 22 -+#define AND 6 -+#define EOF -1 -+#define LTE 19 -+#define MONTH 27 -+#define DIGIT19 31 -+#define INCLUDES 13 -+#define STR 10 -+#define QUOTE 29 -+#define GREATER 18 -+#define WS 30 -+#define LPAR 7 -+#define NEWLINE 4 -+#define EQUAL 12 -+#define OR 5 -+#define LESS 17 -+#define FIELD 9 -+#define RPAR 8 -+#define ESCAPED 33 -+#define DATE 23 -+#define DIGIT09 32 -+#ifdef EOF -+#undef EOF -+#define EOF ANTLR3_TOKEN_EOF -+#endif -+ -+#ifndef TOKENSOURCE -+#define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource -+#endif -+ -+/* End of token definitions for RSPLexer -+ * ============================================================================= -+ */ -+/** \} */ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -+ -+/* END - Note:Keep extra line feed to satisfy UNIX systems */ -diff --git a/src/pregen/RSPParser.c b/src/pregen/RSPParser.c -new file mode 100644 -index 0000000..ba8a9d2 ---- /dev/null -+++ b/src/pregen/RSPParser.c -@@ -0,0 +1,3152 @@ -+/** \file -+ * This C source file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : RSP.g -+ * - On : 2016-01-01 12:23:42 -+ * - for the parser : RSPParserParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+*/ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+/* ----------------------------------------- -+ * Include the ANTLR3 generated header file. -+ */ -+#include "RSPParser.h" -+/* ----------------------------------------- */ -+ -+ -+ -+ -+ -+/* MACROS that hide the C interface implementations from the -+ * generated code, which makes it a little more understandable to the human eye. -+ * I am very much against using C pre-processor macros for function calls and bits -+ * of code as you cannot see what is happening when single stepping in debuggers -+ * and so on. The exception (in my book at least) is for generated code, where you are -+ * not maintaining it, but may wish to read and understand it. If you single step it, you know that input() -+ * hides some indirect calls, but is always referring to the input stream. This is -+ * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig -+ * the runtime interfaces without changing the generated code too often, without -+ * confusing the reader of the generated output, who may not wish to know the gory -+ * details of the interface inheritance. -+ */ -+ -+#define CTX ctx -+ -+/* Aids in accessing scopes for grammar programmers -+ */ -+#undef SCOPE_TYPE -+#undef SCOPE_STACK -+#undef SCOPE_TOP -+#define SCOPE_TYPE(scope) pRSPParser_##scope##_SCOPE -+#define SCOPE_STACK(scope) pRSPParser_##scope##Stack -+#define SCOPE_TOP(scope) ctx->pRSPParser_##scope##Top -+#define SCOPE_SIZE(scope) ctx->pRSPParser_##scope##Stack_limit -+#define SCOPE_INSTANCE(scope, i) (ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i)) -+ -+/* Macros for accessing things in the parser -+ */ -+ -+#undef PARSER -+#undef RECOGNIZER -+#undef HAVEPARSEDRULE -+#undef MEMOIZE -+#undef INPUT -+#undef STRSTREAM -+#undef HASEXCEPTION -+#undef EXCEPTION -+#undef MATCHT -+#undef MATCHANYT -+#undef FOLLOWSTACK -+#undef FOLLOWPUSH -+#undef FOLLOWPOP -+#undef PRECOVER -+#undef PREPORTERROR -+#undef LA -+#undef LT -+#undef CONSTRUCTEX -+#undef CONSUME -+#undef MARK -+#undef REWIND -+#undef REWINDLAST -+#undef PERRORRECOVERY -+#undef HASFAILED -+#undef FAILEDFLAG -+#undef RECOVERFROMMISMATCHEDSET -+#undef RECOVERFROMMISMATCHEDELEMENT -+#undef INDEX -+#undef ADAPTOR -+#undef SEEK -+#undef RULEMEMO -+#undef DBG -+ -+#define PARSER ctx->pParser -+#define RECOGNIZER PARSER->rec -+#define PSRSTATE RECOGNIZER->state -+#define HAVEPARSEDRULE(r) RECOGNIZER->alreadyParsedRule(RECOGNIZER, r) -+#define MEMOIZE(ri,si) RECOGNIZER->memoize(RECOGNIZER, ri, si) -+#define INPUT PARSER->tstream -+#define STRSTREAM INPUT -+#define ISTREAM INPUT->istream -+#define INDEX() ISTREAM->index(INPUT->istream) -+#define HASEXCEPTION() (PSRSTATE->error == ANTLR3_TRUE) -+#define EXCEPTION PSRSTATE->exception -+#define MATCHT(t, fs) RECOGNIZER->match(RECOGNIZER, t, fs) -+#define MATCHANYT() RECOGNIZER->matchAny(RECOGNIZER) -+#define FOLLOWSTACK PSRSTATE->following -+#define FOLLOWPUSH(x) FOLLOWSTACK->push(FOLLOWSTACK, ((void *)(&(x))), NULL) -+#define FOLLOWPOP() FOLLOWSTACK->pop(FOLLOWSTACK) -+#define PRECOVER() RECOGNIZER->recover(RECOGNIZER) -+#define PREPORTERROR() RECOGNIZER->reportError(RECOGNIZER) -+#define LA(n) INPUT->istream->_LA(ISTREAM, n) -+#define LT(n) INPUT->_LT(INPUT, n) -+#define CONSTRUCTEX() RECOGNIZER->exConstruct(RECOGNIZER) -+#define CONSUME() ISTREAM->consume(ISTREAM) -+#define MARK() ISTREAM->mark(ISTREAM) -+#define REWIND(m) ISTREAM->rewind(ISTREAM, m) -+#define REWINDLAST() ISTREAM->rewindLast(ISTREAM) -+#define SEEK(n) ISTREAM->seek(ISTREAM, n) -+#define PERRORRECOVERY PSRSTATE->errorRecovery -+#define FAILEDFLAG PSRSTATE->failed -+#define HASFAILED() (FAILEDFLAG == ANTLR3_TRUE) -+#define BACKTRACKING PSRSTATE->backtracking -+#define RECOVERFROMMISMATCHEDSET(s) RECOGNIZER->recoverFromMismatchedSet(RECOGNIZER, s) -+#define RECOVERFROMMISMATCHEDELEMENT(e) RECOGNIZER->recoverFromMismatchedElement(RECOGNIZER, s) -+#define ADAPTOR ctx->adaptor -+#define RULEMEMO PSRSTATE->ruleMemo -+#define DBG RECOGNIZER->debugger -+ -+#define TOKTEXT(tok, txt) tok, (pANTLR3_UINT8)txt -+ -+/* The 4 tokens defined below may well clash with your own #defines or token types. If so -+ * then for the present you must use different names for your defines as these are hard coded -+ * in the code generator. It would be better not to use such names internally, and maybe -+ * we can change this in a forthcoming release. I deliberately do not #undef these -+ * here as this will at least give you a redefined error somewhere if they clash. -+ */ -+#define UP ANTLR3_TOKEN_UP -+#define DOWN ANTLR3_TOKEN_DOWN -+#define EOR ANTLR3_TOKEN_EOR -+#define INVALID ANTLR3_TOKEN_INVALID -+ -+ -+/* ============================================================================= -+ * Functions to create and destroy scopes. First come the rule scopes, followed -+ * by the global declared scopes. -+ */ -+ -+ -+ -+/* ============================================================================= */ -+ -+/* ============================================================================= -+ * Start of recognizer -+ */ -+ -+ -+ -+/** \brief Table of all token names in symbolic order, mainly used for -+ * error reporting. -+ */ -+pANTLR3_UINT8 RSPParserTokenNames[30+4] -+ = { -+ (pANTLR3_UINT8) "", /* String to print to indicate an invalid token */ -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "NEWLINE", -+ (pANTLR3_UINT8) "OR", -+ (pANTLR3_UINT8) "AND", -+ (pANTLR3_UINT8) "LPAR", -+ (pANTLR3_UINT8) "RPAR", -+ (pANTLR3_UINT8) "FIELD", -+ (pANTLR3_UINT8) "STR", -+ (pANTLR3_UINT8) "NOT", -+ (pANTLR3_UINT8) "EQUAL", -+ (pANTLR3_UINT8) "INCLUDES", -+ (pANTLR3_UINT8) "STARTSW", -+ (pANTLR3_UINT8) "ENDSW", -+ (pANTLR3_UINT8) "INT", -+ (pANTLR3_UINT8) "LESS", -+ (pANTLR3_UINT8) "GREATER", -+ (pANTLR3_UINT8) "LTE", -+ (pANTLR3_UINT8) "GTE", -+ (pANTLR3_UINT8) "BEFORE", -+ (pANTLR3_UINT8) "AFTER", -+ (pANTLR3_UINT8) "DATE", -+ (pANTLR3_UINT8) "TODAY", -+ (pANTLR3_UINT8) "DAY", -+ (pANTLR3_UINT8) "WEEK", -+ (pANTLR3_UINT8) "MONTH", -+ (pANTLR3_UINT8) "YEAR", -+ (pANTLR3_UINT8) "QUOTE", -+ (pANTLR3_UINT8) "WS", -+ (pANTLR3_UINT8) "DIGIT19", -+ (pANTLR3_UINT8) "DIGIT09", -+ (pANTLR3_UINT8) "ESCAPED" -+ }; -+ -+ -+ -+// Forward declare the locally static matching functions we have generated. -+// -+static RSPParser_query_return query (pRSPParser ctx); -+static RSPParser_expr_return expr (pRSPParser ctx); -+static RSPParser_aexpr_return aexpr (pRSPParser ctx); -+static RSPParser_crit_return crit (pRSPParser ctx); -+static RSPParser_strcrit_return strcrit (pRSPParser ctx); -+static RSPParser_strop_return strop (pRSPParser ctx); -+static RSPParser_intcrit_return intcrit (pRSPParser ctx); -+static RSPParser_intop_return intop (pRSPParser ctx); -+static RSPParser_datecrit_return datecrit (pRSPParser ctx); -+static RSPParser_dateop_return dateop (pRSPParser ctx); -+static RSPParser_datespec_return datespec (pRSPParser ctx); -+static RSPParser_dateref_return dateref (pRSPParser ctx); -+static RSPParser_dateintval_return dateintval (pRSPParser ctx); -+static void RSPParserFree(pRSPParser ctx); -+/* For use in tree output where we are accumulating rule labels via label += ruleRef -+ * we need a function that knows how to free a return scope when the list is destroyed. -+ * We cannot just use ANTLR3_FREE because in debug tracking mode, this is a macro. -+ */ -+static void ANTLR3_CDECL freeScope(void * scope) -+{ -+ ANTLR3_FREE(scope); -+} -+ -+/** \brief Name of the grammar file that generated this code -+ */ -+static const char fileName[] = "RSP.g"; -+ -+/** \brief Return the name of the grammar file that generated this code. -+ */ -+static const char * getGrammarFileName() -+{ -+ return fileName; -+} -+/** \brief Create a new RSPParser parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pRSPParser -+RSPParserNew (pANTLR3_COMMON_TOKEN_STREAM instream) -+{ -+ // See if we can create a new parser with the standard constructor -+ // -+ return RSPParserNewSSD(instream, NULL); -+} -+ -+/** \brief Create a new RSPParser parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pRSPParser -+RSPParserNewSSD (pANTLR3_COMMON_TOKEN_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state) -+{ -+ pRSPParser ctx; /* Context structure we will build and return */ -+ -+ ctx = (pRSPParser) ANTLR3_CALLOC(1, sizeof(RSPParser)); -+ -+ if (ctx == NULL) -+ { -+ // Failed to allocate memory for parser context -+ // -+ return NULL; -+ } -+ -+ /* ------------------------------------------------------------------- -+ * Memory for basic structure is allocated, now to fill in -+ * the base ANTLR3 structures. We initialize the function pointers -+ * for the standard ANTLR3 parser function set, but upon return -+ * from here, the programmer may set the pointers to provide custom -+ * implementations of each function. -+ * -+ * We don't use the macros defined in RSPParser.h here, in order that you can get a sense -+ * of what goes where. -+ */ -+ -+ /* Create a base parser/recognizer, using the supplied token stream -+ */ -+ ctx->pParser = antlr3ParserNewStream(ANTLR3_SIZE_HINT, instream->tstream, state); -+ /* Install the implementation of our RSPParser interface -+ */ -+ ctx->query = query; -+ ctx->expr = expr; -+ ctx->aexpr = aexpr; -+ ctx->crit = crit; -+ ctx->strcrit = strcrit; -+ ctx->strop = strop; -+ ctx->intcrit = intcrit; -+ ctx->intop = intop; -+ ctx->datecrit = datecrit; -+ ctx->dateop = dateop; -+ ctx->datespec = datespec; -+ ctx->dateref = dateref; -+ ctx->dateintval = dateintval; -+ ctx->free = RSPParserFree; -+ ctx->getGrammarFileName = getGrammarFileName; -+ -+ /* Install the scope pushing methods. -+ */ -+ ADAPTOR = ANTLR3_TREE_ADAPTORNew(instream->tstream->tokenSource->strFactory); -+ ctx->vectors = antlr3VectorFactoryNew(0); -+ -+ -+ -+ /* Install the token table -+ */ -+ PSRSTATE->tokenNames = RSPParserTokenNames; -+ -+ -+ /* Return the newly built parser to the caller -+ */ -+ return ctx; -+} -+ -+/** Free the parser resources -+ */ -+ static void -+ RSPParserFree(pRSPParser ctx) -+ { -+ /* Free any scope memory -+ */ -+ -+ ctx->vectors->close(ctx->vectors); -+ /* We created the adaptor so we must free it -+ */ -+ ADAPTOR->free(ADAPTOR); -+ // Free this parser -+ // -+ ctx->pParser->free(ctx->pParser); -+ ANTLR3_FREE(ctx); -+ -+ /* Everything is released, so we can return -+ */ -+ return; -+ } -+ -+/** Return token names used by this parser -+ * -+ * The returned pointer is used as an index into the token names table (using the token -+ * number as the index). -+ * -+ * \return Pointer to first char * in the table. -+ */ -+static pANTLR3_UINT8 *getTokenNames() -+{ -+ return RSPParserTokenNames; -+} -+ -+ -+/* Declare the bitsets -+ */ -+ -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_query42 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_query42_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_query42 = { FOLLOW_expr_in_query42_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_NEWLINE_in_query44 */ -+static ANTLR3_BITWORD FOLLOW_NEWLINE_in_query44_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000) }; -+static ANTLR3_BITSET_LIST FOLLOW_NEWLINE_in_query44 = { FOLLOW_NEWLINE_in_query44_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_EOF_in_query47 */ -+static ANTLR3_BITWORD FOLLOW_EOF_in_query47_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_EOF_in_query47 = { FOLLOW_EOF_in_query47_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_aexpr_in_expr63 */ -+static ANTLR3_BITWORD FOLLOW_aexpr_in_expr63_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000022) }; -+static ANTLR3_BITSET_LIST FOLLOW_aexpr_in_expr63 = { FOLLOW_aexpr_in_expr63_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_OR_in_expr66 */ -+static ANTLR3_BITWORD FOLLOW_OR_in_expr66_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000280) }; -+static ANTLR3_BITSET_LIST FOLLOW_OR_in_expr66 = { FOLLOW_OR_in_expr66_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_aexpr_in_expr69 */ -+static ANTLR3_BITWORD FOLLOW_aexpr_in_expr69_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000022) }; -+static ANTLR3_BITSET_LIST FOLLOW_aexpr_in_expr69 = { FOLLOW_aexpr_in_expr69_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_crit_in_aexpr81 */ -+static ANTLR3_BITWORD FOLLOW_crit_in_aexpr81_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000042) }; -+static ANTLR3_BITSET_LIST FOLLOW_crit_in_aexpr81 = { FOLLOW_crit_in_aexpr81_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_AND_in_aexpr84 */ -+static ANTLR3_BITWORD FOLLOW_AND_in_aexpr84_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000280) }; -+static ANTLR3_BITSET_LIST FOLLOW_AND_in_aexpr84 = { FOLLOW_AND_in_aexpr84_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_crit_in_aexpr87 */ -+static ANTLR3_BITWORD FOLLOW_crit_in_aexpr87_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000042) }; -+static ANTLR3_BITSET_LIST FOLLOW_crit_in_aexpr87 = { FOLLOW_crit_in_aexpr87_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAR_in_crit99 */ -+static ANTLR3_BITWORD FOLLOW_LPAR_in_crit99_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000280) }; -+static ANTLR3_BITSET_LIST FOLLOW_LPAR_in_crit99 = { FOLLOW_LPAR_in_crit99_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expr_in_crit101 */ -+static ANTLR3_BITWORD FOLLOW_expr_in_crit101_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000100) }; -+static ANTLR3_BITSET_LIST FOLLOW_expr_in_crit101 = { FOLLOW_expr_in_crit101_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAR_in_crit103 */ -+static ANTLR3_BITWORD FOLLOW_RPAR_in_crit103_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_RPAR_in_crit103 = { FOLLOW_RPAR_in_crit103_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_strcrit_in_crit114 */ -+static ANTLR3_BITWORD FOLLOW_strcrit_in_crit114_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_strcrit_in_crit114 = { FOLLOW_strcrit_in_crit114_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_intcrit_in_crit119 */ -+static ANTLR3_BITWORD FOLLOW_intcrit_in_crit119_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_intcrit_in_crit119 = { FOLLOW_intcrit_in_crit119_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_datecrit_in_crit124 */ -+static ANTLR3_BITWORD FOLLOW_datecrit_in_crit124_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_datecrit_in_crit124 = { FOLLOW_datecrit_in_crit124_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_FIELD_in_strcrit134 */ -+static ANTLR3_BITWORD FOLLOW_FIELD_in_strcrit134_bits[] = { ANTLR3_UINT64_LIT(0x000000000000F000) }; -+static ANTLR3_BITSET_LIST FOLLOW_FIELD_in_strcrit134 = { FOLLOW_FIELD_in_strcrit134_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_strop_in_strcrit136 */ -+static ANTLR3_BITWORD FOLLOW_strop_in_strcrit136_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000400) }; -+static ANTLR3_BITSET_LIST FOLLOW_strop_in_strcrit136 = { FOLLOW_strop_in_strcrit136_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STR_in_strcrit138 */ -+static ANTLR3_BITWORD FOLLOW_STR_in_strcrit138_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_STR_in_strcrit138 = { FOLLOW_STR_in_strcrit138_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_FIELD_in_strcrit155 */ -+static ANTLR3_BITWORD FOLLOW_FIELD_in_strcrit155_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000800) }; -+static ANTLR3_BITSET_LIST FOLLOW_FIELD_in_strcrit155 = { FOLLOW_FIELD_in_strcrit155_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_NOT_in_strcrit157 */ -+static ANTLR3_BITWORD FOLLOW_NOT_in_strcrit157_bits[] = { ANTLR3_UINT64_LIT(0x000000000000F000) }; -+static ANTLR3_BITSET_LIST FOLLOW_NOT_in_strcrit157 = { FOLLOW_NOT_in_strcrit157_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_strop_in_strcrit159 */ -+static ANTLR3_BITWORD FOLLOW_strop_in_strcrit159_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000400) }; -+static ANTLR3_BITSET_LIST FOLLOW_strop_in_strcrit159 = { FOLLOW_strop_in_strcrit159_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STR_in_strcrit161 */ -+static ANTLR3_BITWORD FOLLOW_STR_in_strcrit161_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_STR_in_strcrit161 = { FOLLOW_STR_in_strcrit161_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_EQUAL_in_strop188 */ -+static ANTLR3_BITWORD FOLLOW_EQUAL_in_strop188_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_EQUAL_in_strop188 = { FOLLOW_EQUAL_in_strop188_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INCLUDES_in_strop195 */ -+static ANTLR3_BITWORD FOLLOW_INCLUDES_in_strop195_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_INCLUDES_in_strop195 = { FOLLOW_INCLUDES_in_strop195_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STARTSW_in_strop202 */ -+static ANTLR3_BITWORD FOLLOW_STARTSW_in_strop202_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_STARTSW_in_strop202 = { FOLLOW_STARTSW_in_strop202_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_ENDSW_in_strop209 */ -+static ANTLR3_BITWORD FOLLOW_ENDSW_in_strop209_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_ENDSW_in_strop209 = { FOLLOW_ENDSW_in_strop209_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_FIELD_in_intcrit219 */ -+static ANTLR3_BITWORD FOLLOW_FIELD_in_intcrit219_bits[] = { ANTLR3_UINT64_LIT(0x00000000001E1000) }; -+static ANTLR3_BITSET_LIST FOLLOW_FIELD_in_intcrit219 = { FOLLOW_FIELD_in_intcrit219_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_intop_in_intcrit221 */ -+static ANTLR3_BITWORD FOLLOW_intop_in_intcrit221_bits[] = { ANTLR3_UINT64_LIT(0x0000000000010000) }; -+static ANTLR3_BITSET_LIST FOLLOW_intop_in_intcrit221 = { FOLLOW_intop_in_intcrit221_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INT_in_intcrit223 */ -+static ANTLR3_BITWORD FOLLOW_INT_in_intcrit223_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_INT_in_intcrit223 = { FOLLOW_INT_in_intcrit223_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_FIELD_in_intcrit240 */ -+static ANTLR3_BITWORD FOLLOW_FIELD_in_intcrit240_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000800) }; -+static ANTLR3_BITSET_LIST FOLLOW_FIELD_in_intcrit240 = { FOLLOW_FIELD_in_intcrit240_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_NOT_in_intcrit242 */ -+static ANTLR3_BITWORD FOLLOW_NOT_in_intcrit242_bits[] = { ANTLR3_UINT64_LIT(0x00000000001E1000) }; -+static ANTLR3_BITSET_LIST FOLLOW_NOT_in_intcrit242 = { FOLLOW_NOT_in_intcrit242_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_intop_in_intcrit244 */ -+static ANTLR3_BITWORD FOLLOW_intop_in_intcrit244_bits[] = { ANTLR3_UINT64_LIT(0x0000000000010000) }; -+static ANTLR3_BITSET_LIST FOLLOW_intop_in_intcrit244 = { FOLLOW_intop_in_intcrit244_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INT_in_intcrit246 */ -+static ANTLR3_BITWORD FOLLOW_INT_in_intcrit246_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_INT_in_intcrit246 = { FOLLOW_INT_in_intcrit246_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_EQUAL_in_intop273 */ -+static ANTLR3_BITWORD FOLLOW_EQUAL_in_intop273_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_EQUAL_in_intop273 = { FOLLOW_EQUAL_in_intop273_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_LESS_in_intop280 */ -+static ANTLR3_BITWORD FOLLOW_LESS_in_intop280_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_LESS_in_intop280 = { FOLLOW_LESS_in_intop280_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_GREATER_in_intop287 */ -+static ANTLR3_BITWORD FOLLOW_GREATER_in_intop287_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_GREATER_in_intop287 = { FOLLOW_GREATER_in_intop287_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_LTE_in_intop294 */ -+static ANTLR3_BITWORD FOLLOW_LTE_in_intop294_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_LTE_in_intop294 = { FOLLOW_LTE_in_intop294_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_GTE_in_intop301 */ -+static ANTLR3_BITWORD FOLLOW_GTE_in_intop301_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_GTE_in_intop301 = { FOLLOW_GTE_in_intop301_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_FIELD_in_datecrit310 */ -+static ANTLR3_BITWORD FOLLOW_FIELD_in_datecrit310_bits[] = { ANTLR3_UINT64_LIT(0x0000000000600000) }; -+static ANTLR3_BITSET_LIST FOLLOW_FIELD_in_datecrit310 = { FOLLOW_FIELD_in_datecrit310_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateop_in_datecrit312 */ -+static ANTLR3_BITWORD FOLLOW_dateop_in_datecrit312_bits[] = { ANTLR3_UINT64_LIT(0x0000000001810000) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateop_in_datecrit312 = { FOLLOW_dateop_in_datecrit312_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_datespec_in_datecrit314 */ -+static ANTLR3_BITWORD FOLLOW_datespec_in_datecrit314_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_datespec_in_datecrit314 = { FOLLOW_datespec_in_datecrit314_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_BEFORE_in_dateop337 */ -+static ANTLR3_BITWORD FOLLOW_BEFORE_in_dateop337_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_BEFORE_in_dateop337 = { FOLLOW_BEFORE_in_dateop337_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_AFTER_in_dateop344 */ -+static ANTLR3_BITWORD FOLLOW_AFTER_in_dateop344_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_AFTER_in_dateop344 = { FOLLOW_AFTER_in_dateop344_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateref_in_datespec353 */ -+static ANTLR3_BITWORD FOLLOW_dateref_in_datespec353_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateref_in_datespec353 = { FOLLOW_dateref_in_datespec353_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INT_in_datespec358 */ -+static ANTLR3_BITWORD FOLLOW_INT_in_datespec358_bits[] = { ANTLR3_UINT64_LIT(0x000000001E000000) }; -+static ANTLR3_BITSET_LIST FOLLOW_INT_in_datespec358 = { FOLLOW_INT_in_datespec358_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateintval_in_datespec360 */ -+static ANTLR3_BITWORD FOLLOW_dateintval_in_datespec360_bits[] = { ANTLR3_UINT64_LIT(0x0000000000600000) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateintval_in_datespec360 = { FOLLOW_dateintval_in_datespec360_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateop_in_datespec362 */ -+static ANTLR3_BITWORD FOLLOW_dateop_in_datespec362_bits[] = { ANTLR3_UINT64_LIT(0x0000000001800000) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateop_in_datespec362 = { FOLLOW_dateop_in_datespec362_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateref_in_datespec364 */ -+static ANTLR3_BITWORD FOLLOW_dateref_in_datespec364_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateref_in_datespec364 = { FOLLOW_dateref_in_datespec364_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATE_in_dateref388 */ -+static ANTLR3_BITWORD FOLLOW_DATE_in_dateref388_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATE_in_dateref388 = { FOLLOW_DATE_in_dateref388_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_TODAY_in_dateref395 */ -+static ANTLR3_BITWORD FOLLOW_TODAY_in_dateref395_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_TODAY_in_dateref395 = { FOLLOW_TODAY_in_dateref395_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DAY_in_dateintval408 */ -+static ANTLR3_BITWORD FOLLOW_DAY_in_dateintval408_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DAY_in_dateintval408 = { FOLLOW_DAY_in_dateintval408_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_WEEK_in_dateintval415 */ -+static ANTLR3_BITWORD FOLLOW_WEEK_in_dateintval415_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_WEEK_in_dateintval415 = { FOLLOW_WEEK_in_dateintval415_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_MONTH_in_dateintval422 */ -+static ANTLR3_BITWORD FOLLOW_MONTH_in_dateintval422_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_MONTH_in_dateintval422 = { FOLLOW_MONTH_in_dateintval422_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_YEAR_in_dateintval429 */ -+static ANTLR3_BITWORD FOLLOW_YEAR_in_dateintval429_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_YEAR_in_dateintval429 = { FOLLOW_YEAR_in_dateintval429_bits, 1 }; -+ -+ -+ -+ -+/* ============================================== -+ * Parsing rules -+ */ -+/** -+ * $ANTLR start query -+ * RSP.g:27:1: query : expr ( NEWLINE )? EOF -> expr ; -+ */ -+static RSPParser_query_return -+query(pRSPParser ctx) -+{ -+ RSPParser_query_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN NEWLINE2; -+ pANTLR3_COMMON_TOKEN EOF3; -+ RSPParser_expr_return expr1; -+ #undef RETURN_TYPE_expr1 -+ #define RETURN_TYPE_expr1 RSPParser_expr_return -+ -+ pANTLR3_BASE_TREE NEWLINE2_tree; -+ pANTLR3_BASE_TREE EOF3_tree; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_NEWLINE; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_EOF; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_expr; -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ NEWLINE2 = NULL; -+ EOF3 = NULL; -+ expr1.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ NEWLINE2_tree = NULL; -+ EOF3_tree = NULL; -+ -+ stream_NEWLINE = NULL; -+ #define CREATE_stream_NEWLINE if (stream_NEWLINE == NULL) {stream_NEWLINE = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token NEWLINE"); } -+ stream_EOF = NULL; -+ #define CREATE_stream_EOF if (stream_EOF == NULL) {stream_EOF = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token EOF"); } -+ stream_expr = NULL; -+ #define CREATE_stream_expr if (stream_expr == NULL) {stream_expr = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule expr"); } -+ -+ retval.tree = NULL; -+ { -+ // RSP.g:27:7: ( expr ( NEWLINE )? EOF -> expr ) -+ // RSP.g:27:9: expr ( NEWLINE )? EOF -+ { -+ FOLLOWPUSH(FOLLOW_expr_in_query42); -+ expr1=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulequeryEx; -+ } -+ -+ CREATE_stream_expr; stream_expr->add(stream_expr, expr1.tree, NULL); -+ -+ // RSP.g:27:14: ( NEWLINE )? -+ { -+ int alt1=2; -+ switch ( LA(1) ) -+ { -+ case NEWLINE: -+ { -+ alt1=1; -+ } -+ break; -+ } -+ -+ switch (alt1) -+ { -+ case 1: -+ // RSP.g:27:14: NEWLINE -+ { -+ NEWLINE2 = (pANTLR3_COMMON_TOKEN) MATCHT(NEWLINE, &FOLLOW_NEWLINE_in_query44); -+ if (HASEXCEPTION()) -+ { -+ goto rulequeryEx; -+ } -+ -+ CREATE_stream_NEWLINE; stream_NEWLINE->add(stream_NEWLINE, NEWLINE2, NULL); -+ -+ -+ } -+ break; -+ -+ } -+ } -+ EOF3 = (pANTLR3_COMMON_TOKEN) MATCHT(EOF, &FOLLOW_EOF_in_query47); -+ if (HASEXCEPTION()) -+ { -+ goto rulequeryEx; -+ } -+ -+ CREATE_stream_EOF; stream_EOF->add(stream_EOF, EOF3, NULL); -+ -+ -+ -+ /* AST REWRITE -+ * elements : expr -+ * token labels : -+ * rule labels : retval -+ * token list labels : -+ * rule list labels : -+ */ -+ { -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_retval; -+ -+ stream_retval=antlr3RewriteRuleSubtreeStreamNewAEE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token retval", retval.tree != NULL ? retval.tree : NULL); -+ -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ retval.tree = root_0; -+ // 27:28: -> expr -+ { -+ ADAPTOR->addChild(ADAPTOR, root_0, stream_expr == NULL ? NULL : stream_expr->nextTree(stream_expr)); -+ -+ } -+ -+ retval.tree = root_0; // set result root -+ if (stream_retval != NULL) stream_retval->free(stream_retval); -+ -+ -+ } -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulequeryEx; /* Prevent compiler warnings */ -+ rulequeryEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ if (stream_NEWLINE != NULL) stream_NEWLINE->free(stream_NEWLINE); -+ if (stream_EOF != NULL) stream_EOF->free(stream_EOF); -+ if (stream_expr != NULL) stream_expr->free(stream_expr); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end query */ -+ -+/** -+ * $ANTLR start expr -+ * RSP.g:30:1: expr : aexpr ( OR aexpr )* ; -+ */ -+static RSPParser_expr_return -+expr(pRSPParser ctx) -+{ -+ RSPParser_expr_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN OR5; -+ RSPParser_aexpr_return aexpr4; -+ #undef RETURN_TYPE_aexpr4 -+ #define RETURN_TYPE_aexpr4 RSPParser_aexpr_return -+ -+ RSPParser_aexpr_return aexpr6; -+ #undef RETURN_TYPE_aexpr6 -+ #define RETURN_TYPE_aexpr6 RSPParser_aexpr_return -+ -+ pANTLR3_BASE_TREE OR5_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ OR5 = NULL; -+ aexpr4.tree = NULL; -+ -+ aexpr6.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ OR5_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ // RSP.g:30:6: ( aexpr ( OR aexpr )* ) -+ // RSP.g:30:8: aexpr ( OR aexpr )* -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_aexpr_in_expr63); -+ aexpr4=aexpr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, aexpr4.tree); -+ -+ // RSP.g:30:14: ( OR aexpr )* -+ -+ for (;;) -+ { -+ int alt2=2; -+ switch ( LA(1) ) -+ { -+ case OR: -+ { -+ alt2=1; -+ } -+ break; -+ -+ } -+ -+ switch (alt2) -+ { -+ case 1: -+ // RSP.g:30:15: OR aexpr -+ { -+ OR5 = (pANTLR3_COMMON_TOKEN) MATCHT(OR, &FOLLOW_OR_in_expr66); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ OR5_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, OR5)); -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, OR5_tree, root_0)); -+ -+ FOLLOWPUSH(FOLLOW_aexpr_in_expr69); -+ aexpr6=aexpr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, aexpr6.tree); -+ -+ } -+ break; -+ -+ default: -+ goto loop2; /* break out of the loop */ -+ break; -+ } -+ } -+ loop2: ; /* Jump out to here if this rule does not match */ -+ -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleexprEx; /* Prevent compiler warnings */ -+ ruleexprEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end expr */ -+ -+/** -+ * $ANTLR start aexpr -+ * RSP.g:33:1: aexpr : crit ( AND crit )* ; -+ */ -+static RSPParser_aexpr_return -+aexpr(pRSPParser ctx) -+{ -+ RSPParser_aexpr_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN AND8; -+ RSPParser_crit_return crit7; -+ #undef RETURN_TYPE_crit7 -+ #define RETURN_TYPE_crit7 RSPParser_crit_return -+ -+ RSPParser_crit_return crit9; -+ #undef RETURN_TYPE_crit9 -+ #define RETURN_TYPE_crit9 RSPParser_crit_return -+ -+ pANTLR3_BASE_TREE AND8_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ AND8 = NULL; -+ crit7.tree = NULL; -+ -+ crit9.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ AND8_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ // RSP.g:33:7: ( crit ( AND crit )* ) -+ // RSP.g:33:9: crit ( AND crit )* -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_crit_in_aexpr81); -+ crit7=crit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleaexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, crit7.tree); -+ -+ // RSP.g:33:14: ( AND crit )* -+ -+ for (;;) -+ { -+ int alt3=2; -+ switch ( LA(1) ) -+ { -+ case AND: -+ { -+ alt3=1; -+ } -+ break; -+ -+ } -+ -+ switch (alt3) -+ { -+ case 1: -+ // RSP.g:33:15: AND crit -+ { -+ AND8 = (pANTLR3_COMMON_TOKEN) MATCHT(AND, &FOLLOW_AND_in_aexpr84); -+ if (HASEXCEPTION()) -+ { -+ goto ruleaexprEx; -+ } -+ -+ AND8_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, AND8)); -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, AND8_tree, root_0)); -+ -+ FOLLOWPUSH(FOLLOW_crit_in_aexpr87); -+ crit9=crit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleaexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, crit9.tree); -+ -+ } -+ break; -+ -+ default: -+ goto loop3; /* break out of the loop */ -+ break; -+ } -+ } -+ loop3: ; /* Jump out to here if this rule does not match */ -+ -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleaexprEx; /* Prevent compiler warnings */ -+ ruleaexprEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end aexpr */ -+ -+/** -+ * $ANTLR start crit -+ * RSP.g:36:1: crit : ( LPAR expr RPAR -> expr | strcrit | intcrit | datecrit ); -+ */ -+static RSPParser_crit_return -+crit(pRSPParser ctx) -+{ -+ RSPParser_crit_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN LPAR10; -+ pANTLR3_COMMON_TOKEN RPAR12; -+ RSPParser_expr_return expr11; -+ #undef RETURN_TYPE_expr11 -+ #define RETURN_TYPE_expr11 RSPParser_expr_return -+ -+ RSPParser_strcrit_return strcrit13; -+ #undef RETURN_TYPE_strcrit13 -+ #define RETURN_TYPE_strcrit13 RSPParser_strcrit_return -+ -+ RSPParser_intcrit_return intcrit14; -+ #undef RETURN_TYPE_intcrit14 -+ #define RETURN_TYPE_intcrit14 RSPParser_intcrit_return -+ -+ RSPParser_datecrit_return datecrit15; -+ #undef RETURN_TYPE_datecrit15 -+ #define RETURN_TYPE_datecrit15 RSPParser_datecrit_return -+ -+ pANTLR3_BASE_TREE LPAR10_tree; -+ pANTLR3_BASE_TREE RPAR12_tree; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_RPAR; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_LPAR; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_expr; -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ LPAR10 = NULL; -+ RPAR12 = NULL; -+ expr11.tree = NULL; -+ -+ strcrit13.tree = NULL; -+ -+ intcrit14.tree = NULL; -+ -+ datecrit15.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ LPAR10_tree = NULL; -+ RPAR12_tree = NULL; -+ -+ stream_RPAR = NULL; -+ #define CREATE_stream_RPAR if (stream_RPAR == NULL) {stream_RPAR = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token RPAR"); } -+ stream_LPAR = NULL; -+ #define CREATE_stream_LPAR if (stream_LPAR == NULL) {stream_LPAR = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token LPAR"); } -+ stream_expr = NULL; -+ #define CREATE_stream_expr if (stream_expr == NULL) {stream_expr = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule expr"); } -+ -+ retval.tree = NULL; -+ { -+ { -+ // RSP.g:36:6: ( LPAR expr RPAR -> expr | strcrit | intcrit | datecrit ) -+ -+ ANTLR3_UINT32 alt4; -+ -+ alt4=4; -+ -+ switch ( LA(1) ) -+ { -+ case LPAR: -+ { -+ alt4=1; -+ } -+ break; -+ case FIELD: -+ { -+ switch ( LA(2) ) -+ { -+ case NOT: -+ { -+ switch ( LA(3) ) -+ { -+ case EQUAL: -+ { -+ switch ( LA(4) ) -+ { -+ case STR: -+ { -+ alt4=2; -+ } -+ break; -+ case INT: -+ { -+ alt4=3; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 8; -+ -+ -+ goto rulecritEx; -+ } -+ -+ } -+ break; -+ case LESS: -+ case GREATER: -+ case LTE: -+ case GTE: -+ { -+ alt4=3; -+ } -+ break; -+ case INCLUDES: -+ case STARTSW: -+ case ENDSW: -+ { -+ alt4=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 3; -+ -+ -+ goto rulecritEx; -+ } -+ -+ } -+ break; -+ case BEFORE: -+ case AFTER: -+ { -+ alt4=4; -+ } -+ break; -+ case EQUAL: -+ { -+ switch ( LA(3) ) -+ { -+ case INT: -+ { -+ alt4=3; -+ } -+ break; -+ case STR: -+ { -+ alt4=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 5; -+ -+ -+ goto rulecritEx; -+ } -+ -+ } -+ break; -+ case LESS: -+ case GREATER: -+ case LTE: -+ case GTE: -+ { -+ alt4=3; -+ } -+ break; -+ case INCLUDES: -+ case STARTSW: -+ case ENDSW: -+ { -+ alt4=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 2; -+ -+ -+ goto rulecritEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 0; -+ -+ -+ goto rulecritEx; -+ } -+ -+ switch (alt4) -+ { -+ case 1: -+ // RSP.g:36:8: LPAR expr RPAR -+ { -+ LPAR10 = (pANTLR3_COMMON_TOKEN) MATCHT(LPAR, &FOLLOW_LPAR_in_crit99); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ CREATE_stream_LPAR; stream_LPAR->add(stream_LPAR, LPAR10, NULL); -+ -+ FOLLOWPUSH(FOLLOW_expr_in_crit101); -+ expr11=expr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ CREATE_stream_expr; stream_expr->add(stream_expr, expr11.tree, NULL); -+ RPAR12 = (pANTLR3_COMMON_TOKEN) MATCHT(RPAR, &FOLLOW_RPAR_in_crit103); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ CREATE_stream_RPAR; stream_RPAR->add(stream_RPAR, RPAR12, NULL); -+ -+ -+ -+ /* AST REWRITE -+ * elements : expr -+ * token labels : -+ * rule labels : retval -+ * token list labels : -+ * rule list labels : -+ */ -+ { -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_retval; -+ -+ stream_retval=antlr3RewriteRuleSubtreeStreamNewAEE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token retval", retval.tree != NULL ? retval.tree : NULL); -+ -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ retval.tree = root_0; -+ // 36:25: -> expr -+ { -+ ADAPTOR->addChild(ADAPTOR, root_0, stream_expr == NULL ? NULL : stream_expr->nextTree(stream_expr)); -+ -+ } -+ -+ retval.tree = root_0; // set result root -+ if (stream_retval != NULL) stream_retval->free(stream_retval); -+ -+ -+ } -+ } -+ break; -+ case 2: -+ // RSP.g:37:4: strcrit -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_strcrit_in_crit114); -+ strcrit13=strcrit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, strcrit13.tree); -+ -+ } -+ break; -+ case 3: -+ // RSP.g:38:4: intcrit -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_intcrit_in_crit119); -+ intcrit14=intcrit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, intcrit14.tree); -+ -+ } -+ break; -+ case 4: -+ // RSP.g:39:4: datecrit -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_datecrit_in_crit124); -+ datecrit15=datecrit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, datecrit15.tree); -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulecritEx; /* Prevent compiler warnings */ -+ rulecritEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ if (stream_RPAR != NULL) stream_RPAR->free(stream_RPAR); -+ if (stream_LPAR != NULL) stream_LPAR->free(stream_LPAR); -+ if (stream_expr != NULL) stream_expr->free(stream_expr); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end crit */ -+ -+/** -+ * $ANTLR start strcrit -+ * RSP.g:42:1: strcrit : ( FIELD strop STR -> ^( strop FIELD STR ) | FIELD NOT strop STR -> ^( NOT ^( strop FIELD STR ) ) ); -+ */ -+static RSPParser_strcrit_return -+strcrit(pRSPParser ctx) -+{ -+ RSPParser_strcrit_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN FIELD16; -+ pANTLR3_COMMON_TOKEN STR18; -+ pANTLR3_COMMON_TOKEN FIELD19; -+ pANTLR3_COMMON_TOKEN NOT20; -+ pANTLR3_COMMON_TOKEN STR22; -+ RSPParser_strop_return strop17; -+ #undef RETURN_TYPE_strop17 -+ #define RETURN_TYPE_strop17 RSPParser_strop_return -+ -+ RSPParser_strop_return strop21; -+ #undef RETURN_TYPE_strop21 -+ #define RETURN_TYPE_strop21 RSPParser_strop_return -+ -+ pANTLR3_BASE_TREE FIELD16_tree; -+ pANTLR3_BASE_TREE STR18_tree; -+ pANTLR3_BASE_TREE FIELD19_tree; -+ pANTLR3_BASE_TREE NOT20_tree; -+ pANTLR3_BASE_TREE STR22_tree; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_STR; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_FIELD; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_NOT; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_strop; -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ FIELD16 = NULL; -+ STR18 = NULL; -+ FIELD19 = NULL; -+ NOT20 = NULL; -+ STR22 = NULL; -+ strop17.tree = NULL; -+ -+ strop21.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ FIELD16_tree = NULL; -+ STR18_tree = NULL; -+ FIELD19_tree = NULL; -+ NOT20_tree = NULL; -+ STR22_tree = NULL; -+ -+ stream_STR = NULL; -+ #define CREATE_stream_STR if (stream_STR == NULL) {stream_STR = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token STR"); } -+ stream_FIELD = NULL; -+ #define CREATE_stream_FIELD if (stream_FIELD == NULL) {stream_FIELD = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token FIELD"); } -+ stream_NOT = NULL; -+ #define CREATE_stream_NOT if (stream_NOT == NULL) {stream_NOT = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token NOT"); } -+ stream_strop = NULL; -+ #define CREATE_stream_strop if (stream_strop == NULL) {stream_strop = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule strop"); } -+ -+ retval.tree = NULL; -+ { -+ { -+ // RSP.g:42:9: ( FIELD strop STR -> ^( strop FIELD STR ) | FIELD NOT strop STR -> ^( NOT ^( strop FIELD STR ) ) ) -+ -+ ANTLR3_UINT32 alt5; -+ -+ alt5=2; -+ -+ switch ( LA(1) ) -+ { -+ case FIELD: -+ { -+ switch ( LA(2) ) -+ { -+ case NOT: -+ { -+ alt5=2; -+ } -+ break; -+ case EQUAL: -+ case INCLUDES: -+ case STARTSW: -+ case ENDSW: -+ { -+ alt5=1; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 5; -+ EXCEPTION->state = 1; -+ -+ -+ goto rulestrcritEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 5; -+ EXCEPTION->state = 0; -+ -+ -+ goto rulestrcritEx; -+ } -+ -+ switch (alt5) -+ { -+ case 1: -+ // RSP.g:42:11: FIELD strop STR -+ { -+ FIELD16 = (pANTLR3_COMMON_TOKEN) MATCHT(FIELD, &FOLLOW_FIELD_in_strcrit134); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ CREATE_stream_FIELD; stream_FIELD->add(stream_FIELD, FIELD16, NULL); -+ -+ FOLLOWPUSH(FOLLOW_strop_in_strcrit136); -+ strop17=strop(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ CREATE_stream_strop; stream_strop->add(stream_strop, strop17.tree, NULL); -+ STR18 = (pANTLR3_COMMON_TOKEN) MATCHT(STR, &FOLLOW_STR_in_strcrit138); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ CREATE_stream_STR; stream_STR->add(stream_STR, STR18, NULL); -+ -+ -+ -+ /* AST REWRITE -+ * elements : FIELD, STR, strop -+ * token labels : -+ * rule labels : retval -+ * token list labels : -+ * rule list labels : -+ */ -+ { -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_retval; -+ -+ stream_retval=antlr3RewriteRuleSubtreeStreamNewAEE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token retval", retval.tree != NULL ? retval.tree : NULL); -+ -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ retval.tree = root_0; -+ // 42:29: -> ^( strop FIELD STR ) -+ { -+ // RSP.g:42:32: ^( strop FIELD STR ) -+ { -+ pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_strop == NULL ? NULL : stream_strop->nextNode(stream_strop), root_1)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_1, stream_FIELD == NULL ? NULL : stream_FIELD->nextNode(stream_FIELD)); -+ ADAPTOR->addChild(ADAPTOR, root_1, stream_STR == NULL ? NULL : stream_STR->nextNode(stream_STR)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, root_1); -+ } -+ -+ } -+ -+ retval.tree = root_0; // set result root -+ if (stream_retval != NULL) stream_retval->free(stream_retval); -+ -+ -+ } -+ } -+ break; -+ case 2: -+ // RSP.g:43:4: FIELD NOT strop STR -+ { -+ FIELD19 = (pANTLR3_COMMON_TOKEN) MATCHT(FIELD, &FOLLOW_FIELD_in_strcrit155); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ CREATE_stream_FIELD; stream_FIELD->add(stream_FIELD, FIELD19, NULL); -+ -+ NOT20 = (pANTLR3_COMMON_TOKEN) MATCHT(NOT, &FOLLOW_NOT_in_strcrit157); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ CREATE_stream_NOT; stream_NOT->add(stream_NOT, NOT20, NULL); -+ -+ FOLLOWPUSH(FOLLOW_strop_in_strcrit159); -+ strop21=strop(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ CREATE_stream_strop; stream_strop->add(stream_strop, strop21.tree, NULL); -+ STR22 = (pANTLR3_COMMON_TOKEN) MATCHT(STR, &FOLLOW_STR_in_strcrit161); -+ if (HASEXCEPTION()) -+ { -+ goto rulestrcritEx; -+ } -+ -+ CREATE_stream_STR; stream_STR->add(stream_STR, STR22, NULL); -+ -+ -+ -+ /* AST REWRITE -+ * elements : STR, FIELD, strop, NOT -+ * token labels : -+ * rule labels : retval -+ * token list labels : -+ * rule list labels : -+ */ -+ { -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_retval; -+ -+ stream_retval=antlr3RewriteRuleSubtreeStreamNewAEE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token retval", retval.tree != NULL ? retval.tree : NULL); -+ -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ retval.tree = root_0; -+ // 43:25: -> ^( NOT ^( strop FIELD STR ) ) -+ { -+ // RSP.g:43:28: ^( NOT ^( strop FIELD STR ) ) -+ { -+ pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_NOT == NULL ? NULL : stream_NOT->nextNode(stream_NOT), root_1)); -+ -+ // RSP.g:43:34: ^( strop FIELD STR ) -+ { -+ pANTLR3_BASE_TREE root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_strop == NULL ? NULL : stream_strop->nextNode(stream_strop), root_2)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_2, stream_FIELD == NULL ? NULL : stream_FIELD->nextNode(stream_FIELD)); -+ ADAPTOR->addChild(ADAPTOR, root_2, stream_STR == NULL ? NULL : stream_STR->nextNode(stream_STR)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_1, root_2); -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, root_1); -+ } -+ -+ } -+ -+ retval.tree = root_0; // set result root -+ if (stream_retval != NULL) stream_retval->free(stream_retval); -+ -+ -+ } -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulestrcritEx; /* Prevent compiler warnings */ -+ rulestrcritEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ if (stream_STR != NULL) stream_STR->free(stream_STR); -+ if (stream_FIELD != NULL) stream_FIELD->free(stream_FIELD); -+ if (stream_NOT != NULL) stream_NOT->free(stream_NOT); -+ if (stream_strop != NULL) stream_strop->free(stream_strop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end strcrit */ -+ -+/** -+ * $ANTLR start strop -+ * RSP.g:46:1: strop : (equal= EQUAL | includes= INCLUDES | startsw= STARTSW | endsw= ENDSW ); -+ */ -+static RSPParser_strop_return -+strop(pRSPParser ctx) -+{ -+ RSPParser_strop_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN equal; -+ pANTLR3_COMMON_TOKEN includes; -+ pANTLR3_COMMON_TOKEN startsw; -+ pANTLR3_COMMON_TOKEN endsw; -+ -+ pANTLR3_BASE_TREE equal_tree; -+ pANTLR3_BASE_TREE includes_tree; -+ pANTLR3_BASE_TREE startsw_tree; -+ pANTLR3_BASE_TREE endsw_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ equal = NULL; -+ includes = NULL; -+ startsw = NULL; -+ endsw = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ equal_tree = NULL; -+ includes_tree = NULL; -+ startsw_tree = NULL; -+ endsw_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ { -+ // RSP.g:46:7: (equal= EQUAL | includes= INCLUDES | startsw= STARTSW | endsw= ENDSW ) -+ -+ ANTLR3_UINT32 alt6; -+ -+ alt6=4; -+ -+ switch ( LA(1) ) -+ { -+ case EQUAL: -+ { -+ alt6=1; -+ } -+ break; -+ case INCLUDES: -+ { -+ alt6=2; -+ } -+ break; -+ case STARTSW: -+ { -+ alt6=3; -+ } -+ break; -+ case ENDSW: -+ { -+ alt6=4; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 6; -+ EXCEPTION->state = 0; -+ -+ -+ goto rulestropEx; -+ } -+ -+ switch (alt6) -+ { -+ case 1: -+ // RSP.g:46:9: equal= EQUAL -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ equal = (pANTLR3_COMMON_TOKEN) MATCHT(EQUAL, &FOLLOW_EQUAL_in_strop188); -+ if (HASEXCEPTION()) -+ { -+ goto rulestropEx; -+ } -+ -+ equal_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, equal)); -+ ADAPTOR->addChild(ADAPTOR, root_0, equal_tree); -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:47:4: includes= INCLUDES -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ includes = (pANTLR3_COMMON_TOKEN) MATCHT(INCLUDES, &FOLLOW_INCLUDES_in_strop195); -+ if (HASEXCEPTION()) -+ { -+ goto rulestropEx; -+ } -+ -+ includes_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, includes)); -+ ADAPTOR->addChild(ADAPTOR, root_0, includes_tree); -+ -+ -+ } -+ break; -+ case 3: -+ // RSP.g:48:4: startsw= STARTSW -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ startsw = (pANTLR3_COMMON_TOKEN) MATCHT(STARTSW, &FOLLOW_STARTSW_in_strop202); -+ if (HASEXCEPTION()) -+ { -+ goto rulestropEx; -+ } -+ -+ startsw_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, startsw)); -+ ADAPTOR->addChild(ADAPTOR, root_0, startsw_tree); -+ -+ -+ } -+ break; -+ case 4: -+ // RSP.g:49:4: endsw= ENDSW -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ endsw = (pANTLR3_COMMON_TOKEN) MATCHT(ENDSW, &FOLLOW_ENDSW_in_strop209); -+ if (HASEXCEPTION()) -+ { -+ goto rulestropEx; -+ } -+ -+ endsw_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, endsw)); -+ ADAPTOR->addChild(ADAPTOR, root_0, endsw_tree); -+ -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulestropEx; /* Prevent compiler warnings */ -+ rulestropEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end strop */ -+ -+/** -+ * $ANTLR start intcrit -+ * RSP.g:52:1: intcrit : ( FIELD intop INT -> ^( intop FIELD INT ) | FIELD NOT intop INT -> ^( NOT ^( intop FIELD INT ) ) ); -+ */ -+static RSPParser_intcrit_return -+intcrit(pRSPParser ctx) -+{ -+ RSPParser_intcrit_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN FIELD23; -+ pANTLR3_COMMON_TOKEN INT25; -+ pANTLR3_COMMON_TOKEN FIELD26; -+ pANTLR3_COMMON_TOKEN NOT27; -+ pANTLR3_COMMON_TOKEN INT29; -+ RSPParser_intop_return intop24; -+ #undef RETURN_TYPE_intop24 -+ #define RETURN_TYPE_intop24 RSPParser_intop_return -+ -+ RSPParser_intop_return intop28; -+ #undef RETURN_TYPE_intop28 -+ #define RETURN_TYPE_intop28 RSPParser_intop_return -+ -+ pANTLR3_BASE_TREE FIELD23_tree; -+ pANTLR3_BASE_TREE INT25_tree; -+ pANTLR3_BASE_TREE FIELD26_tree; -+ pANTLR3_BASE_TREE NOT27_tree; -+ pANTLR3_BASE_TREE INT29_tree; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_FIELD; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_INT; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_NOT; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_intop; -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ FIELD23 = NULL; -+ INT25 = NULL; -+ FIELD26 = NULL; -+ NOT27 = NULL; -+ INT29 = NULL; -+ intop24.tree = NULL; -+ -+ intop28.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ FIELD23_tree = NULL; -+ INT25_tree = NULL; -+ FIELD26_tree = NULL; -+ NOT27_tree = NULL; -+ INT29_tree = NULL; -+ -+ stream_FIELD = NULL; -+ #define CREATE_stream_FIELD if (stream_FIELD == NULL) {stream_FIELD = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token FIELD"); } -+ stream_INT = NULL; -+ #define CREATE_stream_INT if (stream_INT == NULL) {stream_INT = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token INT"); } -+ stream_NOT = NULL; -+ #define CREATE_stream_NOT if (stream_NOT == NULL) {stream_NOT = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token NOT"); } -+ stream_intop = NULL; -+ #define CREATE_stream_intop if (stream_intop == NULL) {stream_intop = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule intop"); } -+ -+ retval.tree = NULL; -+ { -+ { -+ // RSP.g:52:9: ( FIELD intop INT -> ^( intop FIELD INT ) | FIELD NOT intop INT -> ^( NOT ^( intop FIELD INT ) ) ) -+ -+ ANTLR3_UINT32 alt7; -+ -+ alt7=2; -+ -+ switch ( LA(1) ) -+ { -+ case FIELD: -+ { -+ switch ( LA(2) ) -+ { -+ case NOT: -+ { -+ alt7=2; -+ } -+ break; -+ case EQUAL: -+ case LESS: -+ case GREATER: -+ case LTE: -+ case GTE: -+ { -+ alt7=1; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 7; -+ EXCEPTION->state = 1; -+ -+ -+ goto ruleintcritEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 7; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleintcritEx; -+ } -+ -+ switch (alt7) -+ { -+ case 1: -+ // RSP.g:52:11: FIELD intop INT -+ { -+ FIELD23 = (pANTLR3_COMMON_TOKEN) MATCHT(FIELD, &FOLLOW_FIELD_in_intcrit219); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ CREATE_stream_FIELD; stream_FIELD->add(stream_FIELD, FIELD23, NULL); -+ -+ FOLLOWPUSH(FOLLOW_intop_in_intcrit221); -+ intop24=intop(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ CREATE_stream_intop; stream_intop->add(stream_intop, intop24.tree, NULL); -+ INT25 = (pANTLR3_COMMON_TOKEN) MATCHT(INT, &FOLLOW_INT_in_intcrit223); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ CREATE_stream_INT; stream_INT->add(stream_INT, INT25, NULL); -+ -+ -+ -+ /* AST REWRITE -+ * elements : FIELD, INT, intop -+ * token labels : -+ * rule labels : retval -+ * token list labels : -+ * rule list labels : -+ */ -+ { -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_retval; -+ -+ stream_retval=antlr3RewriteRuleSubtreeStreamNewAEE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token retval", retval.tree != NULL ? retval.tree : NULL); -+ -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ retval.tree = root_0; -+ // 52:29: -> ^( intop FIELD INT ) -+ { -+ // RSP.g:52:32: ^( intop FIELD INT ) -+ { -+ pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_intop == NULL ? NULL : stream_intop->nextNode(stream_intop), root_1)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_1, stream_FIELD == NULL ? NULL : stream_FIELD->nextNode(stream_FIELD)); -+ ADAPTOR->addChild(ADAPTOR, root_1, stream_INT == NULL ? NULL : stream_INT->nextNode(stream_INT)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, root_1); -+ } -+ -+ } -+ -+ retval.tree = root_0; // set result root -+ if (stream_retval != NULL) stream_retval->free(stream_retval); -+ -+ -+ } -+ } -+ break; -+ case 2: -+ // RSP.g:53:4: FIELD NOT intop INT -+ { -+ FIELD26 = (pANTLR3_COMMON_TOKEN) MATCHT(FIELD, &FOLLOW_FIELD_in_intcrit240); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ CREATE_stream_FIELD; stream_FIELD->add(stream_FIELD, FIELD26, NULL); -+ -+ NOT27 = (pANTLR3_COMMON_TOKEN) MATCHT(NOT, &FOLLOW_NOT_in_intcrit242); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ CREATE_stream_NOT; stream_NOT->add(stream_NOT, NOT27, NULL); -+ -+ FOLLOWPUSH(FOLLOW_intop_in_intcrit244); -+ intop28=intop(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ CREATE_stream_intop; stream_intop->add(stream_intop, intop28.tree, NULL); -+ INT29 = (pANTLR3_COMMON_TOKEN) MATCHT(INT, &FOLLOW_INT_in_intcrit246); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintcritEx; -+ } -+ -+ CREATE_stream_INT; stream_INT->add(stream_INT, INT29, NULL); -+ -+ -+ -+ /* AST REWRITE -+ * elements : intop, NOT, INT, FIELD -+ * token labels : -+ * rule labels : retval -+ * token list labels : -+ * rule list labels : -+ */ -+ { -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_retval; -+ -+ stream_retval=antlr3RewriteRuleSubtreeStreamNewAEE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token retval", retval.tree != NULL ? retval.tree : NULL); -+ -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ retval.tree = root_0; -+ // 53:25: -> ^( NOT ^( intop FIELD INT ) ) -+ { -+ // RSP.g:53:28: ^( NOT ^( intop FIELD INT ) ) -+ { -+ pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_NOT == NULL ? NULL : stream_NOT->nextNode(stream_NOT), root_1)); -+ -+ // RSP.g:53:34: ^( intop FIELD INT ) -+ { -+ pANTLR3_BASE_TREE root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ root_2 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_intop == NULL ? NULL : stream_intop->nextNode(stream_intop), root_2)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_2, stream_FIELD == NULL ? NULL : stream_FIELD->nextNode(stream_FIELD)); -+ ADAPTOR->addChild(ADAPTOR, root_2, stream_INT == NULL ? NULL : stream_INT->nextNode(stream_INT)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_1, root_2); -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, root_1); -+ } -+ -+ } -+ -+ retval.tree = root_0; // set result root -+ if (stream_retval != NULL) stream_retval->free(stream_retval); -+ -+ -+ } -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleintcritEx; /* Prevent compiler warnings */ -+ ruleintcritEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ if (stream_FIELD != NULL) stream_FIELD->free(stream_FIELD); -+ if (stream_INT != NULL) stream_INT->free(stream_INT); -+ if (stream_NOT != NULL) stream_NOT->free(stream_NOT); -+ if (stream_intop != NULL) stream_intop->free(stream_intop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end intcrit */ -+ -+/** -+ * $ANTLR start intop -+ * RSP.g:56:1: intop : (equal= EQUAL | less= LESS | greater= GREATER | lte= LTE | gte= GTE ); -+ */ -+static RSPParser_intop_return -+intop(pRSPParser ctx) -+{ -+ RSPParser_intop_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN equal; -+ pANTLR3_COMMON_TOKEN less; -+ pANTLR3_COMMON_TOKEN greater; -+ pANTLR3_COMMON_TOKEN lte; -+ pANTLR3_COMMON_TOKEN gte; -+ -+ pANTLR3_BASE_TREE equal_tree; -+ pANTLR3_BASE_TREE less_tree; -+ pANTLR3_BASE_TREE greater_tree; -+ pANTLR3_BASE_TREE lte_tree; -+ pANTLR3_BASE_TREE gte_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ equal = NULL; -+ less = NULL; -+ greater = NULL; -+ lte = NULL; -+ gte = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ equal_tree = NULL; -+ less_tree = NULL; -+ greater_tree = NULL; -+ lte_tree = NULL; -+ gte_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ { -+ // RSP.g:56:7: (equal= EQUAL | less= LESS | greater= GREATER | lte= LTE | gte= GTE ) -+ -+ ANTLR3_UINT32 alt8; -+ -+ alt8=5; -+ -+ switch ( LA(1) ) -+ { -+ case EQUAL: -+ { -+ alt8=1; -+ } -+ break; -+ case LESS: -+ { -+ alt8=2; -+ } -+ break; -+ case GREATER: -+ { -+ alt8=3; -+ } -+ break; -+ case LTE: -+ { -+ alt8=4; -+ } -+ break; -+ case GTE: -+ { -+ alt8=5; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 8; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleintopEx; -+ } -+ -+ switch (alt8) -+ { -+ case 1: -+ // RSP.g:56:9: equal= EQUAL -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ equal = (pANTLR3_COMMON_TOKEN) MATCHT(EQUAL, &FOLLOW_EQUAL_in_intop273); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintopEx; -+ } -+ -+ equal_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, equal)); -+ ADAPTOR->addChild(ADAPTOR, root_0, equal_tree); -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:57:4: less= LESS -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ less = (pANTLR3_COMMON_TOKEN) MATCHT(LESS, &FOLLOW_LESS_in_intop280); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintopEx; -+ } -+ -+ less_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, less)); -+ ADAPTOR->addChild(ADAPTOR, root_0, less_tree); -+ -+ -+ } -+ break; -+ case 3: -+ // RSP.g:58:4: greater= GREATER -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ greater = (pANTLR3_COMMON_TOKEN) MATCHT(GREATER, &FOLLOW_GREATER_in_intop287); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintopEx; -+ } -+ -+ greater_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, greater)); -+ ADAPTOR->addChild(ADAPTOR, root_0, greater_tree); -+ -+ -+ } -+ break; -+ case 4: -+ // RSP.g:59:4: lte= LTE -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ lte = (pANTLR3_COMMON_TOKEN) MATCHT(LTE, &FOLLOW_LTE_in_intop294); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintopEx; -+ } -+ -+ lte_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, lte)); -+ ADAPTOR->addChild(ADAPTOR, root_0, lte_tree); -+ -+ -+ } -+ break; -+ case 5: -+ // RSP.g:60:4: gte= GTE -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ gte = (pANTLR3_COMMON_TOKEN) MATCHT(GTE, &FOLLOW_GTE_in_intop301); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintopEx; -+ } -+ -+ gte_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, gte)); -+ ADAPTOR->addChild(ADAPTOR, root_0, gte_tree); -+ -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleintopEx; /* Prevent compiler warnings */ -+ ruleintopEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end intop */ -+ -+/** -+ * $ANTLR start datecrit -+ * RSP.g:63:1: datecrit : FIELD dateop datespec -> ^( dateop FIELD datespec ) ; -+ */ -+static RSPParser_datecrit_return -+datecrit(pRSPParser ctx) -+{ -+ RSPParser_datecrit_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN FIELD30; -+ RSPParser_dateop_return dateop31; -+ #undef RETURN_TYPE_dateop31 -+ #define RETURN_TYPE_dateop31 RSPParser_dateop_return -+ -+ RSPParser_datespec_return datespec32; -+ #undef RETURN_TYPE_datespec32 -+ #define RETURN_TYPE_datespec32 RSPParser_datespec_return -+ -+ pANTLR3_BASE_TREE FIELD30_tree; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_FIELD; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_datespec; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_dateop; -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ FIELD30 = NULL; -+ dateop31.tree = NULL; -+ -+ datespec32.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ FIELD30_tree = NULL; -+ -+ stream_FIELD = NULL; -+ #define CREATE_stream_FIELD if (stream_FIELD == NULL) {stream_FIELD = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token FIELD"); } -+ stream_datespec = NULL; -+ #define CREATE_stream_datespec if (stream_datespec == NULL) {stream_datespec = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule datespec"); } -+ stream_dateop = NULL; -+ #define CREATE_stream_dateop if (stream_dateop == NULL) {stream_dateop = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule dateop"); } -+ -+ retval.tree = NULL; -+ { -+ // RSP.g:63:9: ( FIELD dateop datespec -> ^( dateop FIELD datespec ) ) -+ // RSP.g:63:11: FIELD dateop datespec -+ { -+ FIELD30 = (pANTLR3_COMMON_TOKEN) MATCHT(FIELD, &FOLLOW_FIELD_in_datecrit310); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatecritEx; -+ } -+ -+ CREATE_stream_FIELD; stream_FIELD->add(stream_FIELD, FIELD30, NULL); -+ -+ FOLLOWPUSH(FOLLOW_dateop_in_datecrit312); -+ dateop31=dateop(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatecritEx; -+ } -+ -+ CREATE_stream_dateop; stream_dateop->add(stream_dateop, dateop31.tree, NULL); -+ FOLLOWPUSH(FOLLOW_datespec_in_datecrit314); -+ datespec32=datespec(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatecritEx; -+ } -+ -+ CREATE_stream_datespec; stream_datespec->add(stream_datespec, datespec32.tree, NULL); -+ -+ -+ /* AST REWRITE -+ * elements : FIELD, dateop, datespec -+ * token labels : -+ * rule labels : retval -+ * token list labels : -+ * rule list labels : -+ */ -+ { -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_retval; -+ -+ stream_retval=antlr3RewriteRuleSubtreeStreamNewAEE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token retval", retval.tree != NULL ? retval.tree : NULL); -+ -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ retval.tree = root_0; -+ // 63:34: -> ^( dateop FIELD datespec ) -+ { -+ // RSP.g:63:37: ^( dateop FIELD datespec ) -+ { -+ pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_dateop == NULL ? NULL : stream_dateop->nextNode(stream_dateop), root_1)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_1, stream_FIELD == NULL ? NULL : stream_FIELD->nextNode(stream_FIELD)); -+ ADAPTOR->addChild(ADAPTOR, root_1, stream_datespec == NULL ? NULL : stream_datespec->nextTree(stream_datespec)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, root_1); -+ } -+ -+ } -+ -+ retval.tree = root_0; // set result root -+ if (stream_retval != NULL) stream_retval->free(stream_retval); -+ -+ -+ } -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledatecritEx; /* Prevent compiler warnings */ -+ ruledatecritEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ if (stream_FIELD != NULL) stream_FIELD->free(stream_FIELD); -+ if (stream_datespec != NULL) stream_datespec->free(stream_datespec); -+ if (stream_dateop != NULL) stream_dateop->free(stream_dateop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end datecrit */ -+ -+/** -+ * $ANTLR start dateop -+ * RSP.g:66:1: dateop : (before= BEFORE | after= AFTER ); -+ */ -+static RSPParser_dateop_return -+dateop(pRSPParser ctx) -+{ -+ RSPParser_dateop_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN before; -+ pANTLR3_COMMON_TOKEN after; -+ -+ pANTLR3_BASE_TREE before_tree; -+ pANTLR3_BASE_TREE after_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ before = NULL; -+ after = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ before_tree = NULL; -+ after_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ { -+ // RSP.g:66:8: (before= BEFORE | after= AFTER ) -+ -+ ANTLR3_UINT32 alt9; -+ -+ alt9=2; -+ -+ switch ( LA(1) ) -+ { -+ case BEFORE: -+ { -+ alt9=1; -+ } -+ break; -+ case AFTER: -+ { -+ alt9=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 9; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruledateopEx; -+ } -+ -+ switch (alt9) -+ { -+ case 1: -+ // RSP.g:66:10: before= BEFORE -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ before = (pANTLR3_COMMON_TOKEN) MATCHT(BEFORE, &FOLLOW_BEFORE_in_dateop337); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateopEx; -+ } -+ -+ before_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, before)); -+ ADAPTOR->addChild(ADAPTOR, root_0, before_tree); -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:67:4: after= AFTER -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ after = (pANTLR3_COMMON_TOKEN) MATCHT(AFTER, &FOLLOW_AFTER_in_dateop344); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateopEx; -+ } -+ -+ after_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, after)); -+ ADAPTOR->addChild(ADAPTOR, root_0, after_tree); -+ -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledateopEx; /* Prevent compiler warnings */ -+ ruledateopEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end dateop */ -+ -+/** -+ * $ANTLR start datespec -+ * RSP.g:70:1: datespec : ( dateref | INT dateintval dateop dateref -> ^( dateop dateref INT dateintval ) ); -+ */ -+static RSPParser_datespec_return -+datespec(pRSPParser ctx) -+{ -+ RSPParser_datespec_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN INT34; -+ RSPParser_dateref_return dateref33; -+ #undef RETURN_TYPE_dateref33 -+ #define RETURN_TYPE_dateref33 RSPParser_dateref_return -+ -+ RSPParser_dateintval_return dateintval35; -+ #undef RETURN_TYPE_dateintval35 -+ #define RETURN_TYPE_dateintval35 RSPParser_dateintval_return -+ -+ RSPParser_dateop_return dateop36; -+ #undef RETURN_TYPE_dateop36 -+ #define RETURN_TYPE_dateop36 RSPParser_dateop_return -+ -+ RSPParser_dateref_return dateref37; -+ #undef RETURN_TYPE_dateref37 -+ #define RETURN_TYPE_dateref37 RSPParser_dateref_return -+ -+ pANTLR3_BASE_TREE INT34_tree; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_INT; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_dateintval; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_dateref; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_dateop; -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ INT34 = NULL; -+ dateref33.tree = NULL; -+ -+ dateintval35.tree = NULL; -+ -+ dateop36.tree = NULL; -+ -+ dateref37.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ INT34_tree = NULL; -+ -+ stream_INT = NULL; -+ #define CREATE_stream_INT if (stream_INT == NULL) {stream_INT = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token INT"); } -+ stream_dateintval = NULL; -+ #define CREATE_stream_dateintval if (stream_dateintval == NULL) {stream_dateintval = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule dateintval"); } -+ stream_dateref = NULL; -+ #define CREATE_stream_dateref if (stream_dateref == NULL) {stream_dateref = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule dateref"); } -+ stream_dateop = NULL; -+ #define CREATE_stream_dateop if (stream_dateop == NULL) {stream_dateop = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule dateop"); } -+ -+ retval.tree = NULL; -+ { -+ { -+ // RSP.g:70:9: ( dateref | INT dateintval dateop dateref -> ^( dateop dateref INT dateintval ) ) -+ -+ ANTLR3_UINT32 alt10; -+ -+ alt10=2; -+ -+ switch ( LA(1) ) -+ { -+ case DATE: -+ case TODAY: -+ { -+ alt10=1; -+ } -+ break; -+ case INT: -+ { -+ alt10=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 10; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruledatespecEx; -+ } -+ -+ switch (alt10) -+ { -+ case 1: -+ // RSP.g:70:11: dateref -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_dateref_in_datespec353); -+ dateref33=dateref(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, dateref33.tree); -+ -+ } -+ break; -+ case 2: -+ // RSP.g:71:4: INT dateintval dateop dateref -+ { -+ INT34 = (pANTLR3_COMMON_TOKEN) MATCHT(INT, &FOLLOW_INT_in_datespec358); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ CREATE_stream_INT; stream_INT->add(stream_INT, INT34, NULL); -+ -+ FOLLOWPUSH(FOLLOW_dateintval_in_datespec360); -+ dateintval35=dateintval(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ CREATE_stream_dateintval; stream_dateintval->add(stream_dateintval, dateintval35.tree, NULL); -+ FOLLOWPUSH(FOLLOW_dateop_in_datespec362); -+ dateop36=dateop(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ CREATE_stream_dateop; stream_dateop->add(stream_dateop, dateop36.tree, NULL); -+ FOLLOWPUSH(FOLLOW_dateref_in_datespec364); -+ dateref37=dateref(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatespecEx; -+ } -+ -+ CREATE_stream_dateref; stream_dateref->add(stream_dateref, dateref37.tree, NULL); -+ -+ -+ /* AST REWRITE -+ * elements : dateop, INT, dateintval, dateref -+ * token labels : -+ * rule labels : retval -+ * token list labels : -+ * rule list labels : -+ */ -+ { -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_retval; -+ -+ stream_retval=antlr3RewriteRuleSubtreeStreamNewAEE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token retval", retval.tree != NULL ? retval.tree : NULL); -+ -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ retval.tree = root_0; -+ // 71:34: -> ^( dateop dateref INT dateintval ) -+ { -+ // RSP.g:71:37: ^( dateop dateref INT dateintval ) -+ { -+ pANTLR3_BASE_TREE root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ root_1 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, stream_dateop == NULL ? NULL : stream_dateop->nextNode(stream_dateop), root_1)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_1, stream_dateref == NULL ? NULL : stream_dateref->nextTree(stream_dateref)); -+ ADAPTOR->addChild(ADAPTOR, root_1, stream_INT == NULL ? NULL : stream_INT->nextNode(stream_INT)); -+ ADAPTOR->addChild(ADAPTOR, root_1, stream_dateintval == NULL ? NULL : stream_dateintval->nextTree(stream_dateintval)); -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, root_1); -+ } -+ -+ } -+ -+ retval.tree = root_0; // set result root -+ if (stream_retval != NULL) stream_retval->free(stream_retval); -+ -+ -+ } -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledatespecEx; /* Prevent compiler warnings */ -+ ruledatespecEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ if (stream_INT != NULL) stream_INT->free(stream_INT); -+ if (stream_dateintval != NULL) stream_dateintval->free(stream_dateintval); -+ if (stream_dateref != NULL) stream_dateref->free(stream_dateref); -+ if (stream_dateop != NULL) stream_dateop->free(stream_dateop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end datespec */ -+ -+/** -+ * $ANTLR start dateref -+ * RSP.g:74:1: dateref : (date= DATE | today= TODAY ); -+ */ -+static RSPParser_dateref_return -+dateref(pRSPParser ctx) -+{ -+ RSPParser_dateref_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN date; -+ pANTLR3_COMMON_TOKEN today; -+ -+ pANTLR3_BASE_TREE date_tree; -+ pANTLR3_BASE_TREE today_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ date = NULL; -+ today = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ date_tree = NULL; -+ today_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ { -+ // RSP.g:74:9: (date= DATE | today= TODAY ) -+ -+ ANTLR3_UINT32 alt11; -+ -+ alt11=2; -+ -+ switch ( LA(1) ) -+ { -+ case DATE: -+ { -+ alt11=1; -+ } -+ break; -+ case TODAY: -+ { -+ alt11=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 11; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruledaterefEx; -+ } -+ -+ switch (alt11) -+ { -+ case 1: -+ // RSP.g:74:11: date= DATE -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ date = (pANTLR3_COMMON_TOKEN) MATCHT(DATE, &FOLLOW_DATE_in_dateref388); -+ if (HASEXCEPTION()) -+ { -+ goto ruledaterefEx; -+ } -+ -+ date_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, date)); -+ ADAPTOR->addChild(ADAPTOR, root_0, date_tree); -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:75:4: today= TODAY -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ today = (pANTLR3_COMMON_TOKEN) MATCHT(TODAY, &FOLLOW_TODAY_in_dateref395); -+ if (HASEXCEPTION()) -+ { -+ goto ruledaterefEx; -+ } -+ -+ today_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, today)); -+ ADAPTOR->addChild(ADAPTOR, root_0, today_tree); -+ -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledaterefEx; /* Prevent compiler warnings */ -+ ruledaterefEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end dateref */ -+ -+/** -+ * $ANTLR start dateintval -+ * RSP.g:78:1: dateintval : (day= DAY | week= WEEK | month= MONTH | year= YEAR ); -+ */ -+static RSPParser_dateintval_return -+dateintval(pRSPParser ctx) -+{ -+ RSPParser_dateintval_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN day; -+ pANTLR3_COMMON_TOKEN week; -+ pANTLR3_COMMON_TOKEN month; -+ pANTLR3_COMMON_TOKEN year; -+ -+ pANTLR3_BASE_TREE day_tree; -+ pANTLR3_BASE_TREE week_tree; -+ pANTLR3_BASE_TREE month_tree; -+ pANTLR3_BASE_TREE year_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ day = NULL; -+ week = NULL; -+ month = NULL; -+ year = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ day_tree = NULL; -+ week_tree = NULL; -+ month_tree = NULL; -+ year_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ { -+ // RSP.g:79:2: (day= DAY | week= WEEK | month= MONTH | year= YEAR ) -+ -+ ANTLR3_UINT32 alt12; -+ -+ alt12=4; -+ -+ switch ( LA(1) ) -+ { -+ case DAY: -+ { -+ alt12=1; -+ } -+ break; -+ case WEEK: -+ { -+ alt12=2; -+ } -+ break; -+ case MONTH: -+ { -+ alt12=3; -+ } -+ break; -+ case YEAR: -+ { -+ alt12=4; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 12; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruledateintvalEx; -+ } -+ -+ switch (alt12) -+ { -+ case 1: -+ // RSP.g:79:4: day= DAY -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ day = (pANTLR3_COMMON_TOKEN) MATCHT(DAY, &FOLLOW_DAY_in_dateintval408); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateintvalEx; -+ } -+ -+ day_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, day)); -+ ADAPTOR->addChild(ADAPTOR, root_0, day_tree); -+ -+ -+ } -+ break; -+ case 2: -+ // RSP.g:80:4: week= WEEK -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ week = (pANTLR3_COMMON_TOKEN) MATCHT(WEEK, &FOLLOW_WEEK_in_dateintval415); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateintvalEx; -+ } -+ -+ week_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, week)); -+ ADAPTOR->addChild(ADAPTOR, root_0, week_tree); -+ -+ -+ } -+ break; -+ case 3: -+ // RSP.g:81:4: month= MONTH -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ month = (pANTLR3_COMMON_TOKEN) MATCHT(MONTH, &FOLLOW_MONTH_in_dateintval422); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateintvalEx; -+ } -+ -+ month_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, month)); -+ ADAPTOR->addChild(ADAPTOR, root_0, month_tree); -+ -+ -+ } -+ break; -+ case 4: -+ // RSP.g:82:4: year= YEAR -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ year = (pANTLR3_COMMON_TOKEN) MATCHT(YEAR, &FOLLOW_YEAR_in_dateintval429); -+ if (HASEXCEPTION()) -+ { -+ goto ruledateintvalEx; -+ } -+ -+ year_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, year)); -+ ADAPTOR->addChild(ADAPTOR, root_0, year_tree); -+ -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledateintvalEx; /* Prevent compiler warnings */ -+ ruledateintvalEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end dateintval */ -+/* End of parsing rules -+ * ============================================== -+ */ -+ -+/* ============================================== -+ * Syntactic predicates -+ */ -+/* End of syntactic predicates -+ * ============================================== -+ */ -+ -+ -+ -+ -+ -+ -+/* End of code -+ * ============================================================================= -+ */ -diff --git a/src/pregen/RSPParser.h b/src/pregen/RSPParser.h -new file mode 100644 -index 0000000..1796c0a ---- /dev/null -+++ b/src/pregen/RSPParser.h -@@ -0,0 +1,365 @@ -+/** \file -+ * This C header file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : RSP.g -+ * - On : 2016-01-01 12:23:42 -+ * - for the parser : RSPParserParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+ * The parser RSPParser has the callable functions (rules) shown below, -+ * which will invoke the code for the associated rule in the source grammar -+ * assuming that the input stream is pointing to a token/text stream that could begin -+ * this rule. -+ * -+ * For instance if you call the first (topmost) rule in a parser grammar, you will -+ * get the results of a full parse, but calling a rule half way through the grammar will -+ * allow you to pass part of a full token stream to the parser, such as for syntax checking -+ * in editors and so on. -+ * -+ * The parser entry points are called indirectly (by function pointer to function) via -+ * a parser context typedef pRSPParser, which is returned from a call to RSPParserNew(). -+ * -+ * The methods in pRSPParser are as follows: -+ * -+ * - RSPParser_query_return pRSPParser->query(pRSPParser) -+ * - RSPParser_expr_return pRSPParser->expr(pRSPParser) -+ * - RSPParser_aexpr_return pRSPParser->aexpr(pRSPParser) -+ * - RSPParser_crit_return pRSPParser->crit(pRSPParser) -+ * - RSPParser_strcrit_return pRSPParser->strcrit(pRSPParser) -+ * - RSPParser_strop_return pRSPParser->strop(pRSPParser) -+ * - RSPParser_intcrit_return pRSPParser->intcrit(pRSPParser) -+ * - RSPParser_intop_return pRSPParser->intop(pRSPParser) -+ * - RSPParser_datecrit_return pRSPParser->datecrit(pRSPParser) -+ * - RSPParser_dateop_return pRSPParser->dateop(pRSPParser) -+ * - RSPParser_datespec_return pRSPParser->datespec(pRSPParser) -+ * - RSPParser_dateref_return pRSPParser->dateref(pRSPParser) -+ * - RSPParser_dateintval_return pRSPParser->dateintval(pRSPParser) -+ * -+ * The return type for any particular rule is of course determined by the source -+ * grammar file. -+ */ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+#ifndef _RSPParser_H -+#define _RSPParser_H -+/* ============================================================================= -+ * Standard antlr3 C runtime definitions -+ */ -+#include -+ -+/* End of standard antlr 3 runtime definitions -+ * ============================================================================= -+ */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+// Forward declare the context typedef so that we can use it before it is -+// properly defined. Delegators and delegates (from import statements) are -+// interdependent and their context structures contain pointers to each other -+// C only allows such things to be declared if you pre-declare the typedef. -+// -+typedef struct RSPParser_Ctx_struct RSPParser, * pRSPParser; -+ -+ -+ -+#ifdef ANTLR3_WINDOWS -+// Disable: Unreferenced parameter, - Rules with parameters that are not used -+// constant conditional, - ANTLR realizes that a prediction is always true (synpred usually) -+// initialized but unused variable - tree rewrite variables declared but not needed -+// Unreferenced local variable - lexer rule declares but does not always use _type -+// potentially unitialized variable used - retval always returned from a rule -+// unreferenced local function has been removed - susually getTokenNames or freeScope, they can go without warnigns -+// -+// These are only really displayed at warning level /W4 but that is the code ideal I am aiming at -+// and the codegen must generate some of these warnings by necessity, apart from 4100, which is -+// usually generated when a parser rule is given a parameter that it does not use. Mostly though -+// this is a matter of orthogonality hence I disable that one. -+// -+#pragma warning( disable : 4100 ) -+#pragma warning( disable : 4101 ) -+#pragma warning( disable : 4127 ) -+#pragma warning( disable : 4189 ) -+#pragma warning( disable : 4505 ) -+#pragma warning( disable : 4701 ) -+#endif -+typedef struct RSPParser_query_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_query_return; -+ -+typedef struct RSPParser_expr_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_expr_return; -+ -+typedef struct RSPParser_aexpr_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_aexpr_return; -+ -+typedef struct RSPParser_crit_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_crit_return; -+ -+typedef struct RSPParser_strcrit_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_strcrit_return; -+ -+typedef struct RSPParser_strop_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_strop_return; -+ -+typedef struct RSPParser_intcrit_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_intcrit_return; -+ -+typedef struct RSPParser_intop_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_intop_return; -+ -+typedef struct RSPParser_datecrit_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_datecrit_return; -+ -+typedef struct RSPParser_dateop_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_dateop_return; -+ -+typedef struct RSPParser_datespec_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_datespec_return; -+ -+typedef struct RSPParser_dateref_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_dateref_return; -+ -+typedef struct RSPParser_dateintval_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ RSPParser_dateintval_return; -+ -+ -+ -+/** Context tracking structure for RSPParser -+ */ -+struct RSPParser_Ctx_struct -+{ -+ /** Built in ANTLR3 context tracker contains all the generic elements -+ * required for context tracking. -+ */ -+ pANTLR3_PARSER pParser; -+ -+ -+ RSPParser_query_return (*query) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_expr_return (*expr) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_aexpr_return (*aexpr) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_crit_return (*crit) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_strcrit_return (*strcrit) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_strop_return (*strop) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_intcrit_return (*intcrit) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_intop_return (*intop) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_datecrit_return (*datecrit) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_dateop_return (*dateop) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_datespec_return (*datespec) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_dateref_return (*dateref) (struct RSPParser_Ctx_struct * ctx); -+ RSPParser_dateintval_return (*dateintval) (struct RSPParser_Ctx_struct * ctx); -+ // Delegated rules -+ const char * (*getGrammarFileName)(); -+ void (*free) (struct RSPParser_Ctx_struct * ctx); -+ /* @headerFile.members() */ -+ pANTLR3_BASE_TREE_ADAPTOR adaptor; -+ pANTLR3_VECTOR_FACTORY vectors; -+ /* End @headerFile.members() */ -+}; -+ -+// Function protoypes for the constructor functions that external translation units -+// such as delegators and delegates may wish to call. -+// -+ANTLR3_API pRSPParser RSPParserNew (pANTLR3_COMMON_TOKEN_STREAM instream); -+ANTLR3_API pRSPParser RSPParserNewSSD (pANTLR3_COMMON_TOKEN_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state); -+ -+/** Symbolic definitions of all the tokens that the parser will work with. -+ * \{ -+ * -+ * Antlr will define EOF, but we can't use that as it it is too common in -+ * in C header files and that would be confusing. There is no way to filter this out at the moment -+ * so we just undef it here for now. That isn't the value we get back from C recognizers -+ * anyway. We are looking for ANTLR3_TOKEN_EOF. -+ */ -+#ifdef EOF -+#undef EOF -+#endif -+#ifdef Tokens -+#undef Tokens -+#endif -+#define STARTSW 14 -+#define WEEK 26 -+#define TODAY 24 -+#define YEAR 28 -+#define ENDSW 15 -+#define GTE 20 -+#define BEFORE 21 -+#define DAY 25 -+#define INT 16 -+#define NOT 11 -+#define AFTER 22 -+#define AND 6 -+#define EOF -1 -+#define LTE 19 -+#define MONTH 27 -+#define DIGIT19 31 -+#define INCLUDES 13 -+#define STR 10 -+#define QUOTE 29 -+#define WS 30 -+#define GREATER 18 -+#define NEWLINE 4 -+#define LPAR 7 -+#define EQUAL 12 -+#define OR 5 -+#define LESS 17 -+#define RPAR 8 -+#define FIELD 9 -+#define ESCAPED 33 -+#define DATE 23 -+#define DIGIT09 32 -+#ifdef EOF -+#undef EOF -+#define EOF ANTLR3_TOKEN_EOF -+#endif -+ -+#ifndef TOKENSOURCE -+#define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource -+#endif -+ -+/* End of token definitions for RSPParser -+ * ============================================================================= -+ */ -+/** \} */ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -+ -+/* END - Note:Keep extra line feed to satisfy UNIX systems */ -diff --git a/src/pregen/SMARTPL.u b/src/pregen/SMARTPL.u -new file mode 100644 -index 0000000..2a66bf3 ---- /dev/null -+++ b/src/pregen/SMARTPL.u -@@ -0,0 +1,6 @@ -+SMARTPLParser.c : SMARTPL.g -+./SMARTPL.tokens : SMARTPL.g -+SMARTPLParser.h : SMARTPL.g -+SMARTPLLexer.c : SMARTPL.g -+SMARTPLLexer.h : SMARTPL.g -+ANTLR_PRODUCTS += SMARTPLParser.c ./SMARTPL.tokens SMARTPLParser.h SMARTPLLexer.c SMARTPLLexer.h -\ No newline at end of file -diff --git a/src/pregen/SMARTPL2SQL.c b/src/pregen/SMARTPL2SQL.c -new file mode 100644 -index 0000000..bd93752 ---- /dev/null -+++ b/src/pregen/SMARTPL2SQL.c -@@ -0,0 +1,1649 @@ -+/** \file -+ * This C source file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : SMARTPL2SQL.g -+ * - On : 2016-01-01 12:23:44 -+ * - for the tree parser : SMARTPL2SQLTreeParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+*/ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+ -+/* ============================================================================= -+ * This is what the grammar programmer asked us to put at the top of every file. -+ */ -+ -+ #include -+ #include -+ #include -+ #include -+ #include -+ #include -+ #include -+ -+ #include "logger.h" -+ #include "db.h" -+ -+/* End of Header action. -+ * ============================================================================= -+ */ -+/* ----------------------------------------- -+ * Include the ANTLR3 generated header file. -+ */ -+#include "SMARTPL2SQL.h" -+/* ----------------------------------------- */ -+ -+ -+ -+ -+ -+/* MACROS that hide the C interface implementations from the -+ * generated code, which makes it a little more understandable to the human eye. -+ * I am very much against using C pre-processor macros for function calls and bits -+ * of code as you cannot see what is happening when single stepping in debuggers -+ * and so on. The exception (in my book at least) is for generated code, where you are -+ * not maintaining it, but may wish to read and understand it. If you single step it, you know that input() -+ * hides some indirect calls, but is always referring to the input stream. This is -+ * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig -+ * the runtime interfaces without changing the generated code too often, without -+ * confusing the reader of the generated output, who may not wish to know the gory -+ * details of the interface inheritance. -+ */ -+ -+#define CTX ctx -+ -+/* Aids in accessing scopes for grammar programmers -+ */ -+#undef SCOPE_TYPE -+#undef SCOPE_STACK -+#undef SCOPE_TOP -+#define SCOPE_TYPE(scope) pSMARTPL2SQL_##scope##_SCOPE -+#define SCOPE_STACK(scope) pSMARTPL2SQL_##scope##Stack -+#define SCOPE_TOP(scope) ctx->pSMARTPL2SQL_##scope##Top -+#define SCOPE_SIZE(scope) ctx->pSMARTPL2SQL_##scope##Stack_limit -+#define SCOPE_INSTANCE(scope, i) (ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i)) -+ -+/* Macros for accessing things in the parser -+ */ -+ -+#undef PARSER -+#undef RECOGNIZER -+#undef HAVEPARSEDRULE -+#undef INPUT -+#undef STRSTREAM -+#undef HASEXCEPTION -+#undef EXCEPTION -+#undef MATCHT -+#undef MATCHANYT -+#undef FOLLOWSTACK -+#undef FOLLOWPUSH -+#undef FOLLOWPOP -+#undef PRECOVER -+#undef PREPORTERROR -+#undef LA -+#undef LT -+#undef CONSTRUCTEX -+#undef CONSUME -+#undef MARK -+#undef REWIND -+#undef REWINDLAST -+#undef PERRORRECOVERY -+#undef HASFAILED -+#undef FAILEDFLAG -+#undef RECOVERFROMMISMATCHEDSET -+#undef RECOVERFROMMISMATCHEDELEMENT -+#undef BACKTRACKING -+#undef ADAPTOR -+#undef RULEMEMO -+#undef SEEK -+#undef INDEX -+#undef DBG -+ -+#define PARSER ctx->pTreeParser -+#define RECOGNIZER PARSER->rec -+#define PSRSTATE RECOGNIZER->state -+#define HAVEPARSEDRULE(r) RECOGNIZER->alreadyParsedRule(RECOGNIZER, r) -+#define INPUT PARSER->ctnstream -+#define ISTREAM INPUT->tnstream->istream -+#define STRSTREAM INPUT->tnstream -+#define HASEXCEPTION() (PSRSTATE->error == ANTLR3_TRUE) -+#define EXCEPTION PSRSTATE->exception -+#define MATCHT(t, fs) RECOGNIZER->match(RECOGNIZER, t, fs) -+#define MATCHANYT() RECOGNIZER->matchAny(RECOGNIZER) -+#define FOLLOWSTACK PSRSTATE->following -+#define FOLLOWPUSH(x) FOLLOWSTACK->push(FOLLOWSTACK, ((void *)(&(x))), NULL) -+#define FOLLOWPOP() FOLLOWSTACK->pop(FOLLOWSTACK) -+#define PRECOVER() RECOGNIZER->recover(RECOGNIZER) -+#define PREPORTERROR() RECOGNIZER->reportError(RECOGNIZER) -+#define LA(n) ISTREAM->_LA(ISTREAM, n) -+#define LT(n) INPUT->tnstream->_LT(INPUT->tnstream, n) -+#define CONSTRUCTEX() RECOGNIZER->exConstruct(RECOGNIZER) -+#define CONSUME() ISTREAM->consume(ISTREAM) -+#define MARK() ISTREAM->mark(ISTREAM) -+#define REWIND(m) ISTREAM->rewind(ISTREAM, m) -+#define REWINDLAST() ISTREAM->rewindLast(ISTREAM) -+#define PERRORRECOVERY PSRSTATE->errorRecovery -+#define FAILEDFLAG PSRSTATE->failed -+#define HASFAILED() (FAILEDFLAG == ANTLR3_TRUE) -+#define BACKTRACKING PSRSTATE->backtracking -+#define RECOVERFROMMISMATCHEDSET(s) RECOGNIZER->recoverFromMismatchedSet(RECOGNIZER, s) -+#define RECOVERFROMMISMATCHEDELEMENT(e) RECOGNIZER->recoverFromMismatchedElement(RECOGNIZER, s) -+#define ADAPTOR INPUT->adaptor -+#define RULEMEMO PSRSTATE->ruleMemo -+#define SEEK(n) ISTREAM->seek(ISTREAM, n) -+#define INDEX() ISTREAM->index(ISTREAM) -+#define DBG RECOGNIZER->debugger -+ -+ -+#define TOKTEXT(tok, txt) tok, (pANTLR3_UINT8)txt -+ -+/* The 4 tokens defined below may well clash with your own #defines or token types. If so -+ * then for the present you must use different names for your defines as these are hard coded -+ * in the code generator. It would be better not to use such names internally, and maybe -+ * we can change this in a forthcoming release. I deliberately do not #undef these -+ * here as this will at least give you a redefined error somewhere if they clash. -+ */ -+#define UP ANTLR3_TOKEN_UP -+#define DOWN ANTLR3_TOKEN_DOWN -+#define EOR ANTLR3_TOKEN_EOR -+#define INVALID ANTLR3_TOKEN_INVALID -+ -+ -+/* ============================================================================= -+ * Functions to create and destroy scopes. First come the rule scopes, followed -+ * by the global declared scopes. -+ */ -+ -+ -+ -+/* ============================================================================= */ -+ -+/* ============================================================================= -+ * Start of recognizer -+ */ -+ -+ -+ -+/** \brief Table of all token names in symbolic order, mainly used for -+ * error reporting. -+ */ -+pANTLR3_UINT8 SMARTPL2SQLTokenNames[28+4] -+ = { -+ (pANTLR3_UINT8) "", /* String to print to indicate an invalid token */ -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "STR", -+ (pANTLR3_UINT8) "OR", -+ (pANTLR3_UINT8) "AND", -+ (pANTLR3_UINT8) "NOT", -+ (pANTLR3_UINT8) "LPAR", -+ (pANTLR3_UINT8) "RPAR", -+ (pANTLR3_UINT8) "STRTAG", -+ (pANTLR3_UINT8) "INCLUDES", -+ (pANTLR3_UINT8) "IS", -+ (pANTLR3_UINT8) "INTTAG", -+ (pANTLR3_UINT8) "INTBOOL", -+ (pANTLR3_UINT8) "INT", -+ (pANTLR3_UINT8) "DATETAG", -+ (pANTLR3_UINT8) "AFTER", -+ (pANTLR3_UINT8) "BEFORE", -+ (pANTLR3_UINT8) "ENUMTAG", -+ (pANTLR3_UINT8) "ENUMVAL", -+ (pANTLR3_UINT8) "DATE", -+ (pANTLR3_UINT8) "AGO", -+ (pANTLR3_UINT8) "DATINTERVAL", -+ (pANTLR3_UINT8) "GREATER", -+ (pANTLR3_UINT8) "GREATEREQUAL", -+ (pANTLR3_UINT8) "LESS", -+ (pANTLR3_UINT8) "LESSEQUAL", -+ (pANTLR3_UINT8) "EQUAL", -+ (pANTLR3_UINT8) "WHITESPACE", -+ (pANTLR3_UINT8) "'{'", -+ (pANTLR3_UINT8) "'}'" -+ }; -+ -+ -+ -+// Forward declare the locally static matching functions we have generated. -+// -+static SMARTPL2SQL_playlist_return playlist (pSMARTPL2SQL ctx); -+static pANTLR3_STRING expression (pSMARTPL2SQL ctx); -+static int dateval (pSMARTPL2SQL ctx); -+static int interval (pSMARTPL2SQL ctx); -+static void SMARTPL2SQLFree(pSMARTPL2SQL ctx); -+/* For use in tree output where we are accumulating rule labels via label += ruleRef -+ * we need a function that knows how to free a return scope when the list is destroyed. -+ * We cannot just use ANTLR3_FREE because in debug tracking mode, this is a macro. -+ */ -+static void ANTLR3_CDECL freeScope(void * scope) -+{ -+ ANTLR3_FREE(scope); -+} -+ -+/** \brief Name of the grammar file that generated this code -+ */ -+static const char fileName[] = "SMARTPL2SQL.g"; -+ -+/** \brief Return the name of the grammar file that generated this code. -+ */ -+static const char * getGrammarFileName() -+{ -+ return fileName; -+} -+/** \brief Create a new SMARTPL2SQL parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pSMARTPL2SQL -+SMARTPL2SQLNew (pANTLR3_COMMON_TREE_NODE_STREAM instream) -+{ -+ // See if we can create a new parser with the standard constructor -+ // -+ return SMARTPL2SQLNewSSD(instream, NULL); -+} -+ -+/** \brief Create a new SMARTPL2SQL parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pSMARTPL2SQL -+SMARTPL2SQLNewSSD (pANTLR3_COMMON_TREE_NODE_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state) -+{ -+ pSMARTPL2SQL ctx; /* Context structure we will build and return */ -+ -+ ctx = (pSMARTPL2SQL) ANTLR3_CALLOC(1, sizeof(SMARTPL2SQL)); -+ -+ if (ctx == NULL) -+ { -+ // Failed to allocate memory for parser context -+ // -+ return NULL; -+ } -+ -+ /* ------------------------------------------------------------------- -+ * Memory for basic structure is allocated, now to fill in -+ * the base ANTLR3 structures. We initialize the function pointers -+ * for the standard ANTLR3 parser function set, but upon return -+ * from here, the programmer may set the pointers to provide custom -+ * implementations of each function. -+ * -+ * We don't use the macros defined in SMARTPL2SQL.h here, in order that you can get a sense -+ * of what goes where. -+ */ -+ -+ /* Create a base Tree parser/recognizer, using the supplied tree node stream -+ */ -+ ctx->pTreeParser = antlr3TreeParserNewStream(ANTLR3_SIZE_HINT, instream, state); -+ /* Install the implementation of our SMARTPL2SQL interface -+ */ -+ ctx->playlist = playlist; -+ ctx->expression = expression; -+ ctx->dateval = dateval; -+ ctx->interval = interval; -+ ctx->free = SMARTPL2SQLFree; -+ ctx->getGrammarFileName = getGrammarFileName; -+ -+ /* Install the scope pushing methods. -+ */ -+ -+ -+ -+ -+ -+ /* Install the token table -+ */ -+ PSRSTATE->tokenNames = SMARTPL2SQLTokenNames; -+ -+ -+ /* Return the newly built parser to the caller -+ */ -+ return ctx; -+} -+ -+/** Free the parser resources -+ */ -+ static void -+ SMARTPL2SQLFree(pSMARTPL2SQL ctx) -+ { -+ /* Free any scope memory -+ */ -+ -+ -+ // Free this parser -+ // -+ ctx->pTreeParser->free(ctx->pTreeParser); -+ ANTLR3_FREE(ctx); -+ -+ /* Everything is released, so we can return -+ */ -+ return; -+ } -+ -+/** Return token names used by this tree parser -+ * -+ * The returned pointer is used as an index into the token names table (using the token -+ * number as the index). -+ * -+ * \return Pointer to first char * in the table. -+ */ -+static pANTLR3_UINT8 *getTokenNames() -+{ -+ return SMARTPL2SQLTokenNames; -+} -+ -+ -+ -+ -+/* Declare the bitsets -+ */ -+ -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STR_in_playlist66 */ -+static ANTLR3_BITWORD FOLLOW_STR_in_playlist66_bits[] = { ANTLR3_UINT64_LIT(0x0000000040000000) }; -+static ANTLR3_BITSET_LIST FOLLOW_STR_in_playlist66 = { FOLLOW_STR_in_playlist66_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_30_in_playlist68 */ -+static ANTLR3_BITWORD FOLLOW_30_in_playlist68_bits[] = { ANTLR3_UINT64_LIT(0x00000000000924E0) }; -+static ANTLR3_BITSET_LIST FOLLOW_30_in_playlist68 = { FOLLOW_30_in_playlist68_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expression_in_playlist74 */ -+static ANTLR3_BITWORD FOLLOW_expression_in_playlist74_bits[] = { ANTLR3_UINT64_LIT(0x0000000080000000) }; -+static ANTLR3_BITSET_LIST FOLLOW_expression_in_playlist74 = { FOLLOW_expression_in_playlist74_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_31_in_playlist76 */ -+static ANTLR3_BITWORD FOLLOW_31_in_playlist76_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_31_in_playlist76 = { FOLLOW_31_in_playlist76_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_NOT_in_expression101 */ -+static ANTLR3_BITWORD FOLLOW_NOT_in_expression101_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_NOT_in_expression101 = { FOLLOW_NOT_in_expression101_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expression_in_expression107 */ -+static ANTLR3_BITWORD FOLLOW_expression_in_expression107_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_expression_in_expression107 = { FOLLOW_expression_in_expression107_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_AND_in_expression118 */ -+static ANTLR3_BITWORD FOLLOW_AND_in_expression118_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_AND_in_expression118 = { FOLLOW_AND_in_expression118_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expression_in_expression124 */ -+static ANTLR3_BITWORD FOLLOW_expression_in_expression124_bits[] = { ANTLR3_UINT64_LIT(0x00000000000924E0) }; -+static ANTLR3_BITSET_LIST FOLLOW_expression_in_expression124 = { FOLLOW_expression_in_expression124_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expression_in_expression130 */ -+static ANTLR3_BITWORD FOLLOW_expression_in_expression130_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_expression_in_expression130 = { FOLLOW_expression_in_expression130_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_OR_in_expression141 */ -+static ANTLR3_BITWORD FOLLOW_OR_in_expression141_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000004) }; -+static ANTLR3_BITSET_LIST FOLLOW_OR_in_expression141 = { FOLLOW_OR_in_expression141_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expression_in_expression147 */ -+static ANTLR3_BITWORD FOLLOW_expression_in_expression147_bits[] = { ANTLR3_UINT64_LIT(0x00000000000924E0) }; -+static ANTLR3_BITSET_LIST FOLLOW_expression_in_expression147 = { FOLLOW_expression_in_expression147_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expression_in_expression153 */ -+static ANTLR3_BITWORD FOLLOW_expression_in_expression153_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000008) }; -+static ANTLR3_BITSET_LIST FOLLOW_expression_in_expression153 = { FOLLOW_expression_in_expression153_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STRTAG_in_expression163 */ -+static ANTLR3_BITWORD FOLLOW_STRTAG_in_expression163_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000800) }; -+static ANTLR3_BITSET_LIST FOLLOW_STRTAG_in_expression163 = { FOLLOW_STRTAG_in_expression163_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INCLUDES_in_expression165 */ -+static ANTLR3_BITWORD FOLLOW_INCLUDES_in_expression165_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; -+static ANTLR3_BITSET_LIST FOLLOW_INCLUDES_in_expression165 = { FOLLOW_INCLUDES_in_expression165_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STR_in_expression167 */ -+static ANTLR3_BITWORD FOLLOW_STR_in_expression167_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_STR_in_expression167 = { FOLLOW_STR_in_expression167_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STRTAG_in_expression176 */ -+static ANTLR3_BITWORD FOLLOW_STRTAG_in_expression176_bits[] = { ANTLR3_UINT64_LIT(0x0000000000001000) }; -+static ANTLR3_BITSET_LIST FOLLOW_STRTAG_in_expression176 = { FOLLOW_STRTAG_in_expression176_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_IS_in_expression178 */ -+static ANTLR3_BITWORD FOLLOW_IS_in_expression178_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; -+static ANTLR3_BITSET_LIST FOLLOW_IS_in_expression178 = { FOLLOW_IS_in_expression178_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STR_in_expression180 */ -+static ANTLR3_BITWORD FOLLOW_STR_in_expression180_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_STR_in_expression180 = { FOLLOW_STR_in_expression180_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTTAG_in_expression189 */ -+static ANTLR3_BITWORD FOLLOW_INTTAG_in_expression189_bits[] = { ANTLR3_UINT64_LIT(0x0000000000004000) }; -+static ANTLR3_BITSET_LIST FOLLOW_INTTAG_in_expression189 = { FOLLOW_INTTAG_in_expression189_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTBOOL_in_expression191 */ -+static ANTLR3_BITWORD FOLLOW_INTBOOL_in_expression191_bits[] = { ANTLR3_UINT64_LIT(0x0000000000008000) }; -+static ANTLR3_BITSET_LIST FOLLOW_INTBOOL_in_expression191 = { FOLLOW_INTBOOL_in_expression191_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INT_in_expression193 */ -+static ANTLR3_BITWORD FOLLOW_INT_in_expression193_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_INT_in_expression193 = { FOLLOW_INT_in_expression193_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATETAG_in_expression202 */ -+static ANTLR3_BITWORD FOLLOW_DATETAG_in_expression202_bits[] = { ANTLR3_UINT64_LIT(0x0000000000020000) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATETAG_in_expression202 = { FOLLOW_DATETAG_in_expression202_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_AFTER_in_expression204 */ -+static ANTLR3_BITWORD FOLLOW_AFTER_in_expression204_bits[] = { ANTLR3_UINT64_LIT(0x0000000000208000) }; -+static ANTLR3_BITSET_LIST FOLLOW_AFTER_in_expression204 = { FOLLOW_AFTER_in_expression204_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateval_in_expression206 */ -+static ANTLR3_BITWORD FOLLOW_dateval_in_expression206_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateval_in_expression206 = { FOLLOW_dateval_in_expression206_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATETAG_in_expression215 */ -+static ANTLR3_BITWORD FOLLOW_DATETAG_in_expression215_bits[] = { ANTLR3_UINT64_LIT(0x0000000000040000) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATETAG_in_expression215 = { FOLLOW_DATETAG_in_expression215_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_BEFORE_in_expression217 */ -+static ANTLR3_BITWORD FOLLOW_BEFORE_in_expression217_bits[] = { ANTLR3_UINT64_LIT(0x0000000000208000) }; -+static ANTLR3_BITSET_LIST FOLLOW_BEFORE_in_expression217 = { FOLLOW_BEFORE_in_expression217_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateval_in_expression219 */ -+static ANTLR3_BITWORD FOLLOW_dateval_in_expression219_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateval_in_expression219 = { FOLLOW_dateval_in_expression219_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_ENUMTAG_in_expression228 */ -+static ANTLR3_BITWORD FOLLOW_ENUMTAG_in_expression228_bits[] = { ANTLR3_UINT64_LIT(0x0000000000001000) }; -+static ANTLR3_BITSET_LIST FOLLOW_ENUMTAG_in_expression228 = { FOLLOW_ENUMTAG_in_expression228_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_IS_in_expression230 */ -+static ANTLR3_BITWORD FOLLOW_IS_in_expression230_bits[] = { ANTLR3_UINT64_LIT(0x0000000000100000) }; -+static ANTLR3_BITSET_LIST FOLLOW_IS_in_expression230 = { FOLLOW_IS_in_expression230_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_ENUMVAL_in_expression232 */ -+static ANTLR3_BITWORD FOLLOW_ENUMVAL_in_expression232_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_ENUMVAL_in_expression232 = { FOLLOW_ENUMVAL_in_expression232_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATE_in_dateval257 */ -+static ANTLR3_BITWORD FOLLOW_DATE_in_dateval257_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATE_in_dateval257 = { FOLLOW_DATE_in_dateval257_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_interval_in_dateval266 */ -+static ANTLR3_BITWORD FOLLOW_interval_in_dateval266_bits[] = { ANTLR3_UINT64_LIT(0x0000000000040000) }; -+static ANTLR3_BITSET_LIST FOLLOW_interval_in_dateval266 = { FOLLOW_interval_in_dateval266_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_BEFORE_in_dateval268 */ -+static ANTLR3_BITWORD FOLLOW_BEFORE_in_dateval268_bits[] = { ANTLR3_UINT64_LIT(0x0000000000200000) }; -+static ANTLR3_BITSET_LIST FOLLOW_BEFORE_in_dateval268 = { FOLLOW_BEFORE_in_dateval268_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATE_in_dateval270 */ -+static ANTLR3_BITWORD FOLLOW_DATE_in_dateval270_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATE_in_dateval270 = { FOLLOW_DATE_in_dateval270_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_interval_in_dateval279 */ -+static ANTLR3_BITWORD FOLLOW_interval_in_dateval279_bits[] = { ANTLR3_UINT64_LIT(0x0000000000020000) }; -+static ANTLR3_BITSET_LIST FOLLOW_interval_in_dateval279 = { FOLLOW_interval_in_dateval279_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_AFTER_in_dateval281 */ -+static ANTLR3_BITWORD FOLLOW_AFTER_in_dateval281_bits[] = { ANTLR3_UINT64_LIT(0x0000000000200000) }; -+static ANTLR3_BITSET_LIST FOLLOW_AFTER_in_dateval281 = { FOLLOW_AFTER_in_dateval281_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATE_in_dateval283 */ -+static ANTLR3_BITWORD FOLLOW_DATE_in_dateval283_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATE_in_dateval283 = { FOLLOW_DATE_in_dateval283_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_interval_in_dateval292 */ -+static ANTLR3_BITWORD FOLLOW_interval_in_dateval292_bits[] = { ANTLR3_UINT64_LIT(0x0000000000400000) }; -+static ANTLR3_BITSET_LIST FOLLOW_interval_in_dateval292 = { FOLLOW_interval_in_dateval292_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_AGO_in_dateval294 */ -+static ANTLR3_BITWORD FOLLOW_AGO_in_dateval294_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_AGO_in_dateval294 = { FOLLOW_AGO_in_dateval294_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INT_in_interval318 */ -+static ANTLR3_BITWORD FOLLOW_INT_in_interval318_bits[] = { ANTLR3_UINT64_LIT(0x0000000000800000) }; -+static ANTLR3_BITSET_LIST FOLLOW_INT_in_interval318 = { FOLLOW_INT_in_interval318_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATINTERVAL_in_interval320 */ -+static ANTLR3_BITWORD FOLLOW_DATINTERVAL_in_interval320_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATINTERVAL_in_interval320 = { FOLLOW_DATINTERVAL_in_interval320_bits, 1 }; -+ -+ -+ -+ -+/* ============================================== -+ * Parsing rules -+ */ -+/** -+ * $ANTLR start playlist -+ * SMARTPL2SQL.g:43:1: playlist returns [ pANTLR3_STRING title, pANTLR3_STRING query ] : STR '{' e= expression '}' ; -+ */ -+static SMARTPL2SQL_playlist_return -+playlist(pSMARTPL2SQL ctx) -+{ -+ SMARTPL2SQL_playlist_return retval; -+ -+ pANTLR3_BASE_TREE STR1; -+ pANTLR3_STRING e; -+ #undef RETURN_TYPE_e -+ #define RETURN_TYPE_e pANTLR3_STRING -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ retval.title= NULL; retval.query= NULL; -+ STR1 = NULL; -+ e = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ { -+ // SMARTPL2SQL.g:45:2: ( STR '{' e= expression '}' ) -+ // SMARTPL2SQL.g:45:4: STR '{' e= expression '}' -+ { -+ STR1 = (pANTLR3_BASE_TREE) MATCHT(STR, &FOLLOW_STR_in_playlist66); -+ if (HASEXCEPTION()) -+ { -+ goto ruleplaylistEx; -+ } -+ -+ MATCHT(30, &FOLLOW_30_in_playlist68); -+ if (HASEXCEPTION()) -+ { -+ goto ruleplaylistEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expression_in_playlist74); -+ e=expression(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleplaylistEx; -+ } -+ -+ MATCHT(31, &FOLLOW_31_in_playlist76); -+ if (HASEXCEPTION()) -+ { -+ goto ruleplaylistEx; -+ } -+ -+ { -+ -+ pANTLR3_UINT8 val; -+ val = (STR1->getText(STR1))->toUTF8((STR1->getText(STR1)))->chars; -+ val++; -+ val[strlen((const char *)val) - 1] = '\0'; -+ -+ retval.title= (STR1->getText(STR1))->factory->newRaw((STR1->getText(STR1))->factory); -+ retval.title->append8(retval.title, (const char *)val); -+ -+ retval.query= e->factory->newRaw(e->factory); -+ retval.query->append8(retval.query, "("); -+ retval.query->appendS(retval.query, e); -+ retval.query->append8(retval.query, ")"); -+ -+ } -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleplaylistEx; /* Prevent compiler warnings */ -+ ruleplaylistEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end playlist */ -+ -+/** -+ * $ANTLR start expression -+ * SMARTPL2SQL.g:62:1: expression returns [ pANTLR3_STRING result ] : ( ^( NOT a= expression ) | ^( AND a= expression b= expression ) | ^( OR a= expression b= expression ) | STRTAG INCLUDES STR | STRTAG IS STR | INTTAG INTBOOL INT | DATETAG AFTER dateval | DATETAG BEFORE dateval | ENUMTAG IS ENUMVAL ); -+ */ -+static pANTLR3_STRING -+expression(pSMARTPL2SQL ctx) -+{ -+ pANTLR3_STRING result = NULL; -+ -+ pANTLR3_BASE_TREE STR2; -+ pANTLR3_BASE_TREE STRTAG3; -+ pANTLR3_BASE_TREE STR4; -+ pANTLR3_BASE_TREE STRTAG5; -+ pANTLR3_BASE_TREE INTTAG6; -+ pANTLR3_BASE_TREE INTBOOL7; -+ pANTLR3_BASE_TREE INT8; -+ pANTLR3_BASE_TREE DATETAG10; -+ pANTLR3_BASE_TREE DATETAG12; -+ pANTLR3_BASE_TREE ENUMTAG13; -+ pANTLR3_BASE_TREE ENUMVAL14; -+ pANTLR3_STRING a; -+ #undef RETURN_TYPE_a -+ #define RETURN_TYPE_a pANTLR3_STRING -+ -+ pANTLR3_STRING b; -+ #undef RETURN_TYPE_b -+ #define RETURN_TYPE_b pANTLR3_STRING -+ -+ int dateval9; -+ #undef RETURN_TYPE_dateval9 -+ #define RETURN_TYPE_dateval9 int -+ -+ int dateval11; -+ #undef RETURN_TYPE_dateval11 -+ #define RETURN_TYPE_dateval11 int -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ result= NULL; -+ STR2 = NULL; -+ STRTAG3 = NULL; -+ STR4 = NULL; -+ STRTAG5 = NULL; -+ INTTAG6 = NULL; -+ INTBOOL7 = NULL; -+ INT8 = NULL; -+ DATETAG10 = NULL; -+ DATETAG12 = NULL; -+ ENUMTAG13 = NULL; -+ ENUMVAL14 = NULL; -+ a = NULL; -+ b = NULL; -+ dateval9 = 0; -+ dateval11 = 0; -+ -+ { -+ { -+ // SMARTPL2SQL.g:64:2: ( ^( NOT a= expression ) | ^( AND a= expression b= expression ) | ^( OR a= expression b= expression ) | STRTAG INCLUDES STR | STRTAG IS STR | INTTAG INTBOOL INT | DATETAG AFTER dateval | DATETAG BEFORE dateval | ENUMTAG IS ENUMVAL ) -+ -+ ANTLR3_UINT32 alt1; -+ -+ alt1=9; -+ -+ switch ( LA(1) ) -+ { -+ case NOT: -+ { -+ alt1=1; -+ } -+ break; -+ case AND: -+ { -+ alt1=2; -+ } -+ break; -+ case OR: -+ { -+ alt1=3; -+ } -+ break; -+ case STRTAG: -+ { -+ switch ( LA(2) ) -+ { -+ case INCLUDES: -+ { -+ alt1=4; -+ } -+ break; -+ case IS: -+ { -+ alt1=5; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 4; -+ -+ -+ goto ruleexpressionEx; -+ } -+ -+ } -+ break; -+ case INTTAG: -+ { -+ alt1=6; -+ } -+ break; -+ case DATETAG: -+ { -+ switch ( LA(2) ) -+ { -+ case AFTER: -+ { -+ alt1=7; -+ } -+ break; -+ case BEFORE: -+ { -+ alt1=8; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 6; -+ -+ -+ goto ruleexpressionEx; -+ } -+ -+ } -+ break; -+ case ENUMTAG: -+ { -+ alt1=9; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleexpressionEx; -+ } -+ -+ switch (alt1) -+ { -+ case 1: -+ // SMARTPL2SQL.g:64:4: ^( NOT a= expression ) -+ { -+ MATCHT(NOT, &FOLLOW_NOT_in_expression101); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expression_in_expression107); -+ a=expression(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ { -+ -+ result= a->factory->newRaw(a->factory); -+ result->append8(result, "NOT("); -+ result->appendS(result, a); -+ result->append8(result, ")"); -+ -+ } -+ -+ } -+ break; -+ case 2: -+ // SMARTPL2SQL.g:71:4: ^( AND a= expression b= expression ) -+ { -+ MATCHT(AND, &FOLLOW_AND_in_expression118); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expression_in_expression124); -+ a=expression(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expression_in_expression130); -+ b=expression(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ { -+ -+ result= a->factory->newRaw(a->factory); -+ result->append8(result, "("); -+ result->appendS(result, a); -+ result->append8(result, " AND "); -+ result->appendS(result, b); -+ result->append8(result, ")"); -+ -+ } -+ -+ } -+ break; -+ case 3: -+ // SMARTPL2SQL.g:80:4: ^( OR a= expression b= expression ) -+ { -+ MATCHT(OR, &FOLLOW_OR_in_expression141); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_DOWN, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expression_in_expression147); -+ a=expression(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_expression_in_expression153); -+ b=expression(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ -+ MATCHT(ANTLR3_TOKEN_UP, NULL); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ { -+ -+ result= a->factory->newRaw(a->factory); -+ result->append8(result, "("); -+ result->appendS(result, a); -+ result->append8(result, " OR "); -+ result->appendS(result, b); -+ result->append8(result, ")"); -+ -+ } -+ -+ } -+ break; -+ case 4: -+ // SMARTPL2SQL.g:89:4: STRTAG INCLUDES STR -+ { -+ STRTAG3 = (pANTLR3_BASE_TREE) MATCHT(STRTAG, &FOLLOW_STRTAG_in_expression163); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ MATCHT(INCLUDES, &FOLLOW_INCLUDES_in_expression165); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ STR2 = (pANTLR3_BASE_TREE) MATCHT(STR, &FOLLOW_STR_in_expression167); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ { -+ -+ pANTLR3_UINT8 val; -+ val = (STR2->getText(STR2))->toUTF8((STR2->getText(STR2)))->chars; -+ val++; -+ val[strlen((const char *)val) - 1] = '\0'; -+ -+ result= (STR2->getText(STR2))->factory->newRaw((STR2->getText(STR2))->factory); -+ result->append8(result, "f."); -+ result->appendS(result, (STRTAG3->getText(STRTAG3))->toUTF8((STRTAG3->getText(STRTAG3)))); -+ result->append8(result, " LIKE '%"); -+ result->append8(result, sqlite3_mprintf("%q", (const char *)val)); -+ result->append8(result, "%'"); -+ -+ } -+ -+ } -+ break; -+ case 5: -+ // SMARTPL2SQL.g:103:4: STRTAG IS STR -+ { -+ STRTAG5 = (pANTLR3_BASE_TREE) MATCHT(STRTAG, &FOLLOW_STRTAG_in_expression176); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ MATCHT(IS, &FOLLOW_IS_in_expression178); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ STR4 = (pANTLR3_BASE_TREE) MATCHT(STR, &FOLLOW_STR_in_expression180); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ { -+ -+ pANTLR3_UINT8 val; -+ val = (STR4->getText(STR4))->toUTF8((STR4->getText(STR4)))->chars; -+ val++; -+ val[strlen((const char *)val) - 1] = '\0'; -+ -+ result= (STR4->getText(STR4))->factory->newRaw((STR4->getText(STR4))->factory); -+ result->append8(result, "f."); -+ result->appendS(result, (STRTAG5->getText(STRTAG5))->toUTF8((STRTAG5->getText(STRTAG5)))); -+ result->append8(result, " LIKE '"); -+ result->append8(result, sqlite3_mprintf("%q", (const char *)val)); -+ result->append8(result, "'"); -+ -+ } -+ -+ } -+ break; -+ case 6: -+ // SMARTPL2SQL.g:117:4: INTTAG INTBOOL INT -+ { -+ INTTAG6 = (pANTLR3_BASE_TREE) MATCHT(INTTAG, &FOLLOW_INTTAG_in_expression189); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ INTBOOL7 = (pANTLR3_BASE_TREE) MATCHT(INTBOOL, &FOLLOW_INTBOOL_in_expression191); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ INT8 = (pANTLR3_BASE_TREE) MATCHT(INT, &FOLLOW_INT_in_expression193); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ { -+ -+ result= (INTTAG6->getText(INTTAG6))->factory->newRaw((INTTAG6->getText(INTTAG6))->factory); -+ result->append8(result, "f."); -+ result->appendS(result, (INTTAG6->getText(INTTAG6))->toUTF8((INTTAG6->getText(INTTAG6)))); -+ result->append8(result, " "); -+ result->appendS(result, (INTBOOL7->getText(INTBOOL7))->toUTF8((INTBOOL7->getText(INTBOOL7)))); -+ result->append8(result, " "); -+ result->appendS(result, (INT8->getText(INT8))->toUTF8((INT8->getText(INT8)))); -+ -+ } -+ -+ } -+ break; -+ case 7: -+ // SMARTPL2SQL.g:127:4: DATETAG AFTER dateval -+ { -+ DATETAG10 = (pANTLR3_BASE_TREE) MATCHT(DATETAG, &FOLLOW_DATETAG_in_expression202); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ MATCHT(AFTER, &FOLLOW_AFTER_in_expression204); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_dateval_in_expression206); -+ dateval9=dateval(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ { -+ -+ char str[15]; -+ sprintf(str, "%d", dateval9); -+ -+ result= (DATETAG10->getText(DATETAG10))->factory->newRaw((DATETAG10->getText(DATETAG10))->factory); -+ result->append8(result, "f."); -+ result->appendS(result, (DATETAG10->getText(DATETAG10))->toUTF8((DATETAG10->getText(DATETAG10)))); -+ result->append8(result, " > "); -+ result->append8(result, str); -+ -+ } -+ -+ } -+ break; -+ case 8: -+ // SMARTPL2SQL.g:138:4: DATETAG BEFORE dateval -+ { -+ DATETAG12 = (pANTLR3_BASE_TREE) MATCHT(DATETAG, &FOLLOW_DATETAG_in_expression215); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ MATCHT(BEFORE, &FOLLOW_BEFORE_in_expression217); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_dateval_in_expression219); -+ dateval11=dateval(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ { -+ -+ char str[15]; -+ sprintf(str, "%d", dateval11); -+ -+ result= (DATETAG12->getText(DATETAG12))->factory->newRaw((DATETAG12->getText(DATETAG12))->factory); -+ result->append8(result, "f."); -+ result->appendS(result, (DATETAG12->getText(DATETAG12))->toUTF8((DATETAG12->getText(DATETAG12)))); -+ result->append8(result, " > "); -+ result->append8(result, str); -+ -+ } -+ -+ } -+ break; -+ case 9: -+ // SMARTPL2SQL.g:149:4: ENUMTAG IS ENUMVAL -+ { -+ ENUMTAG13 = (pANTLR3_BASE_TREE) MATCHT(ENUMTAG, &FOLLOW_ENUMTAG_in_expression228); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ MATCHT(IS, &FOLLOW_IS_in_expression230); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ ENUMVAL14 = (pANTLR3_BASE_TREE) MATCHT(ENUMVAL, &FOLLOW_ENUMVAL_in_expression232); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ { -+ -+ pANTLR3_UINT8 tag; -+ pANTLR3_UINT8 val; -+ char str[20]; -+ -+ sprintf(str, "1=1"); -+ -+ tag = (ENUMTAG13->getText(ENUMTAG13))->chars; -+ val = (ENUMVAL14->getText(ENUMVAL14))->chars; -+ if (strcmp((char *)tag, "media_kind") == 0) -+ { -+ if (strcmp((char *)val, "music") == 0) -+ { -+ sprintf(str, "f.media_kind = %d", MEDIA_KIND_MUSIC); -+ } -+ else if (strcmp((char *)val, "movie") == 0) -+ { -+ sprintf(str, "f.media_kind = %d", MEDIA_KIND_MOVIE); -+ } -+ else if (strcmp((char *)val, "podcast") == 0) -+ { -+ sprintf(str, "f.media_kind = %d", MEDIA_KIND_PODCAST); -+ } -+ else if (strcmp((char *)val, "audiobook") == 0) -+ { -+ sprintf(str, "f.media_kind = %d", MEDIA_KIND_AUDIOBOOK); -+ } -+ else if (strcmp((char *)val, "tvshow") == 0) -+ { -+ sprintf(str, "f.media_kind = %d", MEDIA_KIND_TVSHOW); -+ } -+ } -+ else if (strcmp((char *)tag, "data_kind") == 0) -+ { -+ if (strcmp((char *)val, "file") == 0) -+ { -+ sprintf(str, "f.data_kind = %d", DATA_KIND_FILE); -+ } -+ else if (strcmp((char *)val, "url") == 0) -+ { -+ sprintf(str, "f.data_kind = %d", DATA_KIND_HTTP); -+ } -+ else if (strcmp((char *)val, "spotify") == 0) -+ { -+ sprintf(str, "f.data_kind = %d", DATA_KIND_SPOTIFY); -+ } -+ else if (strcmp((char *)val, "pipe") == 0) -+ { -+ sprintf(str, "f.data_kind = %d", DATA_KIND_PIPE); -+ } -+ } -+ -+ result= (ENUMTAG13->getText(ENUMTAG13))->factory->newRaw((ENUMTAG13->getText(ENUMTAG13))->factory); -+ result->append8(result, str); -+ -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleexpressionEx; /* Prevent compiler warnings */ -+ ruleexpressionEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return result; -+} -+/* $ANTLR end expression */ -+ -+/** -+ * $ANTLR start dateval -+ * SMARTPL2SQL.g:207:1: dateval returns [ int result ] : ( DATE | interval BEFORE DATE | interval AFTER DATE | interval AGO ); -+ */ -+static int -+dateval(pSMARTPL2SQL ctx) -+{ -+ int result = 0; -+ -+ pANTLR3_BASE_TREE DATE15; -+ pANTLR3_BASE_TREE DATE16; -+ pANTLR3_BASE_TREE DATE18; -+ int interval17; -+ #undef RETURN_TYPE_interval17 -+ #define RETURN_TYPE_interval17 int -+ -+ int interval19; -+ #undef RETURN_TYPE_interval19 -+ #define RETURN_TYPE_interval19 int -+ -+ int interval20; -+ #undef RETURN_TYPE_interval20 -+ #define RETURN_TYPE_interval20 int -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ result= 0; -+ DATE15 = NULL; -+ DATE16 = NULL; -+ DATE18 = NULL; -+ interval17 = 0; -+ interval19 = 0; -+ interval20 = 0; -+ -+ { -+ { -+ // SMARTPL2SQL.g:209:2: ( DATE | interval BEFORE DATE | interval AFTER DATE | interval AGO ) -+ -+ ANTLR3_UINT32 alt2; -+ -+ alt2=4; -+ -+ switch ( LA(1) ) -+ { -+ case DATE: -+ { -+ alt2=1; -+ } -+ break; -+ case INT: -+ { -+ switch ( LA(2) ) -+ { -+ case DATINTERVAL: -+ { -+ switch ( LA(3) ) -+ { -+ case AGO: -+ { -+ alt2=4; -+ } -+ break; -+ case BEFORE: -+ { -+ alt2=2; -+ } -+ break; -+ case AFTER: -+ { -+ alt2=3; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 2; -+ EXCEPTION->state = 3; -+ -+ -+ goto ruledatevalEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 2; -+ EXCEPTION->state = 2; -+ -+ -+ goto ruledatevalEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 2; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruledatevalEx; -+ } -+ -+ switch (alt2) -+ { -+ case 1: -+ // SMARTPL2SQL.g:209:4: DATE -+ { -+ DATE15 = (pANTLR3_BASE_TREE) MATCHT(DATE, &FOLLOW_DATE_in_dateval257); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ { -+ -+ pANTLR3_UINT8 datval; -+ -+ datval = (DATE15->getText(DATE15))->chars; -+ -+ if (strcmp((char *)datval, "today") == 0) -+ { -+ result= time(NULL); -+ } -+ else if (strcmp((char *)datval, "yesterday") == 0) -+ { -+ result= time(NULL) - 24 * 3600; -+ } -+ else if (strcmp((char *)datval, "last week") == 0) -+ { -+ result= time(NULL) - 24 * 3600 * 7; -+ } -+ else if (strcmp((char *)datval, "last month") == 0) -+ { -+ result= time(NULL) - 24 * 3600 * 30; -+ } -+ else if (strcmp((char *)datval, "last year") == 0) -+ { -+ result= time(NULL) - 24 * 3600 * 365; -+ } -+ else -+ { -+ struct tm tm; -+ char year[5]; -+ char month[3]; -+ char day[3]; -+ -+ memset((void*)&tm,0,sizeof(tm)); -+ memset(year, 0, sizeof(year)); -+ memset(month, 0, sizeof(month)); -+ memset(day, 0, sizeof(day)); -+ -+ strncpy(year, (const char *)datval, 4); -+ strncpy(month, (const char *)datval + 5, 2); -+ strncpy(day, (const char *)datval + 8, 2); -+ -+ tm.tm_year = atoi(year) - 1900; -+ tm.tm_mon = atoi(month) - 1; -+ tm.tm_mday = atoi(day); -+ -+ result= mktime(&tm); -+ } -+ -+ } -+ -+ } -+ break; -+ case 2: -+ // SMARTPL2SQL.g:258:4: interval BEFORE DATE -+ { -+ FOLLOWPUSH(FOLLOW_interval_in_dateval266); -+ interval17=interval(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ MATCHT(BEFORE, &FOLLOW_BEFORE_in_dateval268); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ DATE16 = (pANTLR3_BASE_TREE) MATCHT(DATE, &FOLLOW_DATE_in_dateval270); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ { -+ -+ pANTLR3_UINT8 datval; -+ -+ datval = (DATE16->getText(DATE16))->chars; -+ -+ if (strcmp((char *)datval, "yesterday") == 0) -+ { -+ result= time(NULL) - 24 * 3600; -+ } -+ else if (strcmp((char *)datval, "last week") == 0) -+ { -+ result= time(NULL) - 24 * 3600 * 7; -+ } -+ else if (strcmp((char *)datval, "last month") == 0) -+ { -+ result= time(NULL) - 24 * 3600 * 30; -+ } -+ else if (strcmp((char *)datval, "last year") == 0) -+ { -+ result= time(NULL) - 24 * 3600 * 365; -+ } -+ else -+ { -+ result= time(NULL); -+ } -+ -+ result= result - interval17; -+ -+ } -+ -+ } -+ break; -+ case 3: -+ // SMARTPL2SQL.g:287:4: interval AFTER DATE -+ { -+ FOLLOWPUSH(FOLLOW_interval_in_dateval279); -+ interval19=interval(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ MATCHT(AFTER, &FOLLOW_AFTER_in_dateval281); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ DATE18 = (pANTLR3_BASE_TREE) MATCHT(DATE, &FOLLOW_DATE_in_dateval283); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ { -+ -+ pANTLR3_UINT8 datval; -+ -+ datval = (DATE18->getText(DATE18))->chars; -+ -+ if (strcmp((char *)datval, "yesterday") == 0) -+ { -+ result= time(NULL) - 24 * 3600; -+ } -+ else if (strcmp((char *)datval, "last week") == 0) -+ { -+ result= time(NULL) - 24 * 3600 * 7; -+ } -+ else if (strcmp((char *)datval, "last month") == 0) -+ { -+ result= time(NULL) - 24 * 3600 * 30; -+ } -+ else if (strcmp((char *)datval, "last year") == 0) -+ { -+ result= time(NULL) - 24 * 3600 * 365; -+ } -+ else -+ { -+ result= time(NULL); -+ } -+ -+ result= result + interval19; -+ -+ } -+ -+ } -+ break; -+ case 4: -+ // SMARTPL2SQL.g:316:4: interval AGO -+ { -+ FOLLOWPUSH(FOLLOW_interval_in_dateval292); -+ interval20=interval(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ MATCHT(AGO, &FOLLOW_AGO_in_dateval294); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ { -+ -+ result= time(NULL) - interval20; -+ -+ } -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledatevalEx; /* Prevent compiler warnings */ -+ ruledatevalEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return result; -+} -+/* $ANTLR end dateval */ -+ -+/** -+ * $ANTLR start interval -+ * SMARTPL2SQL.g:322:1: interval returns [ int result ] : INT DATINTERVAL ; -+ */ -+static int -+interval(pSMARTPL2SQL ctx) -+{ -+ int result = 0; -+ -+ pANTLR3_BASE_TREE INT21; -+ pANTLR3_BASE_TREE DATINTERVAL22; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ result= 0; -+ INT21 = NULL; -+ DATINTERVAL22 = NULL; -+ -+ { -+ // SMARTPL2SQL.g:324:2: ( INT DATINTERVAL ) -+ // SMARTPL2SQL.g:324:4: INT DATINTERVAL -+ { -+ INT21 = (pANTLR3_BASE_TREE) MATCHT(INT, &FOLLOW_INT_in_interval318); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintervalEx; -+ } -+ -+ DATINTERVAL22 = (pANTLR3_BASE_TREE) MATCHT(DATINTERVAL, &FOLLOW_DATINTERVAL_in_interval320); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintervalEx; -+ } -+ -+ { -+ -+ pANTLR3_UINT8 interval; -+ -+ result= atoi((const char *)(INT21->getText(INT21))->chars); -+ interval = (DATINTERVAL22->getText(DATINTERVAL22))->chars; -+ -+ if (strcmp((char *)interval, "days") == 0) -+ { -+ result= result * 24 * 3600; -+ } -+ else if (strcmp((char *)interval, "weeks") == 0) -+ { -+ result= result * 24 * 3600 * 7; -+ } -+ else if (strcmp((char *)interval, "months") == 0) -+ { -+ result= result * 24 * 3600 * 30; -+ } -+ else if (strcmp((char *)interval, "weeks") == 0) -+ { -+ result= result * 24 * 3600 * 365; -+ } -+ else -+ { -+ result= 0; -+ } -+ -+ } -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleintervalEx; /* Prevent compiler warnings */ -+ ruleintervalEx: ; -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ } -+ -+ -+ return result; -+} -+/* $ANTLR end interval */ -+/* End of parsing rules -+ * ============================================== -+ */ -+ -+/* ============================================== -+ * Syntactic predicates -+ */ -+/* End of syntactic predicates -+ * ============================================== -+ */ -+ -+ -+ -+ -+ -+ -+/* End of code -+ * ============================================================================= -+ */ -diff --git a/src/pregen/SMARTPL2SQL.h b/src/pregen/SMARTPL2SQL.h -new file mode 100644 -index 0000000..8e06de7 ---- /dev/null -+++ b/src/pregen/SMARTPL2SQL.h -@@ -0,0 +1,220 @@ -+/** \file -+ * This C header file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : SMARTPL2SQL.g -+ * - On : 2016-01-01 12:23:44 -+ * - for the tree parser : SMARTPL2SQLTreeParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+ * The tree parser SMARTPL2SQL has the callable functions (rules) shown below, -+ * which will invoke the code for the associated rule in the source grammar -+ * assuming that the input stream is pointing to a token/text stream that could begin -+ * this rule. -+ * -+ * For instance if you call the first (topmost) rule in a parser grammar, you will -+ * get the results of a full parse, but calling a rule half way through the grammar will -+ * allow you to pass part of a full token stream to the parser, such as for syntax checking -+ * in editors and so on. -+ * -+ * The parser entry points are called indirectly (by function pointer to function) via -+ * a parser context typedef pSMARTPL2SQL, which is returned from a call to SMARTPL2SQLNew(). -+ * -+ * The methods in pSMARTPL2SQL are as follows: -+ * -+ * - SMARTPL2SQL_playlist_return pSMARTPL2SQL->playlist(pSMARTPL2SQL) -+ * - pANTLR3_STRING pSMARTPL2SQL->expression(pSMARTPL2SQL) -+ * - int pSMARTPL2SQL->dateval(pSMARTPL2SQL) -+ * - int pSMARTPL2SQL->interval(pSMARTPL2SQL) -+ * -+ * The return type for any particular rule is of course determined by the source -+ * grammar file. -+ */ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+#ifndef _SMARTPL2SQL_H -+#define _SMARTPL2SQL_H -+/* ============================================================================= -+ * Standard antlr3 C runtime definitions -+ */ -+#include -+ -+/* End of standard antlr 3 runtime definitions -+ * ============================================================================= -+ */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+// Forward declare the context typedef so that we can use it before it is -+// properly defined. Delegators and delegates (from import statements) are -+// interdependent and their context structures contain pointers to each other -+// C only allows such things to be declared if you pre-declare the typedef. -+// -+typedef struct SMARTPL2SQL_Ctx_struct SMARTPL2SQL, * pSMARTPL2SQL; -+ -+ -+ -+ #include -+ #include -+ #include -+ #include -+ #include -+ #include -+ #include -+ -+ #include "logger.h" -+ #include "db.h" -+ -+ -+#ifdef ANTLR3_WINDOWS -+// Disable: Unreferenced parameter, - Rules with parameters that are not used -+// constant conditional, - ANTLR realizes that a prediction is always true (synpred usually) -+// initialized but unused variable - tree rewrite variables declared but not needed -+// Unreferenced local variable - lexer rule declares but does not always use _type -+// potentially unitialized variable used - retval always returned from a rule -+// unreferenced local function has been removed - susually getTokenNames or freeScope, they can go without warnigns -+// -+// These are only really displayed at warning level /W4 but that is the code ideal I am aiming at -+// and the codegen must generate some of these warnings by necessity, apart from 4100, which is -+// usually generated when a parser rule is given a parameter that it does not use. Mostly though -+// this is a matter of orthogonality hence I disable that one. -+// -+#pragma warning( disable : 4100 ) -+#pragma warning( disable : 4101 ) -+#pragma warning( disable : 4127 ) -+#pragma warning( disable : 4189 ) -+#pragma warning( disable : 4505 ) -+#pragma warning( disable : 4701 ) -+#endif -+typedef struct SMARTPL2SQL_playlist_return_struct -+{ -+ pANTLR3_BASE_TREE start; -+ pANTLR3_BASE_TREE stop; -+ pANTLR3_STRING title; -+ pANTLR3_STRING query; -+} -+ SMARTPL2SQL_playlist_return; -+ -+ -+ -+/** Context tracking structure for SMARTPL2SQL -+ */ -+struct SMARTPL2SQL_Ctx_struct -+{ -+ /** Built in ANTLR3 context tracker contains all the generic elements -+ * required for context tracking. -+ */ -+ pANTLR3_TREE_PARSER pTreeParser; -+ -+ -+ SMARTPL2SQL_playlist_return (*playlist) (struct SMARTPL2SQL_Ctx_struct * ctx); -+ pANTLR3_STRING (*expression) (struct SMARTPL2SQL_Ctx_struct * ctx); -+ int (*dateval) (struct SMARTPL2SQL_Ctx_struct * ctx); -+ int (*interval) (struct SMARTPL2SQL_Ctx_struct * ctx); -+ // Delegated rules -+ const char * (*getGrammarFileName)(); -+ void (*free) (struct SMARTPL2SQL_Ctx_struct * ctx); -+ -+}; -+ -+// Function protoypes for the constructor functions that external translation units -+// such as delegators and delegates may wish to call. -+// -+ANTLR3_API pSMARTPL2SQL SMARTPL2SQLNew (pANTLR3_COMMON_TREE_NODE_STREAM instream); -+ANTLR3_API pSMARTPL2SQL SMARTPL2SQLNewSSD (pANTLR3_COMMON_TREE_NODE_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state); -+ -+/** Symbolic definitions of all the tokens that the tree parser will work with. -+ * \{ -+ * -+ * Antlr will define EOF, but we can't use that as it it is too common in -+ * in C header files and that would be confusing. There is no way to filter this out at the moment -+ * so we just undef it here for now. That isn't the value we get back from C recognizers -+ * anyway. We are looking for ANTLR3_TOKEN_EOF. -+ */ -+#ifdef EOF -+#undef EOF -+#endif -+#ifdef Tokens -+#undef Tokens -+#endif -+#define INTBOOL 14 -+#define STRTAG 10 -+#define AGO 22 -+#define WHITESPACE 29 -+#define GREATEREQUAL 25 -+#define BEFORE 18 -+#define DATETAG 16 -+#define INT 15 -+#define NOT 7 -+#define AFTER 17 -+#define AND 6 -+#define EOF -1 -+#define INCLUDES 11 -+#define STR 4 -+#define T__30 30 -+#define T__31 31 -+#define GREATER 24 -+#define LPAR 8 -+#define ENUMTAG 19 -+#define IS 12 -+#define ENUMVAL 20 -+#define EQUAL 28 -+#define OR 5 -+#define LESS 26 -+#define RPAR 9 -+#define DATE 21 -+#define LESSEQUAL 27 -+#define INTTAG 13 -+#define DATINTERVAL 23 -+#ifdef EOF -+#undef EOF -+#define EOF ANTLR3_TOKEN_EOF -+#endif -+ -+#ifndef TOKENSOURCE -+#define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource -+#endif -+ -+/* End of token definitions for SMARTPL2SQL -+ * ============================================================================= -+ */ -+/** \} */ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -+ -+/* END - Note:Keep extra line feed to satisfy UNIX systems */ -diff --git a/src/pregen/SMARTPL2SQL.u b/src/pregen/SMARTPL2SQL.u -new file mode 100644 -index 0000000..85567d1 ---- /dev/null -+++ b/src/pregen/SMARTPL2SQL.u -@@ -0,0 +1,5 @@ -+SMARTPL2SQL.g: SMARTPL.tokens -+SMARTPL2SQL.c : SMARTPL2SQL.g -+./SMARTPL2SQL.tokens : SMARTPL2SQL.g -+SMARTPL2SQL.h : SMARTPL2SQL.g -+ANTLR_PRODUCTS += SMARTPL2SQL.c ./SMARTPL2SQL.tokens SMARTPL2SQL.h -\ No newline at end of file -diff --git a/src/pregen/SMARTPLLexer.c b/src/pregen/SMARTPLLexer.c -new file mode 100644 -index 0000000..91d6e99 ---- /dev/null -+++ b/src/pregen/SMARTPLLexer.c -@@ -0,0 +1,4168 @@ -+/** \file -+ * This C source file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : SMARTPL.g -+ * - On : 2016-01-01 12:23:40 -+ * - for the lexer : SMARTPLLexerLexer * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+*/ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+/* ----------------------------------------- -+ * Include the ANTLR3 generated header file. -+ */ -+#include "SMARTPLLexer.h" -+/* ----------------------------------------- */ -+ -+ -+/** String literals used by SMARTPLLexer that we must do things like MATCHS() with. -+ * C will normally just lay down 8 bit characters, and you can use L"xxx" to -+ * get wchar_t, but wchar_t is 16 bits on Windows, which is not UTF32 and so -+ * we perform this little trick of defining the literals as arrays of UINT32 -+ * and passing in the address of these. -+ */ -+static ANTLR3_UCHAR lit_1[] = { 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_2[] = { 0x61, 0x6C, 0x62, 0x75, 0x6D, 0x5F, 0x61, 0x72, 0x74, 0x69, 0x73, 0x74, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_3[] = { 0x61, 0x6C, 0x62, 0x75, 0x6D, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_4[] = { 0x74, 0x69, 0x74, 0x6C, 0x65, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_5[] = { 0x67, 0x65, 0x6E, 0x72, 0x65, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_6[] = { 0x63, 0x6F, 0x6D, 0x70, 0x6F, 0x73, 0x65, 0x72, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_7[] = { 0x70, 0x61, 0x74, 0x68, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_8[] = { 0x74, 0x79, 0x70, 0x65, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_9[] = { 0x67, 0x72, 0x6F, 0x75, 0x70, 0x69, 0x6E, 0x67, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_10[] = { 0x70, 0x6C, 0x61, 0x79, 0x5F, 0x63, 0x6F, 0x75, 0x6E, 0x74, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_11[] = { 0x72, 0x61, 0x74, 0x69, 0x6E, 0x67, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_12[] = { 0x79, 0x65, 0x61, 0x72, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_13[] = { 0x63, 0x6F, 0x6D, 0x70, 0x69, 0x6C, 0x61, 0x74, 0x69, 0x6F, 0x6E, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_14[] = { 0x74, 0x69, 0x6D, 0x65, 0x5F, 0x61, 0x64, 0x64, 0x65, 0x64, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_15[] = { 0x74, 0x69, 0x6D, 0x65, 0x5F, 0x70, 0x6C, 0x61, 0x79, 0x65, 0x64, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_16[] = { 0x64, 0x61, 0x74, 0x61, 0x5F, 0x6B, 0x69, 0x6E, 0x64, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_17[] = { 0x6D, 0x65, 0x64, 0x69, 0x61, 0x5F, 0x6B, 0x69, 0x6E, 0x64, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_18[] = { 0x69, 0x6E, 0x63, 0x6C, 0x75, 0x64, 0x65, 0x73, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_19[] = { 0x69, 0x73, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_20[] = { 0x3E, 0x3D, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_21[] = { 0x3C, 0x3D, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_22[] = { 0x61, 0x66, 0x74, 0x65, 0x72, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_23[] = { 0x62, 0x65, 0x66, 0x6F, 0x72, 0x65, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_24[] = { 0x61, 0x67, 0x6F, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_25[] = { 0x41, 0x4E, 0x44, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_26[] = { 0x61, 0x6E, 0x64, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_27[] = { 0x4F, 0x52, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_28[] = { 0x6F, 0x72, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_29[] = { 0x4E, 0x4F, 0x54, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_30[] = { 0x6E, 0x6F, 0x74, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_31[] = { 0x74, 0x6F, 0x64, 0x61, 0x79, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_32[] = { 0x79, 0x65, 0x73, 0x74, 0x65, 0x72, 0x64, 0x61, 0x79, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_33[] = { 0x6C, 0x61, 0x73, 0x74, 0x20, 0x77, 0x65, 0x65, 0x6B, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_34[] = { 0x6C, 0x61, 0x73, 0x74, 0x20, 0x6D, 0x6F, 0x6E, 0x74, 0x68, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_35[] = { 0x6C, 0x61, 0x73, 0x74, 0x20, 0x79, 0x65, 0x61, 0x72, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_36[] = { 0x64, 0x61, 0x79, 0x73, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_37[] = { 0x77, 0x65, 0x65, 0x6B, 0x73, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_38[] = { 0x6D, 0x6F, 0x6E, 0x74, 0x68, 0x73, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_39[] = { 0x79, 0x65, 0x61, 0x72, 0x73, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_40[] = { 0x6D, 0x75, 0x73, 0x69, 0x63, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_41[] = { 0x6D, 0x6F, 0x76, 0x69, 0x65, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_42[] = { 0x70, 0x6F, 0x64, 0x63, 0x61, 0x73, 0x74, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_43[] = { 0x61, 0x75, 0x64, 0x69, 0x6F, 0x62, 0x6F, 0x6F, 0x6B, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_44[] = { 0x74, 0x76, 0x73, 0x68, 0x6F, 0x77, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_45[] = { 0x66, 0x69, 0x6C, 0x65, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_46[] = { 0x75, 0x72, 0x6C, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_47[] = { 0x73, 0x70, 0x6F, 0x74, 0x69, 0x66, 0x79, ANTLR3_STRING_TERMINATOR}; -+static ANTLR3_UCHAR lit_48[] = { 0x70, 0x69, 0x70, 0x65, ANTLR3_STRING_TERMINATOR}; -+ -+ -+ -+ -+/* MACROS that hide the C interface implementations from the -+ * generated code, which makes it a little more understandable to the human eye. -+ * I am very much against using C pre-processor macros for function calls and bits -+ * of code as you cannot see what is happening when single stepping in debuggers -+ * and so on. The exception (in my book at least) is for generated code, where you are -+ * not maintaining it, but may wish to read and understand it. If you single step it, you know that input() -+ * hides some indirect calls, but is always referring to the input stream. This is -+ * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig -+ * the runtime interfaces without changing the generated code too often, without -+ * confusing the reader of the generated output, who may not wish to know the gory -+ * details of the interface inheritance. -+ */ -+ -+#define CTX ctx -+ -+/* Aids in accessing scopes for grammar programmers -+ */ -+#undef SCOPE_TYPE -+#undef SCOPE_STACK -+#undef SCOPE_TOP -+#define SCOPE_TYPE(scope) pSMARTPLLexer_##scope##_SCOPE -+#define SCOPE_STACK(scope) pSMARTPLLexer_##scope##Stack -+#define SCOPE_TOP(scope) ctx->pSMARTPLLexer_##scope##Top -+#define SCOPE_SIZE(scope) ctx->pSMARTPLLexer_##scope##Stack_limit -+#define SCOPE_INSTANCE(scope, i) (ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i)) -+ -+ -+/* Macros for accessing things in a lexer -+ */ -+#undef LEXER -+#undef RECOGNIZER -+#undef RULEMEMO -+#undef GETCHARINDEX -+#undef GETLINE -+#undef GETCHARPOSITIONINLINE -+#undef EMIT -+#undef EMITNEW -+#undef MATCHC -+#undef MATCHS -+#undef MATCHRANGE -+#undef LTOKEN -+#undef HASFAILED -+#undef FAILEDFLAG -+#undef INPUT -+#undef STRSTREAM -+#undef LA -+#undef HASEXCEPTION -+#undef EXCEPTION -+#undef CONSTRUCTEX -+#undef CONSUME -+#undef LRECOVER -+#undef MARK -+#undef REWIND -+#undef REWINDLAST -+#undef BACKTRACKING -+#undef MATCHANY -+#undef MEMOIZE -+#undef HAVEPARSEDRULE -+#undef GETTEXT -+#undef INDEX -+#undef SEEK -+#undef PUSHSTREAM -+#undef POPSTREAM -+#undef SETTEXT -+#undef SETTEXT8 -+ -+#define LEXER ctx->pLexer -+#define RECOGNIZER LEXER->rec -+#define LEXSTATE RECOGNIZER->state -+#define TOKSOURCE LEXSTATE->tokSource -+#define GETCHARINDEX() LEXER->getCharIndex(LEXER) -+#define GETLINE() LEXER->getLine(LEXER) -+#define GETTEXT() LEXER->getText(LEXER) -+#define GETCHARPOSITIONINLINE() LEXER->getCharPositionInLine(LEXER) -+#define EMIT() LEXSTATE->type = _type; LEXER->emit(LEXER) -+#define EMITNEW(t) LEXER->emitNew(LEXER, t) -+#define MATCHC(c) LEXER->matchc(LEXER, c) -+#define MATCHS(s) LEXER->matchs(LEXER, s) -+#define MATCHRANGE(c1,c2) LEXER->matchRange(LEXER, c1, c2) -+#define MATCHANY() LEXER->matchAny(LEXER) -+#define LTOKEN LEXSTATE->token -+#define HASFAILED() (LEXSTATE->failed == ANTLR3_TRUE) -+#define BACKTRACKING LEXSTATE->backtracking -+#define FAILEDFLAG LEXSTATE->failed -+#define INPUT LEXER->input -+#define STRSTREAM INPUT -+#define ISTREAM INPUT->istream -+#define INDEX() ISTREAM->index(ISTREAM) -+#define SEEK(n) ISTREAM->seek(ISTREAM, n) -+#define EOF_TOKEN &(LEXSTATE->tokSource->eofToken) -+#define HASEXCEPTION() (LEXSTATE->error == ANTLR3_TRUE) -+#define EXCEPTION LEXSTATE->exception -+#define CONSTRUCTEX() RECOGNIZER->exConstruct(RECOGNIZER) -+#define LRECOVER() LEXER->recover(LEXER) -+#define MARK() ISTREAM->mark(ISTREAM) -+#define REWIND(m) ISTREAM->rewind(ISTREAM, m) -+#define REWINDLAST() ISTREAM->rewindLast(ISTREAM) -+#define MEMOIZE(ri,si) RECOGNIZER->memoize(RECOGNIZER, ri, si) -+#define HAVEPARSEDRULE(r) RECOGNIZER->alreadyParsedRule(RECOGNIZER, r) -+#define PUSHSTREAM(str) LEXER->pushCharStream(LEXER, str) -+#define POPSTREAM() LEXER->popCharStream(LEXER) -+#define SETTEXT(str) LEXSTATE->text = str -+#define SKIP() LEXSTATE->token = &(TOKSOURCE->skipToken) -+#define USER1 LEXSTATE->user1 -+#define USER2 LEXSTATE->user2 -+#define USER3 LEXSTATE->user3 -+#define CUSTOM LEXSTATE->custom -+#define RULEMEMO LEXSTATE->ruleMemo -+#define DBG RECOGNIZER->debugger -+ -+/* If we have been told we can rely on the standard 8 bit or 16 bit input -+ * stream, then we can define our macros to use the direct pointers -+ * in the input object, which is much faster than indirect calls. This -+ * is really only significant to lexers with a lot of fragment rules (which -+ * do not place LA(1) in a temporary at the moment) and even then -+ * only if there is a lot of input (order of say 1M or so). -+ */ -+#if defined(ANTLR3_INLINE_INPUT_ASCII) || defined(ANTLR3_INLINE_INPUT_UTF16) -+ -+# ifdef ANTLR3_INLINE_INPUT_ASCII -+ -+/* 8 bit "ASCII" (actually any 8 bit character set) */ -+ -+# define NEXTCHAR ((pANTLR3_UINT8)(INPUT->nextChar)) -+# define DATAP ((pANTLR3_UINT8)(INPUT->data)) -+ -+# else -+ -+# define NEXTCHAR ((pANTLR3_UINT16)(INPUT->nextChar)) -+# define DATAP ((pANTLR3_UINT16)(INPUT->data)) -+ -+# endif -+ -+# define LA(n) ((NEXTCHAR + n) > (DATAP + INPUT->sizeBuf) ? ANTLR3_CHARSTREAM_EOF : (ANTLR3_UCHAR)(*(NEXTCHAR + n - 1))) -+# define CONSUME() \ -+{ \ -+ if (NEXTCHAR < (DATAP + INPUT->sizeBuf)) \ -+ { \ -+ INPUT->charPositionInLine++; \ -+ if ((ANTLR3_UCHAR)(*NEXTCHAR) == INPUT->newlineChar) \ -+ { \ -+ INPUT->line++; \ -+ INPUT->charPositionInLine = 0; \ -+ INPUT->currentLine = (void *)(NEXTCHAR + 1); \ -+ } \ -+ INPUT->nextChar = (void *)(NEXTCHAR + 1); \ -+ } \ -+} -+ -+#else -+ -+// Pick up the input character by calling the input stream implementation. -+// -+#define CONSUME() INPUT->istream->consume(INPUT->istream) -+#define LA(n) INPUT->istream->_LA(INPUT->istream, n) -+ -+#endif -+#define TOKTEXT(tok, txt) tok, (pANTLR3_UINT8)txt -+ -+/* The 4 tokens defined below may well clash with your own #defines or token types. If so -+ * then for the present you must use different names for your defines as these are hard coded -+ * in the code generator. It would be better not to use such names internally, and maybe -+ * we can change this in a forthcoming release. I deliberately do not #undef these -+ * here as this will at least give you a redefined error somewhere if they clash. -+ */ -+#define UP ANTLR3_TOKEN_UP -+#define DOWN ANTLR3_TOKEN_DOWN -+#define EOR ANTLR3_TOKEN_EOR -+#define INVALID ANTLR3_TOKEN_INVALID -+ -+ -+/* ============================================================================= -+ * Functions to create and destroy scopes. First come the rule scopes, followed -+ * by the global declared scopes. -+ */ -+ -+ -+ -+/* ============================================================================= */ -+ -+/* ============================================================================= -+ * Start of recognizer -+ */ -+ -+ -+/* Forward declare the locally static matching functions we have generated and any predicate functions. -+ */ -+static ANTLR3_INLINE void mT__30 (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mT__31 (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mSTRTAG (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mINTTAG (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mDATETAG (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mENUMTAG (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mINCLUDES (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mIS (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mINTBOOL (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mGREATER (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mGREATEREQUAL (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mLESS (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mLESSEQUAL (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mEQUAL (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mAFTER (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mBEFORE (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mAGO (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mAND (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mOR (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mNOT (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mLPAR (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mRPAR (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mDATE (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mDATINTERVAL (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mENUMVAL (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mSTR (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mINT (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mWHITESPACE (pSMARTPLLexer ctx); -+static ANTLR3_INLINE void mTokens (pSMARTPLLexer ctx); -+static void SMARTPLLexerFree(pSMARTPLLexer ctx); -+ -+/* ========================================================================= -+ * Lexer matching rules end. -+ * ========================================================================= -+ */ -+ -+ -+ -+static void -+SMARTPLLexerFree (pSMARTPLLexer ctx) -+{ -+ LEXER->free(LEXER); -+ -+ ANTLR3_FREE(ctx); -+} -+ -+/** \brief Name of the grammar file that generated this code -+ */ -+static const char fileName[] = "SMARTPL.g"; -+ -+/** \brief Return the name of the grammar file that generated this code. -+ */ -+static const char * getGrammarFileName() -+{ -+ return fileName; -+} -+ -+/** \brief Create a new lexer called SMARTPLLexer -+ * -+ * \param[in] instream Pointer to an initialized input stream -+ * \return -+ * - Success pSMARTPLLexer initialized for the lex start -+ * - Fail NULL -+ */ -+ANTLR3_API pSMARTPLLexer SMARTPLLexerNew -+(pANTLR3_INPUT_STREAM instream) -+{ -+ // See if we can create a new lexer with the standard constructor -+ // -+ return SMARTPLLexerNewSSD(instream, NULL); -+} -+ -+/** \brief Create a new lexer called SMARTPLLexer -+ * -+ * \param[in] instream Pointer to an initialized input stream -+ * \param[state] state Previously created shared recognizer stat -+ * \return -+ * - Success pSMARTPLLexer initialized for the lex start -+ * - Fail NULL -+ */ -+ANTLR3_API pSMARTPLLexer SMARTPLLexerNewSSD -+(pANTLR3_INPUT_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state) -+{ -+ pSMARTPLLexer ctx; // Context structure we will build and return -+ -+ ctx = (pSMARTPLLexer) ANTLR3_CALLOC(1, sizeof(SMARTPLLexer)); -+ -+ if (ctx == NULL) -+ { -+ // Failed to allocate memory for lexer context -+ return NULL; -+ } -+ -+ /* ------------------------------------------------------------------- -+ * Memory for basic structure is allocated, now to fill in -+ * in base ANTLR3 structures. We initialize the function pointers -+ * for the standard ANTLR3 lexer function set, but upon return -+ * from here, the programmer may set the pointers to provide custom -+ * implementations of each function. -+ * -+ * We don't use the macros defined in SMARTPLLexer.h here so you can get a sense -+ * of what goes where. -+ */ -+ -+ /* Create a base lexer, using the supplied input stream -+ */ -+ ctx->pLexer = antlr3LexerNewStream(ANTLR3_SIZE_HINT, instream, state); -+ -+ /* Check that we allocated the memory correctly -+ */ -+ if (ctx->pLexer == NULL) -+ { -+ ANTLR3_FREE(ctx); -+ return NULL; -+ } -+ /* Install the implementation of our SMARTPLLexer interface -+ */ -+ ctx->mT__30 = mT__30; -+ ctx->mT__31 = mT__31; -+ ctx->mSTRTAG = mSTRTAG; -+ ctx->mINTTAG = mINTTAG; -+ ctx->mDATETAG = mDATETAG; -+ ctx->mENUMTAG = mENUMTAG; -+ ctx->mINCLUDES = mINCLUDES; -+ ctx->mIS = mIS; -+ ctx->mINTBOOL = mINTBOOL; -+ ctx->mGREATER = mGREATER; -+ ctx->mGREATEREQUAL = mGREATEREQUAL; -+ ctx->mLESS = mLESS; -+ ctx->mLESSEQUAL = mLESSEQUAL; -+ ctx->mEQUAL = mEQUAL; -+ ctx->mAFTER = mAFTER; -+ ctx->mBEFORE = mBEFORE; -+ ctx->mAGO = mAGO; -+ ctx->mAND = mAND; -+ ctx->mOR = mOR; -+ ctx->mNOT = mNOT; -+ ctx->mLPAR = mLPAR; -+ ctx->mRPAR = mRPAR; -+ ctx->mDATE = mDATE; -+ ctx->mDATINTERVAL = mDATINTERVAL; -+ ctx->mENUMVAL = mENUMVAL; -+ ctx->mSTR = mSTR; -+ ctx->mINT = mINT; -+ ctx->mWHITESPACE = mWHITESPACE; -+ ctx->mTokens = mTokens; -+ -+ /** When the nextToken() call is made to this lexer's pANTLR3_TOKEN_SOURCE -+ * it will call mTokens() in this generated code, and will pass it the ctx -+ * pointer of this lexer, not the context of the base lexer, so store that now. -+ */ -+ ctx->pLexer->ctx = ctx; -+ -+ /**Install the token matching function -+ */ -+ ctx->pLexer->mTokens = (void (*) (void *))(mTokens); -+ -+ ctx->getGrammarFileName = getGrammarFileName; -+ ctx->free = SMARTPLLexerFree; -+ -+ -+ -+ -+ -+ /* Return the newly built lexer to the caller -+ */ -+ return ctx; -+} -+ -+ -+/* ========================================================================= -+ * Functions to match the lexer grammar defined tokens from the input stream -+ */ -+ -+// Comes from: 7:7: ( '{' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start T__30 -+ * -+ * Looks to match the characters the constitute the token T__30 -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mT__30(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = T__30; -+ -+ -+ // SMARTPL.g:7:7: ( '{' ) -+ // SMARTPL.g:7:9: '{' -+ { -+ MATCHC('{'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleT__30Ex; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleT__30Ex; /* Prevent compiler warnings */ -+ ruleT__30Ex: ; -+ -+} -+// $ANTLR end T__30 -+ -+// Comes from: 8:7: ( '}' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start T__31 -+ * -+ * Looks to match the characters the constitute the token T__31 -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mT__31(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = T__31; -+ -+ -+ // SMARTPL.g:8:7: ( '}' ) -+ // SMARTPL.g:8:9: '}' -+ { -+ MATCHC('}'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleT__31Ex; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleT__31Ex; /* Prevent compiler warnings */ -+ ruleT__31Ex: ; -+ -+} -+// $ANTLR end T__31 -+ -+// Comes from: 56:9: ( 'artist' | 'album_artist' | 'album' | 'title' | 'genre' | 'composer' | 'path' | 'type' | 'grouping' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start STRTAG -+ * -+ * Looks to match the characters the constitute the token STRTAG -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mSTRTAG(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = STRTAG; -+ -+ -+ { -+ // SMARTPL.g:56:9: ( 'artist' | 'album_artist' | 'album' | 'title' | 'genre' | 'composer' | 'path' | 'type' | 'grouping' ) -+ -+ ANTLR3_UINT32 alt1; -+ -+ alt1=9; -+ -+ switch ( LA(1) ) -+ { -+ case 'a': -+ { -+ switch ( LA(2) ) -+ { -+ case 'r': -+ { -+ alt1=1; -+ } -+ break; -+ case 'l': -+ { -+ switch ( LA(3) ) -+ { -+ case 'b': -+ { -+ switch ( LA(4) ) -+ { -+ case 'u': -+ { -+ switch ( LA(5) ) -+ { -+ case 'm': -+ { -+ switch ( LA(6) ) -+ { -+ case '_': -+ { -+ alt1=2; -+ } -+ break; -+ -+ default: -+ alt1=3;} -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 13; -+ -+ -+ goto ruleSTRTAGEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 12; -+ -+ -+ goto ruleSTRTAGEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 7; -+ -+ -+ goto ruleSTRTAGEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 1; -+ -+ -+ goto ruleSTRTAGEx; -+ } -+ -+ } -+ break; -+ case 't': -+ { -+ switch ( LA(2) ) -+ { -+ case 'i': -+ { -+ alt1=4; -+ } -+ break; -+ case 'y': -+ { -+ alt1=8; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 2; -+ -+ -+ goto ruleSTRTAGEx; -+ } -+ -+ } -+ break; -+ case 'g': -+ { -+ switch ( LA(2) ) -+ { -+ case 'e': -+ { -+ alt1=5; -+ } -+ break; -+ case 'r': -+ { -+ alt1=9; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 3; -+ -+ -+ goto ruleSTRTAGEx; -+ } -+ -+ } -+ break; -+ case 'c': -+ { -+ alt1=6; -+ } -+ break; -+ case 'p': -+ { -+ alt1=7; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 1; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleSTRTAGEx; -+ } -+ -+ switch (alt1) -+ { -+ case 1: -+ // SMARTPL.g:56:11: 'artist' -+ { -+ MATCHS(lit_1); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTRTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:57:6: 'album_artist' -+ { -+ MATCHS(lit_2); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTRTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 3: -+ // SMARTPL.g:58:6: 'album' -+ { -+ MATCHS(lit_3); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTRTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 4: -+ // SMARTPL.g:59:6: 'title' -+ { -+ MATCHS(lit_4); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTRTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 5: -+ // SMARTPL.g:60:6: 'genre' -+ { -+ MATCHS(lit_5); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTRTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 6: -+ // SMARTPL.g:61:6: 'composer' -+ { -+ MATCHS(lit_6); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTRTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 7: -+ // SMARTPL.g:62:6: 'path' -+ { -+ MATCHS(lit_7); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTRTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 8: -+ // SMARTPL.g:63:6: 'type' -+ { -+ MATCHS(lit_8); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTRTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 9: -+ // SMARTPL.g:64:6: 'grouping' -+ { -+ MATCHS(lit_9); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTRTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleSTRTAGEx; /* Prevent compiler warnings */ -+ ruleSTRTAGEx: ; -+ -+} -+// $ANTLR end STRTAG -+ -+// Comes from: 67:9: ( 'play_count' | 'rating' | 'year' | 'compilation' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start INTTAG -+ * -+ * Looks to match the characters the constitute the token INTTAG -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mINTTAG(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = INTTAG; -+ -+ -+ { -+ // SMARTPL.g:67:9: ( 'play_count' | 'rating' | 'year' | 'compilation' ) -+ -+ ANTLR3_UINT32 alt2; -+ -+ alt2=4; -+ -+ switch ( LA(1) ) -+ { -+ case 'p': -+ { -+ alt2=1; -+ } -+ break; -+ case 'r': -+ { -+ alt2=2; -+ } -+ break; -+ case 'y': -+ { -+ alt2=3; -+ } -+ break; -+ case 'c': -+ { -+ alt2=4; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 2; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleINTTAGEx; -+ } -+ -+ switch (alt2) -+ { -+ case 1: -+ // SMARTPL.g:67:11: 'play_count' -+ { -+ MATCHS(lit_10); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:68:6: 'rating' -+ { -+ MATCHS(lit_11); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 3: -+ // SMARTPL.g:69:6: 'year' -+ { -+ MATCHS(lit_12); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 4: -+ // SMARTPL.g:70:6: 'compilation' -+ { -+ MATCHS(lit_13); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleINTTAGEx; /* Prevent compiler warnings */ -+ ruleINTTAGEx: ; -+ -+} -+// $ANTLR end INTTAG -+ -+// Comes from: 73:10: ( 'time_added' | 'time_played' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start DATETAG -+ * -+ * Looks to match the characters the constitute the token DATETAG -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mDATETAG(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = DATETAG; -+ -+ -+ { -+ // SMARTPL.g:73:10: ( 'time_added' | 'time_played' ) -+ -+ ANTLR3_UINT32 alt3; -+ -+ alt3=2; -+ -+ switch ( LA(1) ) -+ { -+ case 't': -+ { -+ switch ( LA(2) ) -+ { -+ case 'i': -+ { -+ switch ( LA(3) ) -+ { -+ case 'm': -+ { -+ switch ( LA(4) ) -+ { -+ case 'e': -+ { -+ switch ( LA(5) ) -+ { -+ case '_': -+ { -+ switch ( LA(6) ) -+ { -+ case 'a': -+ { -+ alt3=1; -+ } -+ break; -+ case 'p': -+ { -+ alt3=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 5; -+ -+ -+ goto ruleDATETAGEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 4; -+ -+ -+ goto ruleDATETAGEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 3; -+ -+ -+ goto ruleDATETAGEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 2; -+ -+ -+ goto ruleDATETAGEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 1; -+ -+ -+ goto ruleDATETAGEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleDATETAGEx; -+ } -+ -+ switch (alt3) -+ { -+ case 1: -+ // SMARTPL.g:73:12: 'time_added' -+ { -+ MATCHS(lit_14); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATETAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:74:6: 'time_played' -+ { -+ MATCHS(lit_15); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATETAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleDATETAGEx; /* Prevent compiler warnings */ -+ ruleDATETAGEx: ; -+ -+} -+// $ANTLR end DATETAG -+ -+// Comes from: 77:10: ( 'data_kind' | 'media_kind' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start ENUMTAG -+ * -+ * Looks to match the characters the constitute the token ENUMTAG -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mENUMTAG(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = ENUMTAG; -+ -+ -+ { -+ // SMARTPL.g:77:10: ( 'data_kind' | 'media_kind' ) -+ -+ ANTLR3_UINT32 alt4; -+ -+ alt4=2; -+ -+ switch ( LA(1) ) -+ { -+ case 'd': -+ { -+ alt4=1; -+ } -+ break; -+ case 'm': -+ { -+ alt4=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleENUMTAGEx; -+ } -+ -+ switch (alt4) -+ { -+ case 1: -+ // SMARTPL.g:77:12: 'data_kind' -+ { -+ MATCHS(lit_16); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENUMTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:78:6: 'media_kind' -+ { -+ MATCHS(lit_17); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENUMTAGEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleENUMTAGEx; /* Prevent compiler warnings */ -+ ruleENUMTAGEx: ; -+ -+} -+// $ANTLR end ENUMTAG -+ -+// Comes from: 81:10: ( 'includes' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start INCLUDES -+ * -+ * Looks to match the characters the constitute the token INCLUDES -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mINCLUDES(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = INCLUDES; -+ -+ -+ // SMARTPL.g:81:10: ( 'includes' ) -+ // SMARTPL.g:81:12: 'includes' -+ { -+ MATCHS(lit_18); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINCLUDESEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleINCLUDESEx; /* Prevent compiler warnings */ -+ ruleINCLUDESEx: ; -+ -+} -+// $ANTLR end INCLUDES -+ -+// Comes from: 84:6: ( 'is' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start IS -+ * -+ * Looks to match the characters the constitute the token IS -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mIS(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = IS; -+ -+ -+ // SMARTPL.g:84:6: ( 'is' ) -+ // SMARTPL.g:84:8: 'is' -+ { -+ MATCHS(lit_19); -+ if (HASEXCEPTION()) -+ { -+ goto ruleISEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleISEx; /* Prevent compiler warnings */ -+ ruleISEx: ; -+ -+} -+// $ANTLR end IS -+ -+// Comes from: 87:10: ( ( GREATER | GREATEREQUAL | LESS | LESSEQUAL | EQUAL ) ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start INTBOOL -+ * -+ * Looks to match the characters the constitute the token INTBOOL -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mINTBOOL(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = INTBOOL; -+ -+ -+ // SMARTPL.g:87:10: ( ( GREATER | GREATEREQUAL | LESS | LESSEQUAL | EQUAL ) ) -+ // SMARTPL.g:87:12: ( GREATER | GREATEREQUAL | LESS | LESSEQUAL | EQUAL ) -+ { -+ -+ // SMARTPL.g:87:12: ( GREATER | GREATEREQUAL | LESS | LESSEQUAL | EQUAL ) -+ { -+ int alt5=5; -+ switch ( LA(1) ) -+ { -+ case '>': -+ { -+ switch ( LA(2) ) -+ { -+ case '=': -+ { -+ alt5=2; -+ } -+ break; -+ -+ default: -+ alt5=1;} -+ -+ } -+ break; -+ case '<': -+ { -+ switch ( LA(2) ) -+ { -+ case '=': -+ { -+ alt5=4; -+ } -+ break; -+ -+ default: -+ alt5=3;} -+ -+ } -+ break; -+ case '=': -+ { -+ alt5=5; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 5; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleINTBOOLEx; -+ } -+ -+ switch (alt5) -+ { -+ case 1: -+ // SMARTPL.g:87:13: GREATER -+ { -+ /* 87:13: GREATER */ -+ mGREATER(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTBOOLEx; -+ } -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:87:21: GREATEREQUAL -+ { -+ /* 87:21: GREATEREQUAL */ -+ mGREATEREQUAL(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTBOOLEx; -+ } -+ -+ -+ } -+ break; -+ case 3: -+ // SMARTPL.g:87:34: LESS -+ { -+ /* 87:34: LESS */ -+ mLESS(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTBOOLEx; -+ } -+ -+ -+ } -+ break; -+ case 4: -+ // SMARTPL.g:87:39: LESSEQUAL -+ { -+ /* 87:39: LESSEQUAL */ -+ mLESSEQUAL(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTBOOLEx; -+ } -+ -+ -+ } -+ break; -+ case 5: -+ // SMARTPL.g:87:49: EQUAL -+ { -+ /* 87:49: EQUAL */ -+ mEQUAL(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTBOOLEx; -+ } -+ -+ -+ } -+ break; -+ -+ } -+ } -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleINTBOOLEx; /* Prevent compiler warnings */ -+ ruleINTBOOLEx: ; -+ -+} -+// $ANTLR end INTBOOL -+ -+// Comes from: 91:10: ( '>' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start GREATER -+ * -+ * Looks to match the characters the constitute the token GREATER -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mGREATER(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ -+ // SMARTPL.g:91:10: ( '>' ) -+ // SMARTPL.g:91:12: '>' -+ { -+ MATCHC('>'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleGREATEREx; -+ } -+ -+ -+ } -+ -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleGREATEREx; /* Prevent compiler warnings */ -+ ruleGREATEREx: ; -+ -+} -+// $ANTLR end GREATER -+ -+// Comes from: 95:13: ( '>=' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start GREATEREQUAL -+ * -+ * Looks to match the characters the constitute the token GREATEREQUAL -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mGREATEREQUAL(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ -+ // SMARTPL.g:95:13: ( '>=' ) -+ // SMARTPL.g:95:15: '>=' -+ { -+ MATCHS(lit_20); -+ if (HASEXCEPTION()) -+ { -+ goto ruleGREATEREQUALEx; -+ } -+ -+ -+ -+ } -+ -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleGREATEREQUALEx; /* Prevent compiler warnings */ -+ ruleGREATEREQUALEx: ; -+ -+} -+// $ANTLR end GREATEREQUAL -+ -+// Comes from: 99:7: ( '<' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start LESS -+ * -+ * Looks to match the characters the constitute the token LESS -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mLESS(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ -+ // SMARTPL.g:99:7: ( '<' ) -+ // SMARTPL.g:99:9: '<' -+ { -+ MATCHC('<'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleLESSEx; -+ } -+ -+ -+ } -+ -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleLESSEx; /* Prevent compiler warnings */ -+ ruleLESSEx: ; -+ -+} -+// $ANTLR end LESS -+ -+// Comes from: 103:11: ( '<=' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start LESSEQUAL -+ * -+ * Looks to match the characters the constitute the token LESSEQUAL -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mLESSEQUAL(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ -+ // SMARTPL.g:103:11: ( '<=' ) -+ // SMARTPL.g:103:13: '<=' -+ { -+ MATCHS(lit_21); -+ if (HASEXCEPTION()) -+ { -+ goto ruleLESSEQUALEx; -+ } -+ -+ -+ -+ } -+ -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleLESSEQUALEx; /* Prevent compiler warnings */ -+ ruleLESSEQUALEx: ; -+ -+} -+// $ANTLR end LESSEQUAL -+ -+// Comes from: 107:8: ( '=' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start EQUAL -+ * -+ * Looks to match the characters the constitute the token EQUAL -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mEQUAL(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ -+ // SMARTPL.g:107:8: ( '=' ) -+ // SMARTPL.g:107:10: '=' -+ { -+ MATCHC('='); -+ if (HASEXCEPTION()) -+ { -+ goto ruleEQUALEx; -+ } -+ -+ -+ } -+ -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleEQUALEx; /* Prevent compiler warnings */ -+ ruleEQUALEx: ; -+ -+} -+// $ANTLR end EQUAL -+ -+// Comes from: 110:8: ( 'after' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start AFTER -+ * -+ * Looks to match the characters the constitute the token AFTER -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mAFTER(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = AFTER; -+ -+ -+ // SMARTPL.g:110:8: ( 'after' ) -+ // SMARTPL.g:110:10: 'after' -+ { -+ MATCHS(lit_22); -+ if (HASEXCEPTION()) -+ { -+ goto ruleAFTEREx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleAFTEREx; /* Prevent compiler warnings */ -+ ruleAFTEREx: ; -+ -+} -+// $ANTLR end AFTER -+ -+// Comes from: 113:9: ( 'before' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start BEFORE -+ * -+ * Looks to match the characters the constitute the token BEFORE -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mBEFORE(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = BEFORE; -+ -+ -+ // SMARTPL.g:113:9: ( 'before' ) -+ // SMARTPL.g:113:11: 'before' -+ { -+ MATCHS(lit_23); -+ if (HASEXCEPTION()) -+ { -+ goto ruleBEFOREEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleBEFOREEx; /* Prevent compiler warnings */ -+ ruleBEFOREEx: ; -+ -+} -+// $ANTLR end BEFORE -+ -+// Comes from: 116:7: ( 'ago' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start AGO -+ * -+ * Looks to match the characters the constitute the token AGO -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mAGO(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = AGO; -+ -+ -+ // SMARTPL.g:116:7: ( 'ago' ) -+ // SMARTPL.g:116:9: 'ago' -+ { -+ MATCHS(lit_24); -+ if (HASEXCEPTION()) -+ { -+ goto ruleAGOEx; -+ } -+ -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleAGOEx; /* Prevent compiler warnings */ -+ ruleAGOEx: ; -+ -+} -+// $ANTLR end AGO -+ -+// Comes from: 119:7: ( 'AND' | 'and' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start AND -+ * -+ * Looks to match the characters the constitute the token AND -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mAND(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = AND; -+ -+ -+ { -+ // SMARTPL.g:119:7: ( 'AND' | 'and' ) -+ -+ ANTLR3_UINT32 alt6; -+ -+ alt6=2; -+ -+ switch ( LA(1) ) -+ { -+ case 'A': -+ { -+ alt6=1; -+ } -+ break; -+ case 'a': -+ { -+ alt6=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 6; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleANDEx; -+ } -+ -+ switch (alt6) -+ { -+ case 1: -+ // SMARTPL.g:119:9: 'AND' -+ { -+ MATCHS(lit_25); -+ if (HASEXCEPTION()) -+ { -+ goto ruleANDEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:120:6: 'and' -+ { -+ MATCHS(lit_26); -+ if (HASEXCEPTION()) -+ { -+ goto ruleANDEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleANDEx; /* Prevent compiler warnings */ -+ ruleANDEx: ; -+ -+} -+// $ANTLR end AND -+ -+// Comes from: 123:6: ( 'OR' | 'or' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start OR -+ * -+ * Looks to match the characters the constitute the token OR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mOR(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = OR; -+ -+ -+ { -+ // SMARTPL.g:123:6: ( 'OR' | 'or' ) -+ -+ ANTLR3_UINT32 alt7; -+ -+ alt7=2; -+ -+ switch ( LA(1) ) -+ { -+ case 'O': -+ { -+ alt7=1; -+ } -+ break; -+ case 'o': -+ { -+ alt7=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 7; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleOREx; -+ } -+ -+ switch (alt7) -+ { -+ case 1: -+ // SMARTPL.g:123:8: 'OR' -+ { -+ MATCHS(lit_27); -+ if (HASEXCEPTION()) -+ { -+ goto ruleOREx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:124:6: 'or' -+ { -+ MATCHS(lit_28); -+ if (HASEXCEPTION()) -+ { -+ goto ruleOREx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleOREx; /* Prevent compiler warnings */ -+ ruleOREx: ; -+ -+} -+// $ANTLR end OR -+ -+// Comes from: 127:7: ( 'NOT' | 'not' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start NOT -+ * -+ * Looks to match the characters the constitute the token NOT -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mNOT(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = NOT; -+ -+ -+ { -+ // SMARTPL.g:127:7: ( 'NOT' | 'not' ) -+ -+ ANTLR3_UINT32 alt8; -+ -+ alt8=2; -+ -+ switch ( LA(1) ) -+ { -+ case 'N': -+ { -+ alt8=1; -+ } -+ break; -+ case 'n': -+ { -+ alt8=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 8; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleNOTEx; -+ } -+ -+ switch (alt8) -+ { -+ case 1: -+ // SMARTPL.g:127:9: 'NOT' -+ { -+ MATCHS(lit_29); -+ if (HASEXCEPTION()) -+ { -+ goto ruleNOTEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:128:6: 'not' -+ { -+ MATCHS(lit_30); -+ if (HASEXCEPTION()) -+ { -+ goto ruleNOTEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleNOTEx; /* Prevent compiler warnings */ -+ ruleNOTEx: ; -+ -+} -+// $ANTLR end NOT -+ -+// Comes from: 131:7: ( '(' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start LPAR -+ * -+ * Looks to match the characters the constitute the token LPAR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mLPAR(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = LPAR; -+ -+ -+ // SMARTPL.g:131:7: ( '(' ) -+ // SMARTPL.g:131:9: '(' -+ { -+ MATCHC('('); -+ if (HASEXCEPTION()) -+ { -+ goto ruleLPAREx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleLPAREx; /* Prevent compiler warnings */ -+ ruleLPAREx: ; -+ -+} -+// $ANTLR end LPAR -+ -+// Comes from: 134:7: ( ')' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start RPAR -+ * -+ * Looks to match the characters the constitute the token RPAR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mRPAR(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = RPAR; -+ -+ -+ // SMARTPL.g:134:7: ( ')' ) -+ // SMARTPL.g:134:9: ')' -+ { -+ MATCHC(')'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleRPAREx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleRPAREx; /* Prevent compiler warnings */ -+ ruleRPAREx: ; -+ -+} -+// $ANTLR end RPAR -+ -+// Comes from: 137:7: ( ( '0' .. '9' ) ( '0' .. '9' ) ( '0' .. '9' ) ( '0' .. '9' ) '-' ( '0' .. '1' ) ( '0' .. '9' ) '-' ( '0' .. '3' ) ( '0' .. '9' ) | 'today' | 'yesterday' | 'last week' | 'last month' | 'last year' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start DATE -+ * -+ * Looks to match the characters the constitute the token DATE -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mDATE(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = DATE; -+ -+ -+ { -+ // SMARTPL.g:137:7: ( ( '0' .. '9' ) ( '0' .. '9' ) ( '0' .. '9' ) ( '0' .. '9' ) '-' ( '0' .. '1' ) ( '0' .. '9' ) '-' ( '0' .. '3' ) ( '0' .. '9' ) | 'today' | 'yesterday' | 'last week' | 'last month' | 'last year' ) -+ -+ ANTLR3_UINT32 alt9; -+ -+ alt9=6; -+ -+ switch ( LA(1) ) -+ { -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ { -+ alt9=1; -+ } -+ break; -+ case 't': -+ { -+ alt9=2; -+ } -+ break; -+ case 'y': -+ { -+ alt9=3; -+ } -+ break; -+ case 'l': -+ { -+ switch ( LA(2) ) -+ { -+ case 'a': -+ { -+ switch ( LA(3) ) -+ { -+ case 's': -+ { -+ switch ( LA(4) ) -+ { -+ case 't': -+ { -+ switch ( LA(5) ) -+ { -+ case ' ': -+ { -+ switch ( LA(6) ) -+ { -+ case 'w': -+ { -+ alt9=4; -+ } -+ break; -+ case 'm': -+ { -+ alt9=5; -+ } -+ break; -+ case 'y': -+ { -+ alt9=6; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 9; -+ EXCEPTION->state = 8; -+ -+ -+ goto ruleDATEEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 9; -+ EXCEPTION->state = 7; -+ -+ -+ goto ruleDATEEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 9; -+ EXCEPTION->state = 6; -+ -+ -+ goto ruleDATEEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 9; -+ EXCEPTION->state = 5; -+ -+ -+ goto ruleDATEEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 9; -+ EXCEPTION->state = 4; -+ -+ -+ goto ruleDATEEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 9; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleDATEEx; -+ } -+ -+ switch (alt9) -+ { -+ case 1: -+ // SMARTPL.g:137:9: ( '0' .. '9' ) ( '0' .. '9' ) ( '0' .. '9' ) ( '0' .. '9' ) '-' ( '0' .. '1' ) ( '0' .. '9' ) '-' ( '0' .. '3' ) ( '0' .. '9' ) -+ { -+ // SMARTPL.g:137:9: ( '0' .. '9' ) -+ // SMARTPL.g:137:10: '0' .. '9' -+ { -+ MATCHRANGE('0', '9'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ -+ // SMARTPL.g:137:19: ( '0' .. '9' ) -+ // SMARTPL.g:137:20: '0' .. '9' -+ { -+ MATCHRANGE('0', '9'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ -+ // SMARTPL.g:137:29: ( '0' .. '9' ) -+ // SMARTPL.g:137:30: '0' .. '9' -+ { -+ MATCHRANGE('0', '9'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ -+ // SMARTPL.g:137:39: ( '0' .. '9' ) -+ // SMARTPL.g:137:40: '0' .. '9' -+ { -+ MATCHRANGE('0', '9'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ -+ MATCHC('-'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ // SMARTPL.g:137:52: ( '0' .. '1' ) -+ // SMARTPL.g:137:53: '0' .. '1' -+ { -+ MATCHRANGE('0', '1'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ -+ // SMARTPL.g:137:62: ( '0' .. '9' ) -+ // SMARTPL.g:137:63: '0' .. '9' -+ { -+ MATCHRANGE('0', '9'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ -+ MATCHC('-'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ // SMARTPL.g:137:75: ( '0' .. '3' ) -+ // SMARTPL.g:137:76: '0' .. '3' -+ { -+ MATCHRANGE('0', '3'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ -+ // SMARTPL.g:137:85: ( '0' .. '9' ) -+ // SMARTPL.g:137:86: '0' .. '9' -+ { -+ MATCHRANGE('0', '9'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ } -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:138:6: 'today' -+ { -+ MATCHS(lit_31); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 3: -+ // SMARTPL.g:139:6: 'yesterday' -+ { -+ MATCHS(lit_32); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 4: -+ // SMARTPL.g:140:6: 'last week' -+ { -+ MATCHS(lit_33); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 5: -+ // SMARTPL.g:141:6: 'last month' -+ { -+ MATCHS(lit_34); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 6: -+ // SMARTPL.g:142:6: 'last year' -+ { -+ MATCHS(lit_35); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATEEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleDATEEx; /* Prevent compiler warnings */ -+ ruleDATEEx: ; -+ -+} -+// $ANTLR end DATE -+ -+// Comes from: 145:13: ( 'days' | 'weeks' | 'months' | 'years' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start DATINTERVAL -+ * -+ * Looks to match the characters the constitute the token DATINTERVAL -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mDATINTERVAL(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = DATINTERVAL; -+ -+ -+ { -+ // SMARTPL.g:145:13: ( 'days' | 'weeks' | 'months' | 'years' ) -+ -+ ANTLR3_UINT32 alt10; -+ -+ alt10=4; -+ -+ switch ( LA(1) ) -+ { -+ case 'd': -+ { -+ alt10=1; -+ } -+ break; -+ case 'w': -+ { -+ alt10=2; -+ } -+ break; -+ case 'm': -+ { -+ alt10=3; -+ } -+ break; -+ case 'y': -+ { -+ alt10=4; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 10; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleDATINTERVALEx; -+ } -+ -+ switch (alt10) -+ { -+ case 1: -+ // SMARTPL.g:145:15: 'days' -+ { -+ MATCHS(lit_36); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATINTERVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:146:6: 'weeks' -+ { -+ MATCHS(lit_37); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATINTERVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 3: -+ // SMARTPL.g:147:6: 'months' -+ { -+ MATCHS(lit_38); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATINTERVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 4: -+ // SMARTPL.g:148:6: 'years' -+ { -+ MATCHS(lit_39); -+ if (HASEXCEPTION()) -+ { -+ goto ruleDATINTERVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleDATINTERVALEx; /* Prevent compiler warnings */ -+ ruleDATINTERVALEx: ; -+ -+} -+// $ANTLR end DATINTERVAL -+ -+// Comes from: 151:10: ( 'music' | 'movie' | 'podcast' | 'audiobook' | 'tvshow' | 'file' | 'url' | 'spotify' | 'pipe' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start ENUMVAL -+ * -+ * Looks to match the characters the constitute the token ENUMVAL -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mENUMVAL(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = ENUMVAL; -+ -+ -+ { -+ // SMARTPL.g:151:10: ( 'music' | 'movie' | 'podcast' | 'audiobook' | 'tvshow' | 'file' | 'url' | 'spotify' | 'pipe' ) -+ -+ ANTLR3_UINT32 alt11; -+ -+ alt11=9; -+ -+ switch ( LA(1) ) -+ { -+ case 'm': -+ { -+ switch ( LA(2) ) -+ { -+ case 'u': -+ { -+ alt11=1; -+ } -+ break; -+ case 'o': -+ { -+ alt11=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 11; -+ EXCEPTION->state = 1; -+ -+ -+ goto ruleENUMVALEx; -+ } -+ -+ } -+ break; -+ case 'p': -+ { -+ switch ( LA(2) ) -+ { -+ case 'o': -+ { -+ alt11=3; -+ } -+ break; -+ case 'i': -+ { -+ alt11=9; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 11; -+ EXCEPTION->state = 2; -+ -+ -+ goto ruleENUMVALEx; -+ } -+ -+ } -+ break; -+ case 'a': -+ { -+ alt11=4; -+ } -+ break; -+ case 't': -+ { -+ alt11=5; -+ } -+ break; -+ case 'f': -+ { -+ alt11=6; -+ } -+ break; -+ case 'u': -+ { -+ alt11=7; -+ } -+ break; -+ case 's': -+ { -+ alt11=8; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 11; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleENUMVALEx; -+ } -+ -+ switch (alt11) -+ { -+ case 1: -+ // SMARTPL.g:151:12: 'music' -+ { -+ MATCHS(lit_40); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENUMVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:152:6: 'movie' -+ { -+ MATCHS(lit_41); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENUMVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 3: -+ // SMARTPL.g:153:6: 'podcast' -+ { -+ MATCHS(lit_42); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENUMVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 4: -+ // SMARTPL.g:154:6: 'audiobook' -+ { -+ MATCHS(lit_43); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENUMVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 5: -+ // SMARTPL.g:155:6: 'tvshow' -+ { -+ MATCHS(lit_44); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENUMVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 6: -+ // SMARTPL.g:156:6: 'file' -+ { -+ MATCHS(lit_45); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENUMVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 7: -+ // SMARTPL.g:157:6: 'url' -+ { -+ MATCHS(lit_46); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENUMVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 8: -+ // SMARTPL.g:158:6: 'spotify' -+ { -+ MATCHS(lit_47); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENUMVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ case 9: -+ // SMARTPL.g:159:6: 'pipe' -+ { -+ MATCHS(lit_48); -+ if (HASEXCEPTION()) -+ { -+ goto ruleENUMVALEx; -+ } -+ -+ -+ -+ } -+ break; -+ -+ } -+ } -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleENUMVALEx; /* Prevent compiler warnings */ -+ ruleENUMVALEx: ; -+ -+} -+// $ANTLR end ENUMVAL -+ -+// Comes from: 162:7: ( '\"' (~ ( '\"' ) )+ '\"' ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start STR -+ * -+ * Looks to match the characters the constitute the token STR -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mSTR(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = STR; -+ -+ -+ // SMARTPL.g:162:7: ( '\"' (~ ( '\"' ) )+ '\"' ) -+ // SMARTPL.g:162:9: '\"' (~ ( '\"' ) )+ '\"' -+ { -+ MATCHC('"'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTREx; -+ } -+ -+ // SMARTPL.g:162:13: (~ ( '\"' ) )+ -+ { -+ int cnt12=0; -+ -+ for (;;) -+ { -+ int alt12=2; -+ { -+ /* dfaLoopbackState(k,edges,eotPredictsAlt,description,stateNumber,semPredState) -+ */ -+ int LA12_0 = LA(1); -+ if ( (((LA12_0 >= 0x0000) && (LA12_0 <= '!')) || ((LA12_0 >= '#') && (LA12_0 <= 0xFFFF))) ) -+ { -+ alt12=1; -+ } -+ -+ } -+ switch (alt12) -+ { -+ case 1: -+ // SMARTPL.g:162:13: ~ ( '\"' ) -+ { -+ if ( ((LA(1) >= 0x0000) && (LA(1) <= '!')) || ((LA(1) >= '#') && (LA(1) <= 0xFFFF)) ) -+ { -+ CONSUME(); -+ -+ } -+ else -+ { -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; -+ -+ LRECOVER(); goto ruleSTREx; -+ } -+ -+ -+ } -+ break; -+ -+ default: -+ -+ if ( cnt12 >= 1 ) -+ { -+ goto loop12; -+ } -+ /* mismatchedSetEx() -+ */ -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME; -+ -+ -+ goto ruleSTREx; -+ } -+ cnt12++; -+ } -+ loop12: ; /* Jump to here if this rule does not match */ -+ } -+ MATCHC('"'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleSTREx; -+ } -+ -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleSTREx; /* Prevent compiler warnings */ -+ ruleSTREx: ; -+ -+} -+// $ANTLR end STR -+ -+// Comes from: 165:7: ( ( '0' .. '9' )+ ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start INT -+ * -+ * Looks to match the characters the constitute the token INT -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mINT(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = INT; -+ -+ -+ // SMARTPL.g:165:7: ( ( '0' .. '9' )+ ) -+ // SMARTPL.g:165:9: ( '0' .. '9' )+ -+ { -+ // SMARTPL.g:165:9: ( '0' .. '9' )+ -+ { -+ int cnt13=0; -+ -+ for (;;) -+ { -+ int alt13=2; -+ switch ( LA(1) ) -+ { -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ { -+ alt13=1; -+ } -+ break; -+ -+ } -+ -+ switch (alt13) -+ { -+ case 1: -+ // SMARTPL.g:165:10: '0' .. '9' -+ { -+ MATCHRANGE('0', '9'); -+ if (HASEXCEPTION()) -+ { -+ goto ruleINTEx; -+ } -+ -+ -+ } -+ break; -+ -+ default: -+ -+ if ( cnt13 >= 1 ) -+ { -+ goto loop13; -+ } -+ /* mismatchedSetEx() -+ */ -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME; -+ -+ -+ goto ruleINTEx; -+ } -+ cnt13++; -+ } -+ loop13: ; /* Jump to here if this rule does not match */ -+ } -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleINTEx; /* Prevent compiler warnings */ -+ ruleINTEx: ; -+ -+} -+// $ANTLR end INT -+ -+// Comes from: 168:12: ( ( '\\t' | ' ' | '\\r' | '\\n' | '\\u000C' ) ) -+/** \brief Lexer rule generated by ANTLR3 -+ * -+ * $ANTLR start WHITESPACE -+ * -+ * Looks to match the characters the constitute the token WHITESPACE -+ * from the attached input stream. -+ * -+ * -+ * \remark -+ * - lexer->error == ANTLR3_TRUE if an exception was thrown. -+ */ -+static ANTLR3_INLINE -+void mWHITESPACE(pSMARTPLLexer ctx) -+{ -+ ANTLR3_UINT32 _type; -+ -+ _type = WHITESPACE; -+ -+ -+ // SMARTPL.g:168:12: ( ( '\\t' | ' ' | '\\r' | '\\n' | '\\u000C' ) ) -+ // SMARTPL.g:168:14: ( '\\t' | ' ' | '\\r' | '\\n' | '\\u000C' ) -+ { -+ if ( ((LA(1) >= '\t') && (LA(1) <= '\n')) || ((LA(1) >= '\f') && (LA(1) <= '\r')) || LA(1) == ' ' ) -+ { -+ CONSUME(); -+ -+ } -+ else -+ { -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; -+ -+ LRECOVER(); goto ruleWHITESPACEEx; -+ } -+ -+ { -+ LEXSTATE->channel = HIDDEN; -+ } -+ -+ } -+ -+ LEXSTATE->type = _type; -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleWHITESPACEEx; /* Prevent compiler warnings */ -+ ruleWHITESPACEEx: ; -+ -+} -+// $ANTLR end WHITESPACE -+ -+/** This is the entry point in to the lexer from an object that -+ * wants to generate the next token, such as a pCOMMON_TOKEN_STREAM -+ */ -+static void -+mTokens(pSMARTPLLexer ctx) -+{ -+ { -+ // SMARTPL.g:1:8: ( T__30 | T__31 | STRTAG | INTTAG | DATETAG | ENUMTAG | INCLUDES | IS | INTBOOL | AFTER | BEFORE | AGO | AND | OR | NOT | LPAR | RPAR | DATE | DATINTERVAL | ENUMVAL | STR | INT | WHITESPACE ) -+ -+ ANTLR3_UINT32 alt14; -+ -+ alt14=23; -+ -+ switch ( LA(1) ) -+ { -+ case '{': -+ { -+ alt14=1; -+ } -+ break; -+ case '}': -+ { -+ alt14=2; -+ } -+ break; -+ case 'a': -+ { -+ switch ( LA(2) ) -+ { -+ case 'l': -+ case 'r': -+ { -+ alt14=3; -+ } -+ break; -+ case 'f': -+ { -+ alt14=10; -+ } -+ break; -+ case 'g': -+ { -+ alt14=12; -+ } -+ break; -+ case 'n': -+ { -+ alt14=13; -+ } -+ break; -+ case 'u': -+ { -+ alt14=20; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 3; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 't': -+ { -+ switch ( LA(2) ) -+ { -+ case 'i': -+ { -+ switch ( LA(3) ) -+ { -+ case 't': -+ { -+ alt14=3; -+ } -+ break; -+ case 'm': -+ { -+ alt14=5; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 28; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'y': -+ { -+ alt14=3; -+ } -+ break; -+ case 'o': -+ { -+ alt14=18; -+ } -+ break; -+ case 'v': -+ { -+ alt14=20; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 4; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'g': -+ { -+ alt14=3; -+ } -+ break; -+ case 'c': -+ { -+ switch ( LA(2) ) -+ { -+ case 'o': -+ { -+ switch ( LA(3) ) -+ { -+ case 'm': -+ { -+ switch ( LA(4) ) -+ { -+ case 'p': -+ { -+ switch ( LA(5) ) -+ { -+ case 'o': -+ { -+ alt14=3; -+ } -+ break; -+ case 'i': -+ { -+ alt14=4; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 42; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 39; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 29; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 6; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'p': -+ { -+ switch ( LA(2) ) -+ { -+ case 'a': -+ { -+ alt14=3; -+ } -+ break; -+ case 'l': -+ { -+ alt14=4; -+ } -+ break; -+ case 'i': -+ case 'o': -+ { -+ alt14=20; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 7; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'r': -+ { -+ alt14=4; -+ } -+ break; -+ case 'y': -+ { -+ switch ( LA(2) ) -+ { -+ case 'e': -+ { -+ switch ( LA(3) ) -+ { -+ case 'a': -+ { -+ switch ( LA(4) ) -+ { -+ case 'r': -+ { -+ switch ( LA(5) ) -+ { -+ case 's': -+ { -+ alt14=19; -+ } -+ break; -+ -+ default: -+ alt14=4;} -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 40; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 's': -+ { -+ alt14=18; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 30; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 9; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'd': -+ { -+ switch ( LA(2) ) -+ { -+ case 'a': -+ { -+ switch ( LA(3) ) -+ { -+ case 't': -+ { -+ alt14=6; -+ } -+ break; -+ case 'y': -+ { -+ alt14=19; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 31; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 10; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'm': -+ { -+ switch ( LA(2) ) -+ { -+ case 'e': -+ { -+ alt14=6; -+ } -+ break; -+ case 'o': -+ { -+ switch ( LA(3) ) -+ { -+ case 'n': -+ { -+ alt14=19; -+ } -+ break; -+ case 'v': -+ { -+ alt14=20; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 33; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'u': -+ { -+ alt14=20; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 11; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case 'i': -+ { -+ switch ( LA(2) ) -+ { -+ case 'n': -+ { -+ alt14=7; -+ } -+ break; -+ case 's': -+ { -+ alt14=8; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 12; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ } -+ break; -+ case '<': -+ case '=': -+ case '>': -+ { -+ alt14=9; -+ } -+ break; -+ case 'b': -+ { -+ alt14=11; -+ } -+ break; -+ case 'A': -+ { -+ alt14=13; -+ } -+ break; -+ case 'O': -+ case 'o': -+ { -+ alt14=14; -+ } -+ break; -+ case 'N': -+ case 'n': -+ { -+ alt14=15; -+ } -+ break; -+ case '(': -+ { -+ alt14=16; -+ } -+ break; -+ case ')': -+ { -+ alt14=17; -+ } -+ break; -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ { -+ switch ( LA(2) ) -+ { -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ { -+ switch ( LA(3) ) -+ { -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ { -+ switch ( LA(4) ) -+ { -+ case '0': -+ case '1': -+ case '2': -+ case '3': -+ case '4': -+ case '5': -+ case '6': -+ case '7': -+ case '8': -+ case '9': -+ { -+ switch ( LA(5) ) -+ { -+ case '-': -+ { -+ alt14=18; -+ } -+ break; -+ -+ default: -+ alt14=22;} -+ -+ } -+ break; -+ -+ default: -+ alt14=22;} -+ -+ } -+ break; -+ -+ default: -+ alt14=22;} -+ -+ } -+ break; -+ -+ default: -+ alt14=22;} -+ -+ } -+ break; -+ case 'l': -+ { -+ alt14=18; -+ } -+ break; -+ case 'w': -+ { -+ alt14=19; -+ } -+ break; -+ case 'f': -+ case 's': -+ case 'u': -+ { -+ alt14=20; -+ } -+ break; -+ case '"': -+ { -+ alt14=21; -+ } -+ break; -+ case '\t': -+ case '\n': -+ case '\f': -+ case '\r': -+ case ' ': -+ { -+ alt14=23; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 14; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruleTokensEx; -+ } -+ -+ switch (alt14) -+ { -+ case 1: -+ // SMARTPL.g:1:10: T__30 -+ { -+ /* 1:10: T__30 */ -+ mT__30(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:1:16: T__31 -+ { -+ /* 1:16: T__31 */ -+ mT__31(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 3: -+ // SMARTPL.g:1:22: STRTAG -+ { -+ /* 1:22: STRTAG */ -+ mSTRTAG(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 4: -+ // SMARTPL.g:1:29: INTTAG -+ { -+ /* 1:29: INTTAG */ -+ mINTTAG(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 5: -+ // SMARTPL.g:1:36: DATETAG -+ { -+ /* 1:36: DATETAG */ -+ mDATETAG(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 6: -+ // SMARTPL.g:1:44: ENUMTAG -+ { -+ /* 1:44: ENUMTAG */ -+ mENUMTAG(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 7: -+ // SMARTPL.g:1:52: INCLUDES -+ { -+ /* 1:52: INCLUDES */ -+ mINCLUDES(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 8: -+ // SMARTPL.g:1:61: IS -+ { -+ /* 1:61: IS */ -+ mIS(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 9: -+ // SMARTPL.g:1:64: INTBOOL -+ { -+ /* 1:64: INTBOOL */ -+ mINTBOOL(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 10: -+ // SMARTPL.g:1:72: AFTER -+ { -+ /* 1:72: AFTER */ -+ mAFTER(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 11: -+ // SMARTPL.g:1:78: BEFORE -+ { -+ /* 1:78: BEFORE */ -+ mBEFORE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 12: -+ // SMARTPL.g:1:85: AGO -+ { -+ /* 1:85: AGO */ -+ mAGO(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 13: -+ // SMARTPL.g:1:89: AND -+ { -+ /* 1:89: AND */ -+ mAND(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 14: -+ // SMARTPL.g:1:93: OR -+ { -+ /* 1:93: OR */ -+ mOR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 15: -+ // SMARTPL.g:1:96: NOT -+ { -+ /* 1:96: NOT */ -+ mNOT(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 16: -+ // SMARTPL.g:1:100: LPAR -+ { -+ /* 1:100: LPAR */ -+ mLPAR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 17: -+ // SMARTPL.g:1:105: RPAR -+ { -+ /* 1:105: RPAR */ -+ mRPAR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 18: -+ // SMARTPL.g:1:110: DATE -+ { -+ /* 1:110: DATE */ -+ mDATE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 19: -+ // SMARTPL.g:1:115: DATINTERVAL -+ { -+ /* 1:115: DATINTERVAL */ -+ mDATINTERVAL(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 20: -+ // SMARTPL.g:1:127: ENUMVAL -+ { -+ /* 1:127: ENUMVAL */ -+ mENUMVAL(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 21: -+ // SMARTPL.g:1:135: STR -+ { -+ /* 1:135: STR */ -+ mSTR(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 22: -+ // SMARTPL.g:1:139: INT -+ { -+ /* 1:139: INT */ -+ mINT(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ case 23: -+ // SMARTPL.g:1:143: WHITESPACE -+ { -+ /* 1:143: WHITESPACE */ -+ mWHITESPACE(ctx ); -+ if (HASEXCEPTION()) -+ { -+ goto ruleTokensEx; -+ } -+ -+ -+ } -+ break; -+ -+ } -+ } -+ -+ -+ goto ruleTokensEx; /* Prevent compiler warnings */ -+ruleTokensEx: ; -+} -+ -+/* ========================================================================= -+ * Lexer matching rules end. -+ * ========================================================================= -+ */ -+/* End of Lexer code -+ * ================================================ -+ * ================================================ -+ */ -+ -+ -+/* End of code -+ * ============================================================================= -+ */ -diff --git a/src/pregen/SMARTPLLexer.h b/src/pregen/SMARTPLLexer.h -new file mode 100644 -index 0000000..87e8c7e ---- /dev/null -+++ b/src/pregen/SMARTPLLexer.h -@@ -0,0 +1,248 @@ -+/** \file -+ * This C header file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : SMARTPL.g -+ * - On : 2016-01-01 12:23:40 -+ * - for the lexer : SMARTPLLexerLexer * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+ * The lexer SMARTPLLexer has the callable functions (rules) shown below, -+ * which will invoke the code for the associated rule in the source grammar -+ * assuming that the input stream is pointing to a token/text stream that could begin -+ * this rule. -+ * -+ * For instance if you call the first (topmost) rule in a parser grammar, you will -+ * get the results of a full parse, but calling a rule half way through the grammar will -+ * allow you to pass part of a full token stream to the parser, such as for syntax checking -+ * in editors and so on. -+ * -+ * The parser entry points are called indirectly (by function pointer to function) via -+ * a parser context typedef pSMARTPLLexer, which is returned from a call to SMARTPLLexerNew(). -+ * -+ * As this is a generated lexer, it is unlikely you will call it 'manually'. However -+ * the methods are provided anyway. -+ * * The methods in pSMARTPLLexer are as follows: -+ * -+ * - void pSMARTPLLexer->T__30(pSMARTPLLexer) -+ * - void pSMARTPLLexer->T__31(pSMARTPLLexer) -+ * - void pSMARTPLLexer->STRTAG(pSMARTPLLexer) -+ * - void pSMARTPLLexer->INTTAG(pSMARTPLLexer) -+ * - void pSMARTPLLexer->DATETAG(pSMARTPLLexer) -+ * - void pSMARTPLLexer->ENUMTAG(pSMARTPLLexer) -+ * - void pSMARTPLLexer->INCLUDES(pSMARTPLLexer) -+ * - void pSMARTPLLexer->IS(pSMARTPLLexer) -+ * - void pSMARTPLLexer->INTBOOL(pSMARTPLLexer) -+ * - void pSMARTPLLexer->GREATER(pSMARTPLLexer) -+ * - void pSMARTPLLexer->GREATEREQUAL(pSMARTPLLexer) -+ * - void pSMARTPLLexer->LESS(pSMARTPLLexer) -+ * - void pSMARTPLLexer->LESSEQUAL(pSMARTPLLexer) -+ * - void pSMARTPLLexer->EQUAL(pSMARTPLLexer) -+ * - void pSMARTPLLexer->AFTER(pSMARTPLLexer) -+ * - void pSMARTPLLexer->BEFORE(pSMARTPLLexer) -+ * - void pSMARTPLLexer->AGO(pSMARTPLLexer) -+ * - void pSMARTPLLexer->AND(pSMARTPLLexer) -+ * - void pSMARTPLLexer->OR(pSMARTPLLexer) -+ * - void pSMARTPLLexer->NOT(pSMARTPLLexer) -+ * - void pSMARTPLLexer->LPAR(pSMARTPLLexer) -+ * - void pSMARTPLLexer->RPAR(pSMARTPLLexer) -+ * - void pSMARTPLLexer->DATE(pSMARTPLLexer) -+ * - void pSMARTPLLexer->DATINTERVAL(pSMARTPLLexer) -+ * - void pSMARTPLLexer->ENUMVAL(pSMARTPLLexer) -+ * - void pSMARTPLLexer->STR(pSMARTPLLexer) -+ * - void pSMARTPLLexer->INT(pSMARTPLLexer) -+ * - void pSMARTPLLexer->WHITESPACE(pSMARTPLLexer) -+ * - void pSMARTPLLexer->Tokens(pSMARTPLLexer) -+ * -+ * The return type for any particular rule is of course determined by the source -+ * grammar file. -+ */ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+#ifndef _SMARTPLLexer_H -+#define _SMARTPLLexer_H -+/* ============================================================================= -+ * Standard antlr3 C runtime definitions -+ */ -+#include -+ -+/* End of standard antlr 3 runtime definitions -+ * ============================================================================= -+ */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+// Forward declare the context typedef so that we can use it before it is -+// properly defined. Delegators and delegates (from import statements) are -+// interdependent and their context structures contain pointers to each other -+// C only allows such things to be declared if you pre-declare the typedef. -+// -+typedef struct SMARTPLLexer_Ctx_struct SMARTPLLexer, * pSMARTPLLexer; -+ -+ -+ -+#ifdef ANTLR3_WINDOWS -+// Disable: Unreferenced parameter, - Rules with parameters that are not used -+// constant conditional, - ANTLR realizes that a prediction is always true (synpred usually) -+// initialized but unused variable - tree rewrite variables declared but not needed -+// Unreferenced local variable - lexer rule declares but does not always use _type -+// potentially unitialized variable used - retval always returned from a rule -+// unreferenced local function has been removed - susually getTokenNames or freeScope, they can go without warnigns -+// -+// These are only really displayed at warning level /W4 but that is the code ideal I am aiming at -+// and the codegen must generate some of these warnings by necessity, apart from 4100, which is -+// usually generated when a parser rule is given a parameter that it does not use. Mostly though -+// this is a matter of orthogonality hence I disable that one. -+// -+#pragma warning( disable : 4100 ) -+#pragma warning( disable : 4101 ) -+#pragma warning( disable : 4127 ) -+#pragma warning( disable : 4189 ) -+#pragma warning( disable : 4505 ) -+#pragma warning( disable : 4701 ) -+#endif -+ -+/** Context tracking structure for SMARTPLLexer -+ */ -+struct SMARTPLLexer_Ctx_struct -+{ -+ /** Built in ANTLR3 context tracker contains all the generic elements -+ * required for context tracking. -+ */ -+ pANTLR3_LEXER pLexer; -+ -+ -+ void (*mT__30) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mT__31) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mSTRTAG) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mINTTAG) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mDATETAG) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mENUMTAG) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mINCLUDES) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mIS) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mINTBOOL) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mGREATER) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mGREATEREQUAL) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mLESS) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mLESSEQUAL) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mEQUAL) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mAFTER) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mBEFORE) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mAGO) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mAND) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mOR) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mNOT) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mLPAR) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mRPAR) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mDATE) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mDATINTERVAL) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mENUMVAL) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mSTR) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mINT) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mWHITESPACE) (struct SMARTPLLexer_Ctx_struct * ctx); -+ void (*mTokens) (struct SMARTPLLexer_Ctx_struct * ctx); const char * (*getGrammarFileName)(); -+ void (*free) (struct SMARTPLLexer_Ctx_struct * ctx); -+ -+}; -+ -+// Function protoypes for the constructor functions that external translation units -+// such as delegators and delegates may wish to call. -+// -+ANTLR3_API pSMARTPLLexer SMARTPLLexerNew (pANTLR3_INPUT_STREAM instream); -+ANTLR3_API pSMARTPLLexer SMARTPLLexerNewSSD (pANTLR3_INPUT_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state); -+ -+/** Symbolic definitions of all the tokens that the lexer will work with. -+ * \{ -+ * -+ * Antlr will define EOF, but we can't use that as it it is too common in -+ * in C header files and that would be confusing. There is no way to filter this out at the moment -+ * so we just undef it here for now. That isn't the value we get back from C recognizers -+ * anyway. We are looking for ANTLR3_TOKEN_EOF. -+ */ -+#ifdef EOF -+#undef EOF -+#endif -+#ifdef Tokens -+#undef Tokens -+#endif -+#define INTBOOL 14 -+#define STRTAG 10 -+#define AGO 22 -+#define WHITESPACE 29 -+#define GREATEREQUAL 25 -+#define BEFORE 18 -+#define DATETAG 16 -+#define INT 15 -+#define NOT 7 -+#define AFTER 17 -+#define AND 6 -+#define EOF -1 -+#define INCLUDES 11 -+#define STR 4 -+#define T__30 30 -+#define T__31 31 -+#define GREATER 24 -+#define LPAR 8 -+#define ENUMTAG 19 -+#define IS 12 -+#define ENUMVAL 20 -+#define EQUAL 28 -+#define OR 5 -+#define LESS 26 -+#define RPAR 9 -+#define DATE 21 -+#define LESSEQUAL 27 -+#define INTTAG 13 -+#define DATINTERVAL 23 -+#ifdef EOF -+#undef EOF -+#define EOF ANTLR3_TOKEN_EOF -+#endif -+ -+#ifndef TOKENSOURCE -+#define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource -+#endif -+ -+/* End of token definitions for SMARTPLLexer -+ * ============================================================================= -+ */ -+/** \} */ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -+ -+/* END - Note:Keep extra line feed to satisfy UNIX systems */ -diff --git a/src/pregen/SMARTPLParser.c b/src/pregen/SMARTPLParser.c -new file mode 100644 -index 0000000..f39e5ae ---- /dev/null -+++ b/src/pregen/SMARTPLParser.c -@@ -0,0 +1,1812 @@ -+/** \file -+ * This C source file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : SMARTPL.g -+ * - On : 2016-01-01 12:23:40 -+ * - for the parser : SMARTPLParserParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+*/ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+/* ----------------------------------------- -+ * Include the ANTLR3 generated header file. -+ */ -+#include "SMARTPLParser.h" -+/* ----------------------------------------- */ -+ -+ -+ -+ -+ -+/* MACROS that hide the C interface implementations from the -+ * generated code, which makes it a little more understandable to the human eye. -+ * I am very much against using C pre-processor macros for function calls and bits -+ * of code as you cannot see what is happening when single stepping in debuggers -+ * and so on. The exception (in my book at least) is for generated code, where you are -+ * not maintaining it, but may wish to read and understand it. If you single step it, you know that input() -+ * hides some indirect calls, but is always referring to the input stream. This is -+ * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig -+ * the runtime interfaces without changing the generated code too often, without -+ * confusing the reader of the generated output, who may not wish to know the gory -+ * details of the interface inheritance. -+ */ -+ -+#define CTX ctx -+ -+/* Aids in accessing scopes for grammar programmers -+ */ -+#undef SCOPE_TYPE -+#undef SCOPE_STACK -+#undef SCOPE_TOP -+#define SCOPE_TYPE(scope) pSMARTPLParser_##scope##_SCOPE -+#define SCOPE_STACK(scope) pSMARTPLParser_##scope##Stack -+#define SCOPE_TOP(scope) ctx->pSMARTPLParser_##scope##Top -+#define SCOPE_SIZE(scope) ctx->pSMARTPLParser_##scope##Stack_limit -+#define SCOPE_INSTANCE(scope, i) (ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i)) -+ -+/* Macros for accessing things in the parser -+ */ -+ -+#undef PARSER -+#undef RECOGNIZER -+#undef HAVEPARSEDRULE -+#undef MEMOIZE -+#undef INPUT -+#undef STRSTREAM -+#undef HASEXCEPTION -+#undef EXCEPTION -+#undef MATCHT -+#undef MATCHANYT -+#undef FOLLOWSTACK -+#undef FOLLOWPUSH -+#undef FOLLOWPOP -+#undef PRECOVER -+#undef PREPORTERROR -+#undef LA -+#undef LT -+#undef CONSTRUCTEX -+#undef CONSUME -+#undef MARK -+#undef REWIND -+#undef REWINDLAST -+#undef PERRORRECOVERY -+#undef HASFAILED -+#undef FAILEDFLAG -+#undef RECOVERFROMMISMATCHEDSET -+#undef RECOVERFROMMISMATCHEDELEMENT -+#undef INDEX -+#undef ADAPTOR -+#undef SEEK -+#undef RULEMEMO -+#undef DBG -+ -+#define PARSER ctx->pParser -+#define RECOGNIZER PARSER->rec -+#define PSRSTATE RECOGNIZER->state -+#define HAVEPARSEDRULE(r) RECOGNIZER->alreadyParsedRule(RECOGNIZER, r) -+#define MEMOIZE(ri,si) RECOGNIZER->memoize(RECOGNIZER, ri, si) -+#define INPUT PARSER->tstream -+#define STRSTREAM INPUT -+#define ISTREAM INPUT->istream -+#define INDEX() ISTREAM->index(INPUT->istream) -+#define HASEXCEPTION() (PSRSTATE->error == ANTLR3_TRUE) -+#define EXCEPTION PSRSTATE->exception -+#define MATCHT(t, fs) RECOGNIZER->match(RECOGNIZER, t, fs) -+#define MATCHANYT() RECOGNIZER->matchAny(RECOGNIZER) -+#define FOLLOWSTACK PSRSTATE->following -+#define FOLLOWPUSH(x) FOLLOWSTACK->push(FOLLOWSTACK, ((void *)(&(x))), NULL) -+#define FOLLOWPOP() FOLLOWSTACK->pop(FOLLOWSTACK) -+#define PRECOVER() RECOGNIZER->recover(RECOGNIZER) -+#define PREPORTERROR() RECOGNIZER->reportError(RECOGNIZER) -+#define LA(n) INPUT->istream->_LA(ISTREAM, n) -+#define LT(n) INPUT->_LT(INPUT, n) -+#define CONSTRUCTEX() RECOGNIZER->exConstruct(RECOGNIZER) -+#define CONSUME() ISTREAM->consume(ISTREAM) -+#define MARK() ISTREAM->mark(ISTREAM) -+#define REWIND(m) ISTREAM->rewind(ISTREAM, m) -+#define REWINDLAST() ISTREAM->rewindLast(ISTREAM) -+#define SEEK(n) ISTREAM->seek(ISTREAM, n) -+#define PERRORRECOVERY PSRSTATE->errorRecovery -+#define FAILEDFLAG PSRSTATE->failed -+#define HASFAILED() (FAILEDFLAG == ANTLR3_TRUE) -+#define BACKTRACKING PSRSTATE->backtracking -+#define RECOVERFROMMISMATCHEDSET(s) RECOGNIZER->recoverFromMismatchedSet(RECOGNIZER, s) -+#define RECOVERFROMMISMATCHEDELEMENT(e) RECOGNIZER->recoverFromMismatchedElement(RECOGNIZER, s) -+#define ADAPTOR ctx->adaptor -+#define RULEMEMO PSRSTATE->ruleMemo -+#define DBG RECOGNIZER->debugger -+ -+#define TOKTEXT(tok, txt) tok, (pANTLR3_UINT8)txt -+ -+/* The 4 tokens defined below may well clash with your own #defines or token types. If so -+ * then for the present you must use different names for your defines as these are hard coded -+ * in the code generator. It would be better not to use such names internally, and maybe -+ * we can change this in a forthcoming release. I deliberately do not #undef these -+ * here as this will at least give you a redefined error somewhere if they clash. -+ */ -+#define UP ANTLR3_TOKEN_UP -+#define DOWN ANTLR3_TOKEN_DOWN -+#define EOR ANTLR3_TOKEN_EOR -+#define INVALID ANTLR3_TOKEN_INVALID -+ -+ -+/* ============================================================================= -+ * Functions to create and destroy scopes. First come the rule scopes, followed -+ * by the global declared scopes. -+ */ -+ -+ -+ -+/* ============================================================================= */ -+ -+/* ============================================================================= -+ * Start of recognizer -+ */ -+ -+ -+ -+/** \brief Table of all token names in symbolic order, mainly used for -+ * error reporting. -+ */ -+pANTLR3_UINT8 SMARTPLParserTokenNames[28+4] -+ = { -+ (pANTLR3_UINT8) "", /* String to print to indicate an invalid token */ -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "", -+ (pANTLR3_UINT8) "STR", -+ (pANTLR3_UINT8) "OR", -+ (pANTLR3_UINT8) "AND", -+ (pANTLR3_UINT8) "NOT", -+ (pANTLR3_UINT8) "LPAR", -+ (pANTLR3_UINT8) "RPAR", -+ (pANTLR3_UINT8) "STRTAG", -+ (pANTLR3_UINT8) "INCLUDES", -+ (pANTLR3_UINT8) "IS", -+ (pANTLR3_UINT8) "INTTAG", -+ (pANTLR3_UINT8) "INTBOOL", -+ (pANTLR3_UINT8) "INT", -+ (pANTLR3_UINT8) "DATETAG", -+ (pANTLR3_UINT8) "AFTER", -+ (pANTLR3_UINT8) "BEFORE", -+ (pANTLR3_UINT8) "ENUMTAG", -+ (pANTLR3_UINT8) "ENUMVAL", -+ (pANTLR3_UINT8) "DATE", -+ (pANTLR3_UINT8) "AGO", -+ (pANTLR3_UINT8) "DATINTERVAL", -+ (pANTLR3_UINT8) "GREATER", -+ (pANTLR3_UINT8) "GREATEREQUAL", -+ (pANTLR3_UINT8) "LESS", -+ (pANTLR3_UINT8) "LESSEQUAL", -+ (pANTLR3_UINT8) "EQUAL", -+ (pANTLR3_UINT8) "WHITESPACE", -+ (pANTLR3_UINT8) "'{'", -+ (pANTLR3_UINT8) "'}'" -+ }; -+ -+ -+ -+// Forward declare the locally static matching functions we have generated. -+// -+static SMARTPLParser_playlist_return playlist (pSMARTPLParser ctx); -+static SMARTPLParser_expression_return expression (pSMARTPLParser ctx); -+static SMARTPLParser_aexpr_return aexpr (pSMARTPLParser ctx); -+static SMARTPLParser_nexpr_return nexpr (pSMARTPLParser ctx); -+static SMARTPLParser_crit_return crit (pSMARTPLParser ctx); -+static SMARTPLParser_dateval_return dateval (pSMARTPLParser ctx); -+static SMARTPLParser_interval_return interval (pSMARTPLParser ctx); -+static void SMARTPLParserFree(pSMARTPLParser ctx); -+/* For use in tree output where we are accumulating rule labels via label += ruleRef -+ * we need a function that knows how to free a return scope when the list is destroyed. -+ * We cannot just use ANTLR3_FREE because in debug tracking mode, this is a macro. -+ */ -+static void ANTLR3_CDECL freeScope(void * scope) -+{ -+ ANTLR3_FREE(scope); -+} -+ -+/** \brief Name of the grammar file that generated this code -+ */ -+static const char fileName[] = "SMARTPL.g"; -+ -+/** \brief Return the name of the grammar file that generated this code. -+ */ -+static const char * getGrammarFileName() -+{ -+ return fileName; -+} -+/** \brief Create a new SMARTPLParser parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pSMARTPLParser -+SMARTPLParserNew (pANTLR3_COMMON_TOKEN_STREAM instream) -+{ -+ // See if we can create a new parser with the standard constructor -+ // -+ return SMARTPLParserNewSSD(instream, NULL); -+} -+ -+/** \brief Create a new SMARTPLParser parser and return a context for it. -+ * -+ * \param[in] instream Pointer to an input stream interface. -+ * -+ * \return Pointer to new parser context upon success. -+ */ -+ANTLR3_API pSMARTPLParser -+SMARTPLParserNewSSD (pANTLR3_COMMON_TOKEN_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state) -+{ -+ pSMARTPLParser ctx; /* Context structure we will build and return */ -+ -+ ctx = (pSMARTPLParser) ANTLR3_CALLOC(1, sizeof(SMARTPLParser)); -+ -+ if (ctx == NULL) -+ { -+ // Failed to allocate memory for parser context -+ // -+ return NULL; -+ } -+ -+ /* ------------------------------------------------------------------- -+ * Memory for basic structure is allocated, now to fill in -+ * the base ANTLR3 structures. We initialize the function pointers -+ * for the standard ANTLR3 parser function set, but upon return -+ * from here, the programmer may set the pointers to provide custom -+ * implementations of each function. -+ * -+ * We don't use the macros defined in SMARTPLParser.h here, in order that you can get a sense -+ * of what goes where. -+ */ -+ -+ /* Create a base parser/recognizer, using the supplied token stream -+ */ -+ ctx->pParser = antlr3ParserNewStream(ANTLR3_SIZE_HINT, instream->tstream, state); -+ /* Install the implementation of our SMARTPLParser interface -+ */ -+ ctx->playlist = playlist; -+ ctx->expression = expression; -+ ctx->aexpr = aexpr; -+ ctx->nexpr = nexpr; -+ ctx->crit = crit; -+ ctx->dateval = dateval; -+ ctx->interval = interval; -+ ctx->free = SMARTPLParserFree; -+ ctx->getGrammarFileName = getGrammarFileName; -+ -+ /* Install the scope pushing methods. -+ */ -+ ADAPTOR = ANTLR3_TREE_ADAPTORNew(instream->tstream->tokenSource->strFactory); -+ ctx->vectors = antlr3VectorFactoryNew(0); -+ -+ -+ -+ /* Install the token table -+ */ -+ PSRSTATE->tokenNames = SMARTPLParserTokenNames; -+ -+ -+ /* Return the newly built parser to the caller -+ */ -+ return ctx; -+} -+ -+/** Free the parser resources -+ */ -+ static void -+ SMARTPLParserFree(pSMARTPLParser ctx) -+ { -+ /* Free any scope memory -+ */ -+ -+ ctx->vectors->close(ctx->vectors); -+ /* We created the adaptor so we must free it -+ */ -+ ADAPTOR->free(ADAPTOR); -+ // Free this parser -+ // -+ ctx->pParser->free(ctx->pParser); -+ ANTLR3_FREE(ctx); -+ -+ /* Everything is released, so we can return -+ */ -+ return; -+ } -+ -+/** Return token names used by this parser -+ * -+ * The returned pointer is used as an index into the token names table (using the token -+ * number as the index). -+ * -+ * \return Pointer to first char * in the table. -+ */ -+static pANTLR3_UINT8 *getTokenNames() -+{ -+ return SMARTPLParserTokenNames; -+} -+ -+ -+/* Declare the bitsets -+ */ -+ -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STR_in_playlist42 */ -+static ANTLR3_BITWORD FOLLOW_STR_in_playlist42_bits[] = { ANTLR3_UINT64_LIT(0x0000000040000000) }; -+static ANTLR3_BITSET_LIST FOLLOW_STR_in_playlist42 = { FOLLOW_STR_in_playlist42_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_30_in_playlist44 */ -+static ANTLR3_BITWORD FOLLOW_30_in_playlist44_bits[] = { ANTLR3_UINT64_LIT(0x0000000000092580) }; -+static ANTLR3_BITSET_LIST FOLLOW_30_in_playlist44 = { FOLLOW_30_in_playlist44_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expression_in_playlist46 */ -+static ANTLR3_BITWORD FOLLOW_expression_in_playlist46_bits[] = { ANTLR3_UINT64_LIT(0x0000000080000000) }; -+static ANTLR3_BITSET_LIST FOLLOW_expression_in_playlist46 = { FOLLOW_expression_in_playlist46_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_31_in_playlist48 */ -+static ANTLR3_BITWORD FOLLOW_31_in_playlist48_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000000) }; -+static ANTLR3_BITSET_LIST FOLLOW_31_in_playlist48 = { FOLLOW_31_in_playlist48_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_EOF_in_playlist50 */ -+static ANTLR3_BITWORD FOLLOW_EOF_in_playlist50_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_EOF_in_playlist50 = { FOLLOW_EOF_in_playlist50_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_aexpr_in_expression62 */ -+static ANTLR3_BITWORD FOLLOW_aexpr_in_expression62_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000022) }; -+static ANTLR3_BITSET_LIST FOLLOW_aexpr_in_expression62 = { FOLLOW_aexpr_in_expression62_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_OR_in_expression65 */ -+static ANTLR3_BITWORD FOLLOW_OR_in_expression65_bits[] = { ANTLR3_UINT64_LIT(0x0000000000092580) }; -+static ANTLR3_BITSET_LIST FOLLOW_OR_in_expression65 = { FOLLOW_OR_in_expression65_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_aexpr_in_expression68 */ -+static ANTLR3_BITWORD FOLLOW_aexpr_in_expression68_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000022) }; -+static ANTLR3_BITSET_LIST FOLLOW_aexpr_in_expression68 = { FOLLOW_aexpr_in_expression68_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_nexpr_in_aexpr83 */ -+static ANTLR3_BITWORD FOLLOW_nexpr_in_aexpr83_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000042) }; -+static ANTLR3_BITSET_LIST FOLLOW_nexpr_in_aexpr83 = { FOLLOW_nexpr_in_aexpr83_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_AND_in_aexpr86 */ -+static ANTLR3_BITWORD FOLLOW_AND_in_aexpr86_bits[] = { ANTLR3_UINT64_LIT(0x0000000000092580) }; -+static ANTLR3_BITSET_LIST FOLLOW_AND_in_aexpr86 = { FOLLOW_AND_in_aexpr86_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_nexpr_in_aexpr89 */ -+static ANTLR3_BITWORD FOLLOW_nexpr_in_aexpr89_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000042) }; -+static ANTLR3_BITSET_LIST FOLLOW_nexpr_in_aexpr89 = { FOLLOW_nexpr_in_aexpr89_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_NOT_in_nexpr104 */ -+static ANTLR3_BITWORD FOLLOW_NOT_in_nexpr104_bits[] = { ANTLR3_UINT64_LIT(0x0000000000092580) }; -+static ANTLR3_BITSET_LIST FOLLOW_NOT_in_nexpr104 = { FOLLOW_NOT_in_nexpr104_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_crit_in_nexpr107 */ -+static ANTLR3_BITWORD FOLLOW_crit_in_nexpr107_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_crit_in_nexpr107 = { FOLLOW_crit_in_nexpr107_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_crit_in_nexpr114 */ -+static ANTLR3_BITWORD FOLLOW_crit_in_nexpr114_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_crit_in_nexpr114 = { FOLLOW_crit_in_nexpr114_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAR_in_crit127 */ -+static ANTLR3_BITWORD FOLLOW_LPAR_in_crit127_bits[] = { ANTLR3_UINT64_LIT(0x0000000000092580) }; -+static ANTLR3_BITSET_LIST FOLLOW_LPAR_in_crit127 = { FOLLOW_LPAR_in_crit127_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_expression_in_crit129 */ -+static ANTLR3_BITWORD FOLLOW_expression_in_crit129_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000200) }; -+static ANTLR3_BITSET_LIST FOLLOW_expression_in_crit129 = { FOLLOW_expression_in_crit129_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAR_in_crit131 */ -+static ANTLR3_BITWORD FOLLOW_RPAR_in_crit131_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_RPAR_in_crit131 = { FOLLOW_RPAR_in_crit131_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STRTAG_in_crit142 */ -+static ANTLR3_BITWORD FOLLOW_STRTAG_in_crit142_bits[] = { ANTLR3_UINT64_LIT(0x0000000000001800) }; -+static ANTLR3_BITSET_LIST FOLLOW_STRTAG_in_crit142 = { FOLLOW_STRTAG_in_crit142_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_set_in_crit144 */ -+static ANTLR3_BITWORD FOLLOW_set_in_crit144_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000010) }; -+static ANTLR3_BITSET_LIST FOLLOW_set_in_crit144 = { FOLLOW_set_in_crit144_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_STR_in_crit150 */ -+static ANTLR3_BITWORD FOLLOW_STR_in_crit150_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_STR_in_crit150 = { FOLLOW_STR_in_crit150_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTTAG_in_crit157 */ -+static ANTLR3_BITWORD FOLLOW_INTTAG_in_crit157_bits[] = { ANTLR3_UINT64_LIT(0x0000000000004000) }; -+static ANTLR3_BITSET_LIST FOLLOW_INTTAG_in_crit157 = { FOLLOW_INTTAG_in_crit157_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTBOOL_in_crit159 */ -+static ANTLR3_BITWORD FOLLOW_INTBOOL_in_crit159_bits[] = { ANTLR3_UINT64_LIT(0x0000000000008000) }; -+static ANTLR3_BITSET_LIST FOLLOW_INTBOOL_in_crit159 = { FOLLOW_INTBOOL_in_crit159_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INT_in_crit161 */ -+static ANTLR3_BITWORD FOLLOW_INT_in_crit161_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_INT_in_crit161 = { FOLLOW_INT_in_crit161_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATETAG_in_crit168 */ -+static ANTLR3_BITWORD FOLLOW_DATETAG_in_crit168_bits[] = { ANTLR3_UINT64_LIT(0x0000000000060000) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATETAG_in_crit168 = { FOLLOW_DATETAG_in_crit168_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_set_in_crit170 */ -+static ANTLR3_BITWORD FOLLOW_set_in_crit170_bits[] = { ANTLR3_UINT64_LIT(0x0000000000208000) }; -+static ANTLR3_BITSET_LIST FOLLOW_set_in_crit170 = { FOLLOW_set_in_crit170_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_dateval_in_crit176 */ -+static ANTLR3_BITWORD FOLLOW_dateval_in_crit176_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_dateval_in_crit176 = { FOLLOW_dateval_in_crit176_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_ENUMTAG_in_crit183 */ -+static ANTLR3_BITWORD FOLLOW_ENUMTAG_in_crit183_bits[] = { ANTLR3_UINT64_LIT(0x0000000000001000) }; -+static ANTLR3_BITSET_LIST FOLLOW_ENUMTAG_in_crit183 = { FOLLOW_ENUMTAG_in_crit183_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_IS_in_crit185 */ -+static ANTLR3_BITWORD FOLLOW_IS_in_crit185_bits[] = { ANTLR3_UINT64_LIT(0x0000000000100000) }; -+static ANTLR3_BITSET_LIST FOLLOW_IS_in_crit185 = { FOLLOW_IS_in_crit185_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_ENUMVAL_in_crit187 */ -+static ANTLR3_BITWORD FOLLOW_ENUMVAL_in_crit187_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_ENUMVAL_in_crit187 = { FOLLOW_ENUMVAL_in_crit187_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATE_in_dateval200 */ -+static ANTLR3_BITWORD FOLLOW_DATE_in_dateval200_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATE_in_dateval200 = { FOLLOW_DATE_in_dateval200_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_interval_in_dateval207 */ -+static ANTLR3_BITWORD FOLLOW_interval_in_dateval207_bits[] = { ANTLR3_UINT64_LIT(0x0000000000040000) }; -+static ANTLR3_BITSET_LIST FOLLOW_interval_in_dateval207 = { FOLLOW_interval_in_dateval207_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_BEFORE_in_dateval209 */ -+static ANTLR3_BITWORD FOLLOW_BEFORE_in_dateval209_bits[] = { ANTLR3_UINT64_LIT(0x0000000000200000) }; -+static ANTLR3_BITSET_LIST FOLLOW_BEFORE_in_dateval209 = { FOLLOW_BEFORE_in_dateval209_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATE_in_dateval211 */ -+static ANTLR3_BITWORD FOLLOW_DATE_in_dateval211_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATE_in_dateval211 = { FOLLOW_DATE_in_dateval211_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_interval_in_dateval218 */ -+static ANTLR3_BITWORD FOLLOW_interval_in_dateval218_bits[] = { ANTLR3_UINT64_LIT(0x0000000000020000) }; -+static ANTLR3_BITSET_LIST FOLLOW_interval_in_dateval218 = { FOLLOW_interval_in_dateval218_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_AFTER_in_dateval220 */ -+static ANTLR3_BITWORD FOLLOW_AFTER_in_dateval220_bits[] = { ANTLR3_UINT64_LIT(0x0000000000200000) }; -+static ANTLR3_BITSET_LIST FOLLOW_AFTER_in_dateval220 = { FOLLOW_AFTER_in_dateval220_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATE_in_dateval222 */ -+static ANTLR3_BITWORD FOLLOW_DATE_in_dateval222_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATE_in_dateval222 = { FOLLOW_DATE_in_dateval222_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_interval_in_dateval229 */ -+static ANTLR3_BITWORD FOLLOW_interval_in_dateval229_bits[] = { ANTLR3_UINT64_LIT(0x0000000000400000) }; -+static ANTLR3_BITSET_LIST FOLLOW_interval_in_dateval229 = { FOLLOW_interval_in_dateval229_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_AGO_in_dateval231 */ -+static ANTLR3_BITWORD FOLLOW_AGO_in_dateval231_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_AGO_in_dateval231 = { FOLLOW_AGO_in_dateval231_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_INT_in_interval243 */ -+static ANTLR3_BITWORD FOLLOW_INT_in_interval243_bits[] = { ANTLR3_UINT64_LIT(0x0000000000800000) }; -+static ANTLR3_BITSET_LIST FOLLOW_INT_in_interval243 = { FOLLOW_INT_in_interval243_bits, 1 }; -+/** Bitset defining follow set for error recovery in rule state: FOLLOW_DATINTERVAL_in_interval245 */ -+static ANTLR3_BITWORD FOLLOW_DATINTERVAL_in_interval245_bits[] = { ANTLR3_UINT64_LIT(0x0000000000000002) }; -+static ANTLR3_BITSET_LIST FOLLOW_DATINTERVAL_in_interval245 = { FOLLOW_DATINTERVAL_in_interval245_bits, 1 }; -+ -+ -+ -+ -+/* ============================================== -+ * Parsing rules -+ */ -+/** -+ * $ANTLR start playlist -+ * SMARTPL.g:27:1: playlist : STR '{' expression '}' EOF ; -+ */ -+static SMARTPLParser_playlist_return -+playlist(pSMARTPLParser ctx) -+{ -+ SMARTPLParser_playlist_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN STR1; -+ pANTLR3_COMMON_TOKEN char_literal2; -+ pANTLR3_COMMON_TOKEN char_literal4; -+ pANTLR3_COMMON_TOKEN EOF5; -+ SMARTPLParser_expression_return expression3; -+ #undef RETURN_TYPE_expression3 -+ #define RETURN_TYPE_expression3 SMARTPLParser_expression_return -+ -+ pANTLR3_BASE_TREE STR1_tree; -+ pANTLR3_BASE_TREE char_literal2_tree; -+ pANTLR3_BASE_TREE char_literal4_tree; -+ pANTLR3_BASE_TREE EOF5_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ STR1 = NULL; -+ char_literal2 = NULL; -+ char_literal4 = NULL; -+ EOF5 = NULL; -+ expression3.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ STR1_tree = NULL; -+ char_literal2_tree = NULL; -+ char_literal4_tree = NULL; -+ EOF5_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ // SMARTPL.g:27:10: ( STR '{' expression '}' EOF ) -+ // SMARTPL.g:27:12: STR '{' expression '}' EOF -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ STR1 = (pANTLR3_COMMON_TOKEN) MATCHT(STR, &FOLLOW_STR_in_playlist42); -+ if (HASEXCEPTION()) -+ { -+ goto ruleplaylistEx; -+ } -+ -+ STR1_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, STR1)); -+ ADAPTOR->addChild(ADAPTOR, root_0, STR1_tree); -+ -+ char_literal2 = (pANTLR3_COMMON_TOKEN) MATCHT(30, &FOLLOW_30_in_playlist44); -+ if (HASEXCEPTION()) -+ { -+ goto ruleplaylistEx; -+ } -+ -+ char_literal2_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, char_literal2)); -+ ADAPTOR->addChild(ADAPTOR, root_0, char_literal2_tree); -+ -+ FOLLOWPUSH(FOLLOW_expression_in_playlist46); -+ expression3=expression(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleplaylistEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, expression3.tree); -+ char_literal4 = (pANTLR3_COMMON_TOKEN) MATCHT(31, &FOLLOW_31_in_playlist48); -+ if (HASEXCEPTION()) -+ { -+ goto ruleplaylistEx; -+ } -+ -+ char_literal4_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, char_literal4)); -+ ADAPTOR->addChild(ADAPTOR, root_0, char_literal4_tree); -+ -+ EOF5 = (pANTLR3_COMMON_TOKEN) MATCHT(EOF, &FOLLOW_EOF_in_playlist50); -+ if (HASEXCEPTION()) -+ { -+ goto ruleplaylistEx; -+ } -+ -+ EOF5_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, EOF5)); -+ ADAPTOR->addChild(ADAPTOR, root_0, EOF5_tree); -+ -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleplaylistEx; /* Prevent compiler warnings */ -+ ruleplaylistEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end playlist */ -+ -+/** -+ * $ANTLR start expression -+ * SMARTPL.g:30:1: expression : aexpr ( OR aexpr )* ; -+ */ -+static SMARTPLParser_expression_return -+expression(pSMARTPLParser ctx) -+{ -+ SMARTPLParser_expression_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN OR7; -+ SMARTPLParser_aexpr_return aexpr6; -+ #undef RETURN_TYPE_aexpr6 -+ #define RETURN_TYPE_aexpr6 SMARTPLParser_aexpr_return -+ -+ SMARTPLParser_aexpr_return aexpr8; -+ #undef RETURN_TYPE_aexpr8 -+ #define RETURN_TYPE_aexpr8 SMARTPLParser_aexpr_return -+ -+ pANTLR3_BASE_TREE OR7_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ OR7 = NULL; -+ aexpr6.tree = NULL; -+ -+ aexpr8.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ OR7_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ // SMARTPL.g:30:12: ( aexpr ( OR aexpr )* ) -+ // SMARTPL.g:30:14: aexpr ( OR aexpr )* -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_aexpr_in_expression62); -+ aexpr6=aexpr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, aexpr6.tree); -+ -+ // SMARTPL.g:30:20: ( OR aexpr )* -+ -+ for (;;) -+ { -+ int alt1=2; -+ switch ( LA(1) ) -+ { -+ case OR: -+ { -+ alt1=1; -+ } -+ break; -+ -+ } -+ -+ switch (alt1) -+ { -+ case 1: -+ // SMARTPL.g:30:21: OR aexpr -+ { -+ OR7 = (pANTLR3_COMMON_TOKEN) MATCHT(OR, &FOLLOW_OR_in_expression65); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ OR7_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, OR7)); -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, OR7_tree, root_0)); -+ -+ FOLLOWPUSH(FOLLOW_aexpr_in_expression68); -+ aexpr8=aexpr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleexpressionEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, aexpr8.tree); -+ -+ } -+ break; -+ -+ default: -+ goto loop1; /* break out of the loop */ -+ break; -+ } -+ } -+ loop1: ; /* Jump out to here if this rule does not match */ -+ -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleexpressionEx; /* Prevent compiler warnings */ -+ ruleexpressionEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end expression */ -+ -+/** -+ * $ANTLR start aexpr -+ * SMARTPL.g:33:1: aexpr : nexpr ( AND nexpr )* ; -+ */ -+static SMARTPLParser_aexpr_return -+aexpr(pSMARTPLParser ctx) -+{ -+ SMARTPLParser_aexpr_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN AND10; -+ SMARTPLParser_nexpr_return nexpr9; -+ #undef RETURN_TYPE_nexpr9 -+ #define RETURN_TYPE_nexpr9 SMARTPLParser_nexpr_return -+ -+ SMARTPLParser_nexpr_return nexpr11; -+ #undef RETURN_TYPE_nexpr11 -+ #define RETURN_TYPE_nexpr11 SMARTPLParser_nexpr_return -+ -+ pANTLR3_BASE_TREE AND10_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ AND10 = NULL; -+ nexpr9.tree = NULL; -+ -+ nexpr11.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ AND10_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ // SMARTPL.g:33:8: ( nexpr ( AND nexpr )* ) -+ // SMARTPL.g:33:10: nexpr ( AND nexpr )* -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_nexpr_in_aexpr83); -+ nexpr9=nexpr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleaexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, nexpr9.tree); -+ -+ // SMARTPL.g:33:16: ( AND nexpr )* -+ -+ for (;;) -+ { -+ int alt2=2; -+ switch ( LA(1) ) -+ { -+ case AND: -+ { -+ alt2=1; -+ } -+ break; -+ -+ } -+ -+ switch (alt2) -+ { -+ case 1: -+ // SMARTPL.g:33:17: AND nexpr -+ { -+ AND10 = (pANTLR3_COMMON_TOKEN) MATCHT(AND, &FOLLOW_AND_in_aexpr86); -+ if (HASEXCEPTION()) -+ { -+ goto ruleaexprEx; -+ } -+ -+ AND10_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, AND10)); -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, AND10_tree, root_0)); -+ -+ FOLLOWPUSH(FOLLOW_nexpr_in_aexpr89); -+ nexpr11=nexpr(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruleaexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, nexpr11.tree); -+ -+ } -+ break; -+ -+ default: -+ goto loop2; /* break out of the loop */ -+ break; -+ } -+ } -+ loop2: ; /* Jump out to here if this rule does not match */ -+ -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleaexprEx; /* Prevent compiler warnings */ -+ ruleaexprEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end aexpr */ -+ -+/** -+ * $ANTLR start nexpr -+ * SMARTPL.g:36:1: nexpr : ( NOT crit | crit ); -+ */ -+static SMARTPLParser_nexpr_return -+nexpr(pSMARTPLParser ctx) -+{ -+ SMARTPLParser_nexpr_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN NOT12; -+ SMARTPLParser_crit_return crit13; -+ #undef RETURN_TYPE_crit13 -+ #define RETURN_TYPE_crit13 SMARTPLParser_crit_return -+ -+ SMARTPLParser_crit_return crit14; -+ #undef RETURN_TYPE_crit14 -+ #define RETURN_TYPE_crit14 SMARTPLParser_crit_return -+ -+ pANTLR3_BASE_TREE NOT12_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ NOT12 = NULL; -+ crit13.tree = NULL; -+ -+ crit14.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ NOT12_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ { -+ // SMARTPL.g:36:8: ( NOT crit | crit ) -+ -+ ANTLR3_UINT32 alt3; -+ -+ alt3=2; -+ -+ switch ( LA(1) ) -+ { -+ case NOT: -+ { -+ alt3=1; -+ } -+ break; -+ case LPAR: -+ case STRTAG: -+ case INTTAG: -+ case DATETAG: -+ case ENUMTAG: -+ { -+ alt3=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 3; -+ EXCEPTION->state = 0; -+ -+ -+ goto rulenexprEx; -+ } -+ -+ switch (alt3) -+ { -+ case 1: -+ // SMARTPL.g:36:10: NOT crit -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ NOT12 = (pANTLR3_COMMON_TOKEN) MATCHT(NOT, &FOLLOW_NOT_in_nexpr104); -+ if (HASEXCEPTION()) -+ { -+ goto rulenexprEx; -+ } -+ -+ NOT12_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, NOT12)); -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->becomeRoot(ADAPTOR, NOT12_tree, root_0)); -+ -+ FOLLOWPUSH(FOLLOW_crit_in_nexpr107); -+ crit13=crit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulenexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, crit13.tree); -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:37:6: crit -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_crit_in_nexpr114); -+ crit14=crit(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulenexprEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, crit14.tree); -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulenexprEx; /* Prevent compiler warnings */ -+ rulenexprEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end nexpr */ -+ -+/** -+ * $ANTLR start crit -+ * SMARTPL.g:40:1: crit : ( LPAR expression RPAR -> expression | STRTAG ( INCLUDES | IS ) STR | INTTAG INTBOOL INT | DATETAG ( AFTER | BEFORE ) dateval | ENUMTAG IS ENUMVAL ); -+ */ -+static SMARTPLParser_crit_return -+crit(pSMARTPLParser ctx) -+{ -+ SMARTPLParser_crit_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN LPAR15; -+ pANTLR3_COMMON_TOKEN RPAR17; -+ pANTLR3_COMMON_TOKEN STRTAG18; -+ pANTLR3_COMMON_TOKEN set19; -+ pANTLR3_COMMON_TOKEN STR20; -+ pANTLR3_COMMON_TOKEN INTTAG21; -+ pANTLR3_COMMON_TOKEN INTBOOL22; -+ pANTLR3_COMMON_TOKEN INT23; -+ pANTLR3_COMMON_TOKEN DATETAG24; -+ pANTLR3_COMMON_TOKEN set25; -+ pANTLR3_COMMON_TOKEN ENUMTAG27; -+ pANTLR3_COMMON_TOKEN IS28; -+ pANTLR3_COMMON_TOKEN ENUMVAL29; -+ SMARTPLParser_expression_return expression16; -+ #undef RETURN_TYPE_expression16 -+ #define RETURN_TYPE_expression16 SMARTPLParser_expression_return -+ -+ SMARTPLParser_dateval_return dateval26; -+ #undef RETURN_TYPE_dateval26 -+ #define RETURN_TYPE_dateval26 SMARTPLParser_dateval_return -+ -+ pANTLR3_BASE_TREE LPAR15_tree; -+ pANTLR3_BASE_TREE RPAR17_tree; -+ pANTLR3_BASE_TREE STRTAG18_tree; -+ pANTLR3_BASE_TREE set19_tree; -+ pANTLR3_BASE_TREE STR20_tree; -+ pANTLR3_BASE_TREE INTTAG21_tree; -+ pANTLR3_BASE_TREE INTBOOL22_tree; -+ pANTLR3_BASE_TREE INT23_tree; -+ pANTLR3_BASE_TREE DATETAG24_tree; -+ pANTLR3_BASE_TREE set25_tree; -+ pANTLR3_BASE_TREE ENUMTAG27_tree; -+ pANTLR3_BASE_TREE IS28_tree; -+ pANTLR3_BASE_TREE ENUMVAL29_tree; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_RPAR; -+ pANTLR3_REWRITE_RULE_TOKEN_STREAM stream_LPAR; -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_expression; -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ LPAR15 = NULL; -+ RPAR17 = NULL; -+ STRTAG18 = NULL; -+ set19 = NULL; -+ STR20 = NULL; -+ INTTAG21 = NULL; -+ INTBOOL22 = NULL; -+ INT23 = NULL; -+ DATETAG24 = NULL; -+ set25 = NULL; -+ ENUMTAG27 = NULL; -+ IS28 = NULL; -+ ENUMVAL29 = NULL; -+ expression16.tree = NULL; -+ -+ dateval26.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ LPAR15_tree = NULL; -+ RPAR17_tree = NULL; -+ STRTAG18_tree = NULL; -+ set19_tree = NULL; -+ STR20_tree = NULL; -+ INTTAG21_tree = NULL; -+ INTBOOL22_tree = NULL; -+ INT23_tree = NULL; -+ DATETAG24_tree = NULL; -+ set25_tree = NULL; -+ ENUMTAG27_tree = NULL; -+ IS28_tree = NULL; -+ ENUMVAL29_tree = NULL; -+ -+ stream_RPAR = NULL; -+ #define CREATE_stream_RPAR if (stream_RPAR == NULL) {stream_RPAR = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token RPAR"); } -+ stream_LPAR = NULL; -+ #define CREATE_stream_LPAR if (stream_LPAR == NULL) {stream_LPAR = antlr3RewriteRuleTOKENStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token LPAR"); } -+ stream_expression = NULL; -+ #define CREATE_stream_expression if (stream_expression == NULL) {stream_expression = antlr3RewriteRuleSubtreeStreamNewAE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"rule expression"); } -+ -+ retval.tree = NULL; -+ { -+ { -+ // SMARTPL.g:40:7: ( LPAR expression RPAR -> expression | STRTAG ( INCLUDES | IS ) STR | INTTAG INTBOOL INT | DATETAG ( AFTER | BEFORE ) dateval | ENUMTAG IS ENUMVAL ) -+ -+ ANTLR3_UINT32 alt4; -+ -+ alt4=5; -+ -+ switch ( LA(1) ) -+ { -+ case LPAR: -+ { -+ alt4=1; -+ } -+ break; -+ case STRTAG: -+ { -+ alt4=2; -+ } -+ break; -+ case INTTAG: -+ { -+ alt4=3; -+ } -+ break; -+ case DATETAG: -+ { -+ alt4=4; -+ } -+ break; -+ case ENUMTAG: -+ { -+ alt4=5; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 4; -+ EXCEPTION->state = 0; -+ -+ -+ goto rulecritEx; -+ } -+ -+ switch (alt4) -+ { -+ case 1: -+ // SMARTPL.g:40:9: LPAR expression RPAR -+ { -+ LPAR15 = (pANTLR3_COMMON_TOKEN) MATCHT(LPAR, &FOLLOW_LPAR_in_crit127); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ CREATE_stream_LPAR; stream_LPAR->add(stream_LPAR, LPAR15, NULL); -+ -+ FOLLOWPUSH(FOLLOW_expression_in_crit129); -+ expression16=expression(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ CREATE_stream_expression; stream_expression->add(stream_expression, expression16.tree, NULL); -+ RPAR17 = (pANTLR3_COMMON_TOKEN) MATCHT(RPAR, &FOLLOW_RPAR_in_crit131); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ CREATE_stream_RPAR; stream_RPAR->add(stream_RPAR, RPAR17, NULL); -+ -+ -+ -+ /* AST REWRITE -+ * elements : expression -+ * token labels : -+ * rule labels : retval -+ * token list labels : -+ * rule list labels : -+ */ -+ { -+ pANTLR3_REWRITE_RULE_SUBTREE_STREAM stream_retval; -+ -+ stream_retval=antlr3RewriteRuleSubtreeStreamNewAEE(ADAPTOR, RECOGNIZER, (pANTLR3_UINT8)"token retval", retval.tree != NULL ? retval.tree : NULL); -+ -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ retval.tree = root_0; -+ // 40:30: -> expression -+ { -+ ADAPTOR->addChild(ADAPTOR, root_0, stream_expression == NULL ? NULL : stream_expression->nextTree(stream_expression)); -+ -+ } -+ -+ retval.tree = root_0; // set result root -+ if (stream_retval != NULL) stream_retval->free(stream_retval); -+ -+ -+ } -+ } -+ break; -+ case 2: -+ // SMARTPL.g:41:6: STRTAG ( INCLUDES | IS ) STR -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ STRTAG18 = (pANTLR3_COMMON_TOKEN) MATCHT(STRTAG, &FOLLOW_STRTAG_in_crit142); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ STRTAG18_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, STRTAG18)); -+ ADAPTOR->addChild(ADAPTOR, root_0, STRTAG18_tree); -+ -+ set19=(pANTLR3_COMMON_TOKEN)LT(1); -+ if ( ((LA(1) >= INCLUDES) && (LA(1) <= IS)) ) -+ { -+ CONSUME(); -+ ADAPTOR->addChild(ADAPTOR, root_0, (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, set19))); -+ PERRORRECOVERY=ANTLR3_FALSE; -+ } -+ else -+ { -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; -+ EXCEPTION->expectingSet = &FOLLOW_set_in_crit144; -+ RECOVERFROMMISMATCHEDSET(&FOLLOW_set_in_crit144); goto rulecritEx; -+ } -+ -+ STR20 = (pANTLR3_COMMON_TOKEN) MATCHT(STR, &FOLLOW_STR_in_crit150); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ STR20_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, STR20)); -+ ADAPTOR->addChild(ADAPTOR, root_0, STR20_tree); -+ -+ -+ } -+ break; -+ case 3: -+ // SMARTPL.g:42:6: INTTAG INTBOOL INT -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ INTTAG21 = (pANTLR3_COMMON_TOKEN) MATCHT(INTTAG, &FOLLOW_INTTAG_in_crit157); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ INTTAG21_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, INTTAG21)); -+ ADAPTOR->addChild(ADAPTOR, root_0, INTTAG21_tree); -+ -+ INTBOOL22 = (pANTLR3_COMMON_TOKEN) MATCHT(INTBOOL, &FOLLOW_INTBOOL_in_crit159); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ INTBOOL22_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, INTBOOL22)); -+ ADAPTOR->addChild(ADAPTOR, root_0, INTBOOL22_tree); -+ -+ INT23 = (pANTLR3_COMMON_TOKEN) MATCHT(INT, &FOLLOW_INT_in_crit161); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ INT23_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, INT23)); -+ ADAPTOR->addChild(ADAPTOR, root_0, INT23_tree); -+ -+ -+ } -+ break; -+ case 4: -+ // SMARTPL.g:43:6: DATETAG ( AFTER | BEFORE ) dateval -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ DATETAG24 = (pANTLR3_COMMON_TOKEN) MATCHT(DATETAG, &FOLLOW_DATETAG_in_crit168); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ DATETAG24_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, DATETAG24)); -+ ADAPTOR->addChild(ADAPTOR, root_0, DATETAG24_tree); -+ -+ set25=(pANTLR3_COMMON_TOKEN)LT(1); -+ if ( ((LA(1) >= AFTER) && (LA(1) <= BEFORE)) ) -+ { -+ CONSUME(); -+ ADAPTOR->addChild(ADAPTOR, root_0, (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, set25))); -+ PERRORRECOVERY=ANTLR3_FALSE; -+ } -+ else -+ { -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_MISMATCHED_SET_EXCEPTION; -+ EXCEPTION->name = (void *)ANTLR3_MISMATCHED_SET_NAME; -+ EXCEPTION->expectingSet = &FOLLOW_set_in_crit170; -+ RECOVERFROMMISMATCHEDSET(&FOLLOW_set_in_crit170); goto rulecritEx; -+ } -+ -+ FOLLOWPUSH(FOLLOW_dateval_in_crit176); -+ dateval26=dateval(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, dateval26.tree); -+ -+ } -+ break; -+ case 5: -+ // SMARTPL.g:44:6: ENUMTAG IS ENUMVAL -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ ENUMTAG27 = (pANTLR3_COMMON_TOKEN) MATCHT(ENUMTAG, &FOLLOW_ENUMTAG_in_crit183); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ ENUMTAG27_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, ENUMTAG27)); -+ ADAPTOR->addChild(ADAPTOR, root_0, ENUMTAG27_tree); -+ -+ IS28 = (pANTLR3_COMMON_TOKEN) MATCHT(IS, &FOLLOW_IS_in_crit185); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ IS28_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, IS28)); -+ ADAPTOR->addChild(ADAPTOR, root_0, IS28_tree); -+ -+ ENUMVAL29 = (pANTLR3_COMMON_TOKEN) MATCHT(ENUMVAL, &FOLLOW_ENUMVAL_in_crit187); -+ if (HASEXCEPTION()) -+ { -+ goto rulecritEx; -+ } -+ -+ ENUMVAL29_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, ENUMVAL29)); -+ ADAPTOR->addChild(ADAPTOR, root_0, ENUMVAL29_tree); -+ -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto rulecritEx; /* Prevent compiler warnings */ -+ rulecritEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ if (stream_RPAR != NULL) stream_RPAR->free(stream_RPAR); -+ if (stream_LPAR != NULL) stream_LPAR->free(stream_LPAR); -+ if (stream_expression != NULL) stream_expression->free(stream_expression); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end crit */ -+ -+/** -+ * $ANTLR start dateval -+ * SMARTPL.g:47:1: dateval : ( DATE | interval BEFORE DATE | interval AFTER DATE | interval AGO ); -+ */ -+static SMARTPLParser_dateval_return -+dateval(pSMARTPLParser ctx) -+{ -+ SMARTPLParser_dateval_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN DATE30; -+ pANTLR3_COMMON_TOKEN BEFORE32; -+ pANTLR3_COMMON_TOKEN DATE33; -+ pANTLR3_COMMON_TOKEN AFTER35; -+ pANTLR3_COMMON_TOKEN DATE36; -+ pANTLR3_COMMON_TOKEN AGO38; -+ SMARTPLParser_interval_return interval31; -+ #undef RETURN_TYPE_interval31 -+ #define RETURN_TYPE_interval31 SMARTPLParser_interval_return -+ -+ SMARTPLParser_interval_return interval34; -+ #undef RETURN_TYPE_interval34 -+ #define RETURN_TYPE_interval34 SMARTPLParser_interval_return -+ -+ SMARTPLParser_interval_return interval37; -+ #undef RETURN_TYPE_interval37 -+ #define RETURN_TYPE_interval37 SMARTPLParser_interval_return -+ -+ pANTLR3_BASE_TREE DATE30_tree; -+ pANTLR3_BASE_TREE BEFORE32_tree; -+ pANTLR3_BASE_TREE DATE33_tree; -+ pANTLR3_BASE_TREE AFTER35_tree; -+ pANTLR3_BASE_TREE DATE36_tree; -+ pANTLR3_BASE_TREE AGO38_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ DATE30 = NULL; -+ BEFORE32 = NULL; -+ DATE33 = NULL; -+ AFTER35 = NULL; -+ DATE36 = NULL; -+ AGO38 = NULL; -+ interval31.tree = NULL; -+ -+ interval34.tree = NULL; -+ -+ interval37.tree = NULL; -+ -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ DATE30_tree = NULL; -+ BEFORE32_tree = NULL; -+ DATE33_tree = NULL; -+ AFTER35_tree = NULL; -+ DATE36_tree = NULL; -+ AGO38_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ { -+ // SMARTPL.g:47:10: ( DATE | interval BEFORE DATE | interval AFTER DATE | interval AGO ) -+ -+ ANTLR3_UINT32 alt5; -+ -+ alt5=4; -+ -+ switch ( LA(1) ) -+ { -+ case DATE: -+ { -+ alt5=1; -+ } -+ break; -+ case INT: -+ { -+ switch ( LA(2) ) -+ { -+ case DATINTERVAL: -+ { -+ switch ( LA(3) ) -+ { -+ case AGO: -+ { -+ alt5=4; -+ } -+ break; -+ case AFTER: -+ { -+ alt5=3; -+ } -+ break; -+ case BEFORE: -+ { -+ alt5=2; -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 5; -+ EXCEPTION->state = 3; -+ -+ -+ goto ruledatevalEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 5; -+ EXCEPTION->state = 2; -+ -+ -+ goto ruledatevalEx; -+ } -+ -+ } -+ break; -+ -+ default: -+ CONSTRUCTEX(); -+ EXCEPTION->type = ANTLR3_NO_VIABLE_ALT_EXCEPTION; -+ EXCEPTION->message = (void *)""; -+ EXCEPTION->decisionNum = 5; -+ EXCEPTION->state = 0; -+ -+ -+ goto ruledatevalEx; -+ } -+ -+ switch (alt5) -+ { -+ case 1: -+ // SMARTPL.g:47:12: DATE -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ DATE30 = (pANTLR3_COMMON_TOKEN) MATCHT(DATE, &FOLLOW_DATE_in_dateval200); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ DATE30_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, DATE30)); -+ ADAPTOR->addChild(ADAPTOR, root_0, DATE30_tree); -+ -+ -+ } -+ break; -+ case 2: -+ // SMARTPL.g:48:6: interval BEFORE DATE -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_interval_in_dateval207); -+ interval31=interval(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, interval31.tree); -+ BEFORE32 = (pANTLR3_COMMON_TOKEN) MATCHT(BEFORE, &FOLLOW_BEFORE_in_dateval209); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ BEFORE32_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, BEFORE32)); -+ ADAPTOR->addChild(ADAPTOR, root_0, BEFORE32_tree); -+ -+ DATE33 = (pANTLR3_COMMON_TOKEN) MATCHT(DATE, &FOLLOW_DATE_in_dateval211); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ DATE33_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, DATE33)); -+ ADAPTOR->addChild(ADAPTOR, root_0, DATE33_tree); -+ -+ -+ } -+ break; -+ case 3: -+ // SMARTPL.g:49:6: interval AFTER DATE -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_interval_in_dateval218); -+ interval34=interval(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, interval34.tree); -+ AFTER35 = (pANTLR3_COMMON_TOKEN) MATCHT(AFTER, &FOLLOW_AFTER_in_dateval220); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ AFTER35_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, AFTER35)); -+ ADAPTOR->addChild(ADAPTOR, root_0, AFTER35_tree); -+ -+ DATE36 = (pANTLR3_COMMON_TOKEN) MATCHT(DATE, &FOLLOW_DATE_in_dateval222); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ DATE36_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, DATE36)); -+ ADAPTOR->addChild(ADAPTOR, root_0, DATE36_tree); -+ -+ -+ } -+ break; -+ case 4: -+ // SMARTPL.g:50:6: interval AGO -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ FOLLOWPUSH(FOLLOW_interval_in_dateval229); -+ interval37=interval(ctx); -+ -+ FOLLOWPOP(); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ ADAPTOR->addChild(ADAPTOR, root_0, interval37.tree); -+ AGO38 = (pANTLR3_COMMON_TOKEN) MATCHT(AGO, &FOLLOW_AGO_in_dateval231); -+ if (HASEXCEPTION()) -+ { -+ goto ruledatevalEx; -+ } -+ -+ AGO38_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, AGO38)); -+ ADAPTOR->addChild(ADAPTOR, root_0, AGO38_tree); -+ -+ -+ } -+ break; -+ -+ } -+ } -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruledatevalEx; /* Prevent compiler warnings */ -+ ruledatevalEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end dateval */ -+ -+/** -+ * $ANTLR start interval -+ * SMARTPL.g:53:1: interval : INT DATINTERVAL ; -+ */ -+static SMARTPLParser_interval_return -+interval(pSMARTPLParser ctx) -+{ -+ SMARTPLParser_interval_return retval; -+ -+ pANTLR3_BASE_TREE root_0; -+ -+ pANTLR3_COMMON_TOKEN INT39; -+ pANTLR3_COMMON_TOKEN DATINTERVAL40; -+ -+ pANTLR3_BASE_TREE INT39_tree; -+ pANTLR3_BASE_TREE DATINTERVAL40_tree; -+ -+ /* Initialize rule variables -+ */ -+ -+ -+ root_0 = NULL; -+ -+ INT39 = NULL; -+ DATINTERVAL40 = NULL; -+ retval.start = LT(1); retval.stop = retval.start; -+ -+ INT39_tree = NULL; -+ DATINTERVAL40_tree = NULL; -+ -+ -+ retval.tree = NULL; -+ { -+ // SMARTPL.g:53:10: ( INT DATINTERVAL ) -+ // SMARTPL.g:53:12: INT DATINTERVAL -+ { -+ root_0 = (pANTLR3_BASE_TREE)(ADAPTOR->nilNode(ADAPTOR)); -+ -+ INT39 = (pANTLR3_COMMON_TOKEN) MATCHT(INT, &FOLLOW_INT_in_interval243); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintervalEx; -+ } -+ -+ INT39_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, INT39)); -+ ADAPTOR->addChild(ADAPTOR, root_0, INT39_tree); -+ -+ DATINTERVAL40 = (pANTLR3_COMMON_TOKEN) MATCHT(DATINTERVAL, &FOLLOW_DATINTERVAL_in_interval245); -+ if (HASEXCEPTION()) -+ { -+ goto ruleintervalEx; -+ } -+ -+ DATINTERVAL40_tree = (pANTLR3_BASE_TREE)(ADAPTOR->create(ADAPTOR, DATINTERVAL40)); -+ ADAPTOR->addChild(ADAPTOR, root_0, DATINTERVAL40_tree); -+ -+ -+ } -+ -+ } -+ -+ -+ // This is where rules clean up and exit -+ // -+ goto ruleintervalEx; /* Prevent compiler warnings */ -+ ruleintervalEx: ; -+ retval.stop = LT(-1); -+ -+ retval.stop = LT(-1); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->rulePostProcessing(ADAPTOR, root_0)); -+ ADAPTOR->setTokenBoundaries(ADAPTOR, retval.tree, retval.start, retval.stop); -+ -+ if (HASEXCEPTION()) -+ { -+ PREPORTERROR(); -+ PRECOVER(); -+ retval.tree = (pANTLR3_BASE_TREE)(ADAPTOR->errorNode(ADAPTOR, INPUT, retval.start, LT(-1), EXCEPTION)); -+ } -+ -+ -+ return retval; -+} -+/* $ANTLR end interval */ -+/* End of parsing rules -+ * ============================================== -+ */ -+ -+/* ============================================== -+ * Syntactic predicates -+ */ -+/* End of syntactic predicates -+ * ============================================== -+ */ -+ -+ -+ -+ -+ -+ -+/* End of code -+ * ============================================================================= -+ */ -diff --git a/src/pregen/SMARTPLParser.h b/src/pregen/SMARTPLParser.h -new file mode 100644 -index 0000000..38ef500 ---- /dev/null -+++ b/src/pregen/SMARTPLParser.h -@@ -0,0 +1,285 @@ -+/** \file -+ * This C header file was generated by $ANTLR version 3.2 debian-7ubuntu3 -+ * -+ * - From the grammar source file : SMARTPL.g -+ * - On : 2016-01-01 12:23:40 -+ * - for the parser : SMARTPLParserParser * -+ * Editing it, at least manually, is not wise. -+ * -+ * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws. -+ * -+ * -+ * The parser SMARTPLParser has the callable functions (rules) shown below, -+ * which will invoke the code for the associated rule in the source grammar -+ * assuming that the input stream is pointing to a token/text stream that could begin -+ * this rule. -+ * -+ * For instance if you call the first (topmost) rule in a parser grammar, you will -+ * get the results of a full parse, but calling a rule half way through the grammar will -+ * allow you to pass part of a full token stream to the parser, such as for syntax checking -+ * in editors and so on. -+ * -+ * The parser entry points are called indirectly (by function pointer to function) via -+ * a parser context typedef pSMARTPLParser, which is returned from a call to SMARTPLParserNew(). -+ * -+ * The methods in pSMARTPLParser are as follows: -+ * -+ * - SMARTPLParser_playlist_return pSMARTPLParser->playlist(pSMARTPLParser) -+ * - SMARTPLParser_expression_return pSMARTPLParser->expression(pSMARTPLParser) -+ * - SMARTPLParser_aexpr_return pSMARTPLParser->aexpr(pSMARTPLParser) -+ * - SMARTPLParser_nexpr_return pSMARTPLParser->nexpr(pSMARTPLParser) -+ * - SMARTPLParser_crit_return pSMARTPLParser->crit(pSMARTPLParser) -+ * - SMARTPLParser_dateval_return pSMARTPLParser->dateval(pSMARTPLParser) -+ * - SMARTPLParser_interval_return pSMARTPLParser->interval(pSMARTPLParser) -+ * -+ * The return type for any particular rule is of course determined by the source -+ * grammar file. -+ */ -+// [The "BSD licence"] -+// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC -+// http://www.temporal-wave.com -+// http://www.linkedin.com/in/jimidle -+// -+// All rights reserved. -+// -+// Redistribution and use in source and binary forms, with or without -+// modification, are permitted provided that the following conditions -+// are met: -+// 1. Redistributions of source code must retain the above copyright -+// notice, this list of conditions and the following disclaimer. -+// 2. Redistributions in binary form must reproduce the above copyright -+// notice, this list of conditions and the following disclaimer in the -+// documentation and/or other materials provided with the distribution. -+// 3. The name of the author may not be used to endorse or promote products -+// derived from this software without specific prior written permission. -+// -+// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -+// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -+// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -+// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -+// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ -+#ifndef _SMARTPLParser_H -+#define _SMARTPLParser_H -+/* ============================================================================= -+ * Standard antlr3 C runtime definitions -+ */ -+#include -+ -+/* End of standard antlr 3 runtime definitions -+ * ============================================================================= -+ */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+// Forward declare the context typedef so that we can use it before it is -+// properly defined. Delegators and delegates (from import statements) are -+// interdependent and their context structures contain pointers to each other -+// C only allows such things to be declared if you pre-declare the typedef. -+// -+typedef struct SMARTPLParser_Ctx_struct SMARTPLParser, * pSMARTPLParser; -+ -+ -+ -+#ifdef ANTLR3_WINDOWS -+// Disable: Unreferenced parameter, - Rules with parameters that are not used -+// constant conditional, - ANTLR realizes that a prediction is always true (synpred usually) -+// initialized but unused variable - tree rewrite variables declared but not needed -+// Unreferenced local variable - lexer rule declares but does not always use _type -+// potentially unitialized variable used - retval always returned from a rule -+// unreferenced local function has been removed - susually getTokenNames or freeScope, they can go without warnigns -+// -+// These are only really displayed at warning level /W4 but that is the code ideal I am aiming at -+// and the codegen must generate some of these warnings by necessity, apart from 4100, which is -+// usually generated when a parser rule is given a parameter that it does not use. Mostly though -+// this is a matter of orthogonality hence I disable that one. -+// -+#pragma warning( disable : 4100 ) -+#pragma warning( disable : 4101 ) -+#pragma warning( disable : 4127 ) -+#pragma warning( disable : 4189 ) -+#pragma warning( disable : 4505 ) -+#pragma warning( disable : 4701 ) -+#endif -+typedef struct SMARTPLParser_playlist_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ SMARTPLParser_playlist_return; -+ -+typedef struct SMARTPLParser_expression_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ SMARTPLParser_expression_return; -+ -+typedef struct SMARTPLParser_aexpr_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ SMARTPLParser_aexpr_return; -+ -+typedef struct SMARTPLParser_nexpr_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ SMARTPLParser_nexpr_return; -+ -+typedef struct SMARTPLParser_crit_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ SMARTPLParser_crit_return; -+ -+typedef struct SMARTPLParser_dateval_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ SMARTPLParser_dateval_return; -+ -+typedef struct SMARTPLParser_interval_return_struct -+{ -+ /** Generic return elements for ANTLR3 rules that are not in tree parsers or returning trees -+ */ -+ pANTLR3_COMMON_TOKEN start; -+ pANTLR3_COMMON_TOKEN stop; -+ pANTLR3_BASE_TREE tree; -+ -+} -+ SMARTPLParser_interval_return; -+ -+ -+ -+/** Context tracking structure for SMARTPLParser -+ */ -+struct SMARTPLParser_Ctx_struct -+{ -+ /** Built in ANTLR3 context tracker contains all the generic elements -+ * required for context tracking. -+ */ -+ pANTLR3_PARSER pParser; -+ -+ -+ SMARTPLParser_playlist_return (*playlist) (struct SMARTPLParser_Ctx_struct * ctx); -+ SMARTPLParser_expression_return (*expression) (struct SMARTPLParser_Ctx_struct * ctx); -+ SMARTPLParser_aexpr_return (*aexpr) (struct SMARTPLParser_Ctx_struct * ctx); -+ SMARTPLParser_nexpr_return (*nexpr) (struct SMARTPLParser_Ctx_struct * ctx); -+ SMARTPLParser_crit_return (*crit) (struct SMARTPLParser_Ctx_struct * ctx); -+ SMARTPLParser_dateval_return (*dateval) (struct SMARTPLParser_Ctx_struct * ctx); -+ SMARTPLParser_interval_return (*interval) (struct SMARTPLParser_Ctx_struct * ctx); -+ // Delegated rules -+ const char * (*getGrammarFileName)(); -+ void (*free) (struct SMARTPLParser_Ctx_struct * ctx); -+ /* @headerFile.members() */ -+ pANTLR3_BASE_TREE_ADAPTOR adaptor; -+ pANTLR3_VECTOR_FACTORY vectors; -+ /* End @headerFile.members() */ -+}; -+ -+// Function protoypes for the constructor functions that external translation units -+// such as delegators and delegates may wish to call. -+// -+ANTLR3_API pSMARTPLParser SMARTPLParserNew (pANTLR3_COMMON_TOKEN_STREAM instream); -+ANTLR3_API pSMARTPLParser SMARTPLParserNewSSD (pANTLR3_COMMON_TOKEN_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state); -+ -+/** Symbolic definitions of all the tokens that the parser will work with. -+ * \{ -+ * -+ * Antlr will define EOF, but we can't use that as it it is too common in -+ * in C header files and that would be confusing. There is no way to filter this out at the moment -+ * so we just undef it here for now. That isn't the value we get back from C recognizers -+ * anyway. We are looking for ANTLR3_TOKEN_EOF. -+ */ -+#ifdef EOF -+#undef EOF -+#endif -+#ifdef Tokens -+#undef Tokens -+#endif -+#define INTBOOL 14 -+#define STRTAG 10 -+#define AGO 22 -+#define WHITESPACE 29 -+#define GREATEREQUAL 25 -+#define BEFORE 18 -+#define DATETAG 16 -+#define INT 15 -+#define NOT 7 -+#define AFTER 17 -+#define AND 6 -+#define EOF -1 -+#define INCLUDES 11 -+#define STR 4 -+#define T__30 30 -+#define T__31 31 -+#define GREATER 24 -+#define LPAR 8 -+#define ENUMTAG 19 -+#define IS 12 -+#define ENUMVAL 20 -+#define EQUAL 28 -+#define OR 5 -+#define LESS 26 -+#define RPAR 9 -+#define DATE 21 -+#define LESSEQUAL 27 -+#define DATINTERVAL 23 -+#define INTTAG 13 -+#ifdef EOF -+#undef EOF -+#define EOF ANTLR3_TOKEN_EOF -+#endif -+ -+#ifndef TOKENSOURCE -+#define TOKENSOURCE(lxr) lxr->pLexer->rec->state->tokSource -+#endif -+ -+/* End of token definitions for SMARTPLParser -+ * ============================================================================= -+ */ -+/** \} */ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif -+ -+/* END - Note:Keep extra line feed to satisfy UNIX systems */ diff --git a/sound/lame/Makefile b/sound/lame/Makefile deleted file mode 100644 index 41a90f7..0000000 --- a/sound/lame/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# blogic@openwrt.org - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lame -PKG_VERSION:=3.99.5 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/lame -PKG_MD5SUM:=84835b313d4a8b68f5349816d33e07ce -PKG_FIXUP:=autoreconf - -PKG_MAINTAINER:=Ted Hess - -PKG_LICENSE:=LGPL-2.0 -PKG_LICENSE_FILES:=COPYING LICENSE - -include $(INCLUDE_DIR)/package.mk - -PKG_INSTALL=1 - -define Package/lame/Default - SECTION:=sound - CATEGORY:=Sound - URL:=http://sourceforge.net/projects/lame - DEPENDS:=@BUILD_PATENTED -endef - -define Package/lame -$(call Package/lame/Default) - TITLE:=lame - MENU:=1 - DEPENDS += +libncurses -endef - -define Package/lame/description -lame mp3 encoder -endef - -define Package/lame-lib -$(call Package/lame/Default) - TITLE:=lame-lib -endef - -define Package/lame-lib/description -lame mp3 encoder libs -endef - -CONFIG_VARS+=NASM=no - -ifeq ($(ARCH),i386) -TARGET_CFLAGS+=-msse -endif - -define Package/lame/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lame $(1)/usr/bin/ -endef - -define Package/lame-lib/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/ -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/lame - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/include/lame/*.h \ - $(1)/usr/include/lame/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/*.{la,so*} \ - $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,lame-lib)) -$(eval $(call BuildPackage,lame)) diff --git a/sound/lame/patches/001-automake-compat.patch b/sound/lame/patches/001-automake-compat.patch deleted file mode 100644 index 8857ad7..0000000 --- a/sound/lame/patches/001-automake-compat.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/configure.in -+++ b/configure.in -@@ -393,7 +393,7 @@ CONFIG_MATH_LIB="${USE_LIBM}" - - dnl configure use of features - --AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no") -+HAVE_GTK="no" - - dnl ElectricFence malloc debugging - AC_MSG_CHECKING(use of ElectricFence malloc debugging) ---- a/frontend/Makefile.am -+++ b/frontend/Makefile.am -@@ -35,7 +35,7 @@ lame_SOURCES = lame_main.c $(common_sour - mp3rtp_SOURCES = mp3rtp.c rtp.c $(common_sources) - mp3x_SOURCES = mp3x.c gtkanal.c gpkplotting.c $(common_sources) - --CFLAGS = @CFLAGS@ @GTK_CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@ -+CFLAGS = @CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@ - LDFLAGS = @LDFLAGS@ @FRONTEND_LDFLAGS@ @SNDFILE_LIBS@ - - INCLUDES = -I$(top_srcdir)/libmp3lame -I$(top_srcdir)/include -I$(top_builddir) ---- a/frontend/Makefile.in -+++ b/frontend/Makefile.in -@@ -99,7 +99,7 @@ AUTOMAKE = @AUTOMAKE@ - AWK = @AWK@ - CC = @CC@ - CCDEPMODE = @CCDEPMODE@ --CFLAGS = @CFLAGS@ @GTK_CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@ -+CFLAGS = @CFLAGS@ @FRONTEND_CFLAGS@ @SNDFILE_CFLAGS@ - CONFIG_DEFS = @CONFIG_DEFS@ - CONFIG_MATH_LIB = @CONFIG_MATH_LIB@ - CPP = @CPP@ diff --git a/sound/madplay/Makefile b/sound/madplay/Makefile deleted file mode 100644 index 00a1b49..0000000 --- a/sound/madplay/Makefile +++ /dev/null @@ -1,85 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=madplay -PKG_VERSION:=0.15.2b -PKG_RELEASE:=6 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/mad \ - ftp://ftp.mars.org/pub/mpeg/ -PKG_MD5SUM:=6814b47ceaa99880c754c5195aa1aac1 -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Simon Peter - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/madplay/default - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+libid3tag +libmad $(INTL_DEPENDS) $(2) - TITLE:=MPEG audio player in fixed point - $(1) - VARIANT:=$(1) - URL:=http://sourceforge.net/projects/mad -endef - -Package/madplay-alsa=$(call Package/madplay/default,alsa,+alsa-lib) -Package/madplay=$(call Package/madplay/default,oss) - -define Package/madplay/description - MAD is an MPEG audio decoder. It currently only supports the MPEG 1 - standard, but fully implements all three audio layers (Layer I, Layer II, - and Layer III, the latter often colloquially known as MP3.). There is also - full support for ID3 tags. -endef - -define Build/Configure - $(call Build/Configure/Default, \ - --enable-shared \ - --disable-static \ - --disable-debugging \ - --disable-profiling \ - --disable-experimental \ - --without-libiconv-prefix \ - --without-libintl-prefix \ - --without-esd \ - , \ - LIBS="-lz" \ - ) -endef - -ifeq ($(BUILD_VARIANT),alsa) - CONFIGURE_ARGS += \ - --without-oss \ - --with-alsa -endif - -ifeq ($(BUILD_VARIANT),oss) - CONFIGURE_ARGS += \ - --without-alsa -endif - -define Package/madplay/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/madplay $(1)/usr/bin/ -endef - -define Package/madplay-alsa/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/madplay $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,madplay-alsa)) -$(eval $(call BuildPackage,madplay)) diff --git a/sound/madplay/patches/0001-switch-to-new-alsa-api.patch b/sound/madplay/patches/0001-switch-to-new-alsa-api.patch deleted file mode 100644 index 60d7bd3..0000000 --- a/sound/madplay/patches/0001-switch-to-new-alsa-api.patch +++ /dev/null @@ -1,173 +0,0 @@ -Switch madplay to the new API. This is done thanks to a patch written -by Micha Nelissen and available at -http://article.gmane.org/gmane.comp.audio.mad.devel/729. - ---- madplay-0.15.2b/audio_alsa.c 2008-10-18 15:10:16.000000000 +0200 -+++ madplay-0.15.2b/audio_alsa.c.new 2008-10-18 15:03:27.000000000 +0200 -@@ -28,31 +28,30 @@ - - #include - --#define ALSA_PCM_OLD_HW_PARAMS_API --#define ALSA_PCM_OLD_SW_PARAMS_API - #include - - #include - - #include "audio.h" - --char *buf = NULL; --int paused = 0; -+#define BUFFER_TIME_MAX 500000 - --int rate = -1; --int channels = -1; --int bitdepth = -1; --int sample_size = -1; -- --int buffer_time = 500000; --int period_time = 100000; --char *defaultdev = "plughw:0,0"; -+unsigned char *buf = NULL; -+int paused = 0; -+ -+unsigned int rate = 0; -+unsigned int channels = -1; -+unsigned int bitdepth = -1; -+unsigned int sample_size = -1; -+ -+unsigned int buffer_time; -+unsigned int period_time; -+char *defaultdev = "plughw:0,0"; - - snd_pcm_hw_params_t *alsa_hwparams; - snd_pcm_sw_params_t *alsa_swparams; - --snd_pcm_sframes_t buffer_size; --snd_pcm_sframes_t period_size; -+snd_pcm_uframes_t buffer_size; - - snd_pcm_format_t alsa_format = -1; - snd_pcm_access_t alsa_access = SND_PCM_ACCESS_MMAP_INTERLEAVED; -@@ -66,14 +65,20 @@ - snd_pcm_hw_params_t *params, - snd_pcm_access_t access) - { -- int err, dir; -- -+ int err; -+ - /* choose all parameters */ - err = snd_pcm_hw_params_any(handle,params); - if (err < 0) { - printf("Access type not available for playback: %s\n", snd_strerror(err)); - return err; - } -+ /* set the access type */ -+ err = snd_pcm_hw_params_set_access(handle, params, alsa_access); -+ if (err < 0) { -+ printf("Sample format not available for playback: %s\n", snd_strerror(err)); -+ return err; -+ } - /* set the sample format */ - err = snd_pcm_hw_params_set_format(handle, params, alsa_format); - if (err < 0) { -@@ -87,29 +92,38 @@ - return err; - } - /* set the stream rate */ -- err = snd_pcm_hw_params_set_rate_near(handle, params, rate, 0); -+ err = snd_pcm_hw_params_set_rate(handle, params, rate, 0); - if (err < 0) { - printf("Rate %iHz not available for playback: %s\n", rate, snd_strerror(err)); - return err; - } -- if (err != rate) { -- printf("Rate doesn't match (requested %iHz, get %iHz)\n", rate, err); -- return -EINVAL; -- } -+ err = snd_pcm_hw_params_get_buffer_time_max(params, &buffer_time, NULL); -+ if (err < 0) { -+ printf("Unable to retrieve buffer time: %s\n", snd_strerror(err)); -+ return err; -+ } -+ if (buffer_time > BUFFER_TIME_MAX) -+ buffer_time = BUFFER_TIME_MAX; - /* set buffer time */ -- err = snd_pcm_hw_params_set_buffer_time_near(handle, params, buffer_time, &dir); -+ err = snd_pcm_hw_params_set_buffer_time_near(handle, params, &buffer_time, 0); - if (err < 0) { - printf("Unable to set buffer time %i for playback: %s\n", buffer_time, snd_strerror(err)); - return err; - } -- buffer_size = snd_pcm_hw_params_get_buffer_size(params); -+ if (period_time * 4 > buffer_time) -+ period_time = buffer_time / 4; - /* set period time */ -- err = snd_pcm_hw_params_set_period_time_near(handle, params, period_time, &dir); -+ err = snd_pcm_hw_params_set_period_time_near(handle, params, &period_time, NULL); - if (err < 0) { - printf("Unable to set period time %i for playback: %s\n", period_time, snd_strerror(err)); - return err; - } -- period_size = snd_pcm_hw_params_get_period_size(params, &dir); -+ /* retrieve buffer size */ -+ err = snd_pcm_hw_params_get_buffer_size(params, &buffer_size); -+ if (err < 0) { -+ printf("Unable to retrieve buffer size: %s\n", snd_strerror(err)); -+ return err; -+ } - /* write the parameters to device */ - err = snd_pcm_hw_params(handle, params); - if (err < 0) { -@@ -123,6 +137,7 @@ - int set_swparams(snd_pcm_t *handle, - snd_pcm_sw_params_t *params) - { -+ unsigned int start_threshold; - int err; - - /* get current swparams */ -@@ -136,13 +151,7 @@ - if (err < 0) { - printf("Unable to set start threshold mode for playback: %s\n", snd_strerror(err)); - return err; -- } -- /* allow transfer when at least period_size samples can be processed */ -- err = snd_pcm_sw_params_set_avail_min(handle, params, period_size); -- if (err < 0) { -- printf("Unable to set avail min for playback: %s\n", snd_strerror(err)); -- return err; -- } -+ } - /* align all transfers to 1 samples */ - err = snd_pcm_sw_params_set_xfer_align(handle, params, 1); - if (err < 0) { -@@ -190,7 +199,7 @@ - rate = config->speed; - - if ( bitdepth == 0 ) -- config->precision = bitdepth = 32; -+ config->precision = bitdepth = 16; - - switch (bitdepth) - { -@@ -241,7 +250,7 @@ - return -1; - } - -- buf = malloc(buffer_size); -+ buf = malloc(buffer_size * sample_size); - if (buf == NULL) { - audio_error="unable to allocate output buffer table"; - return -1; -@@ -279,7 +288,7 @@ - int play(struct audio_play *play) - { - int err, len; -- char *ptr; -+ unsigned char *ptr; - - ptr = buf; - len = play->nsamples; - diff --git a/sound/madplay/patches/010-use_correct_shell.patch b/sound/madplay/patches/010-use_correct_shell.patch deleted file mode 100644 index c8eb2a3..0000000 --- a/sound/madplay/patches/010-use_correct_shell.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/intl/Makefile.in -+++ b/intl/Makefile.in -@@ -19,7 +19,7 @@ - PACKAGE = @PACKAGE@ - VERSION = @VERSION@ - --SHELL = /bin/sh -+SHELL = @SHELL@ - - srcdir = @srcdir@ - top_srcdir = @top_srcdir@ -@@ -56,6 +56,7 @@ DEFS = -DLOCALEDIR=\"$(localedir)\" -DLO - -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \ - -Dset_relocation_prefix=libintl_set_relocation_prefix \ - -Drelocate=libintl_relocate \ -+-DINSTALLPREFIX=\"$(prefix)\" \ - -DDEPENDS_ON_LIBICONV=1 @DEFS@ - CPPFLAGS = @CPPFLAGS@ - CFLAGS = @CFLAGS@ ---- a/po/Makefile.in.in -+++ b/po/Makefile.in.in -@@ -13,7 +13,7 @@ - PACKAGE = @PACKAGE@ - VERSION = @VERSION@ - --SHELL = /bin/sh -+SHELL = @SHELL@ - @SET_MAKE@ - - srcdir = @srcdir@ diff --git a/sound/mocp/Makefile b/sound/mocp/Makefile deleted file mode 100644 index 93f9c6f..0000000 --- a/sound/mocp/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (C) 2011-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=moc -PKG_VERSION:=2.5.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://ftp.daper.net/pub/soft/moc/stable/ -PKG_MD5SUM:=f3a68115602a4788b7cfa9bbe9397a9d5e24c68cb61a57695d1c2c3ecf49db08 - -PKG_MAINTAINER:=Ted Hess - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/moc - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+libcurl +BUILD_PATENTED:libmad +libvorbis $(ICONV_DEPENDS) +alsa-lib +libid3tag +libflac +libsamplerate +libncursesw +libffmpeg +libltdl +libmagic +faad2 +libdb47 - TITLE:=Music On Console - URL:=http://moc.daper.net/ -endef - -define Package/moc/description - MOC (music on console) is a console audio player for LINUX/UNIX designed to be powerful and easy to use. -endef - -TARGET_CFLAGS+=-D_GNU_SOURCE - -TARGET_CPPFLAGS+=-P - -CONFIGURE_ARGS+= \ - $(if $(CONFIG_BUILD_PATENTED),,--without-mp3) \ - --enable-shared \ - --disable-static \ - --disable-debug \ - --without-speex \ - --without-samplerate \ - --without-curl \ - --without-flac \ - --without-musepack \ - --without-rcc \ - $(if $(CONFIG_PACKAGE_libncursesw),--with-ncursesw --without-ncurses,--with-ncurses --without-ncursesw) \ - --with-bdb-dir="$(STAGING_DIR)/usr" - -define Package/moc/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mocp $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib/moc/decoder_plugins - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/moc/decoder_plugins/*.so $(1)/usr/lib/moc/decoder_plugins -endef - -$(eval $(call BuildPackage,moc)) diff --git a/sound/mpc/Makefile b/sound/mpc/Makefile deleted file mode 100644 index 3109b1c..0000000 --- a/sound/mpc/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mpc -PKG_VERSION:=0.27 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://www.musicpd.org/download/mpc/0 -PKG_MD5SUM:=d9430db9b9d7fb1eadbe4d13e8d97c66 -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Ted Hess - -include $(INCLUDE_DIR)/package.mk - -define Package/mpc - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+libmpdclient - TITLE:=Music Player Daemon Console Client - URL:=http://www.musicpd.org/ -endef - -define Package/mpc/description - MPD is a music player supporting flac, mp3 and ogg files. - It is typically controlled over a network using one of it's many - clients including mpc(console), gmpc(gnome), phpmp(php) etc. - this is MPC -endef - -define Build/Configure -$(call Build/Configure/Default, \ - --disable-iconv \ -) -endef - -define Build/Compile -$(call Build/Compile/Default,\ - CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \ - prefix="/usr" \ - all \ -) -endef - -define Package/mpc/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mpc $(1)/usr/bin/ - $(INSTALL_BIN) ./files/pls-handler.sh $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,mpc)) diff --git a/sound/mpc/files/pls-handler.sh b/sound/mpc/files/pls-handler.sh deleted file mode 100644 index 9394417..0000000 --- a/sound/mpc/files/pls-handler.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env sh -echo parameter: file.pls -mpc clear -grep '^File[0-9]*' $1 | sed -e 's/^File[0-9]*=//' | mpc add -mpc play \ No newline at end of file diff --git a/sound/mpd/Makefile b/sound/mpd/Makefile deleted file mode 100644 index 162660a..0000000 --- a/sound/mpd/Makefile +++ /dev/null @@ -1,229 +0,0 @@ -# -# Copyright (C) 2015-2016 Ted Hess -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mpd -PKG_VERSION:=0.19.19 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.19/ -PKG_MD5SUM:=6e4fca9a9c26dad08b61bac9a91802db -PKG_MAINTAINER:=Ted Hess - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 - -PKG_CONFIG_DEPENDS:= \ - CONFIG_IPV6 \ - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/mpd/Default - SECTION:=sound - CATEGORY:=Sound - TITLE:=Music Player Daemon - URL:=http://www.musicpd.org/ - DEPENDS:= +glib2 +libcurl +libpthread +libmpdclient +libstdcpp $(ICONV_DEPENDS) \ - +libflac +BUILD_PATENTED:libmad +libvorbisidec +AUDIO_SUPPORT:alsa-lib \ - +boost +boost-container +libexpat -endef - -define Package/mpd/Default/description - Music Player Daemon (MPD) is a flexible, powerful, server-side - application for playing music. It is typically controlled over a - network using one of it's many clients including mpc (console), - gmpc (gnome), phpmp (php), etc... -endef - -define Package/mpd-full -$(call Package/mpd/Default) - TITLE+= (full) - DEPENDS+= \ - +libaudiofile +BUILD_PATENTED:libfaad2 +libffmpeg +libid3tag \ - +libmms +libogg +libsndfile +libvorbis +libupnp - PROVIDES:=mpd - VARIANT:=full -endef - -define Package/mpd-full/description -$(call Package/mpd/Default/description) - . - This package contains a full-blown Music Player Daemon. -endef - -define Package/mpd-full/conffiles -/etc/mpd.conf -endef - -define Package/mpd-mini -$(call Package/mpd/Default) - TITLE+= (mini) - PROVIDES:=mpd - VARIANT:=mini -endef - -define Package/mpd-mini/description -$(call Package/mpd/Default/description) - . - This package contains a minimal Music Player Daemon, with support for - only Flac, MP3 & OGG media types & only file: & http: protocols. -endef - -define Package/mpd-mini/conffiles -/etc/mpd.conf -endef - -define Package/mpd-avahi-service -$(call Package/mpd/Default) - TITLE+= (Avahi service) - DEPENDS+=+avahi-daemon -endef - -define Package/mpd-avahi-service/description -$(call Package/mpd/Default/description) - . - This package contains the service definition for announcing the - Music Player Daemon service via mDNS/DNS-SD. -endef - -define Package/mpd-avahi-service/conffiles -/etc/avahi/services/mpd.service -endef - -CONFIGURE_ARGS += \ - $(call autoconf_bool,CONFIG_IPV6,ipv6) \ - --disable-debug \ - --disable-documentation \ - --disable-test \ - --disable-werror \ - \ - --disable-ao \ - --disable-bzip2 \ - --disable-fluidsynth \ - --disable-wildmidi \ - --disable-gme \ - --enable-inotify \ - --disable-icu \ - --disable-eventfd \ - --disable-iso9660 \ - --disable-jack \ - --disable-roar \ - --disable-libwrap \ - --disable-lsr \ - --disable-mikmod \ - --disable-modplug \ - --disable-mpc \ - --disable-mpg123 \ - --disable-openal \ - --disable-opus \ - --disable-pulse \ - --disable-sidplay \ - --disable-solaris-output \ - --disable-sqlite \ - --disable-lame-encoder \ - --disable-twolame-encoder \ - --disable-shine-encoder \ - --enable-wave-encoder \ - --disable-wavpack \ - --disable-wildmidi \ - --disable-zzip \ - --with-zeroconf=no \ - --disable-soxr \ - \ - --enable-curl \ - --enable-flac \ - --enable-httpd-output \ - $(call autoconf_bool,CONFIG_BUILD_PATENTED,mad) \ - $(call autoconf_bool,CONFIG_AUDIO_SUPPORT,alsa) \ - --enable-tcp \ - --enable-un \ - -CONFIGURE_VARS += \ - FLAC_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/FLAC" \ - FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \ - $(if $(CONFIG_BUILD_PATENTED),MAD_CFLAGS="$(TARGET_CFLAGS)") \ - $(if $(CONFIG_BUILD_PATENTED),MAD_LIBS="$(TARGET_LDFLAGS) -lmad") \ - -TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib $(if $(ICONV_FULL),-liconv) - -ifeq ($(BUILD_VARIANT),full) - - CONFIGURE_ARGS += \ - --enable-upnp \ - $(call autoconf_bool,CONFIG_BUILD_PATENTED,aac) \ - --enable-audiofile \ - --enable-fifo \ - --enable-ffmpeg \ - --enable-id3 \ - --enable-lastfm \ - --enable-mms \ - --enable-oggflac \ - --enable-pipe-output \ - --enable-recorder-output \ - --disable-shout \ - --enable-sndfile \ - --enable-vorbis \ - --disable-vorbis-encoder \ - --with-faad="$(STAGING_DIR)/usr" \ - --with-tremor=yes \ - -endif - -ifeq ($(BUILD_VARIANT),mini) - - # oggflac is not compatible with tremor - CONFIGURE_ARGS += \ - --disable-upnp \ - --disable-aac \ - --disable-audiofile \ - --disable-fifo \ - --disable-ffmpeg \ - --disable-id3 \ - --disable-mms \ - --disable-pipe-output \ - --disable-recorder-output \ - --disable-shout \ - --disable-sndfile \ - --disable-vorbis \ - --disable-vorbis-encoder \ - --with-tremor=yes \ - -endif - -define Package/mpd/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mpd $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/mpdconf.example $(1)/etc/mpd.conf - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/mpd.init $(1)/etc/init.d/mpd -endef - -define Package/mpd-full/install -$(call Package/mpd/install,$1) -endef - -define Package/mpd-mini/install -$(call Package/mpd/install,$1) -endef - -define Package/mpd-avahi-service/install - $(INSTALL_DIR) $(1)/etc/avahi/services - $(INSTALL_DATA) ./files/mpd.service $(1)/etc/avahi/services/ -endef - -$(eval $(call BuildPackage,mpd-full)) -$(eval $(call BuildPackage,mpd-mini)) -$(eval $(call BuildPackage,mpd-avahi-service)) diff --git a/sound/mpd/files/mpd.init b/sound/mpd/files/mpd.init deleted file mode 100644 index ac8f1fc..0000000 --- a/sound/mpd/files/mpd.init +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2007-2014 OpenWrt.org - -START=93 - -USE_PROCD=1 - -PROG=/usr/bin/mpd -CONFIGFILE=/etc/mpd.conf -NICEPRIO=-10 - -#TODO: Add uci config - nice, config - -start_service() { - #create mpd directories from config - local pld=`grep ^playlist_directory "$CONFIGFILE" | cut -d "\"" -f 2 | sed "s/~/\/root/g"` - if [ ! -d $pld ]; then - mkdir -m 0755 -p $pld - fi - - local lport=`grep ^port "$CONFIGFILE" | cut -d "\"" -f 2` - [ -z $lport ] && lport=6600 - - procd_open_instance - procd_add_mdns "mpd" "tcp" "$lport" - procd_set_param command "$PROG" --no-daemon "$CONFIGFILE" - # Give MPD some real-time priority - procd_set_param nice "$NICEPRIO" - procd_close_instance -} diff --git a/sound/mpd/files/mpd.service b/sound/mpd/files/mpd.service deleted file mode 100644 index a545f24..0000000 --- a/sound/mpd/files/mpd.service +++ /dev/null @@ -1,9 +0,0 @@ - - - - %h - - _mpd._tcp - 6600 - - diff --git a/sound/mpd/patches/210-support_raw_pcm_streams.patch b/sound/mpd/patches/210-support_raw_pcm_streams.patch deleted file mode 100644 index 2756570..0000000 --- a/sound/mpd/patches/210-support_raw_pcm_streams.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx -+++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx -@@ -777,6 +777,7 @@ static const char *const ffmpeg_mime_typ - "audio/qcelp", - "audio/vorbis", - "audio/vorbis+ogg", -+ "audio/wav", - "audio/x-8svx", - "audio/x-16sv", - "audio/x-aac", diff --git a/sound/mpd/patches/220-handle_slow_server_stream_startup.patch b/sound/mpd/patches/220-handle_slow_server_stream_startup.patch deleted file mode 100644 index 2ebb91c..0000000 --- a/sound/mpd/patches/220-handle_slow_server_stream_startup.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/src/decoder/plugins/FfmpegDecoderPlugin.cxx -+++ b/src/decoder/plugins/FfmpegDecoderPlugin.cxx -@@ -465,6 +465,13 @@ ffmpeg_probe(Decoder *decoder, InputStre - - unsigned char buffer[BUFFER_SIZE]; - size_t nbytes = decoder_read(decoder, is, buffer, BUFFER_SIZE); -+ -+ if ((nbytes > 0) && (nbytes < 1024)) -+ { -+ // Gobble some more data if header is small -+ nbytes += decoder_read(decoder, is, buffer + nbytes, BUFFER_SIZE - nbytes); -+ } -+ - if (nbytes <= PADDING || !is.LockRewind(IgnoreError())) - return nullptr; - diff --git a/sound/mpg123/Makefile b/sound/mpg123/Makefile deleted file mode 100644 index 8495ed2..0000000 --- a/sound/mpg123/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -# -# Copyright (C) 2007-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mpg123 -PKG_VERSION:=1.22.3 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.mpg123.de/download/ -PKG_MD5SUM:=fca857bc5ad0d2070cd38bd5f0f85f1c -PKG_MAINTAINER:=Zoltan HERPAI - -PKG_FIXUP:=libtool - -PKG_LICENSE:=LGPL-2.1 GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/mpg123/Default - URL:=http://www.mpg123.de - DEPENDS:=@BUILD_PATENTED -endef - -define Package/libmpg123 - $(call Package/mpg123/Default) - SECTION:=libs - CATEGORY:=Libraries - TITLE:=fast console mpeg audio decoder library - DEPENDS:=+libltdl -endef - -define Package/mpg123 - $(call Package/mpg123/Default) - SECTION:=sound - CATEGORY:=Sound - TITLE:=fast console mpeg audio player - DEPENDS+=+libmpg123 +alsa-lib -endef - -define Build/Configure - $(call Build/Configure/Default, \ - --enable-shared \ - --enable-static \ - --with-cpu=generic_nofpu \ - --with-audio=alsa \ - --with-default-audio=alsa \ - ) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/include/mpg123.h \ - $(1)/usr/include/ - - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libmpg123.{la,a,so*} \ - $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/usr/lib/mpg123 - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/mpg123/* \ - $(1)/usr/lib/mpg123 - - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmpg123.pc \ - $(1)/usr/lib/pkgconfig -endef - -define Package/libmpg123/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libmpg123.so* \ - $(1)/usr/lib/ -endef - -define Package/mpg123/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/mpg123{,-id3dump,-strip} \ - $(PKG_INSTALL_DIR)/usr/bin/out123 \ - $(1)/usr/bin - - $(INSTALL_DIR) $(1)/usr/lib/mpg123 - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/mpg123/* \ - $(1)/usr/lib/mpg123 -endef - -$(eval $(call BuildPackage,libmpg123)) -$(eval $(call BuildPackage,mpg123)) diff --git a/sound/pianod/Makefile b/sound/pianod/Makefile deleted file mode 100644 index e92ae64..0000000 --- a/sound/pianod/Makefile +++ /dev/null @@ -1,110 +0,0 @@ -# -# Copyright (C) 2015-2017 Ted Hess -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pianod -PKG_VERSION:=174.05 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=https://github.com/thess/pianod-sc/releases/download/$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MD5SUM:=0bae19b0c1e309343bc1b351e521173fe439431542a949dd2bacf4165cce5200 - -PKG_MAINTAINER:=Ted Hess - -PKG_LICENSE:=MIT VARIOUS -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/pianod - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+libao +libfaad2 +libmad +libmbedtls +libjson-c +libgcrypt +libpthread - TITLE:=Pandora radio daemon - USERID:=pianod=88:pianod=88 - URL:=http://deviousfish.com/pianod1/ -endef - -define Package/pianod/description - pianod is a Pandora music player client with line-oriented and Websocket control interfaces. - A simple protocol makes for easy clients, mix scripting, integration with a - home automation system, use as multiple-user music system for home or office. - Documentation and configuration information can be found at: - http://deviousfish.com/pianod1/ -endef - -define Package/pianod-client - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+pianod - TITLE:=Pandora radio daemon WebUI - URL:=http://deviousfish.com/pianod1/ -endef - -define Package/pianod-client/description - Web client UI and remote player viewer for pianod - Examples --- (Note: The viewer.* files need not be on the pianod host) - Main interface: http://pianod-host:4446/pianod - Remote viewer: file:////viewer.html?server=pianod-host:4446 --or-- - http://pianod-host:4446/pianod/viewer.html?server=pianod-host:4446 -endef - -CONFIGURE_ARGS+= --with-mbedtls - -PIANOD_CLIENT:=pianod-client-compiled-51.tar.gz - -define Download/pianod-client - URL:=http://deviousfish.com/Downloads/pianod/ - FILE:=$(PIANOD_CLIENT) - MD5SUM:=abbdee5627bcee6a00c8304da8b4e2e7 -endef - -define Package/pianod/conffiles -/etc/pianod/startscript -/etc/pianod/users -endef - -define Build/Prepare - $(call Build/Prepare/Default) - ifneq ($(CONFIG_PACKAGE_pianod-client),) - $(eval $(call Download,pianod-client)) - mkdir -p $(PKG_BUILD_DIR)/pianod-client - $(TAR) -xf $(DL_DIR)/$(PIANOD_CLIENT) --strip=1 -C $(PKG_BUILD_DIR)/pianod-client - endif -endef - -define Package/pianod-client/Configure -endef - -define Package/pianod-client/Compile -endef - -define Package/pianod/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pianod $(1)/usr/bin/ -# These scripts need ksh (install mksh and link) -# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/piano $(1)/usr/bin/ -# $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/runmix $(1)/usr/bin/ - - $(INSTALL_DIR) $(1)/etc/pianod - $(INSTALL_DATA) $(PKG_BUILD_DIR)/contrib/startscript-example $(1)/etc/pianod/startscript - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/pianod.init $(1)/etc/init.d/pianod -endef - -define Package/pianod-client/install - $(INSTALL_DIR) $(1)/www/pianod - $(INSTALL_DATA) $(PKG_BUILD_DIR)/pianod-client/*.{html,js,gif,jpeg,css} $(1)/www/pianod/ -endef - -$(eval $(call BuildPackage,pianod)) -$(eval $(call BuildPackage,pianod-client)) diff --git a/sound/pianod/files/pianod.init b/sound/pianod/files/pianod.init deleted file mode 100644 index b232944..0000000 --- a/sound/pianod/files/pianod.init +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -NAME=pianod -START=95 - -USE_PROCD=1 - -PD_USER=$NAME -PD_STARTSCRIPT=/etc/$NAME/startscript -PD_PASSWDFILE=/etc/$NAME/users -PD_WEBUI=/www/$NAME - -start_service() { - # Take group ownership of audio devices - chown root:$NAME /dev/snd/* /dev/mixer /dev/dsp - chmod 664 /dev/snd/* /dev/mixer /dev/dsp - - procd_open_instance - - procd_set_param command "/usr/bin/$NAME" - - procd_append_param command -n $PD_USER - procd_append_param command -i "$PD_STARTSCRIPT" - procd_append_param command -u "$PD_PASSWDFILE" - [ -d "$PD_WEBUI" ] && procd_append_param command -c "$PD_WEBUI" - # No HTTPS support without certificates - procd_append_param command -s 0 - - procd_close_instance -} - -# Wait for service to exit and release sockets -reload_service() { - stop - sleep 2 - start -} - -restart() { - reload_service -} diff --git a/sound/portaudio/Makefile b/sound/portaudio/Makefile deleted file mode 100644 index ffa5cfb..0000000 --- a/sound/portaudio/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=portaudio -PKG_VERSION:=19_20140130 -PKG_RELEASE:=1 - -PKG_SOURCE:=pa_stable_v$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://www.portaudio.com/archives/ -PKG_MD5SUM:=7f220406902af9dca009668e198cbd23 - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE.txt -PKG_MAINTAINER:=Nicolas Thill - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/portaudio - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+alsa-lib +libpthread +librt - TITLE:=Portable cross-platform audio I/O - URL:=http://www.portaudio.com/ -endef - -define Package/portaudio/description - PortAudio is a free, cross-platform, open-source, audio I/O library. It lets - you write simple audio programs in 'C' or C++ that will compile and run on many - platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is - intended to promote the exchange of audio software between developers on - different platforms. Many applications use PortAudio for Audio I/O. -endef - -CONFIGURE_ARGS+= \ - --with-alsa \ - --without-asihpi \ - --without-jack \ - --with-oss \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/portaudio.h \ - $(PKG_INSTALL_DIR)/usr/include/pa_linux_alsa.h \ - $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libportaudio.{a,so*} \ - $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/portaudio-*.pc \ - $(1)/usr/lib/pkgconfig/ -endef - -define Package/portaudio/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libportaudio.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,portaudio)) diff --git a/sound/pulseaudio/Makefile b/sound/pulseaudio/Makefile deleted file mode 100644 index 788111b..0000000 --- a/sound/pulseaudio/Makefile +++ /dev/null @@ -1,195 +0,0 @@ -# -# Copyright (C) 2011-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pulseaudio -PKG_VERSION:=9.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/ -PKG_MD5SUM:=da7162541b3a9bc20576dbd0d7d1489a -PKG_LICENSE:=LGPL-2.1+ -PKG_LICENSE_FILES:=GPL LICENSE - -PKG_BUILD_DEPENDS:=intltool/host - -PKG_FIXUP:=autoreconf -PKG_USE_MIPS16:=0 - -PKG_INSTALL = 1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/pulseaudio/Default - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+libspeexdsp +libsndfile +libltdl +libpthread \ - +librt +alsa-lib +libopenssl +libwrap +libcap $(ICONV_DEPENDS) $(INTL_DEPENDS) - TITLE:=Network sound server - MAINTAINER:=Peter Wagner - URL:=http://www.pulseaudio.org - PROVIDES:=pulseaudio - USERID:=pulse=51:pulse=51 -endef - -define Package/pulseaudio-daemon - $(call Package/pulseaudio/Default) - DEPENDS+= +libjson-c -endef - -define Package/pulseaudio/Default/description - PulseAudio (formerly Polypaudio) is a cross-platform, networked sound server. -endef - -define Package/pulseaudio-daemon/description - $(call Package/pulseaudio/Default/description) -endef - -define Package/pulseaudio-daemon/conffiles -/etc/pulse/client.conf -/etc/pulse/daemon.conf -/etc/pulse/default.pa -/etc/pulse/system.pa -endef - -define Package/pulseaudio-tools - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+libsndfile +pulseaudio - TITLE:=Tools for Pulseaudio - URL:=http://www.pulseaudio.org -endef - -define Package/pulseaudio-profiles - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+pulseaudio - TITLE:=Profiles for Pulseaudio - URL:=http://www.pulseaudio.org -endef - -CONFIGURE_ARGS += \ - --with-system-user=pulse \ - --with-system-group=pulse \ - --with-access-group=audio \ - --with-database=simple \ - --enable-alsa \ - --disable-hal \ - --disable-gconf \ - --disable-nls \ - --disable-manpages \ - --enable-oss-output \ - --disable-oss-wrapper \ - --disable-samplerate \ - --disable-per-user-esound-socket \ - --disable-solaris \ - --disable-gtk2 \ - --disable-glib2 \ - --disable-jack \ - --disable-asyncns \ - --disable-lirc \ - --disable-bluez \ - --disable-udev \ - --without-fftw \ - --disable-avahi \ - --disable-dbus \ - --without-soxr - -CONFIGURE_VARS += \ - PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" - -#SUPP_LIBS:=-L$(INTL_PREFIX)/lib -L$(ICONV_PREFIX)/lib -TARGET_CFLAGS += -std=gnu99 - -define Build/InstallDev - $(INSTALL_DIR) \ - $(1)/usr/lib/pkgconfig \ - $(1)/usr/include/pulse \ - $(1)/usr/lib \ - $(1)/usr/lib/pulseaudio - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/pulse/* \ - $(1)/usr/include/pulse - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \ - $(1)/usr/lib/pkgconfig - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/*.so* \ - $(1)/usr/lib/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \ - $(1)/usr/lib/pulseaudio/ -endef - -define Package/pulseaudio-daemon/install - $(INSTALL_DIR) \ - $(1)/etc/pulse \ - $(1)/etc/init.d \ - $(1)/usr/bin \ - $(1)/usr/lib \ - $(1)/usr/lib/pulseaudio \ - $(1)/usr/lib/pulse-$(PKG_VERSION)/modules - - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/pulseaudio \ - $(1)/usr/bin/pulseaudio - - $(INSTALL_BIN) \ - ./files/pulseaudio.init \ - $(1)/etc/init.d/pulseaudio - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/etc/pulse/* \ - $(1)/etc/pulse - - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/*.so* \ - $(1)/usr/lib/ - - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pulseaudio/* \ - $(1)/usr/lib/pulseaudio/ - - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/lib*.so \ - $(1)/usr/lib/ - - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \ - $(1)/usr/lib/pulse-$(PKG_VERSION)/modules/ - -endef - -define Package/pulseaudio-tools/install - $(INSTALL_DIR) \ - $(1)/usr/bin - - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/pa* \ - $(1)/usr/bin/ -endef - -define Package/pulseaudio-profiles/install - $(INSTALL_DIR) \ - $(1)/usr/share/pulseaudio/alsa-mixer/paths \ - $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \ - $(1)/usr/share/pulseaudio/alsa-mixer/paths - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \ - $(1)/usr/share/pulseaudio/alsa-mixer/profile-sets -endef - -$(eval $(call BuildPackage,pulseaudio-daemon)) -$(eval $(call BuildPackage,pulseaudio-tools)) -$(eval $(call BuildPackage,pulseaudio-profiles)) diff --git a/sound/pulseaudio/files/pulseaudio.init b/sound/pulseaudio/files/pulseaudio.init deleted file mode 100644 index 005d21f..0000000 --- a/sound/pulseaudio/files/pulseaudio.init +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2011 OpenWrt.org - -START=99 -STOP=65 - -USE_PROCD=1 -PROG=/usr/bin/pulseaudio - -start_service() { - [ -d /var/run/pulse ] || { - mkdir -m 0755 -p /var/run/pulse - chmod 0750 /var/run/pulse - chown pulse:pulse /var/run/pulse - } - [ -d /var/lib/pulse ] || { - mkdir -m 0755 -p /var/lib/pulse - chmod 0750 /var/lib/pulse - chown pulse:pulse /var/lib/pulse - } - - chown root:pulse /dev/snd/* /dev/mixer /dev/dsp - chmod 664 /dev/snd/* /dev/mixer /dev/dsp - - procd_open_instance - procd_set_param command $PROG --system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1 --realtime=false - procd_close_instance -} - diff --git a/sound/pulseaudio/patches/001-no_default_64mb_alloc.patch b/sound/pulseaudio/patches/001-no_default_64mb_alloc.patch deleted file mode 100644 index 8dd000b..0000000 --- a/sound/pulseaudio/patches/001-no_default_64mb_alloc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/pulsecore/memblock.c -+++ b/src/pulsecore/memblock.c -@@ -55,7 +55,7 @@ - * stored in SHM and our OS does not commit the memory before we use - * it for the first time. */ - #define PA_MEMPOOL_SLOTS_MAX 1024 --#define PA_MEMPOOL_SLOT_SIZE (64*1024) -+#define PA_MEMPOOL_SLOT_SIZE 64 - - #define PA_MEMEXPORT_SLOTS_MAX 128 - diff --git a/sound/shairplay/Makefile b/sound/shairplay/Makefile deleted file mode 100644 index 191647c..0000000 --- a/sound/shairplay/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (C) 2014-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=shairplay -PKG_VERSION:=2016-01-01 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/juhovh/shairplay.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=ce80e005908f41d0e6fde1c4a21e9cb8ee54007b -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MAINTAINER:=Álvaro Fernández Rojas - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/shairplay - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+libao +libavahi-compat-libdnssd +libltdl +libpthread - TITLE:=Shairplay -endef - -define Package/shairplay/description - Free portable AirPlay server implementation similar to ShairPort. -endef - -define Package/shairplay/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/shairplay $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share/shairplay - $(INSTALL_DATA) $(PKG_BUILD_DIR)/airport.key $(1)/usr/share/shairplay/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) files/shairplay.init $(1)/etc/init.d/shairplay - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) files/shairplay.config $(1)/etc/config/shairplay -endef - -$(eval $(call BuildPackage,shairplay)) diff --git a/sound/shairplay/files/shairplay.config b/sound/shairplay/files/shairplay.config deleted file mode 100644 index 6e1f939..0000000 --- a/sound/shairplay/files/shairplay.config +++ /dev/null @@ -1,10 +0,0 @@ -config shairplay main - option disabled '1' - option respawn '1' - option apname 'AirPlay' - option port '5000' - option password '' - option hwaddr '' - option ao_driver 'oss' - option ao_devicename '' - option ao_deviceid '' diff --git a/sound/shairplay/files/shairplay.init b/sound/shairplay/files/shairplay.init deleted file mode 100644 index 093a168..0000000 --- a/sound/shairplay/files/shairplay.init +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=90 -USE_PROCD=1 - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command $opt="${val:-$def}" -} - -start_instance() { - local cfg="$1" - local aux - - config_get_bool aux "$cfg" 'disabled' '0' - [ "$aux" = 1 ] && return 1 - - procd_open_instance - - procd_set_param command /usr/bin/shairplay - - append_arg "$cfg" apname "--apname" "AirPlay" - append_arg "$cfg" port "--server_port" - append_arg "$cfg" password "--password" - append_arg "$cfg" hwaddr "--hwaddr" - - append_arg "$cfg" ao_driver "--ao_driver" - append_arg "$cfg" ao_devicename "--ao_devicename" - append_arg "$cfg" ao_deviceid "--ao_deviceid" - - config_get_bool aux "$cfg" 'respawn' '0' - [ "$aux" = 1 ] && procd_set_param respawn - - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger "shairplay" -} - -start_service() { - config_load shairplay - config_foreach start_instance shairplay -} diff --git a/sound/shairplay/patches/001-key_file_dir.patch b/sound/shairplay/patches/001-key_file_dir.patch deleted file mode 100644 index af9bd84..0000000 --- a/sound/shairplay/patches/001-key_file_dir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/shairplay.c -+++ b/src/shairplay.c -@@ -350,7 +350,7 @@ main(int argc, char *argv[]) - raop_cbs.audio_destroy = audio_destroy; - raop_cbs.audio_set_volume = audio_set_volume; - -- raop = raop_init_from_keyfile(10, &raop_cbs, "airport.key", NULL); -+ raop = raop_init_from_keyfile(10, &raop_cbs, "/usr/share/shairplay/airport.key", NULL); - if (raop == NULL) { - fprintf(stderr, "Could not initialize the RAOP service\n"); - fprintf(stderr, "Please make sure the airport.key file is in the current directory.\n"); diff --git a/sound/shairplay/patches/002-libavahi-compat-dnssd.patch b/sound/shairplay/patches/002-libavahi-compat-dnssd.patch deleted file mode 100644 index ff70e24..0000000 --- a/sound/shairplay/patches/002-libavahi-compat-dnssd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/lib/dnssd.c -+++ b/src/lib/dnssd.c -@@ -167,7 +167,7 @@ dnssd_init(int *error) - return NULL; - } - #elif USE_LIBDL -- dnssd->module = dlopen("libdns_sd.so", RTLD_LAZY); -+ dnssd->module = dlopen("libdns_sd.so.1", RTLD_LAZY); - if (!dnssd->module) { - if (error) *error = DNSSD_ERROR_LIBNOTFOUND; - free(dnssd); diff --git a/sound/shairplay/patches/003-fix_big-endian.patch b/sound/shairplay/patches/003-fix_big-endian.patch deleted file mode 100644 index 4db204e..0000000 --- a/sound/shairplay/patches/003-fix_big-endian.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/lib/alac/alac.c -+++ b/src/lib/alac/alac.c -@@ -29,7 +29,7 @@ - * - */ - --static const int host_bigendian = 0; -+#define host_bigendian (htonl(42) == 42) - - #include - #include diff --git a/sound/shairport-sync/Makefile b/sound/shairport-sync/Makefile deleted file mode 100644 index abec421..0000000 --- a/sound/shairport-sync/Makefile +++ /dev/null @@ -1,124 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# updated to work with latest source from abrasive -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=shairport-sync -PKG_VERSION:=2.8.6 -PKG_RELEASE:=2 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/mikebrady/shairport-sync.git -PKG_SOURCE_VERSION:=$(PKG_VERSION) -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_VERSION).tar.gz -PKG_MAINTAINER:=Ted Hess , \ - Mike Brady - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR) - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING LICENSES shairport.c - -PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/shairport-sync/default - SECTION:=sound - CATEGORY:=Sound - TITLE:=AirPlay compatible audio player - DEPENDS:=@AUDIO_SUPPORT +libpthread +alsa-lib +libconfig +libdaemon +libpopt - PROVIDES:=shairport-sync - URL:=http://github.com/mikebrady/shairport-sync -endef - -define Package/shairport-sync-openssl - $(Package/shairport-sync/default) - TITLE+= (openssl) - DEPENDS+= +libopenssl +libavahi-client +libsoxr - VARIANT:=openssl -endef - -define Package/shairport-sync-mbedtls - $(Package/shairport-sync/default) - TITLE+= (mbed TLS) - DEPENDS+= +libmbedtls +libavahi-client +libsoxr - VARIANT:=mbedtls - DEFAULT_VARIANT:=1 -endef - -define Package/shairport-sync-mini - $(Package/shairport-sync/default) - TITLE+= (minimal) - DEPENDS+= +libmbedtls - VARIANT:=mini -endef - -define Package/shairport-sync/default/description - Shairport Sync plays audio from iTunes and AirPlay sources, including - iOS devices, Quicktime Player and third party sources such as forkedDaapd. - Audio played by a Shairport Sync-powered device stays synchronised with the source - and hence with similar devices playing the same source. - - Shairport Sync does not support AirPlay video or photo streaming. - Ensure Kernel Modules > Sound Support > kmod-sound-core is selected. - Also select kmod-usb-audio if you want to use USB-connected sound cards. -endef -Package/shairport-sync-openssl/description = $(Package/shairport-sync/default/description) -Package/shairport-sync-mbedtls/description = $(Package/shairport-sync/default/description) - -define Package/shairport-sync-mini/description - $(Package/shairport-sync/default/description) - - Minimal version uses mbed TLS and does not include libsoxr and avahi support. -endef - -CONFIGURE_ARGS+= \ - --with-alsa \ - --with-metadata - -ifeq ($(BUILD_VARIANT),openssl) - CONFIGURE_ARGS+= --with-ssl=openssl -endif - -ifeq ($(BUILD_VARIANT),mbedtls) - CONFIGURE_ARGS+= --with-ssl=mbedtls -endif - -ifeq ($(BUILD_VARIANT),mini) - CONFIGURE_ARGS+= --with-ssl=mbedtls --with-tinysvcmdns -else - CONFIGURE_ARGS+= --with-avahi --with-soxr -endif - -define Package/shairport-sync/default/conffiles -/etc/shairport-sync.conf -endef - -Package/shairport-sync-openssl/conffiles = $(Package/shairport-sync/default/conffiles) -Package/shairport-sync-mbedtls/conffiles = $(Package/shairport-sync/default/conffiles) -Package/shairport-sync-mini/conffiles = $(Package/shairport-sync/default/conffiles) - -define Package/shairport-sync/default/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/shairport-sync $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) $(PKG_BUILD_DIR)/scripts/shairport-sync.conf $(1)/etc/shairport-sync.conf - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/shairport-sync.init $(1)/etc/init.d/shairport-sync - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/shairport-sync.config $(1)/etc/config/shairport-sync -endef - -Package/shairport-sync-openssl/install = $(Package/shairport-sync/default/install) -Package/shairport-sync-mbedtls/install = $(Package/shairport-sync/default/install) -Package/shairport-sync-mini/install = $(Package/shairport-sync/default/install) - -$(eval $(call BuildPackage,shairport-sync-openssl)) -$(eval $(call BuildPackage,shairport-sync-mbedtls)) -$(eval $(call BuildPackage,shairport-sync-mini)) diff --git a/sound/shairport-sync/files/shairport-sync.config b/sound/shairport-sync/files/shairport-sync.config deleted file mode 100644 index 96917af..0000000 --- a/sound/shairport-sync/files/shairport-sync.config +++ /dev/null @@ -1,61 +0,0 @@ -# Use your own config file -config shairport-sync 'shairport_sync_file' - option disabled '1' - option respawn '1' - option conf_custom '1' - option conf_file '/etc/shairport-sync.conf' - -# Use OpenWrt UCI config -config shairport-sync 'shairport_sync' - option disabled '1' - option respawn '1' - # General - option name 'Shairport-Sync-%v-%h' - option password '' - option interpolation '' # basic/soxr - option output_backend '' # alsa/pipe/stdout/ao/dummy/pulse/sndio - option mdns_backend '' # avahi/external-avahi/dns-sd/external-dns-sd/tinysvcmdns - option port '' # 5000 - option udp_port_base '' # 6001 - option udp_port_range '' # 100 - option statistics '' # no/yes - option drift '' # 88 - option resync_threshold '' # 2205 - option log_verbosity '' # 0/1/2/3 - option ignore_volume_control '' # no/yes - option volume_range_db '' # 30 to 150 - option regtype '' # _raop._tcp - option playback_mode '' # stereo/mono - # Metadata - option metadata_enabled '' # no/yes - option metadata_cover_art '' # no/yes - option metadata_pipe_name '' # /tmp/shairport-sync-metadata - option metadata_pipe_timeout '' # 5000 - option metadata_socket_address '' # 226.0.0.1 - option metadata_socket_port '' # 5555 - option metadata_socket_msglength # 65000 - # Session Control - option sesctl_run_before_play_begins '' # /etc/shairport-sync-start.sh - option sesctl_run_after_play_ends '' # /etc/shairport-sync-stop.sh - option sesctl_wait_for_completion '' # no/yes - option sesctl_session_interruption '' # no/yes - option sesctl_session_timeout '' # 120 - # ALSA - option alsa_output_device '' # default - option alsa_mixer_control_name '' # PCM - option alsa_mixer_device '' # default - option alsa_latency_offset '' # 0 - option alsa_buffer_length '' # 6615 - option alsa_disable_synchronization '' # no/yes - option alsa_period_size '' # number - option alsa_buffer_size '' # number - # Pipe - option pipe_name '' # /tmp/shairport-sync-audio - option pipe_latency_offset '' # 0 - option pipe_buffer_length '' # 44100 - # Stdout - option stdout_latency_offset '' # 0 - option stdout_buffer_length '' # 44100 - # AO - option ao_latency_offset '' # 0 - option ao_buffer_length '' # 44100 diff --git a/sound/shairport-sync/files/shairport-sync.init b/sound/shairport-sync/files/shairport-sync.init deleted file mode 100644 index afda520..0000000 --- a/sound/shairport-sync/files/shairport-sync.init +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015-2016 OpenWrt.org - -START=99 -USE_PROCD=1 - -append_num() { - local cfg="$1" - local file="$2" - local var="$3" - local opt="$4" - local def="$5" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && echo -e "\t$opt = ${val:-$def};" >> $file -} -append_str() { - local cfg="$1" - local file="$2" - local var="$3" - local opt="$4" - local def="$5" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && echo -e "\t$opt = \"${val:-$def}\";" >> $file -} - -start_instance() { - local cfg=$1 - local conf_custom conf_file aux - - config_get_bool aux "$cfg" 'disabled' '0' - [ "$aux" = 1 ] && return 1 - - config_get_bool conf_custom "$cfg" 'conf_custom' '0' - config_get conf_file "$cfg" "conf_file" - if [ $conf_custom -ne 1 ] && [ ! -n "$conf_file" ]; then - mkdir -p /var/etc - conf_file="/var/etc/shairport-sync-${cfg}.conf" - - echo -e "// Automatically generated from UCI config\n" > $conf_file - - # General - echo -e "general =" >> $conf_file - echo -e "{" >> $conf_file - append_str "$cfg" "$conf_file" name "name" - append_str "$cfg" "$conf_file" password "password" - append_str "$cfg" "$conf_file" interpolation "interpolation" - append_str "$cfg" "$conf_file" output_backend "output_backend" - append_str "$cfg" "$conf_file" mdns_backend "mdns_backend" - append_num "$cfg" "$conf_file" port "port" - append_num "$cfg" "$conf_file" udp_port_base "udp_port_base" - append_num "$cfg" "$conf_file" udp_port_range "udp_port_range" - append_str "$cfg" "$conf_file" statistics "statistics" - append_num "$cfg" "$conf_file" drift "drift" - append_num "$cfg" "$conf_file" resync_threshold "resync_threshold" - append_num "$cfg" "$conf_file" log_verbosity "log_verbosity" - append_str "$cfg" "$conf_file" ignore_volume_control "ignore_volume_control" - append_num "$cfg" "$conf_file" volume_range_db "volume_range_db" - append_str "$cfg" "$conf_file" regtype "regtype" - append_str "$cfg" "$conf_file" playback_mode "playback_mode" - echo -e "};\n" >> $conf_file - - # Metadata - echo -e "metadata =" >> $conf_file - echo -e "{" >> $conf_file - append_str "$cfg" "$conf_file" metadata_enabled "enabled" - append_str "$cfg" "$conf_file" metadata_cover_art "include_cover_art" - append_str "$cfg" "$conf_file" metadata_pipe_name "pipe_name" - append_num "$cfg" "$conf_file" metadata_pipe_timeout "pipe_timeout" - append_str "$cfg" "$conf_file" metadata_socket_address "socket_address" - append_num "$cfg" "$conf_file" metadata_socket_port "socket_port" - append_num "$cfg" "$conf_file" metadata_socket_msglength "socket_msglength" - echo -e "};\n" >> $conf_file - - # Session control - echo -e "sessioncontrol =" >> $conf_file - echo -e "{" >> $conf_file - append_str "$cfg" "$conf_file" sesctl_run_before_play_begins "run_this_before_play_begins" - append_str "$cfg" "$conf_file" sesctl_run_after_play_ends "run_this_after_play_ends" - append_str "$cfg" "$conf_file" sesctl_wait_for_completion "wait_for_completion" - append_str "$cfg" "$conf_file" sesctl_session_interruption "allow_session_interruption" - append_num "$cfg" "$conf_file" sesctl_session_timeout "session_timeout" - echo -e "};\n" >> $conf_file - - # Alsa audio back end - echo -e "alsa =" >> $conf_file - echo -e "{" >> $conf_file - append_str "$cfg" "$conf_file" alsa_output_device "output_device" - append_str "$cfg" "$conf_file" alsa_mixer_control_name "mixer_control_name" - append_str "$cfg" "$conf_file" alsa_mixer_device "mixer_device" - append_num "$cfg" "$conf_file" alsa_latency_offset "audio_backend_latency_offset" - append_num "$cfg" "$conf_file" alsa_buffer_length "audio_backend_buffer_desired_length" - append_str "$cfg" "$conf_file" alsa_disable_synchronization "disable_synchronization" - append_num "$cfg" "$conf_file" alsa_period_size "period_size" - append_num "$cfg" "$conf_file" alsa_buffer_size "buffer_size" - echo -e "};\n" >> $conf_file - - # Pipe audio back end - echo -e "pipe =" >> $conf_file - echo -e "{" >> $conf_file - append_str "$cfg" "$conf_file" pipe_name "name" - append_num "$cfg" "$conf_file" pipe_latency_offset "audio_backend_latency_offset" - append_num "$cfg" "$conf_file" pipe_buffer_length "audio_backend_buffer_desired_length" - echo -e "};\n" >> $conf_file - - # Stdout audio back end - echo -e "stdout =" >> $conf_file - echo -e "{" >> $conf_file - append_num "$cfg" "$conf_file" stdout_latency_offset "audio_backend_latency_offset" - append_num "$cfg" "$conf_file" stdout_buffer_length "audio_backend_buffer_desired_length" - echo -e "};\n" >> $conf_file - - # AO audio back end - echo -e "ao =" >> $conf_file - echo -e "{" >> $conf_file - append_num "$cfg" "$conf_file" ao_latency_offset "audio_backend_latency_offset" - append_num "$cfg" "$conf_file" ao_buffer_length "audio_backend_buffer_desired_length" - echo -e "};\n" >> $conf_file - fi - - procd_open_instance - - procd_set_param command /usr/bin/shairport-sync - procd_append_param command -c $conf_file - - config_get_bool aux "$cfg" 'respawn' '0' - [ "$aux" = 1 ] && procd_set_param respawn - - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger "shairport-sync" -} - -start_service() { - config_load shairport-sync - config_foreach start_instance shairport-sync -} diff --git a/sound/shairport-sync/patches/100-replace_polarssl_with_mbedtls.patch b/sound/shairport-sync/patches/100-replace_polarssl_with_mbedtls.patch deleted file mode 100644 index 984eb4c..0000000 --- a/sound/shairport-sync/patches/100-replace_polarssl_with_mbedtls.patch +++ /dev/null @@ -1,395 +0,0 @@ -diff --git a/common.c b/common.c -index bf72127..2d4739e 100644 ---- a/common.c -+++ b/common.c -@@ -54,17 +54,14 @@ - #include - #endif - --#ifdef HAVE_LIBPOLARSSL --#include --#include --#include --#include --#include "polarssl/entropy.h" --#include "polarssl/ctr_drbg.h" -- --#if POLARSSL_VERSION_NUMBER >= 0x01030000 --#include "polarssl/compat-1.2.h" --#endif -+#ifdef HAVE_LIBMBEDTLS -+#include -+#include -+#include -+#include -+#include "mbedtls/entropy.h" -+#include "mbedtls/ctr_drbg.h" -+ - #endif - - #include "common.h" -@@ -126,16 +123,16 @@ void inform(char *format, ...) { - daemon_log(LOG_INFO, "%s", s); - } - --#ifdef HAVE_LIBPOLARSSL -+#ifdef HAVE_LIBMBEDTLS - char *base64_enc(uint8_t *input, int length) { - char *buf = NULL; - size_t dlen = 0; -- int rc = base64_encode(NULL, &dlen, input, length); -- if (rc && (rc != POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL)) -+ int rc = mbedtls_base64_encode(NULL, 0, &dlen, input, length); -+ if (rc && (rc != MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL)) - debug(1, "Error %d getting length of base64 encode.", rc); - else { - buf = (char *)malloc(dlen); -- rc = base64_encode((unsigned char *)buf, &dlen, input, length); -+ rc = mbedtls_base64_encode((unsigned char *)buf, dlen, &dlen, input, length); - if (rc != 0) - debug(1, "Error %d encoding base64.", rc); - } -@@ -156,10 +153,10 @@ uint8_t *base64_dec(char *input, int *outlen) { - else { - strcpy(inbuf, input); - strcat(inbuf, "==="); -- // debug(1,"base64_dec called with string \"%s\", length %d, filled string: \"%s\", length -- // %d.",input,strlen(input),inbuf,inbufsize); -- int rc = base64_decode(buf, &dlen, (unsigned char *)inbuf, inbufsize); -- if (rc && (rc != POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL)) -+ // debug(1,"base64_dec called with string \"%s\", length %d, filled string: \"%s\", length %d.", -+ // input,strlen(input),inbuf,inbufsize); -+ int rc = mbedtls_base64_decode(NULL, 0, &dlen, (unsigned char *)inbuf, inbufsize); -+ if (rc && (rc != MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL)) - debug(1, "Error %d getting decode length, result is %d.", rc, dlen); - else { - // debug(1,"Decode size is %d.",dlen); -@@ -167,7 +164,7 @@ uint8_t *base64_dec(char *input, int *outlen) { - if (buf == 0) - debug(1, "Can't allocate memory in base64_dec."); - else { -- rc = base64_decode(buf, &dlen, (unsigned char *)inbuf, inbufsize); -+ rc = mbedtls_base64_decode(buf, dlen, &dlen, (unsigned char *)inbuf, inbufsize); - if (rc != 0) - debug(1, "Error %d in base64_dec.", rc); - } -@@ -280,58 +277,59 @@ uint8_t *rsa_apply(uint8_t *input, int inlen, int *outlen, int mode) { - } - #endif - --#ifdef HAVE_LIBPOLARSSL -+#ifdef HAVE_LIBMBEDTLS - uint8_t *rsa_apply(uint8_t *input, int inlen, int *outlen, int mode) { -- rsa_context trsa; -+ mbedtls_pk_context pkctx; -+ mbedtls_rsa_context *trsa; - const char *pers = "rsa_encrypt"; -+ size_t olen = *outlen; - int rc; - -- entropy_context entropy; -- ctr_drbg_context ctr_drbg; -- entropy_init(&entropy); -- if ((rc = ctr_drbg_init(&ctr_drbg, entropy_func, &entropy, (const unsigned char *)pers, -- strlen(pers))) != 0) -- debug(1, "ctr_drbg_init returned %d\n", rc); -+ mbedtls_entropy_context entropy; -+ mbedtls_ctr_drbg_context ctr_drbg; -+ -+ mbedtls_entropy_init(&entropy); -+ -+ mbedtls_ctr_drbg_init(&ctr_drbg); -+ mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, -+ (const unsigned char *)pers, strlen(pers)); - -- rsa_init(&trsa, RSA_PKCS_V21, POLARSSL_MD_SHA1); // padding and hash id get overwritten -- // BTW, this seems to reset a lot of parameters in the rsa_context -- rc = x509parse_key(&trsa, (unsigned char *)super_secret_key, strlen(super_secret_key), NULL, 0); -+ mbedtls_pk_init(&pkctx); -+ -+ rc = mbedtls_pk_parse_key(&pkctx, (unsigned char *)super_secret_key, sizeof(super_secret_key), NULL, 0); - if (rc != 0) -- debug(1, "Error %d reading the private key."); -+ debug(1, "Error %d reading the private key.", rc); - -- uint8_t *out = NULL; -+ uint8_t *outbuf = NULL; -+ trsa = mbedtls_pk_rsa(pkctx); - - switch (mode) { - case RSA_MODE_AUTH: -- trsa.padding = RSA_PKCS_V15; -- trsa.hash_id = POLARSSL_MD_NONE; -- debug(2, "rsa_apply encrypt"); -- out = malloc(trsa.len); -- rc = rsa_pkcs1_encrypt(&trsa, ctr_drbg_random, &ctr_drbg, RSA_PRIVATE, inlen, input, out); -+ mbedtls_rsa_set_padding(trsa, MBEDTLS_RSA_PKCS_V15, MBEDTLS_MD_NONE); -+ outbuf = malloc(trsa->len); -+ rc = mbedtls_rsa_pkcs1_encrypt(trsa, mbedtls_ctr_drbg_random, &ctr_drbg, MBEDTLS_RSA_PRIVATE, -+ inlen, input, outbuf); - if (rc != 0) -- debug(1, "rsa_pkcs1_encrypt error %d.", rc); -- *outlen = trsa.len; -+ debug(1, "mbedtls_pk_encrypt error %d.", rc); -+ *outlen = trsa->len; - break; - case RSA_MODE_KEY: -- debug(2, "rsa_apply decrypt"); -- trsa.padding = RSA_PKCS_V21; -- trsa.hash_id = POLARSSL_MD_SHA1; -- out = malloc(trsa.len); --#if POLARSSL_VERSION_NUMBER >= 0x01020900 -- rc = rsa_pkcs1_decrypt(&trsa, ctr_drbg_random, &ctr_drbg, RSA_PRIVATE, (size_t *)outlen, input, -- out, trsa.len); --#else -- rc = rsa_pkcs1_decrypt(&trsa, RSA_PRIVATE, outlen, input, out, trsa.len); --#endif -+ mbedtls_rsa_set_padding(trsa, MBEDTLS_RSA_PKCS_V21, MBEDTLS_MD_SHA1); -+ outbuf = malloc(trsa->len); -+ rc = mbedtls_rsa_pkcs1_decrypt(trsa, mbedtls_ctr_drbg_random, &ctr_drbg, MBEDTLS_RSA_PRIVATE, -+ &olen, input, outbuf, trsa->len); - if (rc != 0) -- debug(1, "decrypt error %d.", rc); -+ debug(1, "mbedtls_pk_decrypt error %d.", rc); -+ *outlen = olen; - break; - default: - die("bad rsa mode"); - } -- rsa_free(&trsa); -- debug(2, "rsa_apply exit"); -- return out; -+ -+ mbedtls_ctr_drbg_free(&ctr_drbg); -+ mbedtls_entropy_free(&entropy); -+ mbedtls_pk_free(&pkctx); -+ return outbuf; - } - #endif - -@@ -517,7 +515,7 @@ ssize_t non_blocking_write(int fd, const void *buf, size_t count) { - void *ibuf = (void *)buf; - size_t bytes_remaining = count; - int rc = 0; -- struct pollfd ufds[1]; -+ struct pollfd ufds[1]; - while ((bytes_remaining>0) && (rc==0)) { - // check that we can do some writing - ufds[0].fd = fd; -diff --git a/configure.ac b/configure.ac -index 8d82da4..a2d1e4f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -108,11 +108,11 @@ AC_ARG_WITH(piddir, [ --with-piddir= Specify a pathname to a directory - AM_CONDITIONAL([USE_CUSTOMPIDDIR], [test "x$HAS_CUSTOMPIDDIR" = "x1"]) - - # Check --with-ssl=argument --AC_ARG_WITH(ssl, [ choose --with-ssl=openssl or --with-ssl=polarssl for encryption services], [ -+AC_ARG_WITH(ssl, [ choose --with-ssl=openssl or --with-ssl=mbedtls for encryption services], [ - AC_MSG_CHECKING(encryption libraries chosen) - if test "x${with_ssl}" = x -o "x${with_ssl}" = xyes ; then - AC_MSG_RESULT(not found) -- AC_MSG_ERROR(choose either "openssl" or "polarssl" encryption) -+ AC_MSG_ERROR(choose either "openssl" or "mbedtls" encryption) - fi - if test "x${with_ssl}" = xopenssl ; then - if test "x${with_pkg_config}" = xyes ; then -@@ -127,10 +127,15 @@ AC_ARG_WITH(ssl, [ choose --with-ssl=openssl or --with-ssl=polarssl for encrypti - AC_DEFINE([HAVE_LIBCRYPTO],[1],[Define to 1 if you have libcrypto]) - AC_DEFINE([HAVE_LIBSSL],[1],[Define to 1 if you have libssl]) - fi -- elif test "x${with_ssl}" = xpolarssl ; then -- AC_CHECK_LIB([polarssl],[ssl_init], , AC_MSG_ERROR(PolarSSL selected but the library cannot be found!)) -+ elif test "x${with_ssl}" = xmbedtls ; then -+ AC_CHECK_LIB([mbedtls],[mbedtls_ssl_init],, -+ [AC_MSG_ERROR([Cannot find required libray: libmbedtls],1)]) -+ AC_CHECK_LIB([mbedcrypto], [mbedtls_entropy_func],, -+ [AC_MSG_ERROR([Cannot find required library: libmbedcrypto],1)]) -+ AC_CHECK_LIB([mbedx509], [mbedtls_pk_init],, -+ [AC_MSG_ERROR([Cannot find required library: libmbedx509],1)]) - else -- AC_MSG_ERROR(unknown option "${with_ssl}"." Please choose with "openssl" or "polarssl") -+ AC_MSG_ERROR(unknown option "${with_ssl}"." Please choose with "openssl" or "mbedtls") - fi - ], ) - -diff --git a/player.c b/player.c -index 97eccfb..da2d735 100644 ---- a/player.c -+++ b/player.c -@@ -47,9 +47,9 @@ - - #include "config.h" - --#ifdef HAVE_LIBPOLARSSL --#include --#include -+#ifdef HAVE_LIBMBEDTLS -+#include -+#include - #endif - - #ifdef HAVE_LIBSSL -@@ -82,8 +82,8 @@ static int max_frame_size_change = 1; - // maximal resampling shift - conservative - //#define OUTFRAME_BYTES(frame_size) (4 * (frame_size + 3)) - --#ifdef HAVE_LIBPOLARSSL --static aes_context dctx; -+#ifdef HAVE_LIBMBEDTLS -+static mbedtls_aes_context dctx; - #endif - - //static pthread_t player_thread = NULL; -@@ -247,8 +247,8 @@ static int alac_decode(short *dest, int *destlen, uint8_t *buf, int len) { - unsigned char iv[16]; - int aeslen = len & ~0xf; - memcpy(iv, aesiv, sizeof(iv)); --#ifdef HAVE_LIBPOLARSSL -- aes_crypt_cbc(&dctx, AES_DECRYPT, aeslen, iv, buf, packet); -+#ifdef HAVE_LIBMBEDTLS -+ mbedtls_aes_crypt_cbc(&dctx, MBEDTLS_AES_DECRYPT, aeslen, iv, buf, packet); - #endif - #ifdef HAVE_LIBSSL - AES_cbc_encrypt(buf, packet, aeslen, &aes, iv, AES_DECRYPT); -@@ -1685,9 +1685,9 @@ int player_play(stream_cfg *stream, pthread_t *player_thread) { - die("specified buffer starting fill %d > buffer size %d", config.buffer_start_fill, - BUFFER_FRAMES); - if (encrypted) { --#ifdef HAVE_LIBPOLARSSL -- memset(&dctx, 0, sizeof(aes_context)); -- aes_setkey_dec(&dctx, stream->aeskey, 128); -+#ifdef HAVE_LIBMBEDTLS -+ memset(&dctx, 0, sizeof(mbedtls_aes_context)); -+ mbedtls_aes_setkey_dec(&dctx, stream->aeskey, 128); - #endif - - #ifdef HAVE_LIBSSL -diff --git a/rtsp.c b/rtsp.c -index 38b0745..8003803 100644 ---- a/rtsp.c -+++ b/rtsp.c -@@ -50,8 +50,8 @@ - #include - #endif - --#ifdef HAVE_LIBPOLARSSL --#include -+#ifdef HAVE_LIBMBEDTLS -+#include - #endif - - #include "common.h" -@@ -979,7 +979,7 @@ static void handle_set_parameter_parameter(rtsp_conn_info *conn, - // more significant changes make it not malloc memory - // needs to initialise the docoding table first - --// add _so to end of name to avoid confusion with polarssl's implementation -+// add _so to end of name to avoid confusion with SSL library implementation - - static char encoding_table[] = { - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', -@@ -1651,21 +1651,21 @@ static int rtsp_auth(char **nonce, rtsp_message *req, rtsp_message *resp) { - MD5_Final(digest_mu, &ctx); - #endif - --#ifdef HAVE_LIBPOLARSSL -- md5_context tctx; -- md5_starts(&tctx); -- md5_update(&tctx, (const unsigned char *)username, strlen(username)); -- md5_update(&tctx, (unsigned char *)":", 1); -- md5_update(&tctx, (const unsigned char *)realm, strlen(realm)); -- md5_update(&tctx, (unsigned char *)":", 1); -- md5_update(&tctx, (const unsigned char *)config.password, -+#ifdef HAVE_LIBMBEDTLS -+ mbedtls_md5_context tctx; -+ mbedtls_md5_starts(&tctx); -+ mbedtls_md5_update(&tctx, (const unsigned char *)username, strlen(username)); -+ mbedtls_md5_update(&tctx, (unsigned char *)":", 1); -+ mbedtls_md5_update(&tctx, (const unsigned char *)realm, strlen(realm)); -+ mbedtls_md5_update(&tctx, (unsigned char *)":", 1); -+ mbedtls_md5_update(&tctx, (const unsigned char *)config.password, - strlen(config.password)); -- md5_finish(&tctx, digest_urp); -- md5_starts(&tctx); -- md5_update(&tctx, (const unsigned char *)req->method, strlen(req->method)); -- md5_update(&tctx, (unsigned char *)":", 1); -- md5_update(&tctx, (const unsigned char *)uri, strlen(uri)); -- md5_finish(&tctx, digest_mu); -+ mbedtls_md5_finish(&tctx, digest_urp); -+ mbedtls_md5_starts(&tctx); -+ mbedtls_md5_update(&tctx, (const unsigned char *)req->method, strlen(req->method)); -+ mbedtls_md5_update(&tctx, (unsigned char *)":", 1); -+ mbedtls_md5_update(&tctx, (const unsigned char *)uri, strlen(uri)); -+ mbedtls_md5_finish(&tctx, digest_mu); - #endif - - int i; -@@ -1685,16 +1685,16 @@ static int rtsp_auth(char **nonce, rtsp_message *req, rtsp_message *resp) { - MD5_Final(digest_total, &ctx); - #endif - --#ifdef HAVE_LIBPOLARSSL -- md5_starts(&tctx); -- md5_update(&tctx, buf, 32); -- md5_update(&tctx, (unsigned char *)":", 1); -- md5_update(&tctx, (const unsigned char *)*nonce, strlen(*nonce)); -- md5_update(&tctx, (unsigned char *)":", 1); -+#ifdef HAVE_LIBMBEDTLS -+ mbedtls_md5_starts(&tctx); -+ mbedtls_md5_update(&tctx, buf, 32); -+ mbedtls_md5_update(&tctx, (unsigned char *)":", 1); -+ mbedtls_md5_update(&tctx, (const unsigned char *)*nonce, strlen(*nonce)); -+ mbedtls_md5_update(&tctx, (unsigned char *)":", 1); - for (i = 0; i < 16; i++) - sprintf((char *)buf + 2 * i, "%02x", digest_mu[i]); -- md5_update(&tctx, buf, 32); -- md5_finish(&tctx, digest_total); -+ mbedtls_md5_update(&tctx, buf, 32); -+ mbedtls_md5_finish(&tctx, digest_total); - #endif - - for (i = 0; i < 16; i++) -diff --git a/shairport.c b/shairport.c -index f725d60..2349447 100644 ---- a/shairport.c -+++ b/shairport.c -@@ -42,8 +42,8 @@ - - #include "config.h" - --#ifdef HAVE_LIBPOLARSSL --#include -+#ifdef HAVE_LIBMBEDTLS -+#include - #endif - - #ifdef HAVE_LIBSSL -@@ -109,8 +109,8 @@ char* get_version_string() { - char* version_string = malloc(200); - if (version_string) { - strcpy(version_string, PACKAGE_VERSION); -- #ifdef HAVE_LIBPOLARSSL -- strcat(version_string, "-PolarSSL"); -+ #ifdef HAVE_LIBMBEDTLS -+ strcat(version_string, "-mbedTLS"); - #endif - #ifdef HAVE_LIBSSL - strcat(version_string, "-OpenSSL"); -@@ -1046,11 +1046,11 @@ int main(int argc, char **argv) { - MD5_Final(ap_md5, &ctx); - #endif - --#ifdef HAVE_LIBPOLARSSL -- md5_context tctx; -- md5_starts(&tctx); -- md5_update(&tctx, (unsigned char *)config.service_name, strlen(config.service_name)); -- md5_finish(&tctx, ap_md5); -+#ifdef HAVE_LIBMBEDTLS -+ mbedtls_md5_context tctx; -+ mbedtls_md5_starts(&tctx); -+ mbedtls_md5_update(&tctx, (unsigned char *)config.service_name, strlen(config.service_name)); -+ mbedtls_md5_finish(&tctx, ap_md5); - #endif - memcpy(config.hw_addr, ap_md5, sizeof(config.hw_addr)); - #ifdef CONFIG_METADATA diff --git a/sound/shairport/Makefile b/sound/shairport/Makefile deleted file mode 100644 index aeb63f7..0000000 --- a/sound/shairport/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2013-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=shairport -PKG_VERSION:=2014-10-28 -PKG_RELEASE:=2 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/abrasive/shairport.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=d679d19a4bd66cc220dabfd23ad748c34e95995c -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_MAINTAINER:=Ted Hess - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSES - -include $(INCLUDE_DIR)/package.mk - -define Package/shairport - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+libpthread +libopenssl +libavahi-client +alsa-lib - TITLE:=ShairPort AirPort Express emulator (un-maintained) -endef - -define Package/shairport/description - This program emulates an AirPort Express for the purpose of streaming - music from iTunes and compatible iPods. It implements a server for the - Apple RAOP protocol. - ShairPort does not support AirPlay v2 (video and photo streaming). - - It supports multiple simultaneous streams, if your audio output chain - (as detected by libao) does so. -endef - -TARGET_CFLAGS += $(FPIC) - -LIBS:=-lm -lcrypto -lpthread -lavahi-common -lavahi-client -lasound - -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS) $(LIBS)" - -define Package/shairport/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/shairport $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) files/shairport.init $(1)/etc/init.d/shairport - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) files/shairport.config $(1)/etc/config/shairport -endef - -$(eval $(call BuildPackage,shairport)) diff --git a/sound/shairport/files/shairport.config b/sound/shairport/files/shairport.config deleted file mode 100644 index 9b2165a..0000000 --- a/sound/shairport/files/shairport.config +++ /dev/null @@ -1,36 +0,0 @@ -config shairport main - option disabled '1' - option respawn '1' - option bname 'AirPort' - option password '' - option port '5002' - option buffer '' - option log_file '' - option err_file '' - option meta_dir '' - option cmd_start '' - option cmd_stop '' - option cmd_wait '0' - option audio_output 'alsa' - option mdns 'avahi' - - # options for alsa output - option output_dev '' - option mixer_dev '' - option mixer_type '' - option mixer_control '' - option mixer_index '' - - # options for ao output - option ao_driver '' - option ao_name '' - option ao_id '' - option ao_options '' - - # options for pipe output - option output_fifo '' - - # options for pulse output - option pulse_server '' - option pulse_sink '' - option pulse_appname '' diff --git a/sound/shairport/files/shairport.init b/sound/shairport/files/shairport.init deleted file mode 100644 index 341ff6f..0000000 --- a/sound/shairport/files/shairport.init +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2013-2014 OpenWrt.org - -START=94 -USE_PROCD=1 - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}" -} - -append_bool() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get_bool val "$cfg" "$var" "$def" - [ "$val" = 1 ] && procd_append_param command "$opt" -} - -start_instance() { - local cfg="$1" - local ao dev aux - - config_get_bool aux "$cfg" 'disabled' '0' - [ "$aux" = 1 ] && return 1 - - procd_open_instance - - procd_set_param command /usr/bin/shairport - - append_arg "$cfg" bname "-a" "AirPort" - append_arg "$cfg" log_file "-l" - append_arg "$cfg" err_file "-e" - append_arg "$cfg" meta_dir "-M" - append_arg "$cfg" buffer "-b" - append_arg "$cfg" port "-p" - append_arg "$cfg" password "-k" - append_arg "$cfg" mdns "-m" - - append_arg "$cfg" cmd_start "-B" - append_arg "$cfg" cmd_stop "-E" - append_bool "$cfg" cmd_wait "-w" - - append_arg "$cfg" audio_output "-o" - - config_get ao "$cfg" audio_output "" - if [ "$ao" = "alsa" ]; then - config_get dev "$cfg" output_dev "" - if [ -n "$dev" ]; then - procd_append_param command "--" - append_arg "$cfg" output_dev "-d" - append_arg "$cfg" mixer_dev "-m" - append_arg "$cfg" mixer_type "-t" - append_arg "$cfg" mixer_control "-c" - append_arg "$cfg" mixer_index "-i" - fi - elif [ "$ao" = "ao" ]; then - config_get dev "$cfg" ao_driver "" - if [ -n "$dev" ]; then - procd_append_param command "--" - append_arg "$cfg" ao_driver "-d" - append_arg "$cfg" ao_id "-i" - append_arg "$cfg" ao_name "-n" - append_arg "$cfg" ao_options "-o" - fi - elif [ "$ao" = "pipe" ]; then - config_get dev "$cfg" output_fifo "" - if [ -n "$dev" ]; then - procd_append_param command "--" - append_arg "$cfg" output_fifo "" - fi - elif [ "$ao" = "pulse" ]; then - config_get dev "$cfg" pulse_server "" - if [ -n "$dev" ]; then - procd_append_param command "--" - append_arg "$cfg" pulse_server "-a" - append_arg "$cfg" pulse_sink "-s" - append_arg "$cfg" pulse_appname "-n" - fi - fi - - config_get_bool aux "$cfg" 'respawn' '0' - [ "$aux" = 1 ] && procd_set_param respawn - - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger "shairport" -} - -start_service() { - config_load shairport - config_foreach start_instance shairport -} diff --git a/sound/shairport/patches/001-disable_pulseaudio.patch b/sound/shairport/patches/001-disable_pulseaudio.patch deleted file mode 100644 index 7f0407e..0000000 --- a/sound/shairport/patches/001-disable_pulseaudio.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/configure -+++ b/configure -@@ -59,7 +59,7 @@ do_pkg_config() - - do_pkg_config OpenSSL openssl --do_pkg_config libao ao CONFIG_AO --do_pkg_config PulseAudio libpulse-simple CONFIG_PULSE -+#do_pkg_config libao ao CONFIG_AO -+#do_pkg_config PulseAudio libpulse-simple CONFIG_PULSE - do_pkg_config ALSA alsa CONFIG_ALSA - do_pkg_config Avahi\ client avahi-client CONFIG_AVAHI - diff --git a/sound/shine/Makefile b/sound/shine/Makefile deleted file mode 100644 index 7b1dda0..0000000 --- a/sound/shine/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=shine -PKG_VERSION:=3.1.0 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/toots/shine/releases/download/$(PKG_VERSION)/ -PKG_MD5SUM:=fcad8108335f4b051b303fbdf3fca3fe - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 - -include $(INCLUDE_DIR)/package.mk - -define Package/shine - SECTION:=sound - CATEGORY:=Sound - TITLE:=Super fast fixed-point MP3 encoder - URL:=https://github.com/toots/shine -endef - -define Package/shine/description - savonet/shine is a blazing fast mp3 encoding library implemented in fixed-point - arithmetic. The library can thus be used to perform super fast mp3 encoding on - architectures without a FPU, such as armel, etc.. It is also, however, also - super fast on architectures with a FPU! -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/shine \ - $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libshine.{a,so*} \ - $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/shine.pc \ - $(1)/usr/lib/pkgconfig/ -endef - -define Package/shine/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/shineenc $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libshine.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,shine)) diff --git a/sound/shine/patches/001-fix_mips64_bswap.patch b/sound/shine/patches/001-fix_mips64_bswap.patch deleted file mode 100644 index 8c42297..0000000 --- a/sound/shine/patches/001-fix_mips64_bswap.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/bin/wave.c -+++ b/src/bin/wave.c -@@ -168,7 +168,7 @@ unsigned char wave_open(const char *fnam - } - - #ifdef SHINE_BIG_ENDIAN --#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) - #define bswap_16(x) __builtin_bswap16(x) - #else - #define bswap_16(x) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) diff --git a/sound/shine/patches/002-fix-name-collision-with-ffmpeg.patch b/sound/shine/patches/002-fix-name-collision-with-ffmpeg.patch deleted file mode 100644 index 83ddb5e..0000000 --- a/sound/shine/patches/002-fix-name-collision-with-ffmpeg.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 3695118267be9b7a9412c86c7c5424ab47efe7ec Mon Sep 17 00:00:00 2001 -From: Romain Beauxis -Date: Thu, 7 Apr 2016 13:20:46 -0500 -Subject: [PATCH] Rename slen{1,2}_table to avoid name collision with ffmpeg. - ---- - src/lib/l3bitstream.c | 4 ++-- - src/lib/l3loop.c | 4 ++-- - src/lib/tables.c | 4 ++-- - src/lib/tables.h | 4 ++-- - 4 files changed, 8 insertions(+), 8 deletions(-) - ---- a/src/lib/l3bitstream.c -+++ b/src/lib/l3bitstream.c -@@ -127,8 +127,8 @@ static void encodeMainData(shine_global_ - { - BF_PartHolder **pph = &config->l3stream.scaleFactorsPH[gr][ch]; - gr_info *gi = &(si.gr[gr].ch[ch].tt); -- unsigned slen1 = slen1_tab[ gi->scalefac_compress ]; -- unsigned slen2 = slen2_tab[ gi->scalefac_compress ]; -+ unsigned slen1 = shine_slen1_tab[ gi->scalefac_compress ]; -+ unsigned slen2 = shine_slen2_tab[ gi->scalefac_compress ]; - int *ix = &config->l3_enc[ch][gr][0]; - - if ( (gr == 0) || (si.scfsi[ch][0] == 0) ) ---- a/src/lib/l3loop.c -+++ b/src/lib/l3loop.c -@@ -287,8 +287,8 @@ int part2_length(int gr, int ch, shine_g - bits = 0; - - { -- slen1 = slen1_tab[ gi->scalefac_compress ]; -- slen2 = slen2_tab[ gi->scalefac_compress ]; -+ slen1 = shine_slen1_tab[ gi->scalefac_compress ]; -+ slen2 = shine_slen2_tab[ gi->scalefac_compress ]; - - if ( !gr || !(config->side_info.scfsi[ch][0]) ) - bits += (6 * slen1); ---- a/src/lib/tables.c -+++ b/src/lib/tables.c -@@ -7,8 +7,8 @@ - - #include "tables.h" - --const int slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 }; --const int slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 }; -+const int shine_slen1_tab[16] = { 0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 }; -+const int shine_slen2_tab[16] = { 0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3 }; - - /* Valid samplerates and bitrates. */ - const int samplerates[9] = { ---- a/src/lib/tables.h -+++ b/src/lib/tables.h -@@ -3,8 +3,8 @@ - - #include "types.h" - --extern const int slen1_tab[16]; --extern const int slen2_tab[16]; -+extern const int shine_slen1_tab[16]; -+extern const int shine_slen2_tab[16]; - - extern const int samplerates[9]; - extern const int bitrates[16][4]; diff --git a/sound/sox/Makefile b/sound/sox/Makefile deleted file mode 100644 index 11402f8..0000000 --- a/sound/sox/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -# -# Copyright (C) 2008 David Cooper -# Copyright (C) 2006-2017 OpenWrt -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sox -PKG_VERSION:=14.4.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/sox -PKG_MD5SUM:=81a6956d4330e75b5827316e44ae381e6f1e8928003c6aa45896da9041ea149c - -PKG_MAINTAINER:=Ted Hess -PKG_LICENSE:=LGPL-2.1 GPL-2.0 -PKG_LICENSE_FILES:=COPYING LICENSE.LGPL LICENSE.GPL - - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -TARGET_LDFLAGS+= \ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib - -define Package/sox - SECTION:=sound - CATEGORY:=Sound - DEPENDS:=+BUILD_PATENTED:lame-lib +BUILD_PATENTED:libmad +BUILD_PATENTED:libid3tag \ - +libvorbis +libvorbisidec +alsa-lib +libsndfile +libflac \ - +libmagic +libpng - TITLE:=Sox is a general purpose sound converter/player/recorder - URL:=http://sox.sourceforge.net/ -endef - -define Package/sox/description - SoX is a command line utility that can convert various formats - of computer audio files in to other formats. It can also apply - various effects to these sound files during the conversion. - As an added bonus, SoX can play and record audio files on - several unix-style platforms. -endef - -define Build/Configure - $(call Build/Configure/Default, \ - --without-oss \ - --without-ao \ - --with-alsa \ - --without-libltdl \ - --with-ogg \ - --with-flac \ - --without-amr-wb \ - --without-amr-nb \ - --without-samplerate \ - --without-ladspa \ - --$(if $(CONFIG_BUILD_PATENTED),with-mad,without-mad) \ - --$(if $(CONFIG_BUILD_PATENTED),with-lame,without-lame) \ - --$(if $(CONFIG_BUILD_PATENTED),with-id3tag,without-id3tag) \ - ) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include \ - $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libsox.{a,so*,la} \ - $(1)/usr/lib/ - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \ - $(1)/usr/lib/pkgconfig/ -endef - -define Package/sox/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/bin/{play,rec,sox} $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsox.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,sox)) diff --git a/sound/sox/patches/001-cross_compile.patch b/sound/sox/patches/001-cross_compile.patch deleted file mode 100644 index badd531..0000000 --- a/sound/sox/patches/001-cross_compile.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -145,7 +145,7 @@ EXTRA_DIST = monkey.wav optional-fmts.am - CMakeLists.txt soxconfig.h.cmake \ - tests.sh testall.sh tests.bat testall.bat test-comments - --all: sox$(EXEEXT) play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT) sox_sample_test$(EXEEXT) example0$(EXEEXT) example1$(EXEEXT) example2$(EXEEXT) example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT) example6$(EXEEXT) -+all: sox$(EXEEXT) play$(EXEEXT) rec$(EXEEXT) - - play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT): sox$(EXEEXT) - if test "$(PLAYRECLINKS)" = "yes"; then \ ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -3020,7 +3020,7 @@ uninstall-am: uninstall-binPROGRAMS unin - uninstall-pkglibLTLIBRARIES - - --all: sox$(EXEEXT) play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT) sox_sample_test$(EXEEXT) example0$(EXEEXT) example1$(EXEEXT) example2$(EXEEXT) example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT) example6$(EXEEXT) -+all: sox$(EXEEXT) play$(EXEEXT) rec$(EXEEXT) - - play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT): sox$(EXEEXT) - if test "$(PLAYRECLINKS)" = "yes"; then \ diff --git a/sound/sox/patches/010-fix_uclibc_build_issue.patch b/sound/sox/patches/010-fix_uclibc_build_issue.patch deleted file mode 100644 index 6a06301..0000000 --- a/sound/sox/patches/010-fix_uclibc_build_issue.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/src/formats.c -+++ b/src/formats.c -@@ -413,7 +413,7 @@ static void UNUSED rewind_pipe(FILE * fp - #if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__ - fp->_p -= PIPE_AUTO_DETECT_SIZE; - fp->_r += PIPE_AUTO_DETECT_SIZE; --#elif defined __GLIBC__ -+#elif defined __GLIBC__ && ! defined __UCLIBC__ - fp->_IO_read_ptr = fp->_IO_read_base; - #elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || \ - defined _ISO_STDIO_ISO_H || defined __sgi -@@ -422,7 +422,6 @@ static void UNUSED rewind_pipe(FILE * fp - /* To fix this #error, either simply remove the #error line and live without - * file-type detection with pipes, or add support for your compiler in the - * lines above. Test with cat monkey.wav | ./sox --info - */ -- #error FIX NEEDED HERE - #define NO_REWIND_PIPE - (void)fp; - #endif diff --git a/sound/squeezelite/Makefile b/sound/squeezelite/Makefile deleted file mode 100644 index 6c1b489..0000000 --- a/sound/squeezelite/Makefile +++ /dev/null @@ -1,146 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=squeezelite -PKG_VERSION:=1.8.4-743 -PKG_RELEASE=1 - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=LICENSE.txt -PKG_MAINTAINER:= Ted Hess - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/ralph-irving/squeezelite.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=e37ed17fed9e11a7346cbe9f1e1deeccc051f42e -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_BUILD_DEPENDS:=libflac libvorbis libmad libfaad2 SQUEEZELITE_WMA:libffmpeg-audio-dec - -include $(INCLUDE_DIR)/package.mk - -define Package/squeezelite/default - SECTION:=sound - CATEGORY:=Sound - TITLE:=Headless squeezebox emulator - PROVIDES:=squeezelite - URL:=https://github.com/ralph-irving/squeezelite - DEPENDS:= +alsa-lib +SQUEEZELITE_RESAMPLE:libsoxr - MENU:=1 -endef - -define Package/squeezelite-full - $(call Package/squeezelite/default) - TITLE+= (full) - DEPENDS+= +libflac +libvorbis +libmad +libfaad2 \ - +SQUEEZELITE_WMA:libffmpeg-audio-dec - VARIANT:=full -endef - -define Package/squeezelite-mini - $(call Package/squeezelite/default) - TITLE+= (minimal) - VARIANT:=mini -endef - -define Package/squeezelite/config/default - - config SQUEEZELITE_WMA - bool "WMA/ALAC decode support" - help - Include WMA and ALAC decoding using ffmpeg - default n - - config SQUEEZELITE_RESAMPLE - bool "Resample support" - help - Include support for resampling using libsoxr - default n - - config SQUEEZELITE_DSD - bool "DSD playback over PCM (DoP)" - help - Include support for DSD over PCM for compatible DAC" - default n -endef - -define Package/squeezelite-full/config - if PACKAGE_squeezelite-full - $(call Package/squeezelite/config/default) - endif -endef - -define Package/squeezelite-mini/config - if PACKAGE_squeezelite-mini - $(call Package/squeezelite/config/default) - endif -endef - -define Package/squeezelite/description/default - Squeezelite is a small headless squeezebox emulator for linux using alsa audio output - It is aimed at supporting high quality audio at multiple sample rates including - 44.1/48/88.2/96/176.4/192k/352.8/384kHz - Supported codecs: mp3, flac, ogg, aac, (wma and alac via ffmpeg) - Native support for PCM builtin - Optional support of DSD playback via PCM for DoP capable DAC - Optional resampling to match sound device -endef - -define Package/squeezelite/description - $(call Package/squeezelite/description/default) - . - This package has all the audio codecs compiled in. -endef - -define Package/squeezelite-mini/description - $(call Package/squeezelite/description/default) - . - This package will dynamically load installed codecs. -endef - -#ifeq ($(CONFIG_SQUEEZELITE_WMA),y) -# PKG_BUILD_DEPENDS+= libffmpeg-audio-dec -#endif - -TARGET_CFLAGS+= -Wall -fPIC -O2 -DSELFPIPE - -ifeq ($(CONFIG_SQUEEZELITE_WMA),y) - TARGET_CFLAGS+= -DFFMPEG -endif - -ifeq ($(CONFIG_SQUEEZELITE_DSD),y) - TARGET_CFLAGS+= -DDSD -endif - -ifeq ($(CONFIG_SQUEEZELITE_RESAMPLE),y) - TARGET_CFLAGS+= -DRESAMPLE -endif - -TARGET_LDFLAGS+= -lasound -lpthread -lm -lrt - -ifeq ($(BUILD_VARIANT),full) - TARGET_CFLAGS+= -DLINKALL -endif - -define Package/squeezelite/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/squeezelite $(1)/usr/bin - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/squeezelite.init $(1)/etc/init.d/squeezelite - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/squeezelite.conf $(1)/etc/config/squeezelite -endef - -Package/squeezelite-mini/install=$(Package/squeezelite/install) -Package/squeezelite-full/install=$(Package/squeezelite/install) - -$(eval $(call BuildPackage,squeezelite-mini)) -$(eval $(call BuildPackage,squeezelite-full)) diff --git a/sound/squeezelite/files/squeezelite.conf b/sound/squeezelite/files/squeezelite.conf deleted file mode 100644 index 6bfcaab..0000000 --- a/sound/squeezelite/files/squeezelite.conf +++ /dev/null @@ -1,13 +0,0 @@ - -config options 'options' - option name 'SqueezeWrt' - option model_name 'SqueezeLite' - option close_delay '0' - option priority '0' - option max_sr '0' - option device 'hw:0,0' - option decoder_auto_conf '1' - option dsd_over_pcm '0' - option ircontrol '0' - option interface '' - option enabled '1' diff --git a/sound/squeezelite/files/squeezelite.init b/sound/squeezelite/files/squeezelite.init deleted file mode 100644 index d574625..0000000 --- a/sound/squeezelite/files/squeezelite.init +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=99 -STOP=1 - -USE_PROCD=1 -PROG=/usr/bin/squeezelite - -# -# Auto config checks for existing codec installations if not specified in config -# Explicit disable (override) by setting appropriate "decode_xxx" in config -# -checkcodec() { - config_get_bool auto_conf options "decoder_auto_conf" 1 - config_get_bool codec options "$1" $auto_conf - - if [ $codec -ne 0 ] ; then - if [ $auto_conf -eq 0 ] ; then - #force use requested - echo "$4" - else - if [ -e "/usr/lib/${2}" ] ; then - # Use codec (it exists) - echo "$4" - else - #exclude non-existant - if [ -z "$4" ] ; then - echo "-e $3" - else - echo "$4,$3" - fi - fi - fi - else - # explicitly excluded - if [ -z "$4" ] ; then - echo "-e $3" - else - echo "$4,$3" - fi - fi -} - -make_cmdline() { - cmdline="" - - config_get name options name "SqueezeWrt" - cmdline="$cmdline -n $name" - - config_get model_name options model_name "SqueezeLite" - cmdline="$cmdline -M $model_name" - - config_get interface options interface "" - [ -n "$interface" ] && cmdline="$cmdline -I $interface" - - config_get device options device "" - [ -n "$device" ] && cmdline="$cmdline -o $device" - - config_get alsa_buffer options alsa_buffer 200 - [ $alsa_buffer -eq 0 ] && alsa_buffer="200" - - config_get alsa_period options alsa_period 4 - [ $alsa_period -eq 0 ] && alsa_period="4" - - config_get alsa_format options alsa_format 16 - [ $alsa_format = "0" ] && alsa_format="16" - - config_get alsa_mmap options alsa_mmap 0 - cmdline="$cmdline -a $alsa_buffer:$alsa_period:$alsa_format:$alsa_mmap" - - config_get stream_bufsiz options stream_bufsiz 2048 - config_get out_bufsiz options out_bufsiz 3763 - cmdline="$cmdline -b $stream_bufsiz:$out_bufsiz" - - config_get max_sr options max_sr 0 - if [ $max_sr -ne 0 ] ; then - max_sr="-r $max_sr" - - config_get sr_delay options sr_delay 0 - [ $sr_delay -ne 0 ] && max_sr="$max_sr:$sr_delay" - cmdline="$cmdline $max_sr" - fi - - - config_get close_delay options close_delay 0 - [ $close_delay -ne 0 ] && cmdline="$cmdline -C $close_delay" - - config_get server_addr options server_addr "" - if [ -n "$server_addr" ] ; then - config_get server_port options server_port 3483 - cmdline="$cmdline -s $server_addr:$server_port" - fi - - config_get priority options priority 0 - [ $priority -ne 0 ] && cmdline="$cmdline -p $priority" - - # - # ***NOTE: codec lib names are in squeezelite.h (set decode_auto_conf to 0 to ignore) - # - local excl_codecs="" - local vorbis_lib="libvorbisidec.so.1" - - excl_codecs=`checkcodec decode_flac "libFLAC.so.8" flac "$excl_codecs"` - excl_codecs=`checkcodec decode_mp3 "libmad.so.0" mp3 "$excl_codecs"` - excl_codecs=`checkcodec decode_aac "libfaad.so.2" aac "$excl_codecs"` - - [ -e "/usr/lib/$vorbis_lib" ] || vorbis_lib="libvorbisfile.so.3" - - excl_codecs=`checkcodec decode_ogg "$vorbis_lib" ogg "$excl_codecs"` - excl_codecs=`checkcodec decode_wma_alac "libavcodec.so.56" wma,alac "$excl_codecs"` - cmdline="$cmdline $excl_codecs" - - config_get dop options dsd_over_pcm 0 - [ $dop -eq 1 ] && cmdline="$cmdline -D" -} - -start_service() { - config_load squeezelite - - config_get_bool enabled options 'enabled' 0 - [ $enabled -eq 0 ] && return - - # Build command params - make_cmdline - - procd_open_instance - logger -t 'squeezelite' "$cmdline" - procd_set_param command "$PROG" $cmdline - procd_close_instance -} - -# Wait for service to exit and release sockets -reload_service() { - stop - sleep 2 - start -} - -restart() { - reload_service -} diff --git a/sound/squeezelite/patches/005-respect_LDFLAGS.patch b/sound/squeezelite/patches/005-respect_LDFLAGS.patch deleted file mode 100644 index d8df7ca..0000000 --- a/sound/squeezelite/patches/005-respect_LDFLAGS.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 1c53ed7db5b49ebf347efe65dbf9b740f9d54557 Mon Sep 17 00:00:00 2001 -From: Carlo Landmeter -Date: Tue, 31 Mar 2015 09:52:53 +0000 -Subject: [PATCH] respect LDFLAGS - ---- - Makefile | 17 +++++++++-------- - 1 file changed, 9 insertions(+), 8 deletions(-) - ---- a/Makefile -+++ b/Makefile -@@ -1,6 +1,7 @@ - # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile... --CFLAGS ?= -Wall -fPIC -O2 $(OPTS) --LDFLAGS ?= -lasound -lpthread -lm -lrt -+CFLAGS ?= -Wall -O2 -+CFLAGS += -fPIC $(OPTS) -+LIBS ?= -lasound -lpthread -lm -lrt - EXECUTABLE ?= squeezelite - - # passing one or more of these in $(OPTS) enables optional feature inclusion -@@ -52,20 +53,20 @@ endif - - # add optional link options - ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS))) -- LDFLAGS += $(LINKALL) -+ LIBS += $(LINKALL) - ifneq (,$(findstring $(OPT_FF), $(CFLAGS))) -- LDFLAGS += $(LINKALL_FF) -+ LIBS += $(LINKALL_FF) - endif - ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS))) -- LDFLAGS += $(LINKALL_RESAMPLE) -+ LIBS += $(LINKALL_RESAMPLE) - endif - ifneq (,$(findstring $(OPT_IR), $(CFLAGS))) -- LDFLAGS += $(LINKALL_IR) -+ LIBS += $(LINKALL_IR) - endif - else - # if not LINKALL and linux add LINK_LINUX - ifeq ($(UNAME), Linux) -- LDFLAGS += $(LINK_LINUX) -+ LIBS += $(LINK_LINUX) - endif - endif - -@@ -74,7 +75,7 @@ OBJECTS = $(SOURCES:.c=.o) - all: $(EXECUTABLE) - - $(EXECUTABLE): $(OBJECTS) -- $(CC) $(OBJECTS) $(LDFLAGS) -o $@ -+ $(CC) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $@ - - $(OBJECTS): $(DEPS) - diff --git a/sound/squeezelite/patches/010-select_broadcast_interface.patch b/sound/squeezelite/patches/010-select_broadcast_interface.patch deleted file mode 100644 index 465f61a..0000000 --- a/sound/squeezelite/patches/010-select_broadcast_interface.patch +++ /dev/null @@ -1,356 +0,0 @@ ---- a/main.c -+++ b/main.c -@@ -78,6 +78,7 @@ static void usage(const char *argv0) { - #if IR - " -i []\tEnable lirc remote control support (lirc config file ~/.lircrc used if filename not specified)\n" - #endif -+ " -I \t\tNetwork interface used to send discovery\n" - " -m \t\tSet mac address, format: ab:cd:ef:12:34:56\n" - " -M \tSet the squeezelite player model name sent to the server (default: " MODEL_NAME_STRING ")\n" - " -n \t\tSet the player name\n" -@@ -233,6 +234,8 @@ int main(int argc, char **argv) { - extern bool pcm_check_header; - char *logfile = NULL; - u8_t mac[6]; -+ char *iface = NULL; -+ in_addr_t bcast_addr = 0; - unsigned stream_buf_size = STREAMBUF_SIZE; - unsigned output_buf_size = 0; // set later - unsigned rates[MAX_SUPPORTED_SAMPLERATES] = { 0 }; -@@ -271,6 +274,7 @@ int main(int argc, char **argv) { - - int maxSampleRate = 0; - -+ memset(mac, 0, sizeof(mac)); - char *optarg = NULL; - int optind = 1; - int i; -@@ -278,8 +282,6 @@ int main(int argc, char **argv) { - #define MAXCMDLINE 512 - char cmdline[MAXCMDLINE] = ""; - -- get_mac(mac); -- - for (i = 0; i < argc && (strlen(argv[i]) + strlen(cmdline) + 2 < MAXCMDLINE); i++) { - strcat(cmdline, argv[i]); - strcat(cmdline, " "); -@@ -287,7 +289,7 @@ int main(int argc, char **argv) { - - while (optind < argc && strlen(argv[optind]) >= 2 && argv[optind][0] == '-') { - char *opt = argv[optind] + 1; -- if (strstr("oabcCdefmMnNpPrs" -+ if (strstr("oabcCdefImMnNpPrs" - #if ALSA - "UV" - #endif -@@ -382,6 +384,9 @@ int main(int argc, char **argv) { - case 'f': - logfile = optarg; - break; -+ case 'I': -+ iface = optarg; -+ break; - case 'm': - { - int byte = 0; -@@ -667,6 +672,11 @@ int main(int argc, char **argv) { - winsock_init(); - #endif - -+ if (!(bcast_addr = get_iface_info(log_slimproto, iface, mac))) { -+ fprintf(stderr, "Error binding to network or none given\n"); -+ exit(1); -+ } -+ - stream_init(log_stream, stream_buf_size); - - if (!strcmp(output_device, "-")) { -@@ -710,7 +720,7 @@ int main(int argc, char **argv) { - exit(1); - } - -- slimproto(log_slimproto, server, mac, name, namefile, modelname, maxSampleRate); -+ slimproto(log_slimproto, server, bcast_addr, mac, name, namefile, modelname, maxSampleRate); - - decode_close(); - stream_close(); ---- a/squeezelite.h -+++ b/squeezelite.h -@@ -403,7 +403,7 @@ typedef enum { EVENT_TIMEOUT = 0, EVENT_ - - char *next_param(char *src, char c); - u32_t gettime_ms(void); --void get_mac(u8_t *mac); -+in_addr_t get_iface_info(log_level level, char *iface, u8_t *mac); - void set_nonblock(sockfd s); - int connect_timeout(sockfd sock, const struct sockaddr *addr, socklen_t addrlen, int timeout); - void server_addr(char *server, in_addr_t *ip_ptr, unsigned *port_ptr); -@@ -459,7 +459,7 @@ void buf_init(struct buffer *buf, size_t - void buf_destroy(struct buffer *buf); - - // slimproto.c --void slimproto(log_level level, char *server, u8_t mac[6], const char *name, const char *namefile, const char *modelname, int maxSampleRate); -+void slimproto(log_level level, char *server, in_addr_t bcast_addr, u8_t mac[6], const char *name, const char *namefile, const char *modelname, int maxSampleRate); - void slimproto_stop(void); - void wake_controller(void); - ---- a/slimproto.c -+++ b/slimproto.c -@@ -119,7 +119,7 @@ void send_packet(u8_t *packet, size_t le - } - } - --static void sendHELO(bool reconnect, const char *fixed_cap, const char *var_cap, u8_t mac[6]) { -+static void sendHELO(bool reconnect, const char *fixed_cap, const char *var_cap, u8_t *mac) { - const char *base_cap = "Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=" VERSION; - struct HELO_packet pkt; - -@@ -782,7 +782,7 @@ void wake_controller(void) { - wake_signal(wake_e); - } - --in_addr_t discover_server(void) { -+in_addr_t discover_server(in_addr_t bcast_addr) { - struct sockaddr_in d; - struct sockaddr_in s; - char *buf; -@@ -798,7 +798,7 @@ in_addr_t discover_server(void) { - memset(&d, 0, sizeof(d)); - d.sin_family = AF_INET; - d.sin_port = htons(PORT); -- d.sin_addr.s_addr = htonl(INADDR_BROADCAST); -+ d.sin_addr.s_addr = bcast_addr; - - pollinfo.fd = disc_sock; - pollinfo.events = POLLIN; -@@ -829,7 +829,7 @@ in_addr_t discover_server(void) { - #define FIXED_CAP_LEN 256 - #define VAR_CAP_LEN 128 - --void slimproto(log_level level, char *server, u8_t mac[6], const char *name, const char *namefile, const char *modelname, int maxSampleRate) { -+void slimproto(log_level level, char *server, in_addr_t bcast_addr, u8_t mac[6], const char *name, const char *namefile, const char *modelname, int maxSampleRate) { - struct sockaddr_in serv_addr; - static char fixed_cap[FIXED_CAP_LEN], var_cap[VAR_CAP_LEN] = ""; - bool reconnect = false; -@@ -849,7 +849,7 @@ void slimproto(log_level level, char *se - } - - if (!slimproto_ip) { -- slimproto_ip = discover_server(); -+ slimproto_ip = discover_server(bcast_addr); - } - - if (!slimproto_port) { -@@ -924,7 +924,7 @@ void slimproto(log_level level, char *se - - // rediscover server if it was not set at startup - if (!server && ++failed_connect > 5) { -- slimproto_ip = serv_addr.sin_addr.s_addr = discover_server(); -+ slimproto_ip = serv_addr.sin_addr.s_addr = discover_server(bcast_addr); - } - - } else { ---- a/utils.c -+++ b/utils.c -@@ -22,11 +22,11 @@ - #include "squeezelite.h" - - #if LINUX || OSX || FREEBSD --#include -+#include - #include --#include --#if FREEBSD - #include -+#include -+#if FREEBSD || OSX - #include - #include - #endif -@@ -44,15 +44,11 @@ - #if WIN - #include - #endif --#if OSX --#include --#include --#include --#include --#endif - - #include - -+static log_level loglevel; -+ - // logging functions - const char *logtime(void) { - static char buf[100]; -@@ -114,58 +110,101 @@ u32_t gettime_ms(void) { - #endif - } - --// mac address --#if LINUX && !defined(SUN) --// search first 4 interfaces returned by IFCONF --void get_mac(u8_t mac[]) { -- char *utmac; -- struct ifconf ifc; -- struct ifreq *ifr, *ifend; -- struct ifreq ifreq; -- struct ifreq ifs[4]; -+// Get broadcast address for interface (given or first available) -+// Return MAC address if none given -+#if LINUX || OSX || FREEBSD - -- utmac = getenv("UTMAC"); -- if (utmac) -- { -- if ( strlen(utmac) == 17 ) -- { -- if (sscanf(utmac,"%2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx", -- &mac[0],&mac[1],&mac[2],&mac[3],&mac[4],&mac[5]) == 6) -- { -- return; -- } -- } -+in_addr_t get_iface_info(log_level level, char *iface, u8_t *mac) { -+ struct ifaddrs *addrs, *ifa; -+ struct sockaddr *sdl; -+ char ifname[16]; -+ unsigned char *ptr; -+ in_addr_t bcast_addr = 0; -+ int have_mac = 0, have_ifname = 0; -+ -+ loglevel = level; -+ -+ // Check for non-zero MAC -+ if ((mac[0] | mac[1] | mac[2]) != 0) -+ have_mac = 1; -+ -+ // Copy interface name, if it was provided. -+ if (iface != NULL) -+ { -+ if( strlen(iface) > sizeof(ifname) ) -+ return -1; - -+ strncpy(ifname, iface, sizeof(ifname)); -+ have_ifname = 1; - } - -- mac[0] = mac[1] = mac[2] = mac[3] = mac[4] = mac[5] = 0; -+ if (getifaddrs(&addrs) == 0) { -+ //iterate to find corresponding ethernet address -+ for (ifa = addrs; ifa; ifa = ifa->ifa_next) { -+ // Skip LOOPBACK interfaces, DOWN interfaces and interfaces that -+ // don't support BROADCAST. -+ if ((ifa->ifa_flags & IFF_LOOPBACK) -+ || !(ifa->ifa_flags & IFF_UP) -+ || !(ifa->ifa_flags & IFF_BROADCAST)) -+ { -+ continue; -+ } - -- int s = socket(AF_INET, SOCK_DGRAM, 0); -+ if (!have_ifname) -+ { -+ // We have found a valid interface name. Keep it. -+ strncpy(ifname, ifa->ifa_name, sizeof(ifname)); -+ have_ifname = 1; -+ } else { -+ if (strncmp(ifname, ifa->ifa_name, sizeof(ifname)) != 0) -+ { -+ // This is not the interface we're looking for. -+ continue; -+ } -+ } - -- ifc.ifc_len = sizeof(ifs); -- ifc.ifc_req = ifs; - -- if (ioctl(s, SIOCGIFCONF, &ifc) == 0) { -- ifend = ifs + (ifc.ifc_len / sizeof(struct ifreq)); -+ // Check address family. -+ if ((ifa->ifa_addr->sa_family == AF_INET) && -+ (((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr != 0)) -+ { -+ // Get broadcast address and MAC address -+ bcast_addr = ((struct sockaddr_in *)ifa->ifa_broadaddr)->sin_addr.s_addr; -+ break; -+ } -+ else -+ { -+ // Address is not IPv4 -+ if (iface == NULL) -+ have_ifname = 0; -+ } -+ -+ } - -- for (ifr = ifc.ifc_req; ifr < ifend; ifr++) { -- if (ifr->ifr_addr.sa_family == AF_INET) { -- -- strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name)); -- if (ioctl (s, SIOCGIFHWADDR, &ifreq) == 0) { -- memcpy(mac, ifreq.ifr_hwaddr.sa_data, 6); -- if (mac[0]+mac[1]+mac[2] != 0) { -- break; -- } -+ // Find MAC address matching interface -+ if (!have_mac && (bcast_addr != 0)) { -+ for (ifa = addrs; ifa; ifa = ifa->ifa_next) { -+ if ((ifa->ifa_addr->sa_family == PF_PACKET) && -+ (strncmp(ifname, ifa->ifa_name, sizeof(ifname)) == 0)) { -+ sdl = (struct sockaddr *)(ifa->ifa_addr); -+ ptr = (unsigned char *)sdl->sa_data; -+ memcpy(mac, ptr + 10, 6); -+ have_mac = 1; - } - } - } -+ -+ freeifaddrs(addrs); - } - -- close(s); -+ LOG_INFO("Interface: %s, broadcast: %08X, macaddr = %02x:%02x:%02x:%02x:%02x:%02x", -+ ifname, bcast_addr, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); -+ -+ return bcast_addr; - } - #endif - -+ - #if SUN - void get_mac(u8_t mac[]) { - struct arpreq parpreq; -@@ -232,30 +271,6 @@ void get_mac(u8_t mac[]) { - } - #endif - --#if OSX || FREEBSD --void get_mac(u8_t mac[]) { -- struct ifaddrs *addrs, *ptr; -- const struct sockaddr_dl *dlAddr; -- const unsigned char *base; -- -- mac[0] = mac[1] = mac[2] = mac[3] = mac[4] = mac[5] = 0; -- -- if (getifaddrs(&addrs) == 0) { -- ptr = addrs; -- while (ptr) { -- if (ptr->ifa_addr->sa_family == AF_LINK && ((const struct sockaddr_dl *) ptr->ifa_addr)->sdl_type == IFT_ETHER) { -- dlAddr = (const struct sockaddr_dl *)ptr->ifa_addr; -- base = (const unsigned char*) &dlAddr->sdl_data[dlAddr->sdl_nlen]; -- memcpy(mac, base, min(dlAddr->sdl_alen, 6)); -- break; -- } -- ptr = ptr->ifa_next; -- } -- freeifaddrs(addrs); -- } --} --#endif -- - #if WIN - #pragma comment(lib, "IPHLPAPI.lib") - void get_mac(u8_t mac[]) { diff --git a/sound/squeezelite/patches/020-no_mpg123.patch b/sound/squeezelite/patches/020-no_mpg123.patch deleted file mode 100644 index bc0547a..0000000 --- a/sound/squeezelite/patches/020-no_mpg123.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -15,7 +15,7 @@ OPT_IR = -DIR - SOURCES = \ - main.c slimproto.c buffer.c stream.c utils.c \ - output.c output_alsa.c output_pa.c output_stdout.c output_pack.c decode.c \ -- flac.c pcm.c mad.c vorbis.c faad.c mpg.c -+ flac.c pcm.c mad.c vorbis.c faad.c - - SOURCES_DSD = dsd.c dop.c dsd2pcm/dsd2pcm.c - SOURCES_FF = ffmpeg.c -@@ -25,7 +25,7 @@ SOURCES_IR = ir.c - - LINK_LINUX = -ldl - --LINKALL = -lFLAC -lmad -lvorbisfile -lfaad -lmpg123 -+LINKALL = -lFLAC -lmad -lvorbisfile -lfaad - LINKALL_FF = -lavcodec -lavformat -lavutil - LINKALL_RESAMPLE = -lsoxr - LINKALL_IR = -llirc_client ---- a/decode.c -+++ b/decode.c -@@ -147,8 +147,8 @@ void decode_init(log_level level, const - // try mad then mpg for mp3 unless command line option passed - if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mad")) && - (!include_codecs || strstr(include_codecs, "mp3") || strstr(include_codecs, "mad"))) codecs[i] = register_mad(); -- if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mpg")) && !codecs[i] && -- (!include_codecs || strstr(include_codecs, "mp3") || strstr(include_codecs, "mpg"))) codecs[i] = register_mpg(); -+// if (!(strstr(exclude_codecs, "mp3") || strstr(exclude_codecs, "mpg")) && !codecs[i] && -+// (!include_codecs || strstr(include_codecs, "mp3") || strstr(include_codecs, "mpg"))) codecs[i] = register_mpg(); - - mutex_create(decode.mutex); - ---- a/main.c -+++ b/main.c -@@ -39,7 +39,8 @@ - #else - #define CODECS_DSD "" - #endif --#define CODECS_MP3 " (mad,mpg for specific mp3 codec)" -+//#define CODECS_MP3 " (mad,mpg for specific mp3 codec)" -+#define CODECS_MP3 " (mad for specific mp3 codec)" - - #define CODECS CODECS_BASE CODECS_FF CODECS_DSD CODECS_MP3 - ---- a/squeezelite.h -+++ b/squeezelite.h -@@ -155,7 +155,7 @@ - #if LINUX - #define LIBFLAC "libFLAC.so.8" - #define LIBMAD "libmad.so.0" --#define LIBMPG "libmpg123.so.0" -+//#define LIBMPG "libmpg123.so.0" - #define LIBVORBIS "libvorbisfile.so.3" - #define LIBTREMOR "libvorbisidec.so.1" - #define LIBFAAD "libfaad.so.2" -@@ -169,7 +169,7 @@ - #if OSX - #define LIBFLAC "libFLAC.8.dylib" - #define LIBMAD "libmad.0.dylib" --#define LIBMPG "libmpg123.0.dylib" -+//#define LIBMPG "libmpg123.0.dylib" - #define LIBVORBIS "libvorbisfile.3.dylib" - #define LIBTREMOR "libvorbisidec.1.dylib" - #define LIBFAAD "libfaad.2.dylib" -@@ -182,7 +182,7 @@ - #if WIN - #define LIBFLAC "libFLAC.dll" - #define LIBMAD "libmad-0.dll" --#define LIBMPG "libmpg123-0.dll" -+//#define LIBMPG "libmpg123-0.dll" - #define LIBVORBIS "libvorbisfile.dll" - #define LIBTREMOR "libvorbisidec.dll" - #define LIBFAAD "libfaad2.dll" -@@ -195,7 +195,7 @@ - #if FREEBSD - #define LIBFLAC "libFLAC.so.11" - #define LIBMAD "libmad.so.2" --#define LIBMPG "libmpg123.so.0" -+//#define LIBMPG "libmpg123.so.0" - #define LIBVORBIS "libvorbisfile.so.6" - #define LIBTREMOR "libvorbisidec.so.1" - #define LIBFAAD "libfaad.so.2" diff --git a/sound/squeezelite/patches/030-fix_musl_compatibilty.patch b/sound/squeezelite/patches/030-fix_musl_compatibilty.patch deleted file mode 100644 index 24f00e0..0000000 --- a/sound/squeezelite/patches/030-fix_musl_compatibilty.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/output_alsa.c -+++ b/output_alsa.c -@@ -911,8 +911,11 @@ void output_init_alsa(log_level level, c - LOG_INFO("memory locked"); - } - -+#ifdef M_TRIM_THRESHOLD -+ // mallopt is not defined in musl libc - mallopt(M_TRIM_THRESHOLD, -1); - mallopt(M_MMAP_MAX, 0); -+#endif - - touch_memory(silencebuf, MAX_SILENCE_FRAMES * BYTES_PER_FRAME); - touch_memory(outputbuf->buf, outputbuf->size); diff --git a/sound/squeezelite/patches/040-clear_dynlink_errors.patch b/sound/squeezelite/patches/040-clear_dynlink_errors.patch deleted file mode 100644 index b534a2b..0000000 --- a/sound/squeezelite/patches/040-clear_dynlink_errors.patch +++ /dev/null @@ -1,105 +0,0 @@ ---- a/faad.c -+++ b/faad.c -@@ -594,6 +594,8 @@ static bool load_faad() { - return false; - } - -+ err = dlerror(); // Reset previous dynamic linking error string (if there was) -+ - a->NeAACDecGetCurrentConfiguration = dlsym(handle, "NeAACDecGetCurrentConfiguration"); - a->NeAACDecSetConfiguration = dlsym(handle, "NeAACDecSetConfiguration"); - a->NeAACDecOpen = dlsym(handle, "NeAACDecOpen"); ---- a/ffmpeg.c -+++ b/ffmpeg.c -@@ -620,6 +620,8 @@ static bool load_ff() { - return false; - } - -+ err = dlerror(); // Reset previous dynamic linking error string (if there was) -+ - sprintf(name, LIBAVFORMAT, LIBAVFORMAT_VERSION_MAJOR); - handle_format = dlopen(name, RTLD_NOW); - if (!handle_format) { ---- a/flac.c -+++ b/flac.c -@@ -241,6 +241,8 @@ static bool load_flac() { - return false; - } - -+ err = dlerror(); // Reset previous dynamic linking error string (if there was) -+ - f->FLAC__StreamDecoderErrorStatusString = dlsym(handle, "FLAC__StreamDecoderErrorStatusString"); - f->FLAC__StreamDecoderStateString = dlsym(handle, "FLAC__StreamDecoderStateString"); - f->FLAC__stream_decoder_new = dlsym(handle, "FLAC__stream_decoder_new"); ---- a/ir.c -+++ b/ir.c -@@ -168,10 +168,10 @@ static void *ir_thread() { - UNLOCK_I; - wake_controller(); - } -- -+ - free(code); - } -- -+ - return 0; - } - -@@ -185,6 +185,8 @@ static bool load_lirc() { - return false; - } - -+ err = dlerror(); // Reset previous dynamic linking error string (if there was) -+ - i->lirc_init = dlsym(handle, "lirc_init"); - i->lirc_deinit = dlsym(handle, "lirc_deinit"); - i->lirc_readconfig = dlsym(handle, "lirc_readconfig"); ---- a/mad.c -+++ b/mad.c -@@ -365,7 +365,9 @@ static bool load_mad() { - LOG_INFO("dlerror: %s", dlerror()); - return false; - } -- -+ -+ err = dlerror(); // Reset previous dynamic linking error string (if there was) -+ - m->mad_stream_init = dlsym(handle, "mad_stream_init"); - m->mad_frame_init = dlsym(handle, "mad_frame_init"); - m->mad_synth_init = dlsym(handle, "mad_synth_init"); ---- a/mpg.c -+++ b/mpg.c -@@ -222,7 +222,9 @@ static bool load_mpg() { - LOG_INFO("dlerror: %s", dlerror()); - return false; - } -- -+ -+ err = dlerror(); // Reset previous dynamic linking error string (if there was) -+ - m->mpg123_init = dlsym(handle, "mpg123_init"); - m->mpg123_feature = dlsym(handle, "mpg123_feature"); - m->mpg123_rates = dlsym(handle, "mpg123_rates"); ---- a/resample.c -+++ b/resample.c -@@ -251,6 +251,8 @@ static bool load_soxr(void) { - return false; - } - -+ err = dlerror(); // Reset previous dynamic linking error string (if there was) -+ - r->soxr_io_spec = dlsym(handle, "soxr_io_spec"); - r->soxr_quality_spec = dlsym(handle, "soxr_quality_spec"); - r->soxr_create = dlsym(handle, "soxr_create"); ---- a/vorbis.c -+++ b/vorbis.c -@@ -287,6 +287,8 @@ static bool load_vorbis() { - } - } - -+ err = dlerror(); // Reset previous dynamic linking error string (if there was) -+ - v->ov_read = tremor ? NULL : dlsym(handle, "ov_read"); - v->ov_read_tremor = tremor ? dlsym(handle, "ov_read") : NULL; - v->ov_info = dlsym(handle, "ov_info"); diff --git a/sound/svox/Makefile b/sound/svox/Makefile deleted file mode 100644 index 43c2b13..0000000 --- a/sound/svox/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=svox -PKG_VERSION:=1.0+git20130326 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/non-free/s/svox -PKG_MD5SUM:=df4bf610ff4273b420e80ff64af93130 - -PKG_MAINTAINER:=Alessandro Di Marco -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:= - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/svox - TITLE:=SVOX PicoTTS text-to-speech engine - SECTION:=sound - CATEGORY:=Sound - URL:=https://android.googlesource.com/platform/external/svox/ - DEPENDS:=+libpopt -endef - -define Package/svox/description - SVOX is an embedded speech technology company founded in 2000 and - headquartered in Zurich, Switzerland. SVOX was acquired by Nuance - Communications in 2011. Company's products included Automated Speech - Recognition (ASR), Text-to-Speech (TTS) and Speech Dialog systems, - with customers mostly being manufacturers and system integrators in - automotive and mobile device industries. - SVOX TTS technology is characterized by natural and clear sound as well - as unique polyglot capability - the same voice can speak multiple - languages like a native speaker. -endef - -define Build/Prepare - $(call Build/Prepare/Default) - mv $(PKG_BUILD_DIR)/pico/* $(PKG_BUILD_DIR) -endef - -define Package/svox/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pico2wave $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libttspico.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/share/pico/lang - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pico/lang/* $(1)/usr/share/pico/lang/ -endef - -$(eval $(call BuildPackage,svox)) diff --git a/sound/svox/patches/0001-autoconf-building-of-library-using-libtool.patch b/sound/svox/patches/0001-autoconf-building-of-library-using-libtool.patch deleted file mode 100644 index 73c76bb..0000000 --- a/sound/svox/patches/0001-autoconf-building-of-library-using-libtool.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 9fe1aa475b2667446b081623abc5c6f6083a76e6 Mon Sep 17 00:00:00 2001 -From: Mathieu Parent -Date: Sat, 24 Oct 2009 17:03:37 +0200 -Subject: [PATCH 1/7] autoconf building of library (using libtool) - ---- - pico/Makefile.am | 36 ++++++++++++++++++++++++++++++++++++ - pico/autogen.sh | 36 ++++++++++++++++++++++++++++++++++++ - pico/configure.in | 16 ++++++++++++++++ - 3 files changed, 88 insertions(+), 0 deletions(-) - create mode 100644 pico/Makefile.am - create mode 100755 pico/autogen.sh - create mode 100644 pico/configure.in - ---- /dev/null -+++ b/pico/Makefile.am -@@ -0,0 +1,36 @@ -+## Makefile.am -- Process this file with automake to produce Makefile.in -+ -+ACLOCAL_AMFLAGS = -I m4 -+ -+lib_LTLIBRARIES = libttspico.la -+libttspico_la_SOURCES = \ -+ lib/picoacph.c \ -+ lib/picoapi.c \ -+ lib/picobase.c \ -+ lib/picocep.c \ -+ lib/picoctrl.c \ -+ lib/picodata.c \ -+ lib/picodbg.c \ -+ lib/picoextapi.c \ -+ lib/picofftsg.c \ -+ lib/picokdbg.c \ -+ lib/picokdt.c \ -+ lib/picokfst.c \ -+ lib/picoklex.c \ -+ lib/picoknow.c \ -+ lib/picokpdf.c \ -+ lib/picokpr.c \ -+ lib/picoktab.c \ -+ lib/picoos.c \ -+ lib/picopal.c \ -+ lib/picopam.c \ -+ lib/picopr.c \ -+ lib/picorsrc.c \ -+ lib/picosa.c \ -+ lib/picosig.c \ -+ lib/picosig2.c \ -+ lib/picospho.c \ -+ lib/picotok.c \ -+ lib/picotrns.c \ -+ lib/picowa.c -+ ---- /dev/null -+++ b/pico/autogen.sh -@@ -0,0 +1,38 @@ -+#!/bin/sh -+ -+#created by aclocal -+rm -rf autom4te.cache -+rm -f aclocal.m4 -+ -+#created by libtoolize -+rm -rf m4 -+mkdir m4 -+rm -f ltmain.sh -+ -+#created by autoconf -+rm -f configure -+ -+#created by automake -+rm -f install-sh missing depcomp Makefile.in config.guess config.sub -+rm -f INSTALL COPYING compile -+ -+#created by ./configure -+rm -rf .deps -+rm -f Makefile config.log config.status libtool -+ -+if [ "$1" = "clean" ]; then -+ exit -+fi -+ -+IPATHS="-I lib" -+ -+libtoolize -+aclocal $IPATHS -+automake --add-missing -+autoconf $IPATHS -+ -+rm -rf autom4te.cache -+ -+echo "Now run ./configure and then make." -+exit 0 -+ ---- /dev/null -+++ b/pico/configure.in -@@ -0,0 +1,16 @@ -+dnl Process this file with autoconf to produce a configure script. -+ -+AC_PREREQ(2.59) -+ -+AC_INIT([svox], [1.0], [math.parent@gmail.com]) -+ -+AM_INIT_AUTOMAKE([1.9 foreign]) -+ -+AC_PROG_CC -+LT_INIT -+AC_PROG_LIBTOOL -+ -+AC_CONFIG_FILES([Makefile]) -+AC_OUTPUT -+ -+AC_CONFIG_MACRO_DIR([m4]) diff --git a/sound/svox/patches/0002-gitignore-for-autotools-files.patch b/sound/svox/patches/0002-gitignore-for-autotools-files.patch deleted file mode 100644 index df57df7..0000000 --- a/sound/svox/patches/0002-gitignore-for-autotools-files.patch +++ /dev/null @@ -1,51 +0,0 @@ -From b56b0a4bdf3e11271caab744f532cb055c517b51 Mon Sep 17 00:00:00 2001 -From: Mathieu Parent -Date: Sat, 24 Oct 2009 17:12:42 +0200 -Subject: [PATCH 2/7] gitignore for autotools files - ---- - pico/.gitignore | 32 ++++++++++++++++++++++++++++++++ - 1 files changed, 32 insertions(+), 0 deletions(-) - create mode 100644 pico/.gitignore - -diff --git a/pico/.gitignore b/pico/.gitignore -new file mode 100644 -index 0000000..4235569 ---- /dev/null -+++ b/pico/.gitignore -@@ -0,0 +1,32 @@ -+#created by aclocal -+autom4te.cache -+aclocal.m4 -+ -+#created by libtoolize -+m4 -+ltmain.sh -+ -+#created by autoconf -+configure -+ -+#created by automake -+install-sh -+missing -+depcomp -+Makefile.in -+config.guess -+config.sub -+ -+#created by ./configure -+.deps -+Makefile -+config.log -+config.status -+libtool -+ -+#created by make -+*.o -+*.lo -+.libs -+libttspico.la -+ --- -1.7.1 - diff --git a/sound/svox/patches/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch b/sound/svox/patches/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch deleted file mode 100644 index c8a2e83..0000000 --- a/sound/svox/patches/0003-pico2wave-Convert-text-to-.wav-using-svox-text-to-sp.patch +++ /dev/null @@ -1,399 +0,0 @@ -From 8bec80dccc9f4fe147a500486813f4e89a0d56d8 Mon Sep 17 00:00:00 2001 -From: Mathieu Parent -Date: Sun, 25 Oct 2009 15:19:01 +0100 -Subject: [PATCH 3/7] pico2wave: Convert text to .wav using svox text-to-speech system. - ---- - pico/.gitignore | 1 + - pico/Makefile.am | 7 + - pico/bin/pico2wave.c | 341 ++++++++++++++++++++++++++++++++++++++++++++++++++ - pico/configure.in | 3 + - 4 files changed, 352 insertions(+), 0 deletions(-) - create mode 100644 pico/bin/pico2wave.c - -diff --git a/pico/.gitignore b/pico/.gitignore -index 4235569..a110298 100644 ---- a/pico/.gitignore -+++ b/pico/.gitignore -@@ -29,4 +29,5 @@ libtool - *.lo - .libs - libttspico.la -+pico2wave - -diff --git a/pico/Makefile.am b/pico/Makefile.am -index 6d8a10c..0d9472d 100644 ---- a/pico/Makefile.am -+++ b/pico/Makefile.am -@@ -34,3 +34,10 @@ libttspico_la_SOURCES = \ - lib/picotrns.c \ - lib/picowa.c - -+bin_PROGRAMS = pico2wave -+pico2wave_SOURCES = \ -+ bin/pico2wave.c -+pico2wave_LDADD = \ -+ libttspico.la -lm -lpopt -+pico2wave_CFLAGS = -Wall -I lib -+ -diff --git a/pico/bin/pico2wave.c b/pico/bin/pico2wave.c -new file mode 100644 -index 0000000..0c035a7 ---- /dev/null -+++ b/pico/bin/pico2wave.c -@@ -0,0 +1,341 @@ -+/* pico2wave.c -+ -+ * Copyright (C) 2009 Mathieu Parent -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ * -+ * Convert text to .wav using svox text-to-speech system. -+ * -+ */ -+ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+ -+/* adaptation layer defines */ -+#define PICO_MEM_SIZE 2500000 -+#define DummyLen 100000000 -+ -+/* string constants */ -+#define MAX_OUTBUF_SIZE 128 -+const char * PICO_LINGWARE_PATH = "./lang/"; -+const char * PICO_VOICE_NAME = "PicoVoice"; -+ -+/* supported voices -+ Pico does not separately specify the voice and locale. */ -+const char * picoSupportedLangIso3[] = { "eng", "eng", "deu", "spa", "fra", "ita" }; -+const char * picoSupportedCountryIso3[] = { "USA", "GBR", "DEU", "ESP", "FRA", "ITA" }; -+const char * picoSupportedLang[] = { "en-US", "en-GB", "de-DE", "es-ES", "fr-FR", "it-IT" }; -+const char * picoInternalLang[] = { "en-US", "en-GB", "de-DE", "es-ES", "fr-FR", "it-IT" }; -+const char * picoInternalTaLingware[] = { "en-US_ta.bin", "en-GB_ta.bin", "de-DE_ta.bin", "es-ES_ta.bin", "fr-FR_ta.bin", "it-IT_ta.bin" }; -+const char * picoInternalSgLingware[] = { "en-US_lh0_sg.bin", "en-GB_kh0_sg.bin", "de-DE_gl0_sg.bin", "es-ES_zl0_sg.bin", "fr-FR_nk0_sg.bin", "it-IT_cm0_sg.bin" }; -+const char * picoInternalUtppLingware[] = { "en-US_utpp.bin", "en-GB_utpp.bin", "de-DE_utpp.bin", "es-ES_utpp.bin", "fr-FR_utpp.bin", "it-IT_utpp.bin" }; -+const int picoNumSupportedVocs = 6; -+ -+/* adapation layer global variables */ -+void * picoMemArea = NULL; -+pico_System picoSystem = NULL; -+pico_Resource picoTaResource = NULL; -+pico_Resource picoSgResource = NULL; -+pico_Resource picoUtppResource = NULL; -+pico_Engine picoEngine = NULL; -+pico_Char * picoTaFileName = NULL; -+pico_Char * picoSgFileName = NULL; -+pico_Char * picoUtppFileName = NULL; -+pico_Char * picoTaResourceName = NULL; -+pico_Char * picoSgResourceName = NULL; -+pico_Char * picoUtppResourceName = NULL; -+int picoSynthAbort = 0; -+ -+ -+int main(int argc, const char *argv[]) { -+ char * wavefile = NULL; -+ char * lang = "en-US"; -+ int langIndex = -1, langIndexTmp = -1; -+ char * text; -+ int8_t * buffer; -+ size_t bufferSize = 256; -+ -+ /* Parsing options */ -+ poptContext optCon; /* context for parsing command-line options */ -+ int opt; /* used for argument parsing */ -+ -+ struct poptOption optionsTable[] = { -+ { "wave", 'w', POPT_ARG_STRING, &wavefile, 0, -+ "Write output to this WAV file (extension SHOULD be .wav)", "filename.wav" }, -+ { "lang", 'l', POPT_ARG_STRING | POPT_ARGFLAG_SHOW_DEFAULT, &lang, 0, -+ "Language", "lang" }, -+ POPT_AUTOHELP -+ POPT_TABLEEND -+ }; -+ optCon = poptGetContext(NULL, argc, argv, optionsTable, POPT_CONTEXT_POSIXMEHARDER); -+ poptSetOtherOptionHelp(optCon, ""); -+ -+ /* Reporting about invalid extra options */ -+ while ((opt = poptGetNextOpt(optCon)) != -1) { -+ switch (opt) { -+ default: -+ fprintf(stderr, "Invalid option %s: %s\n", -+ poptBadOption(optCon, 0), poptStrerror(opt)); -+ poptPrintHelp(optCon, stderr, 0); -+ exit(1); -+ } -+ } -+ -+ /* Mandatory option: --wave */ -+ if(!wavefile) { -+ fprintf(stderr, "Mandatory option: %s\n\n", -+ "--wave=filename.wav"); -+ poptPrintHelp(optCon, stderr, 0); -+ exit(1); -+ } -+ /* option: --lang */ -+ for(langIndexTmp =0; langIndexTmp */ -+ const char **extra_argv; -+ extra_argv = poptGetArgs(optCon); -+ if(extra_argv) { -+ text = (char *) &(*extra_argv)[0]; -+ } else { -+ //TODO: stdin not supported yet. -+ fprintf(stderr, "Missing argument: %s\n\n", -+ ""); -+ poptPrintHelp(optCon, stderr, 0); -+ exit(1); -+ } -+ -+ poptFreeContext(optCon); -+ -+ buffer = malloc( bufferSize ); -+ -+ int ret, getstatus; -+ pico_Char * inp = NULL; -+ pico_Char * local_text = NULL; -+ short outbuf[MAX_OUTBUF_SIZE/2]; -+ pico_Int16 bytes_sent, bytes_recv, text_remaining, out_data_type; -+ pico_Retstring outMessage; -+ -+ picoSynthAbort = 0; -+ -+ picoMemArea = malloc( PICO_MEM_SIZE ); -+ if((ret = pico_initialize( picoMemArea, PICO_MEM_SIZE, &picoSystem ))) { -+ pico_getSystemStatusMessage(picoSystem, ret, outMessage); -+ fprintf(stderr, "Cannot initialize pico (%i): %s\n", ret, outMessage); -+ goto terminate; -+ } -+ -+ /* Load the text analysis Lingware resource file. */ -+ picoTaFileName = (pico_Char *) malloc( PICO_MAX_DATAPATH_NAME_SIZE + PICO_MAX_FILE_NAME_SIZE ); -+ strcpy((char *) picoTaFileName, PICO_LINGWARE_PATH); -+ strcat((char *) picoTaFileName, (const char *) picoInternalTaLingware[langIndex]); -+ if((ret = pico_loadResource( picoSystem, picoTaFileName, &picoTaResource ))) { -+ pico_getSystemStatusMessage(picoSystem, ret, outMessage); -+ fprintf(stderr, "Cannot load text analysis resource file (%i): %s\n", ret, outMessage); -+ goto unloadTaResource; -+ } -+ -+ /* Load the signal generation Lingware resource file. */ -+ picoSgFileName = (pico_Char *) malloc( PICO_MAX_DATAPATH_NAME_SIZE + PICO_MAX_FILE_NAME_SIZE ); -+ strcpy((char *) picoSgFileName, PICO_LINGWARE_PATH); -+ strcat((char *) picoSgFileName, (const char *) picoInternalSgLingware[langIndex]); -+ if((ret = pico_loadResource( picoSystem, picoSgFileName, &picoSgResource ))) { -+ pico_getSystemStatusMessage(picoSystem, ret, outMessage); -+ fprintf(stderr, "Cannot load signal generation Lingware resource file (%i): %s\n", ret, outMessage); -+ goto unloadSgResource; -+ } -+ -+ /* Load the utpp Lingware resource file if exists - NOTE: this file is optional -+ and is currently not used. Loading is only attempted for future compatibility. -+ If this file is not present the loading will still succeed. // -+ picoUtppFileName = (pico_Char *) malloc( PICO_MAX_DATAPATH_NAME_SIZE + PICO_MAX_FILE_NAME_SIZE ); -+ strcpy((char *) picoUtppFileName, PICO_LINGWARE_PATH); -+ strcat((char *) picoUtppFileName, (const char *) picoInternalUtppLingware[langIndex]); -+ ret = pico_loadResource( picoSystem, picoUtppFileName, &picoUtppResource ); -+ pico_getSystemStatusMessage(picoSystem, ret, outMessage); -+ printf("pico_loadResource: %i: %s\n", ret, outMessage); -+ */ -+ -+ /* Get the text analysis resource name. */ -+ picoTaResourceName = (pico_Char *) malloc( PICO_MAX_RESOURCE_NAME_SIZE ); -+ if((ret = pico_getResourceName( picoSystem, picoTaResource, (char *) picoTaResourceName ))) { -+ pico_getSystemStatusMessage(picoSystem, ret, outMessage); -+ fprintf(stderr, "Cannot get the text analysis resource name (%i): %s\n", ret, outMessage); -+ goto unloadUtppResource; -+ } -+ -+ /* Get the signal generation resource name. */ -+ picoSgResourceName = (pico_Char *) malloc( PICO_MAX_RESOURCE_NAME_SIZE ); -+ if((ret = pico_getResourceName( picoSystem, picoSgResource, (char *) picoSgResourceName ))) { -+ pico_getSystemStatusMessage(picoSystem, ret, outMessage); -+ fprintf(stderr, "Cannot get the signal generation resource name (%i): %s\n", ret, outMessage); -+ goto unloadUtppResource; -+ } -+ -+ -+ /* Create a voice definition. */ -+ if((ret = pico_createVoiceDefinition( picoSystem, (const pico_Char *) PICO_VOICE_NAME ))) { -+ pico_getSystemStatusMessage(picoSystem, ret, outMessage); -+ fprintf(stderr, "Cannot create voice definition (%i): %s\n", ret, outMessage); -+ goto unloadUtppResource; -+ } -+ -+ /* Add the text analysis resource to the voice. */ -+ if((ret = pico_addResourceToVoiceDefinition( picoSystem, (const pico_Char *) PICO_VOICE_NAME, picoTaResourceName ))) { -+ pico_getSystemStatusMessage(picoSystem, ret, outMessage); -+ fprintf(stderr, "Cannot add the text analysis resource to the voice (%i): %s\n", ret, outMessage); -+ goto unloadUtppResource; -+ } -+ -+ /* Add the signal generation resource to the voice. */ -+ if((ret = pico_addResourceToVoiceDefinition( picoSystem, (const pico_Char *) PICO_VOICE_NAME, picoSgResourceName ))) { -+ pico_getSystemStatusMessage(picoSystem, ret, outMessage); -+ fprintf(stderr, "Cannot add the signal generation resource to the voice (%i): %s\n", ret, outMessage); -+ goto unloadUtppResource; -+ } -+ -+ /* Create a new Pico engine. */ -+ if((ret = pico_newEngine( picoSystem, (const pico_Char *) PICO_VOICE_NAME, &picoEngine ))) { -+ pico_getSystemStatusMessage(picoSystem, ret, outMessage); -+ fprintf(stderr, "Cannot create a new pico engine (%i): %s\n", ret, outMessage); -+ goto disposeEngine; -+ } -+ -+ local_text = (pico_Char *) text ; -+ text_remaining = strlen((const char *) local_text) + 1; -+ -+ inp = (pico_Char *) local_text; -+ -+ size_t bufused = 0; -+ -+ picoos_Common common = (picoos_Common) pico_sysGetCommon(picoSystem); -+ -+ picoos_SDFile sdOutFile = NULL; -+ -+ picoos_bool done = TRUE; -+ if(TRUE != (done = picoos_sdfOpenOut(common, &sdOutFile, -+ (picoos_char *) wavefile, SAMPLE_FREQ_16KHZ, PICOOS_ENC_LIN))) -+ { -+ fprintf(stderr, "Cannot open output wave file\n"); -+ ret = 1; -+ goto disposeEngine; -+ } -+ -+ /* synthesis loop */ -+ while (text_remaining) { -+ /* Feed the text into the engine. */ -+ if((ret = pico_putTextUtf8( picoEngine, inp, text_remaining, &bytes_sent ))) { -+ pico_getSystemStatusMessage(picoSystem, ret, outMessage); -+ fprintf(stderr, "Cannot put Text (%i): %s\n", ret, outMessage); -+ goto disposeEngine; -+ } -+ -+ text_remaining -= bytes_sent; -+ inp += bytes_sent; -+ -+ do { -+ if (picoSynthAbort) { -+ goto disposeEngine; -+ } -+ /* Retrieve the samples and add them to the buffer. */ -+ getstatus = pico_getData( picoEngine, (void *) outbuf, -+ MAX_OUTBUF_SIZE, &bytes_recv, &out_data_type ); -+ if((getstatus !=PICO_STEP_BUSY) && (getstatus !=PICO_STEP_IDLE)){ -+ pico_getSystemStatusMessage(picoSystem, getstatus, outMessage); -+ fprintf(stderr, "Cannot get Data (%i): %s\n", getstatus, outMessage); -+ goto disposeEngine; -+ } -+ if (bytes_recv) { -+ if ((bufused + bytes_recv) <= bufferSize) { -+ memcpy(buffer+bufused, (int8_t *) outbuf, bytes_recv); -+ bufused += bytes_recv; -+ } else { -+ done = picoos_sdfPutSamples( -+ sdOutFile, -+ bufused / 2, -+ (picoos_int16*) (buffer)); -+ bufused = 0; -+ memcpy(buffer, (int8_t *) outbuf, bytes_recv); -+ bufused += bytes_recv; -+ } -+ } -+ } while (PICO_STEP_BUSY == getstatus); -+ /* This chunk of synthesis is finished; pass the remaining samples. */ -+ if (!picoSynthAbort) { -+ done = picoos_sdfPutSamples( -+ sdOutFile, -+ bufused / 2, -+ (picoos_int16*) (buffer)); -+ } -+ picoSynthAbort = 0; -+ } -+ -+ if(TRUE != (done = picoos_sdfCloseOut(common, &sdOutFile))) -+ { -+ fprintf(stderr, "Cannot close output wave file\n"); -+ ret = 1; -+ goto disposeEngine; -+ } -+ -+disposeEngine: -+ if (picoEngine) { -+ pico_disposeEngine( picoSystem, &picoEngine ); -+ pico_releaseVoiceDefinition( picoSystem, (pico_Char *) PICO_VOICE_NAME ); -+ picoEngine = NULL; -+ } -+unloadUtppResource: -+ if (picoUtppResource) { -+ pico_unloadResource( picoSystem, &picoUtppResource ); -+ picoUtppResource = NULL; -+ } -+unloadSgResource: -+ if (picoSgResource) { -+ pico_unloadResource( picoSystem, &picoSgResource ); -+ picoSgResource = NULL; -+ } -+unloadTaResource: -+ if (picoTaResource) { -+ pico_unloadResource( picoSystem, &picoTaResource ); -+ picoTaResource = NULL; -+ } -+terminate: -+ if (picoSystem) { -+ pico_terminate(&picoSystem); -+ picoSystem = NULL; -+ } -+ exit(ret); -+} -+ -diff --git a/pico/configure.in b/pico/configure.in -index 0afb56d..349eb1d 100644 ---- a/pico/configure.in -+++ b/pico/configure.in -@@ -14,3 +14,6 @@ AC_CONFIG_FILES([Makefile]) - AC_OUTPUT - - AC_CONFIG_MACRO_DIR([m4]) -+ -+AC_CHECK_LIB(popt, poptGetContext) -+ --- -1.7.1 - diff --git a/sound/svox/patches/0004-add-header-files.patch b/sound/svox/patches/0004-add-header-files.patch deleted file mode 100644 index f057308..0000000 --- a/sound/svox/patches/0004-add-header-files.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0866cb3f7cfe4b8bae1edc8d0dbf18c85e9ca74f Mon Sep 17 00:00:00 2001 -From: Mathieu Parent -Date: Tue, 27 Oct 2009 18:29:45 +0100 -Subject: [PATCH 4/7] add header files - ---- - pico/Makefile.am | 36 ++++++++++++++++++++++++++++++++++++ - 1 files changed, 36 insertions(+), 0 deletions(-) - -diff --git a/pico/Makefile.am b/pico/Makefile.am -index 0d9472d..9151042 100644 ---- a/pico/Makefile.am -+++ b/pico/Makefile.am -@@ -34,6 +34,42 @@ libttspico_la_SOURCES = \ - lib/picotrns.c \ - lib/picowa.c - -+libttspico_ladir = $(includedir) -+libttspico_la_HEADERS = \ -+ lib/picoacph.h \ -+ lib/picoapid.h \ -+ lib/picoapi.h \ -+ lib/picobase.h \ -+ lib/picocep.h \ -+ lib/picoctrl.h \ -+ lib/picodata.h \ -+ lib/picodbg.h \ -+ lib/picodefs.h \ -+ lib/picodsp.h \ -+ lib/picoextapi.h \ -+ lib/picofftsg.h \ -+ lib/picokdbg.h \ -+ lib/picokdt.h \ -+ lib/picokfst.h \ -+ lib/picoklex.h \ -+ lib/picoknow.h \ -+ lib/picokpdf.h \ -+ lib/picokpr.h \ -+ lib/picoktab.h \ -+ lib/picoos.h \ -+ lib/picopal.h \ -+ lib/picopam.h \ -+ lib/picopltf.h \ -+ lib/picopr.h \ -+ lib/picorsrc.h \ -+ lib/picosa.h \ -+ lib/picosig2.h \ -+ lib/picosig.h \ -+ lib/picospho.h \ -+ lib/picotok.h \ -+ lib/picotrns.h \ -+ lib/picowa.h -+ - bin_PROGRAMS = pico2wave - pico2wave_SOURCES = \ - bin/pico2wave.c --- -1.7.1 - diff --git a/sound/svox/patches/0005-Install-lang-files.patch b/sound/svox/patches/0005-Install-lang-files.patch deleted file mode 100644 index 95344e3..0000000 --- a/sound/svox/patches/0005-Install-lang-files.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 486b9f924bdf38f5f213feed2631060b44024c11 Mon Sep 17 00:00:00 2001 -From: Mathieu Parent -Date: Tue, 27 Oct 2009 23:06:46 +0100 -Subject: [PATCH 5/7] Install lang files - ---- - pico/Makefile.am | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) - -diff --git a/pico/Makefile.am b/pico/Makefile.am -index 9151042..8898050 100644 ---- a/pico/Makefile.am -+++ b/pico/Makefile.am -@@ -70,6 +70,15 @@ libttspico_la_HEADERS = \ - lib/picotrns.h \ - lib/picowa.h - -+picolangdir = $(datadir)/pico/lang -+picolang_DATA = \ -+ lang/de-DE*.bin \ -+ lang/en-GB*.bin \ -+ lang/en-US*.bin \ -+ lang/es-ES*.bin \ -+ lang/fr-FR*.bin \ -+ lang/it-IT*.bin -+ - bin_PROGRAMS = pico2wave - pico2wave_SOURCES = \ - bin/pico2wave.c --- -1.7.1 - diff --git a/sound/svox/patches/0006-Set-picolangdir.patch b/sound/svox/patches/0006-Set-picolangdir.patch deleted file mode 100644 index 1ec646d..0000000 --- a/sound/svox/patches/0006-Set-picolangdir.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0102d423b79de7af982c8d4619d816f95a9b9278 Mon Sep 17 00:00:00 2001 -From: Mathieu Parent -Date: Thu, 29 Oct 2009 23:55:19 +0100 -Subject: [PATCH 6/7] Set picolangdir - ---- - pico/Makefile.am | 2 +- - pico/bin/pico2wave.c | 4 ++++ - 2 files changed, 5 insertions(+), 1 deletions(-) - -diff --git a/pico/Makefile.am b/pico/Makefile.am -index 8898050..a19c42a 100644 ---- a/pico/Makefile.am -+++ b/pico/Makefile.am -@@ -84,5 +84,5 @@ pico2wave_SOURCES = \ - bin/pico2wave.c - pico2wave_LDADD = \ - libttspico.la -lm -lpopt --pico2wave_CFLAGS = -Wall -I lib -+pico2wave_CFLAGS = -Wall -Dpicolangdir=\"$(picolangdir)\" -I lib - -diff --git a/pico/bin/pico2wave.c b/pico/bin/pico2wave.c -index 0c035a7..ec7ab79 100644 ---- a/pico/bin/pico2wave.c -+++ b/pico/bin/pico2wave.c -@@ -35,7 +35,11 @@ - - /* string constants */ - #define MAX_OUTBUF_SIZE 128 -+#ifdef picolangdir -+const char * PICO_LINGWARE_PATH = picolangdir "/"; -+#else - const char * PICO_LINGWARE_PATH = "./lang/"; -+#endif - const char * PICO_VOICE_NAME = "PicoVoice"; - - /* supported voices --- -1.7.1 - diff --git a/sound/svox/patches/0008-64bits.patch b/sound/svox/patches/0008-64bits.patch deleted file mode 100644 index 883a42e..0000000 --- a/sound/svox/patches/0008-64bits.patch +++ /dev/null @@ -1,26 +0,0 @@ -Description: fix execution on 64bit archs -Bug: http://code.google.com/p/android/issues/detail?id=12224 -Author: Samuel Thibault - ---- svox/pico/lib/picoapi.c.original 2010-10-25 19:06:57.000000000 +0200 -+++ svox/pico/lib/picoapi.c 2010-10-25 19:07:18.000000000 +0200 -@@ -90,7 +90,7 @@ - status = PICO_ERR_NULLPTR_ACCESS; - } else { - byte_ptr_t rest_mem; -- picoos_uint32 rest_mem_size; -+ picoos_objsize_t rest_mem_size; - pico_System sys; - picoos_MemoryManager sysMM; - picoos_ExceptionManager sysEM; ---- svox/pico/lib/picosig2.c.original 2010-10-26 00:17:18.000000000 +0200 -+++ svox/pico/lib/picosig2.c 2010-10-26 00:17:19.000000000 +0200 -@@ -568,7 +568,7 @@ - for (nI = 1; nI < m1; nI++) { - XXr[nI] = c1[nI] << shift; - } -- i = sizeof(picoos_int32) * (PICODSP_FFTSIZE + 1 - m1); -+ i = sizeof(picoos_int32) * (PICODSP_FFTSIZE - m1); - picoos_mem_set(XXr + m1, 0, i); - dfct_nmf(m4, XXr); /* DFCT directly in fixed point */ - diff --git a/sound/svox/patches/0009-Fix-link-order.patch b/sound/svox/patches/0009-Fix-link-order.patch deleted file mode 100644 index bcf3870..0000000 --- a/sound/svox/patches/0009-Fix-link-order.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: svox-1.0+git20130326/pico/Makefile.am -=================================================================== ---- svox-1.0+git20130326.orig/pico/Makefile.am 2013-11-12 12:37:05.939979854 -0500 -+++ svox-1.0+git20130326/pico/Makefile.am 2013-11-12 13:00:52.336945041 -0500 -@@ -70,6 +70,8 @@ - lib/picotrns.h \ - lib/picowa.h - -+libttspico_la_LIBADD = -lm -+ - picolangdir = $(datadir)/pico/lang - picolang_DATA = \ - lang/de-DE*.bin \ -@@ -83,6 +85,6 @@ - pico2wave_SOURCES = \ - bin/pico2wave.c - pico2wave_LDADD = \ -- libttspico.la -lm -lpopt -+ libttspico.la -lpopt - pico2wave_CFLAGS = -Wall -Dpicolangdir=\"$(picolangdir)\" -I lib - diff --git a/sound/svox/patches/0010-platform.patch b/sound/svox/patches/0010-platform.patch deleted file mode 100644 index ff76f75..0000000 --- a/sound/svox/patches/0010-platform.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/pico/lib/picopltf.h -+++ b/pico/lib/picopltf.h -@@ -39,6 +39,8 @@ - #define PICO_MacOSX 5 /* Macintosh OS X */ - #define PICO_Linux 7 /* Linux */ - -+#define PICO_GENERIC 99 /* Generic */ -+ - /* * definition of current platform ***/ - #if !defined(PICO_PLATFORM) - #if defined(_WIN32) -@@ -48,7 +50,7 @@ - #elif defined(linux) || defined(__linux__) || defined(__linux) - #define PICO_PLATFORM PICO_Linux - #else --#error PICO_PLATFORM not defined -+#define PICO_PLATFORM PICO_GENERIC - #endif - #endif /* !defined(PICO_PLATFORM) */ - -@@ -64,7 +66,8 @@ - #define PICO_PLATFORM_STRING "UnknownPlatform" - #endif - --#if (PICO_PLATFORM == PICO_MacOSX) -+#include -+#if __BYTE_ORDER == __BIG_ENDIAN - #define PICO_ENDIANNESS ENDIANNESS_BIG - #else - #define PICO_ENDIANNESS ENDIANNESS_LITTLE diff --git a/sound/svox/patches/0011-subdir.patch b/sound/svox/patches/0011-subdir.patch deleted file mode 100644 index fa9e91f..0000000 --- a/sound/svox/patches/0011-subdir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN a/pico/configure.in b/pico/configure.in ---- a/pico/configure.in 2015-01-21 18:59:39.604452795 +0100 -+++ b/pico/configure.in 2015-01-21 19:00:53.288777298 +0100 -@@ -4,7 +4,7 @@ - - AC_INIT([svox], [1.0], [math.parent@gmail.com]) - --AM_INIT_AUTOMAKE([1.9 foreign]) -+AM_INIT_AUTOMAKE([1.9 foreign subdir-objects]) - - AC_PROG_CC - LT_INIT diff --git a/sound/svox/patches/0012-no-headers.patch b/sound/svox/patches/0012-no-headers.patch deleted file mode 100644 index edf4d04..0000000 --- a/sound/svox/patches/0012-no-headers.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -urN a/pico/Makefile.am b/pico/Makefile.am ---- a/pico/Makefile.am 2015-01-22 01:33:21.470895431 +0100 -+++ b/pico/Makefile.am 2015-01-22 01:36:03.042228475 +0100 -@@ -34,42 +34,6 @@ - lib/picotrns.c \ - lib/picowa.c - --libttspico_ladir = $(includedir) --libttspico_la_HEADERS = \ -- lib/picoacph.h \ -- lib/picoapid.h \ -- lib/picoapi.h \ -- lib/picobase.h \ -- lib/picocep.h \ -- lib/picoctrl.h \ -- lib/picodata.h \ -- lib/picodbg.h \ -- lib/picodefs.h \ -- lib/picodsp.h \ -- lib/picoextapi.h \ -- lib/picofftsg.h \ -- lib/picokdbg.h \ -- lib/picokdt.h \ -- lib/picokfst.h \ -- lib/picoklex.h \ -- lib/picoknow.h \ -- lib/picokpdf.h \ -- lib/picokpr.h \ -- lib/picoktab.h \ -- lib/picoos.h \ -- lib/picopal.h \ -- lib/picopam.h \ -- lib/picopltf.h \ -- lib/picopr.h \ -- lib/picorsrc.h \ -- lib/picosa.h \ -- lib/picosig2.h \ -- lib/picosig.h \ -- lib/picospho.h \ -- lib/picotok.h \ -- lib/picotrns.h \ -- lib/picowa.h -- - libttspico_la_LIBADD = -lm - - picolangdir = $(datadir)/pico/lang diff --git a/sound/upmpdcli/Config.in b/sound/upmpdcli/Config.in deleted file mode 100644 index fe32722..0000000 --- a/sound/upmpdcli/Config.in +++ /dev/null @@ -1,17 +0,0 @@ -config PACKAGE_UPMPDCLI_SCCTL - bool "scctl command for configuring SongCast receivers" - default no - depends on PACKAGE_upmpdcli - help - Installs the scctl command. See the following link for more info: - http://www.lesbonscomptes.com/upmpdcli/scmulti.html - -config PACKAGE_UPMPDCLI_SC_WEB_INTERFACE - bool "SongCast web server and associated files (depends on python)" - default no - depends on PACKAGE_upmpdcli - select PACKAGE_python - select PACKAGE_UPMPDCLI_SCCTL - help - Installs the SongCast web interface and web server. See the following - link for more info: http://www.lesbonscomptes.com/upmpdcli/scmulti.html diff --git a/sound/upmpdcli/Makefile b/sound/upmpdcli/Makefile deleted file mode 100644 index 27bbee8..0000000 --- a/sound/upmpdcli/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=upmpdcli -PKG_VERSION:=1.1.3 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.lesbonscomptes.com/upmpdcli/downloads -PKG_MD5SUM:=de9f232d6d5f746ec81ec239e11bdda4 -PKG_MAINTAINER:=Petko Bordjukov -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/upmpdcli - SECTION:=sound - CATEGORY:=Sound - URL:=http://www.lesbonscomptes.com/upmpdcli - DEPENDS+= +libupnpp +libmpdclient - TITLE:=A UPnP front-end to MPD, the Music Player Daemon - USERID:=upmpdcli=89:upmpdcli=89 - MENU:=1 -endef - -define Package/upmpdcli/description -upmpdcli implements an UPnP Media Renderer, using MPD to perform the real work. -endef - -define Package/upmpdcli/config - source "$(SOURCE)/Config.in" -endef - -define Package/upmpdcli/install - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/upmpdcli.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/upmpdcli.config $(1)/etc/config/upmpdcli - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/upmpdcli $(1)/usr/bin/ -ifeq ($(CONFIG_PACKAGE_UPMPDCLI_SCCTL),y) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scctl $(1)/usr/bin/ -endif - $(INSTALL_DIR) $(1)/usr/share/upmpdcli -ifneq ($(CONFIG_PACKAGE_UPMPDCLI_SC_WEB_INTERFACE),y) - $(RM) -rf $(PKG_INSTALL_DIR)/usr/share/upmpdcli/web -endif - $(CP) $(PKG_INSTALL_DIR)/usr/share/upmpdcli $(1)/usr/share/ - $(INSTALL_DATA) ./files/upmpdcli.png $(1)/usr/share/upmpdcli/icon.png - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/upmpdcli.init $(1)/etc/init.d/upmpdcli -endef - -$(eval $(call BuildPackage,upmpdcli)) diff --git a/sound/upmpdcli/files/upmpdcli.config b/sound/upmpdcli/files/upmpdcli.config deleted file mode 100644 index 56b0ba3..0000000 --- a/sound/upmpdcli/files/upmpdcli.config +++ /dev/null @@ -1,15 +0,0 @@ -config upmpdcli lan - option interface 'br-lan' -# option friendly_name 'upmpdcli' -# option mpd_host '127.0.0.1' -# option mpd_port '6600' -# option upmpd_port '0' -# option config '/etc/upmpdcli.conf' - -# Add additional interfaces -# -#config upmpdcli wifi -# option interface 'wlan0' - -#config upmpdcli wan -# option interface 'eth0' diff --git a/sound/upmpdcli/files/upmpdcli.init b/sound/upmpdcli/files/upmpdcli.init deleted file mode 100644 index 6c69209..0000000 --- a/sound/upmpdcli/files/upmpdcli.init +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -NAME=upmpdcli -START=95 - -UPMPD_BIN=/usr/bin/${NAME} - -USE_PROCD=1 - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}" -} - -start_instance() { - local cfg="$1" - local interface - - procd_open_instance - - procd_set_param command "${UPMPD_BIN}" - -# config_get interface "$cfg" interface -# procd_add_reload_interface_trigger $interface - - append_arg "$cfg" interface "-i" - append_arg "$cfg" mpd_host "-h" - append_arg "$cfg" mpd_port "-p" - append_arg "$cfg" upmpd_port "-P" - - append_arg "$cfg" config "-c" - append_arg "$cfg" friendly_name "-f" - - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger "${NAME}" -} - -start_service() { - config_load ${NAME} - config_foreach start_instance ${NAME} -} diff --git a/sound/upmpdcli/files/upmpdcli.png b/sound/upmpdcli/files/upmpdcli.png deleted file mode 100644 index ba50c64..0000000 Binary files a/sound/upmpdcli/files/upmpdcli.png and /dev/null differ diff --git a/sound/upmpdcli/patches/010-Add_icon_config.patch b/sound/upmpdcli/patches/010-Add_icon_config.patch deleted file mode 100644 index 3030ae3..0000000 --- a/sound/upmpdcli/patches/010-Add_icon_config.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/upmpdcli.conf-dist -+++ b/src/upmpdcli.conf-dist -@@ -24,7 +24,7 @@ - - # You can set a path to an icon here. The icon will be displayed by a control - # point. The icon will only be read once, when upmpdcli starts up. --# iconpath = /usr/share/upmpdcli/icon.png -+iconpath = /usr/share/upmpdcli/icon.png - - # You can set a path to an html file here, to replace the default - # presentation page. The page will only be read once, when upmpdcli starts diff --git a/utils/acl/Makefile b/utils/acl/Makefile index 9439582..53e2356 100644 --- a/utils/acl/Makefile +++ b/utils/acl/Makefile @@ -8,12 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=acl -PKG_REV:=ea3c6bb711e76d91759f8bf5475e1900362a3142 -PKG_VERSION:=20160519 +PKG_REV:=c39f7c5475e3e00d8abeb7b30e61958670fb3ee2 +PKG_VERSION:=20180121 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=git://git.sv.gnu.org/acl.git +PKG_MIRROR_HASH:=0291d931bbac041f14bc12d317e505cd596e0ec6f1b8bcdfa03b9a1fad274ac2 +PKG_SOURCE_URL:=https://git.savannah.gnu.org/git/acl.git PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=$(PKG_REV) diff --git a/utils/acpid/Makefile b/utils/acpid/Makefile deleted file mode 100644 index f1d1d9c..0000000 --- a/utils/acpid/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (C) 2012-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=acpid -PKG_VERSION:=2.0.27 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@SF/acpid2 -PKG_MD5SUM:=e41bdf628e122edb4342fca432ea7db9 -PKG_MAINTAINER:=Thomas Heil -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/acpid - SECTION:=utils - CATEGORY:=Utilities - TITLE:=The ACPI Daemon (acpid) With Netlink Support - URL:=http://tedfelix.com/linux/acpid-netlink.html - DEPENDS:=@(TARGET_x86||TARGET_x86_64) +kmod-input-evdev -endef - -define Package/acpid/description - The ACPI Daemon (acpid) With Netlink Support -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - LD="$(TARGET_CC)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - all -endef - -define Package/acpid/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/acpid $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/acpi_listen $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/acpi/events - $(INSTALL_CONF) ./files/default $(1)/etc/acpi/events/default - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_CONF) ./files/acpid.init $(1)/etc/init.d/acpid - chmod 0750 $(1)/etc/init.d/acpid - $(INSTALL_DIR) $(1)/etc/hotplug.d/input/ - $(INSTALL_CONF) ./files/acpid.hotplug $(1)/etc/hotplug.d/input/ -endef - -define Package/acpid/postinst -#!/bin/sh -[ -n "$${IPKG_INSTROOT}" ] || { - echo "waiting for input devices to come up" - /etc/init.d/acpid enable - sleep 5 - /etc/init.d/acpid start - echo "please try the power button" - exit 0 -} -endef - -$(eval $(call BuildPackage,acpid)) diff --git a/utils/acpid/files/acpid.hotplug b/utils/acpid/files/acpid.hotplug deleted file mode 100644 index 6e08d01..0000000 --- a/utils/acpid/files/acpid.hotplug +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -. /lib/functions.sh - -if [ "$ACTION" = add ] && [ "$DEVICENAME" = event0 ]; then - ( /etc/init.d/acpid/stop; sleep 3; /usr/sbin/acpid )& -fi diff --git a/utils/acpid/files/acpid.init b/utils/acpid/files/acpid.init deleted file mode 100644 index 3365aa0..0000000 --- a/utils/acpid/files/acpid.init +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/ash /etc/rc.common -# Copyright (C) 2009-2010 OpenWrt.org - -START=99 -STOP=80 - -ACPID_BIN="/usr/sbin/acpid" -ACPID_PID="/var/run/acpid.pid" - -start() { - [ -x "$ACPID_BIN" ] || return 1 - start-stop-daemon -S -x $ACPID_BIN -p $ACPID_PID -} - -boot() { - # Do nothing on boot - [ -x "$ACPID_BIN" ] || return 1 - start-stop-daemon -S -x $ACPID_BIN -p $ACPID_PID - exit 0 -} - -stop() { - service_kill ${ACPID_BIN##*/} $ACPID_PID - rm -f $ACPID_PID -} diff --git a/utils/acpid/files/default b/utils/acpid/files/default deleted file mode 100644 index cf8d9a3..0000000 --- a/utils/acpid/files/default +++ /dev/null @@ -1,5 +0,0 @@ -# This is a sample ACPID configuration - -event=button/power.* -action=/sbin/poweroff - diff --git a/utils/acpid/patches/002-dont-use-isfdtype.patch b/utils/acpid/patches/002-dont-use-isfdtype.patch deleted file mode 100644 index cd4e062..0000000 --- a/utils/acpid/patches/002-dont-use-isfdtype.patch +++ /dev/null @@ -1,21 +0,0 @@ -Partially roll back upstream commit 4711119089e1ad08dad206f4fded68f1972fdeed -since released versions of uClibc don't support isfdtype(). - -Signed-off-by: Gustavo Zaarias - -Index: acpid-2.0.23/sock.c -=================================================================== ---- acpid-2.0.23.orig/sock.c -+++ acpid-2.0.23/sock.c -@@ -53,7 +53,10 @@ int non_root_clients; - int - is_socket(int fd) - { -- return (isfdtype(fd, S_IFSOCK) == 1); -+ int v; -+ socklen_t l = sizeof(int); -+ -+ return (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0); - } - - /* accept a new client connection */ diff --git a/utils/at/Makefile b/utils/at/Makefile deleted file mode 100644 index b9a4ef8..0000000 --- a/utils/at/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (C) 2008-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=at -PKG_VERSION:=3.1.16 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz -PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/a/at -PKG_MD5SUM:=d05da75d9b75d93917ffb16ab48b1e19 - -PKG_LICENSE:=GPL-2.0+ GPL-3.0+ ISC -PKG_LICENSE_FILES:=COPYING Copyright -PKG_MAINTAINER:=Phil Eichinger - -include $(INCLUDE_DIR)/package.mk - -define Package/at - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libelf1 - TITLE:=Delayed job execution and batch processing - URL:=http://packages.debian.org/stable/at -endef - -define Package/at/description - At and batch read shell commands from standard input storing them as a job to - be scheduled for execution in the future. -endef - -export SENDMAIL=/bin/true -EXTRA_CFLAGS:=-DNEED_YYWRAP -I$(PKG_BUILD_DIR) \ - $(TARGET_LDFLAGS) - -CONFIGURE_ARGS+=--prefix=/usr \ - --with-daemon_username=nobody \ - --with-daemon_groupname=nogroup \ - --with-jobdir=/var/spool/cron/atjobs \ - --with-atspool=/var/spool/cron/atspool - -CONFIGURE_VARS += \ - ac_cv_header_security_pam_appl_h=no - -define Package/at/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/sbin $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/atd.init $(1)/etc/init.d/atd - $(INSTALL_BIN) $(PKG_BUILD_DIR)/at $(1)/usr/bin - ln -sf at $(1)/usr/bin/atq - ln -sf at $(1)/usr/bin/atrm - $(INSTALL_BIN) $(PKG_BUILD_DIR)/atd $(1)/usr/sbin -endef - -$(eval $(call BuildPackage,at)) diff --git a/utils/at/files/atd.init b/utils/at/files/atd.init deleted file mode 100755 index f293b1c..0000000 --- a/utils/at/files/atd.init +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=50 - -USE_PROCD=1 - -start_service() { - [ -d /var/spool/cron/atjobs ] || { - mkdir -m 0755 -p /var/spool/cron/atjobs - touch /var/spool/cron/atjobs/.SEQ - chown -R nobody:nogroup /var/spool/cron/atjobs - } - [ -d /var/spool/cron/atspool ] || { - mkdir -m 0755 -p /var/spool/cron/atspool - chown -R nobody:nogroup /var/spool/cron/atspool - } - procd_open_instance - - procd_set_param command /usr/sbin/atd -f - procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5} - procd_set_param stdout 1 # forward stdout of the command to logd - procd_set_param stderr 1 # same for stderr - - procd_close_instance -} diff --git a/utils/at/patches/100-remove-glibc-assumption.patch b/utils/at/patches/100-remove-glibc-assumption.patch deleted file mode 100644 index a18a007..0000000 --- a/utils/at/patches/100-remove-glibc-assumption.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 7f811d9c4ebc9444e613e251c31d6bf537a24dc1 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 13 Apr 2015 16:35:30 -0700 -Subject: [PATCH] remove glibc assumption - -glibc time.h header has an undocumented __isleap macro -that we are using anf musl is missing it. -Since it is undocumented & does not appear -on any other libc, stop using it and just define the macro in -locally instead. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj -[patch from: http://patchwork.openembedded.org/patch/91893/ ] -Signed-off-by: Phil Eichinger ---- - parsetime.y | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/parsetime.y b/parsetime.y -index 7005e88..324e6d3 100644 ---- a/parsetime.y -+++ b/parsetime.y -@@ -8,6 +8,9 @@ - - #define YYDEBUG 1 - -+#define is_leap_year(y) \ -+ ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0)) -+ - struct tm exectm; - static int isgmt; - static int yearspec; -@@ -217,8 +220,8 @@ date : month_name day_number - mnum == 12) && dnum > 31) - || ((mnum == 4 || mnum == 6 || mnum == 9 || - mnum == 11) && dnum > 30) -- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900)) -- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900)) -+ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900)) -+ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900)) - ) - { - yyerror("Error in day of month"); -@@ -261,8 +264,8 @@ date : month_name day_number - mnum == 12) && dnum > 31) - || ((mnum == 4 || mnum == 6 || mnum == 9 || - mnum == 11) && dnum > 30) -- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900)) -- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900)) -+ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900)) -+ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900)) - ) - { - yyerror("Error in day of month"); --- -2.1.4 - diff --git a/utils/at/patches/110-getloadavg.patch b/utils/at/patches/110-getloadavg.patch deleted file mode 100644 index 0faef97..0000000 --- a/utils/at/patches/110-getloadavg.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/getloadavg.c -+++ b/getloadavg.c -@@ -69,8 +69,9 @@ Boston, MA 02110-1301 USA */ - #include - #endif - --#include "lisp.h" --#include "sysfile.h" /* for encapsulated open, close, read, write */ -+#include -+#include -+#include - - #ifndef HAVE_GETLOADAVG - diff --git a/utils/attr/Makefile b/utils/attr/Makefile index 9eb978f..0a79cde 100644 --- a/utils/attr/Makefile +++ b/utils/attr/Makefile @@ -8,15 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=attr -PKG_REV:=315af30d0c1a198dc662a90e6e6ae2456abf2489 -PKG_VERSION:=20160302 +PKG_VERSION:=2.4.48 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://git.savannah.gnu.org/r/attr.git -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_URL:=http://git.savannah.nongnu.org/cgit/attr.git/snapshot +PKG_HASH:=095699f71230ace37e5bc680c6f9d15cf8e53eb38d00b2c46db5cc7e0712e5f3 PKG_MAINTAINER:=Maxim Storchak PKG_LICENSE:=LGPL-2.1 GPL-2.0 diff --git a/utils/avrdude/Makefile b/utils/avrdude/Makefile deleted file mode 100644 index ca27a85..0000000 --- a/utils/avrdude/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2008-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=avrdude -PKG_VERSION:=6.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME) -PKG_MD5SUM:=58bb42049122cf80fe4f4d0ce36d92ee - -PKG_MAINTAINER:=Ted Hess -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/avrdude - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Microcontroller programming - TITLE:=AVR Downloader/UploaDEr - URL:=http://www.nongnu.org/avrdude/ - DEPENDS:=+libncurses +libreadline +libusb-compat +libftdi1 +libelf1 -endef - -define Package/avrdude/description - AVRDUDE is a full featured program for programming Atmel's AVR CPU's. -endef - -CONFIGURE_ARGS+= \ - --disable-doc \ - --disable-parport \ - --enable-linuxgpio \ - -TARGET_CFLAGS+= \ - -D_GNU_SOURCE \ - -define Package/avrdude/conffiles -/etc/avrdude.conf -endef - -define Package/avrdude/install - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/avrdude.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/avrdude $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,avrdude)) diff --git a/utils/avrdude/patches/010-configure-fixups.patch b/utils/avrdude/patches/010-configure-fixups.patch deleted file mode 100644 index 11ddad7..0000000 --- a/utils/avrdude/patches/010-configure-fixups.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -38,6 +38,7 @@ LT_INIT() - - # Checks for programs. - AC_PROG_CC -+AC_PROG_CPP - AC_PROG_INSTALL - AC_PROG_SED - AC_PROG_YACC -@@ -182,6 +183,7 @@ fi - AC_SUBST(LIBPTHREAD, $LIBPTHREAD) - # Checks for header files. - AC_CHECK_HEADERS([limits.h stdlib.h string.h]) -+AC_CHECK_HEADERS([inttypes.h stdint.h]) - AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h termios.h unistd.h]) - AC_CHECK_HEADERS([ddk/hidsdi.h],,,[#include - #include ]) diff --git a/utils/avrdude/patches/100-musl-compat.patch b/utils/avrdude/patches/100-musl-compat.patch deleted file mode 100644 index cef5fe4..0000000 --- a/utils/avrdude/patches/100-musl-compat.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- a/dfu.h -+++ b/dfu.h -@@ -25,6 +25,7 @@ - - #ifdef HAVE_LIBUSB - #if defined(HAVE_USB_H) -+# include - # include - #elif defined(HAVE_LUSB0_USB_H) - # include ---- a/pickit2.c -+++ b/pickit2.c -@@ -50,6 +50,7 @@ - #include - #include - #include -+#include - - #include "avrdude.h" - #include "libavrdude.h" ---- a/ser_avrdoper.c -+++ b/ser_avrdoper.c -@@ -248,6 +248,7 @@ static int usbGetReport(union filedescri - /* ------------------------------------------------------------------------ */ - - #if defined(HAVE_USB_H) -+# include - # include - #elif defined(HAVE_LUSB0_USB_H) - # include ---- a/usbtiny.c -+++ b/usbtiny.c -@@ -40,6 +40,7 @@ - - #if defined(HAVE_LIBUSB) // we use LIBUSB to talk to the board - #if defined(HAVE_USB_H) -+# include - # include - #elif defined(HAVE_LUSB0_USB_H) - # include ---- a/usbasp.c -+++ b/usbasp.c -@@ -54,6 +54,7 @@ - # endif - #else - # if defined(HAVE_USB_H) -+# include - # include - # elif defined(HAVE_LUSB0_USB_H) - # include ---- a/usb_libusb.c -+++ b/usb_libusb.c -@@ -36,6 +36,7 @@ - #include - - #if defined(HAVE_USB_H) -+# include - # include - #elif defined(HAVE_LUSB0_USB_H) - # include diff --git a/utils/bandwidthd/Makefile b/utils/bandwidthd/Makefile deleted file mode 100644 index 955e735..0000000 --- a/utils/bandwidthd/Makefile +++ /dev/null @@ -1,227 +0,0 @@ -# -# Copyright (C) 2006-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bandwidthd -PKG_VERSION:=2.0.1-34 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/NethServer/bandwidthd/archive/$(PKG_VERSION) -PKG_MD5SUM:=a4075335d06fe91ae815616ed9e27375 - -PKG_MAINTAINER:=Jean-Michel Lacroix - -PKG_LICENSE:=GPL-2.0 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/bandwidthd/Default - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Bandwidthd - URL:=http://bandwidthd.sourceforge.net/ -endef - -define Package/bandwidthd -$(call Package/bandwidthd/Default) - TITLE += (without database) - VARIANT:=no-db - DEPENDS:=+libgd +libpcap -endef - -define Package/bandwidthd-pgsql -$(call Package/bandwidthd/Default) - TITLE += (with postgresql enabled) - VARIANT:=pgsql - DEPENDS:=+libgd +libpcap +libpq -endef - -define Package/bandwidthd-sqlite -$(call Package/bandwidthd/Default) - TITLE += (with sqlite enabled) - VARIANT:=sqlite - DEPENDS:=+libgd +libpcap +libsqlite3 +php7 +php7-cgi +php7-mod-gd +php7-mod-pdo +php7-mod-pdo-sqlite -endef - -define Package/bandwidthd-php -$(call Package/bandwidthd/Default) - TITLE = PHP files to graph bandwidthd data from postgresql - VARIANT:=php - DEPENDS:=+libpcre +libxml2 +php7 +php7-cgi +php7-mod-pgsql +php7-mod-gd -endef - -define Package/bandwidthd/description - A bandwidthd tracking utility. -endef - -define Package/bandwidthd-pgsql/description -$(call Package/bandwidthd/description) -With the ability to store in a postgresql database. -endef - -define Package/bandwidthd-sqlite/description -$(call Package/bandwidthd/description) -With the ability to store in a sqlite database. -endef - -define Package/bandwidthd-php/description - PHP files to graph bandwidthd data from pgsql. -endef - -define Package/bandwidthd/daemon - This package contains bandwidthd, a bandwidth tracking utility. -endef - -define Package/bandwidthd-pgsql/daemon - This package contains bandwidthd, a bandwidth tracking utility. -endef - -define Package/bandwidthd-sqlite/daemon - This package contains bandwidthd, a bandwidth tracking utility. -endef - -define Package/bandwidthd-php/daemon - This package contains the PHP files to graph the data from a pgsql database. -endef - -ifeq ($(BUILD_VARIANT),no-db) -CONFIGURE_ARGS += \ - ac_cv_file__sw_lib=no \ - ac_cv_file__sw_include=no \ - ac_cv_file__usr_pkg_lib=no \ - ac_cv_file__usr_pkg_include=no \ - ac_cv_file__usr_local_pgsql_lib=no \ - ac_cv_file__usr_local_pgsql_include=no \ - ac_cv_lib_pq_PQconnectdb=no \ - ac_cv_lib_sqlite3_sqlite3_open=no -endif - -ifeq ($(BUILD_VARIANT),pgsql) -CONFIGURE_ARGS += \ - ac_cv_file__sw_lib=no \ - ac_cv_file__sw_include=no \ - ac_cv_file__usr_pkg_lib=no \ - ac_cv_file__usr_pkg_include=no \ - ac_cv_file__usr_local_pgsql_lib=no \ - ac_cv_file__usr_local_pgsql_include=no \ - ac_cv_lib_sqlite3_sqlite3_open=no -endif - -ifeq ($(BUILD_VARIANT),sqlite) -CONFIGURE_ARGS += \ - ac_cv_file__sw_lib=no \ - ac_cv_file__sw_include=no \ - ac_cv_file__usr_pkg_lib=no \ - ac_cv_file__usr_pkg_include=no \ - ac_cv_file__usr_local_pgsql_lib=no \ - ac_cv_file__usr_local_pgsql_include=no \ - ac_cv_lib_pq_PQconnectdb=no -endif - -ifeq ($(BUILD_VARIANT),php) -CONFIGURE_ARGS += \ - ac_cv_file__sw_lib=no \ - ac_cv_file__sw_include=no \ - ac_cv_file__usr_pkg_lib=no \ - ac_cv_file__usr_pkg_include=no \ - ac_cv_file__usr_local_pgsql_lib=no \ - ac_cv_file__usr_local_pgsql_include=no \ - ac_cv_lib_pq_PQconnectdb=no \ - ac_cv_lib_sqlite3_sqlite3_open=no -endif - -EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) -EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib - -define Package/bandwidthd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bandwidthd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/bandwidthd.config $(1)/etc/config/bandwidthd - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/bandwidthd.init $(1)/etc/init.d/bandwidthd - $(INSTALL_DIR) $(1)/www - $(INSTALL_DATA) $(PKG_BUILD_DIR)/phphtdocs/legend.gif $(1)/www/ - $(INSTALL_DATA) ./files/logo-openwrt.gif $(1)/www/logo.gif -endef - -define Package/bandwidthd-pgsql/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bandwidthd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/bandwidthd-pgsql.config $(1)/etc/config/bandwidthd - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/bandwidthd.init $(1)/etc/init.d/bandwidthd - $(INSTALL_DIR) $(1)/www - $(INSTALL_DATA) $(PKG_BUILD_DIR)/phphtdocs/legend.gif $(1)/www/ - $(INSTALL_DATA) ./files/logo-openwrt.gif $(1)/www/logo.gif - $(INSTALL_DIR) $(1)/usr/share/postgresql - $(INSTALL_BIN) $(PKG_BUILD_DIR)/phphtdocs/bd_pgsql_purge.sh $(1)/usr/share/postgresql -endef - -define Package/bandwidthd-sqlite/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bandwidthd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/bandwidthd-sqlite.config $(1)/etc/config/bandwidthd - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/bandwidthd-sqlite.init $(1)/etc/init.d/bandwidthd - $(INSTALL_DIR) $(1)/www/phphtdocs - $(INSTALL_DATA) $(PKG_BUILD_DIR)/phphtdocs/legend.gif $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/phphtdocs-sqlite/details.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/phphtdocs-sqlite/footer.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/phphtdocs-sqlite/graph.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/phphtdocs-sqlite/include.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/phphtdocs-sqlite/index.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/logo-openwrt.gif $(1)/www/phphtdocs/logo.gif - ln -s /var/etc/bandwidthd-php.conf $(1)/www/phphtdocs/config.conf.php - $(INSTALL_DATA) $(PKG_BUILD_DIR)/phphtdocs/legend.gif $(1)/www/ - $(INSTALL_DATA) ./files/logo-openwrt.gif $(1)/www/logo.gif -endef - -define Package/bandwidthd-php/install - $(INSTALL_DIR) $(1)/www/phphtdocs - $(INSTALL_DATA) $(PKG_BUILD_DIR)/phphtdocs/legend.gif $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/phphtdocs/details.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/phphtdocs/footer.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/phphtdocs/graph.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/phphtdocs/include.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/phphtdocs/index.php $(1)/www/phphtdocs/ - $(INSTALL_DATA) ./files/logo-openwrt.gif $(1)/www/phphtdocs/logo.gif - ln -s /var/etc/bandwidthd-php.conf $(1)/www/phphtdocs/config.conf - $(INSTALL_DIR) $(1)//etc/config - $(INSTALL_CONF) ./files/bandwidthd-php.config $(1)/etc/config/bandwidthd-php - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/bandwidthd-php.init $(1)/etc/init.d/bandwidthd-php -endef - -define Package/bandwidthd/conffiles -/etc/config/bandwidthd -endef - -define Package/bandwidthd-pgsql/conffiles -/etc/config/bandwidthd -endef - -define Package/bandwidthd-sqlite/conffiles -/etc/config/bandwidthd -endef - -define Package/bandwidthd-php/conffiles -/etc/config/bandwidthd-php -endef - -$(eval $(call BuildPackage,bandwidthd)) -$(eval $(call BuildPackage,bandwidthd-pgsql)) -$(eval $(call BuildPackage,bandwidthd-sqlite)) -$(eval $(call BuildPackage,bandwidthd-php)) diff --git a/utils/bandwidthd/files/bandwidthd-pgsql.config b/utils/bandwidthd/files/bandwidthd-pgsql.config deleted file mode 100644 index f94c737..0000000 --- a/utils/bandwidthd/files/bandwidthd-pgsql.config +++ /dev/null @@ -1,13 +0,0 @@ -config bandwidthd - option dev br-lan - option subnets "192.168.1.0/24" - option skip_intervals 0 - option graph_cutoff 1024 - option promiscuous true - option output_cdf false - option recover_cdf false - option filter ip - option graph true - option meta_refresh 150 - option pgsql_connect_string "user = postgres dbname = bandwidthd host = 192.168.1.1" - option sensor_id "openwrt" diff --git a/utils/bandwidthd/files/bandwidthd-php.config b/utils/bandwidthd/files/bandwidthd-php.config deleted file mode 100644 index 3bad494..0000000 --- a/utils/bandwidthd/files/bandwidthd-php.config +++ /dev/null @@ -1,7 +0,0 @@ -config bandwidthd-php - option dflt_width '900' - option dflt_height '256' - option dflt_interval 'INT_DAILY' - option host '127.0.0.1' - option user 'postgres' - option dbname 'bandwidthd' diff --git a/utils/bandwidthd/files/bandwidthd-php.init b/utils/bandwidthd/files/bandwidthd-php.init deleted file mode 100755 index b7b6434..0000000 --- a/utils/bandwidthd/files/bandwidthd-php.init +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2017 OpenWrt.org - -START=99 - -USE_PROCD=1 - -CONFIGNAME="bandwidthd-php" -CONFIGFILE="/var/etc/bandwidthd-php.conf" - -config_cb() { - local cfg_type="$1" - local cfg_name="$2" - case "$cfg_type" in - $CONFIGNAME) - append cfgs "$cfg_name" - ;; - esac -} - -export_number() { - local option="$1" - local section="$2" - local _loctmp - paramstr="" - config_get _loctmp "$section" "$option" - if [ -n "$_loctmp" ]; then - paramstr="${_loctmp}" - fi -} - -export_string() { - local option="$1" - local section="$2" - local _loctmp - paramstr="" - config_get _loctmp "$section" "$option" - if [ -n "$_loctmp" ]; then - paramstr="${_loctmp}" - fi -} - -service_triggers() -{ - procd_add_reload_trigger $CONFIGNAME -} - - -start_service() { - local conffile="" - [ -n "$conffile" ] && echo -e "$conffile" >>$CONFIGFILE - done -} diff --git a/utils/bandwidthd/files/bandwidthd-sqlite.config b/utils/bandwidthd/files/bandwidthd-sqlite.config deleted file mode 100644 index bc4154a..0000000 --- a/utils/bandwidthd/files/bandwidthd-sqlite.config +++ /dev/null @@ -1,13 +0,0 @@ -config bandwidthd - option dev br-lan - option subnets "192.168.1.0/24" - option skip_intervals 0 - option graph_cutoff 1024 - option promiscuous true - option output_cdf false - option recover_cdf false - option filter ip - option graph true - option meta_refresh 150 - option sqlite_filename "/www/bandwidthd/stats.db" - option sensor_id "default" diff --git a/utils/bandwidthd/files/bandwidthd-sqlite.init b/utils/bandwidthd/files/bandwidthd-sqlite.init deleted file mode 100755 index c456974..0000000 --- a/utils/bandwidthd/files/bandwidthd-sqlite.init +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008-2017 OpenWrt.org - -START=99 - -USE_PROCD=1 - -CONFIGNAME="bandwidthd" -CONFIGPHPNAME="bandwidthd-php" -CONFIGFILE="/tmp/etc/bandwidthd.conf" -CONFIGPHPFILE="/tmp/etc/bandwidthd-php.conf" - -config_cb() { - local cfg_type="$1" - local cfg_name="$2" - - case "$cfg_type" in - bandwidthd) - append cfgs "$cfg_name" - ;; - esac -} - -export_bool() { - local option="$1" - local section="$2" - local _loctmp - config_get_bool _loctmp "$section" "$option" - if [ -n "$_loctmp" ]; then - conffile="${conffile}$option " - if [ 1 -eq "$_loctmp" ]; then - conffile="${conffile}true" - else - conffile="${conffile}false" - fi - conffile="${conffile}\n" - fi -} - -export_number() { - local option="$1" - local section="$2" - local _loctmp - config_get _loctmp "$section" "$option" - if [ -n "$_loctmp" ]; then - conffile="${conffile}$option ${_loctmp}\n" - fi -} - -export_string() { - local option="$1" - local section="$2" - local _loctmp - config_get _loctmp "$section" "$option" - if [ -n "$_loctmp" ]; then - conffile="${conffile}$option \"${_loctmp}\"\n" - fi -} - -set_conf_file() { - local subnet conffile="# auto-generated config file from /etc/config/${CONFIGNAME}\n" - - [ -d /tmp/bandwidthd ] || mkdir -p /tmp/bandwidthd && cp /www/legend.gif /www/logo.gif /tmp/bandwidthd/ - [ -e /htdocs ] || ln -s /tmp/bandwidthd /htdocs - [ -e /www/bandwidthd ] || ln -s /tmp/bandwidthd /www/bandwidthd - rm -f $CONFIGFILE - touch $CONFIGFILE - [ -e /etc/bandwidthd.conf ] || ln -s $CONFIGFILE /etc/bandwidthd.conf - - config_load $CONFIGNAME - for cfg in $cfgs; do - config_get subnets $cfg subnets - for subnet in $subnets; do - conffile="${conffile}subnet ${subnet}\n" - done - export_string dev $cfg - export_number skip_intervals $cfg - export_number graph_cutoff $cfg - export_bool promiscuous $cfg - export_bool output_cdf $cfg - export_bool recover_cdf $cfg - export_string filter $cfg - export_bool graph $cfg - export_number meta_refresh $cfg - export_string pgsql_connect_string $cfg - export_string sqlite_filename $cfg - export_string sensor_id $cfg - [ -n "$conffile" ] && echo -e "$conffile" >>$CONFIGFILE - unset conffile - done - cd / -} - -set_php_conf_file() { - local subnet conffile="" - [ -n "$conffile" ] && echo -e "$conffile" >>$CONFIGPHPFILE - done - cd / -} - -service_triggers() { - procd_add_reload_trigger $CONFIGNAME - procd_add_reload_trigger $CONFIGPHPNAME -} - -start_service() { - set_conf_file - set_php_conf_file - procd_open_instance - procd_set_param command /usr/sbin/bandwidthd - procd_close_instance -} - -stop_service() { - service_stop /usr/sbin/bandwidthd -} diff --git a/utils/bandwidthd/files/bandwidthd.config b/utils/bandwidthd/files/bandwidthd.config deleted file mode 100644 index ac1669e..0000000 --- a/utils/bandwidthd/files/bandwidthd.config +++ /dev/null @@ -1,11 +0,0 @@ -config bandwidthd - option dev br-lan - option subnets "192.168.1.0/24" - option skip_intervals 0 - option graph_cutoff 1024 - option promiscuous true - option output_cdf false - option recover_cdf false - option filter ip - option graph true - option meta_refresh 150 diff --git a/utils/bandwidthd/files/bandwidthd.init b/utils/bandwidthd/files/bandwidthd.init deleted file mode 100755 index ac9d01d..0000000 --- a/utils/bandwidthd/files/bandwidthd.init +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008-2017 OpenWrt.org - -START=99 - -USE_PROCD=1 - -CONFIGNAME="bandwidthd" -CONFIGFILE="/tmp/etc/bandwidthd.conf" - -config_cb() { - local cfg_type="$1" - local cfg_name="$2" - - case "$cfg_type" in - bandwidthd) - append cfgs "$cfg_name" - ;; - esac -} - -export_bool() { - local option="$1" - local section="$2" - local _loctmp - config_get_bool _loctmp "$section" "$option" - if [ -n "$_loctmp" ]; then - conffile="${conffile}$option " - if [ 1 -eq "$_loctmp" ]; then - conffile="${conffile}true" - else - conffile="${conffile}false" - fi - conffile="${conffile}\n" - fi -} - -export_number() { - local option="$1" - local section="$2" - local _loctmp - config_get _loctmp "$section" "$option" - if [ -n "$_loctmp" ]; then - conffile="${conffile}$option ${_loctmp}\n" - fi -} - -export_string() { - local option="$1" - local section="$2" - local _loctmp - config_get _loctmp "$section" "$option" - if [ -n "$_loctmp" ]; then - conffile="${conffile}$option \"${_loctmp}\"\n" - fi -} - -set_conf_file() { - local subnet conffile - - [ -d /tmp/bandwidthd ] || mkdir -p /tmp/bandwidthd && cp /www/legend.gif /www/logo.gif /tmp/bandwidthd/ - [ -e /htdocs ] || ln -s /tmp/bandwidthd /htdocs - [ -e /www/bandwidthd ] || ln -s /tmp/bandwidthd /www/bandwidthd - rm -f $CONFIGFILE - touch $CONFIGFILE - [ -e /etc/bandwidthd.conf ] || ln -s $CONFIGFILE /etc/bandwidthd.conf - - config_load $CONFIGNAME - for cfg in $cfgs; do - config_get subnets $cfg subnets - for subnet in $subnets; do - conffile="${conffile}subnet ${subnet}\n" - done - export_string dev $cfg - export_number skip_intervals $cfg - export_number graph_cutoff $cfg - export_bool promiscuous $cfg - export_bool output_cdf $cfg - export_bool recover_cdf $cfg - export_string filter $cfg - export_bool graph $cfg - export_number meta_refresh $cfg - export_string pgsql_connect_string $cfg - export_string sqlite_filename $cfg - export_string sensor_id $cfg - [ -n "$conffile" ] && echo -e "$conffile" >>$CONFIGFILE - unset conffile - done - cd / -} - -service_triggers() -{ - procd_add_reload_trigger $CONFIGNAME -} - -start_service() { - set_conf_file - procd_open_instance - procd_set_param command /usr/sbin/bandwidthd - procd_close_instance -} - -stop_service() { - service_stop /usr/sbin/bandwidthd -} diff --git a/utils/bandwidthd/files/logo-openwrt.gif b/utils/bandwidthd/files/logo-openwrt.gif deleted file mode 100644 index 2ffec56..0000000 Binary files a/utils/bandwidthd/files/logo-openwrt.gif and /dev/null differ diff --git a/utils/bandwidthd/files/phphtdocs-sqlite/details.php b/utils/bandwidthd/files/phphtdocs-sqlite/details.php deleted file mode 100644 index 448ea46..0000000 --- a/utils/bandwidthd/files/phphtdocs-sqlite/details.php +++ /dev/null @@ -1,104 +0,0 @@ - - -
- -Please provide a sensor_name"; - exit(1); - } - -if (isset($_GET['ip'])) - $ip = $_GET['ip']; -else - { - echo "
Please provide an ip address"; - exit(1); - } - -echo "

"; -if (strpos($ip, "/") === FALSE) - echo "$ip - ".gethostbyaddr($ip)."

"; -else - echo "Total - $ip"; - -$db = ConnectDb(); - -if ($ip == "0.0.0.0/0") - { - $rxtable = "bd_rx_total_log"; - $txtable = "bd_tx_total_log"; - } -else - { - $rxtable = "bd_rx_log"; - $txtable = "bd_tx_log"; - } - -$sql = "select rx.scale as rxscale, tx.scale as txscale, tx.total+rx.total as total, tx.total as sent, -rx.total as received, tx.tcp+rx.tcp as tcp, tx.udp+rx.udp as udp, -tx.icmp+rx.icmp as icmp, tx.http+rx.http as http, -tx.p2p+rx.p2p as p2p, tx.ftp+rx.ftp as ftp -from - -(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, -sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp -from sensors, $txtable -where sensor_name = '$sensor_name' -and sensors.sensor_id = ".$txtable.".sensor_id -$sql_subnet -group by ip) as tx, - -(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, -sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp -from sensors, $rxtable -where sensor_name = '$sensor_name' -and sensors.sensor_id = ".$rxtable.".sensor_id -$sql_subnet -group by ip) as rx - -where tx.ip = rx.ip;"; -//error_log($sql); printf('
%s
', $sql); -$db = ConnectDb(); -$result = $db->query($sql); -echo "
IpNameTotalSentReceivedtcpudpicmphttpsmtpftp"; -$r = $result->fetch(); -$db = NULL; -echo "
"; -if (strpos($ip, "/") === FALSE) - echo "$ip".gethostbyaddr($ip); -else - echo "Total$ip"; -echo fmtb($r['total']).fmtb($r['sent']).fmtb($r['received']). - fmtb($r['tcp']).fmtb($r['udp']).fmtb($r['icmp']).fmtb($r['http']). - fmtb($r['p2p']).fmtb($r['ftp']); -echo "
"; - -echo "

Daily

"; -echo "Send:

"; -echo "
"; -echo "Receive:

"; -echo "
"; - -echo "

Weekly

"; -echo "Send:

"; -echo "
"; -echo "Receive:

"; -echo "
"; - -echo "

Monthly

"; -echo "Send:

"; -echo "
"; -echo "Receive:

"; -echo "
"; - -echo "

Yearly

"; -echo "Send:

"; -echo "
"; -echo "Receive:

"; -echo "
"; diff --git a/utils/bandwidthd/files/phphtdocs-sqlite/footer.php b/utils/bandwidthd/files/phphtdocs-sqlite/footer.php deleted file mode 100644 index b342825..0000000 --- a/utils/bandwidthd/files/phphtdocs-sqlite/footer.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/utils/bandwidthd/files/phphtdocs-sqlite/graph.php b/utils/bandwidthd/files/phphtdocs-sqlite/graph.php deleted file mode 100644 index 82df317..0000000 --- a/utils/bandwidthd/files/phphtdocs-sqlite/graph.php +++ /dev/null @@ -1,455 +0,0 @@ - $number) - { - $total[$key] /= $number; - $icmp[$key] /= $number; - $udp[$key] /= $number; - $tcp[$key] /= $number; - $ftp[$key] /= $number; - $http[$key] /= $number; - $p2p[$key] /= $number; - } - - foreach ($Count as $key => $number) - { - $a_total[$key] += $total[$key]; - $a_icmp[$key] += $icmp[$key]; - $a_udp[$key] += $udp[$key]; - $a_tcp[$key] += $tcp[$key]; - $a_ftp[$key] += $ftp[$key]; - $a_http[$key] += $http[$key]; - $a_p2p[$key] += $p2p[$key]; - - if ($a_total[$key] > $YMax) - $YMax = $a_total[$key]; - } - - unset($GLOBALS['total'], $GLOBALS['icmp'], $GLOBALS['udp'], $GLOBALS['tcp'], $GLOBALS['ftp'], $GLOBALS['http'], $GLOBALS['p2p'], $GLOBALS['Count']); - - $total = array(); - $icmp = array(); - $udp = array(); - $tcp = array(); - $ftp = array(); - $http = array(); - $p2p = array(); - $Count = array(); - } - -$db = ConnectDb(); - -// Get parameters - -if (isset($_GET['width'])) - $width = $_GET['width']; -else - $width = DFLT_WIDTH; - -if (isset($_GET['height'])) - $height = $_GET['height']; -else - $height = DFLT_HEIGHT; - -if (isset($_GET['interval'])) - $interval = $_GET['interval']; -else - $interval = DFLT_INTERVAL; - -if (isset($_GET['ip'])) - $ip = $_GET['ip']; -else - exit(1); - -if (isset($_GET['sensor_name'])) - $sensor_name = $_GET['sensor_name']; -else - exit(1); - -if (isset($_GET['timestamp'])) - $timestamp = $_GET['timestamp']; -else - $timestamp = time() - $interval + (0.05*$interval); - -if (isset($_GET['table'])) - $table = $_GET['table']; -else - $table = "bd_rx_log"; - -if (isset($_GET['yscale'])) - $yscale = $_GET['yscale']; - -$total = array(); -$icmp = array(); -$udp = array(); -$tcp = array(); -$ftp = array(); -$http = array(); -$p2p = array(); -$Count = array(); - -// Accumulator -$a_total = array(); -$a_icmp = array(); -$a_udp = array(); -$a_tcp = array(); -$a_ftp = array(); -$a_http = array(); -$a_p2p = array(); - -$sql_subnet = prepare_sql_subnet($ip); -$sql = "select *, timestamp as ts from sensors, $table where sensors.sensor_id = ".$table.".sensor_id $sql_subnet and sensor_name = '$sensor_name' and timestamp > $timestamp and timestamp < ".($timestamp+$interval)." order by ip;"; -//error_log($sql); -$result = $db->query($sql); - -// The SQL statement pulls the data out of the database ordered by IP address, that way we can average each -// datapoint for each IP address to provide smoothing and then toss the smoothed value into the accumulator -// to provide accurate total traffic rate. - -while ($row = $result->fetch()) - { - if ($row['ip'] != $last_ip) - { - AverageAndAccumulate(); - $last_ip = $row['ip']; - } - - $x = ($row['ts']-$timestamp)*(($width-XOFFSET)/$interval)+XOFFSET; - $xint = (int) $x; - - //echo "xint: ".$xint."
"; - $Count[$xint]++; - - if ($row['total']/$row['sample_duration'] > $SentPeak) - $SentPeak = $row['total']/$row['sample_duration']; - $TotalSent += $row['total']; - $total[$xint] += $row['total']/$row['sample_duration']; - $icmp[$xint] += $row['icmp']/$row['sample_duration']; - $udp[$xint] += $row['udp']/$row['sample_duration']; - $tcp[$xint] += $row['tcp']/$row['sample_duration']; - $ftp[$xint] += $row['ftp']/$row['sample_duration']; - $http[$xint] += $row['http']/$row['sample_duration']; - $p2p[$xint] += $row['p2p']/$row['sample_duration']; - } - -// One more time for the last IP -AverageAndAccumulate(); - -// Pull the data out of Accumulator -$total = $a_total; -$icmp = $a_icmp; -$udp = $a_udp; -$tcp = $a_tcp; -$ftp = $a_ftp; -$http = $a_http; -$p2p = $a_p2p; - -$YMax += $YMax*0.05; // Add an extra 5% - -// if a y scale was specified override YMax -if (isset($yscale)&& $yscale > 0) - $YMax = $yscale/8; - -// Plot the data - -header("Content-type: image/png"); - -$im = imagecreate($width, $height); -$white = imagecolorallocate($im, 255, 255, 255); -$purple = ImageColorAllocate($im, 255, 0, 255); -$green = ImageColorAllocate($im, 0, 255, 0); -$blue = ImageColorAllocate($im, 0, 0, 255); -$lblue = ImageColorAllocate($im, 128, 128, 255); -$brown = ImageColorAllocate($im, 128, 0, 0); -$red = ImageColorAllocate($im, 255, 0, 0); -$black = ImageColorAllocate($im, 0, 0, 0); - -for($Counter=XOFFSET+1; $Counter < $width; $Counter++) - { - if (isset($total[$Counter])) - { - // Convert the bytes/sec to y coords - $total[$Counter] = ($total[$Counter]*($height-YOFFSET))/$YMax; - $tcp[$Counter] = ($tcp[$Counter]*($height-YOFFSET))/$YMax; - $ftp[$Counter] = ($ftp[$Counter]*($height-YOFFSET))/$YMax; - $http[$Counter] = ($http[$Counter]*($height-YOFFSET))/$YMax; - $p2p[$Counter] = ($p2p[$Counter]*($height-YOFFSET))/$YMax; - $udp[$Counter] = ($udp[$Counter]*($height-YOFFSET))/$YMax; - $icmp[$Counter] = ($icmp[$Counter]*($height-YOFFSET))/$YMax; - - // Stack 'em up! - // Total is stacked from the bottom - // Icmp is on the bottom too - // Udp is stacked on top of icmp - $udp[$Counter] += $icmp[$Counter]; - // TCP and p2p are stacked on top of Udp - $tcp[$Counter] += $udp[$Counter]; - $p2p[$Counter] += $udp[$Counter]; - // Http is stacked on top of p2p - $http[$Counter] += $p2p[$Counter]; - // Ftp is stacked on top of http - $ftp[$Counter] += $http[$Counter]; - - // Plot them! - //echo "$Counter:".$Counter." (h-y)-t:".($height-YOFFSET) - $total[$Counter]." h-YO-1:".$height-YOFFSET-1; - ImageLine($im, $Counter, ($height-YOFFSET) - $icmp[$Counter], $Counter, $height-YOFFSET-1, $red); - ImageLine($im, $Counter, ($height-YOFFSET) - $udp[$Counter], $Counter, ($height-YOFFSET) - $icmp[$Counter] - 1, $brown); - ImageLine($im, $Counter, ($height-YOFFSET) - $tcp[$Counter], $Counter, ($height-YOFFSET) - $udp[$Counter] - 1, $green); - ImageLine($im, $Counter, ($height-YOFFSET) - $p2p[$Counter], $Counter, ($height-YOFFSET) - $udp[$Counter] - 1, $purple); - ImageLine($im, $Counter, ($height-YOFFSET) - $http[$Counter], $Counter, ($height-YOFFSET) - $p2p[$Counter] - 1, $blue); - ImageLine($im, $Counter, ($height-YOFFSET) - $ftp[$Counter], $Counter, ($height-YOFFSET) - $http[$Counter] - 1, $lblue); - } -// else -// echo $Counter." not set
"; - } - -// Margin Text -if ($SentPeak < 1024/8) - $txtPeakSendRate = sprintf("Peak Send Rate: %.1f KBits/sec", $SentPeak*8); -else if ($SentPeak < (1024*1024)/8) - $txtPeakSendRate = sprintf("Peak Send Rate: %.1f MBits/sec", ($SentPeak*8.0)/1024.0); -else - $txtPeakSendRate = sprintf("Peak Send Rate: %.1f GBits/sec", ($SentPeak*8.0)/(1024.0*1024.0)); - -if ($TotalSent < 1024) - $txtTotalSent = sprintf("Sent %.1f KBytes", $TotalSent); -else if ($TotalSent < 1024*1024) - $txtTotalSent = sprintf("Sent %.1f MBytes", $TotalSent/1024.0); -else - $txtTotalSent = sprintf("Sent %.1f GBytes", $TotalSent/(1024.0*1024.0)); - -ImageString($im, 2, XOFFSET+5, $height-20, $txtTotalSent, $black); -ImageString($im, 2, $width/2+XOFFSET/2, $height-20, $txtPeakSendRate, $black); - -// Draw X Axis - -ImageLine($im, 0, $height-YOFFSET, $width, $height-YOFFSET, $black); - -// Day/Month Seperator bars - -if ((24*60*60*($width-XOFFSET))/$interval > ($width-XOFFSET)/10) - { - $ts = getdate($timestamp); - $MarkTime = mktime(0, 0, 0, $ts['mon'], $ts['mday'], $ts['year']); - - $x = ts2x($MarkTime); - while ($x < XOFFSET) - { - $MarkTime += (24*60*60); - $x = ts2x($MarkTime); - } - - while ($x < ($width-10)) - { - // Day Lines - ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); - ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); - - $txtDate = strftime("%a, %b %d", $MarkTime); - ImageString($im, 2, $x-30, $height-YOFFSET+10, $txtDate, $black); - - // Calculate Next x - $MarkTime += (24*60*60); - $x = ts2x($MarkTime); - } - } -else if ((24*60*60*30*($width-XOFFSET))/$interval > ($width-XOFFSET)/10) - { - // Monthly Bars - $ts = getdate($timestamp); - $month = $ts['mon']; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - - $x = ts2x($MarkTime); - while ($x < XOFFSET) - { - $month++; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - $x = ts2x($MarkTime); - } - - while ($x < ($width-10)) - { - // Day Lines - ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); - ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); - - $txtDate = strftime("%b, %Y", $MarkTime); - ImageString($im, 2, $x-25, $height-YOFFSET+10, $txtDate, $black); - - // Calculate Next x - $month++; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - $x = ts2x($MarkTime); - } - } -else - { - // Year Bars - $ts = getdate($timestamp); - $year = $ts['year']; - $MarkTime = mktime(0, 0, 0, 1, 1, $year); - - $x = ts2x($MarkTime); - while ($x < XOFFSET) - { - $year++; - $MarkTime = mktime(0, 0, 0, 1, 1, $year); - $x = ts2x($MarkTime); - } - - while ($x < ($width-10)) - { - // Day Lines - ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); - ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); - - $txtDate = strftime("%b, %Y", $MarkTime); - ImageString($im, 2, $x-25, $height-YOFFSET+10, $txtDate, $black); - - // Calculate Next x - $year++; - $MarkTime = mktime(0, 0, 0, 1, 1, $year); - $x = ts2x($MarkTime); - } - } - -// Draw Major Tick Marks -if ((6*60*60*($width-XOFFSET))/$interval > 10) // pixels per 6 hours is more than 2 - $MarkTimeStep = 6*60*60; // Major ticks are 6 hours -else if ((24*60*60*($width-XOFFSET))/$interval > 10) - $MarkTimeStep = 24*60*60; // Major ticks are 24 hours; -else if ((24*60*60*30*($width-XOFFSET))/$interval > 10) - { - // Major tick marks are months - $MarkTimeStep = 0; // Skip the standard way of drawing major tick marks below - - $ts = getdate($timestamp); - $month = $ts['mon']; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - - $x = ts2x($MarkTime); - while ($x < XOFFSET) - { - $month++; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - $x = ts2x($MarkTime); - } - - while ($x < ($width-10)) - { - // Day Lines - $date = getdate($MarkTime); - if ($date['mon'] != 1) - { - ImageLine($im, $x, $height-YOFFSET-5, $x, $height-YOFFSET+5, $black); - $txtDate = strftime("%b", $MarkTime); - ImageString($im, 2, $x-5, $height-YOFFSET+10, $txtDate, $black); - } - - // Calculate Next x - $month++; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - $x = ts2x($MarkTime); - } - } -else - $MarkTimeStep = 0; // Skip Major Tick Marks - -if ($MarkTimeStep) - { - $ts = getdate($timestamp); - $MarkTime = mktime(0, 0, 0, $ts['mon'], $ts['mday'], $ts['year']); - $x = ts2x($MarkTime); - - while ($x < ($width-10)) - { - if ($x > XOFFSET) - { - ImageLine($im, $x, $height-YOFFSET-5, $x, $height-YOFFSET+5, $black); - } - $MarkTime += $MarkTimeStep; - $x = ts2x($MarkTime); - } - } - -// Draw Minor Tick marks -if ((60*60*($width-XOFFSET))/$interval > 4) // pixels per hour is more than 2 - $MarkTimeStep = 60*60; // Minor ticks are 1 hour -else if ((6*60*60*($width-XOFFSET))/$interval > 4) - $MarkTimeStep = 6*60*60; // Minor ticks are 6 hours -else if ((24*60*60*($width-XOFFSET))/$interval > 4) - $MarkTimeStep = 24*60*60; -else - $MarkTimeStep = 0; // Skip minor tick marks - -if ($MarkTimeStep) - { - $ts = getdate($timestamp); - $MarkTime = mktime(0, 0, 0, $ts['mon'], $ts['mday'], $ts['year']); - $x = ts2x($MarkTime); - - while ($x < ($width-10)) - { - if ($x > XOFFSET) - { - ImageLine($im, $x, $height-YOFFSET, $x, $height-YOFFSET+5, $black); - } - $MarkTime += $MarkTimeStep; - $x = ts2x($MarkTime); - } - } - -// Draw Y Axis -ImageLine($im, XOFFSET, 0, XOFFSET, $height, $black); - -$YLegend = 'k'; -$Divisor = 1; -if ($YMax*8 > 1024*2) - { - $Divisor = 1024; // Display in m - $YLegend = 'm'; - } - -if ($YMax*8 > 1024*1024*2) - { - $Divisor = 1024*1024; // Display in g - $YLegend = 'g'; - } - -if ($YMax*8 > 1024*1024*1024*2) - { - $Divisor = 1024*1024*1024; // Display in t - $YLegend = 't'; - } - -$YStep = $YMax/10; -if ($YStep < 1) - $YStep=1; -$YTic=$YStep; - -while ($YTic <= ($YMax - $YMax/10)) - { - $y = ($height-YOFFSET)-(($YTic*($height-YOFFSET))/$YMax); - ImageLine($im, XOFFSET, $y, $width, $y, $black); - $txtYLegend = sprintf("%4.1f %sbits/s", (8.0*$YTic)/$Divisor, $YLegend); - ImageString($im, 2, 3, $y-7, $txtYLegend, $black); - $YTic += $YStep; - } - -imagepng($im); -imagedestroy($im); diff --git a/utils/bandwidthd/files/phphtdocs-sqlite/include.php b/utils/bandwidthd/files/phphtdocs-sqlite/include.php deleted file mode 100644 index 5195098..0000000 --- a/utils/bandwidthd/files/phphtdocs-sqlite/include.php +++ /dev/null @@ -1,69 +0,0 @@ -getMessage()); - } - return $db; -} - -function fmtb($kbytes) - { - $Max = 1024; - $Output = $kbytes; - $Suffix = 'K'; - - if ($Output > $Max) - { - $Output /= 1024; - $Suffix = 'M'; - } - - if ($Output > $Max) - { - $Output /= 1024; - $Suffix = 'G'; - } - - if ($Output > $Max) - { - $Output /= 1024; - $Suffix = 'T'; - } - - return(sprintf("%.1f%s", $Output, $Suffix)); - } - -function ip2s32($ip) { - $i = ip2long($ip); - return ($i & 0x80000000 ? '-' . ((~$i & 0x7fffffff)+1) : ''. ($i & 0x7fffffff)); -} - -function prepare_sql_subnet($subnet) { - list($snet, $smask) = explode('/', $subnet); - $inet = ip2s32($snet); - if($smask > 0 && $smask < 32) { - $mask = -1 << (32 - (int)$smask); - return "and (ip & $mask = $inet)"; - } elseif ($inet) { - return "and ip = " . $inet; - } - return ""; -} - -$starttime = time(); -set_time_limit(300); -?> diff --git a/utils/bandwidthd/files/phphtdocs-sqlite/index.php b/utils/bandwidthd/files/phphtdocs-sqlite/index.php deleted file mode 100644 index c8b8598..0000000 --- a/utils/bandwidthd/files/phphtdocs-sqlite/index.php +++ /dev/null @@ -1,190 +0,0 @@ - - -
- - -
- - -
- - - -Subnet Filter:"> - -
-
-Top $limit - $sensor_name"; -else - echo "

All Records - $sensor_name

"; - -// Sqlize the incomming variables -if (isset($subnet)) { - $sql_subnet = prepare_sql_subnet($subnet); -} - -// Sql Statement -$sql = "select tx.ip, rx.scale as rxscale, tx.scale as txscale, tx.total+rx.total as total, tx.total as sent, -rx.total as received, tx.tcp+rx.tcp as tcp, tx.udp+rx.udp as udp, -tx.icmp+rx.icmp as icmp, tx.http+rx.http as http, -tx.p2p+rx.p2p as p2p, tx.ftp+rx.ftp as ftp -from - -(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, -sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp -from sensors, bd_tx_log -where sensor_name = '$sensor_name' -and sensors.sensor_id = bd_tx_log.sensor_id -$sql_subnet -and timestamp > $timestamp and timestamp < ".($timestamp+$interval)." -group by ip) as tx, - -(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, -sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp -from sensors, bd_rx_log -where sensor_name = '$sensor_name' -and sensors.sensor_id = bd_rx_log.sensor_id -$sql_subnet -and timestamp > $timestamp and timestamp < ".($timestamp+$interval)." -group by ip) as rx - -where tx.ip = rx.ip -order by total desc;"; - -//echo "
$sql
"; error_log($sql); -$pdoResult = $db->query($sql); -$result = $pdoResult->fetchAll(); -$db = NULL; -$num_rows = count($result); -if ($limit == "all") - $limit = $num_rows; - -echo "
IpNameTotalSentReceivedtcpudpicmphttpsmtpftp"; - -if (!isset($subnet)) // Set this now for total graphs - $subnet = "0.0.0.0/0"; - -// Output Total Line -echo "
Total$subnet"; -foreach (array("total", "sent", "received", "tcp", "udp", "icmp", "http", "p2p", "ftp") as $key) - { - for($Counter=0, $Total = 0; $Counter < $num_rows; $Counter++) - { - $r = $result[$Counter]; - $Total += $r[$key]; - } - echo fmtb($Total); - } -echo "\n"; - -// Output Other Lines -for($Counter=0; $Counter < $num_rows && $Counter < $limit; $Counter++) - { - $r = $result[$Counter]; - $r['ip'] = long2ip($r['ip']); - echo "
"; - echo $r['ip']."".gethostbyaddr($r['ip']); - echo ""; - echo fmtb($r['total']).fmtb($r['sent']).fmtb($r['received']). - fmtb($r['tcp']).fmtb($r['udp']).fmtb($r['icmp']).fmtb($r['http']). - fmtb($r['p2p']).fmtb($r['ftp'])."\n"; - } -echo "
"; - -// Output Total Graph -for($Counter=0, $Total = 0; $Counter < $num_rows; $Counter++) - { - $r = $result[$Counter]; - $scale = max($r['txscale'], $scale); - $scale = max($r['rxscale'], $scale); - } - -if ($subnet == "0.0.0.0/0") - $total_table = "bd_tx_total_log"; -else - $total_table = "bd_tx_log"; -echo "

"; -echo "Total - Total of $subnet

"; -echo ""; -echo "Send:

"; -echo "
\n"; -if ($subnet == "0.0.0.0/0") - $total_table = "bd_rx_total_log"; -else - $total_table = "bd_rx_log"; -echo "Receive:

"; -echo "
\n"; - - -// Output Other Graphs -for($Counter=0; $Counter < $num_rows && $Counter < $limit; $Counter++) - { - $r = $result[$Counter]; - $r['ip'] = long2ip($r['ip']); - echo "

"; - if ($r['ip'] == "0.0.0.0") - echo "Total - Total of all subnets

"; - else - echo $r['ip']." - ".gethostbyaddr($r['ip']).""; - echo ""; - echo "Send:

"; - echo "
\n"; - echo "Receive:

"; - echo "
\n"; - } - -include('footer.php'); diff --git a/utils/bandwidthd/files/phphtdocs/details.php b/utils/bandwidthd/files/phphtdocs/details.php deleted file mode 100644 index cb52f43..0000000 --- a/utils/bandwidthd/files/phphtdocs/details.php +++ /dev/null @@ -1,102 +0,0 @@ - - -
- -Please provide a sensor_name"; - exit(1); - } - -if (isset($_GET['ip'])) - $ip = $_GET['ip']; -else - { - echo "
Please provide an ip address"; - exit(1); - } - -echo "

"; -if (strpos($ip, "/") === FALSE) - echo "$ip - ".gethostbyaddr($ip)."

"; -else - echo "Total - $ip"; - -$db = ConnectDb(); - -if ($ip == "0.0.0.0/0") - { - $rxtable = "bd_rx_total_log"; - $txtable = "bd_tx_total_log"; - } -else - { - $rxtable = "bd_rx_log"; - $txtable = "bd_tx_log"; - } - -$sql = "select rx.scale as rxscale, tx.scale as txscale, tx.total+rx.total as total, tx.total as sent, -rx.total as received, tx.tcp+rx.tcp as tcp, tx.udp+rx.udp as udp, -tx.icmp+rx.icmp as icmp, tx.http+rx.http as http, -tx.p2p+rx.p2p as p2p, tx.ftp+rx.ftp as ftp -from - -(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, -sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp -from sensors, $txtable -where sensor_name = '$sensor_name' -and sensors.sensor_id = ".$txtable.".sensor_id -and ip <<= '$ip' -group by ip) as tx, - -(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, -sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp -from sensors, $rxtable -where sensor_name = '$sensor_name' -and sensors.sensor_id = ".$rxtable.".sensor_id -and ip <<= '$ip' -group by ip) as rx - -where tx.ip = rx.ip;"; -//echo "
$sql
";exit(0); -$result = pg_query($sql); -echo "
IpNameTotalSentReceivedtcpudpicmphttpsmtpftp"; -$r = pg_fetch_array($result); -echo "
"; -if (strpos($ip, "/") === FALSE) - echo "$ip".gethostbyaddr($ip); -else - echo "Total$ip"; -echo fmtb($r['total']).fmtb($r['sent']).fmtb($r['received']). - fmtb($r['tcp']).fmtb($r['udp']).fmtb($r['icmp']).fmtb($r['http']). - fmtb($r['p2p']).fmtb($r['ftp']); -echo "
"; - -echo "

Daily

"; -echo "Send:

"; -echo "
"; -echo "Receive:

"; -echo "
"; - -echo "

Weekly

"; -echo "Send:

"; -echo "
"; -echo "Receive:

"; -echo "
"; - -echo "

Monthly

"; -echo "Send:

"; -echo "
"; -echo "Receive:

"; -echo "
"; - -echo "

Yearly

"; -echo "Send:

"; -echo "
"; -echo "Receive:

"; -echo "
"; diff --git a/utils/bandwidthd/files/phphtdocs/footer.php b/utils/bandwidthd/files/phphtdocs/footer.php deleted file mode 100644 index b342825..0000000 --- a/utils/bandwidthd/files/phphtdocs/footer.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/utils/bandwidthd/files/phphtdocs/graph.php b/utils/bandwidthd/files/phphtdocs/graph.php deleted file mode 100644 index 323d659..0000000 --- a/utils/bandwidthd/files/phphtdocs/graph.php +++ /dev/null @@ -1,454 +0,0 @@ - $number) - { - $total[$key] /= $number; - $icmp[$key] /= $number; - $udp[$key] /= $number; - $tcp[$key] /= $number; - $ftp[$key] /= $number; - $http[$key] /= $number; - $p2p[$key] /= $number; - } - - foreach ($Count as $key => $number) - { - $a_total[$key] += $total[$key]; - $a_icmp[$key] += $icmp[$key]; - $a_udp[$key] += $udp[$key]; - $a_tcp[$key] += $tcp[$key]; - $a_ftp[$key] += $ftp[$key]; - $a_http[$key] += $http[$key]; - $a_p2p[$key] += $p2p[$key]; - - if ($a_total[$key] > $YMax) - $YMax = $a_total[$key]; - } - - unset($GLOBALS['total'], $GLOBALS['icmp'], $GLOBALS['udp'], $GLOBALS['tcp'], $GLOBALS['ftp'], $GLOBALS['http'], $GLOBALS['p2p'], $GLOBALS['Count']); - - $total = array(); - $icmp = array(); - $udp = array(); - $tcp = array(); - $ftp = array(); - $http = array(); - $p2p = array(); - $Count = array(); - } - -$db = ConnectDb(); - -// Get parameters - -if (isset($_GET['width'])) - $width = $_GET['width']; -else - $width = DFLT_WIDTH; - -if (isset($_GET['height'])) - $height = $_GET['height']; -else - $height = DFLT_HEIGHT; - -if (isset($_GET['interval'])) - $interval = $_GET['interval']; -else - $interval = DFLT_INTERVAL; - -if (isset($_GET['ip'])) - $ip = $_GET['ip']; -else - exit(1); - -if (isset($_GET['sensor_name'])) - $sensor_name = $_GET['sensor_name']; -else - exit(1); - -if (isset($_GET['timestamp'])) - $timestamp = $_GET['timestamp']; -else - $timestamp = time() - $interval + (0.05*$interval); - -if (isset($_GET['table'])) - $table = $_GET['table']; -else - $table = "bd_rx_log"; - -if (isset($_GET['yscale'])) - $yscale = $_GET['yscale']; - -$total = array(); -$icmp = array(); -$udp = array(); -$tcp = array(); -$ftp = array(); -$http = array(); -$p2p = array(); -$Count = array(); - -// Accumulator -$a_total = array(); -$a_icmp = array(); -$a_udp = array(); -$a_tcp = array(); -$a_ftp = array(); -$a_http = array(); -$a_p2p = array(); - -$sql = "select *, extract(epoch from timestamp) as ts from sensors, $table where sensors.sensor_id = ".$table.".sensor_id and ip <<= '$ip' and sensor_name = '$sensor_name' and timestamp > $timestamp::abstime and timestamp < ".($timestamp+$interval)."::abstime order by ip;"; -//echo $sql."
"; exit(1); -$result = pg_query($sql); - -// The SQL statement pulls the data out of the database ordered by IP address, that way we can average each -// datapoint for each IP address to provide smoothing and then toss the smoothed value into the accumulator -// to provide accurate total traffic rate. - -while ($row = pg_fetch_array($result)) - { - if ($row['ip'] != $last_ip) - { - AverageAndAccumulate(); - $last_ip = $row['ip']; - } - - $x = ($row['ts']-$timestamp)*(($width-XOFFSET)/$interval)+XOFFSET; - $xint = (int) $x; - - //echo "xint: ".$xint."
"; - $Count[$xint]++; - - if ($row['total']/$row['sample_duration'] > $SentPeak) - $SentPeak = $row['total']/$row['sample_duration']; - $TotalSent += $row['total']; - $total[$xint] += $row['total']/$row['sample_duration']; - $icmp[$xint] += $row['icmp']/$row['sample_duration']; - $udp[$xint] += $row['udp']/$row['sample_duration']; - $tcp[$xint] += $row['tcp']/$row['sample_duration']; - $ftp[$xint] += $row['ftp']/$row['sample_duration']; - $http[$xint] += $row['http']/$row['sample_duration']; - $p2p[$xint] += $row['p2p']/$row['sample_duration']; - } - -// One more time for the last IP -AverageAndAccumulate(); - -// Pull the data out of Accumulator -$total = $a_total; -$icmp = $a_icmp; -$udp = $a_udp; -$tcp = $a_tcp; -$ftp = $a_ftp; -$http = $a_http; -$p2p = $a_p2p; - -$YMax += $YMax*0.05; // Add an extra 5% - -// if a y scale was specified override YMax -if (isset($yscale)) - $YMax = $yscale/8; - -// Plot the data - -header("Content-type: image/png"); - -$im = imagecreate($width, $height); -$white = imagecolorallocate($im, 255, 255, 255); -$purple = ImageColorAllocate($im, 255, 0, 255); -$green = ImageColorAllocate($im, 0, 255, 0); -$blue = ImageColorAllocate($im, 0, 0, 255); -$lblue = ImageColorAllocate($im, 128, 128, 255); -$brown = ImageColorAllocate($im, 128, 0, 0); -$red = ImageColorAllocate($im, 255, 0, 0); -$black = ImageColorAllocate($im, 0, 0, 0); - -for($Counter=XOFFSET+1; $Counter < $width; $Counter++) - { - if (isset($total[$Counter])) - { - // Convert the bytes/sec to y coords - $total[$Counter] = ($total[$Counter]*($height-YOFFSET))/$YMax; - $tcp[$Counter] = ($tcp[$Counter]*($height-YOFFSET))/$YMax; - $ftp[$Counter] = ($ftp[$Counter]*($height-YOFFSET))/$YMax; - $http[$Counter] = ($http[$Counter]*($height-YOFFSET))/$YMax; - $p2p[$Counter] = ($p2p[$Counter]*($height-YOFFSET))/$YMax; - $udp[$Counter] = ($udp[$Counter]*($height-YOFFSET))/$YMax; - $icmp[$Counter] = ($icmp[$Counter]*($height-YOFFSET))/$YMax; - - // Stack 'em up! - // Total is stacked from the bottom - // Icmp is on the bottom too - // Udp is stacked on top of icmp - $udp[$Counter] += $icmp[$Counter]; - // TCP and p2p are stacked on top of Udp - $tcp[$Counter] += $udp[$Counter]; - $p2p[$Counter] += $udp[$Counter]; - // Http is stacked on top of p2p - $http[$Counter] += $p2p[$Counter]; - // Ftp is stacked on top of http - $ftp[$Counter] += $http[$Counter]; - - // Plot them! - //echo "$Counter:".$Counter." (h-y)-t:".($height-YOFFSET) - $total[$Counter]." h-YO-1:".$height-YOFFSET-1; - ImageLine($im, $Counter, ($height-YOFFSET) - $icmp[$Counter], $Counter, $height-YOFFSET-1, $red); - ImageLine($im, $Counter, ($height-YOFFSET) - $udp[$Counter], $Counter, ($height-YOFFSET) - $icmp[$Counter] - 1, $brown); - ImageLine($im, $Counter, ($height-YOFFSET) - $tcp[$Counter], $Counter, ($height-YOFFSET) - $udp[$Counter] - 1, $green); - ImageLine($im, $Counter, ($height-YOFFSET) - $p2p[$Counter], $Counter, ($height-YOFFSET) - $udp[$Counter] - 1, $purple); - ImageLine($im, $Counter, ($height-YOFFSET) - $http[$Counter], $Counter, ($height-YOFFSET) - $p2p[$Counter] - 1, $blue); - ImageLine($im, $Counter, ($height-YOFFSET) - $ftp[$Counter], $Counter, ($height-YOFFSET) - $http[$Counter] - 1, $lblue); - } -// else -// echo $Counter." not set
"; - } - -// Margin Text -if ($SentPeak < 1024/8) - $txtPeakSendRate = sprintf("Peak Send Rate: %.1f KBits/sec", $SentPeak*8); -else if ($SentPeak < (1024*1024)/8) - $txtPeakSendRate = sprintf("Peak Send Rate: %.1f MBits/sec", ($SentPeak*8.0)/1024.0); -else - $txtPeakSendRate = sprintf("Peak Send Rate: %.1f GBits/sec", ($SentPeak*8.0)/(1024.0*1024.0)); - -if ($TotalSent < 1024) - $txtTotalSent = sprintf("Sent %.1f KBytes", $TotalSent); -else if ($TotalSent < 1024*1024) - $txtTotalSent = sprintf("Sent %.1f MBytes", $TotalSent/1024.0); -else - $txtTotalSent = sprintf("Sent %.1f GBytes", $TotalSent/(1024.0*1024.0)); - -ImageString($im, 2, XOFFSET+5, $height-20, $txtTotalSent, $black); -ImageString($im, 2, $width/2+XOFFSET/2, $height-20, $txtPeakSendRate, $black); - -// Draw X Axis - -ImageLine($im, 0, $height-YOFFSET, $width, $height-YOFFSET, $black); - -// Day/Month Seperator bars - -if ((24*60*60*($width-XOFFSET))/$interval > ($width-XOFFSET)/10) - { - $ts = getdate($timestamp); - $MarkTime = mktime(0, 0, 0, $ts['mon'], $ts['mday'], $ts['year']); - - $x = ts2x($MarkTime); - while ($x < XOFFSET) - { - $MarkTime += (24*60*60); - $x = ts2x($MarkTime); - } - - while ($x < ($width-10)) - { - // Day Lines - ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); - ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); - - $txtDate = strftime("%a, %b %d", $MarkTime); - ImageString($im, 2, $x-30, $height-YOFFSET+10, $txtDate, $black); - - // Calculate Next x - $MarkTime += (24*60*60); - $x = ts2x($MarkTime); - } - } -else if ((24*60*60*30*($width-XOFFSET))/$interval > ($width-XOFFSET)/10) - { - // Monthly Bars - $ts = getdate($timestamp); - $month = $ts['mon']; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - - $x = ts2x($MarkTime); - while ($x < XOFFSET) - { - $month++; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - $x = ts2x($MarkTime); - } - - while ($x < ($width-10)) - { - // Day Lines - ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); - ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); - - $txtDate = strftime("%b, %Y", $MarkTime); - ImageString($im, 2, $x-25, $height-YOFFSET+10, $txtDate, $black); - - // Calculate Next x - $month++; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - $x = ts2x($MarkTime); - } - } -else - { - // Year Bars - $ts = getdate($timestamp); - $year = $ts['year']; - $MarkTime = mktime(0, 0, 0, 1, 1, $year); - - $x = ts2x($MarkTime); - while ($x < XOFFSET) - { - $year++; - $MarkTime = mktime(0, 0, 0, 1, 1, $year); - $x = ts2x($MarkTime); - } - - while ($x < ($width-10)) - { - // Day Lines - ImageLine($im, $x, 0, $x, $height-YOFFSET, $black); - ImageLine($im, $x+1, 0, $x+1, $height-YOFFSET, $black); - - $txtDate = strftime("%b, %Y", $MarkTime); - ImageString($im, 2, $x-25, $height-YOFFSET+10, $txtDate, $black); - - // Calculate Next x - $year++; - $MarkTime = mktime(0, 0, 0, 1, 1, $year); - $x = ts2x($MarkTime); - } - } - -// Draw Major Tick Marks -if ((6*60*60*($width-XOFFSET))/$interval > 10) // pixels per 6 hours is more than 2 - $MarkTimeStep = 6*60*60; // Major ticks are 6 hours -else if ((24*60*60*($width-XOFFSET))/$interval > 10) - $MarkTimeStep = 24*60*60; // Major ticks are 24 hours; -else if ((24*60*60*30*($width-XOFFSET))/$interval > 10) - { - // Major tick marks are months - $MarkTimeStep = 0; // Skip the standard way of drawing major tick marks below - - $ts = getdate($timestamp); - $month = $ts['mon']; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - - $x = ts2x($MarkTime); - while ($x < XOFFSET) - { - $month++; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - $x = ts2x($MarkTime); - } - - while ($x < ($width-10)) - { - // Day Lines - $date = getdate($MarkTime); - if ($date['mon'] != 1) - { - ImageLine($im, $x, $height-YOFFSET-5, $x, $height-YOFFSET+5, $black); - $txtDate = strftime("%b", $MarkTime); - ImageString($im, 2, $x-5, $height-YOFFSET+10, $txtDate, $black); - } - - // Calculate Next x - $month++; - $MarkTime = mktime(0, 0, 0, $month, 1, $ts['year']); - $x = ts2x($MarkTime); - } - } -else - $MarkTimeStep = 0; // Skip Major Tick Marks - -if ($MarkTimeStep) - { - $ts = getdate($timestamp); - $MarkTime = mktime(0, 0, 0, $ts['mon'], $ts['mday'], $ts['year']); - $x = ts2x($MarkTime); - - while ($x < ($width-10)) - { - if ($x > XOFFSET) - { - ImageLine($im, $x, $height-YOFFSET-5, $x, $height-YOFFSET+5, $black); - } - $MarkTime += $MarkTimeStep; - $x = ts2x($MarkTime); - } - } - -// Draw Minor Tick marks -if ((60*60*($width-XOFFSET))/$interval > 4) // pixels per hour is more than 2 - $MarkTimeStep = 60*60; // Minor ticks are 1 hour -else if ((6*60*60*($width-XOFFSET))/$interval > 4) - $MarkTimeStep = 6*60*60; // Minor ticks are 6 hours -else if ((24*60*60*($width-XOFFSET))/$interval > 4) - $MarkTimeStep = 24*60*60; -else - $MarkTimeStep = 0; // Skip minor tick marks - -if ($MarkTimeStep) - { - $ts = getdate($timestamp); - $MarkTime = mktime(0, 0, 0, $ts['mon'], $ts['mday'], $ts['year']); - $x = ts2x($MarkTime); - - while ($x < ($width-10)) - { - if ($x > XOFFSET) - { - ImageLine($im, $x, $height-YOFFSET, $x, $height-YOFFSET+5, $black); - } - $MarkTime += $MarkTimeStep; - $x = ts2x($MarkTime); - } - } - -// Draw Y Axis -ImageLine($im, XOFFSET, 0, XOFFSET, $height, $black); - -$YLegend = 'k'; -$Divisor = 1; -if ($YMax*8 > 1024*2) - { - $Divisor = 1024; // Display in m - $YLegend = 'm'; - } - -if ($YMax*8 > 1024*1024*2) - { - $Divisor = 1024*1024; // Display in g - $YLegend = 'g'; - } - -if ($YMax*8 > 1024*1024*1024*2) - { - $Divisor = 1024*1024*1024; // Display in t - $YLegend = 't'; - } - -$YStep = $YMax/10; -if ($YStep < 1) - $YStep=1; -$YTic=$YStep; - -while ($YTic <= ($YMax - $YMax/10)) - { - $y = ($height-YOFFSET)-(($YTic*($height-YOFFSET))/$YMax); - ImageLine($im, XOFFSET, $y, $width, $y, $black); - $txtYLegend = sprintf("%4.1f %sbits/s", (8.0*$YTic)/$Divisor, $YLegend); - ImageString($im, 2, 3, $y-7, $txtYLegend, $black); - $YTic += $YStep; - } - -imagepng($im); -imagedestroy($im); diff --git a/utils/bandwidthd/files/phphtdocs/include.php b/utils/bandwidthd/files/phphtdocs/include.php deleted file mode 100644 index 6b435d1..0000000 --- a/utils/bandwidthd/files/phphtdocs/include.php +++ /dev/null @@ -1,54 +0,0 @@ - $Max) - { - $Output /= 1024; - $Suffix = 'M'; - } - - if ($Output > $Max) - { - $Output /= 1024; - $Suffix = 'G'; - } - - if ($Output > $Max) - { - $Output /= 1024; - $Suffix = 'T'; - } - - return(sprintf("%.1f%s", $Output, $Suffix)); - } - -$starttime = time(); -set_time_limit(300); -?> diff --git a/utils/bandwidthd/files/phphtdocs/index.php b/utils/bandwidthd/files/phphtdocs/index.php deleted file mode 100644 index b3602af..0000000 --- a/utils/bandwidthd/files/phphtdocs/index.php +++ /dev/null @@ -1,197 +0,0 @@ - - -
- - -
> - - -
- - - - -Subnet Filter:"> - -
-
-Top $limit - $sensor_name"; -else - echo "

All Records - $sensor_name

"; - -// Sqlize the incomming variables -if (isset($subnet)) - $sql_subnet = "and ip <<= '$subnet'"; - -// Sql Statement -$sql = "select tx.ip, rx.scale as rxscale, tx.scale as txscale, tx.total+rx.total as total, tx.total as sent, -rx.total as received, tx.tcp+rx.tcp as tcp, tx.udp+rx.udp as udp, -tx.icmp+rx.icmp as icmp, tx.http+rx.http as http, -tx.p2p+rx.p2p as p2p, tx.ftp+rx.ftp as ftp -from - -(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, -sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp -from sensors, bd_tx_log -where sensor_name = '$sensor_name' -and sensors.sensor_id = bd_tx_log.sensor_id -$sql_subnet -and timestamp > $timestamp::abstime and timestamp < ".($timestamp+$interval)."::abstime -group by ip) as tx, - -(SELECT ip, max(total/sample_duration)*8 as scale, sum(total) as total, sum(tcp) as tcp, sum(udp) as udp, sum(icmp) as icmp, -sum(http) as http, sum(p2p) as p2p, sum(ftp) as ftp -from sensors, bd_rx_log -where sensor_name = '$sensor_name' -and sensors.sensor_id = bd_rx_log.sensor_id -$sql_subnet -and timestamp > $timestamp::abstime and timestamp < ".($timestamp+$interval)."::abstime -group by ip) as rx - -where tx.ip = rx.ip -order by total desc;"; - -//echo "
$sql
"; exit(0); -pg_query("SET sort_mem TO 30000;"); -$result = pg_query($sql); -pg_query("set sort_mem to default;"); - -if ($limit == "all") - $limit = pg_num_rows($result); - -echo "
IpNameTotalSentReceivedtcpudpicmphttpsmtpftp"; - -if (!isset($subnet)) // Set this now for total graphs - $subnet = "0.0.0.0/0"; - -// Output Total Line -echo "
Total$subnet"; -foreach (array("total", "sent", "received", "tcp", "udp", "icmp", "http", "p2p", "ftp") as $key) - { - for($Counter=0, $Total = 0; $Counter < pg_num_rows($result); $Counter++) - { - $r = pg_fetch_array($result, $Counter); - $Total += $r[$key]; - } - echo fmtb($Total); - } -echo "\n"; - -// Output Other Lines -for($Counter=0; $Counter < pg_num_rows($result) && $Counter < $limit; $Counter++) - { - $r = pg_fetch_array($result, $Counter); - echo "
"; - echo $r['ip']."".gethostbyaddr($r['ip']); - echo ""; - echo fmtb($r['total']).fmtb($r['sent']).fmtb($r['received']). - fmtb($r['tcp']).fmtb($r['udp']).fmtb($r['icmp']).fmtb($r['http']). - fmtb($r['p2p']).fmtb($r['ftp'])."\n"; - } -echo "
"; - -// Output Total Graph -for($Counter=0, $Total = 0; $Counter < pg_num_rows($result); $Counter++) - { - $r = pg_fetch_array($result, $Counter); - $scale = max($r['txscale'], $scale); - $scale = max($r['rxscale'], $scale); - } - -if ($subnet == "0.0.0.0/0") - $total_table = "bd_tx_total_log"; -else - $total_table = "bd_tx_log"; -echo "

"; -echo "Total - Total of $subnet

"; -echo ""; -echo "Send:

"; -echo "
\n"; -if ($subnet == "0.0.0.0/0") - $total_table = "bd_rx_total_log"; -else - $total_table = "bd_rx_log"; -echo "Receive:

"; -echo "
\n"; - - -// Output Other Graphs -for($Counter=0; $Counter < pg_num_rows($result) && $Counter < $limit; $Counter++) - { - $r = pg_fetch_array($result, $Counter); - echo "

"; - if ($r['ip'] == "0.0.0.0") - echo "Total - Total of all subnets

"; - else - echo $r['ip']." - ".gethostbyaddr($r['ip']).""; - echo ""; - echo "Send:

"; - echo "
\n"; - echo "Receive:

"; - echo "
\n"; - } - -include('footer.php'); diff --git a/utils/bandwidthd/patches/010-dont-add-host-paths-in-config.in.patch b/utils/bandwidthd/patches/010-dont-add-host-paths-in-config.in.patch deleted file mode 100644 index cfaba70..0000000 --- a/utils/bandwidthd/patches/010-dont-add-host-paths-in-config.in.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/configure.in -+++ b/configure.in -@@ -24,11 +24,6 @@ if test -n "$x_libraries" && test "x$x_l - LDFLAGS="$LDFLAGS -L$x_libraries" - fi - --# May be equired for BSD --LDFLAGS="$LDFLAGS -L/usr/local/lib" -- --CPPFLAGS="$CPPFLAGS -I/usr/local/include" -- - #Check for Darwin sw directory - AC_CHECK_FILE(/sw/lib, LDFLAGS="$LDFLAGS -L/sw/lib") - AC_CHECK_FILE(/sw/include, CPPFLAGS="$CPPFLAGS -I/sw/include") -@@ -55,8 +50,7 @@ AC_CHECK_LIB(pcap, pcap_open_live, , - [AC_CHECK_LIB(wpcap, pcap_open_live, ,[AC_MSG_ERROR([Bandwidthd requires but cannot find libpcap])])]) - - # Optional Library --AC_CHECK_FILE(/usr/lib, LDFLAGS="$LDFLAGS -L/usr/lib") --AC_CHECK_FILE(/usr/include/pgsql, CPPFLAGS="$CPPFLAGS -I/usr/include/pgsql") -+AC_CHECK_FILE(/usr/local/pgsql/include, CPPFLAGS="$CPPFLAGS -I/usr/local/pgsql/include") - AC_CHECK_LIB(pq, PQconnectdb, - [AC_CHECK_LIB(pq,PQexecParams, ,AC_MSG_WARN([libpq exists but is too old... bandwidthd requires support for PQexecParams]))]) - AC_CHECK_LIB(sqlite3, sqlite3_open, ,AC_MSG_WARN([sqlite3 is recommended for storage of data but cannot be found])) diff --git a/utils/bandwidthd/patches/020-change-p2p-to-smtp.patch b/utils/bandwidthd/patches/020-change-p2p-to-smtp.patch deleted file mode 100644 index d0e6144..0000000 --- a/utils/bandwidthd/patches/020-change-p2p-to-smtp.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/graph.c -+++ b/graph.c -@@ -274,7 +274,7 @@ void MakeIndexPages(int NumIps, struct S - - // PASS 1: Write out the table - -- fprintf(file, "Ip and NameTotalTotal SentTotal ReceivedFTPHTTPP2PTCPUDPICMP\n"); -+ fprintf(file, "Ip and NameTotalTotal SentTotal ReceivedFTPHTTPSMTPTCPUDPICMP\n"); - for (Counter=0; Counter < 21 && Counter < NumIps; Counter++) - PrintTableLine(file, SummaryData[Counter], Counter); - -@@ -341,7 +341,7 @@ void MakeIndexPages(int NumIps, struct S - - // PASS 1: Write out the table - -- fprintf(file, "Ip and NameTotalTotal SentTotal ReceivedFTPHTTPP2PTCPUDPICMP\n"); -+ fprintf(file, "Ip and NameTotalTotal SentTotal ReceivedFTPHTTPSMTPTCPUDPICMP\n"); - for (tCounter=0, Counter=0; Counter < NumIps; Counter++) - { - if (SubnetTable[SubnetCounter].ip == (SummaryData[Counter]->IP & SubnetTable[SubnetCounter].mask)) diff --git a/utils/banhosts/Makefile b/utils/banhosts/Makefile deleted file mode 100644 index 0087a6f..0000000 --- a/utils/banhosts/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=banhostlist -PKG_VERSION:=1 -PKG_RELEASE:=1 - -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_MAINTAINER:=Matteo Croce -PKG_LICENCE:=GPL-2.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/banhostlist - SECTION:=utils - CATEGORY:=Utilities - TITLE:=List of advertising domains - URL:=http://winhelp2002.mvps.org/ -endef - -define Package/banhostlist/description -List of domains serving advertising and malicious content to easily block them -endef - - -define Build/Compile/Default -endef - -define Package/banhostlist/install - $(INSTALL_DIR) $(1)/etc/hotplug.d/iface - $(INSTALL_BIN) ./files/updatebanhost $(1)/etc/hotplug.d/iface/80-banhosts -endef - -$(eval $(call BuildPackage,banhostlist)) diff --git a/utils/banhosts/files/updatebanhost b/utils/banhosts/files/updatebanhost deleted file mode 100644 index a00d9cb..0000000 --- a/utils/banhosts/files/updatebanhost +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -file=/tmp/banhost - -gethosts() { - logger -t "banhost[$$]" "Update $file" - wget -qO- http://winhelp2002.mvps.org/hosts.txt |awk 'BEGIN{printf "0.0.0.0"}/^0\.0\.0\.0/{printf " "$2}END{exit(!FNR)}' >$file || exit 1 - echo -n $time >$file.time - exec killall -HUP dnsmasq -} - -if [ "$ACTION" = ifup -a "$INTERFACE" = wan ]; then - read time -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/bc/Default - SECTION:=utils - CATEGORY:=Utilities - URL:=http://packages.debian.org/bc -endef - -define Package/bc - $(call Package/bc/Default) - TITLE:=Arbitrary precision calculator language - DEPENDS:=+libreadline +libncurses -endef - -define Package/bc/description - bc is a language that supports arbitrary precision numbers with - interactive execution of statements. -endef - -define Package/dc - $(call Package/bc/Default) - TITLE:=Arbitrary precision reverse-polish calculator - DEPENDS:=bc -endef - -define Package/dc/description - dc is a reverse-polish desk calculator which supports unlimited - precision arithmetic. -endef - -CONFIGURE_ARGS += --with-readline - -define Package/bc/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bc/bc $(1)/usr/bin/ -endef - -define Package/dc/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dc/dc $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,bc)) -$(eval $(call BuildPackage,dc)) diff --git a/utils/bc/patches/001-disable-doc.patch b/utils/bc/patches/001-disable-doc.patch deleted file mode 100644 index a6ecd6e..0000000 --- a/utils/bc/patches/001-disable-doc.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- bc-1.06.95/Makefile.in 2010-07-03 10:48:13.422725147 +0000 -+++ bc-1.06.95/Makefile.in 2010-07-03 10:50:09.714725197 +0000 -@@ -149,7 +149,7 @@ - sharedstatedir = @sharedstatedir@ - sysconfdir = @sysconfdir@ - target_alias = @target_alias@ --SUBDIRS = lib bc dc doc -+SUBDIRS = lib bc dc - MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \ - stamp-h $(distdir).tar.gz h/number.h depcomp missing - ---- bc-1.06.95/Makefile.am 2010-07-03 10:48:32.522725037 +0000 -+++ bc-1.06.95/Makefile.am 2010-07-03 10:48:38.114725024 +0000 -@@ -1,6 +1,6 @@ - ## Process this file with automake to produce Makefile.in - --SUBDIRS = lib bc dc doc -+SUBDIRS = lib bc dc - - MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \ - stamp-h $(distdir).tar.gz h/number.h depcomp missing diff --git a/utils/bluelog/Makefile b/utils/bluelog/Makefile deleted file mode 100644 index 5ef7c65..0000000 --- a/utils/bluelog/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# -# Copyright (C) 2012-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bluelog -PKG_VERSION:=1.1.2 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=ftp://ftp.digifail.com/software/bluelog -PKG_MD5SUM:=614d0fe65bae68acff1d33d9f86e4805 - -OUI_SOURCE:=oui-2016-05-30.txt.gz -OUI_URL:=http://sources.lede-project.org/ -OUI_MD5SUM:=38048729fdb5a7a7e0c5db6a51dc2dd1 - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/bluelog/Default - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Bluetooth scanner and logger - URL:=http://www.digifail.com/software/bluelog.shtml - DEPENDS:=+bluez-libs +kmod-bluetooth -endef - -define Package/bluelog/Default/description - Bluelog is a simple Bluetooth scanner designed to tell you how many - discoverable devices there are in an area as quickly as possible. It is - intended to be used as a site survey tool, identifying the number of possible - Bluetooth targets there are in the surrounding environment. -endef - -define Package/bluelog - $(call Package/bluelog/Default) -endef - -define Package/bluelog/description - $(call Package/bluelog/Default/description) -endef - -define Package/bluelog-live - $(call Package/bluelog/Default) - TITLE+= (live output) - DEPENDS+= bluelog -endef - -define Package/bluelog-live/description - $(call Package/bluelog/Default/description) - This package contains the files for "Bluelog Live", an optional mode of - Bluelog which creates a real-time webpage of discovered Bluetooth devices. -endef - -define Download/oui.txt - FILE:=$(OUI_SOURCE) - URL:=$(OUI_URL) - MD5SUM:=$(OUI_MD5SUM) -endef - -TARGET_CFLAGS += -DOPENWRT - -MAKE_FLAGS += \ - LIBS="$(TARGET_LDFLAGS) -lbluetooth -lm" - -define Build/Prepare - $(eval $(call Download,oui.txt)) - $(Build/Prepare/Default) - zcat $(DL_DIR)/$(OUI_SOURCE) > $(PKG_BUILD_DIR)/oui.tmp -endef - -define Package/bluelog/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/bluelog $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/bluelog.init $(1)/etc/init.d/bluelog -endef - -define Package/bluelog-live/install - $(INSTALL_DIR) $(1)/www/bluelog - $(CP) $(PKG_INSTALL_DIR)/usr/share/bluelog/*.html $(1)/www/bluelog/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/share/bluelog/openwrt.css \ - $(1)/www/bluelog/style.css - $(INSTALL_DIR) $(1)/www/bluelog/images - $(CP) \ - $(PKG_INSTALL_DIR)/usr/share/bluelog/images/digifail_logo.png \ - $(PKG_INSTALL_DIR)/usr/share/bluelog/images/email.png \ - $(PKG_INSTALL_DIR)/usr/share/bluelog/images/favicon.png \ - $(PKG_INSTALL_DIR)/usr/share/bluelog/images/openwrt_logo.png \ - $(PKG_INSTALL_DIR)/usr/share/bluelog/images/qrcontact.png \ - $(1)/www/bluelog/images/ - $(INSTALL_DIR) $(1)/www/cgi-bin - $(CP) $(PKG_INSTALL_DIR)/usr/share/bluelog/cgi-bin/* $(1)/www/cgi-bin/ -endef - -$(eval $(call BuildPackage,bluelog)) -$(eval $(call BuildPackage,bluelog-live)) diff --git a/utils/bluelog/files/bluelog.init b/utils/bluelog/files/bluelog.init deleted file mode 100644 index efae288..0000000 --- a/utils/bluelog/files/bluelog.init +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=65 - -SERVICE_DAEMONIZE=1 - -start() { - service_start /usr/bin/bluelog -} - -stop() { - service_stop /usr/bin/bluelog -} diff --git a/utils/bluelog/patches/100-gen-oui-fix-tempfile-use-mirror.patch b/utils/bluelog/patches/100-gen-oui-fix-tempfile-use-mirror.patch deleted file mode 100644 index 414ecb8..0000000 --- a/utils/bluelog/patches/100-gen-oui-fix-tempfile-use-mirror.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- a/gen_oui.sh -+++ b/gen_oui.sh -@@ -3,7 +3,7 @@ - VER="1.2" - - # Location of tmp file --TMPFILE="/tmp/oui.tmp" -+TMPFILE="./oui.tmp" - - # File to write - OUIFILE="oui.txt" -@@ -22,10 +22,7 @@ exit 1 - - get_oui () - { --echo -n "Downloading OUI file from IEEE..." --wget --quiet -O $TMPFILE http://standards.ieee.org/develop/regauth/oui/oui.txt || \ -- ErrorMsg ERR "Unable to contact IEEE server!" -- -+[ -f "$TMPFILE" ] || ErrorMsg ERR "Unable to find $TMPFILE" - echo "OK" - } - -@@ -44,7 +41,6 @@ echo "OK" - clean_all () - { - echo -n "Removing files..." --rm -f $TMPFILE - rm -f $OUIFILE - echo "OK" - } diff --git a/utils/bluez/Makefile b/utils/bluez/Makefile deleted file mode 100644 index 0430cd6..0000000 --- a/utils/bluez/Makefile +++ /dev/null @@ -1,159 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bluez -PKG_VERSION:=5.38 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/ -PKG_MD5SUM:=dae2ed00c63791800ea7d10a381270a5 - -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/bluez/Default - TITLE:=Bluetooth - URL:=http://www.bluez.org/ -endef - -define Package/bluez-examples -$(call Package/bluez/Default) - SECTION:=utils - CATEGORY:=Utilities - TITLE+= python example apps - DEPENDS:=+python -endef - -define Package/bluez-examples/description - contains many examples apps for bluetooth, requiring python -endef - -define Package/bluez-libs -$(call Package/bluez/Default) - SECTION:=libs - CATEGORY:=Libraries - TITLE+= library - DEPENDS:=+libpthread +kmod-bluetooth -endef - -define Package/bluez-utils -$(call Package/bluez/Default) - SECTION:=utils - CATEGORY:=Utilities - TITLE+= utilities - DEPENDS:=+bluez-libs +libpthread +librt +glib2 +libncurses +libreadline $(INTL_DEPENDS) $(ICONV_DEPENDS) -endef - -define Package/bluez-daemon -$(call Package/bluez/Default) - SECTION:=utils - CATEGORY:=Utilities - TITLE+= daemon - DEPENDS:=+bluez-libs +bluez-utils +dbus +libical $(INTL_DEPENDS) $(ICONV_DEPENDS) -endef - -define Package/bluez-daemon/conffiles -/etc/bluetooth/main.conf -/etc/bluetooth/network.conf -/etc/bluetooth/input.conf -/etc/bluetooth/proximity.conf -/etc/config/bluetooth -endef - -CONFIGURE_ARGS += \ - --enable-static \ - --enable-shared \ - --enable-client \ - --enable-datafiles \ - --enable-experimental \ - --enable-library \ - --enable-monitor \ - --enable-obex \ - --enable-threads \ - --enable-tools \ - --disable-android \ - --disable-cups \ - --disable-manpages \ - --disable-sixaxis \ - --disable-systemd \ - --disable-test \ - --disable-udev \ - -TARGET_CPPFLAGS += \ - -D_GNU_SOURCE - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/bluez-examples/install - $(INSTALL_DIR) $(1)/usr/bin/bluez - $(INSTALL_DATA) $(PKG_BUILD_DIR)/test/* $(1)/usr/bin/bluez/ -endef - -define Package/bluez-libs/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/ -endef - -define Package/bluez-utils/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/bccmd $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/bluemoon $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/btmon $(1)/usr/bin/ - $(CP) $(PKG_BUILD_DIR)/tools/btmgmt $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ciptool $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/hciattach $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/hciconfig $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/hcidump $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/hcitool $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/hex2hcd $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/l2ping $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/l2test $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rctest $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rfcomm $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/sdptool $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/attrib/gatttool $(1)/usr/bin/ -endef - -define Package/bluez-daemon/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/bluetoothd $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/bluetoothctl $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/bluetooth/obexd $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/bluetooth.config $(1)/etc/config/bluetooth - $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/ - $(INSTALL_DATA) ./files/bluetooth.dbus $(1)/etc/dbus-1/system.d/bluetooth.conf - $(INSTALL_DIR) $(1)/etc/bluetooth - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/main.conf $(1)/etc/bluetooth/main.conf - $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/network/network.conf $(1)/etc/bluetooth/network.conf - $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/input/input.conf $(1)/etc/bluetooth/input.conf - $(INSTALL_DATA) $(PKG_BUILD_DIR)/profiles/proximity/proximity.conf $(1)/etc/bluetooth/proximity.conf - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/bluetoothd.init $(1)/etc/init.d/bluetoothd -endef - -$(eval $(call BuildPackage,bluez-examples)) -$(eval $(call BuildPackage,bluez-libs)) -$(eval $(call BuildPackage,bluez-utils)) -$(eval $(call BuildPackage,bluez-daemon)) diff --git a/utils/bluez/files/bluetooth.config b/utils/bluez/files/bluetooth.config deleted file mode 100644 index 6f23617..0000000 --- a/utils/bluez/files/bluetooth.config +++ /dev/null @@ -1,15 +0,0 @@ -config bluetoothd -# option config /etc/bluetooth/main.conf - option enabled 1 - -config hciattach - option initspeed 115200 - option tty ttyS1 - option type csr - option speed 115200 - option flow noflow - option enabled 0 - -config rfcomm -# option config /etc/bluetooth/rfcomm.conf - option enabled 0 diff --git a/utils/bluez/files/bluetooth.dbus b/utils/bluez/files/bluetooth.dbus deleted file mode 100644 index 88545fa..0000000 --- a/utils/bluez/files/bluetooth.dbus +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/utils/bluez/files/bluetoothd.init b/utils/bluez/files/bluetoothd.init deleted file mode 100644 index 75f4d96..0000000 --- a/utils/bluez/files/bluetoothd.init +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2007 OpenWrt.org - -#start after dbus (60) -START=62 -USE_PROCD=1 -PROG=/usr/bin/bluetoothd - -start_service() { - procd_open_instance - procd_set_param command "$PROG" -n - procd_close_instance -} diff --git a/utils/bluez/files/givepin b/utils/bluez/files/givepin deleted file mode 100644 index e52a338..0000000 --- a/utils/bluez/files/givepin +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# Write bluetooth PIN number here: -pin= - -if [ -z "$pin" ]; then - msg="Set bluetooth PIN in file $0" - logger -p user.err "$msg" - for i in /dev/pts/* ; do - [ -w $i ] && echo "$msg" > $i - done -else - echo "PIN:$pin" -fi diff --git a/utils/bluez/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch b/utils/bluez/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch deleted file mode 100644 index 96e8a26..0000000 --- a/utils/bluez/patches/001-bcm43xx-Add-bcm43xx-3wire-variant.patch +++ /dev/null @@ -1,21 +0,0 @@ -From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 16 Feb 2016 16:40:46 +0000 -Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant - ---- - tools/hciattach.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/tools/hciattach.c -+++ b/tools/hciattach.c -@@ -1144,6 +1144,9 @@ struct uart_t uart[] = { - { "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000, - FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL }, - -+ { "bcm43xx-3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000, -+ 0, DISABLE_PM, NULL, bcm43xx, NULL }, -+ - { "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200, - FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm }, - diff --git a/utils/bluez/patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch b/utils/bluez/patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch deleted file mode 100644 index a221861..0000000 --- a/utils/bluez/patches/002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch +++ /dev/null @@ -1,33 +0,0 @@ -From e145c9621f976063e5c573db1f2053d906f63427 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 16 Feb 2016 16:39:09 +0000 -Subject: [PATCH 2/4] bcm43xx: The UART speed must be reset after the firmware - download - ---- - tools/hciattach_bcm43xx.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - ---- a/tools/hciattach_bcm43xx.c -+++ b/tools/hciattach_bcm43xx.c -@@ -366,11 +366,8 @@ int bcm43xx_init(int fd, int def_speed, - return -1; - - if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) { -- fprintf(stderr, "Patch not found, continue anyway\n"); -+ fprintf(stderr, "Patch not found for %s, continue anyway\n", chip_name); - } else { -- if (bcm43xx_set_speed(fd, ti, speed)) -- return -1; -- - if (bcm43xx_load_firmware(fd, fw_path)) - return -1; - -@@ -380,6 +377,7 @@ int bcm43xx_init(int fd, int def_speed, - return -1; - } - -+ sleep(1); - if (bcm43xx_reset(fd)) - return -1; - } diff --git a/utils/bluez/patches/003-Increase-firmware-load-timeout-to-30s.patch b/utils/bluez/patches/003-Increase-firmware-load-timeout-to-30s.patch deleted file mode 100644 index fa0948d..0000000 --- a/utils/bluez/patches/003-Increase-firmware-load-timeout-to-30s.patch +++ /dev/null @@ -1,20 +0,0 @@ -From d41dc2046dd08d8c95197f677e224506f5b39bdd Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 20 Jan 2016 16:00:37 +0000 -Subject: [PATCH 3/4] Increase firmware load timeout to 30s - ---- - tools/hciattach.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/tools/hciattach.c -+++ b/tools/hciattach.c -@@ -1293,7 +1293,7 @@ int main(int argc, char *argv[]) - { - struct uart_t *u = NULL; - int detach, printpid, raw, opt, i, n, ld, err; -- int to = 10; -+ int to = 30; - int init_speed = 0; - int send_break = 0; - pid_t pid; diff --git a/utils/bluez/patches/004-Move-the-43xx-firmware-into-lib-firmware.patch b/utils/bluez/patches/004-Move-the-43xx-firmware-into-lib-firmware.patch deleted file mode 100644 index 80b052d..0000000 --- a/utils/bluez/patches/004-Move-the-43xx-firmware-into-lib-firmware.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 76681284b0ea49852041fdb97a35175089a08781 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Tue, 23 Feb 2016 17:52:29 +0000 -Subject: [PATCH 4/4] Move the 43xx firmware into /lib/firmware - ---- - tools/hciattach_bcm43xx.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/tools/hciattach_bcm43xx.c -+++ b/tools/hciattach_bcm43xx.c -@@ -43,7 +43,7 @@ - #include "hciattach.h" - - #ifndef FIRMWARE_DIR --#define FIRMWARE_DIR "/etc/firmware" -+#define FIRMWARE_DIR "/lib/firmware/brcm" - #endif - - #define FW_EXT ".hcd" diff --git a/utils/bluez/patches/200-uart-speed.patch b/utils/bluez/patches/200-uart-speed.patch deleted file mode 100644 index ebe0153..0000000 --- a/utils/bluez/patches/200-uart-speed.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/tools/hciattach.c -+++ b/tools/hciattach.c -@@ -101,20 +101,37 @@ int uart_speed(int s) - return B230400; - case 460800: - return B460800; -+/* FIX: Not all platform support this high serial speed -+ claudyus84 @gamil.com -+*/ -+#ifdef B500000 - case 500000: - return B500000; -+#endif -+#ifdef B576000 - case 576000: - return B576000; -+#endif -+#ifdef B921600 - case 921600: - return B921600; -+#endif -+#ifdef B1000000 - case 1000000: - return B1000000; -+#endif -+#ifdef B1152000 - case 1152000: - return B1152000; -+#endif -+#ifdef B1500000 - case 1500000: - return B1500000; -+#endif -+#ifdef B2000000 - case 2000000: - return B2000000; -+#endif - #ifdef B2500000 - case 2500000: - return B2500000; diff --git a/utils/bluez/patches/201-readline.patch b/utils/bluez/patches/201-readline.patch deleted file mode 100644 index 45e1553..0000000 --- a/utils/bluez/patches/201-readline.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -2441,7 +2441,7 @@ unit_tests = $(am__append_35) unit/test- - @CLIENT_TRUE@ monitor/uuid.h monitor/uuid.c - - @CLIENT_TRUE@client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@ \ --@CLIENT_TRUE@ -lreadline -+@CLIENT_TRUE@ -lreadline -lncurses - - @MONITOR_TRUE@monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \ - @MONITOR_TRUE@ monitor/display.h monitor/display.c \ -@@ -2691,13 +2691,13 @@ unit_tests = $(am__append_35) unit/test- - @READLINE_TRUE@ client/display.h - - @READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \ --@READLINE_TRUE@ src/libshared-glib.la @GLIB_LIBS@ -lreadline -+@READLINE_TRUE@ src/libshared-glib.la @GLIB_LIBS@ -lreadline -lncurses - - @READLINE_TRUE@tools_obex_client_tool_SOURCES = $(gobex_sources) $(btio_sources) \ - @READLINE_TRUE@ tools/obex-client-tool.c - - @READLINE_TRUE@tools_obex_client_tool_LDADD = lib/libbluetooth-internal.la \ --@READLINE_TRUE@ @GLIB_LIBS@ -lreadline -+@READLINE_TRUE@ @GLIB_LIBS@ -lreadline -lncurses - - @READLINE_TRUE@tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \ - @READLINE_TRUE@ tools/obex-server-tool.c -@@ -2707,17 +2707,17 @@ unit_tests = $(am__append_35) unit/test- - @READLINE_TRUE@ client/display.h client/display.c - - @READLINE_TRUE@tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \ --@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline -+@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline -lncurses - - @READLINE_TRUE@tools_obexctl_SOURCES = tools/obexctl.c \ - @READLINE_TRUE@ client/display.h client/display.c - - @READLINE_TRUE@tools_obexctl_LDADD = gdbus/libgdbus-internal.la \ --@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline -+@READLINE_TRUE@ @GLIB_LIBS@ @DBUS_LIBS@ -lreadline -lncurses - - @READLINE_TRUE@tools_btmgmt_SOURCES = tools/btmgmt.c src/uuid-helper.c client/display.c - @READLINE_TRUE@tools_btmgmt_LDADD = lib/libbluetooth-internal.la src/libshared-mainloop.la \ --@READLINE_TRUE@ -lreadline -+@READLINE_TRUE@ -lreadline -lncurses - - @EXPERIMENTAL_TRUE@tools_gatt_service_SOURCES = tools/gatt-service.c - @EXPERIMENTAL_TRUE@tools_gatt_service_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ gdbus/libgdbus-internal.la diff --git a/utils/bonnie++/Makefile b/utils/bonnie++/Makefile deleted file mode 100644 index 0008cc2..0000000 --- a/utils/bonnie++/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2009-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bonnie++ -PKG_VERSION:=1.97 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://www.coker.com.au/bonnie++/experimental/ -PKG_MD5SUM:=d6cf9703242998b2ddc2d875b028b3c6 -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=copyright.txt -PKG_MAINTAINER:=Florian Fainelli - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION).1 - -include $(INCLUDE_DIR)/package.mk - -define Package/bonniexx - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libstdcpp +libpthread - TITLE:=Bonnie++ - hard drive bottleneck testing program. - URL:=http://www.coker.com.au/bonnie++/ -endef - -define Package/bonniexx/description - Bonnie++ is a benchmark suite that is aimed at performing a number of simple - tests of hard drive and file system performance. -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - TARGET_CXX="$(TARGET_CXX)" \ - TARGET_LINK="$(TARGET_CXX)" \ - MORECFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CXXFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all -endef - -define Package/bonniexx/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_BUILD_DIR)/bonnie++ $(1)/usr/bin/ - $(CP) $(PKG_BUILD_DIR)/bon_csv2html $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,bonniexx)) diff --git a/utils/bonnie++/patches/001-cross_compile_fix.patch b/utils/bonnie++/patches/001-cross_compile_fix.patch deleted file mode 100644 index 0379fec..0000000 --- a/utils/bonnie++/patches/001-cross_compile_fix.patch +++ /dev/null @@ -1,38 +0,0 @@ -Index: bonnie++-1.97.1/configure -=================================================================== ---- bonnie++-1.97.1.orig/configure -+++ bonnie++-1.97.1/configure -@@ -3955,9 +3955,7 @@ rm -f core conftest.err conftest.$ac_obj - - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "cannot run test program while cross compiling --See \`config.log' for more details" "$LINENO" 5 ; } -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} } - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ -Index: bonnie++-1.97.1/Makefile -=================================================================== ---- bonnie++-1.97.1.orig/Makefile -+++ bonnie++-1.97.1/Makefile -@@ -1,5 +1,7 @@ - EXES=bonnie++ zcav getc_putc getc_putc_helper - EXE=bon_csv2html generate_randfile -+TARGET_CXX=g++ -+TARGET_LINK=g++ - - all: $(EXE) $(EXES) - -@@ -10,8 +12,8 @@ eprefix=${prefix} - #MORE_WARNINGS=-Weffc++ - WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic -ffor-scope -Wcast-align -Wsign-compare -Wpointer-arith -Wwrite-strings -Wformat-security -Wswitch-enum -Winit-self $(MORE_WARNINGS) - CFLAGS=-O2 -DNDEBUG $(WFLAGS) $(MORECFLAGS) --CXX=g++ $(CFLAGS) --LINK=g++ -+CXX=$(TARGET_CXX) $(CFLAGS) -+LINK=$(TARGET_LINK) - THREAD_LFLAGS=-lpthread - - INSTALL=/usr/bin/install -c diff --git a/utils/bonnie++/patches/002-add-verbose-error-messages.patch b/utils/bonnie++/patches/002-add-verbose-error-messages.patch deleted file mode 100644 index ccec8e8..0000000 --- a/utils/bonnie++/patches/002-add-verbose-error-messages.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/bon_file.cpp -+++ b/bon_file.cpp -@@ -464,25 +464,37 @@ int COpenTest::delete_sequential(BonTime - } - if(m_number_directories != 1) - { -- if(chdir("..") || rmdir(buf)) -+ if(chdir("..")) - { -+ io_error("chdir"); -+ return -1; -+ } -+ if(rmdir(buf)) -+ { -+ fprintf(stderr, "Unable to delete directory '%s'\n", buf); - io_error("rmdir"); - return -1; - } - } - } -- if(chdir("..") || rmdir(m_dirname)) -+ if(count != m_number) - { -- io_error("rmdir"); -+ fprintf(stderr, "Expected %d files but only got %d\n", m_number, count); - return -1; - } -- delete m_dirname; -- m_dirname = NULL; -- if(count != m_number) -+ if(chdir("..")) - { -- fprintf(stderr, "Expected %d files but only got %d\n", m_number, count); -+ io_error("chdir"); -+ return -1; -+ } -+ if(rmdir(m_dirname)) -+ { -+ fprintf(stderr, "Unable to delete directory '%s'\n", m_dirname); -+ io_error("rmdir"); - return -1; - } -+ delete m_dirname; -+ m_dirname = NULL; - sync(); - timer.stop_and_record(DelSeq); - timer.add_latency(DelSeq, dur.getMax()); diff --git a/utils/btrfs-progs/Makefile b/utils/btrfs-progs/Makefile deleted file mode 100644 index 70c4a06..0000000 --- a/utils/btrfs-progs/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2009-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=btrfs-progs -PKG_VERSION:=4.7.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs/ -PKG_MD5SUM:=f49bc9e143ffe60260c5bd70ef3b624576673f8b50f41e309892a425f7fbe60f -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION) - -PKG_MAINTAINER:=Daniel Golle -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_DEPENDS:=libacl - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/btrfs-progs - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Filesystem - DEPENDS:=+libattr +libuuid +zlib +libblkid +liblzo +libpthread - TITLE:=Btrfs filesystems utilities - URL:=http://btrfs.wiki.kernel.org/ -endef - -define Package/btrfs-progs/description - Btrfs is a new copy on write filesystem for Linux aimed at implementing - advanced features while focusing on fault tolerance, repair and easy - administration. Initially developed by Oracle, Btrfs is licensed under the - GPL and open for contribution from anyone. -endef - -progs = btrfs btrfs-debug-tree btrfs-find-root btrfs-image btrfs-map-logical \ - btrfs-show-super btrfstune btrfs-zero-log fsck.btrfs mkfs.btrfs - -CONFIGURE_ARGS += \ - --disable-backtrace \ - --disable-convert \ - --disable-documentation - -define Package/btrfs-progs/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libbtrfs.so* $(1)/usr/lib - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(addprefix $(PKG_INSTALL_DIR)/usr/bin/, $(progs)) $(1)/usr/bin/ - $(LN) btrfs $(1)/usr/bin/btrfsck - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/btrfs-scan.init $(1)/etc/init.d/btrfs-scan -endef - -$(eval $(call BuildPackage,btrfs-progs)) diff --git a/utils/btrfs-progs/files/btrfs-scan.init b/utils/btrfs-progs/files/btrfs-scan.init deleted file mode 100644 index 762e0b8..0000000 --- a/utils/btrfs-progs/files/btrfs-scan.init +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org - -START=19 - -start() { - grep -q btrfs /proc/filesystems && /usr/bin/btrfs device scan -} - diff --git a/utils/btrfs-progs/patches/0001-use-pthread_join-instead-of-pthread_tryjoin_np.patch b/utils/btrfs-progs/patches/0001-use-pthread_join-instead-of-pthread_tryjoin_np.patch deleted file mode 100644 index 90b56b4..0000000 --- a/utils/btrfs-progs/patches/0001-use-pthread_join-instead-of-pthread_tryjoin_np.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/chunk-recover.c -+++ b/chunk-recover.c -@@ -887,7 +887,7 @@ static int scan_devices(struct recover_c - for (i = 0; i < devidx; i++) { - if (dev_scans[i].bytenr == -1) - continue; -- ret = pthread_tryjoin_np(t_scans[i], -+ ret = pthread_join(t_scans[i], - (void **)&t_rets[i]); - if (ret == EBUSY) { - all_done = 0; diff --git a/utils/canutils/Makefile b/utils/canutils/Makefile deleted file mode 100644 index 58ae762..0000000 --- a/utils/canutils/Makefile +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=canutils -PKG_RELEASE=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/linux-can/can-utils -PKG_SOURCE_VERSION:=0e3ff3b3157e456d4b6343f5d4b42ef692bce538 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) - -PKG_MAINTAINER:=Anton Glukhov -PKG_LICENSE:=GPL-2.0+ - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -FILES:=canbusload can-calc-bit-timing candump \ - cangen cangw canplayer cansniffer cansend - -define Package/canutils/Default - SECTION:=utils - CATEGORY:=Utilities - URL:=https://github.com/linux-can/can-utils - TITLE:=CAN userspace utilities and tools -endef - -define Package/canutils - $(call Package/canutils/Default) - MENU:=1 -endef - -define Package/canutils-log-conversion - $(call Package/canutils/Default) - TITLE:=canutils log conversion - DEPENDS:=canutils -endef - -define PartGen -define Package/canutils-$(1) - $(call Package/canutils/Default) - TITLE:=$(1) tool from canutils - DEPENDS:=canutils -endef -endef - -$(foreach file,$(FILES),$(eval $(call PartGen,$(file)))) - -define Package/canutils/install -endef - -define Package/canutils-log-conversion/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/asc2log $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/log2asc $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/log2long $(1)/usr/bin/ -endef - -define PartInstall -define Package/canutils-$(1)/install - $(INSTALL_DIR) $$(1)/usr/bin - $(INSTALL_BIN) \ - $(PKG_BUILD_DIR)/$(1) \ - $$(1)/usr/bin/ -endef -endef - -define Package/canutils-log-conversion/description -asc2log - convert ASC logfile to compact CAN frame logfile. -log2asc - convert compact CAN frame logfile to ASC logfile. -log2long - convert compact CAN frame representation into user readable. -endef - -define Package/canutils-canbusload/description -canbusload - display the load percentage of can buses. -endef - -define Package/canutils-can-calc-bit-timing/description -can-calc-bit-timing - calculate hw bittiming for supported can chips. -endef - -define Package/canutils-candump/description -candump - dumps can frames to terminal, logfile or another can device, -with optional filtering. -endef - -define Package/canutils-cangen/description -cangen - CAN frames generator for testing purposes. -endef - -define Package/canutils-cangw/description -cangw - manage PF_CAN netlink gateway. -endef - -define Package/canutils-canplayer/description -canplayer - replay a compact CAN frame logfile to CAN devices. -endef - -define Package/canutils-cansend/description -cansend - simple command line tool to send CAN-frames via CAN_RAW sockets. -endef - -$(foreach file,$(FILES),$(eval $(call PartInstall,$(file)))) - -$(eval $(call BuildPackage,canutils)) -$(eval $(call BuildPackage,canutils-log-conversion)) -$(foreach file,$(FILES),$(eval $(call BuildPackage,canutils-$(file)))) diff --git a/utils/ccid/Makefile b/utils/ccid/Makefile deleted file mode 100644 index 8b3b09d..0000000 --- a/utils/ccid/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2009-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ccid -PKG_VERSION:=1.4.26 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4205 -PKG_MD5SUM:=3267bf708ab780c02f01f6241b7c7277cb892d30fd1179a9926a8cc0ca40be2f -PKG_MAINTAINER:=Daniel Golle -PKG_LICENSE:=LGPL-2.1+ -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=libtool -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/ccid - SECTION:=libs - CATEGORY:=Libraries - DEPENDS:=+libusb-1.0 +libpcsclite - TITLE:=Generic USB CCID smart card reader driver - URL:=http://pcsclite.alioth.debian.org/ccid.html -endef - -define Package/ccid/description - Generic USB CCID (Chip/Smart Card Interface Devices) driver and ICCD - (Integrated Circuit(s) Card Devices). -endef - -TARGET_CFLAGS += $(FPIC) - -TARGET_LDFLAGS += "-lpthread" - -CONFIGURE_ARGS += \ - --enable-embedded \ - --enable-usbdropdir=/usr/lib/pcsc/drivers - -define Package/ccid/install - $(INSTALL_DIR) $(1)/usr/lib/pcsc - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pcsc/drivers $(1)/usr/lib/pcsc/ -endef - -$(eval $(call BuildPackage,ccid)) diff --git a/utils/ccrypt/Makefile b/utils/ccrypt/Makefile deleted file mode 100644 index 15c0cc2..0000000 --- a/utils/ccrypt/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2009-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ccrypt -PKG_VERSION:=1.10 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/ccrypt -PKG_MD5SUM:=87d66da2170facabf6f2fc073586ae2c7320d4689980cfca415c74688e499ba0 -PKG_MAINTAINER:=Hannu Nyman -PKG_LICENSE:=GPLv2+ - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/ccrypt - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Encryption - TITLE:=ccrypt is a utility for encrypting and decrypting files and streams - URL:=http://ccrypt.sourceforge.net/ -endef - -CONFIGURE_ARGS += --disable-emacs - -define Package/ccrypt/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ccrypt $(1)/usr/bin/ - ln -s ccrypt $(1)/usr/bin/ccencrypt - ln -s ccrypt $(1)/usr/bin/ccdecrypt - ln -s ccrypt $(1)/usr/bin/ccat -endef - -$(eval $(call BuildPackage,ccrypt)) diff --git a/utils/ccrypt/patches/001-no-intl.patch b/utils/ccrypt/patches/001-no-intl.patch deleted file mode 100644 index 4ac9abb..0000000 --- a/utils/ccrypt/patches/001-no-intl.patch +++ /dev/null @@ -1,89 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -123,17 +123,6 @@ AC_MSG_RESULT($UINT32_TYPE) - AC_DEFINE_UNQUOTED(UINT32_TYPE,$UINT32_TYPE,unsigned 32 bit integer type) - - dnl ---------------------------------------------------------------------- --dnl Internationalization -- --GETTEXT_PACKAGE=ccrypt --AC_SUBST(GETTEXT_PACKAGE) --AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext]) -- --AM_GNU_GETTEXT --AM_GNU_GETTEXT_VERSION([0.14.3]) --IT_PO_SUBDIR(po) -- --dnl ---------------------------------------------------------------------- - dnl Libtool (needed by intl/) - - LT_INIT -@@ -153,9 +142,7 @@ AC_SUBST(TAR) - dnl ---------------------------------------------------------------------- - AC_CONFIG_FILES([doc/ccrypt.1 - doc/ccguess.1 -- po/Makefile.in - m4/Makefile -- intl/Makefile - Makefile - src/Makefile - emacs/Makefile ---- a/Makefile.am -+++ b/Makefile.am -@@ -4,7 +4,7 @@ - - ## Process this file with automake to produce Makefile.in - --SUBDIRS = m4 po intl src emacs doc check -+SUBDIRS = m4 src emacs doc check - - EXTRA_DIST = m4/ChangeLog config.rpath README-WIN - ---- a/Makefile.in -+++ b/Makefile.in -@@ -36,7 +36,7 @@ host_triplet = @host@ - subdir = . - DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ -- $(top_srcdir)/configure $(top_srcdir)/intl/Makefile.in \ -+ $(top_srcdir)/configure \ - ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS config.guess \ - config.rpath config.sub depcomp elisp-comp install-sh \ - ltmain.sh missing mkinstalldirs -@@ -66,7 +66,7 @@ am__CONFIG_DISTCLEAN_FILES = config.stat - configure.lineno config.status.lineno - mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs - CONFIG_HEADER = config.h --CONFIG_CLEAN_FILES = intl/Makefile -+CONFIG_CLEAN_FILES = - CONFIG_CLEAN_VPATH_FILES = - SOURCES = - DIST_SOURCES = -@@ -277,7 +277,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = m4 po intl src emacs doc check -+SUBDIRS = m4 src emacs doc check - EXTRA_DIST = m4/ChangeLog config.rpath README-WIN - ACLOCAL_AMFLAGS = -I m4 - all: config.h ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -56,4 +56,4 @@ uninstall-local: - # internationalization stuff - localedir = $(datadir)/locale - INCLUDES = -I../intl -I$(top_srcdir)/intl -DLOCALEDIR=\"$(localedir)\" --LIBS = @LIBINTL@ @LIBS@ -+LIBS = @LIBS@ ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -159,7 +159,7 @@ LDFLAGS = @LDFLAGS@ - LIBICONV = @LIBICONV@ - LIBINTL = @LIBINTL@ - LIBOBJS = @LIBOBJS@ --LIBS = @LIBINTL@ @LIBS@ -+LIBS = @LIBS@ - LIBTOOL = @LIBTOOL@ - LIPO = @LIPO@ - LN_S = @LN_S@ diff --git a/utils/cmdpad/Makefile b/utils/cmdpad/Makefile deleted file mode 100644 index c092fc9..0000000 --- a/utils/cmdpad/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (C) 2007-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=cmdpad -PKG_VERSION:=0.0.3 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=@SF/cmdpad -PKG_MD5SUM:=6633b2354b7f23f9cd8e2bfb6e735965 - -PKG_MAINTAINER:=Ted Hess -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=doc/COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/cmdpad - SECTION:=utils - CATEGORY:=Utilities - TITLE:=execute commands when a key is pressed, released or hold down - URL:=http://cmdpad.sourceforge.net/index.php -endef - -CONFIGURE_ARGS += \ - --enable-static \ - --enable-shared - -define Package/cmdpad/description - cmdpad - execute commands when a key is pressed, released or hold down. - Should be started from /etc/rc or /etc/rc.local. To run it as daemon you - need to start it with '&'. All logs are printed to standard out and standard - error (to write the log to disk use cmdpad > /var/log/cmdpad). Cmdpad - searches for /etc/cmdpad.conf and load the key bindings. Then wait for - key event and check each command to see if it should be run. -endef - -MAKE_FLAGS += \ - $(TARGET_CONFIGURE_OPTS) \ - $(1) - -define Package/cmdpad/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/cmdpad $(1)/usr/sbin/ - $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/cmdpad.conf $(1)/etc/ - $(INSTALL_BIN) ./files/cmdpad.init $(1)/etc/init.d/cmdpad -endef - -define Package/cmdpad/conffiles -/etc/cmdpad.conf -endef - -$(eval $(call BuildPackage,cmdpad)) diff --git a/utils/cmdpad/files/cmdpad.init b/utils/cmdpad/files/cmdpad.init deleted file mode 100644 index f612033..0000000 --- a/utils/cmdpad/files/cmdpad.init +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2007-2011 OpenWrt.org - -START=93 - -SSD_DAEMONIZE=1 - -start() { - service_start /usr/sbin/cmdpad --quiet -} - -stop() { - service_stop /usr/sbin/cmdpad -} diff --git a/utils/cmdpad/patches/100-Makefile.patch b/utils/cmdpad/patches/100-Makefile.patch deleted file mode 100644 index 61a6c8f..0000000 --- a/utils/cmdpad/patches/100-Makefile.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- cmdpad-0.0.3/src/Makefile.orig 2008-01-05 23:29:44.000000000 +0100 -+++ cmdpad-0.0.3/src/Makefile 2008-01-05 23:30:23.000000000 +0100 -@@ -5,25 +5,25 @@ - TOP=.. - include $(TOP)/Makefile.common - --INCLUDE= -I/usr/include --LIBS= -L/usr/lib -lc --CFLAGS= -g3 --LDFLAGS= -Xlinker -Map -Xlinker $(PROG).map #,--stack,16Mb -+#INCLUDE= -I/usr/include -+#LIBS= -L/usr/lib -lc -+#CFLAGS= -g3 -+#LDFLAGS= -Xlinker -Map -Xlinker $(PROG).map #,--stack,16Mb - OBJ= main.o command.o parse.o - SCRIPTS= *.sh - - build: $(PROG) - - $(PROG): $(OBJ) -- gcc -o $(PROG) $(OBJ) $(LIBS) $(LDFLAGS) -+ $(GCC) -o $(PROG) $(OBJ) $(LIBS) $(LDFLAGS) - @echo "===============================================" - @echo "edit $(PROG).conf file to set default preferences" - - %.o : %.c -- gcc $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $< -+ $(GCC) $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $< - - %.o : %.c %.h -- gcc $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $< -+ $(GCC) $(CFLAGS) -D__COPYLEFT__='$(COPYLEFT)' -c $< - - distclean clean: - rm $(PROG) *~ *.o -vf diff --git a/utils/cmdpad/patches/120-kernel26-compat.patch b/utils/cmdpad/patches/120-kernel26-compat.patch deleted file mode 100644 index eb7beeb..0000000 --- a/utils/cmdpad/patches/120-kernel26-compat.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- cmdpad-0.0.3/src/parse.orig 2008-01-05 23:55:32.000000000 +0100 -+++ cmdpad-0.0.3/src/parse.c 2008-01-05 23:56:07.000000000 +0100 -@@ -289,6 +289,12 @@ - pchEventDevice = strdup( pchValue) ; - return 1 ; - } -+ if( (pchValue != NULL) && -+ (strncmp( pchValue, "/dev/event", 6) == 0) ) -+ { -+ pchEventDevice = strdup( pchValue) ; -+ return 1 ; -+ } - printf( "Option 'device' expects a /dev/input/eventX argument\n"); - return -1 ; - } diff --git a/utils/cmdpad/patches/130-no_zombie.patch b/utils/cmdpad/patches/130-no_zombie.patch deleted file mode 100644 index aa4fc6a..0000000 --- a/utils/cmdpad/patches/130-no_zombie.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- cmdpad-0.0.3/src/command.c.orig 2003-03-29 17:54:12.000000000 +0100 -+++ cmdpad-0.0.3/src/command.c 2008-01-12 05:41:22.000000000 +0100 -@@ -68,6 +68,7 @@ - - void exec( char * command) - { -+ int status; - if( fork() == 0) { - char ** tmp ; - int i ; -@@ -88,6 +89,7 @@ - perror( "ERROR: execv") ; - exit( 1) ; - } // end if( fork()) -+ wait(&status); - } - - int getNumberofEntry() diff --git a/utils/cmdpad/patches/140-compile_fix.patch b/utils/cmdpad/patches/140-compile_fix.patch deleted file mode 100644 index c7a9bb3..0000000 --- a/utils/cmdpad/patches/140-compile_fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/parse.c -+++ b/src/parse.c -@@ -125,7 +125,7 @@ int readCommandLine( int argc, char *arg - - d2printf( "command line command %s found\n", pchCommandTranslations[ iCmd+1]) ; - -- vsnprintf( achCommand, sizeof( achCommand), -+ snprintf( achCommand, sizeof( achCommand), - pchCommandTranslations[ iCmd+1], - &argv[ i+1]) ; - diff --git a/utils/collectd/Makefile b/utils/collectd/Makefile deleted file mode 100644 index 27491c6..0000000 --- a/utils/collectd/Makefile +++ /dev/null @@ -1,367 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=collectd -PKG_VERSION:=5.5.3 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://collectd.org/files/ -PKG_MD5SUM:=6f10633d0f73f99ef61472a8e377d4a058de161e80f3353b4b17d394c68f2f44 - -PKG_FIXUP:=autoreconf -PKG_REMOVE_FILES:=aclocal.m4 libltdl/aclocal.m4 -PKG_MAINTAINER:=Jo-Philipp Wich , Hannu Nyman - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 - -COLLECTD_PLUGINS_DISABLED:= \ - amqp \ - apple_sensors \ - aquaero \ - barometer \ - battery \ - ceph \ - cgroups \ - curl_json \ - curl_xml \ - dbi \ - drbd \ - ethstat \ - fhcount \ - genericjmx \ - gmond \ - hddtemp \ - ipc \ - ipmi \ - ipvs \ - java \ - log_logstash \ - lvm \ - lpar \ - mbmon \ - md \ - memcachec \ - memcached \ - mic \ - monitorus \ - multimeter \ - netapp \ - nfs \ - notify_desktop \ - notify_email \ - numa \ - openldap \ - openvz \ - oracle \ - perl \ - pf \ - pinba \ - python \ - redis \ - routeros \ - rrdcached \ - serial \ - sigrok \ - smart \ - statsd \ - swap \ - tape \ - tokyotyrant \ - turbostat \ - uuid \ - varnish \ - virt \ - vserver \ - write_kafka \ - write_log \ - write_mongodb \ - write_redis \ - write_riemann \ - write_sensu \ - write_tsdb \ - xmms \ - zfs_arc \ - zookeeper - -COLLECTD_PLUGINS_SELECTED:= \ - apache \ - apcups \ - ascent \ - bind \ - conntrack \ - contextswitch \ - cpu \ - cpufreq \ - csv \ - curl \ - df \ - disk \ - dns \ - email \ - entropy \ - exec \ - filecount \ - fscache \ - interface \ - iptables \ - irq \ - iwinfo \ - load \ - logfile \ - madwifi \ - memory \ - modbus \ - mysql \ - netlink \ - network \ - nginx \ - ntpd \ - nut \ - olsrd \ - onewire \ - openvpn \ - ping \ - postgresql \ - powerdns \ - processes \ - protocols \ - rrdtool \ - sensors \ - snmp \ - syslog \ - table \ - tail \ - tail_csv \ - tcpconns \ - teamspeak2 \ - ted \ - thermal \ - unixsock \ - uptime \ - users \ - vmem \ - wireless \ - write_graphite \ - write_http \ - -PKG_CONFIG_DEPENDS:= \ - $(patsubst %,CONFIG_PACKAGE_collectd-mod-%,$(subst _,-,$(COLLECTD_PLUGINS_SELECTED))) \ - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/kernel.mk - -define Package/collectd/Default - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Lightweight system statistics collection daemon - URL:=http://verplant.org/collectd/ -endef - -define Package/collectd -$(call Package/collectd/Default) - DEPENDS:= +libpthread +zlib +libltdl +libip4tc - MENU:=1 -endef - -define Package/collectd/description - collectd is a small daemon which collects system information periodically - and provides mechanismns to store the values in a variety of ways. -endef - -define Package/collectd/config - config PACKAGE_COLLECTD_ENCRYPTED_NETWORK - bool "Enable ability to use encrypted networking" - default n - depends on PACKAGE_collectd - select PACKAGE_collectd-mod-network -endef - -ifneq ($(CONFIG_avr32),) - TARGET_CFLAGS += -fsigned-char -endif - -# common configure args -CONFIGURE_ARGS+= \ - --disable-debug \ - --enable-daemon \ - --with-nan-emulation \ - --without-perl-bindings \ - --without-libudev - -ifneq ($(CONFIG_PACKAGE_COLLECTD_ENCRYPTED_NETWORK),) -CONFIGURE_ARGS+= \ - --with-libgcrypt=$(STAGING_DIR)/usr/include -else -CONFIGURE_ARGS+= \ - --without-libgcrypt -endif - -CONFIGURE_VARS+= \ - CFLAGS="$$$$CFLAGS $(FPIC)" \ - LDFLAGS="$$$$LDFLAGS -lm -lz" \ - KERNEL_DIR="$(LINUX_DIR)" \ - -CONFIGURE_PLUGIN= \ - $(foreach m, $(1), \ - $(if $(CONFIG_PACKAGE_collectd-mod-$(subst _,-,$(m))),--enable-$(m),--disable-$(m)) \ - ) - -CONFIGURE_ARGS+= \ - $(call CONFIGURE_PLUGIN,$(COLLECTD_PLUGINS_SELECTED)) \ - $(call CONFIGURE_PLUGIN,$(COLLECTD_PLUGINS_DISABLED)) \ - -# exception: mod-ascent needs libxml2 -ifneq ($(CONFIG_PACKAGE_collectd-mod-ascent),) - CONFIGURE_VARS+= \ - CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/libxml2" -endif - -ifneq ($(CONFIG_BIG_ENDIAN),) - CONFIGURE_ARGS+= --with-fp-layout=endianflip -else - CONFIGURE_ARGS+= --with-fp-layout=nothing -endif - -ifneq ($(CONFIG_PACKAGE_collectd-mod-postgresql),) - CONFIGURE_ARGS+= --with-libpq="$(STAGING_DIR)/usr/" -endif - -ifneq ($(CONFIG_PACKAGE_collectd-mod-mysql),) - CONFIGURE_ARGS+= --with-libmysql="$(STAGING_DIR)/usr/" -endif - -# exception: mod-netlink needs libnetlink from iproute -ifneq ($(CONFIG_PACKAGE_collectd-mod-netlink),) - CONFIGURE_ARGS+= --with-libnetlink="$(STAGING_DIR)/usr" -endif - -# exception: mod-modbus needs libmodbus -ifneq ($(CONFIG_PACKAGE_collectd-mod-modbus),) - CONFIGURE_ARGS+= --with-libmodbus="$(STAGING_DIR)/usr" -endif - -# exception: mod-onewire needs libow-capi -ifneq ($(CONFIG_PACKAGE_collectd-mod-onewire),) - CONFIGURE_ARGS+= --with-libowcapi="$(STAGING_DIR)/usr" -endif - -# exception: mod-rrdtool needs rrdtool-1.0.x -ifneq ($(CONFIG_PACKAGE_collectd-mod-rrdtool),) - CONFIGURE_ARGS+= --with-librrd="$(STAGING_DIR)/usr/lib/rrdtool-1.0" -endif - -define Package/collectd/conffiles -/etc/collectd.conf -endef - -define Package/collectd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/collectd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/usr/share/collectd - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/collectd/types.db $(1)/usr/share/collectd/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) ./files/collectd.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/collectd.init $(1)/etc/init.d/collectd - $(INSTALL_DIR) $(1)/etc/collectd/conf.d -endef - -# 1: plugin name -# 2: plugin title/description -# 3: files -# 4: extra dependency -define BuildPlugin - - PKG_CONFIG_DEPENDS+= CONFIG_PACKAGE_collectd-mod-$(1) - - define Package/collectd-mod-$(1) - $$(call Package/collectd/Default) - TITLE:=$(2) plugin - DEPENDS:= collectd $(4) - endef - - define Package/collectd-mod-$(1)/install - $(INSTALL_DIR) $$(1)/usr/lib/collectd - for m in $(3); do \ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/collectd/$$$$$$$${m}.so \ - $$(1)/usr/lib/collectd/ ; \ - done - endef - - $$(eval $$(call BuildPackage,collectd-mod-$(1))) - -endef - -$(eval $(call BuildPackage,collectd)) - -#$(eval $(call BuildPlugin,NAME,DESCRIPTION,FILES,DEPENDENCIES)) -$(eval $(call BuildPlugin,apache,apache status input,apache,+PACKAGE_collectd-mod-apache:libcurl)) -$(eval $(call BuildPlugin,apcups,apcups status input,apcups,)) -$(eval $(call BuildPlugin,ascent,ascent status input,ascent,+PACKAGE_collectd-mod-ascent:libcurl +PACKAGE_collectd-mod-ascent:libxml2)) -$(eval $(call BuildPlugin,bind,BIND server/zone input,bind,+PACKAGE_collectd-mod-bind:libcurl +PACKAGE_collectd-mod-bind:libxml2)) -$(eval $(call BuildPlugin,conntrack,connection tracking table size input,conntrack,)) -$(eval $(call BuildPlugin,contextswitch,context switch input,contextswitch,)) -$(eval $(call BuildPlugin,cpu,CPU input,cpu,)) -$(eval $(call BuildPlugin,cpufreq,CPU Freq input,cpufreq,@(TARGET_x86||TARGET_x86_64||TARGET_mvebu||TARGET_ipq806x||TARGET_armvirt))) # Only enable on x86 mvebu ipq806x armvirt -$(eval $(call BuildPlugin,csv,CSV output,csv,)) -$(eval $(call BuildPlugin,curl,cURL input,curl,+PACKAGE_collectd-mod-curl:libcurl)) -#$(eval $(call BuildPlugin,dbi,relational database input,dbi,+PACKAGE_collectd-mod-dbi:libdbi)) -$(eval $(call BuildPlugin,df,disk space input,df,)) -$(eval $(call BuildPlugin,disk,disk usage/timing input,disk,)) -$(eval $(call BuildPlugin,dns,DNS traffic input,dns,+PACKAGE_collectd-mod-dns:libpcap)) -$(eval $(call BuildPlugin,email,email output,email,)) -$(eval $(call BuildPlugin,entropy,Entropy amount input,entropy,)) -$(eval $(call BuildPlugin,exec,process exec input,exec,)) -$(eval $(call BuildPlugin,filecount,file count input,filecount,)) -$(eval $(call BuildPlugin,fscache,file-system based caching framework input,fscache,)) -$(eval $(call BuildPlugin,interface,network interfaces input,interface,)) -$(eval $(call BuildPlugin,iptables,iptables status input,iptables,+PACKAGE_collectd-mod-iptables:iptables +libiptc)) -$(eval $(call BuildPlugin,irq,interrupt usage input,irq,)) -$(eval $(call BuildPlugin,iwinfo,libiwinfo wireless statistics,iwinfo,+PACKAGE_collectd-mod-iwinfo:libiwinfo)) -$(eval $(call BuildPlugin,load,system load input,load,)) -$(eval $(call BuildPlugin,logfile,log files output,logfile,)) -$(eval $(call BuildPlugin,madwifi,MadWifi status input,madwifi,)) -#$(eval $(call BuildPlugin,mysql,MySQL status input,mysql,+PACKAGE_collectd-mod-mysql:libmysqlclient-r)) -$(eval $(call BuildPlugin,memory,physical memory usage input,memory,)) -$(eval $(call BuildPlugin,modbus,read variables through libmodbus,modbus,+PACKAGE_collectd-mod-modbus:libmodbus)) -$(eval $(call BuildPlugin,netlink,netlink input,netlink,+PACKAGE_collectd-mod-netlink:libmnl)) -$(eval $(call BuildPlugin,network,network input/output,network,+PACKAGE_COLLECTD_ENCRYPTED_NETWORK:libgcrypt)) -$(eval $(call BuildPlugin,nginx,nginx status input,nginx,+PACKAGE_collectd-mod-nginx:libcurl)) -$(eval $(call BuildPlugin,ntpd,NTP daemon status input,ntpd,)) -$(eval $(call BuildPlugin,nut,UPS monitoring input,nut,+PACKAGE_collectd-mod-nut:nut)) -$(eval $(call BuildPlugin,olsrd,OLSRd status input,olsrd,)) -$(eval $(call BuildPlugin,onewire,onewire sensor input,onewire,+PACKAGE_collectd-mod-onewire:libow-capi @BROKEN)) -$(eval $(call BuildPlugin,openvpn,OpenVPN traffic/compression input,openvpn,)) -$(eval $(call BuildPlugin,ping,ping status input,ping,+PACKAGE_collectd-mod-ping:liboping)) -$(eval $(call BuildPlugin,postgresql,PostgreSQL status input,postgresql,+PACKAGE_collectd-mod-postgresql:libpq)) -$(eval $(call BuildPlugin,powerdns,PowerDNS server status input,powerdns,)) -$(eval $(call BuildPlugin,processes,process status input,processes,)) -$(eval $(call BuildPlugin,protocols,network protocols input,protocols,)) -$(eval $(call BuildPlugin,rrdtool,RRDtool output,rrdtool,+PACKAGE_collectd-mod-rrdtool:librrd1)) -$(eval $(call BuildPlugin,sensors,lm_sensors input,sensors,+PACKAGE_collectd-mod-sensors:libsensors)) -$(eval $(call BuildPlugin,snmp,SNMP input,snmp,+PACKAGE_collectd-mod-snmp:libnetsnmp)) -$(eval $(call BuildPlugin,syslog,syslog output,syslog,)) -$(eval $(call BuildPlugin,tail,tail input,tail,)) -$(eval $(call BuildPlugin,tail-csv,tail CSV input,tail_csv,)) -$(eval $(call BuildPlugin,table,table-like structured file input,table,)) -$(eval $(call BuildPlugin,teamspeak2,TeamSpeak2 input,teamspeak2,)) -$(eval $(call BuildPlugin,ted,The Energy Detective input,ted,@((!TARGET_avr32)||BROKEN))) # fails on avr32 because of warnings treated as errors -$(eval $(call BuildPlugin,tcpconns,TCP connection tracking input,tcpconns,)) -$(eval $(call BuildPlugin,thermal,system temperatures input,thermal,)) -$(eval $(call BuildPlugin,unixsock,unix socket output,unixsock,)) -$(eval $(call BuildPlugin,uptime,uptime status input,uptime,)) -$(eval $(call BuildPlugin,users,user logged in status input,users,)) -$(eval $(call BuildPlugin,vmem,virtual memory usage input,vmem,)) -$(eval $(call BuildPlugin,wireless,wireless status input,wireless,)) -$(eval $(call BuildPlugin,write-graphite,Carbon/Graphite output,write_graphite,+PACKAGE_collectd-mod-write-graphite:libpthread)) -$(eval $(call BuildPlugin,write-http,HTTP POST output,write_http,+PACKAGE_collectd-mod-write-http:libcurl)) diff --git a/utils/collectd/files/collectd.conf b/utils/collectd/files/collectd.conf deleted file mode 100644 index 3afbfad..0000000 --- a/utils/collectd/files/collectd.conf +++ /dev/null @@ -1,39 +0,0 @@ -# Config file for collectd. More info: https://collectd.org/ -# Note: Luci statistics will generate a new config and overwrite this file. - -#Hostname "localhost" -#FQDNLookup true -BaseDir "/var/run/collectd" -Include "/etc/collectd/conf.d" -PIDFile "/var/run/collectd.pid" -PluginDir "/usr/lib/collectd" -TypesDB "/usr/share/collectd/types.db" -Interval 30 -ReadThreads 2 - -LoadPlugin interface -LoadPlugin load -#LoadPlugin ping -LoadPlugin rrdtool - - - DataDir "/tmp/rrd" - RRARows 100 - RRASingle true - RRATimespan 3600 - RRATimespan 86400 - RRATimespan 604800 - RRATimespan 2678400 - RRATimespan 31622400 - - - - IgnoreSelected false - Interface "br-lan" - - -# -# Host "host.foo.bar" -# Interval 30 -# TTL 127 -# diff --git a/utils/collectd/files/collectd.init b/utils/collectd/files/collectd.init deleted file mode 100644 index cb314d3..0000000 --- a/utils/collectd/files/collectd.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2016 OpenWrt.org - -START=80 -STOP=10 - -USE_PROCD=1 - -start_service() { - mkdir -m 0755 -p /var/lib/collectd - procd_open_instance - procd_set_param command /usr/sbin/collectd -f - procd_close_instance -} - diff --git a/utils/collectd/patches/001-undefined-AM_PATH_LIBGCRYPT.patch b/utils/collectd/patches/001-undefined-AM_PATH_LIBGCRYPT.patch deleted file mode 100644 index 0e01744..0000000 --- a/utils/collectd/patches/001-undefined-AM_PATH_LIBGCRYPT.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- /dev/null -+++ b/fake-am_path_libgcrypt.m4 -@@ -0,0 +1 @@ -+AC_DEFUN([AM_PATH_LIBGCRYPT],[:]) diff --git a/utils/collectd/patches/003-remove-werror.patch b/utils/collectd/patches/003-remove-werror.patch deleted file mode 100644 index c81f209..0000000 --- a/utils/collectd/patches/003-remove-werror.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -7,7 +7,7 @@ SUBDIRS += daemon - PLUGIN_LDFLAGS = -module -avoid-version -export-symbols-regex '\' - - if COMPILER_IS_GCC --AM_CFLAGS = -Wall -Werror -+AM_CFLAGS = -Wall - endif - - AM_CPPFLAGS = -I$(srcdir)/daemon ---- a/src/libcollectdclient/Makefile.am -+++ b/src/libcollectdclient/Makefile.am -@@ -1,7 +1,7 @@ - AUTOMAKE_OPTIONS = foreign no-dependencies - - if COMPILER_IS_GCC --AM_CFLAGS = -Wall -Werror -+AM_CFLAGS = -Wall - endif - - pkginclude_HEADERS = collectd/client.h collectd/network.h collectd/network_buffer.h collectd/lcc_features.h diff --git a/utils/collectd/patches/050-upstream-fix-for-network-plugin-ddos.patch b/utils/collectd/patches/050-upstream-fix-for-network-plugin-ddos.patch deleted file mode 100644 index d4d333e..0000000 --- a/utils/collectd/patches/050-upstream-fix-for-network-plugin-ddos.patch +++ /dev/null @@ -1,50 +0,0 @@ -From f6be4f9b49b949b379326c3d7002476e6ce4f211 Mon Sep 17 00:00:00 2001 -From: Pavel Rochnyack -Date: Mon, 3 Apr 2017 11:57:09 +0600 -Subject: [PATCH] network plugin: Fix endless loop DOS in parse_packet() - -When correct 'Signature part' is received by Collectd, configured without -AuthFile option, condition for endless loop occurs due to missing increase -of pointer to next unprocessed part. - -Fixes: CVE-2017-7401 - -Signed-off-by: Florian Forster - - ---- a/src/network.c -+++ b/src/network.c -@@ -1066,14 +1066,6 @@ static int parse_part_sign_sha256 (socke - buffer_len = *ret_buffer_len; - buffer_offset = 0; - -- if (se->data.server.userdb == NULL) -- { -- c_complain (LOG_NOTICE, &complain_no_users, -- "network plugin: Received signed network packet but can't verify it " -- "because no user DB has been configured. Will accept it."); -- return (0); -- } -- - /* Check if the buffer has enough data for this structure. */ - if (buffer_len <= PART_SIGNATURE_SHA256_SIZE) - return (-ENOMEM); -@@ -1091,6 +1083,18 @@ static int parse_part_sign_sha256 (socke - return (-1); - } - -+ if (se->data.server.userdb == NULL) { -+ c_complain( -+ LOG_NOTICE, &complain_no_users, -+ "network plugin: Received signed network packet but can't verify it " -+ "because no user DB has been configured. Will accept it."); -+ -+ *ret_buffer = buffer + pss_head_length; -+ *ret_buffer_len -= pss_head_length; -+ -+ return (0); -+ } -+ - /* Copy the hash. */ - BUFFER_READ (pss.hash, sizeof (pss.hash)); - diff --git a/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch b/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch deleted file mode 100644 index 704962f..0000000 --- a/utils/collectd/patches/100-rrdtool-add-rrasingle-option.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- a/src/rrdtool.c -+++ b/src/rrdtool.c -@@ -82,6 +82,7 @@ static const char *config_keys[] = - "HeartBeat", - "RRARows", - "RRATimespan", -+ "RRASingle", - "XFF", - "WritesPerSecond", - "RandomTimeout" -@@ -103,6 +104,8 @@ static rrdcreate_config_t rrdcreate_conf - /* timespans = */ NULL, - /* timespans_num = */ 0, - -+ /* rrasingle = */ 0, -+ - /* consolidation_functions = */ NULL, - /* consolidation_functions_num = */ 0, - -@@ -1110,6 +1113,14 @@ static int rrd_config (const char *key, - - free (value_copy); - } -+ else if (strcasecmp ("RRASingle", key) == 0) -+ { -+ if (IS_TRUE (value)) -+ { -+ rrdcreate_config.rrasingle = 1; -+ NOTICE ("rrdtool plugin: RRASingle = true: creating only AVERAGE RRAs"); -+ } -+ } - else if (strcasecmp ("XFF", key) == 0) - { - double tmp = atof (value); ---- a/src/utils_rrdcreate.c -+++ b/src/utils_rrdcreate.c -@@ -213,6 +213,9 @@ static int rra_get (char ***ret, const v - rts_num = rra_timespans_num; - } - -+ if (cfg->rrasingle) -+ rra_types_num = 1; -+ - rra_max = rts_num * rra_types_num; - assert (rra_max > 0); - ---- a/src/utils_rrdcreate.h -+++ b/src/utils_rrdcreate.h -@@ -41,6 +41,8 @@ struct rrdcreate_config_s - int *timespans; - size_t timespans_num; - -+ int rrasingle; -+ - char **consolidation_functions; - size_t consolidation_functions_num; - diff --git a/utils/collectd/patches/140-fix-fqdnlookup.patch b/utils/collectd/patches/140-fix-fqdnlookup.patch deleted file mode 100644 index 22990bd..0000000 --- a/utils/collectd/patches/140-fix-fqdnlookup.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/daemon/configfile.c -+++ b/src/daemon/configfile.c -@@ -111,7 +111,7 @@ static cf_global_option_t cf_global_opti - {"BaseDir", NULL, PKGLOCALSTATEDIR}, - {"PIDFile", NULL, PIDFILE}, - {"Hostname", NULL, NULL}, -- {"FQDNLookup", NULL, "true"}, -+ {"FQDNLookup", NULL, "false"}, - {"Interval", NULL, NULL}, - {"ReadThreads", NULL, "5"}, - {"WriteThreads", NULL, "5"}, diff --git a/utils/collectd/patches/200-fix-git-describe-error.patch b/utils/collectd/patches/200-fix-git-describe-error.patch deleted file mode 100644 index 71f2036..0000000 --- a/utils/collectd/patches/200-fix-git-describe-error.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/version-gen.sh -+++ b/version-gen.sh -@@ -2,7 +2,7 @@ - - DEFAULT_VERSION="5.5.3.git" - --VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`" -+#VERSION="`git describe 2> /dev/null | grep collectd | sed -e 's/^collectd-//'`" - - if test -z "$VERSION"; then - VERSION="$DEFAULT_VERSION" diff --git a/utils/collectd/patches/300-delay-first-read-cycle.patch b/utils/collectd/patches/300-delay-first-read-cycle.patch deleted file mode 100644 index 495c80f..0000000 --- a/utils/collectd/patches/300-delay-first-read-cycle.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/daemon/plugin.c -+++ b/src/daemon/plugin.c -@@ -1149,7 +1149,7 @@ static int plugin_insert_read (read_func - int status; - llentry_t *le; - -- rf->rf_next_read = cdtime (); -+ rf->rf_next_read = cdtime () + (cdtime_t) 1073741824; //delay first read 1s - rf->rf_effective_interval = rf->rf_interval; - - pthread_mutex_lock (&read_lock); diff --git a/utils/collectd/patches/400-fix-olsrd-get-all.patch b/utils/collectd/patches/400-fix-olsrd-get-all.patch deleted file mode 100644 index 1dc6c58..0000000 --- a/utils/collectd/patches/400-fix-olsrd-get-all.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/olsrd.c -+++ b/src/olsrd.c -@@ -658,7 +658,7 @@ static int olsrd_read (void) /* {{{ */ - if (fh == NULL) - return (-1); - -- fputs ("\r\n", fh); -+ fputs ("/all \r\n", fh); - fflush (fh); - - while (fgets (buffer, sizeof (buffer), fh) != NULL) diff --git a/utils/collectd/patches/600-fix-libmodbus-detection.patch b/utils/collectd/patches/600-fix-libmodbus-detection.patch deleted file mode 100644 index aacf182..0000000 --- a/utils/collectd/patches/600-fix-libmodbus-detection.patch +++ /dev/null @@ -1,40 +0,0 @@ -Patch reverts upstream commit: -https://github.com/collectd/collectd/commit/6124da7a48f28f54fc09ebeb942d1037516fe6ab - -The commit changed the detection path due to FreeBSD issues, -but apparently affects also Openwrt buildroot negatively. - -Original explanation: - From 6124da7a48f28f54fc09ebeb942d1037516fe6ab Mon Sep 17 00:00:00 2001 - Subject: [PATCH] Fix libmodbus detection on FreeBSD - - We look for modbus/modbus.h in /usr/local/include/modbus - but we should look for modbus.h - - This is only an issue on FreeBSD since /usr/local/include is not - in the default search path. - -Reversed patch to be applied: - ---- a/configure.ac -+++ b/configure.ac -@@ -2627,7 +2627,7 @@ then - SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags" - -- AC_CHECK_HEADERS(modbus.h, [], [with_libmodbus="no (modbus.h not found)"]) -+ AC_CHECK_HEADERS(modbus/modbus.h, [], [with_libmodbus="no (modbus/modbus.h not found)"]) - - CPPFLAGS="$SAVE_CPPFLAGS" - fi ---- a/src/modbus.c -+++ b/src/modbus.c -@@ -26,7 +26,7 @@ - #include "configfile.h" - #include "plugin.h" - --#include -+#include - #include - #include - diff --git a/utils/collectd/patches/900-add-iwinfo-plugin.patch b/utils/collectd/patches/900-add-iwinfo-plugin.patch deleted file mode 100644 index d23b09e..0000000 --- a/utils/collectd/patches/900-add-iwinfo-plugin.patch +++ /dev/null @@ -1,276 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -705,6 +705,9 @@ AC_CHECK_HEADERS(net/pfvar.h, - have_termios_h="no" - AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"]) - -+# For the iwinfo plugin -+AC_CHECK_LIB(iwinfo, iwinfo_backend, [with_iwinfo="yes"], [with_iwinfo="no (libiwinfo not found)"], []) -+ - # For the turbostat plugin - have_asm_msrindex_h="no" - AC_CHECK_HEADERS(asm/msr-index.h, [have_asm_msrindex_h="yes"]) -@@ -5310,6 +5313,7 @@ plugin_interface="no" - plugin_ipmi="no" - plugin_ipvs="no" - plugin_irq="no" -+plugin_iwinfo="no" - plugin_load="no" - plugin_log_logstash="no" - plugin_memory="no" -@@ -5713,6 +5717,7 @@ AC_PLUGIN([ipmi], [$plugin_ipmi], - AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters]) - AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics]) - AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics]) -+AC_PLUGIN([iwinfo], [$with_iwinfo], [Common iwinfo wireless statistics]) - AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine]) - AC_PLUGIN([load], [$plugin_load], [System load]) - AC_PLUGIN([logfile], [yes], [File logging plugin]) -@@ -6042,6 +6047,7 @@ Configuration: - oracle . . . . . . . $with_oracle - protobuf-c . . . . . $have_protoc_c - python . . . . . . . $with_python -+ iwinfo . . . . . . . $with_iwinfo - - Features: - daemon mode . . . . . $enable_daemon -@@ -6091,6 +6097,7 @@ Configuration: - iptables . . . . . . $enable_iptables - ipvs . . . . . . . . $enable_ipvs - irq . . . . . . . . . $enable_irq -+ iwinfo . . . . . . . $enable_iwinfo - java . . . . . . . . $enable_java - load . . . . . . . . $enable_load - logfile . . . . . . . $enable_logfile ---- a/src/collectd.conf.in -+++ b/src/collectd.conf.in -@@ -128,6 +128,7 @@ - #@BUILD_PLUGIN_IPTABLES_TRUE@LoadPlugin iptables - #@BUILD_PLUGIN_IPVS_TRUE@LoadPlugin ipvs - #@BUILD_PLUGIN_IRQ_TRUE@LoadPlugin irq -+#@BUILD_PLUGIN_IWINFO_TRUE@LoadPlugin iwinfo - #@BUILD_PLUGIN_JAVA_TRUE@LoadPlugin java - @BUILD_PLUGIN_LOAD_TRUE@@BUILD_PLUGIN_LOAD_TRUE@LoadPlugin load - #@BUILD_PLUGIN_LPAR_TRUE@LoadPlugin lpar -@@ -582,6 +583,12 @@ - # IgnoreSelected true - # - -+# -+# Interface "ath0" -+# Interface "ra0" -+# Interface "wlan0" -+# -+ - # - # JVMArg "-verbose:jni" - # JVMArg "-Djava.class.path=@prefix@/share/collectd/java/collectd-api.jar" ---- a/src/collectd.conf.pod -+++ b/src/collectd.conf.pod -@@ -2612,6 +2612,27 @@ and all other interrupts are collected. - - =back - -+=head2 Plugin C -+ -+=over 4 -+ -+=item B I -+ -+Select this interface. By default all detected wireless interfaces will be -+collected. For a more detailed description see B below. -+ -+=item B I|I -+ -+If no configuration if given, the B-plugin will collect data from all -+detected wireless interfaces. You can use the B-option to pick the -+interfaces you're interested in. Sometimes, however, it's easier/preferred to -+collect all interfaces I a few ones. This option enables you to do -+that: By setting B to I the effect of B is -+inverted: All selected interfaces are ignored and all other interfaces are -+collected. -+ -+=back -+ - =head2 Plugin C - - The I plugin makes it possible to write extensions for collectd in Java. ---- /dev/null -+++ b/src/iwinfo.c -@@ -0,0 +1,150 @@ -+/** -+ * collectd - src/iwinfo.c -+ * Copyright (C) 2011 Jo-Philipp Wich -+ * -+ * 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; only version 2 of the License is applicable. -+ * -+ * 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 St, Fifth Floor, Boston, MA 02110-1301 USA -+ **/ -+ -+#include "collectd.h" -+#include "common.h" -+#include "plugin.h" -+#include "utils_ignorelist.h" -+ -+#include -+#include -+ -+#define PROCNETDEV "/proc/net/dev" -+ -+static const char *config_keys[] = { -+ "Interface", -+ "IgnoreSelected" -+}; -+static int config_keys_num = STATIC_ARRAY_SIZE (config_keys); -+ -+static ignorelist_t *ignorelist = NULL; -+ -+static int iwinfo_config(const char *key, const char *value) -+{ -+ if (ignorelist == NULL) -+ ignorelist = ignorelist_create(1); -+ -+ if (ignorelist == NULL) -+ return 1; -+ -+ if (strcasecmp(key, "Interface") == 0) -+ ignorelist_add(ignorelist, value); -+ else if (strcasecmp(key, "IgnoreSelected") == 0) -+ ignorelist_set_invert(ignorelist, IS_TRUE(value) ? 0 : 1); -+ else -+ return -1; -+ -+ return 0; -+} -+ -+static void iwinfo_submit(const char *ifname, const char *type, int value) -+{ -+ value_t values[1]; -+ value_list_t vl = VALUE_LIST_INIT; -+ -+ values[0].gauge = value; -+ -+ vl.values = values; -+ vl.values_len = 1; -+ -+ sstrncpy(vl.host, hostname_g, sizeof(vl.host)); -+ sstrncpy(vl.plugin, "iwinfo", sizeof(vl.plugin)); -+ sstrncpy(vl.plugin_instance, ifname, sizeof(vl.plugin_instance)); -+ sstrncpy(vl.type, type, sizeof(vl.type)); -+ /*sstrncpy(vl.type_instance, "", sizeof(vl.type_instance));*/ -+ -+ plugin_dispatch_values(&vl); -+} -+ -+static void iwinfo_process(const char *ifname) -+{ -+ int val; -+ char buf[IWINFO_BUFSIZE]; -+ const struct iwinfo_ops *iw = iwinfo_backend(ifname); -+ -+ /* does appear to be a wifi iface */ -+ if (iw) -+ { -+ if (iw->bitrate(ifname, &val)) -+ val = 0; -+ iwinfo_submit(ifname, "bitrate", val * 1000); -+ -+ if (iw->signal(ifname, &val)) -+ val = 0; -+ iwinfo_submit(ifname, "signal_power", val); -+ -+ if (iw->noise(ifname, &val)) -+ val = 0; -+ iwinfo_submit(ifname, "signal_noise", val); -+ -+ if (iw->quality(ifname, &val)) -+ val = 0; -+ iwinfo_submit(ifname, "signal_quality", val); -+ -+ if (iw->assoclist(ifname, buf, &val)) -+ val = 0; -+ iwinfo_submit(ifname, "stations", -+ val / sizeof(struct iwinfo_assoclist_entry)); -+ } -+ -+ iwinfo_finish(); -+} -+ -+static int iwinfo_read(void) -+{ -+ char line[1024]; -+ char ifname[128]; -+ FILE *f; -+ -+ f = fopen(PROCNETDEV, "r"); -+ if (f == NULL) -+ { -+ char err[1024]; -+ WARNING("iwinfo: Unable to open " PROCNETDEV ": %s", -+ sstrerror(errno, err, sizeof(err))); -+ return -1; -+ } -+ -+ while (fgets(line, sizeof(line), f)) -+ { -+ if (!strchr(line, ':')) -+ continue; -+ -+ if (!sscanf(line, " %127[^:]", ifname)) -+ continue; -+ -+ if (ignorelist_match(ignorelist, ifname)) -+ continue; -+ -+ if (strstr(ifname, "mon.") || strstr(ifname, ".sta") || -+ strstr(ifname, "tmp.") || strstr(ifname, "wifi")) -+ continue; -+ -+ iwinfo_process(ifname); -+ } -+ -+ fclose(f); -+ -+ return 0; -+} -+ -+void module_register(void) -+{ -+ plugin_register_config("iwinfo", iwinfo_config, config_keys, config_keys_num); -+ plugin_register_read("iwinfo", iwinfo_read); -+} ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -457,6 +457,13 @@ irq_la_SOURCES = irq.c - irq_la_LDFLAGS = $(PLUGIN_LDFLAGS) - endif - -+if BUILD_PLUGIN_IWINFO -+pkglib_LTLIBRARIES += iwinfo.la -+iwinfo_la_SOURCES = iwinfo.c -+iwinfo_la_LDFLAGS = -module -avoid-version -+iwinfo_la_LIBADD = -liwinfo -+endif -+ - if BUILD_PLUGIN_JAVA - pkglib_LTLIBRARIES += java.la - java_la_SOURCES = java.c ---- a/src/types.db -+++ b/src/types.db -@@ -228,6 +228,7 @@ voltage value:GAUGE:U:U - vs_memory value:GAUGE:0:9223372036854775807 - vs_processes value:GAUGE:0:65535 - vs_threads value:GAUGE:0:65535 -+stations value:GAUGE:0:256 - - # - # Legacy types diff --git a/utils/collectd/patches/920-fix-ping-droprate.patch b/utils/collectd/patches/920-fix-ping-droprate.patch deleted file mode 100644 index 947dc54..0000000 --- a/utils/collectd/patches/920-fix-ping-droprate.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/ping.c -+++ b/src/ping.c -@@ -655,7 +655,7 @@ static int ping_read (void) /* {{{ */ - / ((double) (pkg_recv * (pkg_recv - 1)))); - - /* Calculate drop rate. */ -- droprate = ((double) (pkg_sent - pkg_recv)) / ((double) pkg_sent); -+ droprate = ((double) (pkg_sent - pkg_recv)) * 100 / ((double) pkg_sent); - - submit (hl->host, "ping", latency_average); - submit (hl->host, "ping_stddev", latency_stddev); diff --git a/utils/coreutils/Makefile b/utils/coreutils/Makefile index 0d52b60..32db082 100644 --- a/utils/coreutils/Makefile +++ b/utils/coreutils/Makefile @@ -9,12 +9,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=coreutils PKG_VERSION:=8.23 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/coreutils -PKG_MD5SUM:=abed135279f87ad6762ce57ff6d89c41 -PKG_BUILD_DEPENDS:=libpthread +PKG_HASH:=ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d PKG_MAINTAINER:=Jo-Philipp Wich PKG_BUILD_PARALLEL:=1 @@ -43,6 +42,8 @@ DEPENDS_ls = +libacl +libcap DEPENDS_mv = +libacl DEPENDS_vdir = +libacl +libcap +FILES_stdbuf := usr/lib/coreutils/libstdbuf.so + define Package/coreutils/Default SECTION:=utils CATEGORY:=Utilities @@ -105,6 +106,10 @@ define BuildPlugin define Package/$(1)/install $(INSTALL_DIR) $$(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/ + $(foreach f,$(FILES_$(2)), + $(INSTALL_DIR) $$(1)/$(dir $(f)) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/$(f) $$(1)/$(f) + ) endef $$(eval $$(call BuildPackage,$(1))) diff --git a/utils/crelay/Makefile b/utils/crelay/Makefile deleted file mode 100644 index 5e14052..0000000 --- a/utils/crelay/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=crelay -PKG_VERSION:=0.10.1 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/ondrej1024/crelay -PKG_SOURCE_VERSION:=V$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) - -PKG_MAINTAINER:=Ted Hess -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/crelay - SECTION:=utils - CATEGORY:=Utilities - TITLE:=USB relay remote control daemon - URL:=http://github.com/ondrej1024/crelay - DEPENDS:=+libftdi1 +hidapi +libusb-1.0 -endef - -define Package/crelay/description - crelay is used to control different relay cards in a unified manner. It provides - several interfaces for controlling the relays locally or remotely by a web browser - or a smartphone. The card which is detected first will be used. A WebUI control is - available on port 8000 (default) - . - Currently supported relay cards: - - Conrad USB 4-channel relay card - - Sainsmart USB 4/8-channel relay board - - Sainsmart USB 16-channel relay control module - - Generic GPIO relays - - HID API compatible relay card -endef - -define Build/Configure -endef - -TARGET_CFLAGS+= \ - -D_GNU_SOURCE \ - -I$(STAGING_DIR)/usr/include/libftdi1 \ - -I$(STAGING_DIR)/usr/include/hidapi - -TARGET_LDFLAGS+= $(if $(ICONV_FULL),-liconv) - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/src \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" -endef - -define Package/crelay/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/crelay $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/crelay.init $(1)/etc/init.d/crelay - $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/crelay.conf $(1)/etc -endef - -$(eval $(call BuildPackage,crelay)) diff --git a/utils/crelay/files/crelay.init b/utils/crelay/files/crelay.init deleted file mode 100644 index b7c5123..0000000 --- a/utils/crelay/files/crelay.init +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2016 OpenWrt.org - -NAME=crelay -START=93 - -PROG=/usr/bin/${NAME} - -USE_PROCD=1 - -# Custom relay labels (for Web GUI) are defined in /etc/crelay.conf - -start_service() { - procd_open_instance - - # restart if it croaks - procd_set_param respawn - - procd_set_param command "$PROG" - # daemon mode in foreground - starts HTTP server - procd_append_param command -d - - procd_close_instance -} diff --git a/utils/crelay/patches/010-link_with_ftdi1.patch b/utils/crelay/patches/010-link_with_ftdi1.patch deleted file mode 100644 index 26b4c97..0000000 --- a/utils/crelay/patches/010-link_with_ftdi1.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/Makefile -+++ b/src/Makefile -@@ -44,7 +44,7 @@ OPTS += -DDRV_CONRAD - endif - ifeq ($(DRV_SAINSMART), y) - SRC += relay_drv_sainsmart.c --LIBS += -lftdi -+LIBS += -lftdi1 - OPTS += -DDRV_SAINSMART - endif - ifeq ($(DRV_SAINSMART16), y) diff --git a/utils/cryptodev-linux/Makefile b/utils/cryptodev-linux/Makefile deleted file mode 100644 index 4f187c8..0000000 --- a/utils/cryptodev-linux/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# $Id$ - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=cryptodev-linux -PKG_VERSION:=1.8 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://download.gna.org/cryptodev-linux/ -PKG_MD5SUM:=02644cc4cd02301e0b503a332eb2f0b5 - -PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -CRYPTODEV_AUTOLOAD:= \ - cryptodev - -define KernelPackage/cryptodev - SUBMENU:=Cryptographic API modules - DEFAULT:=m if ALL - TITLE:=Driver for cryptographic acceleration - URL:=http://cryptodev-linux.org/ - MAINTAINER:=Nikos Mavrogiannopoulos - VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) - DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash - FILES:= \ - $(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX) - AUTOLOAD:=$(call AutoLoad,50,$(CRYPTODEV_AUTOLOAD)) -endef - -define KernelPackage/cryptodev/description - This is a driver for that allows to use the Linux kernel supported - hardware ciphers by user-space applications. -endef - -CRYPTODEV_MAKEOPTS= -C $(PKG_BUILD_DIR) \ - PATH="$(TARGET_PATH)" \ - ARCH="$(LINUX_KARCH)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - TOOLPREFIX="$(KERNEL_CROSS)" \ - TOOLPATH="$(KERNEL_CROSS)" \ - KERNEL_DIR="$(LINUX_DIR)" \ - LDOPTS=" " \ - DOMULTI=1 - -define Build/Compile/cryptodev - $(MAKE) $(CRYPTODEV_MAKEOPTS) -endef - -define Build/Compile - $(call Build/Compile/cryptodev) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR)/usr/include/crypto - $(CP) $(PKG_BUILD_DIR)/crypto/cryptodev.h $(STAGING_DIR)/usr/include/crypto/ -endef - -define KernelPackage/cryptodev/install - $(INSTALL_DIR) $(1)/etc/modules.d - $(INSTALL_DATA) ./files/cryptodev.modules $(1)/etc/modules.d/80-cryptodev - $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION) - $(INSTALL_DIR) $(1)/usr/sbin -endef - -$(eval $(call KernelPackage,cryptodev)) diff --git a/utils/cryptodev-linux/files/cryptodev.modules b/utils/cryptodev-linux/files/cryptodev.modules deleted file mode 100644 index fb39fcd..0000000 --- a/utils/cryptodev-linux/files/cryptodev.modules +++ /dev/null @@ -1 +0,0 @@ -cryptodev diff --git a/utils/cryptsetup/Makefile b/utils/cryptsetup/Makefile index 691103f..c6d2e99 100644 --- a/utils/cryptsetup/Makefile +++ b/utils/cryptsetup/Makefile @@ -8,72 +8,48 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cryptsetup -PKG_VERSION:=1.7.2 +PKG_VERSION:=2.1.0 PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0+ LGPL-2.1+ -PKG_LICENSE_FILES:=COPYING COPYING.LGPL PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v1.7 -PKG_MD5SUM:=a11a140cea496961222170944db01fc1 -PKG_MAINTAINER:=Daniel Golle - +PKG_SOURCE_URL:=@KERNEL/linux/utils/cryptsetup/v2.1 +PKG_HASH:=a3eeb2741f8f3376d16585191f3c60e067dd987e096c3c4b073fab7748b1c897 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -include $(INCLUDE_DIR)/package.mk +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=GPL-2.0+ LGPL-2.1+ +PKG_LICENSE_FILES:=COPYING COPYING.LGPL -TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib +include $(INCLUDE_DIR)/package.mk -define Package/cryptsetup/Default +define Package/cryptsetup SECTION:=utils CATEGORY:=Utilities SUBMENU:=Encryption TITLE:=Cryptsetup - DEPENDS:=+libblkid +libuuid +libpopt +lvm2 +libdevmapper +@KERNEL_DIRECT_IO - URL:=http://code.google.com/p/cryptsetup/ -endef - -define Package/cryptsetup -$(call Package/cryptsetup/Default) - DEPENDS+=+libgcrypt - VARIANT:=gcrypt -endef - -define Package/cryptsetup-openssl -$(call Package/cryptsetup/Default) - TITLE+= (with openssl support) - DEPENDS+=+libopenssl - VARIANT:=openssl -endef - -define Package/cryptsetup/Default/description - Cryptsetup-luks + DEPENDS:=+libblkid +libuuid +libpopt +lvm2 +libdevmapper +libjson-c +@KERNEL_DIRECT_IO +kmod-crypto-user + URL:=https://gitlab.com/cryptsetup/cryptsetup/ endef define Package/cryptsetup/description -$(call Package/cryptsetup/Default/description) -linked against libgcrypt + Cryptsetup is utility used to conveniently setup disk encryption based on DMCrypt kernel module. endef - -define Package/cryptsetup-openssl/description -$(call Package/cryptsetup/Default/description) -linked against openssl -endef - -ifeq ($(BUILD_VARIANT),openssl) -CONFIGURE_ARGS+= \ - --with-crypto_backend=openssl -endif +CONFIGURE_ARGS += \ + --disable-cryptsetup-reencrypt \ + --disable-integritysetup \ + --disable-selinux \ + --disable-rpath \ + --disable-veritysetup \ + --disable-udev \ + --with-default-luks-format=LUKS2 \ + --with-crypto_backend=kernel define Package/cryptsetup/install $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/src/.libs/cryptsetup $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/.libs/cryptsetup $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/lib/.libs/libcryptsetup.so* $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/.libs/libcryptsetup.so* $(1)/usr/lib endef -Package/cryptsetup-openssl/install = $(Package/cryptsetup/install) - $(eval $(call BuildPackage,cryptsetup)) -$(eval $(call BuildPackage,cryptsetup-openssl)) diff --git a/utils/dbus/Makefile b/utils/dbus/Makefile deleted file mode 100644 index 0560fc6..0000000 --- a/utils/dbus/Makefile +++ /dev/null @@ -1,214 +0,0 @@ -# -# Copyright (C) 2007-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -# Make sure to also update the dbus-x package -PKG_NAME:=dbus -PKG_VERSION:=1.10.4 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://dbus.freedesktop.org/releases/dbus/ -PKG_MD5SUM:=27b8e99ffad603b8acfa25201c6e3d5c -PKG_MAINTAINER:=Steven Barth -PKG_LICENSE:=AFL-2.1 - -PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -TARGET_LDFLAGS+= \ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ - -define Package/dbus/Default - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Simple interprocess messaging system - URL:=http://dbus.freedesktop.org/ -endef - -define Package/dbus/Default/description - D-Bus is a message bus system, a simple way for applications to talk to one - another. In addition to interprocess communication, D-Bus helps coordinate - process lifecycle; it makes it simple and reliable to code a "single instance" - application or daemon, and to launch applications and daemons on demand when - their services are needed. -endef - -define Package/libdbus -$(call Package/dbus/Default) - CATEGORY:=Libraries - TITLE+= (library) - DEPENDS:= +libpthread -endef - -define Package/libdbus/Description -$(call Package/dbus/Default/description) - This package contains the D-Bus shared library. -endef - -define Package/dbus -$(call Package/dbus/Default) - TITLE+= (daemon) - DEPENDS:= +libexpat +libdbus -endef - -define Package/dbus/Description -$(call Package/dbus/Default/description) - This package contains the D-Bus daemon. -endef - -define Package/dbus-utils -$(call Package/dbus/Default) - TITLE+= (utilities) - DEPENDS:= dbus -endef - -define Package/dbus-utils/Description -$(call Package/dbus/Default/description) - This package contains D-Bus utilities. -endef - - -define Build/Prepare - $(Build/Prepare/Default) - $(SED) 's/-Wl,--gc-sections/--gc-sections/' $(PKG_BUILD_DIR)/configure -endef - -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - --disable-abstract-sockets \ - --disable-ansi \ - --disable-asserts \ - --disable-console-owner-file \ - --disable-doxygen-docs \ - --disable-compiler_coverage \ - --disable-selinux \ - --disable-tests \ - --disable-verbose-mode \ - --disable-xml-docs \ - --with-xml="expat" \ - --with-dbus-user=root \ - --with-dbus-daemondir="/usr/sbin" \ - --with-system-socket="/var/run/dbus/system_bus_socket" \ - --with-system-pid-file="/var/run/dbus.pid" \ - --without-x \ - --libexecdir=/usr/lib/dbus-1 - -CONFIGURE_VARS+= \ - ac_cv_have_abstract_sockets="yes" \ - ac_cv_lib_expat_XML_ParserCreate_MM="yes" \ - -HOST_CONFIGURE_ARGS+= \ - --enable-shared \ - --enable-static \ - --disable-abstract-sockets \ - --disable-ansi \ - --disable-asserts \ - --disable-console-owner-file \ - --disable-docygen-docs \ - --disable-compiler_coverage \ - --disable-selinux \ - --disable-tests \ - --disable-verbose-mode \ - --disable-xml-docs \ - --with-dbus-user=root \ - --with-dbus-daemondir="$(STAGING_DIR_HOSTPKG)/bin" \ - --with-system-socket="$(STAGING_DIR_HOSTPKG)/var/run/dbus/system_bus_socket" \ - --with-system-pid-file="$(STAGING_DIR_HOSTPKG)/var/run/dbus.pid" \ - --without-x \ - --libexecdir="$(STAGING_DIR_HOSTPKG)/lib/dbus-1" - -HOST_CONFIGURE_VARS+= \ - ac_cv_have_abstract_sockets="yes" \ - ac_cv_lib_expat_XML_ParserCreate_MM="yes" \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/dbus-1.0 \ - $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib/dbus-1.0/include/dbus/ - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0/include/dbus/*.h \ - $(1)/usr/lib/dbus-1.0/include/dbus/ - - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.{so*,la,a} \ - $(1)/usr/lib/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/dbus-1.0 \ - $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/dbus-1.pc \ - $(1)/usr/lib/pkgconfig/ -endef - -define Package/dbus/conffiles -/etc/dbus-1/session.conf -/etc/dbus-1/system.conf -endef - -define Package/libdbus/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libdbus-1.so.* \ - $(1)/usr/lib/ -endef - -define Package/dbus/install - $(INSTALL_DIR) $(1)/usr/share - $(CP) \ - $(PKG_INSTALL_DIR)/usr/share/dbus-1 \ - $(1)/usr/share/ - - $(INSTALL_DIR) $(1)/usr/lib/dbus-1 - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/lib/dbus-1/dbus-daemon-launch-helper \ - $(1)/usr/lib/dbus-1/ - - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/sbin/dbus-daemon \ - $(1)/usr/sbin/ - - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/dbus-uuidgen \ - $(1)/usr/bin/ - - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/dbus-launch \ - $(1)/usr/bin/dbus-launch.real - $(INSTALL_BIN) \ - ./files/dbus-launch \ - $(1)/usr/bin/ - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) \ - ./files/dbus.init \ - $(1)/etc/init.d/dbus -endef - -define Package/dbus-utils/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/dbus-{send,monitor,cleanup-sockets} \ - $(1)/usr/bin/ -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,libdbus)) -$(eval $(call BuildPackage,dbus)) -$(eval $(call BuildPackage,dbus-utils)) diff --git a/utils/dbus/files/dbus-launch b/utils/dbus/files/dbus-launch deleted file mode 100644 index 7c3f922..0000000 --- a/utils/dbus/files/dbus-launch +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# -# Simple wrapper script which allows us to build dbus without general x support -# If an application needs x support in dbus-launch it has to depend on the -# dbus-launch-x package. The script is used to prefer dbus-launch with x over -# the dbus-lauch without x. - -if [ -f /usr/bin/dbus-launch-x ]; then - exec /usr/bin/dbus-launch-x $@ -else - exec /usr/bin/dbus-launch.real $@ -fi diff --git a/utils/dbus/files/dbus.init b/utils/dbus/files/dbus.init deleted file mode 100644 index 4294083..0000000 --- a/utils/dbus/files/dbus.init +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2007-2011 OpenWrt.org - -START=60 - -SERVICE_PID_FILE=/var/run/dbus.pid - -start() { - mkdir -m 0755 -p /var/lib/dbus - mkdir -m 0755 -p /var/run/dbus - [ -x /usr/bin/dbus-uuidgen ] && /usr/bin/dbus-uuidgen --ensure - service_start /usr/sbin/dbus-daemon --system -} - -stop() { - service_stop /usr/sbin/dbus-daemon && rm $SERVICE_PID_FILE -} diff --git a/utils/dbus/patches/100-fix-poll-select.patch b/utils/dbus/patches/100-fix-poll-select.patch deleted file mode 100644 index 64f6525..0000000 --- a/utils/dbus/patches/100-fix-poll-select.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: dbus-1.9.4/tools/tool-common.c -=================================================================== ---- dbus-1.9.4.orig/tools/tool-common.c -+++ dbus-1.9.4/tools/tool-common.c -@@ -29,6 +29,8 @@ - #include - #include - -+#include -+ - #ifdef DBUS_WIN - #include - #endif diff --git a/utils/dfu-programmer/Makefile b/utils/dfu-programmer/Makefile deleted file mode 100644 index 777f92d..0000000 --- a/utils/dfu-programmer/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dfu-programmer -PKG_VERSION:=0.7.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/$(PKG_VERSION)/ -PKG_MD5SUM:=98641b0a7cf1cc8c8be3584d5552f6d8 - -PKG_MAINTAINER:=Stefan Hellermann -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/dfu-programmer - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Microcontroller programming - TITLE:=USB programmer for Atmel microcontrollers - URL:=http://dfu-programmer.github.io/ - DEPENDS:=+libusb-1.0 -endef - -define Package/dfu-programmer/description - dfu-programmer is a Device Firmware Update (DFU) based USB programmer - for Atmel chips with a USB bootloader. -endef - -define Package/dfu-programmer/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,dfu-programmer)) diff --git a/utils/dmidecode/Makefile b/utils/dmidecode/Makefile index cae94d0..dea0e2c 100644 --- a/utils/dmidecode/Makefile +++ b/utils/dmidecode/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2016 OpenWrt.org +# Copyright (C) 2007-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dmidecode -PKG_VERSION:=3.0 -PKG_RELEASE:=3 +PKG_VERSION:=3.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME) -PKG_MD5SUM:=7ec35bb193729c1d593a1460b59d82d24b89102ab23fd0416e6cf4325d077e45 +PKG_HASH:=d766ce9b25548c59b1e7e930505b4cad9a7bb0b904a1a391fbb604d529781ac0 PKG_MAINTAINER:=Álvaro Fernández Rojas PKG_LICENSE:=GPL-2.0 diff --git a/utils/dump1090/Makefile b/utils/dump1090/Makefile deleted file mode 100644 index 2ca4abf..0000000 --- a/utils/dump1090/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (C) 2013-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dump1090 -PKG_VERSION:=2016-11-26 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/mutability/dump1090.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=fb63bdc2a61f0169b3c21b33bcdc99f202685b78 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz -PKG_MAINTAINER:=Álvaro Fernández Rojas - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING LICENSE - -PKG_BUILD_DEPENDS:=librtlsdr - -include $(INCLUDE_DIR)/package.mk - -define Package/dump1090/Default - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Mode S decoder for the Realtek RTL2832U - URL:=https://github.com/mutability/dump1090 - DEPENDS:=+libpthread -endef - -define Package/dump1090 - $(call Package/dump1090/Default) - TITLE+= (dump1090) - DEPENDS+= +librtlsdr +uhttpd -endef - -define Package/view1090 - $(call Package/dump1090/Default) - TITLE+= (view1090) -endef - -define Package/dump1090/description - Dump1090 is a Mode S decoder specifically designed for RTLSDR devices. -endef - -define Package/view1090/description - View1090 is a Mode S messages viewer for dump1090 devices. -endef - -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS)" \ - UNAME="Linux" - -define Package/dump1090/install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) files/dump1090.init $(1)/etc/init.d/dump1090 - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) files/dump1090.config $(1)/etc/config/dump1090 - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(INSTALL_DATA) files/dump1090.default $(1)/etc/uci-defaults/00_uhttpd_dump1090 - $(INSTALL_DIR) $(1)/usr/share/dump1090 - $(CP) $(PKG_BUILD_DIR)/public_html/* $(1)/usr/share/dump1090 - $(LN) /var/run/dump1090 $(1)/usr/share/dump1090/data - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dump1090 $(1)/usr/bin -endef - -define Package/view1090/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/view1090 $(1)/usr/bin -endef - -$(eval $(call BuildPackage,dump1090)) -$(eval $(call BuildPackage,view1090)) diff --git a/utils/dump1090/files/dump1090.config b/utils/dump1090/files/dump1090.config deleted file mode 100644 index 2b9e96a..0000000 --- a/utils/dump1090/files/dump1090.config +++ /dev/null @@ -1,50 +0,0 @@ -config dump1090 main - option disabled '1' - option respawn '1' - option device_index '' - option gain '' - option enable_agc '0' - option freq '' - option ifile '' - option iformat '' - option throttle '0' - option raw '0' - option net '1' - option modeac '0' - option net_only '0' - option net_bind_address '' - option net_ri_port '' - option net_ro_port '' - option net_sbs_port '' - option net_bi_port '' - option net_bo_port '' - option net_ro_size '' - option net_ro_interval '' - option net_heartbeat '' - option net_buffer '' - option net_verbatim '0' - option forward_mlat '0' - option lat '' - option lon '' - option max_range '' - option fix '0' - option no_fix '0' - option no_crc_check '0' - option phase_enhance '0' - option mlat '0' - option stats '0' - option stats_range '0' - option stats_every '' - option onlyaddr '0' - option metric '0' - option gnss '0' - option snip '' - option debug '' - option ppm '' - option html_dir '/usr/share/dump1090' - option write_json '/var/run/dump1090' - option write_json_every '1' - option json_location_accuracy '' - option oversample '0' - option dcfilter '0' - option measure_noise '0' diff --git a/utils/dump1090/files/dump1090.default b/utils/dump1090/files/dump1090.default deleted file mode 100644 index 8df01a6..0000000 --- a/utils/dump1090/files/dump1090.default +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -uci batch <<-EOF - set uhttpd.xupnpd=uhttpd - set uhttpd.xupnpd.listen_http='0.0.0.0:8080 [::]:8080' - set uhttpd.xupnpd.home=/usr/share/dump1090 - set uhttpd.xupnpd.rfc1918_filter=1 - set uhttpd.xupnpd.max_requests=3 - set uhttpd.xupnpd.max_connections=100 - set uhttpd.xupnpd.script_timeout=60 - set uhttpd.xupnpd.network_timeout=30 - set uhttpd.xupnpd.http_keepalive=20 - set uhttpd.xupnpd.tcp_keepalive=1 - set uhttpd.xupnpd.index_page='index.html index.htm gmap.html' - commit uhttpd -EOF -exit 0 diff --git a/utils/dump1090/files/dump1090.init b/utils/dump1090/files/dump1090.init deleted file mode 100644 index d57a2e1..0000000 --- a/utils/dump1090/files/dump1090.init +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014-2016 OpenWrt.org - -START=90 -STOP=10 -USE_PROCD=1 - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}" -} - -append_bool() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get_bool val "$cfg" "$var" "$def" - [ "$val" = 1 ] && procd_append_param command "$opt" -} - -start_instance() { - local cfg="$1" - local aux - - config_get_bool aux "$cfg" 'disabled' '0' - [ "$aux" = 1 ] && return 1 - - procd_open_instance - - procd_set_param command /usr/bin/dump1090 - procd_append_param command "--quiet" - - append_arg "$cfg" device_index "--device-index" - append_arg "$cfg" gain "--gain" - append_bool "$cfg" enable_agc "--enable-agc" - append_arg "$cfg" freq "--freq" - append_arg "$cfg" ifile "--ifile" - append_arg "$cfg" iformat "--iformat" - append_bool "$cfg" throttle "--throttle" - append_bool "$cfg" raw "--raw" - append_bool "$cfg" net "--net" - append_bool "$cfg" modeac "--modeac" - append_bool "$cfg" net_only "--net-only" - append_arg "$cfg" net_bind_address "--net-bind-address" - append_arg "$cfg" net_ri_port "--net-ri-port" - append_arg "$cfg" net_ro_port "--net-ro-port" - append_arg "$cfg" net_sbs_port "--net-sbs-port" - append_arg "$cfg" net_bi_port "--net-bi-port" - append_arg "$cfg" net_bo_port "--net-bo-port" - append_arg "$cfg" net_ro_size "--net-ro-size" - append_arg "$cfg" net_ro_interval "--net-ro-interval" - append_arg "$cfg" net_heartbeat "--net-heartbeat" - append_arg "$cfg" net_buffer "--net-buffer" - append_bool "$cfg" net_verbatim "--net-verbatim" - append_bool "$cfg" forward_mlat "--forward-mlat" - append_arg "$cfg" lat "--lat" - append_arg "$cfg" lon "--lon" - append_arg "$cfg" max_range "--max-range" - append_bool "$cfg" fix "--fix" - append_bool "$cfg" no_fix "--no-fix" - append_bool "$cfg" no_crc_check "--no-crc-check" - append_bool "$cfg" phase_enhance "--phase-enhance" - append_bool "$cfg" mlat "--mlat" - append_bool "$cfg" stats "--stats" - append_bool "$cfg" stats_range "--stats-range" - append_arg "$cfg" stats_every "--stats-every" - append_bool "$cfg" onlyaddr "--onlyaddr" - append_bool "$cfg" metric "--metric" - append_bool "$cfg" gnss "--gnss" - append_arg "$cfg" snip "--snip" - append_arg "$cfg" debug "--debug" - append_arg "$cfg" ppm "--ppm" - append_arg "$cfg" html_dir "--html-dir" - append_arg "$cfg" write_json "--write-json" - config_get aux "$cfg" "write_json" - [ -n "$aux" ] && mkdir -p $aux - append_arg "$cfg" write_json_every "--write-json-every" - append_arg "$cfg" json_location_accuracy "--json-location-accuracy" - append_bool "$cfg" oversample "--oversample" - append_bool "$cfg" dcfilter "--dcfilter" - append_bool "$cfg" measure_noise "--measure-noise" - - config_get_bool aux "$cfg" 'respawn' '0' - [ "$aux" = 1 ] && procd_set_param respawn - - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger "dump1090" -} - -start_service() { - config_load dump1090 - config_foreach start_instance dump1090 -} diff --git a/utils/dvtm/Makefile b/utils/dvtm/Makefile deleted file mode 100644 index 471b0e5..0000000 --- a/utils/dvtm/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=dvtm -PKG_VERSION:=0.15 -PKG_RELEASE:=1 - -PKG_SOURCE:=dvtm-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.brain-dump.org/projects/dvtm/ -PKG_MD5SUM:=887e162a3abe2ad8e86caefab20cdd63 -PKG_MAINTAINER:=Yunfan Jiang - -PKG_LICENSE:=MIT/X -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -define Package/dvtm - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Terminal - DEPENDS:=+libncursesw - TITLE:=dynamic virtual terminal manager - URL:=http://www.brain-dump.org/projects/dvtm/ -endef - -define Package/dvtm/description - dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs. -endef - -define Package/dvtm/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dvtm $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,dvtm)) diff --git a/utils/ecdsautils/Makefile b/utils/ecdsautils/Makefile deleted file mode 100644 index e5f3567..0000000 --- a/utils/ecdsautils/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (C) 2012-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ecdsautils -PKG_VERSION:=0.3.2.20160630 -PKG_RELEASE:=1 -PKG_REV:=07538893fb6c2a9539678c45f9dbbf1e4f222b46 -PKG_MAINTAINER:=Matthias Schiffer -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=git://github.com/tcatm/$(PKG_NAME).git -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_PROTO:=git - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/libecdsautil - SECTION:=libs - CATEGORY:=Libraries - DEPENDS:=+libuecc - TITLE:=ECDSA library - URL:=https://github.com/tcatm/ecdsautils -endef - -define Package/ecdsautils - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libecdsautil +libuecc - TITLE:=ECDSA Utilities - URL:=https://github.com/tcatm/ecdsautils -endef - -CMAKE_OPTIONS += \ - -DCMAKE_BUILD_TYPE:String="MINSIZEREL" \ - - -define Package/libecdsautil/description - Library to sign and verify checksums using ECDSA. -endef - -define Package/ecdsautils/description - Utilities to sign and verify checksums using ECDSA. -endef - -define Package/libecdsautil/install - $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libecdsautil.so* $(1)/usr/lib/ -endef - -define Package/ecdsautils/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ecdsautil $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ecdsakeygen $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ecdsasign $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/ecdsaverify $(1)/usr/bin/ -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/ - $(CP) $(PKG_INSTALL_DIR)/usr/include $(1)/usr/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib $(1)/usr/ -endef - -$(eval $(call BuildPackage,libecdsautil)) -$(eval $(call BuildPackage,ecdsautils)) diff --git a/utils/eudev/Config.in b/utils/eudev/Config.in deleted file mode 100644 index 6cd3970..0000000 --- a/utils/eudev/Config.in +++ /dev/null @@ -1,68 +0,0 @@ -# udev package config - -menu "Configuration" - depends on PACKAGE_eudev - -config EUDEV_EXTRA_ata_id - bool "Install eudev ata_id callout" - default y - help - ata_id - udev callout to read product/serial number - from ATA drives - -config EUDEV_EXTRA_blkid - bool "Use blkid to identify block devices" - default y - help - blkid - make use of libblkid to identify block devices - -config EUDEV_EXTRA_cdrom_id - bool "Install eudev cdrom_id callout" - default y - help - cdrom_id - udev callout to determine the capabilities - of optical drives and media - -config EUDEV_EXTRA_collect - bool "Install eudev collect" - default n - help - Adds ID to the list governed by - -config EUDEV_EXTRA_input_id - bool "Install input_id callout" - default y - help - input_id - udev callout to classify input devices - -config EUDEV_EXTRA_kmod - bool "Use kmod for loading kernel modules" - default n - help - kmod - make use of kmod to load kernel modules on demand - -config EUDEV_EXTRA_mtd_probe - bool "Install mtd_probe callout" - default y - help - mtd_probe - udev callout to probe mtd devices - -config EUDEV_EXTRA_rule_generator - bool "Install (legacy) eudev rule_generator" - default n - help - -config EUDEV_EXTRA_scsi_id - bool "Install eudev scsi_id callout" - default y - help - scsi_id - retrieve and generate a unique SCSI identifier - -config EUDEV_EXTRA_v4l_id - bool "Install eudev v4l_id callout" - default y - help - v4l_id - udev callout to identify Video4Linux devices - - -endmenu diff --git a/utils/eudev/Makefile b/utils/eudev/Makefile deleted file mode 100644 index 9c42b74..0000000 --- a/utils/eudev/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# -# Copyright (C) 2006-2008 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=eudev -PKG_VERSION:=3.2 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://dev.gentoo.org/~blueness/eudev/ -PKG_MD5SUM:=7e42d9b9ed8162021665139520676367 -PKG_LICENSE:=GPL-2.0 - -include $(INCLUDE_DIR)/package.mk - -PKG_BUILD_DEPENDS:=gperf/host -PKG_FIXUP:=autoreconf -PKG_INSTALL=1 - -define Package/libudev - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Dynamic device management subsystem - URL:=https://wiki.gentoo.org/wiki/Project:Eudev - MAINTAINER:=Daniel Golle -endef - -define Package/eudev - SECTION:=base - CATEGORY:=Base system - TITLE:=Dynamic device management subsystem - URL:=https://wiki.gentoo.org/wiki/Project:Eudev - MAINTAINER:=Daniel Golle - MENU:=1 - DEPENDS:=+EUDEV_EXTRA_blkid:libblkid +EUDEV_EXTRA_kmod:libkmod +librt +libudev - PROVIDES:=udev - CONFLICTS:=udev -endef - -define Package/eudev/description -udev allows Linux users to have a dynamic /dev directory and it -provides the ability to have persistent device names. -eudev is a fork of systemd-udev with the goal of obtaining better -compatibility with existing software such as OpenRC and Upstart, older -kernels, various toolchains and anything else required by users and -various distributions. -endef - -define Package/eudev/conffiles -/etc/udev/udev.conf -endef - -define Package/eudev/config - source "$(SOURCE)/Config.in" -endef - -CONFIGURE_ARGS += \ - --prefix=/usr --exec-prefix= --sysconfdir=/etc \ - --libexecdir=/lib/udev --sbindir=/sbin \ - --disable-hwdb --disable-introspection --disable-manpages \ - --disable-selinux \ - $(if $(CONFIG_EUDEV_EXTRA_blkid),--enable-blkid,--disable-blkid) \ - $(if $(CONFIG_EUDEV_EXTRA_kmod),--enable-kmod,--disable-kmod) - - -eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_ata_id) += ata_id - -eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_blkid) += 60-persistent-storage.rules - -eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_cdrom_id) += cdrom_id -eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_cdrom_id) += 60-cdrom_id.rules - -eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_collect) += collect - -eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_input_id) += 60-persistent-input.rules - -eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_mtd_probe) += mtd_probe -eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_mtd_probe) += 75-probe_mtd.rules - -eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_scsi_id) += scsi_id - -eudev-extra-lib-bin-$(CONFIG_EUDEV_EXTRA_v4l_id) += v4l_id -eudev-extra-rules-$(CONFIG_EUDEV_EXTRA_v4l_id) += 60-persistent-v4l.rules - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/libudev.h $(1)/usr/include - $(INSTALL_DIR) $(1)/usr/share/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/udev.pc $(1)/usr/share/pkgconfig - $(INSTALL_DIR) $(1)/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/lib/pkgconfig/libudev.pc $(1)/usr/lib/pkgconfig -endef - -define Package/libudev/install - $(INSTALL_DIR) $(1)/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libudev.so* $(1)/lib -endef - -define Package/eudev/install - $(INSTALL_DIR) $(1)/etc/udev/rules.d - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/udev/udev.conf $(1)/etc/udev - - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/udevadm \ - $(PKG_INSTALL_DIR)/sbin/udevd \ - $(1)/sbin - - $(INSTALL_DIR) $(1)/lib/udev/rules.d - $(INSTALL_DATA) \ - $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \ - $(eudev-extra-rules-y)) \ - $(addprefix $(PKG_INSTALL_DIR)/lib/udev/rules.d/, \ - 50-udev-default.rules \ - 60-block.rules \ - 60-drm.rules \ - 60-evdev.rules \ - 60-persistent-alsa.rules \ - 60-persistent-storage-tape.rules \ - 60-serial.rules \ - 64-btrfs.rules \ - 70-mouse.rules \ - 75-net-description.rules \ - 78-sound-card.rules \ - 80-net-name-slot.rules) \ - $(1)/lib/udev/rules.d - -ifneq ($(eudev-extra-lib-bin-y),) - $(INSTALL_BIN) \ - $(addprefix $(PKG_INSTALL_DIR)/lib/udev/, \ - $(eudev-extra-lib-bin-y)) \ - $(1)/lib/udev/ -endif -endef - -$(eval $(call BuildPackage,eudev)) -$(eval $(call BuildPackage,libudev)) diff --git a/utils/eudev/patches/0001-mtd_probe-uses-stdint_h.patch b/utils/eudev/patches/0001-mtd_probe-uses-stdint_h.patch deleted file mode 100644 index 2ae5634..0000000 --- a/utils/eudev/patches/0001-mtd_probe-uses-stdint_h.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: eudev-3.1.5/src/mtd_probe/mtd_probe.h -=================================================================== ---- eudev-3.1.5.orig/src/mtd_probe/mtd_probe.h -+++ eudev-3.1.5/src/mtd_probe/mtd_probe.h -@@ -18,6 +18,7 @@ - */ - - #include -+#include - - #include "macro.h" - diff --git a/utils/evtest/Makefile b/utils/evtest/Makefile deleted file mode 100644 index e85deeb..0000000 --- a/utils/evtest/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=evtest -PKG_REV:=ab140a2dab1547f7deb5233be6d94a388cf08b26 -PKG_VERSION:=1.33 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=git://anongit.freedesktop.org/evtest -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) - -PKG_MAINTAINER:=Pushpal Sidhu -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/autotools.mk - -define Package/evtest - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Event Test Program -endef - -define Package/evtest/description - Utility to test event driven devices such as keyboards and mice -endef - -define Package/evtest/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/evtest $(1)/sbin/ -endef - -$(eval $(call BuildPackage,evtest)) diff --git a/utils/f2fs-tools/Makefile b/utils/f2fs-tools/Makefile deleted file mode 100644 index 6a39bc7..0000000 --- a/utils/f2fs-tools/Makefile +++ /dev/null @@ -1,90 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=f2fs-tools -PKG_VERSION:=1.7.0 -PKG_RELEASE:=1 - -PKG_LICENSE:=GPLv2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/ -PKG_MD5SUM:=9db22274264f0c88dbee012f257917b1 - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -PKG_MAINTAINER:=Luka Perkov - -include $(INCLUDE_DIR)/package.mk - -define Package/f2fs-tools/Default - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Filesystem - DEPENDS:=+libf2fs - URL:=http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git -endef - -define Package/mkf2fs - $(Package/f2fs-tools/Default) - TITLE:=Utility for creating a Flash-Friendly File System (F2FS) -endef - -define Package/f2fsck - $(Package/f2fs-tools/Default) - TITLE:=Utility for checking/repairing a Flash-Friendly File System (F2FS) -endef - -define Package/f2fs-tools - $(Package/f2fs-tools/Default) - TITLE:=Tools for Flash-Friendly File System (F2FS) - DEPENDS += +mkf2fs +f2fsck -endef - -define Package/libf2fs - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Library for Flash-Friendly File System (F2FS) tools - DEPENDS:=+libuuid -endef - -define Package/libf2fs/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libf2fs.so* $(1)/usr/lib/ -endef - -define Package/mkf2fs/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkfs.f2fs $(1)/usr/sbin -endef - -define Package/f2fsck/install - $(INSTALL_DIR) $(1)/usr/sbin - - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fsck.f2fs $(1)/usr/sbin - ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/defrag.f2fs - ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/dump.f2fs - ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/sload.f2fs - ln -s /usr/sbin/fsck.f2fs $(1)/usr/sbin/resize.f2fs -endef - -define Package/f2fs-tools/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/f2fstat $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fibmap.f2fs $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/parse.f2fs $(1)/usr/sbin -endef - -$(eval $(call BuildPackage,libf2fs)) -$(eval $(call BuildPackage,mkf2fs)) -$(eval $(call BuildPackage,f2fsck)) -$(eval $(call BuildPackage,f2fs-tools)) diff --git a/utils/f2fs-tools/patches/001-compile.patch b/utils/f2fs-tools/patches/001-compile.patch deleted file mode 100644 index 2ff6ee8..0000000 --- a/utils/f2fs-tools/patches/001-compile.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -20,14 +20,9 @@ AC_DEFINE([F2FS_MINOR_VERSION], m4_bpats - [\([0-9]*\).\([0-9]*\)\(\w\|\W\)*], [\2]), - [Minor version for f2fs-tools]) - --AC_CHECK_FILE(.git, -- AC_DEFINE([F2FS_TOOLS_DATE], -- "m4_bpatsubst(f2fs_tools_gitdate, -- [\([0-9-]*\)\(\w\|\W\)*], [\1])", -- [f2fs-tools date based on Git commits]), -- AC_DEFINE([F2FS_TOOLS_DATE], -+AC_DEFINE([F2FS_TOOLS_DATE], - "f2fs_tools_date", -- [f2fs-tools date based on Source releases])) -+ [f2fs-tools date based on Source releases]) - - AC_CONFIG_SRCDIR([config.h.in]) - AC_CONFIG_HEADER([config.h]) diff --git a/utils/f2fs-tools/patches/010-include-byteswap-h.patch b/utils/f2fs-tools/patches/010-include-byteswap-h.patch deleted file mode 100644 index b8c9ff3..0000000 --- a/utils/f2fs-tools/patches/010-include-byteswap-h.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/include/f2fs_fs.h -+++ b/include/f2fs_fs.h -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - - #ifdef HAVE_CONFIG_H - #include diff --git a/utils/f2fs-tools/patches/020-sload.f2fs-allow-to-build-without-libselinux.patch b/utils/f2fs-tools/patches/020-sload.f2fs-allow-to-build-without-libselinux.patch deleted file mode 100644 index eac06c9..0000000 --- a/utils/f2fs-tools/patches/020-sload.f2fs-allow-to-build-without-libselinux.patch +++ /dev/null @@ -1,100 +0,0 @@ -From b0a2386089fd6efade6b89094325ed8a9f8c6fff Mon Sep 17 00:00:00 2001 -From: Christian Hesse -Date: Sat, 22 Oct 2016 22:06:54 +0200 -Subject: [PATCH] sload.f2fs: allow to build without libselinux - -Some systems do not have libselinux. Allow to build sload.f2fs without -support for selinux. - -Signed-off-by: Christian Hesse -Signed-off-by: Jaegeuk Kim ---- - configure.ac | 4 +++- - fsck/sload.c | 12 +++++++++++- - 2 files changed, 14 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f519790..7a62328 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -54,7 +54,9 @@ AC_PATH_PROG([LDCONFIG], [ldconfig], - - # Checks for libraries. - PKG_CHECK_MODULES([libuuid], [uuid]) --PKG_CHECK_MODULES([libselinux], [libselinux]) -+PKG_CHECK_MODULES([libselinux], [libselinux], -+ [AC_DEFINE([HAVE_LIBSELINUX], [1], [Use libselinux])], -+ [AC_MSG_NOTICE([libselinux not found])]) - - # Checks for header files. - AC_CHECK_HEADERS([linux/fs.h fcntl.h mntent.h stdlib.h string.h \ -diff --git a/fsck/sload.c b/fsck/sload.c -index ea072d1..68799c1 100644 ---- a/fsck/sload.c -+++ b/fsck/sload.c -@@ -16,8 +16,11 @@ - #include - #include - #include -+ -+#ifdef HAVE_LIBSELINUX - #include - #include -+#endif - - #ifdef WITH_ANDROID - #include -@@ -110,10 +113,12 @@ static int build_directory(struct f2fs_sb_info *sbi, const char *full_path, - handle_selabel(dentries + i, S_ISDIR(stat.st_mode), - target_out_dir); - -+#ifdef HAVE_LIBSELINUX - if (sehnd && selabel_lookup(sehnd, &dentries[i].secon, - dentries[i].path, stat.st_mode) < 0) - ERR_MSG("Cannot lookup security context for %s\n", - dentries[i].path); -+#endif - - dentries[i].pino = dir_ino; - -@@ -174,6 +179,7 @@ static int build_directory(struct f2fs_sb_info *sbi, const char *full_path, - MSG(1, "Error unknown file type\n"); - } - -+#ifdef HAVE_LIBSELINUX - if (dentries[i].secon) { - inode_set_selinux(sbi, dentries[i].ino, dentries[i].secon); - MSG(1, "File = %s \n----->SELinux context = %s\n", -@@ -184,10 +190,12 @@ static int build_directory(struct f2fs_sb_info *sbi, const char *full_path, - dentries[i].gid, dentries[i].capabilities); - } - -+ free(dentries[i].secon); -+#endif -+ - free(dentries[i].path); - free(dentries[i].full_path); - free((void *)dentries[i].name); -- free(dentries[i].secon); - } - - free(dentries); -@@ -218,6 +226,7 @@ int f2fs_sload(struct f2fs_sb_info *sbi, const char *from_dir, - return ret; - } - -+#ifdef HAVE_LIBSELINUX - if (sehnd) { - char *secontext = NULL; - -@@ -233,6 +242,7 @@ int f2fs_sload(struct f2fs_sb_info *sbi, const char *from_dir, - } - free(secontext); - } -+#endif - - /* update curseg info; can update sit->types */ - move_curseg_info(sbi, SM_I(sbi)->main_blkaddr); --- -2.10.0 - diff --git a/utils/findutils/Makefile b/utils/findutils/Makefile index d884a95..2463fc6 100644 --- a/utils/findutils/Makefile +++ b/utils/findutils/Makefile @@ -8,12 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=findutils PKG_VERSION:=4.6.0 -PKG_RELEASE:=1 +PKG_RELEASE:=3 + +PKG_LICENSE:=GPL-3.0+ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_MD5SUM:=9936aa8009438ce185bea2694a997fc1 -PKG_MAINTAINER:=Daniel Dickinson +PKG_HASH:=ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d +PKG_MAINTAINER:=Daniel Dickinson PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -21,9 +23,10 @@ PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/findutils/Default - TITLE:=GNU findutils + TITLE:=GNU Find Utilities SECTION:=utils CATEGORY:=Utilities + URL:=https://www.gnu.org/software/findutils/ endef define Package/findutils/description/Default @@ -33,56 +36,57 @@ sufficient functionality, but some users may want or need the full functionality of the GNU tools. endef -define Package/findutils-find +define Package/findutils $(call Package/findutils/Default) - TITLE+= (find) + TITLE+= (all) + DEPENDS:= \ + +findutils-find \ + +findutils-xargs \ + +findutils-locate endef -define Package/findutils-find/description -$(call Package/findutils/description/Default) -This package contains the find utility +define Package/findutils-find + $(call Package/findutils/Default) + TITLE+= - find utility + ALTERNATIVES:=300:/usr/bin/find:/usr/libexec/findutils-find endef define Package/findutils-xargs $(call Package/findutils/Default) - TITLE := (xargs) -endef - -define Package/findutils-xargs/description -$(call Package/findutils/description/Default) -This package contains the xargs utility + TITLE+= - xargs utility + ALTERNATIVES:=300:/usr/bin/xargs:/usr/libexec/findutils-xargs endef define Package/findutils-locate $(call Package/findutils/Default) - TITLE := (locate) -endef - -define Package/findutils-locate/description -$(call Package/findutils/description/Default) -This package contains the locate and related updatedb utility + TITLE+= - locate and updatedb utility endef CONFIGURE_ARGS += --localstatedir=/srv/var CONFIGURE_VARS += ac_cv_path_SORT=sort +define Package/findutils/install + true +endef + define Package/findutils-find/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/find $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/find $(1)/usr/libexec/findutils-find endef define Package/findutils-xargs/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xargs $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/libexec + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xargs $(1)/usr/libexec/findutils-xargs endef define Package/findutils-locate/install $(INSTALL_DIR) $(1)/usr/bin $(1)/srv/var - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/locate $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/updatedb $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/locate $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/updatedb $(1)/usr/bin/ $(CP) $(PKG_INSTALL_DIR)/usr/lib $(1)/usr/ endef +$(eval $(call BuildPackage,findutils)) $(eval $(call BuildPackage,findutils-find)) -$(eval $(call BuildPackage,findutils-xargs)) $(eval $(call BuildPackage,findutils-locate)) +$(eval $(call BuildPackage,findutils-xargs)) diff --git a/utils/flashrom/Makefile b/utils/flashrom/Makefile index bc062d3..e2152b6 100644 --- a/utils/flashrom/Makefile +++ b/utils/flashrom/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2010-2016 OpenWrt.org +# Copyright (C) 2010-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=flashrom -PKG_VERSION:=0.9.9 -PKG_RELEASE:=2 +PKG_VERSION:=1.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://download.flashrom.org/releases PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_MD5SUM:=aab9c98925d9cfb5ffb28b67a6112530 +PKG_HASH:=3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170c4dc9dee64 PKG_MAINTAINER:=Álvaro Fernández Rojas PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR) diff --git a/utils/flashrom/patches/0001-fix_internal_bitbang.patch b/utils/flashrom/patches/0001-fix_internal_bitbang.patch index 376d6b2..581e070 100644 --- a/utils/flashrom/patches/0001-fix_internal_bitbang.patch +++ b/utils/flashrom/patches/0001-fix_internal_bitbang.patch @@ -1,6 +1,6 @@ --- a/programmer.h +++ b/programmer.h -@@ -557,7 +557,7 @@ enum spi_controller { +@@ -584,7 +584,7 @@ enum spi_controller { #if CONFIG_DEDIPROG == 1 SPI_CONTROLLER_DEDIPROG, #endif diff --git a/utils/flashrom/patches/0002-fix-io-h-include.patch b/utils/flashrom/patches/0002-fix-io-h-include.patch index 50aa2a8..63109e1 100644 --- a/utils/flashrom/patches/0002-fix-io-h-include.patch +++ b/utils/flashrom/patches/0002-fix-io-h-include.patch @@ -1,12 +1,10 @@ -diff -uprN a/linux_spi.c b/linux_spi.c ---- a/flash.h 2015-02-08 16:57:52.000000000 -0500 -+++ b/flash.h 2016-01-08 20:09:51.599387507 -0500 +--- a/flash.h ++++ b/flash.h @@ -30,6 +30,7 @@ #include #include #include +#include + #include #include #if IS_WINDOWS - #include - diff --git a/utils/flashrom/patches/0003-ch341a_spi-avoid-deprecated-libusb-functions.patch b/utils/flashrom/patches/0003-ch341a_spi-avoid-deprecated-libusb-functions.patch new file mode 100644 index 0000000..7a9be3b --- /dev/null +++ b/utils/flashrom/patches/0003-ch341a_spi-avoid-deprecated-libusb-functions.patch @@ -0,0 +1,40 @@ +From 291764a70e6d8b212680e311bfb0825abf2b9a2f Mon Sep 17 00:00:00 2001 +From: Alex James +Date: Sat, 14 Apr 2018 22:59:57 -0500 +Subject: ch341a_spi: Avoid deprecated libusb functions + +libusb 1.0.22 marked libusb_set_debug as deprecated. For such versions +of libusb, use libusb_set_option instead. + +Change-Id: Ib71ebe812316eaf49136979a942a946ef9e4d487 +Signed-off-by: Alex James +Reviewed-on: https://review.coreboot.org/25681 +Tested-by: Nico Huber +Reviewed-by: David Hendricks +--- + ch341a_spi.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +(limited to 'ch341a_spi.c') + +diff --git a/ch341a_spi.c b/ch341a_spi.c +index 95e9c95..ee18624 100644 +--- a/ch341a_spi.c ++++ b/ch341a_spi.c +@@ -441,7 +441,12 @@ int ch341a_spi_init(void) + return -1; + } + +- libusb_set_debug(NULL, 3); // Enable information, warning and error messages (only). ++ /* Enable information, warning, and error messages (only). */ ++#if LIBUSB_API_VERSION < 0x01000106 ++ libusb_set_debug(NULL, 3); ++#else ++ libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO); ++#endif + + uint16_t vid = devs_ch341a_spi[0].vendor_id; + uint16_t pid = devs_ch341a_spi[0].device_id; +-- +cgit v1.1 + diff --git a/utils/flent-tools/Makefile b/utils/flent-tools/Makefile deleted file mode 100644 index b4ef022..0000000 --- a/utils/flent-tools/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2007-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=flent-tools -PKG_VERSION:=1.0.1 -PKG_LICENSE:=GPLv3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/tohojo/flent -PKG_REV:=03c72cc340def354024351b6500774b11170d5ba -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) - -include $(INCLUDE_DIR)/package.mk - -define Package/flent-tools - SECTION:=util - CATEGORY:=Utilities - TITLE:=Helper programs for the Flent test tool - URL:=https://flent.org - MAINTAINER:=Toke Høiland-Jørgensen - DEPENDS+=+librt -endef - -define Package/flent-tc_iterate/description - This builds the C helper programs for gathering data for - the Flent network testing tool. These tools are needed for - gathering data when a Bash shell is not available (and also - perform better than the shell equivalents). -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/misc \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -std=gnu99" -endef - -define Package/flent-tools/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/tc_iterate $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/wifistats_iterate $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,flent-tools)) diff --git a/utils/fontconfig/Makefile b/utils/fontconfig/Makefile deleted file mode 100644 index 7d0ef2d..0000000 --- a/utils/fontconfig/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (C) 2008-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=fontconfig -PKG_VERSION:=2.11.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://fontconfig.org/release/ -PKG_MD5SUM:=824d000eb737af6e16c826dd3b2d6c90 - -PKG_FIXUP:=libtool -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/fontconfig - SECTION:=xorg-util - CATEGORY:=Xorg - SUBMENU:=font-utils - TITLE:=fontconfig - DEPENDS:=+libpthread +libexpat +libfreetype - URL:=http://fontconfig.org/ -endef - -#TODO: better put cache on persistent storage for faster boot time? -CONFIGURE_ARGS+= \ - --with-cache-dir=/tmp/fontconfig/cache \ - --with-arch=$(ARCH) \ - --disable-iconv \ - --disable-libxml2 \ - --disable-docs - -CONFIGURE_VARS+= \ - ac_cv_prog_HASDOCBOOK=no \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/fontconfig $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfontconfig.* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fontconfig.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/fontconfig/install - $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/usr/share/fontconfig/conf.avail - $(INSTALL_DIR) $(1)/etc/fonts/conf.d - $(CP) $(PKG_INSTALL_DIR)/etc/fonts/fonts.conf $(1)/etc/fonts - $(CP) $(PKG_INSTALL_DIR)/etc/fonts/conf.d/* $(1)/etc/fonts/conf.d - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/fontconfig/conf.avail/* $(1)/usr/share/fontconfig/conf.avail - $(INSTALL_DIR) $(1)/etc/init.d -# $(INSTALL_BIN) ./files/fontconfig.init $(1)/etc/init.d/fontconfig -endef - -$(eval $(call BuildPackage,fontconfig)) diff --git a/utils/gammu/Makefile b/utils/gammu/Makefile deleted file mode 100644 index f2ab0fc..0000000 --- a/utils/gammu/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# 2014-2015 Vitaly Protsko -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gammu -PKG_VERSION:=1.37.4 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://dl.cihar.com/gammu/releases/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MD5SUM:=38e6f5a48fe05a64b0f0f1dc6787f1f2 -PKG_MAINTAINER:=Vitaly Protsko -PKG_LICENCE:=GPL-2.0 - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/gammu - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Cell phone/modem SMS and control tool - URL:=http://dl.cihar.com/gammu/releases/ - DEPENDS:=+libpthread +libcurl +glib2 $(ICONV_DEPENDS) $(INTL_DEPENDS) - DEPENDS+=+PACKAGE_python:python +PACKAGE_bluez-libs:bluez-libs - DEPENDS+=+PACKAGE_libmysqlclient:libmysqlclient +PACKAGE_unixodbc:unixodbc +PACKAGE_libpq:libpq - DEPENDS+=+PACKAGE_libusb-1.0:libusb-1.0 -endef - -CMAKE_OPTIONS += -DWITH_LibDBI:BOOL=OFF -ifneq ($(INTL_FULL),) -CMAKE_OPTIONS += -DLIBINTL_INCLUDE_DIRS:PATH=$(INTL_PREFIX)/include -CMAKE_OPTIONS += -DLIBINTL_LIBRARIES:STRING=intl -endif -ifneq ($(ICONV_FULL),) -CMAKE_OPTIONS += -DDISABLE_ICONV=OFF -CMAKE_OPTIONS += -DICONV_INCLUDE_DIRS:PATH=$(ICONV_PREFIX)/include -CMAKE_OPTIONS += -DICONV_LIBRARIES:STRING=iconv -endif - -define Build/InstallDev - mkdir -p $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/gammu $(1)/usr/include/ - mkdir -p $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/lib{Gammu*,gsmsd*} $(1)/usr/lib/ -endef - -define Package/gammu/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu-{smsd,smsd-inject,smsd-monitor} $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/lib{Gammu*,gsmsd*} $(1)/usr/lib - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/gammu $(1)/etc/config/gammu - $(INSTALL_BIN) ./files/gammu.init $(1)/etc/init.d/gammu -endef - -define Package/gammu/conffiles -/etc/config/gammu -endef - -$(eval $(call BuildPackage,gammu)) diff --git a/utils/gammu/files/gammu b/utils/gammu/files/gammu deleted file mode 100644 index d05fb25..0000000 --- a/utils/gammu/files/gammu +++ /dev/null @@ -1,5 +0,0 @@ -config daemon default - option enabled 0 - option device /dev/ttyUSB0 - option connection at - option logfile syslog diff --git a/utils/gammu/files/gammu.init b/utils/gammu/files/gammu.init deleted file mode 100755 index 3723245..0000000 --- a/utils/gammu/files/gammu.init +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 villy@sft.ru - -START=98 - -USE_PROCD=1 -PROG=/usr/bin/gammu-smsd -CONFPFX=/var/gammu - -start_instance() { - local conf="$1" - local item - local conffile="$CONFPFX-$conf.conf" - - config_get_bool item "$conf" enabled 0 - [ $item = 0 ] && return - - echo -e "; don't edit. instead look into /etc/config/gammu\n[gammu]\n" > $conffile - - config_get item "$conf" device - [ -z "$item" ] && return - echo "device = $item" >> $conffile - - config_get item "$conf" connection - [ -z "$item" ] && return - echo "connection = $item" >> $conffile - - config_get item "$conf" logfile - [ -z "$item" ] && item=syslog - echo "logfile = $item" >> $conffile - - echo -e "\n[smsd]\nphoneid = $conf\nservice = files\nlogfile = $item" >> $conffile - echo -e "checkbattery = 0\nhangupcalls = 1" >> $conffile - - config_get item "$conf" pin - [ -n "$item" ] && echo "pin = $item" >> $conffile - - config_get item "$conf" phonecode - [ -n "$item" ] && echo "phonecode = $item" >> $conffile - - config_get item "$conf" send - [ -n "$item" ] && echo "send = $item" >> $conffile - - config_get item "$conf" receive - [ -n "$item" ] && echo "receive = $item" >> $conffile - - config_get item "$conf" timeout - [ -n "$item" ] && echo "commtimeout = $item" >> $conffile - - config_get item "$conf" sleep - [ -n "$item" ] && echo "loopsleep = $item" >> $conffile - - config_get item "$conf" report - [ -n "$item" ] && echo "deliveryreport = $item" >> $conffile - - config_get item "$conf" onreceive - [ -n "$item" ] && echo "runonreceive = $item" >> $conffile - - config_get item "$conf" onerror - [ -n "$item" ] && echo "runonfailure = $item" >> $conffile - - config_get item "$conf" spool - [ -z "$item" ] && item=/var/sms - [ ! -d $item ] && { - mkdir $item - mkdir $item/inbox - mkdir $item/outbox - mkdir $item/sent - mkdir $item/error - } - echo -e "inboxpath = $item/inbox/\noutboxpath = $item/outbox/" >> $conffile - echo -e "sentsmspath = $item/sent/\nerrorsmspath = $item/error/" >> $conffile - - config_get item "$conf" allow - [ -n "$item" ] && { - local data - local allowfile=$CONFPFX-$conf.allow - for data in $item ; do - echo $data >> $allowfile - done - - echo "includenumbersfile = $allowfile" >> $conffile - } - - config_get item "$conf" deny - [ -n "$item" ] && { - local data - local denyfile=$CONFPFX-$conf.deny - for data in $item ; do - echo $data >> $denyfile - done - - echo "excludenumbersfile = $denyfile" >> $conffile - } - - procd_open_instance - - config_get_bool item "$conf" respawn 0 - [ $item != 0 ] && procd_set_param respawn - - procd_set_param command $PROG --config=$conffile - - config_get item "$conf" pidfile - [ -n "$item" ] && procd_append_param command --pid=$item - - procd_close_instance -} - -start_service() { - config_load gammu - config_foreach start_instance daemon -} - -service_triggers() { - procd_add_reload_trigger "gammu" -} diff --git a/utils/gammu/patches/001-iconv-disabling-option.patch b/utils/gammu/patches/001-iconv-disabling-option.patch deleted file mode 100644 index 91abfe7..0000000 --- a/utils/gammu/patches/001-iconv-disabling-option.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- a/cmake/FindIconv.cmake -+++ b/cmake/FindIconv.cmake -@@ -34,9 +34,9 @@ string(REGEX REPLACE "(.*)/include/?" "\ - - FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv c HINTS "${ICONV_INCLUDE_BASE_DIR}/lib" PATHS /opt/local/lib) - --IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) -+IF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - SET(ICONV_FOUND TRUE) --ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) -+ENDIF(NOT DISABLE_ICONV AND ICONV_INCLUDE_DIR AND ICONV_LIBRARIES) - - set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) ---- a/configure -+++ b/configure -@@ -31,6 +31,7 @@ Usage: ./configure [options] - --enable-backup enable backup support - --enable-win32 enable mingw crosscomilation - --enable-protection enable compile time protections -+--disable-iconv disable iconv support - --with-python= path to Python interpreter - --without-gnapplet disable installation of gnapplet - --without-completion disable installation of bash completion script -@@ -57,6 +58,7 @@ CMAKE_PROTECTION= - CMAKE_PYTHON= - CMAKE_GNAP= - CMAKE_COMPLETE= -+CMAKE_ICONV= - - # process command line - while [ "$#" -gt 0 ] ; do -@@ -94,6 +96,12 @@ while [ "$#" -gt 0 ] ; do - --disable-protection) - CMAKE_PROTECTION="-DENABLE_PROTECTION=OFF" - ;; -+ --enable-iconv) -+ CMAKE_ICONV="-DDISABLE_ICONV=OFF" -+ ;; -+ --disable-iconv) -+ CMAKE_ICONV="-DDISABLE_ICONV=ON" -+ ;; - --enable-debug) - CMAKE_DEBUG="-DCMAKE_BUILD_TYPE=Debug" - ;; -@@ -142,4 +150,4 @@ fi - cd "$BUILD_DIR" - - # invoke cmake to do configuration --cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE -+cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV diff --git a/utils/gammu/patches/002-no-fstack-protector.patch b/utils/gammu/patches/002-no-fstack-protector.patch deleted file mode 100644 index ec0badf..0000000 --- a/utils/gammu/patches/002-no-fstack-protector.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -537,8 +537,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMP - # MACRO_TUNE_LINKER("-pie") - # These do not work on Windows right now - if (NOT WIN32) -- # Stack protector -- MACRO_TUNE_COMPILER("-fstack-protector") - # Mark code read only - MACRO_TUNE_LINKER("-Wl,-zrelro") - endif (NOT WIN32) diff --git a/utils/gammu/patches/003-cmake-cross-toolchain.patch b/utils/gammu/patches/003-cmake-cross-toolchain.patch deleted file mode 100644 index cfacf11..0000000 --- a/utils/gammu/patches/003-cmake-cross-toolchain.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- /dev/null -+++ b/cmake/Toolchain-cross.cmake -@@ -0,0 +1,5 @@ -+# search for programs in the build host directories -+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -+# for libraries and headers in the target directories -+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) ---- a/configure -+++ b/configure -@@ -25,6 +25,7 @@ Usage: ./configure [options] - - --help|-h shows this help - --prefix= installation prefix -+--cross-root= cross-compilation prefix - --enable-shared enables shared build - --enable-debug enables debug build - --enable-tiger enables Mac OS X 10.4 (Tiger) build -@@ -50,6 +51,7 @@ SOURCE_DIR=`pwd` - - # cmake parameters - CMAKE_PREFIX= -+CMAKE_ROOT= - CMAKE_SHARED= - CMAKE_DEBUG= - CMAKE_BACKUP= -@@ -69,6 +71,10 @@ while [ "$#" -gt 0 ] ; do - --prefix=*) - CMAKE_PREFIX="-DCMAKE_INSTALL_PREFIX=${1##--prefix=}" - ;; -+ --cross-root=*) -+ CMAKE_ROOT="-DCMAKE_TOOLCHAIN_FILE=$SOURCE_DIR/cmake/Toolchain-cross.cmake" -+ echo "SET(CMAKE_FIND_ROOT_PATH ${1##--cross-root=})" >> $SOURCE_DIR/cmake/Toolchain-cross.cmake -+ ;; - --with-python=*) - CMAKE_PYTHON="-DBUILD_PYTHON=${1##--with-python=}" - ;; -@@ -150,4 +156,4 @@ fi - cd "$BUILD_DIR" - - # invoke cmake to do configuration --cmake $SOURCE_DIR $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV -+cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV diff --git a/utils/gammu/patches/004-cmake_libdbi_optional.patch b/utils/gammu/patches/004-cmake_libdbi_optional.patch deleted file mode 100644 index c1e6728..0000000 --- a/utils/gammu/patches/004-cmake_libdbi_optional.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- a/configure -+++ b/configure -@@ -36,6 +36,7 @@ Usage: ./configure [options] - --with-python= path to Python interpreter - --without-gnapplet disable installation of gnapplet - --without-completion disable installation of bash completion script -+--without-libdbi disable libdbi support - - All enable params have their disable counterparts. - -@@ -61,6 +62,7 @@ CMAKE_PYTHON= - CMAKE_GNAP= - CMAKE_COMPLETE= - CMAKE_ICONV= -+CMAKE_LIBDBI= - - # process command line - while [ "$#" -gt 0 ] ; do -@@ -120,6 +122,9 @@ while [ "$#" -gt 0 ] ; do - --without-completion) - CMAKE_COMPLETE="-DINSTALL_BASH_COMPLETION=OFF" - ;; -+ --without-libdbi) -+ CMAKE_LIBDBI="-DWITH_LibDBI=OFF" -+ ;; - --build=*) - ;; - --disable-dependency-tracking) -@@ -156,4 +161,4 @@ fi - cd "$BUILD_DIR" - - # invoke cmake to do configuration --cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV -+cmake $SOURCE_DIR $CMAKE_ROOT $CMAKE_PREFIX $CMAKE_SHARED $CMAKE_DEBUG $CMAKE_BACKUP $CMAKE_CROSS $CMAKE_PROTECTION $CMAKE_PYTHON $CMAKE_GNAP $CMAKE_COMPLETE $CMAKE_ICONV $CMAKE_LIBDBI diff --git a/utils/gammu/patches/010-utils-shell-fix.patch b/utils/gammu/patches/010-utils-shell-fix.patch deleted file mode 100644 index d1b3ec3..0000000 --- a/utils/gammu/patches/010-utils-shell-fix.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/utils/gammu-config -+++ b/utils/gammu-config -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # Gammu configuration generator - # Copyright (C) 2003 - 2009 Michal Cihar - # vim: expandtab sw=4 ts=4 sts=4: ---- a/utils/jadmaker -+++ b/utils/jadmaker -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/bin/sh - # JAD file generator - # Copyright © 2008 - 2009 Michal Čihař - # vim: expandtab sw=4 ts=4 sts=4: diff --git a/utils/gawk/Makefile b/utils/gawk/Makefile new file mode 100644 index 0000000..fc13e36 --- /dev/null +++ b/utils/gawk/Makefile @@ -0,0 +1,45 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gawk +PKG_VERSION:=5.0.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@GNU/gawk + +PKG_HASH:=50f091ed0eb485ad87dbb620d773a3e2c31a27f75f5e008f7bf065055f024406 + +PKG_LICENSE:=GPL +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Daniel Golle + +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/gawk + SECTION:=utils + CATEGORY:=Utilities + URL:=https://www.gnu.org/software/gawk/ + TITLE:=GNU awk + DEPENDS:=+libncursesw +libreadline +endef + +define Package/gawk/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/gawk $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/lib/gawk + $(CP) $(PKG_INSTALL_DIR)/usr/lib/gawk/* $(1)/usr/lib/gawk/ + $(INSTALL_DIR) $(1)/usr/lib/awk + $(CP) $(PKG_INSTALL_DIR)/usr/lib/awk/* $(1)/usr/lib/awk/ + $(INSTALL_DIR) $(1)/usr/share/awk + $(CP) $(PKG_INSTALL_DIR)/usr/share/awk/* $(1)/usr/share/awk/ +endef + +$(eval $(call BuildPackage,gawk)) + diff --git a/utils/gkermit/Makefile b/utils/gkermit/Makefile deleted file mode 100644 index 6f3b19c..0000000 --- a/utils/gkermit/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (C) 2017 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:=gkermit -PKG_VERSION:=1.00 -PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0 - -PKG_SOURCE:=gku100.tar.gz -PKG_SOURCE_URL:=ftp://kermit.columbia.edu/kermit/archives -PKG_MD5SUM:=aea4fa728b9981fce41c9f2c635f2e05 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_MAINTAINER:=Nathaniel Wesley Filardo - -include $(INCLUDE_DIR)/package.mk - -define Package/gkermit - SECTION:=utils - CATEGORY:=Utilities - TITLE:=gkermit - URL:=http://www.columbia.edu/kermit/gkermit.html -endef - -define Package/gkermit/description - A minimal kermit file transfer program -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - tar -C $(PKG_BUILD_DIR) -xzvf "$(DL_DIR)/$(PKG_SOURCE)" -endef - -# nothing to do -define Build/Configure -endef - -define Build/Compile - mkdir -p $(PKG_INSTALL_DIR) - $(TARGET_CC) \ - $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \ - -include string.h -include unistd.h \ - -DPOSIX -DERRNO_H \ - -o $(PKG_INSTALL_DIR)/gkermit \ - $(PKG_BUILD_DIR)/{gproto,gkermit,gunixio,gcmdline}.c -endef - -define Package/gkermit/install - $(INSTALL_DIR) $(1)/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/gkermit $(1)/bin -endef - -$(eval $(call BuildPackage,gkermit)) diff --git a/utils/gnupg/Makefile b/utils/gnupg/Makefile deleted file mode 100644 index 62b52d6..0000000 --- a/utils/gnupg/Makefile +++ /dev/null @@ -1,110 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gnupg -PKG_VERSION:=1.4.21 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/gnupg \ - ftp://ftp.gnupg.org/gcrypt/gnupg -PKG_MD5SUM:=9bdeabf3c0f87ff21cb3f9216efdd01d -PKG_HASH:=6b47a3100c857dcab3c60e6152e56a997f2c7862c1b8b2b25adf3884a1ae2276 - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Daniel Dickinson - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/gnupg/Default - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Encryption - DEPENDS:=+zlib +libncurses +libreadline - TITLE:=GNU privacy guard - a free PGP replacement - URL:=http://www.gnupg.org/ -endef - -define Package/gnupg - $(call Package/gnupg/Default) - MENU:=1 -endef - -define Package/gpgv - $(call Package/gnupg/Default) - TITLE:=GnuPG signature verification only -endef - -define Package/gnupg-utils - $(call Package/gnupg/Default) - DEPENDS:=gnupg +libcurl - TITLE:=Key management utilities for GnuPG -endef - -define Package/gnupg/description - GnuPG is GNU's tool for secure communication and data storage. - It can be used to encrypt data and to create digital signatures. - It includes an advanced key management facility and is compliant - with the proposed OpenPGP Internet standard as described in RFC2440. - . - GnuPG does not use any patented algorithms so it cannot be compatible - with PGP2 because it uses IDEA (which is patented worldwide). -endef - -define Package/gpgv/description - GPGv is a stripped down version of GnuPG that only checks signatures. - . - GnuPG does not use any patented algorithms so it cannot be compatible - with PGP2 because it uses IDEA (which is patented worldwide). -endef - -define Package/gnupg-utils/description - Key management utilies for GnuPG. - This package is needed to import keys from a keyserver. -endef - -CONFIGURE_ARGS += \ - --disable-rpath \ - --disable-asm \ - --disable-gnupg-iconv \ - --disable-card-support \ - --disable-agent-support \ - --disable-bzip2 \ - --disable-ldap \ - --disable-finger \ - --disable-dns-srv \ - --disable-regex \ - -MAKE_FLAGS += \ - SUBDIRS="m4 intl zlib util mpi cipher tools g10 keyserver ${checks}" \ - -define Package/gnupg/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpg $(1)/usr/bin/ -endef - -define Package/gpgv/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpgv $(1)/usr/bin/ -endef - -define Package/gnupg-utils/install - $(INSTALL_DIR) $(1)/usr/lib/gnupg - for file in gpgkeys_curl gpgkeys_hkp; do \ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnupg/$$$$file \ - $(1)/usr/lib/gnupg/; \ - done -endef - -$(eval $(call BuildPackage,gnupg)) -$(eval $(call BuildPackage,gpgv)) -$(eval $(call BuildPackage,gnupg-utils)) diff --git a/utils/gpsd/Makefile b/utils/gpsd/Makefile deleted file mode 100644 index ee72b95..0000000 --- a/utils/gpsd/Makefile +++ /dev/null @@ -1,146 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gpsd -PKG_VERSION:=3.16 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME) -PKG_MD5SUM:=68691b5de4c94f82ec4062b042b5eb63 - -PKG_MAINTAINER:=Pushpal Sidhu -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=COPYING - -PKG_BUILD_DEPENDS:=libncurses libusb-1.0 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/scons.mk - -define Package/gpsd/Default - DEPENDS:=+librt +libncurses - URL:=http://catb.org/gpsd/ -endef - -define Package/gpsd/Default/description - gpsd is a userland daemon acting as a translator between GPS and AIS receivers - and their clients. gpsd listens on port 2947 for clients requesting - position/time/velocity information. The receivers are expected to generate - position information in a well-known format -- as NMEA-0183 sentences, SiRF - binary, Rockwell binary, Garmin binary format, or other vendor binary - protocols. gpsd takes this information from the GPS and translates it into - something uniform and easier to understand for clients. -endef - -define Package/gpsd - $(call Package/gpsd/Default) - SECTION:=net - CATEGORY:=Network - DEPENDS+= +libgps +libusb-1.0 - TITLE:=An interface daemon for GPS receivers -endef - -define Package/gpsd/conffiles -/etc/config/gpsd -endef - -define Package/gpsd/description - $(call Package/gpsd/Default/description) - This package contains the GPS daemon. -endef - -define Package/gpsd-clients - $(call Package/gpsd/Default) - SECTION:=net - CATEGORY:=Network - DEPENDS+= +libgps +libncurses +libusb-1.0 - TITLE:=GPS tools and clients -endef - -define Package/gpsd-clients/description - $(call Package/gpsd/Default/description) - This package contains auxiliary tools and example clients for monitoring and - testing the GPS daemon. -endef - -define Package/libgps - $(call Package/gpsd/Default) - SECTION:=libs - CATEGORY:=Libraries - DEPENDS+= +libcap - TITLE:=C service library for communicating with the GPS daemon -endef - -define Package/libgps/description - $(call Package/gpsd/Default/description) - This package contains the libgps library. -endef - -SCONS_VARS += \ - LINKFLAGS="$(TARGET_LDFLAGS)" - -SCONS_OPTIONS += \ - dbus_export=no \ - tsip=no \ - fv18=no \ - tripmate=no \ - earthmate=no \ - itrax=no \ - navcom=no \ - ubx=no \ - evermore=no \ - ntrip=no \ - libgpsmm=no \ - libQgpsmm=no \ - bluez=no \ - nostrip=yes \ - python=no \ - implicit_link=no \ - chrpath=no \ - target="$(TARGET_CROSS:-=)" - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/gps.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps*.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgps*.pc \ - $(1)/usr/lib/pkgconfig/ -endef - -define Package/gpsd/install - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/gpsd.config $(1)/etc/config/gpsd - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/gpsd.init $(1)/etc/init.d/gpsd - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/gpsd $(1)/usr/sbin/ -endef - -define Package/gpsd-clients/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/cgps \ - $(PKG_INSTALL_DIR)/usr/bin/gps{ctl,decode,mon,pipe} \ - $(PKG_INSTALL_DIR)/usr/bin/gpxlogger \ - $(PKG_INSTALL_DIR)/usr/bin/lcdgps \ - $(1)/usr/bin/ -endef - -define Package/libgps/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgps.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,gpsd)) -$(eval $(call BuildPackage,gpsd-clients)) -$(eval $(call BuildPackage,libgps)) diff --git a/utils/gpsd/files/gpsd.config b/utils/gpsd/files/gpsd.config deleted file mode 100644 index c0c88e0..0000000 --- a/utils/gpsd/files/gpsd.config +++ /dev/null @@ -1,5 +0,0 @@ -config gpsd 'core' - option enabled '0' - option device '/dev/ttyUSB0' - option port '2947' - option listen_globally '0' diff --git a/utils/gpsd/files/gpsd.init b/utils/gpsd/files/gpsd.init deleted file mode 100644 index 96cee78..0000000 --- a/utils/gpsd/files/gpsd.init +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2009-2011 OpenWrt.org -START=50 - -NAME=gpsd -PIDF=/var/run/$NAME.pid -PROG=/usr/sbin/$NAME - -start() { - config_load gpsd - config_get device core device - config_get port core port - config_get_bool listen_globally core listen_globally - config_get_bool enabled core enabled - [ "$enabled" != "1" ] && exit - logger -t "$NAME" "Starting..." - [ ! -c "$device" ] && { - logger -t "$NAME" "Unable to find device $device. Exiting." - exit 1 - } - [ "$listen_globally" != "0" ] && append args "-G" - $PROG -n -P $PIDF -S $port $args $device -} - -stop() { - logger -t "$NAME" "Stopping..." - [ -f "$PIDF" ] && { - read PID < "$PIDF" - kill -9 $PID - rm $PIDF - } -} diff --git a/utils/gpsd/patches/0002-ncurses6_detection.patch b/utils/gpsd/patches/0002-ncurses6_detection.patch deleted file mode 100644 index 7a1f409..0000000 --- a/utils/gpsd/patches/0002-ncurses6_detection.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: gpsd-3.16/SConstruct -=================================================================== ---- gpsd-3.16.orig/SConstruct -+++ gpsd-3.16/SConstruct -@@ -543,6 +543,10 @@ else: - ncurseslibs = pkg_config('ncurses') - if config.CheckPKG('tinfo'): - ncurseslibs += pkg_config('tinfo') -+ elif WhereIs('ncurses6-config'): -+ ncurseslibs = ['!ncurses6-config --libs --cflags'] -+ elif WhereIs('ncursesw6-config'): -+ ncurseslibs = ['!ncursesw6-config --libs --cflags'] - elif WhereIs('ncurses5-config'): - ncurseslibs = ['!ncurses5-config --libs --cflags'] - elif WhereIs('ncursesw5-config'): diff --git a/utils/gptfdisk/Makefile b/utils/gptfdisk/Makefile deleted file mode 100644 index 3ce5a69..0000000 --- a/utils/gptfdisk/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# -# Copyright (C) 2016 Daniel Engberg -# -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gptfdisk -PKG_VERSION:=1.0.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/gptfdisk -PKG_MD5SUM:=d7f3d306b083123bcc6f5941efade586 - -include $(INCLUDE_DIR)/package.mk - -define Package/gptfdisk/default - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Disc - URL:=http://www.rodsbooks.com/gdisk - MAINTAINER:=Daniel Engberg -endef - -define Package/gdisk - $(call Package/gptfdisk/default) - TITLE:=GPT partition table manipulation utility - DEPENDS:=+libstdcpp +libuuid +libpopt -endef - -define Package/gdisk/description - GPT partition table manipulation utility with an interface - similar to fdisk. It can read and convert MBR partitions in GPT - but is otherwise unable to generate or modify MBR partitions. -endef - -define Package/sgdisk - $(call Package/gptfdisk/default) - TITLE:=script-friendly GPT partition table manipulation utility - DEPENDS:=+libstdcpp +libuuid +libpopt -endef - -define Package/sgdisk/description - Script-friendly GPT partition table manipulation utility. - It can read and convert MBR partitions in GPT but is otherwise - unable to generate or modify MBR partitions. - To the contrary of gdisk, its interface is geared towards scripts, - so it takes command line arguments instead of being interactive. - It will NOT ask confirmation before carrying out the operations. - It has a slightly smaller footprint than gdisk tool. -endef - -define Package/cgdisk - $(call Package/gptfdisk/default) - TITLE:=ncurses-based GPT partition table manipulation utility - DEPENDS:=+libstdcpp +libuuid +libncurses +libpopt -endef - -define Package/cgdisk/description -ncurses-based partition table manipulation utility with GPT support. -Similar to sfdisk, but works with GPT partitions. Shares the same limitations -of the gdisk partition utility. While it can read and convert MBR partitions -in GPT, it cannot modify MBR partitions on its own. -endef - -define Package/gdisk/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/gdisk $(1)/usr/sbin -endef - -define Package/sgdisk/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/sgdisk $(1)/usr/sbin -endef - -define Package/cgdisk/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgdisk $(1)/usr/sbin -endef - -$(eval $(call BuildPackage,gdisk)) -$(eval $(call BuildPackage,sgdisk)) -$(eval $(call BuildPackage,cgdisk)) diff --git a/utils/grep/Makefile b/utils/grep/Makefile deleted file mode 100644 index 6ee0697..0000000 --- a/utils/grep/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2010-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=grep -PKG_VERSION:=2.26 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNU/grep -PKG_MD5SUM:=afdd61c7221434722671baf002ac9267 - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Julen Landa Alustiza - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -TARGET_CFLAGS+=--std=gnu99 - -define Package/grep - SECTION:=utils - CATEGORY:=Utilities - TITLE:=grep search utility - full version - DEPENDS:=+libpcre - URL:=http://www.gnu.org/software/grep/ -endef - -define Package/grep/description -The grep command searches one or more input files for lines -containing a match to a specified pattern. By default, grep -prints the matching lines. -endef - -define Package/grep/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/grep $(1)/usr/bin/grep -endef - -define Package/grep/postinst -#!/bin/sh -[ -L "$${IPKG_INSTROOT}/bin/grep" ] && rm -f "$${IPKG_INSTROOT}/bin/grep" -exit 0 -endef - -define Package/grep/prerm -$${IPKG_INSTROOT}/bin/busybox grep -h 2>&1 | grep -q BusyBox && \ -ln -sf busybox $${IPKG_INSTROOT}/bin/grep -exit 0 -endef - -$(eval $(call BuildPackage,grep)) diff --git a/utils/gzip/Makefile b/utils/gzip/Makefile deleted file mode 100644 index 83f3e38..0000000 --- a/utils/gzip/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gzip -PKG_VERSION:=1.7 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@GNU/gzip -PKG_MD5SUM:=c4abae2ddd5c6f39c6f8169693cc7ac0 -PKG_LICENSE:=GPL-3.0+ - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/gzip - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Compression - TITLE:=gzip (GNU zip) is a compression utility. - URL:=https://www.gnu.org/software/gzip/ - MAINTAINER:=Christian Beier -endef - -define Package/gzip/description - gzip (GNU zip) is a compression utility designed to be a \ - replacement for compress. -endef - -CONFIGURE_VARS += \ - gl_cv_func_getopt_gnu=yes \ - ac_cv_search_clock_gettime=no - -define Package/gzip/install - $(SED) 's,/bin/bash,/bin/sh,g' $(PKG_INSTALL_DIR)/usr/bin/{gunzip,zcat} - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{gunzip,gzip,zcat} $(1)/usr/bin/ -endef - -define Package/gzip/postinst -#!/bin/sh -for app in gunzip gzip zcat; do - ln -sf ../usr/bin/$$app $${IPKG_INSTROOT}/bin/$$app -done -endef - -define Package/gzip/postrm -#!/bin/sh -for app in gunzip gzip zcat; do - ln -sf busybox $${IPKG_INSTROOT}/bin/$$app - $${IPKG_INSTROOT}/bin/$$app 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/$$app -done -exit 0 -endef - -$(eval $(call BuildPackage,gzip)) - diff --git a/utils/haserl/Config.in b/utils/haserl/Config.in deleted file mode 100644 index e5fb90d..0000000 --- a/utils/haserl/Config.in +++ /dev/null @@ -1,35 +0,0 @@ -if PACKAGE_haserl - - config HASERL_with_lua - bool - default n - - comment "Lua support" - - config HASERL_shell_luac - bool - prompt "Support --shell=luac" - select HASERL_with_lua - default n - help - haserl(1): - The luac "shell" is a precompiled lua chunk, so interactive - editing and testing of scripts is not possible. However, - haserl can be compiled with luac support only, and this - allows lua support even in a small memory environment. All - haserl lua features listed above are still available. (If - luac is the only shell built into haserl, the - haserl.loadfile is disabled, as the haserl parser is not - compiled in.) - - config HASERL_shell_lua - bool - prompt "Support --shell=lua" - select HASERL_with_lua - default n - help - haserl(1): - If compiled with lua support, --shell=lua will enable lua as the - script language instead of bash shell. - -endif diff --git a/utils/haserl/Makefile b/utils/haserl/Makefile deleted file mode 100644 index 1d58625..0000000 --- a/utils/haserl/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=haserl -PKG_VERSION:=0.9.35 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/haserl -PKG_MD5SUM:=918f0b4f6cec0b438c8b5c78f2989010 -PKG_MAINTAINER:=Maxim Storchak -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_CONFIG_DEPENDS:= \ - CONFIG_HASERL_with_lua \ - CONFIG_HASERL_shell_luac \ - CONFIG_HASERL_shell_lua \ - -include $(INCLUDE_DIR)/package.mk - -define Package/haserl - SECTION:=utils - CATEGORY:=Utilities - TITLE:=A CGI wrapper to embed shell scripts in HTML documents - URL:=http://haserl.sourceforge.net/ - MENU:=1 - DEPENDS:= +HASERL_with_lua:liblua -endef - -define Package/haserl/config - source "$(SOURCE)/Config.in" -endef - -ifeq ($(CONFIG_HASERL_with_lua),y) - CONFIGURE_ARGS+=--with-lua - TARGET_LDFLAGS += -ldl -endif -ifneq ($(CONFIG_HASERL_shell_lua),y) - CONFIGURE_ARGS+=--disable-luashell -endif -ifneq ($(CONFIG_HASERL_shell_luac),y) - CONFIGURE_ARGS+=--disable-luacshell -endif - -define Package/haserl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/haserl $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,haserl)) diff --git a/utils/haserl/patches/100-replace-lua2c-with-sed.patch b/utils/haserl/patches/100-replace-lua2c-with-sed.patch deleted file mode 100644 index 4626a02..0000000 --- a/utils/haserl/patches/100-replace-lua2c-with-sed.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff --git a/src/Makefile.in b/src/Makefile.in -index 31d45f7..d249f67 100644 ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -86,7 +86,6 @@ POST_INSTALL = : - NORMAL_UNINSTALL = : - PRE_UNINSTALL = : - POST_UNINSTALL = : --@USE_LUA_TRUE@noinst_PROGRAMS = lua2c$(EXEEXT) - @INCLUDE_LUASHELL_TRUE@@USE_LUA_TRUE@am__append_1 = h_lua.c h_lua.h - @INCLUDE_LUACSHELL_TRUE@@USE_LUA_TRUE@am__append_2 = h_luac.c h_luac.h - bin_PROGRAMS = haserl$(EXEEXT) -@@ -124,9 +123,6 @@ am__DEPENDENCIES_1 = - haserl_DEPENDENCIES = $(am__DEPENDENCIES_1) - haserl_LINK = $(CCLD) $(haserl_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ --lua2c_SOURCES = lua2c.c --lua2c_OBJECTS = lua2c.$(OBJEXT) --lua2c_LDADD = $(LDADD) - AM_V_P = $(am__v_P_@AM_V@) - am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) - am__v_P_0 = false -@@ -159,8 +155,8 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) - am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) - am__v_CCLD_0 = @echo " CCLD " $@; - am__v_CCLD_1 = --SOURCES = $(haserl_SOURCES) $(nodist_haserl_SOURCES) lua2c.c --DIST_SOURCES = $(am__haserl_SOURCES_DIST) lua2c.c -+SOURCES = $(haserl_SOURCES) $(nodist_haserl_SOURCES) -+DIST_SOURCES = $(am__haserl_SOURCES_DIST) - am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ -@@ -284,7 +280,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --EXTRA_DIST = haserl_lualib.lua lua2c.c -+EXTRA_DIST = haserl_lualib.lua - - # Not strictly required, but we explicitly do not distribute the generated inc file - nodist_haserl_SOURCES = haserl_lualib.inc -@@ -396,10 +392,6 @@ haserl$(EXEEXT): $(haserl_OBJECTS) $(haserl_DEPENDENCIES) $(EXTRA_haserl_DEPENDE - @rm -f haserl$(EXEEXT) - $(AM_V_CCLD)$(haserl_LINK) $(haserl_OBJECTS) $(haserl_LDADD) $(LIBS) - --@USE_LUA_FALSE@lua2c$(EXEEXT): $(lua2c_OBJECTS) $(lua2c_DEPENDENCIES) $(EXTRA_lua2c_DEPENDENCIES) --@USE_LUA_FALSE@ @rm -f lua2c$(EXEEXT) --@USE_LUA_FALSE@ $(AM_V_CCLD)$(LINK) $(lua2c_OBJECTS) $(lua2c_LDADD) $(LIBS) -- - mostlyclean-compile: - -rm -f *.$(OBJEXT) - -@@ -416,7 +408,6 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/haserl-haserl.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/haserl-rfc2388.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/haserl-sliding_buffer.Po@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lua2c.Po@am__quote@ - - .c.o: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -770,17 +761,13 @@ uninstall-am: uninstall-binPROGRAMS - .PRECIOUS: Makefile - - --# lua2c_LIBS ?= -llua -ldl -lm --@USE_LUA_TRUE@lua2c_LDFLAGS ?= -Wl,-E --@USE_LUA_TRUE@lua2c: lua2c.c --@USE_LUA_TRUE@ $(CC_FOR_BUILD) $(CFLAGS) $(LUA_CFLAGS) $(LDFLAGS) $(lua2c_LDFLAGS) \ --@USE_LUA_TRUE@ -o $@ $^ $(LIBS) $(LUA_LIBS) - --@USE_LUA_TRUE@haserl_lualib.inc : haserl_lualib.lua lua2c --@USE_LUA_TRUE@ if ! ./lua2c haserl_lualib haserl_lualib.lua >$@; then \ -+@USE_LUA_TRUE@haserl_lualib.inc : haserl_lualib.lua -+@USE_LUA_TRUE@ if ! sed -re '/--\[\[/,/\]\]--/d; s/[[:space:]]*--.*//g; s/^[[:space:]]*//g; /^$$/d; s/ (=+) /\1/g; s/,[[:space:]]*/,/g; s/ ([()])/\1/g; s/key/k/g; s/value/v/g; s/^/"/; s/$$/\\n"/' haserl_lualib.lua >$@.tmp; then \ - @USE_LUA_TRUE@ rm $@; \ - @USE_LUA_TRUE@ exit 1 ;\ - @USE_LUA_TRUE@ fi -+@USE_LUA_TRUE@ { echo "static const char haserl_lualib[] = "; cat $@.tmp; echo ";"; rm $@.tmp; } >$@ - - @USE_LUA_TRUE@h_lua_common.c : haserl_lualib.inc - diff --git a/utils/haserl/patches/101-adjust-script-size.patch b/utils/haserl/patches/101-adjust-script-size.patch deleted file mode 100644 index a4b7d9a..0000000 --- a/utils/haserl/patches/101-adjust-script-size.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/h_lua_common.c 2013-09-20 23:35:19.000000000 +0300 -+++ b/src/h_lua_common.c 2014-05-03 19:27:43.000000000 +0300 -@@ -79,7 +79,7 @@ - - /* and load our haserl library */ - if (luaL_loadbuffer -- (lua_vm, (const char *) &haserl_lualib, sizeof (haserl_lualib), -+ (lua_vm, (const char *) haserl_lualib, sizeof(haserl_lualib)-1, - "luascript.lua") || lua_pcall (lua_vm, 0, 0, 0)) - { - die_with_message (NULL, NULL, diff --git a/utils/haveged/Makefile b/utils/haveged/Makefile deleted file mode 100644 index c5adad7..0000000 --- a/utils/haveged/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=haveged -PKG_VERSION:=1.9.1 -PKG_RELEASE:=5 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/haveged \ - http://www.issihosts.com/$(PKG_NAME) -PKG_MD5SUM:=9c2363ed9542a6784ff08e247182137e71f2ddb79e8e6c1ac4ad50d21ced3715 -PKG_LICENSE:=GPLv3 - -PKG_MAINTAINER:=Hannu Nyman - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/haveged - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libhavege - TITLE:=Feeds the kernel entropy pool by timing CPU loops. - URL:=http://www.issihosts.com/haveged/ -endef - -define Package/libhavege - CATEGORY:=Libraries - TITLE:=Library for haveged - URL:=http://www.issihosts.com/haveged/ -endef - -CONFIGURE_ARGS+= \ - --enable-daemon=yes \ - --enable-threads=no \ - --enable-olt=no - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_BUILD_DIR)/src/havege.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/src/.libs/libhavege.{a,so*} $(1)/usr/lib/ -endef - -define Package/haveged/install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/haveged.init $(1)/etc/init.d/haveged - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/haveged $(1)/usr/sbin/ -endef - -define Package/libhavege/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/src/.libs/libhavege.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,haveged)) -$(eval $(call BuildPackage,libhavege)) diff --git a/utils/haveged/files/haveged.init b/utils/haveged/files/haveged.init deleted file mode 100644 index 113d64f..0000000 --- a/utils/haveged/files/haveged.init +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2012 OpenWrt.org - -START=13 - -HAVEGED_THRESHOLD=1024 -HAVEGED_DCACHE=32 -HAVEGED_ICACHE=32 - -start() { - service_start /usr/sbin/haveged -w $HAVEGED_THRESHOLD -d $HAVEGED_DCACHE -i $HAVEGED_ICACHE -v 1 -} - -stop() { - service_stop /usr/sbin/haveged -} diff --git a/utils/hd-idle/Makefile b/utils/hd-idle/Makefile deleted file mode 100644 index a0c9cca..0000000 --- a/utils/hd-idle/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=hd-idle -PKG_VERSION:=1.04 -PKG_RELEASE:=2 - -PKG_MAINTAINER:=Lim Guo Wei -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:= - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_MD5SUM:=41e52e669fc59fa82ee0c2bcce1336d3 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk - -define Package/hd-idle - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Another idle-daemon for attached hard drives - SUBMENU:=Disc - URL:=http://hd-idle.sourceforge.net/ -endef - -define Package/hd-idle/description - hd-idle is a utility program for spinning-down external disks after a period of idle time. -endef - -define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/$(PKG_NAME) $(PKG_BUILD_DIR)/$(PKG_NAME).c -endef - -define Package/hd-idle/conffiles -/etc/config/hd-idle -endef - -define Package/hd-idle/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME) - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME) -endef - -$(eval $(call BuildPackage,hd-idle)) diff --git a/utils/hd-idle/files/hd-idle.config b/utils/hd-idle/files/hd-idle.config deleted file mode 100644 index dbbd358..0000000 --- a/utils/hd-idle/files/hd-idle.config +++ /dev/null @@ -1,5 +0,0 @@ -config 'hd-idle' - option 'disk' 'sda' - option 'enabled' '0' - option 'idle_time_unit' 'minutes' - option 'idle_time_interval' '10' diff --git a/utils/hd-idle/files/hd-idle.init b/utils/hd-idle/files/hd-idle.init deleted file mode 100644 index 4f6a2d7..0000000 --- a/utils/hd-idle/files/hd-idle.init +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2008-2011 OpenWrt.org - -START=50 -STOP=10 - -USE_PROCD=1 - -validate_section_hdidle() -{ - uci_validate_section hd-idle hd-idle "${1}" \ - 'disk:string' \ - 'enabled:bool' \ - 'idle_time_interval:uinteger:10' \ - 'idle_time_unit:string:minutes' -} - -compute_seconds() { - local interval="$1" - local unit="$2" - - # compute interval in seconds - case "$unit" in - "days" ) - interval_seconds=$(($interval*60*60*24)) - ;; - "hours" ) - interval_seconds=$(($interval*60*60)) - ;; - "minutes" ) - interval_seconds=$(($interval*60)) - ;; - "seconds" ) - interval_seconds=$interval - ;; - * ) - # default is minutes - interval_seconds=$(($interval*60)) - ;; - esac - - echo $interval_seconds -} - -hdidle_append() { - local disk enabled idle_time_interval idle_time_unit - - validate_section_hdidle "${1}" || return - - [ "$enabled" -gt 0 ] || return - - if [ "$numdisks" = "0" ]; then - procd_open_instance - procd_set_param command /usr/bin/hd-idle - procd_append_param command -d -i 0 - fi - procd_append_param command -a $disk - procd_append_param command -i "$(compute_seconds $idle_time_interval $idle_time_unit)" - numdisks=$(( numdisks + 1 )) -} - -start_service() { - config_load "hd-idle" - - numdisks="0" - config_foreach hdidle_append "hd-idle" - - if [ "$numdisks" -gt 0 ]; then - procd_set_param respawn - procd_close_instance - fi -} diff --git a/utils/hdparm/Makefile b/utils/hdparm/Makefile deleted file mode 100644 index f3b552c..0000000 --- a/utils/hdparm/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=hdparm -PKG_VERSION:=9.50 -PKG_RELEASE:=1 -PKG_USE_MIPS16:=0 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_MD5SUM:=d380062ad6c4b40076736efbb640f1f5 -PKG_MAINTAINER:=Richard Kunze -PKG_LICENSE:=BSD-Style Open Source License - -include $(INCLUDE_DIR)/package.mk - -TARGET_CFLAGS+=-D_GNU_SOURCE - -define Package/hdparm - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Disc - TITLE:=Hard disk drive configuration utilitity - URL:=http://sourceforge.net/projects/hdparm/ -endef - -define Package/hdparm/description - get/set SATA/IDE device parameters -endef - -define Package/hdparm/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/sbin -endef - -$(eval $(call BuildPackage,hdparm)) diff --git a/utils/hub-ctrl/Makefile b/utils/hub-ctrl/Makefile deleted file mode 100644 index 48cca4d..0000000 --- a/utils/hub-ctrl/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=hub-ctrl -PKG_VERSION:=1.0 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/codazoda/hub-ctrl.c.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=3eef0240fac90067d081551e9f73dfa741d94a9e -PKG_LICENSE:=GPL-2.0+ - -PKG_MAINTAINER:=Simon Peter - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/hub-ctrl - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Control USB power on a port by port basis - URL:=https://github.com/codazoda/hub-ctrl.c - DEPENDS:=+libusb-compat -endef - -define Package/hub-ctrl/description - Control USB power on a port by port basis on some USB hubs. - This only works on USB hubs that have the hardware necessary - to allow software controlled power switching. - Most hubs DO NOT include the hardware. -endef - -define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include \ - -L$(STAGING_DIR)/usr/lib -lusb \ - -o $(PKG_BUILD_DIR)/hub-ctrl $(PKG_BUILD_DIR)/hub-ctrl.c -endef - -define Package/hub-ctrl/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/hub-ctrl $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,hub-ctrl)) diff --git a/utils/i2c-tools/Makefile b/utils/i2c-tools/Makefile deleted file mode 100644 index 4fb9b50..0000000 --- a/utils/i2c-tools/Makefile +++ /dev/null @@ -1,125 +0,0 @@ -# -# Copyright (C) 2007-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=i2c-tools -PKG_VERSION:=3.1.2 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=http://dl.lm-sensors.org/i2c-tools/releases/ \ - http://fossies.org/linux/misc/ - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_MD5SUM:=7104a1043d11a5e2c7b131614eb1b962 - -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_DEPENDS:=PACKAGE_python-smbus:python - -PKG_MAINTAINER:=Daniel Golle -PKG_LICENSE:=GPLv2 -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk -$(call include_mk, python-package.mk) -$(call include_mk, python3-package.mk) - -define Package/i2c/Default - URL:=http://lm-sensors.org/wiki/I2CTools - TITLE:=I2C -endef - -define Package/i2c-tools - $(call Package/i2c/Default) - SECTION:=utils - CATEGORY:=Utilities - TITLE+=tools for Linux -endef - -define Package/python-smbus - $(call Package/i2c/Default) - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=Python bindings for the SMBUS - DEPENDS:=+python-light -endef - -define Package/python3-smbus - $(call Package/i2c/Default) - SUBMENU:=Python - SECTION:=lang - CATEGORY:=Languages - TITLE:=Python bindings for the SMBUS - DEPENDS:=+python3-light -endef - -define Package/i2c-tools/description - This package contains an heterogeneous set of I2C tools for Linux. These tools - were originally part of the lm-sensors package. -endef - -define Package/python-smbus/description - This package contain the python bindings for Linux SMBus access through i2c-dev. -endef - -define Package/python3-smbus/description - This package contain the python bindings for Linux SMBus access through i2c-dev. -endef - -TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)/include - -ifdef CONFIG_PACKAGE_python-smbus - define Build/Compile/python-smbus - $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) - $(call Build/Compile/PyMod,./py-smbus/, \ - install --prefix="$(PKG_INSTALL_DIR)/usr", \ - ) - endef -endif - -ifdef CONFIG_PACKAGE_python3-smbus - define Build/Compile/python3-smbus - $(if $(Build/Compile/Py3Mod),,@echo Python3 packaging code not found.; false) - $(call Build/Compile/Py3Mod,./py-smbus/, \ - install --prefix="$(PKG_INSTALL_DIR)/usr", \ - ) - endef -endif - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - LINUX="$(LINUX_DIR)" \ - CC="$(TARGET_CC)" \ - STAGING_DIR="$(STAGING_DIR)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - CFLAGS="$(TARGET_CFLAGS)" - $(Build/Compile/python-smbus) - $(Build/Compile/python3-smbus) -endef - -define Package/i2c-tools/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cdetect $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cdump $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cset $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/i2cget $(1)/usr/sbin/ -endef - -define PyPackage/python-smbus/filespec -+|$(PYTHON_PKG_DIR) -endef - -define PyPackage/python3-smbus/filespec -+|$(PYTHON3_PKG_DIR) -endef - -$(eval $(call BuildPackage,i2c-tools)) -$(eval $(call PyPackage,python-smbus)) -$(eval $(call BuildPackage,python-smbus)) -$(eval $(call PyPackage,python3-smbus)) -$(eval $(call BuildPackage,python3-smbus)) diff --git a/utils/io/Makefile b/utils/io/Makefile deleted file mode 100644 index a861e74..0000000 --- a/utils/io/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=io -PKG_RELEASE:=1 - -include $(INCLUDE_DIR)/package.mk - -PKG_MAINTAINER:=Hauke Mehrtens - -define Package/io - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Raw memory i/o utility - URL:=http://www.sleepie.demon.co.uk/linuxvme/io.c -endef - -define Package/io/description - This tool can be used to access physical memory addresses from userspace. - It can be useful to access hardware for which no device driver exists! -endef - -define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) -Wall $(PKG_BUILD_DIR)/io.c -o $(PKG_BUILD_DIR)/$(PKG_NAME) -endef - -define Package/io/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/io $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,io)) diff --git a/utils/io/src/io.c b/utils/io/src/io.c deleted file mode 100644 index 2572054..0000000 --- a/utils/io/src/io.c +++ /dev/null @@ -1,428 +0,0 @@ -/* - * Simple app. to do memory accesses via /dev/mem. - * - * - * Copyright (c) Richard Hirst - * Copyright (c) Thomas Langer - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MEM_READ 0 -#define MEM_WRITE 1 -#define MEM_AND 2 -#define MEM_OR 3 - -static void -usage (char *argv0) -{ - fprintf(stderr, -"Raw memory i/o utility - $Revision: 2.0 $\n\n" -"%s -v -1|2|4 -r|w|a|o [-l ] [-f ] []\n\n" -" -v Verbose, asks for confirmation\n" -" -1|2|4 Sets memory access size in bytes (default byte)\n" -" -l Length in bytes of area to access (defaults to\n" -" one access, or whole file length)\n" -" -r|w|a|o Read from or Write to memory (default read)\n" -" optional write with modify (and/or)\n" -" -f File to write on memory read, or\n" -" to read on memory write\n" -" The memory address to access\n" -" The value to write (implies -w)\n\n" -"Examples:\n" -" %s 0x1000 Reads one byte from 0x1000\n" -" %s 0x1000 0x12 Writes 0x12 to location 0x1000\n" -" %s -2 -l 8 0x1000 Reads 8 words from 0x1000\n" -" %s -r -f dmp -l 100 200 Reads 100 bytes from addr 200 to file\n" -" %s -w -f img 0x10000 Writes the whole of file to memory\n" -"\n" -"Note access size (-1|2|4) does not apply to file based accesses.\n\n", - argv0, argv0, argv0, argv0, argv0, argv0); - exit(1); -} - - -static void -memread_memory(unsigned long phys_addr, void *addr, int len, int iosize) -{ - int i; - - while (len) { - printf("%08lx: ", phys_addr); - i = 0; - while (i < 16 && len) { - switch(iosize) { - case 1: - printf(" %02x", *(unsigned char *)addr); - break; - case 2: - printf(" %04x", *(unsigned short *)addr); - break; - case 4: - printf(" %08lx", *(unsigned long *)addr); - break; - } - i += iosize; - addr += iosize; - len -= iosize; - } - phys_addr += 16; - printf("\n"); - } -} - - -static void -write_memory(unsigned long phys_addr, void *addr, int len, int iosize, unsigned long value) -{ - switch(iosize) { - case 1: - while (len) { - *(unsigned char *)addr = value; - len -= iosize; - addr += iosize; - } - break; - case 2: - while (len) { - *(unsigned short *)addr = value; - len -= iosize; - addr += iosize; - } - break; - case 4: - while (len) { - *(unsigned long *)addr = value; - len -= iosize; - addr += iosize; - } - break; - } -} - - -static void -and_write_memory(unsigned long phys_addr, void *addr, int len, int iosize, unsigned long value) -{ - switch(iosize) { - case 1: - while (len) { - *(unsigned char *)addr &= value; - len -= iosize; - addr += iosize; - } - break; - case 2: - while (len) { - *(unsigned short *)addr &= value; - len -= iosize; - addr += iosize; - } - break; - case 4: - while (len) { - *(unsigned long *)addr &= value; - len -= iosize; - addr += iosize; - } - break; - } -} - - -static void -or_write_memory(unsigned long phys_addr, void *addr, int len, int iosize, unsigned long value) -{ - switch(iosize) { - case 1: - while (len) { - *(unsigned char *)addr |= value; - len -= iosize; - addr += iosize; - } - break; - case 2: - while (len) { - *(unsigned short *)addr |= value; - len -= iosize; - addr += iosize; - } - break; - case 4: - while (len) { - *(unsigned long *)addr |= value; - len -= iosize; - addr += iosize; - } - break; - } -} - - -int -main (int argc, char **argv) -{ - int mfd, ffd = 0, req_len = 0, opt; - void *real_io; - unsigned long real_len, real_addr, req_addr, req_value = 0, offset; - char *endptr; - int memfunc = MEM_READ; - int iosize = 1; - char *filename = NULL; - int verbose = 0; - - opterr = 0; - if (argc == 1) - usage(argv[0]); - - while ((opt = getopt(argc, argv, "hv124rwaol:f:")) > 0) { - switch (opt) { - case 'h': - usage(argv[0]); - case 'v': - verbose = 1; - break; - case '1': - case '2': - case '4': - iosize = opt - '0'; - break; - case 'r': - memfunc = MEM_READ; - break; - case 'a': - memfunc = MEM_AND; - break; - case 'o': - memfunc = MEM_OR; - break; - case 'w': - memfunc = MEM_WRITE; - break; - case 'l': - req_len = strtoul(optarg, &endptr, 0); - if (*endptr) { - fprintf(stderr, "Bad value '%s'\n", optarg); - exit(1); - } - break; - case 'f': - filename = strdup(optarg); - break; - default: - fprintf(stderr, "Unknown option: %c\n", opt); - usage(argv[0]); - } - } - - if (optind == argc) { - fprintf(stderr, "No address given\n"); - exit(1); - } - req_addr = strtoul(argv[optind], &endptr, 0); - if (*endptr) { - fprintf(stderr, "Bad value '%s'\n", argv[optind]); - exit(1); - } - optind++; - if (!filename && (memfunc == MEM_READ) && optind < argc) { - memfunc = MEM_WRITE; - } - if (filename && optind > argc) { - fprintf(stderr, "Filename AND value given\n"); - exit(1); - } - if (!filename && (memfunc != MEM_READ) && optind == argc) { - fprintf(stderr, "No value given for WRITE\n"); - exit(1); - } - if (!filename && (memfunc != MEM_READ)) { - req_value = strtoul(argv[optind], &endptr, 0); - if (*endptr) { - fprintf(stderr, "Bad value '%s'\n", argv[optind]); - exit(1); - } - if ((iosize == 1 && (req_value & 0xffffff00)) || - (iosize == 2 && (req_value & 0xffff0000))) { - fprintf(stderr, " too large\n"); - exit(1); - } - optind++; - } - if (filename && (memfunc == MEM_READ) && !req_len) { - fprintf(stderr, "No size given for file memread\n"); - exit(1); - } - if (optind < argc) { - fprintf(stderr, "Too many arguments '%s'...\n", argv[optind]); - exit(1); - } - if (filename && (memfunc == MEM_READ)) { - ffd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); - if (ffd < 0) { - fprintf(stderr, "Failed to open destination file '%s': %s\n", filename, strerror(errno)); - exit(1); - } - } - if (filename && (memfunc != MEM_READ)) { - ffd = open(filename, O_RDONLY); - if (ffd < 0) { - fprintf(stderr, "Failed to open source file '%s': %s\n", filename, strerror(errno)); - exit(1); - } - } - - if (filename && !req_len) { - req_len = lseek(ffd, 0, SEEK_END); - if (req_len < 0) { - fprintf(stderr, "Failed to seek on '%s': %s\n", - filename, strerror(errno)); - exit(1); - } - if (lseek(ffd, 0, SEEK_SET)) { - fprintf(stderr, "Failed to seek on '%s': %s\n", - filename, strerror(errno)); - exit(1); - } - } - if (!req_len) - req_len = iosize; - - if ((iosize == 2 && (req_addr & 1)) || - (iosize == 4 && (req_addr & 3))) { - fprintf(stderr, "Badly aligned for access size\n"); - exit(1); - } - if ((iosize == 2 && (req_len & 1)) || - (iosize == 4 && (req_len & 3))) { - fprintf(stderr, "Badly aligned for access size\n"); - exit(1); - } - - if (!verbose) - /* Nothing */; - else if (filename && (memfunc == MEM_READ)) - printf("Request to read 0x%x bytes from address 0x%08lx\n" - "\tto file %s, using %d byte accesses\n", - req_len, req_addr, filename, iosize); - else if (filename) - printf("Request to write 0x%x bytes to address 0x%08lx\n" - "\tfrom file %s, using %d byte accesses\n", - req_len, req_addr, filename, iosize); - else if (memfunc == MEM_READ) - printf("Request to read 0x%x bytes from address 0x%08lx\n" - "\tusing %d byte accesses\n", - req_len, req_addr, iosize); - else - printf("Request to write 0x%x bytes to address 0x%08lx\n" - "\tusing %d byte accesses of value 0x%0*lx\n", - req_len, req_addr, iosize, iosize*2, req_value); - - real_addr = req_addr & ~4095; - if (real_addr == 0xfffff000) { - fprintf(stderr, "Sorry, cannot map the top 4K page\n"); - exit(1); - } - offset = req_addr - real_addr; - real_len = req_len + offset; - real_len = (real_len + 4095) & ~ 4095; - if (real_addr + real_len < real_addr) { - fprintf(stderr, "Aligned addr+len exceeds top of address space\n"); - exit(1); - } - if (verbose) - printf("Attempting to map 0x%lx bytes at address 0x%08lx\n", - real_len, real_addr); - - mfd = open("/dev/mem", (memfunc == MEM_READ) ? O_RDONLY : O_RDWR); - if (mfd == -1) { - perror("open /dev/mem"); - fprintf(stderr, "Is CONFIG_DEVMEM activated?\n"); - exit(1); - } - if (verbose) - printf("open(/dev/mem) ok\n"); - real_io = mmap(NULL, real_len, - (memfunc == MEM_READ) ? PROT_READ:PROT_READ|PROT_WRITE, - MAP_SHARED, mfd, real_addr); - if (real_io == (void *)(-1)) { - fprintf(stderr, "mmap() failed: %s\n", strerror(errno)); - exit(1); - } - if (verbose) - printf("mmap() ok\n"); - - if (verbose) { - int c; - - printf("OK? "); - fflush(stdout); - c = getchar(); - if (c != 'y' && c != 'Y') { - printf("Aborted\n"); - exit(1); - } - } - - if (filename && (memfunc == MEM_READ)) { - int n = write(ffd, real_io + offset, req_len); - - if (n < 0) { - fprintf(stderr, "File write failed: %s\n", strerror(errno)); - exit(1); - } - else if (n != req_len) { - fprintf(stderr, "Only wrote %d of %d bytes to file\n", - n, req_len); - exit(1); - } - } - else if (filename) { - int n = read(ffd, real_io + offset, req_len); - - if (n < 0) { - fprintf(stderr, "File read failed: %s\n", strerror(errno)); - exit(1); - } - else if (n != req_len) { - fprintf(stderr, "Only read %d of %d bytes from file\n", - n, req_len); - exit(1); - } - } - else { - switch (memfunc) - { - case MEM_READ: - memread_memory(req_addr, real_io + offset, req_len, iosize); - break; - case MEM_WRITE: - write_memory(req_addr, real_io + offset, req_len, iosize, req_value); - break; - case MEM_AND: - and_write_memory(req_addr, real_io + offset, req_len, iosize, req_value); - break; - case MEM_OR: - or_write_memory(req_addr, real_io + offset, req_len, iosize, req_value); - break; - } - } - - munmap(real_io, real_len); - - if (filename) - close(ffd); - close (mfd); - - return 0; -} - diff --git a/utils/irqbalance/Makefile b/utils/irqbalance/Makefile deleted file mode 100644 index 3777fde..0000000 --- a/utils/irqbalance/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=irqbalance -PKG_VERSION:=1.2.0 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/Irqbalance/irqbalance.git -PKG_SOURCE_VERSION:=0e0dd4cfe5464de2f81eaef504eab7183f1fb030 -PKG_MIRROR_HASH:=c826e78babfc26f777a5791b2a6ea95b61453ba3e3c5803d4428cc803216bc5c -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_LICENSE:=GPLv2 - -PKG_MAINTAINER:=Hannu Nyman - -PKG_FIXUP:=autoreconf -PKG_REMOVE_FILES:=autogen.sh - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/irqbalance - SECTION:=utils - CATEGORY:=Utilities - TITLE:=IRQ usage balancing for multi-core systems - URL:=https://github.com/Irqbalance/irqbalance -endef - -define Package/irqbalance/description - The purpose of irqbalance is to distribute hardware interrupts across - processors/cores on a multiprocessor/multicore system in order to - increase performance. -endef - -CONFIGURE_ARGS+= \ - --disable-numa \ - --with-libcap_ng=no \ - --with-systemd=no \ - --without-glib2 - -define Package/irqbalance/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/irqbalance $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,irqbalance)) diff --git a/utils/irqbalance/patches/100-disable-ui-compilation.patch b/utils/irqbalance/patches/100-disable-ui-compilation.patch deleted file mode 100644 index 5793ec6..0000000 --- a/utils/irqbalance/patches/100-disable-ui-compilation.patch +++ /dev/null @@ -1,47 +0,0 @@ -Revert upstream commit bf9297132d219539e07506c125c6801dd77202f4 -to prevent building the UI component. Also disable manpage. - ---- a/Makefile.am -+++ b/Makefile.am -@@ -24,19 +24,14 @@ AUTOMAKE_OPTIONS = no-dependencies - ACLOCAL_AMFLAGS = -I m4 - EXTRA_DIST = COPYING autogen.sh misc/irqbalance.service misc/irqbalance.env - --UI_DIR = ui - AM_CFLAGS = $(LIBCAP_NG_CFLAGS) $(GLIB_CFLAGS) - AM_CPPFLAGS = -I${top_srcdir} -W -Wall -Wshadow -Wformat -Wundef -D_GNU_SOURCE - noinst_HEADERS = bitmap.h constants.h cpumask.h irqbalance.h non-atomic.h \ -- types.h $(UI_DIR)/helpers.h $(UI_DIR)/irqbalance-ui.h $(UI_DIR)/ui.h --sbin_PROGRAMS = irqbalance irqbalance-ui -+ types.h -+sbin_PROGRAMS = irqbalance - irqbalance_SOURCES = activate.c bitmap.c classify.c cputree.c irqbalance.c \ - irqlist.c numa.c placement.c procinterrupts.c - irqbalance_LDADD = $(LIBCAP_NG_LIBS) $(GLIB_LIBS) --irqbalance_ui_SOURCES = $(UI_DIR)/helpers.c $(UI_DIR)/irqbalance-ui.c \ -- $(UI_DIR)/ui.c --irqbalance_ui_LDADD = $(GLIB_LIBS) $(CURSES_LIBS) --dist_man_MANS = irqbalance.1 - - CONFIG_CLEAN_FILES = debug*.list config/* - clean-generic: ---- a/configure.ac -+++ b/configure.ac -@@ -3,7 +3,7 @@ AC_PREREQ(2.12)dnl - AM_CONFIG_HEADER(config.h) - - AC_CONFIG_MACRO_DIR([m4]) --AM_INIT_AUTOMAKE([foreign] [subdir-objects]) -+AM_INIT_AUTOMAKE([foreign]) - AM_PROG_LIBTOOL - AC_SUBST(LIBTOOL_DEPS) - -@@ -26,8 +26,6 @@ AC_CHECK_FUNCS(getopt_long) - AC_CHECK_LIB(numa, numa_available) - AC_CHECK_LIB(m, floor) - --AC_CHECK_LIB(curses, mvprintw) -- - AC_C_CONST - AC_C_INLINE - AM_PROG_CC_C_O diff --git a/utils/irqbalance/patches/200-avoid-glib.patch b/utils/irqbalance/patches/200-avoid-glib.patch deleted file mode 100644 index 3c20196..0000000 --- a/utils/irqbalance/patches/200-avoid-glib.patch +++ /dev/null @@ -1,421 +0,0 @@ -Revert upstream commit d1993bcde2a524346a9508754671f096ec129ad1 -to avoid glib dependency. That commit polluted the main code -with glib types. - ---- a/irqbalance.h -+++ b/irqbalance.h -@@ -8,7 +8,6 @@ - - #include - #include --#include - #include - #include - -@@ -63,7 +62,6 @@ extern GList *packages; - extern GList *cache_domains; - extern GList *cpus; - extern int numa_avail; --extern GList *cl_banned_irqs; - - extern int debug_mode; - extern int journal_logging; -@@ -171,7 +169,5 @@ extern unsigned int log_mask; - }while(0) - #endif /* HAVE_LIBSYSTEMD */ - --#define SOCKET_PATH "irqbalance" -- - #endif /* __INCLUDE_GUARD_IRQBALANCE_H_ */ - ---- a/irqbalance.c -+++ b/irqbalance.c -@@ -31,8 +31,6 @@ - #include - #include - #include --#include --#include - #include - #ifdef HAVE_GETOPT_LONG - #include -@@ -44,7 +42,6 @@ - #include "irqbalance.h" - - volatile int keep_going = 1; --int socket_fd; - int one_shot_mode; - int debug_mode; - int foreground_mode; -@@ -61,9 +58,6 @@ char *banscript = NULL; - char *polscript = NULL; - long HZ; - int sleep_interval = SLEEP_INTERVAL; --GMainLoop *main_loop; -- --char *banned_cpumask_from_ui = NULL; - - static void sleep_approx(int seconds) - { -@@ -236,224 +230,22 @@ static void force_rebalance_irq(struct i - info->assigned_obj = NULL; - } - --gboolean handler(gpointer data __attribute__((unused))) -+static void handler(int signum) - { -+ (void)signum; - keep_going = 0; -- g_main_loop_quit(main_loop); -- return TRUE; - } - --gboolean force_rescan(gpointer data __attribute__((unused))) -+static void force_rescan(int signum) - { -+ (void)signum; - if (cycle_count) - need_rescan = 1; -- return TRUE; --} -- --gboolean scan(gpointer data) --{ -- log(TO_CONSOLE, LOG_INFO, "\n\n\n-----------------------------------------------------------------------------\n"); -- clear_work_stats(); -- parse_proc_interrupts(); -- parse_proc_stat(); -- -- -- /* cope with cpu hotplug -- detected during /proc/interrupts parsing */ -- if (need_rescan) { -- need_rescan = 0; -- cycle_count = 0; -- log(TO_CONSOLE, LOG_INFO, "Rescanning cpu topology \n"); -- clear_work_stats(); -- -- free_object_tree(); -- build_object_tree(); -- for_each_irq(NULL, force_rebalance_irq, NULL); -- parse_proc_interrupts(); -- parse_proc_stat(); -- sleep_approx(sleep_interval); -- clear_work_stats(); -- parse_proc_interrupts(); -- parse_proc_stat(); -- } -- -- if (cycle_count) -- update_migration_status(); -- -- calculate_placement(); -- activate_mappings(); -- -- if (debug_mode) -- dump_tree(); -- if (one_shot_mode) -- keep_going = 0; -- cycle_count++; -- -- if (data != &sleep_interval) { -- data = &sleep_interval; -- g_timeout_add_seconds(sleep_interval, scan, data); -- return FALSE; -- } -- -- if (keep_going) -- return TRUE; -- else -- return FALSE; --} -- --void get_irq_data(struct irq_info *irq, void *data) --{ -- sprintf(data + strlen(data), -- "IRQ %d LOAD %lu DIFF %lu CLASS %d ", irq->irq, irq->load, -- (irq->irq_count - irq->last_irq_count), irq->class); --} -- --void get_object_stat(struct topo_obj *object, void *data) --{ -- char irq_data[1024] = "\0"; -- -- if (g_list_length(object->interrupts) > 0) { -- for_each_irq(object->interrupts, get_irq_data, irq_data); -- } -- sprintf(data + strlen(data), "TYPE %d NUMBER %d LOAD %lu SAVE_MODE %d %s", -- object->obj_type, object->number, object->load, -- object->powersave_mode, irq_data); -- if (object->obj_type != OBJ_TYPE_CPU) { -- for_each_object(object->children, get_object_stat, data); -- } --} -- --gboolean sock_handle(gint fd, GIOCondition condition, gpointer user_data __attribute__((unused))) --{ -- char buff[500]; -- int sock; -- int recv_size = 0; -- int valid_user = 0; -- -- struct iovec iov = { buff, 500 }; -- struct msghdr msg = { NULL, 0, &iov, 1, NULL, 0, 0 }; -- msg.msg_control = malloc(CMSG_SPACE(sizeof(struct ucred))); -- msg.msg_controllen = CMSG_SPACE(sizeof(struct ucred)); -- -- struct cmsghdr *cmsg; -- -- if (condition == G_IO_IN) { -- sock = accept(fd, NULL, NULL); -- if (sock < 0) { -- log(TO_ALL, LOG_WARNING, "Connection couldn't be accepted.\n"); -- return TRUE; -- } -- if ((recv_size = recvmsg(sock, &msg, 0)) < 0) { -- log(TO_ALL, LOG_WARNING, "Error while receiving data.\n"); -- return TRUE; -- } -- cmsg = CMSG_FIRSTHDR(&msg); -- if ((cmsg->cmsg_level == SOL_SOCKET) && -- (cmsg->cmsg_type == SCM_CREDENTIALS)) { -- struct ucred *credentials = (struct ucred *) CMSG_DATA(cmsg); -- if (!credentials->uid) { -- valid_user = 1; -- } -- } -- if (!valid_user) { -- log(TO_ALL, LOG_INFO, "Permission denied for user to connect to socket.\n"); -- return TRUE; -- } -- -- if (!strncmp(buff, "stats", strlen("stats"))) { -- char stats[2048] = "\0"; -- for_each_object(numa_nodes, get_object_stat, stats); -- send(sock, stats, strlen(stats), 0); -- } -- if (!strncmp(buff, "settings ", strlen("settings "))) { -- if (!(strncmp(buff + strlen("settings "), "sleep ", -- strlen("sleep ")))) { -- char *sleep_string = malloc( -- sizeof(char) * (recv_size - strlen("settings sleep "))); -- strncpy(sleep_string, buff + strlen("settings sleep "), -- recv_size - strlen("settings sleep ")); -- int new_iterval = strtoul(sleep_string, NULL, 10); -- if (new_iterval >= 1) { -- sleep_interval = new_iterval; -- } -- } else if (!(strncmp(buff + strlen("settings "), "ban irqs ", -- strlen("ban irqs ")))) { -- char *end; -- char *irq_string = malloc( -- sizeof(char) * (recv_size - strlen("settings ban irqs "))); -- strncpy(irq_string, buff + strlen("settings ban irqs "), -- recv_size - strlen("settings ban irqs ")); -- g_list_free_full(cl_banned_irqs, free); -- cl_banned_irqs = NULL; -- need_rescan = 1; -- if (!strncmp(irq_string, "NONE", strlen("NONE"))) { -- return TRUE; -- } -- int irq = strtoul(irq_string, &end, 10); -- do { -- add_cl_banned_irq(irq); -- } while((irq = strtoul(end, &end, 10))); -- } else if (!(strncmp(buff + strlen("settings "), "cpus ", -- strlen("cpus")))) { -- char *cpu_ban_string = malloc( -- sizeof(char) * (recv_size - strlen("settings cpus "))); -- strncpy(cpu_ban_string, buff + strlen("settings cpus "), -- recv_size - strlen("settings cpus ")); -- banned_cpumask_from_ui = strtok(cpu_ban_string, " "); -- if (!strncmp(banned_cpumask_from_ui, "NULL", strlen("NULL"))) { -- banned_cpumask_from_ui = NULL; -- } -- need_rescan = 1; -- } -- } -- if (!strncmp(buff, "setup", strlen("setup"))) { -- char setup[2048] = "\0"; -- snprintf(setup, 2048, "SLEEP %d ", sleep_interval); -- if(g_list_length(cl_banned_irqs) > 0) { -- for_each_irq(cl_banned_irqs, get_irq_data, setup); -- } -- char banned[512]; -- cpumask_scnprintf(banned, 512, banned_cpus); -- snprintf(setup + strlen(setup), 2048 - strlen(setup), -- "BANNED %s", banned); -- send(sock, setup, strlen(setup), 0); -- } -- -- close(sock); -- } -- return TRUE; --} -- --int init_socket(char *socket_name) --{ -- struct sockaddr_un addr; -- memset(&addr, 0, sizeof(struct sockaddr_un)); -- -- socket_fd = socket(AF_LOCAL, SOCK_STREAM, 0); -- if (socket_fd < 0) { -- log(TO_ALL, LOG_WARNING, "Socket couldn't be created.\n"); -- return 1; -- } -- -- addr.sun_family = AF_UNIX; -- addr.sun_path[0] = '\0'; -- strncpy(addr.sun_path + 1, socket_name, strlen(socket_name)); -- if (bind(socket_fd, (struct sockaddr *)&addr, -- sizeof(sa_family_t) + strlen(socket_name) + 1) < 0) { -- log(TO_ALL, LOG_WARNING, "Daemon couldn't be bound to the socket.\n"); -- return 1; -- } -- int optval = 1; -- if (setsockopt(socket_fd, SOL_SOCKET, SO_PASSCRED, &optval, sizeof(optval)) < 0) { -- log(TO_ALL, LOG_WARNING, "Unable to set socket options.\n"); -- return 1; -- } -- listen(socket_fd, 1); -- g_unix_fd_add(socket_fd, G_IO_IN, sock_handle, NULL); -- return 0; - } - - int main(int argc, char** argv) - { -+ struct sigaction action, hupaction; - sigset_t sigset, old_sigset; - - sigemptyset(&sigset); -@@ -553,11 +345,19 @@ int main(int argc, char** argv) - } - } - -- g_unix_signal_add(SIGINT, handler, NULL); -- g_unix_signal_add(SIGTERM, handler, NULL); -- g_unix_signal_add(SIGUSR1, handler, NULL); -- g_unix_signal_add(SIGUSR2, handler, NULL); -- g_unix_signal_add(SIGHUP, force_rescan, NULL); -+ action.sa_handler = handler; -+ sigemptyset(&action.sa_mask); -+ action.sa_flags = 0; -+ sigaction(SIGINT, &action, NULL); -+ sigaction(SIGTERM, &action, NULL); -+ sigaction(SIGUSR1, &action, NULL); -+ sigaction(SIGUSR2, &action, NULL); -+ -+ hupaction.sa_handler = force_rescan; -+ sigemptyset(&hupaction.sa_mask); -+ hupaction.sa_flags = 0; -+ sigaction(SIGHUP, &hupaction, NULL); -+ - sigprocmask(SIG_SETMASK, &old_sigset, NULL); - - #ifdef HAVE_LIBCAP_NG -@@ -566,32 +366,58 @@ int main(int argc, char** argv) - capng_lock(); - capng_apply(CAPNG_SELECT_BOTH); - #endif -+ - for_each_irq(NULL, force_rebalance_irq, NULL); - - parse_proc_interrupts(); - parse_proc_stat(); - -- char socket_name[64]; -- snprintf(socket_name, 64, "%s%d.sock", SOCKET_PATH, getpid()); -+ while (keep_going) { -+ sleep_approx(sleep_interval); -+ log(TO_CONSOLE, LOG_INFO, "\n\n\n-----------------------------------------------------------------------------\n"); - -- if (init_socket(socket_name)) { -- return EXIT_FAILURE; -- } -- main_loop = g_main_loop_new(NULL, FALSE); -- int *last_interval = &sleep_interval; -- g_timeout_add_seconds(sleep_interval, scan, last_interval); -- g_main_loop_run(main_loop); - -- g_main_loop_quit(main_loop); -+ clear_work_stats(); -+ parse_proc_interrupts(); -+ parse_proc_stat(); -+ -+ /* cope with cpu hotplug -- detected during /proc/interrupts parsing */ -+ if (need_rescan) { -+ need_rescan = 0; -+ cycle_count = 0; -+ log(TO_CONSOLE, LOG_INFO, "Rescanning cpu topology \n"); -+ clear_work_stats(); -+ -+ free_object_tree(); -+ build_object_tree(); -+ for_each_irq(NULL, force_rebalance_irq, NULL); -+ parse_proc_interrupts(); -+ parse_proc_stat(); -+ sleep_approx(sleep_interval); -+ clear_work_stats(); -+ parse_proc_interrupts(); -+ parse_proc_stat(); -+ } -+ -+ if (cycle_count) -+ update_migration_status(); -+ -+ calculate_placement(); -+ activate_mappings(); - -+ if (debug_mode) -+ dump_tree(); -+ if (one_shot_mode) -+ keep_going = 0; -+ cycle_count++; -+ -+ } - free_object_tree(); - free_cl_opts(); - - /* Remove pidfile */ - if (!foreground_mode && pidfile) - unlink(pidfile); -- /* Remove socket */ -- close(socket_fd); - - return EXIT_SUCCESS; - } ---- a/cputree.c -+++ b/cputree.c -@@ -38,7 +38,6 @@ - - #include "irqbalance.h" - --extern char *banned_cpumask_from_ui; - - GList *cpus; - GList *cache_domains; -@@ -77,15 +76,11 @@ static void setup_banned_cpus(void) - cpus_clear(nohz_full); - - /* A manually specified cpumask overrides auto-detection. */ -- if (banned_cpumask_from_ui != NULL) { -- cpulist_parse(banned_cpumask_from_ui, -- strlen(banned_cpumask_from_ui), banned_cpus); -- goto out; -- } - if (getenv("IRQBALANCE_BANNED_CPUS")) { - cpumask_parse_user(getenv("IRQBALANCE_BANNED_CPUS"), strlen(getenv("IRQBALANCE_BANNED_CPUS")), banned_cpus); - goto out; - } -+ - file = fopen("/sys/devices/system/cpu/isolated", "r"); - if (file) { - if (getline(&line, &size, file) > 0) { -@@ -117,8 +112,6 @@ out: - log(TO_CONSOLE, LOG_INFO, "Isolated CPUs: %s\n", buffer); - cpumask_scnprintf(buffer, 4096, nohz_full); - log(TO_CONSOLE, LOG_INFO, "Adaptive-ticks CPUs: %s\n", buffer); -- cpumask_scnprintf(buffer, 4096, banned_cpus); -- log(TO_CONSOLE, LOG_INFO, "Banned CPUs: %s\n", buffer); - } - - static struct topo_obj* add_cache_domain_to_package(struct topo_obj *cache, diff --git a/utils/joe/Makefile b/utils/joe/Makefile deleted file mode 100644 index 3132104..0000000 --- a/utils/joe/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2007-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -# changes by David Kuehling : -# -# - include support for all emulation modes jmacs jpico etc. -# - see patches/002-builtinrc.patch -# -# changes by Vitaly Prosko : -# -# - updated for new build system rules -# - added static joerc config - no more defaults for native mode -# - got maintenance role -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=joe -PKG_VERSION:=4.3 -PKG_RELEASE:=1 - -PKG_SOURCE_URL:=@SF/joe-editor -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_MD5SUM:=5a167f5e88e62c77bb42b0145d72c466 -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_MAINTAINER:=Vitaly Protsko -PKG_LICENCE:=GPL-2.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/joe - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Editors - TITLE:=JOE - Joes own editor - URL:=http://sourceforge.net/projects/joe-editor/ - DEPENDS:=+libncurses -endef - -define Package/joe/description -Joe is world-famous Wordstar like text editor, that also features -Emacs and Pico emulation -endef - -define Package/joe/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/joe/joe $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/joe - $(INSTALL_CONF) ./files/joerc $(1)/etc/joe/joerc -endef - -define Package/joe/conffiles -/etc/joe/joerc -endef - -$(eval $(call BuildPackage,joe)) diff --git a/utils/joe/files/joerc b/utils/joe/files/joerc deleted file mode 100644 index 403cce6..0000000 --- a/utils/joe/files/joerc +++ /dev/null @@ -1,783 +0,0 @@ --asis --nobackups --nonotice --noxon --notite --assume_color --assume_256color --guess_non_utf8 --guess_utf16 --guess_crlf --guess_indent --menu_above --transpose - -joe_state --joexterm --brpaste --pastehack --restore --search_prompting --lmsg \i%k%T%W%I%X %n %m%y%R %M %x --rmsg %S Row %4r Col %3c --smsg ** Line %r Col %c Offset %o(0x%O) %e %a(0x%A) Width %w ** --zmsg ** Line %r Col %c Offset %o(0x%O) ** --xmsg \i Joe's Own Editor %v (%b) ** Type \bCtrl-K Q\b to exit or \bCtrl-K H\b for help **\i --aborthint ^C --helphint ^K H --highlight --istep 4 - -:include ftyperc - -:defmenu root -mode,"overwrite",rtn T Overtype %Zoverwrite% -mode,"hex",rtn ' Hex edit mode -mode,"autoindent",rtn I Autoindent %Zautoindent% -mode,"wordwrap",rtn W Word wrap %Zwordwrap% -mode,"tab",rtn D Tab width %Ztab% -mode,"lmargin",rtn L Left margin %Zlmargin% -mode,"rmargin",rtn R Right margin %Zrmargin% -mode,"square",rtn X Column mode %Zsquare% -mode,"indentc",rtn % % Indent char %Zindentc% -mode,"istep",rtn % % Indent step %Zistep% -menu,"indent",rtn = Indent select -mode,"highlight",rtn H Highlighting %Zhighlight% -mode,"crlf",rtn Z CR-LF/MS-DOS %Zcrlf% -mode,"linums",rtn N Line numbers %Zlinums% -mode,"beep",rtn B Beep %Zbeep% -mode,"rdonly",rtn O Read only %Zrdonly% -mode,"syntax",rtn Y Syntax -mode,"encoding",rtn E Encoding -mode,"asis",rtn % % Meta chars as-is -mode,"language",rtn V Language -mode,"picture",rtn P picture %Zpicture% -mode,"type",rtn F File type [%Ztype%] -mode,"title",rtn C Context %Ztitle% -menu,"more-options",rtn % % More options... - -:defmenu more-options menu,"root",rtn -menu,"^G",rtn % % ^G options -menu,"search",rtn % % search options -menu,"paragraph",rtn % % paragraph options -menu,"file",rtn % % file options -menu,"menu",rtn % % menu options -menu,"global",rtn % % global options -menu,"cursor",rtn % % cursor options -menu,"marking",rtn % % marking options -menu,"tab",rtn % % tab/indent options - -:defmenu indent menu,"root",rtn -mode,"istep",rtn,"1",rtn,mode,"indentc",rtn,"32",rtn,msg,"Indent step = 1, Indent character = 32",rtn 1 Space -mode,"istep",rtn,"2",rtn,mode,"indentc",rtn,"32",rtn,msg,"Indent step = 2, Indent character = 32",rtn 2 Spaces -mode,"istep",rtn,"3",rtn,mode,"indentc",rtn,"32",rtn,msg,"Indent step = 3, Indent character = 32",rtn 3 Spaces -mode,"istep",rtn,"4",rtn,mode,"indentc",rtn,"32",rtn,msg,"Indent step = 4, Indent character = 32",rtn 4 Spaces -mode,"istep",rtn,"5",rtn,mode,"indentc",rtn,"32",rtn,msg,"Indent step = 5, Indent character = 32",rtn 5 Spaces -mode,"istep",rtn,"8",rtn,mode,"indentc",rtn,"32",rtn,msg,"Indent step = 8, Indent character = 32",rtn 8 Spaces -mode,"istep",rtn,"10",rtn,mode,"indentc",rtn,"32",rtn,msg,"Indent step = 10, Indent character = 32",rtn 0 Ten -mode,"istep",rtn,"1",rtn,mode,"indentc",rtn,"9",rtn,msg,"Indent step = 1, Indent character = 9",rtn T Tab - -:defmenu menu menu,"more-options",rtn -mode,"menu_explorer",rtn % % Menu explorer %Zmenu_explorer% -mode,"menu_above",rtn % % Menu position %Zmenu_above% -mode,"menu_jump",rtn % % Jump into menu %Zmenu_jump% -mode,"transpose",rtn % % Transpose menus %Ztranspose% - -:defmenu ^G menu,"more-options",rtn -mode,"highlighter_context",rtn % % ^G uses highlighter context %Zhighlighter_context% -mode,"single_quoted",rtn % % ^G ignores '...' %Zsingle_quoted% -mode,"no_double_quoted",rtn % % ^G no ignore "..." %Zno_double_quoted% -mode,"c_comment",rtn % % ^G ignores /*...*/ %Zc_comment% -mode,"cpp_comment",rtn % % ^G ignores //... %Zcpp_comment% -mode,"pound_comment",rtn % % ^G ignores #... %Zpound_comment% -mode,"vhdl_comment",rtn % % ^G ignores --... %Zvhdl_comment% -mode,"semi_comment",rtn % % ^G ignores ;... %Zsemi_comment% -mode,"tex_comment",rtn % % ^G ignores %%... %Ztex_comment% -mode,"text_delimiters",rtn % % Text delimiters %Ztext_delimiters% - -:defmenu search menu,"more-options",rtn -mode,"icase",rtn % % Case insensitivity %Zicase% -mode,"wrap",rtn % % Search wraps %Zwrap% -mode,"search_prompting",rtn % % Search prompting %Zsearch_prompting% -mode,"csmode",rtn % % Continued search %Zcsmode% - -:defmenu paragraph menu,"more-options",rtn -mode,"french",rtn % % French spacing %Zfrench% -mode,"flowed",rtn % % Flowed text %Zflowed% -mode,"cpara",rtn % % Paragraph indent chars %Zcpara% -mode,"cnotpara",rtn % % Not-paragraph chars %Zcnotpara% - -:defmenu file menu,"more-options",rtn -mode,"restore",rtn % % Restore cursor %Zrestore% -mode,"guess_crlf",rtn % % Auto detect CR-LF %Zguess_crlf% -mode,"guess_indent",rtn % % Guess indent %Zguess_indent% -mode,"guess_non_utf8",rtn % % Guess non-UTF-8 %Zguess_non_utf8% -mode,"guess_utf8",rtn % % Guess UTF-8 %Zguess_utf8% -mode,"guess_utf16",rtn % % Guess UTF-16 %Zguess_utf16% -mode,"force",rtn % % Force last NL %Zforce% -mode,"nobackup",rtn % % No backup %Znobackup% - -:defmenu global menu,"more-options",rtn -mode,"nolocks",rtn % % Disable locks %Znolocks% -mode,"nobackups",rtn % % Disable backups %Znobackups% -mode,"nodeadjoe",rtn % % Disable DEADJOE %Znodeadjoe% -mode,"nomodcheck",rtn % % Disable mtime check %Znomodcheck% -mode,"nocurdir",rtn % % Disable current dir %Znocurdir% -mode,"exask",rtn % % Exit ask %Zexask% -mode,"nosta",rtn % % Disable status line %Znosta% -mode,"keepup",rtn % % Fast status line %Zkeepup% -mode,"break_hardlinks",rtn % % Break hard links %Zbreak_hardlinks% -mode,"break_links",rtn % % Break links %Zbreak_links% -mode,"joe_state",rtn % % Joe_state file %Zjoe_state% -mode,"undo_keep",rtn % % No. undo records %Zundo_keep% -mode,"backpath",rtn % % Path to backup files %Zbackpath% - -:defmenu cursor menu,"more-options",rtn -mode,"pg",rtn % % No. PgUp/PgDn lines %Zpg% -mode,"mid",rtn C Center on scroll %Zmid% -mode,"left",rtn L Columns to scroll left %Zleft% -mode,"right",rtn R Columns to scroll right %Zright% -mode,"floatmouse",rtn % % Click past end %Zfloatmouse% -mode,"rtbutton",rtn % % Right button %Zrtbutton% - -:defmenu marking menu,"more-options",rtn -mode,"autoswap",rtn % % Autoswap mode %Zautoswap% -mode,"marking",rtn % % Marking %Zmarking% -mode,"lightoff",rtn % % Auto unmask %Zlightoff% - -:defmenu tab menu,"more-options",rtn -mode,"smarthome",rtn % % Smart home key %Zsmarthome% -mode,"smartbacks",rtn % % Smart backspace %Zsmartbacks% -mode,"indentfirst",rtn % % To indent first %Zindentfirst% -mode,"purify",rtn % % Clean up indents %Zpurify% -mode,"spaces",rtn % % No tabs %Zspaces% - -{Basic - \|\uREGION\u \|\uGO TO\u \|\uGO TO\u \|\uDELETE\u \|\uEXIT\u \|\uSEARCH\u \| - \|\b^Arrow\b Select \|\b^Z\b Prev. word \|\b^U/^V\b PgUp/PgDn \|\b^D\b Char. \|\b^KX\b Save \|\b^KF\b Find \| - \|\b^KB\b Begin \|\b^X\b Next word \|\uMISC\u \|\b^Y\b Line \|\b^C\b Abort \|\b^L\b Next \| - \|\b^KK\b End \|\b^KU\b Top of file \|\b^KJ\b Paragraph \|\b^W\b >Word \|\b^KQ\b All \|\uHELP\u \| - \|\b^KC\b Copy \|\b^KV\b End of file \|\b^KA\b Center line \|\b^O\b Word< \|\uFILE\u \|\bEsc .\b Next\| - \|\b^KM\b Move \|\b^A\b Beg. of line \|\b^K Space\b Status \|\b^J\b >Line \|\b^KE\b Edit \|\bEsc ,\b Prev\| - \|\b^KW\b File \|\b^E\b End of line \|\uSPELL\u \|\b^[O\b Line< \|\b^KR\b Insert \|\b^KH\b Off \| - \|\b^KY\b Delete \|\b^KL\b To line no. \|\bEsc N\b Word \|\b^_\b Undo \|\b^KD\b Save \|\b^T\b Menu \| - \|\b^K/\b Filter \|\b^G\b Matching ( \|\bEsc L\b File \|\b^^\b Redo \|\b^K`\b Revert \|\b\b \| -} - -{Advanced - \|\uMACROS\u \|\uSCROLL\u \|\uWINDOW\u \|\uGO TO\u \|\uI-SEARCH\u \| - \|\b^K[ 0-9\b Record \|\bEsc W\b Up \|\b^KO\b Open \b^C\b Close \|\bEsc B\b / \bK\b \|\b^R\b Backwards \| - \|\b^K]\b Stop \|\bEsc Z\b Down \|\b^KG\b Grow \b^KT\b Shrink \|to \b^KB\b/\b^KK \b\|\b^S\b Forwards \| - \|\bEsc I\b Text \|\bEsc <\b Left \|\b^KN\b Next \b^KP\b Prev. \|\b^P\b Up \|\uBOOKMARKS\u \| - \|\b^K?\b Pause \|\bEsc >\b Right \|\b^KI\b Show one / All \|\b^N\b Down \|\bEsc 0-9\b Goto \| - \| for prompt \|\uINSERT\u \|\uSHELL\u \|\b^B\b Left \|\bEsc Esc\b Set \| - \|\b^K 0-9\b Play \|\b^]\b Line \b^Q\b Ctrl \|\bF1-F4\b Term emulator \|\b^F\b Right \|\b^K-\b Auto prev\| - \|\b^K\\\b Repeat \|\b^@\b Space \b^\\\b Meta \|\b^K'\b In buffer \| \|\b^K=\b Auto next\| - \|\bEsc D\b Dump \|\bEsc Y\b Paste \|\b^KZ\b Suspend \bEsc !\b Append \| \| \| -} - -{Programs - \|\uCOMMANDS\u \|\uCOMPILING\u \|\uQUICK\u \| - \|\bEsc X\b Command prompt\|\bEsc C\b Save modified compile\|\b^G\b Find word under cursor \| - \|\bEsc M\b Calculator \|\bEsc G\b Grep \|\b^K;\b Tags file search \| - \|\bshowlog\b Startup log \|\bEsc =\b To next error \|\bEsc Enter\b Complete word \| - \|\bupper\b Change case \|\bEsc -\b To prev. error \|\uBUFFER\u \| - \|\blower\b Change case \|\bEsc Space\b Jump to error \|\bEsc U\b Next \| - \|\bcd\b Change dir \|\uINDENT\u \|\bEsc V\b Previous \| - \|\bkeymap\b Change map \|\b^K,\b Less \|\bEsc X bufed\b Switch \| - \| \|\b^K.\b More \| \| -} - -{Search - Search sequences: \| - \b\\^ \\$\b matches beg./end of line \b\\.\b match any single char \| - \b\\< \\>\b matches beg./end of word \b\\!\b match char or expression \| - \b\\( \\)\b grouping \b\\|\b match left or right \| - \b\\[a-z]\b matches one of a set \b\\y \\Y\b short for (.*) / (!*) \| - \b\\{1,3}\b match 1 - 3 occurrences \b\\?\b match 0 or 1 occurrence \| - \b\\+\b match 1 or more occurrences \b\\*\b match 0 or more occurrences \| - \| - \b^C\b to abort \bEsc .\b to list of escape sequences \| -} - -{Escape sequences - Escape sequences: \| - \b\\x{10fff}\b Unicode code point \b\\p{Ll}\b Unicode category \| - \b\\i\b / \b\\I\b Identifier start \b\\t\b tab \b\\e\b escape \| - \b\\c\b / \b\\C\b Identifier continue \b\\n\b newline \b\\r\b carriage return \| - \b\\d\b / \b\\D\b Digit / Not a digit \b\\b\b backspace \b\\xFF\b hex character \| - \b\\w\b / \b\\W\b Word / Not a word \b\\a\b alert \b\\377\b octal character \| - \b\\s\b / \b\\S\b Space / Not a space \b\\f\b formfeed \b\\\\\b backslash \| - \| - \| -} - -{Replace - Replace sequences: \| - \b\\&\b replaced with entire match \b\\1\b - \b9\b replaced with Nth group \| - \b\\u \\l\b convert next to upper/lower \b\\U \\L\b case convert until \b\\E\b \| - \| - \| - \| - \| - \| - \b^C\b to abort \bEsc ,\b to list of escape sequences \| -} - -{SearchOptions - Search options: \| - \br\b Replace \bk\b Restrict search to highlighted block \| - \bi\b Ignore case \bb\b Search backwards instead of forwards \| - \ba\b Search across all loaded files \| - \be\b Search across all files in Grep or Compile error list \| - \bw\b / \bn\b Allow / prevent wrap to start of file \| - \bx\b / \by\b Search text is standard format / JOE format regular expression \| - \bnnn\b Perform exactly nnn replacements \| - \b^C\b to abort -} - -{Math - \uMATH COMMANDS\u \uCONSTANTS\u \| - \bhex oct bin\b display mode \b0xff\b hex entry \| - \beng dec\b engineering / normal \b0o77\b octal entry \| - \bins\b type result into file \b0b11\b binary entry \| - \beval\b evaluate block \b3e-4\b floating point entry \| - 2+3\b:\bins multiple commands \uVARIABLES\u \| - \uOPERATORS\u \bans\b Previous result \| - \b! ^ * / % + -\b \ba=10\b Assign a variable \| - \b< <= > >= == != && || ? :\b \bEsc .\b for list of functions \| -} - -{Functions - \uFUNCTIONS\u \uCONSTANTS\u \| - \bsin cos tab asin acos atan\b \be pi\b \| - \bsinh cosh tanh asinh acosh atanh\b \| - \bsqrt cbrt exp ln log\b \| - \bint floor ceil abs\b \| - \berf erfc j0 j1 y0 y1\b \| - \bjoe(..macro..)\b - runs an editor macro \| - \| - \bEsc .\b for statistics \| -} - -{Statistics - \uMATH COMMANDS\u \| - Statistics on region of numbers Linear regression on region of x y pairs \| - \bsum\b Sum \blr(x)\b Estimate y given x y=m*x+b \| - \bcnt\b Count \brlr(y)\b Estimate x given y \| - \bavg\b Mean \bLr rLr\b Logarithmic regression y=m*ln(x)+b \| - Standard deviation: \blR rlR\b Exponential regression y=e^(m*x)+b \| - \bdev\b all data present \bLR rLR\b Power regression y=b*x^m \| - \bsamp\b sample of data present Side effects: \bb\b, \bm\b: regression coef. \| - \br\b: correlation coef., \bcov\b: covariance \| -} - -{Names - Hit TAB to complete names. Use up / down arrow keys to traverse history. \| - Special file names: \| - \b!\bcommand Pipe in/out of a shell command \| - \b>>\bfilename Append to a file \| - \b-\b Read/Write to/from standard I/O \| - filename\b,START,SIZE\b Read/Write a part of a file/device \| - Give START/SIZE in decimal (255), octal (0377) or hex (0xFF) \| - \b\\,\b Use backslash to quote special characters \| - \b^C\b to abort -} - -{CharTable - \| Dec \u 0123 4567 8901 2345 0123 4567 8901 2345 \u Dec \| - \| 0 | \u@ABC\u \uDEFG\u \uHIJK\u \uLMNO\u \i\u@ABC\u\i \i\uDEFG\u\i \i\uHIJK\u\i \i\uLMNO\u\i | 128 \| - \| 16 | \uPQRS\u \uTUVW\u \uXYZ[\u \u\\]^_\u \i\uPQRS\u\i \i\uTUVW\u\i \i\uXYZ[\u\i \i\u\\]^_\u\i | 144 \| - \| 32 | !"# $%&' ()*+ ,-./  ¡¢£ ¤¥¦§ ¨©ª« ¬X®¯ | 160 \| - \| 48 | 0123 4567 89:; <=>? °±²³ ´µ¶· ¸¹º» ¼½¾¿ | 176 \| - \| 64 | @ABC DEFG HIJK LMNO ÀÁÂà ÄÅÆÇ ÈÉÊË ÌÍÎÏ | 192 \| - \| 80 | PQRS TUVW XYZ[ \\]^_ ÐÑÒÓ ÔÕÖ× ØÙÚÛ ÜÝÞß | 208 \| - \| 96 | `abc defg hijk lmno àáâã äåæç èéêë ìíîï | 224 \| - \| 112 | pqrs tuvw xyz{ |}~ ðñòó ôõö÷ øùúû üýþÿ | 240 \| -} - -{Joe - Send bug reports to: http://sourceforge.net/projects/joe-editor \| - \| - default joerc file is here @JOERC@/joerc \| - default syntax and i18n files are here @JOEDATA@ \| - additional documentation can be found here @JOEDOC@ \| - \| - \| - \| - \| -} - -:def recenter retype,arg,"top+height/2-line",rtn,upslide - -:windows -type U+0 TO U+10FFFF -abort ^C - abort ^K Q - abort ^K ^Q - abort ^K q -querysave,query,killjoe ^K Q -querysave,query,killjoe ^K ^Q -querysave,query,killjoe ^K q -arg ^K \ -explode ^K I -explode ^K ^I -explode ^K i -help ^K H -help ^K ^H -help ^K h -hnext ^[ . -hprev ^[ , -math ^[ m -math ^[ M - math ^[ ^M -msg ^[ h -msg ^[ H -msg ^[ ^H -nextw ^K N -nextw ^K ^N -nextw ^K n -pgdn .kN -pgdn ^V -pgdn ^[ [ 6 ~ - pgdn ^# S -pgup .kP -pgup ^U -pgup ^[ [ 5 ~ - pgup ^# T -play ^K 0 TO 9 -prevw ^K P -prevw ^K ^P -prevw ^K p -query ^K ? -record ^K [ - retype ^R - recenter ^R -rtn ^M -shell ^K Z -shell ^K ^Z -shell ^K z -stop ^K ] - Mouse handling -defmdown MDOWN -defmup MUP -defmdrag MDRAG -defm2down M2DOWN -defm2up M2UP -defm2drag M2DRAG -defm3down M3DOWN -defm3up M3UP -defm3drag M3DRAG -defmiddleup MIDDLEUP -defmiddledown MIDDLEDOWN - -xtmouse ^[ [ M -extmouse ^[ [ < - -:main Text editing window -:inherit windows - -:def compile mwind!,mfit!,querysave,query,scratch,"* Build Log *",rtn,bof,markb,eof," ",markk,blkdel,build -:def grep_find mwind!,mfit!,scratch,"* Grep Log *",rtn,bof,markb,eof," ",markk,blkdel,grep - -:def shell1 scratch_push,"* Startup Log *",rtn,scratch_push,"* Shell 1 *",rtn,vtbknd!,eof -:def shell2 scratch_push,"* Startup Log *",rtn,scratch_push,"* Shell 2 *",rtn,vtbknd!,eof -:def shell3 scratch_push,"* Startup Log *",rtn,scratch_push,"* Shell 3 *",rtn,vtbknd!,eof -:def shell4 scratch_push,"* Startup Log *",rtn,scratch_push,"* Shell 4 *",rtn,vtbknd!,eof -:def shell_clear psh,bof,markb,eof,markk,blkdel -:def shell_parse parserr -:def shell_gparse gparse -:def shell_release release -:def shell_math maths -:def shell_abort abort -:def shell_typemath txt,maths,"ins",rtn,rtn,txt," ",rtn,txt,quote,"d",rtn -:def shell_rtn rtn -:def shell_edit edit -:def shell_dellin dellin -:def shell_cd cd -:def shell_pop popabort -:def shell_markb markb -:def shell_markk markk - -paste ^[ ] 5 2 ; -brpaste ^[ [ 2 0 0 ~ -brpaste_done ^[ [ 2 0 1 ~ -insc ^[ [ 2 ~ -insc ^[ [ L -delch ^[ [ 3 ~ -pgup ^[ [ I -pgdn ^[ [ G -home ^[ [ 1 ~ -home ^[ [ H -home ^[ O H -home ^[ [ 7 ~ - home ^# SP A -eol ^[ [ 4 ~ -eol ^[ [ F -eol ^[ O F -eol ^[ [ 8 ~ - eol ^# SP @ - -rtarw,ltarw,begin_marking,rtarw,toggle_marking ^[ [ 1 ; 5 C -rtarw,ltarw,begin_marking,rtarw,toggle_marking ^[ [ 5 C -rtarw,ltarw,begin_marking,rtarw,toggle_marking ^[ O c -ltarw,rtarw,begin_marking,ltarw,toggle_marking ^[ [ 1 ; 5 D -ltarw,rtarw,begin_marking,ltarw,toggle_marking ^[ [ 5 D - ltarw,rtarw,begin_marking,ltarw,toggle_marking ^[ O D -ltarw,rtarw,begin_marking,ltarw,toggle_marking ^[ O d -uparw,dnarw,begin_marking,uparw,toggle_marking ^[ [ 1 ; 5 A -uparw,dnarw,begin_marking,uparw,toggle_marking ^[ [ 5 A - uparw,dnarw,begin_marking,uparw,toggle_marking ^[ O A -uparw,dnarw,begin_marking,uparw,toggle_marking ^[ O a -dnarw,uparw,begin_marking,dnarw,toggle_marking ^[ [ 1 ; 5 B -dnarw,uparw,begin_marking,dnarw,toggle_marking ^[ [ 5 B - dnarw,uparw,begin_marking,dnarw,toggle_marking ^[ O B -dnarw,uparw,begin_marking,dnarw,toggle_marking ^[ O b - -blkdel,nmark ^[ [ 3 ; 5 - -blkdel,nmark ^[ [ 3 ; 5 ~ - -yank ^[ [ 2 ; 5 - -yank ^[ [ 2 ; 5 ~ -delbol ^[ o -delbol ^[ ^O -dnslide ^[ z -dnslide ^[ Z -dnslide ^[ ^Z -dnslide,dnslide,dnslide,dnslide MWDOWN -compile ^[ c -compile ^[ C -compile ^[ ^C -grep_find ^[ g -grep_find ^[ G -grep_find ^[ ^G -execmd ^[ x -execmd ^[ X -execmd ^[ ^X -finish ^[ ^I -finish ^[ ^M -mwind!,mfit,jump,bol ^[ SP -isrch ^[ s -isrch ^[ S -isrch ^[ ^S -isrch ^S -notmod ^[ ~ -mwind,mfit,prevw,nxterr ^[ = -parserr ^[ e -parserr ^[ E -parserr ^[ ^E -mwind,mfit,prevw,prverr ^[ - -rsrch ^[ r -rsrch ^[ R -rsrch ^[ ^R -retype,rsrch ^R -run ^[ ! -tomarkb ^[ b -tomarkb ^[ ^B -tomarkk ^[ k -tomarkk ^[ ^K -tomarkk ^[ K -txt ^[ i -txt ^[ I -upslide ^[ w -upslide ^[ ^W -upslide ^[ W -upslide,upslide,upslide,upslide MWUP -yank ^[ y -yankpop ^[ ^Y -yank ^[ Y -insc ^@ - bufed ^[ d -nbuf ^[ v -nbuf ^[ V -nbuf ^[ ^V -pbuf ^[ u -pbuf ^[ U -pbuf ^[ ^U - query ^[ q - byte ^[ n - col ^[ c - abortbuf ^[ k - ask ^[ a - bop ^[ p - bos ^[ x - copy ^[ ^W - dupw ^[ \ - eop ^[ n - format ^[ j - markl ^[ l - nmark ^[ @ - pop ^[ > - psh ^[ < - swap ^[ x - tomarkbk ^[ g - tos ^[ e - tw0 ^[ 0 - tw1 ^[ 1 - uarg ^[ u - yank ^[ ^Y - yapp ^[ w -quote8 ^\ - quote ` -quote ^[ ' -quote ^Q -backs ^? -backs ^H -backw ^O -bknd ^K ' -blkcpy ^K C -blkcpy ^K ^C -blkcpy ^K c -blkdel ^K Y -blkdel ^K ^Y -blkdel ^K y -blkmove ^K M -blkmove ^K ^M -blkmove ^K m -blksave ^K W -blksave ^K ^W -blksave ^K w -bof ^K U -bof ^K ^U -bof ^K u - bol .kh - bol ^A - bol ^# SP A -home .kh -home ^A -center ^K A -center ^K ^A -center ^K a -crawll ^K < -crawll ^[ < -crawlr ^K > -crawlr ^[ > -delch .kD -delch ^D -deleol ^J -dellin ^Y -delw ^W -dnarw .kd -dnarw ^N -dnarw ^[ O B -dnarw ^[ [ B - dnarw ^# B -edit ^K E -edit ^K ^E -edit ^K e -eof ^K V -eof ^K ^V -eof ^K v -eol .kH -eol .@7 -eol ^E -exsave ^K X -exsave ^K ^X -exsave ^K x -ffirst ^K F -ffirst ^K ^F -ffirst ^K f -filt ^K / - finish ^K ^M -fnext ^L -fmtblk ^K J -fmtblk ^K ^J -fmtblk ^K j -gomark ^[ 0 TO 9 -groww ^K G -groww ^K ^G -groww ^K g -insc .kI - insc ^@ -insf ^K R -insf ^K ^R -insf ^K r -lindent ^K , -line ^K L -line ^K ^L -line ^K l -ltarw .kl -ltarw ^B -ltarw ^[ O D -ltarw ^[ [ D - ltarw ^# D -macros ^[ d -macros ^[ ^D -markb ^K B -markb ^K ^B -markb ^K b -markk ^K K -markk ^K ^K -markk ^K k - mode ^T -menu,"root",rtn ^T -nextpos ^K = -nextword ^X -open ^] -prevpos ^K - -prevword ^Z -reload ^K ` -redo ^^ -rindent ^K . -rtarw .kr -rtarw ^F -rtarw ^[ O C -rtarw ^[ [ C - rtarw ^# C -run ^K ! -save ^K D -save ^K S -save ^K ^D -save ^K ^S -save ^K d -save ^K s -setmark ^[ ^[ -shrinkw ^K T -shrinkw ^K ^T -shrinkw ^K t -splitw ^K O -splitw ^K ^O -splitw ^K o -stat ^K SP -stat ^K ^@ -tag ^K ; -tomatch ^G -undo ^_ -uparw .ku - uparw ^# A -uparw ^P -uparw ^[ O A -uparw ^[ [ A -shell1 ^[ [ 1 1 ~ -shell1 ^[ O P -shell1 ^[ [ [ A -shell1 .k1 -shell2 ^[ [ 1 2 ~ -shell2 ^[ O Q -shell2 ^[ [ [ B -shell2 .k2 -shell3 ^[ [ 1 3 ~ -shell3 ^[ O R -shell3 ^[ [ [ C -shell3 .k3 -shell4 ^[ [ 1 4 ~ -shell4 ^[ O S -shell4 ^[ [ [ D -shell4 .k4 - -:prompt Prompt windows -:inherit main -if,"byte>size",then,complete,complete,else,delch,endif ^D -complete ^I -dnarw,eol .kd -dnarw,eol ^N -dnarw,eol ^[ O B -dnarw,eol ^[ [ B - dnarw,eol ^# B -uparw,eol .ku - uparw,eol ^# A -uparw,eol ^P -uparw,eol ^[ O A -uparw,eol ^[ [ A - -:menu Selection menus -:inherit windows - -pgupmenu ^[ [ I -pgdnmenu ^[ [ G -bolmenu ^[ [ 1 ~ -bolmenu ^[ [ H -bolmenu ^[ O H -bolmenu ^[ [ 7 ~ - bolmenu ^# SP A -eolmenu ^[ [ 4 ~ -eolmenu ^[ [ F -eolmenu ^[ O F -eolmenu ^[ [ 8 ~ - eolmenu ^# SP @ -abort ^[ ^[ -backsmenu ^? -backsmenu ^H -bofmenu ^K U -bofmenu ^K ^U -bofmenu ^K u -bolmenu .kh -bolmenu ^A -dnarwmenu .kd -dnarwmenu ^N -dnarwmenu ^[ [ B -dnarwmenu ^[ O B - dnarwmenu ^# B -dnarwmenu MWDOWN -eofmenu ^K V -eofmenu ^K ^V -eofmenu ^K v -eolmenu .kH -eolmenu ^E -ltarwmenu .kl -ltarwmenu ^B -ltarwmenu ^[ [ D -ltarwmenu ^[ O D - ltarwmenu ^# D -pgdnmenu .kN -pgdnmenu ^V -pgdnmenu ^[ [ 6 ~ - pgdnmenu ^# S -pgupmenu .kP -pgupmenu ^U -pgupmenu ^[ [ 5 ~ - pgupmenu ^# T -rtarwmenu .kr -rtarwmenu ^F -rtarwmenu ^[ [ C - rtarwmenu ^# C -rtarwmenu ^[ O C -rtn SP -rtn ^I -rtn ^K H -rtn ^K h -rtn ^K ^H -tabmenu ^I -uparwmenu .ku -uparwmenu ^P -uparwmenu ^[ [ A -uparwmenu ^[ O A - uparwmenu ^# A -uparwmenu MWUP -defm2down M2DOWN - -:query Single-key query window -:inherit windows - -:querya Single-key query window for quoting -type U+0 TO U+10FFFF - -:querysr Search & replace query window -type U+0 TO U+10FFFF - -:shell Input to shell windows -:inherit main -"" ^C -"" ^D -" " ^I -"" ^H -" " ^M -"" ^? - -:vtshell Input to ANSI shell windows -:inherit main -""  [ A -"" .ku -""  [ B -"" .kd -""  [ C -"" .kr -""  [ D -"" .kl -"" ^A -"" ^C -"" ^D -"" ^E -" " ^I -"" ^H -" " ^M -"" ^? diff --git a/utils/klish/Makefile b/utils/klish/Makefile deleted file mode 100644 index 4374e27..0000000 --- a/utils/klish/Makefile +++ /dev/null @@ -1,91 +0,0 @@ - -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=klish -PKG_VERSION:=2.1.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://libcode.org/attachments/download/66/ -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENCE -PKG_MAINTAINER:=Takashi Umeno -PKG_MD5SUM:=7dfe46d474c02c86946c1d7a461ae549 - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/klish/default - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Shells - TITLE:=Kommand Line Interface SHell ($(1)) - URL:=http://libcode.org/projects/klish/ -endef - -define Package/klish -$(call Package/klish/default,main tool) - DEPENDS:=+libstdcpp +libxml2 -endef - -define Package/klish/description - The klish is a framework for implementing a CISCO-like CLI on a UNIX - systems. It is configurable by XML files. The KLISH stands for Kommand - Line Interface Shell. - The klish is a fork of clish 0.7.3 developed by Graeme McKerrell. - It defines new features but it's compatible (as much as possible) with - clish's XML configuration files. - klish is able to run using clish XML configuration files although - current clish users may expect some changes in behavior. - Konf and konfd are klish utilities that are used to store configuration - informations in a way which is similar to what's found on CISCO devices. - More information about these tools is to be found on the klish web site. -endef - -define Build/Configure - $(call Build/Configure/Default, \ - --with-libxml2 \ - ) -endef - -define Package/klish/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clish $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/konf $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/konfd $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sigexec $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,klish)) - -define Package/klish-xml-files - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=klish - TITLE:=klish sample XML files - URL:=http://code.google.com/p/klish/ -endef - -define Package/klish-xml-files/description - This is a set of sample XML files for klish. -endef - -define Package/klish-xml-files/install - $(INSTALL_DIR) $(1)/etc/clish - $(CP) $(PKG_BUILD_DIR)/xml-examples/clish $(1)/etc/clish/ - $(CP) $(PKG_BUILD_DIR)/xml-examples/klish $(1)/etc/clish/ - $(CP) $(PKG_BUILD_DIR)/xml-examples/lua $(1)/etc/clish/ - $(CP) $(PKG_BUILD_DIR)/xml-examples/test $(1)/etc/clish/ -endef - -$(eval $(call BuildPackage,klish-xml-files)) diff --git a/utils/klish/patches/010-shell_execute_fix.patch b/utils/klish/patches/010-shell_execute_fix.patch deleted file mode 100644 index c9ea8c1..0000000 --- a/utils/klish/patches/010-shell_execute_fix.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/clish/shell/shell_execute.c -+++ b/clish/shell/shell_execute.c -@@ -19,13 +19,6 @@ - #include - #include - --/* Empty signal handler to ignore signal but don't use SIG_IGN. */ --static void sigignore(int signo) --{ -- signo = signo; /* Happy compiler */ -- return; --} -- - /*-------------------------------------------------------- */ - static int clish_shell_lock(const char *lock_path) - { diff --git a/utils/kmod/Makefile b/utils/kmod/Makefile index 96769aa..d54e458 100644 --- a/utils/kmod/Makefile +++ b/utils/kmod/Makefile @@ -12,8 +12,8 @@ PKG_VERSION:=20 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://www.kernel.org/pub/linux/utils/kernel/kmod/ -PKG_MD5SUM:=d6f4fef718a50bd88080de6a43bc64d8 +PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kmod/ +PKG_HASH:=89c1a1a2193c31f9ebe582640bfa2bd401341dc24119f5a7f702588116fadaa0 PKG_MAINTAINER:=Jeff Waugh PKG_LICENSE:=LGPL-2.1+ PKG_LICENSE_FILES:=COPYING diff --git a/utils/lcd4linux/Config.in b/utils/lcd4linux/Config.in deleted file mode 100644 index 1410f2b..0000000 --- a/utils/lcd4linux/Config.in +++ /dev/null @@ -1,490 +0,0 @@ -if PACKAGE_lcd4linux-custom - -config LCD4LINUX_CUSTOM_NEEDS_libdbus - bool - -#config LCD4LINUX_CUSTOM_NEEDS_libftdi -# bool - -config LCD4LINUX_CUSTOM_NEEDS_libgd - bool - -config LCD4LINUX_CUSTOM_NEEDS_libiconv - bool - -config LCD4LINUX_CUSTOM_NEEDS_libjpeg - bool - -config LCD4LINUX_CUSTOM_NEEDS_libmpdclient - bool - -config LCD4LINUX_CUSTOM_NEEDS_libmysqlclient - bool - -config LCD4LINUX_CUSTOM_NEEDS_libncurses - bool - -config LCD4LINUX_CUSTOM_NEEDS_libnmeap - bool - -config LCD4LINUX_CUSTOM_NEEDS_libsqlite3 - bool - -config LCD4LINUX_CUSTOM_NEEDS_libusb - bool - -#config LCD4LINUX_CUSTOM_NEEDS_libX11 -# bool - -config LCD4LINUX_CUSTOM_NEEDS_ppp - bool - -config LCD4LINUX_CUSTOM_NEEDS_python - bool - - -comment "Drivers ---" - -config LCD4LINUX_CUSTOM_DRIVER_ASTUSB - bool - prompt "ASTUSB" - -config LCD4LINUX_CUSTOM_DRIVER_BeckmannEgle - bool - prompt "BeckmannEgle" - -config LCD4LINUX_CUSTOM_DRIVER_BWCT - bool - prompt "BWCT" - select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_CrystalFontz - bool - prompt "CrystalFontz" - -config LCD4LINUX_CUSTOM_DRIVER_Curses - bool - prompt "Curses" - select LCD4LINUX_CUSTOM_NEEDS_libncurses - -config LCD4LINUX_CUSTOM_DRIVER_Cwlinux - bool - prompt "Cwlinux" - -config LCD4LINUX_CUSTOM_DRIVER_D4D - bool - prompt "D4D" - select LCD4LINUX_CUSTOM_NEEDS_libgd - -config LCD4LINUX_CUSTOM_DRIVER_dpf - bool - prompt "dpf" - select LCD4LINUX_CUSTOM_NEEDS_libusb - select LCD4LINUX_CUSTOM_NEEDS_libgd - -config LCD4LINUX_CUSTOM_DRIVER_EA232graphic - bool - prompt "EA232graphic" - select LCD4LINUX_CUSTOM_NEEDS_libgd - -config LCD4LINUX_CUSTOM_DRIVER_EFN - bool - prompt "EFN" - -config LCD4LINUX_CUSTOM_DRIVER_FutabaVFD - bool - prompt "FutabaVFD" - -config LCD4LINUX_CUSTOM_DRIVER_FW8888 - bool - prompt "FW8888" - -config LCD4LINUX_CUSTOM_DRIVER_G15 - bool - prompt "G15" - select LCD4LINUX_CUSTOM_NEEDS_libgd - select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_GLCD2USB - bool - prompt "GLCD2USB" - select LCD4LINUX_CUSTOM_NEEDS_libgd - select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_HD44780 - bool - prompt "HD44780" - depends on BROKEN - -config LCD4LINUX_CUSTOM_DRIVER_HD44780-I2C - bool - prompt "HD44780-I2C" - depends on BROKEN - -config LCD4LINUX_CUSTOM_DRIVER_IRLCD - bool - prompt "IRLCD" - select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_LCD2USB - bool - prompt "LCD2USB" - select LCD4LINUX_CUSTOM_NEEDS_libgd - select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_LCDLinux - bool - prompt "LCDLinux" - depends on BROKEN - -config LCD4LINUX_CUSTOM_DRIVER_LCDTerm - bool - prompt "LCDTerm" - -config LCD4LINUX_CUSTOM_DRIVER_LEDMatrix - bool - prompt "LEDMatrix" - select LCD4LINUX_CUSTOM_NEEDS_libgd - -config LCD4LINUX_CUSTOM_DRIVER_LPH7508 - bool - prompt "LPH7508" - select LCD4LINUX_CUSTOM_NEEDS_libgd - -config LCD4LINUX_CUSTOM_DRIVER_LUIse - bool - prompt "LUIse" - select LCD4LINUX_CUSTOM_NEEDS_libgd - #select LCD4LINUX_CUSTOM_NEEDS_libluise - depends on BROKEN - -config LCD4LINUX_CUSTOM_DRIVER_LW_ABP - bool - prompt "LW_ABP" - -config LCD4LINUX_CUSTOM_DRIVER_M50530 - bool - prompt "M50530" - -config LCD4LINUX_CUSTOM_DRIVER_MatrixOrbital - bool - prompt "MatrixOrbital" - -config LCD4LINUX_CUSTOM_DRIVER_MatrixOrbitalGX - bool - prompt "MatrixOrbitalGX" - select LCD4LINUX_CUSTOM_NEEDS_libgd - select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_mdm166a - bool - prompt "mdm166a" - select LCD4LINUX_CUSTOM_NEEDS_libgd - -config LCD4LINUX_CUSTOM_DRIVER_MilfordInstruments - bool - prompt "MilfordInstruments" - -config LCD4LINUX_CUSTOM_DRIVER_Newhaven - bool - prompt "Newhaven" - -config LCD4LINUX_CUSTOM_DRIVER_Noritake - bool - prompt "Noritake" - select LCD4LINUX_CUSTOM_NEEDS_libgd - -config LCD4LINUX_CUSTOM_DRIVER_NULL - bool - prompt "NULL" - default y - -config LCD4LINUX_CUSTOM_DRIVER_Pertelian - bool - prompt "Pertelian" - -config LCD4LINUX_CUSTOM_DRIVER_PHAnderson - bool - prompt "PHAnderson" - -config LCD4LINUX_CUSTOM_DRIVER_PICGraphic - bool - prompt "PICGraphic" - select LCD4LINUX_CUSTOM_NEEDS_libgd - -config LCD4LINUX_CUSTOM_DRIVER_picoLCD - bool - prompt "picoLCD" - select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_picoLCDGraphic - bool - prompt "picoLCDGraphic" - select LCD4LINUX_CUSTOM_NEEDS_libgd - select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_PNG - bool - prompt "PNG" - select LCD4LINUX_CUSTOM_NEEDS_libgd - -config LCD4LINUX_CUSTOM_DRIVER_PPM - bool - prompt "PPM" - select LCD4LINUX_CUSTOM_NEEDS_libgd - -config LCD4LINUX_CUSTOM_DRIVER_RouterBoard - bool - prompt "RouterBoard" - depends on TARGET_rb532 - -config LCD4LINUX_CUSTOM_DRIVER_SamsungSPF - bool - prompt "SamsungSPF" - select LCD4LINUX_CUSTOM_NEEDS_libgd - select LCD4LINUX_CUSTOM_NEEDS_libjpeg - -config LCD4LINUX_CUSTOM_DRIVER_serdisplib - bool - prompt "serdisplib" - select LCD4LINUX_CUSTOM_NEEDS_libgd - select LCD4LINUX_CUSTOM_NEEDS_serdisplib - -config LCD4LINUX_CUSTOM_DRIVER_ShuttleVFD - bool - prompt "ShuttleVFD" - select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_SimpleLCD - bool - prompt "SimpleLCD" - -config LCD4LINUX_CUSTOM_DRIVER_st2205 - bool - prompt "st2205" - select LCD4LINUX_CUSTOM_NEEDS_libgd - select LCD4LINUX_CUSTOM_NEEDS_st2205tool - -config LCD4LINUX_CUSTOM_DRIVER_T6963 - bool - prompt "T6963" - select LCD4LINUX_CUSTOM_NEEDS_libgd - -config LCD4LINUX_CUSTOM_DRIVER_TeakLCM - bool - prompt "TeakLCM" - -config LCD4LINUX_CUSTOM_DRIVER_TEW673GRU - bool - select LCD4LINUX_CUSTOM_NEEDS_libgd - depends on TARGET_ar71xx - default TARGET_ar71xx - -config LCD4LINUX_CUSTOM_DRIVER_Trefon - bool - prompt "Trefon" - select LCD4LINUX_CUSTOM_NEEDS_libusb - -#config LCD4LINUX_CUSTOM_DRIVER_ULA200 -# bool -# prompt "ULA200" -# select LCD4LINUX_CUSTOM_NEEDS_libftdi -# select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_USBHUB - bool - prompt "USBHUB" - select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_USBLCD - bool - prompt "USBLCD" - select LCD4LINUX_CUSTOM_NEEDS_libusb - -config LCD4LINUX_CUSTOM_DRIVER_VNC - bool - prompt "VNC" - select LCD4LINUX_CUSTOM_NEEDS_libgd - select LCD4LINUX_CUSTOM_NEEDS_libvncserver - -config LCD4LINUX_CUSTOM_DRIVER_WincorNixdorf - bool - prompt "WincorNixdorf" - -#config LCD4LINUX_CUSTOM_DRIVER_X11 -# bool -# prompt "X11" -# select LCD4LINUX_CUSTOM_NEEDS_libgd -# select LCD4LINUX_CUSTOM_NEEDS_libX11 - - -comment "Plugins ---" - -config LCD4LINUX_CUSTOM_PLUGIN_apm - bool - prompt "apm" - -config LCD4LINUX_CUSTOM_PLUGIN_asterisk - bool - prompt "asterisk" - -config LCD4LINUX_CUSTOM_PLUGIN_button_exec - bool - prompt "button_exec" - -config LCD4LINUX_CUSTOM_PLUGIN_cpuinfo - bool - prompt "cpuinfo" - default y - -config LCD4LINUX_CUSTOM_PLUGIN_dbus - bool - prompt "dbus" - select LCD4LINUX_CUSTOM_NEEDS_libdbus - -config LCD4LINUX_CUSTOM_PLUGIN_diskstats - bool - prompt "diskstats" - -config LCD4LINUX_CUSTOM_PLUGIN_dvb - bool - prompt "dvb" - -config LCD4LINUX_CUSTOM_PLUGIN_event - bool - prompt "event" - -config LCD4LINUX_CUSTOM_PLUGIN_exec - bool - prompt "exec" - -config LCD4LINUX_CUSTOM_PLUGIN_fifo - bool - prompt "fifo" - -config LCD4LINUX_CUSTOM_PLUGIN_file - bool - prompt "file" - -config LCD4LINUX_CUSTOM_PLUGIN_gps - bool - prompt "gps" - select LCD4LINUX_CUSTOM_NEEDS_libnmeap - -config LCD4LINUX_CUSTOM_PLUGIN_hddtemp - bool - prompt "hddtemp" - -config LCD4LINUX_CUSTOM_PLUGIN_huawei - bool - prompt "huawei" - -config LCD4LINUX_CUSTOM_PLUGIN_i2c_sensors - bool - prompt "i2c_sensors" - -config LCD4LINUX_CUSTOM_PLUGIN_iconv - bool - prompt "iconv" - select LCD4LINUX_CUSTOM_NEEDS_libiconv - -config LCD4LINUX_CUSTOM_PLUGIN_imon - bool - prompt "imon" - -config LCD4LINUX_CUSTOM_PLUGIN_isdn - bool - prompt "isdn" - -config LCD4LINUX_CUSTOM_PLUGIN_kvv - bool - prompt "kvv" - -config LCD4LINUX_CUSTOM_PLUGIN_loadavg - bool - prompt "loadavg" - default y - -config LCD4LINUX_CUSTOM_PLUGIN_meminfo - bool - prompt "meminfo" - default y - -config LCD4LINUX_CUSTOM_PLUGIN_mpd - bool - prompt "mpd" - select LCD4LINUX_CUSTOM_NEEDS_libmpdclient - -config LCD4LINUX_CUSTOM_PLUGIN_mpris_dbus - bool - prompt "mpris_dbus" - select LCD4LINUX_CUSTOM_NEEDS_libdbus - -config LCD4LINUX_CUSTOM_PLUGIN_mysql - bool - prompt "mysql" - select LCD4LINUX_CUSTOM_NEEDS_libmysqlclient - -config LCD4LINUX_CUSTOM_PLUGIN_netdev - bool - prompt "netdev" - -config LCD4LINUX_CUSTOM_PLUGIN_netinfo - bool - prompt "netinfo" - -config LCD4LINUX_CUSTOM_PLUGIN_pop3 - bool - prompt "pop3" - -config LCD4LINUX_CUSTOM_PLUGIN_ppp - bool - prompt "ppp" - select LCD4LINUX_CUSTOM_NEEDS_ppp - -config LCD4LINUX_CUSTOM_PLUGIN_proc_stat - bool - prompt "proc_stat" - default y - -#config LCD4LINUX_CUSTOM_PLUGIN_python -# bool -# prompt "python" -# select LCD4LINUX_CUSTOM_NEEDS_python - -config LCD4LINUX_CUSTOM_PLUGIN_qnaplog - bool - prompt "qnaplog" - select LCD4LINUX_CUSTOM_NEEDS_libsqlite3 - -config LCD4LINUX_CUSTOM_PLUGIN_seti - bool - prompt "seti" - -config LCD4LINUX_CUSTOM_PLUGIN_statfs - bool - prompt "statfs" - -config LCD4LINUX_CUSTOM_PLUGIN_uname - bool - prompt "uname" - -config LCD4LINUX_CUSTOM_PLUGIN_uptime - bool - prompt "uptime" - default y - -config LCD4LINUX_CUSTOM_PLUGIN_w1retap - bool - prompt "w1retap" - -config LCD4LINUX_CUSTOM_PLUGIN_wireless - bool - prompt "wireless" - depends on BROKEN - -config LCD4LINUX_CUSTOM_PLUGIN_xmms - bool - prompt "xmms" - -endif diff --git a/utils/lcd4linux/Makefile b/utils/lcd4linux/Makefile deleted file mode 100644 index cbb8c91..0000000 --- a/utils/lcd4linux/Makefile +++ /dev/null @@ -1,309 +0,0 @@ -# -# Copyright (C) 2007-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lcd4linux -PKG_REV:=1203 -PKG_VERSION:=r$(PKG_REV) -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://ssl.bulix.org/svn/lcd4linux/trunk/ -PKG_SOURCE_SUBDIR:=lcd4linux-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_PROTO:=svn - -LCD4LINUX_DRIVERS:= \ - ASTUSB \ - BeckmannEgle \ - BWCT \ - CrystalFontz \ - Curses \ - Cwlinux \ - D4D \ - DPF \ - EA232graphic \ - EFN \ - FutabaVFD \ - FW8888 \ - G15 \ - GLCD2USB \ - IRLCD \ - $(if $(CONFIG_BROKEN),HD44780) \ - $(if $(CONFIG_BROKEN),HD44780-I2C) \ - LCD2USB \ - $(if $(CONFIG_BROKEN),LCDLinux) \ - LCDTerm \ - LEDMatrix \ - LPH7508 \ - $(if $(CONFIG_BROKEN),LUIse) \ - LW_ABP \ - M50530 \ - MatrixOrbital \ - MatrixOrbitalGX \ - MilfordInstruments \ - Newhaven \ - Noritake \ - NULL \ - Pertelian \ - PHAnderson \ - PICGraphic \ - picoLCD \ - picoLCDGraphic \ - PNG \ - PPM \ - $(if $(CONFIG_TARGET_rb532),RouterBoard) \ - $(if $(CONFIG_BROKEN),SamsungSPF) \ - ShuttleVFD \ - SimpleLCD \ - st2205 \ - T6963 \ - TeakLCM \ - $(if $(CONFIG_TARGET_ar71xx),TEW673GRU) \ - Trefon \ - USBHUB \ - USBLCD \ - VNC \ - WincorNixdorf \ -# ULA200 \ -# X11 \ - -LCD4LINUX_PLUGINS:= \ - apm \ - asterisk \ - button_exec \ - cpuinfo \ - dbus \ - diskstats \ - dvb \ - event \ - exec \ - fifo \ - file \ - gps \ - hddtemp \ - huawei \ - i2c_sensors \ - iconv \ - imon \ - isdn \ - kvv \ - loadavg \ - netdev \ - netinfo \ - meminfo \ - mpd \ - mpris_dbus \ - mysql \ - netdev \ - pop3 \ - ppp \ - proc_stat \ - qnaplog \ - seti \ - statfs \ - uname \ - uptime \ - w1retap \ - $(if $(CONFIG_BROKEN),wireless) \ - xmms \ -# python \ - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) - -PKG_BUILD_DEPENDS:= \ - libdbus \ - libgd \ - libmpdclient \ - libmysqlclient \ - libncurses \ - libnmeap \ - libsqlite3 \ - ppp \ -# libftdi \ -# libX11 \ -# python \ - -PKG_CONFIG_DEPENDS:= \ - $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_DRIVER_%,$(LCD4LINUX_DRIVERS)) \ - $(patsubst %,CONFIG_LCD4LINUX_CUSTOM_PLUGIN_%,$(LCD4LINUX_PLUGINS)) \ - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/lcd4linux/Default - SECTION:=utils - CATEGORY:=Utilities - PKG_MAINTAINER:=Jonathan McCrohan - TITLE:=LCD display utility - URL:=http://lcd4linux.bulix.org/ -endef - -define Package/lcd4linux/Default/description - LCD4Linux is a small program that grabs information from the kernel and - some subsystems and displays it on an external liquid crystal display. -endef - - -define Package/lcd4linux-custom -$(call Package/lcd4linux/Default) - DEPENDS:= \ - +LCD4LINUX_CUSTOM_NEEDS_libdbus:libdbus \ - +LCD4LINUX_CUSTOM_NEEDS_libgd:libgd \ - $(if $(ICONV_FULL),+LCD4LINUX_CUSTOM_NEEDS_libiconv:libiconv-full) \ - +LCD4LINUX_CUSTOM_NEEDS_libjpeg:libjpeg \ - +LCD4LINUX_CUSTOM_NEEDS_libmpdclient:libmpdclient \ - +LCD4LINUX_CUSTOM_NEEDS_libmysqlclient:libmysqlclient \ - +LCD4LINUX_CUSTOM_NEEDS_libncurses:libncurses \ - +LCD4LINUX_CUSTOM_NEEDS_libsqlite3:libsqlite3 \ - +LCD4LINUX_CUSTOM_NEEDS_libusb:libusb-compat \ -# +LCD4LINUX_CUSTOM_NEEDS_libftdi:libftdi \ -# +LCD4LINUX_CUSTOM_NEEDS_libX11:libX11 \ -# +LCD4LINUX_CUSTOM_NEEDS_python:python - MENU:=1 - PROVIDES:=lcd4linux - VARIANT=custom -endef - -define Package/lcd4linux-custom/config - source "$(SOURCE)/Config.in" -endef - -define Package/lcd4linux-custom/description -$(call Package/lcd4linux/Default/description) - . - This package contains a customized version of LCD4Linux. -endef - - -define Package/lcd4linux-full -$(call Package/lcd4linux/Default) - DEPENDS:= @DEVEL \ - +libdbus \ - +libgd \ - $(if $(ICONV_FULL),+libiconv-full) \ - +libmpdclient \ - +libmysqlclient \ - +libncurses \ - +libsqlite3 \ - +libusb-compat \ -# +libftdi \ -# +libX11 \ -# +python - PROVIDES:=lcd4linux - VARIANT=full -endef - -define Package/lcd4linux-full/description -$(call Package/lcd4linux/Default/description) - . - This package contains a version of LCD4Linux built with all supported - drivers and plugins. -endef - - -CONFIGURE_ARGS+= \ - --disable-rpath \ - -EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib - -ifeq ($(BUILD_VARIANT),custom) - - LCD4LINUX_CUSTOM_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \ - $(if $(CONFIG_LCD4LINUX_CUSTOM_DRIVER_$(c)),$(c),) \ - )) - ifeq ($(LCD4LINUX_CUSTOM_DRIVERS),) - LCD4LINUX_CUSTOM_DRIVERS:=Sample - endif - - LCD4LINUX_CUSTOM_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \ - $(if $(CONFIG_LCD4LINUX_CUSTOM_PLUGIN_$(c)),$(c)) \ - )) - ifeq ($(LCD4LINUX_CUSTOM_PLUGINS),) - LCD4LINUX_CUSTOM_PLUGINS:=sample - endif - - CONFIGURE_ARGS+= \ - --with-drivers="$(LCD4LINUX_CUSTOM_DRIVERS)" \ - --with-plugins="$(LCD4LINUX_CUSTOM_PLUGINS)" \ - - ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libiconv),) - CONFIGURE_ARGS+= --with-libiconv-prefix="$(ICONV_PREFIX)" - else - CONFIGURE_ARGS+= --without-libiconv-prefix - endif - - ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libmysqlclient),) - EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql - endif - -# ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_python),) -# CONFIGURE_ARGS+= --with-python -# else - CONFIGURE_ARGS+= --without-python -# endif - -# ifneq ($(CONFIG_LCD4LINUX_CUSTOM_NEEDS_libX11),) -# CONFIGURE_ARGS+= --with-x -# else - CONFIGURE_ARGS+= --without-x -# endif - -endif - -ifeq ($(BUILD_VARIANT),full) - - LCD4LINUX_FULL_DRIVERS:= $(strip $(foreach c, $(LCD4LINUX_DRIVERS), \ - $(c) \ - )) - - LCD4LINUX_FULL_PLUGINS:= $(strip $(foreach c, $(LCD4LINUX_PLUGINS), \ - $(c) \ - )) - - CONFIGURE_ARGS+= \ - --with-drivers="$(LCD4LINUX_FULL_DRIVERS)" \ - --with-plugins="$(LCD4LINUX_FULL_PLUGINS)" \ - --with-libiconv-prefix="$(ICONV_PREFIX)" \ - --without-python \ - --without-x \ - - EXTRA_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/mysql - -endif - - -define Package/lcd4linux/conffiles -/etc/lcd4linux.conf -endef - -define Package/lcd4linux/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/lcd4linux $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/lcd4linux.conf.sample $(1)/etc/lcd4linux.conf - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/lcd4linux.init $(1)/etc/init.d/lcd4linux - $(SED) "s|^\(Display 'GLCD2USB'\)|#\1|g" \ - -e "s|^\(Layout 'TestLayer'\)|#\1|g" \ - -e "s|^#\(Display 'Image'\)|\1|g" \ - -e "s|^#\(Layout 'Default'\)|\1|g" \ - $(1)/etc/lcd4linux.conf -endef - -Package/lcd4linux-custom/conffiles = $(Package/lcd4linux/conffiles) -Package/lcd4linux-custom/install = $(Package/lcd4linux/install) - -Package/lcd4linux-full/conffiles = $(Package/lcd4linux/conffiles) -Package/lcd4linux-full/install = $(Package/lcd4linux/install) - -$(eval $(call BuildPackage,lcd4linux-custom)) -$(eval $(call BuildPackage,lcd4linux-full)) diff --git a/utils/lcd4linux/files/lcd4linux.init b/utils/lcd4linux/files/lcd4linux.init deleted file mode 100644 index 25033f3..0000000 --- a/utils/lcd4linux/files/lcd4linux.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2007-2015 OpenWrt.org - -START=98 - -SERVICE_USE_PID=1 - -start() { - service_start /usr/bin/lcd4linux -o /tmp/lcd4linux.png -q -} - -stop() { - service_stop /usr/bin/lcd4linux -} - diff --git a/utils/lcd4linux/patches/100-drv_RouterBoard.patch b/utils/lcd4linux/patches/100-drv_RouterBoard.patch deleted file mode 100644 index 9780f5a..0000000 --- a/utils/lcd4linux/patches/100-drv_RouterBoard.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drv_RouterBoard.c -+++ b/drv_RouterBoard.c -@@ -106,7 +106,7 @@ - #include - #include - #include --#include -+#include - - #include "debug.h" - #include "cfg.h" diff --git a/utils/lcd4linux/patches/110-uclibc-logarithm-fix.patch b/utils/lcd4linux/patches/110-uclibc-logarithm-fix.patch deleted file mode 100644 index 8f6d861..0000000 --- a/utils/lcd4linux/patches/110-uclibc-logarithm-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/plugin_netinfo.c -+++ b/plugin_netinfo.c -@@ -264,7 +264,7 @@ static void my_netmask_short(RESULT * re - sin = get_netmask(arg1); - if (NULL != sin) { - logval = (long double) (get_netmask(arg1)->sin_addr.s_addr); -- netlen = (int) rint(log2l(logval) / log2l(2.0)); -+ netlen = (int) rint(log2f(logval) / log2f(2.0)); - qprintf(value, sizeof(value), "/%d", netlen); - } else { - qprintf(value, sizeof(value), "/?"); diff --git a/utils/lcd4linux/patches/120-remove-as-needed-linker-option.patch b/utils/lcd4linux/patches/120-remove-as-needed-linker-option.patch deleted file mode 100644 index b5e56fe..0000000 --- a/utils/lcd4linux/patches/120-remove-as-needed-linker-option.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -18,7 +18,7 @@ ACLOCAL_AMFLAGS=-I m4 - # use this for lots of warnings - #AM_CFLAGS = -D_GNU_SOURCE -std=c99 -m64 -Wall -W -pedantic -Wno-variadic-macros -fno-strict-aliasing - --lcd4linux_LDFLAGS ="-Wl,--as-needed" -+lcd4linux_LDFLAGS = - lcd4linux_LDADD = @DRIVERS@ @PLUGINS@ @DRVLIBS@ @PLUGINLIBS@ - lcd4linux_DEPENDENCIES = @DRIVERS@ @PLUGINS@ - diff --git a/utils/lcd4linux/patches/140-no_repnop_T6963.patch b/utils/lcd4linux/patches/140-no_repnop_T6963.patch deleted file mode 100644 index 85be2c3..0000000 --- a/utils/lcd4linux/patches/140-no_repnop_T6963.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/drv_T6963.c -+++ b/drv_T6963.c -@@ -114,7 +114,9 @@ static void drv_T6_status1(void) - /* wait for STA0=1 and STA1=1 */ - n = 0; - do { -+#if 0 - rep_nop(); -+#endif - if (++n > 1000) { - debug("hang in status1"); - bug = 1; -@@ -150,7 +152,9 @@ static void drv_T6_status2(void) - /* wait for STA3=1 */ - n = 0; - do { -+#if 0 - rep_nop(); -+#endif - if (++n > 1000) { - debug("hang in status2"); - bug = 1; diff --git a/utils/lcd4linux/patches/150-addlibmpdclient.patch b/utils/lcd4linux/patches/150-addlibmpdclient.patch deleted file mode 100644 index 0e51f67..0000000 --- a/utils/lcd4linux/patches/150-addlibmpdclient.patch +++ /dev/null @@ -1,2624 +0,0 @@ ---- /dev/null -+++ b/libmpdclient.c -@@ -0,0 +1,1957 @@ -+/* libmpdclient -+ (c)2003-2006 by Warren Dukes (warren.dukes@gmail.com) -+ This project's homepage is: http://www.musicpd.org -+ -+ Redistribution and use in source and binary forms, with or without -+ modification, are permitted provided that the following conditions -+ are met: -+ -+ - Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ -+ - Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ -+ - Neither the name of the Music Player Daemon nor the names of its -+ contributors may be used to endorse or promote products derived from -+ this software without specific prior written permission. -+ -+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR -+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+*/ -+ -+#include "libmpdclient.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#ifdef WIN32 -+# include -+# include -+#else -+# include -+# include -+# include -+# include -+#endif -+ -+/* (bits+1)/3 (plus the sign character) */ -+#define INTLEN ((sizeof(int) * CHAR_BIT + 1) / 3 + 1) -+#define LONGLONGLEN ((sizeof(long long) * CHAR_BIT + 1) / 3 + 1) -+ -+#define COMMAND_LIST 1 -+#define COMMAND_LIST_OK 2 -+ -+#ifndef MPD_NO_GAI -+# ifdef AI_ADDRCONFIG -+# define MPD_HAVE_GAI -+# endif -+#endif -+ -+#ifndef MSG_DONTWAIT -+# define MSG_DONTWAIT 0 -+#endif -+ -+#ifdef WIN32 -+# define SELECT_ERRNO_IGNORE (errno == WSAEINTR || errno == WSAEINPROGRESS) -+# define SENDRECV_ERRNO_IGNORE SELECT_ERRNO_IGNORE -+#else -+# define SELECT_ERRNO_IGNORE (errno == EINTR) -+# define SENDRECV_ERRNO_IGNORE (errno == EINTR || errno == EAGAIN) -+# define winsock_dll_error(c) 0 -+# define closesocket(s) close(s) -+# define WSACleanup() do { /* nothing */ } while (0) -+#endif -+ -+#ifdef WIN32 -+static int winsock_dll_error(mpd_Connection * connection) -+{ -+ WSADATA wsaData; -+ if ((WSAStartup(MAKEWORD(2, 2), &wsaData)) != 0 || LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2) { -+ strcpy(connection->errorStr, "Could not find usable WinSock DLL."); -+ connection->error = MPD_ERROR_SYSTEM; -+ return 1; -+ } -+ return 0; -+} -+ -+static int do_connect_fail(mpd_Connection * connection, const struct sockaddr *serv_addr, int addrlen) -+{ -+ int iMode = 1; /* 0 = blocking, else non-blocking */ -+ ioctlsocket(connection->sock, FIONBIO, (u_long FAR *) & iMode); -+ return (connect(connection->sock, serv_addr, addrlen) == SOCKET_ERROR && WSAGetLastError() != WSAEWOULDBLOCK); -+} -+#else /* !WIN32 (sane operating systems) */ -+static int do_connect_fail(mpd_Connection * connection, const struct sockaddr *serv_addr, int addrlen) -+{ -+ int flags = fcntl(connection->sock, F_GETFL, 0); -+ fcntl(connection->sock, F_SETFL, flags | O_NONBLOCK); -+ return (connect(connection->sock, serv_addr, addrlen) < 0 && errno != EINPROGRESS); -+} -+#endif /* !WIN32 */ -+ -+#ifdef MPD_HAVE_GAI -+static int mpd_connect(mpd_Connection * connection, const char *host, int port, float timeout) -+{ -+ int error; -+ char service[INTLEN + 1]; -+ struct addrinfo hints; -+ struct addrinfo *res = NULL; -+ struct addrinfo *addrinfo = NULL; -+ -+ /** -+ * Setup hints -+ */ -+ hints.ai_flags = AI_ADDRCONFIG; -+ hints.ai_family = PF_UNSPEC; -+ hints.ai_socktype = SOCK_STREAM; -+ hints.ai_protocol = IPPROTO_TCP; -+ hints.ai_addrlen = 0; -+ hints.ai_addr = NULL; -+ hints.ai_canonname = NULL; -+ hints.ai_next = NULL; -+ -+ snprintf(service, sizeof(service), "%i", port); -+ -+ error = getaddrinfo(host, service, &hints, &addrinfo); -+ -+ if (error) { -+ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "host \"%s\" not found: %s", host, gai_strerror(error)); -+ connection->error = MPD_ERROR_UNKHOST; -+ return -1; -+ } -+ -+ for (res = addrinfo; res; res = res->ai_next) { -+ /* create socket */ -+ connection->sock = socket(res->ai_family, SOCK_STREAM, res->ai_protocol); -+ if (connection->sock < 0) { -+ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "problems creating socket: %s", strerror(errno)); -+ connection->error = MPD_ERROR_SYSTEM; -+ freeaddrinfo(addrinfo); -+ return -1; -+ } -+ -+ mpd_setConnectionTimeout(connection, timeout); -+ -+ /* connect stuff */ -+ if (do_connect_fail(connection, res->ai_addr, res->ai_addrlen)) { -+ /* try the next address family */ -+ closesocket(connection->sock); -+ connection->sock = -1; -+ continue; -+ } -+ } -+ -+ freeaddrinfo(addrinfo); -+ -+ if (connection->sock < 0) { -+ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, -+ "problems connecting to \"%s\" on port %i: %s", host, port, strerror(errno)); -+ connection->error = MPD_ERROR_CONNPORT; -+ -+ return -1; -+ } -+ -+ return 0; -+} -+#else /* !MPD_HAVE_GAI */ -+static int mpd_connect(mpd_Connection * connection, const char *host, int port, float timeout) -+{ -+ struct hostent *he; -+ struct sockaddr *dest; -+ int destlen; -+ struct sockaddr_in sin; -+ -+ if (!(he = gethostbyname(host))) { -+ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "host \"%s\" not found", host); -+ connection->error = MPD_ERROR_UNKHOST; -+ return -1; -+ } -+ -+ memset(&sin, 0, sizeof(struct sockaddr_in)); -+ /*dest.sin_family = he->h_addrtype; */ -+ sin.sin_family = AF_INET; -+ sin.sin_port = htons(port); -+ -+ switch (he->h_addrtype) { -+ case AF_INET: -+ memcpy((char *) &sin.sin_addr.s_addr, (char *) he->h_addr, he->h_length); -+ dest = (struct sockaddr *) &sin; -+ destlen = sizeof(struct sockaddr_in); -+ break; -+ default: -+ strcpy(connection->errorStr, "address type is not IPv4"); -+ connection->error = MPD_ERROR_SYSTEM; -+ return -1; -+ break; -+ } -+ -+ if ((connection->sock = socket(dest->sa_family, SOCK_STREAM, 0)) < 0) { -+ strcpy(connection->errorStr, "problems creating socket"); -+ connection->error = MPD_ERROR_SYSTEM; -+ return -1; -+ } -+ -+ mpd_setConnectionTimeout(connection, timeout); -+ -+ /* connect stuff */ -+ if (do_connect_fail(connection, dest, destlen)) { -+ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, -+ "problems connecting to \"%s\" on port" " %i", host, port); -+ connection->error = MPD_ERROR_CONNPORT; -+ return -1; -+ } -+ -+ return 0; -+} -+#endif /* !MPD_HAVE_GAI */ -+ -+char *mpdTagItemKeys[MPD_TAG_NUM_OF_ITEM_TYPES] = { -+ "Artist", -+ "Album", -+ "Title", -+ "Track", -+ "Name", -+ "Genre", -+ "Date", -+ "Composer", -+ "Performer", -+ "Comment", -+ "Disc", -+ "Filename", -+ "Any" -+}; -+ -+static char *mpd_sanitizeArg(const char *arg) -+{ -+ size_t i; -+ char *ret; -+ register const char *c; -+ register char *rc; -+ -+ /* instead of counting in that loop above, just -+ * use a bit more memory and half running time -+ */ -+ ret = malloc(strlen(arg) * 2 + 1); -+ -+ c = arg; -+ rc = ret; -+ for (i = strlen(arg) + 1; i != 0; --i) { -+ if (*c == '"' || *c == '\\') -+ *rc++ = '\\'; -+ *(rc++) = *(c++); -+ } -+ -+ return ret; -+} -+ -+static mpd_ReturnElement *mpd_newReturnElement(const char *name, const char *value) -+{ -+ mpd_ReturnElement *ret = malloc(sizeof(mpd_ReturnElement)); -+ -+ ret->name = strdup(name); -+ ret->value = strdup(value); -+ -+ return ret; -+} -+ -+static void mpd_freeReturnElement(mpd_ReturnElement * re) -+{ -+ free(re->name); -+ free(re->value); -+ free(re); -+} -+ -+void mpd_setConnectionTimeout(mpd_Connection * connection, float timeout) -+{ -+ connection->timeout.tv_sec = (int) timeout; -+ connection->timeout.tv_usec = (int) (timeout * 1e6 - connection->timeout.tv_sec * 1000000 + 0.5); -+} -+ -+static int mpd_parseWelcome(mpd_Connection * connection, const char *host, int port, char *rt, char *output) -+{ -+ char *tmp; -+ char *test; -+ int i; -+ -+ if (strncmp(output, MPD_WELCOME_MESSAGE, strlen(MPD_WELCOME_MESSAGE))) { -+ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, -+ "mpd not running on port %i on host \"%s\"", port, host); -+ connection->error = MPD_ERROR_NOTMPD; -+ return 1; -+ } -+ -+ tmp = &output[strlen(MPD_WELCOME_MESSAGE)]; -+ -+ for (i = 0; i < 3; i++) { -+ if (tmp) -+ connection->version[i] = strtol(tmp, &test, 10); -+ -+ if (!tmp || (test[0] != '.' && test[0] != '\0')) { -+ snprintf(connection->errorStr, -+ MPD_ERRORSTR_MAX_LENGTH, -+ "error parsing version number at " "\"%s\"", &output[strlen(MPD_WELCOME_MESSAGE)]); -+ connection->error = MPD_ERROR_NOTMPD; -+ return 1; -+ } -+ tmp = ++test; -+ } -+ -+ return 0; -+} -+ -+mpd_Connection *mpd_newConnection(const char *host, int port, float timeout) -+{ -+ int err; -+ char *rt; -+ char *output = NULL; -+ mpd_Connection *connection = malloc(sizeof(mpd_Connection)); -+ struct timeval tv; -+ fd_set fds; -+ strcpy(connection->buffer, ""); -+ connection->buflen = 0; -+ connection->bufstart = 0; -+ strcpy(connection->errorStr, ""); -+ connection->error = 0; -+ connection->doneProcessing = 0; -+ connection->commandList = 0; -+ connection->listOks = 0; -+ connection->doneListOk = 0; -+ connection->returnElement = NULL; -+ connection->request = NULL; -+ -+ if (winsock_dll_error(connection)) -+ return connection; -+ -+ if (mpd_connect(connection, host, port, timeout) < 0) -+ return connection; -+ -+ while (!(rt = strstr(connection->buffer, "\n"))) { -+ tv.tv_sec = connection->timeout.tv_sec; -+ tv.tv_usec = connection->timeout.tv_usec; -+ FD_ZERO(&fds); -+ FD_SET(connection->sock, &fds); -+ if ((err = select(connection->sock + 1, &fds, NULL, NULL, &tv)) == 1) { -+ int readed; -+ readed = recv(connection->sock, -+ &(connection->buffer[connection->buflen]), MPD_BUFFER_MAX_LENGTH - connection->buflen, 0); -+ if (readed <= 0) { -+ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, -+ "problems getting a response from" " \"%s\" on port %i : %s", host, port, strerror(errno)); -+ connection->error = MPD_ERROR_NORESPONSE; -+ return connection; -+ } -+ connection->buflen += readed; -+ connection->buffer[connection->buflen] = '\0'; -+ } else if (err < 0) { -+ if (SELECT_ERRNO_IGNORE) -+ continue; -+ snprintf(connection->errorStr, -+ MPD_ERRORSTR_MAX_LENGTH, "problems connecting to \"%s\" on port" " %i", host, port); -+ connection->error = MPD_ERROR_CONNPORT; -+ return connection; -+ } else { -+ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, -+ "timeout in attempting to get a response from" " \"%s\" on port %i", host, port); -+ connection->error = MPD_ERROR_NORESPONSE; -+ return connection; -+ } -+ } -+ -+ *rt = '\0'; -+ output = strdup(connection->buffer); -+ strcpy(connection->buffer, rt + 1); -+ connection->buflen = strlen(connection->buffer); -+ -+ if (mpd_parseWelcome(connection, host, port, rt, output) == 0) -+ connection->doneProcessing = 1; -+ -+ free(output); -+ -+ return connection; -+} -+ -+void mpd_clearError(mpd_Connection * connection) -+{ -+ connection->error = 0; -+ connection->errorStr[0] = '\0'; -+} -+ -+void mpd_closeConnection(mpd_Connection * connection) -+{ -+ closesocket(connection->sock); -+ if (connection->returnElement) -+ free(connection->returnElement); -+ if (connection->request) -+ free(connection->request); -+ free(connection); -+ WSACleanup(); -+} -+ -+static void mpd_executeCommand(mpd_Connection * connection, char *command) -+{ -+ int ret; -+ struct timeval tv; -+ fd_set fds; -+ char *commandPtr = command; -+ int commandLen = strlen(command); -+ -+ if (!connection->doneProcessing && !connection->commandList) { -+ strcpy(connection->errorStr, "not done processing current command"); -+ connection->error = 1; -+ return; -+ } -+ -+ mpd_clearError(connection); -+ -+ FD_ZERO(&fds); -+ FD_SET(connection->sock, &fds); -+ tv.tv_sec = connection->timeout.tv_sec; -+ tv.tv_usec = connection->timeout.tv_usec; -+ -+ while ((ret = select(connection->sock + 1, NULL, &fds, NULL, &tv) == 1) || (ret == -1 && SELECT_ERRNO_IGNORE)) { -+ ret = send(connection->sock, commandPtr, commandLen, MSG_DONTWAIT); -+ if (ret <= 0) { -+ if (SENDRECV_ERRNO_IGNORE) -+ continue; -+ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "problems giving command \"%s\"", command); -+ connection->error = MPD_ERROR_SENDING; -+ return; -+ } else { -+ commandPtr += ret; -+ commandLen -= ret; -+ } -+ -+ if (commandLen <= 0) -+ break; -+ } -+ -+ if (commandLen > 0) { -+ perror(""); -+ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "timeout sending command \"%s\"", command); -+ connection->error = MPD_ERROR_TIMEOUT; -+ return; -+ } -+ -+ if (!connection->commandList) -+ connection->doneProcessing = 0; -+ else if (connection->commandList == COMMAND_LIST_OK) { -+ connection->listOks++; -+ } -+} -+ -+static void mpd_getNextReturnElement(mpd_Connection * connection) -+{ -+ char *output = NULL; -+ char *rt = NULL; -+ char *name = NULL; -+ char *value = NULL; -+ fd_set fds; -+ struct timeval tv; -+ char *tok = NULL; -+ int readed; -+ char *bufferCheck = NULL; -+ int err; -+ int pos; -+ -+ if (connection->returnElement) -+ mpd_freeReturnElement(connection->returnElement); -+ connection->returnElement = NULL; -+ -+ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { -+ strcpy(connection->errorStr, "already done processing current command"); -+ connection->error = 1; -+ return; -+ } -+ -+ bufferCheck = connection->buffer + connection->bufstart; -+ while (connection->bufstart >= connection->buflen || !(rt = strchr(bufferCheck, '\n'))) { -+ if (connection->buflen >= MPD_BUFFER_MAX_LENGTH) { -+ memmove(connection->buffer, -+ connection->buffer + connection->bufstart, connection->buflen - connection->bufstart + 1); -+ connection->buflen -= connection->bufstart; -+ connection->bufstart = 0; -+ } -+ if (connection->buflen >= MPD_BUFFER_MAX_LENGTH) { -+ strcpy(connection->errorStr, "buffer overrun"); -+ connection->error = MPD_ERROR_BUFFEROVERRUN; -+ connection->doneProcessing = 1; -+ connection->doneListOk = 0; -+ return; -+ } -+ bufferCheck = connection->buffer + connection->buflen; -+ tv.tv_sec = connection->timeout.tv_sec; -+ tv.tv_usec = connection->timeout.tv_usec; -+ FD_ZERO(&fds); -+ FD_SET(connection->sock, &fds); -+ if ((err = select(connection->sock + 1, &fds, NULL, NULL, &tv) == 1)) { -+ readed = recv(connection->sock, -+ connection->buffer + connection->buflen, -+ MPD_BUFFER_MAX_LENGTH - connection->buflen, MSG_DONTWAIT); -+ if (readed < 0 && SENDRECV_ERRNO_IGNORE) { -+ continue; -+ } -+ if (readed <= 0) { -+ strcpy(connection->errorStr, "connection" " closed"); -+ connection->error = MPD_ERROR_CONNCLOSED; -+ connection->doneProcessing = 1; -+ connection->doneListOk = 0; -+ return; -+ } -+ connection->buflen += readed; -+ connection->buffer[connection->buflen] = '\0'; -+ } else if (err < 0 && SELECT_ERRNO_IGNORE) -+ continue; -+ else { -+ strcpy(connection->errorStr, "connection timeout"); -+ connection->error = MPD_ERROR_TIMEOUT; -+ connection->doneProcessing = 1; -+ connection->doneListOk = 0; -+ return; -+ } -+ } -+ -+ *rt = '\0'; -+ output = connection->buffer + connection->bufstart; -+ connection->bufstart = rt - connection->buffer + 1; -+ -+ if (strcmp(output, "OK") == 0) { -+ if (connection->listOks > 0) { -+ strcpy(connection->errorStr, "expected more list_OK's"); -+ connection->error = 1; -+ } -+ connection->listOks = 0; -+ connection->doneProcessing = 1; -+ connection->doneListOk = 0; -+ return; -+ } -+ -+ if (strcmp(output, "list_OK") == 0) { -+ if (!connection->listOks) { -+ strcpy(connection->errorStr, "got an unexpected list_OK"); -+ connection->error = 1; -+ } else { -+ connection->doneListOk = 1; -+ connection->listOks--; -+ } -+ return; -+ } -+ -+ if (strncmp(output, "ACK", strlen("ACK")) == 0) { -+ char *test; -+ char *needle; -+ int val; -+ -+ strcpy(connection->errorStr, output); -+ connection->error = MPD_ERROR_ACK; -+ connection->errorCode = MPD_ACK_ERROR_UNK; -+ connection->errorAt = MPD_ERROR_AT_UNK; -+ connection->doneProcessing = 1; -+ connection->doneListOk = 0; -+ -+ needle = strchr(output, '['); -+ if (!needle) -+ return; -+ val = strtol(needle + 1, &test, 10); -+ if (*test != '@') -+ return; -+ connection->errorCode = val; -+ val = strtol(test + 1, &test, 10); -+ if (*test != ']') -+ return; -+ connection->errorAt = val; -+ return; -+ } -+ -+ tok = strchr(output, ':'); -+ if (!tok) -+ return; -+ pos = tok - output; -+ value = ++tok; -+ name = output; -+ name[pos] = '\0'; -+ -+ if (value[0] == ' ') { -+ connection->returnElement = mpd_newReturnElement(name, &(value[1])); -+ } else { -+ snprintf(connection->errorStr, MPD_ERRORSTR_MAX_LENGTH, "error parsing: %s:%s", name, value); -+ connection->error = 1; -+ } -+} -+ -+void mpd_finishCommand(mpd_Connection * connection) -+{ -+ while (!connection->doneProcessing) { -+ if (connection->doneListOk) -+ connection->doneListOk = 0; -+ mpd_getNextReturnElement(connection); -+ } -+} -+ -+static void mpd_finishListOkCommand(mpd_Connection * connection) -+{ -+ while (!connection->doneProcessing && connection->listOks && !connection->doneListOk) { -+ mpd_getNextReturnElement(connection); -+ } -+} -+ -+int mpd_nextListOkCommand(mpd_Connection * connection) -+{ -+ mpd_finishListOkCommand(connection); -+ if (!connection->doneProcessing) -+ connection->doneListOk = 0; -+ if (connection->listOks == 0 || connection->doneProcessing) -+ return -1; -+ return 0; -+} -+ -+void mpd_sendStatusCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "status\n"); -+} -+ -+mpd_Status *mpd_getStatus(mpd_Connection * connection) -+{ -+ mpd_Status *status; -+ -+ /*mpd_executeCommand(connection,"status\n"); -+ -+ if(connection->error) return NULL; */ -+ -+ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { -+ return NULL; -+ } -+ -+ if (!connection->returnElement) -+ mpd_getNextReturnElement(connection); -+ -+ status = malloc(sizeof(mpd_Status)); -+ status->volume = -1; -+ status->repeat = 0; -+ status->random = 0; -+ status->playlist = -1; -+ status->playlistLength = -1; -+ status->state = -1; -+ status->song = 0; -+ status->songid = 0; -+ status->elapsedTime = 0; -+ status->totalTime = 0; -+ status->bitRate = 0; -+ status->sampleRate = 0; -+ status->bits = 0; -+ status->channels = 0; -+ status->crossfade = -1; -+ status->error = NULL; -+ status->updatingDb = 0; -+ -+ if (connection->error) { -+ free(status); -+ return NULL; -+ } -+ while (connection->returnElement) { -+ mpd_ReturnElement *re = connection->returnElement; -+ if (strcmp(re->name, "volume") == 0) { -+ status->volume = atoi(re->value); -+ } else if (strcmp(re->name, "repeat") == 0) { -+ status->repeat = atoi(re->value); -+ } else if (strcmp(re->name, "random") == 0) { -+ status->random = atoi(re->value); -+ } else if (strcmp(re->name, "playlist") == 0) { -+ status->playlist = strtol(re->value, NULL, 10); -+ } else if (strcmp(re->name, "playlistlength") == 0) { -+ status->playlistLength = atoi(re->value); -+ } else if (strcmp(re->name, "bitrate") == 0) { -+ status->bitRate = atoi(re->value); -+ } else if (strcmp(re->name, "state") == 0) { -+ if (strcmp(re->value, "play") == 0) { -+ status->state = MPD_STATUS_STATE_PLAY; -+ } else if (strcmp(re->value, "stop") == 0) { -+ status->state = MPD_STATUS_STATE_STOP; -+ } else if (strcmp(re->value, "pause") == 0) { -+ status->state = MPD_STATUS_STATE_PAUSE; -+ } else { -+ status->state = MPD_STATUS_STATE_UNKNOWN; -+ } -+ } else if (strcmp(re->name, "song") == 0) { -+ status->song = atoi(re->value); -+ } else if (strcmp(re->name, "songid") == 0) { -+ status->songid = atoi(re->value); -+ } else if (strcmp(re->name, "time") == 0) { -+ char *tok = strchr(re->value, ':'); -+ /* the second strchr below is a safety check */ -+ if (tok && (strchr(tok, 0) > (tok + 1))) { -+ /* atoi stops at the first non-[0-9] char: */ -+ status->elapsedTime = atoi(re->value); -+ status->totalTime = atoi(tok + 1); -+ } -+ } else if (strcmp(re->name, "error") == 0) { -+ status->error = strdup(re->value); -+ } else if (strcmp(re->name, "xfade") == 0) { -+ status->crossfade = atoi(re->value); -+ } else if (strcmp(re->name, "updating_db") == 0) { -+ status->updatingDb = atoi(re->value); -+ } else if (strcmp(re->name, "audio") == 0) { -+ char *tok = strchr(re->value, ':'); -+ if (tok && (strchr(tok, 0) > (tok + 1))) { -+ status->sampleRate = atoi(re->value); -+ status->bits = atoi(++tok); -+ tok = strchr(tok, ':'); -+ if (tok && (strchr(tok, 0) > (tok + 1))) -+ status->channels = atoi(tok + 1); -+ } -+ } -+ -+ mpd_getNextReturnElement(connection); -+ if (connection->error) { -+ free(status); -+ return NULL; -+ } -+ } -+ -+ if (connection->error) { -+ free(status); -+ return NULL; -+ } else if (status->state < 0) { -+ strcpy(connection->errorStr, "state not found"); -+ connection->error = 1; -+ free(status); -+ return NULL; -+ } -+ -+ return status; -+} -+ -+void mpd_freeStatus(mpd_Status * status) -+{ -+ if (status->error) -+ free(status->error); -+ free(status); -+} -+ -+void mpd_sendStatsCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "stats\n"); -+} -+ -+mpd_Stats *mpd_getStats(mpd_Connection * connection) -+{ -+ mpd_Stats *stats; -+ -+ /*mpd_executeCommand(connection,"stats\n"); -+ -+ if(connection->error) return NULL; */ -+ -+ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { -+ return NULL; -+ } -+ -+ if (!connection->returnElement) -+ mpd_getNextReturnElement(connection); -+ -+ stats = malloc(sizeof(mpd_Stats)); -+ stats->numberOfArtists = 0; -+ stats->numberOfAlbums = 0; -+ stats->numberOfSongs = 0; -+ stats->uptime = 0; -+ stats->dbUpdateTime = 0; -+ stats->playTime = 0; -+ stats->dbPlayTime = 0; -+ -+ if (connection->error) { -+ free(stats); -+ return NULL; -+ } -+ while (connection->returnElement) { -+ mpd_ReturnElement *re = connection->returnElement; -+ if (strcmp(re->name, "artists") == 0) { -+ stats->numberOfArtists = atoi(re->value); -+ } else if (strcmp(re->name, "albums") == 0) { -+ stats->numberOfAlbums = atoi(re->value); -+ } else if (strcmp(re->name, "songs") == 0) { -+ stats->numberOfSongs = atoi(re->value); -+ } else if (strcmp(re->name, "uptime") == 0) { -+ stats->uptime = strtol(re->value, NULL, 10); -+ } else if (strcmp(re->name, "db_update") == 0) { -+ stats->dbUpdateTime = strtol(re->value, NULL, 10); -+ } else if (strcmp(re->name, "playtime") == 0) { -+ stats->playTime = strtol(re->value, NULL, 10); -+ } else if (strcmp(re->name, "db_playtime") == 0) { -+ stats->dbPlayTime = strtol(re->value, NULL, 10); -+ } -+ -+ mpd_getNextReturnElement(connection); -+ if (connection->error) { -+ free(stats); -+ return NULL; -+ } -+ } -+ -+ if (connection->error) { -+ free(stats); -+ return NULL; -+ } -+ -+ return stats; -+} -+ -+void mpd_freeStats(mpd_Stats * stats) -+{ -+ free(stats); -+} -+ -+mpd_SearchStats *mpd_getSearchStats(mpd_Connection * connection) -+{ -+ mpd_SearchStats *stats; -+ mpd_ReturnElement *re; -+ -+ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { -+ return NULL; -+ } -+ -+ if (!connection->returnElement) -+ mpd_getNextReturnElement(connection); -+ -+ if (connection->error) -+ return NULL; -+ -+ stats = malloc(sizeof(mpd_SearchStats)); -+ stats->numberOfSongs = 0; -+ stats->playTime = 0; -+ -+ while (connection->returnElement) { -+ re = connection->returnElement; -+ -+ if (strcmp(re->name, "songs") == 0) { -+ stats->numberOfSongs = atoi(re->value); -+ } else if (strcmp(re->name, "playtime") == 0) { -+ stats->playTime = strtol(re->value, NULL, 10); -+ } -+ -+ mpd_getNextReturnElement(connection); -+ if (connection->error) { -+ free(stats); -+ return NULL; -+ } -+ } -+ -+ if (connection->error) { -+ free(stats); -+ return NULL; -+ } -+ -+ return stats; -+} -+ -+void mpd_freeSearchStats(mpd_SearchStats * stats) -+{ -+ free(stats); -+} -+ -+static void mpd_initSong(mpd_Song * song) -+{ -+ song->file = NULL; -+ song->artist = NULL; -+ song->album = NULL; -+ song->track = NULL; -+ song->title = NULL; -+ song->name = NULL; -+ song->date = NULL; -+ /* added by Qball */ -+ song->genre = NULL; -+ song->composer = NULL; -+ song->performer = NULL; -+ song->disc = NULL; -+ song->comment = NULL; -+ -+ song->time = MPD_SONG_NO_TIME; -+ song->pos = MPD_SONG_NO_NUM; -+ song->id = MPD_SONG_NO_ID; -+} -+ -+static void mpd_finishSong(mpd_Song * song) -+{ -+ if (song->file) -+ free(song->file); -+ if (song->artist) -+ free(song->artist); -+ if (song->album) -+ free(song->album); -+ if (song->title) -+ free(song->title); -+ if (song->track) -+ free(song->track); -+ if (song->name) -+ free(song->name); -+ if (song->date) -+ free(song->date); -+ if (song->genre) -+ free(song->genre); -+ if (song->composer) -+ free(song->composer); -+ if (song->disc) -+ free(song->disc); -+ if (song->comment) -+ free(song->comment); -+} -+ -+mpd_Song *mpd_newSong(void) -+{ -+ mpd_Song *ret = malloc(sizeof(mpd_Song)); -+ -+ mpd_initSong(ret); -+ -+ return ret; -+} -+ -+void mpd_freeSong(mpd_Song * song) -+{ -+ mpd_finishSong(song); -+ free(song); -+} -+ -+mpd_Song *mpd_songDup(mpd_Song * song) -+{ -+ mpd_Song *ret = mpd_newSong(); -+ -+ if (song->file) -+ ret->file = strdup(song->file); -+ if (song->artist) -+ ret->artist = strdup(song->artist); -+ if (song->album) -+ ret->album = strdup(song->album); -+ if (song->title) -+ ret->title = strdup(song->title); -+ if (song->track) -+ ret->track = strdup(song->track); -+ if (song->name) -+ ret->name = strdup(song->name); -+ if (song->date) -+ ret->date = strdup(song->date); -+ if (song->genre) -+ ret->genre = strdup(song->genre); -+ if (song->composer) -+ ret->composer = strdup(song->composer); -+ if (song->disc) -+ ret->disc = strdup(song->disc); -+ if (song->comment) -+ ret->comment = strdup(song->comment); -+ ret->time = song->time; -+ ret->pos = song->pos; -+ ret->id = song->id; -+ -+ return ret; -+} -+ -+static void mpd_initDirectory(mpd_Directory * directory) -+{ -+ directory->path = NULL; -+} -+ -+static void mpd_finishDirectory(mpd_Directory * directory) -+{ -+ if (directory->path) -+ free(directory->path); -+} -+ -+mpd_Directory *mpd_newDirectory(void) -+{ -+ mpd_Directory *directory = malloc(sizeof(mpd_Directory));; -+ -+ mpd_initDirectory(directory); -+ -+ return directory; -+} -+ -+void mpd_freeDirectory(mpd_Directory * directory) -+{ -+ mpd_finishDirectory(directory); -+ -+ free(directory); -+} -+ -+mpd_Directory *mpd_directoryDup(mpd_Directory * directory) -+{ -+ mpd_Directory *ret = mpd_newDirectory(); -+ -+ if (directory->path) -+ ret->path = strdup(directory->path); -+ -+ return ret; -+} -+ -+static void mpd_initPlaylistFile(mpd_PlaylistFile * playlist) -+{ -+ playlist->path = NULL; -+} -+ -+static void mpd_finishPlaylistFile(mpd_PlaylistFile * playlist) -+{ -+ if (playlist->path) -+ free(playlist->path); -+} -+ -+mpd_PlaylistFile *mpd_newPlaylistFile(void) -+{ -+ mpd_PlaylistFile *playlist = malloc(sizeof(mpd_PlaylistFile)); -+ -+ mpd_initPlaylistFile(playlist); -+ -+ return playlist; -+} -+ -+void mpd_freePlaylistFile(mpd_PlaylistFile * playlist) -+{ -+ mpd_finishPlaylistFile(playlist); -+ free(playlist); -+} -+ -+mpd_PlaylistFile *mpd_playlistFileDup(mpd_PlaylistFile * playlist) -+{ -+ mpd_PlaylistFile *ret = mpd_newPlaylistFile(); -+ -+ if (playlist->path) -+ ret->path = strdup(playlist->path); -+ -+ return ret; -+} -+ -+static void mpd_initInfoEntity(mpd_InfoEntity * entity) -+{ -+ entity->info.directory = NULL; -+} -+ -+static void mpd_finishInfoEntity(mpd_InfoEntity * entity) -+{ -+ if (entity->info.directory) { -+ if (entity->type == MPD_INFO_ENTITY_TYPE_DIRECTORY) { -+ mpd_freeDirectory(entity->info.directory); -+ } else if (entity->type == MPD_INFO_ENTITY_TYPE_SONG) { -+ mpd_freeSong(entity->info.song); -+ } else if (entity->type == MPD_INFO_ENTITY_TYPE_PLAYLISTFILE) { -+ mpd_freePlaylistFile(entity->info.playlistFile); -+ } -+ } -+} -+ -+mpd_InfoEntity *mpd_newInfoEntity(void) -+{ -+ mpd_InfoEntity *entity = malloc(sizeof(mpd_InfoEntity)); -+ -+ mpd_initInfoEntity(entity); -+ -+ return entity; -+} -+ -+void mpd_freeInfoEntity(mpd_InfoEntity * entity) -+{ -+ mpd_finishInfoEntity(entity); -+ free(entity); -+} -+ -+static void mpd_sendInfoCommand(mpd_Connection * connection, char *command) -+{ -+ mpd_executeCommand(connection, command); -+} -+ -+mpd_InfoEntity *mpd_getNextInfoEntity(mpd_Connection * connection) -+{ -+ mpd_InfoEntity *entity = NULL; -+ -+ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { -+ return NULL; -+ } -+ -+ if (!connection->returnElement) -+ mpd_getNextReturnElement(connection); -+ -+ if (connection->returnElement) { -+ if (strcmp(connection->returnElement->name, "file") == 0) { -+ entity = mpd_newInfoEntity(); -+ entity->type = MPD_INFO_ENTITY_TYPE_SONG; -+ entity->info.song = mpd_newSong(); -+ entity->info.song->file = strdup(connection->returnElement->value); -+ } else if (strcmp(connection->returnElement->name, "directory") == 0) { -+ entity = mpd_newInfoEntity(); -+ entity->type = MPD_INFO_ENTITY_TYPE_DIRECTORY; -+ entity->info.directory = mpd_newDirectory(); -+ entity->info.directory->path = strdup(connection->returnElement->value); -+ } else if (strcmp(connection->returnElement->name, "playlist") == 0) { -+ entity = mpd_newInfoEntity(); -+ entity->type = MPD_INFO_ENTITY_TYPE_PLAYLISTFILE; -+ entity->info.playlistFile = mpd_newPlaylistFile(); -+ entity->info.playlistFile->path = strdup(connection->returnElement->value); -+ } else if (strcmp(connection->returnElement->name, "cpos") == 0) { -+ entity = mpd_newInfoEntity(); -+ entity->type = MPD_INFO_ENTITY_TYPE_SONG; -+ entity->info.song = mpd_newSong(); -+ entity->info.song->pos = atoi(connection->returnElement->value); -+ } else { -+ connection->error = 1; -+ strcpy(connection->errorStr, "problem parsing song info"); -+ return NULL; -+ } -+ } else -+ return NULL; -+ -+ mpd_getNextReturnElement(connection); -+ while (connection->returnElement) { -+ mpd_ReturnElement *re = connection->returnElement; -+ -+ if (strcmp(re->name, "file") == 0) -+ return entity; -+ else if (strcmp(re->name, "directory") == 0) -+ return entity; -+ else if (strcmp(re->name, "playlist") == 0) -+ return entity; -+ else if (strcmp(re->name, "cpos") == 0) -+ return entity; -+ -+ if (entity->type == MPD_INFO_ENTITY_TYPE_SONG && strlen(re->value)) { -+ if (!entity->info.song->artist && strcmp(re->name, "Artist") == 0) { -+ entity->info.song->artist = strdup(re->value); -+ } else if (!entity->info.song->album && strcmp(re->name, "Album") == 0) { -+ entity->info.song->album = strdup(re->value); -+ } else if (!entity->info.song->title && strcmp(re->name, "Title") == 0) { -+ entity->info.song->title = strdup(re->value); -+ } else if (!entity->info.song->track && strcmp(re->name, "Track") == 0) { -+ entity->info.song->track = strdup(re->value); -+ } else if (!entity->info.song->name && strcmp(re->name, "Name") == 0) { -+ entity->info.song->name = strdup(re->value); -+ } else if (entity->info.song->time == MPD_SONG_NO_TIME && strcmp(re->name, "Time") == 0) { -+ entity->info.song->time = atoi(re->value); -+ } else if (entity->info.song->pos == MPD_SONG_NO_NUM && strcmp(re->name, "Pos") == 0) { -+ entity->info.song->pos = atoi(re->value); -+ } else if (entity->info.song->id == MPD_SONG_NO_ID && strcmp(re->name, "Id") == 0) { -+ entity->info.song->id = atoi(re->value); -+ } else if (!entity->info.song->date && strcmp(re->name, "Date") == 0) { -+ entity->info.song->date = strdup(re->value); -+ } else if (!entity->info.song->genre && strcmp(re->name, "Genre") == 0) { -+ entity->info.song->genre = strdup(re->value); -+ } else if (!entity->info.song->composer && strcmp(re->name, "Composer") == 0) { -+ entity->info.song->composer = strdup(re->value); -+ } else if (!entity->info.song->performer && strcmp(re->name, "Performer") == 0) { -+ entity->info.song->performer = strdup(re->value); -+ } else if (!entity->info.song->disc && strcmp(re->name, "Disc") == 0) { -+ entity->info.song->disc = strdup(re->value); -+ } else if (!entity->info.song->comment && strcmp(re->name, "Comment") == 0) { -+ entity->info.song->comment = strdup(re->value); -+ } -+ } else if (entity->type == MPD_INFO_ENTITY_TYPE_DIRECTORY) { -+ } else if (entity->type == MPD_INFO_ENTITY_TYPE_PLAYLISTFILE) { -+ } -+ -+ mpd_getNextReturnElement(connection); -+ } -+ -+ return entity; -+} -+ -+static char *mpd_getNextReturnElementNamed(mpd_Connection * connection, const char *name) -+{ -+ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { -+ return NULL; -+ } -+ -+ mpd_getNextReturnElement(connection); -+ while (connection->returnElement) { -+ mpd_ReturnElement *re = connection->returnElement; -+ -+ if (strcmp(re->name, name) == 0) -+ return strdup(re->value); -+ mpd_getNextReturnElement(connection); -+ } -+ -+ return NULL; -+} -+ -+char *mpd_getNextTag(mpd_Connection * connection, int type) -+{ -+ if (type < 0 || type >= MPD_TAG_NUM_OF_ITEM_TYPES || type == MPD_TAG_ITEM_ANY) -+ return NULL; -+ if (type == MPD_TAG_ITEM_FILENAME) -+ return mpd_getNextReturnElementNamed(connection, "file"); -+ return mpd_getNextReturnElementNamed(connection, mpdTagItemKeys[type]); -+} -+ -+char *mpd_getNextArtist(mpd_Connection * connection) -+{ -+ return mpd_getNextReturnElementNamed(connection, "Artist"); -+} -+ -+char *mpd_getNextAlbum(mpd_Connection * connection) -+{ -+ return mpd_getNextReturnElementNamed(connection, "Album"); -+} -+ -+void mpd_sendPlaylistInfoCommand(mpd_Connection * connection, int songPos) -+{ -+ int len = strlen("playlistinfo") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "playlistinfo \"%i\"\n", songPos); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendPlaylistIdCommand(mpd_Connection * connection, int id) -+{ -+ int len = strlen("playlistid") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "playlistid \"%i\"\n", id); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendPlChangesCommand(mpd_Connection * connection, long long playlist) -+{ -+ int len = strlen("plchanges") + 2 + LONGLONGLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "plchanges \"%lld\"\n", playlist); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendPlChangesPosIdCommand(mpd_Connection * connection, long long playlist) -+{ -+ int len = strlen("plchangesposid") + 2 + LONGLONGLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "plchangesposid \"%lld\"\n", playlist); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendListallCommand(mpd_Connection * connection, const char *dir) -+{ -+ char *sDir = mpd_sanitizeArg(dir); -+ int len = strlen("listall") + 2 + strlen(sDir) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "listall \"%s\"\n", sDir); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+ free(sDir); -+} -+ -+void mpd_sendListallInfoCommand(mpd_Connection * connection, const char *dir) -+{ -+ char *sDir = mpd_sanitizeArg(dir); -+ int len = strlen("listallinfo") + 2 + strlen(sDir) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "listallinfo \"%s\"\n", sDir); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+ free(sDir); -+} -+ -+void mpd_sendLsInfoCommand(mpd_Connection * connection, const char *dir) -+{ -+ char *sDir = mpd_sanitizeArg(dir); -+ int len = strlen("lsinfo") + 2 + strlen(sDir) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "lsinfo \"%s\"\n", sDir); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+ free(sDir); -+} -+ -+void mpd_sendCurrentSongCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "currentsong\n"); -+} -+ -+void mpd_sendSearchCommand(mpd_Connection * connection, int table, const char *str) -+{ -+ mpd_startSearch(connection, 0); -+ mpd_addConstraintSearch(connection, table, str); -+ mpd_commitSearch(connection); -+} -+ -+void mpd_sendFindCommand(mpd_Connection * connection, int table, const char *str) -+{ -+ mpd_startSearch(connection, 1); -+ mpd_addConstraintSearch(connection, table, str); -+ mpd_commitSearch(connection); -+} -+ -+void mpd_sendListCommand(mpd_Connection * connection, int table, const char *arg1) -+{ -+ char st[10]; -+ int len; -+ char *string; -+ if (table == MPD_TABLE_ARTIST) -+ strcpy(st, "artist"); -+ else if (table == MPD_TABLE_ALBUM) -+ strcpy(st, "album"); -+ else { -+ connection->error = 1; -+ strcpy(connection->errorStr, "unknown table for list"); -+ return; -+ } -+ if (arg1) { -+ char *sanitArg1 = mpd_sanitizeArg(arg1); -+ len = strlen("list") + 1 + strlen(sanitArg1) + 2 + strlen(st) + 3; -+ string = malloc(len); -+ snprintf(string, len, "list %s \"%s\"\n", st, sanitArg1); -+ free(sanitArg1); -+ } else { -+ len = strlen("list") + 1 + strlen(st) + 2; -+ string = malloc(len); -+ snprintf(string, len, "list %s\n", st); -+ } -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendAddCommand(mpd_Connection * connection, const char *file) -+{ -+ char *sFile = mpd_sanitizeArg(file); -+ int len = strlen("add") + 2 + strlen(sFile) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "add \"%s\"\n", sFile); -+ mpd_executeCommand(connection, string); -+ free(string); -+ free(sFile); -+} -+ -+int mpd_sendAddIdCommand(mpd_Connection * connection, const char *file) -+{ -+ int retval = -1; -+ char *sFile = mpd_sanitizeArg(file); -+ int len = strlen("addid") + 2 + strlen(sFile) + 3; -+ char *string = malloc(len); -+ -+ snprintf(string, len, "addid \"%s\"\n", sFile); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+ free(sFile); -+ -+ string = mpd_getNextReturnElementNamed(connection, "Id"); -+ if (string) { -+ retval = atoi(string); -+ free(string); -+ } -+ -+ return retval; -+} -+ -+void mpd_sendDeleteCommand(mpd_Connection * connection, int songPos) -+{ -+ int len = strlen("delete") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "delete \"%i\"\n", songPos); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendDeleteIdCommand(mpd_Connection * connection, int id) -+{ -+ int len = strlen("deleteid") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "deleteid \"%i\"\n", id); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendSaveCommand(mpd_Connection * connection, const char *name) -+{ -+ char *sName = mpd_sanitizeArg(name); -+ int len = strlen("save") + 2 + strlen(sName) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "save \"%s\"\n", sName); -+ mpd_executeCommand(connection, string); -+ free(string); -+ free(sName); -+} -+ -+void mpd_sendLoadCommand(mpd_Connection * connection, const char *name) -+{ -+ char *sName = mpd_sanitizeArg(name); -+ int len = strlen("load") + 2 + strlen(sName) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "load \"%s\"\n", sName); -+ mpd_executeCommand(connection, string); -+ free(string); -+ free(sName); -+} -+ -+void mpd_sendRmCommand(mpd_Connection * connection, const char *name) -+{ -+ char *sName = mpd_sanitizeArg(name); -+ int len = strlen("rm") + 2 + strlen(sName) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "rm \"%s\"\n", sName); -+ mpd_executeCommand(connection, string); -+ free(string); -+ free(sName); -+} -+ -+void mpd_sendRenameCommand(mpd_Connection * connection, const char *from, const char *to) -+{ -+ char *sFrom = mpd_sanitizeArg(from); -+ char *sTo = mpd_sanitizeArg(to); -+ int len = strlen("rename") + 2 + strlen(sFrom) + 3 + strlen(sTo) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "rename \"%s\" \"%s\"\n", sFrom, sTo); -+ mpd_executeCommand(connection, string); -+ free(string); -+ free(sFrom); -+ free(sTo); -+} -+ -+void mpd_sendShuffleCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "shuffle\n"); -+} -+ -+void mpd_sendClearCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "clear\n"); -+} -+ -+void mpd_sendPlayCommand(mpd_Connection * connection, int songPos) -+{ -+ int len = strlen("play") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "play \"%i\"\n", songPos); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendPlayIdCommand(mpd_Connection * connection, int id) -+{ -+ int len = strlen("playid") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "playid \"%i\"\n", id); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendStopCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "stop\n"); -+} -+ -+void mpd_sendPauseCommand(mpd_Connection * connection, int pauseMode) -+{ -+ int len = strlen("pause") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "pause \"%i\"\n", pauseMode); -+ mpd_executeCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendNextCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "next\n"); -+} -+ -+void mpd_sendMoveCommand(mpd_Connection * connection, int from, int to) -+{ -+ int len = strlen("move") + 2 + INTLEN + 3 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "move \"%i\" \"%i\"\n", from, to); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendMoveIdCommand(mpd_Connection * connection, int id, int to) -+{ -+ int len = strlen("moveid") + 2 + INTLEN + 3 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "moveid \"%i\" \"%i\"\n", id, to); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendSwapCommand(mpd_Connection * connection, int song1, int song2) -+{ -+ int len = strlen("swap") + 2 + INTLEN + 3 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "swap \"%i\" \"%i\"\n", song1, song2); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendSwapIdCommand(mpd_Connection * connection, int id1, int id2) -+{ -+ int len = strlen("swapid") + 2 + INTLEN + 3 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "swapid \"%i\" \"%i\"\n", id1, id2); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendSeekCommand(mpd_Connection * connection, int song, int time) -+{ -+ int len = strlen("seek") + 2 + INTLEN + 3 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "seek \"%i\" \"%i\"\n", song, time); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendSeekIdCommand(mpd_Connection * connection, int id, int time) -+{ -+ int len = strlen("seekid") + 2 + INTLEN + 3 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "seekid \"%i\" \"%i\"\n", id, time); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendUpdateCommand(mpd_Connection * connection, char *path) -+{ -+ char *sPath = mpd_sanitizeArg(path); -+ int len = strlen("update") + 2 + strlen(sPath) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "update \"%s\"\n", sPath); -+ mpd_sendInfoCommand(connection, string); -+ free(string); -+ free(sPath); -+} -+ -+int mpd_getUpdateId(mpd_Connection * connection) -+{ -+ char *jobid; -+ int ret = 0; -+ -+ jobid = mpd_getNextReturnElementNamed(connection, "updating_db"); -+ if (jobid) { -+ ret = atoi(jobid); -+ free(jobid); -+ } -+ -+ return ret; -+} -+ -+void mpd_sendPrevCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "previous\n"); -+} -+ -+void mpd_sendRepeatCommand(mpd_Connection * connection, int repeatMode) -+{ -+ int len = strlen("repeat") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "repeat \"%i\"\n", repeatMode); -+ mpd_executeCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendRandomCommand(mpd_Connection * connection, int randomMode) -+{ -+ int len = strlen("random") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "random \"%i\"\n", randomMode); -+ mpd_executeCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendSetvolCommand(mpd_Connection * connection, int volumeChange) -+{ -+ int len = strlen("setvol") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "setvol \"%i\"\n", volumeChange); -+ mpd_executeCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendVolumeCommand(mpd_Connection * connection, int volumeChange) -+{ -+ int len = strlen("volume") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "volume \"%i\"\n", volumeChange); -+ mpd_executeCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendCrossfadeCommand(mpd_Connection * connection, int seconds) -+{ -+ int len = strlen("crossfade") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "crossfade \"%i\"\n", seconds); -+ mpd_executeCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendPasswordCommand(mpd_Connection * connection, const char *pass) -+{ -+ char *sPass = mpd_sanitizeArg(pass); -+ int len = strlen("password") + 2 + strlen(sPass) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "password \"%s\"\n", sPass); -+ mpd_executeCommand(connection, string); -+ free(string); -+ free(sPass); -+} -+ -+void mpd_sendCommandListBegin(mpd_Connection * connection) -+{ -+ if (connection->commandList) { -+ strcpy(connection->errorStr, "already in command list mode"); -+ connection->error = 1; -+ return; -+ } -+ connection->commandList = COMMAND_LIST; -+ mpd_executeCommand(connection, "command_list_begin\n"); -+} -+ -+void mpd_sendCommandListOkBegin(mpd_Connection * connection) -+{ -+ if (connection->commandList) { -+ strcpy(connection->errorStr, "already in command list mode"); -+ connection->error = 1; -+ return; -+ } -+ connection->commandList = COMMAND_LIST_OK; -+ mpd_executeCommand(connection, "command_list_ok_begin\n"); -+ connection->listOks = 0; -+} -+ -+void mpd_sendCommandListEnd(mpd_Connection * connection) -+{ -+ if (!connection->commandList) { -+ strcpy(connection->errorStr, "not in command list mode"); -+ connection->error = 1; -+ return; -+ } -+ connection->commandList = 0; -+ mpd_executeCommand(connection, "command_list_end\n"); -+} -+ -+void mpd_sendOutputsCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "outputs\n"); -+} -+ -+mpd_OutputEntity *mpd_getNextOutput(mpd_Connection * connection) -+{ -+ mpd_OutputEntity *output = NULL; -+ -+ if (connection->doneProcessing || (connection->listOks && connection->doneListOk)) { -+ return NULL; -+ } -+ -+ if (connection->error) -+ return NULL; -+ -+ output = malloc(sizeof(mpd_OutputEntity)); -+ output->id = -10; -+ output->name = NULL; -+ output->enabled = 0; -+ -+ if (!connection->returnElement) -+ mpd_getNextReturnElement(connection); -+ -+ while (connection->returnElement) { -+ mpd_ReturnElement *re = connection->returnElement; -+ if (strcmp(re->name, "outputid") == 0) { -+ if (output != NULL && output->id >= 0) -+ return output; -+ output->id = atoi(re->value); -+ } else if (strcmp(re->name, "outputname") == 0) { -+ output->name = strdup(re->value); -+ } else if (strcmp(re->name, "outputenabled") == 0) { -+ output->enabled = atoi(re->value); -+ } -+ -+ mpd_getNextReturnElement(connection); -+ if (connection->error) { -+ free(output); -+ return NULL; -+ } -+ -+ } -+ -+ return output; -+} -+ -+void mpd_sendEnableOutputCommand(mpd_Connection * connection, int outputId) -+{ -+ int len = strlen("enableoutput") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "enableoutput \"%i\"\n", outputId); -+ mpd_executeCommand(connection, string); -+ free(string); -+} -+ -+void mpd_sendDisableOutputCommand(mpd_Connection * connection, int outputId) -+{ -+ int len = strlen("disableoutput") + 2 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "disableoutput \"%i\"\n", outputId); -+ mpd_executeCommand(connection, string); -+ free(string); -+} -+ -+void mpd_freeOutputElement(mpd_OutputEntity * output) -+{ -+ free(output->name); -+ free(output); -+} -+ -+/** -+ * mpd_sendNotCommandsCommand -+ * odd naming, but it gets the not allowed commands -+ */ -+ -+void mpd_sendNotCommandsCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "notcommands\n"); -+} -+ -+/** -+ * mpd_sendCommandsCommand -+ * odd naming, but it gets the allowed commands -+ */ -+void mpd_sendCommandsCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "commands\n"); -+} -+ -+/** -+ * Get the next returned command -+ */ -+char *mpd_getNextCommand(mpd_Connection * connection) -+{ -+ return mpd_getNextReturnElementNamed(connection, "command"); -+} -+ -+void mpd_sendUrlHandlersCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "urlhandlers\n"); -+} -+ -+char *mpd_getNextHandler(mpd_Connection * connection) -+{ -+ return mpd_getNextReturnElementNamed(connection, "handler"); -+} -+ -+void mpd_sendTagTypesCommand(mpd_Connection * connection) -+{ -+ mpd_executeCommand(connection, "tagtypes\n"); -+} -+ -+char *mpd_getNextTagType(mpd_Connection * connection) -+{ -+ return mpd_getNextReturnElementNamed(connection, "tagtype"); -+} -+ -+void mpd_startSearch(mpd_Connection * connection, int exact) -+{ -+ if (connection->request) { -+ strcpy(connection->errorStr, "search already in progress"); -+ connection->error = 1; -+ return; -+ } -+ -+ if (exact) -+ connection->request = strdup("find"); -+ else -+ connection->request = strdup("search"); -+} -+ -+void mpd_startStatsSearch(mpd_Connection * connection) -+{ -+ if (connection->request) { -+ strcpy(connection->errorStr, "search already in progress"); -+ connection->error = 1; -+ return; -+ } -+ -+ connection->request = strdup("count"); -+} -+ -+void mpd_startPlaylistSearch(mpd_Connection * connection, int exact) -+{ -+ if (connection->request) { -+ strcpy(connection->errorStr, "search already in progress"); -+ connection->error = 1; -+ return; -+ } -+ -+ if (exact) -+ connection->request = strdup("playlistfind"); -+ else -+ connection->request = strdup("playlistsearch"); -+} -+ -+void mpd_startFieldSearch(mpd_Connection * connection, int type) -+{ -+ char *strtype; -+ int len; -+ -+ if (connection->request) { -+ strcpy(connection->errorStr, "search already in progress"); -+ connection->error = 1; -+ return; -+ } -+ -+ if (type < 0 || type >= MPD_TAG_NUM_OF_ITEM_TYPES) { -+ strcpy(connection->errorStr, "invalid type specified"); -+ connection->error = 1; -+ return; -+ } -+ -+ strtype = mpdTagItemKeys[type]; -+ -+ len = 5 + strlen(strtype) + 1; -+ connection->request = malloc(len); -+ -+ snprintf(connection->request, len, "list %c%s", tolower(strtype[0]), strtype + 1); -+} -+ -+void mpd_addConstraintSearch(mpd_Connection * connection, int type, const char *name) -+{ -+ char *strtype; -+ char *arg; -+ int len; -+ char *string; -+ -+ if (!connection->request) { -+ strcpy(connection->errorStr, "no search in progress"); -+ connection->error = 1; -+ return; -+ } -+ -+ if (type < 0 || type >= MPD_TAG_NUM_OF_ITEM_TYPES) { -+ strcpy(connection->errorStr, "invalid type specified"); -+ connection->error = 1; -+ return; -+ } -+ -+ if (name == NULL) { -+ strcpy(connection->errorStr, "no name specified"); -+ connection->error = 1; -+ return; -+ } -+ -+ string = strdup(connection->request); -+ strtype = mpdTagItemKeys[type]; -+ arg = mpd_sanitizeArg(name); -+ -+ len = strlen(string) + 1 + strlen(strtype) + 2 + strlen(arg) + 2; -+ connection->request = realloc(connection->request, len); -+ snprintf(connection->request, len, "%s %c%s \"%s\"", string, tolower(strtype[0]), strtype + 1, arg); -+ -+ free(string); -+ free(arg); -+} -+ -+void mpd_commitSearch(mpd_Connection * connection) -+{ -+ int len; -+ -+ if (!connection->request) { -+ strcpy(connection->errorStr, "no search in progress"); -+ connection->error = 1; -+ return; -+ } -+ -+ len = strlen(connection->request) + 2; -+ connection->request = realloc(connection->request, len); -+ connection->request[len - 2] = '\n'; -+ connection->request[len - 1] = '\0'; -+ mpd_sendInfoCommand(connection, connection->request); -+ -+ free(connection->request); -+ connection->request = NULL; -+} -+ -+/** -+ * @param connection a MpdConnection -+ * @param path the path to the playlist. -+ * -+ * List the content, with full metadata, of a stored playlist. -+ * -+ */ -+void mpd_sendListPlaylistInfoCommand(mpd_Connection * connection, char *path) -+{ -+ char *arg = mpd_sanitizeArg(path); -+ int len = strlen("listplaylistinfo") + 2 + strlen(arg) + 3; -+ char *query = malloc(len); -+ snprintf(query, len, "listplaylistinfo \"%s\"\n", arg); -+ mpd_sendInfoCommand(connection, query); -+ free(arg); -+ free(query); -+} -+ -+/** -+ * @param connection a MpdConnection -+ * @param path the path to the playlist. -+ * -+ * List the content of a stored playlist. -+ * -+ */ -+void mpd_sendListPlaylistCommand(mpd_Connection * connection, char *path) -+{ -+ char *arg = mpd_sanitizeArg(path); -+ int len = strlen("listplaylist") + 2 + strlen(arg) + 3; -+ char *query = malloc(len); -+ snprintf(query, len, "listplaylist \"%s\"\n", arg); -+ mpd_sendInfoCommand(connection, query); -+ free(arg); -+ free(query); -+} -+ -+void mpd_sendPlaylistClearCommand(mpd_Connection * connection, char *path) -+{ -+ char *sPath = mpd_sanitizeArg(path); -+ int len = strlen("playlistclear") + 2 + strlen(sPath) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "playlistclear \"%s\"\n", sPath); -+ mpd_executeCommand(connection, string); -+ free(sPath); -+ free(string); -+} -+ -+void mpd_sendPlaylistAddCommand(mpd_Connection * connection, char *playlist, char *path) -+{ -+ char *sPlaylist = mpd_sanitizeArg(playlist); -+ char *sPath = mpd_sanitizeArg(path); -+ int len = strlen("playlistadd") + 2 + strlen(sPlaylist) + 3 + strlen(sPath) + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "playlistadd \"%s\" \"%s\"\n", sPlaylist, sPath); -+ mpd_executeCommand(connection, string); -+ free(sPlaylist); -+ free(sPath); -+ free(string); -+} -+ -+void mpd_sendPlaylistMoveCommand(mpd_Connection * connection, char *playlist, int from, int to) -+{ -+ char *sPlaylist = mpd_sanitizeArg(playlist); -+ int len = strlen("playlistmove") + 2 + strlen(sPlaylist) + 3 + INTLEN + 3 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "playlistmove \"%s\" \"%i\" \"%i\"\n", sPlaylist, from, to); -+ mpd_executeCommand(connection, string); -+ free(sPlaylist); -+ free(string); -+} -+ -+void mpd_sendPlaylistDeleteCommand(mpd_Connection * connection, char *playlist, int pos) -+{ -+ char *sPlaylist = mpd_sanitizeArg(playlist); -+ int len = strlen("playlistdelete") + 2 + strlen(sPlaylist) + 3 + INTLEN + 3; -+ char *string = malloc(len); -+ snprintf(string, len, "playlistdelete \"%s\" \"%i\"\n", sPlaylist, pos); -+ mpd_executeCommand(connection, string); -+ free(sPlaylist); -+ free(string); -+} ---- /dev/null -+++ b/libmpdclient.h -@@ -0,0 +1,661 @@ -+/* libmpdclient -+ (c)2003-2006 by Warren Dukes (warren.dukes@gmail.com) -+ This project's homepage is: http://www.musicpd.org -+ -+ Redistribution and use in source and binary forms, with or without -+ modification, are permitted provided that the following conditions -+ are met: -+ -+ - Redistributions of source code must retain the above copyright -+ notice, this list of conditions and the following disclaimer. -+ -+ - Redistributions in binary form must reproduce the above copyright -+ notice, this list of conditions and the following disclaimer in the -+ documentation and/or other materials provided with the distribution. -+ -+ - Neither the name of the Music Player Daemon nor the names of its -+ contributors may be used to endorse or promote products derived from -+ this software without specific prior written permission. -+ -+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR -+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+*/ -+ -+#ifndef LIBMPDCLIENT_H -+#define LIBMPDCLIENT_H -+ -+#ifdef WIN32 -+# define __W32API_USE_DLLIMPORT__ 1 -+#endif -+ -+#include -+#include -+#define MPD_BUFFER_MAX_LENGTH 50000 -+#define MPD_ERRORSTR_MAX_LENGTH 1000 -+#define MPD_WELCOME_MESSAGE "OK MPD " -+ -+#define MPD_ERROR_TIMEOUT 10 /* timeout trying to talk to mpd */ -+#define MPD_ERROR_SYSTEM 11 /* system error */ -+#define MPD_ERROR_UNKHOST 12 /* unknown host */ -+#define MPD_ERROR_CONNPORT 13 /* problems connecting to port on host */ -+#define MPD_ERROR_NOTMPD 14 /* mpd not running on port at host */ -+#define MPD_ERROR_NORESPONSE 15 /* no response on attempting to connect */ -+#define MPD_ERROR_SENDING 16 /* error sending command */ -+#define MPD_ERROR_CONNCLOSED 17 /* connection closed by mpd */ -+#define MPD_ERROR_ACK 18 /* ACK returned! */ -+#define MPD_ERROR_BUFFEROVERRUN 19 /* Buffer was overrun! */ -+ -+#define MPD_ACK_ERROR_UNK -1 -+#define MPD_ERROR_AT_UNK -1 -+ -+#define MPD_ACK_ERROR_NOT_LIST 1 -+#define MPD_ACK_ERROR_ARG 2 -+#define MPD_ACK_ERROR_PASSWORD 3 -+#define MPD_ACK_ERROR_PERMISSION 4 -+#define MPD_ACK_ERROR_UNKNOWN_CMD 5 -+ -+#define MPD_ACK_ERROR_NO_EXIST 50 -+#define MPD_ACK_ERROR_PLAYLIST_MAX 51 -+#define MPD_ACK_ERROR_SYSTEM 52 -+#define MPD_ACK_ERROR_PLAYLIST_LOAD 53 -+#define MPD_ACK_ERROR_UPDATE_ALREADY 54 -+#define MPD_ACK_ERROR_PLAYER_SYNC 55 -+#define MPD_ACK_ERROR_EXIST 56 -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+ typedef enum mpd_TagItems { -+ MPD_TAG_ITEM_ARTIST, -+ MPD_TAG_ITEM_ALBUM, -+ MPD_TAG_ITEM_TITLE, -+ MPD_TAG_ITEM_TRACK, -+ MPD_TAG_ITEM_NAME, -+ MPD_TAG_ITEM_GENRE, -+ MPD_TAG_ITEM_DATE, -+ MPD_TAG_ITEM_COMPOSER, -+ MPD_TAG_ITEM_PERFORMER, -+ MPD_TAG_ITEM_COMMENT, -+ MPD_TAG_ITEM_DISC, -+ MPD_TAG_ITEM_FILENAME, -+ MPD_TAG_ITEM_ANY, -+ MPD_TAG_NUM_OF_ITEM_TYPES -+ } mpd_TagItems; -+ -+ extern char *mpdTagItemKeys[MPD_TAG_NUM_OF_ITEM_TYPES]; -+ -+/* internal stuff don't touch this struct */ -+ typedef struct _mpd_ReturnElement { -+ char *name; -+ char *value; -+ } mpd_ReturnElement; -+ -+/* mpd_Connection -+ * holds info about connection to mpd -+ * use error, and errorStr to detect errors -+ */ -+ typedef struct _mpd_Connection { -+ /* use this to check the version of mpd */ -+ int version[3]; -+ /* IMPORTANT, you want to get the error messages from here */ -+ char errorStr[MPD_ERRORSTR_MAX_LENGTH + 1]; -+ int errorCode; -+ int errorAt; -+ /* this will be set to MPD_ERROR_* if there is an error, 0 if not */ -+ int error; -+ /* DON'T TOUCH any of the rest of this stuff */ -+ int sock; -+ char buffer[MPD_BUFFER_MAX_LENGTH + 1]; -+ int buflen; -+ int bufstart; -+ int doneProcessing; -+ int listOks; -+ int doneListOk; -+ int commandList; -+ mpd_ReturnElement *returnElement; -+ struct timeval timeout; -+ char *request; -+ } mpd_Connection; -+ -+/* mpd_newConnection -+ * use this to open a new connection -+ * you should use mpd_closeConnection, when your done with the connection, -+ * even if an error has occurred -+ * _timeout_ is the connection timeout period in seconds -+ */ -+ mpd_Connection *mpd_newConnection(const char *host, int port, float timeout); -+ -+ void mpd_setConnectionTimeout(mpd_Connection * connection, float timeout); -+ -+/* mpd_closeConnection -+ * use this to close a connection and free'ing subsequent memory -+ */ -+ void mpd_closeConnection(mpd_Connection * connection); -+ -+/* mpd_clearError -+ * clears error -+ */ -+ void mpd_clearError(mpd_Connection * connection); -+ -+/* STATUS STUFF */ -+ -+/* use these with status.state to determine what state the player is in */ -+#define MPD_STATUS_STATE_UNKNOWN 0 -+#define MPD_STATUS_STATE_STOP 1 -+#define MPD_STATUS_STATE_PLAY 2 -+#define MPD_STATUS_STATE_PAUSE 3 -+ -+/* us this with status.volume to determine if mpd has volume support */ -+#define MPD_STATUS_NO_VOLUME -1 -+ -+/* mpd_Status -+ * holds info return from status command -+ */ -+ typedef struct mpd_Status { -+ /* 0-100, or MPD_STATUS_NO_VOLUME when there is no volume support */ -+ int volume; -+ /* 1 if repeat is on, 0 otherwise */ -+ int repeat; -+ /* 1 if random is on, 0 otherwise */ -+ int random; -+ /* playlist length */ -+ int playlistLength; -+ /* playlist, use this to determine when the playlist has changed */ -+ long long playlist; -+ /* use with MPD_STATUS_STATE_* to determine state of player */ -+ int state; -+ /* crossfade setting in seconds */ -+ int crossfade; -+ /* if a song is currently selected (always the case when state is -+ * PLAY or PAUSE), this is the position of the currently -+ * playing song in the playlist, beginning with 0 -+ */ -+ int song; -+ /* Song ID of the currently selected song */ -+ int songid; -+ /* time in seconds that have elapsed in the currently playing/paused -+ * song -+ */ -+ int elapsedTime; -+ /* length in seconds of the currently playing/paused song */ -+ int totalTime; -+ /* current bit rate in kbs */ -+ int bitRate; -+ /* audio sample rate */ -+ unsigned int sampleRate; -+ /* audio bits */ -+ int bits; -+ /* audio channels */ -+ int channels; -+ /* 1 if mpd is updating, 0 otherwise */ -+ int updatingDb; -+ /* error */ -+ char *error; -+ } mpd_Status; -+ -+ void mpd_sendStatusCommand(mpd_Connection * connection); -+ -+/* mpd_getStatus -+ * returns status info, be sure to free it with mpd_freeStatus() -+ * call this after mpd_sendStatusCommand() -+ */ -+ mpd_Status *mpd_getStatus(mpd_Connection * connection); -+ -+/* mpd_freeStatus -+ * free's status info malloc'd and returned by mpd_getStatus -+ */ -+ void mpd_freeStatus(mpd_Status * status); -+ -+ typedef struct _mpd_Stats { -+ int numberOfArtists; -+ int numberOfAlbums; -+ int numberOfSongs; -+ unsigned long uptime; -+ unsigned long dbUpdateTime; -+ unsigned long playTime; -+ unsigned long dbPlayTime; -+ } mpd_Stats; -+ -+ typedef struct _mpd_SearchStats { -+ int numberOfSongs; -+ unsigned long playTime; -+ } mpd_SearchStats; -+ -+ void mpd_sendStatsCommand(mpd_Connection * connection); -+ -+ mpd_Stats *mpd_getStats(mpd_Connection * connection); -+ -+ void mpd_freeStats(mpd_Stats * stats); -+ -+ mpd_SearchStats *mpd_getSearchStats(mpd_Connection * connection); -+ -+ void mpd_freeSearchStats(mpd_SearchStats * stats); -+ -+/* SONG STUFF */ -+ -+#define MPD_SONG_NO_TIME -1 -+#define MPD_SONG_NO_NUM -1 -+#define MPD_SONG_NO_ID -1 -+ -+/* mpd_Song -+ * for storing song info returned by mpd -+ */ -+ typedef struct _mpd_Song { -+ /* filename of song */ -+ char *file; -+ /* artist, maybe NULL if there is no tag */ -+ char *artist; -+ /* title, maybe NULL if there is no tag */ -+ char *title; -+ /* album, maybe NULL if there is no tag */ -+ char *album; -+ /* track, maybe NULL if there is no tag */ -+ char *track; -+ /* name, maybe NULL if there is no tag; it's the name of the current -+ * song, f.e. the icyName of the stream */ -+ char *name; -+ /* date */ -+ char *date; -+ -+ /* added by qball */ -+ /* Genre */ -+ char *genre; -+ /* Composer */ -+ char *composer; -+ /* Performer */ -+ char *performer; -+ /* Disc */ -+ char *disc; -+ /* Comment */ -+ char *comment; -+ -+ /* length of song in seconds, check that it is not MPD_SONG_NO_TIME */ -+ int time; -+ /* if plchanges/playlistinfo/playlistid used, is the position of the -+ * song in the playlist */ -+ int pos; -+ /* song id for a song in the playlist */ -+ int id; -+ } mpd_Song; -+ -+/* mpd_newSong -+ * use to allocate memory for a new mpd_Song -+ * file, artist, etc all initialized to NULL -+ * if your going to assign values to file, artist, etc -+ * be sure to malloc or strdup the memory -+ * use mpd_freeSong to free the memory for the mpd_Song, it will also -+ * free memory for file, artist, etc, so don't do it yourself -+ */ -+ mpd_Song *mpd_newSong(void); -+ -+/* mpd_freeSong -+ * use to free memory allocated by mpd_newSong -+ * also it will free memory pointed to by file, artist, etc, so be careful -+ */ -+ void mpd_freeSong(mpd_Song * song); -+ -+/* mpd_songDup -+ * works like strDup, but for a mpd_Song -+ */ -+ mpd_Song *mpd_songDup(mpd_Song * song); -+ -+/* DIRECTORY STUFF */ -+ -+/* mpd_Directory -+ * used to store info fro directory (right now that just the path) -+ */ -+ typedef struct _mpd_Directory { -+ char *path; -+ } mpd_Directory; -+ -+/* mpd_newDirectory -+ * allocates memory for a new directory -+ * use mpd_freeDirectory to free this memory -+ */ -+ mpd_Directory *mpd_newDirectory(void); -+ -+/* mpd_freeDirectory -+ * used to free memory allocated with mpd_newDirectory, and it frees -+ * path of mpd_Directory, so be careful -+ */ -+ void mpd_freeDirectory(mpd_Directory * directory); -+ -+/* mpd_directoryDup -+ * works like strdup, but for mpd_Directory -+ */ -+ mpd_Directory *mpd_directoryDup(mpd_Directory * directory); -+ -+/* PLAYLISTFILE STUFF */ -+ -+/* mpd_PlaylistFile -+ * stores info about playlist file returned by lsinfo -+ */ -+ typedef struct _mpd_PlaylistFile { -+ char *path; -+ } mpd_PlaylistFile; -+ -+/* mpd_newPlaylistFile -+ * allocates memory for new mpd_PlaylistFile, path is set to NULL -+ * free this memory with mpd_freePlaylistFile -+ */ -+ mpd_PlaylistFile *mpd_newPlaylistFile(void); -+ -+/* mpd_freePlaylist -+ * free memory allocated for freePlaylistFile, will also free -+ * path, so be careful -+ */ -+ void mpd_freePlaylistFile(mpd_PlaylistFile * playlist); -+ -+/* mpd_playlistFileDup -+ * works like strdup, but for mpd_PlaylistFile -+ */ -+ mpd_PlaylistFile *mpd_playlistFileDup(mpd_PlaylistFile * playlist); -+ -+/* INFO ENTITY STUFF */ -+ -+/* the type of entity returned from one of the commands that generates info -+ * use in conjunction with mpd_InfoEntity.type -+ */ -+#define MPD_INFO_ENTITY_TYPE_DIRECTORY 0 -+#define MPD_INFO_ENTITY_TYPE_SONG 1 -+#define MPD_INFO_ENTITY_TYPE_PLAYLISTFILE 2 -+ -+/* mpd_InfoEntity -+ * stores info on stuff returned info commands -+ */ -+ typedef struct mpd_InfoEntity { -+ /* the type of entity, use with MPD_INFO_ENTITY_TYPE_* to determine -+ * what this entity is (song, directory, etc...) -+ */ -+ int type; -+ /* the actual data you want, mpd_Song, mpd_Directory, etc */ -+ union { -+ mpd_Directory *directory; -+ mpd_Song *song; -+ mpd_PlaylistFile *playlistFile; -+ } info; -+ } mpd_InfoEntity; -+ -+ mpd_InfoEntity *mpd_newInfoEntity(void); -+ -+ void mpd_freeInfoEntity(mpd_InfoEntity * entity); -+ -+/* INFO COMMANDS AND STUFF */ -+ -+/* use this function to loop over after calling Info/Listall functions */ -+ mpd_InfoEntity *mpd_getNextInfoEntity(mpd_Connection * connection); -+ -+/* fetches the currently seeletect song (the song referenced by status->song -+ * and status->songid*/ -+ void mpd_sendCurrentSongCommand(mpd_Connection * connection); -+ -+/* songNum of -1, means to display the whole list */ -+ void mpd_sendPlaylistInfoCommand(mpd_Connection * connection, int songNum); -+ -+/* songId of -1, means to display the whole list */ -+ void mpd_sendPlaylistIdCommand(mpd_Connection * connection, int songId); -+ -+/* use this to get the changes in the playlist since version _playlist_ */ -+ void mpd_sendPlChangesCommand(mpd_Connection * connection, long long playlist); -+ -+/** -+ * @param connection: A valid and connected mpd_Connection. -+ * @param playlist: The playlist version you want the diff with. -+ * A more bandwidth efficient version of the mpd_sendPlChangesCommand. -+ * It only returns the pos+id of the changes song. -+ */ -+ void mpd_sendPlChangesPosIdCommand(mpd_Connection * connection, long long playlist); -+ -+/* recursivel fetches all songs/dir/playlists in "dir* (no metadata is -+ * returned) */ -+ void mpd_sendListallCommand(mpd_Connection * connection, const char *dir); -+ -+/* same as sendListallCommand, but also metadata is returned */ -+ void mpd_sendListallInfoCommand(mpd_Connection * connection, const char *dir); -+ -+/* non-recursive version of ListallInfo */ -+ void mpd_sendLsInfoCommand(mpd_Connection * connection, const char *dir); -+ -+#define MPD_TABLE_ARTIST MPD_TAG_ITEM_ARTIST -+#define MPD_TABLE_ALBUM MPD_TAG_ITEM_ALBUM -+#define MPD_TABLE_TITLE MPD_TAG_ITEM_TITLE -+#define MPD_TABLE_FILENAME MPD_TAG_ITEM_FILENAME -+ -+ void mpd_sendSearchCommand(mpd_Connection * connection, int table, const char *str); -+ -+ void mpd_sendFindCommand(mpd_Connection * connection, int table, const char *str); -+ -+/* LIST TAG COMMANDS */ -+ -+/* use this function fetch next artist entry, be sure to free the returned -+ * string. NULL means there are no more. Best used with sendListArtists -+ */ -+ char *mpd_getNextArtist(mpd_Connection * connection); -+ -+ char *mpd_getNextAlbum(mpd_Connection * connection); -+ -+ char *mpd_getNextTag(mpd_Connection * connection, int type); -+ -+/* list artist or albums by artist, arg1 should be set to the artist if -+ * listing albums by a artist, otherwise NULL for listing all artists or albums -+ */ -+ void mpd_sendListCommand(mpd_Connection * connection, int table, const char *arg1); -+ -+/* SIMPLE COMMANDS */ -+ -+ void mpd_sendAddCommand(mpd_Connection * connection, const char *file); -+ -+ int mpd_sendAddIdCommand(mpd_Connection * connection, const char *file); -+ -+ void mpd_sendDeleteCommand(mpd_Connection * connection, int songNum); -+ -+ void mpd_sendDeleteIdCommand(mpd_Connection * connection, int songNum); -+ -+ void mpd_sendSaveCommand(mpd_Connection * connection, const char *name); -+ -+ void mpd_sendLoadCommand(mpd_Connection * connection, const char *name); -+ -+ void mpd_sendRmCommand(mpd_Connection * connection, const char *name); -+ -+ void mpd_sendRenameCommand(mpd_Connection * connection, const char *from, const char *to); -+ -+ void mpd_sendShuffleCommand(mpd_Connection * connection); -+ -+ void mpd_sendClearCommand(mpd_Connection * connection); -+ -+/* use this to start playing at the beginning, useful when in random mode */ -+#define MPD_PLAY_AT_BEGINNING -1 -+ -+ void mpd_sendPlayCommand(mpd_Connection * connection, int songNum); -+ -+ void mpd_sendPlayIdCommand(mpd_Connection * connection, int songNum); -+ -+ void mpd_sendStopCommand(mpd_Connection * connection); -+ -+ void mpd_sendPauseCommand(mpd_Connection * connection, int pauseMode); -+ -+ void mpd_sendNextCommand(mpd_Connection * connection); -+ -+ void mpd_sendPrevCommand(mpd_Connection * connection); -+ -+ void mpd_sendMoveCommand(mpd_Connection * connection, int from, int to); -+ -+ void mpd_sendMoveIdCommand(mpd_Connection * connection, int from, int to); -+ -+ void mpd_sendSwapCommand(mpd_Connection * connection, int song1, int song2); -+ -+ void mpd_sendSwapIdCommand(mpd_Connection * connection, int song1, int song2); -+ -+ void mpd_sendSeekCommand(mpd_Connection * connection, int song, int time); -+ -+ void mpd_sendSeekIdCommand(mpd_Connection * connection, int song, int time); -+ -+ void mpd_sendRepeatCommand(mpd_Connection * connection, int repeatMode); -+ -+ void mpd_sendRandomCommand(mpd_Connection * connection, int randomMode); -+ -+ void mpd_sendSetvolCommand(mpd_Connection * connection, int volumeChange); -+ -+/* WARNING: don't use volume command, its depreacted */ -+ void mpd_sendVolumeCommand(mpd_Connection * connection, int volumeChange); -+ -+ void mpd_sendCrossfadeCommand(mpd_Connection * connection, int seconds); -+ -+ void mpd_sendUpdateCommand(mpd_Connection * connection, char *path); -+ -+/* returns the update job id, call this after a update command*/ -+ int mpd_getUpdateId(mpd_Connection * connection); -+ -+ void mpd_sendPasswordCommand(mpd_Connection * connection, const char *pass); -+ -+/* after executing a command, when your done with it to get its status -+ * (you want to check connection->error for an error) -+ */ -+ void mpd_finishCommand(mpd_Connection * connection); -+ -+/* command list stuff, use this to do things like add files very quickly */ -+ void mpd_sendCommandListBegin(mpd_Connection * connection); -+ -+ void mpd_sendCommandListOkBegin(mpd_Connection * connection); -+ -+ void mpd_sendCommandListEnd(mpd_Connection * connection); -+ -+/* advance to the next listOk -+ * returns 0 if advanced to the next list_OK, -+ * returns -1 if it advanced to an OK or ACK */ -+ int mpd_nextListOkCommand(mpd_Connection * connection); -+ -+ typedef struct _mpd_OutputEntity { -+ int id; -+ char *name; -+ int enabled; -+ } mpd_OutputEntity; -+ -+ void mpd_sendOutputsCommand(mpd_Connection * connection); -+ -+ mpd_OutputEntity *mpd_getNextOutput(mpd_Connection * connection); -+ -+ void mpd_sendEnableOutputCommand(mpd_Connection * connection, int outputId); -+ -+ void mpd_sendDisableOutputCommand(mpd_Connection * connection, int outputId); -+ -+ void mpd_freeOutputElement(mpd_OutputEntity * output); -+ -+/** -+ * @param connection a #mpd_Connection -+ * -+ * Queries mpd for the allowed commands -+ */ -+ void mpd_sendCommandsCommand(mpd_Connection * connection); -+ -+/** -+ * @param connection a #mpd_Connection -+ * -+ * Queries mpd for the not allowed commands -+ */ -+ void mpd_sendNotCommandsCommand(mpd_Connection * connection); -+ -+/** -+ * @param connection a #mpd_Connection -+ * -+ * returns the next supported command. -+ * -+ * @returns a string, needs to be free'ed -+ */ -+ char *mpd_getNextCommand(mpd_Connection * connection); -+ -+ void mpd_sendUrlHandlersCommand(mpd_Connection * connection); -+ -+ char *mpd_getNextHandler(mpd_Connection * connection); -+ -+ void mpd_sendTagTypesCommand(mpd_Connection * connection); -+ -+ char *mpd_getNextTagType(mpd_Connection * connection); -+ -+/** -+ * @param connection a MpdConnection -+ * @param path the path to the playlist. -+ * -+ * List the content, with full metadata, of a stored playlist. -+ * -+ */ -+ void mpd_sendListPlaylistInfoCommand(mpd_Connection * connection, char *path); -+ -+/** -+ * @param connection a MpdConnection -+ * @param path the path to the playlist. -+ * -+ * List the content of a stored playlist. -+ * -+ */ -+ void mpd_sendListPlaylistCommand(mpd_Connection * connection, char *path); -+ -+/** -+ * @param connection a #mpd_Connection -+ * @param exact if to match exact -+ * -+ * starts a search, use mpd_addConstraintSearch to add -+ * a constraint to the search, and mpd_commitSearch to do the actual search -+ */ -+ void mpd_startSearch(mpd_Connection * connection, int exact); -+ -+/** -+ * @param connection a #mpd_Connection -+ * @param type -+ * @param name -+ */ -+ void mpd_addConstraintSearch(mpd_Connection * connection, int type, const char *name); -+ -+/** -+ * @param connection a #mpd_Connection -+ */ -+ void mpd_commitSearch(mpd_Connection * connection); -+ -+/** -+ * @param connection a #mpd_Connection -+ * @param type The type to search for -+ * -+ * starts a search for fields... f.e. get a list of artists would be: -+ * @code -+ * mpd_startFieldSearch(connection, MPD_TAG_ITEM_ARTIST); -+ * mpd_commitSearch(connection); -+ * @endcode -+ * -+ * or get a list of artist in genre "jazz" would be: -+ * @code -+ * mpd_startFieldSearch(connection, MPD_TAG_ITEM_ARTIST); -+ * mpd_addConstraintSearch(connection, MPD_TAG_ITEM_GENRE, "jazz") -+ * mpd_commitSearch(connection); -+ * @endcode -+ * -+ * mpd_startSearch will return a list of songs (and you need mpd_getNextInfoEntity) -+ * this one will return a list of only one field (the one specified with type) and you need -+ * mpd_getNextTag to get the results -+ */ -+ void mpd_startFieldSearch(mpd_Connection * connection, int type); -+ -+ void mpd_startPlaylistSearch(mpd_Connection * connection, int exact); -+ -+ void mpd_startStatsSearch(mpd_Connection * connection); -+ -+ void mpd_sendPlaylistClearCommand(mpd_Connection * connection, char *path); -+ -+ void mpd_sendPlaylistAddCommand(mpd_Connection * connection, char *playlist, char *path); -+ -+ void mpd_sendPlaylistMoveCommand(mpd_Connection * connection, char *playlist, int from, int to); -+ -+ void mpd_sendPlaylistDeleteCommand(mpd_Connection * connection, char *playlist, int pos); -+#ifdef __cplusplus -+} -+#endif -+#endif diff --git a/utils/lcd4linux/patches/160-uinput_defs.patch b/utils/lcd4linux/patches/160-uinput_defs.patch deleted file mode 100644 index 44b24b3..0000000 --- a/utils/lcd4linux/patches/160-uinput_defs.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/drv_G15.c -+++ b/drv_G15.c -@@ -42,6 +42,7 @@ - - #include - #include -+#include - #include - #include - -@@ -269,8 +270,13 @@ void drv_G15_initKeyHandling(char *devic - } - memset(&device, 0, sizeof(device)); - strncpy(device.name, "G15 Keys", UINPUT_MAX_NAME_SIZE); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - device.id.bustype = BUS_USB; - device.id.version = 4; -+#else -+ device.idbus = BUS_USB; -+ device.idversion = 4; -+#endif - - ioctl(uinput_fd, UI_SET_EVBIT, EV_KEY); - diff --git a/utils/lcd4linux/patches/170-add-generic-spidev-driver.patch b/utils/lcd4linux/patches/170-add-generic-spidev-driver.patch deleted file mode 100644 index 4cd53d6..0000000 --- a/utils/lcd4linux/patches/170-add-generic-spidev-driver.patch +++ /dev/null @@ -1,195 +0,0 @@ ---- a/Makefile.am -+++ b/Makefile.am -@@ -71,6 +71,8 @@ drv_generic_i2c.c \ - drv_generic_i2c.h \ - drv_generic_keypad.c \ - drv_generic_keypad.h \ -+drv_generic_spidev.c \ -+drv_generic_spidev.h \ - drv_ASTUSB.c \ - drv_BeckmannEgle.c \ - drv_BWCT.c \ ---- /dev/null -+++ b/drv_generic_spidev.c -@@ -0,0 +1,89 @@ -+/* $Id$ -+ * $URL$ -+ * -+ * generic driver helper for displays connected via SPI bus -+ * -+ * Copyright (C) 2012 Gabor Juhos -+ * -+ * This file is part of LCD4Linux. -+ * -+ * LCD4Linux 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, or (at your option) -+ * any later version. -+ * -+ * LCD4Linux 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+#include "config.h" -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "debug.h" -+#include "qprintf.h" -+#include "cfg.h" -+#include "drv_generic_spidev.h" -+ -+static char *generic_spidev_section = ""; -+static char *generic_spidev_driver = ""; -+static int generic_spidev_fd; -+ -+int drv_generic_spidev_open(const char *section, const char *driver) -+{ -+ char *spidev; -+ -+ udelay_init(); -+ -+ generic_spidev_section = (char *) section; -+ generic_spidev_driver = (char *) driver; -+ -+ spidev = cfg_get(generic_spidev_section, "Port", NULL); -+ -+ info("%s: initializing SPI device %s", generic_spidev_driver, spidev); -+ generic_spidev_fd = open(spidev, O_WRONLY); -+ if (generic_spidev_fd < 0) { -+ error("%s: unable to open SPI device %s!\n", generic_spidev_driver, spidev); -+ goto exit_error; -+ } -+ -+ return 0; -+ -+ exit_error: -+ free(spidev); -+ return -1; -+} -+ -+int drv_generic_spidev_close(void) -+{ -+ close(generic_spidev_fd); -+ return 0; -+} -+ -+int drv_generic_spidev_transfer(const int count, struct spi_ioc_transfer *tr) -+{ -+ int ret; -+ -+ ret = ioctl(generic_spidev_fd, SPI_IOC_MESSAGE(count), tr); -+ if (ret < count) { -+ error("%s: can't send SPI message! (%s)\n", -+ generic_spidev_driver, strerror(errno)); -+ return -1; -+ } -+ -+ return 0; -+} ---- /dev/null -+++ b/drv_generic_spidev.h -@@ -0,0 +1,54 @@ -+/* $Id$ -+ * $URL$ -+ * -+ * generic driver helper for displays connected via SPI bus -+ * -+ * Copyright (C) 2012 Gabor Juhos -+ * Copyright (C) 2012 The LCD4Linux Team -+ * -+ * This file is part of LCD4Linux. -+ * -+ * LCD4Linux 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, or (at your option) -+ * any later version. -+ * -+ * LCD4Linux 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+/* -+ * -+ * exported fuctions: -+ * -+ * int drv_generic_spidev_open (const char *section, const char *driver) -+ * reads 'Port' entry from config and opens -+ * the SPI device -+ * returns 0 if ok, -1 on failure -+ * -+ * int drv_generic_spidev_close (void) -+ * closes SPI device -+ * returns 0 if ok, -1 on failure -+ * -+ * void drv_generic_spidev_transfer (int count, struct spi_ioc_transfer *tr) -+ * transfer data to/from the SPI device -+ * -+ */ -+ -+#ifndef _DRV_GENERIC_SPIDEV_H_ -+#define _DRV_GENERIC_SPIDEV_H_ -+ -+#include -+ -+int drv_generic_spidev_open(const char *section, const char *driver); -+int drv_generic_spidev_close(void); -+int drv_generic_spidev_transfer(const int count, struct spi_ioc_transfer *tr); -+ -+#endif /* _DRV_GENERIC_SPIDEV_H_ */ ---- a/drivers.m4 -+++ b/drivers.m4 -@@ -301,6 +301,7 @@ PARPORT="no" - SERIAL="no" - I2C="no" - KEYPAD="no" -+SPIDEV="no" - - # generic libraries - LIBUSB="no" -@@ -936,6 +937,12 @@ if test "$LIBJPEG" = "yes"; then - DRVLIBS="$DRVLIBS -ljpeg" - fi - -+# generic spidev driver -+if test "$SPIDEV" = "yes"; then -+ DRIVERS="$DRIVERS drv_generic_spidev.o" -+ AC_DEFINE(WITH_SPIDEV, 1, [SPIDEV driver]) -+fi -+ - # libusb - if test "$LIBUSB" = "yes"; then - DRVLIBS="$DRVLIBS -lusb" ---- a/configure.ac -+++ b/configure.ac -@@ -115,6 +115,9 @@ AC_ARG_WITH(outb, - - AC_CHECK_HEADERS([asm/io.h] [linux/parport.h linux/ppdev.h], [has_parport="true"], [has_parport="false"]) - -+# check for spidev -+AC_CHECK_HEADERS([linux/spi/spidev.h], [has_spidev="true"], [has_spidev="false"]) -+ - # drivers - sinclude(drivers.m4) - diff --git a/utils/lcd4linux/patches/171-allow-to-specify-drv_generic_graphic_real_clear.patch b/utils/lcd4linux/patches/171-allow-to-specify-drv_generic_graphic_real_clear.patch deleted file mode 100644 index 5a26643..0000000 --- a/utils/lcd4linux/patches/171-allow-to-specify-drv_generic_graphic_real_clear.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- a/drv_generic_graphic.c -+++ b/drv_generic_graphic.c -@@ -24,7 +24,7 @@ - * - */ - --/* -+/* - * - * exported functions: - * -@@ -98,6 +98,9 @@ static int INVERTED = 0; - /* must be implemented by the real driver */ - void (*drv_generic_graphic_real_blit) () = NULL; - -+/* can be implemented by the real driver */ -+void (*drv_generic_graphic_real_clear) () = NULL; -+ - - /****************************************/ - /*** generic Framebuffer stuff ***/ -@@ -691,7 +694,10 @@ int drv_generic_graphic_clear(void) - for (i = 0; i < LCOLS * LROWS; i++) - drv_generic_graphic_FB[l][i] = NO_COL; - -- drv_generic_graphic_blit(0, 0, LROWS, LCOLS); -+ if (drv_generic_graphic_real_clear) -+ drv_generic_graphic_real_clear(NO_COL); -+ else -+ drv_generic_graphic_blit(0, 0, LROWS, LCOLS); - - return 0; - } ---- a/drv_generic_graphic.h -+++ b/drv_generic_graphic.h -@@ -40,6 +40,9 @@ extern RGBA NO_COL; /* no color (comple - /* these functions must be implemented by the real driver */ - extern void (*drv_generic_graphic_real_blit) (const int row, const int col, const int height, const int width); - -+/* these functions can be implemented by the real driver */ -+void (*drv_generic_graphic_real_clear) (const RGBA rgba); -+ - /* helper function to get pixel color or gray value */ - extern RGBA drv_generic_graphic_rgb(const int row, const int col); - extern unsigned char drv_generic_graphic_gray(const int row, const int col); diff --git a/utils/lcd4linux/patches/172-add-TEW673GRU-driver.patch b/utils/lcd4linux/patches/172-add-TEW673GRU-driver.patch deleted file mode 100644 index 428465c..0000000 --- a/utils/lcd4linux/patches/172-add-TEW673GRU-driver.patch +++ /dev/null @@ -1,552 +0,0 @@ ---- a/drivers.m4 -+++ b/drivers.m4 -@@ -39,7 +39,7 @@ AC_ARG_WITH( - [ Newhaven, Noritake, NULL, Pertelian, PHAnderson,] - [ PICGraphic, picoLCD, picoLCDGraphic, PNG, PPM, RouterBoard,] - [ Sample, SamsungSPF, serdisplib, ShuttleVFD, SimpleLCD, st2205, T6963,] -- [ TeakLCM, Trefon, ULA200, USBHUB, USBLCD, VNC, WincorNixdorf, X11], -+ [ TeakLCM, TEW673GRU, Trefon, ULA200, USBHUB, USBLCD, VNC, WincorNixdorf, X11], - drivers=$withval, - drivers=all - ) -@@ -107,6 +107,7 @@ for driver in $drivers; do - SHUTTLEVFD="yes" - SIMPLELCD="yes" - T6963="yes" -+ TEW673GRU="yes" - TeakLCM="yes" - Trefon="yes" - ULA200="yes" -@@ -260,6 +261,9 @@ for driver in $drivers; do - TeakLCM) - TeakLCM=$val - ;; -+ TEW673GRU) -+ TEW673GRU=$val -+ ;; - Trefon) - Trefon=$val - ;; -@@ -797,6 +801,18 @@ if test "$TeakLCM" = "yes"; then - AC_DEFINE(WITH_TEAK_LCM,1,[TeakLCM driver]) - fi - -+if test "$TEW673GRU" = "yes"; then -+ if test "$has_spidev" = "true"; then -+ GRAPHIC="yes" -+ TEXT="yes" -+ SPIDEV="yes" -+ DRIVERS="$DRIVERS drv_TEW673GRU.o" -+ AC_DEFINE(WITH_TEW673GRU,1,[TEW673GRU driver]) -+ else -+ AC_MSG_WARN(linux/spi/spidev.h not found: TEW673GRU driver disabled) -+ fi -+fi -+ - if test "$Trefon" = "yes"; then - if test "$has_usb" = "true"; then - TEXT="yes" ---- a/drv.c -+++ b/drv.c -@@ -92,6 +92,7 @@ extern DRIVER drv_serdisplib; - extern DRIVER drv_ShuttleVFD; - extern DRIVER drv_SimpleLCD; - extern DRIVER drv_T6963; -+extern DRIVER drv_TEW673GRU; - extern DRIVER drv_TeakLCM; - extern DRIVER drv_Trefon; - extern DRIVER drv_ula200; -@@ -248,6 +249,9 @@ DRIVER *Driver[] = { - #ifdef WITH_TEAK_LCM - &drv_TeakLCM, - #endif -+#ifdef WITH_TEW673GRU -+ &drv_TEW673GRU, -+#endif - #ifdef WITH_TREFON - &drv_Trefon, - #endif ---- a/Makefile.am -+++ b/Makefile.am -@@ -119,6 +119,7 @@ drv_ShuttleVFD.c \ - drv_SimpleLCD.c \ - drv_T6963.c \ - drv_TeakLCM.c \ -+drv_TEW673GRU.c \ - drv_Trefon.c \ - drv_ula200.c \ - drv_USBHUB.c \ ---- /dev/null -+++ b/drv_TEW673GRU.c -@@ -0,0 +1,457 @@ -+/* $Id$ -+ * $URL$ -+ * -+ * TRENDnet TEW673GRU LCD4linux driver -+ * -+ * Copyright (C) 2012 Gabor Juhos -+ * -+ * based on the Sample driver which is: -+ * Copyright (C) 2005 Michael Reinelt -+ * Copyright (C) 2005, 2006, 2007 The LCD4Linux Team -+ * -+ * This file is part of LCD4Linux. -+ * -+ * LCD4Linux 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, or (at your option) -+ * any later version. -+ * -+ * LCD4Linux 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ * -+ */ -+ -+/* -+ * exported fuctions: -+ * -+ * struct DRIVER drv_TEW673GRU -+ */ -+ -+#include "config.h" -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include "debug.h" -+#include "cfg.h" -+#include "qprintf.h" -+#include "udelay.h" -+#include "plugin.h" -+#include "widget.h" -+#include "widget_text.h" -+#include "widget_icon.h" -+#include "widget_bar.h" -+#include "drv.h" -+ -+#include "drv_generic_text.h" -+#include "drv_generic_graphic.h" -+#include "drv_generic_spidev.h" -+ -+#ifdef WITH_DMALLOC -+#include -+#endif -+ -+#define TEW673GRU_NUM_COLS 220 -+#define TEW673GRU_NUM_ROWS 176 -+#define TEW673GRU_BPP 2 /* bytes per pixel */ -+ -+#define TEW673GRU_CMD_SIZE 9 -+#define TEW673GRU_NUM_ROW_BYTES (TEW673GRU_NUM_COLS * TEW673GRU_BPP) -+ -+enum { -+ CMD_SHOW_STRING = 49, -+ CMD_SHOW_IMAGE_DIR = 52, -+ CMD_SCREEN_COLOR = 54, -+}; -+ -+static char Name[] = "TEW673GRU"; -+ -+static char *drv_TEW673GRU_FB; -+static long FB_SIZE; -+static int MODE; -+ -+static unsigned int RGBAto16(RGBA rgb) -+{ -+ return (((rgb.R >> 3) << 11) | ((rgb.G >> 2) << 5) | (rgb.B >> 3)); -+} -+ -+static unsigned char color_msb(unsigned int color) -+{ -+ return color >> 8; -+} -+ -+static unsigned char color_lsb(unsigned int color) -+{ -+ return color & 0xff; -+} -+ -+static void drv_TEW673GRU_hw_clear(const unsigned int color) -+{ -+ unsigned char cmd[TEW673GRU_CMD_SIZE]; -+ struct spi_ioc_transfer tr[1]; -+ -+ memset(tr, '\0', sizeof(tr)); -+ memset(cmd, '\0', sizeof(cmd)); -+ -+ cmd[0] = CMD_SCREEN_COLOR; -+ cmd[7] = color_msb(color); -+ cmd[8] = color_lsb(color); -+ -+ tr[0].tx_buf = (unsigned long) cmd; -+ tr[0].len = sizeof(cmd); -+ -+ drv_generic_spidev_transfer(1, tr); -+} -+ -+static void drv_TEW673GRU_hw_send_row(const int row, const int col, const char *data, const int width) -+{ -+ unsigned char cmd[TEW673GRU_CMD_SIZE]; -+ struct spi_ioc_transfer tr[2]; -+ int datasize; -+ -+ memset(tr, '\0', sizeof(tr)); -+ memset(cmd, '\0', sizeof(cmd)); -+ -+ datasize = width * TEW673GRU_BPP; -+ -+ cmd[0] = CMD_SHOW_IMAGE_DIR; -+ cmd[1] = col; -+ cmd[2] = col + width; -+ cmd[3] = row; -+ cmd[4] = row; -+ cmd[5] = datasize >> 8; -+ cmd[6] = datasize & 0xff; -+ -+ tr[0].tx_buf = (unsigned long) cmd; -+ tr[0].len = sizeof(cmd); -+ tr[1].tx_buf = (unsigned long) data; -+ tr[1].len = datasize; -+ -+ drv_generic_spidev_transfer(2, tr); -+} -+ -+static void drv_TEW673GRU_hw_write_string(const int row, const int col, const char *data, const int datasize) -+{ -+ unsigned char cmd[TEW673GRU_CMD_SIZE]; -+ struct spi_ioc_transfer tr[2]; -+ unsigned char len; -+ -+ memset(tr, '\0', sizeof(tr)); -+ memset(cmd, '\0', sizeof(cmd)); -+ -+ len = datasize & 0xff; -+ cmd[0] = CMD_SHOW_STRING; -+ cmd[1] = col; -+ cmd[2] = col + (XRES * len); -+ cmd[3] = row; -+ cmd[4] = row + YRES; -+ cmd[7] = 0; -+ cmd[8] = len; -+ -+ tr[0].tx_buf = (unsigned long) cmd; -+ tr[0].len = sizeof(cmd); -+ tr[1].tx_buf = (unsigned long) data; -+ tr[1].len = datasize; -+ -+ drv_generic_spidev_transfer(2, tr); -+} -+ -+static void drv_TEW673GRU_FB_set_pixel(const int col, const unsigned int color) -+{ -+ int pos; -+ -+ pos = col * TEW673GRU_BPP; -+ drv_TEW673GRU_FB[pos] = color_msb(color); -+ drv_TEW673GRU_FB[pos + 1] = color_lsb(color); -+} -+ -+static void drv_TEW673GRU_blit(const int row, const int col, const int height, const int width) -+{ -+ int r, c; -+ -+ debug("%s: update area r:%d c:%d w:%d h:%d", Name, row, col, height, width); -+ -+ for (r = row; r < row + height; r++) { -+ for (c = col; c < col + width; c++) { -+ unsigned int color; -+ RGBA rgb; -+ -+ rgb = drv_generic_graphic_rgb(r, c); -+ color = RGBAto16(rgb); -+ drv_TEW673GRU_FB_set_pixel(c, color); -+ } -+ -+ if (width) { -+ char *data; -+ -+ data = &drv_TEW673GRU_FB[col * TEW673GRU_BPP]; -+ drv_TEW673GRU_hw_send_row(r, col, data, width); -+ udelay(100 + width * 50); -+ } -+ } -+} -+ -+static void drv_TEW673GRU_clear(RGBA rgba) -+{ -+ unsigned int color; -+ -+ color = RGBAto16(rgba); -+ drv_TEW673GRU_hw_clear(color); -+} -+ -+static void drv_TEW673GRU_write(const int row, const int col, const char *data, const int len) -+{ -+ int i; -+ -+ for (i = 0; i < len; i++) { -+ drv_TEW673GRU_hw_write_string(row * YRES, (col + i) * XRES, " ", 1); -+ udelay(10000); -+ drv_TEW673GRU_hw_write_string(row * YRES, 2 + (col + i) * XRES, " ", 1); -+ udelay(10000); -+ drv_TEW673GRU_hw_write_string(row * YRES, (col + i) * XRES, &data[i], 1); -+ udelay(10000); -+ } -+} -+ -+static int drv_TEW673GRU_open(const char *section) -+{ -+ int err; -+ -+ err = drv_generic_spidev_open(section, Name); -+ if (err < 0) -+ return err; -+ -+ return 0; -+} -+ -+static int drv_TEW673GRU_close(void) -+{ -+ drv_generic_spidev_close(); -+ return 0; -+} -+ -+static void drv_TEW673GRU_clear_screen(void) -+{ -+ if (MODE) { -+ drv_generic_graphic_clear(); -+ } else { -+ memset(drv_TEW673GRU_FB, ' ', FB_SIZE); -+ drv_TEW673GRU_hw_clear(0x0000); -+ } -+} -+ -+static int drv_TEW673GRU_init_font(const char *section) -+{ -+ char *font; -+ int ret = -1; -+ -+ font = cfg_get(section, "Font", "6x8"); -+ if (font == NULL) { -+ error("%s: no '%s.Font' entry from %s", Name, section, cfg_source()); -+ goto out; -+ } -+ -+ if (*font == '\0') { -+ error("%s: invalid '%s.Font' entry in %s", Name, section, cfg_source()); -+ goto out_free; -+ } -+ -+ XRES = -1; -+ YRES = -1; -+ if (sscanf(font, "%dx%d", &XRES, &YRES) != 2 || -+ XRES < 1 || -+ YRES < 1) { -+ error("%s: bad Font '%s' from %s", Name, font, cfg_source()); -+ goto out_free; -+ } -+ -+ if (XRES != 6 && YRES != 8) { -+ error("%s: bad Font '%s' from %s (only 6x8 at the moment)", -+ Name, font, cfg_source()); -+ goto out_free; -+ } -+ -+ error("%s: font '%s' selected", Name, font); -+ -+ ret = 0; -+ -+out_free: -+ free(font); -+out: -+ return ret; -+} -+ -+static int drv_TEW673GRU_start(const char *section) -+{ -+ int ret; -+ -+ DCOLS = TEW673GRU_NUM_COLS; -+ DROWS = TEW673GRU_NUM_ROWS; -+ -+ if (MODE) { -+ ret = drv_TEW673GRU_init_font(section); -+ if (ret) -+ goto err; -+ -+ FB_SIZE = DCOLS * TEW673GRU_BPP; -+ } else { -+ XRES = 10; -+ YRES = 16; -+ DCOLS = DCOLS / XRES; -+ DROWS = DROWS / YRES; -+ -+ FB_SIZE = DCOLS * DROWS; -+ } -+ -+ if (FB_SIZE) { -+ drv_TEW673GRU_FB = malloc(FB_SIZE); -+ if (drv_TEW673GRU_FB == NULL) { -+ error("%s: framebuffer could not be allocated", Name); -+ goto err; -+ } -+ } -+ -+ ret = drv_TEW673GRU_open(section); -+ if (ret < 0) -+ goto err_free; -+ -+ if (MODE == 0) -+ drv_TEW673GRU_clear_screen(); -+ -+ return 0; -+ -+ err_free: -+ if (drv_TEW673GRU_FB) -+ free(drv_TEW673GRU_FB); -+ err: -+ return -1; -+} -+ -+static int drv_TEW673GRU_greet(const char *msg1, const char *msg2) -+{ -+ if (MODE) -+ return drv_generic_graphic_greet(msg1, msg2); -+ -+ return drv_generic_text_greet(msg1, msg2); -+} -+ -+ -+/****************************************/ -+/*** widget callbacks ***/ -+/****************************************/ -+ -+ -+/* using drv_generic_text_draw(W) */ -+/* using drv_generic_text_icon_draw(W) */ -+/* using drv_generic_text_bar_draw(W) */ -+/* using drv_generic_gpio_draw(W) */ -+ -+ -+/****************************************/ -+/*** exported functions ***/ -+/****************************************/ -+ -+int drv_TEW673GRU_list(void) -+{ -+ printf("TEW673GRU driver"); -+ return 0; -+} -+ -+int drv_TEW673GRU_init(const char *section, const int quiet) -+{ -+ WIDGET_CLASS wc; -+ int ret; -+ -+ cfg_number(section, "Mode", 0, 0, 1, &MODE); -+ -+ if (MODE) { -+ drv_generic_graphic_real_blit = drv_TEW673GRU_blit; -+ drv_generic_graphic_real_clear = drv_TEW673GRU_clear; -+ } else { -+ drv_generic_text_real_write = drv_TEW673GRU_write; -+ } -+ -+ ret = drv_TEW673GRU_start(section); -+ if (ret) -+ return ret; -+ -+ if (MODE) { -+ ret = drv_generic_graphic_init(section, Name); -+ if (ret) -+ return ret; -+ } else { -+ ret = drv_generic_text_init(section, Name); -+ if (ret) -+ return ret; -+ -+ ret = drv_generic_text_icon_init(); -+ if (ret != 0) -+ return ret; -+ -+ ret = drv_generic_text_bar_init(1); -+ if (ret != 0) -+ return ret; -+ -+ drv_generic_text_bar_add_segment(0, 0, 255, ' '); -+ drv_generic_text_bar_add_segment(255, 255, 255, '#'); -+ -+ wc = Widget_Text; -+ wc.draw = drv_generic_text_draw; -+ widget_register(&wc); -+ -+ wc = Widget_Icon; -+ wc.draw = drv_generic_text_icon_draw; -+ widget_register(&wc); -+ -+ wc = Widget_Bar; -+ wc.draw = drv_generic_text_bar_draw; -+ widget_register(&wc); -+ } -+ -+ if (!quiet) { -+ char buffer[40]; -+ qprintf(buffer, sizeof(buffer), "%s %dx%d", Name, DCOLS, DROWS); -+ drv_TEW673GRU_greet(buffer, "www.openwrt.org"); -+ sleep(3); -+ drv_TEW673GRU_clear_screen(); -+ } -+ -+ return 0; -+} -+ -+int drv_TEW673GRU_quit(const int quiet) -+{ -+ -+ info("%s: shutting down.", Name); -+ -+ drv_TEW673GRU_clear_screen(); -+ -+ if (!quiet) -+ drv_TEW673GRU_greet("goodbye!", NULL); -+ -+ if (MODE) -+ drv_generic_graphic_quit(); -+ else -+ drv_generic_text_quit(); -+ -+ debug("closing connection"); -+ drv_TEW673GRU_close(); -+ -+ return (0); -+} -+ -+DRIVER drv_TEW673GRU = { -+ .name = Name, -+ .list = drv_TEW673GRU_list, -+ .init = drv_TEW673GRU_init, -+ .quit = drv_TEW673GRU_quit, -+}; ---- a/lcd4linux.conf.sample -+++ b/lcd4linux.conf.sample -@@ -581,6 +581,11 @@ Display FutabaVFD { - } - } - -+Display TEW673GRU { -+ Driver 'TEW673GRU' -+ Font '6x8' -+ Port '/dev/spidev1.0' -+} - - #Plugin KVV { - # StationID '12_701' diff --git a/utils/lcd4linux/patches/173-glcd2usb-bigendian-fix.patch b/utils/lcd4linux/patches/173-glcd2usb-bigendian-fix.patch deleted file mode 100644 index 97e03c7..0000000 --- a/utils/lcd4linux/patches/173-glcd2usb-bigendian-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/drv_GLCD2USB.c -+++ b/drv_GLCD2USB.c -@@ -48,6 +48,7 @@ - #include - #include - #include -+#include - - #include "debug.h" - #include "cfg.h" -@@ -487,6 +488,9 @@ static int drv_GLCD2USB_start(const char - return -1; - } - -+ buffer.display_info.width = le16toh(buffer.display_info.width); -+ buffer.display_info.height = le16toh(buffer.display_info.height); -+ - info("%s: display name = %s", Name, buffer.display_info.name); - info("%s: display resolution = %d * %d", Name, buffer.display_info.width, buffer.display_info.height); - info("%s: display flags: %x", Name, buffer.display_info.flags); diff --git a/utils/less/Makefile b/utils/less/Makefile deleted file mode 100644 index 2e79e8e..0000000 --- a/utils/less/Makefile +++ /dev/null @@ -1,93 +0,0 @@ -# -# Copyright (C) 2010-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=less -PKG_VERSION:=481 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.greenwoodsoftware.com/less -PKG_MD5SUM:=50ef46065c65257141a7340123527767 - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Julen Landa Alustiza - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/less/Default - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Pager program similar to more - URL:=http://www.greenwoodsoftware.com/less/ -endef - -define Package/less/Default/description - Full version of GNU less utility -endef - -define Package/less - $(call Package/less/Default) - DEPENDS:=+libncurses - VARIANT:=narrow -endef - -define Package/less/description - $(call Package/less/Default/description) -endef - -define Package/less-wide - $(call Package/less/Default) - TITLE+= (Unicode) - DEPENDS:=+libncursesw - VARIANT:=wide -endef - -define Package/less-wide/description - $(call Package/less/Default/description) - This package contains the Unicode enabled version of less. -endef - -ifeq ($(BUILD_VARIANT),narrow) - CONFIGURE_VARS += \ - ac_cv_lib_ncursesw_initscr=no -endif - -ifeq ($(BUILD_VARIANT),wide) - CONFIGURE_VARS += \ - ac_cv_lib_ncursesw_initscr=yes -endif - -define Package/less/install - $(INSTALL_DIR) $(1)/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/less $(1)/bin/less -endef - -define Package/less/postinst -#!/bin/sh -[ -L "$${IPKG_INSTROOT}/usr/bin/less" ] && rm -f "$${IPKG_INSTROOT}/usr/bin/less" -exit 0 -endef - -define Package/less/postrm -#!/bin/sh -/bin/busybox less -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/bin/less -exit 0 -endef - -Package/less-wide/install = $(Package/less/install) -Package/less-wide/postinst = $(Package/less/postinst) -Package/less-wide/postrm = $(Package/less/postrm) - -$(eval $(call BuildPackage,less)) -$(eval $(call BuildPackage,less-wide)) diff --git a/utils/lm-sensors/Makefile b/utils/lm-sensors/Makefile deleted file mode 100644 index b11349c..0000000 --- a/utils/lm-sensors/Makefile +++ /dev/null @@ -1,117 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lm-sensors -PKG_VERSION:=3.3.5 -PKG_RELEASE:=3 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/groeck/lm-sensors.git -PKG_SOURCE_VERSION:=f8cdcc35bff0785aecf49d9a8484a71ce3ebee4f -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MAINTAINER:=Jo-Philipp Wich -PKG_LICENSE:=GPL-2.0+ LGPL-2.1+ - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lm-sensors/Default - DEPENDS:=+sysfsutils - URL:=http://www.lm-sensors.org/ -endef - -define Package/lm-sensors - $(call Package/lm-sensors/Default) - SECTION:=utils - CATEGORY:=Utilities - TITLE:=lm-sensors - DEPENDS+=+libsensors -endef - -define Package/lm-sensors-detect - $(call Package/lm-sensors/Default) - SECTION:=utils - CATEGORY:=Utilities - TITLE:=lm-sensors-detect - DEPENDS+=+lm-sensors +perl +perlbase-essential +perlbase-fcntl +perlbase-file +perlbase-xsloader -endef - -define Package/libsensors - $(call Package/lm-sensors/Default) - SECTION:=libs - CATEGORY:=Libraries - TITLE:=libsensors -endef - -define Package/lm-sensors/description - utility to read hardware sensor data -endef - -define Package/lm-sensors-detect/description - script to autodetect sensor hardware -endef - -define Package/libsensors/description - lm-sensors libraries -endef - -define Package/lm-sensors/conffiles -/etc/sensors.conf -endef - -define Build/Compile - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - KERNELVERSION="$(LINUX_VERSION)" \ - LINUX="$(LINUX_DIR)" \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="$(TARGET_CPPFLAGS)" \ - STAGING_DIR="$(STAGING_DIR)" \ - PREFIX="/usr" \ - MACHINE="$(ARCH)" \ - EXLDFLAGS="" \ - user -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/sensors - $(CP) \ - $(PKG_BUILD_DIR)/lib/sensors.h \ - $(1)/usr/include/sensors - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_BUILD_DIR)/lib/libsensors.{a,so*} \ - $(1)/usr/lib -endef - -define Package/lm-sensors/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/sensors/sensors $(1)/usr/sbin -ifeq ($(ARCH),i386) - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) ./files/sensors.conf $(1)/etc/sensors.conf -endif -endef - -define Package/lm-sensors-detect/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/prog/detect/sensors-detect $(1)/usr/sbin -endef - -define Package/libsensors/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) $(PKG_BUILD_DIR)/lib/libsensors.so* $(1)/usr/lib -endef - -$(eval $(call BuildPackage,lm-sensors)) -$(eval $(call BuildPackage,lm-sensors-detect)) -$(eval $(call BuildPackage,libsensors)) diff --git a/utils/lm-sensors/files/sensors.conf b/utils/lm-sensors/files/sensors.conf deleted file mode 100644 index 505b9d9..0000000 --- a/utils/lm-sensors/files/sensors.conf +++ /dev/null @@ -1,117 +0,0 @@ -chip "pc87366-*" - -# Soekris net4801 configuration - -# Written by Henrik Brix Andersen -# Latest version can be found at http://www.brixandersen.dk/ - -# The configuration is partly based on the PC87366 datasheet and -# partly borrowed from the env4801 utility by Poul-Henning -# Kamp - -# Datasheet: http://www.winbond.com/PDF/APCsheet/PC87366.pdf -# env4801: http://phk.freebsd.dk/soekris/env4801/ - - -# Voltage inputs - ignore vid - - # Unknown - # label in0 "avi0" - ignore in0 - - - # Core Voltage, +2.0V - label in1 "VCORE" - set in1_min 1.9 - set in1_max 2.1 - - - # VCC, +5.0V - label in2 "VCC" - compute in2 @*2, @/2 - - - # Power Supply Input, +6.0V - +28.0V - label in3 "VPWR" - compute in3 @*20.1, @/20.1 - set in3_min 6.0 - set in3_max 28.0 - - - # +12V - label in4 "+12V" - compute in4 @*4.83, @/4.83 - set in4_min 11 - set in4_max 13 - - - # -12V - label in5 "-12V" - # If in10 on your net4801 doesn't have the 3.3V reference, use this - # compute line instead: - # compute in5 (@-3.3)*19.2+3.3, (@-3.3)/19.2+3.3 - compute in5 (@-in10)*19.2+in10, (@-in10)/19.2+in10 - set in5_min -13 - set in5_max -11 - - - # GND, 0V - label in6 "GND" - set in6_min 0 - set in6_max 0 - - - # Standby Voltage, +3.3V - # Internally divided by 2 - label in7 "Vsb" - compute in7 @*2, @/2 - set in7_min 3.0 - set in7_max 3.6 - - - # Supply Voltage, +3.3V - # Internally divided by 2 - label in8 "Vdd" - compute in8 @*2, @/2 - set in8_min 3.0 - set in8_max 3.6 - - - # Battery Backup Supply Voltage, +3.0V - label in9 "Vbat" - set in9_min 2.4 - set in9_max 3.6 - - - # Analog Supply Voltage, +3.3V - # Internally divided by 2 - label in10 "AVdd" - compute in10 @*2, @/2 - set in10_min 3.0 - set in10_max 3.6 - - -# Temperature inputs - ignore temp1 - ignore temp2 - - # PC87366 Internal Temperature - # PC87366 Recommended Operating Conditions: 0 - 70C - # SC1100 Recommended Operating Conditions: 0 - 85C - label temp3 "Temp" - label temp3_crit "Critical" - set temp3_min 0 - set temp3_max 70 - set temp3_crit 85 - - - ignore temp4 - ignore temp5 - ignore temp6 - - -# Fan inputs - ignore fan1 - ignore fan2 - ignore fan3 diff --git a/utils/lm-sensors/patches/100-musl-compat.patch b/utils/lm-sensors/patches/100-musl-compat.patch deleted file mode 100644 index 1cd82ab..0000000 --- a/utils/lm-sensors/patches/100-musl-compat.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/prog/dump/isadump.c -+++ b/prog/dump/isadump.c -@@ -38,7 +38,7 @@ - - - /* To keep glibc2 happy */ --#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 -+#if !defined(__UCLIBC__) - #include - #else - #include ---- a/prog/dump/isaset.c -+++ b/prog/dump/isaset.c -@@ -34,7 +34,7 @@ - - - /* To keep glibc2 happy */ --#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 -+#if !defined(__UCLIBC__) - #include - #else - #include ---- a/prog/dump/superio.c -+++ b/prog/dump/superio.c -@@ -21,7 +21,7 @@ - - #include - --#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 -+#if !defined(__UCLIBC__) - #include - #else - #include ---- a/prog/dump/util.c -+++ b/prog/dump/util.c -@@ -12,7 +12,7 @@ - #include "util.h" - - /* To keep glibc2 happy */ --#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 -+#if !defined(__UCLIBC__) - #include - #else - #include diff --git a/utils/logrotate/Makefile b/utils/logrotate/Makefile deleted file mode 100644 index 4823c59..0000000 --- a/utils/logrotate/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=logrotate -PKG_VERSION:=3.10.0 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:= https://github.com/logrotate/logrotate/releases/download/$(PKG_VERSION) -PKG_MD5SUM:=888f58caf07082c76f5dd39e5d30ec12 -PKG_LICENSE:=GPL-2.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/logrotate - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libpopt - TITLE:=rotates, compresses, and mails system logs - URL:=https://github.com/logrotate/logrotate - MAINTAINER:=Christian Beier -endef - -define Package/logrotate/description - logrotate is designed to ease administration of systems that generate large - numbers of log files. It allows auto-matic rotation, compression, removal and - mailing of log files. Each log file may be handled daily, weekly, monthly or - when it grows too large. -endef - -define Package/logrotate/conffiles -/etc/logrotate.conf -endef - -CONFIGURE_ARGS += --with-acl=no - -EXTRA_CFLAGS += $(TARGET_CPPFLAGS) -Wno-nonnull-compare -EXTRA_LDFLAGS += $(TARGET_LDFLAGS) - -define Build/Compile - $(call Build/Compile/Default, \ - RPM_OPT_FLAGS:="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ - LDFLAGS="$(EXTRA_LDFLAGS)" \ - logrotate \ - ) -endef - -define Package/logrotate/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/logrotate.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/logrotate.d -endef - -$(eval $(call BuildPackage,logrotate)) diff --git a/utils/logrotate/files/logrotate.conf b/utils/logrotate/files/logrotate.conf deleted file mode 100644 index 9a91db9..0000000 --- a/utils/logrotate/files/logrotate.conf +++ /dev/null @@ -1,30 +0,0 @@ -# rotate log files weekly -weekly -#daily - -# keep 4 weeks worth of backlogs -rotate 4 - -# create new (empty) log files after rotating old ones -create - -notifempty -nomail -#olddir /var/log/backup/ -missingok -#dateext - -# uncomment this if you want your log files compressed -#compress - -# packages can drop log rotation information into this directory -include /etc/logrotate.d - -# no packages own lastlog or wtmp -- we'll rotate them here -#/var/log/wtmp { -# monthly -# create 0664 root utmp -# rotate 1 -#} - -# system-specific logs may be also be configured here. diff --git a/utils/lrzsz/Makefile b/utils/lrzsz/Makefile deleted file mode 100644 index 5074a1d..0000000 --- a/utils/lrzsz/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lrzsz -PKG_VERSION:=0.12.20 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://ohse.de/uwe/releases/ -PKG_MD5SUM:=b5ce6a74abc9b9eb2af94dffdfd372a4 - -PKG_MAINTAINER:=Hsing-Wang Liao -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/lrzsz - SECTION:=utils - CATEGORY:=Utilities - TITLE:=X, Y and Z-modem protocols - URL:=https://ohse.de/uwe/software/lrzsz.html -endef - -define Package/lrzsz/description - Transfer files in your login sessions. - Very leightweight and straight forward. - You just need a terminal client that can do - either X, Y or Z-modem file transfers. -endef - -define Package/lrzsz/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lrz $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsz $(1)/usr/bin/ - (cd $(1)/usr/bin; \ - ln -fs lrz lrx; \ - ln -fs lrz lrb; \ - ln -fs lrz rz; \ - ln -fs lrz rx; \ - ln -fs lrz rb; \ - ln -fs lsz lsx; \ - ln -fs lsz lsb; \ - ln -fs lsz sz; \ - ln -fs lsz sx; \ - ln -fs lsz sb; \ - ); -endef - -$(eval $(call BuildPackage,lrzsz)) diff --git a/utils/lrzsz/patches/100-install_delete_fix.patch b/utils/lrzsz/patches/100-install_delete_fix.patch deleted file mode 100644 index 3b19443..0000000 --- a/utils/lrzsz/patches/100-install_delete_fix.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -372,13 +372,13 @@ - rm -f $(DESTDIR)/$(bindir)/`echo lsb | sed -e '$(transform)'` - ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \ - $(DESTDIR)/$(bindir)/`echo lsb |sed -e '$(transform)'` -- rm -f $(bindir)/`echo lsx | sed -e '$(transform)'` -+ rm -f $(DESTDIR)/$(bindir)/`echo lsx | sed -e '$(transform)'` - ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \ - $(DESTDIR)/$(bindir)/`echo lsx |sed -e '$(transform)'` -- rm -f $(bindir)/`echo lrb | sed -e '$(transform)'` -+ rm -f $(DESTDIR)/$(bindir)/`echo lrb | sed -e '$(transform)'` - ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \ - $(DESTDIR)/$(bindir)/`echo lrb |sed -e '$(transform)'` -- rm -f $(bindir)/`echo lrx | sed -e '$(transform)'` -+ rm -f $(DESTDIR)/$(bindir)/`echo lrx | sed -e '$(transform)'` - ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \ - $(DESTDIR)/$(bindir)/`echo lrx |sed -e '$(transform)'` - # rm -f $(bindir)/`echo lrzszbug | sed -e '$(transform)'` diff --git a/utils/lsof/Makefile b/utils/lsof/Makefile deleted file mode 100644 index c891344..0000000 --- a/utils/lsof/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (C) 2007-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk - -PKG_NAME:=lsof -PKG_VERSION:=4.89 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof -PKG_MD5SUM:=1b9cd34f3fb86856a125abbf2be3a386 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION) -PKG_MAINTAINER:=Maxim Storchak -PKG_LICENSE:=Unique -PKG_LICENSE_FILES:=00README - -include $(INCLUDE_DIR)/package.mk - -TARGET_LDFLAGS += $(LIBRPC) - -define Package/lsof - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=$(LIBRPC_DEPENDS) - TITLE:=LiSt Open Files - a diagnostic tool - URL:=http://people.freebsd.org/~abe/ -endef - -ifneq ($(CONFIG_IPV6),n) - LINUX_CLIB_IPV6=-DHASIPv6 -else - LINUX_CLIB_IPV6= -endif - -define Build/Prepare - $(PKG_UNPACK) - (cd $(PKG_BUILD_DIR) && tar -xf $(PKG_NAME)_$(PKG_VERSION)_src.tar && mv $(PKG_NAME)_$(PKG_VERSION)_src/* .) - $(Build/Patch) -endef - -define Build/Configure - cd $(PKG_BUILD_DIR); \ - LINUX_CLIB="-DGLIBCV=2 $(LINUX_CLIB_IPV6)" \ - LSOF_CC="$(TARGET_CC)" \ - LSOF_VSTR="$(LINUX_VERSION)" \ - LSOF_CFGF="$(TARGET_CFLAGS)" \ - LSOF_CFGL="$(TARGET_LDFLAGS)" \ - LSOF_AR="$(TARGET_CROSS)ar cr" \ - LSOF_RANLIB="$(TARGET_CROSS)ranlib" \ - ./Configure -n linux -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) -endef - -define Package/lsof/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lsof $(1)/usr/bin -endef - -$(eval $(call BuildPackage,lsof)) diff --git a/utils/lsof/patches/001-lsof_makefile.patch b/utils/lsof/patches/001-lsof_makefile.patch deleted file mode 100644 index eb2b735..0000000 --- a/utils/lsof/patches/001-lsof_makefile.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/lib/Makefile.skel -+++ b/lib/Makefile.skel -@@ -21,8 +21,8 @@ OBJ= ckkv.o cvfs.o dvch.o fino.o isfn.o - all: ${LIB} - - ${LIB}: ${OBJ} -- ${AR} -- ${RANLIB} -+ ${AR} ${LIB} ${OBJ} -+ ${RANLIB} ${LIB} - - clean: FRC - rm -f ${LIB} ${OBJ} errs Makefile.bak a.out core diff --git a/utils/lsof/patches/002-lsof_noportmap.patch b/utils/lsof/patches/002-lsof_noportmap.patch deleted file mode 100644 index d0e8889..0000000 --- a/utils/lsof/patches/002-lsof_noportmap.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/print.c -+++ b/print.c -@@ -161,6 +161,7 @@ endnm(sz) - static void - fill_portmap() - { -+#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_RPC__) - char buf[128], *cp, *nm; - CLIENT *c; - int h, port, pr; -@@ -279,6 +280,7 @@ fill_portmap() - Pth[pr][h] = pt; - } - clnt_destroy(c); -+#endif - } - #endif /* !defined(HASNORPC_H) */ - diff --git a/utils/lsof/patches/003-lsof_selinux.patch b/utils/lsof/patches/003-lsof_selinux.patch deleted file mode 100644 index f3168e5..0000000 --- a/utils/lsof/patches/003-lsof_selinux.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Configure b/Configure -index e4a25a2..3a6e78b 100755 ---- a/Configure -+++ b/Configure -@@ -2923,7 +2923,7 @@ return(0); } - LSOF_TMP1=1 - fi # } - fi # } -- if test $LSOF_TMP1 -eq 1 # { -+ if test 0 -eq 1 # { - then - LSOF_CFGF="$LSOF_CFGF -DHASSELINUX" - LSOF_CFGL="$LSOF_CFGL -lselinux" diff --git a/utils/lsof/patches/004-lsof_ccv.patch b/utils/lsof/patches/004-lsof_ccv.patch deleted file mode 100644 index e2f162b..0000000 --- a/utils/lsof/patches/004-lsof_ccv.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/Configure b/Configure -index 3a6e78b..a2946c6 100755 ---- a/Configure -+++ b/Configure -@@ -2788,6 +2788,9 @@ LOCKF_OWNER4 - if test "X$LSOF_CC" = "X" # { - then - LSOF_CC=cc -+ fi # } -+ if test "X$LSOF_CCV" = "X" # { -+ then - LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'` - fi # } - if test "X$LINUX_CONF_CC" = "X" # { diff --git a/utils/luci-app-lxc/Makefile b/utils/luci-app-lxc/Makefile deleted file mode 100644 index 026f714..0000000 --- a/utils/luci-app-lxc/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luci-app-lxc -PKG_RELEASE:=20161030 - -PKG_LICENSE:=Apache-2.0 - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk - -define Package/luci-app-lxc - SECTION:=luci - CATEGORY:=LuCI - SUBMENU:=3. Applications - TITLE:=LXC management Web UI - DEPENDS:=+luci-mod-admin-full +lxc +lxc-create +liblxc +rpcd-mod-lxc +getopt +xz - MAINTAINER:=Petar Koretic -endef - -define Package/luci-app-lxc/description - This package will install LXC management Web UI. -endef - -define Build/Prepare -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/luci-app-lxc/install - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller/ - $(INSTALL_BIN) \ - ./files/controller/lxc.lua \ - $(1)/usr/lib/lua/luci/controller/ - - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/view/ - $(INSTALL_DATA) \ - ./files/view/lxc.htm \ - $(1)/usr/lib/lua/luci/view/ - - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/ - $(INSTALL_BIN) \ - ./files/model/cbi/lxc.lua \ - $(1)/usr/lib/lua/luci/model/cbi/ - - $(INSTALL_DIR) $(1)/etc/config/ - $(INSTALL_DATA) \ - ./files/lxc.config \ - $(1)/etc/config/lxc - - $(INSTALL_DIR) $(1)/www - $(CP) -R \ - ./files/www/* \ - $(1)/www -endef - -$(eval $(call BuildPackage,luci-app-lxc)) diff --git a/utils/luci-app-lxc/files/controller/lxc.lua b/utils/luci-app-lxc/files/controller/lxc.lua deleted file mode 100644 index ea7adba..0000000 --- a/utils/luci-app-lxc/files/controller/lxc.lua +++ /dev/null @@ -1,167 +0,0 @@ ---[[ - -LuCI LXC module - -Copyright (C) 2014, Cisco Systems, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Author: Petar Koretic - -]]-- - -module("luci.controller.lxc", package.seeall) - -require "ubus" -local conn = ubus.connect() -if not conn then - error("Failed to connect to ubus") -end - - -function fork_exec(command) - local pid = nixio.fork() - if pid > 0 then - return - elseif pid == 0 then - -- change to root dir - nixio.chdir("/") - - -- patch stdin, out, err to /dev/null - local null = nixio.open("/dev/null", "w+") - if null then - nixio.dup(null, nixio.stderr) - nixio.dup(null, nixio.stdout) - nixio.dup(null, nixio.stdin) - if null:fileno() > 2 then - null:close() - end - end - - -- replace with target command - nixio.exec("/bin/sh", "-c", command) - end -end - -function index() - page = node("admin", "services", "lxc") - page.target = cbi("lxc") - page.title = _("LXC Containers") - page.order = 70 - - page = entry({"admin", "services", "lxc_create"}, call("lxc_create"), nil) - page.leaf = true - - page = entry({"admin", "services", "lxc_action"}, call("lxc_action"), nil) - page.leaf = true - - page = entry({"admin", "services", "lxc_get_downloadable"}, call("lxc_get_downloadable"), nil) - page.leaf = true - - page = entry({"admin", "services", "lxc_configuration_get"}, call("lxc_configuration_get"), nil) - page.leaf = true - - page = entry({"admin", "services", "lxc_configuration_set"}, call("lxc_configuration_set"), nil) - page.leaf = true - -end - -function lxc_get_downloadable() - luci.http.prepare_content("application/json") - - local f = io.popen('uname -m', 'r') - local target = f:read('*a') - f:close() - target = target:gsub("^%s*(.-)%s*$", "%1") - - local templates = {} - - local f = io.popen('lxc-create -n just_want_to_list_available_lxc_templates -t download -- --list', 'r') - - for line in f:lines() do - local dist,version = line:match("^(%S+)%s+(%S+)%s+" .. target .. "%s+default%s+%S+$") - if dist~=nil and version~=nil then templates[#templates + 1] = dist .. ":" .. version end - end - - f:close() - luci.http.write_json(templates) -end - -function lxc_create(lxc_name, lxc_template) - luci.http.prepare_content("text/plain") - - local uci = require("uci").cursor() - - local url = uci:get("lxc", "lxc", "url") - - if not pcall(dofile, "/etc/openwrt_release") then - return luci.http.write("1") - end - - local f = io.popen('uname -m', 'r') - local target = f:read('*a') - f:close() - target = target:gsub("^%s*(.-)%s*$", "%1") - - local lxc_dist = lxc_template:gsub("(.*):(.*)", '%1') - local lxc_release = lxc_template:gsub("(.*):(.*)", '%2') - - local data = conn:call("lxc", "create", { name = lxc_name, template = "download", args = { "--server", url, "--no-validate", "--dist", lxc_dist, "--release", lxc_release, "--arch", target } } ) - - luci.http.write(data) -end - -function lxc_action(lxc_action, lxc_name) - luci.http.prepare_content("application/json") - - local data, ec = conn:call("lxc", lxc_action, lxc_name and { name = lxc_name} or {} ) - - luci.http.write_json(ec and {} or data) -end - -function lxc_get_config_path() - local f = io.open("/etc/lxc/lxc.conf", "r") - local content = f:read("*all") - f:close() - local ret = content:match('^%s*lxc.lxcpath%s*=%s*([^%s]*)') - if ret then - return ret .. "/" - else - return "/srv/lxc/" - end -end - -function lxc_configuration_get(lxc_name) - luci.http.prepare_content("text/plain") - - local f = io.open(lxc_get_config_path() .. lxc_name .. "/config", "r") - local content = f:read("*all") - f:close() - - luci.http.write(content) -end - -function lxc_configuration_set(lxc_name) - luci.http.prepare_content("text/plain") - - local lxc_configuration = luci.http.formvalue("lxc_configuration") - - if lxc_configuration == nil then - return luci.http.write("1") - end - - local f, err = io.open(lxc_get_config_path() .. lxc_name .. "/config","w+") - if not f then - return luci.http.write("2") - end - - f:write(lxc_configuration) - f:close() - - luci.http.write("0") -end - diff --git a/utils/luci-app-lxc/files/lxc.config b/utils/luci-app-lxc/files/lxc.config deleted file mode 100644 index 5572c73..0000000 --- a/utils/luci-app-lxc/files/lxc.config +++ /dev/null @@ -1,6 +0,0 @@ -# -# lxc uci configuration -# - -config lxc 'lxc' - option url 'virtualwrt.org/containers/' diff --git a/utils/luci-app-lxc/files/model/cbi/lxc.lua b/utils/luci-app-lxc/files/model/cbi/lxc.lua deleted file mode 100644 index ac0fdff..0000000 --- a/utils/luci-app-lxc/files/model/cbi/lxc.lua +++ /dev/null @@ -1,31 +0,0 @@ ---[[ - -LuCI LXC module - -Copyright (C) 2014, Cisco Systems, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Author: Petar Koretic - -]]-- - -local fs = require "nixio.fs" - -m = Map("lxc", translate("LXC Containers")) - -if fs.access("/etc/config/lxc") then - m:section(SimpleSection).template = "lxc" - - s = m:section(TypedSection, "lxc", translate("Options")) - s.anonymous = true - s.addremove = false - - s:option(Value, "url", translate("Containers URL")) -end - -return m diff --git a/utils/luci-app-lxc/files/view/lxc.htm b/utils/luci-app-lxc/files/view/lxc.htm deleted file mode 100644 index edfff8e..0000000 --- a/utils/luci-app-lxc/files/view/lxc.htm +++ /dev/null @@ -1,458 +0,0 @@ -<%# - -LuCI LXC module - -Copyright (C) 2014, Cisco Systems, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Author: Petar Koretic - --%> - -
- <%:Available Containers%> -
- - - - - - -
<%:Name%><%:Status%><%:Actions%>
-
-
- -
- -
- -
-
- <%:Create New Container%> -
- - - - - - - - - - - -
<%:Name%><%:Template%><%:Actions%>
- - - - - - -
-
-
- -
- -
- -
- - - diff --git a/utils/luci-app-lxc/files/www/luci-static/resources/cbi/green.gif b/utils/luci-app-lxc/files/www/luci-static/resources/cbi/green.gif deleted file mode 100644 index d09febf..0000000 Binary files a/utils/luci-app-lxc/files/www/luci-static/resources/cbi/green.gif and /dev/null differ diff --git a/utils/luci-app-lxc/files/www/luci-static/resources/cbi/purple.gif b/utils/luci-app-lxc/files/www/luci-static/resources/cbi/purple.gif deleted file mode 100644 index f0d68cc..0000000 Binary files a/utils/luci-app-lxc/files/www/luci-static/resources/cbi/purple.gif and /dev/null differ diff --git a/utils/luci-app-lxc/files/www/luci-static/resources/cbi/red.gif b/utils/luci-app-lxc/files/www/luci-static/resources/cbi/red.gif deleted file mode 100644 index c1b39bb..0000000 Binary files a/utils/luci-app-lxc/files/www/luci-static/resources/cbi/red.gif and /dev/null differ diff --git a/utils/lvm2/Makefile b/utils/lvm2/Makefile index 928050a..f14fd0b 100644 --- a/utils/lvm2/Makefile +++ b/utils/lvm2/Makefile @@ -1,6 +1,6 @@ # # Copyright (C) 2009-2010 Stefan Monnier -# Copyright (C) 2011-2014 OpenWrt.org +# Copyright (C) 2011-2018 OpenWrt.org # # This is free software, licensed under the GNU General Public License v3+. # See /LICENSE for more information. @@ -9,24 +9,26 @@ include $(TOPDIR)/rules.mk PKG_NAME:=LVM2 -PKG_VERSION:=2.02.165 -PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0 LGPL-2.1 +PKG_VERSION:=2.03.02 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz -PKG_SOURCE_URL:=ftp://sources.redhat.com/pub/lvm2/releases -PKG_MD5SUM:=d459cfe50fd549fe41eeed4ef8fbca3f9833f68012f735adb3462483360e07c7 -PKG_MAINTAINER:=Daniel Golle +PKG_SOURCE_URL:=https://sourceware.org/pub/lvm2 +PKG_HASH:=550ba750239fd75b7e52c9877565cabffef506bbf6d7f6f17b9700dee56c720f PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION) +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=GPL-2.0 LGPL-2.1 +PKG_LICENSE_FILES:=COPYING COPYING.lib + 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 +libuuid +librt + URL:=https://sourceware.org/dm/ + DEPENDS:=+kmod-dm +libpthread +libuuid +librt +libblkid endef define Package/libdevmapper/description @@ -39,8 +41,8 @@ define Package/lvm2 CATEGORY:=Utilities SUBMENU:=Disc TITLE:=The Linux Logical Volume Manager - URL:=http://sourceware.org/lvm2/ - DEPENDS:=+libdevmapper +libblkid +libreadline +libncurses + URL:=https://sourceware.org/lvm2/ + DEPENDS:=+libdevmapper +libreadline +libncurses +libaio endef define Package/lvm2/description @@ -49,7 +51,12 @@ define Package/lvm2/description LVM toolset. endef -CONFIGURE_ARGS += --disable-o_direct +CONFIGURE_ARGS += \ + --disable-o_direct \ + --with-default-pid-dir=/var/run \ + --with-default-dm-run-dir=/var/run \ + --with-default-run-dir=/var/run/lvm \ + --with-default-locking-dir=/var/lock/lvm define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ @@ -69,7 +76,7 @@ endef define Package/libdevmapper/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdevmapper.so.* $(1)/usr/lib endef define Package/lvm2/install diff --git a/utils/lvm2/patches/000-compile.patch b/utils/lvm2/patches/000-compile.patch index 9fa1c1d..111a86e 100644 --- a/utils/lvm2/patches/000-compile.patch +++ b/utils/lvm2/patches/000-compile.patch @@ -1,6 +1,6 @@ --- a/make.tmpl.in +++ b/make.tmpl.in -@@ -19,7 +19,7 @@ SHELL = /bin/sh +@@ -29,7 +29,7 @@ SHELL = @SHELL@ # 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. diff --git a/utils/lvm2/patches/001-include_fix.patch b/utils/lvm2/patches/001-include_fix.patch index 09d2db9..c209c0e 100644 --- a/utils/lvm2/patches/001-include_fix.patch +++ b/utils/lvm2/patches/001-include_fix.patch @@ -1,6 +1,6 @@ --- a/lib/device/dev-type.c +++ b/lib/device/dev-type.c -@@ -22,7 +22,7 @@ +@@ -25,7 +25,7 @@ #include #ifdef BLKID_WIPING_SUPPORT diff --git a/utils/lvm2/patches/002-const-stdio.patch b/utils/lvm2/patches/002-const-stdio.patch index 546a03c..d547c5f 100644 --- a/utils/lvm2/patches/002-const-stdio.patch +++ b/utils/lvm2/patches/002-const-stdio.patch @@ -1,15 +1,15 @@ --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c -@@ -1843,7 +1843,7 @@ struct cmd_context *create_toolcontext(u +@@ -1649,7 +1649,7 @@ struct cmd_context *create_toolcontext(unsigned is_clvmd, /* FIXME Make this configurable? */ reset_lvm_errno(1); -#ifndef VALGRIND_POOL +#if defined(__GLIBC__) && !defined(VALGRIND_POOL) /* Set in/out stream buffering before glibc */ - if (set_buffering) { - /* Allocate 2 buffers */ -@@ -2224,7 +2224,7 @@ void destroy_toolcontext(struct cmd_cont + if (set_buffering + #ifdef SYS_gettid +@@ -2031,7 +2031,7 @@ void destroy_toolcontext(struct cmd_context *cmd) if (cmd->libmem) dm_pool_destroy(cmd->libmem); @@ -20,7 +20,7 @@ if (is_valid_fd(STDIN_FILENO) && --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c -@@ -1815,6 +1815,7 @@ int lvm_split(char *str, int *argc, char +@@ -3055,6 +3055,7 @@ int lvm_split(char *str, int *argc, char **argv, int max) /* Make sure we have always valid filedescriptors 0,1,2 */ static int _check_standard_fds(void) { @@ -28,7 +28,7 @@ int err = is_valid_fd(STDERR_FILENO); if (!is_valid_fd(STDIN_FILENO) && -@@ -1841,6 +1842,12 @@ static int _check_standard_fds(void) +@@ -3081,6 +3082,12 @@ static int _check_standard_fds(void) strerror(errno)); return 0; } diff --git a/utils/lvm2/patches/003-no-mallinfo.patch b/utils/lvm2/patches/003-no-mallinfo.patch index 6762742..5ecc61a 100644 --- a/utils/lvm2/patches/003-no-mallinfo.patch +++ b/utils/lvm2/patches/003-no-mallinfo.patch @@ -1,6 +1,6 @@ --- a/lib/mm/memlock.c +++ b/lib/mm/memlock.c -@@ -174,12 +174,15 @@ static void _allocate_memory(void) +@@ -183,12 +183,15 @@ static void _allocate_memory(void) * memory on free(), this is good enough for our purposes. */ while (missing > 0) { @@ -16,7 +16,7 @@ inf = mallinfo(); if (hblks < inf.hblks) { -@@ -189,9 +192,12 @@ static void _allocate_memory(void) +@@ -198,9 +201,12 @@ static void _allocate_memory(void) free(areas[area]); _size_malloc_tmp /= 2; } else { @@ -29,7 +29,7 @@ if (area == max_areas && missing > 0) { /* Too bad. Warn the user and proceed, as things are -@@ -480,8 +486,13 @@ static void _lock_mem(struct cmd_context +@@ -521,8 +527,13 @@ static void _lock_mem(struct cmd_context *cmd) * will not block memory locked thread * Note: assuming _memlock_count_daemon is updated before _memlock_count */ diff --git a/utils/lvm2/patches/004-device-include-goto-lable-as-well.patch b/utils/lvm2/patches/004-device-include-goto-lable-as-well.patch index 30cc5e6..13682bf 100644 --- a/utils/lvm2/patches/004-device-include-goto-lable-as-well.patch +++ b/utils/lvm2/patches/004-device-include-goto-lable-as-well.patch @@ -15,7 +15,7 @@ on standard C libraries without O_DIRECT_SUPPORT. --- a/lib/device/dev-io.c +++ b/lib/device/dev-io.c -@@ -529,7 +529,7 @@ int dev_open_flags(struct device *dev, i +@@ -564,7 +564,7 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet) return 0; } diff --git a/utils/lxc/Config.in b/utils/lxc/Config.in deleted file mode 100644 index 618fde0..0000000 --- a/utils/lxc/Config.in +++ /dev/null @@ -1,37 +0,0 @@ -menu "Configuration" - depends on PACKAGE_lxc - -config LXC_KERNEL_OPTIONS - bool "Enable kernel support for LXC" - default n - select KERNEL_CGROUPS - select KERNEL_NAMESPACES - select KERNEL_LXC_MISC - help - Select needed kernel options for LXC related utilities. Options - include cgroups, namespaces and other miscellaneous options. These - options unfortunately can not be installed as a module. - -config LXC_BUSYBOX_OPTIONS - bool "Enable busybox support for lxc-create tool" - default n - select BUSYBOX_CUSTOM - select BUSYBOX_CONFIG_HAVE_DOT_CONFIG - select BUSYBOX_CONFIG_FEATURE_SEAMLESS_XZ - select BUSYBOX_CONFIG_FEATURE_TAR_LONG_OPTIONS - select BUSYBOX_CONFIG_UNXZ - select BUSYBOX_CONFIG_XZ - select BUSYBOX_CONFIG_GETOPT - select BUSYBOX_CONFIG_FEATURE_GETOPT_LONG - help - Select needed busybox options for lxc-create utility. This include XZ tar - compression, long option support for tar and built-in getopt support. - -config LXC_SECCOMP - bool "Enable support for seccomp in LXC" - default KERNEL_SECCOMP - help - Build LXC with support for seccomp filters. - Select libseccomp which also pulls-in the needed kernel features. - -endmenu diff --git a/utils/lxc/Makefile b/utils/lxc/Makefile deleted file mode 100644 index 0df1460..0000000 --- a/utils/lxc/Makefile +++ /dev/null @@ -1,280 +0,0 @@ -# -# Copyright (C) 2013-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lxc -PKG_VERSION:=1.1.5 -PKG_RELEASE:=3 - -PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0 -PKG_MAINTAINER:=Luka Perkov - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://linuxcontainers.org/downloads/lxc/ -PKG_MD5SUM:=dd9684dde0a58ed13f4f49c855b79a1a - -PKG_BUILD_DEPENDS:=lua -PKG_BUILD_PARALLEL:=1 - -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -LXC_APPLETS_BIN += \ - attach autostart cgroup clone config console create destroy device \ - execute freeze info monitor snapshot start stop unfreeze unshare \ - usernsexec wait - -LXC_APPLETS_LIB += \ - monitord user-nic - -LXC_SCRIPTS += \ - checkconfig ls top - -DEPENDS_APPLETS = +libpthread +libcap +liblxc - -DEPENDS_create = +lxc-configs +lxc-hooks +lxc-templates +flock - -DEPENDS_ls = +lxc-config -DEPENDS_top = +lxc-lua +luafilesystem @BROKEN - - -define Package/lxc/Default - SECTION:=utils - CATEGORY:=Utilities - TITLE:=LXC userspace tools - URL:=http://lxc.sourceforge.net/ -endef - -define Package/lxc - $(call Package/lxc/Default) - MENU:=1 -endef - -define Package/lxc-auto - $(call Package/lxc/Default) - TITLE:= (initscript) - DEPENDS:=+lxc-start +lxc-stop -endef - -define Package/lxc-auto/description - LXC is the userspace control package for Linux Containers, a lightweight - virtual system mechanism sometimes described as "chroot on steroids". - This package adds and initscript for starting and stopping the containers - on boot and shutdown. -endef - -define Package/lxc-auto/conffiles -/etc/config/lxc-auto -endef - -define Package/lxc/config - source "$(SOURCE)/Config.in" -endef - -define Package/lxc/description - LXC is the userspace control package for Linux Containers, a lightweight - virtual system mechanism sometimes described as "chroot on steroids". -endef - -define Package/lxc-common - $(call Package/lxc/Default) - TITLE:=LXC common files - DEPENDS:= lxc -endef - -define Package/lxc-hooks - $(call Package/lxc/Default) - TITLE:=LXC virtual machine hooks - DEPENDS:= lxc -endef - -define Package/lxc-templates - $(call Package/lxc/Default) - TITLE:=LXC virtual machine templates - DEPENDS:= lxc -endef - -define Package/lxc-configs - $(call Package/lxc/Default) - TITLE:=LXC virtual machine common config files - DEPENDS:= lxc -endef - -define Package/liblxc - $(call Package/lxc/Default) - SECTION:=libs - CATEGORY:=Libraries - TITLE:=LXC userspace library - DEPENDS:= lxc +libcap +libpthread +LXC_SECCOMP:libseccomp -endef - -define Package/lxc-lua - $(call Package/lxc/Default) - TITLE:=LXC Lua bindings - DEPENDS:= lxc +liblua +liblxc +luafilesystem -endef - -define Package/lxc-init - $(call Package/lxc/Default) - TITLE:=LXC Lua bindings - DEPENDS:= lxc +liblxc -endef - -CONFIGURE_ARGS += \ - --disable-apparmor \ - --disable-doc \ - --disable-examples \ - --enable-lua=yes \ - --with-lua-pc="$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc" - -ifeq ($(CONFIG_LXC_SECCOMP),y) -CONFIGURE_ARGS += --enable-seccomp -else -CONFIGURE_ARGS += --disable-seccomp -endif - -MAKE_FLAGS += \ - LUA_INSTALL_CMOD="/usr/lib/lua" \ - LUA_INSTALL_LMOD="/usr/lib/lua" - - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/lxc/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/lxc/* \ - $(1)/usr/include/lxc/ - - $(INSTALL_DIR) $(1)/usr/lib - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/liblxc.so* \ - $(1)/usr/lib/ - - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lxc.pc \ - $(1)/usr/lib/pkgconfig/ -endef - - -define Package/lxc/install - true -endef - -define Package/lxc-auto/install - $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d - $(INSTALL_CONF) ./files/lxc-auto.config $(1)/etc/config/lxc-auto - $(INSTALL_BIN) ./files/lxc-auto.init $(1)/etc/init.d/lxc-auto -endef - -define Package/lxc-common/conffiles -/etc/lxc/default.conf -/etc/lxc/lxc.conf -endef - -define Package/lxc-common/install - $(INSTALL_DIR) $(1)/usr/lib/lxc/rootfs - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/lxc/rootfs/README \ - $(1)/usr/lib/lxc/rootfs/ - - $(INSTALL_DIR) $(1)/usr/share/lxc - $(CP) \ - $(PKG_INSTALL_DIR)/usr/share/lxc/lxc.functions \ - $(1)/usr/share/lxc/ - - $(INSTALL_DIR) $(1)/etc/lxc/ - $(CP) \ - $(PKG_INSTALL_DIR)/etc/lxc/default.conf \ - $(1)/etc/lxc/default.conf - - $(INSTALL_DIR) $(1)/etc/lxc/ - $(CP) \ - ./files/lxc.conf \ - $(1)/etc/lxc/lxc.conf - - $(INSTALL_DIR) $(1)/srv/lxc/ -endef - -define Package/lxc-hooks/install - $(INSTALL_DIR) $(1)/usr/share/lxc/hooks - $(CP) \ - $(PKG_INSTALL_DIR)/usr/share/lxc/hooks/* \ - $(1)/usr/share/lxc/hooks/ -endef - -define Package/lxc-templates/install - $(INSTALL_DIR) $(1)/usr/share/lxc/templates/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/share/lxc/templates/lxc-* \ - $(1)/usr/share/lxc/templates/ -endef - -define Package/lxc-configs/install - $(INSTALL_DIR) $(1)/usr/share/lxc/config/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/share/lxc/config/* \ - $(1)/usr/share/lxc/config/ -endef - -define Package/liblxc/install - $(INSTALL_DIR) $(1)/usr/lib/ - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/liblxc.so* \ - $(1)/usr/lib/ -endef - -define Package/lxc-lua/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(CP) \ - $(PKG_INSTALL_DIR)/usr/share/lua/5.1/lxc.lua \ - $(1)/usr/lib/lua/ - $(INSTALL_DIR) $(1)/usr/lib/lua/lxc - $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/lua/5.1/lxc/core.so \ - $(1)/usr/lib/lua/lxc/ -endef - -define Package/lxc-init/install - $(INSTALL_DIR) $(1)/sbin - $(CP) \ - $(PKG_INSTALL_DIR)/usr/sbin/init.lxc \ - $(1)/sbin/ -endef - -define GenPlugin - define Package/lxc-$(1) - $(call Package/lxc/Default) - TITLE:=Utility lxc-$(1) from the LXC userspace tools - DEPENDS:= lxc +lxc-common $(2) $(DEPENDS_$(1)) - endef - - define Package/lxc-$(1)/install - $(INSTALL_DIR) $$(1)$(3) - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)$(3)/lxc-$(1) \ - $$(1)$(3)/ - endef - - $$(eval $$(call BuildPackage,lxc-$(1))) -endef - - -$(eval $(call BuildPackage,lxc)) -$(eval $(call BuildPackage,lxc-common)) -$(eval $(call BuildPackage,lxc-hooks)) -$(eval $(call BuildPackage,lxc-configs)) -$(eval $(call BuildPackage,lxc-templates)) -$(eval $(call BuildPackage,liblxc)) -$(eval $(call BuildPackage,lxc-lua)) -$(eval $(call BuildPackage,lxc-init)) -$(eval $(call BuildPackage,lxc-auto)) -$(foreach u,$(LXC_APPLETS_BIN),$(eval $(call GenPlugin,$(u),$(DEPENDS_APPLETS),"/usr/bin"))) -$(foreach u,$(LXC_APPLETS_LIB),$(eval $(call GenPlugin,$(u),$(DEPENDS_APPLETS),"/usr/lib/lxc"))) -$(foreach u,$(LXC_SCRIPTS),$(eval $(call GenPlugin,$(u),,"/usr/bin"))) diff --git a/utils/lxc/files/lxc-auto.config b/utils/lxc/files/lxc-auto.config deleted file mode 100644 index b5a7ec9..0000000 --- a/utils/lxc/files/lxc-auto.config +++ /dev/null @@ -1,5 +0,0 @@ -#config container - #option name container1 - #option timeout 300 - #list command '/bin/command --option' - diff --git a/utils/lxc/files/lxc-auto.init b/utils/lxc/files/lxc-auto.init deleted file mode 100755 index 937f082..0000000 --- a/utils/lxc/files/lxc-auto.init +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh /etc/rc.common - -. /lib/functions.sh - -START=99 -STOP=00 - -run_command() { - local command="$1" - $command -} - -start_container() { - local cfg="$1" - local name - - config_get name "$cfg" name - config_list_foreach "$cfg" command run_command - if [ -n "$name" ]; then - /usr/bin/lxc-start -n "$name" - fi -} - -max_timeout=0 - -stop_container() { - local cfg="$1" - local name timeout - - config_get name "$cfg" name - config_get timeout "$cfg" timeout 300 - - if [ "$max_timeout" -lt "$timeout" ]; then - max_timeout=$timeout - fi - - if [ -n "$name" ]; then - if [ "$timeout" = "0" ]; then - /usr/bin/lxc-stop -n "$name" & - else - /usr/bin/lxc-stop -n "$name" -t $timeout & - fi - fi -} - -start() { - config_load lxc-auto - config_foreach start_container container -} - -stop() { - config_load lxc-auto - config_foreach stop_container container - # ensure e.g. shutdown doesn't occur before maximum timeout on - # containers that are shutting down - if [ $max_timeout -gt 0 ]; then - sleep $max_timeout - fi -} - diff --git a/utils/lxc/files/lxc.conf b/utils/lxc/files/lxc.conf deleted file mode 100644 index 77841cc..0000000 --- a/utils/lxc/files/lxc.conf +++ /dev/null @@ -1 +0,0 @@ -lxc.lxcpath = /srv/lxc diff --git a/utils/lxc/patches/010-compile.patch b/utils/lxc/patches/010-compile.patch deleted file mode 100644 index 6f12c38..0000000 --- a/utils/lxc/patches/010-compile.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -31,30 +31,6 @@ AC_CANONICAL_HOST - AM_PROG_CC_C_O - AC_GNU_SOURCE - --# Detect the distribution. This is used for the default configuration and --# for some distro-specific build options. --AC_MSG_CHECKING([host distribution]) --AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, centos, fedora, suse, gentoo, debian, arch, slackware, paldo, openmandriva or pardus.])) --if type lsb_release >/dev/null 2>&1 && test "z$with_distro" = "z"; then -- with_distro=`lsb_release -is` --fi --if test "z$with_distro" = "z"; then -- AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat") -- AC_CHECK_FILE(/etc/oracle-release,with_distro="oracle") -- AC_CHECK_FILE(/etc/centos-release,with_distro="centos") -- AC_CHECK_FILE(/etc/fedora-release,with_distro="fedora") -- AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse") -- AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo") -- AC_CHECK_FILE(/etc/debian_version,with_distro="debian") -- AC_CHECK_FILE(/etc/arch-release,with_distro="arch") -- AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware") -- AC_CHECK_FILE(/etc/frugalware-release,with_distro="frugalware") -- AC_CHECK_FILE(/etc/mandrakelinux-release, with_distro="openmandriva") -- AC_CHECK_FILE(/etc/mandriva-release,with_distro="openmandriva") -- AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus") --fi --with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'` -- - if test "z$with_distro" = "z"; then - with_distro="unknown" - fi diff --git a/utils/lxc/patches/015-getline.patch b/utils/lxc/patches/015-getline.patch deleted file mode 100644 index 2dfaa9b..0000000 --- a/utils/lxc/patches/015-getline.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/src/lxc/utils.h -+++ b/src/lxc/utils.h -@@ -41,11 +41,7 @@ extern int mkdir_p(const char *dir, mode - extern char *get_rundir(void); - - /* Define getline() if missing from the C library */ --#ifndef HAVE_GETLINE --#ifdef HAVE_FGETLN --#include <../include/getline.h> --#endif --#endif -+#include "../include/getline.h" - - /* Define setns() if missing from the C library */ - #ifndef HAVE_SETNS diff --git a/utils/lxc/patches/020-lxc-checkconfig.patch b/utils/lxc/patches/020-lxc-checkconfig.patch deleted file mode 100644 index 272f76b..0000000 --- a/utils/lxc/patches/020-lxc-checkconfig.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/lxc/lxc-checkconfig.in -+++ b/src/lxc/lxc-checkconfig.in -@@ -4,6 +4,17 @@ - : ${CONFIG:=/proc/config.gz} - : ${GREP:=zgrep} - : ${MODNAME:=configs} -+: ${ZGREP:=zgrep} -+: ${GUNZIP:=gunzip} -+ -+if [ -z $(which $ZGREP) ] && ! [ -z $(which $GUNZIP) ] && [ -x $(which $GUNZIP) ] && [ -f $CONFIG ] && [ "$CONFIG" == "/proc/config.gz" ] ; then -+ -+ CONFIG_NEW="/tmp/config-$(uname -r)" -+ $GUNZIP -c $CONFIG > $CONFIG_NEW -+ CONFIG=$CONFIG_NEW -+ -+ GREP=grep -+fi - - SETCOLOR_SUCCESS="printf \\033[1;32m" - SETCOLOR_FAILURE="printf \\033[1;31m" diff --git a/utils/lxc/patches/025-remove-unsupported-option.patch b/utils/lxc/patches/025-remove-unsupported-option.patch deleted file mode 100644 index cb0a9f0..0000000 --- a/utils/lxc/patches/025-remove-unsupported-option.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/templates/lxc-download.in -+++ b/templates/lxc-download.in -@@ -494,15 +494,7 @@ fi - # Unpack the rootfs - echo "Unpacking the rootfs" - --EXCLUDES="" --excludelist=$(relevant_file excludes) --if [ -f "${excludelist}" ]; then -- while read line; do -- EXCLUDES="$EXCLUDES --exclude=$line" -- done < $excludelist --fi -- --tar --anchored ${EXCLUDES} --numeric-owner -xpJf \ -+tar --numeric-owner -xpJf \ - ${LXC_CACHE_PATH}/rootfs.tar.xz -C ${LXC_ROOTFS} - - mkdir -p ${LXC_ROOTFS}/dev/pts/ diff --git a/utils/lxc/patches/030-lxc-download.patch b/utils/lxc/patches/030-lxc-download.patch deleted file mode 100644 index 295bae0..0000000 --- a/utils/lxc/patches/030-lxc-download.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- a/templates/lxc-download.in -+++ b/templates/lxc-download.in -@@ -39,7 +39,7 @@ DOWNLOAD_LIST_IMAGES="false" - DOWNLOAD_MODE="system" - DOWNLOAD_READY_GPG="false" - DOWNLOAD_RELEASE= --DOWNLOAD_SERVER="images.linuxcontainers.org" -+DOWNLOAD_SERVER="virtualwrt.org/containers/" - DOWNLOAD_SHOW_GPG_WARNING="true" - DOWNLOAD_SHOW_HTTP_WARNING="true" - DOWNLOAD_TARGET="system" -@@ -257,14 +257,6 @@ for bin in tar xz wget; do - fi - done - --# Check for GPG --if [ "$DOWNLOAD_VALIDATE" = "true" ]; then -- if ! type gpg >/dev/null 2>&1; then -- echo "ERROR: Missing recommended tool: gpg" 1>&2 -- echo "You can workaround this by using --no-validate." 1>&2 -- exit 1 -- fi --fi - - # Check that we have all variables we need - if [ -z "$LXC_NAME" ] || [ -z "$LXC_PATH" ] || [ -z "$LXC_ROOTFS" ]; then -@@ -456,16 +448,9 @@ if [ "$DOWNLOAD_USE_CACHE" = "false" ]; - echo "Downloading the rootfs" - download_file $DOWNLOAD_URL/rootfs.tar.xz \ - ${DOWNLOAD_TEMP}/rootfs.tar.xz normal -- download_sig $DOWNLOAD_URL/rootfs.tar.xz.asc \ -- ${DOWNLOAD_TEMP}/rootfs.tar.xz.asc normal -- gpg_validate ${DOWNLOAD_TEMP}/rootfs.tar.xz.asc -- - echo "Downloading the metadata" - download_file $DOWNLOAD_URL/meta.tar.xz \ - ${DOWNLOAD_TEMP}/meta.tar.xz normal -- download_sig $DOWNLOAD_URL/meta.tar.xz.asc \ -- ${DOWNLOAD_TEMP}/meta.tar.xz.asc normal -- gpg_validate ${DOWNLOAD_TEMP}/meta.tar.xz.asc - - if [ -d $LXC_CACHE_PATH ]; then - rm -Rf $LXC_CACHE_PATH diff --git a/utils/lxc/patches/035-fix-undefined-lfd.patch b/utils/lxc/patches/035-fix-undefined-lfd.patch deleted file mode 100644 index 42e194c..0000000 --- a/utils/lxc/patches/035-fix-undefined-lfd.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/lxc/bdev.c -+++ b/src/lxc/bdev.c -@@ -1939,7 +1939,7 @@ static int find_free_loopdev(int *retfd, - - static int loop_mount(struct bdev *bdev) - { -- int lfd, ffd = -1, ret = -1; -+ int lfd = -1, ffd = -1, ret = -1; - struct loop_info64 lo; - char loname[100]; - -@@ -1977,7 +1977,7 @@ out: - if (ffd > -1) - close(ffd); - if (ret < 0) { -- close(lfd); -+ if (lfd > -1) close(lfd); - bdev->lofd = -1; - } - return ret; diff --git a/utils/macchanger/Makefile b/utils/macchanger/Makefile deleted file mode 100644 index 2bfcbbf..0000000 --- a/utils/macchanger/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=macchanger -PKG_VERSION:=1.7.0 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/alobbs/macchanger/releases/download/$(PKG_VERSION)/ -PKG_MD5SUM:=ca56f16142914337391dac91603eb332 - -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/macchanger - SECTION:=utils - CATEGORY:=Utilities - TITLE:=utility for viewing/manipulating the MAC address - URL:=https://github.com/alobbs/macchanger/ -endef - -define Package/macchanger/description - This is a GNU/Linux utility for viewing/manipulating the MAC address - of network interfaces. -endef - -define Package/macchanger/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/macchanger $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/share - $(CP) $(PKG_INSTALL_DIR)/usr/share/macchanger $(1)/usr/share/ -endef - -$(eval $(call BuildPackage,macchanger)) diff --git a/utils/macchanger/patches/0001-fix-build-with-musl.patch b/utils/macchanger/patches/0001-fix-build-with-musl.patch deleted file mode 100644 index 4a30d55..0000000 --- a/utils/macchanger/patches/0001-fix-build-with-musl.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: macchanger-1.7.0/src/netinfo.c -=================================================================== ---- macchanger-1.7.0.orig/src/netinfo.c -+++ macchanger-1.7.0/src/netinfo.c -@@ -113,7 +113,7 @@ mc_net_info_get_permanent_mac (const net - epa->size = IFHWADDRLEN; - - memcpy(&req, &(net->dev), sizeof(struct ifreq)); -- req.ifr_data = (caddr_t)epa; -+ req.ifr_data = (char *)epa; - - if (ioctl(net->sock, SIOCETHTOOL, &req) < 0) { - perror ("[ERROR] Could not read permanent MAC"); diff --git a/utils/mbtools/Makefile b/utils/mbtools/Makefile deleted file mode 100644 index 109adc6..0000000 --- a/utils/mbtools/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mbtools - -PKG_VERSION:=2014-10-29 -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/webstack/mbtools -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=149e9c69cec180f18cf8781cf5285b97352bf719 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -PKG_MAINTAINER:=Daniel Golle -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/mbtools - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Modbus tools - DEPENDS:=+glib2 +libmodbus $(INTL_DEPENDS) -endef - -define Package/mbtools/description - Modbus tools based on libmodbus to log data fetched by a master/client or - received by a slave/server (writing of registers). mbcollect is able to act - as client or server (in TCP or RTU) -endef - -ifneq ($(INTL_FULL),) -TARGET_LDFLAGS += \ - -L$(INTL_PREFIX)/lib \ - -Wl,-rpath-link=$(STAGING_DIR)/usr/lib - -endif - -define Package/mbtools/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbrecorder $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbcollect $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_BUILD_DIR)/src/mbcollect.ini $(1)/etc -endef - -$(eval $(call BuildPackage,mbtools)) diff --git a/utils/mbtools/patches/100-fix-unit-test-server-return-value.patch b/utils/mbtools/patches/100-fix-unit-test-server-return-value.patch deleted file mode 100644 index 1ad7c12..0000000 --- a/utils/mbtools/patches/100-fix-unit-test-server-return-value.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: mbtools-2014-10-29/tests/unit-test-server.c -=================================================================== ---- mbtools-2014-10-29.orig/tests/unit-test-server.c -+++ mbtools-2014-10-29/tests/unit-test-server.c -@@ -117,4 +117,5 @@ int main(int argc, char *argv[]) - } - printf("Quit the loop: %s\n", modbus_strerror(errno)); - signal_handler(0); -+ return 0; - } diff --git a/utils/mc/Config.in b/utils/mc/Config.in deleted file mode 100644 index b2c5794..0000000 --- a/utils/mc/Config.in +++ /dev/null @@ -1,59 +0,0 @@ -menu "Configuration" - depends on PACKAGE_mc - -config MC_DIFFVIEWER - bool "Enable internal diff viewer" - default n - help - This option enables the built-in diff viewer. - Disabled by default. - -config MC_EDITOR - bool "Enable internal editor" - default y - help - This option enables the built-in file editor. - Enabled by default. - -config MC_SUBSHELL - bool "Enable concurrent subshell" - default y - help - This option enables concurrent subshell support. - Enabled by default. - -config MC_LARGEFILE - bool "Enable largefile support" - default n - help - This option enables support for large files (> 2 GB). - Disabled by default. - -config MC_BACKGROUND - bool "Enable background operations" - default n - help - This option enables support for background operations which - allow to perform some tasks such as copying files in a - separate background process. Background code is known - to be less stable than the rest of the code. - Disabled by default. - -config MC_CHARSET - bool "Enable charset support" - default y - help - This option adds support for selecting character set of the text in - the internal viewer and editor and converting it on the fly. - Enabled by default. - -config MC_VFS - bool "Enable virtual filesystem support" - default n - help - This option enables the Virtual File System switch code to get - transparent access to the following file systems: - cpio, tar, fish, sfs, ftp, sftp, extfs, smb. - Disabled by default. - -endmenu diff --git a/utils/mc/Makefile b/utils/mc/Makefile deleted file mode 100644 index cca1123..0000000 --- a/utils/mc/Makefile +++ /dev/null @@ -1,127 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mc -PKG_VERSION:=4.8.18 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Dirk Brenken -PKG_LICENSE:=GPL-3.0+ - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://ftp.midnight-commander.org/ -PKG_MD5SUM:=f7636815c987c1719c4f5de2dcd156a0e7d097b1d10e4466d2bdead343d5bece -PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf gettext-version - -PKG_CONFIG_DEPENDS := \ - CONFIG_PACKAGE_MC \ - CONFIG_MC_DIFFVIEWER \ - CONFIG_MC_EDITOR \ - CONFIG_MC_SUBSHELL \ - CONFIG_MC_LARGEFILE \ - CONFIG_MC_BACKGROUND \ - CONFIG_MC_CHARSET \ - CONFIG_MC_VFS - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/$(PKG_NAME) - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+glib2 +libncurses +libmount +MC_VFS:libssh2 $(LIBRPC_DEPENDS) $(ICONV_DEPENDS) - TITLE:=Midnight Commander - a powerful visual file manager - URL:=https://www.midnight-commander.org/ - MENU:=1 -endef - -define Package/$(PKG_NAME)/config - source "$(SOURCE)/Config.in" -endef - -define Package/$(PKG_NAME)/description -GNU Midnight Commander is a visual file manager. -It's a feature rich full-screen text mode application that allows you to copy, -move and delete files and whole directory trees, search for files and run commands in the subshell. -Internal viewer and editor are included as well. - -endef - -CONFIGURE_ARGS += \ - --disable-doxygen-doc \ - --with-homedir=/etc/mc \ - --with-screen=ncurses \ - --without-gpm-mouse \ - --without-x \ - -CONFIGURE_VARS += \ - ac_cv_search_addwstr=no \ - -ifeq ($(CONFIG_MC_DIFFVIEWER),) -CONFIGURE_ARGS += \ - --without-diff-viewer -endif - -ifeq ($(CONFIG_MC_EDITOR),) -CONFIGURE_ARGS += \ - --without-internal-edit -endif - -ifeq ($(CONFIG_MC_SUBSHELL),) -CONFIGURE_ARGS += \ - --without-subshell -endif - -ifeq ($(CONFIG_MC_LARGEFILE),) -CONFIGURE_ARGS += \ - --disable-largefile -endif - -ifeq ($(CONFIG_MC_BACKGROUND),) -CONFIGURE_ARGS += \ - --disable-background -endif - -ifeq ($(CONFIG_MC_CHARSET),) -CONFIGURE_ARGS += \ - --disable-charset -endif - -ifeq ($(CONFIG_MC_VFS),) -CONFIGURE_ARGS += \ - --disable-vfs -endif - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mc $(1)/usr/bin - $(INSTALL_DIR) $(1)/etc/mc - $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.charsets $(1)/etc/mc - $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.default.keymap $(1)/etc/mc - $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.ext $(1)/etc/mc - $(INSTALL_DIR) $(1)/usr/share/mc/help - $(INSTALL_DATA) $(PKG_BUILD_DIR)/doc/hlp/mc.hlp $(1)/usr/share/mc/help -ifeq ($(CONFIG_MC_DIFFVIEWER),y) - ln -sf mc $(1)/usr/bin/mcdiff -endif -ifeq ($(CONFIG_MC_EDITOR),y) - ln -sf mc $(1)/usr/bin/mcedit -endif - $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/mc.menu $(1)/etc/mc - $(INSTALL_DIR) $(1)/etc/mc/skins - $(INSTALL_DATA) $(PKG_BUILD_DIR)/misc/skins/default.ini $(1)/etc/mc/skins - $(INSTALL_DIR) $(1)/etc/mc/mcedit/Syntax -endef - -define Package/$(PKG_NAME)/conffiles -/etc/mc/mc.menu -/etc/mc/skins/default.ini -endef - -$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/utils/mc/patches/010-subshell.patch b/utils/mc/patches/010-subshell.patch deleted file mode 100644 index bd7ee35..0000000 --- a/utils/mc/patches/010-subshell.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/subshell/common.c -+++ b/src/subshell/common.c -@@ -849,7 +849,7 @@ init_subshell_precmd (char *precmd, size - "else " - "[ \"${PWD##$HOME/}\" = \"$PWD\" ] && MC_PWD=\"$PWD\" || MC_PWD=\"~/${PWD##$HOME/}\"; " - "fi; " -- "echo \"$USER@$(hostname -s):$MC_PWD\"; " -+ "echo \"$USER@$HOSTNAME:$MC_PWD\"; " - "pwd>&%d; " - "kill -STOP $$; " - "}; " "PRECMD=precmd; " "PS1='$($PRECMD)$ '\n", subshell_pipe[WRITE]); diff --git a/utils/minicom/Makefile b/utils/minicom/Makefile deleted file mode 100644 index b588993..0000000 --- a/utils/minicom/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=minicom -PKG_VERSION:=2.7 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/3977/ -PKG_MD5SUM:=7044ca3e291268c33294f171d426dc2d -PKG_MAINTAINER:=Álvaro Fernández Rojas - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/nls.mk -include $(INCLUDE_DIR)/package.mk - -define Package/minicom - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) +libncurses - TITLE:=Terminal emulation program - URL:=http://alioth.debian.org/projects/minicom/ - SUBMENU:=Terminal -endef - -define Package/minicom/conffiles -/etc/minirc.dfl -endef - -define Package/minicom/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ascii-xfr $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,minicom)) diff --git a/utils/minicom/patches/100-fix_iconv_include.patch b/utils/minicom/patches/100-fix_iconv_include.patch deleted file mode 100644 index 88190fa..0000000 --- a/utils/minicom/patches/100-fix_iconv_include.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/src/minicom.c -+++ b/src/minicom.c -@@ -31,7 +31,9 @@ - #include - #include - #include -+#ifdef HAVE_ICONV - #include -+#endif - #include - - #define EXTERN diff --git a/utils/minicom/patches/101-fix_music_includes.patch b/utils/minicom/patches/101-fix_music_includes.patch deleted file mode 100644 index a74d123..0000000 --- a/utils/minicom/patches/101-fix_music_includes.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/dial.c -+++ b/src/dial.c -@@ -39,11 +39,9 @@ - #include "intl.h" - - #ifdef VC_MUSIC --# if defined(__GLIBC__) - # include - # include - # include --# endif - #endif - - enum { CURRENT_VERSION = 6 }; diff --git a/utils/minicom/patches/102-fix_musl_compatibility.patch b/utils/minicom/patches/102-fix_musl_compatibility.patch deleted file mode 100644 index 4524b22..0000000 --- a/utils/minicom/patches/102-fix_musl_compatibility.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/getsdir.h -+++ b/src/getsdir.h -@@ -24,6 +24,10 @@ - - #include - -+#ifndef MAXNAMLEN -+#define MAXNAMLEN 255 -+#endif -+ - typedef struct dirEntry { /* structure of data item */ - char fname[MAXNAMLEN + 1]; /* filename + terminating null */ - time_t time; /* last modification date */ diff --git a/utils/mktorrent/Makefile b/utils/mktorrent/Makefile deleted file mode 100644 index 2e23e23..0000000 --- a/utils/mktorrent/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mktorrent -PKG_VERSION:=1.0 -PKG_RELEASE:=1 -PKG_MAINTAINER:=Daniel Golle -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://downloads.sourceforge.net/$(PKG_NAME)/ -PKG_MD5SUM:=0da00209da96a0dc39efbb6eb5b4d8ff - -include $(INCLUDE_DIR)/package.mk - -define Package/mktorrent - SUBMENU:=BitTorrent - SECTION:=net - CATEGORY:=Network - TITLE:=mktorrent - URL:=http://mktorrent.sourceforge.net/ -endef - -define Package/mktorrent/Description - mktorrent is a simple command line utility to create BitTorrent metainfo files. -endef - - -define Package/mktorrent/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mktorrent $(1)/usr/bin -endef - -$(eval $(call BuildPackage,mktorrent)) diff --git a/utils/mmc-utils/Makefile b/utils/mmc-utils/Makefile deleted file mode 100644 index 9e1d70e..0000000 --- a/utils/mmc-utils/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mmc-utils -PKG_VERSION=2016-09-11-$(PKG_SOURCE_VERSION) -PKG_RELEASE:=2 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git -PKG_SOURCE_VERSION:=2cb6695e8dec00d887bdd5309d1b57d836fcd214 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:= - -PKG_MAINTAINER:=Michael Heimpold - -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/mmc-utils - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Userspace tools for MMC/SD devices - URL:=http://git.kernel.org/cgit/linux/kernel/git/cjb/mmc-utils.git -endef - -define Package/mmc-utils/description - This package contains the userspace mmc utils, the userspace - counterpart to the Linux MMC/SD subsystem. -endef - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" \ - mmc -endef - -define Package/mmc-utils/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mmc $(1)/sbin -endef - -$(eval $(call BuildPackage,mmc-utils)) diff --git a/utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch b/utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch deleted file mode 100644 index 1a20813..0000000 --- a/utils/mmc-utils/patches/001-properly-set-fortify-source-in-makefile.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -1,5 +1,5 @@ - CC ?= gcc --AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -+AM_CFLAGS = -D_FILE_OFFSET_BITS=64 - CFLAGS ?= -g -O2 - objects = \ - mmc.o \ diff --git a/utils/mmc-utils/patches/002-mmc-ll64.patch b/utils/mmc-utils/patches/002-mmc-ll64.patch deleted file mode 100644 index 7484780..0000000 --- a/utils/mmc-utils/patches/002-mmc-ll64.patch +++ /dev/null @@ -1,12 +0,0 @@ -Sent already upstream, no response yet. - ---- a/mmc.h 2016-09-11 18:01:53.000000000 +0200 -+++ b/mmc.h 2016-09-23 23:41:02.462632858 +0200 -@@ -17,7 +17,6 @@ - * those modifications are Copyright (c) 2016 SanDisk Corp. - */ - --#include - #include - #include - diff --git a/utils/mpack/Makefile b/utils/mpack/Makefile deleted file mode 100644 index c2b77eb..0000000 --- a/utils/mpack/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (C) 2007-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mpack -PKG_VERSION:=1.6 -PKG_RELEASE:=1 -PKG_LICENSE:=NLPL - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://ftp.andrew.cmu.edu/pub/mpack/ -PKG_MD5SUM:=a70fa5afa76539a9afb70b9d81568fe8 - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/mpack - SECTION:=utils - CATEGORY:=Utilities - TITLE:=mpack/munpack MIME format mail messages - URL:=http://ftp.andrew.cmu.edu/pub/mpack/ - MAINTAINER:=Dmitry V. Zimin -endef - -define Package/mpack/description - Mpack and munpack are utilities for encoding and decoding - (respectively) binary files in MIME (Multipurpose Internet Mail - Extensions) format mail messages. For compatibility with older forms - of transferring binary files, the munpack program can also decode - messages in split-uuencoded format. -endef - -define Package/mpack/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,mpack)) - diff --git a/utils/mt-st/Makefile b/utils/mt-st/Makefile deleted file mode 100644 index 45056eb..0000000 --- a/utils/mt-st/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=mt-st -PKG_VERSION:=1.1 -PKG_RELEASE:=1 - -PKG_SOURCE_SUBDIR:=$(PKG_NAME) -PKG_SOURCE_VERSION:=$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz -PKG_SOURCE_URL:=ftp://ftp.ibiblio.org/pub/Linux/system/backup/ -PKG_MD5SUM:=fdd5f5ec673c9f630a102ceff7612774 - -PKG_LICENSE:=GPL-2.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/mt-st - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Magnetic tape control tools for Linux SCSI tapes - URL:=http://ftp.ibiblio.org/pub/Linux/system/backup/ - MAINTAINER:=Giuseppe Magnotta -endef - -define Package/mt-st/description - Includes a mt-like program supporting additional commands using ioctls - specific to the Linux SCSI tape driver (up to kernel 2.6.26), and the program - stinit to define the SCSI tape devices in system startup scripts. -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ - CC="$(TARGET_CC)" -endef - -define Package/mt-st/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/mt $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/stinit $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,mt-st)) diff --git a/utils/mysql/Makefile b/utils/mysql/Makefile deleted file mode 100644 index c842230..0000000 --- a/utils/mysql/Makefile +++ /dev/null @@ -1,189 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/uclibc++.mk - -PKG_NAME:=mysql -PKG_VERSION:=5.1.73 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=\ - http://mysql.he.net/Downloads/MySQL-5.1/ \ - http://www.linorg.usp.br/mysql/Downloads/MySQL-5.1/ \ - http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.1/ \ - http://mirror.switch.ch/ftp/mirror/mysql/Downloads/MySQL-5.1/ - -PKG_MD5SUM:=887f869bcc757957067b9198f707f32f -PKG_MAINTAINER:=Jo-Philipp Wich -PKG_LICENSE:=GPL-2.0 - -PKG_BUILD_DEPENDS:=libncurses libreadline -PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 - -PKG_FIXUP:=libtool - -include $(INCLUDE_DIR)/package.mk - -define Package/libmysqlclient/Default - SECTION:=libs - CATEGORY:=Libraries - DEPENDS:=$(CXX_DEPENDS) +zlib - TITLE:=MySQL client library - URL:=http://dev.mysql.com/ -endef - -define Package/mysql-server - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libmysqlclient +libpthread +libncursesw +libreadline - TITLE:=MySQL Server - URL:=http://dev.mysql.com/ - SUBMENU:=database -endef - -define Package/libmysqlclient - $(call Package/libmysqlclient/Default) -endef - -define Package/libmysqlclient-r - $(call Package/libmysqlclient/Default) - TITLE += threadsafe - DEPENDS+= +libpthread -endef - -ifneq ($(CONFIG_USE_UCLIBCXX),) - TARGET_CXX=g++-uc -endif - -TARGET_CFLAGS += $(FPIC) - -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - --enable-thread-safe-client \ - --disable-assembler \ - --with-pthread \ - --with-server \ - --without-mysqlmanager \ - --with-mysqld-user=root \ - --with-unix-socket-path=/tmp \ - --without-libwrap \ - --with-low-memory \ - --without-embedded-server \ - --without-query-cache \ - --without-ssl \ - --without-docs \ - --without-man \ - --without-readline \ - --without-debug \ - --with-named-thread-libs=-lpthread - -CONFIGURE_VARS += \ - mysql_cv_compress=yes \ - mysql_cv_gethostname_style=glibc2 \ - mysql_cv_gcc_atomic_builtins=yes \ - mysql_cv_gcc_atomic_builtins_pthread_t=yes \ - ac_cv_c_stack_direction=-1 - -define Build/Compile - +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \ - SUBDIRS="include" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - SUBDIRS="include" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - g++ -I $(PKG_BUILD_DIR)/include \ - -o $(PKG_BUILD_DIR)/sql/gen_lex_hash \ - $(PKG_BUILD_DIR)/sql/gen_lex_hash.cc - +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)/libmysql" \ - CC="g++" \ - CFLAGS="$(HOST_CFLAGS)" \ - CPPFLAGS="$(HOST_CFLAGS)" \ - LDFLAGS="$(HOST_LDFLAGS)" \ - conf_to_src - +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \ - SUBDIRS="libmysql" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - SUBDIRS="libmysql" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \ - SUBDIRS="libmysql_r" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - SUBDIRS="libmysql_r" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - SUBDIRS="scripts" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - bin_SCRIPTS="mysql_config" \ - install - +$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - all - $(MAKE) -C "$(PKG_BUILD_DIR)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - install -endef - - -define Build/InstallDev - $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(1)/usr/bin/ - ln -sf $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include/ - # NOTE: needed for MySQL-Python - $(CP) $(PKG_BUILD_DIR)/include/mysqld_error.h $(1)/usr/include/mysql/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql $(1)/usr/lib/ - rm -f $(1)/usr/lib/mysql/libmysqlclient.la -endef - -define Package/libmysqlclient/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient.so.* $(1)/usr/lib/ -endef -define Package/libmysqlclient-r/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/mysql/libmysqlclient_r.so.* $(1)/usr/lib/ -endef - -define Package/mysql-server/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/mysqld $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/myisamchk $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysqladmin $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysqldump $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_install_db $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/my_print_defaults $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) files/mysqld.init $(1)/etc/init.d/mysqld - $(INSTALL_CONF) conf/my.cnf $(1)/etc/ - $(INSTALL_DIR) $(1)/usr/share/mysql - $(INSTALL_DIR) $(1)/usr/share/mysql/english - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/english/errmsg.sys $(1)/usr/share/mysql/english - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/fill_help_tables.sql $(1)/usr/share/mysql/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables.sql $(1)/usr/share/mysql/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables_data.sql $(1)/usr/share/mysql/ -endef - -define Package/mysql-server/conffiles -/etc/my.cnf -endef - -$(eval $(call BuildPackage,mysql-server)) -$(eval $(call BuildPackage,libmysqlclient)) -$(eval $(call BuildPackage,libmysqlclient-r)) diff --git a/utils/mysql/conf/my.cnf b/utils/mysql/conf/my.cnf deleted file mode 100644 index ec2ade2..0000000 --- a/utils/mysql/conf/my.cnf +++ /dev/null @@ -1,54 +0,0 @@ -[client] -port = 3306 -socket = /var/run/mysqld.sock - -[mysqld] -user = root -socket = /var/run/mysqld.sock -port = 3306 -basedir = /usr - -############ Don't put this on the NAND ############# -# Figure out where you are going to put the databases -# And run mysql_install_db --force -datadir = /mnt/data/mysql/ - -######### This should also not go on the NAND ####### -tmpdir = /mnt/data/tmp/ - -skip-external-locking - -bind-address = 127.0.0.1 - -# Fine Tuning -key_buffer = 16M -max_allowed_packet = 16M -thread_stack = 192K -thread_cache_size = 8 - -# Here you can see queries with especially long duration -#log_slow_queries = /var/log/mysql/mysql-slow.log -#long_query_time = 2 -#log-queries-not-using-indexes - -# The following can be used as easy to replay backup logs or for replication. -#server-id = 1 -#log_bin = /var/log/mysql/mysql-bin.log -#expire_logs_days = 10 -#max_binlog_size = 100M -#binlog_do_db = include_database_name -#binlog_ignore_db = include_database_name - - -[mysqldump] -quick -quote-names -max_allowed_packet = 16M - -[mysql] -#no-auto-rehash # faster start of mysql but no tab completition - -[isamchk] -key_buffer = 16M - - diff --git a/utils/mysql/files/mysqld.init b/utils/mysql/files/mysqld.init deleted file mode 100644 index 98c8c65..0000000 --- a/utils/mysql/files/mysqld.init +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2010-2011 OpenWrt.org - -START=95 -STOP=10 - -SERVICE_DAEMONIZE=1 -SERVICE_WRITE_PID=1 -SERVICE_STOP_TIME=9 -PROG='/usr/bin/mysqld' - -start() { - local conf='/etc/my.cnf' - local datadir="$( sed -nE "s/^\s*datadir\s*=\s*('([^']*)'|\x22([^\x22]*)\x22|(.*\S))\s*$/\2\3\4/p" "$conf" )" - - [ -d "$datadir" ] || { - logger -s "[ERROR] datadir '$datadir' in '$conf' does not exist" - return 1 - } - - [ -f "$datadir/mysql/tables_priv.MYD" ] || { - logger -s "[ERROR] can not detect privileges table, you might need to" - logger -s "run 'mysql_install_db --force' to initialize the system tables" - return 1 - } - - service_start "$PROG" -} - -stop() { - service_stop "$PROG" -} diff --git a/utils/mysql/patches/100-fix_hostname.patch b/utils/mysql/patches/100-fix_hostname.patch deleted file mode 100644 index faedc27..0000000 --- a/utils/mysql/patches/100-fix_hostname.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/scripts/mysql_install_db.sh -+++ b/scripts/mysql_install_db.sh -@@ -322,7 +322,7 @@ then - fi - - # Try to determine the hostname --hostname=`@HOSTNAME@` -+hostname=`cat /proc/sys/kernel/hostname` - - # Check if hostname is valid - if test "$cross_bootstrap" -eq 0 -a "$in_rpm" -eq 0 -a "$force" -eq 0 diff --git a/utils/mysql/patches/110-cross_compile.patch b/utils/mysql/patches/110-cross_compile.patch deleted file mode 100644 index 85d2591..0000000 --- a/utils/mysql/patches/110-cross_compile.patch +++ /dev/null @@ -1,179 +0,0 @@ ---- a/storage/innodb_plugin/plug.in -+++ b/storage/innodb_plugin/plug.in -@@ -56,10 +56,8 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ - esac - AC_SUBST(INNODB_DYNAMIC_CFLAGS) - -- AC_MSG_CHECKING(whether GCC atomic builtins are available) -- # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not -- AC_TRY_RUN( -- [ -+ AC_CACHE_CHECK([whether GCC atomic builtins are available], -+ [mysql_cv_gcc_atomic_builtins], [AC_TRY_RUN([ - int main() - { - long x; -@@ -96,21 +94,18 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ - - return(0); - } -- ], -- [ -- AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1], -- [GCC atomic builtins are available]) -- AC_MSG_RESULT(yes) -- ], -- [ -- AC_MSG_RESULT(no) -- ] -- ) -+ ], [mysql_cv_gcc_atomic_builtins=yes], -+ [mysql_cv_gcc_atomic_builtins=no], -+ [mysql_cv_gcc_atomic_builtins=no])]) -+ -+ if test "x$mysql_cv_gcc_atomic_builtins" = xyes; then -+ AC_DEFINE(HAVE_IB_GCC_ATOMIC_BUILTINS, 1, -+ [Define to 1 if compiler provides atomic builtins.]) -+ fi - -- AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins) -- # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not -- AC_TRY_RUN( -- [ -+ -+ AC_CACHE_CHECK([whether pthread_t can be used by GCC atomic builtins], -+ [mysql_cv_gcc_atomic_builtins_pthread_t], [AC_TRY_RUN([ - #include - #include - -@@ -127,16 +122,14 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ - - return(0); - } -- ], -- [ -- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1], -- [pthread_t can be used by GCC atomic builtins]) -- AC_MSG_RESULT(yes) -- ], -- [ -- AC_MSG_RESULT(no) -- ] -- ) -+ ], [mysql_cv_gcc_atomic_builtins_pthread_t=yes], -+ [mysql_cv_gcc_atomic_builtins_pthread_t=no], -+ [mysql_cv_gcc_atomic_builtins_pthread_t=no])]) -+ -+ if test "x$mysql_cv_gcc_atomic_builtins_pthread_t" = xyes; then -+ AC_DEFINE(HAVE_IB_ATOMIC_PTHREAD_T_GCC, 1, -+ [Define to 1 if pthread_t can be used by GCC atomic builtins]) -+ fi - - AC_MSG_CHECKING(whether Solaris libc atomic functions are available) - # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following -@@ -156,7 +149,6 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ - AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1], - [Define to 1 if Solaris libc atomic functions are available] - ) -- fi - - AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions) - # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not -@@ -230,6 +222,8 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ - AC_MSG_RESULT(no) - ] - ) -+ fi -+ - ]) - - # vim: set ft=config: ---- a/sql/gen_lex_hash.cc -+++ b/sql/gen_lex_hash.cc -@@ -344,55 +344,6 @@ void print_find_structs() - } - - --static void usage(int version) --{ -- printf("%s Ver 3.6 Distrib %s, for %s (%s)\n", -- my_progname, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); -- if (version) -- return; -- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000")); -- puts("This program generates a perfect hashing function for the sql_lex.cc"); -- printf("Usage: %s [OPTIONS]\n\n", my_progname); -- my_print_help(my_long_options); --} -- -- --extern "C" my_bool --get_one_option(int optid, const struct my_option *opt __attribute__((unused)), -- char *argument __attribute__((unused))) --{ -- switch(optid) { -- case 'V': -- usage(1); -- exit(0); -- case 'I': -- case '?': -- usage(0); -- exit(0); -- case '#': -- DBUG_PUSH(argument ? argument : default_dbug_option); -- break; -- } -- return 0; --} -- -- --static int get_options(int argc, char **argv) --{ -- int ho_error; -- -- if ((ho_error= handle_options(&argc, &argv, my_long_options, get_one_option))) -- exit(ho_error); -- -- if (argc >= 1) -- { -- usage(0); -- exit(1); -- } -- return(0); --} -- -- - int check_dup_symbols(SYMBOL *s1, SYMBOL *s2) - { - if (s1->length!=s2->length || strncmp(s1->name,s2->name,s1->length)) -@@ -443,12 +394,6 @@ int check_duplicates() - - int main(int argc,char **argv) - { -- MY_INIT(argv[0]); -- DBUG_PROCESS(argv[0]); -- -- if (get_options(argc,(char **) argv)) -- exit(1); -- - /* Broken up to indicate that it's not advice to you, gentle reader. */ - printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n"); - -@@ -549,7 +494,6 @@ static SYMBOL *get_hash_symbol(const cha - }\n\ - }\n" - ); -- my_end(0); - exit(0); - } - ---- a/sql/Makefile.am -+++ b/sql/Makefile.am -@@ -26,7 +26,6 @@ INCLUDES = @ZLIB_INCLUDES@ \ - WRAPLIBS= @WRAPLIBS@ - SUBDIRS = share - libexec_PROGRAMS = mysqld --EXTRA_PROGRAMS = gen_lex_hash - bin_PROGRAMS = mysql_tzinfo_to_sql - - noinst_LTLIBRARIES= libndb.la \ diff --git a/utils/mysql/patches/120-bison-compat.patch b/utils/mysql/patches/120-bison-compat.patch deleted file mode 100644 index 6c9ac94..0000000 --- a/utils/mysql/patches/120-bison-compat.patch +++ /dev/null @@ -1,3290 +0,0 @@ ---- a/sql/sql_lex.cc -+++ b/sql/sql_lex.cc -@@ -775,14 +775,13 @@ bool consume_comment(Lex_input_stream *l - (which can't be followed by a signed number) - */ - --int MYSQLlex(void *arg, void *yythd) -+int MYSQLlex(void *arg, THD *thd) - { - reg1 uchar c= 0; - bool comment_closed; - int tokval, result_state; - uint length; - enum my_lex_states state; -- THD *thd= (THD *)yythd; - Lex_input_stream *lip= & thd->m_parser_state->m_lip; - LEX *lex= thd->lex; - YYSTYPE *yylval=(YYSTYPE*) arg; ---- a/sql/sql_lex.h -+++ b/sql/sql_lex.h -@@ -2072,7 +2072,7 @@ extern void lex_init(void); - extern void lex_free(void); - extern void lex_start(THD *thd); - extern void lex_end(LEX *lex); --extern int MYSQLlex(void *arg, void *yythd); -+extern int MYSQLlex(void *arg, THD *thd); - - extern void trim_whitespace(CHARSET_INFO *cs, LEX_STRING *str); - ---- a/sql/sql_parse.cc -+++ b/sql/sql_parse.cc -@@ -8012,7 +8012,7 @@ bool check_host_name(LEX_STRING *str) - } - - --extern int MYSQLparse(void *thd); // from sql_yacc.cc -+extern int MYSQLparse(THD *thd); // from sql_yacc.cc - - - /** ---- a/sql/sql_yacc.yy -+++ b/sql/sql_yacc.yy -@@ -25,17 +25,15 @@ - %{ - /* thd is passed as an argument to yyparse(), and subsequently to yylex(). - ** The type will be void*, so it must be cast to (THD*) when used. --** Use the YYTHD macro for this. -+** Use the thd macro for this. - */ --#define YYPARSE_PARAM yythd --#define YYLEX_PARAM yythd --#define YYTHD ((THD *)yythd) --#define YYLIP (& YYTHD->m_parser_state->m_lip) -+#define YYLIP (& thd->m_parser_state->m_lip) -+#define YYPS (& thd->m_parser_state->m_yacc) - - #define MYSQL_YACC - #define YYINITDEPTH 100 - #define YYMAXDEPTH 3200 /* Because of 64K stack */ --#define Lex (YYTHD->lex) -+#define Lex (thd->lex) - #define Select Lex->current_select - #include "mysql_priv.h" - #include "slave.h" -@@ -64,7 +62,7 @@ const LEX_STRING null_lex_str= {0,0}; - ulong val= *(F); \ - if (my_yyoverflow((B), (D), &val)) \ - { \ -- yyerror((char*) (A)); \ -+ yyerror(current_thd, (char*) (A)); \ - return 2; \ - } \ - else \ -@@ -76,7 +74,7 @@ const LEX_STRING null_lex_str= {0,0}; - #define MYSQL_YYABORT \ - do \ - { \ -- LEX::cleanup_lex_after_parse_error(YYTHD);\ -+ LEX::cleanup_lex_after_parse_error(thd); \ - YYABORT; \ - } while (0) - -@@ -159,10 +157,8 @@ void my_parse_error(const char *s) - to abort from the parser. - */ - --void MYSQLerror(const char *s) -+void MYSQLerror(THD *thd, const char *s) - { -- THD *thd= current_thd; -- - /* - Restore the original LEX if it was replaced when parsing - a stored procedure. We must ensure that a parsing error -@@ -675,7 +671,10 @@ static bool add_create_index (LEX *lex, - bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); - %} - --%pure_parser /* We have threads */ -+/* We have threads */ -+%define api.pure -+%parse-param { THD *thd } -+%lex-param { THD *thd } - /* - Currently there are 169 shift/reduce conflicts. - We should not introduce new conflicts any more. -@@ -1516,7 +1515,6 @@ rule: <-- starts at col 1 - query: - END_OF_INPUT - { -- THD *thd= YYTHD; - if (!thd->bootstrap && - (!(thd->lex->select_lex.options & OPTION_FOUND_COMMENT))) - { -@@ -1530,7 +1528,7 @@ query: - { - Lex_input_stream *lip = YYLIP; - -- if ((YYTHD->client_capabilities & CLIENT_MULTI_QUERIES) && -+ if ((thd->client_capabilities & CLIENT_MULTI_QUERIES) && - ! lip->stmt_prepare_mode && - ! lip->eof()) - { -@@ -1626,7 +1624,6 @@ statement: - deallocate: - deallocate_or_drop PREPARE_SYM ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - lex->sql_command= SQLCOM_DEALLOCATE_PREPARE; - lex->prepared_stmt_name= $3; -@@ -1641,7 +1638,6 @@ deallocate_or_drop: - prepare: - PREPARE_SYM ident FROM prepare_src - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - lex->sql_command= SQLCOM_PREPARE; - lex->prepared_stmt_name= $2; -@@ -1651,14 +1647,12 @@ prepare: - prepare_src: - TEXT_STRING_sys - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - lex->prepared_stmt_code= $1; - lex->prepared_stmt_code_is_varref= FALSE; - } - | '@' ident_or_text - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - lex->prepared_stmt_code= $2; - lex->prepared_stmt_code_is_varref= TRUE; -@@ -1668,7 +1662,6 @@ prepare_src: - execute: - EXECUTE_SYM ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - lex->sql_command= SQLCOM_EXECUTE; - lex->prepared_stmt_name= $2; -@@ -1826,7 +1819,6 @@ master_file_def: - create: - CREATE opt_table_options TABLE_SYM opt_if_not_exists table_ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - lex->sql_command= SQLCOM_CREATE_TABLE; - if (!lex->select_lex.add_table_to_list(thd, $5, NULL, -@@ -1844,13 +1836,13 @@ create: - } - create2 - { -- LEX *lex= YYTHD->lex; -+ LEX *lex= thd->lex; - lex->current_select= &lex->select_lex; - if ((lex->create_info.used_fields & HA_CREATE_USED_ENGINE) && - !lex->create_info.db_type) - { -- lex->create_info.db_type= ha_default_handlerton(YYTHD); -- push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN, -+ lex->create_info.db_type= ha_default_handlerton(thd); -+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_WARN_USING_OTHER_HANDLER, - ER(ER_WARN_USING_OTHER_HANDLER), - ha_resolve_storage_engine_name(lex->create_info.db_type), -@@ -1979,7 +1971,6 @@ server_option: - event_tail: - remember_name EVENT_SYM opt_if_not_exists sp_name - { -- THD *thd= YYTHD; - LEX *lex=Lex; - - lex->stmt_definition_begin= $1; -@@ -2046,7 +2037,7 @@ opt_ev_status: - ev_starts: - /* empty */ - { -- Item *item= new (YYTHD->mem_root) Item_func_now_local(); -+ Item *item= new (thd->mem_root) Item_func_now_local(); - if (item == NULL) - MYSQL_YYABORT; - Lex->event_parse_data->item_starts= item; -@@ -2096,7 +2087,6 @@ opt_ev_comment: - - ev_sql_stmt: - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - Lex_input_stream *lip= YYLIP; - -@@ -2139,7 +2129,6 @@ ev_sql_stmt: - } - ev_sql_stmt_inner - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - - /* return back to the original memory root ASAP */ -@@ -2198,11 +2187,10 @@ sp_name: - $$= new sp_name($1, $3, true); - if ($$ == NULL) - MYSQL_YYABORT; -- $$->init_qname(YYTHD); -+ $$->init_qname(thd); - } - | ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - LEX_STRING db; - if (check_routine_name(&$1)) -@@ -2272,7 +2260,7 @@ call: - lex->sql_command= SQLCOM_CALL; - lex->spname= $2; - lex->value_list.empty(); -- sp_add_used_routine(lex, YYTHD, $2, TYPE_ENUM_PROCEDURE); -+ sp_add_used_routine(lex, thd, $2, TYPE_ENUM_PROCEDURE); - } - opt_sp_cparam_list {} - ; -@@ -2345,7 +2333,7 @@ sp_fdparam: - (enum enum_field_types)$3, - sp_param_in); - -- if (lex->sphead->fill_field_definition(YYTHD, lex, -+ if (lex->sphead->fill_field_definition(thd, lex, - (enum enum_field_types) $3, - &spvar->field_def)) - { -@@ -2382,7 +2370,7 @@ sp_pdparam: - (enum enum_field_types)$4, - (sp_param_mode_t)$1); - -- if (lex->sphead->fill_field_definition(YYTHD, lex, -+ if (lex->sphead->fill_field_definition(thd, lex, - (enum enum_field_types) $4, - &spvar->field_def)) - { -@@ -2445,13 +2433,12 @@ sp_decl: - { - LEX *lex= Lex; - -- lex->sphead->reset_lex(YYTHD); -+ lex->sphead->reset_lex(thd); - lex->spcont->declare_var_boundary($2); - } - type - sp_opt_default - { -- THD *thd= YYTHD; - LEX *lex= Lex; - sp_pcontext *pctx= lex->spcont; - uint num_vars= pctx->context_var_count(); -@@ -2477,7 +2464,7 @@ sp_decl: - spvar->type= var_type; - spvar->dflt= dflt_value_item; - -- if (lex->sphead->fill_field_definition(YYTHD, lex, var_type, -+ if (lex->sphead->fill_field_definition(thd, lex, var_type, - &spvar->field_def)) - { - MYSQL_YYABORT; -@@ -2501,7 +2488,7 @@ sp_decl: - } - - pctx->declare_var_boundary(0); -- if (lex->sphead->restore_lex(YYTHD)) -+ if (lex->sphead->restore_lex(thd)) - MYSQL_YYABORT; - $$.vars= $2; - $$.conds= $$.hndlrs= $$.curs= 0; -@@ -2516,7 +2503,7 @@ sp_decl: - my_error(ER_SP_DUP_COND, MYF(0), $2.str); - MYSQL_YYABORT; - } -- if(YYTHD->lex->spcont->push_cond(&$2, $5)) -+ if(thd->lex->spcont->push_cond(&$2, $5)) - MYSQL_YYABORT; - $$.vars= $$.hndlrs= $$.curs= 0; - $$.conds= 1; -@@ -2602,7 +2589,7 @@ sp_decl: - - sp_cursor_stmt: - { -- Lex->sphead->reset_lex(YYTHD); -+ Lex->sphead->reset_lex(thd); - } - select - { -@@ -2618,7 +2605,7 @@ sp_cursor_stmt: - } - lex->sp_lex_in_use= TRUE; - $$= lex; -- if (lex->sphead->restore_lex(YYTHD)) -+ if (lex->sphead->restore_lex(thd)) - MYSQL_YYABORT; - } - ; -@@ -2662,7 +2649,7 @@ sp_hcond_element: - sp_cond: - ulong_num - { /* mysql errno */ -- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t)); -+ $$= (sp_cond_type_t *)thd->alloc(sizeof(sp_cond_type_t)); - if ($$ == NULL) - MYSQL_YYABORT; - $$->type= sp_cond_type_t::number; -@@ -2675,7 +2662,7 @@ sp_cond: - my_error(ER_SP_BAD_SQLSTATE, MYF(0), $3.str); - MYSQL_YYABORT; - } -- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t)); -+ $$= (sp_cond_type_t *) thd->alloc(sizeof(sp_cond_type_t)); - if ($$ == NULL) - MYSQL_YYABORT; - $$->type= sp_cond_type_t::state; -@@ -2705,21 +2692,21 @@ sp_hcond: - } - | SQLWARNING_SYM /* SQLSTATEs 01??? */ - { -- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t)); -+ $$= (sp_cond_type_t *) thd->alloc(sizeof(sp_cond_type_t)); - if ($$ == NULL) - MYSQL_YYABORT; - $$->type= sp_cond_type_t::warning; - } - | not FOUND_SYM /* SQLSTATEs 02??? */ - { -- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t)); -+ $$= (sp_cond_type_t *) thd->alloc(sizeof(sp_cond_type_t)); - if ($$ == NULL) - MYSQL_YYABORT; - $$->type= sp_cond_type_t::notfound; - } - | SQLEXCEPTION_SYM /* All other SQLSTATEs */ - { -- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t)); -+ $$= (sp_cond_type_t *) thd->alloc(sizeof(sp_cond_type_t)); - if ($$ == NULL) - MYSQL_YYABORT; - $$->type= sp_cond_type_t::exception; -@@ -2789,7 +2776,6 @@ sp_proc_stmt_if: - - sp_proc_stmt_statement: - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - Lex_input_stream *lip= YYLIP; - -@@ -2798,7 +2784,6 @@ sp_proc_stmt_statement: - } - statement - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - Lex_input_stream *lip= YYLIP; - sp_head *sp= lex->sphead; -@@ -2845,7 +2830,7 @@ sp_proc_stmt_statement: - - sp_proc_stmt_return: - RETURN_SYM -- { Lex->sphead->reset_lex(YYTHD); } -+ { Lex->sphead->reset_lex(thd); } - expr - { - LEX *lex= Lex; -@@ -2867,7 +2852,7 @@ sp_proc_stmt_return: - MYSQL_YYABORT; - sp->m_flags|= sp_head::HAS_RETURN; - } -- if (sp->restore_lex(YYTHD)) -+ if (sp->restore_lex(thd)) - MYSQL_YYABORT; - } - ; -@@ -3094,7 +3079,7 @@ sp_fetch_list: - ; - - sp_if: -- { Lex->sphead->reset_lex(YYTHD); } -+ { Lex->sphead->reset_lex(thd); } - expr THEN_SYM - { - LEX *lex= Lex; -@@ -3108,7 +3093,7 @@ sp_if: - sp->add_cont_backpatch(i) || - sp->add_instr(i)) - MYSQL_YYABORT; -- if (sp->restore_lex(YYTHD)) -+ if (sp->restore_lex(thd)) - MYSQL_YYABORT; - } - sp_proc_stmts1 -@@ -3147,7 +3132,7 @@ simple_case_stmt: - { - LEX *lex= Lex; - case_stmt_action_case(lex); -- lex->sphead->reset_lex(YYTHD); /* For expr $3 */ -+ lex->sphead->reset_lex(thd); /* For expr $3 */ - } - expr - { -@@ -3156,7 +3141,7 @@ simple_case_stmt: - MYSQL_YYABORT; - - /* For expr $3 */ -- if (lex->sphead->restore_lex(YYTHD)) -+ if (lex->sphead->restore_lex(thd)) - MYSQL_YYABORT; - } - simple_when_clause_list -@@ -3198,7 +3183,7 @@ searched_when_clause_list: - simple_when_clause: - WHEN_SYM - { -- Lex->sphead->reset_lex(YYTHD); /* For expr $3 */ -+ Lex->sphead->reset_lex(thd); /* For expr $3 */ - } - expr - { -@@ -3208,7 +3193,7 @@ simple_when_clause: - if (case_stmt_action_when(lex, $3, true)) - MYSQL_YYABORT; - /* For expr $3 */ -- if (lex->sphead->restore_lex(YYTHD)) -+ if (lex->sphead->restore_lex(thd)) - MYSQL_YYABORT; - } - THEN_SYM -@@ -3223,7 +3208,7 @@ simple_when_clause: - searched_when_clause: - WHEN_SYM - { -- Lex->sphead->reset_lex(YYTHD); /* For expr $3 */ -+ Lex->sphead->reset_lex(thd); /* For expr $3 */ - } - expr - { -@@ -3231,7 +3216,7 @@ searched_when_clause: - if (case_stmt_action_when(lex, $3, false)) - MYSQL_YYABORT; - /* For expr $3 */ -- if (lex->sphead->restore_lex(YYTHD)) -+ if (lex->sphead->restore_lex(thd)) - MYSQL_YYABORT; - } - THEN_SYM -@@ -3395,7 +3380,7 @@ sp_unlabeled_control: - MYSQL_YYABORT; - } - | WHILE_SYM -- { Lex->sphead->reset_lex(YYTHD); } -+ { Lex->sphead->reset_lex(thd); } - expr DO_SYM - { - LEX *lex= Lex; -@@ -3409,7 +3394,7 @@ sp_unlabeled_control: - sp->new_cont_backpatch(i) || - sp->add_instr(i)) - MYSQL_YYABORT; -- if (sp->restore_lex(YYTHD)) -+ if (sp->restore_lex(thd)) - MYSQL_YYABORT; - } - sp_proc_stmts1 END WHILE_SYM -@@ -3424,7 +3409,7 @@ sp_unlabeled_control: - lex->sphead->do_cont_backpatch(); - } - | REPEAT_SYM sp_proc_stmts1 UNTIL_SYM -- { Lex->sphead->reset_lex(YYTHD); } -+ { Lex->sphead->reset_lex(thd); } - expr END REPEAT_SYM - { - LEX *lex= Lex; -@@ -3436,7 +3421,7 @@ sp_unlabeled_control: - if (i == NULL || - lex->sphead->add_instr(i)) - MYSQL_YYABORT; -- if (lex->sphead->restore_lex(YYTHD)) -+ if (lex->sphead->restore_lex(thd)) - MYSQL_YYABORT; - /* We can shortcut the cont_backpatch here */ - i->m_cont_dest= ip+1; -@@ -3859,7 +3844,6 @@ create2: - create3 {} - | LIKE table_ident - { -- THD *thd= YYTHD; - TABLE_LIST *src_table; - LEX *lex= thd->lex; - -@@ -3873,7 +3857,6 @@ create2: - } - | '(' LIKE table_ident ')' - { -- THD *thd= YYTHD; - TABLE_LIST *src_table; - LEX *lex= thd->lex; - -@@ -4342,7 +4325,6 @@ part_bit_expr: - bit_expr - { - Item *part_expr= $1; -- THD *thd= YYTHD; - LEX *lex= thd->lex; - Name_resolution_context *context= &lex->current_select->context; - TABLE_LIST *save_list= context->table_list; -@@ -4364,7 +4346,7 @@ part_bit_expr: - my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0)); - MYSQL_YYABORT; - } -- if (part_expr->fix_fields(YYTHD, (Item**)0) || -+ if (part_expr->fix_fields(thd, (Item**)0) || - ((context->table_list= save_list), FALSE) || - (!part_expr->const_item()) || - (!lex->safe_to_cache_query)) -@@ -4629,7 +4611,7 @@ create_table_option: - | TYPE_SYM opt_equal storage_engines - { - Lex->create_info.db_type= $3; -- WARN_DEPRECATED(yythd, "6.0", "TYPE=storage_engine", -+ WARN_DEPRECATED(thd, "6.0", "TYPE=storage_engine", - "'ENGINE=storage_engine'"); - Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE; - } -@@ -4791,19 +4773,19 @@ default_collation: - storage_engines: - ident_or_text - { -- plugin_ref plugin= ha_resolve_by_name(YYTHD, &$1); -+ plugin_ref plugin= ha_resolve_by_name(thd, &$1); - - if (plugin) - $$= plugin_data(plugin, handlerton*); - else - { -- if (YYTHD->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION) -+ if (thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION) - { - my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), $1.str); - MYSQL_YYABORT; - } - $$= 0; -- push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN, -+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_UNKNOWN_STORAGE_ENGINE, - ER(ER_UNKNOWN_STORAGE_ENGINE), - $1.str); -@@ -4815,7 +4797,7 @@ known_storage_engines: - ident_or_text - { - plugin_ref plugin; -- if ((plugin= ha_resolve_by_name(YYTHD, &$1))) -+ if ((plugin= ha_resolve_by_name(thd, &$1))) - $$= plugin_data(plugin, handlerton*); - else - { -@@ -5043,7 +5025,7 @@ type: - { - char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1]; - my_snprintf(buff, sizeof(buff), "YEAR(%lu)", length); -- push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_NOTE, -+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, - ER_WARN_DEPRECATED_SYNTAX, - ER(ER_WARN_DEPRECATED_SYNTAX), - buff, "YEAR(4)"); -@@ -5057,7 +5039,7 @@ type: - { $$=MYSQL_TYPE_TIME; } - | TIMESTAMP opt_field_length - { -- if (YYTHD->variables.sql_mode & MODE_MAXDB) -+ if (thd->variables.sql_mode & MODE_MAXDB) - $$=MYSQL_TYPE_DATETIME; - else - { -@@ -5189,7 +5171,7 @@ int_type: - real_type: - REAL - { -- $$= YYTHD->variables.sql_mode & MODE_REAL_AS_FLOAT ? -+ $$= thd->variables.sql_mode & MODE_REAL_AS_FLOAT ? - MYSQL_TYPE_FLOAT : MYSQL_TYPE_DOUBLE; - } - | DOUBLE_SYM -@@ -5263,7 +5245,7 @@ attribute: - | DEFAULT now_or_signed_literal { Lex->default_value=$2; } - | ON UPDATE_SYM NOW_SYM optional_braces - { -- Item *item= new (YYTHD->mem_root) Item_func_now_local(); -+ Item *item= new (thd->mem_root) Item_func_now_local(); - if (item == NULL) - MYSQL_YYABORT; - Lex->on_update_value= item; -@@ -5312,7 +5294,7 @@ attribute: - now_or_signed_literal: - NOW_SYM optional_braces - { -- $$= new (YYTHD->mem_root) Item_func_now_local(); -+ $$= new (thd->mem_root) Item_func_now_local(); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -5673,7 +5655,6 @@ string_list: - alter: - ALTER opt_ignore TABLE_SYM table_ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - lex->name.str= 0; - lex->name.length= 0; -@@ -5799,7 +5780,7 @@ alter: - Event_parse_data. - */ - -- if (!(Lex->event_parse_data= Event_parse_data::new_instance(YYTHD))) -+ if (!(Lex->event_parse_data= Event_parse_data::new_instance(thd))) - MYSQL_YYABORT; - Lex->event_parse_data->identifier= $4; - -@@ -6192,7 +6173,6 @@ alter_list_item: - { - if (!$4) - { -- THD *thd= YYTHD; - $4= thd->variables.collation_database; - } - $5= $5 ? $5 : $4; -@@ -6556,7 +6536,7 @@ keycache_list: - assign_to_keycache: - table_ident cache_keys_spec - { -- if (!Select->add_table_to_list(YYTHD, $1, NULL, 0, TL_READ, -+ if (!Select->add_table_to_list(thd, $1, NULL, 0, TL_READ, - Select->pop_index_hints())) - MYSQL_YYABORT; - } -@@ -6585,7 +6565,7 @@ preload_list: - preload_keys: - table_ident cache_keys_spec opt_ignore_leaves - { -- if (!Select->add_table_to_list(YYTHD, $1, NULL, $3, TL_READ, -+ if (!Select->add_table_to_list(thd, $1, NULL, $3, TL_READ, - Select->pop_index_hints())) - MYSQL_YYABORT; - } -@@ -6593,7 +6573,7 @@ preload_keys: - - cache_keys_spec: - { -- Lex->select_lex.alloc_index_hints(YYTHD); -+ Lex->select_lex.alloc_index_hints(thd); - Select->set_index_hint_type(INDEX_HINT_USE, - global_system_variables.old_mode ? - INDEX_HINT_MASK_JOIN : -@@ -6813,7 +6793,6 @@ select_item_list: - | select_item - | '*' - { -- THD *thd= YYTHD; - Item *item= new (thd->mem_root) - Item_field(&thd->lex->current_select->context, - NULL, NULL, "*"); -@@ -6828,7 +6807,6 @@ select_item_list: - select_item: - remember_name select_item2 remember_end select_alias - { -- THD *thd= YYTHD; - DBUG_ASSERT($1 < $3); - - if (add_item_to_list(thd, $2)) -@@ -6929,7 +6907,7 @@ expr: - else - { - /* X OR Y */ -- $$ = new (YYTHD->mem_root) Item_cond_or($1, $3); -+ $$ = new (thd->mem_root) Item_cond_or($1, $3); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -6937,7 +6915,7 @@ expr: - | expr XOR expr %prec XOR - { - /* XOR is a proprietary extension */ -- $$ = new (YYTHD->mem_root) Item_cond_xor($1, $3); -+ $$ = new (thd->mem_root) Item_cond_xor($1, $3); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -6979,50 +6957,50 @@ expr: - else - { - /* X AND Y */ -- $$ = new (YYTHD->mem_root) Item_cond_and($1, $3); -+ $$ = new (thd->mem_root) Item_cond_and($1, $3); - if ($$ == NULL) - MYSQL_YYABORT; - } - } - | NOT_SYM expr %prec NOT_SYM - { -- $$= negate_expression(YYTHD, $2); -+ $$= negate_expression(thd, $2); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bool_pri IS TRUE_SYM %prec IS - { -- $$= new (YYTHD->mem_root) Item_func_istrue($1); -+ $$= new (thd->mem_root) Item_func_istrue($1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bool_pri IS not TRUE_SYM %prec IS - { -- $$= new (YYTHD->mem_root) Item_func_isnottrue($1); -+ $$= new (thd->mem_root) Item_func_isnottrue($1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bool_pri IS FALSE_SYM %prec IS - { -- $$= new (YYTHD->mem_root) Item_func_isfalse($1); -+ $$= new (thd->mem_root) Item_func_isfalse($1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bool_pri IS not FALSE_SYM %prec IS - { -- $$= new (YYTHD->mem_root) Item_func_isnotfalse($1); -+ $$= new (thd->mem_root) Item_func_isnotfalse($1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bool_pri IS UNKNOWN_SYM %prec IS - { -- $$= new (YYTHD->mem_root) Item_func_isnull($1); -+ $$= new (thd->mem_root) Item_func_isnull($1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bool_pri IS not UNKNOWN_SYM %prec IS - { -- $$= new (YYTHD->mem_root) Item_func_isnotnull($1); -+ $$= new (thd->mem_root) Item_func_isnotnull($1); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7032,19 +7010,19 @@ expr: - bool_pri: - bool_pri IS NULL_SYM %prec IS - { -- $$= new (YYTHD->mem_root) Item_func_isnull($1); -+ $$= new (thd->mem_root) Item_func_isnull($1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bool_pri IS not NULL_SYM %prec IS - { -- $$= new (YYTHD->mem_root) Item_func_isnotnull($1); -+ $$= new (thd->mem_root) Item_func_isnotnull($1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bool_pri EQUAL_SYM predicate %prec EQUAL_SYM - { -- $$= new (YYTHD->mem_root) Item_func_equal($1,$3); -+ $$= new (thd->mem_root) Item_func_equal($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7066,13 +7044,12 @@ bool_pri: - predicate: - bit_expr IN_SYM '(' subselect ')' - { -- $$= new (YYTHD->mem_root) Item_in_subselect($1, $4); -+ $$= new (thd->mem_root) Item_in_subselect($1, $4); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr not IN_SYM '(' subselect ')' - { -- THD *thd= YYTHD; - Item *item= new (thd->mem_root) Item_in_subselect($1, $5); - if (item == NULL) - MYSQL_YYABORT; -@@ -7082,7 +7059,7 @@ predicate: - } - | bit_expr IN_SYM '(' expr ')' - { -- $$= handle_sql2003_note184_exception(YYTHD, $1, true, $4); -+ $$= handle_sql2003_note184_exception(thd, $1, true, $4); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7090,13 +7067,13 @@ predicate: - { - $6->push_front($4); - $6->push_front($1); -- $$= new (YYTHD->mem_root) Item_func_in(*$6); -+ $$= new (thd->mem_root) Item_func_in(*$6); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr not IN_SYM '(' expr ')' - { -- $$= handle_sql2003_note184_exception(YYTHD, $1, false, $5); -+ $$= handle_sql2003_note184_exception(thd, $1, false, $5); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7104,7 +7081,7 @@ predicate: - { - $7->push_front($5); - $7->push_front($1); -- Item_func_in *item = new (YYTHD->mem_root) Item_func_in(*$7); -+ Item_func_in *item = new (thd->mem_root) Item_func_in(*$7); - if (item == NULL) - MYSQL_YYABORT; - item->negate(); -@@ -7112,14 +7089,14 @@ predicate: - } - | bit_expr BETWEEN_SYM bit_expr AND_SYM predicate - { -- $$= new (YYTHD->mem_root) Item_func_between($1,$3,$5); -+ $$= new (thd->mem_root) Item_func_between($1,$3,$5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr not BETWEEN_SYM bit_expr AND_SYM predicate - { - Item_func_between *item; -- item= new (YYTHD->mem_root) Item_func_between($1,$4,$6); -+ item= new (thd->mem_root) Item_func_between($1,$4,$6); - if (item == NULL) - MYSQL_YYABORT; - item->negate(); -@@ -7127,42 +7104,42 @@ predicate: - } - | bit_expr SOUNDS_SYM LIKE bit_expr - { -- Item *item1= new (YYTHD->mem_root) Item_func_soundex($1); -- Item *item4= new (YYTHD->mem_root) Item_func_soundex($4); -+ Item *item1= new (thd->mem_root) Item_func_soundex($1); -+ Item *item4= new (thd->mem_root) Item_func_soundex($4); - if ((item1 == NULL) || (item4 == NULL)) - MYSQL_YYABORT; -- $$= new (YYTHD->mem_root) Item_func_eq(item1, item4); -+ $$= new (thd->mem_root) Item_func_eq(item1, item4); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr LIKE simple_expr opt_escape - { -- $$= new (YYTHD->mem_root) Item_func_like($1,$3,$4,Lex->escape_used); -+ $$= new (thd->mem_root) Item_func_like($1,$3,$4,Lex->escape_used); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr not LIKE simple_expr opt_escape - { -- Item *item= new (YYTHD->mem_root) Item_func_like($1,$4,$5, -+ Item *item= new (thd->mem_root) Item_func_like($1,$4,$5, - Lex->escape_used); - if (item == NULL) - MYSQL_YYABORT; -- $$= new (YYTHD->mem_root) Item_func_not(item); -+ $$= new (thd->mem_root) Item_func_not(item); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr REGEXP bit_expr - { -- $$= new (YYTHD->mem_root) Item_func_regex($1,$3); -+ $$= new (thd->mem_root) Item_func_regex($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr not REGEXP bit_expr - { -- Item *item= new (YYTHD->mem_root) Item_func_regex($1,$4); -+ Item *item= new (thd->mem_root) Item_func_regex($1,$4); - if (item == NULL) - MYSQL_YYABORT; -- $$= negate_expression(YYTHD, item); -+ $$= negate_expression(thd, item); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7172,85 +7149,85 @@ predicate: - bit_expr: - bit_expr '|' bit_expr %prec '|' - { -- $$= new (YYTHD->mem_root) Item_func_bit_or($1,$3); -+ $$= new (thd->mem_root) Item_func_bit_or($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr '&' bit_expr %prec '&' - { -- $$= new (YYTHD->mem_root) Item_func_bit_and($1,$3); -+ $$= new (thd->mem_root) Item_func_bit_and($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr SHIFT_LEFT bit_expr %prec SHIFT_LEFT - { -- $$= new (YYTHD->mem_root) Item_func_shift_left($1,$3); -+ $$= new (thd->mem_root) Item_func_shift_left($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr SHIFT_RIGHT bit_expr %prec SHIFT_RIGHT - { -- $$= new (YYTHD->mem_root) Item_func_shift_right($1,$3); -+ $$= new (thd->mem_root) Item_func_shift_right($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr '+' bit_expr %prec '+' - { -- $$= new (YYTHD->mem_root) Item_func_plus($1,$3); -+ $$= new (thd->mem_root) Item_func_plus($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr '-' bit_expr %prec '-' - { -- $$= new (YYTHD->mem_root) Item_func_minus($1,$3); -+ $$= new (thd->mem_root) Item_func_minus($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr '+' INTERVAL_SYM expr interval %prec '+' - { -- $$= new (YYTHD->mem_root) Item_date_add_interval($1,$4,$5,0); -+ $$= new (thd->mem_root) Item_date_add_interval($1,$4,$5,0); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr '-' INTERVAL_SYM expr interval %prec '-' - { -- $$= new (YYTHD->mem_root) Item_date_add_interval($1,$4,$5,1); -+ $$= new (thd->mem_root) Item_date_add_interval($1,$4,$5,1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr '*' bit_expr %prec '*' - { -- $$= new (YYTHD->mem_root) Item_func_mul($1,$3); -+ $$= new (thd->mem_root) Item_func_mul($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr '/' bit_expr %prec '/' - { -- $$= new (YYTHD->mem_root) Item_func_div($1,$3); -+ $$= new (thd->mem_root) Item_func_div($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr '%' bit_expr %prec '%' - { -- $$= new (YYTHD->mem_root) Item_func_mod($1,$3); -+ $$= new (thd->mem_root) Item_func_mod($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr DIV_SYM bit_expr %prec DIV_SYM - { -- $$= new (YYTHD->mem_root) Item_func_int_div($1,$3); -+ $$= new (thd->mem_root) Item_func_int_div($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr MOD_SYM bit_expr %prec MOD_SYM - { -- $$= new (YYTHD->mem_root) Item_func_mod($1,$3); -+ $$= new (thd->mem_root) Item_func_mod($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | bit_expr '^' bit_expr - { -- $$= new (YYTHD->mem_root) Item_func_bit_xor($1,$3); -+ $$= new (thd->mem_root) Item_func_bit_xor($1,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7299,7 +7276,6 @@ simple_expr: - | function_call_conflict - | simple_expr COLLATE_SYM ident_or_text %prec NEG - { -- THD *thd= YYTHD; - Item *i1= new (thd->mem_root) Item_string($3.str, - $3.length, - thd->charset()); -@@ -7315,7 +7291,7 @@ simple_expr: - | sum_expr - | simple_expr OR_OR_SYM simple_expr - { -- $$= new (YYTHD->mem_root) Item_func_concat($1, $3); -+ $$= new (thd->mem_root) Item_func_concat($1, $3); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7325,25 +7301,25 @@ simple_expr: - } - | '-' simple_expr %prec NEG - { -- $$= new (YYTHD->mem_root) Item_func_neg($2); -+ $$= new (thd->mem_root) Item_func_neg($2); - if ($$ == NULL) - MYSQL_YYABORT; - } - | '~' simple_expr %prec NEG - { -- $$= new (YYTHD->mem_root) Item_func_bit_neg($2); -+ $$= new (thd->mem_root) Item_func_bit_neg($2); - if ($$ == NULL) - MYSQL_YYABORT; - } - | not2 simple_expr %prec NEG - { -- $$= negate_expression(YYTHD, $2); -+ $$= negate_expression(thd, $2); - if ($$ == NULL) - MYSQL_YYABORT; - } - | '(' subselect ')' - { -- $$= new (YYTHD->mem_root) Item_singlerow_subselect($2); -+ $$= new (thd->mem_root) Item_singlerow_subselect($2); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7352,20 +7328,20 @@ simple_expr: - | '(' expr ',' expr_list ')' - { - $4->push_front($2); -- $$= new (YYTHD->mem_root) Item_row(*$4); -+ $$= new (thd->mem_root) Item_row(*$4); - if ($$ == NULL) - MYSQL_YYABORT; - } - | ROW_SYM '(' expr ',' expr_list ')' - { - $5->push_front($3); -- $$= new (YYTHD->mem_root) Item_row(*$5); -+ $$= new (thd->mem_root) Item_row(*$5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | EXISTS '(' subselect ')' - { -- $$= new (YYTHD->mem_root) Item_exists_subselect($3); -+ $$= new (thd->mem_root) Item_exists_subselect($3); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7374,7 +7350,7 @@ simple_expr: - | MATCH ident_list_arg AGAINST '(' bit_expr fulltext_options ')' - { - $2->push_front($5); -- Item_func_match *i1= new (YYTHD->mem_root) Item_func_match(*$2, $6); -+ Item_func_match *i1= new (thd->mem_root) Item_func_match(*$2, $6); - if (i1 == NULL) - MYSQL_YYABORT; - Select->add_ftfunc_to_list(i1); -@@ -7382,7 +7358,7 @@ simple_expr: - } - | BINARY simple_expr %prec NEG - { -- $$= create_func_cast(YYTHD, $2, ITEM_CAST_CHAR, NULL, NULL, -+ $$= create_func_cast(thd, $2, ITEM_CAST_CHAR, NULL, NULL, - &my_charset_bin); - if ($$ == NULL) - MYSQL_YYABORT; -@@ -7390,27 +7366,27 @@ simple_expr: - | CAST_SYM '(' expr AS cast_type ')' - { - LEX *lex= Lex; -- $$= create_func_cast(YYTHD, $3, $5, lex->length, lex->dec, -+ $$= create_func_cast(thd, $3, $5, lex->length, lex->dec, - lex->charset); - if ($$ == NULL) - MYSQL_YYABORT; - } - | CASE_SYM opt_expr when_list opt_else END - { -- $$= new (YYTHD->mem_root) Item_func_case(* $3, $2, $4 ); -+ $$= new (thd->mem_root) Item_func_case(* $3, $2, $4 ); - if ($$ == NULL) - MYSQL_YYABORT; - } - | CONVERT_SYM '(' expr ',' cast_type ')' - { -- $$= create_func_cast(YYTHD, $3, $5, Lex->length, Lex->dec, -+ $$= create_func_cast(thd, $3, $5, Lex->length, Lex->dec, - Lex->charset); - if ($$ == NULL) - MYSQL_YYABORT; - } - | CONVERT_SYM '(' expr USING charset_name ')' - { -- $$= new (YYTHD->mem_root) Item_func_conv_charset($3,$5); -+ $$= new (thd->mem_root) Item_func_conv_charset($3,$5); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7423,14 +7399,14 @@ simple_expr: - my_error(ER_WRONG_COLUMN_NAME, MYF(0), il->my_name()->str); - MYSQL_YYABORT; - } -- $$= new (YYTHD->mem_root) Item_default_value(Lex->current_context(), -+ $$= new (thd->mem_root) Item_default_value(Lex->current_context(), - $3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | VALUES '(' simple_ident_nospvar ')' - { -- $$= new (YYTHD->mem_root) Item_insert_value(Lex->current_context(), -+ $$= new (thd->mem_root) Item_insert_value(Lex->current_context(), - $3); - if ($$ == NULL) - MYSQL_YYABORT; -@@ -7438,7 +7414,7 @@ simple_expr: - | INTERVAL_SYM expr interval '+' expr %prec INTERVAL_SYM - /* we cannot put interval before - */ - { -- $$= new (YYTHD->mem_root) Item_date_add_interval($5,$2,$3,0); -+ $$= new (thd->mem_root) Item_date_add_interval($5,$2,$3,0); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7453,19 +7429,19 @@ simple_expr: - function_call_keyword: - CHAR_SYM '(' expr_list ')' - { -- $$= new (YYTHD->mem_root) Item_func_char(*$3); -+ $$= new (thd->mem_root) Item_func_char(*$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | CHAR_SYM '(' expr_list USING charset_name ')' - { -- $$= new (YYTHD->mem_root) Item_func_char(*$3, $5); -+ $$= new (thd->mem_root) Item_func_char(*$3, $5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | CURRENT_USER optional_braces - { -- $$= new (YYTHD->mem_root) Item_func_current_user(Lex->current_context()); -+ $$= new (thd->mem_root) Item_func_current_user(Lex->current_context()); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->set_stmt_unsafe(); -@@ -7473,31 +7449,30 @@ function_call_keyword: - } - | DATE_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_date_typecast($3); -+ $$= new (thd->mem_root) Item_date_typecast($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | DAY_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_dayofmonth($3); -+ $$= new (thd->mem_root) Item_func_dayofmonth($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | HOUR_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_hour($3); -+ $$= new (thd->mem_root) Item_func_hour($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | INSERT '(' expr ',' expr ',' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_insert($3,$5,$7,$9); -+ $$= new (thd->mem_root) Item_func_insert($3,$5,$7,$9); - if ($$ == NULL) - MYSQL_YYABORT; - } - | INTERVAL_SYM '(' expr ',' expr ')' %prec INTERVAL_SYM - { -- THD *thd= YYTHD; - List *list= new (thd->mem_root) List; - if (list == NULL) - MYSQL_YYABORT; -@@ -7512,7 +7487,6 @@ function_call_keyword: - } - | INTERVAL_SYM '(' expr ',' expr ',' expr_list ')' %prec INTERVAL_SYM - { -- THD *thd= YYTHD; - $7->push_front($5); - $7->push_front($3); - Item_row *item= new (thd->mem_root) Item_row(*$7); -@@ -7524,103 +7498,103 @@ function_call_keyword: - } - | LEFT '(' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_left($3,$5); -+ $$= new (thd->mem_root) Item_func_left($3,$5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | MINUTE_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_minute($3); -+ $$= new (thd->mem_root) Item_func_minute($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | MONTH_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_month($3); -+ $$= new (thd->mem_root) Item_func_month($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | RIGHT '(' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_right($3,$5); -+ $$= new (thd->mem_root) Item_func_right($3,$5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | SECOND_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_second($3); -+ $$= new (thd->mem_root) Item_func_second($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TIME_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_time_typecast($3); -+ $$= new (thd->mem_root) Item_time_typecast($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TIMESTAMP '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_datetime_typecast($3); -+ $$= new (thd->mem_root) Item_datetime_typecast($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TIMESTAMP '(' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_add_time($3, $5, 1, 0); -+ $$= new (thd->mem_root) Item_func_add_time($3, $5, 1, 0); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TRIM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_trim($3); -+ $$= new (thd->mem_root) Item_func_trim($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TRIM '(' LEADING expr FROM expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_ltrim($6,$4); -+ $$= new (thd->mem_root) Item_func_ltrim($6,$4); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TRIM '(' TRAILING expr FROM expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_rtrim($6,$4); -+ $$= new (thd->mem_root) Item_func_rtrim($6,$4); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TRIM '(' BOTH expr FROM expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_trim($6,$4); -+ $$= new (thd->mem_root) Item_func_trim($6,$4); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TRIM '(' LEADING FROM expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_ltrim($5); -+ $$= new (thd->mem_root) Item_func_ltrim($5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TRIM '(' TRAILING FROM expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_rtrim($5); -+ $$= new (thd->mem_root) Item_func_rtrim($5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TRIM '(' BOTH FROM expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_trim($5); -+ $$= new (thd->mem_root) Item_func_trim($5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TRIM '(' expr FROM expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_trim($5,$3); -+ $$= new (thd->mem_root) Item_func_trim($5,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | USER '(' ')' - { -- $$= new (YYTHD->mem_root) Item_func_user(); -+ $$= new (thd->mem_root) Item_func_user(); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->set_stmt_unsafe(); -@@ -7628,7 +7602,7 @@ function_call_keyword: - } - | YEAR_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_year($3); -+ $$= new (thd->mem_root) Item_func_year($3); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7649,34 +7623,34 @@ function_call_keyword: - function_call_nonkeyword: - ADDDATE_SYM '(' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $5, -+ $$= new (thd->mem_root) Item_date_add_interval($3, $5, - INTERVAL_DAY, 0); - if ($$ == NULL) - MYSQL_YYABORT; - } - | ADDDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' - { -- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $6, $7, 0); -+ $$= new (thd->mem_root) Item_date_add_interval($3, $6, $7, 0); - if ($$ == NULL) - MYSQL_YYABORT; - } - | CURDATE optional_braces - { -- $$= new (YYTHD->mem_root) Item_func_curdate_local(); -+ $$= new (thd->mem_root) Item_func_curdate_local(); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->safe_to_cache_query=0; - } - | CURTIME optional_braces - { -- $$= new (YYTHD->mem_root) Item_func_curtime_local(); -+ $$= new (thd->mem_root) Item_func_curtime_local(); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->safe_to_cache_query=0; - } - | CURTIME '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_curtime_local($3); -+ $$= new (thd->mem_root) Item_func_curtime_local($3); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->safe_to_cache_query=0; -@@ -7684,83 +7658,83 @@ function_call_nonkeyword: - | DATE_ADD_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' - %prec INTERVAL_SYM - { -- $$= new (YYTHD->mem_root) Item_date_add_interval($3,$6,$7,0); -+ $$= new (thd->mem_root) Item_date_add_interval($3,$6,$7,0); - if ($$ == NULL) - MYSQL_YYABORT; - } - | DATE_SUB_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' - %prec INTERVAL_SYM - { -- $$= new (YYTHD->mem_root) Item_date_add_interval($3,$6,$7,1); -+ $$= new (thd->mem_root) Item_date_add_interval($3,$6,$7,1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | EXTRACT_SYM '(' interval FROM expr ')' - { -- $$=new (YYTHD->mem_root) Item_extract( $3, $5); -+ $$=new (thd->mem_root) Item_extract( $3, $5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | GET_FORMAT '(' date_time_type ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_get_format($3, $5); -+ $$= new (thd->mem_root) Item_func_get_format($3, $5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | NOW_SYM optional_braces - { -- $$= new (YYTHD->mem_root) Item_func_now_local(); -+ $$= new (thd->mem_root) Item_func_now_local(); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->safe_to_cache_query=0; - } - | NOW_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_now_local($3); -+ $$= new (thd->mem_root) Item_func_now_local($3); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->safe_to_cache_query=0; - } - | POSITION_SYM '(' bit_expr IN_SYM expr ')' - { -- $$ = new (YYTHD->mem_root) Item_func_locate($5,$3); -+ $$ = new (thd->mem_root) Item_func_locate($5,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | SUBDATE_SYM '(' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $5, -+ $$= new (thd->mem_root) Item_date_add_interval($3, $5, - INTERVAL_DAY, 1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | SUBDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' - { -- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $6, $7, 1); -+ $$= new (thd->mem_root) Item_date_add_interval($3, $6, $7, 1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | SUBSTRING '(' expr ',' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_substr($3,$5,$7); -+ $$= new (thd->mem_root) Item_func_substr($3,$5,$7); - if ($$ == NULL) - MYSQL_YYABORT; - } - | SUBSTRING '(' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_substr($3,$5); -+ $$= new (thd->mem_root) Item_func_substr($3,$5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | SUBSTRING '(' expr FROM expr FOR_SYM expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_substr($3,$5,$7); -+ $$= new (thd->mem_root) Item_func_substr($3,$5,$7); - if ($$ == NULL) - MYSQL_YYABORT; - } - | SUBSTRING '(' expr FROM expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_substr($3,$5); -+ $$= new (thd->mem_root) Item_func_substr($3,$5); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7775,9 +7749,9 @@ function_call_nonkeyword: - */ - Lex->set_stmt_unsafe(); - if (global_system_variables.sysdate_is_now == 0) -- $$= new (YYTHD->mem_root) Item_func_sysdate_local(); -+ $$= new (thd->mem_root) Item_func_sysdate_local(); - else -- $$= new (YYTHD->mem_root) Item_func_now_local(); -+ $$= new (thd->mem_root) Item_func_now_local(); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->safe_to_cache_query=0; -@@ -7785,42 +7759,42 @@ function_call_nonkeyword: - | SYSDATE '(' expr ')' - { - if (global_system_variables.sysdate_is_now == 0) -- $$= new (YYTHD->mem_root) Item_func_sysdate_local($3); -+ $$= new (thd->mem_root) Item_func_sysdate_local($3); - else -- $$= new (YYTHD->mem_root) Item_func_now_local($3); -+ $$= new (thd->mem_root) Item_func_now_local($3); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->safe_to_cache_query=0; - } - | TIMESTAMP_ADD '(' interval_time_stamp ',' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_date_add_interval($7,$5,$3,0); -+ $$= new (thd->mem_root) Item_date_add_interval($7,$5,$3,0); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TIMESTAMP_DIFF '(' interval_time_stamp ',' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_timestamp_diff($5,$7,$3); -+ $$= new (thd->mem_root) Item_func_timestamp_diff($5,$7,$3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | UTC_DATE_SYM optional_braces - { -- $$= new (YYTHD->mem_root) Item_func_curdate_utc(); -+ $$= new (thd->mem_root) Item_func_curdate_utc(); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->safe_to_cache_query=0; - } - | UTC_TIME_SYM optional_braces - { -- $$= new (YYTHD->mem_root) Item_func_curtime_utc(); -+ $$= new (thd->mem_root) Item_func_curtime_utc(); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->safe_to_cache_query=0; - } - | UTC_TIMESTAMP_SYM optional_braces - { -- $$= new (YYTHD->mem_root) Item_func_now_utc(); -+ $$= new (thd->mem_root) Item_func_now_utc(); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->safe_to_cache_query=0; -@@ -7835,62 +7809,61 @@ function_call_nonkeyword: - function_call_conflict: - ASCII_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_ascii($3); -+ $$= new (thd->mem_root) Item_func_ascii($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | CHARSET '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_charset($3); -+ $$= new (thd->mem_root) Item_func_charset($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | COALESCE '(' expr_list ')' - { -- $$= new (YYTHD->mem_root) Item_func_coalesce(* $3); -+ $$= new (thd->mem_root) Item_func_coalesce(* $3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | COLLATION_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_collation($3); -+ $$= new (thd->mem_root) Item_func_collation($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | DATABASE '(' ')' - { -- $$= new (YYTHD->mem_root) Item_func_database(); -+ $$= new (thd->mem_root) Item_func_database(); - if ($$ == NULL) - MYSQL_YYABORT; - Lex->safe_to_cache_query=0; - } - | IF '(' expr ',' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_if($3,$5,$7); -+ $$= new (thd->mem_root) Item_func_if($3,$5,$7); - if ($$ == NULL) - MYSQL_YYABORT; - } - | MICROSECOND_SYM '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_microsecond($3); -+ $$= new (thd->mem_root) Item_func_microsecond($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | MOD_SYM '(' expr ',' expr ')' - { -- $$ = new (YYTHD->mem_root) Item_func_mod($3, $5); -+ $$ = new (thd->mem_root) Item_func_mod($3, $5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | OLD_PASSWORD '(' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_old_password($3); -+ $$= new (thd->mem_root) Item_func_old_password($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | PASSWORD '(' expr ')' - { -- THD *thd= YYTHD; - Item* i1; - if (thd->variables.old_passwords) - i1= new (thd->mem_root) Item_func_old_password($3); -@@ -7902,31 +7875,30 @@ function_call_conflict: - } - | QUARTER_SYM '(' expr ')' - { -- $$ = new (YYTHD->mem_root) Item_func_quarter($3); -+ $$ = new (thd->mem_root) Item_func_quarter($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | REPEAT_SYM '(' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_repeat($3,$5); -+ $$= new (thd->mem_root) Item_func_repeat($3,$5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | REPLACE '(' expr ',' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_replace($3,$5,$7); -+ $$= new (thd->mem_root) Item_func_replace($3,$5,$7); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TRUNCATE_SYM '(' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_round($3,$5,1); -+ $$= new (thd->mem_root) Item_func_round($3,$5,1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | WEEK_SYM '(' expr ')' - { -- THD *thd= YYTHD; - Item *i1= new (thd->mem_root) Item_int((char*) "0", - thd->variables.default_week_format, - 1); -@@ -7938,7 +7910,7 @@ function_call_conflict: - } - | WEEK_SYM '(' expr ',' expr ')' - { -- $$= new (YYTHD->mem_root) Item_func_week($3,$5); -+ $$= new (thd->mem_root) Item_func_week($3,$5); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -7960,52 +7932,52 @@ function_call_conflict: - geometry_function: - CONTAINS_SYM '(' expr ',' expr ')' - { -- $$= GEOM_NEW(YYTHD, -+ $$= GEOM_NEW(thd, - Item_func_spatial_rel($3, $5, - Item_func::SP_CONTAINS_FUNC)); - } - | GEOMETRYCOLLECTION '(' expr_list ')' - { -- $$= GEOM_NEW(YYTHD, -+ $$= GEOM_NEW(thd, - Item_func_spatial_collection(* $3, - Geometry::wkb_geometrycollection, - Geometry::wkb_point)); - } - | LINESTRING '(' expr_list ')' - { -- $$= GEOM_NEW(YYTHD, -+ $$= GEOM_NEW(thd, - Item_func_spatial_collection(* $3, - Geometry::wkb_linestring, - Geometry::wkb_point)); - } - | MULTILINESTRING '(' expr_list ')' - { -- $$= GEOM_NEW(YYTHD, -+ $$= GEOM_NEW(thd, - Item_func_spatial_collection(* $3, - Geometry::wkb_multilinestring, - Geometry::wkb_linestring)); - } - | MULTIPOINT '(' expr_list ')' - { -- $$= GEOM_NEW(YYTHD, -+ $$= GEOM_NEW(thd, - Item_func_spatial_collection(* $3, - Geometry::wkb_multipoint, - Geometry::wkb_point)); - } - | MULTIPOLYGON '(' expr_list ')' - { -- $$= GEOM_NEW(YYTHD, -+ $$= GEOM_NEW(thd, - Item_func_spatial_collection(* $3, - Geometry::wkb_multipolygon, - Geometry::wkb_polygon)); - } - | POINT_SYM '(' expr ',' expr ')' - { -- $$= GEOM_NEW(YYTHD, Item_func_point($3,$5)); -+ $$= GEOM_NEW(thd, Item_func_point($3,$5)); - } - | POLYGON '(' expr_list ')' - { -- $$= GEOM_NEW(YYTHD, -+ $$= GEOM_NEW(thd, - Item_func_spatial_collection(* $3, - Geometry::wkb_polygon, - Geometry::wkb_linestring)); -@@ -8043,7 +8015,6 @@ function_call_generic: - } - opt_udf_expr_list ')' - { -- THD *thd= YYTHD; - Create_func *builder; - Item *item= NULL; - -@@ -8097,7 +8068,6 @@ function_call_generic: - } - | ident '.' ident '(' opt_expr_list ')' - { -- THD *thd= YYTHD; - Create_qfunc *builder; - Item *item= NULL; - -@@ -8161,7 +8131,7 @@ opt_udf_expr_list: - udf_expr_list: - udf_expr - { -- $$= new (YYTHD->mem_root) List; -+ $$= new (thd->mem_root) List; - if ($$ == NULL) - MYSQL_YYABORT; - $$->push_back($1); -@@ -8194,7 +8164,7 @@ udf_expr: - remember_name we may get quoted or escaped names. - */ - else if ($2->type() != Item::FIELD_ITEM) -- $2->set_name($1, (uint) ($3 - $1), YYTHD->charset()); -+ $2->set_name($1, (uint) ($3 - $1), thd->charset()); - $$= $2; - } - ; -@@ -8202,46 +8172,46 @@ udf_expr: - sum_expr: - AVG_SYM '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_avg($3); -+ $$= new (thd->mem_root) Item_sum_avg($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | AVG_SYM '(' DISTINCT in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_avg_distinct($4); -+ $$= new (thd->mem_root) Item_sum_avg_distinct($4); - if ($$ == NULL) - MYSQL_YYABORT; - } - | BIT_AND '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_and($3); -+ $$= new (thd->mem_root) Item_sum_and($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | BIT_OR '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_or($3); -+ $$= new (thd->mem_root) Item_sum_or($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | BIT_XOR '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_xor($3); -+ $$= new (thd->mem_root) Item_sum_xor($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | COUNT_SYM '(' opt_all '*' ')' - { -- Item *item= new (YYTHD->mem_root) Item_int((int32) 0L,1); -+ Item *item= new (thd->mem_root) Item_int((int32) 0L,1); - if (item == NULL) - MYSQL_YYABORT; -- $$= new (YYTHD->mem_root) Item_sum_count(item); -+ $$= new (thd->mem_root) Item_sum_count(item); - if ($$ == NULL) - MYSQL_YYABORT; - } - | COUNT_SYM '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_count($3); -+ $$= new (thd->mem_root) Item_sum_count($3); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -8251,13 +8221,13 @@ sum_expr: - { Select->in_sum_expr--; } - ')' - { -- $$= new (YYTHD->mem_root) Item_sum_count_distinct(* $5); -+ $$= new (thd->mem_root) Item_sum_count_distinct(* $5); - if ($$ == NULL) - MYSQL_YYABORT; - } - | MIN_SYM '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_min($3); -+ $$= new (thd->mem_root) Item_sum_min($3); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -8268,55 +8238,55 @@ sum_expr: - */ - | MIN_SYM '(' DISTINCT in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_min($4); -+ $$= new (thd->mem_root) Item_sum_min($4); - if ($$ == NULL) - MYSQL_YYABORT; - } - | MAX_SYM '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_max($3); -+ $$= new (thd->mem_root) Item_sum_max($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | MAX_SYM '(' DISTINCT in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_max($4); -+ $$= new (thd->mem_root) Item_sum_max($4); - if ($$ == NULL) - MYSQL_YYABORT; - } - | STD_SYM '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_std($3, 0); -+ $$= new (thd->mem_root) Item_sum_std($3, 0); - if ($$ == NULL) - MYSQL_YYABORT; - } - | VARIANCE_SYM '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_variance($3, 0); -+ $$= new (thd->mem_root) Item_sum_variance($3, 0); - if ($$ == NULL) - MYSQL_YYABORT; - } - | STDDEV_SAMP_SYM '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_std($3, 1); -+ $$= new (thd->mem_root) Item_sum_std($3, 1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | VAR_SAMP_SYM '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_variance($3, 1); -+ $$= new (thd->mem_root) Item_sum_variance($3, 1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | SUM_SYM '(' in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_sum($3); -+ $$= new (thd->mem_root) Item_sum_sum($3); - if ($$ == NULL) - MYSQL_YYABORT; - } - | SUM_SYM '(' DISTINCT in_sum_expr ')' - { -- $$= new (YYTHD->mem_root) Item_sum_sum_distinct($4); -+ $$= new (thd->mem_root) Item_sum_sum_distinct($4); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -8328,7 +8298,7 @@ sum_expr: - { - SELECT_LEX *sel= Select; - sel->in_sum_expr--; -- $$= new (YYTHD->mem_root) -+ $$= new (thd->mem_root) - Item_func_group_concat(Lex->current_context(), $3, $5, - sel->gorder_list, $7); - if ($$ == NULL) -@@ -8357,7 +8327,7 @@ variable_aux: - ident_or_text SET_VAR expr - { - Item_func_set_user_var *item; -- $$= item= new (YYTHD->mem_root) Item_func_set_user_var($1, $3); -+ $$= item= new (thd->mem_root) Item_func_set_user_var($1, $3); - if ($$ == NULL) - MYSQL_YYABORT; - LEX *lex= Lex; -@@ -8366,7 +8336,7 @@ variable_aux: - } - | ident_or_text - { -- $$= new (YYTHD->mem_root) Item_func_get_user_var($1); -+ $$= new (thd->mem_root) Item_func_get_user_var($1); - if ($$ == NULL) - MYSQL_YYABORT; - LEX *lex= Lex; -@@ -8380,7 +8350,7 @@ variable_aux: - my_parse_error(ER(ER_SYNTAX_ERROR)); - MYSQL_YYABORT; - } -- if (!($$= get_system_var(YYTHD, $2, $3, $4))) -+ if (!($$= get_system_var(thd, $2, $3, $4))) - MYSQL_YYABORT; - if (!((Item_func_get_system_var*) $$)->is_written_to_binlog()) - Lex->set_stmt_unsafe(); -@@ -8395,7 +8365,7 @@ opt_distinct: - opt_gconcat_separator: - /* empty */ - { -- $$= new (YYTHD->mem_root) String(",", 1, &my_charset_latin1); -+ $$= new (thd->mem_root) String(",", 1, &my_charset_latin1); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -8422,9 +8392,9 @@ opt_gorder_clause: - - gorder_list: - gorder_list ',' order_ident order_dir -- { if (add_gorder_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; } -+ { if (add_gorder_to_list(thd, $3,(bool) $4)) MYSQL_YYABORT; } - | order_ident order_dir -- { if (add_gorder_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; } -+ { if (add_gorder_to_list(thd, $1,(bool) $2)) MYSQL_YYABORT; } - ; - - in_sum_expr: -@@ -8477,7 +8447,7 @@ opt_expr_list: - expr_list: - expr - { -- $$= new (YYTHD->mem_root) List; -+ $$= new (thd->mem_root) List; - if ($$ == NULL) - MYSQL_YYABORT; - $$->push_back($1); -@@ -8497,7 +8467,7 @@ ident_list_arg: - ident_list: - simple_ident - { -- $$= new (YYTHD->mem_root) List; -+ $$= new (thd->mem_root) List; - if ($$ == NULL) - MYSQL_YYABORT; - $$->push_back($1); -@@ -8595,7 +8565,7 @@ join_table: - { - MYSQL_YYABORT_UNLESS($1 && $3); - /* Change the current name resolution context to a local context. */ -- if (push_new_name_resolution_context(YYTHD, $1, $3)) -+ if (push_new_name_resolution_context(thd, $1, $3)) - MYSQL_YYABORT; - Select->parsing_place= IN_ON; - } -@@ -8610,7 +8580,7 @@ join_table: - { - MYSQL_YYABORT_UNLESS($1 && $3); - /* Change the current name resolution context to a local context. */ -- if (push_new_name_resolution_context(YYTHD, $1, $3)) -+ if (push_new_name_resolution_context(thd, $1, $3)) - MYSQL_YYABORT; - Select->parsing_place= IN_ON; - } -@@ -8640,7 +8610,7 @@ join_table: - { - MYSQL_YYABORT_UNLESS($1 && $5); - /* Change the current name resolution context to a local context. */ -- if (push_new_name_resolution_context(YYTHD, $1, $5)) -+ if (push_new_name_resolution_context(thd, $1, $5)) - MYSQL_YYABORT; - Select->parsing_place= IN_ON; - } -@@ -8676,7 +8646,7 @@ join_table: - { - MYSQL_YYABORT_UNLESS($1 && $5); - /* Change the current name resolution context to a local context. */ -- if (push_new_name_resolution_context(YYTHD, $1, $5)) -+ if (push_new_name_resolution_context(thd, $1, $5)) - MYSQL_YYABORT; - Select->parsing_place= IN_ON; - } -@@ -8724,7 +8694,7 @@ table_factor: - } - table_ident opt_table_alias opt_key_definition - { -- if (!($$= Select->add_table_to_list(YYTHD, $2, $3, -+ if (!($$= Select->add_table_to_list(thd, $2, $3, - Select->get_table_join_options(), - Lex->lock_option, - Select->pop_index_hints()))) -@@ -8922,7 +8892,7 @@ index_hints_list: - - opt_index_hints_list: - /* empty */ -- | { Select->alloc_index_hints(YYTHD); } index_hints_list -+ | { Select->alloc_index_hints(thd); } index_hints_list - ; - - opt_key_definition: -@@ -8931,15 +8901,15 @@ opt_key_definition: - ; - - opt_key_usage_list: -- /* empty */ { Select->add_index_hint(YYTHD, NULL, 0); } -+ /* empty */ { Select->add_index_hint(thd, NULL, 0); } - | key_usage_list {} - ; - - key_usage_element: - ident -- { Select->add_index_hint(YYTHD, $1.str, $1.length); } -+ { Select->add_index_hint(thd, $1.str, $1.length); } - | PRIMARY_SYM -- { Select->add_index_hint(YYTHD, (char *)"PRIMARY", 7); } -+ { Select->add_index_hint(thd, (char *)"PRIMARY", 7); } - ; - - key_usage_list: -@@ -8952,7 +8922,7 @@ using_list: - { - if (!($$= new List)) - MYSQL_YYABORT; -- String *s= new (YYTHD->mem_root) String((const char *) $1.str, -+ String *s= new (thd->mem_root) String((const char *) $1.str, - $1.length, - system_charset_info); - if (s == NULL) -@@ -8961,7 +8931,7 @@ using_list: - } - | using_list ',' ident - { -- String *s= new (YYTHD->mem_root) String((const char *) $3.str, -+ String *s= new (thd->mem_root) String((const char *) $3.str, - $3.length, - system_charset_info); - if (s == NULL) -@@ -9002,7 +8972,7 @@ interval_time_stamp: - implementation without changing its - resolution. - */ -- WARN_DEPRECATED(yythd, VER_CELOSIA, "FRAC_SECOND", "MICROSECOND"); -+ WARN_DEPRECATED(thd, VER_CELOSIA, "FRAC_SECOND", "MICROSECOND"); - } - ; - -@@ -9086,7 +9056,6 @@ opt_escape: - } - | /* empty */ - { -- THD *thd= YYTHD; - Lex->escape_used= FALSE; - $$= ((thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) ? - new (thd->mem_root) Item_string("", 0, &my_charset_latin1) : -@@ -9107,9 +9076,9 @@ group_clause: - - group_list: - group_list ',' order_ident order_dir -- { if (add_group_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; } -+ { if (add_group_to_list(thd, $3,(bool) $4)) MYSQL_YYABORT; } - | order_ident order_dir -- { if (add_group_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; } -+ { if (add_group_to_list(thd, $1,(bool) $2)) MYSQL_YYABORT; } - ; - - olap_opt: -@@ -9156,7 +9125,6 @@ alter_order_list: - alter_order_item: - simple_ident_nospvar order_dir - { -- THD *thd= YYTHD; - bool ascending= ($2 == 1) ? true : false; - if (add_order_to_list(thd, $1, ascending)) - MYSQL_YYABORT; -@@ -9209,9 +9177,9 @@ order_clause: - - order_list: - order_list ',' order_ident order_dir -- { if (add_order_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; } -+ { if (add_order_to_list(thd, $3,(bool) $4)) MYSQL_YYABORT; } - | order_ident order_dir -- { if (add_order_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; } -+ { if (add_order_to_list(thd, $1,(bool) $2)) MYSQL_YYABORT; } - ; - - order_dir: -@@ -9271,19 +9239,19 @@ limit_option: - } - | ULONGLONG_NUM - { -- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length); -+ $$= new (thd->mem_root) Item_uint($1.str, $1.length); - if ($$ == NULL) - MYSQL_YYABORT; - } - | LONG_NUM - { -- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length); -+ $$= new (thd->mem_root) Item_uint($1.str, $1.length); - if ($$ == NULL) - MYSQL_YYABORT; - } - | NUM - { -- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length); -+ $$= new (thd->mem_root) Item_uint($1.str, $1.length); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -9365,7 +9333,7 @@ procedure_clause: - lex->proc_list.elements=0; - lex->proc_list.first=0; - lex->proc_list.next= &lex->proc_list.first; -- Item_field *item= new (YYTHD->mem_root) -+ Item_field *item= new (thd->mem_root) - Item_field(&lex->current_select->context, - NULL, NULL, $2.str); - if (item == NULL) -@@ -9390,8 +9358,6 @@ procedure_list2: - procedure_item: - remember_name expr remember_end - { -- THD *thd= YYTHD; -- - if (add_proc_to_list(thd, $2)) - MYSQL_YYABORT; - if (!$2->name) -@@ -9560,7 +9526,6 @@ drop: - } - | DROP FUNCTION_SYM if_exists ident '.' ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - sp_name *spname; - if ($4.str && check_db_name(&$4)) -@@ -9583,7 +9548,6 @@ drop: - } - | DROP FUNCTION_SYM if_exists ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - LEX_STRING db= {0, 0}; - sp_name *spname; -@@ -9664,7 +9628,7 @@ table_list: - table_name: - table_ident - { -- if (!Select->add_table_to_list(YYTHD, $1, NULL, TL_OPTION_UPDATING)) -+ if (!Select->add_table_to_list(thd, $1, NULL, TL_OPTION_UPDATING)) - MYSQL_YYABORT; - } - ; -@@ -9677,7 +9641,7 @@ table_alias_ref_list: - table_alias_ref: - table_ident_opt_wild - { -- if (!Select->add_table_to_list(YYTHD, $1, NULL, -+ if (!Select->add_table_to_list(thd, $1, NULL, - TL_OPTION_UPDATING | TL_OPTION_ALIAS, - Lex->lock_option )) - MYSQL_YYABORT; -@@ -9868,7 +9832,7 @@ expr_or_default: - expr { $$= $1;} - | DEFAULT - { -- $$= new (YYTHD->mem_root) Item_default_value(Lex->current_context()); -+ $$= new (thd->mem_root) Item_default_value(Lex->current_context()); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -9922,7 +9886,7 @@ update_list: - update_elem: - simple_ident_nospvar equal expr_or_default - { -- if (add_item_to_list(YYTHD, $1) || add_value_to_list(YYTHD, $3)) -+ if (add_item_to_list(thd, $1) || add_value_to_list(thd, $3)) - MYSQL_YYABORT; - } - ; -@@ -9965,7 +9929,7 @@ delete: - single_multi: - FROM table_ident - { -- if (!Select->add_table_to_list(YYTHD, $2, NULL, TL_OPTION_UPDATING, -+ if (!Select->add_table_to_list(thd, $2, NULL, TL_OPTION_UPDATING, - Lex->lock_option)) - MYSQL_YYABORT; - } -@@ -9998,7 +9962,7 @@ table_wild_one: - Table_ident *ti= new Table_ident($1); - if (ti == NULL) - MYSQL_YYABORT; -- if (!Select->add_table_to_list(YYTHD, -+ if (!Select->add_table_to_list(thd, - ti, - $3, - TL_OPTION_UPDATING | TL_OPTION_ALIAS, -@@ -10007,10 +9971,10 @@ table_wild_one: - } - | ident '.' ident opt_wild opt_table_alias - { -- Table_ident *ti= new Table_ident(YYTHD, $1, $3, 0); -+ Table_ident *ti= new Table_ident(thd, $1, $3, 0); - if (ti == NULL) - MYSQL_YYABORT; -- if (!Select->add_table_to_list(YYTHD, -+ if (!Select->add_table_to_list(thd, - ti, - $5, - TL_OPTION_UPDATING | TL_OPTION_ALIAS, -@@ -10130,7 +10094,7 @@ show_param: - { - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_DATABASES; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_SCHEMATA)) -+ if (prepare_schema_table(thd, lex, 0, SCH_SCHEMATA)) - MYSQL_YYABORT; - } - | opt_full TABLES opt_db wild_and_where -@@ -10138,7 +10102,7 @@ show_param: - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_TABLES; - lex->select_lex.db= $3; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLE_NAMES)) -+ if (prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES)) - MYSQL_YYABORT; - } - | opt_full TRIGGERS_SYM opt_db wild_and_where -@@ -10146,7 +10110,7 @@ show_param: - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_TRIGGERS; - lex->select_lex.db= $3; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_TRIGGERS)) -+ if (prepare_schema_table(thd, lex, 0, SCH_TRIGGERS)) - MYSQL_YYABORT; - } - | EVENTS_SYM opt_db wild_and_where -@@ -10154,7 +10118,7 @@ show_param: - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_EVENTS; - lex->select_lex.db= $2; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_EVENTS)) -+ if (prepare_schema_table(thd, lex, 0, SCH_EVENTS)) - MYSQL_YYABORT; - } - | TABLE_SYM STATUS_SYM opt_db wild_and_where -@@ -10162,7 +10126,7 @@ show_param: - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_TABLE_STATUS; - lex->select_lex.db= $3; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLES)) -+ if (prepare_schema_table(thd, lex, 0, SCH_TABLES)) - MYSQL_YYABORT; - } - | OPEN_SYM TABLES opt_db wild_and_where -@@ -10170,22 +10134,22 @@ show_param: - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_OPEN_TABLES; - lex->select_lex.db= $3; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_OPEN_TABLES)) -+ if (prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES)) - MYSQL_YYABORT; - } - | opt_full PLUGIN_SYM - { - LEX *lex= Lex; -- WARN_DEPRECATED(yythd, "6.0", "SHOW PLUGIN", "'SHOW PLUGINS'"); -+ WARN_DEPRECATED(thd, "6.0", "SHOW PLUGIN", "'SHOW PLUGINS'"); - lex->sql_command= SQLCOM_SHOW_PLUGINS; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_PLUGINS)) -+ if (prepare_schema_table(thd, lex, 0, SCH_PLUGINS)) - MYSQL_YYABORT; - } - | PLUGINS_SYM - { - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_PLUGINS; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_PLUGINS)) -+ if (prepare_schema_table(thd, lex, 0, SCH_PLUGINS)) - MYSQL_YYABORT; - } - | ENGINE_SYM known_storage_engines show_engine_param -@@ -10198,7 +10162,7 @@ show_param: - lex->sql_command= SQLCOM_SHOW_FIELDS; - if ($5) - $4->change_db($5); -- if (prepare_schema_table(YYTHD, lex, $4, SCH_COLUMNS)) -+ if (prepare_schema_table(thd, lex, $4, SCH_COLUMNS)) - MYSQL_YYABORT; - } - | NEW_SYM MASTER_SYM FOR_SYM SLAVE -@@ -10233,7 +10197,7 @@ show_param: - lex->sql_command= SQLCOM_SHOW_KEYS; - if ($4) - $3->change_db($4); -- if (prepare_schema_table(YYTHD, lex, $3, SCH_STATISTICS)) -+ if (prepare_schema_table(thd, lex, $3, SCH_STATISTICS)) - MYSQL_YYABORT; - } - | COLUMN_SYM TYPES_SYM -@@ -10245,15 +10209,15 @@ show_param: - { - LEX *lex=Lex; - lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES; -- WARN_DEPRECATED(yythd, "6.0", "SHOW TABLE TYPES", "'SHOW [STORAGE] ENGINES'"); -- if (prepare_schema_table(YYTHD, lex, 0, SCH_ENGINES)) -+ WARN_DEPRECATED(thd, "6.0", "SHOW TABLE TYPES", "'SHOW [STORAGE] ENGINES'"); -+ if (prepare_schema_table(thd, lex, 0, SCH_ENGINES)) - MYSQL_YYABORT; - } - | opt_storage ENGINES_SYM - { - LEX *lex=Lex; - lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_ENGINES)) -+ if (prepare_schema_table(thd, lex, 0, SCH_ENGINES)) - MYSQL_YYABORT; - } - | AUTHORS_SYM -@@ -10285,7 +10249,7 @@ show_param: - { - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_PROFILE; -- if (prepare_schema_table(YYTHD, lex, NULL, SCH_PROFILES) != 0) -+ if (prepare_schema_table(thd, lex, NULL, SCH_PROFILES) != 0) - YYABORT; - } - | opt_var_type STATUS_SYM wild_and_where -@@ -10293,7 +10257,7 @@ show_param: - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_STATUS; - lex->option_type= $1; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_STATUS)) -+ if (prepare_schema_table(thd, lex, 0, SCH_STATUS)) - MYSQL_YYABORT; - } - | INNOBASE_SYM STATUS_SYM -@@ -10301,24 +10265,24 @@ show_param: - LEX *lex= Lex; - lex->sql_command = SQLCOM_SHOW_ENGINE_STATUS; - if (!(lex->create_info.db_type= -- ha_resolve_by_legacy_type(YYTHD, DB_TYPE_INNODB))) -+ ha_resolve_by_legacy_type(thd, DB_TYPE_INNODB))) - { - my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "InnoDB"); - MYSQL_YYABORT; - } -- WARN_DEPRECATED(yythd, "6.0", "SHOW INNODB STATUS", "'SHOW ENGINE INNODB STATUS'"); -+ WARN_DEPRECATED(thd, "6.0", "SHOW INNODB STATUS", "'SHOW ENGINE INNODB STATUS'"); - } - | MUTEX_SYM STATUS_SYM - { - LEX *lex= Lex; - lex->sql_command = SQLCOM_SHOW_ENGINE_MUTEX; - if (!(lex->create_info.db_type= -- ha_resolve_by_legacy_type(YYTHD, DB_TYPE_INNODB))) -+ ha_resolve_by_legacy_type(thd, DB_TYPE_INNODB))) - { - my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "InnoDB"); - MYSQL_YYABORT; - } -- WARN_DEPRECATED(yythd, "6.0", "SHOW MUTEX STATUS", "'SHOW ENGINE INNODB MUTEX'"); -+ WARN_DEPRECATED(thd, "6.0", "SHOW MUTEX STATUS", "'SHOW ENGINE INNODB MUTEX'"); - } - | opt_full PROCESSLIST_SYM - { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;} -@@ -10327,21 +10291,21 @@ show_param: - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_VARIABLES; - lex->option_type= $1; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_VARIABLES)) -+ if (prepare_schema_table(thd, lex, 0, SCH_VARIABLES)) - MYSQL_YYABORT; - } - | charset wild_and_where - { - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_CHARSETS; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_CHARSETS)) -+ if (prepare_schema_table(thd, lex, 0, SCH_CHARSETS)) - MYSQL_YYABORT; - } - | COLLATION_SYM wild_and_where - { - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_COLLATIONS; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_COLLATIONS)) -+ if (prepare_schema_table(thd, lex, 0, SCH_COLLATIONS)) - MYSQL_YYABORT; - } - | GRANTS -@@ -10371,7 +10335,7 @@ show_param: - { - LEX *lex= Lex; - lex->sql_command = SQLCOM_SHOW_CREATE; -- if (!lex->select_lex.add_table_to_list(YYTHD, $3, NULL,0)) -+ if (!lex->select_lex.add_table_to_list(thd, $3, NULL,0)) - MYSQL_YYABORT; - lex->only_view= 0; - lex->create_info.storage_media= HA_SM_DEFAULT; -@@ -10380,7 +10344,7 @@ show_param: - { - LEX *lex= Lex; - lex->sql_command = SQLCOM_SHOW_CREATE; -- if (!lex->select_lex.add_table_to_list(YYTHD, $3, NULL, 0)) -+ if (!lex->select_lex.add_table_to_list(thd, $3, NULL, 0)) - MYSQL_YYABORT; - lex->only_view= 1; - } -@@ -10416,14 +10380,14 @@ show_param: - { - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_STATUS_PROC; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_PROCEDURES)) -+ if (prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)) - MYSQL_YYABORT; - } - | FUNCTION_SYM STATUS_SYM wild_and_where - { - LEX *lex= Lex; - lex->sql_command= SQLCOM_SHOW_STATUS_FUNC; -- if (prepare_schema_table(YYTHD, lex, 0, SCH_PROCEDURES)) -+ if (prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)) - MYSQL_YYABORT; - } - | PROCEDURE CODE_SYM sp_name -@@ -10501,7 +10465,7 @@ wild_and_where: - /* empty */ - | LIKE TEXT_STRING_sys - { -- Lex->wild= new (YYTHD->mem_root) String($2.str, $2.length, -+ Lex->wild= new (thd->mem_root) String($2.str, $2.length, - system_charset_info); - if (Lex->wild == NULL) - MYSQL_YYABORT; -@@ -10525,7 +10489,7 @@ describe: - lex->sql_command= SQLCOM_SHOW_FIELDS; - lex->select_lex.db= 0; - lex->verbose= 0; -- if (prepare_schema_table(YYTHD, lex, $2, SCH_COLUMNS)) -+ if (prepare_schema_table(thd, lex, $2, SCH_COLUMNS)) - MYSQL_YYABORT; - } - opt_describe_column {} -@@ -10554,7 +10518,7 @@ opt_describe_column: - | text_string { Lex->wild= $1; } - | ident - { -- Lex->wild= new (YYTHD->mem_root) String((const char*) $1.str, -+ Lex->wild= new (thd->mem_root) String((const char*) $1.str, - $1.length, - system_charset_info); - if (Lex->wild == NULL) -@@ -10697,7 +10661,6 @@ use: - load: - LOAD DATA_SYM - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - - if (lex->sphead) -@@ -10711,7 +10674,7 @@ load: - | LOAD TABLE_SYM table_ident FROM MASTER_SYM - { - LEX *lex=Lex; -- WARN_DEPRECATED(yythd, "6.0", "LOAD TABLE FROM MASTER", -+ WARN_DEPRECATED(thd, "6.0", "LOAD TABLE FROM MASTER", - "MySQL Administrator (mysqldump, mysql)"); - if (lex->sphead) - { -@@ -10719,7 +10682,7 @@ load: - MYSQL_YYABORT; - } - lex->sql_command = SQLCOM_LOAD_MASTER_TABLE; -- if (!Select->add_table_to_list(YYTHD, $3, NULL, TL_OPTION_UPDATING)) -+ if (!Select->add_table_to_list(thd, $3, NULL, TL_OPTION_UPDATING)) - MYSQL_YYABORT; - } - ; -@@ -10739,7 +10702,7 @@ load_data: - opt_duplicate INTO TABLE_SYM table_ident - { - LEX *lex=Lex; -- if (!Select->add_table_to_list(YYTHD, $9, NULL, TL_OPTION_UPDATING, -+ if (!Select->add_table_to_list(thd, $9, NULL, TL_OPTION_UPDATING, - lex->lock_option)) - MYSQL_YYABORT; - lex->field_list.empty(); -@@ -10754,7 +10717,7 @@ load_data: - | FROM MASTER_SYM - { - Lex->sql_command = SQLCOM_LOAD_MASTER_DATA; -- WARN_DEPRECATED(yythd, "6.0", "LOAD DATA FROM MASTER", -+ WARN_DEPRECATED(thd, "6.0", "LOAD DATA FROM MASTER", - "mysqldump or future " - "BACKUP/RESTORE DATABASE facility"); - } -@@ -10872,7 +10835,7 @@ field_or_var: - simple_ident_nospvar {$$= $1;} - | '@' ident_or_text - { -- $$= new (YYTHD->mem_root) Item_user_var_as_out_param($2); -+ $$= new (thd->mem_root) Item_user_var_as_out_param($2); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -10889,7 +10852,6 @@ text_literal: - TEXT_STRING - { - LEX_STRING tmp; -- THD *thd= YYTHD; - CHARSET_INFO *cs_con= thd->variables.collation_connection; - CHARSET_INFO *cs_cli= thd->variables.character_set_client; - uint repertoire= thd->lex->text_string_is_7bit && -@@ -10915,7 +10877,7 @@ text_literal: - uint repertoire= Lex->text_string_is_7bit ? - MY_REPERTOIRE_ASCII : MY_REPERTOIRE_UNICODE30; - DBUG_ASSERT(my_charset_is_ascii_based(national_charset_info)); -- $$= new (YYTHD->mem_root) Item_string($1.str, $1.length, -+ $$= new (thd->mem_root) Item_string($1.str, $1.length, - national_charset_info, - DERIVATION_COERCIBLE, - repertoire); -@@ -10924,7 +10886,7 @@ text_literal: - } - | UNDERSCORE_CHARSET TEXT_STRING - { -- Item_string *str= new (YYTHD->mem_root) Item_string($2.str, -+ Item_string *str= new (thd->mem_root) Item_string($2.str, - $2.length, $1); - if (str == NULL) - MYSQL_YYABORT; -@@ -10943,7 +10905,7 @@ text_literal: - If the string has been pure ASCII so far, - check the new part. - */ -- CHARSET_INFO *cs= YYTHD->variables.collation_connection; -+ CHARSET_INFO *cs= thd->variables.collation_connection; - item->collation.repertoire|= my_string_repertoire(cs, - $2.str, - $2.length); -@@ -10954,15 +10916,15 @@ text_literal: - text_string: - TEXT_STRING_literal - { -- $$= new (YYTHD->mem_root) String($1.str, -+ $$= new (thd->mem_root) String($1.str, - $1.length, -- YYTHD->variables.collation_connection); -+ thd->variables.collation_connection); - if ($$ == NULL) - MYSQL_YYABORT; - } - | HEX_NUM - { -- Item *tmp= new (YYTHD->mem_root) Item_hex_string($1.str, $1.length); -+ Item *tmp= new (thd->mem_root) Item_hex_string($1.str, $1.length); - if (tmp == NULL) - MYSQL_YYABORT; - /* -@@ -10974,7 +10936,7 @@ text_string: - } - | BIN_NUM - { -- Item *tmp= new (YYTHD->mem_root) Item_bin_string($1.str, $1.length); -+ Item *tmp= new (thd->mem_root) Item_bin_string($1.str, $1.length); - if (tmp == NULL) - MYSQL_YYABORT; - /* -@@ -10989,7 +10951,6 @@ text_string: - param_marker: - PARAM_MARKER - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - Lex_input_stream *lip= YYLIP; - Item_param *item; -@@ -11022,38 +10983,38 @@ literal: - | NUM_literal { $$ = $1; } - | NULL_SYM - { -- $$ = new (YYTHD->mem_root) Item_null(); -+ $$ = new (thd->mem_root) Item_null(); - if ($$ == NULL) - MYSQL_YYABORT; - YYLIP->next_state= MY_LEX_OPERATOR_OR_IDENT; - } - | FALSE_SYM - { -- $$= new (YYTHD->mem_root) Item_int((char*) "FALSE",0,1); -+ $$= new (thd->mem_root) Item_int((char*) "FALSE",0,1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | TRUE_SYM - { -- $$= new (YYTHD->mem_root) Item_int((char*) "TRUE",1,1); -+ $$= new (thd->mem_root) Item_int((char*) "TRUE",1,1); - if ($$ == NULL) - MYSQL_YYABORT; - } - | HEX_NUM - { -- $$ = new (YYTHD->mem_root) Item_hex_string($1.str, $1.length); -+ $$ = new (thd->mem_root) Item_hex_string($1.str, $1.length); - if ($$ == NULL) - MYSQL_YYABORT; - } - | BIN_NUM - { -- $$= new (YYTHD->mem_root) Item_bin_string($1.str, $1.length); -+ $$= new (thd->mem_root) Item_bin_string($1.str, $1.length); - if ($$ == NULL) - MYSQL_YYABORT; - } - | UNDERSCORE_CHARSET HEX_NUM - { -- Item *tmp= new (YYTHD->mem_root) Item_hex_string($2.str, $2.length); -+ Item *tmp= new (thd->mem_root) Item_hex_string($2.str, $2.length); - if (tmp == NULL) - MYSQL_YYABORT; - /* -@@ -11064,7 +11025,7 @@ literal: - String *str= tmp->val_str((String*) 0); - - Item_string *item_str; -- item_str= new (YYTHD->mem_root) -+ item_str= new (thd->mem_root) - Item_string(NULL, /* name will be set in select_item */ - str ? str->ptr() : "", - str ? str->length() : 0, -@@ -11082,7 +11043,7 @@ literal: - } - | UNDERSCORE_CHARSET BIN_NUM - { -- Item *tmp= new (YYTHD->mem_root) Item_bin_string($2.str, $2.length); -+ Item *tmp= new (thd->mem_root) Item_bin_string($2.str, $2.length); - if (tmp == NULL) - MYSQL_YYABORT; - /* -@@ -11093,7 +11054,7 @@ literal: - String *str= tmp->val_str((String*) 0); - - Item_string *item_str; -- item_str= new (YYTHD->mem_root) -+ item_str= new (thd->mem_root) - Item_string(NULL, /* name will be set in select_item */ - str ? str->ptr() : "", - str ? str->length() : 0, -@@ -11117,7 +11078,7 @@ NUM_literal: - NUM - { - int error; -- $$= new (YYTHD->mem_root) -+ $$= new (thd->mem_root) - Item_int($1.str, - (longlong) my_strtoll10($1.str, NULL, &error), - $1.length); -@@ -11127,7 +11088,7 @@ NUM_literal: - | LONG_NUM - { - int error; -- $$= new (YYTHD->mem_root) -+ $$= new (thd->mem_root) - Item_int($1.str, - (longlong) my_strtoll10($1.str, NULL, &error), - $1.length); -@@ -11136,23 +11097,23 @@ NUM_literal: - } - | ULONGLONG_NUM - { -- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length); -+ $$= new (thd->mem_root) Item_uint($1.str, $1.length); - if ($$ == NULL) - MYSQL_YYABORT; - } - | DECIMAL_NUM - { -- $$= new (YYTHD->mem_root) Item_decimal($1.str, $1.length, -- YYTHD->charset()); -- if (($$ == NULL) || (YYTHD->is_error())) -+ $$= new (thd->mem_root) Item_decimal($1.str, $1.length, -+ thd->charset()); -+ if (($$ == NULL) || (thd->is_error())) - { - MYSQL_YYABORT; - } - } - | FLOAT_NUM - { -- $$= new (YYTHD->mem_root) Item_float($1.str, $1.length); -- if (($$ == NULL) || (YYTHD->is_error())) -+ $$= new (thd->mem_root) Item_float($1.str, $1.length); -+ if (($$ == NULL) || (thd->is_error())) - { - MYSQL_YYABORT; - } -@@ -11172,7 +11133,7 @@ table_wild: - ident '.' '*' - { - SELECT_LEX *sel= Select; -- $$= new (YYTHD->mem_root) Item_field(Lex->current_context(), -+ $$= new (thd->mem_root) Item_field(Lex->current_context(), - NullS, $1.str, "*"); - if ($$ == NULL) - MYSQL_YYABORT; -@@ -11180,7 +11141,6 @@ table_wild: - } - | ident '.' ident '.' '*' - { -- THD *thd= YYTHD; - SELECT_LEX *sel= Select; - const char* schema= thd->client_capabilities & CLIENT_NO_SCHEMA ? - NullS : $1.str; -@@ -11200,7 +11160,6 @@ order_ident: - simple_ident: - ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - Lex_input_stream *lip= YYLIP; - sp_variable_t *spv; -@@ -11251,7 +11210,6 @@ simple_ident: - simple_ident_nospvar: - ident - { -- THD *thd= YYTHD; - SELECT_LEX *sel=Select; - if ((sel->parsing_place != IN_HAVING) || - (sel->get_in_sum_expr() > 0)) -@@ -11273,7 +11231,6 @@ simple_ident_nospvar: - simple_ident_q: - ident '.' ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - - /* -@@ -11352,7 +11309,6 @@ simple_ident_q: - } - | '.' ident '.' ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - SELECT_LEX *sel= lex->current_select; - if (sel->no_table_names_allowed) -@@ -11377,7 +11333,6 @@ simple_ident_q: - } - | ident '.' ident '.' ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - SELECT_LEX *sel= lex->current_select; - const char* schema= (thd->client_capabilities & CLIENT_NO_SCHEMA ? -@@ -11445,7 +11400,7 @@ table_ident: - } - | ident '.' ident - { -- $$= new Table_ident(YYTHD, $1,$3,0); -+ $$= new Table_ident(thd, $1,$3,0); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -11467,7 +11422,7 @@ table_ident_opt_wild: - } - | ident '.' ident opt_wild - { -- $$= new Table_ident(YYTHD, $1,$3,0); -+ $$= new Table_ident(thd, $1,$3,0); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -11477,7 +11432,7 @@ table_ident_nodb: - ident - { - LEX_STRING db={(char*) any_db,3}; -- $$= new Table_ident(YYTHD, db,$1,0); -+ $$= new Table_ident(thd, db,$1,0); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -11487,8 +11442,6 @@ IDENT_sys: - IDENT { $$= $1; } - | IDENT_QUOTED - { -- THD *thd= YYTHD; -- - if (thd->charset_is_system_charset) - { - CHARSET_INFO *cs= system_charset_info; -@@ -11516,8 +11469,6 @@ IDENT_sys: - TEXT_STRING_sys: - TEXT_STRING - { -- THD *thd= YYTHD; -- - if (thd->charset_is_system_charset) - $$= $1; - else -@@ -11532,8 +11483,6 @@ TEXT_STRING_sys: - TEXT_STRING_literal: - TEXT_STRING - { -- THD *thd= YYTHD; -- - if (thd->charset_is_collation_connection) - $$= $1; - else -@@ -11548,8 +11497,6 @@ TEXT_STRING_literal: - TEXT_STRING_filesystem: - TEXT_STRING - { -- THD *thd= YYTHD; -- - if (thd->charset_is_character_set_filesystem) - $$= $1; - else -@@ -11566,7 +11513,6 @@ ident: - IDENT_sys { $$=$1; } - | keyword - { -- THD *thd= YYTHD; - $$.str= thd->strmake($1.str, $1.length); - if ($$.str == NULL) - MYSQL_YYABORT; -@@ -11578,7 +11524,6 @@ label_ident: - IDENT_sys { $$=$1; } - | keyword_sp - { -- THD *thd= YYTHD; - $$.str= thd->strmake($1.str, $1.length); - if ($$.str == NULL) - MYSQL_YYABORT; -@@ -11595,7 +11540,6 @@ ident_or_text: - user: - ident_or_text - { -- THD *thd= YYTHD; - if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) - MYSQL_YYABORT; - $$->user = $1; -@@ -11609,7 +11553,6 @@ user: - } - | ident_or_text '@' ident_or_text - { -- THD *thd= YYTHD; - if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) - MYSQL_YYABORT; - $$->user = $1; $$->host=$3; -@@ -11628,7 +11571,7 @@ user: - } - | CURRENT_USER optional_braces - { -- if (!($$=(LEX_USER*) YYTHD->alloc(sizeof(st_lex_user)))) -+ if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) - MYSQL_YYABORT; - /* - empty LEX_USER means current_user and -@@ -11991,7 +11934,6 @@ option_value_list: - - option_type_value: - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - Lex_input_stream *lip= YYLIP; - -@@ -12022,7 +11964,6 @@ option_type_value: - } - ext_option_value - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - Lex_input_stream *lip= YYLIP; - -@@ -12105,7 +12046,6 @@ ext_option_value: - sys_option_value: - option_type internal_variable_name equal set_expr_or_default - { -- THD *thd= YYTHD; - LEX *lex= Lex; - LEX_STRING *name= &$2.base_name; - -@@ -12117,7 +12057,7 @@ sys_option_value: - my_parse_error(ER(ER_SYNTAX_ERROR)); - MYSQL_YYABORT; - } -- if (set_trigger_new_row(YYTHD, name, $4)) -+ if (set_trigger_new_row(thd, name, $4)) - MYSQL_YYABORT; - } - else if ($2.var) -@@ -12147,7 +12087,6 @@ sys_option_value: - } - | option_type TRANSACTION_SYM ISOLATION LEVEL_SYM isolation_types - { -- THD *thd= YYTHD; - LEX *lex=Lex; - lex->option_type= $1; - Item *item= new (thd->mem_root) Item_int((int32) $5); -@@ -12167,7 +12106,7 @@ option_value: - '@' ident_or_text equal expr - { - Item_func_set_user_var *item; -- item= new (YYTHD->mem_root) Item_func_set_user_var($2, $4); -+ item= new (thd->mem_root) Item_func_set_user_var($2, $4); - if (item == NULL) - MYSQL_YYABORT; - set_var_user *var= new set_var_user(item); -@@ -12177,7 +12116,6 @@ option_value: - } - | '@' '@' opt_var_ident_type internal_variable_name equal set_expr_or_default - { -- THD *thd= YYTHD; - struct sys_var_with_base tmp= $4; - /* Lookup if necessary: must be a system variable. */ - if (tmp.var == NULL) -@@ -12190,7 +12128,6 @@ option_value: - } - | charset old_or_new_charset_name_or_default - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - CHARSET_INFO *cs2; - cs2= $2 ? $2: global_system_variables.character_set_client; -@@ -12238,7 +12175,6 @@ option_value: - } - | PASSWORD equal text_or_password - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - LEX_USER *user; - sp_pcontext *spc= lex->spcont; -@@ -12278,7 +12214,6 @@ option_value: - internal_variable_name: - ident - { -- THD *thd= YYTHD; - sp_pcontext *spc= thd->lex->spcont; - sp_variable_t *spv; - -@@ -12337,7 +12272,7 @@ internal_variable_name: - } - else - { -- sys_var *tmp=find_sys_var(YYTHD, $3.str, $3.length); -+ sys_var *tmp=find_sys_var(thd, $3.str, $3.length); - if (!tmp) - MYSQL_YYABORT; - if (!tmp->is_struct()) -@@ -12348,7 +12283,7 @@ internal_variable_name: - } - | DEFAULT '.' ident - { -- sys_var *tmp=find_sys_var(YYTHD, $3.str, $3.length); -+ sys_var *tmp=find_sys_var(thd, $3.str, $3.length); - if (!tmp) - MYSQL_YYABORT; - if (!tmp->is_struct()) -@@ -12370,16 +12305,16 @@ text_or_password: - TEXT_STRING { $$=$1.str;} - | PASSWORD '(' TEXT_STRING ')' - { -- $$= $3.length ? YYTHD->variables.old_passwords ? -- Item_func_old_password::alloc(YYTHD, $3.str, $3.length) : -- Item_func_password::alloc(YYTHD, $3.str, $3.length) : -+ $$= $3.length ? thd->variables.old_passwords ? -+ Item_func_old_password::alloc(thd, $3.str, $3.length) : -+ Item_func_password::alloc(thd, $3.str, $3.length) : - $3.str; - if ($$ == NULL) - MYSQL_YYABORT; - } - | OLD_PASSWORD '(' TEXT_STRING ')' - { -- $$= $3.length ? Item_func_old_password::alloc(YYTHD, $3.str, -+ $$= $3.length ? Item_func_old_password::alloc(thd, $3.str, - $3.length) : - $3.str; - if ($$ == NULL) -@@ -12393,19 +12328,19 @@ set_expr_or_default: - | DEFAULT { $$=0; } - | ON - { -- $$=new (YYTHD->mem_root) Item_string("ON", 2, system_charset_info); -+ $$=new (thd->mem_root) Item_string("ON", 2, system_charset_info); - if ($$ == NULL) - MYSQL_YYABORT; - } - | ALL - { -- $$=new (YYTHD->mem_root) Item_string("ALL", 3, system_charset_info); -+ $$=new (thd->mem_root) Item_string("ALL", 3, system_charset_info); - if ($$ == NULL) - MYSQL_YYABORT; - } - | BINARY - { -- $$=new (YYTHD->mem_root) Item_string("binary", 6, system_charset_info); -+ $$=new (thd->mem_root) Item_string("binary", 6, system_charset_info); - if ($$ == NULL) - MYSQL_YYABORT; - } -@@ -12443,7 +12378,7 @@ table_lock: - table_ident opt_table_alias lock_option - { - thr_lock_type lock_type= (thr_lock_type) $3; -- if (!Select->add_table_to_list(YYTHD, $1, $2, 0, lock_type)) -+ if (!Select->add_table_to_list(thd, $1, $2, 0, lock_type)) - MYSQL_YYABORT; - /* If table is to be write locked, protect from a impending GRL. */ - if (lock_type >= TL_WRITE_ALLOW_WRITE) -@@ -12514,7 +12449,7 @@ handler: - lex->expr_allows_subselect= FALSE; - lex->sql_command = SQLCOM_HA_READ; - lex->ha_rkey_mode= HA_READ_KEY_EXACT; /* Avoid purify warnings */ -- Item *one= new (YYTHD->mem_root) Item_int((int32) 1); -+ Item *one= new (thd->mem_root) Item_int((int32) 1); - if (one == NULL) - MYSQL_YYABORT; - lex->current_select->select_limit= one; -@@ -12836,10 +12771,10 @@ grant_user: - $$=$1; $1->password=$4; - if ($4.length) - { -- if (YYTHD->variables.old_passwords) -+ if (thd->variables.old_passwords) - { - char *buff= -- (char *) YYTHD->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH_323+1); -+ (char *) thd->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH_323+1); - if (buff == NULL) - MYSQL_YYABORT; - my_make_scrambled_password_323(buff, $4.str, $4.length); -@@ -12849,7 +12784,7 @@ grant_user: - else - { - char *buff= -- (char *) YYTHD->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH+1); -+ (char *) thd->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH+1); - if (buff == NULL) - MYSQL_YYABORT; - my_make_scrambled_password(buff, $4.str, $4.length); -@@ -12881,7 +12816,7 @@ column_list: - column_list_id: - ident - { -- String *new_str = new (YYTHD->mem_root) String((const char*) $1.str,$1.length,system_charset_info); -+ String *new_str = new (thd->mem_root) String((const char*) $1.str,$1.length,system_charset_info); - if (new_str == NULL) - MYSQL_YYABORT; - List_iterator iter(Lex->columns); -@@ -12981,14 +12916,14 @@ opt_work: - - opt_chain: - /* empty */ -- { $$= (YYTHD->variables.completion_type == 1); } -+ { $$= (thd->variables.completion_type == 1); } - | AND_SYM NO_SYM CHAIN_SYM { $$=0; } - | AND_SYM CHAIN_SYM { $$=1; } - ; - - opt_release: - /* empty */ -- { $$= (YYTHD->variables.completion_type == 2); } -+ { $$= (thd->variables.completion_type == 2); } - | RELEASE_SYM { $$=1; } - | NO_SYM RELEASE_SYM { $$=0; } - ; -@@ -13102,7 +13037,6 @@ union_opt: - - union_order_or_limit: - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE); - SELECT_LEX *sel= lex->current_select; -@@ -13118,7 +13052,6 @@ union_order_or_limit: - } - order_or_limit - { -- THD *thd= YYTHD; - thd->lex->current_select->no_table_names_allowed= 0; - thd->where= ""; - } -@@ -13255,14 +13188,14 @@ no_definer: - from older master servers (i.e. to create non-suid trigger in this - case). - */ -- YYTHD->lex->definer= 0; -+ thd->lex->definer= 0; - } - ; - - definer: - DEFINER_SYM EQ user - { -- YYTHD->lex->definer= get_current_user(YYTHD, $3); -+ thd->lex->definer= get_current_user(thd, $3); - } - ; - -@@ -13307,7 +13240,6 @@ view_suid: - view_tail: - view_suid VIEW_SYM table_ident - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - lex->sql_command= SQLCOM_CREATE_VIEW; - /* first table in list is target VIEW name */ -@@ -13347,7 +13279,6 @@ view_select: - } - view_select_aux view_check_option - { -- THD *thd= YYTHD; - LEX *lex= Lex; - uint len= YYLIP->get_cpp_ptr() - lex->create_view_select.str; - void *create_view_select= thd->memdup(lex->create_view_select.str, len); -@@ -13403,7 +13334,6 @@ trigger_tail: - EACH_SYM - ROW_SYM - { /* $15 */ -- THD *thd= YYTHD; - LEX *lex= thd->lex; - Lex_input_stream *lip= YYLIP; - sp_head *sp; -@@ -13437,8 +13367,8 @@ trigger_tail: - sp_head *sp= lex->sphead; - - lex->sql_command= SQLCOM_CREATE_TRIGGER; -- sp->set_stmt_end(YYTHD); -- sp->restore_thd_mem_root(YYTHD); -+ sp->set_stmt_end(thd); -+ sp->restore_thd_mem_root(thd); - - if (sp->is_not_allowed_in_function("trigger")) - MYSQL_YYABORT; -@@ -13448,7 +13378,7 @@ trigger_tail: - sp_proc_stmt alternatives are not saving/restoring LEX, so - lex->query_tables can be wiped out. - */ -- if (!lex->select_lex.add_table_to_list(YYTHD, $9, -+ if (!lex->select_lex.add_table_to_list(thd, $9, - (LEX_STRING*) 0, - TL_OPTION_UPDATING, - TL_IGNORE)) -@@ -13466,7 +13396,6 @@ udf_tail: - AGGREGATE_SYM remember_name FUNCTION_SYM ident - RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - if (is_native_function(thd, & $4)) - { -@@ -13484,7 +13413,6 @@ udf_tail: - | remember_name FUNCTION_SYM ident - RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - if (is_native_function(thd, & $3)) - { -@@ -13507,7 +13435,6 @@ sf_tail: - sp_name /* $3 */ - '(' /* $4 */ - { /* $5 */ -- THD *thd= YYTHD; - LEX *lex= thd->lex; - Lex_input_stream *lip= YYLIP; - sp_head *sp; -@@ -13565,7 +13492,7 @@ sf_tail: - MYSQL_YYABORT; - } - -- if (sp->fill_field_definition(YYTHD, lex, -+ if (sp->fill_field_definition(thd, lex, - (enum enum_field_types) $11, - &sp->m_return_field_def)) - MYSQL_YYABORT; -@@ -13574,7 +13501,6 @@ sf_tail: - } - sp_c_chistics /* $13 */ - { /* $14 */ -- THD *thd= YYTHD; - LEX *lex= thd->lex; - Lex_input_stream *lip= YYLIP; - -@@ -13583,7 +13509,6 @@ sf_tail: - } - sp_proc_stmt /* $15 */ - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - sp_head *sp= lex->sphead; - -@@ -13654,10 +13579,10 @@ sp_tail: - sp= new sp_head(); - if (sp == NULL) - MYSQL_YYABORT; -- sp->reset_thd_mem_root(YYTHD); -+ sp->reset_thd_mem_root(thd); - sp->init(lex); - sp->m_type= TYPE_ENUM_PROCEDURE; -- sp->init_sp_name(YYTHD, $3); -+ sp->init_sp_name(thd, $3); - - lex->sphead= sp; - } -@@ -13672,7 +13597,6 @@ sp_tail: - sp_pdparam_list - ')' - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - - lex->sphead->m_param_end= YYLIP->get_cpp_tok_start(); -@@ -13680,7 +13604,6 @@ sp_tail: - } - sp_c_chistics - { -- THD *thd= YYTHD; - LEX *lex= thd->lex; - - lex->sphead->m_chistics= &lex->sp_chistics; -@@ -13691,9 +13614,9 @@ sp_tail: - LEX *lex= Lex; - sp_head *sp= lex->sphead; - -- sp->set_stmt_end(YYTHD); -+ sp->set_stmt_end(thd); - lex->sql_command= SQLCOM_CREATE_PROCEDURE; -- sp->restore_thd_mem_root(YYTHD); -+ sp->restore_thd_mem_root(thd); - } - ; - -@@ -13730,21 +13653,21 @@ xid: - text_string - { - MYSQL_YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE); -- if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID)))) -+ if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) - MYSQL_YYABORT; - Lex->xid->set(1L, $1->ptr(), $1->length(), 0, 0); - } - | text_string ',' text_string - { - MYSQL_YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE && $3->length() <= MAXBQUALSIZE); -- if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID)))) -+ if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) - MYSQL_YYABORT; - Lex->xid->set(1L, $1->ptr(), $1->length(), $3->ptr(), $3->length()); - } - | text_string ',' text_string ',' ulong_num - { - MYSQL_YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE && $3->length() <= MAXBQUALSIZE); -- if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID)))) -+ if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) - MYSQL_YYABORT; - Lex->xid->set($5, $1->ptr(), $1->length(), $3->ptr(), $3->length()); - } diff --git a/utils/nano/Makefile b/utils/nano/Makefile index db28550..ef36bf3 100644 --- a/utils/nano/Makefile +++ b/utils/nano/Makefile @@ -8,15 +8,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nano -PKG_VERSION:=2.7.5 +PKG_VERSION:=4.3 PKG_RELEASE:=1 -PKG_LICENSE:=GPL-3.0+ -PKG_LICENSE_FILES:=COPYING PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/nano -PKG_MD5SUM:=002703e368e07882f75e304c8860d83d -PKG_HASH:=a64d24e6bc4fc448376d038f9a755af77f8e748c9051b6f45bf85e783a7e67e4 +PKG_HASH:=00d3ad1a287a85b4bf83e5f06cedd0a9f880413682bebd52b4b1e2af8cfc0d81 + +PKG_LICENSE:=GPL-3.0+ +PKG_LICENSE_FILES:=COPYING +PKG_MAINTAINER:=Jonathan Bennett , Hannu Nyman PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -28,8 +29,7 @@ define Package/nano SECTION:=utils CATEGORY:=Utilities TITLE:=An enhanced clone of the Pico text editor - URL:=http://www.nano-editor.org/ - MAINTAINER:=Jonathan Bennett + URL:=https://www.nano-editor.org/ DEPENDS:=+libncurses endef @@ -40,10 +40,9 @@ endef CONFIGURE_ARGS += \ --enable-tiny \ - --disable-glibtest \ --disable-utf8 \ - --without-slang \ - --disable-color \ + --without-slang \ + --disable-color \ CONFIGURE_VARS += \ ac_cv_header_regex_h=no \ diff --git a/utils/ncdu/Makefile b/utils/ncdu/Makefile deleted file mode 100644 index fa52ff6..0000000 --- a/utils/ncdu/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ncdu -PKG_VERSION:=1.12 -PKG_RELEASE=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://dev.yorhel.nl/download -PKG_MD5SUM:=7365ac46c420bc511621216b1747984f - -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 - -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/ncdu - SUBMENU:=Filesystem - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libncurses - TITLE:=ncurses disk usage viewer - MAINTAINER:=Charles Lehner - URL:=https://dev.yorhel.nl/ncdu -endef - -define Package/ncdu/description - Ncdu is a ncurses-based du viewer. It provides a fast and easy-to-use - interface through famous du utility. It allows one to browse through the - directories and show percentages of disk usage with ncurses library. -endef - -CONFIGURE_ARGS += --with-ncurses - -define Package/ncdu/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncdu $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,ncdu)) diff --git a/utils/ntfs-3g/Makefile b/utils/ntfs-3g/Makefile deleted file mode 100644 index a68747e..0000000 --- a/utils/ntfs-3g/Makefile +++ /dev/null @@ -1,234 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=ntfs-3g -PKG_RELEASE:=1 - -PKG_VERSION:=2016.2.22 -PKG_SOURCE:=$(PKG_NAME)_ntfsprogs-$(PKG_VERSION).tgz -PKG_SOURCE_URL:=http://www.tuxera.com/opensource/ -PKG_MD5SUM:=ccbe8672d0f757bd0c975b50aa4c512e - -PKG_LICENSE:=GPL-2.0 LGPL-2.0 -PKG_LICENSE_FILES:=COPYING COPYING.LIB - -PKG_MAINTAINER:=Ted Hess - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -# release contains fuseext/int hint -PKG_RELEASE:=$(PKG_RELEASE)$(if $(CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE),-fuseext,-fuseint) - -# define build dir, respect fuseext/int -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) - -include $(INCLUDE_DIR)/package.mk - -define Package/ntfs-3g/common - SECTION:=utils - CATEGORY:=Utilities - URL:=http://www.tuxera.com - SUBMENU:=Filesystem - TITLE:=Stable Read/Write NTFS Driver -endef - -define Package/ntfs-3g - $(call Package/ntfs-3g/common) - DEPENDS+= +kmod-fuse +PACKAGE_NTFS-3G_USE_LIBFUSE:libfuse +libpthread -endef - -define Package/ntfs-3g/description - Ntfs-3g is a NTFS driver, which can create, remove, rename, - move files, directories, hard links, and streams. It can read - and write files, including streams and sparse files. It can - handle special files like symbolic links, devices, and FIFOs. - Moreover it can also read transparently compressed files. - - Contains: - - ntfs-3g - - ntfs-3g.probe - - mount.ntfs-3g (symlink to ntfs-3g) - -endef - -define Package/ntfs-3g/config -config PACKAGE_NTFS-3G_USE_LIBFUSE - bool "use external FUSE library, selects package libfuse" - depends on PACKAGE_ntfs-3g - ---help--- - Ntfs-3g by default uses a minimalized lite version of FUSE. - If libfuse is part of your filesystem anyway (because of sshfs, owfs - etc.) it makes sense to activate this option and save some kilobytes - of space. - -endef - -define Package/ntfs-3g-low - $(call Package/ntfs-3g/common) - TITLE:=lowntfs-3g (alternative using the fuse low-level interface) - DEPENDS+= +ntfs-3g -endef - -define Package/ntfs-3g-low/description - Contains: - - lowntfs-3g - - mount.lowntfs-3g (symlink to lowntfs-3g) - - A driver variant using the fuse low-level interface missing some of the - enhanced functionality for streams or the like. You might want to check: - http://www.tuxera.com/community/ntfs-3g-manual/ - -endef - -define Package/ntfs-3g-utils - $(call Package/ntfs-3g/common) - TITLE:=ntfs-3g utilities (extra) - DEPENDS+= +ntfs-3g -endef - -define Package/ntfs-3g-utils/description - Additional ntfs-3g utilities. Not included by default for size - considerations. - - Currently: - - ntfs-3g.secaudit - - ntfs-3g.usermap -endef - -define Package/ntfsprogs_ntfs-3g/description - Suite of NTFS utilities for doing neat things with NTFS. - Contains: - - mkntfs - Create an NTFS filesystem. - - ntfscat - Dump a file's content to the standard output. - - ntfsclone - Efficiently clone, backup, restore or rescue NTFS. - - ntfscluster - Locate the files which use the given sectors or clusters. - - ntfscmp - Compare two NTFS filesystems and tell the differences. - - ntfscp - Copy a file to an NTFS volume. - - ntfsfix - Check and fix some common errors, clear the LogFile. - - ntfsinfo - Show information about NTFS or one of the files or directories within it. - - ntfslabel - Show, or set, an NTFS filesystem's volume label. - - ntfsls - List information about files in a directory residing on an NTFS. - - ntfsresize - Resize NTFS without losing data. - - ntfsundelete - Recover deleted files from NTFS. -endef - -define Package/ntfsprogs_ntfs-3g - $(call Package/ntfs-3g/common) - TITLE:=ntfsprogs (ntfs-3g) - DEPENDS+= +ntfs-3g +libgcrypt +libuuid -endef - -CONFIGURE_ARGS += \ - --enable-shared \ - --enable-static \ - --with-uuid - -# configure/make according selection -ifdef CONFIG_PACKAGE_NTFS-3G_USE_LIBFUSE - CONFIGURE_ARGS += --with-fuse=external - TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include/fuse $(TARGET_CPPFLAGS) -else - CONFIGURE_ARGS += --with-fuse=internal - TARGET_CPPFLAGS:=-I../include/fuse-lite $(TARGET_CPPFLAGS) -endif - -# enable disable ntfsprogs -ifneq ($(CONFIG_PACKAGE_ntfsprogs_ntfs-3g)$(SDK)$(DEVELOPER),) - CONFIGURE_ARGS += --enable-ntfsprogs -else - CONFIGURE_ARGS += --disable-ntfsprogs -endif - -# redefine prepare to extract to our build dir -# apply patches -define Build/Prepare - rm -rf $(PKG_BUILD_DIR)/ - mkdir -p $(PKG_BUILD_DIR)/ - $(TAR) -xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip 1 - $(Build/Patch) -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/ntfs-3g $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.{la,a,so*} $(1)/usr/lib/ -endef - -define Package/ntfs-3g/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g{,.probe} $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libntfs-3g.so.* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/sbin - $(CP) $(PKG_INSTALL_DIR)/sbin/mount.ntfs-3g $(1)/sbin/ - $(CP) $(PKG_INSTALL_DIR)/sbin/mount.ntfs-3g $(1)/sbin/mount.ntfs -endef - -define Package/ntfs-3g/postinst -#!/bin/sh -FILE="$${IPKG_INSTROOT}/etc/filesystems" -ID="ntfs-3g" - -if ! [ -f '/etc/filesystems' ]; then - echo "Create '$$FILE'." - touch "$$FILE" -fi - -if ! grep -q -e '^ntfs-3g$$' "$$FILE"; then - echo "Add '$$ID' to known filesystems." - echo "$$ID" >> "$$FILE" -fi - -endef - -define Package/ntfs-3g-low/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lowntfs-3g $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/sbin - $(CP) $(PKG_INSTALL_DIR)/sbin/mount.lowntfs-3g $(1)/sbin/ -endef - -define Package/ntfs-3g-low/postinst -#!/bin/sh -FILE="$${IPKG_INSTROOT}/etc/filesystems" -ID="lowntfs-3g" - -if ! [ -f '/etc/filesystems' ]; then - echo "Create '$$FILE'." - touch "$$FILE" -fi - -if ! grep -q -e '^ntfs-3g$$' "$$FILE"; then - echo "Add '$$ID' to known filesystems." - echo "$$ID" >> "$$FILE" -fi - -endef - -define Package/ntfs-3g-utils/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g.secaudit $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ntfs-3g.usermap $(1)/usr/bin -endef - -define Package/ntfsprogs_ntfs-3g/install - $(INSTALL_DIR) $(1)/sbin - $(CP) $(PKG_INSTALL_DIR)/sbin/mkfs.ntfs $(1)/sbin/ - $(INSTALL_DIR) $(1)/usr/bin - $(FIND) $(PKG_INSTALL_DIR)/usr/bin/ -type f ! -regex '.*[^/]*ntfs-3g[^/]*' -exec $(INSTALL_BIN) {} $(1)/usr/bin/ \; - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,ntfs-3g)) -$(eval $(call BuildPackage,ntfs-3g-low)) -$(eval $(call BuildPackage,ntfs-3g-utils)) -$(eval $(call BuildPackage,ntfsprogs_ntfs-3g)) diff --git a/utils/ntfs-3g/patches/001-fuseint-fix-path-mounted-on-musl.patch b/utils/ntfs-3g/patches/001-fuseint-fix-path-mounted-on-musl.patch deleted file mode 100644 index 577c89b..0000000 --- a/utils/ntfs-3g/patches/001-fuseint-fix-path-mounted-on-musl.patch +++ /dev/null @@ -1,30 +0,0 @@ -Index: ntfs-3g-2014.2.15-1-fuseint/libfuse-lite/fusermount.c -=================================================================== ---- ntfs-3g-2014.2.15-1-fuseint.orig/libfuse-lite/fusermount.c -+++ ntfs-3g-2014.2.15-1-fuseint/libfuse-lite/fusermount.c -@@ -36,6 +36,10 @@ - - #define FUSE_DEV_NEW "/dev/fuse" - -+#ifndef _PATH_MOUNTED -+#define _PATH_MOUNTED "/proc/mounts" -+#endif -+ - #ifndef MS_DIRSYNC - #define MS_DIRSYNC 128 - #endif -Index: ntfs-3g-2014.2.15-1-fuseint/libfuse-lite/mount_util.c -=================================================================== ---- ntfs-3g-2014.2.15-1-fuseint.orig/libfuse-lite/mount_util.c -+++ ntfs-3g-2014.2.15-1-fuseint/libfuse-lite/mount_util.c -@@ -255,6 +255,10 @@ int fuse_mnt_check_fuseblk(void) - - #else /* __SOLARIS__ */ - -+#ifndef _PATH_MOUNTED -+#define _PATH_MOUNTED "/proc/mounts" -+#endif /* _PATH_MOUNTED */ -+ - static int mtab_needs_update(const char *mnt) - { - int res; diff --git a/utils/oath-toolkit/Makefile b/utils/oath-toolkit/Makefile deleted file mode 100644 index 014c9df..0000000 --- a/utils/oath-toolkit/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=oath-toolkit -PKG_VERSION:=2.6.2 -PKG_RELEASE:=1 -PKG_SOURCE:=oath-toolkit-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SAVANNAH/oath-toolkit -PKG_SOURCE_MD5SUM:=4a05cd4768764843bd5493609a6bdb17 -PKG_LICENSE:=LGPL-2.0+ GPL-3.0+ -PKG_LICENSE_FILES:=COPYING -PKG_INSTALL:=1 -PKG_MAINTAINER:=Fam Zheng - -include $(INCLUDE_DIR)/package.mk - -CONFIGURE_ARGS += \ - --disable-xmltest \ - --disable-pskc - -define Package/oath-toolkit - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Toolkit for building one-time password authentication - URL:=http://www.nongnu.org/oath-toolkit/index.html - DEPENDS:= -endef - -define Package/oath-toolkit/description - The OATH Toolkit provide components for building one-time password - authentication systems. It contains shared libraries, command line - tools and a PAM module. Supported technologies include the event-based - HOTP algorithm (RFC4226) and the time-based TOTP algorithm (RFC6238). -endef - -define Package/oath-toolkit/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/oathtool $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/liboath.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,oath-toolkit)) diff --git a/utils/open-plc-utils/Makefile b/utils/open-plc-utils/Makefile deleted file mode 100644 index 243d8e9..0000000 --- a/utils/open-plc-utils/Makefile +++ /dev/null @@ -1,104 +0,0 @@ -# -# Copyright (C) 2013-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=open-plc-utils -PKG_VERSION:=2017-01-15 -PKG_RELEASE:=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/qca/open-plc-utils.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=18b7e2a9a17f043fe8ac8b457680aafb1c249c55 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz - -PKG_MAINTAINER:=Florian Fainelli - -PKG_LICENSE:=ISC -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/open-plc-utils/Default - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Qualcomm Atheros Power Line Communication utilities - URL:=https://github.com/qca/open-plc-utils/blob/master/README -endef - -define Package/open-plc-utils - $(call Package/open-plc-utils/Default) - MENU:=1 -endef - -define GenPlugin - define Package/$(addprefix open-plc-utils-,$(1)) - $(call Package/open-plc-utils/Default) - DEPENDS:=open-plc-utils - TITLE:=Utility $(2) from the Open PLC utilities - endef - - define Package/$(addprefix open-plc-utils-,$(1))/description - Utility $(2) from the Open PLC utilities package. - endef -endef - -OPEN_PLC_UTILS_APPS:=efbu efeu efru efsu edru edsu nics \ - hpavkey hpavkeys rkey mac2pw mac2pwd \ - mdioblock mdioblock2 mdiodump mdiogen \ - hpav mme \ - chknvm chknvm2 nvmsplit nvmmerge \ - chkpib chkpib2 setpib getpib modpib pib2xml \ - pibcomp pibdump pibruin xml2pib psin psout pskey \ - psgraph psnotch pibrump \ - int6k int6kboot int6keth int6kf int6khost \ - int64host int6kid int6klist int6klog int6kmdio \ - int6kmdio2 int6kmod int6kstat int6ktest int6krate \ - int6krule int6ktone int6kwait CMEncrypt sada \ - coqos_add coqos_info coqos_man coqos_mod coqos_rel \ - mdustats ampboot amphost ampID amplist amprate \ - ampstat amptest amptool amptone ampwait \ - plcboot plchost plcID plclist plcrate plcrule \ - plcstat plctest plctool plctone \ - plcwait plchostd plcget plcset plcotst plcfwd \ - plcdevs plclog plcmdio16 plcmdio32 \ - config2cfg sdram \ - int6kuart int6kbaud ttysig ptsctl weeder ttysend \ - ttyrecv ttycat int6kdetect - -$(foreach a,$(OPEN_PLC_UTILS_APPS),$(eval $(call GenPlugin,$(a)))) - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - EXTRA_CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ - CROSS="$(TARGET_CROSS)" \ - ROOTFS="$(PKG_INSTALL_DIR)" \ - OWNER="$(shell id -u $(shell whoami))" \ - GROUP="$(shell id -g $(shell whoami))" \ - all install -endef - -define Package/open-plc-utils/install - true -endef - -define BuildPlugin - define Package/$(1)/install - $(INSTALL_DIR) $$(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/$(subst open-plc-utils-,,$(1)) \ - $$(1)/usr/bin/ - endef - - $$(eval $$(call BuildPackage,$(1))) -endef - -$(eval $(call BuildPackage,open-plc-utils)) -$(foreach a,$(OPEN_PLC_UTILS_APPS),$(eval $(call BuildPlugin,open-plc-utils-$(a)))) diff --git a/utils/open2300/Makefile b/utils/open2300/Makefile deleted file mode 100644 index 2354610..0000000 --- a/utils/open2300/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# -# Copyright (C) 2010 segal.ubi.pt -# Copyright (C) 2014 nunojpg@gmail.com -# Copyright (C) 2015 dev@localnet.hu -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=open2300 -PKG_VERSION:=1.12 -PKG_RELEASE:=5 -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING - -PKG_SOURCE_PROTO:=svn -PKG_SOURCE_URL:=http://www.lavrsen.dk/svn/open2300/trunk -PKG_SOURCE_VERSION:=r12 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_CHECK_FORMAT_SECURITY:=0 - -PKG_MAINTAINER:=Gabor SZOLLOSI - -include $(INCLUDE_DIR)/package.mk - -define Package/open2300 - SECTION:=utils - CATEGORY:=Utilities - TITLE:=WS23XX weather station utilities - URL:=http://www.lavrsen.dk/foswiki/bin/view/Open2300 -endef - -define Package/open2300/description - This is an utility suite used to communicate with and collect data from a WS23XX wheather station. -endef - -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) -DVERSION=\"$(PKG_VERSION)\"" - -define Package/open2300/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/cw2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dump2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/fetch2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/histlog2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/history2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/interval2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/light2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/log2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/minmax2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/wu2300 $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/xml2300 $(1)/usr/bin/ - - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/open2300.conf $(1)/etc/ - - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib2300.so.1.11 $(1)/usr/lib/ - ln -sf /usr/lib/lib2300.so.1.11 $(1)/usr/lib/lib2300.so -endef - -$(eval $(call BuildPackage,open2300)) diff --git a/utils/open2300/files/open2300.conf b/utils/open2300/files/open2300.conf deleted file mode 100644 index 6414b49..0000000 --- a/utils/open2300/files/open2300.conf +++ /dev/null @@ -1,65 +0,0 @@ -# open2300.conf -# -# Configuration files for open2300 weather station tools -# -# Default locations in which the programs will search for this file: -# Programs search in this sequence: -# 1. Path to config file including filename given as parameter (not supported by all tools) -# 2. ./open2300.conf (current working directory) -# 3. /jffs/etc/open2300.conf (typical DD-WRT location) -# 4. /etc/open2300.conf (typical Linux location) -# -# All names are case sensitive!!! - - -# Set to your serial port and time zone -# For Windows use COM1, COM2, COM2 etc -# For Linux use /dev/ttyS0, /dev/ttyS1 etc - -SERIAL_DEVICE /dev/tts/1 # /dev/ttyS0, /dev/ttyS1, COM1, COM2 etc -TIMEZONE 1 # Hours Relative to UTC. East is positive, west is negative - - -# Units of measure (set them to your preference) -# The units of measure are ignored by wu2300 and cw2300 because both requires specific units - -WIND_SPEED m/s # select MPH (miles/hour), m/s, or km/h -TEMPERATURE C # Select C or F -RAIN mm # Select mm or IN -PRESSURE hPa # Select hPa, mb or INHG - - -#### Citizens Weather variables (used only by cw2300) -# Format for latitude is -# [2 digit degrees][2 digit minutes].[2 decimals minutes - NOT seconds][N for north or S for south] -# Format for longitude is -# [3 digit degrees][2 digit minutes].[2 decimals minutes - NOT seconds][E for east or W for west] -# Use leading zeros to get the format ####.##N (lat) and #####.##E (long) - -CITIZEN_WEATHER_ID CW0000 # CW0000 should be replaced by HAM call or actual CW number -CITIZEN_WEATHER_LATITUDE 5540.12N # DDMM.mmN or S - example 55 deg, 40.23 minutes north -CITIZEN_WEATHER_LONGITUDE 01224.60E # DDDMM.mmE or W - example 12 deg, 24.60 minutes east - -APRS_SERVER rotate.aprs.net 14580 # These are the APRS servers and ports for -APRS_SERVER first.aprs.net 14580 # Citizens Weather reporting. -APRS_SERVER second.aprs.net 14580 # They they are tried in the entered order -APRS_SERVER third.aprs.net 14580 # you may enter up to 5 alternate servers - - -#### WEATHER UNDERGROUND variables (used only by wu2300) - -WEATHER_UNDERGROUND_ID WUID # ID received from Weather Underground -WEATHER_UNDERGROUND_PASSWORD WUPASSWORD # Password for Weather Underground - - -### MYSQL Settings (only used by mysql2300) - -#MYSQL_HOST localhost # Localhost or IP address/host name -#MYSQL_USERNAME open2300 # Name of the MySQL user that has access to the database -#MYSQL_PASSWORD mysql2300 # Password for the MySQL user -#MYSQL_DATABASE open2300 # Named of your database -#MYSQL_PORT 0 # TCP/IP Port number. Zero means default - -#PGSQL_CONNECT hostaddr='127.0.0.1'dbname='open2300'user='postgres'password='sql' # Connection string -#PGSQL_TABLE weather # Table name -#PGSQL_STATION open2300 # Unique station id diff --git a/utils/open2300/patches/001-crosscompile.patch b/utils/open2300/patches/001-crosscompile.patch deleted file mode 100644 index 0953047..0000000 --- a/utils/open2300/patches/001-crosscompile.patch +++ /dev/null @@ -1,139 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -15,87 +15,82 @@ - prefix = /usr/local - exec_prefix = ${prefix} - bindir = ${exec_prefix}/bin -+libdir = ${prefix}/lib - - ######################################### - - CC = gcc --OBJ = open2300.o rw2300.o linux2300.o win2300.o --LOGOBJ = log2300.o rw2300.o linux2300.o win2300.o --FETCHOBJ = fetch2300.o rw2300.o linux2300.o win2300.o --WUOBJ = wu2300.o rw2300.o linux2300.o win2300.o --CWOBJ = cw2300.o rw2300.o linux2300.o win2300.o --DUMPOBJ = dump2300.o rw2300.o linux2300.o win2300.o --HISTOBJ = history2300.o rw2300.o linux2300.o win2300.o --HISTLOGOBJ = histlog2300.o rw2300.o linux2300.o win2300.o --DUMPBINOBJ = bin2300.o rw2300.o linux2300.o win2300.o --XMLOBJ = xml2300.o rw2300.o linux2300.o win2300.o --PGSQLOBJ = pgsql2300.o rw2300.o linux2300.o win2300.o --LIGHTOBJ = light2300.o rw2300.o linux2300.o win2300.o --INTERVALOBJ = interval2300.o rw2300.o linux2300.o win2300.o --MINMAXOBJ = minmax2300.o rw2300.o linux2300.o win2300.o --MYSQLHISTLOGOBJ = mysqlhistlog2300.o rw2300.o linux2300.o win2300.o -+LIB = lib2300 -+LIB_C = rw2300.c linux2300.c -+LIBOBJ = rw2300.o linux2300.o - - VERSION = 1.11 - - CFLAGS = -Wall -O3 -DVERSION=\"$(VERSION)\" --CC_LDFLAGS = -lm --CC_WINFLAG = --# For Windows - comment the two line above and un-comment the two lines below. --#CC_LDFLAGS = -lm -lwsock32 --#CC_WINFLAG = -mwindows -+CC_LDFLAGS = -L. -lm -l2300 -+LFLAGS = -shared -Wl,-soname - INSTALL = install -+MAKE_EXEC = $(CC) $(CFLAGS) $@.c -o $@ $(CC_LDFLAGS) - - ####### Build rules - --all: open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 mysql2300 mysqlhistlog2300 -+all: open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 #mysql2300 mysqlhistlog2300 - --open2300 : $(OBJ) -- $(CC) $(CFLAGS) -o $@ $(OBJ) $(CC_LDFLAGS) -- --dump2300 : $(DUMPOBJ) -- $(CC) $(CFLAGS) -o $@ $(DUMPOBJ) $(CC_LDFLAGS) -+lib2300 : -+ $(CC) -c -fPIC $(CFLAGS) $(LIB_C) -+ $(CC) $(LFLAGS),$@.so -o $@.so.$(VERSION) $(LIBOBJ) -+ ln -sf $@.so.$(VERSION) $@.so -+ -+open2300 : $(LIB) -+ $(MAKE_EXEC) - --log2300 : $(LOGOBJ) -- $(CC) $(CFLAGS) -o $@ $(LOGOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+dump2300 : $(LIB) -+ $(MAKE_EXEC) - --fetch2300 : $(FETCHOBJ) -- $(CC) $(CFLAGS) -o $@ $(FETCHOBJ) $(CC_LDFLAGS) -+log2300 : $(LIB) -+ $(MAKE_EXEC) - --wu2300 : $(WUOBJ) -- $(CC) $(CFLAGS) -o $@ $(WUOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+fetch2300 : $(LIB) -+ $(MAKE_EXEC) -+ -+srv2300 : $(LIB) -+ $(MAKE_EXEC) -+ -+wu2300 : $(LIB) -+ $(MAKE_EXEC) - --cw2300 : $(CWOBJ) -- $(CC) $(CFLAGS) -o $@ $(CWOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+cw2300 : $(LIB) -+ $(MAKE_EXEC) - --history2300 : $(HISTOBJ) -- $(CC) $(CFLAGS) -o $@ $(HISTOBJ) $(CC_LDFLAGS) -+history2300 : $(LIB) -+ $(MAKE_EXEC) - --histlog2300 : $(HISTLOGOBJ) -- $(CC) $(CFLAGS) -o $@ $(HISTLOGOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+histlog2300 : $(LIB) -+ $(MAKE_EXEC) - --bin2300 : $(DUMPBINOBJ) -- $(CC) $(CFLAGS) -o $@ $(DUMPBINOBJ) $(CC_LDFLAGS) -+bin2300 : $(LIB) -+ $(MAKE_EXEC) - --xml2300 : $(XMLOBJ) -- $(CC) $(CFLAGS) -o $@ $(XMLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+xml2300 : $(LIB) -+ $(MAKE_EXEC) - --mysql2300: -- $(CC) $(CFLAGS) -o mysql2300 mysql2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient -+mysql2300: $(LIB) -+ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/mysql -L/usr/lib/mysql $(CC_LDFLAGS) -lmysqlclient - --pgsql2300: $(PGSQLOBJ) -- $(CC) $(CFLAGS) -o $@ $(PGSQLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/pgsql -L/usr/lib/pgsql -lpq -+pgsql2300: $(LIB) -+ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/pgsql -L/usr/lib/pgsql $(CC_LDFLAGS) -lpq - --light2300: $(LIGHTOBJ) -- $(CC) $(CFLAGS) -o $@ $(LIGHTOBJ) $(CC_LDFLAGS) -+light2300: $(LIB) -+ $(MAKE_EXEC) - --interval2300: $(INTERVALOBJ) -- $(CC) $(CFLAGS) -o $@ $(INTERVALOBJ) $(CC_LDFLAGS) -+interval2300: $(LIB) -+ $(MAKE_EXEC) - --minmax2300: $(MINMAXOBJ) -- $(CC) $(CFLAGS) -o $@ $(MINMAXOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+minmax2300: $(LIB) -+ $(MAKE_EXEC) - --mysqlhistlog2300 : -- $(CC) $(CFLAGS) -o mysqlhistlog2300 mysqlhistlog2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient -+mysqlhistlog2300 : $(LIB) -+ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/mysql -L/usr/lib/mysql $(CC_LDFLAGS) -lmysqlclient - - - install: diff --git a/utils/openobex/Makefile b/utils/openobex/Makefile deleted file mode 100644 index f03b96d..0000000 --- a/utils/openobex/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openobex -PKG_VERSION:=1.7.1 -PKG_RELEASE:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-Source -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-Source.tar.gz -PKG_SOURCE_URL:=@SF/openobex -PKG_MD5SUM:=3181bfed9cb7db591605391068cb0085 - -PKG_LICENSE:=GPL-2.0+ LGPL-2.1+ -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/openobex/Default - TITLE:=Open Source impl of the OBject EXchange protocol - URL:=https://www.gitorious.org/openobex -endef - -define Package/openobex -$(call Package/openobex/Default) - SECTION:=utils - CATEGORY:=Utilities - TITLE+= (meta) - DEPENDS:=+openobex-apps +libopenobex -endef - -define Package/openobex-apps -$(call Package/openobex/Default) - SECTION:=utils - CATEGORY:=Utilities - TITLE+= (apps) - DEPENDS:=+libopenobex +bluez-libs -endef - -define Package/libopenobex -$(call Package/openobex/Default) - SECTION:=libs - CATEGORY:=Libraries - TITLE+= (library) - DEPENDS:=+libusb-1.0 -endef - -CMAKE_OPTIONS += \ - -DBUILD_DOCUMENTATION:BOOL=OFF \ - -MAKE_FLAGS += \ - openobex openobex-apps \ - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/openobex $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopenobex.so* $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/apps/lib/libopenobex-apps-common.a $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/openobex.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/openobex/install - : -endef - -define Package/openobex-apps/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ -endef - -define Package/libopenobex/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopenobex.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,openobex)) -$(eval $(call BuildPackage,openobex-apps)) -$(eval $(call BuildPackage,libopenobex)) diff --git a/utils/openobex/patches/001-cxx.patch b/utils/openobex/patches/001-cxx.patch deleted file mode 100644 index 650458f..0000000 --- a/utils/openobex/patches/001-cxx.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,6 +1,6 @@ - cmake_minimum_required ( VERSION 2.8.5 FATAL_ERROR ) - --project ( openobex C ) -+project ( openobex C CXX ) - - # - # The project version diff --git a/utils/openocd/Makefile b/utils/openocd/Makefile deleted file mode 100644 index e18e1aa..0000000 --- a/utils/openocd/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=openocd -PKG_VERSION:=v0.9.0 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://git.code.sf.net/p/openocd/code -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_MAINTAINER:=Paul Fertser - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/openocd - SECTION:=utils - CATEGORY:=Utilities - TITLE:=OpenOCD Utility - URL:=http://openocd.sf.net/ - DEPENDS:=+libusb-1.0 +libusb-compat +libftdi1 +hidapi -endef - -define Package/openocd/description -OpenOCD provides on-chip programming and debugging support with a -layered architecture of JTAG interface and TAP support including: - -- (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD - programming; -- debug target support (e.g. ARM, MIPS): single-stepping, - breakpoints/watchpoints, gprof profiling, etc; -- flash chip drivers (e.g. CFI, NAND, internal flash); -- embedded TCL interpreter for easy scripting. - -Several network interfaces are available for interacting with OpenOCD: -telnet, TCL, and GDB. The GDB server enables OpenOCD to function as a -"remote target" for source-level debugging of embedded systems using -the GNU GDB program (and the others who talk GDB protocol, e.g. IDA -Pro). -endef - -CONFIGURE_ARGS += \ - --prefix="/usr" \ - --disable-werror \ - MAKEINFO=true \ - --enable-dummy \ - --enable-sysfsgpio \ - --enable-usb_blaster_libftdi \ - --enable-openjtag_ftdi \ - --enable-presto_libftdi - -define Build/Compile - +$(MAKE_VARS) \ - $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) -endef - -define Package/openocd/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_DIR) $(1)/usr/share/openocd - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openocd $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/openocd/scripts $(1)/usr/share/openocd -endef - -$(eval $(call BuildPackage,openocd)) diff --git a/utils/opensc/Makefile b/utils/opensc/Makefile deleted file mode 100644 index 4687ac8..0000000 --- a/utils/opensc/Makefile +++ /dev/null @@ -1,224 +0,0 @@ -# -# Copyright (C) 2011-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=opensc -PKG_VERSION:=0.16.0 -PKG_RELEASE:=1 -PKG_MD5SUM:=3ac8c29542bb48179e7086d35a1b8907a4e86aca3de3323c2f48bd74eaaf5729 - -PKG_LICENSE:=LGPL-2.1+ -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Daniel Golle -PKG_SOURCE_URL:=https://github.com/OpenSC/OpenSC/releases/download/$(PKG_VERSION)/ -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz - -PKG_BUILD_DEPENDS:=+libpcsclite -PKG_FIXUP:=libtool - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/libopensc - SECTION:=libs - CATEGORY:=Libraries - TITLE:=OpenSC libraries for smart cards - URL:=https://github.com/OpenSC/OpenSC/wiki - DEPENDS:=+libopenssl +libpthread +zlib - MENU:=1 -endef - -define Package/libopensc/description - OpenSC provides a set of libraries and utilities to work with smart cards. - Its main focus is on cards that support cryptographic operations, and - facilitate their use in security applications such as authentication, - mail encryption and digital signatures. -endef - -define Package/libopensc-pkcs11 - SECTION:=libs - CATEGORY:=Libraries - TITLE:=OpenSC - PKCS11 provider - URL:=https://github.com/OpenSC/OpenSC/wiki - DEPENDS:=libopensc -endef - -define Package/libopensc-pkcs11/description - OpenSC PKCS#11 provider -endef - -define Package/libpkcs11-spy - SECTION:=libs - CATEGORY:=Libraries - TITLE:=PKCS11 spying wrapper - URL:=https://github.com/OpenSC/OpenSC/wiki - DEPENDS:=+libopenssl +libpthread -endef - -define Package/libpkcs11-spy/dscription - PKCS#11 spying wrapper -endef - -define Package/opensc-utils - SECTION:=utils - CATEGORY:=Utilities - TITLE:=OpenSC - tools for smart cards - URL:=https://github.com/OpenSC/OpenSC/wiki - DEPENDS:=+libopensc - MENU:=1 -endef - -define Package/opensc-utils/description - OpenSC utilities -endef - -define ToolGen -define Package/opensc-utils-$(subst _,-,$(firstword $(subst :, ,$(1)))) - TITLE:=$(firstword $(subst :, ,$(1))) utility from opensc - URL:=https://github.com/OpenSC/OpenSC/wiki - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=opensc-utils $(wordlist 2,$(words $(subst :, ,$(1))),$(subst :, ,$(1))) -endef -endef - -define ProfileGen -define Package/libopensc-profile-$(subst _,-,$(firstword $(subst :, ,$(1)))) - TITLE:=$(firstword $(subst :, ,$(1))) card profile for opensc - URL:=https://github.com/OpenSC/OpenSC/wiki - SECTION:=lib - CATEGORY:=Libraries - DEPENDS:=libopensc -endef -endef - -TOOLS:= \ - cardos-tool \ - cryptoflex-tool \ - dnie-tool \ - eidenv \ - iasecc-tool \ - netkey-tool \ - openpgp-tool \ - opensc-tool \ - opensc-explorer:+libncurses:+libreadline \ - piv-tool \ - pkcs11-tool \ - pkcs15-crypt \ - pkcs15-init \ - pkcs15-tool \ - sc-hsm-tool \ - westcos-tool - -PROFILES:= \ - asepcos \ - authentic \ - cardos \ - cyberflex \ - entersafe \ - epass2003 \ - flex \ - gpk \ - ias_adele_admin1 \ - ias_adele_admin2 \ - ias_adele_common \ - iasecc_admin_eid \ - iasecc_generic_oberthur \ - iasecc_generic_pki \ - iasecc \ - incrypto34 \ - jcop \ - miocos \ - muscle \ - myeid \ - oberthur \ - openpgp \ - pkcs15 \ - rutoken_ecp \ - rutoken \ - sc-hsm \ - setcos \ - starcos \ - westcos - -$(foreach file,$(TOOLS),$(eval $(call ToolGen,$(file)))) -$(foreach file,$(PROFILES),$(eval $(call ProfileGen,$(file)))) - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopensc.{a,so}* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmm-local.{a,so}* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/opensc-pkcs11.so $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkcs11-spy.so $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkcs11 - $(LN) ../pkcs11-spy.so $(1)/usr/lib/pkcs11/ - $(LN) ../opensc-pkcs11.so $(1)/usr/lib/pkcs11/ - $(INSTALL_DIR) $(1)/usr/share/opensc - $(CP) $(PKG_INSTALL_DIR)/usr/share/opensc/* $(1)/usr/share/opensc/ -endef - -define Package/libopensc/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopensc.so* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmm-local.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/etc - $(CP) $(PKG_INSTALL_DIR)/etc/opensc.conf $(1)/etc/ -endef - -define Package/libopensc-pkcs11/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/opensc-pkcs11.so $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkcs11 - $(LN) ../opensc-pkcs11.so $(1)/usr/lib/pkcs11/ -endef - -define Package/libpkcs11-spy/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkcs11-spy.so $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkcs11 - $(LN) ../pkcs11-spy.so $(1)/usr/lib/pkcs11/ -endef - -define Package/opensc-card-profiles - $(INSTALL_DIR) $(1)/usr/share/opensc - $(CP) $(PKG_INSTALL_DIR)/usr/share/opensc/* $(1)/usr/share/opensc/ -endef - -define Package/opensc-utils/install - true -endef - -define ToolInstall -define Package/opensc-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))/install - $(INSTALL_DIR) $$(1)/usr/bin - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/$(firstword $(subst :, ,$(1))) \ - $$(1)/usr/bin/ -endef -endef - -define ProfileInstall -define Package/libopensc-profile-$(subst _,-,$(firstword $(subst :, ,$(1))))/install - $(INSTALL_DIR) $$(1)/usr/share/opensc - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/share/opensc/$(firstword $(subst :, ,$(1))).profile \ - $$(1)/usr/share/opensc -endef -endef - -$(foreach file,$(TOOLS),$(eval $(call ToolInstall,$(file)))) -$(foreach file,$(PROFILES),$(eval $(call ProfileInstall,$(file)))) - -$(eval $(call BuildPackage,libopensc)) -$(eval $(call BuildPackage,libopensc-pkcs11)) -$(eval $(call BuildPackage,libpkcs11-spy)) - -$(eval $(call BuildPackage,opensc-utils)) -$(foreach file,$(TOOLS),$(eval $(call BuildPackage,opensc-utils-$(subst _,-,$(firstword $(subst :, ,$(file))))))) -$(foreach file,$(PROFILES),$(eval $(call BuildPackage,libopensc-profile-$(subst _,-,$(firstword $(subst :, ,$(file))))))) diff --git a/utils/opus-tools/Makefile b/utils/opus-tools/Makefile deleted file mode 100644 index e53b843..0000000 --- a/utils/opus-tools/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=opus-tools -PKG_VERSION:=0.1.9 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://downloads.xiph.org/releases/opus/ -PKG_MD5SUM:=20682e4d8d1ae9ec5af3cf43e808b8cb - -PKG_LICENSE:=BSD-2-Clause -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/opus-tools - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libogg +libopus - TITLE:=OPUS Codec tools - URL:=http://opus-codec.org/ -endef - -define Package/opus-tools/description - This package provides command-line utilities to encode, inspect, and decode - .opus files. -endef - -CONFIGURE_ARGS += \ - --without-flac \ - -define Package/opus-tools/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/opus{dec,enc,info} $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,opus-tools)) diff --git a/utils/owfs/Config.in b/utils/owfs/Config.in deleted file mode 100644 index a6508e8..0000000 --- a/utils/owfs/Config.in +++ /dev/null @@ -1,49 +0,0 @@ - menu "Customize libow" - depends on PACKAGE_libow - - menu "Bus master and adapter support" - config LIBOW_MASTER_USB - bool "USB bus master support (requires libusb)" - help - Include support for USB adapters (NOT usb-serial adapters, which use - kernel driver and are supported anyway). - Turning this off will save ~13kB (and ~50kB weighting libusb dependency). - default y - - config LIBOW_MASTER_I2C - bool "I2C bus master (DS2482) support" - default y - help - Include support for I2C adapters. - Turning this feature off will save ~6kB. - - config LIBOW_MASTER_W1 - bool "Kernel W1 bus master support (requires kmod-w1)" - help - Support kernel 1-Wire bus masters (requires KConfig CONFIG_CONNECTOR=y - and CONFIG_W1_CON=y). - Turning this on will increase libow size by about 10kB. - default n - endmenu - - config LIBOW_ZEROCONF - bool "Zeroconf/bonjour support" - default y - help - Enable server process announcement using Zeroconf (Bonjour) protocol. - Turning this feature on will increase owlib size by about 12kB. - - config LIBOW_DEBUG - bool "Enable debug output (100+ kB)" - default y - help - If you don't need to debug your 1-wire network, you can save as much as - 137kB disabling debug output. - - config LIBOW_OWTRAFFIC - bool "Enable bus traffic reports" - default n - help - Enable owfs traffic monitor. It's here purely for debugging purposes. - Turning this on will increase libow size by about 3kB. - endmenu diff --git a/utils/owfs/Makefile b/utils/owfs/Makefile deleted file mode 100644 index e0ac78f..0000000 --- a/utils/owfs/Makefile +++ /dev/null @@ -1,300 +0,0 @@ -# -# Copyright (C) 2008-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=owfs -PKG_VERSION:=2.9p5 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_MD5SUM:=b5c20998e8ffc6fa3974daef99c02402 -PKG_MAINTAINER:=Jo-Philipp Wich -PKG_LICENSE:=GPL-2.0 - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -PKG_CONFIG_DEPENDS:= \ - CONFIG_LIBOW_MASTER_USB \ - CONFIG_LIBOW_MASTER_I2C \ - CONFIG_LIBOW_MASTER_W1 \ - CONFIG_LIBOW_ZEROCONF \ - CONFIG_LIBOW_DEBUG \ - CONFIG_LIBOW_OWTRAFFIC - -include $(INCLUDE_DIR)/package.mk - -# -# templates -# - -define Package/$(PKG_NAME)/Default - TITLE:=OWFS (1-Wire File System) - URL:=http://owfs.sourceforge.net/ - SECTION:=net - CATEGORY:=Network - SUBMENU:=Filesystem -endef - -define Package/$(PKG_NAME)/Default/description - OWFS is a suite of programs that designed to make the 1-wire bus and its - devices easily accessible. The underlying principle is to create a virtual - filesystem, with the unique ID being the directory, and the individual - properties of the device are represented as simple files that can be read - and written. - - Details of the individual slave or master design are hidden behind a - consistent interface. The goal is to provide an easy set of tools for a - software designer to create monitoring or control applications. There are - some performance enhancements in the implementation, including data caching, - parallel access to bus masters, and aggregation of device communication. - Still the fundemental goal has been ease of use, flexibility and correctness - rather than speed. -endef - -define Package/owfs/Server - $(call Package/owfs/Default) - DEPENDS:=+libow +libpthread -endef - -define Package/owfs/Library - $(call Package/owfs/Default) - SECTION:=libs - CATEGORY:=Libraries -endef - -define Package/owfs/Utility - $(call Package/owfs/Default) - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libow -endef - -# -# shared libraries -# - -define Package/libow - $(call Package/owfs/Library) - DEPENDS:= \ - +libpthread \ - +LIBOW_MASTER_USB:libusb-compat \ - +LIBOW_MASTER_W1:kmod-w1 - TITLE:=OWFS - common shared library -endef - -define Package/libow/config - source "$(SOURCE)/Config.in" -endef - -define Package/libow/description - $(call Package/$(PKG_NAME)/Default/description) - - This package contains the OWFS library. -endef - -define Package/libow-capi - $(call Package/owfs/Library) - DEPENDS:=+libow - TITLE:=OWFS - C-API library -endef - -define Package/libow-capi/description - $(call Package/$(PKG_NAME)/Default/description) - - This package contains the OWFS C-API library. -endef - -# -# utilities -# - -define Package/owshell - $(call Package/owfs/Utility) - TITLE:=OWFS - shell utilities - DEPENDS+= +USE_UCLIBC:librpc -endef - -define Package/owshell/description - $(call Package/$(PKG_NAME)/Default/description) - - This package contains the OWFS shell utilities. -endef - -define Package/owfs - $(call Package/owfs/Utility) - # libfuse depends on kmod-fuse, no need to declare dependency - DEPENDS+= +libfuse +fuse-utils - TITLE:=OWFS - fuse file system -endef - -define Package/owfs/description - $(call Package/$(PKG_NAME)/Default/description) - - This package contains the OWFS fuse filesystem. -endef - -# -# network daemons -# - -define Package/owhttpd - $(call Package/owfs/Server) - TITLE:=OWFS - http server -endef - -define Package/owhttpd/description - $(call Package/$(PKG_NAME)/Default/description) - - This package contains the OWFS http server. -endef - -define Package/owftpd - $(call Package/owfs/Server) - TITLE:=OWFS - ftp server -endef - -define Package/owftpd/description - $(call Package/$(PKG_NAME)/Default/description) - - This package contains the OWFS ftp server. -endef - -define Package/owserver - $(call Package/owfs/Server) - TITLE:=OWFS - network server -endef - -define Package/owserver/description - $(call Package/$(PKG_NAME)/Default/description) - - This package contains the OWFS network server. -endef - -CONFIGURE_ARGS += \ - --enable-owftpd \ - --enable-owserver \ - --enable-owhttpd \ - --enable-owfs \ - --with-fuseinclude="$(STAGING_DIR)/usr/include" \ - --with-fuselib="$(STAGING_DIR)/usr/lib" \ - --enable-shared \ - --disable-parport \ - --disable-ownet \ - --disable-owpython \ - --disable-owphp \ - --disable-owtcl \ - --disable-swig \ - $(if $(CONFIG_LIBOW_MASTER_USB),--enable-usb,--disable-usb) \ - $(if $(CONFIG_LIBOW_MASTER_W1),--enable-w1,--disable-w1) \ - $(if $(CONFIG_LIBOW_MASTER_I2C),--enable-i2c,--disable-i2c) \ - $(if $(CONFIG_LIBOW_ZEROCONF),--enable-zero,--disable-zero) \ - $(if $(CONFIG_LIBOW_DEBUG),--enable-debug,--disable-debug) \ - $(if $(CONFIG_LIBOW_OWTRAFFIC),--enable-owtraffic,--disable-owtraffic) - -CONFIGURE_VARS += \ - LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -Wl,-rpath-link=$(TOOLCHAIN_DIR)/usr/lib" \ - lt_cv_sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \ - lt_cv_sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \ - shrext_cmds=".so" \ - -MAKE_FLAGS += \ - CC="$(TARGET_CC)" \ - HOST_CPU="$(PKGARCH)" - -define Build/InstallDev - $(INSTALL_DIR) $(STAGING_DIR)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/ow{capi,fs_config}.h $(STAGING_DIR)/usr/include/ - $(INSTALL_DIR) $(STAGING_DIR)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow{,capi}*.so* $(STAGING_DIR)/usr/lib/ -endef - -define Package/owfs/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owfs $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/owfs.conf $(1)/etc/config/owfs - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/owfs.init $(1)/etc/init.d/owfs - mkdir -p $(1)/mnt/owfs -endef - -define Package/owfs/conffiles -/etc/config/owfs -endef - -define Package/owshell/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owget $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owread $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owwrite $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owdir $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owpresent $(1)/usr/bin/ -endef - - -define Package/owserver/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owserver $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/owserver.conf $(1)/etc/config/owserver - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/owserver.init $(1)/etc/init.d/owserver -endef - -define Package/owserver/conffiles -/etc/config/owserver -endef - -define Package/owhttpd/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owhttpd $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/owhttpd.conf $(1)/etc/config/owhttpd - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/owhttpd.init $(1)/etc/init.d/owhttpd -endef - -define Package/owhttpd/conffiles -/etc/config/owhttpd -endef - -define Package/owftpd/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/owftpd $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/owftpd.conf $(1)/etc/config/owftpd - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/owftpd.init $(1)/etc/init.d/owftpd -endef - -define Package/owftpd/conffiles -/etc/config/owftpd -endef - -define Package/libow/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libow-*.so.* $(1)/usr/lib/ -endef - -define Package/libow-capi/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libowcapi-*.so.* $(1)/usr/lib/ -endef - - -$(eval $(call BuildPackage,owfs)) -$(eval $(call BuildPackage,owshell)) - -$(eval $(call BuildPackage,owserver)) -$(eval $(call BuildPackage,owhttpd)) -$(eval $(call BuildPackage,owftpd)) - -$(eval $(call BuildPackage,libow)) -$(eval $(call BuildPackage,libow-capi)) diff --git a/utils/owfs/files/owfs.conf b/utils/owfs/files/owfs.conf deleted file mode 100644 index b485989..0000000 --- a/utils/owfs/files/owfs.conf +++ /dev/null @@ -1,10 +0,0 @@ -config owfs 'owfs' - option enabled 0 - option user root - option readonly 0 - option mountpoint '/mnt/owfs' - option fuse_allow_other 0 - option fuse_open_opt '' - option error_level 0 - list devices '-s' - list devices 'localhost:4304' diff --git a/utils/owfs/files/owfs.init b/utils/owfs/files/owfs.init deleted file mode 100644 index 83c8913..0000000 --- a/utils/owfs/files/owfs.init +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2009-2015 OpenWrt.org - -START=95 -USE_PROCD=1 - -PROG=/usr/bin/owfs - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}" -} - -append_bool() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get_bool val "$cfg" "$var" "$def" - [ "$val" = 1 ] && procd_append_param command "$opt" -} - -append_plain() { - procd_append_param command "$1" -} - -append_param() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param "$opt" "${val:-$def}" -} - -start_instance() { - local cfg="$1" - local enabled - - config_get_bool enabled "$cfg" 'enabled' '0' - [ "$enabled" = 0 ] && return 1 - - procd_open_instance - - procd_set_param command "$PROG" --foreground --error_print=1 - - # common parameters - append_bool "$cfg" readonly "--readonly" - append_arg "$cfg" error_level "--error_level" - config_list_foreach "$cfg" options append_plain - config_list_foreach "$cfg" devices append_plain - append_param "$cfg" user user - - # owfs-specific - append_arg "$cfg" mountpoint "--mountpoint" /mnt/owfs - append_bool "$cfg" fuse_allow_other "--allow_other" - append_arg "$cfg" fuse_open_opt "--fuse_open_opt" - - # don't respawn fuse - - procd_close_instance - -} - -service_triggers() { - procd_add_reload_trigger owfs -} - -start_service() { - config_load owfs - config_foreach start_instance owfs -} diff --git a/utils/owfs/files/owftpd.conf b/utils/owfs/files/owftpd.conf deleted file mode 100644 index 100162e..0000000 --- a/utils/owfs/files/owftpd.conf +++ /dev/null @@ -1,8 +0,0 @@ -config owftpd 'owftpd' - option enabled 0 - option user root - option readonly 0 - option port 21 - option error_level 0 - list devices '-s' - list devices 'localhost:4304' diff --git a/utils/owfs/files/owftpd.init b/utils/owfs/files/owftpd.init deleted file mode 100644 index a7e17c9..0000000 --- a/utils/owfs/files/owftpd.init +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2009-2015 OpenWrt.org - -START=95 -USE_PROCD=1 - -PROG=/usr/bin/owftpd - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}" -} - -append_bool() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get_bool val "$cfg" "$var" "$def" - [ "$val" = 1 ] && procd_append_param command "$opt" -} - -append_plain() { - procd_append_param command "$1" -} - -append_param() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param "$opt" "${val:-$def}" -} - -start_instance() { - local cfg="$1" - local enabled - - config_get_bool enabled "$cfg" 'enabled' '0' - [ "$enabled" = 0 ] && return 1 - - procd_open_instance - - procd_set_param command "$PROG" --foreground --error_print=1 - - # common parameters - append_bool "$cfg" readonly "--readonly" - append_arg "$cfg" error_level "--error_level" - config_list_foreach "$cfg" options append_plain - config_list_foreach "$cfg" devices append_plain - append_param "$cfg" user user - - # owftpd-specific - append_arg "$cfg" port "--port" - append_arg "$cfg" max_connections "--max_connections" - - procd_set_param respawn - - procd_close_instance - -} - -service_triggers() { - procd_add_reload_trigger owftpd -} - -start_service() { - config_load owftpd - config_foreach start_instance owftpd -} diff --git a/utils/owfs/files/owhttpd.conf b/utils/owfs/files/owhttpd.conf deleted file mode 100644 index a314cd1..0000000 --- a/utils/owfs/files/owhttpd.conf +++ /dev/null @@ -1,8 +0,0 @@ -config owhttpd 'owhttpd' - option enabled 0 - option user root - option readonly 0 - option port 3001 - option error_level 0 - list devices '-s' - list devices 'localhost:4304' diff --git a/utils/owfs/files/owhttpd.init b/utils/owfs/files/owhttpd.init deleted file mode 100644 index 868c9b4..0000000 --- a/utils/owfs/files/owhttpd.init +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2009-2015 OpenWrt.org - -START=95 -USE_PROCD=1 - -PROG=/usr/bin/owhttpd - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}" -} - -append_bool() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get_bool val "$cfg" "$var" "$def" - [ "$val" = 1 ] && procd_append_param command "$opt" -} - -append_plain() { - procd_append_param command "$1" -} - -append_param() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param "$opt" "${val:-$def}" -} - -start_instance() { - local cfg="$1" - local enabled - - config_get_bool enabled "$cfg" 'enabled' '0' - [ "$enabled" = 0 ] && return 1 - - procd_open_instance - - procd_set_param command "$PROG" --foreground --error_print=1 - - # common parameters - append_bool "$cfg" readonly "--readonly" - append_arg "$cfg" error_level "--error_level" - config_list_foreach "$cfg" options append_plain - config_list_foreach "$cfg" devices append_plain - append_param "$cfg" user user - - # owhttpd-specific - append_arg "$cfg" port "--port" - append_arg "$cfg" max_connections "--max_connections" - - procd_set_param respawn - - procd_close_instance - -} - -service_triggers() { - procd_add_reload_trigger owhttpd -} - -start_service() { - config_load owhttpd - config_foreach start_instance owhttpd -} diff --git a/utils/owfs/files/owserver.conf b/utils/owfs/files/owserver.conf deleted file mode 100644 index ceb8a61..0000000 --- a/utils/owfs/files/owserver.conf +++ /dev/null @@ -1,8 +0,0 @@ -config owserver 'owserver' - option enabled 0 - option user root - option readonly 0 - option port 4304 - option error_level 0 - list devices '-d' - list devices '/dev/ttyUSB0' diff --git a/utils/owfs/files/owserver.init b/utils/owfs/files/owserver.init deleted file mode 100644 index 7f91aee..0000000 --- a/utils/owfs/files/owserver.init +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2009-2015 OpenWrt.org - -START=90 -USE_PROCD=1 - -PROG=/usr/bin/owserver - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}" -} - -append_bool() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get_bool val "$cfg" "$var" "$def" - [ "$val" = 1 ] && procd_append_param command "$opt" -} - -append_plain() { - procd_append_param command "$1" -} - -append_param() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param "$opt" "${val:-$def}" -} - -start_instance() { - local cfg="$1" - local enabled - - config_get_bool enabled "$cfg" 'enabled' '0' - [ "$enabled" = 0 ] && return 1 - - procd_open_instance - - procd_set_param command "$PROG" --foreground --error_print=1 - - # common parameters - append_bool "$cfg" readonly "--readonly" - append_arg "$cfg" error_level "--error_level" - config_list_foreach "$cfg" options append_plain - config_list_foreach "$cfg" devices append_plain - append_param "$cfg" user user - - # owserver-specific - append_arg "$cfg" port "--port" - append_arg "$cfg" max_connections "--max_connections" - - procd_set_param respawn - - procd_close_instance - -} - -service_triggers() { - procd_add_reload_trigger owserver -} - -start_service() { - config_load owserver - config_foreach start_instance owserver -} diff --git a/utils/owfs/patches/100-fix-netlink-w1-status-message-detection.patch b/utils/owfs/patches/100-fix-netlink-w1-status-message-detection.patch deleted file mode 100644 index 251065f..0000000 --- a/utils/owfs/patches/100-fix-netlink-w1-status-message-detection.patch +++ /dev/null @@ -1,30 +0,0 @@ -AaAA ---- a/module/owlib/src/c/ow_w1_parse.c -+++ b/module/owlib/src/c/ow_w1_parse.c -@@ -237,7 +237,7 @@ enum Netlink_Read_Status W1_Process_Resp - owfree(nlp.nlm) ; - return nrs_nodev ; - } -- if ( nrs_callback == NULL ) { // status message -+ if ( nrs_callback == NULL ) { // bus reset - owfree(nlp.nlm) ; - return nrs_complete ; - } -@@ -246,7 +246,7 @@ enum Netlink_Read_Status W1_Process_Resp - nrs_callback( &nlp, v, pn ) ; - LEVEL_DEBUG("Called nrs_callback"); - owfree(nlp.nlm) ; -- if ( nlp.cn->ack != 0 ) { -+ if ( nlp.cn->seq != nlp.cn->ack ) { - if ( nlp.w1m->type == W1_LIST_MASTERS ) { - continue ; // look for more data - } -@@ -254,7 +254,7 @@ enum Netlink_Read_Status W1_Process_Resp - continue ; // look for more data - } - } -- nrs_callback = NULL ; // now look for status message -+ return nrs_complete ; // status message - } - return nrs_timeout ; - } diff --git a/utils/owfs/patches/101-fix-no-reset-routine-segfault.patch b/utils/owfs/patches/101-fix-no-reset-routine-segfault.patch deleted file mode 100644 index 731c4a0..0000000 --- a/utils/owfs/patches/101-fix-no-reset-routine-segfault.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/module/owlib/src/c/ow_reset.c -+++ b/module/owlib/src/c/ow_reset.c -@@ -21,6 +21,10 @@ RESET_TYPE BUS_reset(const struct parsed - struct connection_in * in = pn->selected_connection ; - STAT_ADD1_BUS(e_bus_resets, in); - -+ if ( in->iroutines.reset == NO_RESET_ROUTINE ) { -+ return BUS_RESET_OK; -+ } -+ - switch ( (in->iroutines.reset) (pn) ) { - case BUS_RESET_OK: - in->reconnect_state = reconnect_ok; // Flag as good! diff --git a/utils/pciutils/Makefile b/utils/pciutils/Makefile index 3f61b44..ed287ee 100644 --- a/utils/pciutils/Makefile +++ b/utils/pciutils/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2016 OpenWrt.org +# Copyright (C) 2007-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,18 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pciutils -PKG_VERSION:=3.5.2 -PKG_RELEASE:=1 +PKG_VERSION:=3.6.2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils -PKG_MD5SUM:=3a99141a9f40528d0a0035665a06dc37ddb1ae341658e51b50a76ecf86235efc -PKG_MAINTAINER:=Álvaro Fernández Rojas +PKG_HASH:=db452ec986edefd88af0d222d22f6102f8030a8633fdfe846c3ae4bde9bb93f3 +PKG_MAINTAINER:=Lucian Cristian PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING PKG_USE_MIPS16:=0 +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -29,7 +30,7 @@ define Package/pciutils CATEGORY:=Utilities TITLE:=Linux PCI Utilities URL:=http://mj.ucw.cz/pciutils.shtml - DEPENDS:=+libkmod +zlib + DEPENDS:=+libkmod +libpci endef define Package/pciutils/description @@ -37,19 +38,39 @@ define Package/pciutils/description of PCI devices endef -define Package/pciutils/postinst -#!/bin/sh -[ -z "$${IPKG_INSTROOT}" ] || \ -(cd $${PKG_ROOT}/usr/share; $${PKG_ROOT}/usr/sbin/update-pciids; rm pci.ids.gz.old) -exit 0 +define Package/libpci + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Linux PCI Libraries + URL:=http://mj.ucw.cz/pciutils.shtml +endef + + +PCI_IDS_VER:=0.324 +PCI_IDS_FILE:=pci.ids.$(PCI_IDS_VER) +define Download/pci_ids + FILE:=$(PCI_IDS_FILE) + URL_FILE:=pci.ids + URL:=@GITHUB/vcrhonek/hwdata/v$(PCI_IDS_VER) + HASH:=6dba287b4aaafb9582d6139eda22ee6580651b8557828b9598d99078a5f4217e +endef +$(eval $(call Download,pci_ids)) + +define Build/Prepare + $(call Build/Prepare/Default) + $(RM) $(PKG_BUILD_DIR)/pci.ids + $(CP) $(DL_DIR)/$(PCI_IDS_FILE) $(PKG_BUILD_DIR)/pci.ids endef +TARGET_CFLAGS += $(FPIC) + MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ PREFIX="/usr" \ - HOST="$(GNU_TARGET_NAME)" \ + HOST="Linux" \ HWDB="no" \ - ZLIB="yes" + ZLIB="no" \ + SHARED="yes" ifneq ($(CONFIG_USE_GLIBC),) TARGET_LDFLAGS += -lresolv @@ -57,7 +78,11 @@ endif define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/lib/libpci.a $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpci.so.3 \ + $(PKG_INSTALL_DIR)/usr/lib/libpci.so + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_BUILD_DIR)/lib/libpci.pc $(1)/usr/lib/pkgconfig $(INSTALL_DIR) $(1)/usr/include/pci $(CP) $(foreach i,pci.h config.h header.h types.h, \ $(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci @@ -67,7 +92,14 @@ define Package/pciutils/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{lspci,setpci,update-pciids} $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/usr/share - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids.gz $(1)/usr/share/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pci.ids $(1)/usr/share/ endef +define Package/libpci/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ +endef + + +$(eval $(call BuildPackage,libpci)) $(eval $(call BuildPackage,pciutils)) diff --git a/utils/pciutils/patches/101-no-strip.patch b/utils/pciutils/patches/101-no-strip.patch index 610a755..4c1891a 100644 --- a/utils/pciutils/patches/101-no-strip.patch +++ b/utils/pciutils/patches/101-no-strip.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -111,7 +111,7 @@ distclean: clean +@@ -119,7 +119,7 @@ distclean: clean install: all # -c is ignored on Linux, but required on FreeBSD $(DIRINSTALL) -m 755 $(DESTDIR)$(SBINDIR) $(DESTDIR)$(IDSDIR) $(DESTDIR)$(MANDIR)/man8 $(DESTDIR)$(MANDIR)/man7 diff --git a/utils/pciutils/patches/104-resolv.patch b/utils/pciutils/patches/104-resolv.patch index c38d1cf..0acfb81 100644 --- a/utils/pciutils/patches/104-resolv.patch +++ b/utils/pciutils/patches/104-resolv.patch @@ -1,6 +1,6 @@ --- a/lib/configure +++ b/lib/configure -@@ -57,7 +57,7 @@ echo >>$c "#define PCI_OS_`echo $sys | t +@@ -52,7 +52,7 @@ echo >>$c "#define PCI_OS_`echo $sys | t echo >$m 'WITH_LIBS=' echo_n "Looking for access methods..." diff --git a/utils/pciutils/patches/105-fix-host.patch b/utils/pciutils/patches/105-fix-host.patch index 8df4b8c..14f7ded 100644 --- a/utils/pciutils/patches/105-fix-host.patch +++ b/utils/pciutils/patches/105-fix-host.patch @@ -1,6 +1,6 @@ --- a/lib/configure +++ b/lib/configure -@@ -44,7 +44,7 @@ if [ -z "$HOST" ] ; then +@@ -39,7 +39,7 @@ if [ -z "$HOST" ] ; then fi [ -n "$RELEASE" ] && rel="${RELEASE}" # CAVEAT: tr on Solaris is a bit weird and the extra [] is otherwise harmless. diff --git a/utils/pcsc-lite/Makefile b/utils/pcsc-lite/Makefile deleted file mode 100644 index dc96467..0000000 --- a/utils/pcsc-lite/Makefile +++ /dev/null @@ -1,101 +0,0 @@ -# -# Copyright (C) 2009-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pcsc-lite -PKG_VERSION:=1.8.20 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=https://alioth.debian.org/frs/download.php/file/4203 -PKG_MD5SUM:=ec7d0114016c788c1c09859c84860f6cec6c4595436d23245105154b9c046bb2 -PKG_MAINTAINER:=Daniel Golle -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/pcsc-lite/Default - TITLE:=Middleware to access a smart card using SCard API (PC/SC). - URL:=http://pcsclite.alioth.debian.org/ -endef - -define Package/pcsc-lite/Default/description - The purpose of PC/SC Lite is to provide a Windows(R) SCard - interface in a very small form factor for communicating to - smart cards and smart cards readers. -endef - -define Package/libpcsclite - $(call Package/pcsc-lite/Default) - SECTION:=libs - CATEGORY:=Libraries - TITLE+= (library) - DEPENDS:=+libusb-1.0 +libpthread +librt -endef - -define Package/libpcsclite/description - $(call Package/pcsc-lite/Default/description) - . - This package contains the PC/SC shared library. -endef - -define Package/pcscd - $(call Package/pcsc-lite/Default) - SECTION:=utils - CATEGORY:=Utilities - TITLE+= (daemon) - DEPENDS:=+libpcsclite -endef - -define Package/pcscd/description - $(call Package/pcsc-lite/Default/description) - . - This package contains the PC/SC daemon. -endef - -TARGET_CFLAGS += $(FPIC) -TARGET_LDFLAGS += -lpthread - -CONFIGURE_ARGS += \ - --disable-libudev \ - --enable-libusb \ - --enable-static \ - --enable-usbdropdir=/usr/lib/pcsc/drivers - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/PCSC - $(CP) $(PKG_INSTALL_DIR)/usr/include/PCSC/* $(1)/usr/include/PCSC/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.{a,so*} $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpcsclite.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/libpcsclite/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcsclite.so.* $(1)/usr/lib/ -endef - -define Package/pcscd/conffiles -/etc/reader.conf.d/reader.conf -endef - -define Package/pcscd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pcscd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/pcscd.init $(1)/etc/init.d/pcscd - $(INSTALL_DIR) $(1)/etc/reader.conf.d -endef - -$(eval $(call BuildPackage,libpcsclite)) -$(eval $(call BuildPackage,pcscd)) diff --git a/utils/pcsc-lite/files/pcscd.init b/utils/pcsc-lite/files/pcscd.init deleted file mode 100644 index 497a740..0000000 --- a/utils/pcsc-lite/files/pcscd.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=50 - -USE_PROCD=1 - -start_service() { - procd_open_instance - procd_set_param command /usr/sbin/pcscd --foreground - procd_close_instance -} - -reload_service() { - /usr/sbin/pcscd --hotplug -} diff --git a/utils/picocom/Makefile b/utils/picocom/Makefile deleted file mode 100644 index 31a1ad6..0000000 --- a/utils/picocom/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=picocom -PKG_VERSION:=1.7 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://picocom.googlecode.com/files -PKG_MD5SUM:=8eaba1d31407e8408674d6e57af447ef - -PKG_MAINTAINER:=Steven Barth -PKG_LICENSE:=GPL-2.0+ - -include $(INCLUDE_DIR)/package.mk - -define Package/picocom - SECTION:=utils - CATEGORY:=Utilities - TITLE:=A minimal dumb-terminal emulation program - URL:=http://code.google.com/p/picocom/ - SUBMENU:=Terminal -endef - -define Package/picocom/description - minimal dumb-terminal emulation program -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" \ - picocom -endef - -define Package/picocom/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/picocom $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,picocom)) diff --git a/utils/picocom/patches/100-musl-compat.patch b/utils/picocom/patches/100-musl-compat.patch deleted file mode 100644 index 5f7d750..0000000 --- a/utils/picocom/patches/100-musl-compat.patch +++ /dev/null @@ -1,17 +0,0 @@ -Index: picocom-1.7/term.c -=================================================================== ---- picocom-1.7.orig/term.c -+++ picocom-1.7/term.c -@@ -33,10 +33,11 @@ - #include - #include - #include --#ifdef __linux__ -+#if defined(__linux__) && (defined(__GLIBC__) || defined(__UCLIBC__)) - #include - #else - #include -+#include - #endif /* of __linux__ */ - - #include "term.h" diff --git a/utils/pps-tools/Makefile b/utils/pps-tools/Makefile deleted file mode 100644 index 578004d..0000000 --- a/utils/pps-tools/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pps-tools -PKG_VERSION:=2014-08-01 -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/ago/pps-tools -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=0deb9c7e135e9380a6d09e9d2e938a146bb698c8 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 - -PKG_MAINTAINER:=Zoltan HERPAI -PKG_LICENSE:=GPL-2.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/pps-tools - SECTION:=utils - CATEGORY:=Utilities - TITLE:=PPS-tools -endef - -define Package/pps-tools/description - Userland tools for GPS and DCF-77 Clock synchronization. PPS support in Kernel must be enabled. -endef - -TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_BUILD_DIR)/timepps.h $(1)/usr/include/ -endef - -define Package/pps-tools/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ppsctl $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ppstest $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ppswatch $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,pps-tools)) diff --git a/utils/procps-ng/Makefile b/utils/procps-ng/Makefile index 7a33d22..f302c26 100644 --- a/utils/procps-ng/Makefile +++ b/utils/procps-ng/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=procps-ng PKG_VERSION:=3.3.11 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING COPYING.LIB @@ -18,6 +18,9 @@ PKG_SOURCE_URL:=https://gitlab.com/procps-ng/procps.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=8a198e3eafbde0b627e9992b41d26e6762e4f8c7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz +PKG_MIRROR_HASH:=60da7bd78e834112494e4019998c9de8d61f747eab244ef3c42cadc7fd0958cc + +PKG_MAINTAINER:=Gergely Kiss PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -28,17 +31,25 @@ include $(INCLUDE_DIR)/package.mk CONFIGURE_ARGS += --enable-skill +# most of these have alternatives provided by busybox applets PROCPS_APPLETS := \ free kill pgrep pkill pmap ps pwdx skill slabtop \ snice tload top uptime vmstat w watch +# procps-ng will be configured with "--bindir=/usr/bin --sbindir=/usr/sbin" and +# as such executables will be installed there by default, but some of them need +# to reside in locations such as /bin and /sbin to be in accordance with +# busybox alternatives which is also other distributions like debian and centos +# are doing +PROCPS_APPLETS_DIR_bin:=kill ps watch +procps-applets-dir=$(if $(findstring $(1),$(PROCPS_APPLETS_DIR_bin)),/bin,/usr/bin) + define Package/procps-ng/Default SECTION:=utils CATEGORY:=Utilities DEPENDS:=+libncurses TITLE:=procps-ng utilities URL:=https://gitlab.com/procps-ng/procps - MAINTAINER:=Gergely Kiss endef define Build/Prepare @@ -66,6 +77,7 @@ define GenPlugin DEPENDS:=procps-ng TITLE:=Applet $(2) from the procps-ng package DEFAULT:=y + ALTERNATIVES:=200:$(3)/$(2):$(3)/$(1) endef define Package/$(1)/description @@ -73,7 +85,7 @@ define GenPlugin endef endef -$(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,procps-ng-$(a),$(a)))) +$(foreach a,$(PROCPS_APPLETS),$(eval $(call GenPlugin,procps-ng-$(a),$(a),$(call procps-applets-dir,$(a))))) MAKE_FLAGS += \ CFLAGS="$(TARGET_CFLAGS)" \ @@ -81,19 +93,18 @@ MAKE_FLAGS += \ LDFLAGS="$(TARGET_LDFLAGS)" \ define Package/procps-ng/install - $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_DIR) $(1)/usr/lib $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libprocps.so* $(1)/usr/lib/ endef define BuildPlugin define Package/$(1)/install - $(INSTALL_DIR) $$(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)/usr/bin/ + $(INSTALL_DIR) $$(1)$(3) + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $$(1)$(3)/$(1) endef $$(eval $$(call BuildPackage,$(1))) endef -$(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-ng-$(a),$(a)))) +$(foreach a,$(PROCPS_APPLETS),$(eval $(call BuildPlugin,procps-ng-$(a),$(a),$(call procps-applets-dir,$(a))))) $(eval $(call BuildPackage,procps-ng)) diff --git a/utils/pv/Makefile b/utils/pv/Makefile deleted file mode 100644 index b28bcfe..0000000 --- a/utils/pv/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (C) 2008 David Cooper -# Copyright (C) 2008-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=pv -PKG_VERSION:=1.5.3 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://www.ivarch.com/programs/sources/ -PKG_MD5SUM:=efe8e9e4cad5f3264a32258a63bf2c8e -PKG_LICENSE:=Artistic-2.0 -PKG_MAINTAINER:=Jo-Philipp Wich - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/pv - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Shell pipeline element to meter data passing through - URL:=http://www.ivarch.com/programs/pv.shtml -endef - -define Package/pv/description - Pipe Viewer is a terminal-based tool for monitoring the progress of data - through a pipeline. It can be inserted into any normal pipeline between - two processes to give a visual indication of how quickly data is passing - through, how long it has taken, how near to completion it is, and an - estimate of how long it will be until completion. -endef - -define Package/pv/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pv $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,pv)) - diff --git a/utils/qemu/Makefile b/utils/qemu/Makefile deleted file mode 100644 index 76c1c4f..0000000 --- a/utils/qemu/Makefile +++ /dev/null @@ -1,261 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# Copyright (C) 2016 Yousong Zhou -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=qemu -PKG_VERSION:=2.6.2 -PKG_RELEASE:=3 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=http://wiki.qemu-project.org/download/ -PKG_SOURCE_MD5SUM:=bdf1f3d0c177ebeb35a079a4bc3fc74e -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=LICENSE tcg/LICENSE -PKG_MAINTAINER:=Yousong Zhou - -PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 - -include $(INCLUDE_DIR)/uclibc++.mk -include $(INCLUDE_DIR)/package.mk - - -QEMU_DEPS_IN_GUEST := @(TARGET_x86_64||TARGET_armvirt||TARGET_arm64||TARGET_malta) -QEMU_DEPS_IN_HOST := @(TARGET_x86_64||TARGET_sunxi) - -define Package/virtio-console-helper - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Virtualization - TITLE:=Helper script for vportNpn virtio-console devices - DEPENDS:=$(QEMU_DEPS_IN_GUEST) -endef - -define Package/virtio-console-helper/install - $(INSTALL_DIR) $(1)/etc/hotplug.d/virtio-ports - $(INSTALL_BIN) ./files/00-virtio-ports.hotplug $(1)/etc/hotplug.d/virtio-ports/00-virtio-ports -endef - - -define Package/qemu-ga - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Virtualization - TITLE:=QEMU Guest Agent - URL:=http://www.qemu.org - DEPENDS:= +glib2 +virtio-console-helper $(CXX_DEPENDS) $(QEMU_DEPS_IN_GUEST) -endef - -define Package/qemu-ga/description - This package contains the QEMU Guest Agent daemon -endef - -define Package/qemu-ga/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qemu-ga $(1)/usr/bin - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/qemu-ga.init $(1)/etc/init.d/qemu-ga - $(INSTALL_DIR) $(1)/etc/hotplug.d/virtio-ports - $(INSTALL_BIN) ./files/10-qemu-ga.hotplug $(1)/etc/hotplug.d/virtio-ports/10-qemu-ga -endef - - -define Package/qemu-blobs - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Virtualization - TITLE:=QEMU blobs of BIOS, VGA BIOS and keymaps - URL:=http://www.qemu.org - DEPENDS:=$(QEMU_DEPS_IN_HOST) -endef - -define Package/qemu-blobs/install - $(INSTALL_DIR) $(1)/usr/share/qemu - $(CP) $(PKG_INSTALL_DIR)/usr/share/qemu/* $(1)/usr/share/qemu -endef - -define Package/qemu-bridge-helper - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Virtualization - TITLE:=QEMU bridge helper - URL:=http://www.qemu.org - DEPENDS:=+glib2 $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) -endef - -define Package/qemu-bridge-helper/install - $(INSTALL_DIR) $(1)/usr/lib/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/qemu-bridge-helper $(1)/usr/lib - $(INSTALL_DIR) $(1)/etc/qemu - $(INSTALL_DATA) ./files/bridge.conf $(1)/etc/qemu -endef - -PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-ga - -# Naming rules used in qemu Makefile.target -define qemu-prog_ - $(if $(filter %-softmmu,$(1)), \ - $(patsubst %-softmmu,qemu-system-%,$(1)), \ - $(error unknown qemu target $(1)) \ - ) -endef -qemu-prog = $(strip $(call qemu-prog_,$(1))) - -# Why libfdt was enabled for all softmmu targets: according to qemu's -# configure script, libfdt is only strictly required for the following targets -# and is optional for others. But libfdt support will be built into other -# targets when any single target enabled it. -# -# aarch64%-softmmu arm%-softmmu ppc%-softmmu microblaze%-softmmu -# -define qemu-target - PKG_CONFIG_DEPENDS += CONFIG_PACKAGE_qemu-$(1) - - define Package/qemu-$(1) - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Virtualization - TITLE:=QEMU target $(1) - URL:=http://www.qemu.org - DEPENDS:= +glib2 +libpthread +zlib $(CXX_DEPENDS) $(QEMU_DEPS_IN_HOST) \ - $(if $(filter %-softmmu,$(1)),+libncurses +libfdt +qemu-blobs) - endef - - define Package/qemu-$(1)/description - This package contains the QEMU target $(1) - endef - - define Package/qemu-$(1)/install - $(INSTALL_DIR) $$(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(call qemu-prog,$(1)) $$(1)/usr/bin - endef - -endef - -QEMU_TARGET_LIST := \ - x86_64-softmmu \ - arm-softmmu \ - -$(foreach target,$(QEMU_TARGET_LIST), \ - $(eval $(call qemu-target,$(target))) \ -) - -# QEMU configure script does not recognize these options -CONFIGURE_ARGS:=$(filter-out \ - --target=% \ - --host=% \ - --build=% \ - --program-prefix=% \ - --program-suffix=% \ - --exec-prefix=% \ - --disable-nls \ - , $(CONFIGURE_ARGS)) - -# Tell build system of qemu to not add _FORTIFY_SOURCE options and let the base -# build system decide flavor of fortify_source to use -CONFIGURE_ARGS += \ - --cross-prefix=$(TARGET_CROSS) \ - --host-cc="$(HOSTCC)" \ - --disable-fortify-source \ - --disable-stack-protector \ - -CONFIGURE_ARGS += \ - --audio-drv-list='' \ - --disable-debug-info \ - --disable-modules \ - --disable-sdl \ - --disable-qom-cast-debug \ - --disable-virtfs \ - --disable-vnc \ - --disable-debug-tcg \ - --disable-sparse \ - --disable-strip \ - --disable-vnc-sasl \ - --disable-vnc-jpeg \ - --disable-vnc-png \ - --disable-uuid \ - --disable-vde \ - --disable-netmap \ - --disable-xen \ - --disable-xen-pci-passthrough \ - --disable-xen-pv-domain-build \ - --disable-brlapi \ - --disable-bluez \ - --disable-tcg-interpreter \ - --disable-cap-ng \ - --disable-spice \ - --disable-libiscsi \ - --disable-libnfs \ - --disable-cocoa \ - --disable-bsd-user \ - --disable-curl \ - --disable-linux-aio \ - --disable-attr \ - --disable-docs \ - --disable-opengl \ - --disable-rbd \ - --disable-xfsctl \ - --disable-smartcard \ - --disable-libusb \ - --disable-usb-redir \ - --disable-zlib-test \ - --disable-lzo \ - --disable-snappy \ - --disable-bzip2 \ - --disable-guest-agent-msi \ - --disable-tools \ - --disable-seccomp \ - --disable-glusterfs \ - --disable-archipelago \ - --disable-gtk \ - --disable-gnutls \ - --disable-nettle \ - --disable-gcrypt \ - --disable-rdma \ - --disable-vte \ - --disable-virglrenderer \ - --disable-tpm \ - --disable-libssh2 \ - --disable-vhdx \ - --disable-numa \ - --disable-tcmalloc \ - --disable-jemalloc \ - --disable-strip \ - --disable-werror \ - -QEMU_CONFIGURE_TARGET_LIST := $(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target))) -CONFIGURE_ARGS += --target-list='$(QEMU_CONFIGURE_TARGET_LIST)' - -ifneq ($(CONFIG_PACKAGE_qemu-ga),) -CONFIGURE_ARGS += --enable-guest-agent -endif - -TARGET_LDFLAGS += -Wl,--as-needed -MAKE_VARS += V=s -# ARCH is special in qemu's build system, e.g. ARCH mips64 will be translated -# there to mips and stored in config-host.mak -MAKE_FLAGS:=$(filter-out \ - ARCH=% \ - ,$(MAKE_FLAGS)) - -QEMU_MAKE_TARGETS := \ - $(if $(CONFIG_PACKAGE_qemu-ga),qemu-ga) \ - $(if $(CONFIG_PACKAGE_qemu-bridge-helper),qemu-bridge-helper) \ - $(foreach target,$(QEMU_TARGET_LIST),$(if $(CONFIG_PACKAGE_qemu-$(target)),subdir-$(target))) \ - -define Build/Compile - $(if $(strip $(QEMU_MAKE_TARGETS)),$(call Build/Compile/Default,$(QEMU_MAKE_TARGETS))) -endef - -$(eval $(call BuildPackage,virtio-console-helper)) -$(eval $(call BuildPackage,qemu-ga)) -$(eval $(call BuildPackage,qemu-bridge-helper)) -$(eval $(call BuildPackage,qemu-blobs)) -$(foreach target,$(QEMU_TARGET_LIST), \ - $(eval $(call BuildPackage,qemu-$(target))) \ -) diff --git a/utils/qemu/files/00-virtio-ports.hotplug b/utils/qemu/files/00-virtio-ports.hotplug deleted file mode 100755 index 1edea39..0000000 --- a/utils/qemu/files/00-virtio-ports.hotplug +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# Copyright (C) 2016 OpenWrt.org -# Copyright (C) 2016 Yousong Zhou - -[ "$SUBSYSTEM" = "virtio-ports" ] || exit 0 - -syspath="/sys/$DEVPATH" -name="$(cat "$syspath/name" 2>/dev/null)" -[ -n "$name" ] || exit 0 - -case "$ACTION" in - "add") - mkdir -p /dev/virtio-ports - ln -s "/dev/$DEVNAME" "/dev/virtio-ports/$name" - ;; - "del") - rm -f "/dev/virtio-ports/$name" - ;; -esac diff --git a/utils/qemu/files/10-qemu-ga.hotplug b/utils/qemu/files/10-qemu-ga.hotplug deleted file mode 100755 index 56256ca..0000000 --- a/utils/qemu/files/10-qemu-ga.hotplug +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# Copyright (C) 2016 OpenWrt.org -# Copyright (C) 2016 Yousong Zhou - -[ "$SUBSYSTEM" = "virtio-ports" ] || exit 0 - -syspath="/sys/$DEVPATH" -name="$(cat "$syspath/name" 2>/dev/null)" -[ -n "$name" ] || exit 0 - -case "$ACTION" in - "add") - /etc/init.d/qemu-ga start - ;; -esac diff --git a/utils/qemu/files/bridge.conf b/utils/qemu/files/bridge.conf deleted file mode 100644 index 545a163..0000000 --- a/utils/qemu/files/bridge.conf +++ /dev/null @@ -1 +0,0 @@ -allow all diff --git a/utils/qemu/files/qemu-ga.init b/utils/qemu/files/qemu-ga.init deleted file mode 100755 index 86c2b7e..0000000 --- a/utils/qemu/files/qemu-ga.init +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2016 OpenWrt.org - -START=99 -USE_PROCD=1 - -BIN=/usr/bin/qemu-ga - -start_service() { - procd_open_instance - procd_set_param command $BIN - procd_set_param respawn - procd_set_param stderr 1 - procd_close_instance -} diff --git a/utils/qemu/patches/0001-allow-disable-fortify-source.patch b/utils/qemu/patches/0001-allow-disable-fortify-source.patch deleted file mode 100644 index ef6813a..0000000 --- a/utils/qemu/patches/0001-allow-disable-fortify-source.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.orig 2016-11-22 11:53:25.739180380 +0800 -+++ b/configure 2016-11-22 11:53:55.183189596 +0800 -@@ -1147,6 +1147,8 @@ for opt do - ;; - --enable-jemalloc) jemalloc="yes" - ;; -+ --disable-fortify-source) fortify_source="no" -+ ;; - *) - echo "ERROR: unknown option $opt" - echo "Try '$0 --help' for more information" diff --git a/utils/qemu/patches/0002-setting-language-type-for-_asm-files.patch b/utils/qemu/patches/0002-setting-language-type-for-_asm-files.patch deleted file mode 100644 index ea6d49d..0000000 --- a/utils/qemu/patches/0002-setting-language-type-for-_asm-files.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/rules.mak.orig 2016-11-22 13:30:40.933006727 +0800 -+++ b/rules.mak 2016-11-22 13:30:47.229008698 +0800 -@@ -70,7 +70,7 @@ LINK = $(call quiet-command, $(LINKPROG) - $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -o $@ $<," CPP $(TARGET_DIR)$@") - - %.o: %.asm -- $(call quiet-command,$(AS) $(ASFLAGS) -o $@ $<," AS $(TARGET_DIR)$@") -+ $(call quiet-command,$(AS) $(ASFLAGS) -o $@ -x assembler $<," AS $(TARGET_DIR)$@") - - %.o: %.cc - $(call quiet-command,$(CXX) $(QEMU_INCLUDES) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) -c -o $@ $<," CXX $(TARGET_DIR)$@") diff --git a/utils/qemu/patches/0003-disable-avx2_opt-with-musl.patch b/utils/qemu/patches/0003-disable-avx2_opt-with-musl.patch deleted file mode 100644 index c52cb4c..0000000 --- a/utils/qemu/patches/0003-disable-avx2_opt-with-musl.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/configure.orig 2016-11-22 17:35:12.069598617 +0800 -+++ b/configure 2016-11-22 18:24:01.042515353 +0800 -@@ -1789,7 +1789,10 @@ static void foo(void) __attribute__((ifu - int main(void) { foo(); return 0; } - EOF - if compile_prog "-mavx2" "" ; then -- if readelf --syms $TMPE |grep "IFUNC.*foo" >/dev/null 2>&1; then -+ if readelf --program-headers $TMPE | grep -iq 'Requesting program interpreter: .*ld-musl'; then -+ # ifunc support is not available with dynamic linker of musl -+ avx2_opt="no" -+ elif readelf --syms $TMPE |grep "IFUNC.*foo" >/dev/null 2>&1; then - avx2_opt="yes" - fi - fi diff --git a/utils/qemu/patches/0004-pixman-fix-detection-of-mips-dspr2.patch b/utils/qemu/patches/0004-pixman-fix-detection-of-mips-dspr2.patch deleted file mode 100644 index 05e34e0..0000000 --- a/utils/qemu/patches/0004-pixman-fix-detection-of-mips-dspr2.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/pixman/configure.ac.orig 2016-11-22 20:44:21.205150763 +0800 -+++ b/pixman/configure.ac 2016-11-22 20:44:55.505161500 +0800 -@@ -720,7 +720,6 @@ dnl Check if assembler is gas compatible - have_mips_dspr2=no - AC_MSG_CHECKING(whether to use MIPS DSPr2 assembler) - xserver_save_CFLAGS=$CFLAGS --CFLAGS="-mdspr2 $CFLAGS" - - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ - #if !(defined(__mips__) && __mips_isa_rev >= 2) diff --git a/utils/qemu/patches/0005-pixman-arm-neon-assembler-fix.patch b/utils/qemu/patches/0005-pixman-arm-neon-assembler-fix.patch deleted file mode 100644 index 93c967a..0000000 --- a/utils/qemu/patches/0005-pixman-arm-neon-assembler-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/pixman/pixman/pixman-private.h.orig 2016-11-22 22:10:33.574769654 +0800 -+++ b/pixman/pixman/pixman-private.h 2016-11-22 22:10:47.638774056 +0800 -@@ -1,5 +1,3 @@ --#include -- - #ifndef PIXMAN_PRIVATE_H - #define PIXMAN_PRIVATE_H - -@@ -17,6 +15,8 @@ - - #ifndef __ASSEMBLER__ - -+#include -+ - #ifndef PACKAGE - # error config.h must be included before pixman-private.h - #endif diff --git a/utils/qemu/patches/0006-libvixl-cxx-macro-isnan.patch b/utils/qemu/patches/0006-libvixl-cxx-macro-isnan.patch deleted file mode 100644 index 0dae8ce..0000000 --- a/utils/qemu/patches/0006-libvixl-cxx-macro-isnan.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- a/disas/libvixl/vixl/utils.h.orig 2016-11-22 22:36:20.691253883 +0800 -+++ b/disas/libvixl/vixl/utils.h 2016-11-22 22:55:44.639618185 +0800 -@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64 - // An fpclassify() function for 16-bit half-precision floats. - int float16classify(float16 value); - -+#ifdef isnan -+#define isnan_ isnan -+#else -+#define isnan_ std::isnan -+#endif -+ - // NaN tests. - inline bool IsSignallingNaN(double num) { - const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000); - uint64_t raw = double_to_rawbits(num); -- if (std::isnan(num) && ((raw & kFP64QuietNaNMask) == 0)) { -+ if (isnan_(num) && ((raw & kFP64QuietNaNMask) == 0)) { - return true; - } - return false; -@@ -132,7 +138,7 @@ inline bool IsSignallingNaN(double num) - inline bool IsSignallingNaN(float num) { - const uint32_t kFP32QuietNaNMask = 0x00400000; - uint32_t raw = float_to_rawbits(num); -- if (std::isnan(num) && ((raw & kFP32QuietNaNMask) == 0)) { -+ if (isnan_(num) && ((raw & kFP32QuietNaNMask) == 0)) { - return true; - } - return false; -@@ -148,21 +154,21 @@ inline bool IsSignallingNaN(float16 num) - - template - inline bool IsQuietNaN(T num) { -- return std::isnan(num) && !IsSignallingNaN(num); -+ return isnan_(num) && !IsSignallingNaN(num); - } - - - // Convert the NaN in 'num' to a quiet NaN. - inline double ToQuietNaN(double num) { - const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000); -- VIXL_ASSERT(std::isnan(num)); -+ VIXL_ASSERT(isnan_(num)); - return rawbits_to_double(double_to_rawbits(num) | kFP64QuietNaNMask); - } - - - inline float ToQuietNaN(float num) { - const uint32_t kFP32QuietNaNMask = 0x00400000; -- VIXL_ASSERT(std::isnan(num)); -+ VIXL_ASSERT(isnan_(num)); - return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask); - } - diff --git a/utils/relayctl/Makefile b/utils/relayctl/Makefile deleted file mode 100644 index 1d064f7..0000000 --- a/utils/relayctl/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=relayctl -PKG_VERSION:=0.1 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/relayctl/relayctl-$(PKG_VERSION) -PKG_MAINTAINER:=Heinrich Schuchardt -PKG_MD5SUM:=24c848e0d705421dcd6accfffa31f704 -PKG_LICENSE:=BSD-3-Clause -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/relayctl - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Simple command-line control of SainSmart USB relay boards - URL:=https://github.com/darryln/relayctl - DEPENDS:= +libftdi1 -endef - -define Package/relayctl/description - Simple command-line control of SainSmart USB relay boards based on - FTDI chips using bitbang mode. -endef - -TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/libftdi1 - -define Package/relayctl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/lib/udev/rules.d/ - $(CP) $(PKG_BUILD_DIR)/examples/60-relayctl.rules $(1)/lib/udev/rules.d/ -endef - -$(eval $(call BuildPackage,relayctl)) diff --git a/utils/relayctl/patches/0001-ftdi1.patch b/utils/relayctl/patches/0001-ftdi1.patch deleted file mode 100644 index 0b08395..0000000 --- a/utils/relayctl/patches/0001-ftdi1.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 13556aaf94a2b0738a835a29f76be41d775a2d33 Mon Sep 17 00:00:00 2001 -From: Heinrich Schuchardt -Date: Sun, 3 Jul 2016 15:51:43 +0200 -Subject: [PATCH] Use -lftdi1 - -Signed-off-by: Heinrich Schuchardt ---- - src/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index a533d5c..4dbe6b5 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -1,7 +1,7 @@ - sbin_PROGRAMS = \ - relayctl - --relayctl_LDFLAGS = -lftdi -+relayctl_LDFLAGS = -lftdi1 - - relayctl_SOURCES = relayctl.c - --- -2.1.4 - diff --git a/utils/rng-tools/Makefile b/utils/rng-tools/Makefile deleted file mode 100644 index d698327..0000000 --- a/utils/rng-tools/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (C) 2011-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rng-tools -PKG_VERSION:=5 -PKG_RELEASE:=5 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/gkernel/rng-tools/$(PKG_VERSION)/ -PKG_MD5SUM:=6726cdc6fae1f5122463f24ae980dd68 -PKG_LICENSE:=GPLv2 -PKG_MAINTAINER:=Nathaniel Wesley Filardo - -PKG_FIXUP:=autoreconf - -PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone - -include $(INCLUDE_DIR)/package.mk - -define Package/rng-tools - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Daemon for adding entropy to kernel entropy pool - URL:=http://sourceforge.net/projects/gkernel/ -endef - -define Package/rng-tools/description -Daemon for adding entropy to kernel entropy pool. By default it uses -/dev/urandom as the source but the init script can be modified -to use a hardware source like /dev/hwrng if present -endef - -ifdef CONFIG_USE_UCLIBC -CONFIGURE_VARS += \ - LIBS="-largp" -endif - -ifdef CONFIG_USE_MUSL -CONFIGURE_VARS += \ - LIBS="-largp" -endif - -CONFIGURE_ARGS += \ - --without-libgcrypt - -define Package/rng-tools/install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/rngd.init $(1)/etc/init.d/rngd - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(INSTALL_BIN) ./files/rngd.uci_defaults $(1)/etc/uci-defaults/rngd - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/rngtest $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/rngd $(1)/sbin/ -endef - -$(eval $(call BuildPackage,rng-tools)) diff --git a/utils/rng-tools/files/rngd.init b/utils/rng-tools/files/rngd.init deleted file mode 100644 index bb560c8..0000000 --- a/utils/rng-tools/files/rngd.init +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2011-2014 OpenWrt.org - -START=25 - -USE_PROCD=1 -PROG=/sbin/rngd - -start_service() { - local enabled=$(uci -q get system.@rngd[0].enabled) - local precmd=$(uci -q get system.@rngd[0].precmd) - local device=$(uci -q get system.@rngd[0].device) - local watermark=$(uci -q get system.@rngd[0].fill_watermark) - - [ "$enabled" = "1" ] || return - - [ -z "$precmd" ] || ${precmd} ${device} - - [ -z "$device" ] || device="-r ${device}" - [ -z "$watermark" ] || watermark="-W ${watermark}" - - procd_open_instance - procd_set_param command "$PROG" -f ${device} ${watermark} - procd_set_param stderr 1 - procd_close_instance -} diff --git a/utils/rng-tools/files/rngd.uci_defaults b/utils/rng-tools/files/rngd.uci_defaults deleted file mode 100644 index 6a26cf0..0000000 --- a/utils/rng-tools/files/rngd.uci_defaults +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -uci -q show system.@rngd[0] || { - uci add system rngd - uci set system.@rngd[0].enabled=0 - uci set system.@rngd[0].device=/dev/urandom - uci commit -} diff --git a/utils/rpcd-mod-lxc/Makefile b/utils/rpcd-mod-lxc/Makefile deleted file mode 100644 index 154336b..0000000 --- a/utils/rpcd-mod-lxc/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rpcd-mod-lxc -PKG_RELEASE=20141012 - -PKG_LICENSE:=ISC - -PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/rpcd-mod-lxc - SECTION:=libs - CATEGORY:=Libraries - TITLE:=LXC rpcd module - DEPENDS:=+rpcd +liblxc - MAINTAINER:=Luka Perkov -endef - -define Build/Prepare - $(CP) ./files/* $(PKG_BUILD_DIR)/ -endef - -define Package/rpcd-mod-lxc/install - $(INSTALL_DIR) $(1)/usr/lib/rpcd - $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/lxc.so $(1)/usr/lib/rpcd/ -endef - -$(eval $(call BuildPackage,rpcd-mod-lxc)) diff --git a/utils/rpcd-mod-lxc/files/CMakeLists.txt b/utils/rpcd-mod-lxc/files/CMakeLists.txt deleted file mode 100644 index 4a728a0..0000000 --- a/utils/rpcd-mod-lxc/files/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -PROJECT(rpcd-mod-lxc) -ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations) - -INCLUDE_DIRECTORIES(include) -FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib) - -SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") -SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib) - -SET(SOURCES lxc.c) - -ADD_LIBRARY(rpcd-mod-lxc SHARED ${SOURCES}) - -FIND_LIBRARY(lxc NAMES lxc liblxc) -TARGET_LINK_LIBRARIES(rpcd-mod-lxc ${lxc}) - -SET_TARGET_PROPERTIES(rpcd-mod-lxc PROPERTIES OUTPUT_NAME lxc PREFIX "") -INSTALL(TARGETS rpcd-mod-lxc LIBRARY DESTINATION lib) diff --git a/utils/rpcd-mod-lxc/files/lxc.c b/utils/rpcd-mod-lxc/files/lxc.c deleted file mode 100644 index 0d52f16..0000000 --- a/utils/rpcd-mod-lxc/files/lxc.c +++ /dev/null @@ -1,504 +0,0 @@ -/* - * rpcd-lxc-plugin - * - * Copyright (C) 2014 Cisco Systems, Inc. - * Author: Luka Perkov - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include - -#include - -#include - -static struct blob_buf buf; - -struct rpc_lxc { - /* ubus options */ - char *name; - char *config; - /* lxc container */ - struct lxc_container *container; -}; - -enum { - RPC_LXC_NAME, - RPC_LXC_CONFIG, - __RPC_LXC_MAX, -}; - -enum { - RPC_LXC_SHUTDOWN_NAME, - RPC_LXC_SHUTDOWN_CONFIG, - RPC_LXC_SHUTDOWN_TIMEOUT, - __RPC_LXC_SHUTDOWN_MAX, -}; - -enum { - RPC_LXC_RENAME_NAME, - RPC_LXC_RENAME_CONFIG, - RPC_LXC_RENAME_NEWNAME, - __RPC_LXC_RENAME_MAX, -}; - -enum { - RPC_LXC_CREATE_NAME, - RPC_LXC_CREATE_CONFIG, - RPC_LXC_CREATE_TEMPLATE, - RPC_LXC_CREATE_FLAGS, - RPC_LXC_CREATE_ARGS, - __RPC_LXC_CREATE_MAX, -}; - -static const struct blobmsg_policy rpc_lxc_min_policy[__RPC_LXC_MAX] = { - [RPC_LXC_NAME] = { .name = "name", .type = BLOBMSG_TYPE_STRING }, - [RPC_LXC_CONFIG] = { .name = "config", .type = BLOBMSG_TYPE_STRING }, -}; - -static const struct blobmsg_policy rpc_lxc_shutdown_policy[__RPC_LXC_SHUTDOWN_MAX] = { - [RPC_LXC_SHUTDOWN_NAME] = { .name = "name", .type = BLOBMSG_TYPE_STRING }, - [RPC_LXC_SHUTDOWN_CONFIG] = { .name = "config", .type = BLOBMSG_TYPE_STRING }, - [RPC_LXC_SHUTDOWN_TIMEOUT] = { .name = "timeout", .type = BLOBMSG_TYPE_INT32 }, -}; - -static const struct blobmsg_policy rpc_lxc_rename_policy[__RPC_LXC_RENAME_MAX] = { - [RPC_LXC_RENAME_NAME] = { .name = "name", .type = BLOBMSG_TYPE_STRING }, - [RPC_LXC_RENAME_CONFIG] = { .name = "config", .type = BLOBMSG_TYPE_STRING }, - [RPC_LXC_RENAME_NEWNAME] = { .name = "newname", .type = BLOBMSG_TYPE_STRING }, -}; - -static const struct blobmsg_policy rpc_lxc_create_policy[__RPC_LXC_CREATE_MAX] = { - [RPC_LXC_CREATE_NAME] = { .name = "name", .type = BLOBMSG_TYPE_STRING }, - [RPC_LXC_CREATE_CONFIG] = { .name = "config", .type = BLOBMSG_TYPE_STRING }, - [RPC_LXC_CREATE_TEMPLATE] = { .name = "template", .type = BLOBMSG_TYPE_STRING }, - [RPC_LXC_CREATE_FLAGS] = { .name = "flags", .type = BLOBMSG_TYPE_INT32 }, - [RPC_LXC_CREATE_ARGS] = { .name = "args", .type = BLOBMSG_TYPE_ARRAY }, -}; - -static struct rpc_lxc * -rpc_lxc_init(struct blob_attr *tb[__RPC_LXC_MAX]) -{ - struct rpc_lxc *l = NULL; - - l = calloc(1, sizeof(struct rpc_lxc)); - if (!l) return NULL; - - if (tb[RPC_LXC_NAME]) { - l->name = blobmsg_data(tb[RPC_LXC_NAME]); - } else { - goto error; - } - - if (tb[RPC_LXC_CONFIG]) { - l->config = blobmsg_data(tb[RPC_LXC_CONFIG]); - } else { - l->config = NULL; - } - - l->container = lxc_container_new(l->name, l->config); - if (!l->container) { - goto error; - } - - return l; -error: - free(l); - return NULL; -} - -static void -rpc_lxc_done(struct rpc_lxc *l) -{ - if (l) { - lxc_container_put(l->container); - free(l); - } - - return; -} - -static int -rpc_lxc_start(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct blob_attr *tb[__RPC_LXC_MAX]; - struct rpc_lxc *l = NULL; - int rc; - - blobmsg_parse(rpc_lxc_min_policy, __RPC_LXC_MAX, tb, blob_data(msg), blob_len(msg)); - - l = rpc_lxc_init(tb); - if (!l) return UBUS_STATUS_INVALID_ARGUMENT; - - if (l->container->is_running(l->container)) { - rc = UBUS_STATUS_UNKNOWN_ERROR; - goto out; - } - - if (!l->container->start(l->container, 0, NULL)) { - rc = UBUS_STATUS_INVALID_ARGUMENT; - goto out; - } - - rc = UBUS_STATUS_OK; -out: - rpc_lxc_done(l); - return rc; -} - - -static int -rpc_lxc_reboot(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct blob_attr *tb[__RPC_LXC_MAX]; - struct rpc_lxc *l = NULL; - int rc; - - blobmsg_parse(rpc_lxc_min_policy, __RPC_LXC_MAX, tb, blob_data(msg), blob_len(msg)); - - l = rpc_lxc_init(tb); - if (!l) return UBUS_STATUS_INVALID_ARGUMENT; - - if (!l->container->is_running(l->container)) { - rc = UBUS_STATUS_UNKNOWN_ERROR; - goto out; - } - - if (!l->container->reboot(l->container)) { - rc = UBUS_STATUS_INVALID_ARGUMENT; - goto out; - } - - rc = UBUS_STATUS_OK; -out: - rpc_lxc_done(l); - return rc; -} - -static int -rpc_lxc_shutdown(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct blob_attr *tb[__RPC_LXC_SHUTDOWN_MAX]; - struct rpc_lxc *l = NULL; - int rc; - - blobmsg_parse(rpc_lxc_shutdown_policy, __RPC_LXC_SHUTDOWN_MAX, tb, blob_data(msg), blob_len(msg)); - - l = rpc_lxc_init(tb); - if (!l) return UBUS_STATUS_INVALID_ARGUMENT; - - if (!l->container->is_running(l->container)) { - rc = UBUS_STATUS_UNKNOWN_ERROR; - goto out; - } - - /* define default timeout */ - int timeout = 30; - if (tb[RPC_LXC_SHUTDOWN_TIMEOUT]) { - timeout = blobmsg_get_u32(tb[RPC_LXC_SHUTDOWN_TIMEOUT]); - } - - if (!l->container->shutdown(l->container, timeout)) { - rc = UBUS_STATUS_UNKNOWN_ERROR; - goto out; - } - - rc = UBUS_STATUS_OK; -out: - rpc_lxc_done(l); - return rc; -} - -static int -rpc_lxc_stop(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct blob_attr *tb[__RPC_LXC_MAX]; - struct rpc_lxc *l = NULL; - int rc; - - blobmsg_parse(rpc_lxc_min_policy, __RPC_LXC_MAX, tb, blob_data(msg), blob_len(msg)); - - l = rpc_lxc_init(tb); - if (!l) return UBUS_STATUS_INVALID_ARGUMENT; - - if (!l->container->is_running(l->container)) { - rc = UBUS_STATUS_UNKNOWN_ERROR; - goto out; - } - - if (!l->container->stop(l->container)) { - rc = UBUS_STATUS_INVALID_ARGUMENT; - goto out; - } - - rc = UBUS_STATUS_OK; -out: - rpc_lxc_done(l); - return rc; -} - -static int -rpc_lxc_freeze(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct blob_attr *tb[__RPC_LXC_MAX]; - struct rpc_lxc *l = NULL; - int rc; - - blobmsg_parse(rpc_lxc_min_policy, __RPC_LXC_MAX, tb, blob_data(msg), blob_len(msg)); - - l = rpc_lxc_init(tb); - if (!l) return UBUS_STATUS_INVALID_ARGUMENT; - - if (!l->container->is_running(l->container)) { - rc = UBUS_STATUS_UNKNOWN_ERROR; - goto out; - } - - if (!l->container->freeze(l->container)) { - rc = UBUS_STATUS_INVALID_ARGUMENT; - goto out; - } - - rc = UBUS_STATUS_OK; -out: - rpc_lxc_done(l); - return rc; -} - -static int -rpc_lxc_unfreeze(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct blob_attr *tb[__RPC_LXC_MAX]; - struct rpc_lxc *l = NULL; - int rc; - - blobmsg_parse(rpc_lxc_min_policy, __RPC_LXC_MAX, tb, blob_data(msg), blob_len(msg)); - - l = rpc_lxc_init(tb); - if (!l) return UBUS_STATUS_INVALID_ARGUMENT; - - if (!l->container->is_running(l->container)) { - rc = UBUS_STATUS_UNKNOWN_ERROR; - goto out; - } - - if (!l->container->unfreeze(l->container)) { - rc = UBUS_STATUS_INVALID_ARGUMENT; - goto out; - } - - rc = UBUS_STATUS_OK; -out: - rpc_lxc_done(l); - return rc; -} - -static int -rpc_lxc_rename(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct blob_attr *tb[__RPC_LXC_RENAME_MAX]; - struct rpc_lxc *l = NULL; - int rc; - - blobmsg_parse(rpc_lxc_rename_policy, __RPC_LXC_RENAME_MAX, tb, blob_data(msg), blob_len(msg)); - - l = rpc_lxc_init(tb); - if (!l) return UBUS_STATUS_INVALID_ARGUMENT; - - if (!tb[RPC_LXC_RENAME_NEWNAME]) { - rc = UBUS_STATUS_INVALID_ARGUMENT; - goto out; - } - - if (l->container->is_running(l->container)) { - rc = UBUS_STATUS_UNKNOWN_ERROR; - goto out; - } - - char *newname = blobmsg_data(tb[RPC_LXC_RENAME_NEWNAME]); - if (!newname || !l->container->rename(l->container, newname)) { - rc = UBUS_STATUS_INVALID_ARGUMENT; - goto out; - } - - rc = UBUS_STATUS_OK; -out: - rpc_lxc_done(l); - return rc; -} - -static int -rpc_lxc_create(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct blob_attr *tb[__RPC_LXC_CREATE_MAX]; - struct rpc_lxc *l = NULL; - int rc; - - char *template = "none"; - int flags = 0; - char **args = NULL; - - blobmsg_parse(rpc_lxc_create_policy, __RPC_LXC_CREATE_MAX, tb, blob_data(msg), blob_len(msg)); - - l = rpc_lxc_init(tb); - if (!l) return UBUS_STATUS_INVALID_ARGUMENT; - - if (tb[RPC_LXC_CREATE_TEMPLATE]) - template = blobmsg_data(tb[RPC_LXC_CREATE_TEMPLATE]); - - if (tb[RPC_LXC_CREATE_FLAGS]) - flags = blobmsg_get_u32(tb[RPC_LXC_CREATE_FLAGS]); - - if (tb[RPC_LXC_CREATE_ARGS]) { - struct blob_attr *cur; - int num, rem; - - num = blobmsg_check_array(tb[RPC_LXC_CREATE_ARGS], BLOBMSG_TYPE_STRING); - - // trailing NULL is needed - args = calloc(num + 1, sizeof(char *)); - if (!args) { - rc = UBUS_STATUS_UNKNOWN_ERROR; - goto out; - } - - num = 0; - blobmsg_for_each_attr(cur, tb[RPC_LXC_CREATE_ARGS], rem) - { - if (blobmsg_type(cur) != BLOBMSG_TYPE_STRING) - continue; - - args[num++] = (char *) blobmsg_data(cur); - } - } - - if (!l->container->create(l->container, template, NULL, NULL, flags, args)) { - rc = UBUS_STATUS_INVALID_ARGUMENT; - goto out; - } - - rc = UBUS_STATUS_OK; -out: - rpc_lxc_done(l); - free(args); - return rc; -} - -static int -rpc_lxc_destroy(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - struct blob_attr *tb[__RPC_LXC_MAX]; - struct rpc_lxc *l = NULL; - int rc; - - blobmsg_parse(rpc_lxc_min_policy, __RPC_LXC_MAX, tb, blob_data(msg), blob_len(msg)); - - l = rpc_lxc_init(tb); - if (!l) return UBUS_STATUS_INVALID_ARGUMENT; - - if (l->container->is_running(l->container)) { - rc = UBUS_STATUS_UNKNOWN_ERROR; - goto out; - } - - if (!l->container->destroy(l->container)) { - rc = UBUS_STATUS_INVALID_ARGUMENT; - goto out; - } - - rc = UBUS_STATUS_OK; -out: - rpc_lxc_done(l); - return rc; -} - -static int -rpc_lxc_list(struct ubus_context *ctx, struct ubus_object *obj, - struct ubus_request_data *req, const char *method, - struct blob_attr *msg) -{ - - blob_buf_init(&buf, 0); - - int rc; - char **names; - struct lxc_container **cret; - - rc = list_all_containers(NULL, &names, &cret); - if (rc == -1) - return UBUS_STATUS_UNKNOWN_ERROR; - - for (int i = 0; i < rc; i++) { - struct lxc_container *c = cret[i]; - blobmsg_add_string(&buf, names[i], c->state(c)); - - free(names[i]); - lxc_container_put(c); - } - - ubus_send_reply(ctx, req, buf.head); - - return UBUS_STATUS_OK; -} - -static int -rpc_lxc_api_init(const struct rpc_daemon_ops *o, struct ubus_context *ctx) -{ - static const struct ubus_method lxc_methods[] = { - UBUS_METHOD("start", rpc_lxc_start, rpc_lxc_min_policy), - UBUS_METHOD("reboot", rpc_lxc_reboot, rpc_lxc_min_policy), - UBUS_METHOD("shutdown", rpc_lxc_shutdown, rpc_lxc_shutdown_policy), - UBUS_METHOD("stop", rpc_lxc_stop, rpc_lxc_min_policy), - UBUS_METHOD("freeze", rpc_lxc_freeze, rpc_lxc_min_policy), - UBUS_METHOD("unfreeze", rpc_lxc_unfreeze, rpc_lxc_min_policy), - UBUS_METHOD("rename", rpc_lxc_rename, rpc_lxc_rename_policy), - UBUS_METHOD("create", rpc_lxc_create, rpc_lxc_create_policy), - UBUS_METHOD("destroy", rpc_lxc_destroy, rpc_lxc_min_policy), - UBUS_METHOD_NOARG("list", rpc_lxc_list), - }; - - static struct ubus_object_type lxc_type = - UBUS_OBJECT_TYPE("luci-rpc-lxc", lxc_methods); - - static struct ubus_object obj = { - .name = "lxc", - .type = &lxc_type, - .methods = lxc_methods, - .n_methods = ARRAY_SIZE(lxc_methods), - }; - - return ubus_add_object(ctx, &obj); -} - -struct rpc_plugin rpc_plugin = { - .init = rpc_lxc_api_init -}; diff --git a/utils/rrdtool1/Makefile b/utils/rrdtool1/Makefile deleted file mode 100644 index dd221ae..0000000 --- a/utils/rrdtool1/Makefile +++ /dev/null @@ -1,135 +0,0 @@ -# -# Copyright (C) 2006-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rrdtool1 -PKG_VERSION:=1.0.50 -PKG_RELEASE:=2 - -PKG_BUILD_DIR:=$(BUILD_DIR)/rrdtool-$(PKG_VERSION) -PKG_SOURCE:=rrdtool-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:= \ - http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.0.x \ - http://www.fastmirrors.org/rrdtool/rrdtool-1.0.x \ - ftp://ftp.sunet.se/pub/network/monitoring/rrdtool/rrdtool-1.0.x -PKG_MD5SUM:=c466e2e7df95fa8e318e46437da87686 -PKG_MAINTAINER:=Jo-Philipp Wich - -PKG_FIXUP:=autoreconf -PKG_CHECK_FORMAT_SECURITY:=0 - -include $(INCLUDE_DIR)/package.mk - -define Package/rrdtool1/Default - TITLE:=Round Robin Database (RRD) - URL:=http://oss.oetiker.ch/rrdtool/ -endef - -define Package/rrdtool1/description/Default - RRD is the Acronym for Round Robin Database. RRD is a system to store and - display time-series data (i.e. network bandwidth, machine-room temperature, - server load average). It stores the data in a very compact way that will - not expand over time, and it presents useful graphs by processing the data - to enforce a certain data density. It can be used either via simple wrapper - scripts (from shell or Perl) or via frontends that poll network devices and - put friendly user interface on it. - - This is version 1.0.x with cgilib-0.4, gd1.3 and libpng-1.0.9 linked into - librrd.so. The library is much smaller compared to the 1.2.x version with - separate dynamic linked libraries. -endef - -define Package/librrd1 -$(call Package/rrdtool1/Default) - SECTION:=libs - CATEGORY:=Libraries - DEPENDS:=+zlib - TITLE+= management library -endef - -define Package/librrd1/description -$(call Package/rrdtool1/description/Default) - This package contains a shared library, used by other programs. -endef - -define Package/rrdcgi1 -$(call Package/rrdtool1/Default) - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=database - DEPENDS:=+librrd1 - TITLE+= CGI graphing tool -endef - -define Package/rrdcgi1/description -$(call Package/rrdtool1/description/Default) - This package contains the rrdcgi tool used to create web pages containing - RRD graphs based on templates. -endef - -define Package/rrdtool1 -$(call Package/rrdtool1/Default) - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=database - DEPENDS:=+librrd1 - TITLE+= management tools -endef - -define Package/rrdtool1/description -$(call Package/rrdtool1/description/Default) - This package contains command line tools used to manage RRDs. -endef - -TARGET_CFLAGS += $(FPIC) --std=c99 - -CONFIGURE_ARGS += \ - $(DISABLE_NLS) \ - --enable-shared=yes \ - --enable-static=yes \ - --disable-rpath \ - --with-gnu-ld \ - --enable-local-zlib - -CONFIGURE_VARS += \ - ac_cv_path_PERL=no \ - rd_cv_ieee_works=yes \ - shrext_cmds=".so" - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - shrext_cmds=".so" \ - all install -endef - -define Package/rrdtool1/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrd{tool,update} $(1)/usr/bin/ -endef - -define Package/rrdcgi1/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rrdcgi $(1)/usr/bin/ -endef - -define Package/librrd1/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.so.* $(1)/usr/lib/ -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/lib/rrdtool-1.0/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/rrd.h $(1)/usr/lib/rrdtool-1.0/include/ - $(INSTALL_DIR) $(1)/usr/lib/rrdtool-1.0/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librrd.{a,so*} $(1)/usr/lib/rrdtool-1.0/lib/ -endef - -$(eval $(call BuildPackage,librrd1)) -$(eval $(call BuildPackage,rrdcgi1)) -$(eval $(call BuildPackage,rrdtool1)) diff --git a/utils/rrdtool1/patches/001-no_ordering_cd_joke.patch b/utils/rrdtool1/patches/001-no_ordering_cd_joke.patch deleted file mode 100644 index 442fe49..0000000 --- a/utils/rrdtool1/patches/001-no_ordering_cd_joke.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -urN rrdtool-1.0.50/configure rrdtool-1.0.50.new/configure ---- rrdtool-1.0.50/configure 2005-04-25 22:48:09.000000000 +0200 -+++ rrdtool-1.0.50.new/configure 2009-03-09 17:25:38.000000000 +0100 -@@ -24873,17 +24873,12 @@ - echo "${ECHO_T}and out again" >&6 - - echo $ECHO_N "ordering CD from http://people.ee.ethz.ch/~oetiker/wish $ac_c" 1>&6 --sleep 1 - echo $ECHO_N ".$ac_c" 1>&6 --sleep 2 - echo $ECHO_N ".$ac_c" 1>&6 --sleep 1 - echo $ECHO_N ".$ac_c" 1>&6 --sleep 3 - echo $ECHO_N ".$ac_c" 1>&6 - echo $ECHO_N ".$ac_c" 1>&6 - echo $ECHO_N ".$ac_c" 1>&6 --sleep 2 - echo "$as_me:$LINENO: result: just kidding ;-)" >&5 - echo "${ECHO_T} just kidding ;-)" >&6 - echo diff --git a/utils/rrdtool1/patches/002-no_timezone.patch b/utils/rrdtool1/patches/002-no_timezone.patch deleted file mode 100644 index 07564b4..0000000 --- a/utils/rrdtool1/patches/002-no_timezone.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/src/rrd_tool.c -+++ b/src/rrd_tool.c -@@ -225,11 +225,8 @@ - struct rusage myusage; - struct timeval starttime; - struct timeval currenttime; -- struct timezone tz; - -- tz.tz_minuteswest =0; -- tz.tz_dsttime=0; -- gettimeofday(&starttime,&tz); -+ gettimeofday(&starttime,NULL); - #endif - - while (fgets(aLine, sizeof(aLine)-1, stdin)){ -@@ -252,7 +249,7 @@ - - #if HAVE_GETRUSAGE - getrusage(RUSAGE_SELF,&myusage); -- gettimeofday(¤ttime,&tz); -+ gettimeofday(¤ttime,NULL); - printf("OK u:%1.2f s:%1.2f r:%1.2f\n", - (double)myusage.ru_utime.tv_sec+ - (double)myusage.ru_utime.tv_usec/1000000.0, diff --git a/utils/rrdtool1/patches/020-x86-float-cast.patch b/utils/rrdtool1/patches/020-x86-float-cast.patch deleted file mode 100644 index 5b8a662..0000000 --- a/utils/rrdtool1/patches/020-x86-float-cast.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: rrdtool-1.0.50/src/rrd_format.h -=================================================================== ---- rrdtool-1.0.50.orig/src/rrd_format.h -+++ rrdtool-1.0.50/src/rrd_format.h -@@ -20,7 +20,7 @@ - - #define RRD_COOKIE "RRD" - #define RRD_VERSION "0001" --#define FLOAT_COOKIE 8.642135E130 -+#define FLOAT_COOKIE ((double)8.642135E130) - - #if defined(WIN32) - #define DNAN ((double)fmod(0.0,0.0)) diff --git a/utils/rrdtool1/patches/030-pod2man-stderr.patch b/utils/rrdtool1/patches/030-pod2man-stderr.patch deleted file mode 100644 index feadf3a..0000000 --- a/utils/rrdtool1/patches/030-pod2man-stderr.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- rrdtool-1.0.50/doc/Makefile.am.orig 2013-11-16 11:44:50.940231208 -0500 -+++ rrdtool-1.0.50/doc/Makefile.am 2013-11-16 11:45:09.802229483 -0500 -@@ -35,7 +35,7 @@ - all-local: link txt man html - - .pod.1 .pm.1 .pl.1: -- pod2man --release=$(VERSION) --center=RRDtool $< > $@ -+ pod2man --stderr --release=$(VERSION) --center=RRDtool $< > $@ - - .1.txt: - @NROFF@ -man -Tlp $< > $@ || echo @NROFF@ failed > $@ diff --git a/utils/rtklib/Makefile b/utils/rtklib/Makefile deleted file mode 100644 index 9d7ed6d..0000000 --- a/utils/rtklib/Makefile +++ /dev/null @@ -1,96 +0,0 @@ -# -# Copyright (C) 2014-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rtklib -PKG_VERSION:=2.4.3_b24 -PKG_RELEASE:=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/tomojitakasu/RTKLIB.git -PKG_SOURCE_VERSION:=1cec90a9ffa424908ad1a4ca3d52f33f9b94d1f7 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_LICENSE:=BSD-2-Clause - -PKG_MAINTAINER:=Nuno Goncalves - -include $(INCLUDE_DIR)/package.mk - -define Package/rtklib/default - SUBMENU:=RTKLIB Suite - SECTION:=utils - CATEGORY:=Utilities - URL:=http://www.rtklib.com/ - DEPENDS:=+libpthread +librt -endef - -define Package/convbin -$(call Package/rtklib/default) - TITLE:=RINEX Converter -endef - -define Package/pos2kml -$(call Package/rtklib/default) - TITLE:=Solution to KML converter -endef - -define Package/rnx2rtkp -$(call Package/rtklib/default) - TITLE:=Post-Processing Analysis -endef - -define Package/rtkrcv -$(call Package/rtklib/default) - TITLE:=Real-Time Positioning -endef - -define Package/str2str -$(call Package/rtklib/default) - TITLE:=Communication Server -endef - -define Build/Compile - rm -rf $(PKG_INSTALL_DIR) - mkdir -p $(PKG_INSTALL_DIR) - $(MAKE) -C $(PKG_BUILD_DIR)/app/convbin/gcc CC="$(TARGET_CC) $(TARGET_CFLAGS)" - $(MAKE) -C $(PKG_BUILD_DIR)/app/pos2kml/gcc CC="$(TARGET_CC) $(TARGET_CFLAGS)" - $(MAKE) -C $(PKG_BUILD_DIR)/app/rnx2rtkp/gcc CC="$(TARGET_CC) $(TARGET_CFLAGS)" - $(MAKE) -C $(PKG_BUILD_DIR)/app/rtkrcv/gcc CC="$(TARGET_CC) $(TARGET_CFLAGS)" - $(MAKE) -C $(PKG_BUILD_DIR)/app/str2str/gcc CC="$(TARGET_CC) $(TARGET_CFLAGS)" -endef - -define Package/convbin/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/convbin/gcc/convbin $(1)/usr/bin/ -endef - -define Package/pos2kml/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/pos2kml/gcc/pos2kml $(1)/usr/bin/ -endef - -define Package/rnx2rtkp/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/rnx2rtkp/gcc/rnx2rtkp $(1)/usr/bin/ -endef - -define Package/rtkrcv/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/rtkrcv/gcc/rtkrcv $(1)/usr/bin/ -endef - -define Package/str2str/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/str2str/gcc/str2str $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,convbin)) -$(eval $(call BuildPackage,pos2kml)) -$(eval $(call BuildPackage,rnx2rtkp)) -$(eval $(call BuildPackage,rtkrcv)) -$(eval $(call BuildPackage,str2str)) diff --git a/utils/rtl-ais/Makefile b/utils/rtl-ais/Makefile deleted file mode 100644 index ba45557..0000000 --- a/utils/rtl-ais/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rtl-ais -PKG_VERSION:=20151213 - -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/dgiardini/rtl-ais.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=b805be0164475e58a73b57763a8cbbf8a2bd0ded -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING - -PKG_MAINTAINER:=Nuno Goncalves - -include $(INCLUDE_DIR)/package.mk - -define Package/rtl-ais - SECTION:=utils - CATEGORY:=Utilities - TITLE:=rtl-sdr AIS dual channel tuner - DEPENDS:=+libpthread +librtlsdr - URL:=https://github.com/dgiardini/rtl-ais -endef - -define Package/rtl-ais/description - rtl_ais uses a rtl2832u dvb-t dongle to tune AIS (Automatic Identification - System) used on ships and by vessel traffic services -endef - -define Package/rtl-ais/conffiles -/etc/config/rtl_ais -endef - -define Package/rtl-ais/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/rtl_ais $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/rtl_ais.init $(1)/etc/init.d/rtl_ais - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/uci_rtl_ais $(1)/etc/config/rtl_ais -endef - -$(eval $(call BuildPackage,rtl-ais)) diff --git a/utils/rtl-ais/files/rtl_ais.init b/utils/rtl-ais/files/rtl_ais.init deleted file mode 100644 index 4900c34..0000000 --- a/utils/rtl-ais/files/rtl_ais.init +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 -USE_PROCD=1 - -PROG=/usr/bin/rtl_ais - -validate_rtl_ais_section() { - uci_validate_section "rtl_ais" "rtl_ais" "$1" \ - 'enabled:bool' \ - 'ppm:range(-100,100):0' -} - -load_rtl_ais() { - local cfg="$1" - - local enabled ppm - validate_rtl_ais_section "$cfg" || { echo "validation failed"; return 1; } - - [ "$enabled" = "1" ] || return 1 - - procd_open_instance - procd_set_param command "$PROG" -p "$ppm" - procd_set_param stdout 1 - procd_set_param stderr 1 - procd_set_param respawn - procd_close_instance -} - -start_service() { - config_load "rtl_ais" - config_foreach load_rtl_ais "rtl_ais" -} - -service_triggers() { - procd_add_reload_trigger "rtl_ais" - procd_add_validation validate_rtl_ais_section -} diff --git a/utils/rtl-ais/files/uci_rtl_ais b/utils/rtl-ais/files/uci_rtl_ais deleted file mode 100644 index 1b5f1ec..0000000 --- a/utils/rtl-ais/files/uci_rtl_ais +++ /dev/null @@ -1,3 +0,0 @@ -config rtl_ais - option enabled 0 - option ppm 0 diff --git a/utils/rtl-sdr/Makefile b/utils/rtl-sdr/Makefile deleted file mode 100644 index 37e7f84..0000000 --- a/utils/rtl-sdr/Makefile +++ /dev/null @@ -1,96 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. - -include $(TOPDIR)/rules.mk - -PKG_NAME:=rtl-sdr -PKG_VERSION:=0.5.3-20150608-$(PKG_SOURCE_VERSION) -PKG_RELEASE:=2 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://git.osmocom.org/rtl-sdr.git -PKG_SOURCE_VERSION:=e3c03f738f5aef4dc51e2b741fbdb542b9cc1bb1 - -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_BUILD_PARALLEL:=1 - -CMAKE_INSTALL:=1 - -PKG_LICENSE:=GPLv2 -PKG_LICENSE_FILES:=COPYING - -PKG_MAINTAINER:=Vasilis Tsiligiannis - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/rtl-sdr/Default - TITLE:=Software Defined Radio with Realtek RTL2832U - URL:=http://sdr.osmocom.org/trac/wiki/rtl-sdr -endef - -define Package/rtl-sdr/Default/description - rtl-sdr allows DVB-T dongles based on the Realtek RTL2832U to be used as - an inexpensive SDR. -endef - -define Package/rtl-sdr - $(call Package/rtl-sdr/Default) - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+librt +libpthread +librtlsdr -endef - -define Package/rtl-sdr/description - $(call Package/rtl-sdr/Default/description) - - This package contains the utilities and daemons. -endef - -define Package/librtlsdr - $(call Package/rtl-sdr/Default) - TITLE+= shared library - SECTION:=libs - CATEGORY:=Libraries - TITLE+= library - DEPENDS:=+libusb-1.0 -endef - -define Package/librtlsdr/description - $(call Package/rtl-sdr/Default/description) - - This package contains the librtlsdr shared library. -endef - -TARGET_CFLAGS += $(FPIC) - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librtlsdr.so* $(1)/usr/lib/ - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librtlsdr.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/rtl-sdr/install - $(INSTALL_DIR) $(1)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/rtl_* $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) files/rtl_tcp.init $(1)/etc/init.d/rtl_tcp - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) files/rtl_tcp.config $(1)/etc/config/rtl_tcp -endef - -define Package/librtlsdr/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/librtlsdr.so* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,rtl-sdr)) -$(eval $(call BuildPackage,librtlsdr)) diff --git a/utils/rtl-sdr/files/rtl_tcp.config b/utils/rtl-sdr/files/rtl_tcp.config deleted file mode 100644 index 95998aa..0000000 --- a/utils/rtl-sdr/files/rtl_tcp.config +++ /dev/null @@ -1,12 +0,0 @@ -config rtl_tcp main - option disabled '1' - option respawn '1' - option device_index '' - option address '0.0.0.0' - option port '' - option frequency '' - option gain '' - option samplerate '' - option buffers '8' - option num_linked_lists '8' - option ppm_error '' diff --git a/utils/rtl-sdr/files/rtl_tcp.init b/utils/rtl-sdr/files/rtl_tcp.init deleted file mode 100755 index 4204787..0000000 --- a/utils/rtl-sdr/files/rtl_tcp.init +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2016 OpenWrt.org - -START=90 -STOP=10 -USE_PROCD=1 - -append_arg() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get val "$cfg" "$var" - [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}" -} - -append_bool() { - local cfg="$1" - local var="$2" - local opt="$3" - local def="$4" - local val - - config_get_bool val "$cfg" "$var" "$def" - [ "$val" = 1 ] && procd_append_param command "$opt" -} - - -start_instance() { - local cfg="$1" - local aux - - config_get_bool aux "$cfg" 'disabled' '0' - [ "$aux" = 1 ] && return 1 - - procd_open_instance - - procd_set_param command /usr/bin/rtl_tcp - append_arg "$cfg" device_index "-d" - append_arg "$cfg" address "-a" - append_arg "$cfg" port "-p" - append_arg "$cfg" frequency "-f" - append_arg "$cfg" gain "-g" - append_arg "$cfg" samplerate "-s" - append_arg "$cfg" buffers "-b" - append_arg "$cfg" num_linked_lists "-n" - append_arg "$cfg" ppm_error "-P" - - config_get_bool aux "$cfg" 'respawn' '0' - [ "$aux" = 1 ] && procd_set_param respawn - - procd_close_instance -} - -service_triggers() { - procd_add_reload_trigger "rtl_tcp" -} - -start_service() { - config_load rtl_tcp - config_foreach start_instance rtl_tcp -} diff --git a/utils/sane-backends/Makefile b/utils/sane-backends/Makefile deleted file mode 100644 index 0eee249..0000000 --- a/utils/sane-backends/Makefile +++ /dev/null @@ -1,358 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sane-backends -PKG_VERSION:=1.0.25 -PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://fossies.org/linux/misc \ - https://alioth.debian.org/frs/download.php/file/4146/ -PKG_MD5SUM:=f9ed5405b3c12f07c6ca51ee60225fe7 -PKG_MAINTAINER:=Luiz Angelo Daros de Luca -PKG_LICENSE:=GPL-2.0 GPL-2.0+ -PKG_LICENSE_FILES:=COPYING LICENSE - -PKG_FIXUP:=autoreconf -PKG_REMOVE_FILES:=aclocal.m4 - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -SANE_BACKENDS:= - -define Package/sane-backends/Default - TITLE:=Scanner Access Now Easy - URL:=http://www.sane-project.org/ -endef - -define Package/sane-backends/Default/description - SANE (Scanner Access Now Easy) is a universal scanner interface. -endef - -define Package/sane-backends -$(call Package/sane-backends/Default) - SECTION:=utils - CATEGORY:=Utilities - TITLE+= (drivers) - DEPENDS:=+ALL:sane-backends-all -endef - -define Package/sane-backends/description -$(call Package/sane-backends/Default/description) -. -This -endef - -define Package/sane-backends/config - menu "Select SANE backends" - depends on PACKAGE_sane-backends - - - config PACKAGE_sane-backends-all - depends on PACKAGE_sane-backends - prompt "Include all SANE backends (sane-backends-all)" - - comment "Backends" - -$(foreach backend,$(SANE_BACKENDS), \ - $(eval \ - $(call Package/Default) - $(call Package/sane-$(backend)) - )\ - config PACKAGE_sane-$(backend) - prompt "$(TITLE)" - $(foreach config_dep,\ - $(filter @%, - $(foreach v, $(DEPENDS), $(if $(findstring :,$v),,$v)) - ),\ - depends on $(strip $(subst @,,$(config_dep))) - ) -) - endmenu - -endef - -# returns conditional dependency on sane backend -# 1: backend name -# -# If there is no config deps on $(1), returns +sane-$(1). -# Otherwise, +(CONFIG1&&CONFIG2&&..):sane-$(1) -define SaneBackendDependency - $(eval \ - $(call Package/Default) - $(call Package/sane-$(1)) - FILTER_CONFIG:=$$(strip \ - $$(foreach config_dep, \ - $$(filter @%, \ - $$(foreach v, \ - $$(DEPENDS), \ - $$(if $$(findstring :,$$v),,$$v) \ - ) \ - ), \ - $$(subst @,,$$(config_dep)) \ - ) \ - ) - ifneq (,$$(FILTER_CONFIG)) - FILTER_CONFIG:=($$(subst $$(space),&&,$$(FILTER_CONFIG))): - endif - ) \ - +$(FILTER_CONFIG)sane-$(1) -endef - -define Package/sane-backends-all -$(call Package/sane-backends/Default) - SECTION:=utils - CATEGORY:=Utilities - TITLE+= (all backends) - DEPENDS:=$(foreach backend,$(SANE_BACKENDS),$(strip $(call SaneBackendDependency,$(backend)))) - HIDDEN:=1 -endef - -define Package/sane-backends-all/description -$(call Package/sane-backends/Default/description) -. -Metapackage for selecting all SANE Backends -endef - -define Package/sane-daemon -$(call Package/sane-backends/Default) - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libsane - TITLE+= (network daemon) -endef - -define Package/sane-daemon/description -$(call Package/sane-backends/Default/description) -This package contains the SANE daemon. -endef - -define Package/libsane - $(call Package/sane-backends/Default) - SECTION:=libs - CATEGORY:=Libraries - DEPENDS:=+libusb-compat - TITLE+= (libraries) -endef - -define Package/libsane/description -$(call Package/sane-backends/Default/description) -This package contains the SANE shared libraries. -endef - -define Package/sane-frontends - $(call Package/sane-backends/Default) - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libsane +libjpeg +libpng - TITLE+= (frontends) -endef - -define Package/sane-frontends/description -$(call Package/sane-backends/Default/description) -This package contains the SANE frontends. -endef - -TARGET_LDFLAGS += \ - -Wl,-rpath-link $(STAGING_DIR)/usr/lib \ - -Wl,-rpath-link $(PKG_BUILD_DIR)/backend/.libs - -CONFIGURE_ARGS+= \ - --enable-shared \ - --enable-static \ - --disable-translations \ - --disable-latex \ - --without-gphoto2 \ - --without-snmp - -CONFIGURE_VARS+= \ - ac_cv_func_mmap_fixed_mapped="yes" \ - -define Build/Configure - mkdir -p $(PKG_BUILD_DIR)/backend/.libs - $(Build/Configure/Default) -endef - -define Package/libsane/install - $(INSTALL_DIR) $(1)/usr/lib/sane/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.so.* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/sane/libsane-dll.so.* $(1)/usr/lib/sane/ - $(INSTALL_DIR) $(1)/etc/sane.d/dll.d - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sane.d/dll.conf $(1)/etc/sane.d/ -endef - -define Package/libsane/conffiles -/etc/sane.d/dll.conf -endef - -define Package/sane-daemon/install - $(INSTALL_DIR) $(1)/etc/sane.d - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sane.d/saned.conf $(1)/etc/sane.d/ - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc/xinetd.d - $(CP) ./files/xinet.d_sane-port $(1)/etc/xinetd.d/sane-port -endef - -define Package/sane-daemon/conffiles -/etc/sane.d/saned.conf -/etc/xinetd.d/sane-port -endef - -define Package/sane-frontends/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ -endef - -define Package/sane-backends-all/install - /bin/true -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/sane $(1)/usr/include/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsane.{a,so*} $(1)/usr/lib/ -endef - -# 1: short name -# 2: description -# 3: dependencies on other packages -define SaneBackend - SANE_BACKENDS+= $(1) - - define Package/sane-$(1) - $(call Package/sane-backends/Default) - TITLE:=SANE backend (sane-$(1)) for $(2) - DEPENDS+= +libsane $(3) - HIDDEN:=1 - endef - - define Package/sane-$(1)/description - $(call Package/sane-backends/Default/description) -. -This package contains the SANE backend for $(2). - endef - - define Package/sane-$(1)/install - if [ -f "$(PKG_INSTALL_DIR)/etc/sane.d/$(1).conf" ]; then \ - $(INSTALL_DIR) $$(1)/etc/sane.d ; \ - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sane.d/$(1).conf $$(1)/etc/sane.d/; \ - fi - $(INSTALL_DIR) $$(1)/usr/lib/sane - $(CP) $(PKG_INSTALL_DIR)/usr/lib/sane/libsane-$(1).so.* $$(1)/usr/lib/sane/ - if [ -d "$(PKG_INSTALL_DIR)/usr/share/sane/$(1)" ]; then \ - $(INSTALL_DIR) $$(1)/usr/share/sane/ ; \ - $(CP) -a $(PKG_INSTALL_DIR)/usr/share/sane/$(1) $$(1)/usr/share/sane/ ; \ - fi - endef - - define Package/sane-$(1)/conffiles - /etc/sane.d/$(1).conf - endef - - $$(eval $$(call BuildPackage,sane-$(1))) -endef - -$(eval $(call BuildPackage,libsane)) -$(eval $(call BuildPackage,sane-daemon)) -$(eval $(call SaneBackend,abaton,Abaton flatbed scanners)) -$(eval $(call SaneBackend,agfafocus,AGFA Focus flatbed scanners)) -$(eval $(call SaneBackend,apple,Apple flatbed scanners)) -$(eval $(call SaneBackend,artec,Artec flatbed scanners)) -$(eval $(call SaneBackend,artec_eplus48u,Artec E+ 48U and re-badged models)) -$(eval $(call SaneBackend,as6e,Artec AS6E parallel port interface scanner)) -$(eval $(call SaneBackend,avision,Avision and Avision OEM scanners and possibly more flatbed and film scanners)) -$(eval $(call SaneBackend,bh,Bell+Howell Copiscan II series document scanners)) -$(eval $(call SaneBackend,canon,Canon SCSI scanners)) -$(eval $(call SaneBackend,canon630u,the Canon 630u USB flatbed scanner)) -$(eval $(call SaneBackend,canon_dr,Canon DR-series scanners)) -# Depends on libieee1284 -#$(eval $(call SaneBackend,canon_pp,Canon CanoScan Parallel Port flatbed scanners,+libieee1284)) -$(eval $(call SaneBackend,cardscan,Corex CardScan usb scanners)) -$(eval $(call SaneBackend,coolscan,Nikon film-scanners)) -$(eval $(call SaneBackend,coolscan2,Nikon Coolscan film scanners)) -$(eval $(call SaneBackend,coolscan3,Nikon Coolscan film scanners)) -$(eval $(call SaneBackend,dc210,Kodak DC210 Digital Camera,+libjpeg)) -$(eval $(call SaneBackend,dc240,Kodak DC240 Digital Camera,+libjpeg)) -$(eval $(call SaneBackend,dc25,Kodak DC20/DC25 Digital Cameras)) -$(eval $(call SaneBackend,dell1600n_net,Dell 1600n,+libtiff)) -$(eval $(call SaneBackend,dmc,Polaroid Digital Microscope Camera)) -$(eval $(call SaneBackend,epjitsu,Epson-based Fujitsu USB scanners)) -$(eval $(call SaneBackend,epson,EPSON scanners)) -$(eval $(call SaneBackend,epsonds,EPSON scanners,+libjpeg)) #### -$(eval $(call SaneBackend,epson2,EPSON scanners)) -$(eval $(call SaneBackend,fujitsu,Fujitsu flatbed and ADF scanners)) -$(eval $(call SaneBackend,genesys,GL646 GL841 GL843 GL847 and GL124 based USB flatbed scanners)) -#$(eval $(call SaneBackend,gphoto2,digital cameras supported by gphoto2,+libjpeg)) -$(eval $(call SaneBackend,gt68xx,GT-68XX based USB flatbed scanners)) -$(eval $(call SaneBackend,hp,HP ScanJet scanners)) -$(eval $(call SaneBackend,hp3500,Hewlett-Packard ScanJet 3500 series scanners)) -$(eval $(call SaneBackend,hp3900,RTS8822 chipset based scanners,+libtiff)) -$(eval $(call SaneBackend,hp4200,Hewlett-Packard 4200 scanners)) -$(eval $(call SaneBackend,hp5400,Hewlett-Packard 54XX scanners)) -$(eval $(call SaneBackend,hp5590,Hewlett-Packard 4500C/4570C/5500C/5550C/5590/7650 Workgroup/Document scanners)) -$(eval $(call SaneBackend,hpljm1005,Hewlett-Packard LaserJet M1005 MFP Scanner)) -# Depends on libieee1284 -#$(eval $(call SaneBackend,hpsj5s,HP ScanJet 5S sheet-fed scanner,+libieee1284)) -$(eval $(call SaneBackend,hs2p,Ricoh SCSI flatbed/ADF scanners)) -$(eval $(call SaneBackend,ibm,IBM and Ricoh SCSI flatbed scanners)) -$(eval $(call SaneBackend,kodak,big Kodak flatbed and ADF scanners)) -$(eval $(call SaneBackend,kodakaio,Kodak aio printer / scanners)) -$(eval $(call SaneBackend,kvs20xx,Panasonic KV-S20xxC USB/SCSI ADF scanners)) -$(eval $(call SaneBackend,kvs40xx,Panasonic KV-S40xxC USB/SCSI ADF scanners)) -$(eval $(call SaneBackend,kvs1025,Panasonic KV-S102xC USB ADF scanners)) -$(eval $(call SaneBackend,leo,LEO Technologies scanners)) -$(eval $(call SaneBackend,lexmark,Lexmark X1100/X1200 Series scanners)) -$(eval $(call SaneBackend,ma1509,Mustek BearPaw 1200F USB scanner)) -$(eval $(call SaneBackend,magicolor,KONICA MINOLTA magicolor scanners)) -$(eval $(call SaneBackend,matsushita,Panasonic KV-SS high speed scanners)) -$(eval $(call SaneBackend,microtek,Microtek scanners)) -$(eval $(call SaneBackend,microtek2,Microtek scanners with SCSI-2 command set)) -$(eval $(call SaneBackend,mustek,Mustek SCSI flatbed scanners and some other devices)) -# Depends on libieee1284 -#$(eval $(call SaneBackend,mustek_pp,Mustek parallel port flatbed scanners,+libieee1284)) -$(eval $(call SaneBackend,mustek_usb,Mustek USB flatbed scanners)) -$(eval $(call SaneBackend,mustek_usb2,SQ113 based USB flatbed scanners)) -$(eval $(call SaneBackend,nec,NEC scanners)) -$(eval $(call SaneBackend,net,network backend)) -$(eval $(call SaneBackend,niash,scanners based on the NIASH chipset)) -$(eval $(call SaneBackend,p5,the Primax PagePartner)) -$(eval $(call SaneBackend,pie,PIE Devcom and AdLib SCSI flatbed scanners)) -$(eval $(call SaneBackend,pieusb,PIE Devcom and AdLib SCSI flatbed scanners)) ##### -$(eval $(call SaneBackend,pixma,Canon Multi-Function Printers and CanoScan Scanners)) -$(eval $(call SaneBackend,plustek,LM983[1/2/3] based USB flatbed scanners)) -$(eval $(call SaneBackend,plustek_pp,Plustek parallel port flatbed scanners)) -$(eval $(call SaneBackend,qcam,Connectix QuickCam cameras,@(TARGET_x86||TARGET_x86_64))) -$(eval $(call SaneBackend,ricoh,Ricoh flatbed scanners)) -$(eval $(call SaneBackend,rts8891,rts8891 based scanners)) -$(eval $(call SaneBackend,s9036,Siemens 9036 flatbed scanners)) -$(eval $(call SaneBackend,sceptre,SCEPTRE scanners)) -$(eval $(call SaneBackend,sharp,SHARP scanners)) -$(eval $(call SaneBackend,sm3600,Microtek scanners with M011 USB chip)) -$(eval $(call SaneBackend,sm3840,Microtek scanners with SCAN08 USB chip)) -$(eval $(call SaneBackend,snapscan,AGFA SnapScan flatbed scanners)) -$(eval $(call SaneBackend,sp15c,Fujitsu ScanPartner 15C flatbed scanner)) -$(eval $(call SaneBackend,st400,Siemens ST/Highscan flatbed scanners)) -$(eval $(call SaneBackend,stv680,STV680 cameras)) -$(eval $(call SaneBackend,tamarack,Tamarack flatbed scanners)) -$(eval $(call SaneBackend,teco1,TECO / RELISYS scanners)) -$(eval $(call SaneBackend,teco2,TECO / RELISYS scanners)) -$(eval $(call SaneBackend,teco3,TECO / RELISYS scanners)) -$(eval $(call SaneBackend,test,testing frontends)) -$(eval $(call SaneBackend,u12,Plustek USB flatbed scanners based on older parport designs)) -$(eval $(call SaneBackend,umax,UMAX scanners)) -$(eval $(call SaneBackend,umax1220u,the UMAX Astra 1220U and similar scanners)) -$(eval $(call SaneBackend,umax_pp,Umax Astra parallel port flatbed scanners)) -$(eval $(call SaneBackend,v4l,Video for Linux API,+libv4l +libjpeg)) -$(eval $(call SaneBackend,xerox_mfp,Xerox Phaser 3200MFP device)) -$(eval $(call BuildPackage,sane-backends)) -$(eval $(call BuildPackage,sane-backends-all)) -$(eval $(call BuildPackage,sane-frontends)) diff --git a/utils/sane-backends/files/xinet.d_sane-port b/utils/sane-backends/files/xinet.d_sane-port deleted file mode 100644 index 9119973..0000000 --- a/utils/sane-backends/files/xinet.d_sane-port +++ /dev/null @@ -1,14 +0,0 @@ -# default: off -# description: The saned provides scanner service via the network. \ -# Applications like kooka, xsane or xscanimage can use the remote \ -# scanner. -service sane-port -{ - socket_type = stream - port = 6566 - wait = no - user = root - group = root - server = /usr/sbin/saned - disable = yes -} diff --git a/utils/sane-backends/patches/002-remove-uneeded.patch b/utils/sane-backends/patches/002-remove-uneeded.patch deleted file mode 100644 index 8348058..0000000 --- a/utils/sane-backends/patches/002-remove-uneeded.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -400,7 +400,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = include lib sanei backend frontend tools doc po testsuite -+SUBDIRS = include lib sanei backend frontend - DIST_SUBDIRS = include lib sanei backend frontend tools doc po japi testsuite - dist_doc_DATA = AUTHORS ChangeLog COPYING LICENSE NEWS PROBLEMS PROJECTS \ - README README.aix README.beos README.darwin README.djpeg README.freebsd \ diff --git a/utils/sane-backends/patches/020-fix_pieusb.patch b/utils/sane-backends/patches/020-fix_pieusb.patch deleted file mode 100644 index ae97040..0000000 --- a/utils/sane-backends/patches/020-fix_pieusb.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/backend/pieusb_buffer.c -+++ b/backend/pieusb_buffer.c -@@ -104,11 +104,13 @@ - - /* When creating the release backend, make complains about unresolved external - * le16toh, although it finds the include */ -+#ifndef le16toh - #if __BYTE_ORDER == __LITTLE_ENDIAN - #define le16toh(x) (x) - #else - #define le16toh(x) __bswap_16 (x) - #endif -+#endif - - static void buffer_update_read_index(struct Pieusb_Read_Buffer* buffer, int increment); - diff --git a/utils/sane-backends/patches/030-musl.patch b/utils/sane-backends/patches/030-musl.patch deleted file mode 100644 index 7f0a5a2..0000000 --- a/utils/sane-backends/patches/030-musl.patch +++ /dev/null @@ -1,73 +0,0 @@ ---- a/include/sane/sanei_udp.h -+++ b/include/sane/sanei_udp.h -@@ -27,6 +27,9 @@ - #include - #include - #endif -+#ifdef HAVE_SYS_TYPES_H -+#include -+#endif - - extern SANE_Status sanei_udp_open(const char *host, int port, int *fdp); - extern SANE_Status sanei_udp_open_broadcast(int *fdp); ---- a/backend/kvs20xx_cmd.h -+++ b/backend/kvs20xx_cmd.h -@@ -9,6 +9,10 @@ - Panasonic KV-S20xx USB-SCSI scanners. - */ - -+#ifdef HAVE_SYS_TYPES_H -+#include -+#endif -+ - #define COMMAND_BLOCK 1 - #define DATA_BLOCK 2 - #define RESPONSE_BLOCK 3 ---- a/backend/kvs40xx.h -+++ b/backend/kvs40xx.h -@@ -10,6 +10,9 @@ - - #include "../include/sane/config.h" - #include -+#ifdef HAVE_SYS_TYPES_H -+#include -+#endif - - #undef BACKEND_NAME - #define BACKEND_NAME kvs40xx ---- a/backend/hp5400.c -+++ b/backend/hp5400.c -@@ -67,6 +67,9 @@ - #include /* malloc, free */ - #include /* memcpy */ - #include -+#ifdef HAVE_SYS_TYPES_H -+#include -+#endif - - - #define HP5400_CONFIG_FILE "hp5400.conf" ---- a/backend/hp5590.c -+++ b/backend/hp5590.c -@@ -48,6 +48,9 @@ - #include - #include - #include -+#ifdef HAVE_SYS_TYPES_H -+#include -+#endif - - #include "../include/sane/sane.h" - #define BACKEND_NAME hp5590 ---- a/backend/epsonds-io.c -+++ b/backend/epsonds-io.c -@@ -16,6 +16,9 @@ - #include "sane/config.h" - #include - #include /* sleep */ -+#ifdef HAVE_SYS_TYPES_H -+#include -+#endif - - #include "epsonds.h" - #include "epsonds-io.h" diff --git a/utils/sane-backends/patches/031-fix_uclibc.patch b/utils/sane-backends/patches/031-fix_uclibc.patch deleted file mode 100644 index b7495a5..0000000 --- a/utils/sane-backends/patches/031-fix_uclibc.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/configure.in -+++ b/configure.in -@@ -279,6 +279,9 @@ dnl ************************************ - dnl Checks for library functions - dnl *********************************************************************** - -+dnl Check mkostemp (missing in uclibc) -+AC_CHECK_FUNC(mkostemp) -+ - dnl Define SOCKET_LIB, NSL_LIB, BIND_LIB, and RESOLV_LIB when required - dnl for functions we use. - AC_CHECK_FUNC(gethostbyaddr,, [AC_CHECK_LIB(bind, gethostbyaddr, BIND_LIB="-lbind")]) ---- a/include/sane/config.h.in -+++ b/include/sane/config.h.in -@@ -207,6 +207,9 @@ - /* Define to 1 if you have the `mkdir' function. */ - #undef HAVE_MKDIR - -+/* Define to 1 if you have a working `mkostemp' function. */ -+#undef HAVE_MKOSTEMP -+ - /* Define to 1 if you have a working `mmap' system call. */ - #undef HAVE_MMAP - ---- a/backend/pieusb_buffer.c -+++ b/backend/pieusb_buffer.c -@@ -112,6 +112,11 @@ - #endif - #endif - -+#ifndef HAVE_MKOSTEMP -+/* uclibc might not implement mkostemp GNU extension */ -+#define mkostemp(template, flags) mkstemp(template) -+#endif -+ - static void buffer_update_read_index(struct Pieusb_Read_Buffer* buffer, int increment); - - /* READER */ diff --git a/utils/sane-backends/patches/050-remove_linked_libs_for_unused_preload.patch b/utils/sane-backends/patches/050-remove_linked_libs_for_unused_preload.patch deleted file mode 100644 index bb01dd9..0000000 --- a/utils/sane-backends/patches/050-remove_linked_libs_for_unused_preload.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/backend/Makefile.am -+++ b/backend/Makefile.am -@@ -1142,7 +1142,7 @@ EXTRA_DIST += dll.aliases - nodist_libsane_la_SOURCES = dll-s.c - libsane_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dll - libsane_la_LDFLAGS = $(DIST_LIBS_LDFLAGS) --libsane_la_LIBADD = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(LIBV4L_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(TIFF_LIBS) $(JPEG_LIBS) $(GPHOTO2_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(AVAHI_LIBS) $(SCSI_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS) -+libsane_la_LIBADD = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo $(DL_LIBS) $(MATH_LIB) $(IEEE1284_LIBS) $(SOCKET_LIBS) $(USB_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS) - - # WARNING: Automake is getting this wrong so have to do it ourselves. - libsane_la_DEPENDENCIES = $(COMMON_LIBS) @PRELOADABLE_BACKENDS_ENABLED@ libdll_preload.la sane_strstatus.lo ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo ../sanei/sanei_usb.lo ../sanei/sanei_scsi.lo ../sanei/sanei_pv8630.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo ../sanei/sanei_lm983x.lo ../sanei/sanei_access.lo ../sanei/sanei_net.lo ../sanei/sanei_wire.lo ../sanei/sanei_codec_bin.lo ../sanei/sanei_pa4s2.lo ../sanei/sanei_ab306.lo ../sanei/sanei_pio.lo ../sanei/sanei_tcp.lo ../sanei/sanei_udp.lo ../sanei/sanei_magic.lo @SANEI_SANEI_JPEG_LO@ diff --git a/utils/screen/Makefile b/utils/screen/Makefile deleted file mode 100644 index 09e0ef9..0000000 --- a/utils/screen/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=screen -PKG_VERSION:=4.3.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@GNU/screen -PKG_MD5SUM:=5bb3b0ff2674e29378c31ad3411170ad - -PKG_LICENSE:=GPL-3.0+ -PKG_LICENSE_FILES:= - -include $(INCLUDE_DIR)/package.mk - -define Package/screen - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Terminal - DEPENDS:=+libncurses - TITLE:=Full-screen terminal window manager - URL:=http://www.gnu.org/software/screen/ - MAINTAINER:=Etienne CHAMPETIER -endef - -define Package/screen/description - Screen is a full-screen window manager that multiplexes a physical - terminal between several processes, typically interactive shells. -endef - -define Build/Configure - $(call Build/Configure/Default,\ - --with-sys-screenrc=/etc/screenrc \ - ) - # XXX: memmove() works well with overlapped memory areas - echo "#define USEMEMMOVE 1" >>$(PKG_BUILD_DIR)/config.h -endef - -define Package/screen/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/screen $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/etc/screenrc $(1)/etc/screenrc -endef - -define Package/screen/conffiles -/etc/screenrc -endef - -$(eval $(call BuildPackage,screen)) diff --git a/utils/screen/files/etc/screenrc b/utils/screen/files/etc/screenrc deleted file mode 100644 index 3337674..0000000 --- a/utils/screen/files/etc/screenrc +++ /dev/null @@ -1 +0,0 @@ -startup_message off diff --git a/utils/screen/patches/100-cross_compile_fix.patch b/utils/screen/patches/100-cross_compile_fix.patch deleted file mode 100644 index d9662b4..0000000 --- a/utils/screen/patches/100-cross_compile_fix.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- a/configure -+++ b/configure -@@ -414,7 +414,7 @@ as_fn_error () - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 -- as_fn_exit $as_status -+ # as_fn_exit $as_status - } # as_fn_error - - if expr a : '\(a\)' >/dev/null 2>&1 && -@@ -5942,8 +5942,6 @@ else - fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext --test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" --test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" - oldlibs="$LIBS" - LIBS="$LIBS -lsun" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking IRIX sun library..." >&5 -@@ -7024,7 +7022,7 @@ as_fn_error () - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 -- as_fn_exit $as_status -+ # as_fn_exit $as_status - } # as_fn_error - - ---- a/pty.c -+++ b/pty.c -@@ -39,9 +39,9 @@ - #endif - - /* for solaris 2.1, Unixware (SVR4.2) and possibly others */ --#ifdef HAVE_STROPTS_H --# include --#endif -+//#ifdef HAVE_STROPTS_H -+//# include -+//#endif - - #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL) - # include ---- a/sched.h -+++ b/sched.h -@@ -27,6 +27,11 @@ - * $Id$ GNU - */ - -+#ifndef __SCHED_H -+#define __SCHED_H -+ -+#include -+ - struct event - { - struct event *next; -@@ -46,3 +51,5 @@ struct event - #define EV_READ 1 - #define EV_WRITE 2 - #define EV_ALWAYS 3 -+ -+#endif diff --git a/utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch b/utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch deleted file mode 100644 index 50d00b8..0000000 --- a/utils/screen/patches/110-do_not_add_srcdir_to_include_path.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.in -+++ b/Makefile.in -@@ -79,7 +79,7 @@ screen: $(OFILES) - $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS) - - .c.o: -- $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \ -+ $(CC) -c $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \ - $(OPTIONS) $(CFLAGS) $< - - install_bin: .version screen diff --git a/utils/screen/patches/200-musl-compat.patch b/utils/screen/patches/200-musl-compat.patch deleted file mode 100644 index cd783bd..0000000 --- a/utils/screen/patches/200-musl-compat.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- a/configure -+++ b/configure -@@ -4155,44 +4155,6 @@ fi - rm -f conftest* - - --oldlibs="$LIBS" --LIBS="$LIBS -lelf" --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SVR4..." >&5 --$as_echo "$as_me: checking SVR4..." >&6;} --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include -- --int --main () --{ -- -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_fn_c_check_header_mongrel "$LINENO" "dwarf.h" "ac_cv_header_dwarf_h" "$ac_includes_default" --if test "x$ac_cv_header_dwarf_h" = xyes; then : -- $as_echo "#define SVR4 1" >>confdefs.h -- $as_echo "#define BUGGYGETLOGIN 1" >>confdefs.h -- --else -- ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default" --if test "x$ac_cv_header_elf_h" = xyes; then : -- $as_echo "#define SVR4 1" >>confdefs.h -- $as_echo "#define BUGGYGETLOGIN 1" >>confdefs.h -- --fi -- -- --fi -- -- -- --else -- LIBS="$oldlibs" --fi - rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - for ac_header in stropts.h string.h strings.h ---- a/utmp.c -+++ b/utmp.c -@@ -33,6 +33,7 @@ - #include "config.h" - #include "screen.h" - #include "extern.h" -+#include "os.h" - - #ifdef HAVE_UTEMPTER - #include diff --git a/utils/serialconsole/Makefile b/utils/serialconsole/Makefile deleted file mode 100644 index fbf648e..0000000 --- a/utils/serialconsole/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sc -PKG_VERSION:=0.95 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/serialconsole/sc -PKG_MD5SUM:=4fe58576a5bddb9f1fb3dcfc6410b885 -PKG_MAINTAINER:=Stefan Bethke - -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/serialconsole - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Terminal - TITLE:=Serial Console - minimal terminal program - URL:=http://sourceforge.net/projects/serialconsole/ -endef - -define Package/serialconsole/description -serialconsole (sc) is a minimal terminal program allowing to use one machine -to access the serial console of another machine. -endef - -define Package/serialconsole/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/sc $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,serialconsole)) diff --git a/utils/shadow/Makefile b/utils/shadow/Makefile deleted file mode 100644 index d56be82..0000000 --- a/utils/shadow/Makefile +++ /dev/null @@ -1,146 +0,0 @@ -# -# Copyright (C) 2008-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=shadow -PKG_VERSION:=4.2.1 -PKG_RELEASE:=5 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://pkg-shadow.alioth.debian.org/releases -PKG_MD5SUM:=2bfafe7d4962682d31b5eba65dba4fc8 -PKG_MAINTAINER:=Steven Barth -PKG_LICENSE:=BSD-3-Clause - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -SHADOW_APPLETS := \ - chage groupadd groupdel groupmod groups passwd su \ - useradd userdel usermod - -CONFIGURE_ARGS += \ - --without-audit \ - --without-libpam \ - --without-selinux \ - --without-acl \ - --without-attr \ - --without-tcb \ - --without-nscd \ - --disable-subordinate-ids \ - -define Package/shadow/Default - SECTION:=utils - CATEGORY:=Utilities - TITLE:=The PLD Linux shadow utilities - URL:=http://pkg-shadow.alioth.debian.org/ -endef - -define Package/shadow - $(call Package/shadow/Default) - TITLE+= (all) - DEPENDS:=$(foreach u,$(SHADOW_APPLETS),+shadow-$(u)) - HIDDEN:=1 -endef - -define Package/shadow/description - Full versions of standard shadow utilities. Normally, you would not - use this package, since the functionality in BusyBox is more than - sufficient and much smaller. -endef - -define Package/shadow/install - true -endef - -define Package/shadow-utils - $(call Package/shadow/Default) -endef - -define Package/shadow-utils/config - menu "Select shadow utilities" - depends on PACKAGE_shadow-utils - - config shadow-all - bool "Include all PLD shadow utilities" - select PACKAGE_shadow - default y - - comment "Utilities" - - $(foreach u,$(SHADOW_APPLETS), \ - config PACKAGE_shadow-$(u) - prompt "Full PLD version of $(u) utility" - - ) - - endmenu - -endef - -Package/shadow-utils/description = $(Package/shadow/description) - -define Package/shadow-common - $(call Package/shadow/Default) - TITLE:=Shared definitions for the PLD Linux shadow utilities - DEPENDS:=$(ICONV_DEPENDS) $(INTL_DEPENDS) - HIDDEN:=1 -endef - -define GenPlugin - define Package/shadow-$(1) - $(call Package/shadow/Default) - TITLE:=Utility $(1) from the PLD Linux shadow utilities - DEPENDS:=+shadow-common - HIDDEN:=1 - endef - - define Package/shadow-$(1)/description - Full version of standard $(1) utility. Normally, you would not use this - package, since the functionality in BusyBox is more than sufficient. - endef -endef - -$(foreach u,$(SHADOW_APPLETS),$(eval $(call GenPlugin,$(u)))) - -define Package/shadow-common/conffiles -/etc/login.defs -endef - -define Package/shadow-common/install - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/login.defs $(1)/etc/ -endef - -define Package/shadow-utils/install - true -endef - -define BuildPlugin - define Package/shadow-$(1)/install - [ -x "$(PKG_INSTALL_DIR)/usr/sbin/$(1)" ] && { \ - $(INSTALL_DIR) $$(1)/usr/sbin; \ - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(1) $$(1)/usr/sbin/; \ - } || { \ - $(INSTALL_DIR) $$(1)/usr/bin; \ - $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/; \ - } - endef - - $$(eval $$(call BuildPackage,shadow-$(1))) -endef - -$(foreach u,$(SHADOW_APPLETS),$(eval $(call BuildPlugin,$(u)))) - -$(eval $(call BuildPackage,shadow-utils)) -$(eval $(call BuildPackage,shadow-common)) -$(eval $(call BuildPackage,shadow)) diff --git a/utils/shadow/patches/001-busybox_ash.patch b/utils/shadow/patches/001-busybox_ash.patch deleted file mode 100644 index a16dad2..0000000 --- a/utils/shadow/patches/001-busybox_ash.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/etc/login.defs -+++ b/etc/login.defs -@@ -111,7 +111,7 @@ NOLOGINS_FILE /etc/nologin - # command as "-su". If not defined, then ps(1) will display the - # name of the shell actually being run, e.g. something like "-sh". - # --SU_NAME su -+#SU_NAME su - - # - # *REQUIRED* diff --git a/utils/shadow/patches/002-disable-ruser-lookup.patch b/utils/shadow/patches/002-disable-ruser-lookup.patch deleted file mode 100644 index a7ef1f7..0000000 --- a/utils/shadow/patches/002-disable-ruser-lookup.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/configure.in -+++ b/configure.in -@@ -197,7 +197,6 @@ dnl XXX - quick hack, should disappear b - AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().]) - if test "$ac_cv_func_ruserok" = "yes"; then - AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.]) -- AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).]) - fi - - AC_ARG_ENABLE(shadowgrp, diff --git a/utils/shadow/patches/003-fix-disabling-subids.patch b/utils/shadow/patches/003-fix-disabling-subids.patch deleted file mode 100644 index bbc65c7..0000000 --- a/utils/shadow/patches/003-fix-disabling-subids.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/src/usermod.c -+++ b/src/usermod.c -@@ -1361,6 +1361,7 @@ static void process_flags (int argc, cha - exit (E_UID_IN_USE); - } - -+#ifdef ENABLE_SUBIDS - if ( (vflg || Vflg) - && !is_sub_uid) { - fprintf (stderr, -@@ -1376,6 +1377,7 @@ static void process_flags (int argc, cha - Prog, sub_gid_dbname (), "-w", "-W"); - exit (E_USAGE); - } -+#endif - } - - /* ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -52,7 +52,10 @@ usbin_PROGRAMS = \ - noinst_PROGRAMS = id sulogin - - suidbins = su --suidubins = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap -+suidubins = chage chfn chsh expiry gpasswd newgrp passwd -+if ENABLE_SUBIDS -+ suidubins += newuidmap newgidmap -+endif - if ACCT_TOOLS_SETUID - suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod - endif diff --git a/utils/shadow/patches/004-fix-su-controoling-term.patch b/utils/shadow/patches/004-fix-su-controoling-term.patch deleted file mode 100644 index 4c130c7..0000000 --- a/utils/shadow/patches/004-fix-su-controoling-term.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/src/su.c -+++ b/src/su.c -@@ -1090,8 +1090,12 @@ - - if (fd >= 0) { - err = ioctl (fd, TIOCNOTTY, (char *) 0); -+ if (-1 == err && ENOTTY == errno) { -+ /* There are no controlling terminal already */ -+ err = 0; -+ } - (void) close (fd); -- } else if (ENXIO == errno) { -+ } else if (ENXIO == errno || EACCES == errno) { - /* There are no controlling terminal already */ - err = 0; - } diff --git a/utils/sispmctl/Makefile b/utils/sispmctl/Makefile deleted file mode 100644 index ad6c1e3..0000000 --- a/utils/sispmctl/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2008-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sispmctl -PKG_VERSION:=3.1+20120206 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=5ff4a05a5bcb6a64a9d6f77fed47014512f66b11 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=git://git.code.sf.net/p/sispmctl/git -PKG_MAINTAINER:=Richard Kunze -PKG_LICENSE:=GPL-2.0+ - -PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/sispmctl - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Silver Shield PM Control for Linux - URL:=http://sispmctl.sourceforge.net/ - DEPENDS:=+libusb-compat -endef - -define Package/sispmctl/description - The sispmctl tool can control Gembird SIS-PM Silver Shield - programmable power outlet strips (also known under the name - Revolt Intelli-Plug) from the command line. - . - It can be used to switch on or off any of the programmable - power sockets of the SIS-PM via USB. It can also show the - current status of each power socket, and it can handle - multiple SIS-PM devices, too. -endef - -TARGET_CFLAGS += -D_GNU_SOURCE -CONFIGURE_ARGS += \ - --enable-webless \ - --disable-dependency-tracking - -define Package/sispmctl/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,sispmctl)) diff --git a/utils/sispmctl/patches/001-fix-includes.patch b/utils/sispmctl/patches/001-fix-includes.patch deleted file mode 100644 index 218e22e..0000000 --- a/utils/sispmctl/patches/001-fix-includes.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/src/sispm_ctl.c -+++ b/src/sispm_ctl.c -@@ -33,6 +33,7 @@ - #include - #include - #include -+#include - #include - #include - #include "sispm_ctl.h" ---- a/src/main.c -+++ b/src/main.c -@@ -34,11 +34,11 @@ - #define __USE_XOPEN - #include - #include --#include - #include - #include - #include - #include -+#include - - #include - diff --git a/utils/slide-switch/Makefile b/utils/slide-switch/Makefile deleted file mode 100644 index c0dfef9..0000000 --- a/utils/slide-switch/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=slide-switch -PKG_VERSION:=0.9.0 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/jefferyto/openwrt-slide-switch.git -PKG_SOURCE_VERSION:=9171c2ea9cc9cbfb6f27b7bc25a535c8c35ee534 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Jeffery To - -include $(INCLUDE_DIR)/package.mk - -define Package/slide-switch - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+jshn +jsonfilter - TITLE:=Translate switch position changes into normal button presses - URL:=https://github.com/jefferyto/openwrt-slide-switch -endef - -define Package/slide-switch/description -slide-switch translates slide switch position changes into normal button -presses and releases for OpenWrt / LEDE devices. -endef - -CONFIGURE_ARGS += --with-platform=$(BOARD) - -define Package/slide-switch/install - $(INSTALL_DIR) $(1)/etc/hotplug.d/button - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/hotplug.d/button/50-slide-switch $(1)/etc/hotplug.d/button - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/init.d/zzz-slide-switch $(1)/etc/init.d - if [ -d $(PKG_INSTALL_DIR)/usr/lib/slide-switch ]; then \ - $(INSTALL_DIR) $(1)/usr/lib/slide-switch; \ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/slide-switch/* $(1)/usr/lib/slide-switch; \ - fi - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/slide-switch $(1)/usr/sbin - $(INSTALL_DIR) $(1)/usr/share/slide-switch - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/slide-switch/functions.sh $(1)/usr/share/slide-switch -endef - -$(eval $(call BuildPackage,slide-switch)) diff --git a/utils/smartmontools/Makefile b/utils/smartmontools/Makefile deleted file mode 100644 index 88d6840..0000000 --- a/utils/smartmontools/Makefile +++ /dev/null @@ -1,91 +0,0 @@ -# -# Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/uclibc++.mk - -PKG_NAME:=smartmontools -PKG_VERSION:=6.5 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/smartmontools -PKG_MD5SUM:=093aeec3f8f39fa9a37593c4012d3156 -PKG_MAINTAINER:=Maxim Storchak -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/smartmontools/Default - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=$(CXX_DEPENDS) - TITLE:=S.M.A.R.T Monitoring - URL:=http://smartmontools.sourceforge.net/ -endef - -define Package/smartmontools - $(call Package/smartmontools/Default) - TITLE+= Tool -endef - -define Package/smartmontools/description - smartmontools contains utility programs (smartctl) to - control/monitor storage systems using the Self-Monitoring, Analysis - and Reporting Technology System (S.M.A.R.T.) built into most modern - ATA and SCSI disks. It is derived from smartsuite. -endef - -define Package/smartd - $(call Package/smartmontools/Default) - TITLE+= Daemon -endef - -define Package/smartd/description - smartmontools contains utility programs (smartd) to - control/monitor storage systems using the Self-Monitoring, Analysis - and Reporting Technology System (S.M.A.R.T.) built into most modern - ATA and SCSI disks. It is derived from smartsuite. -endef - -# uses GNU configure - -CONFIGURE_VARS += \ - CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ - CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(LINUX_DIR)/include" \ - LDFLAGS="$$$$LDFLAGS" \ - LIBS="-nodefaultlibs -lc -luClibc++ -lm $(LIBGCC_S) -lc" \ - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - BUILD_INFO='"(localbuild)"' \ - LD="$(TARGET_CXX)" -endef - -define Package/smartmontools/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartctl $(1)/usr/sbin/ -endef - -define Package/smartd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/smartd $(1)/usr/sbin/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) ./files/smartd.conf $(1)/etc/ - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/smartd.init $(1)/etc/init.d/smartd -endef - -define Package/smartd/conffiles -/etc/smartd.conf -endef - -$(eval $(call BuildPackage,smartmontools)) -$(eval $(call BuildPackage,smartd)) diff --git a/utils/smartmontools/files/smartd.conf b/utils/smartmontools/files/smartd.conf deleted file mode 100644 index 0740fcf..0000000 --- a/utils/smartmontools/files/smartd.conf +++ /dev/null @@ -1 +0,0 @@ -/dev/hdb -H diff --git a/utils/smartmontools/files/smartd.init b/utils/smartmontools/files/smartd.init deleted file mode 100644 index f1453f2..0000000 --- a/utils/smartmontools/files/smartd.init +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org - -START=95 - -start() { - service_start /usr/sbin/smartd -q never -} - -stop() { - service_stop /usr/sbin/smartd -} - -reload() { - service_reload /usr/sbin/smartd -} diff --git a/utils/smstools3/Makefile b/utils/smstools3/Makefile deleted file mode 100644 index 9df7698..0000000 --- a/utils/smstools3/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=smstools3 -PKG_VERSION:=3.1.15 -PKG_RELEASE:=3 - -PKG_MAINTAINER:=Gérald Kerma -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_PARALLEL:=0 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://smstools3.kekekasvi.com/packages/ -PKG_MD5SUM:=0241ef60e646fac1a06254a848e61ed7 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk - -define Package/smstools3 - SECTION:=utils - CATEGORY:=Utilities - TITLE:=SMS Server Tools 3 - DEPENDS:=$(ICONV_DEPENDS) - URL:=http://smstools3.kekekasvi.com/ -endef - -define Package/smstools3/description - The SMS Server Tools 3 is a SMS Gateway software which can send and receive - short messages through GSM modems and mobile phones. -endef - -TARGET_CFLAGS += -D NUMBER_OF_MODEMS=1 -TARGET_CFLAGS += $(if $(ICONV_FULL),-D USE_ICONV) -TARGET_CFLAGS += -D DISABLE_INET_SOCKET -TARGET_CFLAGS += -W -Wall -TARGET_CFLAGS += -D_FILE_OFFSET_BITS=64 - -MAKE_VARS += LFLAGS="$(TARGET_LDFLAGS) $(if $(ICONV_FULL),-liconv)" - -BINDIR=/usr/local/bin - -define Package/smstools3/configure -endef - -define Package/smstools3/install - $(INSTALL_DIR) $(1)/$(BINDIR) - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smsd $(1)/$(BINDIR)/smsd - $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/sendsms $(1)/$(BINDIR)/sendsms - $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/sms2html $(1)/$(BINDIR)/sms2html - $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/sms2unicode $(1)/$(BINDIR)/sms2unicode - $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/unicode2sms $(1)/$(BINDIR)/unicode2sms - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_DATA) -m 0755 ./files/smstools3.init $(1)/etc/init.d/smstools3 - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DATA) -m 0755 ./files/smstools3.conf $(1)/etc/smsd.conf -endef - -$(eval $(call BuildPackage,smstools3)) diff --git a/utils/smstools3/files/smstools3.conf b/utils/smstools3/files/smstools3.conf deleted file mode 100644 index c8732e3..0000000 --- a/utils/smstools3/files/smstools3.conf +++ /dev/null @@ -1,20 +0,0 @@ -# -# Description: Main configuration file for the smsd -# - -devices = GSM1 -incoming = /var/spool/sms/incoming -outgoing = /var/spool/sms/outgoing -checked = /var/spool/sms/checked -failed = /var/spool/sms/failed -sent = /var/spool/sms/sent -receive_before_send = no -autosplit = 3 - -[GSM1] -init = AT+CPMS="ME","ME","ME" -device = /dev/ttyUSB0 -incoming = yes -pin = 0000 -baudrate = 9600 - diff --git a/utils/smstools3/files/smstools3.init b/utils/smstools3/files/smstools3.init deleted file mode 100644 index 6598795..0000000 --- a/utils/smstools3/files/smstools3.init +++ /dev/null @@ -1,152 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2014 OpenWrt.org -# smsd initscript openwrt mod - -START=99 -STOP=99 - -EXTRA_COMMANDS="status" -EXTRA_HELP=" status View pid and service status " - -# Set USER and GROUP, if necessary: -USER="" -GROUP="" - -# If an unpriviledged user is selected, make sure that next two -# files are writable by that user: -PIDFILE="/var/run/smsd.pid" -INFOFILE="/var/run/smsd.working" -# Logfile can also be defined in here: -LOGFILE="/var/log/smsd.log" - -DAEMON=/usr/local/bin/smsd -# A program which turns power off for couple of seconds: -RESETMODEMS=/usr/local/bin/smsd_resetmodems -NAME=smsd -PSOPT="" - -# Set/edit this before starting service !!!!! -WRT_SPOOL=/var/spool - -# Maximum time to stop smsd, after that it gets killed hardly: -MAXWAIT=45 - -boot() { - start -} - -start() { - test -x $DAEMON || exit 0 - - echo "Creating minimum spool directories" - mkdir -p $WRT_SPOOL - mkdir -p $WRT_SPOOL/sms - mkdir -p $WRT_SPOOL/sms/incoming - mkdir -p $WRT_SPOOL/sms/outgoing - mkdir -p $WRT_SPOOL/sms/checked - mkdir -p $WRT_SPOOL/sms/failed - mkdir -p $WRT_SPOOL/sms/sent - - echo -n "Starting SMS Daemon: " - MSG="." - ARGS="-n MAINPROCESS -p$PIDFILE -i$INFOFILE" - [ "x$USER" != x ] && ARGS="$ARGS -u$USER" - [ "x$GROUP" != x ] && ARGS="$ARGS -g$GROUP" - [ "x$LOGFILE" != x ] && ARGS="$ARGS -l$LOGFILE" - PID=`cat $PIDFILE 2>/dev/null` - if [ "x$PID" != x ]; then - if kill -0 $PID 2>/dev/null; then - MSG=" already running ($PID)." - else - PID="" - fi - fi - if [ "x$PID" = x ]; then - if ps $PSOPT | grep $NAME | grep -v grep >/dev/null; then - MSG=" already running." - else - $DAEMON $ARGS - sleep 1 - PIDS=`ps $PSOPT | grep $NAME | grep -v grep` - [ "x$PIDS" = x ] && MSG=" failed." - fi - fi - echo "$NAME$MSG" -} - -stop() { - if ps $PSOPT | grep $NAME | grep -v grep >/dev/null; then - PID=`cat $PIDFILE 2>/dev/null` - if [ "x$PID" != x ]; then - P=`kill -0 $PID 2>/dev/null` - [ "x$P" != x ] && PID="" - fi - if [ "x$PID" != x ]; then - kill $PID - else - kill `ps $PSOPT | grep $NAME | grep -v grep | awk '{print $1}'` >/dev/null 2>&1 - fi - sleep 1 - if ps $PSOPT | grep $NAME | grep -v grep >/dev/null; then - echo "Allowing $NAME to terminate gracefully within $MAXWAIT seconds" - infofound=0 - dots=0 - seconds=0 - while ps $PSOPT | grep $NAME | grep -v grep >/dev/null; do - if [ $infofound -lt 1 ]; then - if [ -f $INFOFILE ]; then - infofound=1 - if [ $dots -gt 0 ]; then - echo "" - dots=0 - fi - $ECHO -n "$NAME is currently " - cat $INFOFILE - echo "Time counting is now disabled and we will wait until this job is complete." - fi - fi - [ $infofound -lt 1 ] && seconds=`expr $seconds + 1` - echo -n "." - dots=`expr $dots + 1` - if [ "$seconds" -ge $MAXWAIT ]; then - if [ $dots -gt 0 ]; then - echo "" - dots=0 - fi - echo "Timeout occurred, killing $NAME hardly." - kill -9 `ps $PSOPT | grep $NAME | grep -v grep | awk '{print $1}'` >/dev/null 2>&1 - [ -f $PIDFILE ] && rm $PIDFILE - seconds=0 - fi - sleep 1 - done - [ $dots -gt 0 ] && echo "" - #echo "$NAME is stopped." - fi - fi -} - -restart() { - stop - start -} - - -status() { - PID=$(cat $PIDFILE) - - test -e $PIDFILE - if [ $? == 0 ]; then - echo $NAME " running! pid $PID" - else - echo $NAME " not running !!!" - fi -} - -reset() { - $0 stop - [ -f "$RESETMODEMS" ] && "$RESETMODEMS" - sleep 30 - $0 start -} - diff --git a/utils/smstools3/patches/001-smsd.patch b/utils/smstools3/patches/001-smsd.patch deleted file mode 100644 index 6761661..0000000 --- a/utils/smstools3/patches/001-smsd.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/smsd.c 2010-09-21 13:47:48.000000000 +0300 -+++ b/src/smsd.c 2013-03-05 05:26:26.000000000 +0300 -@@ -5200,8 +5200,8 @@ - int result = 1; - char *cmd; - char *p; -- char answer[500]; -- char buffer[600]; -+ char answer[1024]; -+ char buffer[1024]; - int fd; - int log_retry = 3; - int i; diff --git a/utils/smstools3/patches/002-Makefile.patch b/utils/smstools3/patches/002-Makefile.patch deleted file mode 100644 index 1e5630f..0000000 --- a/utils/smstools3/patches/002-Makefile.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/Makefile -+++ b/src/Makefile -@@ -1,7 +1,7 @@ - # In case of windows, use os_cygwin=yes setting in the configuration file (smsd.conf). - - # Select your setup size: --CFLAGS = -D NUMBER_OF_MODEMS=64 -+CFLAGS ?= -D NUMBER_OF_MODEMS=64 - - # Uncomment for Solaris - # CFLAGS += -D SOLARIS -@@ -43,7 +43,7 @@ smsd: smsd.c extras.o locking.o cfgfile. - - ifneq (,$(findstring SOLARIS,$(CFLAGS))) - ifeq (,$(findstring DISABLE_INET_SOCKET,$(CFLAGS))) --override LFLAGS += -lsocket -lnsl -+ override LFLAGS += -lsocket -lnsl - endif - endif - diff --git a/utils/sockread/Makefile b/utils/sockread/Makefile deleted file mode 100644 index d3c15d4..0000000 --- a/utils/sockread/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# -# This software is licensed under the CC0-1.0 license. -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=sockread -PKG_VERSION:=1.0 -PKG_RELEASE:=1 -PKG_LICENSE:=CC0-1.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/sockread - SECTION:=utils - CATEGORY:=Utilities - TITLE:=sockread - MAINTAINER:=Moritz Warning -endef - -define Package/sockread/description - sockread writes and reads data from a Unix domain socket - represented as a special file on the file system. -endef - -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) - $(CP) ./src/* $(PKG_BUILD_DIR)/ -endef - -define Package/sockread/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/sockread $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,sockread)) diff --git a/utils/sockread/src/Makefile b/utils/sockread/src/Makefile deleted file mode 100644 index fe4f8a7..0000000 --- a/utils/sockread/src/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -CC ?= gcc -CFLAGS ?= -O2 -Wall -pedantic -CFLAGS += -std=gnu99 - -.PHONY: clean - -sockread: - $(CC) $(CFLAGS) main.c -o sockread - -clean: - rm -f sockread diff --git a/utils/sockread/src/main.c b/utils/sockread/src/main.c deleted file mode 100644 index 06c21de..0000000 --- a/utils/sockread/src/main.c +++ /dev/null @@ -1,63 +0,0 @@ - -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char *argv[]) { - char buf[1024]; - ssize_t r; - - if (argc != 2) { - fprintf(stderr, "Write to and read from a Unix domain socket.\n\nUsage: %s \n", argv[0]); - return 1; - } - - size_t addrlen = strlen(argv[1]); - - /* Allocate enough space for arbitrary-length paths */ - char addrbuf[offsetof(struct sockaddr_un, sun_path) + addrlen + 1]; - memset(addrbuf, 0, sizeof(addrbuf)); - - struct sockaddr_un *addr = (struct sockaddr_un *)addrbuf; - addr->sun_family = AF_UNIX; - memcpy(addr->sun_path, argv[1], addrlen+1); - - int fd = socket(AF_UNIX, SOCK_STREAM, 0); - if (fd < 0) { - fprintf(stderr, "Failed to create socket: %s\n", strerror(errno)); - return 1; - } - - if (connect(fd, (struct sockaddr*)addr, sizeof(addrbuf)) < 0) { - fprintf(stderr, "Can't connect to `%s': %s\n", argv[1], strerror(errno)); - return 1; - } - - /* Check if stdin refers to a terminal */ - if (!isatty(fileno(stdin))) { - /* Read from stdin and write to socket */ - while (0 < (r = fread(buf, 1, sizeof(buf), stdin))) { - send(fd, buf, r, 0); - } - } - - /* Read from socket and write to stdout */ - while (1) { - r = recv(fd, buf, sizeof(buf), 0); - if (r < 0) { - fprintf(stderr, "read: %s\n", strerror(errno)); - return 1; - } - - if (r == 0) - return 0; - - fwrite(buf, r, 1, stdout); - } - - return 0; -} diff --git a/utils/spi-tools/Makefile b/utils/spi-tools/Makefile deleted file mode 100644 index ca4da88..0000000 --- a/utils/spi-tools/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2014-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=spi-tools -PKG_VERSION:=1 - -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/cpb-/spi-tools.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=cc6a41fdcec60610703ba6db488c621c64952898 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_MAINTAINER:=John Crispin - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:= - -include $(INCLUDE_DIR)/package.mk - -define Package/spi-tools - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Command line SPI tools -endef - -EXTRA_CFLAGS+=-DVERSION=\"$(PKG_SOURCE_VERSION)\" - -define Build/Compile - cd $(PKG_BUILD_DIR) ; \ - $(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -Wall -Werror -o spi-config src/spi-config.c ; \ - $(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -Wall -Werror -o spi-pipe src/spi-pipe.c -endef - -define Package/spi-tools/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/spi-config $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/spi-pipe $(1)/usr/bin -endef - -$(eval $(call BuildPackage,spi-tools)) diff --git a/utils/squashfs-tools/Config.in b/utils/squashfs-tools/Config.in deleted file mode 100644 index eae3ae1..0000000 --- a/utils/squashfs-tools/Config.in +++ /dev/null @@ -1,17 +0,0 @@ -config SQUASHFS_TOOLS_LZO_SUPPORT - depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs - bool "Enable LZO support" - select PACKAGE_liblzo - default n - -config SQUASHFS_TOOLS_LZ4_SUPPORT - depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs - bool "Enable LZ4 support" - select PACKAGE_liblz4 - default n - -config SQUASHFS_TOOLS_XZ_SUPPORT - depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs - bool "Enable XZ support" - select PACKAGE_liblzma - default n diff --git a/utils/squashfs-tools/Makefile b/utils/squashfs-tools/Makefile deleted file mode 100644 index b904fa4..0000000 --- a/utils/squashfs-tools/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# -# Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=squashfs-tools -PKG_VERSION:=4.3 -PKG_RELEASE:=3 -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=9c1db6d13a51a2e009f0027ef336ce03624eac0d -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_BUILD_PARALLEL:=1 -include $(INCLUDE_DIR)/package.mk - -define Package/squashfs-tools/Default - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Filesystem - TITLE:=squashfs-tools - URL:=https://github.com/plougher/squashfs-tools - DEPENDS += +libpthread +zlib \ - +SQUASHFS_TOOLS_LZO_SUPPORT:liblzo \ - +SQUASHFS_TOOLS_LZ4_SUPPORT:liblz4 \ - +SQUASHFS_TOOLS_XZ_SUPPORT:liblzma - MAINTAINER:=Alexandru Ardelean -endef - -define Package/squashfs-tools-mksquashfs - $(call Package/squashfs-tools/Default) - TITLE+= mksquashfs -endef - -define Package/squashfs-tools-unsquashfs - $(call Package/squashfs-tools/Default) - TITLE+= unsquashfs -endef - -define Package/squashfs-tools-unsquashfs/config - source "$(SOURCE)/Config.in" -endef - -Build/Configure:= - -MAKE_FLAGS += \ - XATTR_SUPPORT= - -ifneq ($(CONFIG_SQUASHFS_TOOLS_XZ_SUPPORT),) -MAKE_FLAGS += XZ_SUPPORT=1 -endif - -ifneq ($(CONFIG_SQUASHFS_TOOLS_LZO_SUPPORT),) -MAKE_FLAGS += LZO_SUPPORT=1 -endif - -ifneq ($(CONFIG_SQUASHFS_TOOLS_LZ4_SUPPORT),) -MAKE_FLAGS += LZ4_SUPPORT=1 -endif - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/squashfs-tools \ - CC="$(TARGET_CC)" \ - $(MAKE_FLAGS) \ - mksquashfs unsquashfs -endef - -define Package/squashfs-tools-mksquashfs/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs $(1)/usr/sbin/mksquashfs -endef - -define Package/squashfs-tools-unsquashfs/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/unsquashfs $(1)/usr/sbin/unsquashfs -endef - -$(eval $(call BuildPackage,squashfs-tools-mksquashfs)) -$(eval $(call BuildPackage,squashfs-tools-unsquashfs)) diff --git a/utils/squashfs-tools/patches/0001-squashfs-tools-fix-fnmatch.h-compatibility-with-musl.patch b/utils/squashfs-tools/patches/0001-squashfs-tools-fix-fnmatch.h-compatibility-with-musl.patch deleted file mode 100644 index 5bfd28d..0000000 --- a/utils/squashfs-tools/patches/0001-squashfs-tools-fix-fnmatch.h-compatibility-with-musl.patch +++ /dev/null @@ -1,120 +0,0 @@ -From a0c129760ca9bdc7e564ae2a508fac3799f9d39b Mon Sep 17 00:00:00 2001 -From: Alexandru Ardelean -Date: Wed, 6 Jan 2016 15:33:43 +0200 -Subject: [PATCH 1/2] squashfs-tools: with fnmatch.h compatibility with musl - -Signed-off-by: Alexandru Ardelean ---- - squashfs-tools/action.c | 2 +- - squashfs-tools/fnmatch_compat.h | 32 ++++++++++++++++++++++++++++++++ - squashfs-tools/mksquashfs.c | 2 +- - squashfs-tools/unsquashfs.c | 1 + - squashfs-tools/unsquashfs.h | 1 - - 5 files changed, 35 insertions(+), 3 deletions(-) - create mode 100644 squashfs-tools/fnmatch_compat.h - -diff --git a/squashfs-tools/action.c b/squashfs-tools/action.c -index 35889a4..4b06ccb 100644 ---- a/squashfs-tools/action.c -+++ b/squashfs-tools/action.c -@@ -31,7 +31,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -43,6 +42,7 @@ - #include "mksquashfs.h" - #include "action.h" - #include "error.h" -+#include "fnmatch_compat.h" - - /* - * code to parse actions -diff --git a/squashfs-tools/fnmatch_compat.h b/squashfs-tools/fnmatch_compat.h -new file mode 100644 -index 0000000..7b4afd8 ---- /dev/null -+++ b/squashfs-tools/fnmatch_compat.h -@@ -0,0 +1,32 @@ -+#ifndef FNMATCH_COMPAT -+#define FNMATCH_COMPAT -+/* -+ * Squashfs -+ * -+ * Copyright (c) 2015 -+ * Phillip Lougher -+ * -+ * 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, -+ * 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ * -+ * fnmatch_compat.h -+ */ -+ -+#include -+ -+#ifndef FNM_EXTMATCH -+#define FNM_EXTMATCH 0 -+#endif -+ -+#endif -diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c -index d221c35..4e7cbdd 100644 ---- a/squashfs-tools/mksquashfs.c -+++ b/squashfs-tools/mksquashfs.c -@@ -46,7 +46,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -76,6 +75,7 @@ - #include "read_fs.h" - #include "restore.h" - #include "process_fragments.h" -+#include "fnmatch_compat.h" - - int delete = FALSE; - int fd; -diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c -index 1323dd6..2428baa 100644 ---- a/squashfs-tools/unsquashfs.c -+++ b/squashfs-tools/unsquashfs.c -@@ -30,6 +30,7 @@ - #include "xattr.h" - #include "unsquashfs_info.h" - #include "stdarg.h" -+#include "fnmatch_compat.h" - - #include - #include -diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h -index ecd0bb4..0edbd25 100644 ---- a/squashfs-tools/unsquashfs.h -+++ b/squashfs-tools/unsquashfs.h -@@ -40,7 +40,6 @@ - #include - #include - #include --#include - #include - #include - #include --- -2.1.4 - diff --git a/utils/squashfs-tools/patches/0002-pseudo.c-add-explicit-stat.h-include.patch b/utils/squashfs-tools/patches/0002-pseudo.c-add-explicit-stat.h-include.patch deleted file mode 100644 index 8f10211..0000000 --- a/utils/squashfs-tools/patches/0002-pseudo.c-add-explicit-stat.h-include.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0ea07a1b5ddb2f2fa1358b2c1b42bcf34bbf5ee2 Mon Sep 17 00:00:00 2001 -From: Alexandru Ardelean -Date: Wed, 6 Jan 2016 15:36:48 +0200 -Subject: [PATCH 2/2] pseudo.c: add explicit include - -Signed-off-by: Alexandru Ardelean ---- - squashfs-tools/pseudo.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/squashfs-tools/pseudo.c b/squashfs-tools/pseudo.c -index f85fe60..7a26bca 100644 ---- a/squashfs-tools/pseudo.c -+++ b/squashfs-tools/pseudo.c -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - #include - - #include "pseudo.h" --- -2.1.4 - diff --git a/utils/squashfs-tools/patches/0003-mksquashfs.c-get-inline-functions-work-with-C99.patch b/utils/squashfs-tools/patches/0003-mksquashfs.c-get-inline-functions-work-with-C99.patch deleted file mode 100644 index a5bab05..0000000 --- a/utils/squashfs-tools/patches/0003-mksquashfs.c-get-inline-functions-work-with-C99.patch +++ /dev/null @@ -1,154 +0,0 @@ -From ac6268e843c43286eebff2a1052182c2393cdb2e Mon Sep 17 00:00:00 2001 -From: Roy Li -Date: Mon, 14 Sep 2015 12:31:42 +0800 -Subject: [PATCH] mksquashfs.c: get inline functions work with both gnu11 and gnu89 - -Upstream-Status: Pending - -After gcc upgraded to gcc5, and if the codes is compiled without optimization(-O0), -and the below error will happen: - -| mksquashfs.o: In function `create_inode': -| git/squashfs-tools/mksquashfs.c:897: undefined reference to `get_inode_no' -| git/squashfs-tools/mksquashfs.c:960: undefined reference to `get_parent_no' -| git/squashfs-tools/mksquashfs.c:983: undefined reference to `get_parent_no' -| mksquashfs.o: In function `reader_read_process': -| git/squashfs-tools/mksquashfs.c:2132: undefined reference to `is_fragment' -| mksquashfs.o: In function `reader_read_file': -| git/squashfs-tools/mksquashfs.c:2228: undefined reference to `is_fragment' -| mksquashfs.o: In function `dir_scan': -| git/squashfs-tools/mksquashfs.c:3101: undefined reference to `create_dir_entry' - -gcc5 defaults to -std=gnu11 instead of -std=gnu89, and it requires that exactly one C -source file has the callable copy of the inline function. Consider the following -program: - - inline int - foo (void) - { - return 42; - } - - int - main (void) - { - return foo (); - } - -The program above will not link with the C99 inline semantics, because no out-of-line -function foo is generated. To fix this, either mark the function foo as static, or -add the following declaration: - static inline int foo (void); - -more information refer to: https://gcc.gnu.org/gcc-5/porting_to.html; - -but the use of "extern inline" will lead to the compilation issue if gcc is not -gcc5, as the commit in oe-core d0af30c92fde [alsa-lib: Change function type to -"static __inline__"] - "extern __inline__ function()" is the inlined version that - can be used in this compilation unit, but there will be another - definition of this function somewhere, so compiler will not emit - any code for the function body. This causes problem in -O0, - where functions are never inlined, the function call is preserved, - but linker can't find the symbol, thus the error happens. - -so replace "inline" with "static inline" to make it work with both gnu11 and gnu89 - -Signed-off-by: Roy Li ---- - squashfs-tools/mksquashfs.c | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c -index d221c35..6bba1d2 100644 ---- a/squashfs-tools/mksquashfs.c -+++ b/squashfs-tools/mksquashfs.c -@@ -828,13 +828,13 @@ char *subpathname(struct dir_ent *dir_ent) - } - - --inline unsigned int get_inode_no(struct inode_info *inode) -+static inline unsigned int get_inode_no(struct inode_info *inode) - { - return inode->inode_number; - } - - --inline unsigned int get_parent_no(struct dir_info *dir) -+static inline unsigned int get_parent_no(struct dir_info *dir) - { - return dir->depth ? get_inode_no(dir->dir_ent->inode) : inode_no; - } -@@ -2027,7 +2027,7 @@ struct file_info *duplicate(long long file_size, long long bytes, - } - - --inline int is_fragment(struct inode_info *inode) -+static inline int is_fragment(struct inode_info *inode) - { - off_t file_size = inode->buf.st_size; - -@@ -2996,13 +2996,13 @@ struct inode_info *lookup_inode2(struct stat *buf, int pseudo, int id) - } - - --inline struct inode_info *lookup_inode(struct stat *buf) -+static inline struct inode_info *lookup_inode(struct stat *buf) - { - return lookup_inode2(buf, 0, 0); - } - - --inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this) -+static inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this) - { - if (inode->inode_number == 0) { - inode->inode_number = use_this ? : inode_no ++; -@@ -3013,7 +3013,7 @@ inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this) - } - - --inline struct dir_ent *create_dir_entry(char *name, char *source_name, -+static inline struct dir_ent *create_dir_entry(char *name, char *source_name, - char *nonstandard_pathname, struct dir_info *dir) - { - struct dir_ent *dir_ent = malloc(sizeof(struct dir_ent)); -@@ -3031,7 +3031,7 @@ inline struct dir_ent *create_dir_entry(char *name, char *source_name, - } - - --inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir, -+static inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir, - struct inode_info *inode_info) - { - struct dir_info *dir = dir_ent->our_dir; -@@ -3047,7 +3047,7 @@ inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir, - } - - --inline void add_dir_entry2(char *name, char *source_name, -+static inline void add_dir_entry2(char *name, char *source_name, - char *nonstandard_pathname, struct dir_info *sub_dir, - struct inode_info *inode_info, struct dir_info *dir) - { -@@ -3059,7 +3059,7 @@ inline void add_dir_entry2(char *name, char *source_name, - } - - --inline void free_dir_entry(struct dir_ent *dir_ent) -+static inline void free_dir_entry(struct dir_ent *dir_ent) - { - if(dir_ent->name) - free(dir_ent->name); -@@ -3080,7 +3080,7 @@ inline void free_dir_entry(struct dir_ent *dir_ent) - } - - --inline void add_excluded(struct dir_info *dir) -+static inline void add_excluded(struct dir_info *dir) - { - dir->excluded ++; - } --- -1.9.1 - diff --git a/utils/stm32flash/Makefile b/utils/stm32flash/Makefile deleted file mode 100644 index 6ceb87a..0000000 --- a/utils/stm32flash/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (C) 2012-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=stm32flash -PKG_VERSION:=0.4 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://releases.stm32flash.googlecode.com/git -PKG_MD5SUM:=ec9b5c8bae67f9a489786546d088bd14 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) -PKG_MAINTAINER:=Christian Pointner -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=gpl-2.0.txt -include $(INCLUDE_DIR)/package.mk - -define Package/stm32flash - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Microcontroller programming - URL:=http://code.google.com/p/stm32flash/ - TITLE:=Firmware flash tool for STM32's serial bootloader -endef - -define Package/stm32flash/description - This tool can be used to burn firmware images to STM32 ARM processors - using the built-in serial bootloader. -endef - -define Package/stm32flash/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/stm32flash $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,stm32flash)) diff --git a/utils/stoken/Makefile b/utils/stoken/Makefile deleted file mode 100644 index 1dc828c..0000000 --- a/utils/stoken/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=stoken -PKG_VERSION:=0.8 -PKG_REV:=c4d79ffbf5053e44be4b64da22b1b7fb6a51daf2 -PKG_RELEASE:=2 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/cernekee/stoken.git - -PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_MAINTAINER:=Florian Fainelli -PKG_LICENSE:=LGPL-2.1 -PKG_INSTALL:=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) - -PKG_FIXUP:=autoreconf - -include $(INCLUDE_DIR)/package.mk - -define Package/stoken/Default - TITLE:=stoken is a tokencode generator compatible with RSA SecurID 128-bit (AES) - URL:=http://sourceforge.net/p/stoken/ - DEPENDS:= +libxml2 +libnettle -endef - -define Package/stoken - $(call Package/stoken/Default) - SECTION:=utils - CATEGORY:=Utilities - SUBMENU:=Encryption - DEPENDS:=+libstoken - MENU:=1 -endef - -define Package/stoken/description - stoken is a tokencode generator compatible with RSA SecurID 128-bit (AES). This package contains the cli -endef - -define Package/libstoken - $(call Package/stoken/Default) - SECTION:=libs - CATEGORY:=Libraries -endef - -CONFIGURE_ARGS += \ - --with-nettle - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libstoken*.{la,a,so*} $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/stoken.pc \ - $(1)/usr/lib/pkgconfig/ -endef - -define Package/stoken/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stoken $(1)/usr/bin/ -endef - -define Package/libstoken/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libstoken*.so* $(1)/usr/lib -endef - -$(eval $(call BuildPackage,stoken)) -$(eval $(call BuildPackage,libstoken)) diff --git a/utils/stress/Makefile b/utils/stress/Makefile deleted file mode 100644 index c1fbce3..0000000 --- a/utils/stress/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright (C) 2006-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=stress -PKG_VERSION:=1.0.4 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://people.seas.harvard.edu/~apw/stress/ -PKG_MD5SUM:=a607afa695a511765b40993a64c6e2f4 - -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/stress - SECTION:=utils - CATEGORY:=Utilities - TITLE:=stress is a simple stress utility - URL:=http://people.seas.harvard.edu/~apw/stress/ - MAINTAINER:=Alexandru Ardelean -endef - -define Package/stress/description -stress is a simple tool that imposes certain types of compute \ stress on -UNIX-like operating systems. -endef - -CONFIGURE_ARGS += \ - --prefix="/usr" - -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS)" - -define Package/stress/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stress $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,stress)) diff --git a/utils/sumo/Makefile b/utils/sumo/Makefile deleted file mode 100644 index 799d225..0000000 --- a/utils/sumo/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (C) 2015-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sumo -PKG_VERSION:=0.27.1 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-src-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/sumo -PKG_MD5SUM:=0bb98ab7339aea15b14b633e1b74691f -PKG_MAINTAINER:=Álvaro Fernández Rojas - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING - -PKG_BUILD_PARALLEL:=1 -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -CONFIGURE_ARGS += \ - --with-xerces=$(STAGING_DIR)/usr \ - --disable-debug \ - --disable-dependency-tracking \ - --disable-silent-rules - -TARGET_CXXFLAGS+=-fpermissive - -define Package/sumo - SECTION:=utils - CATEGORY:=Utilities - TITLE:=SUMO - Simulation of Urban MObility - URL:=http://sumo-sim.org/ - DEPENDS:=+libstdcpp +libxerces-c -endef - -define Package/sumo/description - SUMO is a free and open traffic simulation suite which is available since 2001. - SUMO allows modelling of intermodal traffic systems including road vehicles, - public transport and pedestrians. Included with SUMO is a wealth of supporting - tools which handle tasks such as route finding, visualization, network import - and emission calculation. SUMO can be enhanced with custom models and provides - various APIs to remotely control the simulation. -endef - -define Package/sumo/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{activitygen,dfrouter,duarouter,emissionsDrivingCycle,emissionsMap,jtrrouter,marouter,netconvert,netgenerate,od2trips,polyconvert,TraCITestClient} $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sumo $(1)/usr/bin/sumo-bin - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) files/sumo.sh $(1)/usr/sbin/sumo - $(INSTALL_DIR) $(1)/usr/share/sumo - $(CP) $(PKG_BUILD_DIR)/data $(1)/usr/share/sumo/ -endef - -$(eval $(call BuildPackage,sumo)) diff --git a/utils/sumo/files/sumo.sh b/utils/sumo/files/sumo.sh deleted file mode 100644 index 0f0af4d..0000000 --- a/utils/sumo/files/sumo.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# Copyright (C) 2015 OpenWrt.org - -SUMO_HOME=/usr/share/sumo sumo-bin $@ - -exit $? diff --git a/utils/sumo/patches/100-configure_fix.patch b/utils/sumo/patches/100-configure_fix.patch deleted file mode 100644 index b50048d..0000000 --- a/utils/sumo/patches/100-configure_fix.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -117,11 +117,6 @@ dnl - - - - - - - - - - - - - - - - - - - case "$host" in - x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux*) - dnl Make sure we are on architecture that supports SIMD -- if test x$CXX = xclang++; then -- CXXFLAGS="-msse2 $CXXFLAGS" -- else -- CXXFLAGS="-msse2 -mfpmath=sse $CXXFLAGS" -- fi - ;; - *-cygwin*) - AC_DEFINE([HAVE_CYGWIN], [1], [Define if compiling under cygwin]) diff --git a/utils/swig/Makefile b/utils/swig/Makefile deleted file mode 100644 index 977eaf2..0000000 --- a/utils/swig/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk - -PKG_NAME:=swig -PKG_VERSION:=3.0.7 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/$(PKG_NAME) -PKG_MD5SUM:=7fff46c84b8c630ede5b0f0827e3d90a -PKG_INSTALL:=1 - -PKG_MAINTAINER:=John Crispin -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/package.mk - -define Package/swig - SECTION:=libs - CATEGORY:=Libraries - TITLE:=swig binding generator - BUILDONLY:=1 -endef - -HOST_CONFIGURE_ARGS+= \ - --without-pcre - -define Package/swig/description - tool that generates bindings for various languages -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,swig)) diff --git a/utils/sysstat/Makefile b/utils/sysstat/Makefile deleted file mode 100644 index 3e9457b..0000000 --- a/utils/sysstat/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=sysstat -PKG_VERSION:=11.0.4 -PKG_RELEASE:=2 - -PKG_LICENSE:=GPL-2.0 -PKG_MAINTAINER:=Marko Ratkaj - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=http://perso.orange.fr/sebastien.godard/ -PKG_MD5SUM:=df1ed75656eb06320088d54247f0e803 - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/sysstat - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Sysstat performance monitoring tools - URL:=http://pagesperso-orange.fr/sebastien.godard/index.html -endef - -define Package/sysstat/description - The sysstat utilities are a collection of performance monitoring tools for - Linux. These include sar, sadf, mpstat, iostat, pidstat and sa tools. -endef - -define Package/sysstat/conffiles -/etc/sysstat/sysstat.ioconf -/etc/sysstat/sysstat -endef - -CONFIGURE_VARS+= \ - sa_lib_dir="/usr/lib/sysstat" \ - sa_dir="/var/log/sysstat" \ - conf_dir="/etc/sysstat" - -CONFIGURE_ARGS+= \ - --disable-documentation \ - --disable-largefile \ - --disable-sensors \ - --disable-nls - -define Package/sysstat/install - $(INSTALL_DIR) $(1)/usr/lib/sysstat - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/sysstat/{sadc,sa1,sa2} $(1)/usr/lib/sysstat/ - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sar,sadf,iostat,mpstat,pidstat} $(1)/usr/bin/ - $(INSTALL_DIR) $(1)/etc/sysstat - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/sysstat/sysstat.ioconf $(1)/etc/sysstat/ - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) ./files/sysstat.config $(1)/etc/config/sysstat - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/sysstat.init $(1)/etc/init.d/sysstat -endef - -$(eval $(call BuildPackage,sysstat)) diff --git a/utils/sysstat/files/sysstat.config b/utils/sysstat/files/sysstat.config deleted file mode 100644 index 638b379..0000000 --- a/utils/sysstat/files/sysstat.config +++ /dev/null @@ -1,7 +0,0 @@ -config sysstat 'sysstat' - option log_history '7' - option compressafter '10' - option sadc_options '' - option sa_dir '/var/log/sysstat' - option zip 'xz' - option enabled 'true' diff --git a/utils/sysstat/files/sysstat.init b/utils/sysstat/files/sysstat.init deleted file mode 100755 index a819000..0000000 --- a/utils/sysstat/files/sysstat.init +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2015 OpenWrt.org - -START=90 -STOP=10 - -USE_PROCD=1 -PROG=/usr/lib/sysstat/sadc -SYSSTAT_CFG="/etc/sysstat/sysstat" - -validate_sysstat_section() { - uci_validate_section sysstat sysstat "${1}" \ - 'log_history:uinteger' \ - 'compressafter:uinteger' \ - 'sadc_options:string' \ - 'sa_dir:string' \ - 'zip:string' \ - 'enabled:string' -} - -start_service() { - - local log_history compressafter sadc_options sa_dir zip enabled - - validate_sysstat_section sysstat || { - echo "validation failed" - return 1 - } - - [ -d /var/log/sysstat ] || mkdir -p /var/log/sysstat - - echo "HISTORY=$log_history" > $SYSSTAT_CFG - echo "COMPRESSAFTER=$compressafter" >> $SYSSTAT_CFG - echo "SADC_OPTIONS=\"$sadc_options\"" >> $SYSSTAT_CFG - echo "SA_DIR=\"$sa_dir\"" >> $SYSSTAT_CFG - echo "ZIP=\"$zip\"" >> $SYSSTAT_CFG - echo "ENABLED=\"$enabled\"" >> $SYSSTAT_CFG - - procd_open_instance - procd_set_param command $PROG -S DISK -F -L - - procd_set_param file $SYSSTAT_CFG - procd_close_instance -} - -service_triggers() -{ - procd_add_reload_trigger "sysstat" - procd_add_validation validate_sysstat_section -} diff --git a/utils/sysstat/patches/100-musl-compat.patch b/utils/sysstat/patches/100-musl-compat.patch deleted file mode 100644 index 06c7813..0000000 --- a/utils/sysstat/patches/100-musl-compat.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/sa_common.c -+++ b/sa_common.c -@@ -28,6 +28,7 @@ - #include - #include - #include -+#include - #include - #include - ---- a/common.c -+++ b/common.c -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - - #include "version.h" - #include "common.h" ---- a/ioconf.c -+++ b/ioconf.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - - #include "ioconf.h" - #include "common.h" diff --git a/utils/tar/Makefile b/utils/tar/Makefile deleted file mode 100644 index 45befbf..0000000 --- a/utils/tar/Makefile +++ /dev/null @@ -1,108 +0,0 @@ -# -# Copyright (C) 2008-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tar -PKG_VERSION:=1.29 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_MD5SUM:=955cd533955acb1804b83fd70218da51 -PKG_MAINTAINER:=Álvaro Fernández Rojas - -PKG_LICENSE:=GPL-3.0 -PKG_LICENSE_FILES:=COPYING - -PKG_INSTALL:=1 - -PKG_BUILD_DEPENDS:=xz - -include $(INCLUDE_DIR)/package.mk - -define Package/tar - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+PACKAGE_TAR_POSIX_ACL:libacl +PACKAGE_TAR_XATTR:libattr +PACKAGE_TAR_BZIP2:bzip2 - EXTRA_DEPENDS:=$(if $(CONFIG_PACKAGE_TAR_XZ),xz) - TITLE:=GNU tar - URL:=http://www.gnu.org/software/tar/ - MENU:=1 -endef - -define Package/tar/config - if PACKAGE_tar - config PACKAGE_TAR_POSIX_ACL - bool "tar: Enable POSIX ACL support" - default y if USE_FS_ACL_ATTR - default n - - config PACKAGE_TAR_XATTR - bool "tar: Enable extended attribute (xattr) support" - default y if USE_FS_ACL_ATTR - default n - - config PACKAGE_TAR_GZIP - bool "tar: Enable seamless gzip support" - default y - - config PACKAGE_TAR_BZIP2 - bool "tar: Enable seamless bzip2 support" - default y - - config PACKAGE_TAR_XZ - bool "tar: Enable seamless xz support" - select PACKAGE_xz-utils - select PACKAGE_xz - default y - endif -endef - -define Package/tar/description - Tar is a program for packaging a set of files as a - single archive in tar format. -endef - -define Package/tar/postinst -#!/bin/sh -if [ -e $${IPKG_INSTROOT}/bin/tar ]; then - rm -r $${IPKG_INSTROOT}/bin/tar; -fi -ln -sf /usr/bin/tar $${IPKG_INSTROOT}/bin/tar -endef - -define Package/tar/postrm -#!/bin/sh -rm $${IPKG_INSTROOT}/bin/tar -ln -s busybox $${IPKG_INSTROOT}/bin/tar -$${IPKG_INSTROOT}/bin/tar 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/bin/tar -exit 0 -endef - -CONFIGURE_ARGS += \ - $(if $(CONFIG_PACKAGE_TAR_POSIX_ACL),--with,--without)-posix-acls \ - $(if $(CONFIG_PACKAGE_TAR_XATTR),--with,--without)-xattrs \ - $(if $(CONFIG_PACKAGE_TAR_GZIP),--with-gzip=gzip,--without-gzip) \ - $(if $(CONFIG_PACKAGE_TAR_BZIP2),--with-bzip2=bzip2,--without-bzip2) \ - $(if $(CONFIG_PACKAGE_TAR_XZ),--with-xz=xz,--without-xz) \ - --without-compress \ - --without-lzip \ - --without-lzma \ - --without-lzop \ - --without-selinux - -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS)" \ - LDFLAGS="$(TARGET_LDLAGS)" - -define Package/tar/install - $(INSTALL_DIR) $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,tar)) diff --git a/utils/tar/patches/001-CVE-2016-6321.patch b/utils/tar/patches/001-CVE-2016-6321.patch deleted file mode 100644 index 0783473..0000000 --- a/utils/tar/patches/001-CVE-2016-6321.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7340f67b9860ea0531c1450e5aa261c50f67165d Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Sat, 29 Oct 2016 21:04:40 -0700 -Subject: When extracting, skip ".." members - -* src/extract.c (extract_archive): Skip members whose names -contain "..". ---- a/src/extract.c -+++ b/src/extract.c -@@ -1629,12 +1629,20 @@ extract_archive (void) - { - char typeflag; - tar_extractor_t fun; -+ bool skip_dotdot_name; - - fatal_exit_hook = extract_finish; - - set_next_block_after (current_header); - -+ skip_dotdot_name = (!absolute_names_option -+ && contains_dot_dot (current_stat_info.orig_file_name)); -+ if (skip_dotdot_name) -+ ERROR ((0, 0, _("%s: Member name contains '..'"), -+ quotearg_colon (current_stat_info.orig_file_name))); -+ - if (!current_stat_info.file_name[0] -+ || skip_dotdot_name - || (interactive_option - && !confirm ("extract", current_stat_info.file_name))) - { diff --git a/utils/taskwarrior/Makefile b/utils/taskwarrior/Makefile deleted file mode 100644 index a417a45..0000000 --- a/utils/taskwarrior/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=taskwarrior -PKG_VERSION:=2.4.4 -PKG_RELEASE:=1 - -PKG_LICENSE:=MIT - -PKG_SOURCE:=task-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.taskwarrior.org/download/ -PKG_MD5SUM:=517450c4a23a5842df3e9905b38801b3 -PKG_MAINTAINER:=Luka Perkov - -PKG_BUILD_DIR:=$(BUILD_DIR)/task-$(PKG_VERSION) - -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/taskwarrior - TITLE:=taskwarrior - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libstdcpp +libuuid +libgnutls - URL:=http://taskwarrior.org/ -endef - -TARGET_LDFLAGS += -ldl - -define Package/taskwarrior/description - taskwarrior is a command-line todo list manager -endef - -define Package/taskwarrior/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/task $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,taskwarrior)) diff --git a/utils/tcsh/Makefile b/utils/tcsh/Makefile index 7b0d188..4f22824 100644 --- a/utils/tcsh/Makefile +++ b/utils/tcsh/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2011-2016 OpenWrt.org +# Copyright (C) 2011-2017 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tcsh PKG_VERSION:=6.20.00 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= \ @@ -16,7 +16,7 @@ PKG_SOURCE_URL:= \ http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/old/ \ ftp://ftp.astron.com/pub/tcsh/ \ ftp://ftp.astron.com/pub/tcsh/old -PKG_MD5SUM:=59d40ef40a68e790d95e182069431834 +PKG_HASH:=b89de7064ab54dac454a266cfe5d8bf66940cb5ed048d0c30674ea62e7ecef9d PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=Copyright diff --git a/utils/tcsh/patches/001-sysmalloc.patch b/utils/tcsh/patches/001-sysmalloc.patch new file mode 100644 index 0000000..b22c018 --- /dev/null +++ b/utils/tcsh/patches/001-sysmalloc.patch @@ -0,0 +1,15 @@ +--- a/config_f.h ++++ b/config_f.h +@@ -139,11 +139,8 @@ + * This can be much slower and no memory statistics will be + * provided. + */ +-#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined (__CYGWIN__) || defined(__GLIBC__) || defined(__OpenBSD__) || defined(__APPLE__) || defined (__ANDROID__) ++ + # define SYSMALLOC +-#else +-# undef SYSMALLOC +-#endif + + /* + * USE_ACCESS Use access(2) rather than stat(2) when POSIX is defined. diff --git a/utils/tmux/Makefile b/utils/tmux/Makefile index 593a9c0..b46d4c2 100644 --- a/utils/tmux/Makefile +++ b/utils/tmux/Makefile @@ -1,19 +1,13 @@ -# -# Copyright (C) 2009-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk PKG_NAME:=tmux -PKG_VERSION:=2.3 +PKG_VERSION:=2.9a PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/tmux/tmux/releases/download/$(PKG_VERSION) -PKG_MD5SUM:=55313e132f0f42de7e020bf6323a1939ee02ab79c48634aa07475db41573852b +PKG_HASH:=839d167a4517a6bffa6b6074e89a9a8630547b2dea2086f1fad15af12ab23b25 PKG_MAINTAINER:=Maxim Storchak PKG_LICENSE:=ISC @@ -21,6 +15,7 @@ PKG_LICENSE_FILES:=COPYING PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_FIXUP:=autoreconf include $(INCLUDE_DIR)/package.mk @@ -30,16 +25,16 @@ define Package/tmux SUBMENU:=Terminal TITLE:=Terminal multiplexer DEPENDS:=+libncurses +libevent2 +libpthread +librt - URL:=http://tmux.sourceforge.net/ + URL:=http://tmux.github.io/ endef define Package/tmux/description tmux is a modern, BSD-licensed alternative to GNU screen. endef -MAKE_FLAGS += \ - PREFIX="/usr" \ - PLATFORM="linux" +define Package/tmux/conffiles +/etc/tmux.conf +endef define Package/tmux/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/utils/tmux/patches/100-b64_ntop-conflict.patch b/utils/tmux/patches/100-b64_ntop-conflict.patch deleted file mode 100644 index 5afc9b7..0000000 --- a/utils/tmux/patches/100-b64_ntop-conflict.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/compat.h b/compat.h -index 8666a1d..2a44a2b 100644 ---- a/compat.h -+++ b/compat.h -@@ -223,7 +223,9 @@ int daemon(int, int); - #ifndef HAVE_B64_NTOP - /* b64_ntop.c */ - #undef b64_ntop /* for Cygwin */ --int b64_ntop(const char *, size_t, char *, size_t); -+int local_b64_ntop(const char *, size_t, char *, size_t); -+#else -+#define local_b64_ntop b64_ntop - #endif - - #ifndef HAVE_FORKPTY -diff --git a/compat/b64_ntop.c b/compat/b64_ntop.c -index 2b4dc2d..a1314ca 100644 ---- a/compat/b64_ntop.c -+++ b/compat/b64_ntop.c -@@ -122,7 +122,7 @@ static const char Pad64 = '='; - */ - - int --b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) { -+local_b64_ntop(uint8_t const *src, size_t srclength, char *target, size_t targsize) { - size_t datalength = 0; - uint8_t input[3]; - uint8_t output[4]; -diff --git a/tty.c b/tty.c -index 7be952c..06dedab 100644 ---- a/tty.c -+++ b/tty.c -@@ -1134,7 +1134,7 @@ tty_cmd_setselection(struct tty *tty, const struct tty_ctx *ctx) - off = 4 * ((ctx->num + 2) / 3) + 1; /* storage for base64 */ - buf = xmalloc(off); - -- b64_ntop(ctx->ptr, ctx->num, buf, off); -+ local_b64_ntop(ctx->ptr, ctx->num, buf, off); - tty_putcode_ptr2(tty, TTYC_MS, "", buf); - - free(buf); diff --git a/utils/tracertools/Makefile b/utils/tracertools/Makefile deleted file mode 100644 index 9a0bc7a..0000000 --- a/utils/tracertools/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2007-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=tracertools -PKG_VERSION:=20160308 -PKG_RELEASE=$(PKG_SOURCE_VERSION) -PKG_MAINTAINER:=Daniel Golle - -PKG_LICENSE:=GPL-3.0 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/dangowrt/tracertools.git -PKG_SOURCE_VERSION:=28d0bb9a10a0b56b4964e3256135cfd152075a59 -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/tracertools - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Tracer MPPT monitoring and control tools -endef - -define Package/tracertools/description - Tools for the Tracer MPPT solar charge controller. -endef - -define Package/tracertools/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/tracerstat $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,tracertools)) diff --git a/utils/triggerhappy/Makefile b/utils/triggerhappy/Makefile deleted file mode 100644 index 97c6e90..0000000 --- a/utils/triggerhappy/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -# Copyright (C) 2014-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=triggerhappy -PKG_VERSION:=0.3.4-151001 -PKG_REV:=7e5abc69f215678e93a6b999524981c8b40bdcd9 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=git://github.com/wertarbyte/triggerhappy -PKG_SOURCE_PROTO:=git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=$(PKG_REV) - -PKG_MAINTAINER:=Ted Hess -PKG_LICENSE:=GPL-3.0+ -PKG_LICENSE_FILES:=COPYING - -include $(INCLUDE_DIR)/package.mk - -define Package/triggerhappy - SECTION:=utils - CATEGORY:=Utilities - TITLE:=handle input events and run configured programs - URL:=http://github.com/wertarbyte/triggerhappy -endef - -define Package/triggerhappy/description - triggerhappy - handle input events and run configured programs - The daemon thd can handle hotplugged input devices and is configured through - simple configuration files in /etc/triggerhappy/triggers.d/. -endef - -MAKE_FLAGS += \ - $(TARGET_CONFIGURE_OPTS) \ - $(1) - -define Package/triggerhappy/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_DIR) $(1)/etc/triggerhappy - $(INSTALL_DIR) $(1)/etc/triggerhappy/triggers.d/ - $(INSTALL_DIR) $(1)/etc/hotplug.d/input/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/thd $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/th-cmd $(1)/usr/sbin - $(INSTALL_BIN) ./files/triggerhappy.init $(1)/etc/init.d/triggerhappy - $(INSTALL_BIN) ./files/triggerhappy.hotplug $(1)/etc/hotplug.d/input/10-triggerhappy - $(INSTALL_BIN) ./files/triggerhappy-example.conf $(1)/etc/triggerhappy/triggers.d/example.conf -endef - -$(eval $(call BuildPackage,triggerhappy)) diff --git a/utils/triggerhappy/files/triggerhappy-example.conf b/utils/triggerhappy/files/triggerhappy-example.conf deleted file mode 100644 index 3a8017a..0000000 --- a/utils/triggerhappy/files/triggerhappy-example.conf +++ /dev/null @@ -1,14 +0,0 @@ -# This is an example configuration for the triggerhappy daemon (thd) -# please note that every file to be processed must end in ".conf" -# -# To view a list of supported event codes, use "thd --listevents" or -# "thd --dump /dev/input/event*" -# -# Format: -# -# -# values for key events are 1 (pressed), 0 (released) or 2 (held) -# -## control an mpd instance -# KEY_NEXTSONG 1 /usr/bin/mpc next -# KEY_PREVSONG 1 /usr/bin/mpc prev diff --git a/utils/triggerhappy/files/triggerhappy.hotplug b/utils/triggerhappy/files/triggerhappy.hotplug deleted file mode 100644 index 78ad349..0000000 --- a/utils/triggerhappy/files/triggerhappy.hotplug +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -THD_SOCKET=/tmp/triggerhappy.socket -[ -S "$THD_SOCKET" ] || exit - -case "$ACTION" in - add) - DEVICE="/dev/$DEVNAME" - [ -c "$DEVICE" ] || exit - # offer device to triggerhappy daemon - /usr/sbin/th-cmd --socket "$THD_SOCKET" --add "$DEVICE" - ;; - remove) - # nothing to do - ;; -esac diff --git a/utils/triggerhappy/files/triggerhappy.init b/utils/triggerhappy/files/triggerhappy.init deleted file mode 100644 index e846d29..0000000 --- a/utils/triggerhappy/files/triggerhappy.init +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh /etc/rc.common -START=93 - -start() { - /usr/sbin/thd --socket /tmp/triggerhappy.socket --triggers /etc/triggerhappy/triggers.d/ --daemon /dev/input/event* -} - -stop() { - /usr/sbin/th-cmd --socket /tmp/triggerhappy.socket --quit -} diff --git a/utils/unzip/Makefile b/utils/unzip/Makefile deleted file mode 100644 index 93a4dcf..0000000 --- a/utils/unzip/Makefile +++ /dev/null @@ -1,74 +0,0 @@ -# -# Copyright (C) 2006-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=unzip -PKG_REV:=60 -PKG_VERSION:=6.0 -PKG_RELEASE:=5 - -PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz -PKG_SOURCE_URL:=@SF/infozip -PKG_MD5SUM:=62b490407489521db863b523a7f86375 -PKG_MAINTAINER:=Álvaro Fernández Rojas - -PKG_LICENSE:=BSD-4-Clause -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/unzip$(PKG_REV) -PKG_CHECK_FORMAT_SECURITY:=0 - -include $(INCLUDE_DIR)/package.mk - -define Package/unzip - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:= - TITLE:=De-archiver for .zip files - URL:=http://infozip.sourceforge.net/UnZip.html - SUBMENU:=Compression -endef - -define Package/unzip/description - InfoZIP's unzip program. With the exception of multi-volume archives - (ie, .ZIP files that are split across several disks using PKZIP's /& option), - this can handle any file produced either by PKZIP, or the corresponding - InfoZIP zip program. -endef - -define Build/Configure -endef - -TARGET_CFLAGS += \ - -DNO_LCHMOD \ - -DLARGE_FILE_SUPPORT \ - -DUNICODE_WCHAR \ - -DUNICODE_SUPPORT \ - -DUTF8_MAYBE_NATIVE \ - -DZIP64_SUPPORT - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile unzips \ - $(TARGET_CONFIGURE_OPTS) \ - prefix="$(PKG_INSTALL_DIR)/usr" \ - CFLAGS="$(TARGET_CFLAGS)" \ - CF="$(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX" \ - CC="$(TARGET_CC)" \ - LD="$(TARGET_CC) $(TARGET_LDFLAGS)" \ - install -endef - -define Package/unzip/install - $(INSTALL_DIR) $(1)/usr/bin/ - $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/bin/{funzip,unzip,unzipsfx,zipgrep} \ - $(1)/usr/bin/ - $(LN) unzip $(1)/usr/bin/zipinfo -endef - -$(eval $(call BuildPackage,unzip)) diff --git a/utils/unzip/patches/001-CVE-2014-8139-crc-overflow.patch b/utils/unzip/patches/001-CVE-2014-8139-crc-overflow.patch deleted file mode 100644 index 5cae41f..0000000 --- a/utils/unzip/patches/001-CVE-2014-8139-crc-overflow.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/extract.c -+++ b/extract.c -@@ -1,5 +1,5 @@ - /* -- Copyright (c) 1990-2009 Info-ZIP. All rights reserved. -+ Copyright (c) 1990-2014 Info-ZIP. All rights reserved. - - See the accompanying file LICENSE, version 2009-Jan-02 or later - (the contents of which are also included in unzip.h) for terms of use. -@@ -298,6 +298,8 @@ char ZCONST Far TruncNTSD[] = - #ifndef SFX - static ZCONST char Far InconsistEFlength[] = "bad extra-field entry:\n \ - EF block length (%u bytes) exceeds remaining EF data (%u bytes)\n"; -+ static ZCONST char Far TooSmallEBlength[] = "bad extra-field entry:\n \ -+ EF block length (%u bytes) invalid (< %d)\n"; - static ZCONST char Far InvalidComprDataEAs[] = - " invalid compressed data for EAs\n"; - # if (defined(WIN32) && defined(NTSD_EAS)) -@@ -2023,7 +2025,8 @@ static int TestExtraField(__G__ ef, ef_l - ebID = makeword(ef); - ebLen = (unsigned)makeword(ef+EB_LEN); - -- if (ebLen > (ef_len - EB_HEADSIZE)) { -+ if (ebLen > (ef_len - EB_HEADSIZE)) -+ { - /* Discovered some extra field inconsistency! */ - if (uO.qflag) - Info(slide, 1, ((char *)slide, "%-22s ", -@@ -2158,11 +2161,19 @@ static int TestExtraField(__G__ ef, ef_l - } - break; - case EF_PKVMS: -- if (makelong(ef+EB_HEADSIZE) != -+ if (ebLen < 4) -+ { -+ Info(slide, 1, -+ ((char *)slide, LoadFarString(TooSmallEBlength), -+ ebLen, 4)); -+ } -+ else if (makelong(ef+EB_HEADSIZE) != - crc32(CRCVAL_INITIAL, ef+(EB_HEADSIZE+4), - (extent)(ebLen-4))) -+ { - Info(slide, 1, ((char *)slide, - LoadFarString(BadCRC_EAs))); -+ } - break; - case EF_PKW32: - case EF_PKUNIX: diff --git a/utils/unzip/patches/002-CVE-2014-8140-test-compr-eb.patch b/utils/unzip/patches/002-CVE-2014-8140-test-compr-eb.patch deleted file mode 100644 index fd4ef00..0000000 --- a/utils/unzip/patches/002-CVE-2014-8140-test-compr-eb.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/extract.c -+++ b/extract.c -@@ -2232,10 +2232,17 @@ static int test_compr_eb(__G__ eb, eb_si - if (compr_offset < 4) /* field is not compressed: */ - return PK_OK; /* do nothing and signal OK */ - -+ /* Return no/bad-data error status if any problem is found: -+ * 1. eb_size is too small to hold the uncompressed size -+ * (eb_ucsize). (Else extract eb_ucsize.) -+ * 2. eb_ucsize is zero (invalid). 2014-12-04 SMS. -+ * 3. eb_ucsize is positive, but eb_size is too small to hold -+ * the compressed data header. -+ */ - if ((eb_size < (EB_UCSIZE_P + 4)) || -- ((eb_ucsize = makelong(eb+(EB_HEADSIZE+EB_UCSIZE_P))) > 0L && -- eb_size <= (compr_offset + EB_CMPRHEADLEN))) -- return IZ_EF_TRUNC; /* no compressed data! */ -+ ((eb_ucsize = makelong( eb+ (EB_HEADSIZE+ EB_UCSIZE_P))) == 0L) || -+ ((eb_ucsize > 0L) && (eb_size <= (compr_offset + EB_CMPRHEADLEN)))) -+ return IZ_EF_TRUNC; /* no/bad compressed data! */ - - if ( - #ifdef INT_16BIT diff --git a/utils/unzip/patches/003-CVE-2014-8141-getzip64data.patch b/utils/unzip/patches/003-CVE-2014-8141-getzip64data.patch deleted file mode 100644 index ca52e19..0000000 --- a/utils/unzip/patches/003-CVE-2014-8141-getzip64data.patch +++ /dev/null @@ -1,133 +0,0 @@ ---- a/fileio.c -+++ b/fileio.c -@@ -176,6 +176,8 @@ static ZCONST char Far FilenameTooLongTr - #endif - static ZCONST char Far ExtraFieldTooLong[] = - "warning: extra field too long (%d). Ignoring...\n"; -+static ZCONST char Far ExtraFieldCorrupt[] = -+ "warning: extra field (type: 0x%04x) corrupt. Continuing...\n"; - - #ifdef WINDLL - static ZCONST char Far DiskFullQuery[] = -@@ -2295,7 +2297,12 @@ int do_string(__G__ length, option) /* - if (readbuf(__G__ (char *)G.extra_field, length) == 0) - return PK_EOF; - /* Looks like here is where extra fields are read */ -- getZip64Data(__G__ G.extra_field, length); -+ if (getZip64Data(__G__ G.extra_field, length) != PK_COOL) -+ { -+ Info(slide, 0x401, ((char *)slide, -+ LoadFarString( ExtraFieldCorrupt), EF_PKSZ64)); -+ error = PK_WARN; -+ } - #ifdef UNICODE_SUPPORT - G.unipath_filename = NULL; - if (G.UzO.U_flag < 2) { ---- a/process.c -+++ b/process.c -@@ -1,5 +1,5 @@ - /* -- Copyright (c) 1990-2009 Info-ZIP. All rights reserved. -+ Copyright (c) 1990-2014 Info-ZIP. All rights reserved. - - See the accompanying file LICENSE, version 2009-Jan-02 or later - (the contents of which are also included in unzip.h) for terms of use. -@@ -1888,48 +1888,82 @@ int getZip64Data(__G__ ef_buf, ef_len) - and a 4-byte version of disk start number. - Sets both local header and central header fields. Not terribly clever, - but it means that this procedure is only called in one place. -+ -+ 2014-12-05 SMS. -+ Added checks to ensure that enough data are available before calling -+ makeint64() or makelong(). Replaced various sizeof() values with -+ simple ("4" or "8") constants. (The Zip64 structures do not depend -+ on our variable sizes.) Error handling is crude, but we should now -+ stay within the buffer. - ---------------------------------------------------------------------------*/ - -+#define Z64FLGS 0xffff -+#define Z64FLGL 0xffffffff -+ - if (ef_len == 0 || ef_buf == NULL) - return PK_COOL; - - Trace((stderr,"\ngetZip64Data: scanning extra field of length %u\n", - ef_len)); - -- while (ef_len >= EB_HEADSIZE) { -+ while (ef_len >= EB_HEADSIZE) -+ { - eb_id = makeword(EB_ID + ef_buf); - eb_len = makeword(EB_LEN + ef_buf); - -- if (eb_len > (ef_len - EB_HEADSIZE)) { -- /* discovered some extra field inconsistency! */ -+ if (eb_len > (ef_len - EB_HEADSIZE)) -+ { -+ /* Extra block length exceeds remaining extra field length. */ - Trace((stderr, - "getZip64Data: block length %u > rest ef_size %u\n", eb_len, - ef_len - EB_HEADSIZE)); - break; - } -- if (eb_id == EF_PKSZ64) { -- -+ if (eb_id == EF_PKSZ64) -+ { - int offset = EB_HEADSIZE; - -- if (G.crec.ucsize == 0xffffffff || G.lrec.ucsize == 0xffffffff){ -- G.lrec.ucsize = G.crec.ucsize = makeint64(offset + ef_buf); -- offset += sizeof(G.crec.ucsize); -+ if ((G.crec.ucsize == Z64FLGL) || (G.lrec.ucsize == Z64FLGL)) -+ { -+ if (offset+ 8 > ef_len) -+ return PK_ERR; -+ -+ G.crec.ucsize = G.lrec.ucsize = makeint64(offset + ef_buf); -+ offset += 8; - } -- if (G.crec.csize == 0xffffffff || G.lrec.csize == 0xffffffff){ -- G.csize = G.lrec.csize = G.crec.csize = makeint64(offset + ef_buf); -- offset += sizeof(G.crec.csize); -+ -+ if ((G.crec.csize == Z64FLGL) || (G.lrec.csize == Z64FLGL)) -+ { -+ if (offset+ 8 > ef_len) -+ return PK_ERR; -+ -+ G.csize = G.crec.csize = G.lrec.csize = makeint64(offset + ef_buf); -+ offset += 8; - } -- if (G.crec.relative_offset_local_header == 0xffffffff){ -+ -+ if (G.crec.relative_offset_local_header == Z64FLGL) -+ { -+ if (offset+ 8 > ef_len) -+ return PK_ERR; -+ - G.crec.relative_offset_local_header = makeint64(offset + ef_buf); -- offset += sizeof(G.crec.relative_offset_local_header); -+ offset += 8; - } -- if (G.crec.disk_number_start == 0xffff){ -+ -+ if (G.crec.disk_number_start == Z64FLGS) -+ { -+ if (offset+ 4 > ef_len) -+ return PK_ERR; -+ - G.crec.disk_number_start = (zuvl_t)makelong(offset + ef_buf); -- offset += sizeof(G.crec.disk_number_start); -+ offset += 4; - } -+#if 0 -+ break; /* Expect only one EF_PKSZ64 block. */ -+#endif /* 0 */ - } - -- /* Skip this extra field block */ -+ /* Skip this extra field block. */ - ef_buf += (eb_len + EB_HEADSIZE); - ef_len -= (eb_len + EB_HEADSIZE); - } diff --git a/utils/unzip/patches/004-CVE-2014-9636-test-compr-eb.patch b/utils/unzip/patches/004-CVE-2014-9636-test-compr-eb.patch deleted file mode 100644 index 3bba996..0000000 --- a/utils/unzip/patches/004-CVE-2014-9636-test-compr-eb.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/extract.c -+++ b/extract.c -@@ -2228,6 +2228,7 @@ static int test_compr_eb(__G__ eb, eb_si - ulg eb_ucsize; - uch *eb_ucptr; - int r; -+ ush eb_compr_method; - - if (compr_offset < 4) /* field is not compressed: */ - return PK_OK; /* do nothing and signal OK */ -@@ -2244,6 +2245,14 @@ static int test_compr_eb(__G__ eb, eb_si - ((eb_ucsize > 0L) && (eb_size <= (compr_offset + EB_CMPRHEADLEN)))) - return IZ_EF_TRUNC; /* no/bad compressed data! */ - -+ /* 2014-11-03 Michal Zalewski, SMS. -+ * For STORE method, compressed and uncompressed sizes must agree. -+ * http://www.info-zip.org/phpBB3/viewtopic.php?f=7&t=450 -+ */ -+ eb_compr_method = makeword( eb + (EB_HEADSIZE + compr_offset)); -+ if ((eb_compr_method == STORED) && (eb_size - compr_offset != eb_ucsize)) -+ return PK_ERR; -+ - if ( - #ifdef INT_16BIT - (((ulg)(extent)eb_ucsize) != eb_ucsize) || diff --git a/utils/unzip/patches/005-CVE-2015-7696-heap-overflow.patch b/utils/unzip/patches/005-CVE-2015-7696-heap-overflow.patch deleted file mode 100644 index df758a1..0000000 --- a/utils/unzip/patches/005-CVE-2015-7696-heap-overflow.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/crypt.c -+++ b/crypt.c -@@ -465,7 +465,17 @@ int decrypt(__G__ passwrd) - GLOBAL(pInfo->encrypted) = FALSE; - defer_leftover_input(__G); - for (n = 0; n < RAND_HEAD_LEN; n++) { -- b = NEXTBYTE; -+ /* 2012-11-23 SMS. (OUSPG report.) -+ * Quit early if compressed size < HEAD_LEN. The resulting -+ * error message ("unable to get password") could be improved, -+ * but it's better than trying to read nonexistent data, and -+ * then continuing with a negative G.csize. (See -+ * fileio.c:readbyte()). -+ */ -+ if ((b = NEXTBYTE) == (ush)EOF) -+ { -+ return PK_ERR; -+ } - h[n] = (uch)b; - Trace((stdout, " (%02x)", h[n])); - } diff --git a/utils/unzip/patches/006-CVE-2015-7697-infinite-loop.patch b/utils/unzip/patches/006-CVE-2015-7697-infinite-loop.patch deleted file mode 100644 index a8376b2..0000000 --- a/utils/unzip/patches/006-CVE-2015-7697-infinite-loop.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/extract.c -+++ b/extract.c -@@ -2728,6 +2728,12 @@ __GDEF - int repeated_buf_err; - bz_stream bstrm; - -+ if (G.incnt <= 0 && G.csize <= 0L) { -+ /* avoid an infinite loop */ -+ Trace((stderr, "UZbunzip2() got empty input\n")); -+ return 2; -+ } -+ - #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) - if (G.redirect_slide) - wsize = G.redirect_size, redirSlide = G.redirect_buffer; diff --git a/utils/unzip/patches/007-integer-underflow-csiz_decrypted.patch b/utils/unzip/patches/007-integer-underflow-csiz_decrypted.patch deleted file mode 100644 index 738ea52..0000000 --- a/utils/unzip/patches/007-integer-underflow-csiz_decrypted.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/extract.c -+++ b/extract.c -@@ -1257,8 +1257,17 @@ static int extract_or_test_entrylist(__G - if (G.lrec.compression_method == STORED) { - zusz_t csiz_decrypted = G.lrec.csize; - -- if (G.pInfo->encrypted) -+ if (G.pInfo->encrypted) { -+ if (csiz_decrypted <= 12) { -+ /* handle the error now to prevent unsigned overflow */ -+ Info(slide, 0x401, ((char *)slide, -+ LoadFarStringSmall(ErrUnzipNoFile), -+ LoadFarString(InvalidComprData), -+ LoadFarStringSmall2(Inflate))); -+ return PK_ERR; -+ } - csiz_decrypted -= 12; -+ } - if (G.lrec.ucsize != csiz_decrypted) { - Info(slide, 0x401, ((char *)slide, - LoadFarStringSmall2(WrnStorUCSizCSizDiff), diff --git a/utils/unzip/patches/008-cve-2014-9913-unzip-buffer-overflow.patch b/utils/unzip/patches/008-cve-2014-9913-unzip-buffer-overflow.patch deleted file mode 100644 index 018d014..0000000 --- a/utils/unzip/patches/008-cve-2014-9913-unzip-buffer-overflow.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: "Steven M. Schweda" -Subject: Fix CVE-2014-9913, buffer overflow in unzip -Bug: https://sourceforge.net/p/infozip/bugs/27/ -Bug-Debian: https://bugs.debian.org/847485 -Bug-Ubuntu: https://launchpad.net/bugs/387350 -X-Debian-version: 6.0-21 - ---- a/list.c -+++ b/list.c -@@ -339,7 +339,18 @@ int list_files(__G) /* return PK-type - G.crec.compression_method == ENHDEFLATED) { - methbuf[5] = dtype[(G.crec.general_purpose_bit_flag>>1) & 3]; - } else if (methnum >= NUM_METHODS) { -- sprintf(&methbuf[4], "%03u", G.crec.compression_method); -+ /* 2013-02-26 SMS. -+ * http://sourceforge.net/p/infozip/bugs/27/ CVE-2014-9913. -+ * Unexpectedly large compression methods overflow -+ * &methbuf[]. Use the old, three-digit decimal format -+ * for values which fit. Otherwise, sacrifice the -+ * colon, and use four-digit hexadecimal. -+ */ -+ if (G.crec.compression_method <= 999) { -+ sprintf( &methbuf[ 4], "%03u", G.crec.compression_method); -+ } else { -+ sprintf( &methbuf[ 3], "%04X", G.crec.compression_method); -+ } - } - - #if 0 /* GRR/Euro: add this? */ diff --git a/utils/unzip/patches/009-cve-2016-9844-zipinfo-buffer-overflow.patch b/utils/unzip/patches/009-cve-2016-9844-zipinfo-buffer-overflow.patch deleted file mode 100644 index 4d75857..0000000 --- a/utils/unzip/patches/009-cve-2016-9844-zipinfo-buffer-overflow.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: "Steven M. Schweda" -Subject: Fix CVE-2016-9844, buffer overflow in zipinfo -Bug-Debian: https://bugs.debian.org/847486 -Bug-Ubuntu: https://launchpad.net/bugs/1643750 -X-Debian-version: 6.0-21 - ---- a/zipinfo.c -+++ b/zipinfo.c -@@ -1921,7 +1921,18 @@ static int zi_short(__G) /* return PK- - ush dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3); - methbuf[3] = dtype[dnum]; - } else if (methnum >= NUM_METHODS) { /* unknown */ -- sprintf(&methbuf[1], "%03u", G.crec.compression_method); -+ /* 2016-12-05 SMS. -+ * https://launchpad.net/bugs/1643750 -+ * Unexpectedly large compression methods overflow -+ * &methbuf[]. Use the old, three-digit decimal format -+ * for values which fit. Otherwise, sacrifice the "u", -+ * and use four-digit hexadecimal. -+ */ -+ if (G.crec.compression_method <= 999) { -+ sprintf( &methbuf[ 1], "%03u", G.crec.compression_method); -+ } else { -+ sprintf( &methbuf[ 0], "%04X", G.crec.compression_method); -+ } - } - - for (k = 0; k < 15; ++k) diff --git a/utils/usbmuxd/Makefile b/utils/usbmuxd/Makefile deleted file mode 100644 index b05563e..0000000 --- a/utils/usbmuxd/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -# -# Copyright (C) 2012-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=usbmuxd -PKG_VERSION:=1.1.1 -PKG_RELEASE:=4 -PKG_SOURCE_PROTO:=git - -PKG_MAINTAINER:=Lukasz Baj -PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING.GPLv2 - -PKG_SOURCE_URL:=https://github.com/libimobiledevice/usbmuxd.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=35e5d48f29ae03b2b9686109e4ed9ab8b9677ce8 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/usbmuxd - SECTION:=utils - CATEGORY:=Utilities - TITLE:=USB multiplexing daemon - URL:=http://www.libimobiledevice.org/ - DEPENDS:=+librt +libusb-1.0 +libusbmuxd +libopenssl +libimobiledevice -endef - -define Package/usbmuxd/description - This daemon is in charge of multiplexing connections over USB to an iPhone or - iPod touch. To users, it means you can sync your music, contacts, photos, etc. - over USB. To developers, it means you can connect to any listening localhost - socket on the device. usbmuxd is not used for tethering data transfer, which - uses a dedicated USB interface as a virtual network device. -endef - -TARGET_CFLAGS += $(FPIC) - -define Package/usbmuxd/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_INSTALL_DIR)/usr/sbin/usbmuxd $(1)/usr/sbin/ -endef - -$(eval $(call BuildPackage,usbmuxd)) diff --git a/utils/uvcdynctrl/Makefile b/utils/uvcdynctrl/Makefile deleted file mode 100644 index 7ab033c..0000000 --- a/utils/uvcdynctrl/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# -# Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=uvcdynctrl -PKG_VERSION:=0.2.4 - -PKG_SOURCE:=libwebcam-src-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SF/libwebcam -PKG_MD5SUM:=31dbb5713e95a699c5fc4dbe1493f764 -PKG_MAINTAINER:=Roger D - -PKG_BUILD_DIR:=$(BUILD_DIR)/libwebcam-src-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/uvcdynctrl - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libwebcam +PACKAGE_UVCDYNCTRL_UDEV_RULE:udev - TITLE:=Manage dynamic controls in uvcvideo - URL:=http://sourceforge.net/projects/libwebcam/ - MENU:=1 -endef - -define Package/uvcdynctrl/description - The webcam-tools package contains the following two components: - - libwebcam: Webcam Library (LGPL) - - uvcdynctrl: Manage dynamic controls in uvcvideo (GPL) -endef - -define Package/uvcdynctrl/config -config PACKAGE_UVCDYNCTRL_UDEV_RULE - bool "uvcdynctrl udev rule, selects udev" - depends on PACKAGE_uvcdynctrl - default no - help - Installs an udev rule to load uvcdynctrl with dynamic controls - from xml files in /usr/share/uvcdynctrl when a webcam is attached. -endef - -define Package/libwebcam - SECTION:=libs - CATEGORY:=Libraries - DEPENDS:=+libxml2 +libiconv-full - TITLE:=Webcam library - URL:=http://sourceforge.net/projects/libwebcam/ -endef - -define Package/libwebcam/description - $(call Package/uvcdynctrl/description) -endef - -TARGET_CFLAGS += -I$(STAGING_DIR)/usr/lib/libiconv-full/include -liconv -TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib/libiconv-full/lib - -define Package/uvcdynctrl/install - $(INSTALL_DIR) $(1)/usr/{bin,share} - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uvcdynctrl* $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/share/uvcdynctrl/ $(1)/usr/share/ - -ifeq ($(CONFIG_PACKAGE_UVCDYNCTRL_UDEV_RULE),y) - $(INSTALL_DIR) $(1)/lib/udev/rules.d - $(CP) $(PKG_INSTALL_DIR)/lib/udev/rules.d/*.rules $(1)/lib/udev/rules.d/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/udev/uvcdynctrl $(1)/lib/udev/ -endif -endef - -define Package/libwebcam/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebcam.so* $(1)/usr/lib/ -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/{include,lib} - $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwebcam.{a,so*} $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,uvcdynctrl)) -$(eval $(call BuildPackage,libwebcam)) diff --git a/utils/vim/Makefile b/utils/vim/Makefile deleted file mode 100644 index 2e9f96a..0000000 --- a/utils/vim/Makefile +++ /dev/null @@ -1,194 +0,0 @@ -# -# Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=vim -PKG_VERSION:=7.4 -PKG_RELEASE:=3 -VIMVER:=74 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=ftp://ftp.vim.org/pub/vim/unix/ -PKG_MD5SUM:=607e135c559be642f210094ad023dc65 -PKG_MAINTAINER:=Marko Ratkaj - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)$(VIMVER) -PKG_BUILD_PARALLEL:=1 - -include $(INCLUDE_DIR)/package.mk - -define Package/vim/Default - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=+libncurses - TITLE:=Vi IMproved - enhanced vi editor - URL:=http://www.vim.org/ - SUBMENU:=Editors -endef - -define Package/vim - $(call Package/vim/Default) - TITLE+= (Tiny) -endef - -define Package/vim-full - $(call Package/vim/Default) - TITLE+= (Normal) -endef - -define Package/vim-runtime - $(call Package/vim/Default) - TITLE+= (runtime files) -endef - -define Package/vim-help - $(call Package/vim/Default) - TITLE+= (help files) -endef - -define Package/xxd - SECTION:=utils - CATEGORY:=Utilities - TITLE:=make a hexdump or do the reverse - URL:=http://www.vim.org/ -endef - -define Package/vim-full/conffiles -/usr/share/vim/vimrc -/root/.vimrc -endef - -define Package/vim/conffiles -/usr/share/vim/vimrc -/root/.vimrc -endef - -define Package/vim/description - Vim is an almost compatible version of the UNIX editor Vi. - (Tiny build) -endef - -define Package/vim-full/description - Vim is an almost compatible version of the UNIX editor Vi. - (Normal build) -endef - -define Package/vim-runtime/description - Vim is an almost compatible version of the UNIX editor Vi. - (Runtime files) -endef - -define Package/vim-help/description - Vim is an almost compatible version of the UNIX editor Vi. - (Help files) -endef - -define Package/xxd/description - xxd creates a hex dump of a given file or standard input, it can also convert - a hex dump back to its original binary form. -endef - -CONFIGURE_ARGS += \ - --disable-gui \ - --disable-gtktest \ - --disable-xim \ - --without-x \ - --disable-netbeans \ - --disable-cscope \ - --disable-gpm \ - --disable-acl \ - --with-tlib=ncurses - -CONFIGURE_VARS += \ - vim_cv_getcwd_broken=no \ - vim_cv_memmove_handles_overlap=yes \ - vim_cv_stat_ignores_slash=yes \ - vim_cv_tgetent=zero \ - vim_cv_terminfo=yes \ - vim_cv_toupper_broken=no \ - vim_cv_tty_group=root \ - vim_cv_tty_mode=0620 - -ifneq ($(CONFIG_PACKAGE_vim),) -define Build/Compile/vim - $(call Build/Configure/Default, \ - --with-features=tiny \ - --disable-multibyte \ - ) - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" all - $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_tiny -endef -endif - -ifneq ($(CONFIG_PACKAGE_vim-full),) -define Build/Compile/vim-full - $(call Build/Configure/Default, \ - --with-features=normal \ - --enable-multibyte \ - ) - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" all - $(CP) $(PKG_BUILD_DIR)/src/$(PKG_NAME) $(PKG_BUILD_DIR)/vim_normal -endef -endif - -ifneq ($(CONFIG_PACKAGE_xxd),) -define Build/Compile/xxd - +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \ - DESTDIR="$(PKG_INSTALL_DIR)" all -endef -endif - -define Build/Compile/vim-runtime - $(MAKE) -C $(PKG_BUILD_DIR)/src DESTDIR="$(PKG_INSTALL_DIR)" installrtbase - (cd $(PKG_INSTALL_DIR) && tar -cf $(PKG_BUILD_DIR)/docs.tar ./usr/share/vim/vim$(VIMVER)/doc) - rm -rf $(PKG_INSTALL_DIR)/usr/share/vim/vim$(VIMVER)/doc - rm -rf $(PKG_INSTALL_DIR)/usr/man -endef - -define Build/Compile -$(call Build/Compile/vim) -$(call Build/Compile/vim-full) -$(call Build/Compile/vim-runtime) -$(call Build/Compile/xxd) -endef - -define Package/vim/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_tiny $(1)/usr/bin/vim - $(INSTALL_DIR) $(1)/usr/share/vim - $(INSTALL_CONF) ./files/vimrc $(1)/usr/share/vim/ -endef - -define Package/vim-full/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/vim_normal $(1)/usr/bin/vim - $(INSTALL_DIR) $(1)/usr/share/vim - $(INSTALL_CONF) ./files/vimrc.full $(1)/usr/share/vim/vimrc -endef - -define Package/vim-runtime/install - $(CP) $(PKG_INSTALL_DIR)/* $(1) - rm -rf $(1)/usr/share/vim/vim$(VIMVER)/doc -endef - -define Package/vim-help/install - tar -C $(1) -xf $(PKG_BUILD_DIR)/docs.tar -endef - -define Package/xxd/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/xxd/xxd $(1)/usr/bin -endef - -$(eval $(call BuildPackage,vim)) -$(eval $(call BuildPackage,vim-full)) -$(eval $(call BuildPackage,vim-runtime)) -$(eval $(call BuildPackage,vim-help)) -$(eval $(call BuildPackage,xxd)) diff --git a/utils/vim/files/vimrc b/utils/vim/files/vimrc deleted file mode 100644 index b8cea29..0000000 --- a/utils/vim/files/vimrc +++ /dev/null @@ -1,12 +0,0 @@ -set showcmd " show (partial) command in status line -set showmatch " show matching brackets -set incsearch " incremental search -set autowrite " automatically save before commands like :next and :make -set nocompatible " use vim defaults instead of 100% vi compatibility -set backspace=indent,eol,start " more powerful backspacing -set autoindent " always set autoindenting on -set linebreak " don't wrap words by default -set textwidth=0 " don't wrap lines by default -set ruler " show the cursor position all the time - -set backupskip+=/etc/crontabs.* " fix crontab -e diff --git a/utils/vim/files/vimrc.full b/utils/vim/files/vimrc.full deleted file mode 100644 index 99f737e..0000000 --- a/utils/vim/files/vimrc.full +++ /dev/null @@ -1,30 +0,0 @@ -set showcmd " show (partial) command in status line -set showmatch " show matching brackets -set incsearch " incremental search -set autowrite " automatically save before commands like :next and :make -set nocompatible " use Vim defaults instead of 100% vi compatibility -set backspace=indent,eol,start " more powerful backspacing -set autoindent " always set autoindenting on -set linebreak " don't wrap words by default -set textwidth=0 " don't wrap lines by default -set ruler " show the cursor position all the time - -set backupskip+=/etc/crontabs.* " fix crontab -e - -if filereadable(expand("$VIMRUNTIME/syntax/synload.vim")) - syntax on -endif -if has("syntax") && &term =~ "xterm" - set t_Co=8 - if has("terminfo") - set t_Sf=[3%p1%dm - set t_Sb=[4%p1%dm - else - set t_Sf=[3%dm - set t_Sb=[4%dm - endif -endif - -" Uncomment out for line and/or relative numberig -" set number -" set rnu diff --git a/utils/vim/patches/001-compile.patch b/utils/vim/patches/001-compile.patch deleted file mode 100644 index 6740f1a..0000000 --- a/utils/vim/patches/001-compile.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- a/src/auto/configure -+++ b/src/auto/configure -@@ -12294,37 +12294,8 @@ _ACEOF - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5 - $as_echo_n "checking uint32_t is 32 bits... " >&6; } --if test "$cross_compiling" = yes; then : -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5 --$as_echo "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;} --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --#ifdef HAVE_STDINT_H --# include --#endif --#ifdef HAVE_INTTYPES_H --# include --#endif --main() { -- uint32_t nr1 = (uint32_t)-1; -- uint32_t nr2 = (uint32_t)0xffffffffUL; -- if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) exit(1); -- exit(0); --} --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming ok" >&5 - $as_echo "ok" >&6; } --else -- as_fn_error "WRONG! uint32_t not defined correctly." "$LINENO" 5 --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- -- - - bcopy_test_prog=' - #include "confdefs.h" diff --git a/utils/vim/patches/002-remove_helptags_generation.patch b/utils/vim/patches/002-remove_helptags_generation.patch deleted file mode 100644 index 051c8da..0000000 --- a/utils/vim/patches/002-remove_helptags_generation.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/runtime/doc/Makefile -+++ b/runtime/doc/Makefile -@@ -310,7 +310,6 @@ all: tags vim.man evim.man vimdiff.man v - # Use Vim to generate the tags file. Can only be used when Vim has been - # compiled and installed. Supports multiple languages. - vimtags: $(DOCS) -- $(VIMEXE) -u NONE -esX -c "helptags ++t ." -c quit - - # Use "doctags" to generate the tags file. Only works for English! - tags: doctags $(DOCS) diff --git a/utils/watchcat/Makefile b/utils/watchcat/Makefile deleted file mode 100644 index d25c0c2..0000000 --- a/utils/watchcat/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (C) 2010 segal.di.ubi.pt -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=watchcat -PKG_VERSION:=1 -PKG_RELEASE:=6 - -PKG_MAINTAINER:=Roger D -PKG_LICENSE:=GPL-2.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/watchcat - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Enable the configuration of programed reboots -endef - -define Package/watchcat/description -Allows to configure a periodically reboot, or after losing internet connectivity. Configured trough UCI /etc/config/system. -endef - -define Package/watchcat/conffiles -/etc/config/system -endef - -define Build/Compile -endef - -define Package/watchcat/install - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/initd_watchcat $(1)/etc/init.d/watchcat - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) ./files/watchcat.sh $(1)/usr/bin/watchcat.sh - $(INSTALL_DIR) $(1)/etc/uci-defaults - $(INSTALL_BIN) ./files/uci_defaults_watchcat $(1)/etc/uci-defaults/50-watchcat -endef - -$(eval $(call BuildPackage,watchcat)) diff --git a/utils/watchcat/files/initd_watchcat b/utils/watchcat/files/initd_watchcat deleted file mode 100644 index d6f954e..0000000 --- a/utils/watchcat/files/initd_watchcat +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=97 - -PIDFILE="/tmp/run/watchcat" - -append_string() { - local varname="$1"; local add="$2"; local separator="${3:- }"; local actual - eval "actual=\$$varname" - - new="${actual:+$actual$separator}$add" - eval "$varname=\$new" -} - -timetoseconds() { - local time=$1 - unset seconds - - { [ "$time" -ge 1 ] 2> /dev/null && seconds="$time"; } || \ - { [ "${time%s}" -ge 1 ] 2> /dev/null && seconds="${time%s}"; } || \ - { [ "${time%m}" -ge 1 ] 2> /dev/null && seconds=$((${time%m}*60)); } || \ - { [ "${time%h}" -ge 1 ] 2> /dev/null && seconds=$((${time%h}*3600)); } || \ - { [ "${time%d}" -ge 1 ] 2> /dev/null && seconds=$((${time%d}*86400)); } -} - -load_watchcat() { - config_get period $1 period - config_get mode $1 mode "always" - config_get pinghosts $1 pinghosts "8.8.8.8" - config_get pingperiod $1 pingperiod - config_get forcedelay $1 forcedelay "0" - - # Fix potential typo in mode (backward compatibility). - [ "$mode" = "allways" ] && mode="always" - - error="" - - timetoseconds "$period" - period="$seconds" - [ "$period" -ge 1 ] \ - || append_string "error" 'period is not a valid time value (ex: "30"; "4m"; "6h"; "2d")' "; " - [ "$mode" = "always" -o "$mode" = "ping" ] \ - || append_string "error" "mode must be 'always' or 'ping'" "; " - [ -n "$pinghosts" -o "$mode" = "always" ] \ - || append_string "error" "pinghosts must be set when in 'ping' mode" "; " - [ "$mode" = "ping" ] && { - if [ -n "$pingperiod" ] - then - timetoseconds "$pingperiod" - pingperiod="$seconds" - if [ "$pingperiod" -ge 0 ] - then - [ "$pingperiod" -lt "$period" ] \ - || append_string "error" "pingperiod must be less than period" "; " - else - append_string "error" 'pingperiod is not a valid time value (ex: "30"; "4m"; "6h"; "2d")' "; " - fi - else - pingperiod="$((period/20))" - fi - } - [ "$forcedelay" -ge 0 ] \ - || append_string "error" "forcedelay must be a integer greater or equal than 0, where 0 means disabled" "; " - - [ -n "$error" ] && { logger -p user.err -t "watchcat" "reboot program $1 not started - $error"; return; } - - if [ "$mode" = "always" ] - then - /usr/bin/watchcat.sh "always" "$period" "$forcedelay" & - logger -p user.info -t "watchcat" "started task (mode=$mode;period=$period;forcedelay=$forcedelay)" - else - /usr/bin/watchcat.sh "period" "$period" "$forcedelay" "$pinghosts" "$pingperiod" & - logger -p user.info -t "watchcat" "started task (mode=$mode;period=$period;pinghosts=$pinghosts;pingperiod=$pingperiod;forcedelay=$forcedelay)" - fi - - echo $! >> "${PIDFILE}.pids" -} - -stop() { - if [ -f "${PIDFILE}.pids" ] - then - logger -p user.info -t "watchcat" "stopping all tasks" - - while read pid - do - kill "$pid" - done < "${PIDFILE}.pids" - - rm "${PIDFILE}.pids" - - logger -p user.info -t "watchcat" "all tasks stopped" - else - logger -p user.info -t "watchcat" "no tasks running" - fi -} - -start() { - [ -f "${PIDFILE}.pids" ] && stop - - config_load system - if [ -n "$(uci show system.@watchcat[0])" ] # at least one watchcat section exists - then - logger -p user.info -t "watchcat" "starting all tasks" - config_foreach load_watchcat watchcat - logger -p user.info -t "watchcat" "all tasks started" - else - logger -p user.info -t "watchcat" "no tasks defined" - fi -} diff --git a/utils/watchcat/files/uci_defaults_watchcat b/utils/watchcat/files/uci_defaults_watchcat deleted file mode 100644 index 49def81..0000000 --- a/utils/watchcat/files/uci_defaults_watchcat +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -uci -q show system.@watchcat[0] || { - uci add system watchcat - uci set system.@watchcat[0].period=6h - uci set system.@watchcat[0].mode=ping - uci set system.@watchcat[0].pinghosts=8.8.8.8 - uci set system.@watchcat[0].forcedelay=30 - uci commit -} diff --git a/utils/watchcat/files/watchcat.sh b/utils/watchcat/files/watchcat.sh deleted file mode 100644 index 0fda123..0000000 --- a/utils/watchcat/files/watchcat.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2010 segal.di.ubi.pt -# -# This is free software, licensed under the GNU General Public License v2. -# - -mode="$1" - -# Fix potential typo in mode (backward compatibility). -[ "$mode" = "allways" ] && mode="always" - -shutdown_now() { - local forcedelay="$1" - - reboot & - - [ "$forcedelay" -ge 1 ] && { - sleep "$forcedelay" - - echo b > /proc/sysrq-trigger # Will immediately reboot the system without syncing or unmounting your disks. - } -} - -watchcat_always() { - local period="$1"; local forcedelay="$2" - - sleep "$period" && shutdown_now "$forcedelay" -} - -watchcat_ping() { - local period="$1"; local forcedelay="$2"; local pinghosts="$3"; local pingperiod="$4" - - time_now="$(cat /proc/uptime)" - time_now="${time_now%%.*}" - time_lastcheck="$time_now" - time_lastcheck_withinternet="$time_now" - - while true - do - # account for the time ping took to return. With a ping time of 5s, ping might take more than that, so it is important to avoid even more delay. - time_now="$(cat /proc/uptime)" - time_now="${time_now%%.*}" - time_diff="$((time_now-time_lastcheck))" - - [ "$time_diff" -lt "$pingperiod" ] && { - sleep_time="$((pingperiod-time_diff))" - sleep "$sleep_time" - } - - time_now="$(cat /proc/uptime)" - time_now="${time_now%%.*}" - time_lastcheck="$time_now" - - for host in "$pinghosts" - do - if ping -c 1 "$host" &> /dev/null - then - time_lastcheck_withinternet="$time_now" - else - time_diff="$((time_now-time_lastcheck_withinternet))" - logger -p daemon.info -t "watchcat[$$]" "no internet connectivity for $time_diff seconds. Reseting when reaching $period" - fi - done - - time_diff="$((time_now-time_lastcheck_withinternet))" - [ "$time_diff" -ge "$period" ] && shutdown_now "$forcedelay" - - done -} - - if [ "$mode" = "always" ] - then - watchcat_always "$2" "$3" - else - watchcat_ping "$2" "$3" "$4" "$5" - fi diff --git a/utils/wifitoggle/Makefile b/utils/wifitoggle/Makefile deleted file mode 100644 index c580e97..0000000 --- a/utils/wifitoggle/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (C) 2010-2014 OpenWrt.org -# Copyright (C) 2010 segal.di.ubi.pt -# Copyright (C) 2016 Karol Babioch -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=wifitoggle -PKG_VERSION:=1 -PKG_RELEASE:=5 -PKG_LICENSE:=GPL-2.0+ - -PKG_MAINTAINER:=Nuno Goncalves - -include $(INCLUDE_DIR)/package.mk - -define Package/wifitoggle - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Script to toggle Wi-Fi with a button and UCI config -endef - -define Package/wifitoggle/description -Very versatile script to toggle Wi-Fi with a button. Allows to set -timeouts, persist changes after boot, and set LEDs according to the state. -endef - -define Package/wifitoggle/conffiles -/etc/config/wifitoggle -endef - -define Build/Compile -endef - -define Package/wifitoggle/install - $(INSTALL_DIR) $(1)/etc/hotplug.d/button - $(INSTALL_BIN) ./files/wifitoggle.hotplug $(1)/etc/hotplug.d/button/50-wifitoggle - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/wifitoggle.config $(1)/etc/config/wifitoggle -endef - -$(eval $(call BuildPackage,wifitoggle)) diff --git a/utils/wifitoggle/files/wifitoggle.config b/utils/wifitoggle/files/wifitoggle.config deleted file mode 100755 index a8d0906..0000000 --- a/utils/wifitoggle/files/wifitoggle.config +++ /dev/null @@ -1,13 +0,0 @@ -config wifitoggle - option button 'wps' - - option persistent '0' - option timer '600' - - #option led_sysfs 'wrt160nl:amber:wps' - # Leaving this option empty, makes sure that no LED is touched - option led_sysfs '' - option led_enable_trigger 'timer' - option led_enable_delayon '500' - option led_enable_delayoff '500' - option led_disable_default '0' diff --git a/utils/wifitoggle/files/wifitoggle.hotplug b/utils/wifitoggle/files/wifitoggle.hotplug deleted file mode 100755 index 295a087..0000000 --- a/utils/wifitoggle/files/wifitoggle.hotplug +++ /dev/null @@ -1,174 +0,0 @@ -# /bin/sh - -setled() { - if [ -z "${led_sysfs}" ]; then - return - elif [ -e /sys/class/leds/${led_sysfs}/brightness ] - then - [ $led_default -eq 1 ] && echo 1 >/sys/class/leds/${led_sysfs}/brightness - [ $led_default -eq 1 ] || echo 0 >/sys/class/leds/${led_sysfs}/brightness - - echo $led_trigger > /sys/class/leds/${led_sysfs}/trigger - - [ "$led_trigger" == "netdev" -a -n "$led_dev" ] && { - echo $led_dev > /sys/class/leds/${led_sysfs}/device_name - echo $led_mode > /sys/class/leds/${led_sysfs}/mode - } - - [ "$led_trigger" == "timer" ] && { - [ -n "$led_delayon" ] && echo $led_delayon > /sys/class/leds/${led_sysfs}/delay_on - [ -n "$led_delayoff" ] && echo $led_delayoff > /sys/class/leds/${led_sysfs}/delay_off - } - else - logger -p user.err -t "wifitoggle" "led: ${led_sysfs} not found" - fi -} - -load_wireless() { - disabled="$(uci get wireless.${1}.disabled)" -} - -save_wireless() { - [ "$device" = "all" -o "$device" = "${1}" ] && { - uci set "wireless.${1}.disabled=$disabled" - } -} - -setwifi() { - setled - - config_load wireless - config_foreach save_wireless wifi-device - - if ubus list network.wireless >/dev/null 2>/dev/null; then - ubus call network reload - else - wifi - fi -} - - -save_system() { - config_get sysfs $1 sysfs - [ "$sysfs" = "$led_sysfs" ] && { - uci set "system.${1}.trigger=$led_trigger" - uci set "system.${1}.dev=$led_dev" - uci set "system.${1}.mode=$led_mode" - uci set "system.${1}.default=$led_default" - uci set "system.${1}.delayon=$led_delayon" - uci set "system.${1}.delayoff=$led_delayoff" - - ledset=1 - } -} - -commit_changes() { - ledset="" - - config_load system - config_foreach save_system led - - [ "$ledset" -eq 1 ] || { - section=$(uci add system led) - uci set "system.${section}.sysfs=$led_sysfs" - uci set "system.${section}.trigger=$led_trigger" - uci set "system.${section}.dev=$led_dev" - uci set "system.${section}.mode=$led_mode" - uci set "system.${section}.default=$led_default" - uci set "system.${section}.delayon=$led_delayon" - uci set "system.${section}.delayoff=$led_delayoff" - } - - uci commit -} - -enable() { - - led_trigger="$led_enable_trigger" - led_trigger="$led_enable_trigger" - led_dev="$led_enable_dev" - led_mode="$led_enable_mode" - led_default="$led_enable_default" - led_delayon="$led_enable_delayon" - led_delayoff="$led_enable_delayoff" - disabled=0 - - setwifi - - [ "$timer" -le 0 -a "$persistent" -eq 1 ] && commit_changes - - logger -p user.info -t "wifitoggle" "device($device) enabled" - - [ "$timer" -gt 0 ] && { - sleep "$timer" && disable && rm /tmp/run/wirelesstoggle_${1}.pid & - echo $! > /tmp/run/wirelesstoggle_${1}.pid - logger -p user.info -t "wifitoggle" "auto-disable timer started($timer seconds)" - } -} - -disable() { - - led_trigger="$led_disable_trigger" - led_trigger="$led_disable_trigger" - led_dev="$led_disable_dev" - led_mode="$led_disable_mode" - led_default="$led_disable_default" - led_delayon="$led_disable_delayon" - led_delayoff="$led_disable_delayoff" - disabled=1 - - setwifi - - [ "$timer" -le 0 -a "$persistent" -eq 1 ] && commit_changes - - logger -p user.info -t "wifitoggle" "device($device) disabled" -} - - -load_wifitoggle() { - config_get device $1 device "all" - config_get button $1 button "wps" - config_get action $1 action "pressed" - config_get_bool persistent $1 persistent "0" - config_get timer $1 timer "0" - - config_get led_sysfs $1 led_sysfs - - config_get led_enable_trigger $1 led_enable_trigger "none" - config_get led_enable_dev $1 led_enable_dev - config_get led_enable_mode $1 led_enable_mode "link" - config_get_bool led_enable_default $1 led_enable_default "1" - config_get led_enable_delayon $1 led_enable_delayon - config_get led_enable_delayoff $1 led_enable_delayoff - - config_get led_disable_trigger $1 led_disable_trigger "none" - config_get led_disable_dev $1 led_disable_dev - config_get led_disable_mode $1 led_disable_mode "link" - config_get_bool led_disable_default $1 led_disable_default "0" - config_get led_disable_delayon $1 led_disable_delayon - config_get led_disable_delayoff $1 led_disable_delayoff - - [ "$ACTION" = "$action" -a "$BUTTON" = "$button" ] && { - - [ -f /tmp/run/wirelesstoggle_${1}.pid ] && read PID < /tmp/run/wirelesstoggle_${1}.pid && kill $PID && rm /tmp/run/wirelesstoggle_${1}.pid - - if [ "$device" = "all" ] - then - config_load wireless - config_foreach load_wireless wifi-device - else - disabled="$(uci get wireless."$device".disabled)" - fi - - - if [ "$disabled" = "1" ] - then - enable $1 - else - disable - fi - } -} - -config_load wifitoggle -config_foreach load_wifitoggle wifitoggle diff --git a/utils/xz/Makefile b/utils/xz/Makefile index c3536c2..0b94e5b 100644 --- a/utils/xz/Makefile +++ b/utils/xz/Makefile @@ -9,17 +9,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xz -PKG_VERSION:=5.2.3 -PKG_RELEASE:=1 +PKG_VERSION:=5.2.4 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=@SF/lzmautils \ - http://tukaani.org/xz -PKG_MD5SUM:=fd9ca16de1052aac899ad3495ad20dfa906c27b4a5070102a2ec35ca3a4740c1 +PKG_SOURCE_URL:=@SF/lzmautils +PKG_HASH:=3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf +PKG_MAINTAINER:= PKG_LICENSE:=Public-Domain LGPL-2.1+ GPL-2.0+ GPL-3.0+ PKG_LICENSE_FILES:=COPYING -PKG_MAINTAINER:=Nicolas Thill +PKG_CPE_ID:=cpe:/a:tukaani:xz PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -30,7 +30,7 @@ define Package/xz/Default SUBMENU:=Compression SECTION:=utils CATEGORY:=Utilities - URL:=http://tukaani.org/xz + URL:=https://tukaani.org/xz endef define Package/xz-utils @@ -70,16 +70,18 @@ define BuildSubPackage $$(eval $$(call BuildPackage,$(1))) endef +TARGET_LDFLAGS += -Wl,--gc-sections -flto CONFIGURE_ARGS += \ --enable-small \ --enable-assume-ram=4 \ --disable-assembler \ + --disable-debug \ + --disable-doc \ + --disable-rpath \ + --disable-symbol-versions \ --disable-werror \ - -# API uses "restrict" keyword introduced in C99 standard -TARGET_CFLAGS += \ - -std=c99 \ + --with-pic define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include diff --git a/utils/xz/patches/001-relative-pkg-config-paths.patch b/utils/xz/patches/001-relative-pkg-config-paths.patch new file mode 100644 index 0000000..b89c13f --- /dev/null +++ b/utils/xz/patches/001-relative-pkg-config-paths.patch @@ -0,0 +1,13 @@ +--- a/src/liblzma/liblzma.pc.in ++++ b/src/liblzma/liblzma.pc.in +@@ -7,8 +7,8 @@ + + prefix=@prefix@ + exec_prefix=@exec_prefix@ +-libdir=@libdir@ +-includedir=@includedir@ ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include + + Name: liblzma + Description: General purpose data compression library diff --git a/utils/yunbridge/Makefile b/utils/yunbridge/Makefile deleted file mode 100644 index ae49232..0000000 --- a/utils/yunbridge/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2006-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=yunbridge -PKG_VERSION:=160 - -PKG_RELEASE=$(PKG_SOURCE_VERSION) - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/arduino/YunBridge.git -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=f2042052115e71ad2c91f77e78d21db8275fcdd6 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz - -PKG_MAINTAINER:=John Crispin -PKG_LICENSE:=GPL-2.0 - -include $(INCLUDE_DIR)/package.mk - -define Package/yunbridge - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Arduino YUN bridge library - URL:=http://arduino.cc/ - DEPENDS:=+python -endef - -define Package/yunbridge/description - Arduino YUN bridge library -endef - -define Build/Compile - true -endef - -define Package/yunbridge/install - mkdir -p $(1)/usr/lib/python2.7/bridge - $(CP) $(PKG_BUILD_DIR)/bridge/*.py $(1)/usr/lib/python2.7/bridge/ - $(CP) ./files/* $(1) -endef - -$(eval $(call BuildPackage,yunbridge)) diff --git a/utils/yunbridge/files/etc/config/yunbridge b/utils/yunbridge/files/etc/config/yunbridge deleted file mode 100644 index fe8dd28..0000000 --- a/utils/yunbridge/files/etc/config/yunbridge +++ /dev/null @@ -1,6 +0,0 @@ -config bridge config - option socket_timeout 5 - option secure_rest_api false - - # remove this line to activae the yunbridge - option disabled 1 diff --git a/utils/yunbridge/files/etc/init.d/yunbridge b/utils/yunbridge/files/etc/init.d/yunbridge deleted file mode 100755 index 4b48220..0000000 --- a/utils/yunbridge/files/etc/init.d/yunbridge +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2013 OpenWrt.org - -# start after and stop before networking -START=20 -STOP=89 - -USE_PROCD=1 - -service_triggers() -{ - procd_add_reload_trigger "yunbridge" -} - -start_service() -{ - [ "$(uci -q get yunbridge.config.disabled)" = "1" ] && return 0 - procd_open_instance - procd_set_param command "/sbin/yunbridge" - procd_set_param respawn - procd_close_instance -} diff --git a/utils/yunbridge/files/sbin/yunbridge b/utils/yunbridge/files/sbin/yunbridge deleted file mode 100755 index c8e4812..0000000 --- a/utils/yunbridge/files/sbin/yunbridge +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -stty -F /dev/ttyS0 2500000 clocal cread cs8 -cstopb -parenb -exec < /dev/ttyS0 -exec > /dev/ttyS0 -exec 2> /dev/ttyS0 -askfirst bin/ash --login diff --git a/utils/yunbridge/files/usr/bin/pretty-wifi-info.lua b/utils/yunbridge/files/usr/bin/pretty-wifi-info.lua deleted file mode 100755 index d91817a..0000000 --- a/utils/yunbridge/files/usr/bin/pretty-wifi-info.lua +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/lua - -local function get_basic_net_info(network, iface, accumulator) - local net = network:get_network(iface) - local device = net and net:get_interface() - - if device then - accumulator["uptime"] = net:uptime() - accumulator["iface"] = device:name() - accumulator["mac"] = device:mac() - accumulator["rx_bytes"] = device:rx_bytes() - accumulator["tx_bytes"] = device:tx_bytes() - accumulator["ipaddrs"] = {} - - for _, ipaddr in ipairs(device:ipaddrs()) do - accumulator.ipaddrs[#accumulator.ipaddrs + 1] = { - addr = ipaddr:host():string(), - netmask = ipaddr:mask():string() - } - end - end -end - -local function get_wifi_info(network, iface, accumulator) - local net = network:get_wifinet(iface) - - if net then - local dev = net:get_device() - if dev then - accumulator["mode"] = net:active_mode() - accumulator["ssid"] = net:active_ssid() - accumulator["encryption"] = net:active_encryption() - accumulator["quality"] = net:signal_percent() - end - end -end - -local function collect_wifi_info() - local network = require"luci.model.network".init() - local accumulator = {} - get_basic_net_info(network, "lan", accumulator) - get_wifi_info(network, "wlan0", accumulator) - return accumulator -end - -local info = collect_wifi_info() - -print("Current WiFi configuration") -if info.ssid then - print("SSID: " .. info.ssid) -end -if info.mode then - print("Mode: " .. info.mode) -end -if info.quality then - print("Signal: " .. info.quality .. "%") -end -if info.encryption then - print("Encryption method: " .. info.encryption) -end -if info.iface then - print("Interface name: " .. info.iface) -end -if info.uptime then - print("Active for: " .. math.floor(info.uptime / 60) .. " minutes") -end -if #info.ipaddrs > 0 then - print("IP address: " .. info.ipaddrs[1].addr .. "/" .. info.ipaddrs[1].netmask) -end -if info.mac then - print("MAC address: " .. info.mac) -end -if info.rx_bytes and info.tx_bytes then - print("RX/TX: " .. math.floor(info.rx_bytes / 1024) .. "/" .. math.floor(info.tx_bytes / 1024) .. " KBs") -end diff --git a/utils/yunbridge/files/usr/lib/lua/luci/controller/arduino/index.lua b/utils/yunbridge/files/usr/lib/lua/luci/controller/arduino/index.lua deleted file mode 100644 index 8d3b7eb..0000000 --- a/utils/yunbridge/files/usr/lib/lua/luci/controller/arduino/index.lua +++ /dev/null @@ -1,414 +0,0 @@ ---[[ -This file is part of YunWebUI. - -YunWebUI 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 St, Fifth Floor, Boston, MA 02110-1301 USA - -As a special exception, you may use this file as part of a free software -library without restriction. Specifically, if other files instantiate -templates or use macros or inline functions from this file, or you compile -this file and link it with other files to produce an executable, this -file does not by itself cause the resulting executable to be covered by -the GNU General Public License. This exception does not however -invalidate any other reasons why the executable file might be covered by -the GNU General Public License. - -Copyright 2013 Arduino LLC (http://www.arduino.cc/) -]] - -module("luci.controller.arduino.index", package.seeall) - -local function not_nil_or_empty(value) - return value and value ~= "" -end - -local function get_first(cursor, config, type, option) - return cursor:get_first(config, type, option) -end - -local function set_first(cursor, config, type, option, value) - cursor:foreach(config, type, function(s) - if s[".type"] == type then - cursor:set(config, s[".name"], option, value) - end - end) -end - - -local function to_key_value(s) - local parts = luci.util.split(s, ":") - parts[1] = luci.util.trim(parts[1]) - parts[2] = luci.util.trim(parts[2]) - return parts[1], parts[2] -end - -function http_error(code, text) - luci.http.prepare_content("text/plain") - luci.http.status(code) - if text then - luci.http.write(text) - end -end - -function index() - function luci.dispatcher.authenticator.arduinoauth(validator, accs, default) - require("luci.controller.arduino.index") - - local user = luci.http.formvalue("username") - local pass = luci.http.formvalue("password") - local basic_auth = luci.http.getenv("HTTP_AUTHORIZATION") - - if user and validator(user, pass) then - return user - end - - if basic_auth and basic_auth ~= "" then - local decoded_basic_auth = nixio.bin.b64decode(string.sub(basic_auth, 7)) - user = string.sub(decoded_basic_auth, 0, string.find(decoded_basic_auth, ":") - 1) - pass = string.sub(decoded_basic_auth, string.find(decoded_basic_auth, ":") + 1) - end - - if user then - if #pass ~= 64 and validator(user, pass) then - return user - elseif #pass == 64 then - local uci = luci.model.uci.cursor() - uci:load("yunbridge") - local stored_encrypted_pass = uci:get_first("yunbridge", "bridge", "password") - if pass == stored_encrypted_pass then - return user - end - end - end - - luci.http.header("WWW-Authenticate", "Basic realm=\"yunbridge\"") - luci.http.status(401) - - return false - end - - local function make_entry(path, target, title, order) - local page = entry(path, target, title, order) - page.leaf = true - return page - end - - -- web panel - local webpanel = entry({ "webpanel" }, alias("webpanel", "go_to_homepage"), _("%s Web Panel") % luci.sys.hostname(), 10) - webpanel.sysauth = "root" - webpanel.sysauth_authenticator = "arduinoauth" - - make_entry({ "webpanel", "go_to_homepage" }, call("go_to_homepage"), nil) - - --api security level - local uci = luci.model.uci.cursor() - uci:load("yunbridge") - local secure_rest_api = uci:get_first("yunbridge", "bridge", "secure_rest_api") - local rest_api_sysauth = false - if secure_rest_api == "true" then - rest_api_sysauth = webpanel.sysauth - end - - --storage api - local data_api = node("data") - data_api.sysauth = rest_api_sysauth - data_api.sysauth_authenticator = webpanel.sysauth_authenticator - make_entry({ "data", "get" }, call("storage_send_request"), nil).sysauth = rest_api_sysauth - make_entry({ "data", "put" }, call("storage_send_request"), nil).sysauth = rest_api_sysauth - make_entry({ "data", "delete" }, call("storage_send_request"), nil).sysauth = rest_api_sysauth - local mailbox_api = node("mailbox") - mailbox_api.sysauth = rest_api_sysauth - mailbox_api.sysauth_authenticator = webpanel.sysauth_authenticator - make_entry({ "mailbox" }, call("build_bridge_mailbox_request"), nil).sysauth = rest_api_sysauth - - --plain socket endpoint - local plain_socket_endpoint = make_entry({ "arduino" }, call("board_plain_socket"), nil) - plain_socket_endpoint.sysauth = rest_api_sysauth - plain_socket_endpoint.sysauth_authenticator = webpanel.sysauth_authenticator -end - -function go_to_homepage() - luci.http.redirect("/index.html") -end - -local function build_bridge_request(command, params) - - local bridge_request = { - command = command - } - - if command == "raw" then - params = table.concat(params, "/") - if not_nil_or_empty(params) then - bridge_request["data"] = params - end - return bridge_request - end - - if command == "get" then - if not_nil_or_empty(params[1]) then - bridge_request["key"] = params[1] - end - return bridge_request - end - - if command == "put" and not_nil_or_empty(params[1]) and params[2] then - bridge_request["key"] = params[1] - bridge_request["value"] = params[2] - return bridge_request - end - - if command == "delete" and not_nil_or_empty(params[1]) then - bridge_request["key"] = params[1] - return bridge_request - end - - return nil -end - -local function extract_jsonp_param(query_string) - if not not_nil_or_empty(query_string) then - return nil - end - - local qs_parts = string.split(query_string, "&") - for idx, value in ipairs(qs_parts) do - if string.find(value, "jsonp") == 1 or string.find(value, "callback") == 1 then - return string.sub(value, string.find(value, "=") + 1) - end - end -end - -local function parts_after(url_part) - local url = luci.http.getenv("PATH_INFO") - local url_after_part = string.find(url, "/", string.find(url, url_part) + 1) - if not url_after_part then - return {} - end - return luci.util.split(string.sub(url, url_after_part + 1), "/") -end - -function storage_send_request() - local method = luci.http.getenv("REQUEST_METHOD") - local jsonp_callback = extract_jsonp_param(luci.http.getenv("QUERY_STRING")) - local parts = parts_after("data") - local command = parts[1] - if not command or command == "" then - luci.http.status(404) - return - end - local params = {} - for idx, param in ipairs(parts) do - if idx > 1 and not_nil_or_empty(param) then - table.insert(params, param) - end - end - - -- TODO check method? - local bridge_request = build_bridge_request(command, params) - if not bridge_request then - luci.http.status(403) - return - end - - local uci = luci.model.uci.cursor() - uci:load("yunbridge") - local socket_timeout = uci:get_first("yunbridge", "bridge", "socket_timeout", 5) - - local sock, code, msg = nixio.connect("127.0.0.1", 5700) - if not sock then - code = code or "" - msg = msg or "" - http_error(500, "nil socket, " .. code .. " " .. msg) - return - end - - sock:setopt("socket", "sndtimeo", socket_timeout) - sock:setopt("socket", "rcvtimeo", socket_timeout) - sock:setopt("tcp", "nodelay", 1) - - local json = require("luci.json") - - sock:write(json.encode(bridge_request)) - sock:writeall("\n") - - local response_text = {} - while true do - local bytes = sock:recv(4096) - if bytes and #bytes > 0 then - table.insert(response_text, bytes) - end - - local json_response = json.decode(table.concat(response_text)) - if json_response then - sock:close() - luci.http.status(200) - if jsonp_callback then - luci.http.prepare_content("application/javascript") - luci.http.write(jsonp_callback) - luci.http.write("(") - luci.http.write_json(json_response) - luci.http.write(");") - else - luci.http.prepare_content("application/json") - luci.http.write(json.encode(json_response)) - end - return - end - - if not bytes or #response_text == 0 then - sock:close() - http_error(500, "Empty response") - return - end - end - - sock:close() -end - -function board_plain_socket() - local function send_response(response_text, jsonp_callback) - if not response_text then - luci.http.status(500) - return - end - - local rows = luci.util.split(response_text, "\r\n") - if #rows == 1 or string.find(rows[1], "Status") ~= 1 then - luci.http.prepare_content("text/plain") - luci.http.status(200) - luci.http.write(response_text) - return - end - - local body_start_at_idx = -1 - local content_type = "text/plain" - for idx, row in ipairs(rows) do - if row == "" then - body_start_at_idx = idx - break - end - - local key, value = to_key_value(row) - if string.lower(key) == "status" then - luci.http.status(tonumber(value)) - elseif string.lower(key) == "content-type" then - content_type = value - else - luci.http.header(key, value) - end - end - - local response_body = table.concat(rows, "\r\n", body_start_at_idx + 1) - if content_type == "application/json" and jsonp_callback then - local json = require("luci.json") - luci.http.prepare_content("application/javascript") - luci.http.write(jsonp_callback) - luci.http.write("(") - luci.http.write_json(json.decode(response_body)) - luci.http.write(");") - else - luci.http.prepare_content(content_type) - luci.http.write(response_body) - end - end - - local method = luci.http.getenv("REQUEST_METHOD") - local jsonp_callback = extract_jsonp_param(luci.http.getenv("QUERY_STRING")) - local parts = parts_after("arduino") - local params = {} - for idx, param in ipairs(parts) do - if not_nil_or_empty(param) then - table.insert(params, param) - end - end - - if #params == 0 then - luci.http.status(404) - return - end - - params = table.concat(params, "/") - - local uci = luci.model.uci.cursor() - uci:load("yunbridge") - local socket_timeout = uci:get_first("yunbridge", "bridge", "socket_timeout", 5) - - local sock, code, msg = nixio.connect("127.0.0.1", 5555) - if not sock then - code = code or "" - msg = msg or "" - http_error(500, "Could not connect to YunServer " .. code .. " " .. msg) - return - end - - sock:setopt("socket", "sndtimeo", socket_timeout) - sock:setopt("socket", "rcvtimeo", socket_timeout) - sock:setopt("tcp", "nodelay", 1) - - sock:write(params) - sock:writeall("\r\n") - - local response_text = sock:readall() - sock:close() - - send_response(response_text, jsonp_callback) -end - -function build_bridge_mailbox_request() - local method = luci.http.getenv("REQUEST_METHOD") - local jsonp_callback = extract_jsonp_param(luci.http.getenv("QUERY_STRING")) - local parts = parts_after("mailbox") - local params = {} - for idx, param in ipairs(parts) do - if not_nil_or_empty(param) then - table.insert(params, param) - end - end - - if #params == 0 then - luci.http.status(400) - return - end - - local bridge_request = build_bridge_request("raw", params) - if not bridge_request then - luci.http.status(403) - return - end - - local uci = luci.model.uci.cursor() - uci:load("yunbridge") - local socket_timeout = uci:get_first("yunbridge", "bridge", "socket_timeout", 5) - - local sock, code, msg = nixio.connect("127.0.0.1", 5700) - if not sock then - code = code or "" - msg = msg or "" - http_error(500, "nil socket, " .. code .. " " .. msg) - return - end - - sock:setopt("socket", "sndtimeo", socket_timeout) - sock:setopt("socket", "rcvtimeo", socket_timeout) - sock:setopt("tcp", "nodelay", 1) - - local json = require("luci.json") - - sock:write(json.encode(bridge_request)) - sock:writeall("\n") - sock:close() - - luci.http.status(200) -end diff --git a/utils/yunbridge/files/usr/lib/lua/luci/sha256.lua b/utils/yunbridge/files/usr/lib/lua/luci/sha256.lua deleted file mode 100644 index b5e2dea..0000000 --- a/utils/yunbridge/files/usr/lib/lua/luci/sha256.lua +++ /dev/null @@ -1,199 +0,0 @@ --- --- Code merged by gravityscore at http://pastebin.com/gsFrNjbt --- --- Adaptation of the Secure Hashing Algorithm (SHA-244/256) --- Found Here: http://lua-users.org/wiki/SecureHashAlgorithm --- --- Using an adapted version of the bit library --- Found Here: https://bitbucket.org/Boolsheet/bslf/src/1ee664885805/bit.lua --- - -module("luci.sha256", package.seeall) - -local MOD = 2 ^ 32 -local MODM = MOD - 1 - -local function memoize(f) - local mt = {} - local t = setmetatable({}, mt) - function mt:__index(k) - local v = f(k) - t[k] = v - return v - end - - return t -end - -local function make_bitop_uncached(t, m) - local function bitop(a, b) - local res, p = 0, 1 - while a ~= 0 and b ~= 0 do - local am, bm = a % m, b % m - res = res + t[am][bm] * p - a = (a - am) / m - b = (b - bm) / m - p = p * m - end - res = res + (a + b) * p - return res - end - - return bitop -end - -local function make_bitop(t) - local op1 = make_bitop_uncached(t, 2 ^ 1) - local op2 = memoize(function(a) return memoize(function(b) return op1(a, b) end) end) - return make_bitop_uncached(op2, 2 ^ (t.n or 1)) -end - -local bxor1 = make_bitop({ [0] = { [0] = 0, [1] = 1 }, [1] = { [0] = 1, [1] = 0 }, n = 4 }) - -local function bxor(a, b, c, ...) - local z = nil - if b then - a = a % MOD - b = b % MOD - z = bxor1(a, b) - if c then z = bxor(z, c, ...) end - return z - elseif a then return a % MOD - else return 0 - end -end - -local function band(a, b, c, ...) - local z - if b then - a = a % MOD - b = b % MOD - z = ((a + b) - bxor1(a, b)) / 2 - if c then z = bit32_band(z, c, ...) end - return z - elseif a then return a % MOD - else return MODM - end -end - -local function bnot(x) return (-1 - x) % MOD end - -local function rshift1(a, disp) - if disp < 0 then return lshift(a, -disp) end - return math.floor(a % 2 ^ 32 / 2 ^ disp) -end - -local function rshift(x, disp) - if disp > 31 or disp < -31 then return 0 end - return rshift1(x % MOD, disp) -end - -local function lshift(a, disp) - if disp < 0 then return rshift(a, -disp) end - return (a * 2 ^ disp) % 2 ^ 32 -end - -local function rrotate(x, disp) - x = x % MOD - disp = disp % 32 - local low = band(x, 2 ^ disp - 1) - return rshift(x, disp) + lshift(low, 32 - disp) -end - -local k = { - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, - 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, - 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, - 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, - 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, - 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2, -} - -local function str2hexa(s) - return (string.gsub(s, ".", function(c) return string.format("%02x", string.byte(c)) end)) -end - -local function num2s(l, n) - local s = "" - for i = 1, n do - local rem = l % 256 - s = string.char(rem) .. s - l = (l - rem) / 256 - end - return s -end - -local function s232num(s, i) - local n = 0 - for i = i, i + 3 do n = n * 256 + string.byte(s, i) end - return n -end - -local function preproc(msg, len) - local extra = 64 - ((len + 9) % 64) - len = num2s(8 * len, 8) - msg = msg .. "\128" .. string.rep("\0", extra) .. len - assert(#msg % 64 == 0) - return msg -end - -local function initH256(H) - H[1] = 0x6a09e667 - H[2] = 0xbb67ae85 - H[3] = 0x3c6ef372 - H[4] = 0xa54ff53a - H[5] = 0x510e527f - H[6] = 0x9b05688c - H[7] = 0x1f83d9ab - H[8] = 0x5be0cd19 - return H -end - -local function digestblock(msg, i, H) - local w = {} - for j = 1, 16 do w[j] = s232num(msg, i + (j - 1) * 4) end - for j = 17, 64 do - local v = w[j - 15] - local s0 = bxor(rrotate(v, 7), rrotate(v, 18), rshift(v, 3)) - v = w[j - 2] - w[j] = w[j - 16] + s0 + w[j - 7] + bxor(rrotate(v, 17), rrotate(v, 19), rshift(v, 10)) - end - - local a, b, c, d, e, f, g, h = H[1], H[2], H[3], H[4], H[5], H[6], H[7], H[8] - for i = 1, 64 do - local s0 = bxor(rrotate(a, 2), rrotate(a, 13), rrotate(a, 22)) - local maj = bxor(band(a, b), band(a, c), band(b, c)) - local t2 = s0 + maj - local s1 = bxor(rrotate(e, 6), rrotate(e, 11), rrotate(e, 25)) - local ch = bxor(band(e, f), band(bnot(e), g)) - local t1 = h + s1 + ch + k[i] + w[i] - h, g, f, e, d, c, b, a = g, f, e, d + t1, c, b, a, t1 + t2 - end - - H[1] = band(H[1] + a) - H[2] = band(H[2] + b) - H[3] = band(H[3] + c) - H[4] = band(H[4] + d) - H[5] = band(H[5] + e) - H[6] = band(H[6] + f) - H[7] = band(H[7] + g) - H[8] = band(H[8] + h) -end - -function sha256(msg) - msg = preproc(msg, #msg) - local H = initH256({}) - for i = 1, #msg, 64 do digestblock(msg, i, H) end - return str2hexa(num2s(H[1], 4) .. num2s(H[2], 4) .. num2s(H[3], 4) .. num2s(H[4], 4) .. - num2s(H[5], 4) .. num2s(H[6], 4) .. num2s(H[7], 4) .. num2s(H[8], 4)) -end \ No newline at end of file diff --git a/utils/yunbridge/patches/000-scripts.patch b/utils/yunbridge/patches/000-scripts.patch deleted file mode 100644 index 46f21bd..0000000 --- a/utils/yunbridge/patches/000-scripts.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/bridge/packet.py -+++ b/bridge/packet.py -@@ -93,12 +93,12 @@ - - def run(self, data): - if data[0] != 'X': -- call(['/usr/bin/blink-start', '100']) -+ #call(['/usr/bin/blink-start', '100']) - return chr(1) - if data[1:4] != '100': -- call(['/usr/bin/blink-start', '100']) -+ #call(['/usr/bin/blink-start', '100']) - return chr(2) -- call(['/usr/bin/blink-stop']) -+ #call(['/usr/bin/blink-stop']) - return chr(0) + '160' # send the actual bridge version - - class PacketReader: diff --git a/utils/zile/Makefile b/utils/zile/Makefile index 0bd9487..06d5d2f 100644 --- a/utils/zile/Makefile +++ b/utils/zile/Makefile @@ -13,7 +13,7 @@ PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/zile -PKG_MD5SUM:=fe77d801ba69e0fb9b4914a04b9ff506 +PKG_HASH:=218bb2af414c6a168101656631a5b2da92f20a965895e1006658cc658b0b7e89 PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=GPL-3.0+ diff --git a/utils/zip/Makefile b/utils/zip/Makefile deleted file mode 100644 index 6427dda..0000000 --- a/utils/zip/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=zip -PKG_REV:=30 -PKG_VERSION:=3.0 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz -PKG_SOURCE_URL:=@SF/infozip -PKG_MD5SUM:=7b74551e63f8ee6aab6fbc86676c0d37 -PKG_MAINTAINER:=Álvaro Fernández Rojas - -PKG_LICENSE:=BSD-4-Clause -PKG_LICENSE_FILES:=LICENSE - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV) -PKG_CHECK_FORMAT_SECURITY:=0 - -include $(INCLUDE_DIR)/package.mk - -define Package/zip - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:= - TITLE:=Archiver for .zip files - URL:=http://infozip.sourceforge.net/Zip.html - SUBMENU:=Compression -endef - -define Package/zip/description - This is InfoZIP's zip program. It produces files that are fully - compatible with the popular PKZIP program; however, the command line - options are not identical. In other words, the end result is the same, - but the methods differ. -endef - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile generic \ - prefix="$(PKG_INSTALL_DIR)/usr" \ - CFLAGS="$(TARGET_CFLAGS)" \ - CC="$(TARGET_CC) $(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX $(TARGET_LDFLAGS)" \ - IZ_BZIP2="no" \ - install -endef - -define Package/zip/install - $(INSTALL_DIR) $(1)/usr/bin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,zip)) diff --git a/utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch b/utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch deleted file mode 100644 index 892540b..0000000 --- a/utils/zip/patches/001-unix-configure-borrow-the-LFS-test-from-autotools.patch +++ /dev/null @@ -1,90 +0,0 @@ -From fc392c939b9a18959482f588aff0afc29dd6d30a Mon Sep 17 00:00:00 2001 -From: Romain Naour -Date: Fri, 23 Jan 2015 22:20:18 +0100 -Subject: [PATCH 6/6] unix/configure: borrow the LFS test from autotools. - -Infozip's LFS check can't work for cross-compilation -since it try to run a target's binary on the host system. - -Instead, use to LFS test used by autotools which is a -compilation test. -(see autotools/lib/autoconf/specific.m4) - -Reported-by: Richard Genoud -Signed-off-by: Romain Naour ---- - configure | 46 +++++++++++++++------------------------------- - 1 file changed, 15 insertions(+), 31 deletions(-) - -diff --rupN a/unix/configure b/unix/configure ---- a/unix/configure -+++ b/unix/configure -@@ -399,9 +399,8 @@ else - fi - - --# Now we set the 64-bit file environment and check the size of off_t --# Added 11/4/2003 EG --# Revised 8/12/2004 EG -+# LFS check borrowed from autotools sources -+# lib/autoconf/specific.m4 - - echo Check for Large File Support - cat > conftest.c << _EOF_ -@@ -410,23 +409,19 @@ cat > conftest.c << _EOF_ - # define _FILE_OFFSET_BITS 64 /* select default interface as 64 bit */ - # define _LARGE_FILES /* some OSes need this for 64-bit off_t */ - #include --#include --#include --#include -+ -+ /* Check that off_t can represent 2**63 - 1 correctly. -+ We can't simply define LARGE_OFF_T to be 9223372036854775807, -+ since some C++ compilers masquerading as C compilers -+ incorrectly reject 9223372036854775807. */ -+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) -+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 -+ && LARGE_OFF_T % 2147483647 == 1) -+ ? 1 : -1]; -+ - int main() - { -- off_t offset; -- struct stat s; -- /* see if have 64-bit off_t */ -- if (sizeof(offset) < 8) -- return 1; -- printf(" off_t is %d bytes\n", sizeof(off_t)); -- /* see if have 64-bit stat */ -- if (sizeof(s.st_size) < 8) { -- printf(" s.st_size is %d bytes\n", sizeof(s.st_size)); -- return 2; -- } -- return 3; -+ return 0; - } - _EOF_ - # compile it -@@ -434,19 +429,8 @@ $CC -o conftest conftest.c >/dev/null 2> - if [ $? -ne 0 ]; then - echo -- no Large File Support - else --# run it -- ./conftest -- r=$? -- if [ $r -eq 1 ]; then -- echo -- no Large File Support - no 64-bit off_t -- elif [ $r -eq 2 ]; then -- echo -- no Large File Support - no 64-bit stat -- elif [ $r -eq 3 ]; then -- echo -- yes we have Large File Support! -- CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT" -- else -- echo -- no Large File Support - conftest returned $r -- fi -+ echo -- yes we have Large File Support! -+ CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT" - fi - - diff --git a/utils/zoneinfo/Makefile b/utils/zoneinfo/Makefile deleted file mode 100644 index cd334f2..0000000 --- a/utils/zoneinfo/Makefile +++ /dev/null @@ -1,242 +0,0 @@ -# -# Copyright (C) 2007-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -# Author: Michael Geddes - -include $(TOPDIR)/rules.mk - -PKG_NAME:=zoneinfo -PKG_VERSION:=2016j -PKG_VERSION_CODE:=2016j -PKG_RELEASE:=1 - -#As i couldn't find real license used "Public Domain" -#as referense to http://www.iana.org/time-zones/repository/tz-link.html -PKG_LICENSE:=Public Domain - -PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz -PKG_SOURCE_CODE:=tzcode$(PKG_VERSION_CODE).tar.gz -PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases -PKG_MD5SUM:=db361d005ac8b30a2d18c5ca38d3e8ab - -include $(INCLUDE_DIR)/package.mk - -define Download/tzcode - FILE=$(PKG_SOURCE_CODE) - URL=$(PKG_SOURCE_URL) - MD5SUM:=0684b98eb184fab250b6ca946862078d -endef - -$(eval $(call Download,tzcode)) - -define Package/zoneinfo/Default - SUBMENU:=Zoneinfo - TITLE:=Zone Information - SECTION:=utils - CATEGORY:=Utilities - MAINTAINER:=Vladimir Ulrich -endef - -define Package/zoneinfo-core -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (core) -endef - -define Package/zoneinfo-simple -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (simple) -endef - -define Package/zoneinfo-africa -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (Africa) -endef - -define Package/zoneinfo-northamerica -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (NorthAmerica) -endef - -define Package/zoneinfo-southamerica -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (SouthAmerica) -endef - -define Package/zoneinfo-poles -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (Arctic, Antarctic) -endef - -define Package/zoneinfo-asia -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (Asia) -endef - -define Package/zoneinfo-atlantic -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (Atlantic) -endef - -define Package/zoneinfo-australia-nz -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (Australia-NZ) -endef - -define Package/zoneinfo-pacific -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (Pacific) -endef - -define Package/zoneinfo-europe -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (Europe) -endef - -define Package/zoneinfo-india -$(call Package/zoneinfo/Default) - TITLE:=Zone Information (India) -endef - -define Build/Prepare - (cd $(PKG_BUILD_DIR) && tar -xzf $(DL_DIR)/$(PKG_SOURCE_CODE) && tar -xzf $(DL_DIR)/$(PKG_SOURCE)) -endef - -define Build/Compile - CFLAGS="$(HOST_CFLAGS)" \ - $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile \ - $(HOST_CONFIGURE_OPTS) \ - CC="$(HOSTCC)" \ - LD="\$$$$(CC)" \ - CPPFLAGS="$(HOST_CPPFLAGS)" \ - LDFLAGS="$(HOST_LDFLAGS)" \ - TOPDIR="$(PKG_INSTALL_DIR)" \ - TZDIR="$(PKG_INSTALL_DIR)/zoneinfo" \ - install -endef - -define Package/zoneinfo-core/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo - for i in \ - CET CST6CDT EET EST EST5EDT GB-Eire Eire \ - GB GMT GMT+0 GMT-0 GMT0 Greenwich \ - HST MET MST MST7MDT \ - PRC PST8PDT ROC ROK UCT UTC \ - Universal W-SU WET Zulu Etc/* zone.tab ; do \ - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \ - $(1)/usr/share/zoneinfo ; \ - done -endef - -define Package/zoneinfo-simple/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo - for i in Pacific/Honolulu \ - America/Anchorage America/Los_Angeles America/Denver \ - America/Chicago America/New_York America/Caracas \ - America/Sao_Paulo Europe/London Europe/Paris \ - Africa/Cairo Europe/Moscow Asia/Dubai \ - Asia/Karachi Asia/Dhaka Asia/Bankok \ - Asia/Hong_Kong Asia/Tokyo Australia/Darwin \ - Australia/Adelaide Australia/Brisbane Australia/Sydney \ - Australia/Perth Pacific/Noumea ; do \ - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \ - $(1)/usr/share/zoneinfo ; \ - done -endef - -define Package/zoneinfo-africa/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo/Africa - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/Africa/* \ - $(1)/usr/share/zoneinfo/Africa -endef - -define Package/zoneinfo-northamerica/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo - for i in US America Canada Mexico Cuba Jamaica Navajo ; do \ - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \ - $(1)/usr/share/zoneinfo ; \ - done - rm -rf $(1)/usr/share/zoneinfo/America/Argentina -endef - -define Package/zoneinfo-southamerica/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo - for i in Brazil Chile ; do \ - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \ - $(1)/usr/share/zoneinfo ; \ - done - $(INSTALL_DIR) $(1)/usr/share/zoneinfo/America/Argentina - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/America/Argentina/* \ - $(1)/usr/share/zoneinfo/America/Argentina -endef - -define Package/zoneinfo-poles/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo - for i in Antarctica Arctic ; do \ - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \ - $(1)/usr/share/zoneinfo ; \ - done -endef - -define Package/zoneinfo-asia/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo - for i in Asia Japan Singapore Hongkong ; do \ - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \ - $(1)/usr/share/zoneinfo ; \ - done -endef - -define Package/zoneinfo-atlantic/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo - for i in Atlantic Iceland ; do \ - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \ - $(1)/usr/share/zoneinfo ; \ - done -endef - -define Package/zoneinfo-australia-nz/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo - for i in NZ NZ-CHAT Australia ; do \ - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \ - $(1)/usr/share/zoneinfo ; \ - done -endef - -define Package/zoneinfo-pacific/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo - for i in Pacific Kwajalein ; do \ - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \ - $(1)/usr/share/zoneinfo ; \ - done -endef - -define Package/zoneinfo-europe/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo - for i in Europe Portugal Poland ; do \ - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \ - $(1)/usr/share/zoneinfo ; \ - done -endef - -define Package/zoneinfo-india/install - $(INSTALL_DIR) $(1)/usr/share/zoneinfo - for i in Indian ; do \ - $(CP) $(PKG_INSTALL_DIR)/zoneinfo/$$$$i \ - $(1)/usr/share/zoneinfo ; \ - done -endef - -$(eval $(call BuildPackage,zoneinfo-simple)) -$(eval $(call BuildPackage,zoneinfo-core)) -$(eval $(call BuildPackage,zoneinfo-africa)) -$(eval $(call BuildPackage,zoneinfo-northamerica)) -$(eval $(call BuildPackage,zoneinfo-southamerica)) -$(eval $(call BuildPackage,zoneinfo-poles)) -$(eval $(call BuildPackage,zoneinfo-asia)) -$(eval $(call BuildPackage,zoneinfo-atlantic)) -$(eval $(call BuildPackage,zoneinfo-australia-nz)) -$(eval $(call BuildPackage,zoneinfo-pacific)) -$(eval $(call BuildPackage,zoneinfo-europe)) -$(eval $(call BuildPackage,zoneinfo-india)) diff --git a/utils/zsh/Makefile b/utils/zsh/Makefile index 8bd4fcd..b3f96d2 100644 --- a/utils/zsh/Makefile +++ b/utils/zsh/Makefile @@ -8,15 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zsh -PKG_VERSION:=5.2 -PKG_RELEASE:=1 +PKG_VERSION:=5.6.2 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/zsh -PKG_MD5SUM:=afe96fde08b70e23c1cab1ca7a68fb34 +PKG_HASH:=a50bd66c0557e8eca3b8fa24e85d0de533e775d7a22df042da90488623752e9e + PKG_MAINTAINER:=Vadim A. Misbakh-Soloviov PKG_LICENSE:=ZSH +PKG_LICENSE_FILES:=LICENCE +PKG_CPE_ID:=cpe:/a:zsh_project:zsh +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -26,8 +30,8 @@ define Package/zsh CATEGORY:=Utilities SUBMENU:=Shells TITLE:=The Z shell - DEPENDS:=+libncurses +libncursesw +libpcre +librt - URL:=http://www.zsh.org/ + DEPENDS:=+libcap +libncurses +libncursesw +libpcre +librt + URL:=https://www.zsh.org/ endef define Package/zsh/description @@ -41,14 +45,26 @@ endef define Build/Configure $(call Build/Configure/Default, \ - --bindir=/bin \ --disable-etcdir \ --disable-gdbm \ + --disable-dynamic \ + $(if $(CONFIG_USE_MUSL),--enable-libc-musl) \ --enable-pcre \ + --enable-cap \ --enable-multibyte \ + --enable-unicode9 \ + --enable-runhelpdir=$(CONFIGURE_PREFIX)/share/zsh/$(PKG_VERSION)/help \ + --enable-fndir=$(CONFIGURE_PREFIX)/share/zsh/$(PKG_VERSION)/functions \ + --enable-site-fndir=$(CONFIGURE_PREFIX)/share/zsh/site-functions \ --enable-function-subdirs \ --with-tcsetpgrp \ --with-term-lib="ncursesw", \ + zsh_cv_shared_environ=yes \ + zsh_cv_sys_dynamic_clash_ok=yes\ + zsh_cv_sys_dynamic_execsyms=yes \ + zsh_cv_sys_dynamic_rtld_global=yes \ + zsh_cv_sys_dynamic_strip_exe=yes \ + zsh_cv_sys_dynamic_strip_lib=yes \ zsh_cv_sys_nis=no \ zsh_cv_sys_nis_plus=no \ ) @@ -67,17 +83,31 @@ define Build/Configure $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" prep endef +TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections -flto + define Package/zsh/postinst #!/bin/sh grep zsh $${IPKG_INSTROOT}/etc/shells || \ - echo "/bin/zsh" >> $${IPKG_INSTROOT}/etc/shells + echo "/usr/bin/zsh" >> $${IPKG_INSTROOT}/etc/shells + + # Backwards compatibility + if [[ -e /bin/zsh ]] && ([[ ! -L /bin/zsh ]] || [[ "$(readlink -fn $${IPKG_INSTROOT}/bin/zsh)" != "../$(CONFIGURE_PREFIX)/bin/zsh" ]]); then + ln -fs "../$(CONFIGURE_PREFIX)/bin/zsh" "$${IPKG_INSTROOT}/bin/zsh" + fi endef define Package/zsh/install $(INSTALL_DIR) $(1)/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/zsh $(1)/bin/ - $(INSTALL_DIR) $(1)/usr/share/zsh/$(PKG_VERSION) - $(CP) $(PKG_INSTALL_DIR)/usr/share/zsh/$(PKG_VERSION)/* $(1)/usr/share/zsh/$(PKG_VERSION)/ + $(INSTALL_DIR) $(1)/$(CONFIGURE_PREFIX)/bin + $(INSTALL_DIR) $(1)/$(CONFIGURE_PREFIX)/share/zsh/$(PKG_VERSION) + + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/$(CONFIGURE_PREFIX)/bin/zsh $(1)/$(CONFIGURE_PREFIX)/bin/ + $(CP) $(PKG_INSTALL_DIR)/$(CONFIGURE_PREFIX)/share/zsh/$(PKG_VERSION)/* $(1)/$(CONFIGURE_PREFIX)/share/zsh/$(PKG_VERSION)/ +endef + +define Package/zsh/postrm + rm -rf "$${IPKG_INSTROOT}/$(CONFIGURE_PREFIX)/share/zsh/$(PKG_VERSION)" endef $(eval $(call BuildPackage,zsh))