All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 1/2] package/nfs-utils: fix unnecessary files removal
@ 2019-04-28  9:02 Angelo Compagnucci
  2019-04-28  9:02 ` [Buildroot] [PATCH v4 2/2] package/nfs-utils: making nfs server optional Angelo Compagnucci
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Angelo Compagnucci @ 2019-04-28  9:02 UTC (permalink / raw)
  To: 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 <angelo@amarulasolutions.com>
---
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
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v4 2/2] package/nfs-utils: making nfs server optional
  2019-04-28  9:02 [Buildroot] [PATCH v4 1/2] package/nfs-utils: fix unnecessary files removal Angelo Compagnucci
@ 2019-04-28  9:02 ` Angelo Compagnucci
  2019-05-05 20:44   ` Arnout Vandecappelle
  2019-05-05 20:40 ` [Buildroot] [PATCH v4 1/2] package/nfs-utils: fix unnecessary files removal Arnout Vandecappelle
  2019-05-10  9:57 ` Peter Korsgaard
  2 siblings, 1 reply; 5+ messages in thread
From: Angelo Compagnucci @ 2019-04-28  9:02 UTC (permalink / raw)
  To: 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 <angelo@amarulasolutions.com>
---
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
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v4 1/2] package/nfs-utils: fix unnecessary files removal
  2019-04-28  9:02 [Buildroot] [PATCH v4 1/2] package/nfs-utils: fix unnecessary files removal Angelo Compagnucci
  2019-04-28  9:02 ` [Buildroot] [PATCH v4 2/2] package/nfs-utils: making nfs server optional Angelo Compagnucci
@ 2019-05-05 20:40 ` Arnout Vandecappelle
  2019-05-10  9:57 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-05-05 20:40 UTC (permalink / raw)
  To: buildroot



On 28/04/2019 11:02, Angelo Compagnucci wrote:
> 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 <angelo@amarulasolutions.com>
> ---
> 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_)

 Personally, I'd have used $(addprefix) instead of cd, but that's just my own
thing, so: applied to master, thanks.

 Regards,
 Arnout


>  	touch $(TARGET_DIR)/etc/exports
>  	$(INSTALL) -D -m 644 \
>  		$(@D)/utils/mount/nfsmount.conf $(TARGET_DIR)/etc/nfsmount.conf
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v4 2/2] package/nfs-utils: making nfs server optional
  2019-04-28  9:02 ` [Buildroot] [PATCH v4 2/2] package/nfs-utils: making nfs server optional Angelo Compagnucci
@ 2019-05-05 20:44   ` Arnout Vandecappelle
  0 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-05-05 20:44 UTC (permalink / raw)
  To: buildroot



On 28/04/2019 11:02, Angelo Compagnucci wrote:
> 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 <angelo@amarulasolutions.com>

 Applied to master, thanks.

 Regards,
 Arnout

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v4 1/2] package/nfs-utils: fix unnecessary files removal
  2019-04-28  9:02 [Buildroot] [PATCH v4 1/2] package/nfs-utils: fix unnecessary files removal Angelo Compagnucci
  2019-04-28  9:02 ` [Buildroot] [PATCH v4 2/2] package/nfs-utils: making nfs server optional Angelo Compagnucci
  2019-05-05 20:40 ` [Buildroot] [PATCH v4 1/2] package/nfs-utils: fix unnecessary files removal Arnout Vandecappelle
@ 2019-05-10  9:57 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2019-05-10  9:57 UTC (permalink / raw)
  To: buildroot

>>>>> "Angelo" == Angelo Compagnucci <angelo@amarulasolutions.com> writes:

 > 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 <angelo@amarulasolutions.com>
 > ---
 > v3-> v4: separate fix patch as requested by Arnout

Committed to 2019.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-10  9:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-28  9:02 [Buildroot] [PATCH v4 1/2] package/nfs-utils: fix unnecessary files removal Angelo Compagnucci
2019-04-28  9:02 ` [Buildroot] [PATCH v4 2/2] package/nfs-utils: making nfs server optional Angelo Compagnucci
2019-05-05 20:44   ` Arnout Vandecappelle
2019-05-05 20:40 ` [Buildroot] [PATCH v4 1/2] package/nfs-utils: fix unnecessary files removal Arnout Vandecappelle
2019-05-10  9:57 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.