From e6812324c66f98bd2f1481233dbc7a988513e6d5 Mon Sep 17 00:00:00 2001 From: Eric Luehrsen Date: Sat, 18 May 2019 14:46:39 -0400 Subject: [PATCH] unbound: add compile options to library and daemon Two seperate package names were chosen instead of menu selected options because dependents need a ready (large) package in release directory. Signed-off-by: Eric Luehrsen --- net/unbound/Makefile | 172 +++++++++++++++++++++++++++++-------------- 1 file changed, 117 insertions(+), 55 deletions(-) diff --git a/net/unbound/Makefile b/net/unbound/Makefile index 3b48a4e8c..50258fed0 100644 --- a/net/unbound/Makefile +++ b/net/unbound/Makefile @@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=unbound PKG_VERSION:=1.9.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://www.unbound.net/downloads +PKG_SOURCE_URL:=https://nlnetlabs.nl/downloads/unbound PKG_HASH:=c3c0bf9b86ccba4ca64f93dd4fe7351308ab54293f297a67de5a8914c1dc59c5 PKG_MAINTAINER:=Eric Luehrsen @@ -23,49 +23,102 @@ PKG_CPE_ID:=cpe:/a:nlnetlabs:unbound PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk define Package/unbound/Default - TITLE:=Validating Recursive DNS Server - URL:=https://www.unbound.net/ - DEPENDS:=+libopenssl +@OPENSSL_WITH_EC -endef - -define Package/unbound - $(call Package/unbound/Default) SECTION:=net CATEGORY:=Network SUBMENU:=IP Addresses and Names USERID:=unbound:unbound - TITLE+= (daemon) + TITLE:=Recursive DNS Server + URL:=https://nlnetlabs.nl/projects/unbound/about + DEPENDS:=+libopenssl +@OPENSSL_WITH_EC +endef + +define Package/unbound-daemon + $(call Package/unbound/Default) + TITLE+= (daemon, light traffic) DEPENDS+= +libunbound + VARIANT:=light +endef + +define Package/unbound-daemon/description + This package contains the Unbound daemon with basic includes + necessary to meet the needs of UCI/LuCI configuration optoins. endef -define Package/unbound/description - This package contains the Unbound daemon. +define Package/unbound-daemon-heavy + $(call Package/unbound/Default) + TITLE+= (daemon, heavy traffic) + URL:=https://nlnetlabs.nl/documentation/unbound/howto-optimise + DEPENDS+= +libunbound-heavy +libpthread +libevent2 +libevent2-pthreads + VARIANT:=heavy + PROVIDES:=unbound-daemon +endef + +define Package/unbound-daemon-heavy/description + This package contains the Unbound daemon including 'libevent' and + 'libpthread' to better handle large networks with heavy query loads. +endef + +define Package/libunbound + $(call Package/unbound/Default) + SECTION:=libs + CATEGORY:=Libraries + SUBMENU:=Networking + TITLE+= (library, light traffic) + VARIANT:=light + DEFAULT_VARIANT:=1 +endef + +define Package/libunbound/description + This package contains the Unbound shared library with basic includes + necessary to meet the needs of UCI/LuCI configuration optoins. +endef + +define Package/libunbound-heavy + $(call Package/unbound/Default) + SECTION:=libs + CATEGORY:=Libraries + SUBMENU:=Networking + TITLE+= (library, heavy traffic) + URL:=https://nlnetlabs.nl/documentation/unbound/howto-optimise + DEPENDS+= +libpthread +libevent2 +libevent2-pthreads + VARIANT:=heavy + PROVIDES:=libunbound +endef + +define Package/libunbound-heavy/description + This package contains the Unbound shared library including 'libevent' and + 'libpthread' to better handle large networks with heavy query loads. endef define Package/unbound-anchor $(call Package/unbound/Default) - SECTION:=net - CATEGORY:=Network - SUBMENU:=IP Addresses and Names - TITLE+= (DSKEY utility) - DEPENDS+= +unbound +libexpat + TITLE+= (root DSKEY) + DEPENDS+= +unbound-daemon +libexpat endef define Package/unbound-anchor/description This package contains the Unbound anchor utility. endef +define Package/unbound-checkconf + $(call Package/unbound/Default) + TITLE+= (config checker) + DEPENDS+= +unbound-daemon +endef + +define Package/unbound-checkconf/description + This package contains the Unbound DNS configuration checker utility. +endef + define Package/unbound-control $(call Package/unbound/Default) - SECTION:=net - CATEGORY:=Network - SUBMENU:=IP Addresses and Names - TITLE+= (control utility) - DEPENDS+= +unbound + TITLE+= (remote control) + DEPENDS+= +unbound-daemon endef define Package/unbound-control/description @@ -74,9 +127,6 @@ endef define Package/unbound-control-setup $(call Package/unbound/Default) - SECTION:=net - CATEGORY:=Network - SUBMENU:=IP Addresses and Names TITLE+= (control setup) DEPENDS+= +unbound-control +openssl-util endef @@ -87,10 +137,7 @@ endef define Package/unbound-host $(call Package/unbound/Default) - SECTION:=net - CATEGORY:=Network - SUBMENU:=IP Addresses and Names - TITLE+= (lookup utility) + TITLE+= (DNS lookup) DEPENDS+= +libunbound endef @@ -98,18 +145,6 @@ define Package/unbound-host/description This package contains the Unbound DNS lookup utility. endef -define Package/libunbound - $(call Package/unbound/Default) - SECTION:=libs - CATEGORY:=Libraries - TITLE+= (library) - DEPENDS+= +libpthread -endef - -define Package/libunbound/description - This package contains the Unbound shared library. -endef - CONFIGURE_ARGS += \ --disable-dsa \ --disable-gost \ @@ -124,26 +159,41 @@ CONFIGURE_ARGS += \ --with-conf-file=/var/lib/unbound/unbound.conf \ --with-pidfile=/var/run/unbound.pid -define Package/unbound/conffiles +ifeq ($(BUILD_VARIANT),heavy) + CONFIGURE_ARGS += \ + --with-pthreads \ + --with-libevent="$(STAGING_DIR)/usr" \ + --enable-event-api +else + CONFIGURE_ARGS += \ + --without-pthreads \ + --without-solaris-threads \ + --without-libevent +endif + +define Package/unbound-daemon/conffiles /etc/config/unbound /etc/unbound/unbound.conf /etc/unbound/unbound_ext.conf /etc/unbound/unbound_srv.conf endef +Package/unbound-daemon-heavy/conffiles = $(Package/unbound-daemon/conffiles) + define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/ $(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.{so*,a,la} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/include + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound.h $(1)/usr/include/ +ifeq ($(BUILD_VARIANT),heavy) + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/unbound-event.h $(1)/usr/include/ +endif endef -define Package/unbound/install +define Package/unbound-daemon/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) \ - $(PKG_INSTALL_DIR)/usr/sbin/unbound \ - $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf \ - $(1)/usr/sbin/ + $(PKG_INSTALL_DIR)/usr/sbin/unbound $(1)/usr/sbin/ $(INSTALL_DIR) $(1)/etc/unbound $(INSTALL_DATA) \ $(PKG_INSTALL_DIR)/var/lib/unbound/unbound.conf \ @@ -167,11 +217,25 @@ define Package/unbound/install $(INSTALL_DATA) ./files/unbound.sh $(1)/usr/lib/unbound/unbound.sh endef +Package/unbound-daemon-heavy/install = $(Package/unbound-daemon/install) + +define Package/libunbound/install + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/ +endef + +Package/libunbound-heavy/install = $(Package/libunbound/install) + define Package/unbound-anchor/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-anchor $(1)/usr/sbin/ endef +define Package/unbound-checkconf/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-checkconf $(1)/usr/sbin/ +endef + define Package/unbound-control/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-control $(1)/usr/sbin/ @@ -187,15 +251,13 @@ define Package/unbound-host/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/unbound-host $(1)/usr/sbin/ endef -define Package/libunbound/install - $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libunbound.so.* $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,unbound)) +$(eval $(call BuildPackage,unbound-daemon)) +$(eval $(call BuildPackage,unbound-daemon-heavy)) +$(eval $(call BuildPackage,libunbound)) +$(eval $(call BuildPackage,libunbound-heavy)) $(eval $(call BuildPackage,unbound-anchor)) +$(eval $(call BuildPackage,unbound-checkconf)) $(eval $(call BuildPackage,unbound-control)) $(eval $(call BuildPackage,unbound-control-setup)) $(eval $(call BuildPackage,unbound-host)) -$(eval $(call BuildPackage,libunbound))