mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] nfsutils: don't install nfsiostat without ensuring python is available
@ 2019-08-07  9:27 Uwe Kleine-König
  2019-08-07 11:45 ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2019-08-07  9:27 UTC (permalink / raw)
  To: ptxdist

nfsiostat is a python script. Introduce a new suboption to select
PYTHON and don't install nfsiostat if this is disabled.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 rules/nfsutils.in   | 7 +++++++
 rules/nfsutils.make | 5 ++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/rules/nfsutils.in b/rules/nfsutils.in
index ef7eb7b98d60..34d237737024 100644
--- a/rules/nfsutils.in
+++ b/rules/nfsutils.in
@@ -9,6 +9,7 @@ menuconfig NFSUTILS
 	select RPCBIND			if RUNTIME
 	select LIBTIRPC			if GLOBAL_IPV6
 	select ROOTFS_PROTOCOLS		if NFSUTILS_CLIENT
+	select PYTHON			if NFSUTILS_PYTHON
 	select ROOTFS_VAR_LIB		if RUNTIME
 	help
 	  The Sun Network Filesystem (NFS) protocol provides transparent remote
@@ -32,6 +33,12 @@ config NFSUTILS_SERVER
 	help
 	  Install all tools and daemons to run an NFS server.
 
+config NFSUTILS_PYTHON
+	bool
+	prompt "install python utilities"
+	help
+	  Install tools depending on Python. Currently this affects nfsiostat only
+
 config NFSUTILS_NFSD_STARTSCRIPT
 	bool
 	depends on NFSUTILS_SERVER
diff --git a/rules/nfsutils.make b/rules/nfsutils.make
index 5986d51fd716..ff1f4cae0560 100644
--- a/rules/nfsutils.make
+++ b/rules/nfsutils.make
@@ -77,7 +77,6 @@ $(STATEDIR)/nfsutils.targetinstall:
 	@$(call install_fixup, nfsutils,DESCRIPTION,"Network Filesystem Support")
 
 	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsstat)
-	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsiostat)
 	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/showmount)
 
 	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/rpc.statd)
@@ -119,6 +118,10 @@ ifdef PTXCONF_NFSUTILS_SERVER
 		/etc/exports)
 endif
 
+ifdef PTXCONF_NFSUTILS_PYTHON
+	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsiostat)
+endif
+
 #	#
 #	# busybox init: start scripts
 #	#
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH] nfsutils: don't install nfsiostat without ensuring python is available
  2019-08-07  9:27 [ptxdist] [PATCH] nfsutils: don't install nfsiostat without ensuring python is available Uwe Kleine-König
@ 2019-08-07 11:45 ` Michael Olbrich
  2019-08-08  7:59   ` [ptxdist] [PATCH v2] " Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Olbrich @ 2019-08-07 11:45 UTC (permalink / raw)
  To: ptxdist

On Wed, Aug 07, 2019 at 11:27:33AM +0200, Uwe Kleine-König wrote:
> nfsiostat is a python script. Introduce a new suboption to select
> PYTHON and don't install nfsiostat if this is disabled.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  rules/nfsutils.in   | 7 +++++++
>  rules/nfsutils.make | 5 ++++-
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/rules/nfsutils.in b/rules/nfsutils.in
> index ef7eb7b98d60..34d237737024 100644
> --- a/rules/nfsutils.in
> +++ b/rules/nfsutils.in
> @@ -9,6 +9,7 @@ menuconfig NFSUTILS
>  	select RPCBIND			if RUNTIME
>  	select LIBTIRPC			if GLOBAL_IPV6
>  	select ROOTFS_PROTOCOLS		if NFSUTILS_CLIENT
> +	select PYTHON			if NFSUTILS_PYTHON

Hmm, I don't like this. The scripts works with python3 as well if
PTXCONF_PYTHON3_SYMLINK is enabled.

Maybe like this:

	select PYTHON3			if NFSUTILS_PYTHON && !PYTHON && RUNTIME
	select PYTHON3_SYMLINK		if NFSUTILS_PYTHON && !PYTHON && RUNTIME

It's not a build-time dependency, and I think we should prefer Python3
here.

Michael

>  	select ROOTFS_VAR_LIB		if RUNTIME
>  	help
>  	  The Sun Network Filesystem (NFS) protocol provides transparent remote
> @@ -32,6 +33,12 @@ config NFSUTILS_SERVER
>  	help
>  	  Install all tools and daemons to run an NFS server.
>  
> +config NFSUTILS_PYTHON
> +	bool
> +	prompt "install python utilities"
> +	help
> +	  Install tools depending on Python. Currently this affects nfsiostat only
> +
>  config NFSUTILS_NFSD_STARTSCRIPT
>  	bool
>  	depends on NFSUTILS_SERVER
> diff --git a/rules/nfsutils.make b/rules/nfsutils.make
> index 5986d51fd716..ff1f4cae0560 100644
> --- a/rules/nfsutils.make
> +++ b/rules/nfsutils.make
> @@ -77,7 +77,6 @@ $(STATEDIR)/nfsutils.targetinstall:
>  	@$(call install_fixup, nfsutils,DESCRIPTION,"Network Filesystem Support")
>  
>  	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsstat)
> -	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsiostat)
>  	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/showmount)
>  
>  	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/rpc.statd)
> @@ -119,6 +118,10 @@ ifdef PTXCONF_NFSUTILS_SERVER
>  		/etc/exports)
>  endif
>  
> +ifdef PTXCONF_NFSUTILS_PYTHON
> +	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsiostat)
> +endif
> +
>  #	#
>  #	# busybox init: start scripts
>  #	#
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* [ptxdist] [PATCH v2] nfsutils: don't install nfsiostat without ensuring python is available
  2019-08-07 11:45 ` Michael Olbrich
@ 2019-08-08  7:59   ` Uwe Kleine-König
  0 siblings, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2019-08-08  7:59 UTC (permalink / raw)
  To: ptxdist

nfsiostat is a python script. Introduce a new suboption with appropriate
selects to assert /usr/bin/python being available and don't install
nfsiostat if this is disabled.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,

On Wed, Aug 07, 2019 at 01:45:35PM +0200, Michael Olbrich wrote:
> On Wed, Aug 07, 2019 at 11:27:33AM +0200, Uwe Kleine-König wrote:
> > --- a/rules/nfsutils.in
> > +++ b/rules/nfsutils.in
> > @@ -9,6 +9,7 @@ menuconfig NFSUTILS
> >     select RPCBIND                  if RUNTIME
> >     select LIBTIRPC                 if GLOBAL_IPV6
> >     select ROOTFS_PROTOCOLS         if NFSUTILS_CLIENT
> > +   select PYTHON                   if NFSUTILS_PYTHON
> 
> Hmm, I don't like this. The scripts works with python3 as well if
> PTXCONF_PYTHON3_SYMLINK is enabled.
> 
> Maybe like this:
> 
>       select PYTHON3                  if NFSUTILS_PYTHON && !PYTHON && RUNTIME
>       select PYTHON3_SYMLINK          if NFSUTILS_PYTHON && !PYTHON && RUNTIME
> 
> It's not a build-time dependency, and I think we should prefer Python3
> here.

This is fine for me, too, and implemented in this v2.

Thanks for the feed-back
Uwe

 rules/nfsutils.in   | 8 ++++++++
 rules/nfsutils.make | 5 ++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/rules/nfsutils.in b/rules/nfsutils.in
index ef7eb7b98d60..77ea1a2ca877 100644
--- a/rules/nfsutils.in
+++ b/rules/nfsutils.in
@@ -9,6 +9,8 @@ menuconfig NFSUTILS
 	select RPCBIND			if RUNTIME
 	select LIBTIRPC			if GLOBAL_IPV6
 	select ROOTFS_PROTOCOLS		if NFSUTILS_CLIENT
+	select PYTHON3			if NFSUTILS_PYTHON && !PYTHON && RUNTIME
+	select PYTHON3_SYMLINK		if NFSUTILS_PYTHON && !PYTHON && RUNTIME
 	select ROOTFS_VAR_LIB		if RUNTIME
 	help
 	  The Sun Network Filesystem (NFS) protocol provides transparent remote
@@ -32,6 +34,12 @@ config NFSUTILS_SERVER
 	help
 	  Install all tools and daemons to run an NFS server.
 
+config NFSUTILS_PYTHON
+	bool
+	prompt "install python utilities"
+	help
+	  Install tools depending on Python. Currently this affects nfsiostat only
+
 config NFSUTILS_NFSD_STARTSCRIPT
 	bool
 	depends on NFSUTILS_SERVER
diff --git a/rules/nfsutils.make b/rules/nfsutils.make
index 5986d51fd716..ff1f4cae0560 100644
--- a/rules/nfsutils.make
+++ b/rules/nfsutils.make
@@ -77,7 +77,6 @@ $(STATEDIR)/nfsutils.targetinstall:
 	@$(call install_fixup, nfsutils,DESCRIPTION,"Network Filesystem Support")
 
 	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsstat)
-	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsiostat)
 	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/showmount)
 
 	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/rpc.statd)
@@ -119,6 +118,10 @@ ifdef PTXCONF_NFSUTILS_SERVER
 		/etc/exports)
 endif
 
+ifdef PTXCONF_NFSUTILS_PYTHON
+	@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsiostat)
+endif
+
 #	#
 #	# busybox init: start scripts
 #	#
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2019-08-08  7:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-07  9:27 [ptxdist] [PATCH] nfsutils: don't install nfsiostat without ensuring python is available Uwe Kleine-König
2019-08-07 11:45 ` Michael Olbrich
2019-08-08  7:59   ` [ptxdist] [PATCH v2] " Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox