From patchwork Sun Apr 28 09:02:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1092196 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.138; helo=whitealder.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="jQXj4rqk"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44sMJj1J4kz9s7T for ; Sun, 28 Apr 2019 19:03:17 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3DDC98491C; Sun, 28 Apr 2019 09:03:14 +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 5AoNk+h9WQzs; Sun, 28 Apr 2019 09:03:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 409C0848F5; Sun, 28 Apr 2019 09:03:12 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 03D791BF5EA for ; Sun, 28 Apr 2019 09:03:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0121622056 for ; Sun, 28 Apr 2019 09:03:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WGmCV8X2KtGY for ; Sun, 28 Apr 2019 09:03:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by silver.osuosl.org (Postfix) with ESMTPS id 5E5CA21507 for ; Sun, 28 Apr 2019 09:03:03 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id a12so11005028wrq.10 for ; Sun, 28 Apr 2019 02:03:03 -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; bh=Ed7zvROHI9XSK+3puDKgsryE3rHpbA7JBakc7F3HCpQ=; b=jQXj4rqk2ZN+jkNc2pMxpDLPXke7YBJGJnObLSNtW7JmIvDwU3b3cgtN5Oq1fGO9Do vMxV3Ekaws/YqaQyMU0qUDhtIfH7tg8br0uswctphfMcGHIlCqgZFsdpA9h5RRH2Y5Is pIu9NHJXmUrX72mdJh6I9liiRWz6oSLNJuMVw= 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; bh=Ed7zvROHI9XSK+3puDKgsryE3rHpbA7JBakc7F3HCpQ=; b=hjhMzFZ0bmA0KPts/H9wF3xRqhksX+mJFirDyXnMhlUTx8JQ+bS5rdT13jBGnJU+Yt LzkkdiHTyafmVgIpdxYH+DLGDmT57jCQA0eiFn88/90NuKB+trmkqYKYP9Yf4qkvD8/d tVzK6GRKim0qE/d+QZ0kYRFKlca9kPuVoJ5Ba8hTDtZqB5p2050ef/wOoTgUoGjRWgHM KVbhVKphChQCJ29CCfah9jvBmR0C71F1MJN1m7+VGlW86NG/EqoGzpfoncjtUKDkgvg8 HgAkGnrNhQ+dJbyUHbsA5Usv2zLKOfmhu2XZvEW5oCWxvVtti0FSY8SXjqY1sq1RHwtT FFIg== X-Gm-Message-State: APjAAAUndKajZEzcwuiKTlIWXNK///dTFlJw71v5bs2CsWYNwgExNMfA doLRk3S3L0h3MrCV8NxLpDD8uiKSAL0XqszO X-Google-Smtp-Source: APXvYqwvDjXA3zjFd+YgX0ra8imETnm32t5IGK+dXnT4ev+EamXDPL48584h7zvBnfmGCWhZf2jgDA== X-Received: by 2002:adf:f8d0:: with SMTP id f16mr36641486wrq.198.1556442181446; Sun, 28 Apr 2019 02:03:01 -0700 (PDT) Received: from localhost.localdomain ([37.161.249.75]) by smtp.gmail.com with ESMTPSA id w17sm1343055wra.81.2019.04.28.02.02.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Apr 2019 02:03:00 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Sun, 28 Apr 2019 11:02:54 +0200 Message-Id: <1556442175-1494-1-git-send-email-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH v4 1/2] package/nfs-utils: fix unnecessary files removal 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" Removing of unnecessary files is actually broken by the fact that the rm command is executed inside build directory and not the target directory. This patch fixes the problem changing to target directory before removing files. Signed-off-by: Angelo Compagnucci --- v3->v4: separate fix patch as requested by Arnout package/nfs-utils/nfs-utils.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk index 9fa7ae2..4bb62de 100644 --- a/package/nfs-utils/nfs-utils.mk +++ b/package/nfs-utils/nfs-utils.mk @@ -57,7 +57,7 @@ NFS_UTILS_CONF_OPTS += --disable-tirpc endif define NFS_UTILS_INSTALL_FIXUP - rm -f $(NFS_UTILS_TARGETS_) + cd $(TARGET_DIR) && rm -f $(NFS_UTILS_TARGETS_) touch $(TARGET_DIR)/etc/exports $(INSTALL) -D -m 644 \ $(@D)/utils/mount/nfsmount.conf $(TARGET_DIR)/etc/nfsmount.conf 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