Merge pull request #2661 from salzmdan/master
Update liburcu, add libedit and update knot
This commit is contained in:
commit
dc08dfbaf9
|
@ -0,0 +1,54 @@
|
|||
#
|
||||
# Copyright (C) 2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libedit
|
||||
PKG_VERSION:=20150325-3.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://thrysoee.dk/editline/
|
||||
PKG_MD5SUM:=43cdb5df3061d78b5e9d59109871b4f6
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libedit
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=BSD editline and history library
|
||||
URL:=http://thrysoee.dk/editline/
|
||||
DEPENDS:=+libncurses
|
||||
endef
|
||||
|
||||
define Package/libedit/description
|
||||
Generic line editing, history, and tokenization functions similar to GNU Readline.
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/include/editline
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/editline/*.h $(1)/usr/include/editline/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libedit.{a,so*} $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libedit/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libedit.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libedit))
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
# Copyright (C) 2014 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
|
||||
# Copyright (C) 2014-2016 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
@ -9,13 +9,15 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=liburcu
|
||||
PKG_VERSION:=0.8.7
|
||||
PKG_VERSION:=0.9.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
|
||||
PKG_LICENSE:=LGPL-2.1 GPL-2.0 GPL-3.0 MIT
|
||||
|
||||
PKG_SOURCE:=userspace-rcu-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_SUBDIR:=userspace-rcu-$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=https://lttng.org/files/urcu/
|
||||
PKG_MD5SUM:=7a6ee17871d31226db3f618e28351d22
|
||||
PKG_MD5SUM:=49f86e68c1e2f41d303381a271b791d1
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/userspace-rcu-$(PKG_VERSION)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
@ -29,7 +31,6 @@ define Package/liburcu
|
|||
CATEGORY:=Libraries
|
||||
TITLE:=User-space Read-Copy-Update library
|
||||
URL:=https://lttng.org/
|
||||
MAINTAINER:=daniel.salzman@nic.cz
|
||||
DEPENDS:=+libpthread
|
||||
endef
|
||||
|
||||
|
|
|
@ -8,13 +8,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=knot
|
||||
PKG_VERSION:=2.1.1
|
||||
PKG_VERSION:=2.2.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=https://secure.nic.cz/files/knot-dns/
|
||||
PKG_MD5SUM:=ee6a54ec8a7898579b768c66e2eaeb54
|
||||
PKG_MD5SUM:=ac00a189038fd692c53b2e8c1837c5cb
|
||||
|
||||
PKG_MAINTAINER:=Daniel Salzman <daniel.salzman@nic.cz>
|
||||
PKG_LICENSE:=GPL-3.0 LGPL-2.0 0BSD MIT OLDAP-2.8
|
||||
|
@ -62,7 +61,7 @@ endef
|
|||
define Package/knot
|
||||
$(call Package/knot/Default)
|
||||
TITLE+= server
|
||||
DEPENDS=+liburcu +knot-libdnssec +knot-libknot +knot-libzscanner
|
||||
DEPENDS=+liburcu +libedit +knot-libdnssec +knot-libknot +knot-libzscanner
|
||||
endef
|
||||
|
||||
define Package/knot-dig
|
||||
|
@ -161,9 +160,9 @@ endef
|
|||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/libtap check
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/src/dnssec/tests check-compile-only
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/tests check-compile-only
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/src/zscanner check-compile-only
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/src/dnssec/tests check-compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/tests check-compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/src/zscanner check-compile
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
diff --git a/src/contrib/files.c b/src/contrib/files.c
|
||||
index 8aee482..12f36ca 100644
|
||||
--- a/src/contrib/files.c
|
||||
+++ b/src/contrib/files.c
|
||||
@@ -24,6 +24,10 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
+#ifndef O_NOFOLLOW
|
||||
+#define O_NOFOLLOW 0
|
||||
+#endif
|
||||
+
|
||||
static bool special_name(const char *name)
|
||||
{
|
||||
return strcmp(name, ".") == 0 || strcmp(name, "..") == 0;
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/libtap/tap/files.c b/libtap/tap/files.c
|
||||
index 0c24075..d33db6c 100644
|
||||
--- a/libtap/tap/files.c
|
||||
+++ b/libtap/tap/files.c
|
||||
@@ -27,6 +27,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
+#ifndef O_NOFOLLOW
|
||||
+#define O_NOFOLLOW 0
|
||||
+#endif
|
||||
+
|
||||
char *test_mkdtemp(void)
|
||||
{
|
||||
char *tmpdir = getenv("TMPDIR");
|
|
@ -0,0 +1,37 @@
|
|||
diff --git a/src/knot/conf/base.c b/src/knot/conf/base.c
|
||||
index 9a0a655..e4721ad 100644
|
||||
--- a/src/knot/conf/base.c
|
||||
+++ b/src/knot/conf/base.c
|
||||
@@ -101,6 +101,10 @@ void conf_refresh_hostname(
|
||||
|
||||
free(conf->hostname);
|
||||
conf->hostname = sockaddr_hostname();
|
||||
+ if (conf->hostname == NULL) {
|
||||
+ // Empty hostname fallback, NULL cannot be passed to strlen!
|
||||
+ conf->hostname = strdup("");
|
||||
+ }
|
||||
}
|
||||
|
||||
static void init_cache(
|
||||
@@ -206,7 +210,7 @@ int conf_new(
|
||||
|
||||
// Cache the current hostname.
|
||||
if (!(flags & CONF_FNOHOSTNAME)) {
|
||||
- out->hostname = sockaddr_hostname();
|
||||
+ conf_refresh_hostname(out);
|
||||
}
|
||||
|
||||
// Initialize cached values.
|
||||
diff --git a/src/knot/modules/dnstap.c b/src/knot/modules/dnstap.c
|
||||
index 890663d..b60c1ca 100644
|
||||
--- a/src/knot/modules/dnstap.c
|
||||
+++ b/src/knot/modules/dnstap.c
|
||||
@@ -241,7 +241,7 @@ int dnstap_load(struct query_plan *plan, struct query_module *self,
|
||||
} else {
|
||||
ctx->identity = sockaddr_hostname();
|
||||
}
|
||||
- ctx->identity_len = strlen(ctx->identity);
|
||||
+ ctx->identity_len = (ctx->identity != NULL) ? strlen(ctx->identity) : 0;
|
||||
|
||||
// Set version.
|
||||
val = conf_mod_get(self->config, MOD_VERSION, self->id);
|
Loading…
Reference in New Issue