include $(TOPDIR)/rules.mk
PKG_NAME:=htop
-PKG_VERSION:=1.0.3
+PKG_VERSION:=2.0.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://hisham.hm/htop/releases/$(PKG_VERSION)/
-PKG_MD5SUM:=e768b9b55c033d9c1dffda72db3a6ac7
+PKG_MD5SUM:=f75fe92b4defaa80d99109830f34b5e2
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
endef
CONFIGURE_ARGS += \
- --disable-native-affinity \
--disable-unicode \
- --enable-hwloc
+ --disable-hwloc
CONFIGURE_VARS += \
ac_cv_file__proc_stat=yes \
- ac_cv_file__proc_meminfo=yes \
- ac_cv_func_malloc_0_nonnull=yes \
- ac_cv_func_realloc_0_nonnull=yes
+ ac_cv_file__proc_meminfo=yes
define Package/htop/install
$(INSTALL_DIR) $(1)/usr/bin
include $(TOPDIR)/rules.mk
PKG_NAME:=monit
-PKG_VERSION:=5.14
+PKG_VERSION:=5.17.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://mmonit.com/monit/dist
-PKG_MD5SUM:=1b3ae1eb08a0914402a8764e5689c1c5
+PKG_MD5SUM:=6918ed7411a244c9e158f5e54c86be78
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
include $(TOPDIR)/rules.mk
PKG_NAME:=zabbix
-PKG_VERSION:=2.4.6
-PKG_RELEASE:=2
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/zabbix
-PKG_MD5SUM:=06ad8d5808a0eddf2b9f0a256b6a5fde
+PKG_MD5SUM:=890d9eec69304ad552959fabe0a5d122
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
SUBMENU:=zabbix
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
USERID:=zabbix=53:zabbix=53
-endef
-
-define Package/zabbix-agent
- $(call Package/zabbix/Default)
- TITLE+= agent
+ DEPENDS += $(ICONV_DEPENDS)
endef
define Package/zabbix-agentd
define Package/zabbix-extra-mac80211
$(call Package/zabbix/Default)
TITLE+= discovery/userparameters for mac80211
- DEPENDS += +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS
+ DEPENDS = +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS
endef
define Package/zabbix-extra-network
$(call Package/zabbix/Default)
TITLE+= discovery/userparameters for network
- DEPENDS += +zabbix-agentd +libuci-lua +lua
+ DEPENDS = +zabbix-agentd +libuci-lua +lua
endef
define Package/zabbix-extra-wifi
$(call Package/zabbix/Default)
TITLE+= discovery/userparameters for wifi
- DEPENDS += +zabbix-agentd +libiwinfo-lua +libuci-lua +lua
+ DEPENDS = +zabbix-agentd +libiwinfo-lua +libuci-lua +lua
endef
define Package/zabbix-sender
$(1)/etc/zabbix_agentd.conf.d/$(2)
endef
-define Package/zabbix-agent/conffiles
-/etc/zabbix_agent.conf
-endef
define Package/zabbix-agentd/conffiles
/etc/zabbix_agentd.conf
endef
$(call Build/Compile/zabbix-extra-mac80211)
endef
-define Package/zabbix-agent/install
- $(call Package/zabbix/install/sbin,$(1),agent)
- $(call Package/zabbix/install/etc,$(1),agent)
-endef
-
define Package/zabbix-agentd/install
$(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d
$(call Package/zabbix/install/sbin,$(1),agentd)
$(call Package/zabbix/install/etc,$(1),proxy)
endef
-$(eval $(call BuildPackage,zabbix-agent))
$(eval $(call BuildPackage,zabbix-agentd))
$(eval $(call BuildPackage,zabbix-extra-mac80211))
$(eval $(call BuildPackage,zabbix-extra-network))
# If you want to know the exact meaning of an UserParameter, you can search in the ieee80211 standard:
# http://standards.ieee.org/getieee802/download/802.11-2012.pdf
-# exemple: for mac80211.ACKFailureCount search for dot11ACKFailureCount (page 2145)
+# example: for mac80211.ACKFailureCount search for dot11ACKFailureCount (page 2145)
# mac80211 phy discovery (like 'phy0')
-# exemple: {"data":[{"{#PHY}":"phy0"}]}
+# example: {"data":[{"{#PHY}":"phy0"}]}
#
UserParameter=mac80211.phydiscovery,zabbix_helper_mac80211 discovery
#see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates
# network interface discovery
-# exemple: {"data":[{"{#IF}":"lo", "{#NET}":"loopback"},{"{#IF}":"br-lan", "{#NET}":"lan"},{"{#IF}":"eth0.1", "{#NET}":"wan"}]}
+# example: {"data":[{"{#IF}":"lo", "{#NET}":"loopback"},{"{#IF}":"br-lan", "{#NET}":"lan"},{"{#IF}":"eth0.1", "{#NET}":"wan"}]}
#
UserParameter=netowrt.discovery,lua -l uci -e 'x = uci.cursor(nil, "/var/state");list = "{\"data\":[";x:foreach("network", "interface", function(s) list=list.."{\"{#IF}\":\""..s.ifname.."\", \"{#NET}\":\""..s[".name"].."\"}," end); list=string.gsub(list,",$",""); print(list.."]}")'
#see http://wiki.openwrt.org/doc/howto/zabbix for ready to use templates
# wifi interface discovery
-# exemple: {"data":[{"{#IF}":"wlan0", "{#MODE}":"ap", "{#SSID}":"Openwrt", "{#NET}":"lan", "{#DEV}":"radio0", "{#ENC}":"psk2+ccmp", "{#TYPE}":"mac80211", "{#HWMODE}":"11ng", "{#CHANNEL}":"11", "{#BSSID}":"xx:xx:xx:xx:xx:xx"}]}
+# example: {"data":[{"{#IF}":"wlan0", "{#MODE}":"ap", "{#SSID}":"Openwrt", "{#NET}":"lan", "{#DEV}":"radio0", "{#ENC}":"psk2+ccmp", "{#TYPE}":"mac80211", "{#HWMODE}":"11ng", "{#CHANNEL}":"11", "{#BSSID}":"xx:xx:xx:xx:xx:xx"}]}
# ubus call only work as root so you need to run zabbix as root to use wifi.ifdiscovery
UserParameter=wifi.ifdiscovery, lua -l ubus -l iwinfo -e 'u=ubus.connect();list="{\"data\":[";stat=u:call("network.wireless", "status", {});for dev, dev_table in pairs(stat) do for i, iface in pairs(dev_table["interfaces"]) do c=iface["config"];i=iface["ifname"];t=iwinfo.type(i);iw=iwinfo[t];e = iw.encryption(i);e = e and e.description or "None";n = table.concat(c["network"]," ");list=list.."{\"{#IF}\":\""..i.."\", \"{#MODE}\":\""..iw.mode(i).."\", \"{#SSID}\":\""..c["ssid"].."\", \"{#NET}\":\""..n.."\", \"{#DEV}\":\""..dev.."\", \"{#ENC}\":\""..e.."\", \"{#TYPE}\":\""..t.."\", \"{#HWMODE}\":\"".."?".."\", \"{#CHANNEL}\":\""..iw.channel(i).."\", \"{#BSSID}\":\""..iw.bssid(i).."\"},";end;end;list=string.gsub(list,",$","");print(list.."]}")'
procd_open_instance
procd_set_param command ${PROG} -c ${CONFIG} -f
procd_set_param respawn
+ procd_set_param stdout 1
+ procd_set_param stderr 1
procd_close_instance
}
--- a/configure.ac
+++ b/configure.ac
-@@ -152,6 +152,10 @@ if test "x$found_resolv" != "xyes"; then
+@@ -161,6 +161,10 @@ if test "x$found_resolv" != "xyes"; then
AC_MSG_ERROR([Unable to do DNS lookups (libresolv check failed)])
fi
LIBS="${LIBS} ${RESOLV_LIBS}"
dnl * *
--- a/src/libs/zbxsysinfo/common/net.c
+++ b/src/libs/zbxsysinfo/common/net.c
-@@ -450,6 +450,7 @@ static int dns_query(AGENT_REQUEST *requ
+@@ -471,6 +471,7 @@ static int dns_query(AGENT_REQUEST *requ
return SYSINFO_RET_FAIL;
}
if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf))))
{
SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot create DNS query: %s", zbx_strerror(errno)));
-@@ -480,6 +481,11 @@ static int dns_query(AGENT_REQUEST *requ
+@@ -505,6 +506,11 @@ static int dns_query(AGENT_REQUEST *requ
_res.retry = retry;
res = res_send(buf, res, answer.buffer, sizeof(answer.buffer));
+ return SYSINFO_RET_FAIL;
+#endif
+ _res.options = saved_options;
_res.retrans = saved_retrans;
- _res.retry = saved_retry;
--- a/src/libs/zbxsysinfo/linux/cpu.c
+++ b/src/libs/zbxsysinfo/linux/cpu.c
-@@ -62,6 +62,45 @@ int SYSTEM_CPU_DISCOVERY(AGENT_REQUEST *
- return SYSINFO_RET_OK;
- }
+@@ -22,6 +22,45 @@
+ #include "stats.h"
+ #include "log.h"
+
+/* uclibc and dietlibc do not have this junk -ReneR */
--- /dev/null
+--- a/src/libs/zbxnix/daemon.c
++++ b/src/libs/zbxnix/daemon.c
+@@ -300,11 +300,14 @@ int daemon_start(int allow_root, const c
+
+ if (0 == allow_root && 0 == getuid()) /* running as root? */
+ {
++#if 0
++/* allow changing user and foreground */
+ if (0 != (flags & ZBX_TASK_FLAG_FOREGROUND))
+ {
+ zbx_error("cannot run as root!");
+ exit(EXIT_FAILURE);
+ }
++#endif
+
+ if (NULL == user)
+ user = "zabbix";
--- a/conf/zabbix_agentd.conf
+++ b/conf/zabbix_agentd.conf
-@@ -3,12 +3,8 @@
+@@ -3,12 +3,11 @@
############ GENERAL PARAMETERS #################
-# PidFile=/tmp/zabbix_agentd.pid
+# We do not need PidFile with procd
+# PidFile=/var/run/zabbix_agentd.pid
++
++# use syslog
++LogType=system
- ### Option: LogFile
- # Name of log file.
-@@ -18,8 +14,6 @@
+ ### Option: LogType
+ # Specifies where log messages are written to:
+@@ -27,8 +26,6 @@
# Default:
# LogFile=
### Option: LogFileSize
# Maximum size of log file in MB.
# 0 - disable automatic log rotation.
-@@ -104,6 +98,7 @@ Server=127.0.0.1
+@@ -114,6 +111,7 @@ Server=127.0.0.1
# Range: 0-100
# Default:
# StartAgents=3
##### Active checks related
-@@ -119,8 +114,6 @@ Server=127.0.0.1
+@@ -129,8 +127,6 @@ Server=127.0.0.1
# Default:
# ServerActive=
### Option: Hostname
# Unique, case sensitive hostname.
# Required for active checks and must match hostname as configured on the server.
-@@ -130,8 +123,6 @@ ServerActive=127.0.0.1
+@@ -140,8 +136,6 @@ ServerActive=127.0.0.1
# Default:
# Hostname=
### Option: HostnameItem
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
# Does not support UserParameters or aliases.
-@@ -249,8 +240,8 @@ Hostname=Zabbix server
+@@ -259,8 +253,8 @@ Hostname=Zabbix server
# Include=
# Include=/usr/local/etc/zabbix_agentd.userparams.conf
+++ /dev/null
---- a/include/common.h
-+++ b/include/common.h
-@@ -1083,4 +1083,7 @@ int parse_serveractive_element(char *str
-
- char *zbx_dyn_escape_shell_single_quote(const char *text);
-
-+#define ZBX_RUN_BACKGROUND 0
-+#define ZBX_RUN_FOREGROUND 1
-+
- #endif
---- a/include/daemon.h
-+++ b/include/daemon.h
-@@ -28,7 +28,7 @@ extern char *CONFIG_PID_FILE;
-
- #include "threads.h"
-
--int daemon_start(int allow_root, const char *user);
-+int daemon_start(int allow_root, const char *user, int run_foreground);
- void daemon_stop();
-
- int zbx_sigusr_send(int flags);
-@@ -36,6 +36,6 @@ int zbx_sigusr_send(int flags);
- #define ZBX_IS_RUNNING() 1
- #define ZBX_DO_EXIT()
-
--#define START_MAIN_ZABBIX_ENTRY(a, u) daemon_start(a, u)
-+#define START_MAIN_ZABBIX_ENTRY(a, u, f) daemon_start(a, u, f)
-
- #endif /* ZABBIX_DAEMON_H */
---- a/src/libs/zbxnix/daemon.c
-+++ b/src/libs/zbxnix/daemon.c
-@@ -272,16 +272,17 @@ static void set_daemon_signal_handlers()
- * *
- * Purpose: init process as daemon *
- * *
-- * Parameters: allow_root - allow root permission for application *
-- * user - user on the system to which to drop the *
-- * privileges *
-+ * Parameters: allow_root - allow root permission for application *
-+ * user - user on the system to which to drop the *
-+ * privileges *
-+ * run_foreground - should it close its controling tty *
- * *
- * Author: Alexei Vladishev *
- * *
- * Comments: it doesn't allow running under 'root' if allow_root is zero *
- * *
- ******************************************************************************/
--int daemon_start(int allow_root, const char *user)
-+int daemon_start(int allow_root, const char *user, int run_foreground)
- {
- pid_t pid;
- struct passwd *pwd;
-@@ -336,15 +337,22 @@ int daemon_start(int allow_root, const c
- #endif
- }
-
-- if (0 != (pid = zbx_fork()))
-- exit(EXIT_SUCCESS);
-+ if ( ZBX_RUN_FOREGROUND != run_foreground)
-+ if (0 != (pid = zbx_fork()))
-+ exit(EXIT_SUCCESS);
-
- setsid();
-
- signal(SIGHUP, SIG_IGN);
-
-- if (0 != (pid = zbx_fork()))
-- exit(EXIT_SUCCESS);
-+ if ( ZBX_RUN_FOREGROUND == run_foreground) {
-+ zabbix_log(LOG_LEVEL_INFORMATION, "Running in foreground...");
-+ } else {
-+ if (0 != (pid = zbx_fork()))
-+ exit(EXIT_SUCCESS);
-+ }
-+
-+
-
- if (-1 == chdir("/")) /* this is to eliminate warning: ignoring return value of chdir */
- assert(0);
---- a/src/zabbix_agent/zabbix_agentd.c
-+++ b/src/zabbix_agent/zabbix_agentd.c
-@@ -62,6 +62,8 @@ const char *progname = NULL;
- static char DEFAULT_CONFIG_FILE[] = SYSCONFDIR "/zabbix_agentd.conf";
- #endif
-
-+int CONFIG_FOREGROUND = ZBX_RUN_BACKGROUND;
-+
- /* application TITLE */
- const char title_message[] = APPLICATION_NAME
- #if defined(_WIN64)
-@@ -93,6 +95,7 @@ const char usage_message[] =
- const char *help_message[] = {
- "Options:",
- " -c --config <config-file> Absolute path to the configuration file",
-+ " -f --foreground Run in foreground don't fork",
- " -p --print Print known items and exit",
- " -t --test <item key> Test specified item and exit",
- " -h --help Display help information",
-@@ -127,6 +130,7 @@ const char *help_message[] = {
- /* COMMAND LINE OPTIONS */
- static struct zbx_option longopts[] =
- {
-+ {"foreground", 0, NULL, 'f'},
- {"config", 1, NULL, 'c'},
- {"help", 0, NULL, 'h'},
- {"version", 0, NULL, 'V'},
-@@ -147,7 +151,7 @@ static struct zbx_option longopts[] =
- };
-
- static char shortopts[] =
-- "c:hVpt:"
-+ "c:hfVpt:"
- #ifndef _WINDOWS
- "R:"
- #else
-@@ -241,6 +245,9 @@ static void parse_commandline(int argc,
- {
- switch (ch)
- {
-+ case 'f':
-+ CONFIG_FOREGROUND = ZBX_RUN_FOREGROUND;
-+ break;
- case 'c':
- CONFIG_FILE = strdup(zbx_optarg);
- break;
-@@ -944,7 +951,7 @@ int main(int argc, char **argv)
- break;
- }
-
-- START_MAIN_ZABBIX_ENTRY(CONFIG_ALLOW_ROOT, CONFIG_USER);
-+ START_MAIN_ZABBIX_ENTRY(CONFIG_ALLOW_ROOT, CONFIG_USER, CONFIG_FOREGROUND);
-
- exit(EXIT_SUCCESS);
- }
---- a/src/zabbix_proxy/proxy.c
-+++ b/src/zabbix_proxy/proxy.c
-@@ -60,6 +60,7 @@ const char usage_message[] = "[-hV] [-c
-
- const char *help_message[] = {
- "Options:",
-+ " -f --foreground Run in foreground don't fork",
- " -c --config <file> Absolute path to the configuration file",
- " -R --runtime-control <option> Perform administrative functions",
- "",
-@@ -84,6 +85,7 @@ const char *help_message[] = {
- /* long options */
- static struct zbx_option longopts[] =
- {
-+ {"foreground", 0, NULL, 'f'},
- {"config", 1, NULL, 'c'},
- {"runtime-control", 1, NULL, 'R'},
- {"help", 0, NULL, 'h'},
-@@ -92,7 +94,7 @@ static struct zbx_option longopts[] =
- };
-
- /* short options */
--static char shortopts[] = "c:n:hVR:";
-+static char shortopts[] = "c:n:fhVR:";
-
- /* end of COMMAND LINE OPTIONS */
-
-@@ -202,6 +204,7 @@ char *CONFIG_LOAD_MODULE_PATH = NULL;
- char **CONFIG_LOAD_MODULE = NULL;
-
- char *CONFIG_USER = NULL;
-+int CONFIG_FOREGROUND = ZBX_RUN_BACKGROUND;
-
- /* web monitoring */
- #ifdef HAVE_LIBCURL
-@@ -666,6 +669,9 @@ int main(int argc, char **argv)
- {
- switch (ch)
- {
-+ case 'f':
-+ CONFIG_FOREGROUND = ZBX_RUN_FOREGROUND;
-+ break;
- case 'c':
- CONFIG_FILE = zbx_strdup(CONFIG_FILE, zbx_optarg);
- break;
-@@ -705,7 +711,7 @@ int main(int argc, char **argv)
- init_ipmi_handler();
- #endif
-
-- return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER);
-+ return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER, CONFIG_FOREGROUND);
- }
-
- int MAIN_ZABBIX_ENTRY()
---- a/src/zabbix_server/server.c
-+++ b/src/zabbix_server/server.c
-@@ -64,6 +64,7 @@ const char usage_message[] = "[-hV] [-c
-
- const char *help_message[] = {
- "Options:",
-+ " -f --foreground Run in foreground don't fork",
- " -c --config <file> Absolute path to the configuration file",
- " -R --runtime-control <option> Perform administrative functions",
- "",
-@@ -88,6 +89,7 @@ const char *help_message[] = {
- /* long options */
- static struct zbx_option longopts[] =
- {
-+ {"foreground", 0, NULL, 'f'},
- {"config", 1, NULL, 'c'},
- {"runtime-control", 1, NULL, 'R'},
- {"help", 0, NULL, 'h'},
-@@ -96,7 +98,7 @@ static struct zbx_option longopts[] =
- };
-
- /* short options */
--static char shortopts[] = "c:n:hVR:";
-+static char shortopts[] = "c:n:fhVR:";
-
- /* end of COMMAND LINE OPTIONS */
-
-@@ -197,6 +199,7 @@ char *CONFIG_LOAD_MODULE_PATH = NULL;
- char **CONFIG_LOAD_MODULE = NULL;
-
- char *CONFIG_USER = NULL;
-+int CONFIG_FOREGROUND = ZBX_RUN_BACKGROUND;
-
- /* web monitoring */
- #ifdef HAVE_LIBCURL
-@@ -631,6 +634,9 @@ int main(int argc, char **argv)
- {
- switch (ch)
- {
-+ case 'f':
-+ CONFIG_FOREGROUND = ZBX_RUN_FOREGROUND;
-+ break;
- case 'c':
- CONFIG_FILE = zbx_strdup(CONFIG_FILE, zbx_optarg);
- break;
-@@ -670,7 +676,7 @@ int main(int argc, char **argv)
- init_ipmi_handler();
- #endif
-
-- return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER);
-+ return daemon_start(CONFIG_ALLOW_ROOT, CONFIG_USER, CONFIG_FOREGROUND);
- }
-
- int MAIN_ZABBIX_ENTRY()
sys/vmmeter.h strings.h vm/vm_param.h \
sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \
@@ -63,6 +63,11 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string
- sys/timeb.h Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
+ Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
execinfo.h libperfstat.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \
dlfcn.h sys/utsname.h)
+AC_CHECK_HEADERS(sys/sysinfo.h, [], [], [
include $(TOPDIR)/rules.mk
PKG_NAME:=lua-mosquitto
-PKG_VERSION:=0.1
+PKG_VERSION:=0.2
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_BUILD_DEPENDS:=node
+PKG_BUILD_DEPENDS:=node/host
PKG_NODE_VERSION:=0.12.7
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
$(MAKE_FLAGS) \
npm_config_arch=$(CONFIG_ARCH) \
npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+ npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
PREFIX="$(PKG_INSTALL_DIR)/usr/" \
$(STAGING_DIR)/host/bin/npm install -g $(PKG_BUILD_DIR)
endef
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_BUILD_DEPENDS:=node
+PKG_BUILD_DEPENDS:=node/host
PKG_NODE_VERSION:=0.12.7
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
$(MAKE_FLAGS) \
npm_config_arch=$(CONFIG_ARCH) \
npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+ npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
PREFIX="$(PKG_INSTALL_DIR)/usr/" \
$(STAGING_DIR)/host/bin/npm install -g $(PKG_BUILD_DIR)
endef
PKG_SOURCE_VERSION:=c56c8aa5d113c6f2574d1f7e64d41745702965bb
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
-PKG_BUILD_DEPENDS:=node
+PKG_BUILD_DEPENDS:=node/host
PKG_NODE_VERSION:=0.12.7
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
$(MAKE_FLAGS) \
npm_config_arch=$(CONFIG_ARCH) \
npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+ npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
PREFIX="$(PKG_INSTALL_DIR)/usr/" \
$(STAGING_DIR)/host/bin/npm install -g $(PKG_BUILD_DIR)
endef
PKG_SOURCE_URL:=http://registry.npmjs.org/$(PKG_NPM_NAME)/-/
PKG_MD5SUM:=1eb21082e0aa676b8350182a60230808
-PKG_BUILD_DEPENDS:=node
+PKG_BUILD_DEPENDS:=node/host
PKG_NODE_VERSION:=0.12.7
PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
$(MAKE_FLAGS) \
npm_config_arch=$(CONFIG_ARCH) \
npm_config_nodedir=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/ \
+ npm_config_cache=$(BUILD_DIR)/node-v$(PKG_NODE_VERSION)/npm-cache \
PREFIX="$(PKG_INSTALL_DIR)/usr/" \
$(STAGING_DIR)/host/bin/npm install -g $(PKG_BUILD_DIR)
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=perl-cgi
-PKG_VERSION:=4.26
+PKG_VERSION:=4.28
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://www.cpan.org/authors/id/L/LE/LEEJO
PKG_SOURCE:=CGI-$(PKG_VERSION).tar.gz
-PKG_MD5SUM:=bf606eda81c9dc5347c1f3483732b2d2
+PKG_MD5SUM:=28efb391377f6e98c19c23292d5fcc8c
PKG_LICENSE:=GPL Artistic-2.0
PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
provides(NSIG - 1).
owrt:sigs * Symbolic names of the first 32 signals
this architecture provides, in numeric
- order. Seperated by whitespaces.
+ order. Separated by whitespaces.
owrt:sig_name_extra * Symbolic names of any additional signals
this architecture provides after
- owrt:sig_count. Seperated by
+ owrt:sig_count. Separated by
whitespaces.
owrt:sig_num_extra * Numeric values associated with the
signal names provided in
- owrt:sig_name_extra. Seperated by
+ owrt:sig_name_extra. Separated by
whitespaces.
Passed via command line
A symbol name has to consist entirely of alphanumeric characters as well as
the underscore(_) character. In addition, symbol names may be prefixed with an
-all-lowercase string, seperated by a colon(:):
+all-lowercase string, separated by a colon(:):
my:name=value
=head3 Symbol definitions
-A symbol definition is in the form of a simple name/value pair, seperated by
+A symbol definition is in the form of a simple name/value pair, separated by
an equals sign(=):
name=value
include $(TOPDIR)/rules.mk
PKG_NAME:=php
-PKG_VERSION:=5.6.18
+PKG_VERSION:=5.6.19
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>, Michael Heimpold <mhei@heimpold.de>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_MD5SUM:=177ba962557795866ae331ad4ad99bba
+PKG_MD5SUM:=aab960cc1b2bfbeb00d030a9d42b38bd
PKG_FIXUP:=libtool autoreconf
PKG_BUILD_PARALLEL:=1
--- /dev/null
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=attrs
+PKG_VERSION:=15.2.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/a/attrs
+PKG_MD5SUM:=b3c460eb6482f6e557c0e4025475c007
+
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-attrs
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python-attrs
+ URL:=https://attrs.readthedocs.org/
+ DEPENDS:=+python-light
+endef
+
+define Package/python-attrs/description
+attrs is an MIT-licensed Python package with class decorators that ease
+the chores of implementing the most common attribute-related object
+protocols.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-attrs))
+$(eval $(call BuildPackage,python-attrs))
include $(TOPDIR)/rules.mk
PKG_NAME:=cffi
-PKG_VERSION:=1.5.0
+PKG_VERSION:=1.5.2
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://pypi.python.org/packages/source/c/cffi
-PKG_MD5SUM:=dec8441e67880494ee881305059af656
+PKG_MD5SUM:=fa766133f7299464c8bf857e0c966a82
PKG_BUILD_DEPENDS:=python python-setuptools
HOST_BUILD_DEPENDS:=libffi/host python/host python-setuptools/host python-pycparser/host
include $(TOPDIR)/rules.mk
PKG_NAME:=cryptography
-PKG_VERSION:=1.2.3
+PKG_VERSION:=1.3.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://pypi.python.org/packages/source/c/cryptography
-PKG_MD5SUM:=5474d2b3e8c7555a60852e48d2743f85
+PKG_MD5SUM:=bc8148d2ff2d80fef8ef2d2e856b3a7f
PKG_BUILD_DEPENDS:=python-cffi/host
--- /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:=gmpy
+PKG_VERSION:=1.17
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/g/gmpy
+PKG_MD5SUM:=2bf419076b06e107167e219f60ac6d27
+
+PKG_LICENSE:=LGPL-2.1+
+PKG_LICENSE_FILES:=lgpl-2.1.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-gmpy
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python-gmpy
+ URL:=http://code.google.com/p/gmpy/
+ DEPENDS:=+libgmp +python-light
+endef
+
+define Package/python-gmpy/description
+gmpy is a C-coded Python extension module that provides access to the
+GMP (or MPIR) multiple-precision arithmetic library.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-gmpy))
+$(eval $(call BuildPackage,python-gmpy))
--- /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:=gmpy2
+PKG_VERSION:=2.0.7
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/g/gmpy2
+PKG_MD5SUM:=b5aada3ee5afb316ea94604f45192054
+
+PKG_LICENSE:=LGPL-3.0+
+PKG_LICENSE_FILES:=COPYING.LESSER
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-gmpy2
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python-gmpy2
+ URL:=http://code.google.com/p/gmpy/
+ DEPENDS:=+libgmp +python-light
+endef
+
+define Package/python-gmpy2/description
+gmpy2 is a C-coded Python extension module that supports multiple-precision
+arithmetic. gmpy2 is the successor to the original gmpy module. The gmpy module
+only supported the GMP multiple-precision library. gmpy2 adds support for the
+MPFR (correctly rounded real floating-point arithmetic) and MPC (correctly
+rounded complex floating-point arithmetic) libraries. gmpy2 also updates the
+API and naming conventions to be more consistent and support the additional
+functionality.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --nompfr)
+endef
+
+$(eval $(call PyPackage,python-gmpy2))
+$(eval $(call BuildPackage,python-gmpy2))
#
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=idna
-PKG_VERSION:=2.0
+PKG_VERSION:=2.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://pypi.python.org/packages/source/i/idna
-PKG_MD5SUM:=bd17a9d15e755375f48a62c13b25b801
+PKG_MD5SUM:=f6473caa9c5e0cc1ad3fd5d04c3c114b
PKG_BUILD_DEPENDS:=python python-setuptools
#
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=ipaddress
-PKG_VERSION:=1.0.15
+PKG_VERSION:=1.0.16
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://pypi.python.org/packages/source/i/ipaddress
-PKG_MD5SUM:=12915e923b738107e47827478d553ba1
+PKG_MD5SUM:=1e27b62aa20f5b6fc200b2bdbf0d0847
PKG_BUILD_DEPENDS:=python python-setuptools
--- /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:=Parsley
+PKG_VERSION:=1.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/P/Parsley
+PKG_MD5SUM:=92bc256e5f73810a609dc7874637ad31
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-parsley
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python-parsley
+ URL:=http://launchpad.net/parsley
+ DEPENDS:=+python-light
+endef
+
+define Package/python-parsley/description
+Parsing and pattern matching made easy.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-parsley))
+$(eval $(call BuildPackage,python-parsley))
--- /dev/null
+diff -Nur a/setup.py b/setup.py
+--- a/setup.py 2015-09-09 10:45:25.000000000 +0800
++++ b/setup.py 2015-12-01 17:31:03.143409843 +0800
+@@ -14,7 +14,6 @@
+ author_email="washort42@gmail.com",
+ license="MIT License",
+ long_description=open("README").read(),
+- packages=["ometa", "terml", "ometa._generated", "terml._generated",
+- "ometa.test", "terml.test"],
++ packages=["ometa", "terml", "ometa._generated", "terml._generated"],
+ py_modules=["parsley"]
+ )
--- /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:=pyasn1-modules
+PKG_VERSION:=0.0.8
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pyasn1-modules
+PKG_MD5SUM:=178129bc7fbf07215c25230c5f053f81
+
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE.txt
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-pyasn1-modules
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python-pyasn1-modules
+ URL:=http://sourceforge.net/projects/pyasn1/
+ DEPENDS:=+python-light +python-pyasn1
+endef
+
+define Package/python-pyasn1-modules/description
+This is a small but growing collection of ASN.1 data structures
+expressed in Python terms using pyasn1 data model.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-pyasn1-modules))
+$(eval $(call BuildPackage,python-pyasn1-modules))
#
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=pyOpenSSL
-PKG_VERSION:=0.15.1
+PKG_VERSION:=16.0.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pyOpenSSL
-PKG_MD5SUM:=f447644afcbd5f0a1f47350fec63a4c6
+PKG_MD5SUM:=9587d813dcf656e9f2760e41a3682dc3
PKG_BUILD_DEPENDS:=python python-setuptools
+++ /dev/null
-diff --git a/setup.py b/setup.py
-index c376f87..6444fac 100755
---- a/setup.py
-+++ b/setup.py
-@@ -22,14 +22,7 @@ setup(name='pyOpenSSL', version=__version__,
- 'OpenSSL.rand',
- 'OpenSSL.crypto',
- 'OpenSSL.SSL',
-- 'OpenSSL.version',
-- 'OpenSSL.test.__init__',
-- 'OpenSSL.test.util',
-- 'OpenSSL.test.test_crypto',
-- 'OpenSSL.test.test_rand',
-- 'OpenSSL.test.test_ssl',
-- 'OpenSSL.test.test_tsafe',
-- 'OpenSSL.test.test_util',],
-+ 'OpenSSL.version',],
- description = 'Python wrapper module around the OpenSSL library',
- author = 'Jean-Paul Calderone',
- author_email = 'exarkun@twistedmatrix.com',
-@@ -74,5 +67,4 @@ High-level wrapper around a subset of the OpenSSL library, includes
- 'Topic :: Security :: Cryptography',
- 'Topic :: Software Development :: Libraries :: Python Modules',
- 'Topic :: System :: Networking',
-- ],
-- test_suite="OpenSSL")
-+ ])
--- /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:=pyptlib
+PKG_VERSION:=0.0.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/pyptlib
+PKG_MD5SUM:=2fc7b8803777451c1fad3d5e25f1b99c
+
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-pyptlib
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python-pyptlib
+ URL:=https://pypi.python.org/pypi/pyptlib
+ DEPENDS:=+python-light
+endef
+
+define Package/python-pyptlib/description
+A python implementation of the Pluggable Transports for Circumvention
+specification for Tor
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-pyptlib))
+$(eval $(call BuildPackage,python-pyptlib))
--- /dev/null
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=service_identity
+PKG_VERSION:=16.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/service_identity
+PKG_MD5SUM:=d52392597b9c44a740abf322bfdb21e6
+
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-service-identity
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python-service-identity
+ URL:=https://github.com/pyca/service_identity
+ DEPENDS:=+python-light +python-attrs +python-pyasn1 +python-pyasn1-modules +python-pyopenssl
+endef
+
+define Package/python-service-identity/description
+service_identity aspires to give you all the tools you need for
+verifying whether a certificate is valid for the intended purposes.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,,install --prefix="/usr" --root="$(PKG_INSTALL_DIR)")
+endef
+
+$(eval $(call PyPackage,python-service-identity))
+$(eval $(call BuildPackage,python-service-identity))
PKG_SOURCE_URL:=https://pypi.python.org/packages/source/s/setuptools/
PKG_MD5SUM:=bf37191cb4c1472fb61e6f933d2006b1
-HOST_BUILD_DEPENDS:=python/host
+HOST_BUILD_DEPENDS:=python python/host
PKG_BUILD_DIR:=$(BUILD_DIR)/setuptools-$(PKG_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/setuptools-$(PKG_VERSION)
--- /dev/null
+#
+# Copyright (C) 2015-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=txsocksx
+PKG_VERSION:=1.15.0.2
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/t/txsocksx
+PKG_MD5SUM:=0266b9ae7b58f7550a49683afebf65ba
+
+PKG_BUILD_DEPENDS:=python python-setuptools
+
+PKG_LICENSE:=ISC
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/python-txsocksx
+ SECTION:=lang
+ CATEGORY:=Languages
+ SUBMENU:=Python
+ TITLE:=python-txsocksx
+ URL:=https://github.com/habnabit/txsocksx
+ DEPENDS:=+python-light +python-parsley +twisted
+endef
+
+define Package/python-txsocksx/description
+txsocksx is SOCKS4/4a and SOCKS5 client endpoints for Twisted 10.1 or
+greater.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,, \
+ install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
+ PKG_VERSION="$(PKG_VERSION)" \
+ )
+endef
+
+$(eval $(call PyPackage,python-txsocksx))
+$(eval $(call BuildPackage,python-txsocksx))
--- /dev/null
+diff --git a/setup.py b/setup.py
+index 7979f89..3873a1e 100644
+--- a/setup.py
++++ b/setup.py
+@@ -35,5 +35,5 @@ setup(
+ 'version_module_paths': ['txsocksx/_version.py'],
+ },
+ install_requires=install_requires,
+- packages=['txsocksx', 'txsocksx.test'],
++ packages=['txsocksx'],
+ )
--- /dev/null
+diff --git a/setup.py b/setup.py
+index 7979f89..5e1abb3 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,6 +1,8 @@
+ # Copyright (c) Aaron Gallagher <_@habnab.it>
+ # See COPYING for details.
+
++import os
++
+ from setuptools import setup
+
+
+@@ -30,10 +32,11 @@ setup(
+ ],
+ license='ISC',
+
+- setup_requires=['vcversioner>=1'],
+- vcversioner={
+- 'version_module_paths': ['txsocksx/_version.py'],
+- },
++ #setup_requires=['vcversioner>=1'],
++ #vcversioner={
++ # 'version_module_paths': ['txsocksx/_version.py'],
++ #},
++ version=os.environ.get('PKG_VERSION'),
+ install_requires=install_requires,
+ packages=['txsocksx', 'txsocksx.test'],
+ )
PKG_NAME:=python
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
LDSHARED="$(HOSTCC) -shared" \
CFLAGS="$(HOST_CFLAGS)" \
CPPFLAGS="$(HOST_CPPFLAGS) -I$(HOST_PYTHON_INC_DIR)" \
- LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION)" \
+ LDFLAGS="$(HOST_LDFLAGS) -lpython$(PYTHON_VERSION) -Wl$(comma)-rpath=$(STAGING_DIR)/host/lib" \
_PYTHON_HOST_PLATFORM=linux2 \
$(3) \
, \
$(eval $(call RubyBuildPackage,logger,logger and syslog library,+ruby-multithread))
$(eval $(call RubyBuildPackage,math,math library,+ruby-patterns))
$(eval $(call RubyBuildPackage,minitest,Gem minitest,+ruby-gems))
-$(eval $(call RubyBuildPackage,misc,standard libraries subset (miscelaneous files),))
+$(eval $(call RubyBuildPackage,misc,standard libraries subset (miscellaneous files),))
$(eval $(call RubyBuildPackage,mkmf,makefile library,+ruby-filelib +ruby-optparse +ruby-rbconfig))
$(eval $(call RubyBuildPackage,multithread,multithread library,+ruby-misc))
$(eval $(call RubyBuildPackage,net,Network Protocols Library,+ruby-datetime +ruby-digest +ruby-filelib +ruby-uri))
package_dependencies.each do
|(pkg,deps)|
- # Ignore dependencies that are aready required by another dependency
+ # Ignore dependencies that are already required by another dependency
deps_clean = deps.reject {|dep_suspect| deps.detect {|dep_provider|
if package_dependencies[dep_provider].include?(dep_suspect)
puts "#{pkg}: #{dep_suspect} is already required by #{dep_provider}"
--- /dev/null
+#
+# Copyright (C) 2006-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=twisted
+PKG_VERSION:=16.0.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=Twisted-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/T/Twisted \
+ http://twistedmatrix.com/Releases/Twisted/16.0
+PKG_MD5SUM:=c6aa35e9a1e40fce6797247f39647d2a
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/Twisted-$(PKG_VERSION)
+PKG_BUILD_DEPENDS:=python python-setuptools USE_MUSL:librpc
+
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
+
+include $(INCLUDE_DIR)/package.mk
+$(call include_mk, python-package.mk)
+
+define Package/twisted
+ SUBMENU:=Python
+ SECTION:=lang
+ CATEGORY:=Languages
+ TITLE:=Python networking engine
+ URL:=http://twistedmatrix.com/
+ DEPENDS:=+python-light +zope-interface
+endef
+
+define Package/twisted/description
+ Twisted is a networking engine written in Python, supporting numerous
+ protocols. It contains a web server, numerous chat clients, chat servers,
+ mail servers, and more.
+endef
+
+define PyPackage/twisted/filespec
++|/usr/bin
+-|/usr/bin/manhole
+-|/usr/bin/tap2deb
+-|/usr/bin/tap2rpm
+-|/usr/bin/tkconch
++|$(PYTHON_PKG_DIR)
+-|$(PYTHON_PKG_DIR)/twisted/conch/scripts/tkconch.py
+-|$(PYTHON_PKG_DIR)/twisted/scripts/manhole.py
+-|$(PYTHON_PKG_DIR)/twisted/scripts/tap2deb.py
+-|$(PYTHON_PKG_DIR)/twisted/scripts/tap2rpm.py
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,, \
+ install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" --no-compile, \
+ )
+endef
+
+$(eval $(call PyPackage,twisted))
+$(eval $(call BuildPackage,twisted))
--- /dev/null
+diff -Nur a/twisted/python/twisted-completion.zsh b/twisted/python/twisted-completion.zsh
+--- a/twisted/python/twisted-completion.zsh 2015-11-29 11:30:47.000000000 +0800
++++ b/twisted/python/twisted-completion.zsh 2015-11-30 20:05:59.755695237 +0800
+@@ -1,4 +1,4 @@
+-#compdef twistd trial conch cftp ckeygen pyhtmlizer tap2deb tkconch manhole tap2rpm
++#compdef twistd trial conch cftp ckeygen pyhtmlizer
+ #
+ # This is the ZSH completion file for Twisted commands. It calls the current
+ # command-line with the special "--_shell-completion" option which is handled
--- /dev/null
+diff -Nur a/setup.py b/setup.py
+--- a/setup.py 2015-11-29 11:30:46.000000000 +0800
++++ b/setup.py 2015-12-02 18:22:10.251268303 +0800
+@@ -49,11 +49,11 @@
+ scripts = getScripts()
+
+ setup_args.update(dict(
+- packages=getPackages('twisted'),
++ packages=getPackages('twisted', ignore=['test']),
+ conditionalExtensions=getExtensions(),
+ scripts=scripts,
+ extras_require=_EXTRAS_REQUIRE,
+- data_files=getDataFiles('twisted'),
++ data_files=getDataFiles('twisted', ignore=['test']),
+ **STATIC_PACKAGE_METADATA))
+
+ setup(**setup_args)
+diff -Nur a/twisted/python/dist.py b/twisted/python/dist.py
+--- a/twisted/python/dist.py 2015-11-29 11:30:47.000000000 +0800
++++ b/twisted/python/dist.py 2015-12-02 19:21:20.076370379 +0800
+@@ -268,11 +268,6 @@
+ """
+ extensions = [
+ ConditionalExtension(
+- "twisted.test.raiser",
+- ["twisted/test/raiser.c"],
+- condition=lambda _: _isCPython),
+-
+- ConditionalExtension(
+ "twisted.internet.iocpreactor.iocpsupport",
+ ["twisted/internet/iocpreactor/iocpsupport/iocpsupport.c",
+ "twisted/internet/iocpreactor/iocpsupport/winsock_pointers.c"],
PKG_NAME:=boost
PKG_VERSION:=1_60_0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/boost
define Build/Compile
$(info Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CPU_TYPE) $(CPU_SUBTYPE))
( cd $(PKG_BUILD_DIR) ; \
- echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \
+ echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS) $(if $(CONFIG_boost-coroutine2),-std=c++14,)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \
$(if $(CONFIG_PACKAGE_boost-python3), \
echo "using python : 3.5 : $(STAGING_DIR_ROOT)/usr/bin/python3 : $(STAGING_DIR)/usr/include/python3.5/ ;" >> \
tools/build/src/user-config.jam; \
#
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=giflib
-PKG_VERSION:=5.1.1
+PKG_VERSION:=5.1.2
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/giflib
-PKG_MD5SUM:=1c39333192712788c6568c78a949f13e
+PKG_MD5SUM:=323a9f11ab56c8a2d1715376410ce376
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
endef
TARGET_CFLAGS += $(FPIC)
-CONFIGURE_ARGS += --enable-x11=no
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)
--- /dev/null
+--- a/configure.ac
++++ b/configure.ac
+@@ -21,7 +21,6 @@ AC_PROG_MAKE_SET
+ AM_PROG_CC_C_O
+
+ dnl Allow partial building on systems without xmlto
+-AC_CHECK_PROG([have_xmlto], [xmlto], ["yes"],["no"])
+ AM_CONDITIONAL([BUILD_DOC], [test "x${have_xmlto}" = "xyes"])
+
+ dnl Shared-library version
--- /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:=libfastjson
+PKG_VERSION:=0.99.2
+PKG_RELEASE:=1
+
+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/rsyslog/libfastjson.git
+PKG_SOURCE_VERSION:=v$(PKG_VERSION)
+
+PKG_MAINTAINER:=Dov Murik <dmurik@us.ibm.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILE:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libfastjson
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=A fast JSON library for C
+ URL:=https://github.com/rsyslog/libfastjson
+endef
+
+define Package/libfastjson/description
+ libfastjson - A fast JSON library for C
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+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/* $(1)/usr/lib/
+endef
+
+define Package/libfastjson/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfastjson.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libfastjson))
include $(TOPDIR)/rules.mk
PKG_NAME:=libimobiledevice
-PKG_VERSION:=1.2.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.2.1
+PKG_RELEASE:=1
PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
PKG_LICENSE:=LGPL-2.1+
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/libimobiledevice/libimobiledevice.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=53eb963f8e6d607cca6b50381c10820a5e8357f4
+PKG_SOURCE_VERSION:=df1f5c4d70d0c19ad40072f5246ca457e7f9849e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_FIXUP:=autoreconf
TARGET_CFLAGS+= -std=gnu99
-CONFIGURE_ARGS += --disable-libwacom
+CONFIGURE_ARGS += --disable-libwacom --disable-tests --disable-documentation
define Package/libinput
SECTION:=libs
--- /dev/null
+--- a/src/evdev-tablet.c
++++ b/src/evdev-tablet.c
+@@ -1155,9 +1155,11 @@ static void
+ tablet_mark_all_axes_changed(struct tablet_dispatch *tablet,
+ struct libinput_tablet_tool *tool)
+ {
++#if 0
+ static_assert(sizeof(tablet->changed_axes) ==
+ sizeof(tool->axis_caps),
+ "Mismatching array sizes");
++#endif
+
+ memcpy(tablet->changed_axes,
+ tool->axis_caps,
PKG_NAME:=libplist
PKG_VERSION:=1.13
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
PKG_LICENSE:=LGPL-2.1+
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/libimobiledevice/libplist.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=cc907c0f162ee84e5698b9c27ac6fb0be8bb9bc0
+PKG_SOURCE_VERSION:=060eda6b1846968aa40b0d38dcf92ac46f933417
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_FIXUP:=autoreconf
#
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
PKG_NAME:=libsoxr
PKG_VERSION:=0.1.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://git.code.sf.net/p/soxr/code
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
+ Mike Brady <mikebrady@eircom.net>
+
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=LICENCE
PKG_REMOVE_FILES:=autogen.sh
PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CATEGORY:=Libraries
TITLE:=The SoX Resampler library
URL:=http://sourceforge.net/projects/soxr/
- MAINTAINER:=Mike Brady <mikebrady@eircom.net>
DEPENDS:= +libpthread
endef
High quality, one-dimensional sample-rate conversion library
endef
-CMAKE_OPTIONS:= -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=0 -DBUILD_EXAMPLES=0
+CMAKE_OPTIONS:= -DBUILD_TESTS=0 -DBUILD_EXAMPLES=0
CMAKE_OPTIONS+= -DHAVE_WORDS_BIGENDIAN_EXITCODE=$(if $(CONFIG_BIG_ENDIAN),0,1)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_BUILD_DIR)/src/soxr.h $(1)/usr/include/
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_BUILD_DIR)/src/*.a $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/soxr.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/soxr.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libsoxr/install
$(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_BUILD_DIR)/src/*.a $(1)/usr/lib/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoxr.so* $(1)/usr/lib/
endef
-
$(eval $(call BuildPackage,libsoxr))
#
-# Copyright (C) 2012-2015 OpenWrt.org
+# Copyright (C) 2012-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=libuecc
-PKG_VERSION:=6
+PKG_VERSION:=7
PKG_RELEASE:=1
PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/83
-PKG_MD5SUM:=cba68339ff46482ec4090303de18fff4
+PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/85
+PKG_MD5SUM:=5cd543cb8e7bce83a22c07a0579c95a1
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYRIGHT
PKG_NAME:=libusbmuxd
PKG_VERSION:=1.1.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
PKG_LICENSE:=LGPL-2.1+
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/libimobiledevice/libusbmuxd.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=f347085157006523622b0a7160be68d14f037c00
+PKG_SOURCE_VERSION:=4397b3376dc4e4cb1c991d0aed61ce6482614196
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_FIXUP:=autoreconf
include $(TOPDIR)/rules.mk
PKG_NAME:=libwebsockets
-PKG_VERSION:=1.7.3
+PKG_VERSION:=1.7.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
#
-# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2015-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=libxerces-c
-PKG_VERSION:=3.1.2
+PKG_VERSION:=3.1.3
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://git.apache.org/xerces-c.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=Xerces-C_3_1_2
+PKG_SOURCE_VERSION:=Xerces-C_3_1_3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
endef
+define Host/Install
+ $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(HOST_BUILD_DIR)/xml2-config
+ $(call Host/Install/Default)
+endef
+
$(eval $(call HostBuild))
$(eval $(call BuildPackage,libxml2))
PKG_NAME:=pcre
PKG_VERSION:=8.38
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
--- /dev/null
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2016-03-16
+Initial Package Version: 8.38
+Upstream Status: Applied
+Origin: Upstream, backported to 8.38 by Petr Písař at redhat
+Description: Various fixes, including for CVE-2016-1263 and many other
+bugs which have been fixed upstream. Many of these bugs were found by
+fuzzing, upstream is trying to persuade its users to move to pcre2 and
+giving low priority to further pcre1 maintenance releases.
+
+From 3c80e02cd464ea049e117b423fd48fab294c51a9 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Thu, 26 Nov 2015 20:29:13 +0000
+Subject: [PATCH] Fix auto-callout (?# comment bug.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1611 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Pisar: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 4d3b313..3360a8b 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -4699,6 +4699,23 @@ for (;; ptr++)
+ }
+ }
+
++ /* Skip over (?# comments. We need to do this here because we want to know if
++ the next thing is a quantifier, and these comments may come between an item
++ and its quantifier. */
++
++ if (c == CHAR_LEFT_PARENTHESIS && ptr[1] == CHAR_QUESTION_MARK &&
++ ptr[2] == CHAR_NUMBER_SIGN)
++ {
++ ptr += 3;
++ while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
++ if (*ptr == CHAR_NULL)
++ {
++ *errorcodeptr = ERR18;
++ goto FAILED;
++ }
++ continue;
++ }
++
+ /* See if the next thing is a quantifier. */
+
+ is_quantifier =
+@@ -6529,21 +6546,6 @@ for (;; ptr++)
+ case CHAR_LEFT_PARENTHESIS:
+ ptr++;
+
+- /* First deal with comments. Putting this code right at the start ensures
+- that comments have no bad side effects. */
+-
+- if (ptr[0] == CHAR_QUESTION_MARK && ptr[1] == CHAR_NUMBER_SIGN)
+- {
+- ptr += 2;
+- while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
+- if (*ptr == CHAR_NULL)
+- {
+- *errorcodeptr = ERR18;
+- goto FAILED;
+- }
+- continue;
+- }
+-
+ /* Now deal with various "verbs" that can be introduced by '*'. */
+
+ if (ptr[0] == CHAR_ASTERISK && (ptr[1] == ':'
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index e2e520f..92e3359 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4217,4 +4217,12 @@ backtracking verbs. --/
+
+ /a[[:punct:]b]/BZ
+
++/L(?#(|++<!(2)?/BZ
++
++/L(?#(|++<!(2)?/BOZ
++
++/L(?#(|++<!(2)?/BCZ
++
++/L(?#(|++<!(2)?/BCOZ
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testinput7 b/testdata/testinput7
+index e411a4b..00b9738 100644
+--- a/testdata/testinput7
++++ b/testdata/testinput7
+@@ -853,4 +853,8 @@ of case for anything other than the ASCII letters. --/
+
+ /a[b[:punct:]]/8WBZ
+
++/L(?#(|++<!(2)?/B8COZ
++
++/L(?#(|++<!(2)?/B8WCZ
++
+ /-- End of testinput7 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 85c565d..2cf7a90 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14574,4 +14574,40 @@ No match
+ End
+ ------------------------------------------------------------------
+
++/L(?#(|++<!(2)?/BZ
++------------------------------------------------------------------
++ Bra
++ L?+
++ Ket
++ End
++------------------------------------------------------------------
++
++/L(?#(|++<!(2)?/BOZ
++------------------------------------------------------------------
++ Bra
++ L?
++ Ket
++ End
++------------------------------------------------------------------
++
++/L(?#(|++<!(2)?/BCZ
++------------------------------------------------------------------
++ Bra
++ Callout 255 0 14
++ L?+
++ Callout 255 14 0
++ Ket
++ End
++------------------------------------------------------------------
++
++/L(?#(|++<!(2)?/BCOZ
++------------------------------------------------------------------
++ Bra
++ Callout 255 0 14
++ L?
++ Callout 255 14 0
++ Ket
++ End
++------------------------------------------------------------------
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput7 b/testdata/testoutput7
+index cc9ebdd..fdfff64 100644
+--- a/testdata/testoutput7
++++ b/testdata/testoutput7
+@@ -2348,4 +2348,24 @@ No match
+ End
+ ------------------------------------------------------------------
+
++/L(?#(|++<!(2)?/B8COZ
++------------------------------------------------------------------
++ Bra
++ Callout 255 0 14
++ L?
++ Callout 255 14 0
++ Ket
++ End
++------------------------------------------------------------------
++
++/L(?#(|++<!(2)?/B8WCZ
++------------------------------------------------------------------
++ Bra
++ Callout 255 0 14
++ L?+
++ Callout 255 14 0
++ Ket
++ End
++------------------------------------------------------------------
++
+ /-- End of testinput7 --/
+--
+2.4.3
+
+From ef6b10fcde41a2687f38d4a9ff2886b037948a1b Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Fri, 27 Nov 2015 17:13:13 +0000
+Subject: [PATCH 1/5] Fix negated POSIX class within negated overall class UCP
+ bug.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1612 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 3360a8b..3670f1e 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -5063,20 +5063,22 @@ for (;; ptr++)
+ ptr = tempptr + 1;
+ continue;
+
+- /* For the other POSIX classes (ascii, xdigit) we are going to fall
+- through to the non-UCP case and build a bit map for characters with
+- code points less than 256. If we are in a negated POSIX class
+- within a non-negated overall class, characters with code points
+- greater than 255 must all match. In the special case where we have
+- not yet generated any xclass data, and this is the final item in
+- the overall class, we need do nothing: later on, the opcode
++ /* For the other POSIX classes (ascii, cntrl, xdigit) we are going
++ to fall through to the non-UCP case and build a bit map for
++ characters with code points less than 256. If we are in a negated
++ POSIX class, characters with code points greater than 255 must
++ either all match or all not match. In the special case where we
++ have not yet generated any xclass data, and this is the final item
++ in the overall class, we need do nothing: later on, the opcode
+ OP_NCLASS will be used to indicate that characters greater than 255
+ are acceptable. If we have already seen an xclass item or one may
+ follow (we have to assume that it might if this is not the end of
+- the class), explicitly match all wide codepoints. */
++ the class), explicitly list all wide codepoints, which will then
++ either not match or match, depending on whether the class is or is
++ not negated. */
+
+ default:
+- if (!negate_class && local_negate &&
++ if (local_negate &&
+ (xclass || tempptr[2] != CHAR_RIGHT_SQUARE_BRACKET))
+ {
+ *class_uchardata++ = XCL_RANGE;
+diff --git a/testdata/testinput6 b/testdata/testinput6
+index aeb62a0..a178d3d 100644
+--- a/testdata/testinput6
++++ b/testdata/testinput6
+@@ -1553,4 +1553,13 @@
+ \x{200}
+ \x{37e}
+
++/[^[:^ascii:]\d]/8W
++ a
++ ~
++ 0
++ \a
++ \x{7f}
++ \x{389}
++ \x{20ac}
++
+ /-- End of testinput6 --/
+diff --git a/testdata/testoutput6 b/testdata/testoutput6
+index beb85aa..b64dc0d 100644
+--- a/testdata/testoutput6
++++ b/testdata/testoutput6
+@@ -2557,4 +2557,20 @@ No match
+ \x{37e}
+ 0: \x{37e}
+
++/[^[:^ascii:]\d]/8W
++ a
++ 0: a
++ ~
++ 0: ~
++ 0
++No match
++ \a
++ 0: \x{07}
++ \x{7f}
++ 0: \x{7f}
++ \x{389}
++No match
++ \x{20ac}
++No match
++
+ /-- End of testinput6 --/
+--
+2.4.3
+
+From bfc1dfa660c24dc7a75108d934290e50d7db2719 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Fri, 27 Nov 2015 17:41:04 +0000
+Subject: [PATCH 2/5] Fix bug for isolated \E between an item and its qualifier
+ when auto callout is set.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1613 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 3670f1e..5786cd3 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -4645,9 +4645,10 @@ for (;; ptr++)
+ goto FAILED;
+ }
+
+- /* If in \Q...\E, check for the end; if not, we have a literal */
++ /* If in \Q...\E, check for the end; if not, we have a literal. Otherwise an
++ isolated \E is ignored. */
+
+- if (inescq && c != CHAR_NULL)
++ if (c != CHAR_NULL)
+ {
+ if (c == CHAR_BACKSLASH && ptr[1] == CHAR_E)
+ {
+@@ -4655,7 +4656,7 @@ for (;; ptr++)
+ ptr++;
+ continue;
+ }
+- else
++ else if (inescq)
+ {
+ if (previous_callout != NULL)
+ {
+@@ -4670,7 +4671,6 @@ for (;; ptr++)
+ }
+ goto NORMAL_CHAR;
+ }
+- /* Control does not reach here. */
+ }
+
+ /* In extended mode, skip white space and comments. We need a loop in order
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index 92e3359..e8ca4fe 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4225,4 +4225,6 @@ backtracking verbs. --/
+
+ /L(?#(|++<!(2)?/BCOZ
+
++/(A*)\E+/CBZ
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 2cf7a90..09756b8 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14610,4 +14610,18 @@ No match
+ End
+ ------------------------------------------------------------------
+
++/(A*)\E+/CBZ
++------------------------------------------------------------------
++ Bra
++ Callout 255 0 7
++ SCBra 1
++ Callout 255 1 2
++ A*
++ Callout 255 3 0
++ KetRmax
++ Callout 255 7 0
++ Ket
++ End
++------------------------------------------------------------------
++
+ /-- End of testinput2 --/
+--
+2.4.3
+
+From 108377b836fc29a84f5286287629d96549b1c777 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sun, 29 Nov 2015 17:38:25 +0000
+Subject: [PATCH 3/5] Give error for regexec with pmatch=NULL and REG_STARTEND
+ set.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1614 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcreposix.c b/pcreposix.c
+index f024423..dcc13ef 100644
+--- a/pcreposix.c
++++ b/pcreposix.c
+@@ -364,6 +364,7 @@ start location rather than being passed as a PCRE "starting offset". */
+
+ if ((eflags & REG_STARTEND) != 0)
+ {
++ if (pmatch == NULL) return REG_INVARG;
+ so = pmatch[0].rm_so;
+ eo = pmatch[0].rm_eo;
+ }
+--
+2.4.3
+
+From e347b40d5bb12f7ef1e632aa649571a107be7d8a Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sun, 29 Nov 2015 17:46:23 +0000
+Subject: [PATCH 4/5] Allow for up to 32-bit numbers in the ordin() function in
+ pcregrep.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1615 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcregrep.c b/pcregrep.c
+index 64986b0..cd53c64 100644
+--- a/pcregrep.c
++++ b/pcregrep.c
+@@ -2437,7 +2437,7 @@ return options;
+ static char *
+ ordin(int n)
+ {
+-static char buffer[8];
++static char buffer[14];
+ char *p = buffer;
+ sprintf(p, "%d", n);
+ while (*p != 0) p++;
+--
+2.4.3
+
+From e78ad4264b16988b826bd2939a1781c1165a92d9 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Mon, 30 Nov 2015 17:44:45 +0000
+Subject: [PATCH 5/5] Fix \Q\E before qualifier bug when auto callouts are
+ enabled.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1616 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 5786cd3..beed46b 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -4671,17 +4671,27 @@ for (;; ptr++)
+ }
+ goto NORMAL_CHAR;
+ }
++
++ /* Check for the start of a \Q...\E sequence. We must do this here rather
++ than later in case it is immediately followed by \E, which turns it into a
++ "do nothing" sequence. */
++
++ if (c == CHAR_BACKSLASH && ptr[1] == CHAR_Q)
++ {
++ inescq = TRUE;
++ ptr++;
++ continue;
++ }
+ }
+
+- /* In extended mode, skip white space and comments. We need a loop in order
+- to check for more white space and more comments after a comment. */
++ /* In extended mode, skip white space and comments. */
+
+ if ((options & PCRE_EXTENDED) != 0)
+ {
+- for (;;)
++ const pcre_uchar *wscptr = ptr;
++ while (MAX_255(c) && (cd->ctypes[c] & ctype_space) != 0) c = *(++ptr);
++ if (c == CHAR_NUMBER_SIGN)
+ {
+- while (MAX_255(c) && (cd->ctypes[c] & ctype_space) != 0) c = *(++ptr);
+- if (c != CHAR_NUMBER_SIGN) break;
+ ptr++;
+ while (*ptr != CHAR_NULL)
+ {
+@@ -4695,7 +4705,15 @@ for (;; ptr++)
+ if (utf) FORWARDCHAR(ptr);
+ #endif
+ }
+- c = *ptr; /* Either NULL or the char after a newline */
++ }
++
++ /* If we skipped any characters, restart the loop. Otherwise, we didn't see
++ a comment. */
++
++ if (ptr > wscptr)
++ {
++ ptr--;
++ continue;
+ }
+ }
+
+@@ -7900,16 +7918,6 @@ for (;; ptr++)
+ c = ec;
+ else
+ {
+- if (escape == ESC_Q) /* Handle start of quoted string */
+- {
+- if (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
+- ptr += 2; /* avoid empty string */
+- else inescq = TRUE;
+- continue;
+- }
+-
+- if (escape == ESC_E) continue; /* Perl ignores an orphan \E */
+-
+ /* For metasequences that actually match a character, we disable the
+ setting of a first character if it hasn't already been set. */
+
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index e8ca4fe..3a1134f 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4227,4 +4227,6 @@ backtracking verbs. --/
+
+ /(A*)\E+/CBZ
+
++/()\Q\E*]/BCZ
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 09756b8..ac33cc4 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14624,4 +14624,19 @@ No match
+ End
+ ------------------------------------------------------------------
+
++/()\Q\E*]/BCZ
++------------------------------------------------------------------
++ Bra
++ Callout 255 0 7
++ Brazero
++ SCBra 1
++ Callout 255 1 0
++ KetRmax
++ Callout 255 7 1
++ ]
++ Callout 255 8 0
++ Ket
++ End
++------------------------------------------------------------------
++
+ /-- End of testinput2 --/
+--
+2.4.3
+
+From 46ed1a703b067e5b679eacf6500a54dae35f8130 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Thu, 3 Dec 2015 17:05:40 +0000
+Subject: [PATCH] Fix /x bug when pattern starts with white space and (?-x)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1617 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index beed46b..57719b9 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -7607,39 +7607,15 @@ for (;; ptr++)
+ newoptions = (options | set) & (~unset);
+
+ /* If the options ended with ')' this is not the start of a nested
+- group with option changes, so the options change at this level. If this
+- item is right at the start of the pattern, the options can be
+- abstracted and made external in the pre-compile phase, and ignored in
+- the compile phase. This can be helpful when matching -- for instance in
+- caseless checking of required bytes.
+-
+- If the code pointer is not (cd->start_code + 1 + LINK_SIZE), we are
+- definitely *not* at the start of the pattern because something has been
+- compiled. In the pre-compile phase, however, the code pointer can have
+- that value after the start, because it gets reset as code is discarded
+- during the pre-compile. However, this can happen only at top level - if
+- we are within parentheses, the starting BRA will still be present. At
+- any parenthesis level, the length value can be used to test if anything
+- has been compiled at that level. Thus, a test for both these conditions
+- is necessary to ensure we correctly detect the start of the pattern in
+- both phases.
+-
++ group with option changes, so the options change at this level.
+ If we are not at the pattern start, reset the greedy defaults and the
+ case value for firstchar and reqchar. */
+
+ if (*ptr == CHAR_RIGHT_PARENTHESIS)
+ {
+- if (code == cd->start_code + 1 + LINK_SIZE &&
+- (lengthptr == NULL || *lengthptr == 2 + 2*LINK_SIZE))
+- {
+- cd->external_options = newoptions;
+- }
+- else
+- {
+- greedy_default = ((newoptions & PCRE_UNGREEDY) != 0);
+- greedy_non_default = greedy_default ^ 1;
+- req_caseopt = ((newoptions & PCRE_CASELESS) != 0)? REQ_CASELESS:0;
+- }
++ greedy_default = ((newoptions & PCRE_UNGREEDY) != 0);
++ greedy_non_default = greedy_default ^ 1;
++ req_caseopt = ((newoptions & PCRE_CASELESS) != 0)? REQ_CASELESS:0;
+
+ /* Change options at this level, and pass them back for use
+ in subsequent branches. */
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index ac33cc4..6c42897 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -419,7 +419,7 @@ Need char = '>'
+
+ /(?U)<.*>/I
+ Capturing subpattern count = 0
+-Options: ungreedy
++No options
+ First char = '<'
+ Need char = '>'
+ abc<def>ghi<klm>nop
+@@ -443,7 +443,7 @@ Need char = '='
+
+ /(?U)={3,}?/I
+ Capturing subpattern count = 0
+-Options: ungreedy
++No options
+ First char = '='
+ Need char = '='
+ abc========def
+@@ -477,7 +477,7 @@ Failed: lookbehind assertion is not fixed length at offset 12
+
+ /(?i)abc/I
+ Capturing subpattern count = 0
+-Options: caseless
++No options
+ First char = 'a' (caseless)
+ Need char = 'c' (caseless)
+
+@@ -489,7 +489,7 @@ No need char
+
+ /(?i)^1234/I
+ Capturing subpattern count = 0
+-Options: anchored caseless
++Options: anchored
+ No first char
+ No need char
+
+@@ -502,7 +502,7 @@ No need char
+ /(?s).*/I
+ Capturing subpattern count = 0
+ May match empty string
+-Options: anchored dotall
++Options: anchored
+ No first char
+ No need char
+
+@@ -516,7 +516,7 @@ Starting chars: a b c d
+
+ /(?i)[abcd]/IS
+ Capturing subpattern count = 0
+-Options: caseless
++No options
+ No first char
+ No need char
+ Subject length lower bound = 1
+@@ -524,7 +524,7 @@ Starting chars: A B C D a b c d
+
+ /(?m)[xy]|(b|c)/IS
+ Capturing subpattern count = 1
+-Options: multiline
++No options
+ No first char
+ No need char
+ Subject length lower bound = 1
+@@ -538,7 +538,7 @@ No need char
+
+ /(?i)(^a|^b)/Im
+ Capturing subpattern count = 1
+-Options: caseless multiline
++Options: multiline
+ First char at start or follows newline
+ No need char
+
+@@ -1179,7 +1179,7 @@ No need char
+ End
+ ------------------------------------------------------------------
+ Capturing subpattern count = 1
+-Options: anchored dotall
++Options: anchored
+ No first char
+ No need char
+
+@@ -2735,7 +2735,7 @@ No match
+ End
+ ------------------------------------------------------------------
+ Capturing subpattern count = 0
+-Options: caseless extended
++Options: extended
+ First char = 'a' (caseless)
+ Need char = 'c' (caseless)
+
+@@ -2748,7 +2748,7 @@ Need char = 'c' (caseless)
+ End
+ ------------------------------------------------------------------
+ Capturing subpattern count = 0
+-Options: caseless extended
++Options: extended
+ First char = 'a' (caseless)
+ Need char = 'c' (caseless)
+
+@@ -3095,7 +3095,7 @@ Need char = 'b'
+ End
+ ------------------------------------------------------------------
+ Capturing subpattern count = 0
+-Options: ungreedy
++No options
+ First char = 'x'
+ Need char = 'b'
+ xaaaab
+@@ -3497,7 +3497,7 @@ Need char = 'c'
+
+ /(?i)[ab]/IS
+ Capturing subpattern count = 0
+-Options: caseless
++No options
+ No first char
+ No need char
+ Subject length lower bound = 1
+@@ -6299,7 +6299,7 @@ Capturing subpattern count = 3
+ Named capturing subpatterns:
+ A 2
+ A 3
+-Options: anchored dupnames
++Options: anchored
+ Duplicate name status changes
+ No first char
+ No need char
+--
+2.4.3
+
+From db1fb68feddc9afe6f8822d099fa9ff25e3ea8e7 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 5 Dec 2015 16:30:14 +0000
+Subject: [PATCH] Fix copy named substring bug.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1618 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+diff --git a/pcre_get.c b/pcre_get.c
+index 8094b34..41eda9c 100644
+--- a/pcre_get.c
++++ b/pcre_get.c
+@@ -250,6 +250,7 @@ Arguments:
+ code the compiled regex
+ stringname the name of the capturing substring
+ ovector the vector of matched substrings
++ stringcount number of captured substrings
+
+ Returns: the number of the first that is set,
+ or the number of the last one if none are set,
+@@ -258,13 +259,16 @@ Returns: the number of the first that is set,
+
+ #if defined COMPILE_PCRE8
+ static int
+-get_first_set(const pcre *code, const char *stringname, int *ovector)
++get_first_set(const pcre *code, const char *stringname, int *ovector,
++ int stringcount)
+ #elif defined COMPILE_PCRE16
+ static int
+-get_first_set(const pcre16 *code, PCRE_SPTR16 stringname, int *ovector)
++get_first_set(const pcre16 *code, PCRE_SPTR16 stringname, int *ovector,
++ int stringcount)
+ #elif defined COMPILE_PCRE32
+ static int
+-get_first_set(const pcre32 *code, PCRE_SPTR32 stringname, int *ovector)
++get_first_set(const pcre32 *code, PCRE_SPTR32 stringname, int *ovector,
++ int stringcount)
+ #endif
+ {
+ const REAL_PCRE *re = (const REAL_PCRE *)code;
+@@ -295,7 +299,7 @@ if (entrysize <= 0) return entrysize;
+ for (entry = (pcre_uchar *)first; entry <= (pcre_uchar *)last; entry += entrysize)
+ {
+ int n = GET2(entry, 0);
+- if (ovector[n*2] >= 0) return n;
++ if (n < stringcount && ovector[n*2] >= 0) return n;
+ }
+ return GET2(entry, 0);
+ }
+@@ -402,7 +406,7 @@ pcre32_copy_named_substring(const pcre32 *code, PCRE_SPTR32 subject,
+ PCRE_UCHAR32 *buffer, int size)
+ #endif
+ {
+-int n = get_first_set(code, stringname, ovector);
++int n = get_first_set(code, stringname, ovector, stringcount);
+ if (n <= 0) return n;
+ #if defined COMPILE_PCRE8
+ return pcre_copy_substring(subject, ovector, stringcount, n, buffer, size);
+@@ -619,7 +623,7 @@ pcre32_get_named_substring(const pcre32 *code, PCRE_SPTR32 subject,
+ PCRE_SPTR32 *stringptr)
+ #endif
+ {
+-int n = get_first_set(code, stringname, ovector);
++int n = get_first_set(code, stringname, ovector, stringcount);
+ if (n <= 0) return n;
+ #if defined COMPILE_PCRE8
+ return pcre_get_substring(subject, ovector, stringcount, n, stringptr);
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index 3a1134f..00ffe32 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4229,4 +4229,7 @@ backtracking verbs. --/
+
+ /()\Q\E*]/BCZ
+
++/(?<A>)(?J:(?<B>)(?<B>))(?<C>)/
++ \O\CC
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 6c42897..ffb4466 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14639,4 +14639,9 @@ No match
+ End
+ ------------------------------------------------------------------
+
++/(?<A>)(?J:(?<B>)(?<B>))(?<C>)/
++ \O\CC
++Matched, but too many substrings
++copy substring C failed -7
++
+ /-- End of testinput2 --/
+--
+2.4.3
+
+From 40363ebc19baeab160abaaa55dc84322a89ac35a Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 5 Dec 2015 16:58:46 +0000
+Subject: [PATCH] Fix (by hacking) another length computation issue.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1619 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 57719b9..087bf2a 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -7280,7 +7280,7 @@ for (;; ptr++)
+ issue is fixed "properly" in PCRE2. As PCRE1 is now in maintenance
+ only mode, we finesse the bug by allowing more memory always. */
+
+- *lengthptr += 2 + 2*LINK_SIZE;
++ *lengthptr += 4 + 4*LINK_SIZE;
+
+ /* It is even worse than that. The current reference may be to an
+ existing named group with a different number (so apparently not
+diff --git a/testdata/testoutput11-16 b/testdata/testoutput11-16
+index 9a0a12d..280692e 100644
+--- a/testdata/testoutput11-16
++++ b/testdata/testoutput11-16
+@@ -231,7 +231,7 @@ Memory allocation (code space): 73
+ ------------------------------------------------------------------
+
+ /(?P<a>a)...(?P=a)bbb(?P>a)d/BM
+-Memory allocation (code space): 77
++Memory allocation (code space): 93
+ ------------------------------------------------------------------
+ 0 24 Bra
+ 2 5 CBra 1
+diff --git a/testdata/testoutput11-32 b/testdata/testoutput11-32
+index 57e5da0..cdbda74 100644
+--- a/testdata/testoutput11-32
++++ b/testdata/testoutput11-32
+@@ -231,7 +231,7 @@ Memory allocation (code space): 155
+ ------------------------------------------------------------------
+
+ /(?P<a>a)...(?P=a)bbb(?P>a)d/BM
+-Memory allocation (code space): 157
++Memory allocation (code space): 189
+ ------------------------------------------------------------------
+ 0 24 Bra
+ 2 5 CBra 1
+diff --git a/testdata/testoutput11-8 b/testdata/testoutput11-8
+index 748548a..cb37896 100644
+--- a/testdata/testoutput11-8
++++ b/testdata/testoutput11-8
+@@ -231,7 +231,7 @@ Memory allocation (code space): 45
+ ------------------------------------------------------------------
+
+ /(?P<a>a)...(?P=a)bbb(?P>a)d/BM
+-Memory allocation (code space): 50
++Memory allocation (code space): 62
+ ------------------------------------------------------------------
+ 0 30 Bra
+ 3 7 CBra 1
+--
+2.4.3
+
+From 4f47274a2eb10131d88145ad7fd0eed4027a0c51 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Tue, 8 Dec 2015 11:06:40 +0000
+Subject: [PATCH] Fix get_substring_list() bug when \K is used in an assertion.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1620 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: ported to 8.38.
+
+diff --git a/pcre_get.c b/pcre_get.c
+index 41eda9c..cdd2abc 100644
+--- a/pcre_get.c
++++ b/pcre_get.c
+@@ -461,7 +461,10 @@ pcre_uchar **stringlist;
+ pcre_uchar *p;
+
+ for (i = 0; i < double_count; i += 2)
+- size += sizeof(pcre_uchar *) + IN_UCHARS(ovector[i+1] - ovector[i] + 1);
++ {
++ size += sizeof(pcre_uchar *) + IN_UCHARS(1);
++ if (ovector[i+1] > ovector[i]) size += IN_UCHARS(ovector[i+1] - ovector[i]);
++ }
+
+ stringlist = (pcre_uchar **)(PUBL(malloc))(size);
+ if (stringlist == NULL) return PCRE_ERROR_NOMEMORY;
+@@ -477,7 +480,7 @@ p = (pcre_uchar *)(stringlist + stringcount + 1);
+
+ for (i = 0; i < double_count; i += 2)
+ {
+- int len = ovector[i+1] - ovector[i];
++ int len = (ovector[i+1] > ovector[i])? (ovector[i+1] - ovector[i]) : 0;
+ memcpy(p, subject + ovector[i], IN_UCHARS(len));
+ *stringlist++ = p;
+ p += len;
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index 00ffe32..967a241 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4232,4 +4232,7 @@ backtracking verbs. --/
+ /(?<A>)(?J:(?<B>)(?<B>))(?<C>)/
+ \O\CC
+
++/(?=a\K)/
++ ring bpattingbobnd $ 1,oern cou \rb\L
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index ffb4466..5fb28d5 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14644,4 +14644,10 @@ No match
+ Matched, but too many substrings
+ copy substring C failed -7
+
++/(?=a\K)/
++ ring bpattingbobnd $ 1,oern cou \rb\L
++Start of matched string is beyond its end - displaying from end to start.
++ 0: a
++ 0L
++
+ /-- End of testinput2 --/
+--
+2.5.0
+
+From 3da5528b47b88c32224cf9d14d8a4e80cd7a0815 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 6 Feb 2016 16:54:14 +0000
+Subject: [PATCH] Fix pcretest bad behaviour for callout in lookbehind.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1625 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcretest.c b/pcretest.c
+index 488e419..63869fd 100644
+--- a/pcretest.c
++++ b/pcretest.c
+@@ -2250,7 +2250,7 @@ data is not zero. */
+ static int callout(pcre_callout_block *cb)
+ {
+ FILE *f = (first_callout | callout_extra)? outfile : NULL;
+-int i, pre_start, post_start, subject_length;
++int i, current_position, pre_start, post_start, subject_length;
+
+ if (callout_extra)
+ {
+@@ -2280,14 +2280,19 @@ printed lengths of the substrings. */
+
+ if (f != NULL) fprintf(f, "--->");
+
++/* If a lookbehind is involved, the current position may be earlier than the
++match start. If so, use the match start instead. */
++
++current_position = (cb->current_position >= cb->start_match)?
++ cb->current_position : cb->start_match;
++
+ PCHARS(pre_start, cb->subject, 0, cb->start_match, f);
+ PCHARS(post_start, cb->subject, cb->start_match,
+- cb->current_position - cb->start_match, f);
++ current_position - cb->start_match, f);
+
+ PCHARS(subject_length, cb->subject, 0, cb->subject_length, NULL);
+
+-PCHARSV(cb->subject, cb->current_position,
+- cb->subject_length - cb->current_position, f);
++PCHARSV(cb->subject, current_position, cb->subject_length - current_position, f);
+
+ if (f != NULL) fprintf(f, "\n");
+
+@@ -5740,3 +5745,4 @@ return yield;
+ }
+
+ /* End of pcretest.c */
++
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index 967a241..086e0f4 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4235,4 +4235,8 @@ backtracking verbs. --/
+ /(?=a\K)/
+ ring bpattingbobnd $ 1,oern cou \rb\L
+
++/(?<=((?C)0))/
++ 9010
++ abcd
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 5fb28d5..d414a72 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14650,4 +14650,19 @@ Start of matched string is beyond its end - displaying from end to start.
+ 0: a
+ 0L
+
++/(?<=((?C)0))/
++ 9010
++--->9010
++ 0 ^ 0
++ 0 ^ 0
++ 0:
++ 1: 0
++ abcd
++--->abcd
++ 0 ^ 0
++ 0 ^ 0
++ 0 ^ 0
++ 0 ^ 0
++No match
++
+ /-- End of testinput2 --/
+--
+2.5.0
+
+From 943a5105b9fe2842851003f692c7077a6cdbeefe Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Wed, 10 Feb 2016 19:13:17 +0000
+Subject: [PATCH] Fix workspace overflow for (*ACCEPT) with deeply nested
+ parentheses.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1631 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index b9a239e..5019854 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -6,7 +6,7 @@
+ and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+- Copyright (c) 1997-2014 University of Cambridge
++ Copyright (c) 1997-2016 University of Cambridge
+
+ -----------------------------------------------------------------------------
+ Redistribution and use in source and binary forms, with or without
+@@ -560,6 +560,7 @@ static const char error_texts[] =
+ /* 85 */
+ "parentheses are too deeply nested (stack check)\0"
+ "digits missing in \\x{} or \\o{}\0"
++ "regular expression is too complicated\0"
+ ;
+
+ /* Table to identify digits and hex digits. This is used when compiling
+@@ -4591,7 +4592,8 @@ for (;; ptr++)
+ if (code > cd->start_workspace + cd->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN) /* Check for overrun */
+ {
+- *errorcodeptr = ERR52;
++ *errorcodeptr = (code >= cd->start_workspace + cd->workspace_size)?
++ ERR52 : ERR87;
+ goto FAILED;
+ }
+
+@@ -6626,8 +6628,21 @@ for (;; ptr++)
+ cd->had_accept = TRUE;
+ for (oc = cd->open_caps; oc != NULL; oc = oc->next)
+ {
+- *code++ = OP_CLOSE;
+- PUT2INC(code, 0, oc->number);
++ if (lengthptr != NULL)
++ {
++#ifdef COMPILE_PCRE8
++ *lengthptr += 1 + IMM2_SIZE;
++#elif defined COMPILE_PCRE16
++ *lengthptr += 2 + IMM2_SIZE;
++#elif defined COMPILE_PCRE32
++ *lengthptr += 4 + IMM2_SIZE;
++#endif
++ }
++ else
++ {
++ *code++ = OP_CLOSE;
++ PUT2INC(code, 0, oc->number);
++ }
+ }
+ setverb = *code++ =
+ (cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
+diff --git a/pcre_internal.h b/pcre_internal.h
+index f7a5ee7..dbfe80e 100644
+--- a/pcre_internal.h
++++ b/pcre_internal.h
+@@ -7,7 +7,7 @@
+ and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+- Copyright (c) 1997-2014 University of Cambridge
++ Copyright (c) 1997-2016 University of Cambridge
+
+ -----------------------------------------------------------------------------
+ Redistribution and use in source and binary forms, with or without
+@@ -2289,7 +2289,7 @@ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9,
+ ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
+ ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,
+ ERR70, ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERR77, ERR78, ERR79,
+- ERR80, ERR81, ERR82, ERR83, ERR84, ERR85, ERR86, ERRCOUNT };
++ ERR80, ERR81, ERR82, ERR83, ERR84, ERR85, ERR86, ERR87, ERRCOUNT };
+
+ /* JIT compiling modes. The function list is indexed by them. */
+
+diff --git a/pcreposix.c b/pcreposix.c
+index dcc13ef..55b6ddc 100644
+--- a/pcreposix.c
++++ b/pcreposix.c
+@@ -6,7 +6,7 @@
+ and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+- Copyright (c) 1997-2014 University of Cambridge
++ Copyright (c) 1997-2016 University of Cambridge
+
+ -----------------------------------------------------------------------------
+ Redistribution and use in source and binary forms, with or without
+@@ -173,7 +173,8 @@ static const int eint[] = {
+ REG_BADPAT, /* group name must start with a non-digit */
+ /* 85 */
+ REG_BADPAT, /* parentheses too deeply nested (stack check) */
+- REG_BADPAT /* missing digits in \x{} or \o{} */
++ REG_BADPAT, /* missing digits in \x{} or \o{} */
++ REG_BADPAT /* pattern too complicated */
+ };
+
+ /* Table of texts corresponding to POSIX error codes */
+diff --git a/testdata/testinput11 b/testdata/testinput11
+index ac9d228..6f0989a 100644
+--- a/testdata/testinput11
++++ b/testdata/testinput11
+@@ -138,4 +138,6 @@ is required for these tests. --/
+
+ /.((?2)(?R)\1)()/B
+
++/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
++
+ /-- End of testinput11 --/
+diff --git a/testdata/testoutput11-16 b/testdata/testoutput11-16
+index 280692e..3c485da 100644
+--- a/testdata/testoutput11-16
++++ b/testdata/testoutput11-16
+@@ -765,4 +765,7 @@ Memory allocation (code space): 14
+ 25 End
+ ------------------------------------------------------------------
+
++/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
++Failed: regular expression is too complicated at offset 490
++
+ /-- End of testinput11 --/
+diff --git a/testdata/testoutput11-32 b/testdata/testoutput11-32
+index cdbda74..e19518d 100644
+--- a/testdata/testoutput11-32
++++ b/testdata/testoutput11-32
+@@ -765,4 +765,7 @@ Memory allocation (code space): 28
+ 25 End
+ ------------------------------------------------------------------
+
++/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
++Failed: missing ) at offset 509
++
+ /-- End of testinput11 --/
+diff --git a/testdata/testoutput11-8 b/testdata/testoutput11-8
+index cb37896..5a4fbb2 100644
+--- a/testdata/testoutput11-8
++++ b/testdata/testoutput11-8
+@@ -765,4 +765,7 @@ Memory allocation (code space): 10
+ 38 End
+ ------------------------------------------------------------------
+
++/([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00]([00](*ACCEPT)/
++Failed: missing ) at offset 509
++
+ /-- End of testinput11 --/
+--
+2.5.0
+
+From b7537308b7c758f33c347cb0bec62754c43c271f Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 27 Feb 2016 17:38:11 +0000
+Subject: [PATCH] Yet another duplicate name bugfix by overestimating the
+ memory needed (i.e. another hack - PCRE2 has this "properly" fixed).
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1636 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 5019854..4ffea0c 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -7311,7 +7311,12 @@ for (;; ptr++)
+ so far in order to get the number. If the name is not found, leave
+ the value of recno as 0 for a forward reference. */
+
+- else
++ /* This patch (removing "else") fixes a problem when a reference is
++ to multiple identically named nested groups from within the nest.
++ Once again, it is not the "proper" fix, and it results in an
++ over-allocation of memory. */
++
++ /* else */
+ {
+ ng = cd->named_groups;
+ for (i = 0; i < cd->names_found; i++, ng++)
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index 086e0f4..c805f5f 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4239,4 +4239,6 @@ backtracking verbs. --/
+ 9010
+ abcd
+
++/((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index d414a72..800a72f 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -14665,4 +14665,6 @@ Start of matched string is beyond its end - displaying from end to start.
+ 0 ^ 0
+ No match
+
++/((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/
++
+ /-- End of testinput2 --/
+--
+2.5.0
+
+From 0fc2edb79b3815c6511fd75c36a57893e4acaee6 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 27 Feb 2016 17:55:24 +0000
+Subject: [PATCH] Fix pcretest loop for global matching with an ovector size
+ less than 2.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1637 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcretest.c b/pcretest.c
+index 63869fd..78ef517 100644
+--- a/pcretest.c
++++ b/pcretest.c
+@@ -5617,6 +5617,12 @@ while (!done)
+ break;
+ }
+
++ if (use_size_offsets < 2)
++ {
++ fprintf(outfile, "Cannot do global matching with an ovector size < 2\n");
++ break;
++ }
++
+ /* If we have matched an empty string, first check to see if we are at
+ the end of the subject. If so, the /g loop is over. Otherwise, mimic what
+ Perl's /g options does. This turns out to be rather cunning. First we set
+--
+2.5.0
+
+From b3db1b7de5cfaa026ec2bc4a393129461a0f5c57 Mon Sep 17 00:00:00 2001
+From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
+Date: Sat, 27 Feb 2016 18:44:41 +0000
+Subject: [PATCH] Fix non-diagnosis of missing assertion after (?(?C).
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1638 2f5784b3-3f2a-0410-8824-cb99058d5e15
+
+Petr Písař: Ported to 8.38.
+
+diff --git a/pcre_compile.c b/pcre_compile.c
+index 4ffea0c..254c629 100644
+--- a/pcre_compile.c
++++ b/pcre_compile.c
+@@ -485,7 +485,7 @@ static const char error_texts[] =
+ "lookbehind assertion is not fixed length\0"
+ "malformed number or name after (?(\0"
+ "conditional group contains more than two branches\0"
+- "assertion expected after (?(\0"
++ "assertion expected after (?( or (?(?C)\0"
+ "(?R or (?[+-]digits must be followed by )\0"
+ /* 30 */
+ "unknown POSIX class name\0"
+@@ -6771,6 +6771,15 @@ for (;; ptr++)
+ for (i = 3;; i++) if (!IS_DIGIT(ptr[i])) break;
+ if (ptr[i] == CHAR_RIGHT_PARENTHESIS)
+ tempptr += i + 1;
++
++ /* tempptr should now be pointing to the opening parenthesis of the
++ assertion condition. */
++
++ if (*tempptr != CHAR_LEFT_PARENTHESIS)
++ {
++ *errorcodeptr = ERR28;
++ goto FAILED;
++ }
+ }
+
+ /* For conditions that are assertions, check the syntax, and then exit
+diff --git a/testdata/testinput2 b/testdata/testinput2
+index c805f5f..75e402e 100644
+--- a/testdata/testinput2
++++ b/testdata/testinput2
+@@ -4241,4 +4241,6 @@ backtracking verbs. --/
+
+ /((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/
+
++/\N(?(?C)0?!.)*/
++
+ /-- End of testinput2 --/
+diff --git a/testdata/testoutput2 b/testdata/testoutput2
+index 800a72f..5e88d1a 100644
+--- a/testdata/testoutput2
++++ b/testdata/testoutput2
+@@ -555,13 +555,13 @@ Failed: malformed number or name after (?( at offset 4
+ Failed: malformed number or name after (?( at offset 4
+
+ /(?(?i))/
+-Failed: assertion expected after (?( at offset 3
++Failed: assertion expected after (?( or (?(?C) at offset 3
+
+ /(?(abc))/
+ Failed: reference to non-existent subpattern at offset 7
+
+ /(?(?<ab))/
+-Failed: assertion expected after (?( at offset 3
++Failed: assertion expected after (?( or (?(?C) at offset 3
+
+ /((?s)blah)\s+\1/I
+ Capturing subpattern count = 1
+@@ -7870,7 +7870,7 @@ No match
+ Failed: malformed number or name after (?( at offset 6
+
+ /(?(''))/
+-Failed: assertion expected after (?( at offset 4
++Failed: assertion expected after (?( or (?(?C) at offset 4
+
+ /(?('R')stuff)/
+ Failed: reference to non-existent subpattern at offset 7
+@@ -14346,7 +14346,7 @@ No match
+ "((?2)+)((?1))"
+
+ "(?(?<E>.*!.*)?)"
+-Failed: assertion expected after (?( at offset 3
++Failed: assertion expected after (?( or (?(?C) at offset 3
+
+ "X((?2)()*+){2}+"BZ
+ ------------------------------------------------------------------
+@@ -14667,4 +14667,7 @@ No match
+
+ /((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/
+
++/\N(?(?C)0?!.)*/
++Failed: assertion expected after (?( or (?(?C) at offset 4
++
+ /-- End of testinput2 --/
+--
+2.5.0
+
include $(TOPDIR)/rules.mk
PKG_NAME:=sqlite
-PKG_VERSION:=3081101
+PKG_VERSION:=3120000
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-autoconf-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.sqlite.org/2015/
-PKG_MD5SUM:=298c8d6af7ca314f68de92bc7a356cbe
+PKG_SOURCE_URL:=http://www.sqlite.org/2016/
+PKG_MD5SUM:=56a80fdab2f398cb2e1ab2ab7c339c30
PKG_LICENSE:=PUBLICDOMAIN
PKG_LICENSE_FILES:=
#
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=tiff
-PKG_VERSION:=4.0.3
-PKG_RELEASE:=4
+PKG_VERSION:=4.0.6
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://download.osgeo.org/libtiff
-PKG_MD5SUM:=051c1068e6a0627f461948c365290410
+PKG_MD5SUM:=d1d2e940dea0b5ad435f21f03d96dd72
PKG_FIXUP:=autoreconf
PKG_REMOVE_FILES:=autogen.sh aclocal.m4
---- a/Makefile.am
-+++ b/Makefile.am
+diff -rupN tiff-4.0.6/Makefile.am tiff-new/Makefile.am
+--- tiff-4.0.6/Makefile.am 2015-09-06 21:30:46.179705536 +0200
++++ tiff-new/Makefile.am 2016-04-05 14:26:09.539194844 +0200
@@ -25,7 +25,7 @@
docdir = $(LIBTIFF_DOCDIR)
ACLOCAL_AMFLAGS = -I m4
docfiles = \
-@@ -48,7 +48,7 @@ EXTRA_DIST = \
-
- dist_doc_DATA = $(docfiles)
+@@ -61,7 +61,7 @@ distcheck-hook:
+ rm -rf $(distdir)/_build/cmake
+ rm -rf $(distdir)/_inst/cmake
-SUBDIRS = port libtiff tools build contrib test man html
+SUBDIRS = port libtiff tools build contrib
release:
(rm -f $(top_srcdir)/RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE)
---- a/test/Makefile.am
-+++ b/test/Makefile.am
+diff -rupN tiff-4.0.6/test/Makefile.am tiff-new/test/Makefile.am
+--- tiff-4.0.6/test/Makefile.am 2015-09-01 04:41:07.598381354 +0200
++++ tiff-new/test/Makefile.am 2016-04-05 14:26:39.763453075 +0200
@@ -23,7 +23,7 @@
# Process this file with automake to produce Makefile.in.
--- /dev/null
+From f3f0cad770593eaef0766e5be896a6a034fc6313 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sat, 26 Dec 2015 17:32:03 +0000
+Subject: [PATCH] * libtiff/tif_getimage.c: fix out-of-bound reads in
+ TIFFRGBAImage interface in case of unsupported values of
+ SamplesPerPixel/ExtraSamples for LogLUV / CIELab. Add explicit call to
+ TIFFRGBAImageOK() in TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by
+ limingxing and CVE-2015-8683 reported by zzf of Alibaba.
+
+---
+ ChangeLog | 8 ++++++++
+ libtiff/tif_getimage.c | 37 +++++++++++++++++++++++--------------
+ 2 files changed, 31 insertions(+), 14 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index a7d283a..4beb30b 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,11 @@
++2015-12-26 Even Rouault <even.rouault at spatialys.com>
++
++ * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
++ interface in case of unsupported values of SamplesPerPixel/ExtraSamples
++ for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in
++ TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and
++ CVE-2015-8683 reported by zzf of Alibaba.
++
+ 2015-09-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff 4.0.6 released.
+diff --git a/libtiff/tif_getimage.c b/libtiff/tif_getimage.c
+index fd0a4f9..fae1e31 100644
+--- a/libtiff/tif_getimage.c
++++ b/libtiff/tif_getimage.c
+@@ -1,4 +1,4 @@
+-/* $Id: tif_getimage.c,v 1.90 2015-06-17 01:34:08 bfriesen Exp $ */
++/* $Id: tif_getimage.c,v 1.94 2015-12-26 17:32:03 erouault Exp $ */
+
+ /*
+ * Copyright (c) 1991-1997 Sam Leffler
+@@ -182,20 +182,22 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
+ "Planarconfiguration", td->td_planarconfig);
+ return (0);
+ }
+- if( td->td_samplesperpixel != 3 )
++ if( td->td_samplesperpixel != 3 || colorchannels != 3 )
+ {
+ sprintf(emsg,
+- "Sorry, can not handle image with %s=%d",
+- "Samples/pixel", td->td_samplesperpixel);
++ "Sorry, can not handle image with %s=%d, %s=%d",
++ "Samples/pixel", td->td_samplesperpixel,
++ "colorchannels", colorchannels);
+ return 0;
+ }
+ break;
+ case PHOTOMETRIC_CIELAB:
+- if( td->td_samplesperpixel != 3 || td->td_bitspersample != 8 )
++ if( td->td_samplesperpixel != 3 || colorchannels != 3 || td->td_bitspersample != 8 )
+ {
+ sprintf(emsg,
+- "Sorry, can not handle image with %s=%d and %s=%d",
++ "Sorry, can not handle image with %s=%d, %s=%d and %s=%d",
+ "Samples/pixel", td->td_samplesperpixel,
++ "colorchannels", colorchannels,
+ "Bits/sample", td->td_bitspersample);
+ return 0;
+ }
+@@ -255,6 +257,9 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
+ int colorchannels;
+ uint16 *red_orig, *green_orig, *blue_orig;
+ int n_color;
++
++ if( !TIFFRGBAImageOK(tif, emsg) )
++ return 0;
+
+ /* Initialize to normal values */
+ img->row_offset = 0;
+@@ -2508,29 +2513,33 @@ PickContigCase(TIFFRGBAImage* img)
+ case PHOTOMETRIC_RGB:
+ switch (img->bitspersample) {
+ case 8:
+- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
++ if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
++ img->samplesperpixel >= 4)
+ img->put.contig = putRGBAAcontig8bittile;
+- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
++ else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
++ img->samplesperpixel >= 4)
+ {
+ if (BuildMapUaToAa(img))
+ img->put.contig = putRGBUAcontig8bittile;
+ }
+- else
++ else if( img->samplesperpixel >= 3 )
+ img->put.contig = putRGBcontig8bittile;
+ break;
+ case 16:
+- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
++ if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
++ img->samplesperpixel >=4 )
+ {
+ if (BuildMapBitdepth16To8(img))
+ img->put.contig = putRGBAAcontig16bittile;
+ }
+- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
++ else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
++ img->samplesperpixel >=4 )
+ {
+ if (BuildMapBitdepth16To8(img) &&
+ BuildMapUaToAa(img))
+ img->put.contig = putRGBUAcontig16bittile;
+ }
+- else
++ else if( img->samplesperpixel >=3 )
+ {
+ if (BuildMapBitdepth16To8(img))
+ img->put.contig = putRGBcontig16bittile;
+@@ -2539,7 +2548,7 @@ PickContigCase(TIFFRGBAImage* img)
+ }
+ break;
+ case PHOTOMETRIC_SEPARATED:
+- if (buildMap(img)) {
++ if (img->samplesperpixel >=4 && buildMap(img)) {
+ if (img->bitspersample == 8) {
+ if (!img->Map)
+ img->put.contig = putRGBcontig8bitCMYKtile;
+@@ -2635,7 +2644,7 @@ PickContigCase(TIFFRGBAImage* img)
+ }
+ break;
+ case PHOTOMETRIC_CIELAB:
+- if (buildMap(img)) {
++ if (img->samplesperpixel == 3 && buildMap(img)) {
+ if (img->bitspersample == 8)
+ img->put.contig = initCIELabConversion(img);
+ break;
--- /dev/null
+From 3899f0ab62dd307f63f87ec99aaf289e104f4070 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sun, 27 Dec 2015 16:25:11 +0000
+Subject: [PATCH] * libtiff/tif_luv.c: fix potential out-of-bound writes in
+ decode functions in non debug builds by replacing assert()s by regular if
+ checks (bugzilla #2522). Fix potential out-of-bound reads in case of short
+ input data.
+
+---
+ ChangeLog | 7 +++++++
+ libtiff/tif_luv.c | 57 +++++++++++++++++++++++++++++++++++++++++++------------
+ 2 files changed, 52 insertions(+), 12 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 4beb30b..b8aa23c 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,10 @@
++2015-12-27 Even Rouault <even.rouault at spatialys.com>
++
++ * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
++ functions in non debug builds by replacing assert()s by regular if
++ checks (bugzilla #2522).
++ Fix potential out-of-bound reads in case of short input data.
++
+ 2015-12-26 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
+diff --git a/libtiff/tif_luv.c b/libtiff/tif_luv.c
+index 4e328ba..60a174d 100644
+--- a/libtiff/tif_luv.c
++++ b/libtiff/tif_luv.c
+@@ -1,4 +1,4 @@
+-/* $Id: tif_luv.c,v 1.40 2015-06-21 01:09:09 bfriesen Exp $ */
++/* $Id: tif_luv.c,v 1.41 2015-12-27 16:25:11 erouault Exp $ */
+
+ /*
+ * Copyright (c) 1997 Greg Ward Larson
+@@ -202,7 +202,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+ if (sp->user_datafmt == SGILOGDATAFMT_16BIT)
+ tp = (int16*) op;
+ else {
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ tp = (int16*) sp->tbuf;
+ }
+ _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
+@@ -211,9 +215,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+ cc = tif->tif_rawcc;
+ /* get each byte string */
+ for (shft = 2*8; (shft -= 8) >= 0; ) {
+- for (i = 0; i < npixels && cc > 0; )
++ for (i = 0; i < npixels && cc > 0; ) {
+ if (*bp >= 128) { /* run */
+- rc = *bp++ + (2-128); /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
++ if( cc < 2 )
++ break;
++ rc = *bp++ + (2-128);
+ b = (int16)(*bp++ << shft);
+ cc -= 2;
+ while (rc-- && i < npixels)
+@@ -223,6 +229,7 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+ while (--cc && rc-- && i < npixels)
+ tp[i++] |= (int16)*bp++ << shft;
+ }
++ }
+ if (i != npixels) {
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+ TIFFErrorExt(tif->tif_clientdata, module,
+@@ -268,13 +275,17 @@ LogLuvDecode24(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+ if (sp->user_datafmt == SGILOGDATAFMT_RAW)
+ tp = (uint32 *)op;
+ else {
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ tp = (uint32 *) sp->tbuf;
+ }
+ /* copy to array of uint32 */
+ bp = (unsigned char*) tif->tif_rawcp;
+ cc = tif->tif_rawcc;
+- for (i = 0; i < npixels && cc > 0; i++) {
++ for (i = 0; i < npixels && cc >= 3; i++) {
+ tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2];
+ bp += 3;
+ cc -= 3;
+@@ -325,7 +336,11 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+ if (sp->user_datafmt == SGILOGDATAFMT_RAW)
+ tp = (uint32*) op;
+ else {
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ tp = (uint32*) sp->tbuf;
+ }
+ _TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
+@@ -334,11 +349,13 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+ cc = tif->tif_rawcc;
+ /* get each byte string */
+ for (shft = 4*8; (shft -= 8) >= 0; ) {
+- for (i = 0; i < npixels && cc > 0; )
++ for (i = 0; i < npixels && cc > 0; ) {
+ if (*bp >= 128) { /* run */
++ if( cc < 2 )
++ break;
+ rc = *bp++ + (2-128);
+ b = (uint32)*bp++ << shft;
+- cc -= 2; /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
++ cc -= 2;
+ while (rc-- && i < npixels)
+ tp[i++] |= b;
+ } else { /* non-run */
+@@ -346,6 +363,7 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
+ while (--cc && rc-- && i < npixels)
+ tp[i++] |= (uint32)*bp++ << shft;
+ }
++ }
+ if (i != npixels) {
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+ TIFFErrorExt(tif->tif_clientdata, module,
+@@ -413,6 +431,7 @@ LogLuvDecodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ static int
+ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++ static const char module[] = "LogL16Encode";
+ LogLuvState* sp = EncoderState(tif);
+ int shft;
+ tmsize_t i;
+@@ -433,7 +452,11 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ tp = (int16*) bp;
+ else {
+ tp = (int16*) sp->tbuf;
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ (*sp->tfunc)(sp, bp, npixels);
+ }
+ /* compress each byte string */
+@@ -506,6 +529,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ static int
+ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++ static const char module[] = "LogLuvEncode24";
+ LogLuvState* sp = EncoderState(tif);
+ tmsize_t i;
+ tmsize_t npixels;
+@@ -521,7 +545,11 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ tp = (uint32*) bp;
+ else {
+ tp = (uint32*) sp->tbuf;
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ (*sp->tfunc)(sp, bp, npixels);
+ }
+ /* write out encoded pixels */
+@@ -553,6 +581,7 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ static int
+ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ {
++ static const char module[] = "LogLuvEncode32";
+ LogLuvState* sp = EncoderState(tif);
+ int shft;
+ tmsize_t i;
+@@ -574,7 +603,11 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
+ tp = (uint32*) bp;
+ else {
+ tp = (uint32*) sp->tbuf;
+- assert(sp->tbuflen >= npixels);
++ if(sp->tbuflen < npixels) {
++ TIFFErrorExt(tif->tif_clientdata, module,
++ "Translation buffer too short");
++ return (0);
++ }
+ (*sp->tfunc)(sp, bp, npixels);
+ }
+ /* compress each byte string */
--- /dev/null
+From 237c9c18b0b3479950e54a755ae428bf0f55f754 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Sun, 27 Dec 2015 16:55:20 +0000
+Subject: [PATCH] * libtiff/tif_next.c: fix potential out-of-bound write in
+ NeXTDecode() triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
+ (bugzilla #2508)
+
+---
+ ChangeLog | 6 ++++++
+ libtiff/tif_next.c | 12 +++++++++---
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index b8aa23c..04926a3 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,5 +1,11 @@
+ 2015-12-27 Even Rouault <even.rouault at spatialys.com>
+
++ * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
++ triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
++ (bugzilla #2508)
++
++2015-12-27 Even Rouault <even.rouault at spatialys.com>
++
+ * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
+ functions in non debug builds by replacing assert()s by regular if
+ checks (bugzilla #2522).
+diff --git a/libtiff/tif_next.c b/libtiff/tif_next.c
+index 17e0311..1248caa 100644
+--- a/libtiff/tif_next.c
++++ b/libtiff/tif_next.c
+@@ -1,4 +1,4 @@
+-/* $Id: tif_next.c,v 1.16 2014-12-29 12:09:11 erouault Exp $ */
++/* $Id: tif_next.c,v 1.17 2015-12-27 16:55:20 erouault Exp $ */
+
+ /*
+ * Copyright (c) 1988-1997 Sam Leffler
+@@ -37,7 +37,7 @@
+ case 0: op[0] = (unsigned char) ((v) << 6); break; \
+ case 1: op[0] |= (v) << 4; break; \
+ case 2: op[0] |= (v) << 2; break; \
+- case 3: *op++ |= (v); break; \
++ case 3: *op++ |= (v); op_offset++; break; \
+ } \
+ }
+
+@@ -106,6 +106,7 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
+ uint32 imagewidth = tif->tif_dir.td_imagewidth;
+ if( isTiled(tif) )
+ imagewidth = tif->tif_dir.td_tilewidth;
++ tmsize_t op_offset = 0;
+
+ /*
+ * The scanline is composed of a sequence of constant
+@@ -122,10 +123,15 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
+ * bounds, potentially resulting in a security
+ * issue.
+ */
+- while (n-- > 0 && npixels < imagewidth)
++ while (n-- > 0 && npixels < imagewidth && op_offset < scanline)
+ SETPIXEL(op, grey);
+ if (npixels >= imagewidth)
+ break;
++ if (op_offset >= scanline ) {
++ TIFFErrorExt(tif->tif_clientdata, module, "Invalid data for scanline %ld",
++ (long) tif->tif_row);
++ return (0);
++ }
+ if (cc == 0)
+ goto bad;
+ n = *bp++, cc--;
+++ /dev/null
-Index: tiff-4.0.3/tools/ppm2tiff.c
-===================================================================
---- tiff-4.0.3.orig/tools/ppm2tiff.c 2013-06-23 10:36:50.779629492 -0400
-+++ tiff-4.0.3/tools/ppm2tiff.c 2013-06-23 10:36:50.775629494 -0400
-@@ -89,6 +89,7 @@
- int c;
- extern int optind;
- extern char* optarg;
-+ tmsize_t scanline_size;
-
- if (argc < 2) {
- fprintf(stderr, "%s: Too few arguments\n", argv[0]);
-@@ -237,8 +238,16 @@
- }
- if (TIFFScanlineSize(out) > linebytes)
- buf = (unsigned char *)_TIFFmalloc(linebytes);
-- else
-- buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
-+ else {
-+ scanline_size = TIFFScanlineSize(out);
-+ if (scanline_size != 0)
-+ buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
-+ else {
-+ fprintf(stderr, "%s: scanline size overflow\n",infile);
-+ (void) TIFFClose(out);
-+ exit(-2);
-+ }
-+ }
- if (resolution > 0) {
- TIFFSetField(out, TIFFTAG_XRESOLUTION, resolution);
- TIFFSetField(out, TIFFTAG_YRESOLUTION, resolution);
+++ /dev/null
-Index: tiff-4.0.3/tools/tiff2pdf.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiff2pdf.c 2013-06-23 10:36:50.979629486 -0400
-+++ tiff-4.0.3/tools/tiff2pdf.c 2013-06-23 10:36:50.975629486 -0400
-@@ -3341,33 +3341,56 @@
- uint32 height){
-
- tsize_t i=0;
-- uint16 ri =0;
-- uint16 v_samp=1;
-- uint16 h_samp=1;
-- int j=0;
--
-- i++;
--
-- while(i<(*striplength)){
-+
-+ while (i < *striplength) {
-+ tsize_t datalen;
-+ uint16 ri;
-+ uint16 v_samp;
-+ uint16 h_samp;
-+ int j;
-+ int ncomp;
-+
-+ /* marker header: one or more FFs */
-+ if (strip[i] != 0xff)
-+ return(0);
-+ i++;
-+ while (i < *striplength && strip[i] == 0xff)
-+ i++;
-+ if (i >= *striplength)
-+ return(0);
-+ /* SOI is the only pre-SOS marker without a length word */
-+ if (strip[i] == 0xd8)
-+ datalen = 0;
-+ else {
-+ if ((*striplength - i) <= 2)
-+ return(0);
-+ datalen = (strip[i+1] << 8) | strip[i+2];
-+ if (datalen < 2 || datalen >= (*striplength - i))
-+ return(0);
-+ }
- switch( strip[i] ){
-- case 0xd8:
-- /* SOI - start of image */
-+ case 0xd8: /* SOI - start of image */
- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), 2);
- *bufferoffset+=2;
-- i+=2;
- break;
-- case 0xc0:
-- case 0xc1:
-- case 0xc3:
-- case 0xc9:
-- case 0xca:
-+ case 0xc0: /* SOF0 */
-+ case 0xc1: /* SOF1 */
-+ case 0xc3: /* SOF3 */
-+ case 0xc9: /* SOF9 */
-+ case 0xca: /* SOF10 */
- if(no==0){
-- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
-- for(j=0;j<buffer[*bufferoffset+9];j++){
-- if( (buffer[*bufferoffset+11+(2*j)]>>4) > h_samp)
-- h_samp = (buffer[*bufferoffset+11+(2*j)]>>4);
-- if( (buffer[*bufferoffset+11+(2*j)] & 0x0f) > v_samp)
-- v_samp = (buffer[*bufferoffset+11+(2*j)] & 0x0f);
-+ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
-+ ncomp = buffer[*bufferoffset+9];
-+ if (ncomp < 1 || ncomp > 4)
-+ return(0);
-+ v_samp=1;
-+ h_samp=1;
-+ for(j=0;j<ncomp;j++){
-+ uint16 samp = buffer[*bufferoffset+11+(3*j)];
-+ if( (samp>>4) > h_samp)
-+ h_samp = (samp>>4);
-+ if( (samp & 0x0f) > v_samp)
-+ v_samp = (samp & 0x0f);
- }
- v_samp*=8;
- h_samp*=8;
-@@ -3381,45 +3404,43 @@
- (unsigned char) ((height>>8) & 0xff);
- buffer[*bufferoffset+6]=
- (unsigned char) (height & 0xff);
-- *bufferoffset+=strip[i+2]+2;
-- i+=strip[i+2]+2;
--
-+ *bufferoffset+=datalen+2;
-+ /* insert a DRI marker */
- buffer[(*bufferoffset)++]=0xff;
- buffer[(*bufferoffset)++]=0xdd;
- buffer[(*bufferoffset)++]=0x00;
- buffer[(*bufferoffset)++]=0x04;
- buffer[(*bufferoffset)++]=(ri >> 8) & 0xff;
- buffer[(*bufferoffset)++]= ri & 0xff;
-- } else {
-- i+=strip[i+2]+2;
- }
- break;
-- case 0xc4:
-- case 0xdb:
-- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
-- *bufferoffset+=strip[i+2]+2;
-- i+=strip[i+2]+2;
-+ case 0xc4: /* DHT */
-+ case 0xdb: /* DQT */
-+ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
-+ *bufferoffset+=datalen+2;
- break;
-- case 0xda:
-+ case 0xda: /* SOS */
- if(no==0){
-- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
-- *bufferoffset+=strip[i+2]+2;
-- i+=strip[i+2]+2;
-+ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
-+ *bufferoffset+=datalen+2;
- } else {
- buffer[(*bufferoffset)++]=0xff;
- buffer[(*bufferoffset)++]=
- (unsigned char)(0xd0 | ((no-1)%8));
-- i+=strip[i+2]+2;
- }
-- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), (*striplength)-i-1);
-- *bufferoffset+=(*striplength)-i-1;
-+ i += datalen + 1;
-+ /* copy remainder of strip */
-+ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i]), *striplength - i);
-+ *bufferoffset+= *striplength - i;
- return(1);
- default:
-- i+=strip[i+2]+2;
-+ /* ignore any other marker */
-+ break;
- }
-+ i += datalen + 1;
- }
--
-
-+ /* failed to find SOS marker */
- return(0);
- }
- #endif
+++ /dev/null
-Index: tiff-4.0.3/contrib/dbs/xtiff/xtiff.c
-===================================================================
---- tiff-4.0.3.orig/contrib/dbs/xtiff/xtiff.c 2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/contrib/dbs/xtiff/xtiff.c 2013-06-23 10:36:51.147629484 -0400
-@@ -512,9 +512,9 @@
- Arg args[1];
-
- if (tfMultiPage)
-- sprintf(buffer, "%s - page %d", fileName, tfDirectory);
-+ snprintf(buffer, sizeof(buffer), "%s - page %d", fileName, tfDirectory);
- else
-- strcpy(buffer, fileName);
-+ snprintf(buffer, sizeof(buffer), "%s", fileName);
- XtSetArg(args[0], XtNlabel, buffer);
- XtSetValues(labelWidget, args, 1);
- }
-Index: tiff-4.0.3/libtiff/tif_dirinfo.c
-===================================================================
---- tiff-4.0.3.orig/libtiff/tif_dirinfo.c 2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/libtiff/tif_dirinfo.c 2013-06-23 10:36:51.147629484 -0400
-@@ -711,7 +711,7 @@
- * note that this name is a special sign to TIFFClose() and
- * _TIFFSetupFields() to free the field
- */
-- sprintf(fld->field_name, "Tag %d", (int) tag);
-+ snprintf(fld->field_name, 32, "Tag %d", (int) tag);
-
- return fld;
- }
-Index: tiff-4.0.3/libtiff/tif_codec.c
-===================================================================
---- tiff-4.0.3.orig/libtiff/tif_codec.c 2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/libtiff/tif_codec.c 2013-06-23 10:36:51.151629482 -0400
-@@ -108,7 +108,8 @@
- const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
- char compression_code[20];
-
-- sprintf( compression_code, "%d", tif->tif_dir.td_compression );
-+ snprintf(compression_code, sizeof(compression_code), "%d",
-+ tif->tif_dir.td_compression );
- TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
- "%s compression support is not configured",
- c ? c->name : compression_code );
-Index: tiff-4.0.3/tools/tiffdither.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiffdither.c 2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/tiffdither.c 2013-06-23 10:36:51.151629482 -0400
-@@ -260,7 +260,7 @@
- TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
- else
- CopyField(TIFFTAG_FILLORDER, shortv);
-- sprintf(thing, "Dithered B&W version of %s", argv[optind]);
-+ snprintf(thing, sizeof(thing), "Dithered B&W version of %s", argv[optind]);
- TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
- CopyField(TIFFTAG_PHOTOMETRIC, shortv);
- CopyField(TIFFTAG_ORIENTATION, shortv);
-Index: tiff-4.0.3/tools/rgb2ycbcr.c
-===================================================================
---- tiff-4.0.3.orig/tools/rgb2ycbcr.c 2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/rgb2ycbcr.c 2013-06-23 10:36:51.151629482 -0400
-@@ -332,7 +332,8 @@
- TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
- { char buf[2048];
- char *cp = strrchr(TIFFFileName(in), '/');
-- sprintf(buf, "YCbCr conversion of %s", cp ? cp+1 : TIFFFileName(in));
-+ snprintf(buf, sizeof(buf), "YCbCr conversion of %s",
-+ cp ? cp+1 : TIFFFileName(in));
- TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf);
- }
- TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion());
-Index: tiff-4.0.3/tools/tiff2pdf.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiff2pdf.c 2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/tiff2pdf.c 2013-06-23 10:36:51.151629482 -0400
-@@ -3630,7 +3630,9 @@
- char buffer[16];
- int buflen=0;
-
-- buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);
-+ buflen = snprintf(buffer, sizeof(buffer), "%%PDF-%u.%u ",
-+ t2p->pdf_majorversion&0xff,
-+ t2p->pdf_minorversion&0xff);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7);
-
-@@ -3644,10 +3646,10 @@
- tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
-
- tsize_t written=0;
-- char buffer[16];
-+ char buffer[32];
- int buflen=0;
-
-- buflen=sprintf(buffer, "%lu", (unsigned long)number);
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen );
- written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
-
-@@ -3686,13 +3688,13 @@
- written += t2pWriteFile(output, (tdata_t) "/", 1);
- for (i=0;i<namelen;i++){
- if ( ((unsigned char)name[i]) < 0x21){
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- nextchar=1;
- }
- if ( ((unsigned char)name[i]) > 0x7E){
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- nextchar=1;
-@@ -3700,57 +3702,57 @@
- if (nextchar==0){
- switch (name[i]){
- case 0x23:
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- break;
- case 0x25:
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- break;
- case 0x28:
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- break;
- case 0x29:
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- break;
- case 0x2F:
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- break;
- case 0x3C:
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- break;
- case 0x3E:
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- break;
- case 0x5B:
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- break;
- case 0x5D:
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- break;
- case 0x7B:
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- break;
- case 0x7D:
-- sprintf(buffer, "#%.2X", name[i]);
-+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
- buffer[sizeof(buffer) - 1] = '\0';
- written += t2pWriteFile(output, (tdata_t) buffer, 3);
- break;
-@@ -3865,14 +3867,14 @@
- tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32 number, TIFF* output){
-
- tsize_t written=0;
-- char buffer[16];
-+ char buffer[32];
- int buflen=0;
-
- written += t2pWriteFile(output, (tdata_t) "/Length ", 8);
- if(len!=0){
- written += t2p_write_pdf_stream_length(len, output);
- } else {
-- buflen=sprintf(buffer, "%lu", (unsigned long)number);
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
- }
-@@ -3913,10 +3915,10 @@
- tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){
-
- tsize_t written=0;
-- char buffer[16];
-+ char buffer[32];
- int buflen=0;
-
-- buflen=sprintf(buffer, "%lu", (unsigned long)len);
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)len);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) "\n", 1);
-
-@@ -3930,7 +3932,7 @@
- tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output)
- {
- tsize_t written = 0;
-- char buffer[16];
-+ char buffer[32];
- int buflen = 0;
-
- written += t2pWriteFile(output,
-@@ -3969,7 +3971,6 @@
- written += t2p_write_pdf_string(t2p->pdf_datetime, output);
- }
- written += t2pWriteFile(output, (tdata_t) "\n/Producer ", 11);
-- _TIFFmemset((tdata_t)buffer, 0x00, sizeof(buffer));
- snprintf(buffer, sizeof(buffer), "libtiff / tiff2pdf - %d", TIFFLIB_VERSION);
- written += t2p_write_pdf_string(buffer, output);
- written += t2pWriteFile(output, (tdata_t) "\n", 1);
-@@ -4110,7 +4111,7 @@
- {
- tsize_t written=0;
- tdir_t i=0;
-- char buffer[16];
-+ char buffer[32];
- int buflen=0;
-
- int page=0;
-@@ -4118,7 +4119,7 @@
- (tdata_t) "<< \n/Type /Pages \n/Kids [ ", 26);
- page = t2p->pdf_pages+1;
- for (i=0;i<t2p->tiff_pagecount;i++){
-- buflen=sprintf(buffer, "%d", page);
-+ buflen=snprintf(buffer, sizeof(buffer), "%d", page);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
- if ( ((i+1)%8)==0 ) {
-@@ -4133,8 +4134,7 @@
- }
- }
- written += t2pWriteFile(output, (tdata_t) "] \n/Count ", 10);
-- _TIFFmemset(buffer, 0x00, 16);
-- buflen=sprintf(buffer, "%d", t2p->tiff_pagecount);
-+ buflen=snprintf(buffer, sizeof(buffer), "%d", t2p->tiff_pagecount);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " \n>> \n", 6);
-
-@@ -4149,28 +4149,28 @@
-
- unsigned int i=0;
- tsize_t written=0;
-- char buffer[16];
-+ char buffer[256];
- int buflen=0;
-
- written += t2pWriteFile(output, (tdata_t) "<<\n/Type /Page \n/Parent ", 24);
-- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages);
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_pages);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
- written += t2pWriteFile(output, (tdata_t) "/MediaBox [", 11);
-- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x1);
-+ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x1);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " ", 1);
-- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y1);
-+ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y1);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " ", 1);
-- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x2);
-+ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x2);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " ", 1);
-- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y2);
-+ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y2);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) "] \n", 3);
- written += t2pWriteFile(output, (tdata_t) "/Contents ", 10);
-- buflen=sprintf(buffer, "%lu", (unsigned long)(object + 1));
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object + 1));
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
- written += t2pWriteFile(output, (tdata_t) "/Resources << \n", 15);
-@@ -4178,15 +4178,13 @@
- written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
- for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i++){
- written += t2pWriteFile(output, (tdata_t) "/Im", 3);
-- buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
-+ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) "_", 1);
-- buflen = sprintf(buffer, "%u", i+1);
-+ buflen = snprintf(buffer, sizeof(buffer), "%u", i+1);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " ", 1);
-- buflen = sprintf(
-- buffer,
-- "%lu",
-+ buflen = snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra));
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-@@ -4198,12 +4196,10 @@
- } else {
- written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
- written += t2pWriteFile(output, (tdata_t) "/Im", 3);
-- buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
-+ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " ", 1);
-- buflen = sprintf(
-- buffer,
-- "%lu",
-+ buflen = snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra));
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-@@ -4212,9 +4208,7 @@
- if(t2p->tiff_transferfunctioncount != 0) {
- written += t2pWriteFile(output, (tdata_t) "/ExtGState <<", 13);
- t2pWriteFile(output, (tdata_t) "/GS1 ", 5);
-- buflen = sprintf(
-- buffer,
-- "%lu",
-+ buflen = snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)(object + 3));
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-@@ -4587,7 +4581,7 @@
- if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount>0){
- for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; i++){
- box=t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box;
-- buflen=sprintf(buffer,
-+ buflen=snprintf(buffer, sizeof(buffer),
- "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d_%ld Do Q\n",
- t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
- box.mat[0],
-@@ -4602,7 +4596,7 @@
- }
- } else {
- box=t2p->pdf_imagebox;
-- buflen=sprintf(buffer,
-+ buflen=snprintf(buffer, sizeof(buffer),
- "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\n",
- t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
- box.mat[0],
-@@ -4627,59 +4621,48 @@
- TIFF* output){
-
- tsize_t written=0;
-- char buffer[16];
-+ char buffer[32];
- int buflen=0;
-
- written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output);
- written += t2pWriteFile(output,
- (tdata_t) "/Type /XObject \n/Subtype /Image \n/Name /Im",
- 42);
-- buflen=sprintf(buffer, "%u", t2p->pdf_page+1);
-+ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- if(tile != 0){
- written += t2pWriteFile(output, (tdata_t) "_", 1);
-- buflen=sprintf(buffer, "%lu", (unsigned long)tile);
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)tile);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- }
- written += t2pWriteFile(output, (tdata_t) "\n/Width ", 8);
-- _TIFFmemset((tdata_t)buffer, 0x00, 16);
- if(tile==0){
-- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width);
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_width);
- } else {
- if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
-- buflen=sprintf(
-- buffer,
-- "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
- } else {
-- buflen=sprintf(
-- buffer,
-- "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
- }
- }
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) "\n/Height ", 9);
-- _TIFFmemset((tdata_t)buffer, 0x00, 16);
- if(tile==0){
-- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_length);
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_length);
- } else {
- if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
-- buflen=sprintf(
-- buffer,
-- "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
- } else {
-- buflen=sprintf(
-- buffer,
-- "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
- }
- }
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) "\n/BitsPerComponent ", 19);
-- _TIFFmemset((tdata_t)buffer, 0x00, 16);
-- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
-+ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) "\n/ColorSpace ", 13);
- written += t2p_write_pdf_xobject_cs(t2p, output);
-@@ -4723,11 +4706,10 @@
- t2p->pdf_colorspace ^= T2P_CS_PALETTE;
- written += t2p_write_pdf_xobject_cs(t2p, output);
- t2p->pdf_colorspace |= T2P_CS_PALETTE;
-- buflen=sprintf(buffer, "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
-+ buflen=snprintf(buffer, sizeof(buffer), "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " ", 1);
-- _TIFFmemset(buffer, 0x00, 16);
-- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_palettecs );
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_palettecs );
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R ]\n", 7);
- return(written);
-@@ -4761,10 +4743,10 @@
- X_W /= Y_W;
- Z_W /= Y_W;
- Y_W = 1.0F;
-- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
-+ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) "/Range ", 7);
-- buflen=sprintf(buffer, "[%d %d %d %d] \n",
-+ buflen=snprintf(buffer, sizeof(buffer), "[%d %d %d %d] \n",
- t2p->pdf_labrange[0],
- t2p->pdf_labrange[1],
- t2p->pdf_labrange[2],
-@@ -4780,26 +4762,26 @@
- tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){
-
- tsize_t written=0;
-- char buffer[16];
-+ char buffer[32];
- int buflen=0;
-
- written += t2pWriteFile(output, (tdata_t) "<< /Type /ExtGState \n/TR ", 25);
- if(t2p->tiff_transferfunctioncount == 1){
-- buflen=sprintf(buffer, "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)(t2p->pdf_xrefcount + 1));
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
- } else {
- written += t2pWriteFile(output, (tdata_t) "[ ", 2);
-- buflen=sprintf(buffer, "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)(t2p->pdf_xrefcount + 1));
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-- buflen=sprintf(buffer, "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)(t2p->pdf_xrefcount + 2));
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-- buflen=sprintf(buffer, "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)(t2p->pdf_xrefcount + 3));
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
-@@ -4821,7 +4803,7 @@
- written += t2pWriteFile(output, (tdata_t) "/FunctionType 0 \n", 17);
- written += t2pWriteFile(output, (tdata_t) "/Domain [0.0 1.0] \n", 19);
- written += t2pWriteFile(output, (tdata_t) "/Range [0.0 1.0] \n", 18);
-- buflen=sprintf(buffer, "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
-+ buflen=snprintf(buffer, sizeof(buffer), "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) "/BitsPerSample 16 \n", 19);
- written += t2p_write_pdf_stream_dict(((tsize_t)1)<<(t2p->tiff_bitspersample+1), 0, output);
-@@ -4848,7 +4830,7 @@
- tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
-
- tsize_t written=0;
-- char buffer[128];
-+ char buffer[256];
- int buflen=0;
-
- float X_W=0.0;
-@@ -4916,16 +4898,16 @@
- written += t2pWriteFile(output, (tdata_t) "<< \n", 4);
- if(t2p->pdf_colorspace & T2P_CS_CALGRAY){
- written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
-- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
-+ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) "/Gamma 2.2 \n", 12);
- }
- if(t2p->pdf_colorspace & T2P_CS_CALRGB){
- written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
-- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
-+ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) "/Matrix ", 8);
-- buflen=sprintf(buffer, "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n",
-+ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n",
- X_R, Y_R, Z_R,
- X_G, Y_G, Z_G,
- X_B, Y_B, Z_B);
-@@ -4944,11 +4926,11 @@
- tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){
-
- tsize_t written=0;
-- char buffer[16];
-+ char buffer[32];
- int buflen=0;
-
- written += t2pWriteFile(output, (tdata_t) "[/ICCBased ", 11);
-- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_icccs);
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_icccs);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " 0 R] \n", 7);
-
-@@ -4958,11 +4940,11 @@
- tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){
-
- tsize_t written=0;
-- char buffer[16];
-+ char buffer[32];
- int buflen=0;
-
- written += t2pWriteFile(output, (tdata_t) "/N ", 3);
-- buflen=sprintf(buffer, "%u \n", t2p->tiff_samplesperpixel);
-+ buflen=snprintf(buffer, sizeof(buffer), "%u \n", t2p->tiff_samplesperpixel);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) "/Alternate ", 11);
- t2p->pdf_colorspace ^= T2P_CS_ICCBASED;
-@@ -5027,7 +5009,7 @@
- tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output){
-
- tsize_t written=0;
-- char buffer[16];
-+ char buffer[32];
- int buflen=0;
-
- if(t2p->pdf_compression==T2P_COMPRESS_NONE){
-@@ -5042,41 +5024,33 @@
- written += t2pWriteFile(output, (tdata_t) "<< /K -1 ", 9);
- if(tile==0){
- written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
-- buflen=sprintf(buffer, "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)t2p->tiff_width);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
-- buflen=sprintf(buffer, "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)t2p->tiff_length);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- } else {
- if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
- written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
-- buflen=sprintf(
-- buffer,
-- "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- } else {
- written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
-- buflen=sprintf(
-- buffer,
-- "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- }
- if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
- written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
-- buflen=sprintf(
-- buffer,
-- "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- } else {
- written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
-- buflen=sprintf(
-- buffer,
-- "%lu",
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- }
-@@ -5103,21 +5077,17 @@
- if(t2p->pdf_compressionquality%100){
- written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13);
- written += t2pWriteFile(output, (tdata_t) "<< /Predictor ", 14);
-- _TIFFmemset(buffer, 0x00, 16);
-- buflen=sprintf(buffer, "%u", t2p->pdf_compressionquality%100);
-+ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_compressionquality%100);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " /Columns ", 10);
-- _TIFFmemset(buffer, 0x00, 16);
-- buflen = sprintf(buffer, "%lu",
-+ buflen = snprintf(buffer, sizeof(buffer), "%lu",
- (unsigned long)t2p->tiff_width);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " /Colors ", 9);
-- _TIFFmemset(buffer, 0x00, 16);
-- buflen=sprintf(buffer, "%u", t2p->tiff_samplesperpixel);
-+ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_samplesperpixel);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " /BitsPerComponent ", 19);
-- _TIFFmemset(buffer, 0x00, 16);
-- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
-+ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) ">>\n", 3);
- }
-@@ -5137,16 +5107,16 @@
- tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){
-
- tsize_t written=0;
-- char buffer[21];
-+ char buffer[64];
- int buflen=0;
- uint32 i=0;
-
- written += t2pWriteFile(output, (tdata_t) "xref\n0 ", 7);
-- buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- written += t2pWriteFile(output, (tdata_t) " \n0000000000 65535 f \n", 22);
- for (i=0;i<t2p->pdf_xrefcount;i++){
-- sprintf(buffer, "%.10lu 00000 n \n",
-+ snprintf(buffer, sizeof(buffer), "%.10lu 00000 n \n",
- (unsigned long)t2p->pdf_xrefoffsets[i]);
- written += t2pWriteFile(output, (tdata_t) buffer, 20);
- }
-@@ -5170,17 +5140,14 @@
- snprintf(t2p->pdf_fileid + i, 9, "%.8X", rand());
-
- written += t2pWriteFile(output, (tdata_t) "trailer\n<<\n/Size ", 17);
-- buflen = sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
-+ buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-- _TIFFmemset(buffer, 0x00, 32);
- written += t2pWriteFile(output, (tdata_t) "\n/Root ", 7);
-- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_catalog);
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_catalog);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-- _TIFFmemset(buffer, 0x00, 32);
- written += t2pWriteFile(output, (tdata_t) " 0 R \n/Info ", 12);
-- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_info);
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_info);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-- _TIFFmemset(buffer, 0x00, 32);
- written += t2pWriteFile(output, (tdata_t) " 0 R \n/ID[<", 11);
- written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
- sizeof(t2p->pdf_fileid) - 1);
-@@ -5188,9 +5155,8 @@
- written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
- sizeof(t2p->pdf_fileid) - 1);
- written += t2pWriteFile(output, (tdata_t) ">]\n>>\nstartxref\n", 16);
-- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_startxref);
-+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_startxref);
- written += t2pWriteFile(output, (tdata_t) buffer, buflen);
-- _TIFFmemset(buffer, 0x00, 32);
- written += t2pWriteFile(output, (tdata_t) "\n%%EOF\n", 7);
-
- return(written);
-Index: tiff-4.0.3/tools/tiff2ps.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiff2ps.c 2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/tiff2ps.c 2013-06-23 10:36:51.155629481 -0400
-@@ -1781,8 +1781,8 @@
- imageOp = "imagemask";
-
- (void)strcpy(im_x, "0");
-- (void)sprintf(im_y, "%lu", (long) h);
-- (void)sprintf(im_h, "%lu", (long) h);
-+ (void)snprintf(im_y, sizeof(im_y), "%lu", (long) h);
-+ (void)snprintf(im_h, sizeof(im_h), "%lu", (long) h);
- tile_width = w;
- tile_height = h;
- if (TIFFIsTiled(tif)) {
-@@ -1803,7 +1803,7 @@
- }
- if (tile_height < h) {
- fputs("/im_y 0 def\n", fd);
-- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
-+ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
- }
- } else {
- repeat_count = tf_numberstrips;
-@@ -1815,7 +1815,7 @@
- fprintf(fd, "/im_h %lu def\n",
- (unsigned long) tile_height);
- (void)strcpy(im_h, "im_h");
-- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
-+ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
- }
- }
-
-Index: tiff-4.0.3/tools/tiffcrop.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiffcrop.c 2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/tiffcrop.c 2013-06-23 10:36:51.159629481 -0400
-@@ -2077,7 +2077,7 @@
- return 1;
- }
-
-- sprintf (filenum, "-%03d%s", findex, export_ext);
-+ snprintf(filenum, sizeof(filenum), "-%03d%s", findex, export_ext);
- filenum[14] = '\0';
- strncat (exportname, filenum, 15);
- }
-@@ -2230,8 +2230,8 @@
-
- /* dump.infilename is guaranteed to be NUL termimated and have 20 bytes
- fewer than PATH_MAX */
-- memset (temp_filename, '\0', PATH_MAX + 1);
-- sprintf (temp_filename, "%s-read-%03d.%s", dump.infilename, dump_images,
-+ snprintf(temp_filename, sizeof(temp_filename), "%s-read-%03d.%s",
-+ dump.infilename, dump_images,
- (dump.format == DUMP_TEXT) ? "txt" : "raw");
- if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL)
- {
-@@ -2249,8 +2249,8 @@
-
- /* dump.outfilename is guaranteed to be NUL termimated and have 20 bytes
- fewer than PATH_MAX */
-- memset (temp_filename, '\0', PATH_MAX + 1);
-- sprintf (temp_filename, "%s-write-%03d.%s", dump.outfilename, dump_images,
-+ snprintf(temp_filename, sizeof(temp_filename), "%s-write-%03d.%s",
-+ dump.outfilename, dump_images,
- (dump.format == DUMP_TEXT) ? "txt" : "raw");
- if ((dump.outfile = fopen(temp_filename, dump.mode)) == NULL)
- {
-Index: tiff-4.0.3/tools/tiff2bw.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiff2bw.c 2013-06-23 10:36:51.163629483 -0400
-+++ tiff-4.0.3/tools/tiff2bw.c 2013-06-23 10:36:51.159629481 -0400
-@@ -205,7 +205,7 @@
- }
- }
- TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
-- sprintf(thing, "B&W version of %s", argv[optind]);
-+ snprintf(thing, sizeof(thing), "B&W version of %s", argv[optind]);
- TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
- TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw");
- outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
+++ /dev/null
-Description: Buffer overflow in gif2tiff
-Bug: http://bugzilla.maptools.org/show_bug.cgi?id=2450
-Bug-Debian: http://bugs.debian.org/719303
-
-Index: tiff-4.0.3/tools/gif2tiff.c
-===================================================================
---- tiff-4.0.3.orig/tools/gif2tiff.c 2013-08-22 11:46:11.960846910 -0400
-+++ tiff-4.0.3/tools/gif2tiff.c 2013-08-22 11:46:11.956846910 -0400
-@@ -333,6 +333,8 @@
- int status = 1;
-
- datasize = getc(infile);
-+ if (datasize > 12)
-+ return 0;
- clear = 1 << datasize;
- eoi = clear + 1;
- avail = clear + 2;
+++ /dev/null
-Description: use after free in tiff2pdf
-Bug: http://bugzilla.maptools.org/show_bug.cgi?id=2449
-Bug-Debian: http://bugs.debian.org/719303
-
-Index: tiff-4.0.3/tools/tiff2pdf.c
-===================================================================
---- tiff-4.0.3.orig/tools/tiff2pdf.c 2013-08-22 11:46:37.292847242 -0400
-+++ tiff-4.0.3/tools/tiff2pdf.c 2013-08-22 11:46:37.292847242 -0400
-@@ -2461,7 +2461,8 @@
- (unsigned long) t2p->tiff_datasize,
- TIFFFileName(input));
- t2p->t2p_error = T2P_ERR_ERROR;
-- _TIFFfree(buffer);
-+ _TIFFfree(buffer);
-+ return(0);
- } else {
- buffer=samplebuffer;
- t2p->tiff_datasize *= t2p->tiff_samplesperpixel;
+++ /dev/null
-Description: OOB write in gif2tiff
-Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=996468
-
-Index: tiff-4.0.3/tools/gif2tiff.c
-===================================================================
---- tiff-4.0.3.orig/tools/gif2tiff.c 2013-08-24 11:17:13.546447901 -0400
-+++ tiff-4.0.3/tools/gif2tiff.c 2013-08-24 11:17:13.546447901 -0400
-@@ -400,6 +400,10 @@
- }
-
- if (oldcode == -1) {
-+ if (code >= clear) {
-+ fprintf(stderr, "bad input: code=%d is larger than clear=%d\n",code, clear);
-+ return 0;
-+ }
- *(*fill)++ = suffix[code];
- firstchar = oldcode = code;
- return 1;
+++ /dev/null
-Index: tiff/tools/gif2tiff.c
-===================================================================
---- tiff.orig/tools/gif2tiff.c
-+++ tiff/tools/gif2tiff.c
-@@ -280,6 +280,10 @@ readgifimage(char* mode)
- fprintf(stderr, "no colormap present for image\n");
- return (0);
- }
-+ if (width == 0 || height == 0) {
-+ fprintf(stderr, "Invalid value of width or height\n");
-+ return(0);
-+ }
- if ((raster = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) {
- fprintf(stderr, "not enough memory for image\n");
- return (0);
-@@ -404,6 +408,10 @@ process(register int code, unsigned char
- fprintf(stderr, "bad input: code=%d is larger than clear=%d\n",code, clear);
- return 0;
- }
-+ if (*fill >= raster + width*height) {
-+ fprintf(stderr, "raster full before eoi code\n");
-+ return 0;
-+ }
- *(*fill)++ = suffix[code];
- firstchar = oldcode = code;
- return 1;
-@@ -434,6 +442,10 @@ process(register int code, unsigned char
- }
- oldcode = incode;
- do {
-+ if (*fill >= raster + width*height) {
-+ fprintf(stderr, "raster full before eoi code\n");
-+ return 0;
-+ }
- *(*fill)++ = *--stackp;
- } while (stackp > stack);
- return 1;
+++ /dev/null
-Description: CVE-2014-9330
- Integer overflow in bmp2tiff
-Origin: upstream, http://bugzilla.maptools.org/show_bug.cgi?id=2494
-Bug: http://bugzilla.maptools.org/show_bug.cgi?id=2494
-Bug-Debian: http://bugs.debian.org/773987
-
-Index: tiff/tools/bmp2tiff.c
-===================================================================
---- tiff.orig/tools/bmp2tiff.c
-+++ tiff/tools/bmp2tiff.c
-@@ -1,4 +1,4 @@
--/* $Id: bmp2tiff.c,v 1.23 2010-03-10 18:56:49 bfriesen Exp $
-+/* $Id: bmp2tiff.c,v 1.24 2014-12-21 15:15:32 erouault Exp $
- *
- * Project: libtiff tools
- * Purpose: Convert Windows BMP files in TIFF.
-@@ -403,6 +403,13 @@ main(int argc, char* argv[])
-
- width = info_hdr.iWidth;
- length = (info_hdr.iHeight > 0) ? info_hdr.iHeight : -info_hdr.iHeight;
-+ if( width <= 0 || length <= 0 )
-+ {
-+ TIFFError(infilename,
-+ "Invalid dimensions of BMP file" );
-+ close(fd);
-+ return -1;
-+ }
-
- switch (info_hdr.iBitCount)
- {
-@@ -593,6 +600,14 @@ main(int argc, char* argv[])
-
- compr_size = file_hdr.iSize - file_hdr.iOffBits;
- uncompr_size = width * length;
-+ /* Detect int overflow */
-+ if( uncompr_size / width != length )
-+ {
-+ TIFFError(infilename,
-+ "Invalid dimensions of BMP file" );
-+ close(fd);
-+ return -1;
-+ }
- comprbuf = (unsigned char *) _TIFFmalloc( compr_size );
- if (!comprbuf) {
- TIFFError(infilename,
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
-PKG_VERSION:=1.0.0
+PKG_VERSION:=1.0.3
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <openwrt@brenken.org>
else
network_get_device adb_wandev4 "${adb_wanif4}"
network_get_device adb_wandev6 "${adb_wanif6}"
- break
fi
# get lan ip addresses
then
mem_ok="false"
f_log "not enough free memory, overall sort processing will be disabled (total: ${mem_total}, free: ${mem_free}, swap: ${mem_swap})"
+ else
+ mem_ok="true"
fi
# check backup configuration
{
local mp="${1}"
- # check relevant mount points in a subshell
- #
if [ -d "${mp}" ]
then
av_space="$(df "${mp}" | tail -n1 | awk '{printf $4}')"
# get current directory, script- and openwrt version
#
adb_scriptdir="${0%/*}"
-adb_scriptver="1.0.0"
+adb_scriptver="1.0.3"
openwrt_version="$(cat /etc/openwrt_version)"
# source in adblock function library
f_log " source archive (pre-)processing finished"
else
rc=0
+ adb_srclist="! -name ${adb_dnsprefix}.${src_name}"
+ adb_errsrclist="-name ${adb_dnsprefix}.${src_name}"
fi
else
rc=0
+ adb_srclist="! -name ${adb_dnsprefix}.${src_name}"
adb_errsrclist="-name ${adb_dnsprefix}.${src_name}"
f_log " source archive download failed"
fi
then
rm_done="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" \( ${adb_srclist} \) -print -exec rm -f "{}" \;)"
rc=${?}
- if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
- then
- f_log "disabled adblock lists removed"
- if [ "${backup_ok}" = "true" ]
- then
- rm_done="$(find "${adb_backupdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" \( ${adb_srclist} \) -print -exec rm -f "{}" \;)"
- rc=${?}
- if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
- then
- f_log "disabled adblock list backups removed"
- elif [ $((rc)) -ne 0 ]
- then
- f_log "error during removal of disabled adblock list backups" "${rc}"
- f_exit
- fi
- fi
- elif [ $((rc)) -ne 0 ]
- then
- f_log "error during removal of disabled adblock lists" "${rc}"
- f_exit
- fi
else
rm_done="$(find "${adb_dnsdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" -print -exec rm -f "{}" \;)"
rc=${?}
- if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
+fi
+if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
+then
+ f_log "disabled adblock lists removed"
+ if [ "${backup_ok}" = "true" ]
then
- f_log "all adblock lists removed"
- if [ "${backup_ok}" = "true" ]
+ if [ -n "${adb_srclist}" ]
then
+ rm_done="$(find "${adb_backupdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" \( ${adb_srclist} \) -print -exec rm -f "{}" \;)"
+ rc=${?}
+ else
rm_done="$(find "${adb_backupdir}" -maxdepth 1 -type f -name "${adb_dnsprefix}.*" -print -exec rm -f "{}" \;)"
rc=${?}
- if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
- then
- f_log "all adblock list backups removed"
- elif [ $((rc)) -ne 0 ]
- then
- f_log "error during removal of all adblock list backups" "${rc}"
- f_exit
- fi
fi
- elif [ $((rc)) -ne 0 ]
- then
- f_log "error during removal of all adblock lists" "${rc}"
- f_exit
+ if [ $((rc)) -eq 0 ] && [ -n "${rm_done}" ]
+ then
+ f_log "disabled adblock list backups removed"
+ elif [ $((rc)) -ne 0 ]
+ then
+ f_log "error during removal of disabled adblock list backups" "${rc}"
+ f_exit
+ fi
fi
+elif [ $((rc)) -ne 0 ]
+then
+ f_log "error during removal of disabled adblock lists" "${rc}"
+ f_exit
fi
# partial restore of adblock lists in case of download errors
# make separate adblock lists entries unique
#
-if [ "${mem_ok}" != "false" ]
+if [ "${mem_ok}" = "true" ] && [ -n "${adb_revsrclist}" ]
then
- if [ -n "${adb_revsrclist}" ]
- then
- f_log "remove duplicates in separate adblock lists"
+ f_log "remove duplicates in separate adblock lists"
- # generate a temporary unique overall list
- #
- head -qn -3 "${adb_dnsdir}/${adb_dnsprefix}."* | sort -u > "${adb_dnsdir}/tmp.overall"
+ # generate a unique overall block list
+ #
+ head -qn -3 "${adb_dnsdir}/${adb_dnsprefix}."* | sort -u > "${adb_tmpdir}/blocklist.overall"
- # loop through all separate lists, ordered by size (ascending)
+ # loop through all separate lists, ordered by size (ascending)
+ #
+ for list in $(ls -Sr "${adb_dnsdir}/${adb_dnsprefix}."*)
+ do
+ # check overall block list vs. separate block list,
+ # write only duplicate entries to a temporary separate list
#
- for list in $(ls -Sr "${adb_dnsdir}/${adb_dnsprefix}."*)
- do
- # check original separate list vs. temporary overall list,
- # rewrite only duplicate entries back to temporary separate list
- #
- list="${list/*./}"
- sort "${adb_dnsdir}/tmp.overall" "${adb_dnsdir}/${adb_dnsprefix}.${list}" | uniq -d > "${adb_dnsdir}/tmp.${list}"
+ list="${list/*./}"
+ sort "${adb_tmpdir}/blocklist.overall" "${adb_dnsdir}/${adb_dnsprefix}.${list}" | uniq -d > "${adb_tmpdir}/tmp.${list}"
- # rewrite only unique entries back to temporary overall list
- #
- tmp_unique="$(sort "${adb_dnsdir}/tmp.overall" "${adb_dnsdir}/tmp.${list}" | uniq -u)"
- printf "%s\n" "${tmp_unique}" > "${adb_dnsdir}/tmp.overall"
+ # write only unique entries back to overall block list
+ #
+ sort "${adb_tmpdir}/blocklist.overall" "${adb_tmpdir}/tmp.${list}" | uniq -u > "${adb_tmpdir}/tmp.overall"
+ mv -f "${adb_tmpdir}/tmp.overall" "${adb_tmpdir}/blocklist.overall"
- # write unique result back to original separate list (with list footer)
- #
- tail -qn 3 "${adb_dnsdir}/$adb_dnsprefix.${list}" >> "${adb_dnsdir}/tmp.${list}"
- mv -f "${adb_dnsdir}/tmp.${list}" "${adb_dnsdir}/${adb_dnsprefix}.${list}"
- done
- rm -f "${adb_dnsdir}/tmp.overall"
- fi
+ # write unique result back to original separate list
+ #
+ tail -qn 3 "${adb_dnsdir}/${adb_dnsprefix}.${list}" >> "${adb_tmpdir}/tmp.${list}"
+ mv -f "${adb_tmpdir}/tmp.${list}" "${adb_dnsdir}/${adb_dnsprefix}.${list}"
+ done
+ rm -f "${adb_tmpdir}/blocklist.overall"
fi
# set separate list count & get overall count
PKG_NAME:=bind
PKG_VERSION:=9.9.8-P4
-PKG_RELEASE:=2
+PKG_RELEASE:=3
USERID:=bind=57:bind=57
PKG_MAINTAINER := Noah Meyerhans <frodo@morgul.net>
-
-; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net.
-;; global options: printcmd
-;; Got answer:
-;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944
-;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
-
-;; QUESTION SECTION:
-;. IN NS
-
-;; ANSWER SECTION:
-. 518400 IN NS A.ROOT-SERVERS.NET.
-. 518400 IN NS B.ROOT-SERVERS.NET.
-. 518400 IN NS C.ROOT-SERVERS.NET.
-. 518400 IN NS D.ROOT-SERVERS.NET.
-. 518400 IN NS E.ROOT-SERVERS.NET.
-. 518400 IN NS F.ROOT-SERVERS.NET.
-. 518400 IN NS G.ROOT-SERVERS.NET.
-. 518400 IN NS H.ROOT-SERVERS.NET.
-. 518400 IN NS I.ROOT-SERVERS.NET.
-. 518400 IN NS J.ROOT-SERVERS.NET.
-. 518400 IN NS K.ROOT-SERVERS.NET.
-. 518400 IN NS L.ROOT-SERVERS.NET.
-. 518400 IN NS M.ROOT-SERVERS.NET.
-
-;; ADDITIONAL SECTION:
-A.ROOT-SERVERS.NET. 3600000 IN A 198.41.0.4
-B.ROOT-SERVERS.NET. 3600000 IN A 192.228.79.201
-C.ROOT-SERVERS.NET. 3600000 IN A 192.33.4.12
-D.ROOT-SERVERS.NET. 3600000 IN A 128.8.10.90
-E.ROOT-SERVERS.NET. 3600000 IN A 192.203.230.10
-F.ROOT-SERVERS.NET. 3600000 IN A 192.5.5.241
-G.ROOT-SERVERS.NET. 3600000 IN A 192.112.36.4
-H.ROOT-SERVERS.NET. 3600000 IN A 128.63.2.53
-I.ROOT-SERVERS.NET. 3600000 IN A 192.36.148.17
-J.ROOT-SERVERS.NET. 3600000 IN A 192.58.128.30
-K.ROOT-SERVERS.NET. 3600000 IN A 193.0.14.129
-L.ROOT-SERVERS.NET. 3600000 IN A 199.7.83.42
-M.ROOT-SERVERS.NET. 3600000 IN A 202.12.27.33
-
-;; Query time: 81 msec
-;; SERVER: 198.41.0.4#53(a.root-servers.net.)
-;; WHEN: Sun Feb 1 11:27:14 2004
-;; MSG SIZE rcvd: 436
-
+; This file holds the information on root name servers needed to
+; initialize cache of Internet domain name servers
+; (e.g. reference this file in the "cache . <file>"
+; configuration file of BIND domain name servers).
+;
+; This file is made available by InterNIC
+; under anonymous FTP as
+; file /domain/named.cache
+; on server FTP.INTERNIC.NET
+; -OR- RS.INTERNIC.NET
+;
+; last update: February 17, 2016
+; related version of root zone: 2016021701
+;
+; formerly NS.INTERNIC.NET
+;
+. 3600000 NS A.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
+A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30
+;
+; FORMERLY NS1.ISI.EDU
+;
+. 3600000 NS B.ROOT-SERVERS.NET.
+B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
+B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:84::b
+;
+; FORMERLY C.PSI.NET
+;
+. 3600000 NS C.ROOT-SERVERS.NET.
+C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
+C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::c
+;
+; FORMERLY TERP.UMD.EDU
+;
+. 3600000 NS D.ROOT-SERVERS.NET.
+D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13
+D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2d::d
+;
+; FORMERLY NS.NASA.GOV
+;
+. 3600000 NS E.ROOT-SERVERS.NET.
+E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
+;
+; FORMERLY NS.ISC.ORG
+;
+. 3600000 NS F.ROOT-SERVERS.NET.
+F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
+F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
+;
+; FORMERLY NS.NIC.DDN.MIL
+;
+. 3600000 NS G.ROOT-SERVERS.NET.
+G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
+;
+; FORMERLY AOS.ARL.ARMY.MIL
+;
+. 3600000 NS H.ROOT-SERVERS.NET.
+H.ROOT-SERVERS.NET. 3600000 A 198.97.190.53
+H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::53
+;
+; FORMERLY NIC.NORDU.NET
+;
+. 3600000 NS I.ROOT-SERVERS.NET.
+I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
+I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fe::53
+;
+; OPERATED BY VERISIGN, INC.
+;
+. 3600000 NS J.ROOT-SERVERS.NET.
+J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
+J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:c27::2:30
+;
+; OPERATED BY RIPE NCC
+;
+. 3600000 NS K.ROOT-SERVERS.NET.
+K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
+K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
+;
+; OPERATED BY ICANN
+;
+. 3600000 NS L.ROOT-SERVERS.NET.
+L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
+L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:3::42
+;
+; OPERATED BY WIDE
+;
+. 3600000 NS M.ROOT-SERVERS.NET.
+M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
+M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
+; End of file
logdir=/var/log/named/
cachedir=/var/cache/bind
libdir=/var/lib/bind
-config_file=/etc/bind/named.conf
fix_perms() {
for dir in $libdir $logdir $cachedir; do
# name of TUN device name. required.
option tundev 'tun0'
+ # name of network interface
+ option network ''
+
# Include this flag if process is to run in the foreground
#option fg
include $(TOPDIR)/rules.mk
PKG_NAME:=ethtool
-PKG_VERSION:=4.2
+PKG_VERSION:=4.5
PKG_RELEASE:=1
PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/network/ethtool
-PKG_MD5SUM:=8433e71a256678d859ecc264132063c5
+PKG_MD5SUM:=f50d25177d10f0cb74da3edc66c3143a
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
default y
+config FASTD_WITH_CAPABILITIES
+ bool "Enable POSIX capability support"
+ depends on PACKAGE_fastd
+ default n
+
+
config FASTD_WITH_CMDLINE_USER
bool "Include support for setting user/group related options on the command line"
depends on PACKAGE_fastd
include $(TOPDIR)/rules.mk
PKG_NAME:=fastd
-PKG_VERSION:=17
-PKG_RELEASE:=2
+PKG_VERSION:=18
+PKG_RELEASE:=1
PKG_MAINTAINER:=Matthias Schiffer <mschiffer@universe-factory.net>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/81
-PKG_MD5SUM:=bad4f1948702f418b799578f83a0edb8
+PKG_SOURCE_URL:=https://projects.universe-factory.net/attachments/download/86
+PKG_MD5SUM:=e53236d3049f64f7955ad9556da099eb
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYRIGHT
CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 \
CONFIG_FASTD_ENABLE_MAC_GHASH \
CONFIG_FASTD_ENABLE_MAC_UHASH \
+ CONFIG_FASTD_WITH_CAPABILITIES \
CONFIG_FASTD_WITH_CMDLINE_USER \
CONFIG_FASTD_WITH_CMDLINE_LOGGING \
CONFIG_FASTD_WITH_CMDLINE_OPERATION \
define Package/fastd
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+kmod-tun +librt +libpthread +FASTD_WITH_STATUS_SOCKET:libjson-c
+ DEPENDS:=+kmod-tun +librt +libpthread +FASTD_WITH_STATUS_SOCKET:libjson-c +FASTD_WITH_CAPABILITIES:libcap
TITLE:=Fast and Secure Tunneling Daemon
URL:=https://projects.universe-factory.net/projects/fastd
SUBMENU:=VPN
-DWITH_CIPHER_SALSA2012:BOOL=FALSE \
-DWITH_MAC_GHASH:BOOL=FALSE \
-DWITH_MAC_UHASH:BOOL=FALSE \
+ -DWITH_CAPABILITIES:BOOL=FALSE \
-DWITH_CMDLINE_USER:BOOL=FALSE \
-DWITH_CMDLINE_LOGGING:BOOL=FALSE \
-DWITH_CMDLINE_OPERATION:BOOL=FALSE \
-DWITH_CMDLINE_COMMANDS:BOOL=FALSE \
-DWITH_DYNAMIC_PEERS:BOOL=FALSE \
-DWITH_STATUS_SOCKET:BOOL=FALSE \
- -DWITH_CAPABILITIES:BOOL=FALSE \
-DENABLE_SYSTEMD:BOOL=FALSE \
-DENABLE_LIBSODIUM:BOOL=FALSE \
-DENABLE_LTO:BOOL=TRUE
endif
+ifeq ($(CONFIG_FASTD_WITH_CAPABILITIES),y)
+CMAKE_OPTIONS += -DWITH_CAPABILITIES:BOOL=TRUE
+endif
+
+
ifeq ($(CONFIG_FASTD_WITH_CMDLINE_USER),y)
CMAKE_OPTIONS += -DWITH_CMDLINE_USER:BOOL=TRUE
endif
+++ /dev/null
---- a/cmake/checks.cmake
-+++ b/cmake/checks.cmake
-@@ -54,9 +54,13 @@ if(NOT DARWIN)
- endif(NOT DARWIN)
-
-
-+set(CMAKE_EXTRA_INCLUDE_FILES "linux/if_ether.h")
-+check_type_size("struct ethhdr" SIZEOF_ETHHDR)
-+string(COMPARE NOTEQUAL "${SIZEOF_ETHHDR}" "" HAVE_LINUX_ETHHDR)
-+
- set(CMAKE_EXTRA_INCLUDE_FILES "netinet/if_ether.h")
- check_type_size("struct ethhdr" SIZEOF_ETHHDR)
--string(COMPARE NOTEQUAL "${SIZEOF_ETHHDR}" "" HAVE_ETHHDR)
-+string(COMPARE NOTEQUAL "${SIZEOF_ETHHDR}" "" HAVE_NETINET_ETHHDR)
-
-
- set(CMAKE_REQUIRED_INCLUDES "sys/types.h")
---- a/src/compat.h
-+++ b/src/compat.h
-@@ -45,7 +45,12 @@
- #include <net/if.h>
- #include <net/if_arp.h>
- #include <netinet/in.h>
-+
-+#if defined(HAVE_LINUX_ETHHDR)
-+#include <linux/if_ether.h>
-+#elif defined(HAVE_NETINET_ETHHDR)
- #include <netinet/if_ether.h>
-+#endif
-
- #ifndef ETH_ALEN
- /** The length of a MAC address */
-@@ -55,9 +60,8 @@
- #ifndef ETH_HLEN
- /** The length of the standard ethernet header */
- #define ETH_HLEN 14
--#endif
-
--#ifndef HAVE_ETHHDR
-+#if !defined(HAVE_LINUX_ETHHDR) && !defined(HAVE_NETINET_ETHHDR)
- /** An ethernet header */
- struct ethhdr {
- uint8_t h_dest[ETH_ALEN]; /**< The destination MAC address field */
-@@ -65,6 +69,7 @@ struct ethhdr {
- uint16_t h_proto; /**< The EtherType/length field */
- } __attribute__((packed));
- #endif
-+#endif
-
- #if defined(USE_FREEBIND) && !defined(IP_FREEBIND)
- /** Compatiblity define for systems supporting, but not defining IP_FREEBIND */
---- a/src/fastd_config.h.in
-+++ b/src/fastd_config.h.in
-@@ -35,8 +35,11 @@
- /** Defined if the platform supports the AI_ADDRCONFIG flag to getaddrinfo() */
- #cmakedefine HAVE_AI_ADDRCONFIG
-
--/** Defined if the platform defines the \e ethhdr struct */
--#cmakedefine HAVE_ETHHDR
-+/** Defined if the platform defines the \e ethhdr struct through linux/if_ether.h */
-+#cmakedefine HAVE_LINUX_ETHHDR
-+
-+/** Defined if the platform defines the \e ethhdr struct through netinet/if_ether.h */
-+#cmakedefine HAVE_NETINET_ETHHDR
-
- /** Defined if the platform defines get_current_dir_name() */
- #cmakedefine HAVE_GET_CURRENT_DIR_NAME
include $(TOPDIR)/rules.mk
PKG_NAME:=git
-PKG_VERSION:=2.7.1
+PKG_VERSION:=2.7.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/scm/git/
-PKG_MD5SUM:=eece7b1e87983271621a0cb6aab37a25
+PKG_MD5SUM:=bb01710b1b24789a53c800a90c73957f
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
--- a/Makefile
+++ b/Makefile
-@@ -557,16 +557,7 @@ EXTRA_PROGRAMS =
+@@ -559,16 +559,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 =
-@@ -923,6 +914,11 @@ BUILTIN_OBJS += builtin/verify-pack.o
+@@ -929,6 +920,11 @@ BUILTIN_OBJS += builtin/verify-pack.o
BUILTIN_OBJS += builtin/verify-tag.o
BUILTIN_OBJS += builtin/worktree.o
BUILTIN_OBJS += builtin/write-tree.o
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
EXTLIBS =
-@@ -1106,7 +1102,7 @@ endif
+@@ -1112,7 +1108,7 @@ endif
EXTLIBS += -lz
ifndef NO_OPENSSL
ifdef OPENSSLDIR
BASIC_CFLAGS += -I$(OPENSSLDIR)/include
OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)
-@@ -1977,10 +1973,6 @@ endif
+@@ -1989,10 +1985,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,$^) \
$(CURL_LIBCURL) $(LIBS)
-@@ -2300,10 +2292,11 @@ endif
+@@ -2312,10 +2304,11 @@ endif
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
{ test "$$bindir/" = "$$execdir/" || \
} && \
--- a/builtin.h
+++ b/builtin.h
-@@ -141,5 +141,10 @@ extern int cmd_verify_pack(int argc, con
+@@ -142,5 +142,10 @@ extern int cmd_verify_pack(int argc, con
extern int cmd_show_ref(int argc, const char **argv, const char *prefix);
extern int cmd_pack_refs(int argc, const char **argv, const char *prefix);
extern int cmd_replace(int argc, const char **argv, const char *prefix);
+#include "../upload-pack.c"
--- a/daemon.c
+++ b/daemon.c
-@@ -1184,7 +1184,7 @@ static int serve(struct string_list *lis
+@@ -1178,7 +1178,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;
-@@ -1380,12 +1380,13 @@ int main(int argc, char **argv)
+@@ -1374,6 +1374,7 @@ int main(int argc, char **argv)
write_file(pid_file, "%"PRIuMAX, (uintmax_t) getpid());
/* prepare argv for serving-processes */
-- cld_argv = xmalloc(sizeof (char *) * (argc + 2));
-- cld_argv[0] = argv[0]; /* git-daemon */
-- cld_argv[1] = "--serve";
-+ cld_argv = xmalloc(sizeof (char *) * (argc + 3));
-+ cld_argv[0] = "git";
-+ cld_argv[1] = argv[0]; /* daemon */
-+ cld_argv[2] = "--serve";
++ argv_array_push(&cld_argv, "git"); /* git-daemon */
+ argv_array_push(&cld_argv, argv[0]); /* git-daemon */
+ argv_array_push(&cld_argv, "--serve");
for (i = 1; i < argc; ++i)
-- cld_argv[i+1] = argv[i];
-- cld_argv[argc+1] = NULL;
-+ cld_argv[i+2] = argv[i];
-+ cld_argv[argc+2] = NULL;
-
- return serve(&listen_addr, listen_port, cred);
- }
--- a/fast-import.c
+++ b/fast-import.c
-@@ -3380,7 +3380,7 @@ static void parse_argv(void)
+@@ -3381,7 +3381,7 @@ static void parse_argv(void)
read_marks();
}
--- a/git.c
+++ b/git.c
-@@ -311,11 +311,11 @@ static int handle_alias(int *argcp, cons
+@@ -307,11 +307,11 @@ static int handle_alias(int *argcp, cons
struct cmd_struct {
const char *cmd;
{
int status, help;
struct stat st;
-@@ -396,6 +396,7 @@ static struct cmd_struct commands[] = {
+@@ -392,6 +392,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 },
-@@ -414,6 +415,7 @@ static struct cmd_struct commands[] = {
+@@ -410,6 +411,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 },
-@@ -463,6 +465,7 @@ static struct cmd_struct commands[] = {
+@@ -459,6 +461,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 },
-@@ -479,6 +482,7 @@ static struct cmd_struct commands[] = {
+@@ -476,6 +479,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
-@@ -1496,7 +1496,7 @@ static int curl_append_msgs_to_imap(stru
+@@ -1494,7 +1494,7 @@ static int curl_append_msgs_to_imap(stru
}
#endif
const char **user_argv;
--- a/upload-pack.c
+++ b/upload-pack.c
-@@ -819,7 +819,7 @@ static int upload_pack_config(const char
+@@ -820,7 +820,7 @@ static int upload_pack_config(const char
return parse_hide_refs_config(var, value, "uploadpack");
}
--- a/configure.ac
+++ b/configure.ac
-@@ -867,7 +867,8 @@ AC_RUN_IFELSE(
+@@ -860,7 +860,8 @@ AC_RUN_IFELSE(
FILE *f = fopen(".", "r");
return f && fread(&c, 1, 1, f)]])],
[ac_cv_fread_reads_directories=no],
])
if test $ac_cv_fread_reads_directories = yes; then
FREAD_READS_DIRECTORIES=UnfortunatelyYes
-@@ -901,7 +902,8 @@ AC_RUN_IFELSE(
+@@ -894,7 +895,8 @@ AC_RUN_IFELSE(
if (snprintf(buf, 3, "%s", "12345") != 5
|| strcmp(buf, "12")) return 1]])],
[ac_cv_snprintf_returns_bogus=no],
])
if test $ac_cv_snprintf_returns_bogus = yes; then
SNPRINTF_RETURNS_BOGUS=UnfortunatelyYes
-@@ -924,7 +926,8 @@ yippeeyeswehaveit
+@@ -917,7 +919,8 @@ yippeeyeswehaveit
#endif
]),
[ac_cv_sane_mode_bits=yes],
--- a/Makefile
+++ b/Makefile
-@@ -1074,7 +1074,7 @@ else
+@@ -1080,7 +1080,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"
include $(TOPDIR)/rules.mk
PKG_NAME:=gnunet
-PKG_SOURCE_VERSION:=36918
+PKG_SOURCE_VERSION:=36986
PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=2
+PKG_RELEASE:=1
# ToDo:
# - break-out {peer,name,data}store for each backend
$(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
( for bin in arm ats cadet core config ecc identity nat nat-server nse \
- peerinfo peerstore revocation scalarproduct statistics transport uri; do \
+ peerinfo revocation scalarproduct statistics transport uri; do \
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \
done )
( for lib in arm ats block cadet core datacache dht \
dns dnsparser dnsstub fragmentation friends hello identity nat nse \
- peerinfo peerstore regexblock regex revocation scalarproduct set \
+ peerinfo regexblock regex revocation scalarproduct set \
statistics transport util; do \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
done )
( for lex in daemon-hostlist daemon-topology helper-nat-client \
helper-nat-server service-arm service-ats service-cadet \
service-core service-dht service-identity service-nse \
- service-peerinfo service-peerstore service-regex \
+ service-peerinfo service-regex \
service-revocation service-scalarproduct-alice \
service-scalarproduct-bob service-scalarproduct-ecc-alice \
service-scalarproduct-ecc-bob service-set service-statistics \
done )
( for conf in arm ats cadet core datacache dht hostlist identity \
- nat nse peerinfo peerstore regex revocation scalarproduct \
+ nat nse peerinfo regex revocation scalarproduct \
set statistics topology transport util; do \
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d ; \
done )
LIBEXEC_dv:=service-dv
CONF_dv:=dv
-DEPENDS_fs:=+gnunet-datastore +libextractor
+DEPENDS_fs:=+gnunet-datastore +gnunet-peerstore +libextractor
BIN_fs:=auto-share directory download download-manager.scm fs publish unindex search
LIB_fs:=fs
PLUGIN_fs:=block_fs
LIBEXEC_datastore:=daemon-latency-logger service-datastore
CONF_datastore:=datastore
+BIN_peerstore:=peerstore
+LIB_peerstore:=peerstore
+LIBEXEC_peerstore:=service-peerstore
+CONF_peerstore:=peerstore
+
DEPENDS_flat:=+gnunet-gns
PLUGIN_flat:=namecache_flat namestore_flat
LIB_pgsql:=postgres pq
PLUGIN_pgsql:=datacache_postgres datastore_postgres namecache_postgres namestore_postgres
-DEPENDS_rest:=+gnunet-gns +jansson
+DEPENDS_rest:=+gnunet-gns +gnunet-social +jansson
LIB_rest:=rest
-PLUGIN_rest:=rest_gns rest_identity rest_namestore
+PLUGIN_rest:=rest_gns rest_identity rest_identity_provider rest_namestore
LIBEXEC_rest:=rest-server
CONF_rest:=rest
LIBEXEC_rps:=service-rps
CONF_rps:=rps
-DEPENDS_social:=+gnunet-sqlite
-BIN_social:=multicast
-LIB_social:=consensus multicast psyc psycstore psycutil secretsharing social
+DEPENDS_social:=+gnunet-sqlite +jansson
+BIN_social:=identity-token multicast
+LIB_social:=consensus identityprovider multicast psyc psycstore psycutil secretsharing social
PLUGIN_social:=psycstore_sqlite
-LIBEXEC_social:=service-consensus service-evil-consensus service-multicast service-psyc service-psycstore service-secretsharing service-social
+LIBEXEC_social:=service-consensus service-evil-consensus service-identity-provider service-multicast service-psyc service-psycstore service-secretsharing service-social
CONF_social:=consensus multicast psyc psycstore secretsharing social
-DEPENDS_sqlite:=+gnunet-gns +gnunet-datastore +libsqlite3
+DEPENDS_sqlite:=+gnunet-gns +gnunet-datastore +gnunet-peerstore +libsqlite3
PLUGIN_sqlite:=datacache_sqlite datastore_sqlite namecache_sqlite namestore_sqlite peerstore_sqlite
DEPENDS_transport-bluetooth:=+bluez-libs
$(eval $(call BuildComponent,gns,name resolution components,y))
$(eval $(call BuildComponent,mysql,mySQL datastore backend,))
$(eval $(call BuildComponent,pgsql,PostgreSQL storage backends,))
+$(eval $(call BuildComponent,peerstore,peerstore local persistency component,))
$(eval $(call BuildComponent,rest,REST interface,))
$(eval $(call BuildComponent,rps,RPS routing component,))
$(eval $(call BuildComponent,social,social components,))
include $(TOPDIR)/rules.mk
PKG_NAME:=haproxy
-PKG_VERSION:=1.5.15
-PKG_RELEASE:=13
+PKG_VERSION:=1.5.16
+PKG_RELEASE:=01
PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.5/src/
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_MD5SUM:=eeaa35744f84c92184cd735ee56dd0a3
+PKG_MD5SUM:=294fdb5aaaccba00c2070e5f4baf9f0e
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=GPL-2.0
+++ /dev/null
-From 4818bc3035bccc00d8c3fc9b14ec37366cac3059 Mon Sep 17 00:00:00 2001
-From: Jerome Duval <jerome.duval@gmail.com>
-Date: Mon, 2 Nov 2015 17:47:43 +0000
-Subject: [PATCH 01/10] BUG/BUILD: replace haproxy-systemd-wrapper with
- $(EXTRA) in install-bin.
-
-[wt: this should be backported to 1.6 and 1.5 as well since some platforms
- don't build the systemd-wrapper]
-(cherry picked from commit 796d2fc136359c31c5c35f00c0751890ab42a016)
-(cherry picked from commit 9d0b47d96825b0584ea81c826a96ed8babcc016b)
----
- Makefile | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 9556069..e3199b2 100644
---- a/Makefile
-+++ b/Makefile
-@@ -719,10 +719,9 @@ install-doc:
- install -m 644 doc/$$x.txt "$(DESTDIR)$(DOCDIR)" ; \
- done
-
--install-bin: haproxy haproxy-systemd-wrapper
-+install-bin: haproxy $(EXTRA)
- install -d "$(DESTDIR)$(SBINDIR)"
-- install haproxy "$(DESTDIR)$(SBINDIR)"
-- install haproxy-systemd-wrapper "$(DESTDIR)$(SBINDIR)"
-+ install haproxy $(EXTRA) "$(DESTDIR)$(SBINDIR)"
-
- install: install-bin install-man install-doc
-
---
-2.4.10
-
+++ /dev/null
-From 1af6a324c3206902f69bd2c9838e94ffb4cee3ae Mon Sep 17 00:00:00 2001
-From: Lukas Tribus <luky-37@hotmail.com>
-Date: Thu, 5 Nov 2015 13:59:30 +0100
-Subject: [PATCH 02/10] BUG/MINOR: acl: don't use record layer in req_ssl_ver
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The initial record layer version in a SSL handshake may be set to TLSv1.0
-or similar for compatibility reasons, this is allowed as per RFC5246
-Appendix E.1 [1]. Some implementations are Openssl [2] and NSS [3].
-
-A related issue has been fixed some time ago in commit 57d229747
-("BUG/MINOR: acl: req_ssl_sni fails with SSLv3 record version").
-
-Fix this by using the real client hello version instead of the record
-layer version.
-
-This was reported by Julien Vehent and analyzed by Cyril Bonté.
-The initial patch is from Julien Vehent as well.
-
-This should be backported to stable series, the req_ssl_ver keyword was
-first introduced in 1.3.16.
-
-[1] https://tools.ietf.org/html/rfc5246#appendix-E.1
-[2] https://github.com/openssl/openssl/commit/4a1cf50187659e60c5867ecbbc36e37b2605d2c3
-[3] https://bugzilla.mozilla.org/show_bug.cgi?id=774547
-(cherry picked from commit c93242cab986087f06a4655d14fec18eecb7f5f4)
-(cherry picked from commit b048a6eb3d9cb518e4a378e20ba2a801afec553c)
----
- src/payload.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/src/payload.c b/src/payload.c
-index f62163c..b8f1ca3 100644
---- a/src/payload.c
-+++ b/src/payload.c
-@@ -148,21 +148,24 @@ smp_fetch_req_ssl_ver(struct proxy *px, struct session *s, void *l7, unsigned in
- data = (const unsigned char *)s->req->buf->p;
- if ((*data >= 0x14 && *data <= 0x17) || (*data == 0xFF)) {
- /* SSLv3 header format */
-- if (bleft < 5)
-+ if (bleft < 11)
- goto too_short;
-
-- version = (data[1] << 16) + data[2]; /* version: major, minor */
-+ version = (data[1] << 16) + data[2]; /* record layer version: major, minor */
- msg_len = (data[3] << 8) + data[4]; /* record length */
-
- /* format introduced with SSLv3 */
- if (version < 0x00030000)
- goto not_ssl;
-
-- /* message length between 1 and 2^14 + 2048 */
-- if (msg_len < 1 || msg_len > ((1<<14) + 2048))
-+ /* message length between 6 and 2^14 + 2048 */
-+ if (msg_len < 6 || msg_len > ((1<<14) + 2048))
- goto not_ssl;
-
- bleft -= 5; data += 5;
-+
-+ /* return the client hello client version, not the record layer version */
-+ version = (data[4] << 16) + data[5]; /* client hello version: major, minor */
- } else {
- /* SSLv2 header format, only supported for hello (msg type 1) */
- int rlen, plen, cilen, silen, chlen;
---
-2.4.10
-
+++ /dev/null
-From ef8a113d59e89b2214adf7ab9f9b0b75905a7050 Mon Sep 17 00:00:00 2001
-From: lsenta <laurent.senta@gmail.com>
-Date: Fri, 13 Nov 2015 10:44:22 +0100
-Subject: [PATCH 03/10] BUG: http: do not abort keep-alive connections on
- server timeout
-
-When a server timeout is detected on the second or nth request of a keep-alive
-connection, HAProxy closes the connection without writing a response.
-Some clients would fail with a remote disconnected exception and some
-others would retry potentially unsafe requests.
-
-This patch removes the special case and makes sure a 504 timeout is
-written back whenever a server timeout is handled.
-
-Signed-off-by: lsenta <laurent.senta@gmail.com>
-(cherry picked from commit 1e1f41d0f3473d86da84dc3785b7d7cbef6e9044)
-(cherry picked from commit 1f279c0b116f7fbc208793fffbd256c3c736fc52)
----
- src/proto_http.c | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index 17742c6..e7e1785 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -5782,8 +5782,6 @@ int http_wait_for_response(struct session *s, struct channel *rep, int an_bit)
- else if (rep->flags & CF_READ_TIMEOUT) {
- if (msg->err_pos >= 0)
- http_capture_bad_message(&s->be->invalid_rep, s, msg, msg->msg_state, s->fe);
-- else if (txn->flags & TX_NOT_FIRST)
-- goto abort_keep_alive;
-
- s->be->be_counters.failed_resp++;
- if (objt_server(s->target)) {
---
-2.4.10
-
+++ /dev/null
-From c0d56134320e507c82952f3d2a03f76b701945cb Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Wed, 18 Nov 2015 11:59:55 +0100
-Subject: [PATCH 04/10] BUG/MEDIUM: http: switch the request channel to
- no-delay once done.
-
-There's an issue when sending POST data that came in a second packet,
-the CF_NEVER_WAIT flag is not always set on the request channel, while
-the server is waiting for the request. We must always set this flag in
-this case since we're not going to shut down after sending, contrary
-to the response side.
-
-Note that option http-no-delay works around this issue.
-
-Reproducer :
-
-listen px
- mode http
- timeout client 10s
- timeout server 5s
- timeout connect 3s
- option http-server-close
- #option http-no-delay
- bind :8001
- server s1 127.0.0.1:8003
-
-$ (printf "POST / HTTP/1.1\r\nTransfer-encoding: chunked\r\n\r\n"; sleep 0.01; printf "10\r\nAZERTYUIOPQSDFGH\r\n0\r\n\r\n") | nc6 0 8001
-
-Before this fix :
-
-12:03:31.946763 epoll_wait(3, {{EPOLLIN, {u32=5, u64=5}}}, 200, 1000) = 1
-12:03:32.634175 accept4(5, {sa_family=AF_INET, sin_port=htons(53849), sin_addr=inet_addr("127.0.0.1")}, [16], SOCK_NONBLOCK) = 6
-12:03:32.634318 setsockopt(6, SOL_TCP, TCP_NODELAY, [1], 4) = 0
-12:03:32.634434 accept4(5, 0x7ffccfbb2cf0, [128], SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
-12:03:32.634574 recvfrom(6, "POST / HTTP/1.1\r\nTransfer-encodi"..., 8192, 0, NULL, NULL) = 47
-12:03:32.634809 setsockopt(6, SOL_TCP, TCP_QUICKACK, [1], 4) = 0
-12:03:32.634952 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 7
-12:03:32.635031 fcntl(7, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
-12:03:32.635089 setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0
-12:03:32.635153 connect(7, {sa_family=AF_INET, sin_port=htons(8003), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
-12:03:32.635315 epoll_wait(3, {}, 200, 0) = 0
-12:03:32.635394 sendto(7, "POST / HTTP/1.1\r\nTransfer-encodi"..., 66, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 66
-12:03:32.635527 recvfrom(6, 0x7f0224e66024, 8192, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
-12:03:32.635651 epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN|0x2000, {u32=6, u64=6}}) = 0
-12:03:32.635782 epoll_wait(3, {}, 200, 0) = 0
-12:03:32.635842 recvfrom(7, 0x7f0224e66024, 8192, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
-12:03:32.635924 epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN|0x2000, {u32=7, u64=7}}) = 0
-12:03:32.636027 epoll_wait(3, {{EPOLLIN, {u32=6, u64=6}}}, 200, 1000) = 1
-12:03:32.644892 recvfrom(6, "10\r\nAZERTYUIOPQSDFGH\r\n0\r\n\r\n", 8192, 0, NULL, NULL) = 27
-12:03:32.645016 epoll_wait(3, {}, 200, 0) = 0
-12:03:32.645105 sendto(7, "10\r\nAZERTYUIOPQSDFGH\r\n0\r\n\r\n", 27, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_MORE, NULL, 0) = 27
-
-After the fix :
-
-11:59:12.538617 connect(7, {sa_family=AF_INET, sin_port=htons(8003), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in progress)
-11:59:12.538787 epoll_wait(3, {}, 200, 0) = 0
-11:59:12.538867 sendto(7, "POST / HTTP/1.1\r\nTransfer-encodi"..., 66, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 66
-11:59:12.539031 recvfrom(6, 0x7f832ce45024, 8192, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
-11:59:12.539161 epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN|0x2000, {u32=6, u64=6}}) = 0
-11:59:12.539259 epoll_wait(3, {}, 200, 0) = 0
-11:59:12.539337 recvfrom(7, 0x7f832ce45024, 8192, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
-11:59:12.539421 epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN|0x2000, {u32=7, u64=7}}) = 0
-11:59:12.539499 epoll_wait(3, {{EPOLLIN, {u32=6, u64=6}}}, 200, 1000) = 1
-11:59:12.548519 recvfrom(6, "10\r\nAZERTYUIOPQSDFGH\r\n0\r\n\r\n", 8192, 0, NULL, NULL) = 27
-11:59:12.548844 epoll_wait(3, {}, 200, 0) = 0
-11:59:12.549012 sendto(7, "10\r\nAZERTYUIOPQSDFGH\r\n0\r\n\r\n", 27, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 27
-11:59:12.549454 epoll_wait(3, {}, 200, 1000) = 0
-
-This fix must be backported to 1.6, 1.5 and 1.4.
-(cherry picked from commit 7f876a1eeb14ffae708327aad8a0b4b029da5e26)
-(cherry picked from commit 712a5339f384db62796aa4d4901e091dd7fd24dd)
----
- src/proto_http.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index e7e1785..b32e778 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -5001,6 +5001,13 @@ int http_sync_req_state(struct session *s)
- */
- chn->cons->flags |= SI_FL_NOHALF;
-
-+ /* In any case we've finished parsing the request so we must
-+ * disable Nagle when sending data because 1) we're not going
-+ * to shut this side, and 2) the server is waiting for us to
-+ * send pending data.
-+ */
-+ chn->flags |= CF_NEVER_WAIT;
-+
- if (txn->rsp.msg_state == HTTP_MSG_ERROR)
- goto wait_other_side;
-
-@@ -5015,7 +5022,6 @@ int http_sync_req_state(struct session *s)
- /* if any side switches to tunnel mode, the other one does too */
- channel_auto_read(chn);
- txn->req.msg_state = HTTP_MSG_TUNNEL;
-- chn->flags |= CF_NEVER_WAIT;
- goto wait_other_side;
- }
-
-@@ -5048,7 +5054,6 @@ int http_sync_req_state(struct session *s)
- if ((txn->flags & TX_CON_WANT_MSK) == TX_CON_WANT_TUN) {
- channel_auto_read(chn);
- txn->req.msg_state = HTTP_MSG_TUNNEL;
-- chn->flags |= CF_NEVER_WAIT;
- }
- }
-
---
-2.4.10
-
+++ /dev/null
-From e77015cdc18ab74aba61cdf57de56d06be5c2a4d Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Wed, 14 Jan 2015 11:48:58 +0100
-Subject: [PATCH 05/10] MINOR: config: extend the default max hostname length
- to 64 and beyond
-
-Some users reported that the default max hostname length of 32 is too
-short in some environments. This patch does two things :
-
- - it relies on the system's max hostname length as found in MAXHOSTNAMELEN
- if it is set. This is the most logical thing to do as the system libs
- generally present the appropriate value supported by the system. This
- value is 64 on Linux and 256 on Solaris, to give a few examples.
-
- - otherwise it defaults to 64
-
-It is still possible to override this value by defining MAX_HOSTNAME_LEN at
-build time. After some observation time, this patch may be backported to
-1.5 if it does not cause any build issue, as it is harmless and may help
-some users.
-(cherry picked from commit 75abcb3106e2c27ef983df885558cf94e01f717a)
-
-Cc: Lukas Tribus <luky-37@hotmail.com>
-Cc: jose.castro.leon@cern.ch
-
-[wt: no issue reported so far and Jose rightfully asked for it in 1.5]
----
- include/common/defaults.h | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/include/common/defaults.h b/include/common/defaults.h
-index 0075509..a191b8a 100644
---- a/include/common/defaults.h
-+++ b/include/common/defaults.h
-@@ -190,8 +190,12 @@
-
- /* Maximum host name length */
- #ifndef MAX_HOSTNAME_LEN
--#define MAX_HOSTNAME_LEN 32
--#endif
-+#if MAXHOSTNAMELEN
-+#define MAX_HOSTNAME_LEN MAXHOSTNAMELEN
-+#else
-+#define MAX_HOSTNAME_LEN 64
-+#endif // MAXHOSTNAMELEN
-+#endif // MAX_HOSTNAME_LEN
-
- /* Maximum health check description length */
- #ifndef HCHK_DESC_LEN
---
-2.4.10
-
+++ /dev/null
-From 3de8e7ab8d9125402cc1a8fb48ee475ee21d7d4c Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Wed, 25 Nov 2015 20:11:11 +0100
-Subject: [PATCH 06/10] BUG/MEDIUM: http: don't enable auto-close on the
- response side
-
-There is a bug where "option http-keep-alive" doesn't force a response
-to stay in keep-alive if the server sends the FIN along with the response
-on the second or subsequent response. The reason is that the auto-close
-was forced enabled when recycling the HTTP transaction and it's never
-disabled along the response processing chain before the SHUTR gets a
-chance to be forwarded to the client side. The MSG_DONE state of the
-HTTP response properly disables it but too late.
-
-There's no more reason for enabling auto-close here, because either it
-doesn't matter in non-keep-alive modes because the connection is closed,
-or it is automatically enabled by process_stream() when it sees there's
-no analyser on the stream.
-
-This bug also affects 1.5 so a backport is desired.
-(cherry picked from commit 714ea78c9a09fe6a35a1f2d86af8f7fc9abb64d1)
-(cherry picked from commit a15091be17f27fcf4e3a84338df1a8b732e396a1)
----
- src/proto_http.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index b32e778..5facfbb 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -4946,11 +4946,13 @@ void http_end_txn_clean_session(struct session *s)
- s->rep->flags |= CF_EXPECT_MORE;
- }
-
-- /* we're removing the analysers, we MUST re-enable events detection */
-+ /* we're removing the analysers, we MUST re-enable events detection.
-+ * We don't enable close on the response channel since it's either
-+ * already closed, or in keep-alive with an idle connection handler.
-+ */
- channel_auto_read(s->req);
- channel_auto_close(s->req);
- channel_auto_read(s->rep);
-- channel_auto_close(s->rep);
-
- /* we're in keep-alive with an idle connection, monitor it */
- si_idle_conn(s->req->cons);
---
-2.4.10
-
+++ /dev/null
-From 9154bc92ed11c6de75573dec341b6a0ce68bd0eb Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Wed, 25 Nov 2015 20:17:27 +0100
-Subject: [PATCH 07/10] BUG/MEDIUM: stream: fix half-closed timeout handling
-
-client-fin and server-fin are bogus. They are applied on the write
-side after a SHUTR was seen. The immediate effect is that sometimes
-if a SHUTR was seen after a SHUTW on the same side, the timeout is
-enabled again regardless of the fact that the output is already
-closed. This results in the timeout event not to be processed and
-a busy poll loop to happen until another timeout on the stream gets
-rid of it. Note that haproxy continues its job during this, it's just
-that it eats all the CPU trying to handle an event that it ignores.
-
-An reproducible case consists in having a client stop reading data from
-a server to ensure data remain in the response buffer, then the client
-sends a shutdown(write). If abortonclose is enabled on haproxy, the
-shutdown is passed to the server side and the server responds with a
-SHUTR that cannot immediately be forwarded to the client since the
-buffer is full. During this time the event is ignored and the task is
-woken again in loops.
-
-It is worth noting that the timeout handling since 1.5 is a bit fragile
-and that it might be possible that other similar conditions still exist,
-so the timeout handling should be audited regarding this issue.
-
-Many thanks to BaiYang for providing detailed information showing the
-problem in action.
-
-This bug also affects 1.5 thus the fix must be backported.
-(cherry picked from commit f25b3573d65fd2411c7537b7b0a4817b478df909)
-[Note for 1.5, it's in session.c here]
-(cherry picked from commit 44e86286159474a52dc74f80d3271504cc6f1550)
----
- src/session.c | 16 ----------------
- 1 file changed, 16 deletions(-)
-
-diff --git a/src/session.c b/src/session.c
-index 7520a85..2b2ad78 100644
---- a/src/session.c
-+++ b/src/session.c
-@@ -2213,10 +2213,6 @@ struct task *process_session(struct task *t)
- if (unlikely((s->req->flags & (CF_SHUTW|CF_SHUTW_NOW|CF_AUTO_CLOSE|CF_SHUTR)) ==
- (CF_AUTO_CLOSE|CF_SHUTR))) {
- channel_shutw_now(s->req);
-- if (tick_isset(s->fe->timeout.clientfin)) {
-- s->rep->wto = s->fe->timeout.clientfin;
-- s->rep->wex = tick_add(now_ms, s->rep->wto);
-- }
- }
-
- /* shutdown(write) pending */
-@@ -2241,10 +2237,6 @@ struct task *process_session(struct task *t)
- if (s->req->prod->flags & SI_FL_NOHALF)
- s->req->prod->flags |= SI_FL_NOLINGER;
- si_shutr(s->req->prod);
-- if (tick_isset(s->fe->timeout.clientfin)) {
-- s->rep->wto = s->fe->timeout.clientfin;
-- s->rep->wex = tick_add(now_ms, s->rep->wto);
-- }
- }
-
- /* it's possible that an upper layer has requested a connection setup or abort.
-@@ -2391,10 +2383,6 @@ struct task *process_session(struct task *t)
- if (unlikely((s->rep->flags & (CF_SHUTW|CF_SHUTW_NOW|CF_AUTO_CLOSE|CF_SHUTR)) ==
- (CF_AUTO_CLOSE|CF_SHUTR))) {
- channel_shutw_now(s->rep);
-- if (tick_isset(s->be->timeout.serverfin)) {
-- s->req->wto = s->be->timeout.serverfin;
-- s->req->wex = tick_add(now_ms, s->req->wto);
-- }
- }
-
- /* shutdown(write) pending */
-@@ -2417,10 +2405,6 @@ struct task *process_session(struct task *t)
- if (s->rep->prod->flags & SI_FL_NOHALF)
- s->rep->prod->flags |= SI_FL_NOLINGER;
- si_shutr(s->rep->prod);
-- if (tick_isset(s->be->timeout.serverfin)) {
-- s->req->wto = s->be->timeout.serverfin;
-- s->req->wex = tick_add(now_ms, s->req->wto);
-- }
- }
-
- if (s->req->prod->state == SI_ST_DIS || s->req->cons->state == SI_ST_DIS)
---
-2.4.10
-
+++ /dev/null
-From 07ccb48add8c8cb0dd8a0f7d3f4994866d0ef32e Mon Sep 17 00:00:00 2001
-From: Willy Tarreau <w@1wt.eu>
-Date: Thu, 26 Nov 2015 18:32:39 +0100
-Subject: [PATCH 08/10] BUG/MEDIUM: cli: changing compression rate-limiting
- must require admin level
-
-Right now it's possible to change the global compression rate limiting
-without the CLI being at the admin level.
-
-This fix must be backported to 1.6 and 1.5.
-(cherry picked from commit a1c2b2c4f3e65d198a0a4b25a4f655f7b307a855)
-(cherry picked from commit 9e5f1489c9f2d6926729890f249f7ebb9d3bfd43)
----
- src/dumpstats.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/dumpstats.c b/src/dumpstats.c
-index b4be2cd..b1bbf31 100644
---- a/src/dumpstats.c
-+++ b/src/dumpstats.c
-@@ -1695,6 +1695,12 @@ static int stats_sock_parse_request(struct stream_interface *si, char *line)
- if (strcmp(args[3], "global") == 0) {
- int v;
-
-+ if (s->listener->bind_conf->level < ACCESS_LVL_ADMIN) {
-+ appctx->ctx.cli.msg = stats_permission_denied_msg;
-+ appctx->st0 = STAT_CLI_PRINT;
-+ return 1;
-+ }
-+
- if (!*args[4]) {
- appctx->ctx.cli.msg = "Expects a maximum input byte rate in kB/s.\n";
- appctx->st0 = STAT_CLI_PRINT;
---
-2.4.10
-
+++ /dev/null
-From 97ef6f99b8426ffdc97864fc8bb2d85c87cfdad0 Mon Sep 17 00:00:00 2001
-From: Thierry FOURNIER <tfournier@arpalert.org>
-Date: Tue, 3 Nov 2015 19:17:37 +0100
-Subject: [PATCH 09/10] BUILD: freebsd: double declaration
-
-On freebsd, the macro LIST_PREV already exists in the header file
-<sys/queue.h>, and this makes a build error.
-
-This patch removes the macros before declaring it. This ensure
-that the error doesn't occurs.
-(cherry picked from commit 1db96672c4cd264ebca8197bec93a5ce1b23aaa9)
-(cherry picked from commit 6cf9c6b270e57f05abf72cd61f4facb5b6980d57)
----
- include/common/mini-clist.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/include/common/mini-clist.h b/include/common/mini-clist.h
-index 3c3f001..404b6fa 100644
---- a/include/common/mini-clist.h
-+++ b/include/common/mini-clist.h
-@@ -144,6 +144,7 @@ struct cond_wordlist {
- * which contains list head <lh>, which is known as element <el> in
- * struct pt.
- */
-+#undef LIST_PREV
- #define LIST_PREV(lh, pt, el) (LIST_ELEM((lh)->p, pt, el))
-
- /*
---
-2.4.10
-
+++ /dev/null
-From 0f836e1361933721c5689c7943143fd6cd260148 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Cyril=20Bont=C3=A9?= <cyril.bonte@free.fr>
-Date: Thu, 26 Nov 2015 21:39:56 +0100
-Subject: [PATCH 10/10] BUG/MEDIUM: sample: urlp can't match an empty value
-
-Currently urlp fetching samples were able to find parameters with an empty
-value, but the return code depended on the value length. The final result was
-that acls using urlp couldn't match empty values.
-
-Example of acl which always returned "false":
- acl MATCH_EMPTY urlp(foo) -m len 0
-
-The fix consists in unconditionally return 1 when the parameter is found.
-
-This fix must be backported to 1.6 and 1.5.
-(cherry picked from commit ce1ef4df0135f9dc1cb6691395eacb487015fe3e)
-(cherry picked from commit 6bd426cf35c95985712369ed528c10a5f80ad8fd)
-[ note: in 1.5 we have value+value_l instead of vstart+vend ]
----
- src/proto_http.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/src/proto_http.c b/src/proto_http.c
-index 5facfbb..3af7880 100644
---- a/src/proto_http.c
-+++ b/src/proto_http.c
-@@ -11050,9 +11050,11 @@ find_url_param_pos(char* query_string, size_t query_string_l,
- }
-
- /*
-- * Given a url parameter name, returns its value and size into *value and
-- * *value_l respectively, and returns non-zero. If the parameter is not found,
-- * zero is returned and value/value_l are not touched.
-+ * Given a url parameter name and a query string, find the next value.
-+ * An empty url_param_name matches the first available parameter.
-+ * If the parameter is found, 1 is returned and *value / *value_l are updated
-+ * to respectively provide a pointer to the value and its length.
-+ * Otherwise, 0 is returned and value/value_l are not modified.
- */
- static int
- find_url_param_value(char* path, size_t path_l,
-@@ -11082,7 +11084,7 @@ find_url_param_value(char* path, size_t path_l,
-
- *value = value_start;
- *value_l = value_end - value_start;
-- return value_end != value_start;
-+ return 1;
- }
-
- static int
---
-2.4.10
-
+++ /dev/null
-From 96a1b4a969a5f3c9224d786c79e90d15a47094b0 Mon Sep 17 00:00:00 2001
-From: Emeric Brun <ebrun@haproxy.com>
-Date: Wed, 16 Dec 2015 15:16:46 +0100
-Subject: [PATCH 11/13] BUG/MEDIUM: peers: table entries learned from a remote
- are pushed to others after a random delay.
-
-New sticktable entries learned from a remote peer can be pushed to others after
-a random delay because they are not inserted at the right position in the updates
-tree.
-(cherry picked from commit 234fc3c31e751f8191b9b78fa5fd16663c2627fe)
-(cherry picked from commit 8b1a697362977b8392caca3efaf97a5a8a8c782b)
----
- src/peers.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/peers.c b/src/peers.c
-index 0564d3d..92b4df0 100644
---- a/src/peers.c
-+++ b/src/peers.c
-@@ -720,7 +720,7 @@ switchstate:
- ts = stktable_store(ps->table->table, newts, 0);
- newts = NULL; /* don't reuse it */
-
-- ts->upd.key= (++ps->table->table->update)+(2^31);
-+ ts->upd.key= (++ps->table->table->update)+(2147483648U);
- eb = eb32_insert(&ps->table->table->updates, &ts->upd);
- if (eb != &ts->upd) {
- eb32_delete(eb);
---
-2.4.10
-
+++ /dev/null
-From a320fd146f802a851a396b2cde491711a4fb87cf Mon Sep 17 00:00:00 2001
-From: Emeric Brun <ebrun@haproxy.com>
-Date: Wed, 16 Dec 2015 15:28:12 +0100
-Subject: [PATCH 12/13] BUG/MEDIUM: peers: old stick table updates could be
- repushed.
-
-Because the stick table updates tree was not properly initialized to EB_ROOT_UNIQUE.
-(cherry picked from commit 1c6235dbba0a67bad1d5e57ada88f28e1270a5cb)
-(cherry picked from commit 6e80935a77c8c2c67a982780a0f14c241f02f2aa)
----
- src/stick_table.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/stick_table.c b/src/stick_table.c
-index 48d5710..6310690 100644
---- a/src/stick_table.c
-+++ b/src/stick_table.c
-@@ -385,6 +385,7 @@ int stktable_init(struct stktable *t)
- if (t->size) {
- memset(&t->keys, 0, sizeof(t->keys));
- memset(&t->exps, 0, sizeof(t->exps));
-+ t->updates = EB_ROOT_UNIQUE;
-
- t->pool = create_pool("sticktables", sizeof(struct stksess) + t->data_size + t->key_size, MEM_F_SHARED);
-
---
-2.4.10
-
+++ /dev/null
-From 21fab69d332bfafd0a214ee29d8ad0779a055988 Mon Sep 17 00:00:00 2001
-From: David Carlier <devnexen@gmail.com>
-Date: Tue, 8 Dec 2015 21:43:09 +0000
-Subject: [PATCH 13/13] CLEANUP: haproxy: using _GNU_SOURCE instead of
- __USE_GNU macro.
-
-In order to properly enable sched_setaffinity, in some versions of Linux,
-it is rather _GNU_SOURCE than __USE_GNU (spotted on Alpine Linux for instance),
-also for the sake of consistency as __USE_GNU seems not used across the code and
-for last, it seems on Linux it is the best way to enable non portable code.
-On Linux glibc's based versions, it seems _GNU_SOURCE defines __USE_GNU
-it should be safe enough.
-(cherry picked from commit 7ece096767d329d0ea04b70a1fb2c8b8a96b47e0)
-(cherry picked from commit 5a0ac35503f88a7bc8ee2c4f865354fa6cc25901)
----
- src/haproxy.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/src/haproxy.c b/src/haproxy.c
-index b94252d..20480a1 100644
---- a/src/haproxy.c
-+++ b/src/haproxy.c
-@@ -25,6 +25,7 @@
- *
- */
-
-+#define _GNU_SOURCE
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
-@@ -47,9 +48,7 @@
- #include <syslog.h>
- #include <grp.h>
- #ifdef USE_CPU_AFFINITY
--#define __USE_GNU
- #include <sched.h>
--#undef __USE_GNU
- #endif
-
- #ifdef DEBUG_FULL
---
-2.4.10
-
--- /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:=isc-dhcp
+UPSTREAM_NAME:=dhcp
+PKG_VERSION:=4.3.3
+PKG_RELEASE:=1
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=LICENSE
+PKG_MAINTAINER:=Antony Antony <antony@phenome.org>
+
+PKG_SOURCE:=$(UPSTREAM_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=ftp://ftp.isc.org/isc/dhcp/$(PKG_VERSION)
+PKG_MD5SUM:=c5577b09c9017cdd319a11ff6364268e
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(UPSTREAM_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/isc-dhcp/Default
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=IP Addresses and Names
+ TITLE:=ISC's DHCP
+ URL:=https://www.isc.org/software/dhcp
+endef
+
+define Package/isc-dhcp-relay-ipv4
+ $(call Package/isc-dhcp/Default)
+ TITLE+= relay (without IPv6)
+ VARIANT:=ipv4
+endef
+
+define Package/isc-dhcp-relay-ipv6
+ $(call Package/isc-dhcp/Default)
+ TITLE+= relay (with IPv6)
+ VARIANT:=ipv6
+endef
+
+define Package/isc-dhcp-relay/description
+ provides a means for relaying DHCP and BOOTP requests from a subnet to which
+ no DHCP server is directly connected to one or more DHCP servers on other
+ subnets.
+endef
+
+define Package/isc-dhcp-relay-ipv4/description
+$(call Package/isc-dhcp-relay-ipv6/description)
+ This package is compiled with IPv4 support only.
+endef
+
+define Package/isc-dhcp-relay-ipv4/conffiles
+/etc/config/dhcrelay
+endef
+
+define Package/isc-dhcp-relay-ipv6/description
+$(call Package/isc-dhcp-relay/description)
+ This package is compiled with IPv4 and IPv6 support.
+endef
+
+define Package/isc-dhcp-relay-ipv6/conffiles
+/etc/config/dhcrelay
+endef
+
+define Package/isc-dhcp-client-ipv4
+ $(call Package/isc-dhcp/Default)
+ TITLE+= client (without IPv6)
+ VARIANT:=ipv4
+endef
+
+define Package/isc-dhcp-client-ipv6
+ $(call Package/isc-dhcp/Default)
+ TITLE+= client (with IPv6)
+ VARIANT:=ipv6
+endef
+
+define Package/isc-dhcp-client/description
+ provides a means for configuring one or more network interfaces using the
+ Dynamic Host Configuration Protocol, BOOTP protocol, or if these protocols
+ fail, by statically assigning an address.
+endef
+
+define Package/isc-dhcp-client-ipv4/description
+$(call Package/isc-dhcp-client/description)
+ This package is compiled with IPv4 support only.
+endef
+
+define Package/isc-dhcp-client-ipv6/description
+$(call Package/isc-dhcp-client/description)
+ This package is compiled with IPv4 and IPv6 support.
+endef
+
+define Package/isc-dhcp-server-ipv4
+ $(call Package/isc-dhcp/Default)
+ TITLE+= server (without IPv6)
+ VARIANT:=ipv4
+endef
+
+define Package/isc-dhcp-server-ipv6
+ $(call Package/isc-dhcp/Default)
+ TITLE+= server (with IPv6)
+ VARIANT:=ipv6
+endef
+
+define Package/isc-dhcp-server/description
+ implements the Dynamic Host Configuration Protocol (DHCP) and the Internet
+ Bootstrap Protocol (BOOTP).
+endef
+
+define Package/isc-dhcp-server-ipv4/description
+$(call Package/isc-dhcp-server/description)
+ This package is compiled with IPv4 support only.
+endef
+
+define Package/isc-dhcp-server-ipv6/description
+$(call Package/isc-dhcp-server/description)
+ This package is compiled with IPv4 and IPv6 support.
+endef
+
+define Package/isc-dhcp-omshell-ipv4
+ $(call Package/isc-dhcp/Default)
+ DEPENDS:= +isc-dhcp-server-ipv4
+ TITLE+= omshell (without IPv6)
+ VARIANT:=ipv4
+endef
+
+define Package/isc-dhcp-omshell-ipv6
+ $(call Package/isc-dhcp/Default)
+ DEPENDS:= +isc-dhcp-server-ipv6
+ TITLE+= omshell (with IPv6)
+ VARIANT:=ipv6
+endef
+
+define Package/isc-dhcp-omshell/description
+ provides an interactive way to connect to, query, and possibly change, the ISC
+ DHCP Server's state via OMAPI, the Object Management API.
+endef
+
+define Package/isc-dhcp-omshell-ipv4/description
+$(call Package/isc-dhcp-omshell/description)
+ This package is compiled with IPv4 support only.
+endef
+
+define Package/isc-dhcp-omshell-ipv6/description
+$(call Package/isc-dhcp-omshell/description)
+ This package is compiled with IPv4 and IPv6 support.
+endef
+
+CONFIGURE_ARGS += \
+ --disable-tracing \
+ --enable-paranoia \
+ --disable-dependency-tracking \
+ --with-randomdev=/dev/urandom \
+ ac_cv_file__dev_random=yes
+
+ifeq ($(BUILD_VARIANT),ipv4)
+ CONFIGURE_ARGS += --disable-dhcpv6
+endif
+ifeq ($(BUILD_VARIANT),ipv6)
+ CONFIGURE_ARGS += --enable-dhcpv6
+endif
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ BUILD_CC="$(HOSTCC_NOCACHE)" \
+ CROSS_CC="$(TARGET_CC)" \
+ host_alias="$(GNU_TARGET_NAME)" \
+ target_alias="$(GNU_TARGET_NAME)" \
+ build_alias="$(GNU_HOST_NAME)" \
+ all install-exec
+endef
+
+define Package/isc-dhcp-relay-$(BUILD_VARIANT)/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcrelay $(1)/usr/sbin
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_DATA) ./files/etc/config/dhcrelay $(1)/etc/config
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/dhcrelay4.init $(1)/etc/init.d/dhcrelay4
+endef
+
+define Package/isc-dhcp-server-$(BUILD_VARIANT)/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhcpd $(1)/usr/sbin
+ $(INSTALL_BIN) ./files/dhcpd.init $(1)/etc/init.d/dhcpd
+ $(INSTALL_BIN) ./files/dhcpd.conf $(1)/etc
+ifeq ($(BUILD_VARIANT),ipv6)
+ $(INSTALL_BIN) ./files/dhcpd6.init $(1)/etc/init.d/dhcpd6
+ $(INSTALL_BIN) ./files/dhcpd6.conf $(1)/etc
+endif
+endef
+
+define Package/isc-dhcp-server-ipv4/conffiles
+/etc/dhcpd.conf
+endef
+
+define Package/isc-dhcp-server-ipv6/conffiles
+/etc/dhcpd6.conf
+endef
+
+define Package/isc-dhcp-client-$(BUILD_VARIANT)/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dhclient $(1)/usr/sbin
+ $(INSTALL_BIN) ./files/dhclient-script $(1)/usr/sbin/
+ifeq ($(BUILD_VARIANT),ipv6)
+ $(INSTALL_BIN) ./files/dhclient6.conf $(1)/etc
+endif
+endef
+
+define Package/isc-dhcp-client-ipv4/conffiles
+/etc/dhclient.conf
+endef
+
+define Package/isc-dhcp-client-ipv6/conffiles
+/etc/dhclient6.conf
+endef
+
+define Package/isc-dhcp-omshell-$(BUILD_VARIANT)/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/omshell $(1)/usr/bin
+endef
+
+$(eval $(call BuildPackage,isc-dhcp-relay-ipv4))
+$(eval $(call BuildPackage,isc-dhcp-server-ipv4))
+$(eval $(call BuildPackage,isc-dhcp-client-ipv4))
+$(eval $(call BuildPackage,isc-dhcp-omshell-ipv4))
+$(eval $(call BuildPackage,isc-dhcp-relay-ipv6))
+$(eval $(call BuildPackage,isc-dhcp-server-ipv6))
+$(eval $(call BuildPackage,isc-dhcp-client-ipv6))
+$(eval $(call BuildPackage,isc-dhcp-omshell-ipv6))
--- /dev/null
+#!/bin/sh
+
+make_resolv_conf() {
+ if [ x"$new_domain_name_servers" != x ]; then
+ cat /dev/null > /etc/resolv.conf.dhclient
+ chmod 644 /etc/resolv.conf.dhclient
+ if [ x"$new_domain_search" != x ]; then
+ echo search $new_domain_search >> /etc/resolv.conf.dhclient
+ elif [ x"$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+ echo search $new_domain_name >> /etc/resolv.conf.dhclient
+ fi
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>/etc/resolv.conf.dhclient
+ done
+
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+ cat /dev/null > /etc/resolv.conf.dhclient6
+ chmod 644 /etc/resolv.conf.dhclient6
+
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+ echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
+ fi
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
+ done
+ fi
+
+ # if both v4 and v6 clients are running, concatenate results
+ cat /etc/resolv.conf.* > /etc/resolv.conf
+}
+
+# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+exit_with_hooks() {
+ exit_status=$1
+ if [ -f /etc/dhclient-exit-hooks ]; then
+ . /etc/dhclient-exit-hooks
+ fi
+# probably should do something with exit status of the local script
+ exit $exit_status
+}
+
+# Invoke the local dhcp client enter hooks, if they exist.
+if [ -f /etc/dhclient-enter-hooks ]; then
+ exit_status=0
+ . /etc/dhclient-enter-hooks
+ # allow the local script to abort processing of this state
+ # local script must set exit_status variable to nonzero.
+ if [ $exit_status -ne 0 ]; then
+ exit $exit_status
+ fi
+fi
+
+###
+### DHCPv4 Handlers
+###
+
+if [ x$new_broadcast_address != x ]; then
+ new_broadcast_arg="broadcast $new_broadcast_address"
+fi
+if [ x$new_subnet_mask != x ]; then
+ new_subnet_arg="netmask $new_subnet_mask"
+fi
+if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+fi
+
+if [ x$reason = xMEDIUM ]; then
+ # Linux doesn't do mediums (ok, ok, media).
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xPREINIT ]; then
+ if [ x$alias_ip_address != x ]; then
+ # Bring down alias interface. Its routes will disappear too.
+ ifconfig $interface:0- 0.0.0.0
+ fi
+ ifconfig $interface 0.0.0.0 up
+
+ # We need to give the kernel some time to get the interface up.
+ sleep 1
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xARPCHECK ] || [ x$reason = xARPSEND ]; then
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
+ [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
+ current_hostname=`hostname`
+ if [ x$current_hostname = x ] || \
+ [ x$current_hostname = x$old_host_name ]; then
+ if [ x$current_hostname = x ] || \
+ [ x$new_host_name != x$old_host_name ]; then
+ hostname $new_host_name
+ fi
+ fi
+
+ if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
+ [ x$alias_ip_address != x$old_ip_address ]; then
+ # Possible new alias. Remove old alias.
+ ifconfig $interface:0- 0.0.0.0
+ fi
+ if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
+ # IP address changed. Bringing down the interface will delete all routes,
+ # and clear the ARP cache.
+ ifconfig $interface 0.0.0.0 down
+
+ fi
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+
+ ifconfig $interface $new_ip_address $new_subnet_arg \
+ $new_broadcast_arg
+ for router in $new_routers; do
+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+ route add -host $router dev $interface
+ fi
+ route add default gw $router
+ done
+ fi
+ if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
+ then
+ ifconfig $interface:0- 0.0.0.0
+ ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
+ route add -host $alias_ip_address $interface:0
+ fi
+ make_resolv_conf
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
+ || [ x$reason = xSTOP ]; then
+ if [ x$alias_ip_address != x ]; then
+ # Turn off alias interface.
+ ifconfig $interface:0- 0.0.0.0
+ fi
+ if [ x$old_ip_address != x ]; then
+ # Shut down interface, which will delete routes and clear arp cache.
+ ifconfig $interface 0.0.0.0 down
+ fi
+ if [ x$alias_ip_address != x ]; then
+ ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
+ route add -host $alias_ip_address $interface:0
+ fi
+
+ # remove v4 dns configuration for this interface
+ rm /etc/resolv.conf.dhclient
+ cat /etc/resolv.conf.* > /etc/resolv.conf
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xTIMEOUT ]; then
+ if [ x$alias_ip_address != x ]; then
+ ifconfig $interface:0- 0.0.0.0
+ fi
+ ifconfig $interface $new_ip_address $new_subnet_arg \
+ $new_broadcast_arg
+ set $new_routers
+ if ping -q -c 1 $1; then
+ if [ x$new_ip_address != x$alias_ip_address ] && \
+ [ x$alias_ip_address != x ]; then
+ ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
+ route add -host $alias_ip_address dev $interface:0
+ fi
+ for router in $new_routers; do
+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+ route add -host $router dev $interface
+ fi
+ route add default gw $router
+ done
+ make_resolv_conf
+ exit_with_hooks 0
+ fi
+ ifconfig $interface 0.0.0.0 down
+ exit_with_hooks 1
+fi
+
+###
+### DHCPv6 Handlers
+###
+
+if [ x$reason = xPREINIT6 ]; then
+ # Ensure interface is up.
+ ifconfig ${interface} up
+
+ # Remove any stale addresses from aborted clients.
+ ip -f inet6 addr flush dev ${interface} scope global
+
+ exit_with_hooks 0
+fi
+
+if [ x${old_ip6_prefix} != x ] || [ x${new_ip6_prefix} != x ] ; then
+ echo Prefix ${reason} old=${old_ip6_prefix} new=${new_ip6_prefix}
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xBOUND6 ]; then
+ if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
+ exit_with_hooks 2;
+ fi
+
+ ifconfig ${interface} add ${new_ip6_address}/${new_ip6_prefixlen}
+
+ # Check for nameserver options.
+ make_resolv_conf
+
+### <<
+ # Set up softwire tunnel
+ if [ x${new_dhcp6_softwire} != x ] ; then
+ /etc/init.d/dhclient stop
+ ifconfig ${interface} 0.0.0.0
+ ip -6 tunnel add tun0 mode ipip6 \
+ remote ${new_dhcp6_softwire} \
+ local ${new_ip6_address} \
+ dev ${interface} encaplimit none
+ ip link set tun0 up
+ ip route add default dev tun0
+ fi
+### >>
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xRENEW6 ] || [ x$reason = xREBIND6 ]; then
+ if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
+ exit_with_hooks 2;
+ fi
+
+ ifconfig ${interface} add ${new_ip6_address}/${new_ip6_prefixlen}
+
+ # Make sure nothing has moved around on us.
+
+ # Nameservers/domains/etc.
+ if [ "x${new_dhcp6_name_servers}" != "x${old_dhcp6_name_servers}" ] ||
+ [ "x${new_dhcp6_domain_search}" != "x${old_dhcp6_domain_search}" ] ; then
+ make_resolv_conf
+ fi
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xDEPREF6 ]; then
+ if [ x${new_ip6_address} = x ] ; then
+ exit_with_hooks 2;
+ fi
+
+ # Busybox ifconfig has no way to communicate this to the kernel, so ignore it
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xEXPIRE6 -o x$reason = xRELEASE6 -o x$reason = xSTOP6 ]; then
+ if [ x${old_ip6_address} = x ] || [ x${old_ip6_prefixlen} = x ] ; then
+ exit_with_hooks 2;
+ fi
+
+ ifconfig ${interface} del ${old_ip6_address}/${old_ip6_prefixlen}
+
+ # remove v6 dns configuration for this interface
+ rm /etc/resolv.conf.dhclient6
+ cat /etc/resolv.conf.* > /etc/resolv.conf
+
+### <<
+ # Tear down softwire tunnel
+ if [ x${old_dhcp6_softwire} != x ] ; then
+ ip link set tun0 down
+ ip tunnel del tun0
+ fi
+### >>
+
+ exit_with_hooks 0
+fi
+
+exit_with_hooks 0
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=60
+
+lease_file=/var/dhclient.leases
+config_file=/etc/dhclient.conf
+pid_file=/var/run/dhclient.pid
+script_file=/usr/sbin/dhclient-script
+
+start() {
+ /usr/sbin/dhclient -q -nw -cf $config_file -lf $lease_file -pf $pid_file -sf $script_file `/sbin/uci get network.wan.ifname`
+
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+}
+
+stop() {
+ if [ ! -e $pid_file ]; then
+ return 1
+ fi
+
+ kill -9 `cat $pid_file`
+
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+
+ rm $pid_file
+}
--- /dev/null
+option dhcp6.softwire code 54 = ip6-address;
+also request dhcp6.softwire;
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=60
+
+lease_file=/var/dhclient6.leases
+config_file=/etc/dhclient6.conf
+pid_file=/var/run/dhclient6.pid
+script_file=/usr/sbin/dhclient-script
+
+start() {
+ /usr/sbin/dhclient -q -nw -6 -cf $config_file -lf $lease_file -pf $pid_file -sf $script_file `/sbin/uci get network.wan.ifname`
+
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+}
+
+stop() {
+ if [ ! -e $pid_file ]; then
+ return 1
+ fi
+
+ kill -9 `cat $pid_file`
+
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+
+ rm $pid_file
+}
--- /dev/null
+# dhcpd.conf
+
+authoritative;
+
+default-lease-time 3600;
+max-lease-time 86400;
+
+option domain-name-servers 192.168.1.1;
+
+subnet 192.168.1.0 netmask 255.255.255.0 {
+ range 192.168.1.10 192.168.1.50;
+ option routers 192.168.1.1;
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=65
+
+lease_file=/tmp/dhcpd.leases
+config_file=/etc/dhcpd.conf
+pid_file=/var/run/dhcpd.pid
+
+start() {
+ if [ ! -e $lease_file ]; then
+ touch $lease_file
+ fi
+
+ /usr/sbin/dhcpd -q -cf $config_file -lf $lease_file -pf $pid_file $dhcp_ifs
+
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+}
+
+stop() {
+ if [ ! -e $pid_file ]; then
+ return 1
+ fi
+
+ kill -9 `cat $pid_file`
+
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+
+ rm $pid_file
+}
--- /dev/null
+# dhcpd6.conf
+
+authoritative;
+
+default-lease-time 3600;
+max-lease-time 86400;
+
+# Enable RFC 5007 support
+#allow leasequery;
+
+# Global definitions for name server address(es) and domain search list
+#option dhcp6.name-servers 3ffe:501:ffff:100:200:ff:fe00:3f3e;
+#option dhcp6.domain-search "test.example.com","example.com";
+
+# Set preference to 255 (maximum) in order to avoid waiting for
+# additional servers when there is only one
+#option dhcp6.preference 255;
+
+# Server side command to enable rapid-commit (2 packet exchange)
+#option dhcp6.rapid-commit;
+
+# The delay before information-request refresh
+# (minimum is 10 minutes, maximum one day, default is to not refresh)
+# (set to 6 hours)
+#option dhcp6.info-refresh-time 3600;
+
+subnet6 3ffe:501:ffff:101::/64 {
+ # Use the whole /64 prefix for clients
+ range6 3ffe:501:ffff:101:: /64;
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+START=65
+
+lease_file=/var/dhcpd6.leases
+config_file=/etc/dhcpd6.conf
+pid_file=/var/run/dhcpd6.pid
+
+start() {
+ if [ ! -e $lease_file ]; then
+ touch $lease_file
+ fi
+
+ /usr/sbin/dhcpd -q -6 -cf $config_file -lf $lease_file -pf $pid_file $dhcp_ifs
+
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+}
+
+stop() {
+ if [ ! -e $pid_file ]; then
+ return 1
+ fi
+
+ kill -9 `cat $pid_file`
+
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+
+ rm $pid_file
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2012 OpenWrt.org
+
+START=91
+
+SERVICE_SIG="KILL"
+SERVICE_PID_FILE="/var/run/dhcrelay4.pid"
+SERVICE_USE_PID=1
+
+start() {
+ . /lib/functions/network.sh
+ config_load dhcrelay
+ local args=""
+
+ local enabled
+ config_get_bool enabled ipv4 enabled 0
+ [ "$enabled" -eq 0 ] && return 0
+
+ # listen interfaces
+ local interfaces
+ local ifname
+ config_get interfaces ipv4 interfaces
+ for net in $interfaces; do
+ if network_get_device ifname "$net"; then
+ append args "-i $ifname"
+ fi
+ done
+
+ # link selection sub-option (RFC3527)
+ local link_selection
+ config_get link_selection ipv4 link_selection
+ if network_get_device ifname "$link_selection"; then
+ append args "-l $ifname"
+ fi
+
+ # relay mode
+ local relay_mode
+ config_get relay_mode ipv4 relay_mode
+ [ -n "$relay_mode" ] && append args "-m $relay_mode"
+
+ # dhcp server address
+ local server
+ config_get server ipv4 dhcpserver
+ [ -n "$server" ] || return 0
+ append args "$server"
+
+ service_start /usr/sbin/dhcrelay -4 -q \
+ -pf $SERVICE_PID_FILE $args
+}
+
+stop() {
+ service_stop /usr/sbin/dhcrelay
+}
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2012 OpenWrt.org
+
+START=91
+
+SERVICE_SIG="KILL"
+SERVICE_PID_FILE="/var/run/dhcrelay6.pid"
+SERVICE_USE_PID=1
+
+start() {
+ local relay_dhcpserver
+ local relay_upper
+ local relay_lowers
+ local relay_lower_args
+
+ config_load dhcrelay
+ config_get relay_dhcpserver ipv6 dhcpserver
+ config_get relay_upper ipv6 upper
+ config_get relay_lowers ipv6 lower
+
+ # If a specific DHCP server is specified,
+ # add it to the upper interface.
+ if [ -n "$relay_dhcpserver" ]; then
+ relay_upper="${relay_dhcpserver}%$relay_upper"
+ fi
+
+ # Add all lower interfaces at the end.
+ if [ -n "$relay_lowers" ]; then
+ local relay_lower
+ for relay_lower in $relay_lowers; do
+ append relay_lower_args "-l $relay_lower"
+ done
+ fi
+
+ service_start /usr/sbin/dhcrelay -6 -q \
+ -pf $SERVICE_PID_FILE \
+ -u $relay_upper $relay_lower_args
+}
+
+stop() {
+ service_stop /usr/sbin/dhcrelay
+}
--- /dev/null
+
+config dhcrelay ipv4
+ option 'enabled' '0'
+
+ # IP address of the server
+ option 'dhcpserver' '192.0.2.10'
+
+ # network interfaces to listen on (e.g. lan or wan)
+ option 'interfaces' ''
+
+ # What to do about packets that already have a relay option:
+ # 'append': Forward and append our own relay option
+ # 'replace': Forward, but replace theirs with ours (default)
+ # 'forward': Forward without changes
+ # 'discard': Don't forward
+ option 'relay_mode' ''
+
+ # enable RFC3527 link selection sub-option and use the IP address of
+ # the specified network interface as "uplink" IP address (e.g. wan)
+ option 'link_selection' ''
+
+config dhcrelay ipv6
+# option dhcpserver '2001:db8:1::1'
+ option upper 'eth1'
+ list lower 'eth0.2'
+ list lower 'eth0.3'
+
--- /dev/null
+diff --git a/bind/Makefile.in b/bind/Makefile.in
+index bd784c6..5950d19 100644
+--- a/bind/Makefile.in
++++ b/bind/Makefile.in
+@@ -85,13 +85,13 @@ bind2:
+ echo Bind export libraries already installed ; \
+ else \
+ echo Building BIND Export libraries - this takes some time. ;\
+- (cd ${bindsrcdir}/lib/export ; \
+- echo building in `pwd` ; \
+- MAKE=${GMAKE} ${GMAKE} >> ${binddir}/build.log) ; \
++ (cd ${bindsrcdir}/lib/export/dns ; \
++ echo building gen using ${BUILD_CC} in `pwd` ; \
++ $(MAKE) CC=${BUILD_CC} CFLAGS="-O2" LIBS="" gen) ; \
+ \
+ echo Installing BIND Export libraries to ${binddir}. ; \
+ (cd ${bindsrcdir}/lib/export ; \
+- MAKE=${GMAKE} ${GMAKE} install > ${binddir}/install.log) ; \
++ $(MAKE) DESTDIR="" install > ${binddir}/build.log) ; \
+ fi
+
+ clean:
+@@ -100,6 +100,7 @@ clean:
+
+ # Include the following so that this Makefile is happy when the parent
+ # tries to use them.
++install-exec:
+
+ distdir:
+
--- /dev/null
+--- a/relay/dhcrelay.c
++++ b/relay/dhcrelay.c
+@@ -60,6 +60,7 @@
+ int client_packet_errors = 0; /* Errors sending packets to clients. */
+
+ int add_agent_options = 0; /* If nonzero, add relay agent options. */
++int add_rfc3527_suboption = 0; /* If nonzero, add RFC3527 link selection sub-option. */
+
+ int agent_option_errors = 0; /* Number of packets forwarded without
+ agent options because there was no room. */
+@@ -99,6 +100,8 @@
+ struct sockaddr_in to;
+ } *servers;
+
++struct interface_info *uplink;
++
+ #ifdef DHCPv6
+ struct stream_list {
+ struct stream_list *next;
+@@ -147,6 +150,7 @@
+ " [-pf <pid-file>] [--no-pid]\n"\
+ " [-m append|replace|forward|discard]\n" \
+ " [-i interface0 [ ... -i interfaceN]\n" \
++" [-l interface]\n" \
+ " server0 [ ... serverN]\n\n" \
+ " dhcrelay -6 [-d] [-q] [-I] [-c <hops>] [-p <port>]\n" \
+ " [-pf <pid-file>] [--no-pid]\n" \
+@@ -161,6 +165,7 @@
+ " [-pf <pid-file>] [--no-pid]\n" \
+ " [-m append|replace|forward|discard]\n" \
+ " [-i interface0 [ ... -i interfaceN]\n" \
++" [-l interface]\n" \
+ " server0 [ ... serverN]\n\n"
+ #endif
+
+@@ -325,6 +330,20 @@
+ agent_relay_mode = discard;
+ } else
+ usage();
++ } else if (!strcmp (argv [i], "-l")) {
++ add_agent_options = 1;
++ add_rfc3527_suboption = 1;
++ if (++i == argc)
++ usage();
++
++ status = interface_allocate(&uplink, MDL);
++ if (status != ISC_R_SUCCESS)
++ log_fatal("%s: interface_allocate: %s",
++ argv[i],
++ isc_result_totext(status));
++ strcpy(uplink->name, argv[i]);
++ interface_snorf(uplink, INTERFACE_REQUESTED);
++ //interface_dereference(&uplink, MDL);
+ } else if (!strcmp(argv[i], "-D")) {
+ #ifdef DHCPv6
+ if (local_family_set && (local_family == AF_INET6)) {
+@@ -711,12 +730,17 @@
+ ip->addresses[0])))
+ return;
+
++ /* RFC3527: Replace giaddr address by uplink address. The original
++ * giaddr will be used in the link selection sub-option */
++ if (add_rfc3527_suboption)
++ packet->giaddr = uplink->addresses[0];
++
+ /* If giaddr is not already set, Set it so the server can
+ figure out what net it's from and so that we can later
+ forward the response to the correct net. If it's already
+ set, the response will be sent directly to the relay agent
+ that set giaddr, so we won't see it. */
+- if (!packet->giaddr.s_addr)
++ else if (!packet->giaddr.s_addr)
+ packet->giaddr = ip->addresses[0];
+ if (packet->hops < max_hop_count)
+ packet->hops = packet->hops + 1;
+@@ -1090,6 +1114,9 @@
+ optlen += ip->remote_id_len + 2; /* RAI_REMOTE_ID + len */
+ }
+
++ if (add_rfc3527_suboption)
++ optlen += 6;
++
+ /* We do not support relay option fragmenting(multiple options to
+ * support an option data exceeding 255 bytes).
+ */
+@@ -1121,6 +1148,14 @@
+ memcpy(sp, ip->remote_id, ip->remote_id_len);
+ sp += ip->remote_id_len;
+ }
++
++ if (add_rfc3527_suboption) {
++ *sp++ = RAI_LINK_SELECT;
++ *sp++ = 4u;
++ memcpy(sp, &giaddr.s_addr, 4);
++ sp += 4;
++ log_debug ("RFC3527 link selection sub-option added: %s", inet_ntoa(giaddr));
++ }
+ } else {
+ ++agent_option_errors;
+ log_error("No room in packet (used %d of %d) "
--- /dev/null
+--- a/bind/Makefile.in
++++ b/bind/Makefile.in
+@@ -63,8 +63,14 @@
+ else \
+ echo Configuring BIND Export libraries for DHCP. ; \
+ rm -rf ${cleandirs} ${cleanfiles} ; \
+- (cd ${bindsrcdir} && \
+- ./configure ${bindconfig} > ${binddir}/configure.log); \
++ (cd ${bindsrcdir} && export CC=${CROSS_CC} && \
++ ./configure --disable-atomic --disable-kqueue \
++ --disable-epoll --disable-devpoll --without-openssl \
++ --without-libxml2 --enable-exportlib \
++ --enable-threads=no \
++ --with-export-includedir=${binddir}/include \
++ --with-export-libdir=${binddir}/lib --with-gssapi=no \
++ --without-randomdev > ${binddir}/configure.log); \
+ fi
+
+ atf:
include $(TOPDIR)/rules.mk
PKG_NAME:=knxd
-PKG_VERSION=2016-01-01-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=3
+PKG_VERSION=2016-03-12
+PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/knxd/knxd.git
-PKG_SOURCE_VERSION:=0cca354494310c8700e95692d5e09c80f6b57085
+PKG_SOURCE_VERSION:=c8a4bb3b042de1fd692a93cdb7a307546f2be359
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
append_bool args tpuarts_ack_all_individual "tpuarts-ack-all-individual" 0
append_bool args tpuarts_disch_reset "tpuarts-disch-reset" 0
append_bool args Tunnelling "Tunnelling" 1
- append_parm args listen_local "listen-local" "/var/run/knxd"
append_bool args Server "Server" 1
+ append_parm args listen_local "listen-local" "/var/run/knxd"
config_get url args url
procd_open_instance
procd_set_param command $PROG $params $url
include $(TOPDIR)/rules.mk
PKG_NAME:=krb5
-PKG_VERSION:=1.14
+PKG_VERSION:=1.14.1
PKG_RELEASE:=1
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
PKG_SOURCE:=krb5-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://web.mit.edu/kerberos/dist/krb5/1.14/
-PKG_MD5SUM:=0727968764d0208388b85ad31aafde24
+PKG_MD5SUM:=400de0cabbfbe85c2c36f60347bf7dc6
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
-diff -u --recursive krb5-1.14-vanilla/src/kadmin/ktutil/ktutil_funcs.c krb5-1.14/src/kadmin/ktutil/ktutil_funcs.c
---- krb5-1.14-vanilla/src/kadmin/ktutil/ktutil_funcs.c 2015-12-31 21:50:20.572824136 -0500
-+++ krb5-1.14/src/kadmin/ktutil/ktutil_funcs.c 2015-12-31 22:11:26.603926597 -0500
-@@ -64,7 +64,7 @@
- krb5_kt_list *list;
- int idx;
+diff -u --recursive krb5-1.14.1-vanilla/src/lib/kadm5/str_conv.c krb5-1.14.1/src/lib/kadm5/str_conv.c
+--- krb5-1.14.1-vanilla/src/lib/kadm5/str_conv.c 2016-03-26 19:49:13.651926364 -0400
++++ krb5-1.14.1/src/lib/kadm5/str_conv.c 2016-03-26 21:05:37.436084066 -0400
+@@ -131,7 +131,7 @@
{
-- krb5_kt_list lp, prev;
-+ krb5_kt_list lp, prev = NULL;
- int i;
+ int found = 0, invert = 0;
+ size_t i;
+- krb5_flags flag;
++ krb5_flags flag = 0;
+ unsigned long ul;
- for (lp = *list, i = 1; lp; prev = lp, lp = lp->next, i++) {
-diff -u --recursive krb5-1.14-vanilla/src/lib/krad/packet.c krb5-1.14/src/lib/krad/packet.c
---- krb5-1.14-vanilla/src/lib/krad/packet.c 2015-12-31 21:50:20.476819205 -0500
-+++ krb5-1.14/src/lib/krad/packet.c 2015-12-31 22:05:32.041257903 -0500
+ for (i = 0; !found && i < NFTBL; i++) {
+diff -u --recursive krb5-1.14.1-vanilla/src/lib/krad/packet.c krb5-1.14.1/src/lib/krad/packet.c
+--- krb5-1.14.1-vanilla/src/lib/krad/packet.c 2016-03-26 19:49:13.634926238 -0400
++++ krb5-1.14.1/src/lib/krad/packet.c 2016-03-26 21:13:03.023144940 -0400
@@ -253,7 +253,7 @@
{
krb5_error_code retval;
size_t attrset_len;
pkt = packet_new();
-diff -u --recursive krb5-1.14-vanilla/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c krb5-1.14/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
---- krb5-1.14-vanilla/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c 2015-12-31 21:50:20.531822031 -0500
-+++ krb5-1.14/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c 2015-12-31 22:08:32.871650805 -0500
+diff -u --recursive krb5-1.14.1-vanilla/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c krb5-1.14.1/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c
+--- krb5-1.14.1-vanilla/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c 2016-03-26 19:49:13.653926379 -0400
++++ krb5-1.14.1/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c 2016-03-26 21:17:07.151335877 -0400
@@ -3618,7 +3618,7 @@
{
CK_ULONG i, r;
CK_ULONG count = 0;
CK_SLOT_ID_PTR slotlist;
CK_TOKEN_INFO tinfo;
-diff -u --recursive krb5-1.14-vanilla/src/util/profile/prof_file.c krb5-1.14/src/util/profile/prof_file.c
---- krb5-1.14-vanilla/src/util/profile/prof_file.c 2015-12-31 21:50:20.474819103 -0500
-+++ krb5-1.14/src/util/profile/prof_file.c 2015-12-31 21:59:08.551797171 -0500
-@@ -359,6 +359,8 @@
- if (f == NULL)
- return (errno != 0) ? errno : ENOENT;
- set_cloexec_file(f);
-+ } else {
-+ f = NULL;
- }
+Only in krb5-1.14.1/src/plugins/preauth/pkinit: .pkinit_crypto_openssl.c.swp
+diff -u --recursive krb5-1.14.1-vanilla/src/util/profile/prof_file.c krb5-1.14.1/src/util/profile/prof_file.c
+--- krb5-1.14.1-vanilla/src/util/profile/prof_file.c 2016-03-26 19:49:13.633926230 -0400
++++ krb5-1.14.1/src/util/profile/prof_file.c 2016-03-26 21:03:07.934427580 -0400
+@@ -309,7 +309,7 @@
+ unsigned long frac;
+ time_t now;
+ #endif
+- FILE *f;
++ FILE *f = NULL;
+ int isdir = 0;
- data->upd_serial++;
+ #ifdef HAVE_STAT
include $(TOPDIR)/rules.mk
PKG_NAME:=nginx
-PKG_VERSION:=1.9.9
-PKG_RELEASE:=2
+PKG_VERSION:=1.9.13
+PKG_RELEASE:=1
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://nginx.org/download/
-PKG_MD5SUM:=50fdfa08e93ead7a111cba5a5f5735af
+PKG_MD5SUM:=e7502dc170277597ca73eb53c359c771
PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
PKG_LICENSE:=2-clause BSD-like license
#
-# Copyright (C) 2014-2015 OpenWrt.org
+# Copyright (C) 2014-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=nsd
-PKG_VERSION:=4.1.2
+PKG_VERSION:=4.1.9
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/nsd
-PKG_MD5SUM:=73014bab5514b9babaf6c9007a6b36d8
+PKG_MD5SUM:=9ac1d5ba51351d3d98b7de765439af57
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=nut
-PKG_VERSION:=2.7.3
-PKG_RELEASE:=2
+PKG_VERSION:=2.7.4
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.networkupstools.org/source/2.7/
-PKG_MD5SUM:=a1a7f747093663e1f39ab595b63b45e4
+PKG_MD5SUM:=3ba53656933d7471f95140b32a5b8d5c
PKG_MAINTAINER:=Martin Rowe <martin.p.rowe@gmail.com>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE-GPL2
include $(TOPDIR)/rules.mk
PKG_NAME:=ocserv
-PKG_VERSION:=0.10.12
+PKG_VERSION:=0.11.1
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/ocserv/
-PKG_MD5SUM:=a0080697a6e7b07d3868d224a81b60f3
+PKG_MD5SUM:=a581b8669f5d16639773ef81f25a1317
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_RADIUS:libradcli +OCSERV_HTTP_PARSER:libhttp-parser +OCSERV_SECCOMP:libseccomp +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c +kmod-tun
+ DEPENDS:= +OCSERV_RADIUS:libradcli +OCSERV_HTTP_PARSER:libhttp-parser +OCSERV_SECCOMP:libseccomp +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c +libev +kmod-tun
USERID:=ocserv=72:ocserv=72
endef
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocserv-fw $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd $(1)/usr/bin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ocpasswd/ocpasswd $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/occtl/occtl $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/ocserv.init $(1)/etc/init.d/ocserv
$(INSTALL_DIR) $(1)/etc/ocserv
PKG_NAME:=ola
PKG_VERSION:=0.10.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/OpenLightingProject/ola.git
TITLE:=Open Lighting Architecture Daemon
URL:=https://www.openlighting.org/
MAINTAINER:=Christian Beier <dontmind@freeshell.org>
- DEPENDS:=+protobuf +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +sudo
+ DEPENDS:=+protobuf +libusb-1.0 +libuuid +libstdcpp +libpthread +librt +zlib +libncurses +liblo +sudo
endef
define Package/ola/description
--disable-fatal-warnings \
--disable-unittests \
--disable-http \
+ --without-dns-sd \
--with-ola-protoc-plugin=$(HOST_BUILD_DIR)/protoc/ola_protoc_plugin
HOST_CONFIGURE_ARGS += \
--- /dev/null
+From a88d6d31fc5a04be4378095e03b4aac133954026 Mon Sep 17 00:00:00 2001
+From: Christian Beier <dontmind@freeshell.org>
+Date: Tue, 15 Mar 2016 15:09:25 +0100
+Subject: [PATCH] Make DNS-SD functionality optional at build time.
+
+When building for embedded systems, for instance, we
+want to limit dependencies to a minimum and it seems
+that OLA is able to perform its core tasks without
+DNS-SD perfectly fine.
+
+Signed-off-by: Christian Beier <dontmind@freeshell.org>
+---
+ configure.ac | 27 +++++++++++++++------------
+ 1 file changed, 15 insertions(+), 12 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6654354..0d1947c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -411,23 +411,26 @@ AS_IF([test "x$use_ossp_uuid" = xyes],
+
+ # DNS-SD support
+ # We use either avahi or the Apple DNS-SD library.
+-
+-# dns_sd
+-AC_CHECK_HEADER(
+- [dns_sd.h],
+- [AC_SEARCH_LIBS(DNSServiceRegister, [dns_sd], [have_dnssd="yes"])])
++AC_ARG_WITH(dns-sd,
++[AS_HELP_STRING([--without-dns-sd], [disable DNS-SD support])],,)
++if test "x$with_dns_sd" != "xno"; then
++ # dns_sd
++ AC_CHECK_HEADER(
++ [dns_sd.h],
++ [AC_SEARCH_LIBS(DNSServiceRegister, [dns_sd], [have_dnssd="yes"])])
++
++ # avahi
++ PKG_CHECK_MODULES(
++ avahi,
++ [avahi-client],
++ [have_avahi="yes"],
++ [true])
++fi
+
+ AS_IF([test "x$have_dnssd" = xyes],
+ [AC_DEFINE([HAVE_DNSSD], [1], [Defined to use Bonjour DNS_SD])])
+ AM_CONDITIONAL([HAVE_DNSSD], [test "x$have_dnssd" = xyes])
+
+-# avahi
+-PKG_CHECK_MODULES(
+- avahi,
+- [avahi-client],
+- [have_avahi="yes"],
+- [true])
+-
+ AS_IF([test "x$have_avahi" = xyes],
+ [AC_DEFINE([HAVE_AVAHI], [1], [Defined to use Avahi])])
+ AM_CONDITIONAL([HAVE_AVAHI], [test "x$have_avahi" = xyes])
+--
+2.1.4
+
PKG_NAME:=openvswitch
-PKG_RELEASE:=5
+PKG_RELEASE:=7
PKG_VERSION:=2.5.0
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=Apache-2.0
# Upstream package supports kernels between 2.6.32 and 4.3
# see https://github.com/openvswitch/ovs/blob/master/FAQ.md
# This list is pruned to only those kernels used in OpenWRT
-SUPPORTED_KERNELS:=LINUX_3_18||LINUX_4_1||LINUX_4_3
+# Support for kernel 4.4 is backported
+SUPPORTED_KERNELS:=LINUX_3_18||LINUX_4_1||LINUX_4_3||LINUX_4_4
include $(INCLUDE_DIR)/package.mk
$(call include_mk, python-package.mk)
@@ -358,10 +377,20 @@ ovs_thread_create(const char *name, void *(*start)(void *), void *arg)
aux->arg = arg;
ovs_strlcpy(aux->name, name, sizeof aux->name);
-
+
+- error = pthread_create(&thread, NULL, ovsthread_wrapper, aux);
+ /* Some small systems use a default stack size as small as 80 kB, but OVS
+ * requires approximately 384 kB according to the following analysis:
+ * http://openvswitch.org/pipermail/dev/2016-January/065049.html
+ pthread_attr_init(&attr);
+ set_min_stack_size(&attr, 512 * 1024);
+
- error = pthread_create(&thread, NULL, ovsthread_wrapper, aux);
++ error = pthread_create(&thread, &attr, ovsthread_wrapper, aux);
if (error) {
ovs_abort(error, "pthread_create failed");
}
--- /dev/null
+diff --git a/acinclude.m4 b/acinclude.m4
+index 11c7787..07dd647 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -134,10 +134,10 @@ AC_DEFUN([OVS_CHECK_LINUX], [
+ AC_MSG_RESULT([$kversion])
+
+ if test "$version" -ge 4; then
+- if test "$version" = 4 && test "$patchlevel" -le 3; then
++ if test "$version" = 4 && test "$patchlevel" -le 4; then
+ : # Linux 4.x
+ else
+- AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.3.x is not supported (please refer to the FAQ for advice)])
++ AC_ERROR([Linux kernel in $KBUILD is version $kversion, but version newer than 4.4.x is not supported (please refer to the FAQ for advice)])
+ fi
+ elif test "$version" = 3; then
+ : # Linux 3.x
+diff --git a/datapath/actions.c b/datapath/actions.c
+index 20413c9..719c43d 100644
+--- a/datapath/actions.c
++++ b/datapath/actions.c
+@@ -706,7 +706,8 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
+ skb_dst_set_noref(skb, &ovs_dst);
+ IPCB(skb)->frag_max_size = mru;
+
+- ip_do_fragment(skb->sk, skb, ovs_vport_output);
++ ip_do_fragment(NET_ARG(dev_net(ovs_dst.dev))
++ skb->sk, skb, ovs_vport_output);
+ refdst_drop(orig_dst);
+ } else if (ethertype == htons(ETH_P_IPV6)) {
+ const struct nf_ipv6_ops *v6ops = nf_get_ipv6_ops();
+@@ -727,7 +728,8 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
+ skb_dst_set_noref(skb, &ovs_rt.dst);
+ IP6CB(skb)->frag_max_size = mru;
+
+- v6ops->fragment(skb->sk, skb, ovs_vport_output);
++ v6ops->fragment(NET_ARG(dev_net(ovs_rt.dst.dev))
++ skb->sk, skb, ovs_vport_output);
+ refdst_drop(orig_dst);
+ } else {
+ WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.",
+diff --git a/datapath/conntrack.c b/datapath/conntrack.c
+index 795ed91..3b9bfba 100644
+--- a/datapath/conntrack.c
++++ b/datapath/conntrack.c
+@@ -323,7 +323,7 @@ static int handle_fragments(struct net *net, struct sw_flow_key *key,
+ int err;
+
+ memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));
+- err = ip_defrag(skb, user);
++ err = ip_defrag(NET_ARG(net) skb, user);
+ if (err)
+ return err;
+
+@@ -374,7 +374,7 @@ ovs_ct_expect_find(struct net *net, const struct nf_conntrack_zone *zone,
+ {
+ struct nf_conntrack_tuple tuple;
+
+- if (!nf_ct_get_tuplepr(skb, skb_network_offset(skb), proto, &tuple))
++ if (!nf_ct_get_tuplepr(skb, skb_network_offset(skb), proto, NET_ARG(net) &tuple))
+ return NULL;
+ return __nf_ct_expect_find(net, zone, &tuple);
+ }
+diff --git a/datapath/datapath.c b/datapath/datapath.c
+index e3d3c8c..a4157f4 100644
+--- a/datapath/datapath.c
++++ b/datapath/datapath.c
+@@ -96,8 +96,12 @@ static bool ovs_must_notify(struct genl_family *family, struct genl_info *info,
+ static void ovs_notify(struct genl_family *family, struct genl_multicast_group *grp,
+ struct sk_buff *skb, struct genl_info *info)
+ {
+- genl_notify(family, skb, genl_info_net(info),
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++ genl_notify(family, skb, info, GROUP_ID(grp), GFP_KERNEL);
++#else
++ genl_notify(family, skb, genl_info_net(info),
+ info->snd_portid, GROUP_ID(grp), info->nlhdr, GFP_KERNEL);
++#endif
+ }
+
+ /**
+diff --git a/datapath/linux/compat/include/linux/netfilter_ipv6.h b/datapath/linux/compat/include/linux/netfilter_ipv6.h
+index 3939e14..b724623 100644
+--- a/datapath/linux/compat/include/linux/netfilter_ipv6.h
++++ b/datapath/linux/compat/include/linux/netfilter_ipv6.h
+@@ -13,7 +13,7 @@
+ * the callback parameter needs to be in the form that older kernels accept.
+ * We don't backport the other ipv6_ops as they're currently unused by OVS. */
+ struct ovs_nf_ipv6_ops {
+- int (*fragment)(struct sock *sk, struct sk_buff *skb,
++ int (*fragment)(NET_ARG(net) struct sock *sk, struct sk_buff *skb,
+ int (*output)(OVS_VPORT_OUTPUT_PARAMS));
+ };
+ #define nf_ipv6_ops ovs_nf_ipv6_ops
+diff --git a/datapath/linux/compat/include/net/ip.h b/datapath/linux/compat/include/net/ip.h
+index cd87bcc..b749301 100644
+--- a/datapath/linux/compat/include/net/ip.h
++++ b/datapath/linux/compat/include/net/ip.h
+@@ -66,8 +66,20 @@ static inline unsigned int rpl_ip_skb_dst_mtu(const struct sk_buff *skb)
+ #define ip_skb_dst_mtu rpl_ip_skb_dst_mtu
+ #endif /* HAVE_IP_SKB_DST_MTU */
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++#define NET_PARAM(x) struct net *x,
++#define NET_ARG(x) x,
++#define NET_DEV_NET(x) dev_net(x)
++#define NET_DECLARE_INIT(x,y)
++#else
++#define NET_PARAM(x)
++#define NET_ARG(x)
++#define NET_DEV_NET(x)
++#define NET_DECLARE_INIT(x,y) struct net *x = y;
++#endif
++
+ #ifdef HAVE_IP_FRAGMENT_TAKES_SOCK
+-#define OVS_VPORT_OUTPUT_PARAMS struct sock *sock, struct sk_buff *skb
++#define OVS_VPORT_OUTPUT_PARAMS NET_PARAM(net) struct sock *sock, struct sk_buff *skb
+ #else
+ #define OVS_VPORT_OUTPUT_PARAMS struct sk_buff *skb
+ #endif
+@@ -89,12 +101,13 @@ static inline bool ip_defrag_user_in_between(u32 user,
+ #endif /* < v4.2 */
+
+ #ifndef HAVE_IP_DO_FRAGMENT
+-static inline int rpl_ip_do_fragment(struct sock *sk, struct sk_buff *skb,
++static inline int rpl_ip_do_fragment(NET_PARAM(net) struct sock *sk, struct sk_buff *skb,
+ int (*output)(OVS_VPORT_OUTPUT_PARAMS))
+ {
+ unsigned int mtu = ip_skb_dst_mtu(skb);
+ struct iphdr *iph = ip_hdr(skb);
+ struct rtable *rt = skb_rtable(skb);
+ struct net_device *dev = rt->dst.dev;
++ NET_DECLARE_INIT(net, dev_net(dev));
+
+ if (unlikely(((iph->frag_off & htons(IP_DF)) && !skb->ignore_df) ||
+@@ -102,7 +115,7 @@ static inline int rpl_ip_do_fragment(struct sock *sk, struct sk_buff *skb,
+ IPCB(skb)->frag_max_size > mtu))) {
+
+ pr_warn("Dropping packet in ip_do_fragment()\n");
+- IP_INC_STATS(dev_net(dev), IPSTATS_MIB_FRAGFAILS);
++ IP_INC_STATS(net, IPSTATS_MIB_FRAGFAILS);
+ kfree_skb(skb);
+ return -EMSGSIZE;
+ }
+@@ -116,8 +129,7 @@ static inline int rpl_ip_do_fragment(struct sock *sk, struct sk_buff *skb,
+ #define ip_do_fragment rpl_ip_do_fragment
+ #endif /* IP_DO_FRAGMENT */
+
+-int rpl_ip_defrag(struct sk_buff *skb, u32 user);
+-#define ip_defrag rpl_ip_defrag
++int rpl_ip_defrag(NET_PARAM(net) struct sk_buff *skb, u32 user);
+
+ int __init rpl_ipfrag_init(void);
+ void rpl_ipfrag_fini(void);
+@@ -127,14 +139,15 @@ void rpl_ipfrag_fini(void);
+ * ("inet: frag: Always orphan skbs inside ip_defrag()"), but it should be
+ * always included in kernels 4.5+. */
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
+-static inline int rpl_ip_defrag(struct sk_buff *skb, u32 user)
++static inline int rpl_ip_defrag(NET_PARAM(net) struct sk_buff *skb, u32 user)
+ {
+ skb_orphan(skb);
+- return ip_defrag(skb, user);
++ return ip_defrag(NET_ARG(net) skb, user);
+ }
+-#define ip_defrag rpl_ip_defrag
+ #endif
+
++#define ip_defrag rpl_ip_defrag
++
+ static inline int rpl_ipfrag_init(void) { return 0; }
+ static inline void rpl_ipfrag_fini(void) { }
+ #endif /* HAVE_CORRECT_MRU_HANDLING && OVS_FRAGMENT_BACKPORT */
+diff --git a/datapath/linux/compat/include/net/ip6_tunnel.h b/datapath/linux/compat/include/net/ip6_tunnel.h
+index ce65087..eacf9ca 100644
+--- a/datapath/linux/compat/include/net/ip6_tunnel.h
++++ b/datapath/linux/compat/include/net/ip6_tunnel.h
+@@ -17,11 +17,15 @@ static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb,
+
+ pkt_len = skb->len - skb_inner_network_offset(skb);
+ /* TODO: Fix GSO for ipv6 */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++ err = ip6_local_out(dev_net(dev), sk, skb);
++#else
+ #ifdef HAVE_IP6_LOCAL_OUT_SK
+ err = ip6_local_out_sk(sk, skb);
+ #else
+ err = ip6_local_out(skb);
+ #endif
++#endif /* >= kernel 4.4 */
+ if (net_xmit_eval(err) != 0)
+ pkt_len = net_xmit_eval(err);
+ else
+diff --git a/datapath/linux/compat/include/net/vxlan.h b/datapath/linux/compat/include/net/vxlan.h
+index b50cd17..230f3ad 100644
+--- a/datapath/linux/compat/include/net/vxlan.h
++++ b/datapath/linux/compat/include/net/vxlan.h
+@@ -218,10 +218,20 @@ struct vxlan_dev {
+ struct net_device *rpl_vxlan_dev_create(struct net *net, const char *name,
+ u8 name_assign_type, struct vxlan_config *conf);
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++static inline __be16 vxlan_dev_dst_port(struct vxlan_dev *vxlan,
++ unsigned short family)
++{
++ if (family == AF_INET6)
++ return inet_sk(vxlan->vn6_sock->sock->sk)->inet_sport;
++ return inet_sk(vxlan->vn4_sock->sock->sk)->inet_sport;
++}
++#else
+ static inline __be16 vxlan_dev_dst_port(struct vxlan_dev *vxlan)
+ {
+ return inet_sport(vxlan->vn_sock->sock->sk);
+ }
++#endif
+
+ static inline netdev_features_t vxlan_features_check(struct sk_buff *skb,
+ netdev_features_t features)
+diff --git a/datapath/linux/compat/ip_fragment.c b/datapath/linux/compat/ip_fragment.c
+index cf2daaa..e168196 100644
+--- a/datapath/linux/compat/ip_fragment.c
++++ b/datapath/linux/compat/ip_fragment.c
+@@ -674,11 +674,11 @@ out_fail:
+ }
+
+ /* Process an incoming IP datagram fragment. */
+-int rpl_ip_defrag(struct sk_buff *skb, u32 user)
++int rpl_ip_defrag(NET_ARG(net) struct sk_buff *skb, u32 user)
+ {
+ struct net_device *dev = skb->dev ? : skb_dst(skb)->dev;
+ int vif = vrf_master_ifindex_rcu(dev);
+- struct net *net = dev_net(dev);
++ NET_DECLARE_INIT(net, dev_net(dev));
+ struct ipq *qp;
+
+ IP_INC_STATS_BH(net, IPSTATS_MIB_REASMREQDS);
+diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
+index eb397e8..5ea3c52 100644
+--- a/datapath/linux/compat/stt.c
++++ b/datapath/linux/compat/stt.c
+@@ -1450,7 +1450,11 @@ static void clean_percpu(struct work_struct *work)
+ }
+
+ #ifdef HAVE_NF_HOOKFN_ARG_OPS
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++#define FIRST_PARAM void *priv
++#else
+ #define FIRST_PARAM const struct nf_hook_ops *ops
++#endif /* >= kernel 4.4 */
+ #else
+ #define FIRST_PARAM unsigned int hooknum
+ #endif
+@@ -1498,7 +1502,9 @@ static unsigned int nf_ip_hook(FIRST_PARAM, struct sk_buff *skb, LAST_PARAM)
+
+ static struct nf_hook_ops nf_hook_ops __read_mostly = {
+ .hook = nf_ip_hook,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0)
+ .owner = THIS_MODULE,
++#endif
+ .pf = NFPROTO_IPV4,
+ .hooknum = NF_INET_LOCAL_IN,
+ .priority = INT_MAX,
+diff --git a/datapath/vport-vxlan.c b/datapath/vport-vxlan.c
+index c05f5d4..3cbb568 100644
+--- a/datapath/vport-vxlan.c
++++ b/datapath/vport-vxlan.c
+@@ -153,7 +153,12 @@ static int vxlan_get_egress_tun_info(struct vport *vport, struct sk_buff *skb,
+ {
+ struct vxlan_dev *vxlan = netdev_priv(vport->dev);
+ struct net *net = ovs_dp_get_net(vport->dp);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++ unsigned short family = ip_tunnel_info_af(upcall->egress_tun_info);
++ __be16 dst_port = vxlan_dev_dst_port(vxlan, family);
++#else
+ __be16 dst_port = vxlan_dev_dst_port(vxlan);
++#endif
+ __be16 src_port;
+ int port_min;
+ int port_max;
include $(TOPDIR)/rules.mk
PKG_NAME:=radsecproxy
-PKG_VERSION:=1.6.6
+PKG_VERSION:=1.6.7
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://software.uninett.no/radsecproxy/
-PKG_MD5SUM:=8270b2a9d7cb1dcf30ddd677f3e7ac5f
+PKG_MD5SUM:=d76cf4fc68515667b8c67387f5045150
PKG_INSTALL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=rsyslog
-PKG_VERSION:=8.16.0
+PKG_VERSION:=8.17.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.rsyslog.com/files/download/rsyslog/
-PKG_MD5SUM:=52916045c07ebbd3ee77c39e8465bc4d
+PKG_MD5SUM:=fadc26576a783afdf11f64beca278bc9
PKG_MAINTAINER:=Dov Murik <dmurik@us.ibm.com>
PKG_LICENSE:=GPL-3.0
CATEGORY:=Network
TITLE:=Enhanced system logging and kernel message trapping daemons
URL:=http://www.rsyslog.com/
- DEPENDS:=+libestr +libjson-c +libuuid +zlib
+ DEPENDS:=+libestr +libfastjson +libuuid +zlib
endef
define Package/rsyslog/conffiles
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
PKG_SOURCE:=$(PKG_NAME)-fuse-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/fuse
+PKG_SOURCE_URL:=https://github.com/libfuse/sshfs/releases/download/sshfs_2_5
PKG_MD5SUM:=17494910db8383a366b1301e5f5148a9
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-fuse-$(PKG_VERSION)
include $(TOPDIR)/rules.mk
PKG_NAME:=tinc
-PKG_VERSION:=1.0.26
+PKG_VERSION:=1.0.27
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.tinc-vpn.org/packages
-PKG_MD5SUM:=a8c168227fa42cbfcd4983247bf609ca
+PKG_MD5SUM:=f37d107d6301c7963d264b1a40c449f6
PKG_INSTALL:=1
#
-# Copyright (C) 2009-2014 OpenWrt.org
+# Copyright (C) 2009-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=transmission
-PKG_VERSION:=2.84
-PKG_RELEASE:=4
+PKG_VERSION:=2.92
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://download-origin.transmissionbt.com/files/ http://mirrors.m0k.org/transmission/files
-PKG_MD5SUM:=411aec1c418c14f6765710d89743ae42
+PKG_MD5SUM:=3fce404a436e3cd7fde80fb6ed61c264
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
+TARGET_CFLAGS += -std=gnu99
+
define Package/transmission-daemon/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/transmission-daemon $(1)/usr/bin/
+++ /dev/null
---- a/libtransmission/fdlimit.c
-+++ b/libtransmission/fdlimit.c
-@@ -22,11 +22,6 @@
- #include <fcntl.h>
- #endif
-
--#ifdef HAVE_FALLOCATE64
-- /* FIXME can't find the right #include voodoo to pick up the declaration.. */
-- extern int fallocate64 (int fd, int mode, uint64_t offset, uint64_t len);
--#endif
--
- #ifdef HAVE_XFS_XFS_H
- #include <xfs/xfs.h>
- #endif
--- a/configure.ac
+++ b/configure.ac
-@@ -251,7 +251,7 @@
+@@ -378,7 +378,7 @@ dnl See if ANY version of miniupnpc is i
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <miniupnpc/miniupnpc.h>],
[struct UPNPDev dev;])],
-Index: transmission-2.84/libtransmission/bitfield.c
-===================================================================
---- transmission-2.84.orig/libtransmission/bitfield.c
-+++ transmission-2.84/libtransmission/bitfield.c
+--- a/libtransmission/bitfield.c
++++ b/libtransmission/bitfield.c
@@ -7,6 +7,8 @@
- * $Id: bitfield.c 14302 2014-06-29 01:42:38Z jordan $
+ * $Id: bitfield.c 14646 2015-12-31 05:22:42Z mikedld $
*/
+#define __NEED_ssize_t
+
#include <assert.h>
- #include <stdlib.h> /* realloc () */
#include <string.h> /* memset */
-@@ -15,6 +17,7 @@
+
+@@ -14,6 +16,7 @@
#include "bitfield.h"
#include "utils.h" /* tr_new0 () */
const tr_bitfield TR_BITFIELD_INIT = { NULL, 0, 0, 0, false, false };
/****
-Index: transmission-2.84/libtransmission/fdlimit.h
-===================================================================
---- transmission-2.84.orig/libtransmission/fdlimit.h
-+++ transmission-2.84/libtransmission/fdlimit.h
+--- a/libtransmission/fdlimit.h
++++ b/libtransmission/fdlimit.h
@@ -11,6 +11,8 @@
#error only libtransmission should #include this header.
#endif
+#define __NEED_off_t
+
#include "transmission.h"
+ #include "file.h"
#include "net.h"
-
#
-# Copyright (C) 2010-2015 OpenWrt.org
+# Copyright (C) 2010-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=unbound
-PKG_VERSION:=1.5.7
+PKG_VERSION:=1.5.8
PKG_RELEASE:=1
PKG_LICENSE:=BSD-3-Clause
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.unbound.net/downloads
-PKG_MD5SUM:=a1253cbbb339dbca03404dcc58365d71
+PKG_MD5SUM:=1c34282bae0c625b86374ee9caaef6f7
PKG_BUILD_DEPENDS:=libexpat
PKG_BUILD_PARALLEL:=1
include $(TOPDIR)/rules.mk
PKG_NAME:=wavemon
-PKG_VERSION:=0.7.6
-PKG_RELEASE:=2
+PKG_VERSION:=0.8.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_PROTO:=git
SECTION:=net
CATEGORY:=Network
TITLE:=N-curses based wireless network devices monitor
- DEPENDS:=+libncurses +libpthread
+ DEPENDS:=+libncurses +libpthread +libnl-genl
SUBMENU:=wireless
URL:=https://github.com/uoaerg/wavemon/releases
endef
CONFIGURE_VARS += \
ac_cv_lib_cap_cap_get_flag=no
-TARGET_CFLAGS += -pthread
+TARGET_CFLAGS += -pthread -I$(STAGING_DIR)/usr/include/libnl3
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include"
--- /dev/null
+diff --git a/wavemon.h b/wavemon.h
+index e7584f7..8c76d11 100644
+--- a/wavemon.h
++++ b/wavemon.h
+@@ -19,6 +19,7 @@
+ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ #include <stdio.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <signal.h>
+@@ -33,7 +34,7 @@
+ #include <ctype.h>
+ #include <math.h>
+ #include <stdbool.h>
+-#include <ncurses.h>
++#include <curses.h>
+
+ #include "llist.h"
+
#
-# Copyright (C) 2007-2015 OpenWrt.org
+# Copyright (C) 2007-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=mpd
-PKG_VERSION:=0.19.11
+PKG_VERSION:=0.19.14
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://www.musicpd.org/download/mpd/0.19/
-PKG_MD5SUM:=78935f6c464b67e19b4dc65bdb80319e
+PKG_MD5SUM:=9f99340ec6b77bea4ba3729e3b76fd7c
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
PKG_LICENSE:=GPL-2.0
--disable-wildmidi \
--disable-zzip \
--with-zeroconf=no \
+ --disable-soxr \
\
--enable-curl \
--enable-flac \
constexpr
#endif
notify():pending(false) {}
---- a/src/thread/PosixCond.hxx
-+++ b/src/thread/PosixCond.hxx
-@@ -41,7 +41,7 @@ class PosixCond {
- pthread_cond_t cond;
-
- public:
--#if defined(__NetBSD__) || defined(__BIONIC__)
-+#if !defined(__GLIBC__)
- /* NetBSD's PTHREAD_COND_INITIALIZER is not compatible with
- "constexpr" */
- PosixCond() {
---- a/src/thread/PosixMutex.hxx
-+++ b/src/thread/PosixMutex.hxx
-@@ -41,7 +41,7 @@ class PosixMutex {
- pthread_mutex_t mutex;
-
- public:
--#if defined(__NetBSD__) || defined(__BIONIC__)
-+#if !defined(__GLIBC__)
- /* NetBSD's PTHREAD_MUTEX_INITIALIZER is not compatible with
- "constexpr" */
- PosixMutex() {
--disable-udev \
--without-fftw \
--disable-avahi \
- --disable-dbus
+ --disable-dbus \
+ --without-soxr
CONFIGURE_VARS += \
PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
./files/pulseaudio.init \
$(1)/etc/init.d/pulseaudio
- $(INSTALL_CONF) \
+ $(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/etc/pulse/* \
$(1)/etc/pulse
$(PKG_INSTALL_DIR)/usr/lib/pulse-$(PKG_VERSION)/modules/module*.so \
$(1)/usr/lib/pulse-$(PKG_VERSION)/modules/
- chmod -R 0644 $(1)/etc/pulse/*
endef
define Package/pulseaudio-tools/install
$(1)/usr/share/pulseaudio/alsa-mixer/paths \
$(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
- $(INSTALL_CONF) \
+ $(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/paths/* \
$(1)/usr/share/pulseaudio/alsa-mixer/paths
- $(INSTALL_CONF) \
+ $(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/share/pulseaudio/alsa-mixer/profile-sets/* \
$(1)/usr/share/pulseaudio/alsa-mixer/profile-sets
endef
include $(TOPDIR)/rules.mk
PKG_NAME:=shairport-sync
-PKG_VERSION:=2.8.0
+PKG_VERSION:=2.8.1
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
include $(TOPDIR)/rules.mk
PKG_NAME:=acpid
-PKG_VERSION:=2.0.25
+PKG_VERSION:=2.0.27
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/acpid2
-PKG_MD5SUM:=69bb0cc4a0a89eb2dfecc4851087f568
+PKG_MD5SUM:=e41bdf628e122edb4342fca432ea7db9
PKG_MAINTAINER:=Thomas Heil<heil@terminal-consulting.de>
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
endef
define Package/bandwidthd/daemon
- This package contains bandwidthd a bandwith tracking utility.
+ This package contains bandwidthd a bandwidth tracking utility.
endef
define Package/bandwidthd-pgsql/daemon
- This package contains bandwidthd a bandwith tracking utility.
+ This package contains bandwidthd a bandwidth tracking utility.
endef
ifeq ($(BUILD_VARIANT),no-pgsql)
#
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=bluez
-PKG_VERSION:=5.33
+PKG_VERSION:=5.38
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/bluetooth/
-PKG_MD5SUM:=78782dc33d9a8b6344c4cc1af70c8a98
+PKG_MD5SUM:=dae2ed00c63791800ea7d10a381270a5
PKG_LICENSE:=GPL-2.0+
PKG_LICENSE_FILES:=COPYING
--- /dev/null
+From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Tue, 16 Feb 2016 16:40:46 +0000
+Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant
+
+---
+ tools/hciattach.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/tools/hciattach.c
++++ b/tools/hciattach.c
+@@ -1144,6 +1144,9 @@ struct uart_t uart[] = {
+ { "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000,
+ FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL },
+
++ { "bcm43xx-3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000,
++ 0, DISABLE_PM, NULL, bcm43xx, NULL },
++
+ { "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,
+ FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm },
+
--- /dev/null
+From e145c9621f976063e5c573db1f2053d906f63427 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Tue, 16 Feb 2016 16:39:09 +0000
+Subject: [PATCH 2/4] bcm43xx: The UART speed must be reset after the firmware
+ download
+
+---
+ tools/hciattach_bcm43xx.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/tools/hciattach_bcm43xx.c
++++ b/tools/hciattach_bcm43xx.c
+@@ -366,11 +366,8 @@ int bcm43xx_init(int fd, int def_speed,
+ return -1;
+
+ if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {
+- fprintf(stderr, "Patch not found, continue anyway\n");
++ fprintf(stderr, "Patch not found for %s, continue anyway\n", chip_name);
+ } else {
+- if (bcm43xx_set_speed(fd, ti, speed))
+- return -1;
+-
+ if (bcm43xx_load_firmware(fd, fw_path))
+ return -1;
+
+@@ -380,6 +377,7 @@ int bcm43xx_init(int fd, int def_speed,
+ return -1;
+ }
+
++ sleep(1);
+ if (bcm43xx_reset(fd))
+ return -1;
+ }
--- /dev/null
+From d41dc2046dd08d8c95197f677e224506f5b39bdd Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Wed, 20 Jan 2016 16:00:37 +0000
+Subject: [PATCH 3/4] Increase firmware load timeout to 30s
+
+---
+ tools/hciattach.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/hciattach.c
++++ b/tools/hciattach.c
+@@ -1293,7 +1293,7 @@ int main(int argc, char *argv[])
+ {
+ struct uart_t *u = NULL;
+ int detach, printpid, raw, opt, i, n, ld, err;
+- int to = 10;
++ int to = 30;
+ int init_speed = 0;
+ int send_break = 0;
+ pid_t pid;
--- /dev/null
+From 76681284b0ea49852041fdb97a35175089a08781 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Tue, 23 Feb 2016 17:52:29 +0000
+Subject: [PATCH 4/4] Move the 43xx firmware into /lib/firmware
+
+---
+ tools/hciattach_bcm43xx.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/hciattach_bcm43xx.c
++++ b/tools/hciattach_bcm43xx.c
+@@ -43,7 +43,7 @@
+ #include "hciattach.h"
+
+ #ifndef FIRMWARE_DIR
+-#define FIRMWARE_DIR "/etc/firmware"
++#define FIRMWARE_DIR "/lib/firmware/brcm"
+ #endif
+
+ #define FW_EXT ".hcd"
--- a/Makefile.in
+++ b/Makefile.in
-@@ -2405,7 +2405,7 @@ unit_tests = $(am__append_32) unit/test-
+@@ -2441,7 +2441,7 @@ unit_tests = $(am__append_35) unit/test-
@CLIENT_TRUE@ monitor/uuid.h monitor/uuid.c
@CLIENT_TRUE@client_bluetoothctl_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@ \
@MONITOR_TRUE@monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
@MONITOR_TRUE@ monitor/display.h monitor/display.c \
-@@ -2651,13 +2651,13 @@ unit_tests = $(am__append_32) unit/test-
+@@ -2691,13 +2691,13 @@ unit_tests = $(am__append_35) unit/test-
@READLINE_TRUE@ client/display.h
@READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \
@READLINE_TRUE@tools_obex_server_tool_SOURCES = $(gobex_sources) $(btio_sources) \
@READLINE_TRUE@ tools/obex-server-tool.c
-@@ -2667,17 +2667,17 @@ unit_tests = $(am__append_32) unit/test-
+@@ -2707,17 +2707,17 @@ unit_tests = $(am__append_35) unit/test-
@READLINE_TRUE@ client/display.h client/display.c
@READLINE_TRUE@tools_bluetooth_player_LDADD = gdbus/libgdbus-internal.la \
define Package/cmdpad/description
cmdpad - execute commands when a key is pressed, released or hold down.
- Should be started from /etc/rc or /etc/rc.local. To run it as deamon you
+ Should be started from /etc/rc or /etc/rc.local. To run it as daemon you
need to start it with '&'. All logs are printed to standard out and standard
error (to write the log to disk use cmdpad > /var/log/cmdpad). Cmdpad
searches for /etc/cmdpad.conf and load the key bindings. Then wait for
PKG_NAME:=collectd
PKG_VERSION:=5.5.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://collectd.org/files/
and provides mechanismns to store the values in a variety of ways.
endef
+define Package/collectd/config
+ config PACKAGE_COLLECTD_ENCRYPTED_NETWORK
+ bool "Enable ability to use encrypted networking"
+ default n
+ depends on PACKAGE_collectd
+ select PACKAGE_collectd-mod-network
+endef
+
ifneq ($(CONFIG_avr32),)
TARGET_CFLAGS += -fsigned-char
endif
--disable-debug \
--enable-daemon \
--with-nan-emulation \
- --without-perl-bindings \
+ --without-perl-bindings
+
+ifneq ($(CONFIG_PACKAGE_COLLECTD_ENCRYPTED_NETWORK),)
+CONFIGURE_ARGS+= \
+ --with-libgcrypt=$(STAGING_DIR)/include
+else
+CONFIGURE_ARGS+= \
--without-libgcrypt
+endif
CONFIGURE_VARS+= \
CFLAGS="$$$$CFLAGS $(FPIC)" \
$(eval $(call BuildPlugin,memory,physical memory usage input,memory,))
$(eval $(call BuildPlugin,modbus,read variables through libmodbus,modbus,+PACKAGE_collectd-mod-modbus:libmodbus))
$(eval $(call BuildPlugin,netlink,netlink input,netlink,+PACKAGE_collectd-mod-netlink:libmnl))
-$(eval $(call BuildPlugin,network,network input/output,network))
+$(eval $(call BuildPlugin,network,network input/output,network,+PACKAGE_COLLECTD_ENCRYPTED_NETWORK:libgcrypt))
$(eval $(call BuildPlugin,nginx,nginx status input,nginx,+PACKAGE_collectd-mod-nginx:libcurl))
$(eval $(call BuildPlugin,ntpd,NTP daemon status input,ntpd,))
$(eval $(call BuildPlugin,nut,UPS monitoring input,nut,+PACKAGE_collectd-mod-nut:nut))
crelay is used to control different relay cards in a unified manner. It provides
several interfaces for controlling the relays locally or remotely by a web browser
or a smartphone. The card which is detected first will be used. A WebUI control is
- availble on port 8000 (default)
+ available on port 8000 (default)
.
Currently supported relay cards:
- Conrad USB 4-channel relay card
#
-# Copyright (C) 2010-2015 OpenWrt.org
+# Copyright (C) 2010-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=flashrom
-PKG_VERSION:=0.9.8
-PKG_RELEASE:=6
+PKG_VERSION:=0.9.9
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.flashrom.org/releases
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_MD5SUM:=ac513076b63ab7eb411a7694bb8f6fda
+PKG_MD5SUM:=aab9c98925d9cfb5ffb28b67a6112530
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
$(Package/flashrom/default)
TITLE+= (full)
DEPENDS+= \
- +(PACKAGE_flashrom&&(TARGET_x86||TARGET_x86_64)):dmidecode \
- +PACKAGE_flashrom:libftdi \
- +PACKAGE_flashrom:libusb-compat \
- +PACKAGE_flashrom:pciutils
+ +(TARGET_x86||TARGET_x86_64):dmidecode \
+ +libftdi1 \
+ +libusb-1.0 \
+ +libusb-compat \
+ +pciutils
VARIANT:=full
DEFAULT_VARIANT:=1
endef
$(Package/flashrom/default)
TITLE+= (pci)
DEPENDS+= \
- +(PACKAGE_flashrom-pci&&(TARGET_x86||TARGET_x86_64)):dmidecode \
- +PACKAGE_flashrom-pci:pciutils
+ +(TARGET_x86||TARGET_x86_64):dmidecode \
+ +pciutils
VARIANT:=pci
endef
$(Package/flashrom/default)
TITLE+= (usb)
DEPENDS+= \
- +PACKAGE_flashrom-usb:libftdi \
- +PACKAGE_flashrom-usb:libusb-compat
+ +libftdi1 \
+ +libusb-1.0 \
+ +libusb-compat
VARIANT:=usb
endef
FLASHROM_BASIC := yes
FLASHROM_FTDI := yes
FLASHROM_PCI := yes
+ FLASHROM_RAW := yes
FLASHROM_SERIAL := yes
FLASHROM_USB := yes
endif
FLASHROM_BASIC := yes
FLASHROM_FTDI := no
FLASHROM_PCI := yes
+ FLASHROM_RAW := yes
FLASHROM_SERIAL := no
FLASHROM_USB := no
endif
FLASHROM_BASIC := yes
FLASHROM_FTDI := no
FLASHROM_PCI := no
+ FLASHROM_RAW := no
FLASHROM_SERIAL := no
FLASHROM_USB := no
endif
FLASHROM_BASIC := yes
FLASHROM_FTDI := yes
FLASHROM_PCI := no
+ FLASHROM_RAW := no
FLASHROM_SERIAL := yes
FLASHROM_USB := yes
endif
$(eval $(call DefineProgrammer,FT2232_SPI,$(FLASHROM_FTDI)))
$(eval $(call DefineProgrammer,USBBLASTER_SPI,$(FLASHROM_FTDI)))
+# RAW
+$(eval $(call DefineConfig,RAW_ACCESS,$(FLASHROM_RAW)))
+$(eval $(call DefineProgrammer,RAYER_SPI,$(FLASHROM_RAW)))
+
# PCI
$(eval $(call DefineConfig,PCI,$(FLASHROM_PCI)))
$(eval $(call DefineProgrammer,INTERNAL,$(FLASHROM_PCI)))
-$(eval $(call DefineProgrammer,RAYER_SPI,$(FLASHROM_PCI)))
$(eval $(call DefineProgrammer,NIC3COM,$(FLASHROM_PCI)))
$(eval $(call DefineProgrammer,GFXNVIDIA,$(FLASHROM_PCI)))
$(eval $(call DefineProgrammer,SATASII,$(FLASHROM_PCI)))
$(eval $(call DefineProgrammer,PONY_SPI,$(FLASHROM_SERIAL)))
$(eval $(call DefineProgrammer,BUSPIRATE_SPI,$(FLASHROM_SERIAL)))
-# USB
-$(eval $(call DefineConfig,USB,$(FLASHROM_USB)))
+# USB0
+$(eval $(call DefineConfig,USB0,$(FLASHROM_USB)))
$(eval $(call DefineProgrammer,PICKIT2_SPI,$(FLASHROM_USB)))
-#$(eval $(call DefineProgrammer,DEDIPROG,$(FLASHROM_USB)))
+
+# USB1
+$(eval $(call DefineConfig,USB1,$(FLASHROM_USB)))
+$(eval $(call DefineProgrammer,CH341A_SPI,$(FLASHROM_USB)))
+$(eval $(call DefineProgrammer,DEDIPROG,$(FLASHROM_USB)))
--- /dev/null
+diff -uprN a/linux_spi.c b/linux_spi.c
+--- a/flash.h 2015-02-08 16:57:52.000000000 -0500
++++ b/flash.h 2016-01-08 20:09:51.599387507 -0500
+@@ -30,6 +30,7 @@
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <stddef.h>
++#include <sys/io.h>
+ #include <stdbool.h>
+ #if IS_WINDOWS
+ #include <windows.h>
+
+++ /dev/null
-diff -uprN a/linux_spi.c b/linux_spi.c
---- a/linux_spi.c 2015-06-17 20:50:36.492963100 +0200
-+++ b/linux_spi.c 2015-06-17 20:50:00.444860800 +0200
-@@ -22,7 +22,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
- #include <errno.h>
- #include <ctype.h>
- #include <unistd.h>
+++ /dev/null
-diff -uprN a/linux_spi.c b/linux_spi.c
---- a/flash.h 2015-02-08 16:57:52.000000000 -0500
-+++ b/flash.h 2016-01-08 20:09:51.599387507 -0500
-@@ -30,6 +30,7 @@
- #include <stdio.h>
- #include <stdint.h>
- #include <stddef.h>
-+#include <sys/io.h>
- #include <stdbool.h>
- #if IS_WINDOWS
- #include <windows.h>
-
config_get_bool item "$conf" enabled 0
[ $item = 0 ] && return
- echo -e "; dont edit. instead look into /etc/config/gammu\n[gammu]\n" > $conffile
+ echo -e "; don't edit. instead look into /etc/config/gammu\n[gammu]\n" > $conffile
config_get item "$conf" device
[ -z "$item" ] && return
This package contains the libgps library.
endef
+SCONS_VARS += \
+ LINKFLAGS="$(TARGET_LDFLAGS)"
+
SCONS_OPTIONS += \
dbus_export=no \
tsip=no \
include $(TOPDIR)/rules.mk
PKG_NAME:=grep
-PKG_VERSION:=2.23
+PKG_VERSION:=2.24
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/grep
-PKG_MD5SUM:=f46aa9d0d2577b9212a104348a286787
+PKG_MD5SUM:=f1c980134c04692a90078e87283074b6
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=COPYING
#
-# Copyright (C) 2014 OpenWrt.org
+# Copyright (C) 2014-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=hamlib
-PKG_VERSION:=1.2.15.3
-PKG_RELEASE:=3
-PKG_MD5SUM:=3cad8987e995a00e5e9d360e2be0eb43
+PKG_VERSION:=3.0.1
+PKG_RELEASE:=1
+PKG_MD5SUM:=451acb9f727ed706ae2f59ee3f0e03c7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/hamlib
TITLE+= utilities
SECTION:=utils
CATEGORY:=Utilities
- DEPENDS:=+libpthread +libhamlib
+ DEPENDS:=+libhamlib
endef
define Package/hamlib/description
define Package/libhamlib
$(call Package/libhamlib/Default)
- DEPENDS:=+libusb-1.0 +libltdl
+ DEPENDS:=+libusb-1.0
MENU:=1
endef
This package contains the hamlib shared library.
endef
-define Package/hamlib-adat
- $(call Package/libhamlib/Default)
- TITLE:= for ADAT
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-alinco
- $(call Package/libhamlib/Default)
- TITLE:= for Alinco
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-amsat
- $(call Package/libhamlib/Default)
- TITLE:= for AMSAT
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-aor
- $(call Package/libhamlib/Default)
- TITLE:= for AOR
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-ars
- $(call Package/libhamlib/Default)
- TITLE:= for ARS
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-celestron
- $(call Package/libhamlib/Default)
- TITLE:= for Celestron
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-drake
- $(call Package/libhamlib/Default)
- TITLE:= for Drake
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-dummy
- $(call Package/libhamlib/Default)
- TITLE:= for dummy
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-easycomm
- $(call Package/libhamlib/Default)
- TITLE:= for EasyComm
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-flexradio
- $(call Package/libhamlib/Default)
- TITLE:= for FlexRadio
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-fodtrack
- $(call Package/libhamlib/Default)
- TITLE:= for FodTrack
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-gs232a
- $(call Package/libhamlib/Default)
- TITLE:= for GS-232A
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-heathkit
- $(call Package/libhamlib/Default)
- TITLE:= for Heathkit
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-icom
- $(call Package/libhamlib/Default)
- TITLE:= for ICOM
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-jrc
- $(call Package/libhamlib/Default)
- TITLE:= for JRC
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-kachina
- $(call Package/libhamlib/Default)
- TITLE:= for Kachina
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-kenwood
- $(call Package/libhamlib/Default)
- TITLE:= for Kenwood
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-kit
- $(call Package/libhamlib/Default)
- TITLE:= for kits
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-lowe
- $(call Package/libhamlib/Default)
- TITLE:= for Lowe
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-m2
- $(call Package/libhamlib/Default)
- TITLE:= for M2
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-pcr
- $(call Package/libhamlib/Default)
- TITLE:= for PCR
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-prm80
- $(call Package/libhamlib/Default)
- TITLE:= for PRM80
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-racal
- $(call Package/libhamlib/Default)
- TITLE:= for Racal
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-rft
- $(call Package/libhamlib/Default)
- TITLE:= for RFT
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-rotorez
- $(call Package/libhamlib/Default)
- TITLE:= for Rotor-EZ
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-rs
- $(call Package/libhamlib/Default)
- TITLE:= for R&S
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-sartek
- $(call Package/libhamlib/Default)
- TITLE:= for SARtek
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-skanti
- $(call Package/libhamlib/Default)
- TITLE:= for Skanti
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-spid
- $(call Package/libhamlib/Default)
- TITLE:= for SPID
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-tapr
- $(call Package/libhamlib/Default)
- TITLE:= for TAPR
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-tentec
- $(call Package/libhamlib/Default)
- TITLE:= for TenTec
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-ts7400
- $(call Package/libhamlib/Default)
- TITLE:= for TS-7400
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-tuner
- $(call Package/libhamlib/Default)
- TITLE:= for Video for Linux tuner
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-uniden
- $(call Package/libhamlib/Default)
- TITLE:= for Uniden
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-wj
- $(call Package/libhamlib/Default)
- TITLE:= for Watkins - Johnson
- DEPENDS:=libhamlib
-endef
-
-define Package/hamlib-yaesu
- $(call Package/libhamlib/Default)
- TITLE:= for Yaesu
- DEPENDS:=libhamlib
-endef
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/hamlib
$(CP) $(PKG_INSTALL_DIR)/usr/include/hamlib/*.h $(1)/usr/include/hamlib
endef
CONFIGURE_ARGS+= \
+ --disable-html-matrix \
+ --disable-winradio \
+ --without-readline \
--without-cxx-binding \
- --without-winradio \
- --without-rpc-backends \
--with-pic \
+CONFIGURE_VARS+= \
+ LIBUSB_LIBS="-lusb-1.0" \
+
define Package/hamlib/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/{rig,rot}* $(1)/usr/bin/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libhamlib.so* $(1)/usr/lib/
endef
-define Package/hamlib-adat/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-adat.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-alinco/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-alinco.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-amsat/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-amsat.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-aor/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-aor.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-ars/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-ars.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-celestron/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-celestron.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-drake/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-drake.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-dummy/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-dummy.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-easycomm/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-easycomm.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-flexradio/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-flexradio.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-fodtrack/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-fodtrack.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-gs232a/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-gs232a.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-heathkit/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-heathkit.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-icom/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-icom.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-jrc/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-jrc.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-kachina/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-kachina.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-kenwood/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-kenwood.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-kit/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-kit.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-lowe/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-lowe.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-m2/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-m2.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-pcr/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-pcr.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-prm80/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-prm80.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-racal/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-racal.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-rft/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-rft.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-rotorez/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-rotorez.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-rs/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-rs.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-sartek/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-sartek.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-skanti/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-skanti.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-spid/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-spid.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-tapr/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-tapr.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-tentec/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-tentec.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-ts7400/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-ts7400.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-tuner/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-tuner.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-uniden/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-uniden.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-wj/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-wj.so* $(1)/usr/lib/hamlib
-endef
-
-define Package/hamlib-yaesu/install
- $(INSTALL_DIR) $(1)/usr/lib/hamlib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/hamlib/hamlib-yaesu.so* $(1)/usr/lib/hamlib
-endef
-
$(eval $(call BuildPackage,hamlib))
$(eval $(call BuildPackage,libhamlib))
-$(eval $(call BuildPackage,hamlib-adat))
-$(eval $(call BuildPackage,hamlib-alinco))
-$(eval $(call BuildPackage,hamlib-amsat))
-$(eval $(call BuildPackage,hamlib-aor))
-$(eval $(call BuildPackage,hamlib-ars))
-$(eval $(call BuildPackage,hamlib-celestron))
-$(eval $(call BuildPackage,hamlib-drake))
-$(eval $(call BuildPackage,hamlib-dummy))
-$(eval $(call BuildPackage,hamlib-easycomm))
-$(eval $(call BuildPackage,hamlib-flexradio))
-$(eval $(call BuildPackage,hamlib-fodtrack))
-$(eval $(call BuildPackage,hamlib-gs232a))
-$(eval $(call BuildPackage,hamlib-heathkit))
-$(eval $(call BuildPackage,hamlib-icom))
-$(eval $(call BuildPackage,hamlib-jrc))
-$(eval $(call BuildPackage,hamlib-kachina))
-$(eval $(call BuildPackage,hamlib-kenwood))
-$(eval $(call BuildPackage,hamlib-kit))
-$(eval $(call BuildPackage,hamlib-lowe))
-$(eval $(call BuildPackage,hamlib-m2))
-$(eval $(call BuildPackage,hamlib-pcr))
-$(eval $(call BuildPackage,hamlib-prm80))
-$(eval $(call BuildPackage,hamlib-racal))
-$(eval $(call BuildPackage,hamlib-rft))
-$(eval $(call BuildPackage,hamlib-rotorez))
-$(eval $(call BuildPackage,hamlib-rs))
-$(eval $(call BuildPackage,hamlib-sartek))
-$(eval $(call BuildPackage,hamlib-skanti))
-$(eval $(call BuildPackage,hamlib-spid))
-$(eval $(call BuildPackage,hamlib-tapr))
-$(eval $(call BuildPackage,hamlib-tentec))
-$(eval $(call BuildPackage,hamlib-ts7400))
-$(eval $(call BuildPackage,hamlib-tuner))
-$(eval $(call BuildPackage,hamlib-uniden))
-$(eval $(call BuildPackage,hamlib-wj))
-$(eval $(call BuildPackage,hamlib-yaesu))
-
+++ /dev/null
-Index: hamlib-1.2.15.3/configure.ac
-===================================================================
---- hamlib-1.2.15.3.orig/configure.ac 2012-11-01 22:27:27.000000000 +0100
-+++ hamlib-1.2.15.3/configure.ac 2014-06-15 09:34:25.557966205 +0200
-@@ -234,12 +234,12 @@
- "You need a C99 compliant C compiler that supports struct/array intializers."
- "Have you considered GCC lately?.")]);
-
--dnl libxml2 required rigmem xml support
--PKG_CHECK_MODULES([LIBXML2], [libxml-2.0],
-- [AC_DEFINE(HAVE_XML2,[1],[Define if libxml2 is available])],
-- [AC_MSG_WARN([libxml-2.0 pkg-config not found, XML support will be disabled])])
-+#dnl libxml2 required rigmem xml support
-+#PKG_CHECK_MODULES([LIBXML2], [libxml-2.0],
-+# [AC_DEFINE(HAVE_XML2,[1],[Define if libxml2 is available])],
-+# [AC_MSG_WARN([libxml-2.0 pkg-config not found, XML support will be disabled])])
- AC_SUBST(LIBXML2_LIBS)
- AC_SUBST(LIBXML2_CFLAGS)
-
- dnl Check if libgd-dev is installed, so we can enable rigmatrix
-
-@@ -406,7 +406,7 @@
- AM_CONDITIONAL(HAVE_USRP, test x"${cf_with_usrp}" = "xyes")
-
-
--PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1, ,
-+PKG_CHECK_MODULES(LIBUSB, libusb >= 1.0, ,
- [AC_MSG_WARN([libusb pkg-config not found, USB backends will be disabled])])
- CFLAGS="${CFLAGS} ${LIBUSB_CFLAGS}"
- CXXFLAGS="${CXXFLAGS} ${LIBUSB_CFLAGS}"
PKG_NAME:=lxc
PKG_VERSION:=1.1.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=LGPL-2.1+ BSD-2-Clause GPL-2.0
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
DEPENDS_APPLETS = +libpthread +libcap +liblxc
-DEPENDS_create = +lxc-configs +lxc-hooks +lxc-templates
+DEPENDS_create = +lxc-configs +lxc-hooks +lxc-templates +flock
+
DEPENDS_ls = +lxc-config
DEPENDS_top = +lxc-lua +luafilesystem @BROKEN
MENU:=1
endef
+define Package/lxc-auto
+ $(call Package/lxc/Default)
+ TITLE:= (initscript)
+ DEPENDS:=+lxc-start +lxc-stop
+endef
+
+define Package/lxc-auto/description
+ LXC is the userspace control package for Linux Containers, a lightweight
+ virtual system mechanism sometimes described as "chroot on steroids".
+ This package adds and initscript for starting and stopping the containers
+ on boot and shutdown.
+endef
+
+define Package/lxc-auto/conffiles
+/etc/config/lxc-auto
+endef
+
define Package/lxc/config
source "$(SOURCE)/Config.in"
endef
true
endef
+define Package/lxc-auto/install
+ $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
+ $(INSTALL_CONF) ./files/lxc-auto.config $(1)/etc/config/lxc-auto
+ $(INSTALL_BIN) ./files/lxc-auto.init $(1)/etc/init.d/lxc-auto
+endef
+
define Package/lxc-common/conffiles
/etc/lxc/default.conf
/etc/lxc/lxc.conf
$(eval $(call BuildPackage,liblxc))
$(eval $(call BuildPackage,lxc-lua))
$(eval $(call BuildPackage,lxc-init))
+$(eval $(call BuildPackage,lxc-auto))
$(foreach u,$(LXC_APPLETS_BIN),$(eval $(call GenPlugin,$(u),$(DEPENDS_APPLETS),"/usr/bin")))
$(foreach u,$(LXC_APPLETS_LIB),$(eval $(call GenPlugin,$(u),$(DEPENDS_APPLETS),"/usr/lib/lxc")))
$(foreach u,$(LXC_SCRIPTS),$(eval $(call GenPlugin,$(u),,"/usr/bin")))
--- /dev/null
+#config container
+ #option name container1
+ #option timeout 300
+ #list command '/bin/command --option'
+
--- /dev/null
+#!/bin/sh /etc/rc.common
+
+. /lib/functions.sh
+
+START=99
+STOP=00
+
+run_command() {
+ local command="$1"
+ $command
+}
+
+start_container() {
+ local cfg="$1"
+ local name
+
+ config_get name "$cfg" name
+ config_list_foreach "$cfg" command run_command
+ if [ -n "$name" ]; then
+ /usr/bin/lxc-start -n "$name"
+ fi
+}
+
+max_timeout=0
+
+stop_container() {
+ local cfg="$1"
+ local name timeout
+
+ config_get name "$cfg" name
+ config_get timeout "$cfg" timeout 300
+
+ if [ "$max_timeout" -lt "$timeout" ]; then
+ max_timeout=$timeout
+ fi
+
+ if [ -n "$name" ]; then
+ if [ "$timeout" = "0" ]; then
+ /usr/bin/lxc-stop -n "$name" &
+ else
+ /usr/bin/lxc-stop -n "$name" -t $timeout &
+ fi
+ fi
+}
+
+start() {
+ config_load lxc-auto
+ config_foreach start_container container
+}
+
+stop() {
+ config_load lxc-auto
+ config_foreach stop_container container
+ # ensure e.g. shutdown doesn't occur before maximum timeout on
+ # containers that are shutting down
+ if [ $max_timeout -gt 0 ]; then
+ sleep $max_timeout
+ fi
+}
+
#
-# Copyright (C) 2006-2015 OpenWrt.org
+# Copyright (C) 2006-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=mc
-PKG_VERSION:=4.8.15
-PKG_RELEASE:=2
-PKG_MAINTAINER:=Dirk Brenken <dirk@brenken.org>
+PKG_VERSION:=4.8.16
+PKG_RELEASE:=1
+PKG_MAINTAINER:=Dirk Brenken <openwrt@brenken.org>
PKG_LICENSE:=GPL-3.0+
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://ftp.midnight-commander.org/
-PKG_MD5SUM:=7c1935433866fdf59a3c2d9b7dae81ad
+PKG_SHA256SUM:=bbbcbe3097d3160f865d24aa38ff122f1c59752b5ef153ca4ade5ac0f82b7020
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
---- a/lib/global.c
-+++ b/lib/global.c
-@@ -97,6 +97,7 @@ mc_global_t mc_global = {
- #endif /* !ENABLE_SUBSHELL */
-
- .shell = NULL,
-+ .shell_realpath = NULL,
-
- .xterm_flag = FALSE,
- .disable_x11 = FALSE,
---- a/lib/global.h
-+++ b/lib/global.h
-@@ -255,6 +255,7 @@ typedef struct
-
- /* The user's shell */
- char *shell;
-+ char *shell_realpath;
-
- /* This flag is set by xterm detection routine in function main() */
- /* It is used by function view_other_cmd() */
---- a/lib/mcconfig/paths.c
-+++ b/lib/mcconfig/paths.c
-@@ -84,6 +84,7 @@ static const struct
- /* data */
- { "skins", &mc_data_str, MC_SKINS_SUBDIR},
- { "fish", &mc_data_str, FISH_PREFIX},
-+ { "ashrc", &mc_data_str, "ashrc"},
- { "bashrc", &mc_data_str, "bashrc"},
- { "inputrc", &mc_data_str, "inputrc"},
- { "extfs.d", &mc_data_str, MC_EXTFS_DIR},
---- a/src/main.c
-+++ b/src/main.c
-@@ -87,6 +87,9 @@
- /*** file scope variables ************************************************************************/
-
- /*** file scope functions ************************************************************************/
-+
-+static char rp_shell[PATH_MAX];
-+
- /* --------------------------------------------------------------------------------------------- */
-
- static void
-@@ -118,6 +121,44 @@ check_codeset (void)
- }
-
- /* --------------------------------------------------------------------------------------------- */
-+/**
-+ * Get a system shell.
-+ *
-+ * @return newly allocated string with shell name
-+ */
-+
-+static char *
-+mc_get_system_shell (void)
-+{
-+ char *sh_str;
-+ /* 3rd choice: look for existing shells supported as MC subshells. */
-+ if (access ("/bin/bash", X_OK) == 0)
-+ sh_str = g_strdup ("/bin/bash");
-+ else if (access ("/bin/ash", X_OK) == 0)
-+ sh_str = g_strdup ("/bin/ash");
-+ else if (access ("/bin/dash", X_OK) == 0)
-+ sh_str = g_strdup ("/bin/dash");
-+ else if (access ("/bin/busybox", X_OK) == 0)
-+ sh_str = g_strdup ("/bin/busybox");
-+ else if (access ("/bin/zsh", X_OK) == 0)
-+ sh_str = g_strdup ("/bin/zsh");
-+ else if (access ("/bin/tcsh", X_OK) == 0)
-+ sh_str = g_strdup ("/bin/tcsh");
-+ /* No fish as fallback because it is so much different from other shells and
-+ * in a way exotic (even though user-friendly by name) that we should not
-+ * present it as a subshell without the user's explicit intention. We rather
-+ * will not use a subshell but just a command line.
-+ * else if (access("/bin/fish", X_OK) == 0)
-+ * mc_global.tty.shell = g_strdup ("/bin/fish");
-+ */
-+ else
-+ /* Fallback and last resort: system default shell */
-+ sh_str = g_strdup ("/bin/sh");
-+
-+ return sh_str;
-+}
-+
-+/* --------------------------------------------------------------------------------------------- */
-
- /** POSIX version. The only version we support. */
- static void
-@@ -126,9 +167,11 @@ OS_Setup (void)
- const char *shell_env;
- const char *datadir_env;
-
-+
- shell_env = getenv ("SHELL");
- if ((shell_env == NULL) || (shell_env[0] == '\0'))
- {
-+ /* 2nd choice: user login shell */
- struct passwd *pwd;
-
- pwd = getpwuid (geteuid ());
-@@ -136,13 +179,15 @@ OS_Setup (void)
- mc_global.tty.shell = g_strdup (pwd->pw_shell);
- }
- else
-+ /* 1st choice: SHELL environment variable */
- mc_global.tty.shell = g_strdup (shell_env);
-
- if ((mc_global.tty.shell == NULL) || (mc_global.tty.shell[0] == '\0'))
- {
- g_free (mc_global.tty.shell);
-- mc_global.tty.shell = g_strdup ("/bin/sh");
-+ mc_global.tty.shell = mc_get_system_shell ();
- }
-+ mc_global.tty.shell_realpath = mc_realpath (mc_global.tty.shell, rp_shell);
-
- /* This is the directory, where MC was installed, on Unix this is DATADIR */
- /* and can be overriden by the MC_DATADIR environment variable */
---- a/src/subshell.c
-+++ b/src/subshell.c
-@@ -114,6 +114,8 @@ enum
- static enum
- {
- BASH,
-+ ASH_BUSYBOX, /* BusyBox default shell (ash) */
-+ DASH, /* Debian variant of ash */
- TCSH,
- ZSH,
- FISH
-@@ -209,6 +211,7 @@ static void
- init_subshell_child (const char *pty_name)
- {
- char *init_file = NULL;
-+ char *putenv_str = NULL;
- pid_t mc_sid;
-
- (void) pty_name;
-@@ -257,32 +260,53 @@ init_subshell_child (const char *pty_nam
- switch (subshell_type)
- {
- case BASH:
-+ /* Do we have a custom init file ~/.local/share/mc/bashrc? */
- init_file = mc_config_get_full_path ("bashrc");
-
-+ /* Otherwise use ~/.bashrc */
- if (access (init_file, R_OK) == -1)
- {
- g_free (init_file);
- init_file = g_strdup (".bashrc");
- }
-
-- /* Make MC's special commands not show up in bash's history */
-- putenv ((char *) "HISTCONTROL=ignorespace");
-+ /* Make MC's special commands not show up in bash's history and also suppress
-+ * consecutive identical commands*/
-+ putenv ((char *) "HISTCONTROL=ignoreboth");
-
- /* Allow alternative readline settings for MC */
- {
- char *input_file = mc_config_get_full_path ("inputrc");
- if (access (input_file, R_OK) == 0)
- {
-- char *putenv_str = g_strconcat ("INPUTRC=", input_file, NULL);
-+ putenv_str = g_strconcat ("INPUTRC=", input_file, NULL);
- putenv (putenv_str);
-- g_free (putenv_str);
- }
- g_free (input_file);
- }
-
- break;
-
-- /* TODO: Find a way to pass initfile to TCSH and ZSH */
-+ case ASH_BUSYBOX:
-+ case DASH:
-+ /* Do we have a custom init file ~/.local/share/mc/ashrc? */
-+ init_file = mc_config_get_full_path ("ashrc");
-+
-+ /* Otherwise use ~/.profile */
-+ if (access (init_file, R_OK) == -1)
-+ {
-+ g_free (init_file);
-+ init_file = g_strdup (".profile");
-+ }
-+
-+ /* Put init file to ENV variable used by ash */
-+ putenv_str = g_strconcat ("ENV=", init_file, NULL);
-+ putenv (putenv_str);
-+ /* Do not use "g_free (putenv_str)" here, otherwise ENV will be undefined! */
-+
-+ break;
-+
-+ /* TODO: Find a way to pass initfile to TCSH, ZSH and FISH */
- case TCSH:
- case ZSH:
- case FISH:
-@@ -320,10 +344,6 @@ init_subshell_child (const char *pty_nam
- execl (mc_global.tty.shell, "bash", "-rcfile", init_file, (char *) NULL);
- break;
-
-- case TCSH:
-- execl (mc_global.tty.shell, "tcsh", (char *) NULL);
-- break;
--
- case ZSH:
- /* Use -g to exclude cmds beginning with space from history
- * and -Z to use the line editor on non-interactive term */
-@@ -331,8 +351,11 @@ init_subshell_child (const char *pty_nam
-
- break;
-
-+ case ASH_BUSYBOX:
-+ case DASH:
-+ case TCSH:
- case FISH:
-- execl (mc_global.tty.shell, "fish", (char *) NULL);
-+ execl (mc_global.tty.shell, mc_global.tty.shell, (char *) NULL);
- break;
-
- default:
-@@ -341,6 +364,7 @@ init_subshell_child (const char *pty_nam
-
- /* If we get this far, everything failed miserably */
- g_free (init_file);
-+ g_free (putenv_str);
- my_exit (FORK_FAILURE);
- }
-
-@@ -742,6 +766,171 @@ pty_open_slave (const char *pty_name)
- }
- #endif /* !HAVE_GRANTPT */
-
-+
-+/* --------------------------------------------------------------------------------------------- */
-+/**
-+ * Get a subshell type and store in subshell_type variable
-+ *
-+ * @return TRUE if subtype was gotten, FALSE otherwise
-+ */
-+
-+static gboolean
-+init_subshell_type (void)
-+{
-+ gboolean result = TRUE;
-+
-+ /* Find out what type of shell we have. Also consider real paths (resolved symlinks)
-+ * because e.g. csh might point to tcsh, ash to dash or busybox, sh to anything. */
-+
-+ if (strstr (mc_global.tty.shell, "/zsh") || strstr (mc_global.tty.shell_realpath, "/zsh")
-+ || getenv ("ZSH_VERSION"))
-+ /* Also detects ksh symlinked to zsh */
-+ subshell_type = ZSH;
-+ else if (strstr (mc_global.tty.shell, "/tcsh")
-+ || strstr (mc_global.tty.shell_realpath, "/tcsh"))
-+ /* Also detects csh symlinked to tcsh */
-+ subshell_type = TCSH;
-+ else if (strstr (mc_global.tty.shell, "/fish")
-+ || strstr (mc_global.tty.shell_realpath, "/fish"))
-+ subshell_type = FISH;
-+ else if (strstr (mc_global.tty.shell, "/dash")
-+ || strstr (mc_global.tty.shell_realpath, "/dash"))
-+ /* Debian ash (also found if symlinked to by ash/sh) */
-+ subshell_type = DASH;
-+ else if (strstr (mc_global.tty.shell_realpath, "/busybox"))
-+ {
-+ /* If shell is symlinked to busybox, assume it is an ash, even though theoretically
-+ * it could also be a hush (a mini shell for non-MMU systems deactivated by default).
-+ * For simplicity's sake we assume that busybox always contains an ash, not a hush.
-+ * On embedded platforms or on server systems, /bin/sh often points to busybox.
-+ * Sometimes even bash is symlinked to busybox (CONFIG_FEATURE_BASH_IS_ASH option),
-+ * so we need to check busybox symlinks *before* checking for the name "bash"
-+ * in order to avoid that case. */
-+ subshell_type = ASH_BUSYBOX;
-+ }
-+ else if (strstr (mc_global.tty.shell, "/bash") || getenv ("BASH"))
-+ /* If bash is not symlinked to busybox, it is safe to assume it is a real bash */
-+ subshell_type = BASH;
-+ else
-+ {
-+ mc_global.tty.use_subshell = FALSE;
-+ result = FALSE;
-+ }
-+ return result;
-+}
-+
-+/* --------------------------------------------------------------------------------------------- */
-+/**
-+ * Set up `precmd' or equivalent for reading the subshell's CWD.
-+ *
-+ * Attention! Never forget that these are *one-liners* even though the concatenated
-+ * substrings contain line breaks and indentation for better understanding of the
-+ * shell code. It is vital that each one-liner ends with a line feed character ("\n" ).
-+ *
-+ * @return initialized pre-command string
-+ */
-+
-+static void
-+init_subshell_precmd (char *precmd, size_t buff_size)
-+{
-+
-+ switch (subshell_type)
-+ {
-+ case BASH:
-+ g_snprintf (precmd, buff_size,
-+ " PROMPT_COMMAND='pwd>&%d; kill -STOP $$';\n", subshell_pipe[WRITE]);
-+ break;
-+
-+ case ASH_BUSYBOX:
-+ /* BusyBox ash needs a somewhat complicated precmd emulation via PS1, and it is vital
-+ * that BB be built with active CONFIG_ASH_EXPAND_PRMT, but this is the default anyway.
-+ *
-+ * A: This leads to a stopped subshell (=frozen mc) if user calls "ash" command
-+ * "PS1='$(pwd>&%d; kill -STOP $$)\\u@\\h:\\w\\$ '\n",
-+ *
-+ * B: This leads to "sh: precmd: not found" in sub-subshell if user calls "ash" command
-+ * "precmd() { pwd>&%d; kill -STOP $$; }; "
-+ * "PS1='$(precmd)\\u@\\h:\\w\\$ '\n",
-+ *
-+ * C: This works if user calls "ash" command because in sub-subshell
-+ * PRECMD is unfedined, thus evaluated to empty string - no damage done.
-+ * Attention: BusyBox must be built with FEATURE_EDITING_FANCY_PROMPT to
-+ * permit \u, \w, \h, \$ escape sequences. Unfortunately this cannot be guaranteed,
-+ * especially on embedded systems where people try to save space, so let's use
-+ * the dash version below. It should work on virtually all systems.
-+ * "precmd() { pwd>&%d; kill -STOP $$; }; "
-+ * "PRECMD=precmd; "
-+ * "PS1='$(eval $PRECMD)\\u@\\h:\\w\\$ '\n",
-+ */
-+ case DASH:
-+ /* Debian ash needs a precmd emulation via PS1, similar to BusyBox ash,
-+ * but does not support escape sequences for user, host and cwd in prompt.
-+ * Attention! Make sure that the buffer for precmd is big enough.
-+ *
-+ * We want to have a fancy dynamic prompt with user@host:cwd just like in the BusyBox
-+ * examples above, but because replacing the home directory part of the path by "~" is
-+ * complicated, it bloats the precmd to a size > BUF_SMALL (128).
-+ *
-+ * The following example is a little less fancy (home directory not replaced)
-+ * and shows the basic workings of our prompt for easier understanding:
-+ *
-+ * "precmd() { "
-+ * "echo \"$USER@$(hostname -s):$PWD\"; "
-+ * "pwd>&%d; "
-+ * "kill -STOP $$; "
-+ * "}; "
-+ * "PRECMD=precmd; "
-+ * "PS1='$($PRECMD)$ '\n",
-+ */
-+ g_snprintf (precmd, buff_size,
-+ "precmd() { "
-+ "if [ ! \"${PWD##$HOME}\" ]; then "
-+ "MC_PWD=\"~\"; "
-+ "else "
-+ "[ \"${PWD##$HOME/}\" = \"$PWD\" ] && MC_PWD=\"$PWD\" || MC_PWD=\"~/${PWD##$HOME/}\"; "
-+ "fi; "
-+ "echo \"$USER@openwrt:$MC_PWD\"; "
-+ "pwd>&%d; "
-+ "kill -STOP $$; "
-+ "}; " "PRECMD=precmd; " "PS1='$($PRECMD)$ '\n", subshell_pipe[WRITE]);
-+ break;
-+
-+ case ZSH:
-+ g_snprintf (precmd, buff_size,
-+ " precmd() { pwd>&%d; kill -STOP $$; }; "
-+ "PS1='%%n@%%m:%%~%%# '\n", subshell_pipe[WRITE]);
-+ break;
-+
-+ case TCSH:
-+ g_snprintf (precmd, buff_size,
-+ "set echo_style=both; "
-+ "set prompt='%%n@%%m:%%~%%# '; "
-+ "alias precmd 'echo $cwd:q >>%s; kill -STOP $$'\n", tcsh_fifo);
-+ break;
-+
-+ case FISH:
-+ /* We also want a fancy user@host:cwd prompt here, but fish makes it very easy to also
-+ * use colours, which is what we will do. But first here is a simpler, uncoloured version:
-+ * "function fish_prompt; "
-+ * "echo (whoami)@(hostname -s):(pwd)\\$\\ ; "
-+ * "echo \"$PWD\">&%d; "
-+ * "kill -STOP %%self; "
-+ * "end\n",
-+ *
-+ * TODO: fish prompt is shown when panel is hidden (Ctrl-O), but not when it is visible.
-+ * Find out how to fix this.
-+ */
-+ g_snprintf (precmd, buff_size,
-+ "function fish_prompt; "
-+ "echo (whoami)@(hostname -s):(set_color $fish_color_cwd)(pwd)(set_color normal)\\$\\ ; "
-+ "echo \"$PWD\">&%d; " "kill -STOP %%self; " "end\n", subshell_pipe[WRITE]);
-+ break;
-+
-+ default:
-+ break;
-+ }
-+}
-+
- /* --------------------------------------------------------------------------------------------- */
- /*** public functions ****************************************************************************/
- /* --------------------------------------------------------------------------------------------- */
-@@ -761,6 +950,7 @@ init_subshell (void)
- {
- /* This must be remembered across calls to init_subshell() */
- static char pty_name[BUF_SMALL];
-+ /* Must be considerably longer than BUF_SMALL (128) to support fancy shell prompts */
- char precmd[BUF_MEDIUM];
-
- switch (check_sid ())
-@@ -782,23 +972,8 @@ init_subshell (void)
-
- if (mc_global.tty.subshell_pty == 0)
- { /* First time through */
-- /* Find out what type of shell we have */
--
-- if (strstr (mc_global.tty.shell, "/zsh") || getenv ("ZSH_VERSION"))
-- subshell_type = ZSH;
-- else if (strstr (mc_global.tty.shell, "/tcsh"))
-- subshell_type = TCSH;
-- else if (strstr (mc_global.tty.shell, "/csh"))
-- subshell_type = TCSH;
-- else if (strstr (mc_global.tty.shell, "/bash") || getenv ("BASH"))
-- subshell_type = BASH;
-- else if (strstr (mc_global.tty.shell, "/fish"))
-- subshell_type = FISH;
-- else
-- {
-- mc_global.tty.use_subshell = FALSE;
-+ if (!init_subshell_type ())
- return;
-- }
-
- /* Open a pty for talking to the subshell */
-
-@@ -844,7 +1019,7 @@ init_subshell (void)
- return;
- }
- }
-- else /* subshell_type is BASH or ZSH */ if (pipe (subshell_pipe))
-+ else if (pipe (subshell_pipe)) /* subshell_type is BASH, ASH_BUSYBOX, DASH or ZSH */
- {
- perror (__FILE__ ": couldn't create pipe");
- mc_global.tty.use_subshell = FALSE;
-@@ -872,39 +1047,116 @@ init_subshell (void)
- init_subshell_child (pty_name);
- }
-
-- /* Set up 'precmd' or equivalent for reading the subshell's CWD */
-+ init_subshell_precmd (precmd, BUF_MEDIUM);
-+
-+ /* Set up `precmd' or equivalent for reading the subshell's CWD
-+ *
-+ * Attention! Never forget that these are *one-liners* even though the concatenated
-+ * substrings contain line breaks and indentation for better understanding of the
-+ * shell code. It is vital that each one-liner ends with a line feed character ("\n" ).
-+ */
-
- switch (subshell_type)
- {
- case BASH:
- g_snprintf (precmd, sizeof (precmd),
-- " PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND\n}'pwd>&%d;kill -STOP $$'\n",
-- subshell_pipe[WRITE]);
-+ " PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND\n}'pwd>&%d;kill -STOP $$'\n"
-+ "PS1='\\u@\\h:\\w\\$ '\n", subshell_pipe[WRITE]);
-+ break;
-+
-+ case ASH_BUSYBOX:
-+ /* BusyBox ash needs a somewhat complicated precmd emulation via PS1, and it is vital
-+ * that BB be built with active CONFIG_ASH_EXPAND_PRMT, but this is the default anyway.
-+ *
-+ * A: This leads to a stopped subshell (=frozen mc) if user calls "ash" command
-+ * "PS1='$(pwd>&%d; kill -STOP $$)\\u@\\h:\\w\\$ '\n",
-+ *
-+ * B: This leads to "sh: precmd: not found" in sub-subshell if user calls "ash" command
-+ * "precmd() { pwd>&%d; kill -STOP $$; }; "
-+ * "PS1='$(precmd)\\u@\\h:\\w\\$ '\n",
-+ *
-+ * C: This works if user calls "ash" command because in sub-subshell
-+ * PRECMD is unfedined, thus evaluated to empty string - no damage done.
-+ * Attention: BusyBox must be built with FEATURE_EDITING_FANCY_PROMPT to
-+ * permit \u, \w, \h, \$ escape sequences. Unfortunately this cannot be guaranteed,
-+ * especially on embedded systems where people try to save space, so let's use
-+ * the dash version below. It should work on virtually all systems.
-+ * "precmd() { pwd>&%d; kill -STOP $$; }; "
-+ * "PRECMD=precmd; "
-+ * "PS1='$(eval $PRECMD)\\u@\\h:\\w\\$ '\n",
-+ */
-+ case DASH:
-+ /* Debian ash needs a precmd emulation via PS1, similar to BusyBox ash,
-+ * but does not support escape sequences for user, host and cwd in prompt.
-+ * Attention! Make sure that the buffer for precmd is big enough.
-+ *
-+ * We want to have a fancy dynamic prompt with user@host:cwd just like in the BusyBox
-+ * examples above, but because replacing the home directory part of the path by "~" is
-+ * complicated, it bloats the precmd to a size > BUF_SMALL (128).
-+ *
-+ * The following example is a little less fancy (home directory not replaced)
-+ * and shows the basic workings of our prompt for easier understanding:
-+ *
-+ * "precmd() { "
-+ * "echo \"$USER@$(hostname -s):$PWD\"; "
-+ * "pwd>&%d; "
-+ * "kill -STOP $$; "
-+ * "}; "
-+ * "PRECMD=precmd; "
-+ * "PS1='$($PRECMD)$ '\n",
-+ */
-+ g_snprintf (precmd, sizeof (precmd),
-+ "precmd() { "
-+ "if [ ! \"${PWD##$HOME}\" ]; then "
-+ "MC_PWD=\"~\"; "
-+ "else "
-+ "[ \"${PWD##$HOME/}\" = \"$PWD\" ] && MC_PWD=\"$PWD\" || MC_PWD=\"~/${PWD##$HOME/}\"; "
-+ "fi; "
-+ "echo \"$USER@openwrt:$MC_PWD\"; "
-+ "pwd>&%d; "
-+ "kill -STOP $$; "
-+ "}; " "PRECMD=precmd; " "PS1='$($PRECMD)$ '\n", subshell_pipe[WRITE]);
- break;
-
- case ZSH:
- g_snprintf (precmd, sizeof (precmd),
-- " _mc_precmd(){ pwd>&%d;kill -STOP $$ }; precmd_functions+=(_mc_precmd)\n",
-- subshell_pipe[WRITE]);
-+ " _mc_precmd(){ pwd>&%d;kill -STOP $$ }; precmd_functions+=(_mc_precmd)\n"
-+ "PS1='%%n@%%m:%%~%%# '\n", subshell_pipe[WRITE]);
- break;
-
- case TCSH:
- g_snprintf (precmd, sizeof (precmd),
-- "set echo_style=both;"
-- "alias precmd 'echo $cwd:q >>%s;kill -STOP $$'\n", tcsh_fifo);
-+ "set echo_style=both; "
-+ "set prompt='%%n@%%m:%%~%%# '; "
-+ "alias precmd 'echo $cwd:q >>%s; kill -STOP $$'\n", tcsh_fifo);
- break;
-+
- case FISH:
- /* Use fish_prompt_mc function for prompt, if not present then copy fish_prompt to it. */
-+ /* We also want a fancy user@host:cwd prompt here, but fish makes it very easy to also
-+ * use colours, which is what we will do. But first here is a simpler, uncoloured version:
-+ * "function fish_prompt; "
-+ * "echo (whoami)@(hostname -s):(pwd)\\$\\ ; "
-+ * "echo \"$PWD\">&%d; "
-+ * "kill -STOP %%self; "
-+ * "end\n",
-+ *
-+ * TODO: fish prompt is shown when panel is hidden (Ctrl-O), but not when it is visible.
-+ * Find out how to fix this.
-+ */
- g_snprintf (precmd, sizeof (precmd),
- "if not functions -q fish_prompt_mc;"
- "functions -c fish_prompt fish_prompt_mc; end;"
-- "function fish_prompt; echo $PWD>&%d; fish_prompt_mc; kill -STOP %%self; end\n",
-+ "function fish_prompt;"
-+ "echo (whoami)@(hostname -s):(set_color $fish_color_cwd)(pwd)(set_color normal)\\$\\ ; "
-+ "echo \"$PWD\">&%d; fish_prompt_mc; kill -STOP %%self; end\n",
- subshell_pipe[WRITE]);
- break;
-
- default:
- break;
- }
-+
- write_all (mc_global.tty.subshell_pty, precmd, strlen (precmd));
-
- /* Wait until the subshell has started up and processed the command */
-@@ -1108,6 +1360,13 @@ subshell_name_quote (const char *s)
- quote_cmd_start = "(printf \"%b\" '";
- quote_cmd_end = "')";
- }
-+ /* TODO: When BusyBox printf is fixed, get rid of this "else if", see
-+ http://lists.busybox.net/pipermail/busybox/2012-March/077460.html */
-+ /* else if (subshell_type == ASH_BUSYBOX)
-+ {
-+ quote_cmd_start = "\"`echo -en '";
-+ quote_cmd_end = "'`\"";
-+ } */
- else
- {
- quote_cmd_start = "\"`printf \"%b\" '";
+--- a/src/subshell/common.c
++++ b/src/subshell/common.c
+@@ -849,7 +849,7 @@ init_subshell_precmd (char *precmd, size
+ "else "
+ "[ \"${PWD##$HOME/}\" = \"$PWD\" ] && MC_PWD=\"$PWD\" || MC_PWD=\"~/${PWD##$HOME/}\"; "
+ "fi; "
+- "echo \"$USER@$(hostname -s):$MC_PWD\"; "
++ "echo \"$USER@$HOSTNAME:$MC_PWD\"; "
+ "pwd>&%d; "
+ "kill -STOP $$; "
+ "}; " "PRECMD=precmd; " "PS1='$($PRECMD)$ '\n", subshell_pipe[WRITE]);
OpenOCD provides on-chip programming and debugging support with a
layered architecture of JTAG interface and TAP support including:
-- (X)SVF playback to faciliate automated boundary scan and FPGA/CPLD
+- (X)SVF playback to facilitate automated boundary scan and FPGA/CPLD
programming;
- debug target support (e.g. ARM, MIPS): single-stepping,
breakpoints/watchpoints, gprof profiling, etc;
}
@@ -998,7 +997,6 @@ pgp_select_file(sc_card_t *card, const s
- /* This file ID is refered when importing key&certificate via pkcs15init, like above.
+ /* This file ID is referred when importing key&certificate via pkcs15init, like above.
* We pretend to successfully find this inexistent file. */
if (id == 0x4402 || id == 0x5f48) {
- priv->current = NULL;
PKG_NAME:=pciutils
PKG_VERSION:=3.4.1
-PKG_RELEASE:=1
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
PREFIX="/usr" \
HOST="$(GNU_TARGET_NAME)" \
+ HWDB="no" \
ZLIB="yes"
ifneq ($(CONFIG_USE_GLIBC),)
endef
define Package/pps-tools/description
- Userland tools for GPS and DCF-77 Clock syncronization. PPS support in Kernel must be enabled.
+ Userland tools for GPS and DCF-77 Clock synchronization. PPS support in Kernel must be enabled.
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
include $(TOPDIR)/rules.mk
PKG_NAME:=qemu
-PKG_VERSION:=2.4.1
+PKG_VERSION:=2.5.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://wiki.qemu-project.org/download/
-PKG_SOURCE_MD5SUM:=a895e93ec1dafc34bc64ed676f0d55a6
+PKG_SOURCE_MD5SUM:=f469f2330bbe76e3e39db10e9ac4f8db
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
PKG_NAME:=rtl-sdr
PKG_VERSION:=0.5.3-20150608-$(PKG_SOURCE_VERSION)
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://git.osmocom.org/rtl-sdr.git
define Package/rtl-sdr/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_INSTALL_DIR)/usr/bin/rtl_* $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) files/rtl_tcp.init $(1)/etc/init.d/rtl_tcp
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) files/rtl_tcp.config $(1)/etc/config/rtl_tcp
endef
define Package/librtlsdr/install
--- /dev/null
+config rtl_tcp main
+ option disabled '1'
+ option respawn '1'
+ option device_index ''
+ option address '0.0.0.0'
+ option port ''
+ option frequency ''
+ option gain ''
+ option samplerate ''
+ option buffers '8'
+ option num_linked_lists '8'
+ option ppm_error ''
--- /dev/null
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2016 OpenWrt.org
+
+START=90
+STOP=10
+USE_PROCD=1
+
+append_arg() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get val "$cfg" "$var"
+ [ -n "$val" -o -n "$def" ] && procd_append_param command $opt "${val:-$def}"
+}
+
+append_bool() {
+ local cfg="$1"
+ local var="$2"
+ local opt="$3"
+ local def="$4"
+ local val
+
+ config_get_bool val "$cfg" "$var" "$def"
+ [ "$val" = 1 ] && procd_append_param command "$opt"
+}
+
+
+start_instance() {
+ local cfg="$1"
+ local aux
+
+ config_get_bool aux "$cfg" 'disabled' '0'
+ [ "$aux" = 1 ] && return 1
+
+ procd_open_instance
+
+ procd_set_param command /usr/bin/rtl_tcp
+ append_arg "$cfg" device_index "-d"
+ append_arg "$cfg" address "-a"
+ append_arg "$cfg" port "-p"
+ append_arg "$cfg" frequency "-f"
+ append_arg "$cfg" gain "-g"
+ append_arg "$cfg" samplerate "-s"
+ append_arg "$cfg" buffers "-b"
+ append_arg "$cfg" num_linked_lists "-n"
+ append_arg "$cfg" ppm_error "-P"
+
+ config_get_bool aux "$cfg" 'respawn' '0'
+ [ "$aux" = 1 ] && procd_set_param respawn
+
+ procd_close_instance
+}
+
+service_triggers() {
+ procd_add_reload_trigger "rtl_tcp"
+}
+
+start_service() {
+ config_load rtl_tcp
+ config_foreach start_instance rtl_tcp
+}
echo ""
dots=0
fi
- echo "Timeout occured, killing $NAME hardly."
+ echo "Timeout occurred, killing $NAME hardly."
kill -9 `ps $PSOPT | grep $NAME | grep -v grep | awk '{print $1}'` >/dev/null 2>&1
[ -f $PIDFILE ] && rm $PIDFILE
seconds=0
--- /dev/null
+config SQUASHFS_TOOLS_LZO_SUPPORT
+ depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs
+ bool "Enable LZO support"
+ select PACKAGE_liblzo
+ default y
+
+config SQUASHFS_TOOLS_LZ4_SUPPORT
+ depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs
+ bool "Enable LZ4 support"
+ select PACKAGE_liblz4
+ default y
+
+config SQUASHFS_TOOLS_XZ_SUPPORT
+ depends on PACKAGE_squashfs-tools-mksquashfs || PACKAGE_squashfs-tools-unsquashfs
+ bool "Enable XZ support"
+ select PACKAGE_liblzma
+ default y
--- /dev/null
+#
+# Copyright (C) 2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=squashfs-tools
+PKG_VERSION:=4.3
+PKG_RELEASE:=2
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=9c1db6d13a51a2e009f0027ef336ce03624eac0d
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_BUILD_PARALLEL:=1
+include $(INCLUDE_DIR)/package.mk
+
+define Package/squashfs-tools/Default
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=squashfs-tools
+ URL:=https://github.com/plougher/squashfs-tools
+ DEPENDS += +libpthread +zlib \
+ +SQUASHFS_TOOLS_LZO_SUPPORT:liblzo \
+ +SQUASHFS_TOOLS_LZ4_SUPPORT:liblz4 \
+ +SQUASHFS_TOOLS_XZ_SUPPORT:liblzma
+ MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
+endef
+
+define Package/squashfs-tools-mksquashfs
+ $(call Package/squashfs-tools/Default)
+ TITLE+= mksquashfs
+endef
+
+define Package/squashfs-tools-unsquashfs
+ $(call Package/squashfs-tools/Default)
+ TITLE+= unsquashfs
+endef
+
+define Package/squashfs-tools-unsquashfs/config
+ source "$(SOURCE)/Config.in"
+endef
+
+Build/Configure:=
+
+MAKE_FLAGS += \
+ XATTR_SUPPORT=
+
+ifneq ($(CONFIG_SQUASHFS_TOOLS_XZ_SUPPORT),)
+MAKE_FLAGS += XZ_SUPPORT=1
+endif
+
+ifneq ($(CONFIG_SQUASHFS_TOOLS_LZO_SUPPORT),)
+MAKE_FLAGS += LZO_SUPPORT=1
+endif
+
+ifneq ($(CONFIG_SQUASHFS_TOOLS_LZ4_SUPPORT),)
+MAKE_FLAGS += LZ4_SUPPORT=1
+endif
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR)/squashfs-tools \
+ CC="$(TARGET_CC)" \
+ $(MAKE_FLAGS) \
+ mksquashfs unsquashfs
+endef
+
+define Package/squashfs-tools-mksquashfs/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/mksquashfs $(1)/usr/sbin/mksquashfs
+endef
+
+define Package/squashfs-tools-unsquashfs/install
+ $(INSTALL_DIR) $(1)/usr/sbin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/squashfs-tools/unsquashfs $(1)/usr/sbin/unsquashfs
+endef
+
+$(eval $(call BuildPackage,squashfs-tools-mksquashfs))
+$(eval $(call BuildPackage,squashfs-tools-unsquashfs))
--- /dev/null
+From a0c129760ca9bdc7e564ae2a508fac3799f9d39b Mon Sep 17 00:00:00 2001
+From: Alexandru Ardelean <aa@ocedo.com>
+Date: Wed, 6 Jan 2016 15:33:43 +0200
+Subject: [PATCH 1/2] squashfs-tools: with fnmatch.h compatibility with musl
+
+Signed-off-by: Alexandru Ardelean <aa@ocedo.com>
+---
+ squashfs-tools/action.c | 2 +-
+ squashfs-tools/fnmatch_compat.h | 32 ++++++++++++++++++++++++++++++++
+ squashfs-tools/mksquashfs.c | 2 +-
+ squashfs-tools/unsquashfs.c | 1 +
+ squashfs-tools/unsquashfs.h | 1 -
+ 5 files changed, 35 insertions(+), 3 deletions(-)
+ create mode 100644 squashfs-tools/fnmatch_compat.h
+
+diff --git a/squashfs-tools/action.c b/squashfs-tools/action.c
+index 35889a4..4b06ccb 100644
+--- a/squashfs-tools/action.c
++++ b/squashfs-tools/action.c
+@@ -31,7 +31,6 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-#include <fnmatch.h>
+ #include <pwd.h>
+ #include <grp.h>
+ #include <sys/wait.h>
+@@ -43,6 +42,7 @@
+ #include "mksquashfs.h"
+ #include "action.h"
+ #include "error.h"
++#include "fnmatch_compat.h"
+
+ /*
+ * code to parse actions
+diff --git a/squashfs-tools/fnmatch_compat.h b/squashfs-tools/fnmatch_compat.h
+new file mode 100644
+index 0000000..7b4afd8
+--- /dev/null
++++ b/squashfs-tools/fnmatch_compat.h
+@@ -0,0 +1,32 @@
++#ifndef FNMATCH_COMPAT
++#define FNMATCH_COMPAT
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2015
++ * Phillip Lougher <phillip@squashfs.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * fnmatch_compat.h
++ */
++
++#include <fnmatch.h>
++
++#ifndef FNM_EXTMATCH
++#define FNM_EXTMATCH 0
++#endif
++
++#endif
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index d221c35..4e7cbdd 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -46,7 +46,6 @@
+ #include <sys/mman.h>
+ #include <pthread.h>
+ #include <regex.h>
+-#include <fnmatch.h>
+ #include <sys/wait.h>
+ #include <limits.h>
+ #include <ctype.h>
+@@ -76,6 +75,7 @@
+ #include "read_fs.h"
+ #include "restore.h"
+ #include "process_fragments.h"
++#include "fnmatch_compat.h"
+
+ int delete = FALSE;
+ int fd;
+diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
+index 1323dd6..2428baa 100644
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -30,6 +30,7 @@
+ #include "xattr.h"
+ #include "unsquashfs_info.h"
+ #include "stdarg.h"
++#include "fnmatch_compat.h"
+
+ #include <sys/sysinfo.h>
+ #include <sys/types.h>
+diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
+index ecd0bb4..0edbd25 100644
+--- a/squashfs-tools/unsquashfs.h
++++ b/squashfs-tools/unsquashfs.h
+@@ -40,7 +40,6 @@
+ #include <grp.h>
+ #include <time.h>
+ #include <regex.h>
+-#include <fnmatch.h>
+ #include <signal.h>
+ #include <pthread.h>
+ #include <math.h>
+--
+2.1.4
+
--- /dev/null
+From 0ea07a1b5ddb2f2fa1358b2c1b42bcf34bbf5ee2 Mon Sep 17 00:00:00 2001
+From: Alexandru Ardelean <aa@ocedo.com>
+Date: Wed, 6 Jan 2016 15:36:48 +0200
+Subject: [PATCH 2/2] pseudo.c: add explicit <stat.h> include
+
+Signed-off-by: Alexandru Ardelean <aa@ocedo.com>
+---
+ squashfs-tools/pseudo.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/squashfs-tools/pseudo.c b/squashfs-tools/pseudo.c
+index f85fe60..7a26bca 100644
+--- a/squashfs-tools/pseudo.c
++++ b/squashfs-tools/pseudo.c
+@@ -32,6 +32,7 @@
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
++#include <sys/stat.h>
+ #include <ctype.h>
+
+ #include "pseudo.h"
+--
+2.1.4
+
--- /dev/null
+From ac6268e843c43286eebff2a1052182c2393cdb2e Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Mon, 14 Sep 2015 12:31:42 +0800
+Subject: [PATCH] mksquashfs.c: get inline functions work with both gnu11 and gnu89
+
+Upstream-Status: Pending
+
+After gcc upgraded to gcc5, and if the codes is compiled without optimization(-O0),
+and the below error will happen:
+
+| mksquashfs.o: In function `create_inode':
+| git/squashfs-tools/mksquashfs.c:897: undefined reference to `get_inode_no'
+| git/squashfs-tools/mksquashfs.c:960: undefined reference to `get_parent_no'
+| git/squashfs-tools/mksquashfs.c:983: undefined reference to `get_parent_no'
+| mksquashfs.o: In function `reader_read_process':
+| git/squashfs-tools/mksquashfs.c:2132: undefined reference to `is_fragment'
+| mksquashfs.o: In function `reader_read_file':
+| git/squashfs-tools/mksquashfs.c:2228: undefined reference to `is_fragment'
+| mksquashfs.o: In function `dir_scan':
+| git/squashfs-tools/mksquashfs.c:3101: undefined reference to `create_dir_entry'
+
+gcc5 defaults to -std=gnu11 instead of -std=gnu89, and it requires that exactly one C
+source file has the callable copy of the inline function. Consider the following
+program:
+
+ inline int
+ foo (void)
+ {
+ return 42;
+ }
+
+ int
+ main (void)
+ {
+ return foo ();
+ }
+
+The program above will not link with the C99 inline semantics, because no out-of-line
+function foo is generated. To fix this, either mark the function foo as static, or
+add the following declaration:
+ static inline int foo (void);
+
+more information refer to: https://gcc.gnu.org/gcc-5/porting_to.html;
+
+but the use of "extern inline" will lead to the compilation issue if gcc is not
+gcc5, as the commit in oe-core d0af30c92fde [alsa-lib: Change function type to
+"static __inline__"]
+ "extern __inline__ function()" is the inlined version that
+ can be used in this compilation unit, but there will be another
+ definition of this function somewhere, so compiler will not emit
+ any code for the function body. This causes problem in -O0,
+ where functions are never inlined, the function call is preserved,
+ but linker can't find the symbol, thus the error happens.
+
+so replace "inline" with "static inline" to make it work with both gnu11 and gnu89
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ squashfs-tools/mksquashfs.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index d221c35..6bba1d2 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -828,13 +828,13 @@ char *subpathname(struct dir_ent *dir_ent)
+ }
+
+
+-inline unsigned int get_inode_no(struct inode_info *inode)
++static inline unsigned int get_inode_no(struct inode_info *inode)
+ {
+ return inode->inode_number;
+ }
+
+
+-inline unsigned int get_parent_no(struct dir_info *dir)
++static inline unsigned int get_parent_no(struct dir_info *dir)
+ {
+ return dir->depth ? get_inode_no(dir->dir_ent->inode) : inode_no;
+ }
+@@ -2027,7 +2027,7 @@ struct file_info *duplicate(long long file_size, long long bytes,
+ }
+
+
+-inline int is_fragment(struct inode_info *inode)
++static inline int is_fragment(struct inode_info *inode)
+ {
+ off_t file_size = inode->buf.st_size;
+
+@@ -2996,13 +2996,13 @@ struct inode_info *lookup_inode2(struct stat *buf, int pseudo, int id)
+ }
+
+
+-inline struct inode_info *lookup_inode(struct stat *buf)
++static inline struct inode_info *lookup_inode(struct stat *buf)
+ {
+ return lookup_inode2(buf, 0, 0);
+ }
+
+
+-inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
++static inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
+ {
+ if (inode->inode_number == 0) {
+ inode->inode_number = use_this ? : inode_no ++;
+@@ -3013,7 +3013,7 @@ inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
+ }
+
+
+-inline struct dir_ent *create_dir_entry(char *name, char *source_name,
++static inline struct dir_ent *create_dir_entry(char *name, char *source_name,
+ char *nonstandard_pathname, struct dir_info *dir)
+ {
+ struct dir_ent *dir_ent = malloc(sizeof(struct dir_ent));
+@@ -3031,7 +3031,7 @@ inline struct dir_ent *create_dir_entry(char *name, char *source_name,
+ }
+
+
+-inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
++static inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
+ struct inode_info *inode_info)
+ {
+ struct dir_info *dir = dir_ent->our_dir;
+@@ -3047,7 +3047,7 @@ inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
+ }
+
+
+-inline void add_dir_entry2(char *name, char *source_name,
++static inline void add_dir_entry2(char *name, char *source_name,
+ char *nonstandard_pathname, struct dir_info *sub_dir,
+ struct inode_info *inode_info, struct dir_info *dir)
+ {
+@@ -3059,7 +3059,7 @@ inline void add_dir_entry2(char *name, char *source_name,
+ }
+
+
+-inline void free_dir_entry(struct dir_ent *dir_ent)
++static inline void free_dir_entry(struct dir_ent *dir_ent)
+ {
+ if(dir_ent->name)
+ free(dir_ent->name);
+@@ -3080,7 +3080,7 @@ inline void free_dir_entry(struct dir_ent *dir_ent)
+ }
+
+
+-inline void add_excluded(struct dir_info *dir)
++static inline void add_excluded(struct dir_info *dir)
+ {
+ dir->excluded ++;
+ }
+--
+1.9.1
+
PKG_NAME:=usbmuxd
PKG_VERSION:=1.1.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_MAINTAINER:=Lukasz Baj <l.baj@radytek.com>
PKG_SOURCE_URL:=https://github.com/libimobiledevice/usbmuxd.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=4bd7cd0d28e7f5920de51470b863f3aeee00409d
+PKG_SOURCE_VERSION:=35e5d48f29ae03b2b9686109e4ed9ab8b9677ce8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_FIXUP:=autoreconf
endef
define Package/watchcat/description
-Allows to configure a periodically reboot, or after loosing internet connectivity. Configured trough UCI /etc/config/system.
+Allows to configure a periodically reboot, or after losing internet connectivity. Configured trough UCI /etc/config/system.
endef
define Package/watchcat/conffiles
include $(TOPDIR)/rules.mk
PKG_NAME:=zoneinfo
-PKG_VERSION:=2016a
-PKG_VERSION_CODE:=2016a
+PKG_VERSION:=2016c
+PKG_VERSION_CODE:=2016c
PKG_RELEASE:=1
#As i couldn't find real license used "Public Domain"
PKG_SOURCE:=tzdata$(PKG_VERSION).tar.gz
PKG_SOURCE_CODE:=tzcode$(PKG_VERSION_CODE).tar.gz
PKG_SOURCE_URL:=http://www.iana.org/time-zones/repository/releases
-PKG_MD5SUM:=0d3123eb1b453ec0620822bd65be4c42
+PKG_MD5SUM:=0330ccd16140d3b6438a18dae9b34b93
include $(INCLUDE_DIR)/package.mk
define Download/tzcode
FILE=$(PKG_SOURCE_CODE)
URL=$(PKG_SOURCE_URL)
- MD5SUM:=f5e0299925631da7cf82d8ce1205111d
+ MD5SUM:=ffb82ab0b588138759902b4627a6a80d
endef
$(eval $(call Download,tzcode))