From patchwork Sun Apr 28 09:02:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1092197 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="CCgsFC+P"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44sMJk4S2tz9s7T for ; Sun, 28 Apr 2019 19:03:18 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8AB7181E6D; Sun, 28 Apr 2019 09:03:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k-80DlOqR0UL; Sun, 28 Apr 2019 09:03:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7072D80EBF; Sun, 28 Apr 2019 09:03:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 37D981BF83A for ; Sun, 28 Apr 2019 09:03:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 32BFB848F5 for ; Sun, 28 Apr 2019 09:03:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hGJ+tFBjtcZT for ; Sun, 28 Apr 2019 09:03:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id E8E80848F4 for ; Sun, 28 Apr 2019 09:03:04 +0000 (UTC) Received: by mail-wr1-f49.google.com with SMTP id b1so11064371wru.3 for ; Sun, 28 Apr 2019 02:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZtOOmLxfqglrSGFuZnqwH7uGWCW1/pnL04zAgUiwKVA=; b=CCgsFC+PJK6mAzni/8iu9Jnq4Why12JDA7vxbnoKa7LaJG8egxuGpTpjruKcfPf63c 9wbAJ9FnjsJPU4NIcU43Qu7THaZKEZe1filP5g2Av5lrPw1uBfNy2W/2gjBuyRcmPKBE xZ8KwnKdPVruVjc836ZLL4WTQjWGYR+ToGfmc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZtOOmLxfqglrSGFuZnqwH7uGWCW1/pnL04zAgUiwKVA=; b=XNSy/wjvRFQ2/MkYsLiet5SwZbBwJZzVj0XyjsEeCPK/iRC8TkYOhrqUb6daQgrPYz 96ghdPcCSdyG4SUK8iD3nQf4cBzw6AXJLveL1rmuBUCmo2yu8eZJN4cV0a/kdCcVBJIQ McW36i8BSe94Vu8NwGuDeHSId7/bGYQt4sMbsavzFqs3nHf+LkTAclAyN+TGdyk/8gIM hkU56D5I9uZvzrXxuUFQ36aQzgef4nD9FTYqmRA1DDcOnCuc7TdCRBKk1PqZFq1taxzb Zpc2HDvF/6Qsbd8LIDgas2XV0uqoAHAo0sD84+E2EzAAsEvFecpytp7Q0Z4otNqECNDB 37Ug== X-Gm-Message-State: APjAAAXTuLuqXKLhH5XcS8B3JU4aOOVcZ5ndLzzl3En39zxMv9zRCj0j WEAcs61U9IpmzeudX3MrkhySAI+J59fi0KYf X-Google-Smtp-Source: APXvYqxXAYcmUSeVIxScwe7NP5/W6CzFRI5mF/LTsBzl//39hxFYlfw7vVNIDKiG2NUBtP+z8VP0kw== X-Received: by 2002:adf:f608:: with SMTP id t8mr26947963wrp.304.1556442183186; Sun, 28 Apr 2019 02:03:03 -0700 (PDT) Received: from localhost.localdomain ([37.161.249.75]) by smtp.gmail.com with ESMTPSA id w17sm1343055wra.81.2019.04.28.02.03.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Apr 2019 02:03:02 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Sun, 28 Apr 2019 11:02:55 +0200 Message-Id: <1556442175-1494-2-git-send-email-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556442175-1494-1-git-send-email-angelo@amarulasolutions.com> References: <1556442175-1494-1-git-send-email-angelo@amarulasolutions.com> Subject: [Buildroot] [PATCH v4 2/2] package/nfs-utils: making nfs server optional X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch makes nfs server component optional. This is useful when only client tools are needed instead of the full nfs server. Signed-off-by: Angelo Compagnucci --- v1->v2: Fixing minor formatting nitpick. v2->v3: Fixing systemd stuff as suggested by Thomas v3->v4: Added conditional define for nfs unit file as requested by Arnout package/nfs-utils/Config.in | 6 ++++++ package/nfs-utils/nfs-utils.mk | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/package/nfs-utils/Config.in b/package/nfs-utils/Config.in index 055b711..04ea4db 100644 --- a/package/nfs-utils/Config.in +++ b/package/nfs-utils/Config.in @@ -25,6 +25,12 @@ config BR2_PACKAGE_NFS_UTILS_RPC_LOCKD help NFS lock manager for Linux kernels older than 2.4 +config BR2_PACKAGE_NFS_UTILS_RPC_NFSD + bool "rpc.nfsd" + default y + help + NFS server + config BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD bool "rpc.rquotad" help diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk index 4bb62de..b81891a 100644 --- a/package/nfs-utils/nfs-utils.mk +++ b/package/nfs-utils/nfs-utils.mk @@ -41,6 +41,8 @@ HOST_NFS_UTILS_DEPENDENCIES = host-pkgconf host-libtirpc NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPCDEBUG) += usr/sbin/rpcdebug NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_LOCKD) += usr/sbin/rpc.lockd NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD) += usr/sbin/rpc.rquotad +NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_NFSD) += usr/sbin/exportfs \ + usr/sbin/rpc.mountd usr/sbin/rpc.nfsd usr/lib/systemd/system/nfs-server.service ifeq ($(BR2_PACKAGE_LIBCAP),y) NFS_UTILS_CONF_OPTS += --enable-caps @@ -71,16 +73,23 @@ else NFS_UTILS_CONF_OPTS += --without-systemd endif +ifeq ($(BR2_PACKAGE_NFS_UTILS_RPC_NFSD),y) define NFS_UTILS_INSTALL_INIT_SYSV $(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \ $(TARGET_DIR)/etc/init.d/S60nfs endef +define NFS_UTILS_INSTALL_INIT_SYSTEMD_NFSD + ln -fs ../../../../usr/lib/systemd/system/nfs-server.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-server.service +endef +endif + define NFS_UTILS_INSTALL_INIT_SYSTEMD mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants - ln -fs ../../../../usr/lib/systemd/system/nfs-server.service \ - $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-server.service + $(NFS_UTILS_INSTALL_INIT_SYSTEMD_NFSD) + ln -fs ../../../../usr/lib/systemd/system/nfs-client.target \ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-client.target