All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/autofs: fix mount, umount and fsck program paths
@ 2019-08-16  9:09 Fabrice Fontaine
  2019-08-17 12:47 ` Thomas Petazzoni
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2019-08-16  9:09 UTC (permalink / raw)
  To: buildroot

Fixes:
 - https://bugs.buildroot.org/show_bug.cgi?id=11876

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/autofs/autofs.mk | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/package/autofs/autofs.mk b/package/autofs/autofs.mk
index e7c65ef4b0..5de399edf2 100644
--- a/package/autofs/autofs.mk
+++ b/package/autofs/autofs.mk
@@ -11,11 +11,17 @@ AUTOFS_LICENSE = GPL-2.0+
 AUTOFS_LICENSE_FILES = COPYING COPYRIGHT
 AUTOFS_DEPENDENCIES = host-flex host-bison host-pkgconf host-nfs-utils
 
-# autofs looks on the build machine for the path of modprobe, so tell
-# it explicitly where it will be located on the target.
+# autofs looks on the build machine for the path of modprobe, mount, umount and
+# fsck programs so tell it explicitly where it will be located on the target.
 AUTOFS_CONF_ENV = \
+	ac_cv_path_E2FSCK=/usr/sbin/fsck.ext2 \
+	ac_cv_path_E3FSCK=/usr/sbin/fsck.ext3 \
+	ac_cv_path_E4FSCK=/usr/sbin/fsck.ext4 \
 	ac_cv_path_KRB5_CONFIG=no \
 	ac_cv_path_MODPROBE=/sbin/modprobe \
+	ac_cv_path_MOUNT=/bin/mount \
+	ac_cv_path_MOUNT_NFS=/usr/sbin/mount.nfs \
+	ac_cv_path_UMOUNT=/bin/umount \
 	ac_cv_linux_procfs=yes
 
 # instead of looking in the PATH like any reasonable package, autofs
-- 
2.20.1

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

* [Buildroot] [PATCH 1/1] package/autofs: fix mount, umount and fsck program paths
  2019-08-16  9:09 [Buildroot] [PATCH 1/1] package/autofs: fix mount, umount and fsck program paths Fabrice Fontaine
@ 2019-08-17 12:47 ` Thomas Petazzoni
  2019-08-19 21:05   ` Arnout Vandecappelle
  2019-08-19 20:54 ` Arnout Vandecappelle
  2019-09-02 15:08 ` Peter Korsgaard
  2 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2019-08-17 12:47 UTC (permalink / raw)
  To: buildroot

Hello Fabrice,

On Fri, 16 Aug 2019 11:09:13 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fixes:
>  - https://bugs.buildroot.org/show_bug.cgi?id=11876
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/autofs/autofs.mk | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)

Applied to master, thanks. However, autofs now has the path to those
programs, but they may not necessarily be installed on the target.
autofs has no dependency on Busybox, or any other package that would
provide mount, umount, mount.nfs, fsck.*, etc. Perhaps this is
something that should be investigated? Does autofs need those tools in
all situations?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 1/1] package/autofs: fix mount, umount and fsck program paths
  2019-08-16  9:09 [Buildroot] [PATCH 1/1] package/autofs: fix mount, umount and fsck program paths Fabrice Fontaine
  2019-08-17 12:47 ` Thomas Petazzoni
