Ticket #9374: unbound-1.4.9+ldns.diff

File unbound-1.4.9+ldns.diff, 7.9 KB (added by Cybjit <Cybjit@…>, 7 years ago)

add ldns-package, upgrade to 1.4.9, link to libunbound and libldns

  • new file net/ldns/Makefile

    diff --git a/net/ldns/Makefile b/net/ldns/Makefile
    new file mode 100644
    index 0000000..db1fbaa
    - +  
     1# 
     2# Copyright (C) 2010 OpenWrt.org 
     3# 
     4# This is free software, licensed under the GNU General Public License v2. 
     5# See /LICENSE for more information. 
     6# 
     7 
     8include $(TOPDIR)/rules.mk 
     9 
     10PKG_NAME:=ldns 
     11PKG_VERSION:=1.6.9 
     12PKG_RELEASE:=1 
     13 
     14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     15PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/ldns/ 
     16PKG_MD5SUM:=fc9db99cfe7c9d7f86da8f53efdbbbd6 
     17 
     18PKG_FIXUP:=libtool 
     19PKG_INSTALL:=1 
     20PKG_LIBTOOL_PATHS:= ./libtool 
     21 
     22include $(INCLUDE_DIR)/package.mk 
     23 
     24define Package/libldns 
     25  SECTION:=net 
     26  CATEGORY:=Network 
     27  SUBMENU:=IP Addresses and Names 
     28  TITLE:=Library for DNS programming 
     29  URL:=http://www.nlnetlabs.nl/projects/ldns/ 
     30  DEPENDS:=+libopenssl 
     31endef 
     32 
     33CONFIGURE_ARGS += \ 
     34        --with-ssl="$(STAGING_DIR)/usr" \ 
     35        --disable-gost 
     36 
     37define Build/InstallDev 
     38        $(CP) $(PKG_INSTALL_DIR)/* $(1)/ 
     39endef 
     40 
     41define Package/libldns/install 
     42        $(INSTALL_DIR) $(1)/usr/lib 
     43        $(CP) \ 
     44                $(PKG_INSTALL_DIR)/usr/lib/libldns.so* \ 
     45                $(1)/usr/lib/ 
     46endef 
     47 
     48$(eval $(call BuildPackage,libldns)) 
     49 
  • net/unbound/Makefile

    diff --git a/net/unbound/Makefile b/net/unbound/Makefile
    index 5f9948e..22d97c3 100644
    a b  
    88include $(TOPDIR)/rules.mk 
    99 
    1010PKG_NAME:=unbound 
    11 PKG_VERSION:=1.4.5 
    12 PKG_RELEASE:=3 
     11PKG_VERSION:=1.4.9 
     12PKG_RELEASE:=2 
    1313 
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    1515PKG_SOURCE_URL:=http://www.unbound.net/downloads 
    16 PKG_MD5SUM:=f1f6c97b90b15ca503a80b888c311d6c 
     16PKG_MD5SUM:=7079e75210c656761d3804a9f2ac7b9f 
    1717 
    1818PKG_FIXUP:=libtool 
    1919PKG_INSTALL:=1 
    define Package/unbound 
    2727  SUBMENU:=IP Addresses and Names 
    2828  TITLE:=A validating, recursive, and caching DNS resolver 
    2929  URL:=http://www.unbound.net/ 
    30   DEPENDS:=+libopenssl 
     30  DEPENDS:=+libopenssl +libldns 
    3131endef 
    3232 
    3333CONFIGURE_ARGS += \ 
    3434        --with-ssl="$(STAGING_DIR)/usr" \ 
    3535        --without-pthreads \ 
     36        --disable-gost \ 
     37        --enable-allsymbols \ 
     38        --with-ldns="$(STAGING_DIR)/usr" 
    3639 
    3740define Package/unbound/conffiles 
    3841/etc/unbound/unbound.conf 
  • new file net/unbound/patches/001-allsym.patch

    diff --git a/net/unbound/patches/001-allsym.patch b/net/unbound/patches/001-allsym.patch
    new file mode 100644
    index 0000000..9c838b5
    - +  
     1diff --git a/Makefile.in b/Makefile.in 
     2index e9bce72..326c938 100644 
     3--- a/Makefile.in 
     4+++ b/Makefile.in 
     5@@ -45,6 +45,7 @@ UB_ON_WINDOWS=@UB_ON_WINDOWS@ 
     6 WITH_PYTHONMODULE=@WITH_PYTHONMODULE@ 
     7 WITH_PYUNBOUND=@WITH_PYUNBOUND@ 
     8 PYTHON_SITE_PKG=@PYTHON_SITE_PKG@ 
     9+EXPORT_ALL_SYMBOLS=@EXPORT_ALL_SYMBOLS@ 
     10  
     11 SWIG=@SWIG@ 
     12 YACC=@YACC@ 
     13@@ -102,13 +103,25 @@ UNITTEST_SRC=$(patsubst $(srcdir)/%,%, \ 
     14        testcode/readhex.c testcode/ldns-testpkts.c smallapp/worker_cb.c \ 
     15        $(COMMON_SRC) 
     16 UNITTEST_OBJ=$(addprefix $(BUILD),$(UNITTEST_SRC:.c=.lo)) $(COMPAT_OBJ) 
     17-DAEMON_SRC=$(patsubst $(srcdir)/%,%, $(wildcard $(srcdir)/daemon/*.c)) \ 
     18-       $(COMMON_SRC) 
     19+ 
     20+DAEMON_SRC=$(patsubst $(srcdir)/%,%, $(wildcard $(srcdir)/daemon/*.c)) 
     21+ifneq "$(EXPORT_ALL_SYMBOLS)" "yes" 
     22+DAEMON_SRC+=$(COMMON_SRC) 
     23+endif 
     24 DAEMON_OBJ=$(addprefix $(BUILD),$(DAEMON_SRC:.c=.lo)) $(COMPAT_OBJ) 
     25-CHECKCONF_SRC=smallapp/unbound-checkconf.c smallapp/worker_cb.c $(COMMON_SRC) 
     26+ 
     27+CHECKCONF_SRC=smallapp/unbound-checkconf.c smallapp/worker_cb.c 
     28+ifneq "$(EXPORT_ALL_SYMBOLS)" "yes" 
     29+CHECKCONF_SRC+=$(COMMON_SRC) 
     30+endif 
     31 CHECKCONF_OBJ=$(addprefix $(BUILD),$(CHECKCONF_SRC:.c=.lo)) $(COMPAT_OBJ) 
     32-CONTROL_SRC=smallapp/unbound-control.c smallapp/worker_cb.c $(COMMON_SRC) 
     33+ 
     34+CONTROL_SRC=smallapp/unbound-control.c smallapp/worker_cb.c 
     35+ifneq "$(EXPORT_ALL_SYMBOLS)" "yes" 
     36+CONTROL_SRC+=$(COMMON_SRC) 
     37+endif 
     38 CONTROL_OBJ=$(addprefix $(BUILD),$(CONTROL_SRC:.c=.lo)) $(COMPAT_OBJ) 
     39+ 
     40 HOST_SRC=smallapp/unbound-host.c 
     41 HOST_OBJ=$(addprefix $(BUILD),$(HOST_SRC:.c=.lo)) $(filter-out $(BUILD)compat/ctime_r.lo, $(COMPAT_OBJ)) 
     42 UBANCHOR_SRC=smallapp/unbound-anchor.c 
     43@@ -224,10 +237,19 @@ else 
     44 ldnslib= 
     45 endif 
     46  
     47+UBSYMS+=-export-symbols $(srcdir)/libunbound/ubsyms.def 
     48+CLUBSYMS=-export-symbols $(BUILD)clubsyms.def 
     49+EXTRALINK= 
     50+ifeq "$(EXPORT_ALL_SYMBOLS)" "yes" 
     51+UBSYMS= 
     52+CLUBSYMS= 
     53+EXTRALINK=-L. -L.libs -lunbound 
     54+endif 
     55+ 
     56 libunbound.la: $(LIBUNBOUND_OBJ) $(ldnslib) 
     57        $(INFO) Link $@ 
     58 ifeq ($(CHECKLOCK_SRC),) 
     59-       $Q$(LINK_LIB) -export-symbols $(srcdir)/libunbound/ubsyms.def -o $@ $(sort $(LIBUNBOUND_OBJ)) -rpath $(libdir) $(LIBS) 
     60+       $Q$(LINK_LIB) $(UBSYMS) -o $@ $(sort $(LIBUNBOUND_OBJ)) -rpath $(libdir) $(LIBS) 
     61 else 
     62        cp $(srcdir)/libunbound/ubsyms.def $(BUILD)clubsyms.def 
     63        echo lock_protect >> $(BUILD)clubsyms.def 
     64@@ -240,20 +262,20 @@ else 
     65        echo checklock_init >> $(BUILD)clubsyms.def 
     66        echo checklock_thrcreate >> $(BUILD)clubsyms.def 
     67        echo checklock_thrjoin >> $(BUILD)clubsyms.def 
     68-       $Q$(LINK_LIB) -export-symbols $(BUILD)clubsyms.def -o $@ $(sort $(LIBUNBOUND_OBJ)) -rpath $(libdir) $(LIBS) 
     69+       $Q$(LINK_LIB) $(CLUBSYMS) -o $@ $(sort $(LIBUNBOUND_OBJ)) -rpath $(libdir) $(LIBS) 
     70 endif 
     71  
     72-unbound$(EXEEXT):      $(DAEMON_OBJ) $(ldnslib) 
     73+unbound$(EXEEXT):      $(DAEMON_OBJ) libunbound.la $(ldnslib) 
     74        $(INFO) Link $@ 
     75-       $Q$(LINK) -o $@ $(sort $(DAEMON_OBJ)) -lssl $(LIBS) 
     76+       $Q$(LINK) -o $@ $(sort $(DAEMON_OBJ)) $(EXTRALINK) -lssl $(LIBS) 
     77  
     78-unbound-checkconf$(EXEEXT):    $(CHECKCONF_OBJ) $(ldnslib) 
     79+unbound-checkconf$(EXEEXT):    $(CHECKCONF_OBJ) libunbound.la $(ldnslib) 
     80        $(INFO) Link $@ 
     81-       $Q$(LINK) -o $@ $(sort $(CHECKCONF_OBJ)) $(LIBS) 
     82+       $Q$(LINK) -o $@ $(sort $(CHECKCONF_OBJ)) $(EXTRALINK) -lssl $(LIBS) 
     83  
     84-unbound-control$(EXEEXT):      $(CONTROL_OBJ) $(ldnslib) 
     85+unbound-control$(EXEEXT):      $(CONTROL_OBJ) libunbound.la $(ldnslib) 
     86        $(INFO) Link $@ 
     87-       $Q$(LINK) -o $@ $(sort $(CONTROL_OBJ)) -lssl $(LIBS) 
     88+       $Q$(LINK) -o $@ $(sort $(CONTROL_OBJ)) $(EXTRALINK) -lssl $(LIBS) 
     89  
     90 unbound-host$(EXEEXT): $(HOST_OBJ) libunbound.la $(ldnslib) 
     91        $(INFO) Link $@ 
     92diff --git a/configure b/configure 
     93index 8159007..aa5110c 100755 
     94--- a/configure 
     95+++ b/configure 
     96@@ -607,6 +607,7 @@ enable_option_checking=no 
     97 ac_subst_vars='LTLIBOBJS 
     98 subdirs 
     99 ldnsdir 
     100+EXPORT_ALL_SYMBOLS 
     101 WINDRES 
     102 UB_ON_WINDOWS 
     103 CHECKLOCK_SRC 
     104@@ -763,6 +764,7 @@ enable_lock_checks 
     105 enable_alloc_checks 
     106 enable_alloc_lite 
     107 enable_alloc_nonregional 
     108+enable_allsymbols 
     109 with_ldns 
     110 with_ldns_builtin 
     111 ' 
     112@@ -1416,6 +1418,9 @@ Optional Features: 
     113                           enable nonregional allocs, slow but exposes regional 
     114                           allocations to other memory purifiers, for debug 
     115                           purposes 
     116+  --enable-allsymbols     export all symbols from libunbound and link binaries 
     117+                          to it, smaller install size but libunbound export 
     118+                          table is polluted by internal symbols 
     119  
     120 Optional Packages: 
     121   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes] 
     122@@ -16626,6 +16631,21 @@ fi 
     123  
     124  
     125  
     126+# Check whether --enable-allsymbols was given. 
     127+if test "${enable_allsymbols+set}" = set; then : 
     128+  enableval=$enable_allsymbols; 
     129+fi 
     130+ 
     131+case "$enable_allsymbols" in 
     132+       no) 
     133+       EXPORT_ALL_SYMBOLS=no 
     134+       ;; 
     135+       yes) 
     136+       EXPORT_ALL_SYMBOLS=yes 
     137+       ;; 
     138+esac 
     139+ 
     140+ 
     141 # check this after all other compilation checks, since the linking of the lib 
     142 # may break checks after this. 
     143 use_ldns_builtin="no" 
     144diff --git a/configure.ac b/configure.ac 
     145index 7c3e2af..56597a9 100644 
     146--- a/configure.ac 
     147+++ b/configure.ac 
     148@@ -695,6 +695,17 @@ AC_REPLACE_FUNCS(memmove) 
     149 AC_REPLACE_FUNCS(gmtime_r) 
     150 AC_REPLACE_FUNCS(ctime_r) 
     151  
     152+AC_ARG_ENABLE(allsymbols, AC_HELP_STRING([--enable-allsymbols], [export all symbols from libunbound and link binaries to it, smaller install size but libunbound export table is polluted by internal symbols])) 
     153+case "$enable_allsymbols" in 
     154+       no) 
     155+       EXPORT_ALL_SYMBOLS=no 
     156+       ;; 
     157+       yes) 
     158+       EXPORT_ALL_SYMBOLS=yes 
     159+       ;; 
     160+esac 
     161+AC_SUBST(EXPORT_ALL_SYMBOLS) 
     162+ 
     163 # check this after all other compilation checks, since the linking of the lib 
     164 # may break checks after this. 
     165 use_ldns_builtin="no" 
     166