From patchwork Tue Dec 23 13:09:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yousong Zhou X-Patchwork-Id: 423701 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5F3BE14007D for ; Wed, 24 Dec 2014 00:18:54 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id AAE1828BCEB; Tue, 23 Dec 2014 14:16:40 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 51BEA28A685 for ; Tue, 23 Dec 2014 14:16:30 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 23 Dec 2014 14:16:29 +0100 (CET) Received: by mail-pa0-f54.google.com with SMTP id fb1so7938591pad.13 for ; Tue, 23 Dec 2014 05:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=+5gGogGyn2NmCnyWp0Q+inDcZaLUtYMxP6jKKQ0f0xI=; b=YK/AayC62VQxJ82pQLz/lhEdOoLj+akncstv9GAorVl8pnzTjvfG6jhQX41lZTZ40f IwirP3MMMrjxqHs4cZkWzl2O4lb4HTHn3srXIcVNVt8yppDp4gARKucELimXtGGiy5Uw WkpLYuKd1VHn8pjRaxNIbBKFJZYaScZS5/keWXbH2FxF9vVQv6GeTSCdOP2Gv8LHi5DE TjdHA9/LJjES04imzAE2KlYrU1aWavf758m0KM16y/ZiBHDlov6RLobqS25VncMKIxbW qEQ9xbn239Xz2paOmh6/RKDg8wg0zWu2mUBPJ+fhPFZcy8pbBHuTAXOtxJCV78+jQEbz S8Pg== X-Received: by 10.70.130.205 with SMTP id og13mr43603171pdb.72.1419340704053; Tue, 23 Dec 2014 05:18:24 -0800 (PST) Received: from debian.corp.sankuai.com ([103.29.140.56]) by mx.google.com with ESMTPSA id pd9sm20053879pdb.35.2014.12.23.05.18.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Dec 2014 05:18:22 -0800 (PST) From: Yousong Zhou To: cyrus@openwrt.org, nbd@openwrt.org Date: Tue, 23 Dec 2014 21:09:40 +0800 Message-Id: <1419340180-23484-2-git-send-email-yszhou4tech@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1419340180-23484-1-git-send-email-yszhou4tech@gmail.com> References: <1419340180-23484-1-git-send-email-yszhou4tech@gmail.com> MIME-Version: 1.0 Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH 2/2] dnsmasq: fix dependency problems of the dnsmasq-full variant. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" This patch tries to - Let the DHCPv6 feature depend on CONFIG_IPV6. - Conditionally select libnettle, kmod-ipv6, kmod-ipt-ipset only if the corresponding features are enabled. - Install `trust-anchors.conf` only if DNSSEC is selected. Big thanks goes to Frank Schäfer for providing necessary information on connections and dependency relations between these CONFIGs and packages. Signed-off-by: Yousong Zhou --- package/network/services/dnsmasq/Makefile | 37 ++++++++++++++++------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile index 1153428..02d4535 100644 --- a/package/network/services/dnsmasq/Makefile +++ b/package/network/services/dnsmasq/Makefile @@ -47,7 +47,7 @@ endef define Package/dnsmasq-full $(call Package/dnsmasq/Default) TITLE += (with DNSSEC, DHCPv6, Auth DNS, IPSET) - DEPENDS:=@IPV6 +kmod-ipv6 +libnettle + DEPENDS:=+PACKAGE_dnsmasq_full_dnssec:libnettle +PACKAGE_dnsmasq_full_dhcpv6:kmod-ipv6 +PACKAGE_dnsmasq_full_ipset:kmod-ipt-ipset VARIANT:=full endef @@ -64,7 +64,8 @@ endef define Package/dnsmasq-full/description $(call Package/dnsmasq/description) -This is a variant with DHCPv6, DNSSEC, Authroitative DNS and IPSET support +This is a fully configurable variant with DHCPv6, DNSSEC, Authroitative DNS and +IPSET support enabled by default. endef define Package/dnsmasq/conffiles @@ -73,21 +74,21 @@ define Package/dnsmasq/conffiles endef define Package/dnsmasq/config/Default - if PACKAGE_$(1)-$(2) - config PACKAGE_dnsmasq_$(2)_dhcpv6 - bool "Build with DHCPv6 support." - default y - config PACKAGE_dnsmasq_$(2)_dnssec - bool "Build with DNSSEC support." - default y - config PACKAGE_dnsmasq_$(2)_auth - bool "Build with the facility to act as an authoritative DNS server." - default y - config PACKAGE_dnsmasq_$(2)_ipset - bool "Build with ipset support." - select PACKAGE_kmod-ipt-ipset - default y - endif + if PACKAGE_$(1)-$(2) + config PACKAGE_dnsmasq_$(2)_dhcpv6 + bool "Build with DHCPv6 support." + depends on IPV6 + default y + config PACKAGE_dnsmasq_$(2)_dnssec + bool "Build with DNSSEC support." + default y + config PACKAGE_dnsmasq_$(2)_auth + bool "Build with the facility to act as an authoritative DNS server." + default y + config PACKAGE_dnsmasq_$(2)_ipset + bool "Build with ipset support." + default y + endif endef Package/dnsmasq-full/config=$(call Package/dnsmasq/config/Default,dnsmasq,full) @@ -137,8 +138,10 @@ Package/dnsmasq-dhcpv6/install = $(Package/dnsmasq/install) define Package/dnsmasq-full/install $(call Package/dnsmasq/install,$(1)) +ifneq ($(CONFIG_PACKAGE_dnsmasq_full_dnssec),) $(INSTALL_DIR) $(1)/usr/share/dnsmasq $(INSTALL_DATA) $(PKG_BUILD_DIR)/trust-anchors.conf $(1)/usr/share/dnsmasq +endif endef $(eval $(call BuildPackage,dnsmasq))