@ 2019-08-19 20:54 ` Arnout Vandecappelle
  2019-09-02 15:08 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-08-19 20:54 UTC (permalink / raw)
  To: buildroot



On 16/08/2019 11:09, Fabrice Fontaine wrote:
> Fixes:
>  - https://bugs.buildroot.org/show_bug.cgi?id=11876
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/autofs/autofs.mk | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/package/autofs/autofs.mk b/package/autofs/autofs.mk
> index e7c65ef4b0..5de399edf2 100644
> --- a/package/autofs/autofs.mk
> +++ b/package/autofs/autofs.mk
> @@ -11,11 +11,17 @@ AUTOFS_LICENSE = GPL-2.0+
>  AUTOFS_LICENSE_FILES = COPYING COPYRIGHT
>  AUTOFS_DEPENDENCIES = host-flex host-bison host-pkgconf host-nfs-utils
>  
> -# autofs looks on the build machine for the path of modprobe, so tell
> -# it explicitly where it will be located on the target.
> +# autofs looks on the build machine for the path of modprobe, mount, umount and
> +# fsck programs so tell it explicitly where it will be located on the target.
>  AUTOFS_CONF_ENV = \
> +	ac_cv_path_E2FSCK=/usr/sbin/fsck.ext2 \
> +	ac_cv_path_E3FSCK=/usr/sbin/fsck.ext3 \
> +	ac_cv_path_E4FSCK=/usr/sbin/fsck.ext4 \

 I must be blind or something, but e2fsprogs seem to install these in /sbin. Am
I missing something?

 Also, as noted by Thomas, these will only exist when e2fsprogs is installed. If
not, automounting any ext2/3/4 will not work because "fsck returned an error".

 It would seem to make more sense to me to set

	ac_cv_path_E2FSCK=/sbin/fsck \
	ac_cv_path_E3FSCK=no \
	ac_cv_path_E4FSCK=no \

 That way, the fsck wrapper always gets used (if the e3 and e4 versions don't
exist, the e2 version is used regardless of fs type).

 Regards,
 Arnout

>  	ac_cv_path_KRB5_CONFIG=no \
>  	ac_cv_path_MODPROBE=/sbin/modprobe \
> +	ac_cv_path_MOUNT=/bin/mount \
> +	ac_cv_path_MOUNT_NFS=/usr/sbin/mount.nfs \
> +	ac_cv_path_UMOUNT=/bin/umount \
>  	ac_cv_linux_procfs=yes
>  
>  # instead of looking in the PATH like any reasonable package, autofs
> 

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

* [Buildroot] [PATCH 1/1] package/autofs: fix mount, umount and fsck program paths
  2019-08-17 12:47 ` Thomas Petazzoni
@ 2019-08-19 21:05   ` Arnout Vandecappelle
  0 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-08-19 21:05 UTC (permalink / raw)
  To: buildroot



On 17/08/2019 14:47, Thomas Petazzoni wrote:
> Hello Fabrice,
> 
> On Fri, 16 Aug 2019 11:09:13 +0200
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> 
>> Fixes:
>>  - https://bugs.buildroot.org/show_bug.cgi?id=11876
>>
>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>> ---
>>  package/autofs/autofs.mk | 10 ++++++++--
>>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> Applied to master, thanks. However, autofs now has the path to those
> programs, but they may not necessarily be installed on the target.
> autofs has no dependency on Busybox, or any other package that would
> provide mount, umount, mount.nfs, fsck.*, etc. Perhaps this is
> something that should be investigated? Does autofs need those tools in
> all situations?

 mount and umount and modprobe really have to be there or the system is broken.
We don't check for such insanity. In fact, we assume that everything needed for
a "normal" system (where "normal" is not exactly specified) is provided by
either busybox or something else.

 fsck.ext* I covered in my reply to the original patch.

 mount.nfs I'm not sure of. It is only used to check the version of mount.nfs,
which is only used under the following comment:

         * Check for either a list containing only proximity local hosts
         * or a single host entry whose proximity isn't local. If so
         * return immediately as we don't want to add probe latency for
         * the common case of a single filesystem mount request.
         *
         * But, if the kernel understands text nfs mount options then
         * mount.nfs most likely bypasses its probing and lets the kernel
         * do all the work. This can lead to long timeouts for hosts that
         * are not available so check the kernel version and mount.nfs
         * version and probe singleton mounts if the kernel version is
         * greater than 2.6.22 and mount.nfs version is greater than 1.1.1.
         * But also allow the MOUNT_WAIT configuration parameter to override
         * the probing.


 I don't really understand what is said here... But apparently, the worst case
is that it's a bit slower in some specific corner case.

 Regards,
 Arnout


> 
> Best regards,
> 
> Thomas
> 

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

* [Buildroot] [PATCH 1/1] package/autofs: fix mount, umount and fsck program paths
  2019-08-16  9:09 [Buildroot] [PATCH 1/1] package/autofs: fix mount, umount and fsck program paths Fabrice Fontaine
  2019-08-17 12:47 ` Thomas Petazzoni
  2019-08-19 20:54 ` Arnout Vandecappelle
@ 2019-09-02 15:08 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2019-09-02 15:08 UTC (permalink / raw)
  To: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fixes:
 >  - https://bugs.buildroot.org/show_bug.cgi?id=11876

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2019.02.x and 2019.05.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2019-09-02 15:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16  9:09 [Buildroot] [PATCH 1/1] package/autofs: fix mount, umount and fsck program paths Fabrice Fontaine
2019-08-17 12:47 ` Thomas Petazzoni
2019-08-19 21:05   ` Arnout Vandecappelle
2019-08-19 20:54 ` Arnout Vandecappelle
2019-09-02 15:08 ` 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.