aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDaniel Salzman <daniel.salzman@nic.cz>2016-05-06 15:16:16 +0200
committerDaniel Salzman <daniel.salzman@nic.cz>2016-05-06 15:16:16 +0200
commit0c0331dac59356ac8cbb2796d9443529e3a9cb21 (patch)
treec2ba832bc700bfc0233478cacc8c49abb99049c7 /net
parentb366588c95f10044fafac3d8883281ccafc9e6b6 (diff)
knot: update to 2.2.0
Signed-off-by: Daniel Salzman <daniel.salzman@nic.cz>
Diffstat (limited to 'net')
-rw-r--r--net/knot/Makefile13
-rw-r--r--net/knot/patches/03_contrib_files.patch15
-rw-r--r--net/knot/patches/03_libtap_files.patch15
-rw-r--r--net/knot/patches/04_hostname.patch37
4 files changed, 58 insertions, 22 deletions
diff --git a/net/knot/Makefile b/net/knot/Makefile
index 104bd3ec0..608f1ad9a 100644
--- a/net/knot/Makefile
+++ b/net/knot/Makefile
@@ -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
diff --git a/net/knot/patches/03_contrib_files.patch b/net/knot/patches/03_contrib_files.patch
new file mode 100644
index 000000000..02f519803
--- /dev/null
+++ b/net/knot/patches/03_contrib_files.patch
@@ -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;
diff --git a/net/knot/patches/03_libtap_files.patch b/net/knot/patches/03_libtap_files.patch
deleted file mode 100644
index bb7b34261..000000000
--- a/net/knot/patches/03_libtap_files.patch
+++ /dev/null
@@ -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");
diff --git a/net/knot/patches/04_hostname.patch b/net/knot/patches/04_hostname.patch
new file mode 100644
index 000000000..8e43189a0
--- /dev/null
+++ b/net/knot/patches/04_hostname.patch
@@ -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);