* [Buildroot] [PATCH v2] package/nfs-utils: making nfs server optional
@ 2019-03-28 13:53 Angelo Compagnucci
2019-03-28 16:48 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Angelo Compagnucci @ 2019-03-28 13:53 UTC (permalink / raw)
To: buildroot
This patch makes nfs server component optional. This is useful when
only client tools are used and not the nfs server.
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
v1->v2: Fixing minor formatting nitpick.
package/nfs-utils/Config.in | 6 ++++++
package/nfs-utils/nfs-utils.mk | 2 ++
2 files changed, 8 insertions(+)
diff --git a/package/nfs-utils/Config.in b/package/nfs-utils/Config.in
index 055b711..50c47aa 100644
--- a/package/nfs-utils/Config.in
+++ b/package/nfs-utils/Config.in
@@ -30,4 +30,10 @@ config BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD
help
NFS remote quota server
+config BR2_PACKAGE_NFS_UTILS_SERVER
+ bool "server daemon"
+ default y
+ help
+ Install the NFS server daemon
+
endif
diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk
index 9fa7ae2..ec39588 100644
--- a/package/nfs-utils/nfs-utils.mk
+++ b/package/nfs-utils/nfs-utils.mk
@@ -71,6 +71,7 @@ else
NFS_UTILS_CONF_OPTS += --without-systemd
endif
+ifeq ($(BR2_PACKAGE_NFS_UTILS_SERVER),y)
define NFS_UTILS_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \
$(TARGET_DIR)/etc/init.d/S60nfs
@@ -95,6 +96,7 @@ define NFS_UTILS_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 package/nfs-utils/nfs-utils_tmpfiles.conf \
$(TARGET_DIR)/usr/lib/tmpfiles.d/nfs-utils.conf
endef
+endif
define NFS_UTILS_REMOVE_NFSIOSTAT
rm -f $(TARGET_DIR)/usr/sbin/nfsiostat
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] package/nfs-utils: making nfs server optional
2019-03-28 13:53 [Buildroot] [PATCH v2] package/nfs-utils: making nfs server optional Angelo Compagnucci
@ 2019-03-28 16:48 ` Thomas Petazzoni
2019-03-28 17:01 ` Angelo Compagnucci
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2019-03-28 16:48 UTC (permalink / raw)
To: buildroot
Hello Angelo,
On Thu, 28 Mar 2019 14:53:09 +0100
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:
> +ifeq ($(BR2_PACKAGE_NFS_UTILS_SERVER),y)
> define NFS_UTILS_INSTALL_INIT_SYSV
> $(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \
> $(TARGET_DIR)/etc/init.d/S60nfs
> @@ -95,6 +96,7 @@ define NFS_UTILS_INSTALL_INIT_SYSTEMD
> $(INSTALL) -D -m 0644 package/nfs-utils/nfs-utils_tmpfiles.conf \
> $(TARGET_DIR)/usr/lib/tmpfiles.d/nfs-utils.conf
> endef
> +endif
This is only removing the installation of the init script/systemd unit
files, not really disabling the server.
Shouldn't we do like BR2_PACKAGE_NFS_UTILS_RPCDEBUG,
BR2_PACKAGE_NFS_UTILS_RPC_LOCKD and BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD
are doing, and also remove the unnecessary programs ?
Another question is: the systemd stuff installs a nfs-client.service
unit file, and you're no longer installing this. It's named
nfs-client... so it seems to be needed even when you are just a client.
In fact, I think *some* of the daemons are needed even when you are
just a client. See what nfs-client.service is doing.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] package/nfs-utils: making nfs server optional
2019-03-28 16:48 ` Thomas Petazzoni
@ 2019-03-28 17:01 ` Angelo Compagnucci
0 siblings, 0 replies; 3+ messages in thread
From: Angelo Compagnucci @ 2019-03-28 17:01 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Thu, Mar 28, 2019 at 5:49 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello Angelo,
>
> On Thu, 28 Mar 2019 14:53:09 +0100
> Angelo Compagnucci <angelo@amarulasolutions.com> wrote:
>
> > +ifeq ($(BR2_PACKAGE_NFS_UTILS_SERVER),y)
> > define NFS_UTILS_INSTALL_INIT_SYSV
> > $(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \
> > $(TARGET_DIR)/etc/init.d/S60nfs
> > @@ -95,6 +96,7 @@ define NFS_UTILS_INSTALL_INIT_SYSTEMD
> > $(INSTALL) -D -m 0644 package/nfs-utils/nfs-utils_tmpfiles.conf \
> > $(TARGET_DIR)/usr/lib/tmpfiles.d/nfs-utils.conf
> > endef
> > +endif
>
> This is only removing the installation of the init script/systemd unit
> files, not really disabling the server.>
>
> Shouldn't we do like BR2_PACKAGE_NFS_UTILS_RPCDEBUG,
> BR2_PACKAGE_NFS_UTILS_RPC_LOCKD and BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD
> are doing, and also remove the unnecessary programs ?
Probably yes. It could save some space and it coulb be betetr for fs
cleaning. Will do.
> Another question is: the systemd stuff installs a nfs-client.service
> unit file, and you're no longer installing this. It's named
> nfs-client... so it seems to be needed even when you are just a client.
>
>
> In fact, I think *some* of the daemons are needed even when you are
> just a client. See what nfs-client.service is doing.
I'll have a better look at the systemd part. I tested with sysy and
the system can mount an nfs share without having any service running.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-28 17:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-28 13:53 [Buildroot] [PATCH v2] package/nfs-utils: making nfs server optional Angelo Compagnucci
2019-03-28 16:48 ` Thomas Petazzoni
2019-03-28 17:01 ` Angelo Compagnucci
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox