include $(TOPDIR)/rules.mk
PKG_NAME:=monit
-PKG_VERSION:=5.12.2
+PKG_VERSION:=5.13
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://mmonit.com/monit/dist
-PKG_MD5SUM:=5f5cf4c18b42e8091b49b4e07cf972ce
+PKG_MD5SUM:=7902ff45eaa1303ac25f6366eff251ef
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
--- a/configure
+++ b/configure
-@@ -13821,14 +13821,7 @@ fi
+@@ -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; }
include $(TOPDIR)/rules.mk
PKG_NAME:=zabbix
-PKG_VERSION:=2.4.4
+PKG_VERSION:=2.4.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/zabbix
-PKG_MD5SUM:=400a3e2ebec80e2f1fe86d1b32bfd2e1
+PKG_MD5SUM:=a82eb0d55d3ca947e10a4a55238f4388
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_NAME:=perl-compress-bzip2
PKG_VERSION:=2.22
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/R/RU/RURBAN/
PKG_SOURCE:=Compress-Bzip2-$(PKG_VERSION).tar.gz
PKG_NAME:=perl-dbi
PKG_VERSION:=1.633
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/T/TI/TIMB/
PKG_SOURCE:=DBI-$(PKG_VERSION).tar.gz
PKG_NAME:=perl-html-parser
PKG_VERSION:=3.71
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/G/GA/GAAS/
PKG_SOURCE:=HTML-Parser-$(PKG_VERSION).tar.gz
PKG_NAME:=perl-www-curl
PKG_VERSION:=4.17
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/S/SZ/SZBALINT/
PKG_SOURCE:=WWW-Curl-$(PKG_VERSION).tar.gz
endef
define Build/Configure
- $(call perlmod/Configure,-n,)
+ $(call perlmod/Configure,,)
endef
define Build/Compile
PKG_NAME:=perl
PKG_VERSION:=5.20.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=ftp://ftp.cpan.org/pub/CPAN/src/5.0 \
http://www.cpan.org/src/5.0/perl-5.20.0.tar.gz \
# Static host perl
define Host/Configure
- ( cd $(HOST_BUILD_DIR); ./Configure -der -Uusedl -Duserelocatableinc -Dprefix=$(HOST_PERL_PREFIX) )
+ ( cd $(HOST_BUILD_DIR); ./Configure -der -Uusedl -Duserelocatableinc -Dprefix=$(HOST_PERL_PREFIX) $(if $(CONFIG_PERL_THREADS),-Dusethreads,))
endef
define Host/Install
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__ARM_ARCH_3__=1'
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__ARM_ARCH_3__=1'
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__ARM_ARCH_3__=1'
strerror_r_proto='REENTRANT_PROTO_B_IBW'
#strings='/usr/include/string.h'
submit=''
-subversion='0'
sysman='/usr/share/man/man1'
tail=''
tar=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__ARM_ARCH_3__=1'
strerror_r_proto='0'
#strings='/usr/include/string.h'
submit=''
-subversion='0'
sysman='/usr/share/man/man1'
tail=''
tar=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__gnu_linux__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 system=linux system=posix system=unix'
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols='__gnu_linux__=1 __linux=1 __linux__=1 __unix=1 __unix__=1 system=linux system=posix system=unix'
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='-D_REENTRANT -D_GNU_SOURCE %%CFLAGS%%'
+ccflags='-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
cat='cat'
cc='%%CC%%'
cccdlflags='-fPIC'
-ccflags='%%CFLAGS%%'
+ccflags='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 %%CFLAGS%%'
ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
ccname='gcc'
ccsymbols=''
endif
PERL_CMD:=$(STAGING_DIR_HOST)/usr/bin/perl5.20.0
-MOD_CFLAGS_PERL:=$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)
+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
endef
define perlmod/Configure
- (cd $(PKG_BUILD_DIR); \
+ (cd $(if $(3),$(3),$(PKG_BUILD_DIR)); \
PERL_MM_USE_DEFAULT=1 \
$(2) \
- $(PERL_CMD) Makefile.PL \
+ $(PERL_CMD) -MConfig -e '$$$${tied %Config::Config}{cpprun}="$(GNU_TARGET_NAME)-cpp -E"; do "Makefile.PL"' \
$(1) \
AR=ar \
CC=$(GNU_TARGET_NAME)-gcc \
EXE_EXT=" " \
FULL_AR=$(GNU_TARGET_NAME)-ar \
LD=$(GNU_TARGET_NAME)-gcc \
- LDDLFLAGS="-shared $(TARGET_LDFLAGS)" \
+ LDDLFLAGS="-shared -rdynamic $(TARGET_LDFLAGS)" \
LDFLAGS="$(EXTRA_LIBDIRS:%=-L%) $(EXTRA_LIBS:%=-l%) " \
LIBC=" " \
LIB_EXT=.a \
define perlmod/Compile
PERL5LIB=$(PERL_LIB) \
$(2) \
- $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(MAKE) -C $(if $(3),$(3),$(PKG_BUILD_DIR)) \
$(1) \
install
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=5.6.8
-PKG_RELEASE:=2
+PKG_VERSION:=5.6.9
+PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_MD5SUM:=a5a6df33aade0cb5425e4374e3832f0b
+PKG_MD5SUM:=561f37377833772ace776143c5687884
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1
-
Add support for use of the system timezone database, rather
than embedding a copy. Discussed upstream but was not desired.
History:
-r9: fix another compile error without --with-system-tzdata configured
+r11: adopted to php 5.6.9
+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
+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.
r2: add filesystem trawl to set up name alias index
r1: initial revision
---- a/ext/date/lib/parse_tz.c
-+++ b/ext/date/lib/parse_tz.c
-@@ -20,6 +20,16 @@
+diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_tz.c
+--- php-5.6.9.orig/ext/date/lib/parse_tz.c 2015-05-14 01:13:33.000000000 +0200
++++ php-5.6.9/ext/date/lib/parse_tz.c 2015-05-18 22:40:55.000000000 +0200
+@@ -18,8 +18,22 @@
+
+ /* $Id$ */
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
#include "timelib.h"
+#ifdef HAVE_SYSTEM_TZDATA
#include <stdio.h>
#ifdef HAVE_LOCALE_H
-@@ -31,7 +41,12 @@
+@@ -31,7 +45,12 @@
#else
#include <strings.h>
#endif
#if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
# if defined(__LITTLE_ENDIAN__)
-@@ -51,9 +66,14 @@
-
- static void read_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
+@@ -53,6 +72,11 @@
{
-- /* skip ID */
-- *tzf += 4;
--
-+ if (memcmp(tzf, "TZif", 4) == 0) {
-+ *tzf += 20;
-+ return;
-+ }
-+
-+ /* skip ID */
-+ *tzf += 4;
-+
- /* read BC flag */
- tz->bc = (**tzf == '\1');
- *tzf += 1;
-@@ -256,7 +276,397 @@ void timelib_dump_tzinfo(timelib_tzinfo
+ uint32_t version;
+
++ if (memcmp(tzf, "TZif", 4) == 0) {
++ *tzf += 20;
++ return -1;
++ }
++
+ /* read ID */
+ version = (*tzf)[3] - '0';
+ *tzf += 4;
+@@ -296,7 +320,406 @@
}
}
+#endif
+
+/* System timezone database pointer. */
-+static const timelib_tzdb *timezonedb_system = NULL;
++static const timelib_tzdb *timezonedb_system;
+
+/* Hash table entry for the cache of the zone.tab mapping table. */
+struct location_info {
+ * 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 = *p++) != '\0') {
++ while ((c = tolower(*p++)) != '\0') {
+ hash = (hash << 5) ^ hash ^ c;
+ }
+
+
+ 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;
+
+ if (*p == '\n' || *p == '\t')
+ *p = '\0';
-+
++
+ hash = tz_hash(name);
+ i = malloc(sizeof *i);
+ memcpy(i->code, code, 2);
+ }
+
+ return NULL;
-+}
++}
+
+/* Filter out some non-tzdata files and the posix/right databases, if
+ * present. */
+ return NULL;
+ }
+
++ if (system_location_table) {
++ const struct location_info *li;
++ if ((li = find_zone_info(system_location_table, timezone)) != NULL) {
++ /* Use the stored name to avoid case issue */
++ timezone = li->name;
++ }
++ }
++
+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone);
+
+ fd = open(fname, O_RDONLY);
{
int left = 0, right = tzdb->index_size - 1;
#ifdef HAVE_SETLOCALE
-@@ -295,36 +705,128 @@ static int seek_to_tz_position(const uns
+@@ -335,21 +758,90 @@
return 0;
}
-+static int seek_to_tz_position(const unsigned char **tzf, char *timezone,
++static int seek_to_tz_position(const unsigned char **tzf, char *timezone,
+ char **map, size_t *maplen,
+ const timelib_tzdb *tzdb)
+{
+ return 0;
+ }
+
-+ (*tzf) = (unsigned char *)orig ;
++ (*tzf) = (unsigned char *)orig;
+ *map = orig;
-+
-+ return 1;
++
++ return 1;
+ }
-+ else
++ else
+#endif
-+ {
++ {
+ return inmem_seek_to_tz_position(tzf, timezone, tzdb);
+ }
+}
+ tmp->data = NULL;
+ create_zone_index(tmp);
+ system_location_table = create_location_table();
-+ fake_data_segment(tmp, system_location_table);
++ fake_data_segment(tmp, system_location_table);
+ timezonedb_system = tmp;
+ }
+
- 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;
-+ }
-+
-+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone);
-+
-+ return stat(fname, &st) == 0 && is_valid_tzfile(&st);
-+ }
++ 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", timezone);
++
++ return stat(fname, &st) == 0 && is_valid_tzfile(&st);
++ }
+#endif
+
+ return (inmem_seek_to_tz_position(&tzf, timezone, tzdb));
}
+ static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
+@@ -374,10 +866,12 @@
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);
- read_preamble(&tzf, tmp);
- read_header(&tzf, tmp);
- read_transistions(&tzf, tmp);
- read_types(&tzf, tmp);
+ version = read_preamble(&tzf, tmp);
+@@ -391,7 +885,34 @@
+ skip_64bit_types(&tzf, tmp);
+ skip_posix_string(&tzf, tmp);
+ }
- read_location(&tzf, tmp);
+
+#ifdef HAVE_SYSTEM_TZDATA
+
+ if ((li = find_zone_info(system_location_table, timezone)) != NULL) {
+ tmp->location.comments = strdup(li->comment);
-+ strncpy(tmp->location.country_code, li->code, 2);
++ strncpy(tmp->location.country_code, li->code, 2);
+ tmp->location.longitude = li->longitude;
+ tmp->location.latitude = li->latitude;
+ tmp->bc = 1;
-+ }
-+ else {
++ } else {
+ strcpy(tmp->location.country_code, "??");
+ tmp->bc = 0;
+ tmp->location.comments = strdup("");
} else {
tmp = NULL;
}
---- a/ext/date/lib/timelib.m4
-+++ b/ext/date/lib/timelib.m4
-@@ -78,3 +78,17 @@ stdlib.h
+diff -Naur php-5.6.9.orig/ext/date/lib/timelib.m4 php-5.6.9/ext/date/lib/timelib.m4
+--- php-5.6.9.orig/ext/date/lib/timelib.m4 2015-05-14 01:13:33.000000000 +0200
++++ php-5.6.9/ext/date/lib/timelib.m4 2015-05-18 22:31:36.000000000 +0200
+@@ -78,3 +78,17 @@
dnl Check for strtoll, atoll
AC_CHECK_FUNCS(strtoll atoll strftime)
-diff -u --recursive php-5.6.6-vanilla/configure.in php-5.6.6/configure.in
---- php-5.6.6-vanilla/configure.in 2015-02-26 22:10:51.865487530 -0500
-+++ php-5.6.6/configure.in 2015-02-26 22:29:59.043102135 -0500
-@@ -453,7 +453,10 @@
+--- a/configure.in
++++ b/configure.in
+@@ -453,7 +453,10 @@ PHP_CHECK_FUNC(gethostname, nsl)
PHP_CHECK_FUNC(gethostbyaddr, nsl)
PHP_CHECK_FUNC(yp_get_default_domain, nsl)
if test "$ac_cv_func_dlopen" = "yes"; then
AC_DEFINE(HAVE_LIBDL, 1, [ ])
fi
-diff -u --recursive php-5.6.6-vanilla/ext/fileinfo/config.m4 php-5.6.6/ext/fileinfo/config.m4
---- php-5.6.6-vanilla/ext/fileinfo/config.m4 2015-02-26 22:10:51.639487135 -0500
-+++ php-5.6.6/ext/fileinfo/config.m4 2015-02-26 22:22:47.645609128 -0500
-@@ -46,6 +46,10 @@
+--- a/ext/fileinfo/config.m4
++++ b/ext/fileinfo/config.m4
+@@ -46,6 +46,10 @@ int main(void)
AC_MSG_RESULT(no)
AC_MSG_NOTICE(using libmagic strcasestr implementation)
libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
])
PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
-diff -u --recursive php-5.6.6-vanilla/ext/opcache/config.m4 php-5.6.6/ext/opcache/config.m4
---- php-5.6.6-vanilla/ext/opcache/config.m4 2015-02-26 22:10:51.790487399 -0500
-+++ php-5.6.6/ext/opcache/config.m4 2015-02-26 22:34:19.240414394 -0500
-@@ -341,7 +341,14 @@
+--- a/ext/opcache/config.m4
++++ b/ext/opcache/config.m4
+@@ -227,7 +227,14 @@ AC_TRY_RUN([
flock_type=linux
AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
AC_MSG_RESULT("yes")
AC_MSG_CHECKING("whether flock struct is BSD ordered")
AC_TRY_RUN([
-@@ -357,7 +364,12 @@
+@@ -243,7 +250,12 @@ AC_TRY_RUN([
flock_type=bsd
AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type])
AC_MSG_RESULT("yes")
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)
-PKG_MD5SUM:=38d530f7efc373d64a8fb1637e3baaa7
+PKG_MD5SUM:=c685ef0b8e9f27b5e3db5db12b268ac6
PKG_LICENSE:=PSF
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
#
PYTHON_VERSION:=2.7
-PYTHON_VERSION_MICRO:=9
+PYTHON_VERSION_MICRO:=10
PYTHON_DIR:=$(STAGING_DIR)/usr
PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
PKG_NAME:=ruby
PKG_VERSION:=2.2.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_LIBVER:=2.2
--enable-shared \
--enable-static \
--disable-rpath \
- --enable-ipv6 \
+ $(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-install-doc \
--disable-install-capi \
--with-ruby-version=minor \
PKG_NAME:=apr
PKG_VERSION:=1.5.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://mirrors.ibiblio.org/apache/apr/
CONFIGURE_ARGS += \
--with-devrandom=/dev/urandom \
--disable-dso \
- --enable-ipv6
+ $(call autoconf_bool,CONFIG_IPV6,ipv6)
# XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure
CONFIGURE_VARS += \
#
-# Copyright (C) 2009-2014 OpenWrt.org
+# Copyright (C) 2009-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=db47
PKG_VERSION:=$(BASE_VERSION).4.NC
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_BUILD_DIR:=$(BUILD_DIR)/db-$(BASE_VERSION).NC
PKG_SOURCE:=db-$(BASE_VERSION).NC.tar.gz
--enable-shared \
--enable-static \
--disable-java \
- --with-mutex=UNIX/fcntl \
+ --with-mutex=POSIX/pthreads/library \
--disable-tcl \
--disable-rpc \
--enable-compat185 \
--- /dev/null
+#
+# 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:=freeradius-client
+PKG_VERSION:=1.1.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=freeradius-client-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/freeradius/
+PKG_MD5SUM:=43b4d21715b613dc4fe8ef128467fe78
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/freeradius-client
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=A library for radius clients
+ URL:=http://freeradius.org/freeradius-client/
+ MAINTAINER:=Nikos Mavrogiannopoulos <nmav@gnutls.org>
+endef
+
+define Package/freeradius-client/decription
+ FreeRADIUS Client is a framework and library for writing RADIUS
+ Clients. The library lets you develop a RADIUS-aware application
+ in less than 50 lines of C code. It is highly portable and runs on
+ Linux, many BSD variants and Solaris.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/include/freeradius-client.h \
+ $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/libfreeradius-client.{a,so*} \
+ $(1)/usr/lib/
+endef
+
+define Package/freeradius-client/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) \
+ $(PKG_INSTALL_DIR)/usr/lib/libfreeradius-client.so.* \
+ $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,freeradius-client))
--- /dev/null
+#
+# 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:=glpk
+PKG_VERSION:=4.55
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
+PKG_MD5SUM:=c632a7a631b8aed02e28eafcd99477f
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libglpk
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=The GNU Linear Programming Kit
+ URL:=http://www.gnu.org/software/glpk/
+endef
+
+define Package/libglpk/description
+ The GLPK (GNU Linear Programming Kit) package is intended for solving
+ large-scale linear programming (LP), mixed integer programming (MIP),
+ and other related problems. It is a set of routines written in ANSI C
+ and organized in the form of a callable library.
+endef
+
+define Package/glpsol
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=The GNU Linear Programming Kit (glpsol)
+ URL:=http://www.gnu.org/software/glpk/
+ DEPENDS:=libglpk
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
+endef
+
+define Package/libglpk/install
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+define Package/glpsol/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/glpsol $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,libglpk))
+$(eval $(call BuildPackage,glpsol))
PKG_NAME:=gnutls
PKG_VERSION:=3.4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
--- /dev/null
+From 6adde30fcea02d3cb541b5a5bfb3b12074f1f3e9 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@redhat.com>
+Date: Thu, 14 May 2015 14:00:11 +0200
+Subject: [PATCH] camellia256-gcm: corrected regression
+
+Reported by Manuel Pegourie-Gonnard.
+---
+ lib/nettle/cipher.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/nettle/cipher.c b/lib/nettle/cipher.c
+index 59e70dd..74e4203 100644
+--- a/lib/nettle/cipher.c
++++ b/lib/nettle/cipher.c
+@@ -302,7 +302,7 @@ static const struct nettle_cipher_st builtin_ciphers[] = {
+ .ctx_size = sizeof(struct gcm_camellia256_ctx),
+ .encrypt = _gcm_encrypt,
+ .decrypt = _gcm_decrypt,
+- .set_encrypt_key = (nettle_set_key_func*)gcm_camellia128_set_key,
++ .set_encrypt_key = (nettle_set_key_func*)gcm_camellia256_set_key,
+ .set_decrypt_key = (nettle_set_key_func*)gcm_camellia256_set_key,
+
+ .tag = (nettle_hash_digest_func*)gcm_camellia256_digest,
+--
+2.1.4
+
PKG_VERSION:=2.0.4
PKG_RELEASE:=1
-PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/
+PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
+ @SF/snort
PKG_SOURCE:=daq-$(PKG_VERSION).tar.gz
PKG_MD5SUM:=65e51d72e9d5d8b397e192e4e5857eff
PKG_BUILD_DIR:=$(BUILD_DIR)/daq-$(PKG_VERSION)
--- /dev/null
+#
+# 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:=libev
+PKG_VERSION:=4.19
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/
+PKG_MD5SUM:=01d1c672697f649b4f94abd0b70584ff
+PKG_LICENSE:=BSD-2-Clause
+PKG_MAINTAINER:=Karl Palsson <karlp@tweak.net.au>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libev
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=High-performance event loop
+ URL:=http://software.schmorp.de/pkg/libev.html
+endef
+
+define Package/libev/description
+ A full-featured and high-performance event loop that is loosely modelled after
+ libevent, but without its limitations and bugs.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --enable-static \
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libev/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libev))
--- /dev/null
+#
+# 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:=libextractor
+PKG_VERSION:=1.3
+PKG_RELEASE:=2
+
+# ToDo:
+# - package missing optional dependencies: libexiv2, giflib, gsf, librpm, smf, tidy
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
+PKG_MD5SUM:=35b8913dbebafe583a2781bf71509c48
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_INSTALL:=1
+
+PLUGINS:= \
+ archive:+libarchive \
+ deb \
+ dvi \
+ flac:+libflac \
+ gstreamer:+libgstreamer1:+libgst1app:+libgst1pbutils:+libgst1tag \
+ it \
+ jpeg:+libjpeg \
+ man \
+ mime:+libmagic \
+ mpeg:+libmpeg2 \
+ nsf \
+ nsfe \
+ odf \
+ ogg:+libvorbis \
+ png \
+ ps \
+ riff \
+ s3m \
+ sid \
+ thumbnailffmpeg:+libffmpeg-full:+libmagic \
+ tiff:+libtiff \
+ wav \
+ xm \
+ zip
+
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_ARGS += \
+ --enable-ffmpeg \
+ --with-gstreamer \
+ --disable-gsf \
+ --disable-rpath
+
+define Package/libextractor
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=GNU Libextractor
+ URL:=https://www.gnu.org/software/libextractor/
+ DEPENDS:=+libbz2 +libltdl +librt +zlib
+ MENU:=1
+endef
+
+define Package/libextractor/description
+ GNU Libextractor is a library used to extract meta data from files.
+ The goal is to provide developers of file-sharing networks, browsers or
+ WWW-indexing bots with a universal library to obtain simple keywords and meta
+ data to match against queries and to show to users instead of only relying on
+ filenames.
+endef
+
+define PluginGen
+define Package/libextractor-plugin-$(subst _,-,$(firstword $(subst :, ,$(1))))
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=GNU Libextractor ($(firstword $(subst :, ,$(1))) plugin)
+ URL:=https://www.gnu.org/software/libextractor/
+ DEPENDS:=libextractor $(wordlist 2,$(words $(subst :, ,$(1))),$(subst :, ,$(1)))
+endef
+endef
+
+$(foreach file,$(PLUGINS),$(eval $(call PluginGen,$(file))))
+
+define Package/extract
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=extract util from GNU Libextractor
+ URL:=https://www.gnu.org/software/libextractor/
+ DEPENDS:=+libextractor
+endef
+
+define Package/extract/description
+ libextractor contains the shell command extract that, similar to the
+ well-known file command, can extract meta data from a file an print the results
+ to stdout.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libextractor/install
+ $(INSTALL_DIR) $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+define PluginInstall
+define Package/libextractor-plugin-$(subst _,-,$(firstword $(subst :, ,$(1))))/install
+ $(INSTALL_DIR) $$(1)/usr/lib/libextractor
+ $(INSTALL_BIN) \
+ $(PKG_INSTALL_DIR)/usr/lib/libextractor/libextractor_$(firstword $(subst :, ,$(1))).so \
+ $$(1)/usr/lib/libextractor
+endef
+endef
+
+define Package/extract/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+endef
+
+$(foreach file,$(PLUGINS),$(eval $(call PluginInstall,$(file))))
+
+$(eval $(call BuildPackage,libextractor))
+$(foreach file,$(PLUGINS),$(eval $(call BuildPackage,libextractor-plugin-$(subst _,-,$(firstword $(subst :, ,$(file)))))))
+$(eval $(call BuildPackage,extract))
--- /dev/null
+#
+# 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
+
+# Although liblz4 exports a major.minor.patch version, it isn't always
+# incremented for new releases, so use the release tag instead.
+PKG_NAME:=liblz4
+PKG_VERSION:=r129
+PKG_RELEASE:=1
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_MAINTAINER:=Darik Horn <dajhorn@vanadac.com>
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/Cyan4973/lz4.git
+PKG_SOURCE_VERSION:=$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/liblz4
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Extremely fast compression
+ URL:=http://www.lz4.org/
+endef
+
+define Package/liblz4/description
+ LZ4 is a compression codec that features a very fast encoder and an
+ even faster decoder. This package provides the liblz4 shared library.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+define Build/Compile
+ $(MAKE) -C "$(PKG_BUILD_DIR)/lib" $(MAKE_INSTALL_FLAGS) \
+ CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ PREFIX="$(CONFIGURE_PREFIX)" \
+ install
+endef
+
+define Build/InstallDev
+ $(CP) $(PKG_INSTALL_DIR)/* $(1)/
+endef
+
+define Package/liblz4/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblz4.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,liblz4))
--- /dev/null
+#
+# 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:=libnet
+PKG_VERSION:=1.2-rc3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://sourceforge.net/projects/libnet-dev/files/
+PKG_MD5SUM:=f051e6e5bdecddb90f77c701c2ca1804
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_CFLAGS += $(FPIC)
+
+define Package/libnet-1.2.x
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+libpcap
+ TITLE:=Low-level packet creation library
+endef
+
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --enable-static
+
+CONFIGURE_VARS += \
+ ac_cv_libnet_endianess=$(ENDIANESS) \
+ ac_libnet_have_pf_packet=yes \
+ LL_INT_TYPE=libnet_link_linux
+
+define Build/Configure
+ (cd $(PKG_BUILD_DIR); touch \
+ configure.in \
+ include.m4 \
+ aclocal.m4 \
+ Makefile.in \
+ );
+ $(call Build/Configure/Default)
+endef
+
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet.h $(STAGING_DIR)/usr/lib/libnet-1.2.x/include
+
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/include/libnet
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet/libnet-*.h $(STAGING_DIR)/usr/lib/libnet-1.2.x/include/libnet
+
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,la,so*} $(STAGING_DIR)/usr/lib/libnet-1.2.x/lib
+endef
+
+define Package/libnet-1.2.x/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libnet-1.2.x))
include $(TOPDIR)/rules.mk
PKG_NAME:=libtorrent
-PKG_VERSION:=0.13.4-git-0
+PKG_VERSION:=0.13.4-git-1
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
--disable-debug \
--enable-openssl \
--disable-instrumentation \
- --with-zlib=$(STAGING_DIR)/usr
+ --with-zlib=$(STAGING_DIR)/usr \
+ $(call autoconf_bool,CONFIG_IPV6,ipv6)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
#
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=opus
PKG_VERSION:=1.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://downloads.xiph.org/releases/opus/
endef
define Package/libopus/description
- Opus is a totally open, royalty-free, highly versatile audio codec. Opus is
- unmatched for interactive speech and music transmission over the Internet, but
+ Opus is a totally open, royalty-free, highly versatile audio codec. Opus is
+ unmatched for interactive speech and music transmission over the Internet, but
is also intended for storage and streaming applications.
endef
+CONFIGURE_ARGS+= \
+ --disable-doc \
+ --disable-extra-programs
+
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/opus $(1)/usr/include/
#
-# Copyright (C) 2007 OpenWrt.org
+# 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:=protobuf
-PKG_VERSION:=2.5.0
+PKG_VERSION:=2.6.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://protobuf.googlecode.com/files
-PKG_MD5SUM:=a72001a9067a4c2c4e0e836d0f92ece4
+PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
+PKG_MD5SUM:=11aaac2d704eef8efd1867a807865d85
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=protobuf/host
-PKG_USE_MIPS16:=0
+PKG_USE_MIPS16:=0# MIPS16 prevents protobuf's usage of the 'sync' asm-opcode
PKG_INSTALL:=1
of its internal RPC protocols and file formats.
endef
-define Host/Compile
- $(MAKE) -C $(HOST_BUILD_DIR)
-endef
-
-define Host/Install
- $(MAKE) -C $(HOST_BUILD_DIR) install
-endef
-
-CONFIGURE_ARGS += --with-protoc=$(HOST_BUILD_DIR)/src/protoc
+CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOST)/bin/protoc
define Build/InstallDev
$(INSTALL_DIR) \
---- a/src/google/protobuf/stubs/platform_macros.h
-+++ b/src/google/protobuf/stubs/platform_macros.h
-@@ -49,7 +49,7 @@
- #elif defined(__ARMEL__)
- #define GOOGLE_PROTOBUF_ARCH_ARM 1
- #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+--- - 2015-05-19 16:27:29.770936016 +0200
++++ protobuf-2.6.1/src/google/protobuf/stubs/platform_macros.h 2015-05-19 13:49:52.115444643 +0200
+@@ -55,7 +55,7 @@
+ #elif defined(__aarch64__)
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
-#elif defined(__MIPSEL__)
+#elif defined(__MIPSEL__) || defined(__MIPSEB__)
- #define GOOGLE_PROTOBUF_ARCH_MIPS 1
- #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
- #elif defined(__pnacl__)
+ #if defined(__LP64__)
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
--- /dev/null
+--- - 2015-05-19 16:29:09.614344473 +0200
++++ protobuf-2.6.1/src/google/protobuf/stubs/atomicops_internals_mips_gcc.h 2015-05-19 13:49:52.127442746 +0200
+@@ -150,7 +150,7 @@
+ }
+
+ inline void MemoryBarrier() {
+- __asm__ __volatile__("sync" : : : "memory");
++ __asm__ __volatile__(".set mips2; sync; .set mips0" : : : "memory");
+ }
+
+ inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
--- /dev/null
+#
+# Copyright (C) 2006-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:=qrencode
+PKG_VERSION:=3.4.4
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://fukuchi.org/works/qrencode/
+PKG_MD5SUM:=be545f3ce36ea8fbb58612d72c4222de
+PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
+PKG_LICENSE:=LGPL-2.1+
+PKG_INSTALL:=1
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libqrencode
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Library for encoding data in a QR Code symbol
+ URL:=http://fukuchi.org/works/qrencode/
+endef
+
+define Package/libqrencode/description
+Libqrencode is a C library for encoding data in a QR Code symbol,
+a kind of 2D symbology that can be scanned by handy terminals such
+as a mobile phone with CCD. The capacity of QR Code is up to 7000
+digits or 4000 characters, and is highly robust.
+endef
+
+define Package/qrencode
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=qrencode binary for producing qr codes
+ URL:=http://fukuchi.org/works/qrencode/
+ DEPENDS:=+libqrencode
+endef
+
+define Package/qrencode/description
+Qrencode is a C program for encoding data in a QR Code symbol,
+a kind of 2D symbology that can be scanned by handy terminals such
+as a mobile phone with CCD. The capacity of QR Code is up to 7000
+digits or 4000 characters, and is highly robust.
+endef
+
+
+CONFIGURE_ARGS+= \
+ --enable-shared \
+ --enable-static \
+ --disable-rpath \
+ --disable-sdltest \
+ --without-tests
+
+TARGET_LDFLAGS+= -s
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ all install
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/qrencode.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libqrencode.{a,so*} $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/libqrencode.pc $(1)/usr/lib/pkgconfig/
+endef
+
+define Package/libqrencode/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libqrencode.so* $(1)/usr/lib/
+endef
+
+define Package/qrencode/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/qrencode $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libqrencode))
+$(eval $(call BuildPackage,qrencode))
--- /dev/null
+--- a/qrenc.c
++++ b/qrenc.c
+@@ -25,7 +25,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <png.h>
+ #include <getopt.h>
+
+ #include "qrencode.h"
+@@ -49,7 +48,6 @@
+ static int verbose = 0;
+
+ enum imageType {
+- PNG_TYPE,
+ EPS_TYPE,
+ SVG_TYPE,
+ ANSI_TYPE,
+@@ -60,7 +58,7 @@
+ ANSIUTF8_TYPE
+ };
+
+-static enum imageType image_type = PNG_TYPE;
++static enum imageType image_type = SVG_TYPE;
+
+ static const struct option options[] = {
+ {"help" , no_argument , NULL, 'h'},
+@@ -96,13 +94,13 @@
+ if(longopt) {
+ fprintf(stderr,
+ "Usage: qrencode [OPTION]... [STRING]\n"
+-"Encode input data in a QR Code and save as a PNG or EPS image.\n\n"
++"Encode input data in a QR Code and save as a SVG or EPS image.\n\n"
+ " -h, --help display the help message. -h displays only the help of short\n"
+ " options.\n\n"
+ " -o FILENAME, --output=FILENAME\n"
+ " write image to FILENAME. If '-' is specified, the result\n"
+ " will be output to standard output. If -S is given, structured\n"
+-" symbols are written to FILENAME-01.png, FILENAME-02.png, ...\n"
++" symbols are written to FILENAME-01.svg, FILENAME-02.svg, ...\n"
+ " (suffix is removed from FILENAME, if specified)\n"
+ " -s NUMBER, --size=NUMBER\n"
+ " specify module size in dots (pixels). (default=3)\n\n"
+@@ -116,9 +114,9 @@
+ " specify the width of the margins. (default=4 (2 for Micro QR)))\n\n"
+ " -d NUMBER, --dpi=NUMBER\n"
+ " specify the DPI of the generated PNG. (default=72)\n\n"
+-" -t {PNG,EPS,SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}, --type={PNG,EPS,\n"
++" -t {EPS,SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}, --type={EPS,\n"
+ " SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}\n"
+-" specify the type of the generated image. (default=PNG)\n\n"
++" specify the type of the generated image. (default=SVG)\n\n"
+ " -S, --structured\n"
+ " make structured symbols. Version must be specified.\n\n"
+ " -k, --kanji assume that the input text contains kanji (shift-jis).\n\n"
+@@ -133,7 +131,7 @@
+ " --background=RRGGBB[AA]\n"
+ " specify foreground/background color in hexadecimal notation.\n"
+ " 6-digit (RGB) or 8-digit (RGBA) form are supported.\n"
+-" Color output support available only in PNG and SVG.\n"
++" Color output support available only in SVG.\n"
+ " -V, --version\n"
+ " display the version number and copyrights of the qrencode.\n\n"
+ " --verbose\n"
+@@ -153,12 +151,12 @@
+ } else {
+ fprintf(stderr,
+ "Usage: qrencode [OPTION]... [STRING]\n"
+-"Encode input data in a QR Code and save as a PNG or EPS image.\n\n"
++"Encode input data in a QR Code and save as a SVG or EPS image.\n\n"
+ " -h display this message.\n"
+ " --help display the usage of long options.\n"
+ " -o FILENAME write image to FILENAME. If '-' is specified, the result\n"
+ " will be output to standard output. If -S is given, structured\n"
+-" symbols are written to FILENAME-01.png, FILENAME-02.png, ...\n"
++" symbols are written to FILENAME-01.svg, FILENAME-02.svg, ...\n"
+ " (suffix is removed from FILENAME, if specified)\n"
+ " -s NUMBER specify module size in dots (pixels). (default=3)\n"
+ " -l {LMQH} specify error correction level from L (lowest) to H (highest).\n"
+@@ -166,8 +164,8 @@
+ " -v NUMBER specify the version of the symbol. (default=auto)\n"
+ " -m NUMBER specify the width of the margins. (default=4 (2 for Micro))\n"
+ " -d NUMBER specify the DPI of the generated PNG. (default=72)\n"
+-" -t {PNG,EPS,SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}\n"
+-" specify the type of the generated image. (default=PNG)\n"
++" -t {EPS,SVG,ANSI,ANSI256,ASCII,ASCIIi,UTF8,ANSIUTF8}\n"
++" specify the type of the generated image. (default=SVG)\n"
+ " -S make structured symbols. Version must be specified.\n"
+ " -k assume that the input text contains kanji (shift-jis).\n"
+ " -c encode lower-case alphabet characters in 8-bit mode. (default)\n"
+@@ -178,7 +176,7 @@
+ " --background=RRGGBB[AA]\n"
+ " specify foreground/background color in hexadecimal notation.\n"
+ " 6-digit (RGB) or 8-digit (RGBA) form are supported.\n"
+-" Color output support available only in PNG and SVG.\n"
++" Color output support available only in SVG.\n"
+ " -V display the version number and copyrights of the qrencode.\n"
+ " [STRING] input data. If it is not specified, data will be taken from\n"
+ " standard input.\n"
+@@ -253,128 +251,6 @@
+ return fp;
+ }
+
+-static int writePNG(QRcode *qrcode, const char *outfile)
+-{
+- static FILE *fp; // avoid clobbering by setjmp.
+- png_structp png_ptr;
+- png_infop info_ptr;
+- png_colorp palette;
+- png_byte alpha_values[2];
+- unsigned char *row, *p, *q;
+- int x, y, xx, yy, bit;
+- int realwidth;
+-
+- realwidth = (qrcode->width + margin * 2) * size;
+- row = (unsigned char *)malloc((realwidth + 7) / 8);
+- if(row == NULL) {
+- fprintf(stderr, "Failed to allocate memory.\n");
+- exit(EXIT_FAILURE);
+- }
+-
+- if(outfile[0] == '-' && outfile[1] == '\0') {
+- fp = stdout;
+- } else {
+- fp = fopen(outfile, "wb");
+- if(fp == NULL) {
+- fprintf(stderr, "Failed to create file: %s\n", outfile);
+- perror(NULL);
+- exit(EXIT_FAILURE);
+- }
+- }
+-
+- png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+- if(png_ptr == NULL) {
+- fprintf(stderr, "Failed to initialize PNG writer.\n");
+- exit(EXIT_FAILURE);
+- }
+-
+- info_ptr = png_create_info_struct(png_ptr);
+- if(info_ptr == NULL) {
+- fprintf(stderr, "Failed to initialize PNG write.\n");
+- exit(EXIT_FAILURE);
+- }
+-
+- if(setjmp(png_jmpbuf(png_ptr))) {
+- png_destroy_write_struct(&png_ptr, &info_ptr);
+- fprintf(stderr, "Failed to write PNG image.\n");
+- exit(EXIT_FAILURE);
+- }
+-
+- palette = (png_colorp) malloc(sizeof(png_color) * 2);
+- if(palette == NULL) {
+- fprintf(stderr, "Failed to allocate memory.\n");
+- exit(EXIT_FAILURE);
+- }
+- palette[0].red = fg_color[0];
+- palette[0].green = fg_color[1];
+- palette[0].blue = fg_color[2];
+- palette[1].red = bg_color[0];
+- palette[1].green = bg_color[1];
+- palette[1].blue = bg_color[2];
+- alpha_values[0] = fg_color[3];
+- alpha_values[1] = bg_color[3];
+- png_set_PLTE(png_ptr, info_ptr, palette, 2);
+- png_set_tRNS(png_ptr, info_ptr, alpha_values, 2, NULL);
+-
+- png_init_io(png_ptr, fp);
+- png_set_IHDR(png_ptr, info_ptr,
+- realwidth, realwidth,
+- 1,
+- PNG_COLOR_TYPE_PALETTE,
+- PNG_INTERLACE_NONE,
+- PNG_COMPRESSION_TYPE_DEFAULT,
+- PNG_FILTER_TYPE_DEFAULT);
+- png_set_pHYs(png_ptr, info_ptr,
+- dpi * INCHES_PER_METER,
+- dpi * INCHES_PER_METER,
+- PNG_RESOLUTION_METER);
+- png_write_info(png_ptr, info_ptr);
+-
+- /* top margin */
+- memset(row, 0xff, (realwidth + 7) / 8);
+- for(y=0; y<margin * size; y++) {
+- png_write_row(png_ptr, row);
+- }
+-
+- /* data */
+- p = qrcode->data;
+- for(y=0; y<qrcode->width; y++) {
+- bit = 7;
+- memset(row, 0xff, (realwidth + 7) / 8);
+- q = row;
+- q += margin * size / 8;
+- bit = 7 - (margin * size % 8);
+- for(x=0; x<qrcode->width; x++) {
+- for(xx=0; xx<size; xx++) {
+- *q ^= (*p & 1) << bit;
+- bit--;
+- if(bit < 0) {
+- q++;
+- bit = 7;
+- }
+- }
+- p++;
+- }
+- for(yy=0; yy<size; yy++) {
+- png_write_row(png_ptr, row);
+- }
+- }
+- /* bottom margin */
+- memset(row, 0xff, (realwidth + 7) / 8);
+- for(y=0; y<margin * size; y++) {
+- png_write_row(png_ptr, row);
+- }
+-
+- png_write_end(png_ptr, info_ptr);
+- png_destroy_write_struct(&png_ptr, &info_ptr);
+-
+- fclose(fp);
+- free(row);
+- free(palette);
+-
+- return 0;
+-}
+-
+ static int writeEPS(QRcode *qrcode, const char *outfile)
+ {
+ FILE *fp;
+@@ -831,9 +707,6 @@
+ }
+
+ switch(image_type) {
+- case PNG_TYPE:
+- writePNG(qrcode, outfile);
+- break;
+ case EPS_TYPE:
+ writeEPS(qrcode, outfile);
+ break;
+@@ -887,9 +760,6 @@
+ size_t suffix_size;
+
+ switch(image_type) {
+- case PNG_TYPE:
+- type_suffix = ".png";
+- break;
+ case EPS_TYPE:
+ type_suffix = ".eps";
+ break;
+@@ -948,9 +818,6 @@
+ }
+
+ switch(image_type) {
+- case PNG_TYPE:
+- writePNG(p->code, filename);
+- break;
+ case EPS_TYPE:
+ writeEPS(p->code, filename);
+ break;
+@@ -1062,9 +929,7 @@
+ }
+ break;
+ case 't':
+- if(strcasecmp(optarg, "png") == 0) {
+- image_type = PNG_TYPE;
+- } else if(strcasecmp(optarg, "eps") == 0) {
++ if(strcasecmp(optarg, "eps") == 0) {
+ image_type = EPS_TYPE;
+ } else if(strcasecmp(optarg, "svg") == 0) {
+ image_type = SVG_TYPE;
+@@ -1133,11 +998,6 @@
+ exit(EXIT_SUCCESS);
+ }
+
+- if(outfile == NULL && image_type == PNG_TYPE) {
+- fprintf(stderr, "No output filename is given.\n");
+- exit(EXIT_FAILURE);
+- }
+-
+ if(optind < argc) {
+ intext = (unsigned char *)argv[optind];
+ length = strlen((char *)intext);
+--- a/configure.ac
++++ b/configure.ac
+@@ -58,9 +58,6 @@
+ [build_tools=$withval], [build_tools=yes])
+
+ AM_CONDITIONAL(BUILD_TOOLS, [test "x$build_tools" = "xyes" ])
+-if test x$build_tools = xyes ; then
+- PKG_CHECK_MODULES(png, "libpng")
+-fi
+
+ dnl --with-tests
+ AC_ARG_WITH([tests], [AS_HELP_STRING([--with-tests], [build tests [default=no]])],
+@@ -80,12 +77,6 @@
+ echo "/* #undef WITH_TESTS */" >>confdefs.h
+ fi
+
+-if test x$build_tests = xyes ; then
+- SDL_REQUIRED_VERSION=1.2.0
+- AM_PATH_SDL($SDL_REQUIRED_VERSION,,AC_MSG_WARN([*** SDL $SDL_REQUIRED_VERSION or better is required.]))
+- AC_MSG_NOTICE([SDL check done.])
+- AM_ICONV_LINK
+-fi
+ AM_CONDITIONAL(HAVE_SDL, [test "x$SDL_CFLAGS" != "x" ])
+
+
include $(TOPDIR)/rules.mk
PKG_NAME:=sqlite
-PKG_VERSION:=3080803
+PKG_VERSION:=3081002
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.sqlite.org/2015/
-PKG_MD5SUM:=51272e875879ee893e51070b07c33888
+PKG_MD5SUM:=a18bfc015cd49a1e7a961b7b77bc3b37
PKG_LICENSE:=PUBLICDOMAIN
PKG_LICENSE_FILES:=
select FFMPEG_CUSTOM_DECODER_ape
select FFMPEG_CUSTOM_DECODER_atrac3
select FFMPEG_CUSTOM_DECODER_flac
- select FFMPEG_CUSTOM_SELECT_libopus
select FFMPEG_CUSTOM_DECODER_mp2
select FFMPEG_CUSTOM_DECODER_mp3
select FFMPEG_CUSTOM_DECODER_mpc7
select FFMPEG_CUSTOM_DECODER_mpc8
+ select FFMPEG_CUSTOM_DECODER_opus
select FFMPEG_CUSTOM_DECODER_pcm_s16be
select FFMPEG_CUSTOM_DECODER_pcm_s16le
select FFMPEG_CUSTOM_SELECT_speex
select FFMPEG_CUSTOM_DEMUXER_wv
select FFMPEG_CUSTOM_PARSER_aac
select FFMPEG_CUSTOM_PARSER_aac_latm
- select FFMPEG_CUSTOM_PARSER_flac
select FFMPEG_CUSTOM_PARSER_ac3
+ select FFMPEG_CUSTOM_PARSER_flac
select FFMPEG_CUSTOM_PARSER_mpegaudio
+ select FFMPEG_CUSTOM_PARSER_opus
select FFMPEG_CUSTOM_PROTOCOL_file
select FFMPEG_CUSTOM_PROTOCOL_http
select FFMPEG_CUSTOM_PROTOCOL_rtp
bool "Musepack 8"
select FFMPEG_CUSTOM_DEMUXER_mpc8
+config FFMPEG_CUSTOM_DECODER_opus
+ bool "Opus"
+
config FFMPEG_CUSTOM_DECODER_pcm_s16be
bool "PCM signed 16-bit big-endian"
config FFMPEG_CUSTOM_PARSER_mpeg4video
bool "MPEG-4 Video"
+config FFMPEG_CUSTOM_PARSER_opus
+ bool "Opus"
+
comment "Protocols ---"
config FFMPEG_CUSTOM_PROTOCOL_file
PKG_NAME:=ffmpeg
PKG_VERSION:=2.6.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ffmpeg.org/releases/
mp3* \
mpc7 \
mpc8 \
+ opus \
pcm_* \
vorbis \
wavpack \
FFMPEG_AUDIO_PARSERS:= \
aac \
aac_latm \
- flac \
ac3 \
+ flac \
mpegaudio \
+ opus \
FFMPEG_AUDIO_PROTOCOLS:= \
file http icecast rtp tcp udp
define Package/libffmpeg-audio-dec
$(call Package/libffmpeg/Default)
TITLE+= (audio)
- DEPENDS+= @DEVEL +libopus +libspeex
+ DEPENDS+= @BUILD_PATENTED +libspeex
VARIANT:=audio-dec
endef
$(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \
$(call FFMPEG_ENABLE,parser,$(FFMPEG_AUDIO_PARSERS)) \
$(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \
- --enable-libopus --enable-decoder=libopus \
--enable-libspeex --enable-decoder=libspeex \
--disable-decoder=pcm_bluray,pcm_dvd \
--- /dev/null
+#
+# 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:=bridge-utils
+PKG_VERSION:=1.5
+PKG_RELEASE:=4
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/bridge-utils.git
+PKG_SOURCE_VERSION:=v${PKG_VERSION}
+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_FIXUP:=autoreconf
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bridge
+ SECTION:=net
+ CATEGORY:=Base system
+ TITLE:=Ethernet bridging configuration utility
+ URL:=http://bridge.sourceforge.net/
+ PKG_MAINTAINER:=Nikolay Martynov <mar.kolya@gmail.com>
+endef
+
+define Package/bridge/description
+ Manage ethernet bridging: a way to connect networks together to
+ form a larger network.
+endef
+
+TARGET_CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
+
+CONFIGURE_ARGS += \
+ --with-linux-headers="$(LINUX_DIR)" \
+
+define Package/bridge/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin
+endef
+
+define Package/bridge/prerm
+#!/bin/sh
+$${IPKG_INSTROOT}/bin/busybox brctl -h 2>&1 | grep -q BusyBox && \
+ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/sbin/brctl
+exit 0
+endef
+
+$(eval $(call BuildPackage,bridge))
--- /dev/null
+--- a/libbridge/Makefile.in
++++ b/libbridge/Makefile.in
+@@ -5,7 +5,7 @@ AR=ar
+ RANLIB=@RANLIB@
+
+ CC=@CC@
+-CFLAGS = -Wall -g $(KERNEL_HEADERS)
++CFLAGS = -Wall -g @CFLAGS@ $(KERNEL_HEADERS)
+
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
--- /dev/null
+--- a/libbridge/libbridge.h
++++ b/libbridge/libbridge.h
+@@ -20,6 +20,7 @@
+ #define _LIBBRIDGE_H
+
+ #include <sys/socket.h>
++#include <netinet/in.h>
+ #include <linux/if.h>
+ #include <linux/if_bridge.h>
+
include $(TOPDIR)/rules.mk
PKG_NAME:=clamav
-PKG_VERSION:=0.98.6
+PKG_VERSION:=0.98.7
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/clamav/clamav/$(PKG_VERSION)/
-PKG_MD5SUM:=7f4f7e82a09e42c4ebf153d6d452d9d8
+PKG_SOURCE_URL:=http://sourceforge.net/projects/clamav/files/clamav/$(PKG_VERSION)/
+PKG_MD5SUM:=157c601161da1c2d5a0e48ea1b49e067
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chilli* $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/iptables
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib*.so $(1)/usr/lib/iptables/
+ $(if $(CONFIG_PACKAGE_kmod-ipt-coova), \
+ $(INSTALL_DIR) $(1)/usr/lib/iptables; \
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib*.so $(1)/usr/lib/iptables/ \
+ )
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) files/chilli.init $(1)/etc/init.d/chilli
$(INSTALL_DIR) $(1)/etc/config
PKG_NAME:=emailrelay
PKG_VERSION:=1.9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
start() {
logger -t 'emailrelay' "Starting emailrelay service."
- service_start emailrelay --as-server --poll 60 --forward-to smtpserver:smtpport --spool-dir /tmp --client-tls --client-auth /etc/emailrelay.auth --server-auth /etc/emailrelay.auth --log
+ service_start /usr/bin/emailrelay --as-server --poll 60 --forward-to smtpserver:smtpport --spool-dir /tmp --client-tls --client-auth /etc/emailrelay.auth --server-auth /etc/emailrelay.auth --log
}
stop() {
logger -t 'emailrelay' "Stopping emailrelay service."
- killall -9 emailrelay
+ service_stop /usr/bin/emailrelay
}
--- /dev/null
+menu "Configuration"
+ depends on PACKAGE_ethtool
+
+ config ETHTOOL_PRETTY_DUMP
+ bool "Enable pretty printing"
+
+endmenu
PKG_NAME:=ethtool
PKG_VERSION:=3.18
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
+PKG_CONFIG_DEPENDS:=ETHTOOL_PRETTY_DUMP
+
include $(INCLUDE_DIR)/package.mk
define Package/ethtool
network interface
endef
+define Package/ethtool/config
+ source "$(SOURCE)/Config.in"
+endef
+
+ifeq ($(CONFIG_ETHTOOL_PRETTY_DUMP),y)
+CONFIGURE_ARGS += --enable-pretty-dump
+else
+CONFIGURE_ARGS += --disable-pretty-dump
+endif
+
define Package/ethtool/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethtool $(1)/usr/sbin
PKG_RELEASE:=1
PKG_SOURCE:=freeradius-server-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/freeradius/
+PKG_SOURCE_URL:=\
+ ftp://ftp.freeradius.org/pub/freeradius/ \
+ ftp://ftp.freeradius.org/pub/freeradius/old/
PKG_MD5SUM:=b84b9ffa1ac9b20b2643e5a08ac483a1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=GPL-2.0
PKG_NAME:=fwknop
PKG_VERSION:=2.6.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.cipherdyne.org/fwknop/download
--- /dev/null
+diff --git a/CREDITS b/CREDITS
+index de17d9e..38e2108 100644
+--- a/CREDITS
++++ b/CREDITS
+@@ -1,5 +1,6 @@
+ Jonathan Bennett
+ - Contributed OpenWRT support - see the extras/openwrt/ directory.
++ - Suggested the addition of the --key-gen option to fwknopd.
+
+ Sebastien Jeanquier
+ - Assisted with getting fwknop included in BackTrack Linux - the choice
+diff --git a/ChangeLog b/ChangeLog
+index 21a5093..4daf008 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,8 @@
++fwknop-2.6.7 (05//2015):
++ - Added --key-gen to fwknopd. This feature was suggested by Jonathan
++ Bennett, and will help with ease of use efforts. The first platform to
++ take advantage of this will likely be OpenWRT thanks to Jonathan.
++
+ fwknop-2.6.6 (04/23/2015):
+ - [server] Add the ability for fwknopd to function as an generic SPA
+ gateway. This allows scenarios such as the fwknopd system providing DHCP
+diff --git a/client/config_init.c b/client/config_init.c
+index cdb233d..f0ae135 100644
+--- a/client/config_init.c
++++ b/client/config_init.c
+@@ -199,7 +199,7 @@ static int critical_var_array[] =
+ };
+
+ /**
+- * @brief Generate Rijndael + HMAC keys from /dev/random (base64 encoded) and exit.
++ * @brief Generate Rijndael + HMAC keys from /dev/urandom (base64 encoded).
+ *
+ * @param options FKO command line option structure
+ */
+diff --git a/client/fwknop_common.h b/client/fwknop_common.h
+index aef20c4..c57db02 100644
+--- a/client/fwknop_common.h
++++ b/client/fwknop_common.h
+@@ -69,8 +69,6 @@
+ #define MAX_HOSTNAME_LEN 70
+ #define MAX_URL_HOST_LEN 256
+ #define MAX_URL_PATH_LEN 1024
+-#define MAX_KEY_LEN 128
+-#define MAX_B64_KEY_LEN 180
+
+ /* fwknop client configuration parameters and values
+ */
+@@ -156,10 +154,10 @@ typedef struct fko_cli_options
+ unsigned char use_gpg;
+ unsigned char use_gpg_agent;
+ unsigned char gpg_no_signing_pw;
++ unsigned char key_gen;
+ int time_offset_plus;
+ int time_offset_minus;
+ int fw_timeout;
+- int key_gen;
+
+ char use_rc_stanza[MAX_LINE_LEN];
+ unsigned char got_named_stanza;
+diff --git a/common/common.h b/common/common.h
+index b63e7c2..c7b2e57 100644
+--- a/common/common.h
++++ b/common/common.h
+@@ -157,6 +157,9 @@ enum {
+ #define MAX_GPG_KEY_ID 128
+ #define MAX_USERNAME_LEN 30
+
++#define MAX_KEY_LEN 128
++#define MAX_B64_KEY_LEN 180
++
+ /* Command line argument / argv handling
+ */
+ #define MAX_CMDLINE_ARGS 30 /*!< should be way more than enough */
+diff --git a/doc/fwknop.man.asciidoc b/doc/fwknop.man.asciidoc
+index 070ac77..efa99a7 100644
+--- a/doc/fwknop.man.asciidoc
++++ b/doc/fwknop.man.asciidoc
+@@ -196,6 +196,11 @@ GENERAL OPTIONS
+ keys are generally more secure than passphrases that are typed in from the
+ command line.
+
++*--key-gen-file*='<file>'::
++ Write generated keys to the specified file. Note that the file is
++ overwritten if it already exists. If this option is not given, then
++ *--key-gen* writes the keys to stdout.
++
+ *--key-len*='<length>'::
+ Specify the number of bytes for a generated Rijndael key. The maximum size
+ is currently 128 bytes.
+diff --git a/server/cmd_opts.h b/server/cmd_opts.h
+index bc1eee1..d7a645c 100644
+--- a/server/cmd_opts.h
++++ b/server/cmd_opts.h
+@@ -141,6 +141,10 @@ enum {
+ FW_LIST = 0x200,
+ FW_LIST_ALL,
+ FW_FLUSH,
++ KEY_GEN_FILE,
++ KEY_LEN,
++ HMAC_KEY_LEN,
++ HMAC_DIGEST_TYPE,
+ AFL_PKT_FILE,
+ GPG_HOME_DIR,
+ GPG_EXE_PATH,
+@@ -178,7 +182,12 @@ static struct option cmd_opts[] =
+ {"fault-injection-tag", 1, NULL, FAULT_INJECTION_TAG},
+ {"help", 0, NULL, 'h'},
+ {"interface", 1, NULL, 'i'},
+- {"kill", 0, NULL, 'K'},
++ {"key-gen", 0, NULL, 'k'},
++ {"key-gen-file", 1, NULL, KEY_GEN_FILE },
++ {"key-len", 1, NULL, KEY_LEN },
++ {"hmac-key-len", 1, NULL, HMAC_KEY_LEN },
++ {"hmac-digest-type", 1, NULL, HMAC_DIGEST_TYPE },
++ {"kill", 0, NULL, 'K' },
+ {"fw-flush", 0, NULL, FW_FLUSH },
+ {"fw-list", 0, NULL, FW_LIST },
+ {"fw-list-all", 0, NULL, FW_LIST_ALL },
+diff --git a/server/config_init.c b/server/config_init.c
+index 0ddceee..2f1d293 100644
+--- a/server/config_init.c
++++ b/server/config_init.c
+@@ -201,6 +201,69 @@ validate_int_var_ranges(fko_srv_options_t *opts)
+ return;
+ }
+
++/**
++ * @brief Generate Rijndael + HMAC keys from /dev/urandom (base64 encoded).
++ *
++ * @param options FKO command line option structure
++ */
++static void
++generate_keys(fko_srv_options_t *options)
++{
++ char key_base64[MAX_B64_KEY_LEN+1];
++ char hmac_key_base64[MAX_B64_KEY_LEN+1];
++
++ FILE *key_gen_file_ptr = NULL;
++ int res;
++
++ /* Set defaults and validate for --key-gen mode
++ */
++ if(options->key_len == 0)
++ options->key_len = FKO_DEFAULT_KEY_LEN;
++
++ if(options->hmac_key_len == 0)
++ options->hmac_key_len = FKO_DEFAULT_HMAC_KEY_LEN;
++
++ if(options->hmac_type == 0)
++ options->hmac_type = FKO_DEFAULT_HMAC_MODE;
++
++ /* Zero out the key buffers */
++ memset(key_base64, 0x00, sizeof(key_base64));
++ memset(hmac_key_base64, 0x00, sizeof(hmac_key_base64));
++
++ /* Generate the key through libfko */
++ res = fko_key_gen(key_base64, options->key_len,
++ hmac_key_base64, options->hmac_key_len,
++ options->hmac_type);
++
++ if(res != FKO_SUCCESS)
++ {
++ log_msg(LOG_ERR, "%s: fko_key_gen: Error %i - %s",
++ MY_NAME, res, fko_errstr(res));
++ clean_exit(options, NO_FW_CLEANUP, EXIT_FAILURE);
++ }
++
++ if(options->key_gen_file[0] != '\0')
++ {
++ if ((key_gen_file_ptr = fopen(options->key_gen_file, "w")) == NULL)
++ {
++ log_msg(LOG_ERR, "Unable to create key gen file: %s: %s",
++ options->key_gen_file, strerror(errno));
++ clean_exit(options, NO_FW_CLEANUP, EXIT_FAILURE);
++ }
++ fprintf(key_gen_file_ptr, "KEY_BASE64: %s\nHMAC_KEY_BASE64: %s\n",
++ key_base64, hmac_key_base64);
++ fclose(key_gen_file_ptr);
++ fprintf(stdout, "[+] Wrote Rijndael and HMAC keys to: %s",
++ options->key_gen_file);
++ }
++ else
++ {
++ fprintf(stdout, "KEY_BASE64: %s\nHMAC_KEY_BASE64: %s\n",
++ key_base64, hmac_key_base64);
++ }
++ clean_exit(options, NO_FW_CLEANUP, EXIT_SUCCESS);
++}
++
+ /* Parse the config file...
+ */
+ static void
+@@ -427,7 +490,7 @@ validate_options(fko_srv_options_t *opts)
+ if(opts->config[CONF_ENABLE_DIGEST_PERSISTENCE] == NULL)
+ set_config_entry(opts, CONF_ENABLE_DIGEST_PERSISTENCE,
+ DEF_ENABLE_DIGEST_PERSISTENCE);
+-
++
+ /* Enable destination rule.
+ */
+ if(opts->config[CONF_ENABLE_DESTINATION_RULE] == NULL)
+@@ -928,8 +991,9 @@ config_init(fko_srv_options_t *opts, int argc, char **argv)
+
+ /* First, scan the command-line args for -h/--help or an alternate
+ * configuration file. If we find an alternate config file, use it,
+- * otherwise use the default. We also grab any override config files
+- * as well.
++ * otherwise use the default. We also grab any override config files
++ * as well. In addition, we handle key generation here since this is
++ * independent of configuration parsing.
+ */
+ while ((cmd_arg = getopt_long(argc, argv,
+ GETOPTS_OPTION_STRING, cmd_opts, &index)) != -1) {
+@@ -952,6 +1016,45 @@ config_init(fko_srv_options_t *opts, int argc, char **argv)
+ if(got_override_config > 0)
+ break;
+
++ case 'k':
++ opts->key_gen = 1;
++ break;
++ case KEY_GEN_FILE:
++ opts->key_gen = 1;
++ strlcpy(opts->key_gen_file, optarg, sizeof(opts->key_gen_file));
++ break;
++ case KEY_LEN: /* used in --key-gen mode only */
++ opts->key_len = strtol_wrapper(optarg, 1,
++ MAX_KEY_LEN, NO_EXIT_UPON_ERR, &is_err);
++ if(is_err != FKO_SUCCESS)
++ {
++ log_msg(LOG_ERR,
++ "Invalid key length '%s', must be in [%d-%d]",
++ optarg, 1, MAX_KEY_LEN);
++ clean_exit(opts, NO_FW_CLEANUP, EXIT_FAILURE);
++ }
++ break;
++ case HMAC_DIGEST_TYPE: /* used in --key-gen mode only */
++ if((opts->hmac_type = hmac_digest_strtoint(optarg)) < 0)
++ {
++ log_msg(LOG_ERR,
++ "* Invalid hmac digest type: %s, use {md5,sha1,sha256,sha384,sha512}",
++ optarg);
++ clean_exit(opts, NO_FW_CLEANUP, EXIT_FAILURE);
++ }
++ break;
++ case HMAC_KEY_LEN: /* used in --key-gen mode only */
++ opts->hmac_key_len = strtol_wrapper(optarg, 1,
++ MAX_KEY_LEN, NO_EXIT_UPON_ERR, &is_err);
++ if(is_err != FKO_SUCCESS)
++ {
++ log_msg(LOG_ERR,
++ "Invalid hmac key length '%s', must be in [%d-%d]",
++ optarg, 1, MAX_KEY_LEN);
++ clean_exit(opts, NO_FW_CLEANUP, EXIT_FAILURE);
++ }
++ break;
++
+ /* Look for override configuration file arg.
+ */
+ case 'O':
+@@ -965,6 +1068,9 @@ config_init(fko_srv_options_t *opts, int argc, char **argv)
+ }
+ }
+
++ if(opts->key_gen)
++ generate_keys(opts);
++
+ /* If no alternate configuration file was specified, we use the
+ * default.
+ */
+diff --git a/server/fwknopd_common.h b/server/fwknopd_common.h
+index ecf2a81..8c33eaa 100644
+--- a/server/fwknopd_common.h
++++ b/server/fwknopd_common.h
+@@ -585,10 +585,14 @@ typedef struct fko_srv_options
+ unsigned char fw_list; /* List current firewall rules */
+ unsigned char fw_list_all; /* List all current firewall rules */
+ unsigned char fw_flush; /* Flush current firewall rules */
++ unsigned char key_gen; /* Generate keys and exit */
++ unsigned char exit_after_parse_config; /* Parse config and exit */
++
++ /* Operational flags
++ */
+ unsigned char test; /* Test mode flag */
+ unsigned char afl_fuzzing; /* SPA pkts from stdin for AFL fuzzing */
+ unsigned char verbose; /* Verbose mode flag */
+- unsigned char exit_after_parse_config; /* Parse config and exit */
+ unsigned char enable_udp_server; /* Enable UDP server mode */
+
+ unsigned char firewd_disable_check_support; /* Don't use firewall-cmd ... -C */
+@@ -605,6 +609,13 @@ typedef struct fko_srv_options
+ int tcp_server_pid;
+ int lock_fd;
+
++ /* Values used in --key-gen mode only
++ */
++ char key_gen_file[MAX_PATH_LEN];
++ int key_len;
++ int hmac_key_len;
++ int hmac_type;
++
+ #if USE_FILE_CACHE
+ struct digest_cache_list *digest_cache; /* In-memory digest cache list */
+ #endif
+diff --git a/test/tests/basic_operations.pl b/test/tests/basic_operations.pl
+index f4dde2e..76a509d 100644
+--- a/test/tests/basic_operations.pl
++++ b/test/tests/basic_operations.pl
+@@ -390,6 +390,14 @@
+ 'exec_err' => $YES,
+ 'cmdline' => "$default_client_args --key-gen -K " . 'A'x1030
+ },
++ {
++ 'category' => 'basic operations',
++ 'subcategory' => 'server',
++ 'detail' => '--key-gen file path (-K) too long',
++ 'function' => \&generic_exec,
++ 'exec_err' => $YES,
++ 'cmdline' => "$fwknopdCmd --key-gen --key-gen-file " . 'A'x1030
++ },
+
+ {
+ 'category' => 'basic operations',
+diff --git a/test/tests/rijndael.pl b/test/tests/rijndael.pl
+index 26aab6a..34af65e 100644
+--- a/test/tests/rijndael.pl
++++ b/test/tests/rijndael.pl
+@@ -421,33 +421,6 @@
+ 'key_file' => $cf{'rc_named_key'},
+ },
+
+- ### --key-gen tests
+- {
+- 'category' => 'Rijndael',
+- 'subcategory' => 'client',
+- 'detail' => '--key-gen',
+- 'function' => \&generic_exec,
+- 'cmdline' => "$fwknopCmd --key-gen",
+- 'positive_output_matches' => [qr/^KEY_BASE64\:?\s\S{10}/,
+- qw/HMAC_KEY_BASE64\:?\s\S{10}/],
+- },
+- {
+- 'category' => 'Rijndael',
+- 'subcategory' => 'client',
+- 'detail' => "--key-gen $uniq_keys key uniqueness",
+- 'function' => \&key_gen_uniqueness,
+- 'cmdline' => "$fwknopCmd --key-gen", ### no valgrind string (too slow for 100 client exec's)
+- 'disable_valgrind' => $YES,
+- },
+- {
+- 'category' => 'Rijndael',
+- 'subcategory' => 'client',
+- 'detail' => '--key-gen to file',
+- 'function' => \&generic_exec,
+- 'cmdline' => "$fwknopCmd --key-gen --key-gen-file $key_gen_file",
+- 'positive_output_matches' => [qr/Wrote.*\skeys/],
+- },
+-
+ ### rc file tests
+ {
+ 'category' => 'Rijndael',
+diff --git a/test/tests/rijndael_hmac.pl b/test/tests/rijndael_hmac.pl
+index fc1a8af..fd80f04 100644
+--- a/test/tests/rijndael_hmac.pl
++++ b/test/tests/rijndael_hmac.pl
+@@ -58,6 +58,59 @@
+ 'exec_err' => $YES,
+ },
+
++ ### --key-gen tests
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'client',
++ 'detail' => '--key-gen',
++ 'function' => \&generic_exec,
++ 'cmdline' => "$fwknopCmd --key-gen",
++ 'positive_output_matches' => [qr/^KEY_BASE64\:?\s\S{10}/,
++ qw/HMAC_KEY_BASE64\:?\s\S{10}/],
++ },
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'server',
++ 'detail' => '--key-gen',
++ 'function' => \&generic_exec,
++ 'cmdline' => "$fwknopdCmd --key-gen",
++ 'positive_output_matches' => [qr/^KEY_BASE64\:?\s\S{10}/,
++ qw/HMAC_KEY_BASE64\:?\s\S{10}/],
++ },
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'client',
++ 'detail' => "--key-gen $uniq_keys key uniqueness",
++ 'function' => \&key_gen_uniqueness,
++ 'cmdline' => "$fwknopCmd --key-gen", ### no valgrind string (too slow for 100 exec's)
++ 'disable_valgrind' => $YES,
++ },
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'server',
++ 'detail' => "--key-gen $uniq_keys key uniqueness",
++ 'function' => \&key_gen_uniqueness,
++ 'cmdline' => "$fwknopdCmd --key-gen", ### no valgrind string (too slow for 100 exec's)
++ 'disable_valgrind' => $YES,
++ },
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'client',
++ 'detail' => '--key-gen to file',
++ 'function' => \&generic_exec,
++ 'cmdline' => "$fwknopCmd --key-gen --key-gen-file $key_gen_file",
++ 'positive_output_matches' => [qr/Wrote.*\skeys/],
++ },
++ {
++ 'category' => 'Rijndael+HMAC',
++ 'subcategory' => 'server',
++ 'detail' => '--key-gen to file',
++ 'function' => \&generic_exec,
++ 'cmdline' => "$fwknopdCmd --key-gen --key-gen-file $key_gen_file",
++ 'positive_output_matches' => [qr/Wrote.*\skeys/],
++ },
++
++ ### complete cycle tests
+ {
+ 'category' => 'Rijndael+HMAC',
+ 'subcategory' => 'client+server',
include $(TOPDIR)/rules.mk
PKG_NAME:=git
-PKG_VERSION:=2.3.5
+PKG_VERSION:=2.4.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/scm/git/
-PKG_MD5SUM:=be8c0bbb0c5ee6ab7cdcffd2c9375fe6
+PKG_MD5SUM:=0b8dc818ed4766342978d744522aec49
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
--- a/Makefile
+++ b/Makefile
-@@ -538,16 +538,7 @@ EXTRA_PROGRAMS =
+@@ -549,16 +549,7 @@ EXTRA_PROGRAMS =
# ... and all the rest that could be moved out of bindir to gitexecdir
PROGRAMS += $(EXTRA_PROGRAMS)
# Binary suffix, set to .exe for Windows builds
X =
-@@ -896,6 +887,11 @@ BUILTIN_OBJS += builtin/verify-commit.o
+@@ -907,6 +898,11 @@ BUILTIN_OBJS += builtin/verify-commit.o
BUILTIN_OBJS += builtin/verify-pack.o
BUILTIN_OBJS += builtin/verify-tag.o
BUILTIN_OBJS += builtin/write-tree.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
EXTLIBS =
-@@ -1070,7 +1066,7 @@ endif
+@@ -1089,7 +1085,7 @@ endif
EXTLIBS += -lz
ifndef NO_OPENSSL
ifdef OPENSSLDIR
BASIC_CFLAGS += -I$(OPENSSLDIR)/include
OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
-@@ -1933,10 +1929,6 @@ endif
+@@ -1956,10 +1952,6 @@ endif
git-%$X: %.o GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
git-http-fetch$X: http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
$(LIBS) $(CURL_LIBCURL)
-@@ -2254,10 +2246,11 @@ endif
+@@ -2277,10 +2269,11 @@ endif
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
{ test "$$bindir/" = "$$execdir/" || \
+#include "../upload-pack.c"
--- a/daemon.c
+++ b/daemon.c
-@@ -1193,7 +1193,7 @@ static int serve(struct string_list *lis
+@@ -1192,7 +1192,7 @@ static int serve(struct string_list *lis
return service_loop(&socklist);
}
{
int listen_port = 0;
struct string_list listen_addr = STRING_LIST_INIT_NODUP;
-@@ -1389,12 +1389,13 @@ int main(int argc, char **argv)
+@@ -1388,12 +1388,13 @@ int main(int argc, char **argv)
store_pid(pid_file);
/* prepare argv for serving-processes */
}
--- a/fast-import.c
+++ b/fast-import.c
-@@ -3354,7 +3354,7 @@ static void parse_argv(void)
+@@ -3351,7 +3351,7 @@ static void parse_argv(void)
read_marks();
}
--- a/git.c
+++ b/git.c
-@@ -309,11 +309,11 @@ static int handle_alias(int *argcp, cons
+@@ -311,11 +311,11 @@ static int handle_alias(int *argcp, cons
struct cmd_struct {
const char *cmd;
{
int status, help;
struct stat st;
-@@ -393,6 +393,7 @@ static struct cmd_struct commands[] = {
+@@ -395,6 +395,7 @@ static struct cmd_struct commands[] = {
{ "config", cmd_config, RUN_SETUP_GENTLY },
{ "count-objects", cmd_count_objects, RUN_SETUP },
{ "credential", cmd_credential, RUN_SETUP_GENTLY },
{ "describe", cmd_describe, RUN_SETUP },
{ "diff", cmd_diff },
{ "diff-files", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE },
-@@ -411,6 +412,7 @@ static struct cmd_struct commands[] = {
+@@ -413,6 +414,7 @@ static struct cmd_struct commands[] = {
{ "grep", cmd_grep, RUN_SETUP_GENTLY },
{ "hash-object", cmd_hash_object },
{ "help", cmd_help },
{ "index-pack", cmd_index_pack, RUN_SETUP_GENTLY },
{ "init", cmd_init_db, NO_SETUP },
{ "init-db", cmd_init_db, NO_SETUP },
-@@ -459,6 +461,7 @@ static struct cmd_struct commands[] = {
+@@ -461,6 +463,7 @@ static struct cmd_struct commands[] = {
{ "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE },
{ "rm", cmd_rm, RUN_SETUP },
{ "send-pack", cmd_send_pack, RUN_SETUP },
{ "shortlog", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER },
{ "show", cmd_show, RUN_SETUP },
{ "show-branch", cmd_show_branch, RUN_SETUP },
-@@ -475,6 +478,7 @@ static struct cmd_struct commands[] = {
+@@ -477,6 +480,7 @@ static struct cmd_struct commands[] = {
{ "update-server-info", cmd_update_server_info, RUN_SETUP },
{ "upload-archive", cmd_upload_archive },
{ "upload-archive--writer", cmd_upload_archive_writer },
{ "verify-pack", cmd_verify_pack },
--- a/imap-send.c
+++ b/imap-send.c
-@@ -1484,7 +1484,7 @@ static int curl_append_msgs_to_imap(stru
+@@ -1492,7 +1492,7 @@ static int curl_append_msgs_to_imap(stru
}
#endif
const char **user_argv;
--- a/upload-pack.c
+++ b/upload-pack.c
-@@ -793,7 +793,7 @@ static int upload_pack_config(const char
+@@ -797,7 +797,7 @@ static int upload_pack_config(const char
return parse_hide_refs_config(var, value, "uploadpack");
}
--- a/Makefile
+++ b/Makefile
-@@ -1039,7 +1039,7 @@ else
+@@ -1058,7 +1058,7 @@ else
endif
curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "072200"
--- /dev/null
+#
+# 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:=gnunet
+PKG_SOURCE_VERSION:=35845
+PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
+PKG_RELEASE:=2
+
+# ToDo:
+# - split into small packages
+# - create meta-packages for common setups
+# - allow building with mysql or postgresql
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://gnunet.org/svn/gnunet/
+PKG_SOURCE_PROTO:=svn
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_ARGS+= \
+ --disable-rpath \
+ --with-extractor=$(STAGING_DIR)/usr \
+ --with-gnutls=$(STAGING_DIR)/usr \
+ --with-libgnurl=$(STAGING_DIR)/usr \
+ --with-libunistring-prefix=$(STAGING_DIR)/usr \
+ --with-ltdl \
+ --with-microhttpd=$(STAGING_DIR)/usr \
+ --without-mysql \
+ --without-postgresql
+
+TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
+
+define Package/gnunet
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=GNUnet peer-to-peer framework focusing on security
+ DEPENDS:=+bluez-libs +ca-certificates +certtool +libextractor +libgst1app \
+ +libgst1audio +glib2 +kmod-tun +libglpk +libgnurl +libgnutls \
+ +libgstreamer1 +libidn +libmicrohttpd +libopus +libogg \
+ +libunistring +libsqlite3 +pulseaudio-daemon +openssl-util
+ URL:=https://www.gnunet.org/
+ USERID:=gnunet=400:gnunet=400
+endef
+
+define Package/gnunet/description
+ GNUnet is peer-to-peer framework focusing on security. The first and
+ primary application for GNUnet is anonymous file-sharing. GNUnet is
+ currently developed by a worldwide group of independent free software
+ developers. GNUnet is a GNU package (http://www.gnu.org/).
+
+ This is an ALPHA release. There are known and significant bugs as
+ well as many missing features in this release.
+endef
+
+define Package/gnunet/install
+ $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/gnunet/libexec
+ $(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/*.so $(1)/usr/lib/gnunet
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/* $(1)/usr/lib/gnunet/libexec
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/*.html $(1)/usr/share/gnunet
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/*.png $(1)/usr/share/gnunet
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/hellos/* $(1)/usr/share/gnunet/hellos
+ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/* $(1)/usr/share/gnunet/config.d
+ $(INSTALL_DIR) $(1)/etc/init.d/
+ $(INSTALL_BIN) ./files/gnunet.init $(1)/etc/init.d/gnunet
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include/gnunet $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
+endef
+
+$(eval $(call BuildPackage,gnunet))
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2015 OpenWrt.org
+
+START=50
+STOP=10
+
+USE_PROCD=1
+PROG=/usr/lib/gnunet/libexec/gnunet-service-arm
+CONFIGFILE=/var/run/gnunet/gnunet.conf
+
+start_service() {
+ if [ ! -e /var/run/gnunet ]; then
+ mkdir -p /var/run/gnunet
+ chmod 0750 /var/run/gnunet
+ chown gnunet:gnunet /var/run/gnunet
+ touch $CONFIGFILE
+ chown gnunet:gnunet $CONFIGFILE
+ chmod 0600 $CONFIGFILE
+ fi
+ procd_open_instance
+ procd_set_param user gnunet
+ procd_set_param command $PROG -c $CONFIGFILE
+ procd_set_param respawn
+ procd_close_instance
+}
--- /dev/null
+Index: gnunet-0.10.1/configure.ac
+===================================================================
+--- gnunet-0.10.1.orig/configure.ac
++++ gnunet-0.10.1/configure.ac
+@@ -194,7 +194,7 @@ AM_CONDITIONAL(GNU, test "$build_target"
+ AC_MSG_RESULT([$build_target])
+ AC_SUBST(build_target)
+ AM_CONDITIONAL([am__fastdepOBJC], false)
+-AC_UNALIGNED_64_ACCESS
++# AC_UNALIGNED_64_ACCESS
+
+ # some other checks for standard libs
+ AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32])
--- /dev/null
+Index: gnunet-0.10.1/src/dht/gnunet-service-dht_neighbours.c
+===================================================================
+--- gnunet-0.10.1.orig/src/dht/gnunet-service-dht_neighbours.c
++++ gnunet-0.10.1/src/dht/gnunet-service-dht_neighbours.c
+@@ -45,7 +45,6 @@
+ #include "gnunet-service-dht_neighbours.h"
+ #include "gnunet-service-dht_nse.h"
+ #include "gnunet-service-dht_routing.h"
+-#include <fenv.h>
+ #include "dht.h"
+
+ #define LOG_TRAFFIC(kind,...) GNUNET_log_from (kind, "dht-traffic",__VA_ARGS__)
+Index: gnunet-0.10.1/src/dht/gnunet-service-wdht_neighbours.c
+===================================================================
+--- gnunet-0.10.1.orig/src/dht/gnunet-service-wdht_neighbours.c
++++ gnunet-0.10.1/src/dht/gnunet-service-wdht_neighbours.c
+@@ -44,7 +44,6 @@
+ #include "gnunet-service-wdht_datacache.h"
+ #include "gnunet-service-wdht_neighbours.h"
+ #include "gnunet-service-wdht_nse.h"
+-#include <fenv.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "dht.h"
+Index: gnunet-0.10.1/src/dht/gnunet-service-xdht_neighbours.c
+===================================================================
+--- gnunet-0.10.1.orig/src/dht/gnunet-service-xdht_neighbours.c
++++ gnunet-0.10.1/src/dht/gnunet-service-xdht_neighbours.c
+@@ -41,7 +41,6 @@
+ #include "gnunet-service-xdht_datacache.h"
+ #include "gnunet-service-xdht_neighbours.h"
+ #include "gnunet-service-xdht_routing.h"
+-#include <fenv.h>
+ #include "dht.h"
+
+ /**
--- /dev/null
+Index: gnunet-0.10.1-svn35844/m4/libgnurl.m4
+===================================================================
+--- gnunet-0.10.1-svn35844.orig/m4/libgnurl.m4
++++ gnunet-0.10.1-svn35844/m4/libgnurl.m4
+@@ -146,7 +146,7 @@ AC_DEFUN([LIBGNURL_CHECK_CONFIG],
+ _libgnurl_save_libs=$LIBS
+ LIBS="$LIBGNURL $LIBS"
+
+- AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <curl/curl.h>],[
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <gnurl/curl.h>],[
+ /* Try and use a few common options to force a failure if we are
+ missing symbols or can't link. */
+ int x;
+Index: gnunet-0.10.1-svn35844/src/gns/gnunet-gns-proxy.c
+===================================================================
+--- gnunet-0.10.1-svn35844.orig/src/gns/gnunet-gns-proxy.c
++++ gnunet-0.10.1-svn35844/src/gns/gnunet-gns-proxy.c
+@@ -29,7 +29,7 @@
+ */
+ #include "platform.h"
+ #include <microhttpd.h>
+-#include <curl/curl.h>
++#include <gnurl/curl.h>
+ #include <gnutls/gnutls.h>
+ #include <gnutls/x509.h>
+ #include <gnutls/abstract.h>
+Index: gnunet-0.10.1-svn35844/src/gns/test_gns_proxy.c
+===================================================================
+--- gnunet-0.10.1-svn35844.orig/src/gns/test_gns_proxy.c
++++ gnunet-0.10.1-svn35844/src/gns/test_gns_proxy.c
+@@ -24,7 +24,7 @@
+ * @author Martin Schanzenbach
+ */
+ #include "platform.h"
+-#include <curl/curl.h>
++#include <gnurl/curl.h>
+ #include <microhttpd.h>
+ #include "gnunet_namestore_service.h"
+ #include "gnunet_gns_service.h"
+Index: gnunet-0.10.1-svn35844/src/hostlist/gnunet-daemon-hostlist_client.c
+===================================================================
+--- gnunet-0.10.1-svn35844.orig/src/hostlist/gnunet-daemon-hostlist_client.c
++++ gnunet-0.10.1-svn35844/src/hostlist/gnunet-daemon-hostlist_client.c
+@@ -29,7 +29,7 @@
+ #include "gnunet_statistics_service.h"
+ #include "gnunet_transport_service.h"
+ #include "gnunet-daemon-hostlist.h"
+-#include <curl/curl.h>
++#include <gnurl/curl.h>
+
+
+ /**
+Index: gnunet-0.10.1-svn35844/src/pt/test_gns_vpn.c
+===================================================================
+--- gnunet-0.10.1-svn35844.orig/src/pt/test_gns_vpn.c
++++ gnunet-0.10.1-svn35844/src/pt/test_gns_vpn.c
+@@ -24,7 +24,7 @@
+ * @author Martin Schanzenbach
+ */
+ #include "platform.h"
+-#include <curl/curl.h>
++#include <gnurl/curl.h>
+ #include <microhttpd.h>
+ #include "gnunet_identity_service.h"
+ #include "gnunet_namestore_service.h"
+Index: gnunet-0.10.1-svn35844/src/pt/test_gnunet_vpn.c
+===================================================================
+--- gnunet-0.10.1-svn35844.orig/src/pt/test_gnunet_vpn.c
++++ gnunet-0.10.1-svn35844/src/pt/test_gnunet_vpn.c
+@@ -24,7 +24,7 @@
+ * @author Christian Grothoff
+ */
+ #include "platform.h"
+-#include <curl/curl.h>
++#include <gnurl/curl.h>
+ #include <microhttpd.h>
+ #include "gnunet_vpn_service.h"
+ #include "gnunet_testing_lib.h"
+Index: gnunet-0.10.1-svn35844/src/transport/plugin_transport_http.h
+===================================================================
+--- gnunet-0.10.1-svn35844.orig/src/transport/plugin_transport_http.h
++++ gnunet-0.10.1-svn35844/src/transport/plugin_transport_http.h
+@@ -41,7 +41,7 @@
+ #include "gnunet_os_lib.h"
+ #include "gnunet_nat_lib.h"
+ #include "microhttpd.h"
+-#include <curl/curl.h>
++#include <gnurl/curl.h>
+
+
+ #define DEBUG_HTTP GNUNET_EXTRA_LOGGING
+Index: gnunet-0.10.1-svn35844/src/transport/plugin_transport_http_client.c
+===================================================================
+--- gnunet-0.10.1-svn35844.orig/src/transport/plugin_transport_http_client.c
++++ gnunet-0.10.1-svn35844/src/transport/plugin_transport_http_client.c
+@@ -49,7 +49,7 @@
+ #include "gnunet_protocols.h"
+ #include "gnunet_transport_plugin.h"
+ #include "plugin_transport_http_common.h"
+-#include <curl/curl.h>
++#include <gnurl/curl.h>
+
+
+ #define LOG(kind,...) GNUNET_log_from(kind, PLUGIN_NAME, __VA_ARGS__)
--- /dev/null
+#
+# 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:=gnurl
+PKG_VERSION:=7.40.0
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://gnunet.org/sites/default/files
+
+PKG_MD5SUM:=f816deb0c1401c841780ec6b91985a14
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/gnurl/Default
+ SECTION:=net
+ CATEGORY:=Network
+ URL:=https://gnunet.org/gnurl
+ MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+endef
+
+define Package/gnurl
+ $(call Package/gnurl/Default)
+ SUBMENU:=File Transfer
+ DEPENDS:=+libgnurl
+ TITLE:=A client-side HTTP/HTTPS transfer utility
+endef
+
+define Package/libgnurl
+ $(call Package/gnurl/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ DEPENDS:=+libgnutls +libidn +zlib
+ TITLE:=A client-side HTTP/HTTPS transfer library
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+ $(call autoconf_bool,CONFIG_IPV6,ipv6) \
+ --with-gnutls="$(STAGING_DIR)/usr" \
+ --with-libidn="$(STAGING_DIR)/usr" \
+ --with-zlib="$(STAGING_DIR)/usr" \
+ --enable-tls-srp \
+ --enable-shared \
+ --enable-static \
+ --without-axtls \
+ --without-libssh2 \
+ --without-libmetalink \
+ --without-winidn \
+ --without-librtmp \
+ --without-nghttp2 \
+ --without-nss \
+ --without-cyassl \
+ --without-polarssl \
+ --without-ssl \
+ --without-winssl \
+ --without-darwinssl \
+ --disable-ares \
+ --disable-sspi \
+ --disable-ntlm-wb \
+ --disable-ldap \
+ --disable-ldaps \
+ --disable-rtsp \
+ --disable-dict \
+ --disable-telnet \
+ --disable-tftp \
+ --disable-pop3 \
+ --disable-imap \
+ --disable-smtp \
+ --disable-gopher \
+ --disable-file \
+ --disable-ftp \
+ --disable-smb \
+ --disable-debug \
+ --disable-manual \
+ --disable-verbose
+
+define Build/Compile
+ +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ CC="$(TARGET_CC)" \
+ install
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include/gnurl $(1)/usr/lib $(1)/usr/lib/pkgconfig
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnurl-config $(1)/usr/bin/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/curl/*.h $(1)/usr/include/gnurl
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnurl.{a,so*} $(1)/usr/lib/
+ $(CP) $(PKG_BUILD_DIR)/libgnurl.pc $(1)/usr/lib/pkgconfig/
+ $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/gnurl-config
+ [ -n "$(TARGET_LDFLAGS)" ] && $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libgnurl.pc || true
+ $(LN) $(STAGING_DIR)/usr/bin/gnurl-config $(2)/bin/
+endef
+
+define Package/gnurl/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnurl $(1)/usr/bin/
+endef
+
+define Package/libgnurl/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnurl.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,gnurl))
+$(eval $(call BuildPackage,libgnurl))
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -2885,6 +2885,7 @@ CURL_VERIFY_RUNTIMELIBS
+
+ AC_CHECK_SIZEOF(size_t)
+ AC_CHECK_SIZEOF(long)
++AC_CHECK_SIZEOF(long long)
+ AC_CHECK_SIZEOF(int)
+ AC_CHECK_SIZEOF(short)
+ CURL_CONFIGURE_LONG
--- /dev/null
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -129,7 +129,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \
+ bin_SCRIPTS = curl-config
+
+ SUBDIRS = lib src include
+-DIST_SUBDIRS = $(SUBDIRS) tests packages docs
++DIST_SUBDIRS = $(SUBDIRS) packages
+
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libcurl.pc
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -577,7 +577,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \
+
+ bin_SCRIPTS = curl-config
+ SUBDIRS = lib src include
+-DIST_SUBDIRS = $(SUBDIRS) tests packages docs
++DIST_SUBDIRS = $(SUBDIRS) packages
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libcurl.pc
+ LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c \
#
-# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
# 2014 Noah Meyerhans <frodo@morgul.net>
#
# This is free software, licensed under the GNU General Public License v2.
PKG_NAME:=ipsec-tools
PKG_VERSION:=0.8.2
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_MAINTAINER := "Noah Meyerhans <frodo@morgul.net>"
PKG_LICENSE := BSD-3-Clause
#if defined(__APPLE__) && defined(__MACH__)
#include <util.h>
#endif
-@@ -1661,7 +1661,8 @@ isakmp_cfg_accounting_system(port, raddr
+@@ -1664,7 +1664,8 @@ isakmp_cfg_accounting_system(port, raddr
int inout;
{
int error = 0;
char addr[NI_MAXHOST];
if (usr == NULL || usr[0]=='\0') {
-@@ -1670,34 +1671,37 @@ isakmp_cfg_accounting_system(port, raddr
+@@ -1673,34 +1674,37 @@ isakmp_cfg_accounting_system(port, raddr
return -1;
}
--- a/src/racoon/ipsec_doi.c
+++ b/src/racoon/ipsec_doi.c
-@@ -3582,8 +3582,8 @@ ipsecdoi_checkid1(iph1)
+@@ -3581,8 +3581,8 @@ ipsecdoi_checkid1(iph1)
iph1->approval->authmethod == OAKLEY_ATTR_AUTH_METHOD_PSKEY) {
if (id_b->type != IPSECDOI_ID_IPV4_ADDR
&& id_b->type != IPSECDOI_ID_IPV6_ADDR) {
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -732,7 +732,8 @@ case $host in
+ ],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])],
+- [AC_MSG_RESULT(no)])
++ [AC_MSG_RESULT(forced)
++ AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])])
+ ;;
+ *)
+ AC_MSG_RESULT(no)
--- /dev/null
+Fix null dereference in racoon/gssapi.c (CVE-2015-4047)
+
+--- a/src/racoon/gssapi.c
++++ b/src/racoon/gssapi.c
+@@ -192,6 +192,11 @@ gssapi_init(struct ph1handle *iph1)
+ gss_name_t princ, canon_princ;
+ OM_uint32 maj_stat, min_stat;
+
++ if (iph1->rmconf == NULL) {
++ plog(LLV_ERROR, LOCATION, NULL, "no remote config\n");
++ return -1;
++ }
++
+ gps = racoon_calloc(1, sizeof (struct gssapi_ph1_state));
+ if (gps == NULL) {
+ plog(LLV_ERROR, LOCATION, NULL, "racoon_calloc failed\n");
+++ /dev/null
-diff --git a/configure.ac b/configure.ac
-index 8506245..eca8895 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -724,7 +724,8 @@ case $host in
- ],
- [AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])],
-- [AC_MSG_RESULT(no)])
-+ [AC_MSG_RESULT(forced)
-+ AC_DEFINE([HAVE_POLICY_FWD], [], [Have forward policy])])
- ;;
- *)
- AC_MSG_RESULT(no)
include $(TOPDIR)/rules.mk
PKG_NAME:=lftp
-PKG_VERSION:=4.6.0
+PKG_VERSION:=4.6.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=http://lftp.yar.ru/ftp \ http://lftp.cybermirror.org \ http://lftp.cybermirror.org/old
-PKG_MD5SUM:=fc5f4e3b45c9011a193eb8c0c12eb2eb
+PKG_SOURCE_URL:=http://lftp.yar.ru/ftp \
+ http://lftp.yar.ru/ftp/old \
+ http://lftp.cybermirror.org \
+ http://lftp.cybermirror.org/old
+PKG_MD5SUM:=487c064ee1bd732e5f95928e530435a8
+
+
PKG_LICENSE:=GPL-3.0+
PKG_LICENSE_FILES:=COPYING
PKG_NAME:=mtr
PKG_VERSION:=0.86
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.bitwizard.nl/mtr
CONFIGURE_ARGS += \
--without-gtk \
--without-glib \
+ $(call autoconf_bool,CONFIG_IPV6,ipv6)
define Build/Configure
(cd $(PKG_BUILD_DIR); touch \
--- /dev/null
+#
+# 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:=http://nixgeneration.com/~jaime/netdiscover/releases/
+PKG_MD5SUM:=8780e66d00496e933b4064cfe9ae61da
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
+
+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:=http://nixgeneration.com/~jaime/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))
-# Copyright (C) 2009 OpenWrt.org
+# Copyright (C) 2009-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=nfs-kernel-server
PKG_VERSION:=1.3.2
-PKG_RELEASE:=2
+PKG_RELEASE:=4
PKG_MD5SUM:=1e2f3c1ed468dee02d00c534c002ea10
PKG_SOURCE_URL:=@SF/nfs
PKG_NAME:=ntp
PKG_VERSION:=4.2.8p2
-PKG_RELEASE:=1
+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/
--enable-NMEA \
--enable-LOCAL-CLOCK \
--enable-SHM \
+ --enable-ATOM \
--enable-linuxcaps \
--with-yielding-select=yes \
--with-crypto \
bool "enable seccomp"
default n
+config OCSERV_RADIUS
+ bool "enable radius authentication"
+ default n
+
config OCSERV_PROTOBUF
bool "use external libprotobuf"
default y
include $(TOPDIR)/rules.mk
PKG_NAME:=ocserv
-PKG_VERSION:=0.10.4
+PKG_VERSION:=0.10.5
PKG_RELEASE:=1
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_MD5SUM:=6df31778642320ea7b90f314c4c9a897
+PKG_MD5SUM:=17ee861f352d6ef7cd33114819b215ba
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
TITLE:=OpenConnect VPN server
URL:=http://www.infradead.org/ocserv/
MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
- DEPENDS:= +OCSERV_HTTP_PARSER:libhttp-parser +OCSERV_SECCOMP:libseccomp +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c +kmod-tun
+ DEPENDS:= +OCSERV_RADIUS:freeradius-client +OCSERV_HTTP_PARSER:libhttp-parser +OCSERV_SECCOMP:libseccomp +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c +kmod-tun
USERID:=ocserv=72:ocserv=72
endef
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
test $auth = "plain" && authsuffix="\[passwd=/var/etc/ocpasswd\]"
dyndns="false"
- hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null`
+ hostname=`uci show ddns 2>/dev/null|grep domain|head -1|cut -d '=' -f 2`
[ -n "$hostname" ] && dyndns="true"
mkdir -p /var/etc
local password
config_get name $1 name
- config_get group $1 group
+ config_get group $1 group '*'
config_get password $1 password
- [ -z "$group" ] && group='*'
[ -z "$name" -o -z "$password" ] && return
echo "$name:$group:$password" >> /var/etc/ocpasswd
start() {
local hostname iface
- hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null`
+ 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
PKG_NAME:=openvswitch
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_VERSION:=2.3.90
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=Apache-2.0
--- /dev/null
+From 5919cb26c631b1dd77a745a3c546f9d117ed34b3 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sat, 23 May 2015 18:12:09 +0200
+Subject: [PATCH] datapath: do not add vlan_hwaccel_push_inside() for kernel >=
+ 3.18.13
+
+The vlan_hwaccel_push_inside() function was backported in this commit
+to kernel 3.18.13:
+
+commit a67e2e88342accd49587d9bad72f6dabd7673f7c
+Author: Jiri Pirko <jiri@resnulli.us>
+Date: Wed Nov 19 14:04:59 2014 +0100
+
+ vlan: introduce *vlan_hwaccel_push_inside helpers
+
+ [ Upstream commit 5968250c868ceee680aa77395b24e6ddcae17d36 ]
+
+Without this patch compilation breaks on kernel >= 3.18.13
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ datapath/linux/compat/include/linux/if_vlan.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/datapath/linux/compat/include/linux/if_vlan.h
++++ b/datapath/linux/compat/include/linux/if_vlan.h
+@@ -52,7 +52,7 @@ static inline struct sk_buff *rpl_vlan_i
+ }
+ #endif
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,13)
+ /*
+ * __vlan_hwaccel_push_inside - pushes vlan tag to the payload
+ * @skb: skbuff to tag
PKG_NAME:=radicale
PKG_VERSION:=0.10
-PKG_RELEASE:=1
-PKG_MAINTAINER:=Christian Schoenebeck <chris5560@web.de>
+PKG_RELEASE:=2
+PKG_MAINTAINER:=Christian Schoenebeck <christian.schoenebeck@gmail.com>
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
# Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom
# Default: None
# if setting 'htpasswd' the file /etc/radicale/users is used (hardcoded)
-# option type 'htpasswd'
# Htpasswd encryption method
# Value: plain | sha1 | ssha | crypt
# Value: None | authenticated | owner_only | owner_write | from_file | custom
# Default: None
# if setting 'from_file' the file /etc/radicale/rights is used (hardcoded)
-# option type 'from_file'
# Custom rights handler
# option custom_handler ''
# only (re-)start on ifup
[ "$ACTION" = "ifup" ] || exit 0
-_PID=$(ps | grep '[p]ython.*[r]adicale' 2>/dev/null | awk '{print \$1}')
+_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
local _PID=$(eval "$PGREP")
[ -z "$_PID" ] && return 0 # not running
kill -15 $_PID 2>/dev/null
- sleep 1 # give time to shutdown
+ sleep 3 # give time to shutdown
local _tmp=$(eval "$PGREP")
if [ -z "$_tmp" ]; then
logger -p user.notice -t "radicale[$_PID]" "Service shutdown successfully"
include $(TOPDIR)/rules.mk
PKG_NAME:=rtorrent
-PKG_VERSION:=0.9.4-git-0
+PKG_VERSION:=0.9.4-git-1
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
CONFIGURE_ARGS+= \
--enable-shared \
--disable-static \
- --disable-debug
+ --disable-debug \
+ $(call autoconf_bool,CONFIG_IPV6,ipv6)
ifeq ($(BUILD_VARIANT),rpc)
CONFIGURE_ARGS += \
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/
+PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
+ @SF/$(PKG_NAME)
PKG_MD5SUM:=b01e9964827394c39194a0147bc15705
PKG_BUILD_DEPENDS:=librpc
config_get localaddress $1 localaddress "*"
config_get localport $1 localport
- [ "$remoteport" -gt 0 ] || append_string "error" "[tunnelD: $1]remoteport must be a positive integer" "; "
[ "$localport" -gt 0 ] || append_string "error" "[tunnelD: $1]localport must be a positive integer" "; "
[ -n "$error" ] && return 1
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
$(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))
#
-# Copyright (C) 2009-2014 OpenWrt.org
+# 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:=umurmur
-PKG_VERSION:=0.2.15
+PKG_VERSION:=0.2.16
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_URL:=git://github.com/fatbob313/umurmur.git
+PKG_SOURCE_URL:=git://github.com/umurmur/umurmur.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=f66c0c3d630aaff1c4d589bc4d884067f00b6529
+PKG_SOURCE_VERSION:=0.2.16
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
--- /dev/null
+diff --git a/src/ssli_polarssl.c b/src/ssli_polarssl.c
+index a36ccb6..167637b 100644
+--- a/src/ssli_polarssl.c
++++ b/src/ssli_polarssl.c
+@@ -225,8 +225,12 @@ void SSLi_init(void)
+ Log_fatal("Cannot open /dev/urandom");
+ #endif
+
++#ifdef POLARSSL_VERSION_FEATURES
+ version_get_string(verstring);
+ Log_info("PolarSSL library version %s initialized", verstring);
++#else
++ Log_info("PolarSSL library initialized");
++#endif
+ }
+
+ void SSLi_deinit(void)
--- /dev/null
+#
+# 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
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=usbip
+PKG_RELEASE:=4
+PKG_LICENSE:=GPL-2.0
+
+# Since kernel 2.6.39.1 userspace tools are inside the kernel tree
+# Package Automatic match version in kernel
+# MD5SUM is not useful kernel package already check it
+PKG_VERSION:=$(shell sed -n -e '/^AC_INIT/s/.*\[\([[:digit:]\.]*\)\].*/\1/gp' $(LINUX_DIR)/tools/usb/usbip/configure.ac)
+PKG_SOURCE:=
+PKG_SOURCE_URL:=
+PKG_MD5SUM:=unknown
+
+PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
+
+PATCH_DIR:=./patches-$(PKG_VERSION)
+
+define prepare_source_directory
+ rm -rf $(PKG_BUILD_DIR)
+ $(CP) $(LINUX_DIR)/tools/usb/usbip $(PKG_BUILD_DIR)
+endef
+Hooks/Prepare/Pre += prepare_source_directory
+
+PKG_BUILD_DEPENDS:=udev
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/usbip/Common
+ TITLE:=USB-over-IP
+ URL:=http://usbip.sourceforge.net/
+ DEPENDS:=@USB_SUPPORT
+endef
+
+define Package/usbip/Default
+ $(call Package/usbip/Common)
+ SECTION:=net
+ CATEGORY:=Network
+endef
+
+define Package/usbip
+ $(call Package/usbip/Default)
+ TITLE+= (common)
+ DEPENDS+= +libwrap +kmod-usbip +udev
+endef
+
+define Package/usbip-client
+ $(call Package/usbip/Default)
+ TITLE+= (client)
+ DEPENDS+= usbip +kmod-usbip-client
+endef
+
+define Package/usbip-server
+ $(call Package/usbip/Default)
+ TITLE+= (server)
+ DEPENDS+= usbip +kmod-usbip-server
+endef
+
+CONFIGURE_PATH:=.
+MAKE_PATH:=.
+LIBTOOL_PATHS:=.
+MAKE_FLAGS+=CFLAGS="-Wno-implicit-function-declaration"
+
+define Build/Configure
+ (cd $(PKG_BUILD_DIR); ./autogen.sh );
+ $(call Build/Configure/Default)
+endef
+
+CFLAGS+="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include"
+
+define Download/usb.ids
+ URL:=http://www.linux-usb.org/
+ FILE:=usb.ids
+ MD5SUM:=
+endef
+
+define Package/usbip/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusbip.so.* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/share/hwdata
+ $(CP) $(DL_DIR)/usb.ids $(1)/usr/share/hwdata/
+endef
+
+define Package/usbip-client/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/usbip $(1)/usr/sbin/
+endef
+
+define Package/usbip-server/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/usbipd $(1)/usr/sbin/
+endef
+
+$(eval $(call Download,usb.ids))
+$(eval $(call BuildPackage,usbip))
+$(eval $(call BuildPackage,usbip-client))
+$(eval $(call BuildPackage,usbip-server))
--- /dev/null
+Index: trunk/src/cmd/Makefile.am
+===================================================================
+--- trunk/src/cmd/Makefile.am (revision 98)
++++ trunk/src/cmd/Makefile.am (revision 99)
+@@ -17,5 +17,5 @@
+ INCLUDES = -I$(top_srcdir)/lib
+ LDADD = ../lib/libusbip.la @PACKAGE_LIBS@
+ EXTRA_CFLAGS = @EXTRA_CFLAGS@
+-AM_CFLAGS = -Wall -W -Wstrict-prototypes -std=gnu99 $(EXTRA_CFLAGS) @PACKAGE_CFLAGS@
++AM_CFLAGS = -Wall -W -Wstrict-prototypes -std=gnu99 $(EXTRA_CFLAGS) @PACKAGE_CFLAGS@ -DUSBIDS_FILE='"@USBIDS_DIR@/usb.ids"'
+
--- /dev/null
+--- a/drivers/head/stub_dev.c
++++ b/drivers/head/stub_dev.c
+@@ -398,7 +398,11 @@ static int stub_probe(struct usb_interfa
+ {
+ struct usb_device *udev = interface_to_usbdev(interface);
+ struct stub_device *sdev = NULL;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+ char *udev_busid = interface->dev.parent->bus_id;
++#else
++ char *udev_busid = dev_name(interface->dev.parent);
++#endif
+ int err = 0;
+
+ udbg("Enter\n");
+--- a/drivers/head/stub_main.c
++++ b/drivers/head/stub_main.c
+@@ -252,18 +252,17 @@ static int __init usb_stub_init(void)
+ return -ENOMEM;
+ }
+
++ info(DRIVER_DESC "" DRIVER_VERSION);
++
++ memset(busid_table, 0, sizeof(busid_table));
++ spin_lock_init(&busid_table_lock);
++
+ ret = usb_register(&stub_driver);
+ if (ret) {
+ uerr("usb_register failed %d\n", ret);
+ return ret;
+ }
+
+-
+- info(DRIVER_DESC "" DRIVER_VERSION);
+-
+- memset(busid_table, 0, sizeof(busid_table));
+- spin_lock_init(&busid_table_lock);
+-
+ ret = driver_create_file(&stub_driver.drvwrap.driver, &driver_attr_match_busid);
+
+ if (ret) {
+--- a/drivers/head/stub_rx.c
++++ b/drivers/head/stub_rx.c
+@@ -159,7 +159,11 @@ static int tweak_set_configuration_cmd(s
+ * A user may need to set a special configuration value before
+ * exporting the device.
+ */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+ uinfo("set_configuration (%d) to %s\n", config, urb->dev->dev.bus_id);
++#else
++ uinfo("set_configuration (%d) to %s\n", config, dev_name(&urb->dev->dev));
++#endif
+ uinfo("but, skip!\n");
+
+ return 0;
+@@ -177,7 +181,11 @@ static int tweak_reset_device_cmd(struct
+ value = le16_to_cpu(req->wValue);
+ index = le16_to_cpu(req->wIndex);
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+ uinfo("reset_device (port %d) to %s\n", index, urb->dev->dev.bus_id);
++#else
++ uinfo("reset_device (port %d) to %s\n", index, dev_name(&urb->dev->dev));
++#endif
+
+ /* all interfaces should be owned by usbip driver, so just reset it. */
+ ret = usb_lock_device_for_reset(urb->dev, NULL);
+@@ -187,7 +195,11 @@ static int tweak_reset_device_cmd(struct
+ }
+
+ /* try to reset the device */
+- ret = usb_reset_composite_device(urb->dev, NULL);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
++ ret = usb_reset_composite_device(urb->dev, NULL);
++#else
++ ret = usb_reset_device(urb->dev);
++#endif
+ if (ret < 0)
+ uerr("device reset\n");
+
+--- a/drivers/head/usbip_common.c
++++ b/drivers/head/usbip_common.c
+@@ -55,10 +55,7 @@ static ssize_t show_flag(struct device *
+ static ssize_t store_flag(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+ {
+- unsigned long flag;
+-
+- sscanf(buf, "%lx", &flag);
+- usbip_debug_flag = flag;
++ sscanf(buf, "%lx", &usbip_debug_flag);
+
+ return count;
+ }
+@@ -390,7 +387,7 @@ int usbip_thread(void *param)
+ unlock_kernel();
+
+ /* srv.rb must wait for rx_thread starting */
+- complete(&ut->thread_done);
++ complete(&ut->thread_started);
+
+ /* start of while loop */
+ ut->loop_ops(ut);
+@@ -403,15 +400,21 @@ int usbip_thread(void *param)
+
+ void usbip_start_threads(struct usbip_device *ud)
+ {
++
+ /*
+ * threads are invoked per one device (per one connection).
+ */
++ INIT_COMPLETION(ud->tcp_rx.thread_started);
++ INIT_COMPLETION(ud->tcp_tx.thread_started);
++ INIT_COMPLETION(ud->tcp_rx.thread_done);
++ INIT_COMPLETION(ud->tcp_tx.thread_done);
++
+ kernel_thread((int(*)(void *))usbip_thread, (void *)&ud->tcp_rx, 0);
+ kernel_thread((int(*)(void *))usbip_thread, (void *)&ud->tcp_tx, 0);
+
+ /* confirm threads are starting */
+- wait_for_completion(&ud->tcp_rx.thread_done);
+- wait_for_completion(&ud->tcp_tx.thread_done);
++ wait_for_completion(&ud->tcp_rx.thread_started);
++ wait_for_completion(&ud->tcp_tx.thread_started);
+ }
+ EXPORT_SYMBOL(usbip_start_threads);
+
+@@ -436,6 +439,7 @@ void usbip_task_init(struct usbip_task *
+ void (*loop_ops)(struct usbip_task *))
+ {
+ ut->thread = NULL;
++ init_completion(&ut->thread_started);
+ init_completion(&ut->thread_done);
+ ut->name = name;
+ ut->loop_ops = loop_ops;
+--- a/drivers/head/usbip_event.c
++++ b/drivers/head/usbip_event.c
+@@ -38,7 +38,7 @@ void usbip_start_eh(struct usbip_device
+
+ kernel_thread((int(*)(void *)) usbip_thread, (void *) eh, 0);
+
+- wait_for_completion(&eh->thread_done);
++ wait_for_completion(&eh->thread_started);
+ }
+ EXPORT_SYMBOL(usbip_start_eh);
+
+--- a/drivers/head/vhci_hcd.c
++++ b/drivers/head/vhci_hcd.c
+@@ -58,7 +58,7 @@ static void vhci_stop(struct usb_hcd *hc
+ static int vhci_get_frame_number(struct usb_hcd *hcd);
+
+ static const char driver_name[] = "vhci_hcd";
+-static const char driver_desc[] = "USB/IP Virtual Host Contoroller";
++static const char driver_desc[] = "USB/IP Virtual Host Controller";
+
+
+
+@@ -416,14 +416,6 @@ static int vhci_hub_control(struct usb_h
+ case USB_PORT_FEAT_SUSPEND:
+ dbg_vhci_rh(" SetPortFeature: USB_PORT_FEAT_SUSPEND\n");
+ uerr(" not yet\n");
+-#if 0
+- dum->port_status[rhport] |= (1 << USB_PORT_FEAT_SUSPEND);
+- if (dum->driver->suspend) {
+- spin_unlock (&dum->lock);
+- dum->driver->suspend (&dum->gadget);
+- spin_lock (&dum->lock);
+- }
+-#endif
+ break;
+ case USB_PORT_FEAT_RESET:
+ dbg_vhci_rh(" SetPortFeature: USB_PORT_FEAT_RESET\n");
+@@ -432,12 +424,6 @@ static int vhci_hub_control(struct usb_h
+ dum->port_status[rhport] &= ~(USB_PORT_STAT_ENABLE
+ | USB_PORT_STAT_LOW_SPEED
+ | USB_PORT_STAT_HIGH_SPEED);
+-#if 0
+- if (dum->driver) {
+- dev_dbg (hardware, "disconnect\n");
+- stop_activity (dum, dum->driver);
+- }
+-#endif
+
+ /* FIXME test that code path! */
+ }
+@@ -1060,7 +1046,7 @@ static int vhci_hcd_probe(struct platfor
+ struct usb_hcd *hcd;
+ int ret;
+
+- uinfo("proving...\n");
++ uinfo("probing...\n");
+
+ dbg_vhci_hc("name %s id %d\n", pdev->name, pdev->id);
+
+@@ -1076,7 +1062,11 @@ static int vhci_hcd_probe(struct platfor
+ * Allocate and initialize hcd.
+ * Our private data is also allocated automatically.
+ */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+ hcd = usb_create_hcd(&vhci_hc_driver, &pdev->dev, pdev->dev.bus_id);
++#else
++ hcd = usb_create_hcd(&vhci_hc_driver, &pdev->dev, dev_name(&pdev->dev));
++#endif
+ if (!hcd) {
+ uerr("create hcd failed\n");
+ return -ENOMEM;
+--- a/drivers/head/vhci_sysfs.c
++++ b/drivers/head/vhci_sysfs.c
+@@ -123,7 +123,11 @@ static ssize_t show_status(struct device
+ out += sprintf(out, "%03u %08x ",
+ vdev->speed, vdev->devid);
+ out += sprintf(out, "%16p ", vdev->ud.tcp_socket);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+ out += sprintf(out, "%s", vdev->udev->dev.bus_id);
++#else
++ out += sprintf(out, "%s", dev_name(&vdev->udev->dev));
++#endif
+
+ } else
+ out += sprintf(out, "000 000 000 0000000000000000 0-0");
+--- a/drivers/head/usbip_common.h
++++ b/drivers/head/usbip_common.h
+@@ -300,6 +300,7 @@ struct usbip_device;
+
+ struct usbip_task {
+ struct task_struct *thread;
++ struct completion thread_started;
+ struct completion thread_done;
+ char *name;
+ void (*loop_ops)(struct usbip_task *);
#
-# Copyright (C) 2006-2014 OpenWrt.org
+# 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:=1.3.7pre20141126
+PKG_VERSION:=1.3.7pre20150524
PKG_RELEASE:=1
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
-PKG_RELEASE=$(PKG_SOURCE_VERSION)
-
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/xelerance/xl2tpd.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
TITLE:=An L2TP (Layer 2 Tunneling Protocol) daemon
URL:=http://www.xelerance.com/software/xl2tpd/
SUBMENU:=VPN
- DEPENDS:=+ppp-mod-pppol2tp +ip +resolveip
+ DEPENDS:=+ppp-mod-pppol2tp +resolveip
endef
define Package/xl2tpd/description
proto_config_add_string "server"
available=1
no_device=1
+ no_proto_task=1
}
proto_l2tp_setup() {
- local config="$1"
- local iface="$2"
- local optfile="/tmp/l2tp/options.${config}"
+ local interface="$1"
+ local optfile="/tmp/l2tp/options.${interface}"
local ip serv_addr server
json_get_var server server && {
for ip in $(resolveip -t 5 "$server"); do
- ( proto_add_host_dependency "$config" "$ip" )
+ ( proto_add_host_dependency "$interface" "$ip" )
serv_addr=1
done
}
[ -n "$serv_addr" ] || {
- echo "Could not resolve server address"
+ echo "Could not resolve server address" >&2
sleep 5
- proto_setup_failed "$config"
+ proto_setup_failed "$interface"
exit 1
}
if [ ! -p /var/run/xl2tpd/l2tp-control ]; then
/etc/init.d/xl2tpd start
+
+ 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
json_get_vars ipv6 demand keepalive username password pppd_options
[ "$ipv6" = 1 ] || ipv6=""
if [ "${demand:-0}" -gt 0 ]; then
demand="persist"
fi
+ local mtu
[ -n "$mtu" ] || json_get_var mtu mtu
local interval="${keepalive##*[, ]}"
echo "usepeerdns" >> "${optfile}"
echo "nodefaultroute" >> "${optfile}"
echo "${username:+user \"$username\" password \"$password\"}" >> "${optfile}"
- echo "ipparam \"$config\"" >> "${optfile}"
- echo "ifname \"l2tp-$config\"" >> "${optfile}"
+ echo "ipparam \"$interface\"" >> "${optfile}"
+ echo "ifname \"l2tp-$interface\"" >> "${optfile}"
echo "ip-up-script /lib/netifd/ppp-up" >> "${optfile}"
echo "ipv6-up-script /lib/netifd/ppp-up" >> "${optfile}"
echo "ip-down-script /lib/netifd/ppp-down" >> "${optfile}"
echo "${ipv6:++ipv6} ${pppd_options}" >> "${optfile}"
echo "${mtu:+mtu $mtu mru $mtu}" >> "${optfile}"
- xl2tpd-control add l2tp-${config} pppoptfile=${optfile} lns=${server} redial=yes redial timeout=20
- xl2tpd-control connect l2tp-${config}
+ xl2tpd-control add l2tp-${interface} pppoptfile=${optfile} lns=${server} redial=yes redial timeout=20 || {
+ 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}
case "$ERROR" in
11|19)
proto_notify_error "$interface" AUTH_FAILED
;;
esac
- xl2tpd-control disconnect l2tp-${interface}
+ 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
-
- xl2tpd-control remove l2tp-${interface}
- rm -f ${optfile}
}
[ -n "$INCLUDE_ONLY" ] || {
#!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
START=60
+USE_PROCD=1
+
BIN=xl2tpd
-DEFAULT=/etc/default/$BIN
-RUN_D=/var/run
-PID_F=$RUN_D/$BIN.pid
+RUN_D="/var/run/xl2tpd"
+PID_F="/var/run/xl2tpd.pid"
+
+start_service() {
+ rm -rf "$RUN_D"
+ mkdir -p "$RUN_D"
-start() {
- mkdir -p $RUN_D/$BIN
- [ -f $DEFAULT ] && . $DEFAULT
- $BIN $OPTIONS
+ procd_open_instance
+ procd_set_param command $BIN -D -l -p "$PID_F"
+ procd_close_instance
}
-stop() {
- [ -f $PID_F ] && kill $(cat $PID_F)
+stop_service() {
+ rm -rf "$RUN_D"
+ rm -rf "$PID_F"
}
--- /dev/null
+From 7973d45a0e1716ddc6bfb6caf600f826f59a7932 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Tue, 28 Apr 2015 21:26:15 +0800
+Subject: [PATCH 200/210] xl2tpd-control: check end-of-file when reading pipe
+ to avoid dead loop.
+
+---
+ xl2tpd-control.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/xl2tpd-control.c b/xl2tpd-control.c
+index feafe10..e5904d8 100644
+--- a/xl2tpd-control.c
++++ b/xl2tpd-control.c
+@@ -306,17 +306,20 @@ int read_result(int result_fd, char* buf, ssize_t size)
+ /*FIXME: there is a chance to hang up reading.
+ Should I create watching thread with timeout?
+ */
+- ssize_t readed;
++ ssize_t readed = 0;
++ ssize_t len;
++
+ do
+ {
+- readed = read (result_fd, buf, size);
+- if (readed < 0)
++ len = read (result_fd, buf + readed, size - readed);
++ if (len < 0)
+ {
+ print_error (ERROR_LEVEL,
+ "error: can't read command result: %s\n", strerror (errno));
+ break;
+ }
+- } while (readed == 0);
++ readed += len;
++ } while (len > 0 && (size - readed) > 0);
+ buf[readed] = '\0';
+
+ /* scan result code */
+--
+1.7.10.4
+
+++ /dev/null
-From 8c5853b8e22f34bc1c1acba278f7850ab7946894 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Tue, 28 Apr 2015 21:26:15 +0800
-Subject: [PATCH 1/7] xl2tpd-control: check end-of-file when reading pipe to
- avoid dead loop.
-
----
- xl2tpd-control.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -306,17 +306,20 @@ int read_result(int result_fd, char* buf
- /*FIXME: there is a chance to hang up reading.
- Should I create watching thread with timeout?
- */
-- ssize_t readed;
-+ ssize_t readed = 0;
-+ ssize_t len;
-+
- do
- {
-- readed = read (result_fd, buf, size);
-- if (readed < 0)
-+ len = read (result_fd, buf + readed, size - readed);
-+ if (len < 0)
- {
- print_error (ERROR_LEVEL,
- "error: can't read command result: %s\n", strerror (errno));
- break;
- }
-- } while (readed == 0);
-+ readed += len;
-+ } while (len > 0 && (size - readed) > 0);
- buf[readed] = '\0';
-
- /* scan result code */
--- /dev/null
+From efa0a18b5dfd827792b07acdcb35101229ccf612 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 29 Apr 2015 10:32:37 +0800
+Subject: [PATCH 201/210] xl2tpd-control: define _GNU_SOURCE to use fmemopen()
+ and friends.
+
+---
+ xl2tpd-control.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/xl2tpd-control.c b/xl2tpd-control.c
+index e5904d8..9b6235d 100644
+--- a/xl2tpd-control.c
++++ b/xl2tpd-control.c
+@@ -10,6 +10,8 @@
+ *
+ */
+
++#define _GNU_SOURCE
++
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
+--
+1.7.10.4
+
+++ /dev/null
-From 76f444d284c0b0a351a488954e0d39b72a0ce211 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 29 Apr 2015 10:32:37 +0800
-Subject: [PATCH 2/7] xl2tpd-control: define _GNU_SOURCE to use fmemopen() and
- friends.
-
----
- xl2tpd-control.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -10,6 +10,8 @@
- *
- */
-
-+#define _GNU_SOURCE
-+
- #include <stdio.h>
- #include <string.h>
- #include <stdarg.h>
--- /dev/null
+From fedfd6685e5f81f0460beb4c448a30e7a6cfbd31 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 29 Apr 2015 14:21:12 +0800
+Subject: [PATCH 202/210] xl2tpd-control: open control file with O_NONBLOCK.
+
+Otherwise xl2tpd-control would block indefinitely in case xl2tpd is
+not running.
+---
+ xl2tpd-control.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/xl2tpd-control.c b/xl2tpd-control.c
+index 9b6235d..973ee87 100644
+--- a/xl2tpd-control.c
++++ b/xl2tpd-control.c
+@@ -246,7 +246,7 @@ int main (int argc, char *argv[])
+ print_error (DEBUG_LEVEL, "command to be passed:\n%s\n", buf);
+
+ /* try to open control file for writing */
+- int control_fd = open (control_filename, O_WRONLY, 0600);
++ int control_fd = open (control_filename, O_WRONLY | O_NONBLOCK, 0600);
+ if (control_fd < 0)
+ {
+ int errorno = errno;
+@@ -265,6 +265,14 @@ int main (int argc, char *argv[])
+ }
+ return -1;
+ }
++
++ /* turn off O_NONBLOCK */
++ if (fcntl (control_fd, F_SETFL, O_WRONLY) == -1) {
++ print_error (ERROR_LEVEL,
++ "Can not turn off nonblocking mode for control_fd: %s\n",
++ strerror(errno));
++ return -2;
++ }
+
+ /* pass command to control pipe */
+ if (write (control_fd, buf, ftell (mesf)) < 0)
+--
+1.7.10.4
+
--- /dev/null
+From 07e522cd7e223517389582a8eb647a4a6a8a5cf8 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Thu, 30 Apr 2015 13:53:11 +0800
+Subject: [PATCH 203/210] xl2tpd-control: cleaup result file atexit().
+
+---
+ xl2tpd-control.c | 21 ++++++++++++++-------
+ 1 file changed, 14 insertions(+), 7 deletions(-)
+
+diff --git a/xl2tpd-control.c b/xl2tpd-control.c
+index 973ee87..abc0324 100644
+--- a/xl2tpd-control.c
++++ b/xl2tpd-control.c
+@@ -12,6 +12,7 @@
+
+ #define _GNU_SOURCE
+
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
+@@ -35,6 +36,9 @@
+ #define TUNNEL_REQUIRED 1
+ #define TUNNEL_NOT_REQUIRED 0
+
++char result_filename[128];
++int result_fd = -1;
++
+ int log_level = ERROR_LEVEL;
+
+ void print_error (int level, const char *fmt, ...);
+@@ -117,6 +121,14 @@ void help()
+ );
+ }
+
++void cleanup(void)
++{
++ /* cleaning up */
++ if (result_fd >= 0)
++ close (result_fd);
++ unlink (result_filename);
++}
++
+ int main (int argc, char *argv[])
+ {
+ char* control_filename = NULL;
+@@ -195,11 +207,11 @@ int main (int argc, char *argv[])
+ FILE* mesf = fmemopen (buf, CONTROL_PIPE_MESSAGE_SIZE, "w");
+
+ /* create result pipe for reading */
+- char result_filename[128];
+ snprintf (result_filename, 128, RESULT_FILENAME_FORMAT, getpid());
+ unlink (result_filename);
+ mkfifo (result_filename, 0600);
+- int result_fd = open (result_filename, O_RDONLY | O_NONBLOCK, 0600);
++ atexit(cleanup);
++ result_fd = open (result_filename, O_RDONLY | O_NONBLOCK, 0600);
+ if (result_fd < 0)
+ {
+ print_error (ERROR_LEVEL,
+@@ -293,11 +305,6 @@ int main (int argc, char *argv[])
+ );
+ printf ("%s", rbuf);
+
+- /* cleaning up */
+-
+- close (result_fd);
+- unlink (result_filename);
+-
+ return command_result_code;
+ }
+
+--
+1.7.10.4
+
+++ /dev/null
-From f7cfd36b8a93afd326c0d9378e99576c616bd3fc Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 29 Apr 2015 14:21:12 +0800
-Subject: [PATCH 3/7] xl2tpd-control: open control file with O_NONBLOCK.
-
-Otherwise xl2tpd-control would block indefinitely in case xl2tpd is
-not running.
----
- xl2tpd-control.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -246,7 +246,7 @@ int main (int argc, char *argv[])
- print_error (DEBUG_LEVEL, "command to be passed:\n%s\n", buf);
-
- /* try to open control file for writing */
-- int control_fd = open (control_filename, O_WRONLY, 0600);
-+ int control_fd = open (control_filename, O_WRONLY | O_NONBLOCK, 0600);
- if (control_fd < 0)
- {
- int errorno = errno;
-@@ -265,6 +265,14 @@ int main (int argc, char *argv[])
- }
- return -1;
- }
-+
-+ /* turn off O_NONBLOCK */
-+ if (fcntl (control_fd, F_SETFL, O_WRONLY) == -1) {
-+ print_error (ERROR_LEVEL,
-+ "Can not turn off nonblocking mode for control_fd: %s\n",
-+ strerror(errno));
-+ return -2;
-+ }
-
- /* pass command to control pipe */
- if (write (control_fd, buf, ftell (mesf)) < 0)
+++ /dev/null
-From 7a343f7b79b70a8e7e04b2bd465d344ad0ef4c49 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Wed, 29 Apr 2015 16:30:17 +0800
-Subject: [PATCH 4/7] start_pppd: place opts after "plugin pppol2tp.so".
-
-so that plugin options like pppol2tp_debug_mark can be recognized by pppd.
----
- xl2tpd.c | 21 ++++++++++-----------
- 1 file changed, 10 insertions(+), 11 deletions(-)
-
---- a/xl2tpd.c
-+++ b/xl2tpd.c
-@@ -382,7 +382,6 @@ int start_pppd (struct call *c, struct p
- /* char a, b; */
- char tty[512];
- char *stropt[80];
-- struct ppp_opts *p;
- #ifdef USE_KERNEL
- struct sockaddr_pppol2tp sax;
- int flags;
-@@ -396,16 +395,7 @@ int start_pppd (struct call *c, struct p
- struct call *sc;
- struct tunnel *st;
-
-- p = opts;
- stropt[0] = strdup (PPPD);
-- while (p)
-- {
-- stropt[pos] = (char *) malloc (strlen (p->option) + 1);
-- strncpy (stropt[pos], p->option, strlen (p->option) + 1);
-- pos++;
-- p = p->next;
-- }
-- stropt[pos] = NULL;
- if (c->pppd > 0)
- {
- l2tp_log(LOG_WARNING, "%s: PPP already started on call!\n", __FUNCTION__);
-@@ -467,7 +457,6 @@ int start_pppd (struct call *c, struct p
- snprintf (stropt[pos], 10, "%d", c->ourcid);
- pos++;
- }
-- stropt[pos] = NULL;
- }
- else
- #endif
-@@ -497,6 +486,16 @@ int start_pppd (struct call *c, struct p
- return -EINVAL;
- }
- stropt[pos++] = strdup(tty);
-+ }
-+
-+ {
-+ struct ppp_opts *p = opts;
-+ while (p)
-+ {
-+ stropt[pos] = strdup (p->option);
-+ pos++;
-+ p = p->next;
-+ }
- stropt[pos] = NULL;
- }
-
--- /dev/null
+From f6eaaabb0b2fab12cf597b8c1d12d470a13e581f Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Thu, 14 May 2015 14:58:10 +0800
+Subject: [PATCH 204/210] xl2tpd-control: enhance output of print_error().
+
+ - Add prefix "xl2tpd-control: " to print_error() output.
+ - Output response from xl2tpd only when -d is enabled as result of
+ control command can be retrieved from exit code.
+ - Remove some redundant and not that useful verbose output.
+---
+ xl2tpd-control.c | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/xl2tpd-control.c b/xl2tpd-control.c
+index abc0324..6b08850 100644
+--- a/xl2tpd-control.c
++++ b/xl2tpd-control.c
+@@ -164,7 +164,6 @@ int main (int argc, char *argv[])
+ {
+ control_filename = strdup (CONTROL_PIPE);
+ }
+- print_error (DEBUG_LEVEL, "set control filename to %s\n", control_filename);
+
+ /* parse command name */
+ for (command = commands; command->name; command++)
+@@ -176,10 +175,7 @@ int main (int argc, char *argv[])
+ }
+ }
+
+- if (command->name)
+- {
+- print_error (DEBUG_LEVEL, "get command %s\n", command->name);
+- } else {
++ if (!command->name) {
+ print_error (ERROR_LEVEL, "error: no such command %s\n", argv[i]);
+ return -1;
+ }
+@@ -303,7 +299,8 @@ int main (int argc, char *argv[])
+ int command_result_code = read_result (
+ result_fd, rbuf, CONTROL_PIPE_MESSAGE_SIZE
+ );
+- printf ("%s", rbuf);
++ /* rbuf contains a newline, make it double to form a boundary. */
++ print_error (DEBUG_LEVEL, "command response: \n%s\n", rbuf);
+
+ return command_result_code;
+ }
+@@ -313,6 +310,7 @@ void print_error (int level, const char *fmt, ...)
+ if (level > log_level) return;
+ va_list args;
+ va_start (args, fmt);
++ fprintf (stderr, "xl2tpd-control: ");
+ vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+--
+1.7.10.4
+
+++ /dev/null
-From d4a484db1684cce15966bb722644416f90253ea7 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 30 Apr 2015 13:53:11 +0800
-Subject: [PATCH 5/7] xl2tpd-control: cleaup result file atexit().
-
----
- xl2tpd-control.c | 20 +++++++++++++-------
- 1 file changed, 13 insertions(+), 7 deletions(-)
-
---- a/xl2tpd-control.c
-+++ b/xl2tpd-control.c
-@@ -35,6 +35,9 @@
- #define TUNNEL_REQUIRED 1
- #define TUNNEL_NOT_REQUIRED 0
-
-+char result_filename[128];
-+int result_fd = -1;
-+
- int log_level = ERROR_LEVEL;
-
- void print_error (int level, const char *fmt, ...);
-@@ -117,6 +120,14 @@ void help()
- );
- }
-
-+void cleanup(void)
-+{
-+ /* cleaning up */
-+ if (result_fd >= 0)
-+ close (result_fd);
-+ unlink (result_filename);
-+}
-+
- int main (int argc, char *argv[])
- {
- char* control_filename = NULL;
-@@ -195,11 +206,11 @@ int main (int argc, char *argv[])
- FILE* mesf = fmemopen (buf, CONTROL_PIPE_MESSAGE_SIZE, "w");
-
- /* create result pipe for reading */
-- char result_filename[128];
- snprintf (result_filename, 128, RESULT_FILENAME_FORMAT, getpid());
- unlink (result_filename);
- mkfifo (result_filename, 0600);
-- int result_fd = open (result_filename, O_RDONLY | O_NONBLOCK, 0600);
-+ atexit(cleanup);
-+ result_fd = open (result_filename, O_RDONLY | O_NONBLOCK, 0600);
- if (result_fd < 0)
- {
- print_error (ERROR_LEVEL,
-@@ -293,11 +304,6 @@ int main (int argc, char *argv[])
- );
- printf ("%s", rbuf);
-
-- /* cleaning up */
--
-- close (result_fd);
-- unlink (result_filename);
--
- return command_result_code;
- }
-
--- /dev/null
+From 1c148f6645f43bf5abd8a9b8f0708a598b357d97 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Thu, 14 May 2015 19:56:39 +0800
+Subject: [PATCH 205/210] xl2tpd: fix typo in reporting available lns count.
+
+---
+ xl2tpd.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xl2tpd.c b/xl2tpd.c
+index c9b7579..6c945fc 100644
+--- a/xl2tpd.c
++++ b/xl2tpd.c
+@@ -1039,7 +1039,7 @@ int control_handle_available(FILE* resf, char* bufp){
+ lns_count++;
+ }
+
+- write_res (resf, "%02i AVAILABLE lns.cout=%d\n", 0, lns_count);
++ write_res (resf, "%02i AVAILABLE lns.count=%d\n", 0, lns_count);
+
+ lac = laclist;
+ int lac_count = 0;
+@@ -1053,7 +1053,7 @@ int control_handle_available(FILE* resf, char* bufp){
+ if(deflac){
+ write_res (resf, "%02i AVAILABLE lac.%d.name=%s\n", 0, lac_count, deflac->entname);
+ lac_count++;
+- }
++ }
+
+ write_res (resf, "%02i AVAILABLE lac.count=%d\n", 0, lac_count);
+ return 1;
+--
+1.7.10.4
+
+++ /dev/null
-From 1e8b82388578a622c5caf8fa04c238fdd7808ecc Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 30 Apr 2015 13:53:40 +0800
-Subject: [PATCH 6/7] xl2tpd: fix possible buffer overflow when filling
- stropt[].
-
----
- xl2tpd.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/xl2tpd.c
-+++ b/xl2tpd.c
-@@ -490,7 +490,8 @@ int start_pppd (struct call *c, struct p
-
- {
- struct ppp_opts *p = opts;
-- while (p)
-+ int maxn_opts = sizeof(stropt) / sizeof(stropt[0]) - 1;
-+ while (p && pos < maxn_opts)
- {
- stropt[pos] = strdup (p->option);
- pos++;
--- /dev/null
+From 18fdf802d31354c62a27cc5a63b196780a0d486e Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Wed, 29 Apr 2015 16:30:17 +0800
+Subject: [PATCH 206/210] xl2tpd: start_pppd: place opts after "plugin
+ pppol2tp.so".
+
+so that plugin options like pppol2tp_debug_mark can be recognized by
+pppd. While doing this also add bound check to prevent potential buffer
+overflow problem.
+---
+ xl2tpd.c | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/xl2tpd.c b/xl2tpd.c
+index 6c945fc..017adfd 100644
+--- a/xl2tpd.c
++++ b/xl2tpd.c
+@@ -382,7 +382,6 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
+ /* char a, b; */
+ char tty[512];
+ char *stropt[80];
+- struct ppp_opts *p;
+ #ifdef USE_KERNEL
+ struct sockaddr_pppol2tp sax;
+ int flags;
+@@ -396,16 +395,7 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
+ struct call *sc;
+ struct tunnel *st;
+
+- p = opts;
+ stropt[0] = strdup (PPPD);
+- while (p)
+- {
+- stropt[pos] = (char *) malloc (strlen (p->option) + 1);
+- strncpy (stropt[pos], p->option, strlen (p->option) + 1);
+- pos++;
+- p = p->next;
+- }
+- stropt[pos] = NULL;
+ if (c->pppd > 0)
+ {
+ l2tp_log(LOG_WARNING, "%s: PPP already started on call!\n", __FUNCTION__);
+@@ -467,7 +457,6 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
+ snprintf (stropt[pos], 10, "%d", c->ourcid);
+ pos++;
+ }
+- stropt[pos] = NULL;
+ }
+ else
+ #endif
+@@ -497,6 +486,17 @@ int start_pppd (struct call *c, struct ppp_opts *opts)
+ return -EINVAL;
+ }
+ stropt[pos++] = strdup(tty);
++ }
++
++ {
++ struct ppp_opts *p = opts;
++ int maxn_opts = sizeof(stropt) / sizeof(stropt[0]) - 1;
++ while (p && pos < maxn_opts)
++ {
++ stropt[pos] = strdup (p->option);
++ pos++;
++ p = p->next;
++ }
+ stropt[pos] = NULL;
+ }
+
+--
+1.7.10.4
+
+++ /dev/null
-From 44ced2bbf1d6b39bb36c3cb8be6e40c8764e2e8a Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Thu, 30 Apr 2015 13:57:36 +0800
-Subject: [PATCH 7/7] l2tp_log: remove log prefix that will duplicate with
- procd.
-
----
- misc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/misc.c
-+++ b/misc.c
-@@ -61,7 +61,7 @@ void l2tp_log (int level, const char *fm
- init_log();
- SYSLOG_CALL( syslog (level, "%s", buf) );
- } else {
-- fprintf(stderr, "xl2tpd[%d]: %s", getpid(), buf);
-+ fprintf(stderr, "%s", buf);
- }
- }
-
--- /dev/null
+From b3402a68a4d29e9b1ae4e012e39a7bcb14fea3cf Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Thu, 30 Apr 2015 13:57:36 +0800
+Subject: [PATCH 207/210] xl2tpd: introduce new option -l for using syslog as
+ the logging facility.
+
+Defaults to old behaviour if no -l option was specified. Also update
+manual doc to reflect this change.
+---
+ doc/xl2tpd.8 | 5 +++++
+ file.h | 1 +
+ misc.c | 2 +-
+ xl2tpd.c | 13 ++++++++++++-
+ 4 files changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/doc/xl2tpd.8 b/doc/xl2tpd.8
+index 915b247..7afccac 100644
+--- a/doc/xl2tpd.8
++++ b/doc/xl2tpd.8
+@@ -20,6 +20,11 @@ This option prevents xl2tpd from detaching from the terminal and
+ daemonizing.
+
+ .TP
++.B -l
++This option tells xl2tpd to use syslog for logging even when \fB\-D\fR
++was specified.
++
++.TP
+ .B -c <config file>
+ Tells xl2tpd to use an alternate config file. Default is
+ /etc/xl2tpd/xl2tpd.conf. Fallback configuration file is
+diff --git a/file.h b/file.h
+index 89987ae..92df046 100644
+--- a/file.h
++++ b/file.h
+@@ -151,6 +151,7 @@ struct global
+ char pidfile[STRLEN]; /* File containing the pid number*/
+ char controlfile[STRLEN]; /* Control file name (named pipe) */
+ int daemon; /* Use daemon mode? */
++ int syslog; /* Use syslog for logging? */
+ int accesscontrol; /* Use access control? */
+ int forceuserspace; /* Force userspace? */
+ int packet_dump; /* Dump (print) all packets? */
+diff --git a/misc.c b/misc.c
+index 3092401..cccf4ca 100644
+--- a/misc.c
++++ b/misc.c
+@@ -57,7 +57,7 @@ void l2tp_log (int level, const char *fmt, ...)
+ vsnprintf (buf, sizeof (buf), fmt, args);
+ va_end (args);
+
+- if(gconfig.daemon) {
++ if(gconfig.syslog) {
+ init_log();
+ SYSLOG_CALL( syslog (level, "%s", buf) );
+ } else {
+diff --git a/xl2tpd.c b/xl2tpd.c
+index 017adfd..1937690 100644
+--- a/xl2tpd.c
++++ b/xl2tpd.c
+@@ -1594,7 +1594,7 @@ void do_control ()
+ void usage(void) {
+ printf("\nxl2tpd version: %s\n", SERVER_VERSION);
+ printf("Usage: xl2tpd [-c <config file>] [-s <secret file>] [-p <pid file>]\n"
+- " [-C <control file>] [-D]\n"
++ " [-C <control file>] [-D] [-l]\n"
+ " [-v, --version]\n");
+ printf("\n");
+ exit(1);
+@@ -1605,6 +1605,7 @@ void init_args(int argc, char *argv[])
+ int i=0;
+
+ gconfig.daemon=1;
++ gconfig.syslog=-1;
+ memset(gconfig.altauthfile,0,STRLEN);
+ memset(gconfig.altconfigfile,0,STRLEN);
+ memset(gconfig.authfile,0,STRLEN);
+@@ -1642,6 +1643,9 @@ void init_args(int argc, char *argv[])
+ else if (! strncmp(argv[i],"-D",2)) {
+ gconfig.daemon=0;
+ }
++ else if (! strncmp(argv[i],"-l",2)) {
++ gconfig.syslog=1;
++ }
+ else if (! strncmp(argv[i],"-s",2)) {
+ if(++i == argc)
+ usage();
+@@ -1667,6 +1671,13 @@ void init_args(int argc, char *argv[])
+ usage();
+ }
+ }
++
++ /*
++ * defaults to syslog if no log facility was explicitly
++ * specified and we are about to daemonize
++ */
++ if (gconfig.syslog < 0)
++ gconfig.syslog = gconfig.daemon;
+ }
+
+
+--
+1.7.10.4
+
--- /dev/null
+From a2b163a65a2d4fbca57c3aa82b526cf8fbc8e449 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Fri, 15 May 2015 10:56:23 +0800
+Subject: [PATCH 208/210] xl2tpd: unlink result file to prevent leftover a
+ regular file.
+
+---
+ xl2tpd.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/xl2tpd.c b/xl2tpd.c
+index 1937690..c11fe66 100644
+--- a/xl2tpd.c
++++ b/xl2tpd.c
+@@ -1582,6 +1582,8 @@ void do_control ()
+ if (resf)
+ {
+ fclose (resf);
++ /* unlink it anyway to prevent leftover a regular file. */
++ unlink(res_filename);
+ }
+ }
+
+--
+1.7.10.4
+
--- /dev/null
+From 2d0eff7f56936823d784425d2171be295ba11027 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Fri, 15 May 2015 15:55:10 +0800
+Subject: [PATCH 209/210] xl2tpd: ignore SIGPIPE signal.
+
+---
+ xl2tpd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xl2tpd.c b/xl2tpd.c
+index c11fe66..58ed868 100644
+--- a/xl2tpd.c
++++ b/xl2tpd.c
+@@ -1551,7 +1551,6 @@ void do_control ()
+ /*FIXME: check quotes to allow filenames with spaces?
+ (do not forget quotes escaping to allow filenames with quotes)*/
+
+- /*FIXME: write to res_filename may cause SIGPIPE, need to catch it*/
+ resf = fopen (res_filename, "w");
+ if (!resf) {
+ l2tp_log (LOG_DEBUG, "%s: Can't open result file %s\n",
+@@ -1811,6 +1810,7 @@ void init (int argc,char *argv[])
+ signal (SIGCHLD, &sigchld_handler);
+ signal (SIGUSR1, &sigusr1_handler);
+ signal (SIGHUP, &sighup_handler);
++ signal (SIGPIPE, SIG_IGN);
+ init_scheduler ();
+
+ unlink(gconfig.controlfile);
+--
+1.7.10.4
+
--- /dev/null
+From 26b77b7cdc70beddc68507f74372a4e2815720f0 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Sun, 17 May 2015 10:53:44 +0800
+Subject: [PATCH 210/210] xl2tpd-control: show all available commands in
+ --help.
+
+---
+ xl2tpd-control.c | 63 ++++++++++++++++++++++++++++++++++++++----------------
+ 1 file changed, 44 insertions(+), 19 deletions(-)
+
+diff --git a/xl2tpd-control.c b/xl2tpd-control.c
+index 6b08850..b98ff24 100644
+--- a/xl2tpd-control.c
++++ b/xl2tpd-control.c
+@@ -51,6 +51,7 @@ struct command_t
+ char *name;
+ int (*handler) (FILE*, char* tunnel, int optc, char *optv[]);
+ int requires_tunnel;
++ char *help;
+ };
+
+ int command_add_lac (FILE*, char* tunnel, int optc, char *optv[]);
+@@ -65,13 +66,29 @@ int command_available (FILE*, char* tunnel, int optc, char *optv[]);
+
+ struct command_t commands[] = {
+ /* Keep this command mapping for backwards compat */
+- {"add", &command_add_lac, TUNNEL_REQUIRED},
+- {"connect", &command_connect_lac, TUNNEL_REQUIRED},
+- {"disconnect", &command_disconnect_lac, TUNNEL_REQUIRED},
+- {"remove", &command_remove_lac, TUNNEL_REQUIRED},
++ {"add", &command_add_lac, TUNNEL_REQUIRED,
++ "\tadd\tadds new or modify existing lac configuration.\n"
++ "\t\tConfiguration must be specified as command options in\n"
++ "\t\t<key>=<value> pairs format.\n"
++ "\t\tSee available options in xl2tpd.conf(5)\n"
++ },
++ {"connect", &command_connect_lac, TUNNEL_REQUIRED,
++ "\tconnect\ttries to activate the tunnel.\n"
++ "\t\tUsername and secret for the tunnel can be passed as\n"
++ "\t\tcommand options.\n"
++ },
++ {"disconnect", &command_disconnect_lac, TUNNEL_REQUIRED,
++ "\tdisconnect\tdisconnects the tunnel.\n"
++ },
++ {"remove", &command_remove_lac, TUNNEL_REQUIRED,
++ "\tremove\tremoves lac configuration from xl2tpd.\n"
++ "\t\txl2tpd disconnects the tunnel before removing.\n"
++ },
+
+ /* LAC commands */
+- {"add-lac", &command_add_lac, TUNNEL_REQUIRED},
++ {"add-lac", &command_add_lac, TUNNEL_REQUIRED,
++ "\tadd-lns\tadds new or modify existing lns configuration.\n"
++ },
+ {"connect-lac", &command_connect_lac, TUNNEL_REQUIRED},
+ {"disconnect-lac", &command_disconnect_lac, TUNNEL_REQUIRED},
+ {"remove-lac", &command_remove_lac, TUNNEL_REQUIRED},
+@@ -89,36 +106,44 @@ struct command_t commands[] = {
+
+ void usage()
+ {
++ int i;
++
+ printf ("\nxl2tpd server version %s\n", SERVER_VERSION);
+ printf ("Usage: xl2tpd-control [-c <PATH>] <command> <tunnel name> [<COMMAND OPTIONS>]\n"
+ "\n"
+ " -c\tspecifies xl2tpd control file\n"
+ " -d\tspecify xl2tpd-control to run in debug mode\n"
+ "--help\tshows extended help\n"
+- "Available commands: add, connect, disconnect, remove, add-lns\n"
+ );
++
++ printf ("Available commands: ");
++ for (i = 0; commands[i].name; i++) {
++ struct command_t *command = &commands[i];
++ int last = command[1].name == NULL;
++
++ printf ("%s%s", command->name, !last ? ", " : "\n");
++ }
+ }
+
+ void help()
+ {
++ int i;
++
+ usage();
+ printf (
+ "\n"
+ "Commands help:\n"
+- "\tadd\tadds new or modify existing lac configuration.\n"
+- "\t\tConfiguration must be specified as command options in\n"
+- "\t\t<key>=<value> pairs format.\n"
+- "\t\tSee available options in xl2tpd.conf(5)\n"
+- "\tconnect\ttries to activate the tunnel.\n"
+- "\t\tUsername and secret for the tunnel can be passed as\n"
+- "\t\tcommand options.\n"
+- "\tdisconnect\tdisconnects the tunnel.\n"
+- "\tremove\tremoves lac configuration from xl2tpd.\n"
+- "\t\txl2tpd disconnects the tunnel before removing.\n"
+- "\n"
+- "\tadd-lns\tadds new or modify existing lns configuration.\n"
+- "See xl2tpd-control man page for more help\n"
+ );
++
++ for (i = 0; commands[i].name; i++) {
++ struct command_t *command = &commands[i];
++
++ if (!command->help)
++ continue;
++ printf ("%s", command->help);
++ }
++ /*FIXME Ha! there is currently no manpage for xl2tpd-control */
++ printf ("See xl2tpd-control man page for more help\n");
+ }
+
+ void cleanup(void)
+--
+1.7.10.4
+
+++ /dev/null
-Index: xl2tpd-1.3.7pre20141126/xl2tpd-control.c
-===================================================================
---- xl2tpd-1.3.7pre20141126.orig/xl2tpd-control.c
-+++ xl2tpd-1.3.7pre20141126/xl2tpd-control.c
-@@ -12,6 +12,7 @@
-
- #define _GNU_SOURCE
-
-+#include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <stdarg.h>
#
-# Copyright (C) 2007-2014 OpenWrt.org
+# Copyright (C) 2007-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
BASE_VERSION:=4.3
PKG_NAME:=bash
-PKG_VERSION:=$(BASE_VERSION).33
+PKG_VERSION:=$(BASE_VERSION).39
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(BASE_VERSION).tar.gz
--- a/execute_cmd.c
+++ b/execute_cmd.c
-@@ -2409,7 +2409,16 @@ execute_pipeline (command, asynchronous,
+@@ -2413,7 +2413,16 @@ execute_pipeline (command, asynchronous,
#endif
lstdin = wait_for (lastpid);
#if defined (JOB_CONTROL)
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-034
+
+Bug-Reported-by: Dreamcat4 <dreamcat4@gmail.com>
+Bug-Reference-ID: <CAN39uTpAEs2GFu4ebC_SfSVMRTh-DJ9YanrY4BZZ3OO+CCHjng@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-05/msg00001.html
+
+Bug-Description:
+
+If neither the -f nor -v options is supplied to unset, and a name argument is
+found to be a function and unset, subsequent name arguments are not treated as
+variables before attempting to unset a function by that name.
+
+Patch (apply with `patch -p0'):
+
+--- a/builtins/set.def
++++ b/builtins/set.def
+@@ -751,9 +751,11 @@ unset_builtin (list)
+ WORD_LIST *list;
+ {
+ int unset_function, unset_variable, unset_array, opt, nameref, any_failed;
++ int global_unset_func, global_unset_var;
+ char *name;
+
+ unset_function = unset_variable = unset_array = nameref = any_failed = 0;
++ global_unset_func = global_unset_var = 0;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "fnv")) != -1)
+@@ -761,10 +763,10 @@ unset_builtin (list)
+ switch (opt)
+ {
+ case 'f':
+- unset_function = 1;
++ global_unset_func = 1;
+ break;
+ case 'v':
+- unset_variable = 1;
++ global_unset_var = 1;
+ break;
+ case 'n':
+ nameref = 1;
+@@ -777,7 +779,7 @@ unset_builtin (list)
+
+ list = loptend;
+
+- if (unset_function && unset_variable)
++ if (global_unset_func && global_unset_var)
+ {
+ builtin_error (_("cannot simultaneously unset a function and a variable"));
+ return (EXECUTION_FAILURE);
+@@ -795,6 +797,9 @@ unset_builtin (list)
+
+ name = list->word->word;
+
++ unset_function = global_unset_func;
++ unset_variable = global_unset_var;
++
+ #if defined (ARRAY_VARS)
+ unset_array = 0;
+ if (!unset_function && valid_array_reference (name))
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -25,6 +25,6 @@
+ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
+ looks for to find the patch level (for the sccs version string). */
+
+-#define PATCHLEVEL 33
++#define PATCHLEVEL 34
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-035
+
+Bug-Reported-by: <romerox.adrian@gmail.com>
+Bug-Reference-ID: <CABV5r3zhPXmSKUe9uedeGc5YFBM2njJ1iVmY2h5neWdQpDBQug@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00045.html
+
+Bug-Description:
+
+A locale with a long name can trigger a buffer overflow and core dump. This
+applies on systems that do not have locale_charset in libc, are not using
+GNU libiconv, and are not using the libintl that ships with bash in lib/intl.
+
+Patch (apply with `patch -p0'):
+
+--- a/lib/sh/unicode.c
++++ b/lib/sh/unicode.c
+@@ -78,13 +78,15 @@ stub_charset ()
+ s = strrchr (locale, '.');
+ if (s)
+ {
+- strcpy (charsetbuf, s+1);
++ strncpy (charsetbuf, s+1, sizeof (charsetbuf) - 1);
++ charsetbuf[sizeof (charsetbuf) - 1] = '\0';
+ t = strchr (charsetbuf, '@');
+ if (t)
+ *t = 0;
+ return charsetbuf;
+ }
+- strcpy (charsetbuf, locale);
++ strncpy (charsetbuf, locale, sizeof (charsetbuf) - 1);
++ charsetbuf[sizeof (charsetbuf) - 1] = '\0';
+ return charsetbuf;
+ }
+ #endif
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -25,6 +25,6 @@
+ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
+ looks for to find the patch level (for the sccs version string). */
+
+-#define PATCHLEVEL 34
++#define PATCHLEVEL 35
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-036
+
+Bug-Reported-by: emanuelczirai@cryptolab.net
+Bug-Reference-ID: <f962e4f556da5ebfadaf7afe9c78a8cb@cryptolab.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00071.html
+
+Bug-Description:
+
+When evaluating and setting integer variables, and the assignment fails to
+create a variable (for example, when performing an operation on an array
+variable with an invalid subscript), bash attempts to dereference a null
+pointer, causing a segmentation violation.
+
+Patch (apply with `patch -p0'):
+
+--- a/variables.c
++++ b/variables.c
+@@ -2833,10 +2833,12 @@ bind_int_variable (lhs, rhs)
+ #endif
+ v = bind_variable (lhs, rhs, 0);
+
+- if (v && isint)
+- VSETATTR (v, att_integer);
+-
+- VUNSETATTR (v, att_invisible);
++ if (v)
++ {
++ if (isint)
++ VSETATTR (v, att_integer);
++ VUNSETATTR (v, att_invisible);
++ }
+
+ return (v);
+ }
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -25,6 +25,6 @@
+ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
+ looks for to find the patch level (for the sccs version string). */
+
+-#define PATCHLEVEL 35
++#define PATCHLEVEL 36
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-037
+
+Bug-Reported-by: Greg Wooledge <wooledg@eeg.ccf.org>
+Bug-Reference-ID: <20150204144240.GN13956@eeg.ccf.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00007.html
+
+Bug-Description:
+
+If an associative array uses `@' or `*' as a subscript, `declare -p' produces
+output that cannot be reused as input.
+
+Patch (apply with `patch -p0'):
+
+--- a/assoc.c
++++ b/assoc.c
+@@ -436,6 +436,8 @@ assoc_to_assign (hash, quoted)
+ #if 1
+ if (sh_contains_shell_metas (tlist->key))
+ istr = sh_double_quote (tlist->key);
++ else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0')
++ istr = sh_double_quote (tlist->key);
+ else
+ istr = tlist->key;
+ #else
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -25,6 +25,6 @@
+ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
+ looks for to find the patch level (for the sccs version string). */
+
+-#define PATCHLEVEL 36
++#define PATCHLEVEL 37
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-038
+
+Bug-Reported-by: worley@alum.mit.edu (Dale R. Worley)
+Bug-Reference-ID: <201406100051.s5A0pCeB014978@hobgoblin.ariadne.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00028.html
+
+Bug-Description:
+
+There are a number of instances where `time' is not recognized as a reserved
+word when the shell grammar says it should be.
+
+Patch (apply with `patch -p0'):
+
+--- a/parse.y
++++ b/parse.y
+@@ -2818,11 +2818,16 @@ time_command_acceptable ()
+ case AND_AND:
+ case OR_OR:
+ case '&':
++ case WHILE:
+ case DO:
++ case UNTIL:
++ case IF:
+ case THEN:
++ case ELIF:
+ case ELSE:
+ case '{': /* } */
+- case '(': /* ) */
++ case '(': /* )( */
++ case ')': /* only valid in case statement */
+ case BANG: /* ! time pipeline */
+ case TIME: /* time time pipeline */
+ case TIMEOPT: /* time -p time pipeline */
+--- a/y.tab.c
++++ b/y.tab.c
+@@ -5130,11 +5130,16 @@ time_command_acceptable ()
+ case AND_AND:
+ case OR_OR:
+ case '&':
++ case WHILE:
+ case DO:
++ case UNTIL:
++ case IF:
+ case THEN:
++ case ELIF:
+ case ELSE:
+ case '{': /* } */
+- case '(': /* ) */
++ case '(': /* )( */
++ case ')': /* only valid in case statement */
+ case BANG: /* ! time pipeline */
+ case TIME: /* time time pipeline */
+ case TIMEOPT: /* time -p time pipeline */
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -25,6 +25,6 @@
+ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
+ looks for to find the patch level (for the sccs version string). */
+
+-#define PATCHLEVEL 37
++#define PATCHLEVEL 38
+
+ #endif /* _PATCHLEVEL_H_ */
--- /dev/null
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-039
+
+Bug-Reported-by: SN <poczta-sn@gazeta.pl>
+Bug-Reference-ID: <54E2554C.205@gazeta.pl>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00060.html
+
+Bug-Description:
+
+Using the output of `declare -p' when run in a function can result in variables
+that are invisible to `declare -p'. This problem occurs when an assignment
+builtin such as `declare' receives a quoted compound array assignment as one of
+its arguments.
+
+Patch (apply with `patch -p0'):
+
+--- a/arrayfunc.c
++++ b/arrayfunc.c
+@@ -404,6 +404,9 @@ assign_array_var_from_word_list (var, li
+ (*var->assign_func) (var, l->word->word, i, 0);
+ else
+ array_insert (a, i, l->word->word);
++
++ VUNSETATTR (var, att_invisible); /* no longer invisible */
++
+ return var;
+ }
+
+@@ -634,6 +637,10 @@ assign_array_var_from_string (var, value
+
+ if (nlist)
+ dispose_words (nlist);
++
++ if (var)
++ VUNSETATTR (var, att_invisible); /* no longer invisible */
++
+ return (var);
+ }
+
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -25,6 +25,6 @@
+ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
+ looks for to find the patch level (for the sccs version string). */
+
+-#define PATCHLEVEL 38
++#define PATCHLEVEL 39
+
+ #endif /* _PATCHLEVEL_H_ */
PKG_NAME:=lsof
PKG_VERSION:=4.86
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)+dfsg.orig.tar.gz
PKG_SOURCE_URL:=http://ftp2.de.debian.org/debian/pool/main/l/lsof
URL:=http://people.freebsd.org/~abe/
endef
+ifeq ($(CONFIG_IPV6),y)
+ LINUX_CLIB_IPV6="-DHASIPv6"
+else
+ LINUX_CLIB_IPV6=
+endif
+
define Build/Configure
cd $(PKG_BUILD_DIR); \
- LINUX_CLIB="-DGLIBCV=2" \
+ LINUX_CLIB="-DGLIBCV=2 $(LINUX_CLIB_IPV6)" \
LSOF_CC="$(TARGET_CC)" \
LSOF_INCLUDE="-I$(STAGING_DIR)/usr/include" \
LSOF_VSTR="$(LINUX_VERSION)" \
SECTION:=utils
CATEGORY:=Utilities
TITLE:=PPS-tools
- DEPENDS:=@LINUX_3_10||@LINUX_3_13||@LINUX_3_14
+ DEPENDS:=@LINUX_3_10||@LINUX_3_13||@LINUX_3_14||@LINUX_3_18
endef
define Package/pps-tools/description
include $(TOPDIR)/rules.mk
PKG_NAME:=tcsh
-PKG_VERSION:=6.18.01
+PKG_VERSION:=6.19.00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=ftp://ftp.astron.com/pub/tcsh/
-PKG_MD5SUM:=6eed09dbd4223ab5b6955378450d228a
+PKG_SOURCE_URL:=http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/
+PKG_MD5SUM:=f5f854833578647795bc906dd4bcb5d5
PKG_LICENSE:=BSD-4-Clause-UC
PKG_LICENSE_FILES:=Copyright
--- /dev/null
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -449,7 +449,7 @@ pure:$(P) ${OBJS}
+
+ gethost: gethost.c sh.err.h tc.const.h sh.h
+ rm -f gethost
+- ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} ${CFLAGS} $(srcdir)/gethost.c
++ ${CC_FOR_GETHOST} -o gethost ${CPPFLAGS} $(srcdir)/gethost.c
+
+ tc.defs.c: gethost host.defs
+ @rm -f $@.tmp
--- /dev/null
+--- 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)
PKG_NAME:=xz
PKG_VERSION:=5.2.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://tukaani.org/xz
$(1)/usr/lib/pkgconfig/
endef
+define Package/xz-utils/install
+ true
+endef
+
define Package/liblzma/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblzma.so.* $(1)/usr/lib/