Ticket #9374: unbound-1.4.11+ldns-2.diff

File unbound-1.4.11+ldns-2.diff, 5.3 KB (added by Cybjit <cybjit@…>, 7 years ago)

add ldns-package, upgrade to 1.4.11, link to libunbound and libldns, reduce mem, parallel build

  • new file net/ldns/Makefile

    diff --git a/net/ldns/Makefile b/net/ldns/Makefile
    new file mode 100644
    index 0000000..05208f7
    - +  
     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.10 
     12PKG_RELEASE:=1 
     13 
     14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     15PKG_SOURCE_URL:=http://www.nlnetlabs.nl/downloads/ldns/ 
     16PKG_MD5SUM:=fadf8e38fbd2d3434a2c46097d9932d5 
     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..7646778 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.11 
     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:=8e9903dd5cba0d3501e24f55b25debbd 
    1717 
    1818PKG_FIXUP:=libtool 
    1919PKG_INSTALL:=1 
    2020PKG_LIBTOOL_PATHS:= ./libtool ./ldns-src/libtool 
    2121 
     22PKG_BUILD_PARALLEL:=1 
     23 
    2224include $(INCLUDE_DIR)/package.mk 
    2325 
    2426define Package/unbound 
    define Package/unbound 
    2729  SUBMENU:=IP Addresses and Names 
    2830  TITLE:=A validating, recursive, and caching DNS resolver 
    2931  URL:=http://www.unbound.net/ 
    30   DEPENDS:=+libopenssl 
     32  DEPENDS:=+libopenssl +libldns +libexpat 
    3133endef 
    3234 
    3335CONFIGURE_ARGS += \ 
    3436        --with-ssl="$(STAGING_DIR)/usr" \ 
    3537        --without-pthreads \ 
     38        --disable-gost \ 
     39        --enable-allsymbols \ 
     40        --with-ldns="$(STAGING_DIR)/usr" 
    3641 
    3742define Package/unbound/conffiles 
    3843/etc/unbound/unbound.conf 
    define Package/unbound/install 
    4651        $(INSTALL_DIR) $(1)/usr/sbin 
    4752        $(CP) \ 
    4853                $(PKG_INSTALL_DIR)/usr/sbin/unbound \ 
     54                $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor \ 
    4955                $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \ 
    5056                $(PKG_INSTALL_DIR)/usr/sbin/unbound-control \ 
     57                $(PKG_INSTALL_DIR)/usr/sbin/unbound-control-setup \ 
    5158                $(PKG_INSTALL_DIR)/usr/sbin/unbound-host \ 
    5259                $(1)/usr/sbin/ 
    5360        $(INSTALL_DIR) $(1)/etc/unbound 
  • net/unbound/files/unbound.conf

    diff --git a/net/unbound/files/unbound.conf b/net/unbound/files/unbound.conf
    index 3ea940c..9df2546 100644
    a b server: 
    44        interface: ::0 
    55        interface: 0.0.0.0 
    66 
    7         # the amount of memory to use for the RRset cache. 
    8         # plain value in bytes or you can append k, m or G. default is "4Mb".  
    9         rrset-cache-size: 1m 
    10  
    11         # the number of slabs to use for the RRset cache. 
    12         # the number of slabs must be a power of 2. 
    13         # more slabs reduce lock contention, but fragment memory usage. 
    14         rrset-cache-slabs: 2 
     7        # settings that reduce memory usage (from man page) 
     8        num-threads: 1 
     9        outgoing-num-tcp: 1 # this limits TCP service, uses less buffers. 
     10        incoming-num-tcp: 1 
     11        outgoing-range: 60  # uses less memory, but less performance. 
     12        msg-buffer-size: 8192   # note this limits service, 'no huge stuff'. 
     13        msg-cache-size: 100k 
     14        msg-cache-slabs: 1 
     15        rrset-cache-size: 100k 
     16        rrset-cache-slabs: 1 
     17        infra-cache-numhosts: 200 
     18        infra-cache-slabs: 1 
     19        infra-cache-lame-size: 1k 
     20        key-cache-size: 100k 
     21        key-cache-slabs: 1 
     22        neg-cache-size: 10k 
     23        num-queries-per-thread: 30 
     24        target-fetch-policy: "2 1 0 0 0 0" 
     25        harden-large-queries: "yes" 
     26        harden-short-bufsize: "yes" 
    1527 
    1628        # control which clients are allowed to make (recursive) queries 
    1729        # to this server. Specify classless netblocks with /size and action. 
    server: 
    2638        access-control: 0.0.0.0/0 allow 
    2739        access-control: ::0/0 allow 
    2840 
    29  
    3041        # if given, user privileges are dropped (after binding port), 
    3142        # and the given username is assumed. Default is user "unbound". 
    3243        # If you give "" no privileges are dropped. 
    server: 
    5566        # file to read root hints from. 
    5667        # get one from ftp://FTP.INTERNIC.NET/domain/named.cache 
    5768        root-hints: "named.cache" 
    58          
    59          
     69 
    6070        # Root zone trust anchor key 
    6171        # Will be autoupdated by unbound in case of key change 
    6272        auto-trust-anchor-file: "root.autokey" 
    server: 
    7181        # from page http://www.unbound.net/documentation/howto_itar.html 
    7282        #trust-anchor-file: "anchors.mf" 
    7383 
    74  
    75     # If you want to forward requests to another recursive DNS server 
    76     # uncomment this. Please note that many DNS recursors do strip  
    77     # DNSSEC data, rendering unbound server unusable. 
    78     # forward-zone: 
    79     #   name: "." 
    80     #   forward-addr: 8.8.8.8 
    81     #   forward-addr: 8.8.4.4 
    82          
    83  
     84        # If you want to forward requests to another recursive DNS server 
     85        # uncomment this. Please note that many DNS recursors do strip  
     86        # DNSSEC data, rendering unbound server unusable. 
     87        # forward-zone: 
     88        #   name: "." 
     89        #       forward-addr: 8.8.8.8 
     90        #       forward-addr: 8.8.4.4