All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/libfuse3: new package
@ 2019-03-06 16:30 Norbert Lange
  2019-03-06 16:30 ` [Buildroot] [PATCH 2/2] package/libfuse: common files from libfuse3 are prefered Norbert Lange
  2019-03-10 15:35 ` [Buildroot] [PATCH 1/2] package/libfuse3: new package Arnout Vandecappelle
  0 siblings, 2 replies; 9+ messages in thread
From: Norbert Lange @ 2019-03-06 16:30 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Norbert Lange <norbert.lange@andritz.com>
---
 package/Config.in                      |  1 +
 package/libfuse3/Config.in             | 12 ++++++++++
 package/libfuse3/disable_fileops.patch | 32 ++++++++++++++++++++++++++
 package/libfuse3/libfuse3.hash         |  7 ++++++
 package/libfuse3/libfuse3.mk           | 30 ++++++++++++++++++++++++
 5 files changed, 82 insertions(+)
 create mode 100644 package/libfuse3/Config.in
 create mode 100644 package/libfuse3/disable_fileops.patch
 create mode 100644 package/libfuse3/libfuse3.hash
 create mode 100644 package/libfuse3/libfuse3.mk

diff --git a/package/Config.in b/package/Config.in
index 969f94c911..155c760df1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1229,6 +1229,7 @@ menu "Filesystem"
 	source "package/libconfig/Config.in"
 	source "package/libconfuse/Config.in"
 	source "package/libfuse/Config.in"
+	source "package/libfuse3/Config.in"
 	source "package/liblockfile/Config.in"
 	source "package/libnfs/Config.in"
 	source "package/libsysfs/Config.in"
diff --git a/package/libfuse3/Config.in b/package/libfuse3/Config.in
new file mode 100644
index 0000000000..d349fcd67f
--- /dev/null
+++ b/package/libfuse3/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_LIBFUSE3
+	bool "libfuse3"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU # fork()
+	help
+	  FUSE 3 (Filesystem in UserSpacE)
+
+	  https://github.com/libfuse/libfuse
+
+comment "libfuse3 needs a toolchain w/ threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/libfuse3/disable_fileops.patch b/package/libfuse3/disable_fileops.patch
new file mode 100644
index 0000000000..b0373bc43a
--- /dev/null
+++ b/package/libfuse3/disable_fileops.patch
@@ -0,0 +1,32 @@
+diff -burN fuse-3.4.1.org/util/install_helper.sh fuse-3.4.1/util/install_helper.sh
+--- fuse-3.4.1.org/util/install_helper.sh	2019-02-12 14:33:18.549507335 +0100
++++ fuse-3.4.1/util/install_helper.sh	2019-02-12 14:35:20.726772913 +0100
+@@ -22,8 +22,8 @@
+     DESTDIR="${DESTDIR%/}"
+ fi
+ 
+-chown root:root "${DESTDIR}${bindir}/fusermount3"
+-chmod u+s "${DESTDIR}${bindir}/fusermount3"
++#chown root:root "${DESTDIR}${bindir}/fusermount3"
++#chmod u+s "${DESTDIR}${bindir}/fusermount3"
+ 
+ install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \
+ 	"${DESTDIR}${sysconfdir}/fuse.conf"
+@@ -31,7 +31,7 @@
+ 
+ if test ! -e "${DESTDIR}/dev/fuse"; then
+     mkdir -p "${DESTDIR}/dev"
+-    mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
++#    mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
+ fi
+ 
+ install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
+@@ -42,7 +42,7 @@
+ 
+ 
+ if test -x /usr/sbin/update-rc.d && test -z "${DESTDIR}"; then
+-    /usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true
++    : # /usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true
+ else
+     echo "== FURTHER ACTION REQUIRED =="
+     echo "Make sure that your init system will start the ${sysconfdir}/init.d/fuse3 init script"
diff --git a/package/libfuse3/libfuse3.hash b/package/libfuse3/libfuse3.hash
new file mode 100644
index 0000000000..d0fd037428
--- /dev/null
+++ b/package/libfuse3/libfuse3.hash
@@ -0,0 +1,7 @@
+# Locally calculated after checking pgp signature
+sha256  88302a8fa56e7871066652495b05faf14b36dca9f1b740e9fb00da0785e60485  fuse-3.4.1.tar.xz
+
+# Hash for license files:
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  GPL2.txt
+sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  LGPL2.txt
+sha256  b8832d9caaa075bbbd2aef24efa09f8b7ab66a832812d88c602da0c7b4397fad  LICENSE
diff --git a/package/libfuse3/libfuse3.mk b/package/libfuse3/libfuse3.mk
new file mode 100644
index 0000000000..eecdb248d3
--- /dev/null
+++ b/package/libfuse3/libfuse3.mk
@@ -0,0 +1,30 @@
+################################################################################
+#
+# libfuse
+#
+################################################################################
+
+LIBFUSE3_VERSION = 3.4.1
+LIBFUSE3_SOURCE = fuse-$(LIBFUSE3_VERSION).tar.xz
+LIBFUSE3_SITE = https://github.com/libfuse/libfuse/releases/download/fuse-$(LIBFUSE3_VERSION)
+LIBFUSE3_LICENSE = GPL-2.0, LGPL-2.1
+LIBFUSE3_LICENSE_FILES = GPL2.txt LGPL2.txt LICENSE
+LIBFUSE3_INSTALL_STAGING = YES
+LIBFUSE3_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+LIBFUSE3_CONF_OPTS = \
+	-Dexamples=false \
+	-Dutils=true \
+	-Dudevrulesdir=/lib/udev/rules.d
+
+define LIBFUSE3_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(STAGING_DIR)/usr/bin/fusermount3 $(TARGET_DIR)/usr/bin/
+	$(if $(filter y,$(BR2_STATIC_LIBS)),,cp -dpf $(STAGING_DIR)/usr/lib/libfuse3.so* $(TARGET_DIR)/usr/lib/)
+	mkdir -p $(TARGET_DIR)/lib/udev/rules.d
+	$(INSTALL) -m 0644 $(STAGING_DIR)/lib/udev/rules.d/*-fuse3.rules $(TARGET_DIR)/lib/udev/rules.d
+endef
+
+define LIBFUSE3_PERMISSIONS
+	/usr/bin/fusermount3 f 4755 0 0 - - - - -
+endef
+
+$(eval $(meson-package))
-- 
2.20.1

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

* [Buildroot] [PATCH 2/2] package/libfuse: common files from libfuse3 are prefered
  2019-03-06 16:30 [Buildroot] [PATCH 1/2] package/libfuse3: new package Norbert Lange
@ 2019-03-06 16:30 ` Norbert Lange
  2019-03-10 15:20   ` Arnout Vandecappelle
  2019-03-10 15:35 ` [Buildroot] [PATCH 1/2] package/libfuse3: new package Arnout Vandecappelle
  1 sibling, 1 reply; 9+ messages in thread
From: Norbert Lange @ 2019-03-06 16:30 UTC (permalink / raw)
  To: buildroot

if both libfuse and libfuse3 are installed,
make sure libfuse3 will be build first and
use the auxiliary files from the newer package.

Also fix the missing setuid bit for fusermount.

Signed-off-by: Norbert Lange <norbert.lange@andritz.com>
---
 package/libfuse/libfuse.mk   | 10 ++++++++--
 package/libfuse3/libfuse3.mk |  1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/package/libfuse/libfuse.mk b/package/libfuse/libfuse.mk
index e8a79a3166..cf7bb2a8e0 100644
--- a/package/libfuse/libfuse.mk
+++ b/package/libfuse/libfuse.mk
@@ -10,15 +10,21 @@ LIBFUSE_SITE = https://github.com/libfuse/libfuse/releases/download/fuse-$(LIBFU
 LIBFUSE_LICENSE = GPL-2.0, LGPL-2.1
 LIBFUSE_LICENSE_FILES = COPYING COPYING.LIB
 LIBFUSE_INSTALL_STAGING = YES
-LIBFUSE_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+LIBFUSE_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(if $(BR2_PACKAGE_FUSE3),fuse3)
 LIBFUSE_CONF_OPTS = \
 	--disable-example \
 	--enable-lib \
 	--enable-util
 
 define LIBFUSE_INSTALL_TARGET_CMDS
-	cp -dpf $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/
+	$(if $(BR2_PACKAGE_FUSE3),, \
+		$(INSTALL) -D -m 0755 $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/ )
 	cp -dpf $(STAGING_DIR)/usr/lib/libfuse.so* $(TARGET_DIR)/usr/lib/
 endef
 
+define LIBFUSE_PERMISSIONS
+	$(if $(BR2_PACKAGE_FUSE3),, \
+		/usr/bin/fusermount f 4755 0 0 - - - - -)
+endef
+
 $(eval $(autotools-package))
diff --git a/package/libfuse3/libfuse3.mk b/package/libfuse3/libfuse3.mk
index eecdb248d3..be3bf4c746 100644
--- a/package/libfuse3/libfuse3.mk
+++ b/package/libfuse3/libfuse3.mk
@@ -21,6 +21,7 @@ define LIBFUSE3_INSTALL_TARGET_CMDS
 	$(if $(filter y,$(BR2_STATIC_LIBS)),,cp -dpf $(STAGING_DIR)/usr/lib/libfuse3.so* $(TARGET_DIR)/usr/lib/)
 	mkdir -p $(TARGET_DIR)/lib/udev/rules.d
 	$(INSTALL) -m 0644 $(STAGING_DIR)/lib/udev/rules.d/*-fuse3.rules $(TARGET_DIR)/lib/udev/rules.d
+	ln -sf fusermount3 $(TARGET_DIR)/usr/bin/fusermount
 endef
 
 define LIBFUSE3_PERMISSIONS
-- 
2.20.1

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

* [Buildroot] [PATCH 2/2] package/libfuse: common files from libfuse3 are prefered
  2019-03-06 16:30 ` [Buildroot] [PATCH 2/2] package/libfuse: common files from libfuse3 are prefered Norbert Lange
@ 2019-03-10 15:20   ` Arnout Vandecappelle
  2019-03-10 19:43     ` Norbert Lange
  0 siblings, 1 reply; 9+ messages in thread
From: Arnout Vandecappelle @ 2019-03-10 15:20 UTC (permalink / raw)
  To: buildroot

 Hi Norbert,

On 06/03/2019 17:30, Norbert Lange wrote:
> if both libfuse and libfuse3 are installed,
> make sure libfuse3 will be build first and
> use the auxiliary files from the newer package.

 Which files are those?


 You could also verify if the packages that currently use libfuse can also use
libfuse3: curlftpfs e2fsprogs exfat gvfs libostree lua-flu ntfs-3g openvmtools
owfs sshfs unionfs xenomai. If many of them can also work with libfuse3, it
might be worth making a virtual package out of it.


> 
> Also fix the missing setuid bit for fusermount.

 This should be a separate patch, it's independent of the other changes. The
"Also" is a hint :-)

> 
> Signed-off-by: Norbert Lange <norbert.lange@andritz.com>
> ---
>  package/libfuse/libfuse.mk   | 10 ++++++++--
>  package/libfuse3/libfuse3.mk |  1 +
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/package/libfuse/libfuse.mk b/package/libfuse/libfuse.mk
> index e8a79a3166..cf7bb2a8e0 100644
> --- a/package/libfuse/libfuse.mk
> +++ b/package/libfuse/libfuse.mk
> @@ -10,15 +10,21 @@ LIBFUSE_SITE = https://github.com/libfuse/libfuse/releases/download/fuse-$(LIBFU
>  LIBFUSE_LICENSE = GPL-2.0, LGPL-2.1
>  LIBFUSE_LICENSE_FILES = COPYING COPYING.LIB
>  LIBFUSE_INSTALL_STAGING = YES
> -LIBFUSE_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv)
> +LIBFUSE_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(if $(BR2_PACKAGE_FUSE3),fuse3)

 libfuse3, not fuse3.

>  LIBFUSE_CONF_OPTS = \
>  	--disable-example \
>  	--enable-lib \
>  	--enable-util
>  
>  define LIBFUSE_INSTALL_TARGET_CMDS
> -	cp -dpf $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/
> +	$(if $(BR2_PACKAGE_FUSE3),, \
> +		$(INSTALL) -D -m 0755 $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/ )

 In the libfuse3 package it's called fusermount3, so what is the conflict?

>  	cp -dpf $(STAGING_DIR)/usr/lib/libfuse.so* $(TARGET_DIR)/usr/lib/
>  endef
>  
> +define LIBFUSE_PERMISSIONS
> +	$(if $(BR2_PACKAGE_FUSE3),, \
> +		/usr/bin/fusermount f 4755 0 0 - - - - -)
> +endef
> +
>  $(eval $(autotools-package))
> diff --git a/package/libfuse3/libfuse3.mk b/package/libfuse3/libfuse3.mk
> index eecdb248d3..be3bf4c746 100644
> --- a/package/libfuse3/libfuse3.mk
> +++ b/package/libfuse3/libfuse3.mk
> @@ -21,6 +21,7 @@ define LIBFUSE3_INSTALL_TARGET_CMDS
>  	$(if $(filter y,$(BR2_STATIC_LIBS)),,cp -dpf $(STAGING_DIR)/usr/lib/libfuse3.so* $(TARGET_DIR)/usr/lib/)
>  	mkdir -p $(TARGET_DIR)/lib/udev/rules.d
>  	$(INSTALL) -m 0644 $(STAGING_DIR)/lib/udev/rules.d/*-fuse3.rules $(TARGET_DIR)/lib/udev/rules.d
> +	ln -sf fusermount3 $(TARGET_DIR)/usr/bin/fusermount

 Ah, here it is :-)

 Why do you need to make this symlink?

 Regards,
 Arnout

>  endef
>  
>  define LIBFUSE3_PERMISSIONS
> 

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

* [Buildroot] [PATCH 1/2] package/libfuse3: new package
  2019-03-06 16:30 [Buildroot] [PATCH 1/2] package/libfuse3: new package Norbert Lange
  2019-03-06 16:30 ` [Buildroot] [PATCH 2/2] package/libfuse: common files from libfuse3 are prefered Norbert Lange
@ 2019-03-10 15:35 ` Arnout Vandecappelle
  2019-03-10 19:32   ` Norbert Lange
  1 sibling, 1 reply; 9+ messages in thread
From: Arnout Vandecappelle @ 2019-03-10 15:35 UTC (permalink / raw)
  To: buildroot



On 06/03/2019 17:30, Norbert Lange wrote:
> Signed-off-by: Norbert Lange <norbert.lange@andritz.com>
> ---
>  package/Config.in                      |  1 +
>  package/libfuse3/Config.in             | 12 ++++++++++
>  package/libfuse3/disable_fileops.patch | 32 ++++++++++++++++++++++++++
>  package/libfuse3/libfuse3.hash         |  7 ++++++
>  package/libfuse3/libfuse3.mk           | 30 ++++++++++++++++++++++++

 Please add yourself to DEVELOPERS as well.

>  5 files changed, 82 insertions(+)
>  create mode 100644 package/libfuse3/Config.in
>  create mode 100644 package/libfuse3/disable_fileops.patch
>  create mode 100644 package/libfuse3/libfuse3.hash
>  create mode 100644 package/libfuse3/libfuse3.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 969f94c911..155c760df1 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1229,6 +1229,7 @@ menu "Filesystem"
>  	source "package/libconfig/Config.in"
>  	source "package/libconfuse/Config.in"
>  	source "package/libfuse/Config.in"
> +	source "package/libfuse3/Config.in"
>  	source "package/liblockfile/Config.in"
>  	source "package/libnfs/Config.in"
>  	source "package/libsysfs/Config.in"
> diff --git a/package/libfuse3/Config.in b/package/libfuse3/Config.in
> new file mode 100644
> index 0000000000..d349fcd67f
> --- /dev/null
> +++ b/package/libfuse3/Config.in
> @@ -0,0 +1,12 @@
> +config BR2_PACKAGE_LIBFUSE3
> +	bool "libfuse3"
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on BR2_USE_MMU # fork()
> +	help
> +	  FUSE 3 (Filesystem in UserSpacE)
> +
> +	  https://github.com/libfuse/libfuse

 It would be interesting to check if we could get away with just treating this
as a version bump instead of a new package. Do you have any idea how much the
API has changed since 2.9? There are quite a few reverse dependencies though so
it could be a bit tricky...

> +
> +comment "libfuse3 needs a toolchain w/ threads"
> +	depends on BR2_USE_MMU
> +	depends on !BR2_TOOLCHAIN_HAS_THREADS
> diff --git a/package/libfuse3/disable_fileops.patch b/package/libfuse3/disable_fileops.patch
> new file mode 100644
> index 0000000000..b0373bc43a
> --- /dev/null
> +++ b/package/libfuse3/disable_fileops.patch
> @@ -0,0 +1,32 @@
> +diff -burN fuse-3.4.1.org/util/install_helper.sh fuse-3.4.1/util/install_helper.sh
> +--- fuse-3.4.1.org/util/install_helper.sh	2019-02-12 14:33:18.549507335 +0100
> ++++ fuse-3.4.1/util/install_helper.sh	2019-02-12 14:35:20.726772913 +0100
> +@@ -22,8 +22,8 @@
> +     DESTDIR="${DESTDIR%/}"
> + fi
> + 
> +-chown root:root "${DESTDIR}${bindir}/fusermount3"
> +-chmod u+s "${DESTDIR}${bindir}/fusermount3"
> ++#chown root:root "${DESTDIR}${bindir}/fusermount3"
> ++#chmod u+s "${DESTDIR}${bindir}/fusermount3"

 It would be nice to find an upstreamable way to do this. Maybe just putting
'|| true' behind it is enough?

> + 
> + install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \
> + 	"${DESTDIR}${sysconfdir}/fuse.conf"
> +@@ -31,7 +31,7 @@
> + 
> + if test ! -e "${DESTDIR}/dev/fuse"; then
> +     mkdir -p "${DESTDIR}/dev"
> +-    mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
> ++#    mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
> + fi
> + 
> + install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
> +@@ -42,7 +42,7 @@
> + 
> + 
> + if test -x /usr/sbin/update-rc.d && test -z "${DESTDIR}"; then
> +-    /usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true
> ++    : # /usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true

 This shouldn't be needed at all, because DESTDIR is set this piece of code will
never be executed.

> + else
> +     echo "== FURTHER ACTION REQUIRED =="
> +     echo "Make sure that your init system will start the ${sysconfdir}/init.d/fuse3 init script"
> diff --git a/package/libfuse3/libfuse3.hash b/package/libfuse3/libfuse3.hash
> new file mode 100644
> index 0000000000..d0fd037428
> --- /dev/null
> +++ b/package/libfuse3/libfuse3.hash
> @@ -0,0 +1,7 @@
> +# Locally calculated after checking pgp signature
> +sha256  88302a8fa56e7871066652495b05faf14b36dca9f1b740e9fb00da0785e60485  fuse-3.4.1.tar.xz
> +
> +# Hash for license files:
> +sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  GPL2.txt
> +sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  LGPL2.txt
> +sha256  b8832d9caaa075bbbd2aef24efa09f8b7ab66a832812d88c602da0c7b4397fad  LICENSE
> diff --git a/package/libfuse3/libfuse3.mk b/package/libfuse3/libfuse3.mk
> new file mode 100644
> index 0000000000..eecdb248d3
> --- /dev/null
> +++ b/package/libfuse3/libfuse3.mk
> @@ -0,0 +1,30 @@
> +################################################################################
> +#
> +# libfuse
> +#
> +################################################################################
> +
> +LIBFUSE3_VERSION = 3.4.1

3.4.2 is out.

> +LIBFUSE3_SOURCE = fuse-$(LIBFUSE3_VERSION).tar.xz
> +LIBFUSE3_SITE = https://github.com/libfuse/libfuse/releases/download/fuse-$(LIBFUSE3_VERSION)
> +LIBFUSE3_LICENSE = GPL-2.0, LGPL-2.1

 We normally clarify this like LGPL-2.1 (library), GPL-2.0 (rest)

> +LIBFUSE3_LICENSE_FILES = GPL2.txt LGPL2.txt LICENSE
> +LIBFUSE3_INSTALL_STAGING = YES
> +LIBFUSE3_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv)
> +LIBFUSE3_CONF_OPTS = \
> +	-Dexamples=false \
> +	-Dutils=true \
> +	-Dudevrulesdir=/lib/udev/rules.d
> +
> +define LIBFUSE3_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 0755 $(STAGING_DIR)/usr/bin/fusermount3 $(TARGET_DIR)/usr/bin/
> +	$(if $(filter y,$(BR2_STATIC_LIBS)),,cp -dpf $(STAGING_DIR)/usr/lib/libfuse3.so* $(TARGET_DIR)/usr/lib/)
> +	mkdir -p $(TARGET_DIR)/lib/udev/rules.d
> +	$(INSTALL) -m 0644 $(STAGING_DIR)/lib/udev/rules.d/*-fuse3.rules $(TARGET_DIR)/lib/udev/rules.d

 Is there any reason not to use the normal install for target as well?

 Regards,
 Arnout

> +endef
> +
> +define LIBFUSE3_PERMISSIONS
> +	/usr/bin/fusermount3 f 4755 0 0 - - - - -
> +endef
> +
> +$(eval $(meson-package))
> 

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

* [Buildroot] [PATCH 1/2] package/libfuse3: new package
  2019-03-10 15:35 ` [Buildroot] [PATCH 1/2] package/libfuse3: new package Arnout Vandecappelle
@ 2019-03-10 19:32   ` Norbert Lange
  2019-03-11  8:46     ` Arnout Vandecappelle
  0 siblings, 1 reply; 9+ messages in thread
From: Norbert Lange @ 2019-03-10 19:32 UTC (permalink / raw)
  To: buildroot

Am So., 10. M?rz 2019 um 16:35 Uhr schrieb Arnout Vandecappelle
<arnout@mind.be>:
>
>
>
> On 06/03/2019 17:30, Norbert Lange wrote:
> > Signed-off-by: Norbert Lange <norbert.lange@andritz.com>
> > ---
> >  package/Config.in                      |  1 +
> >  package/libfuse3/Config.in             | 12 ++++++++++
> >  package/libfuse3/disable_fileops.patch | 32 ++++++++++++++++++++++++++
> >  package/libfuse3/libfuse3.hash         |  7 ++++++
> >  package/libfuse3/libfuse3.mk           | 30 ++++++++++++++++++++++++
>
>  Please add yourself to DEVELOPERS as well.

Awww, responsibilities =)

>
> >  5 files changed, 82 insertions(+)
> >  create mode 100644 package/libfuse3/Config.in
> >  create mode 100644 package/libfuse3/disable_fileops.patch
> >  create mode 100644 package/libfuse3/libfuse3.hash
> >  create mode 100644 package/libfuse3/libfuse3.mk
> >
> > diff --git a/package/Config.in b/package/Config.in
> > index 969f94c911..155c760df1 100644
> > --- a/package/Config.in
> > +++ b/package/Config.in
> > @@ -1229,6 +1229,7 @@ menu "Filesystem"
> >       source "package/libconfig/Config.in"
> >       source "package/libconfuse/Config.in"
> >       source "package/libfuse/Config.in"
> > +     source "package/libfuse3/Config.in"
> >       source "package/liblockfile/Config.in"
> >       source "package/libnfs/Config.in"
> >       source "package/libsysfs/Config.in"
> > diff --git a/package/libfuse3/Config.in b/package/libfuse3/Config.in
> > new file mode 100644
> > index 0000000000..d349fcd67f
> > --- /dev/null
> > +++ b/package/libfuse3/Config.in
> > @@ -0,0 +1,12 @@
> > +config BR2_PACKAGE_LIBFUSE3
> > +     bool "libfuse3"
> > +     depends on BR2_TOOLCHAIN_HAS_THREADS
> > +     depends on BR2_USE_MMU # fork()
> > +     help
> > +       FUSE 3 (Filesystem in UserSpacE)
> > +
> > +       https://github.com/libfuse/libfuse
>
>  It would be interesting to check if we could get away with just treating this
> as a version bump instead of a new package. Do you have any idea how much the
> API has changed since 2.9? There are quite a few reverse dependencies though so
> it could be a bit tricky...

I am still new to FUSE, but it is not BW compatible even for small examples,
primary because callbacks have a different signature (added parameters).
Upstream maintaining both 2.x (bugfixes) and 3.x.
Its neither ABI nor source compatible, you would have to explicitly
support V2, V3 or both
per package.

>
> > +
> > +comment "libfuse3 needs a toolchain w/ threads"
> > +     depends on BR2_USE_MMU
> > +     depends on !BR2_TOOLCHAIN_HAS_THREADS
> > diff --git a/package/libfuse3/disable_fileops.patch b/package/libfuse3/disable_fileops.patch
> > new file mode 100644
> > index 0000000000..b0373bc43a
> > --- /dev/null
> > +++ b/package/libfuse3/disable_fileops.patch
> > @@ -0,0 +1,32 @@
> > +diff -burN fuse-3.4.1.org/util/install_helper.sh fuse-3.4.1/util/install_helper.sh
> > +--- fuse-3.4.1.org/util/install_helper.sh    2019-02-12 14:33:18.549507335 +0100
> > ++++ fuse-3.4.1/util/install_helper.sh        2019-02-12 14:35:20.726772913 +0100
> > +@@ -22,8 +22,8 @@
> > +     DESTDIR="${DESTDIR%/}"
> > + fi
> > +
> > +-chown root:root "${DESTDIR}${bindir}/fusermount3"
> > +-chmod u+s "${DESTDIR}${bindir}/fusermount3"
> > ++#chown root:root "${DESTDIR}${bindir}/fusermount3"
> > ++#chmod u+s "${DESTDIR}${bindir}/fusermount3"
>
>  It would be nice to find an upstreamable way to do this. Maybe just putting
> '|| true' behind it is enough?

Yeah, this is a hack, not really a fan of the meson way of having to use
arbitrary scripts to extend.

>
> > +
> > + install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \
> > +     "${DESTDIR}${sysconfdir}/fuse.conf"
> > +@@ -31,7 +31,7 @@
> > +
> > + if test ! -e "${DESTDIR}/dev/fuse"; then
> > +     mkdir -p "${DESTDIR}/dev"
> > +-    mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
> > ++#    mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
> > + fi
> > +
> > + install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
> > +@@ -42,7 +42,7 @@
> > +
> > +
> > + if test -x /usr/sbin/update-rc.d && test -z "${DESTDIR}"; then
> > +-    /usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true
> > ++    : # /usr/sbin/update-rc.d fuse3 start 34 S . start 41 0 6 . || /bin/true
>
>  This shouldn't be needed at all, because DESTDIR is set this piece of code will
> never be executed.
>
> > + else
> > +     echo "== FURTHER ACTION REQUIRED =="
> > +     echo "Make sure that your init system will start the ${sysconfdir}/init.d/fuse3 init script"
> > diff --git a/package/libfuse3/libfuse3.hash b/package/libfuse3/libfuse3.hash
> > new file mode 100644
> > index 0000000000..d0fd037428
> > --- /dev/null
> > +++ b/package/libfuse3/libfuse3.hash
> > @@ -0,0 +1,7 @@
> > +# Locally calculated after checking pgp signature
> > +sha256  88302a8fa56e7871066652495b05faf14b36dca9f1b740e9fb00da0785e60485  fuse-3.4.1.tar.xz
> > +
> > +# Hash for license files:
> > +sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  GPL2.txt
> > +sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  LGPL2.txt
> > +sha256  b8832d9caaa075bbbd2aef24efa09f8b7ab66a832812d88c602da0c7b4397fad  LICENSE
> > diff --git a/package/libfuse3/libfuse3.mk b/package/libfuse3/libfuse3.mk
> > new file mode 100644
> > index 0000000000..eecdb248d3
> > --- /dev/null
> > +++ b/package/libfuse3/libfuse3.mk
> > @@ -0,0 +1,30 @@
> > +################################################################################
> > +#
> > +# libfuse
> > +#
> > +################################################################################
> > +
> > +LIBFUSE3_VERSION = 3.4.1
>
> 3.4.2 is out.

K, will redo the next days

>
> > +LIBFUSE3_SOURCE = fuse-$(LIBFUSE3_VERSION).tar.xz
> > +LIBFUSE3_SITE = https://github.com/libfuse/libfuse/releases/download/fuse-$(LIBFUSE3_VERSION)
> > +LIBFUSE3_LICENSE = GPL-2.0, LGPL-2.1
>
>  We normally clarify this like LGPL-2.1 (library), GPL-2.0 (rest)

OK.

>
> > +LIBFUSE3_LICENSE_FILES = GPL2.txt LGPL2.txt LICENSE
> > +LIBFUSE3_INSTALL_STAGING = YES
> > +LIBFUSE3_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv)
> > +LIBFUSE3_CONF_OPTS = \
> > +     -Dexamples=false \
> > +     -Dutils=true \
> > +     -Dudevrulesdir=/lib/udev/rules.d
> > +
> > +define LIBFUSE3_INSTALL_TARGET_CMDS
> > +     $(INSTALL) -D -m 0755 $(STAGING_DIR)/usr/bin/fusermount3 $(TARGET_DIR)/usr/bin/
> > +     $(if $(filter y,$(BR2_STATIC_LIBS)),,cp -dpf $(STAGING_DIR)/usr/lib/libfuse3.so* $(TARGET_DIR)/usr/lib/)
> > +     mkdir -p $(TARGET_DIR)/lib/udev/rules.d
> > +     $(INSTALL) -m 0644 $(STAGING_DIR)/lib/udev/rules.d/*-fuse3.rules $(TARGET_DIR)/lib/udev/rules.d
>
>  Is there any reason not to use the normal install for target as well?

Yes, I would have to `rm` all unused files. This was not welcome some time ago,
and installing a handful files is easier to track than a potential
growing number to remove
(and clearing up *maybe* empty directories).
Might also have been some other cross-install issue on top that I cant
remember now.

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

* [Buildroot] [PATCH 2/2] package/libfuse: common files from libfuse3 are prefered
  2019-03-10 15:20   ` Arnout Vandecappelle
@ 2019-03-10 19:43     ` Norbert Lange
  2019-03-11  8:54       ` Arnout Vandecappelle
  0 siblings, 1 reply; 9+ messages in thread
From: Norbert Lange @ 2019-03-10 19:43 UTC (permalink / raw)
  To: buildroot

Am So., 10. M?rz 2019 um 16:20 Uhr schrieb Arnout Vandecappelle
<arnout@mind.be>:
>
>  Hi Norbert,
>
> On 06/03/2019 17:30, Norbert Lange wrote:
> > if both libfuse and libfuse3 are installed,
> > make sure libfuse3 will be build first and
> > use the auxiliary files from the newer package.
>
>  Which files are those?

Everything except the libfuse DSO itself, see
https://github.com/libfuse/libfuse/blob/master/ChangeLog.rst#libfuse-300-2016-12-08

>  You could also verify if the packages that currently use libfuse can also use
> libfuse3: curlftpfs e2fsprogs exfat gvfs libostree lua-flu ntfs-3g openvmtools
> owfs sshfs unionfs xenomai. If many of them can also work with libfuse3, it
> might be worth making a virtual package out of it.

They most certainly wont, V2 and V3 are not forward compatible.

>
>
> >
> > Also fix the missing setuid bit for fusermount.
>
>  This should be a separate patch, it's independent of the other changes. The
> "Also" is a hint :-)

K, now for something completely different...

>
> >
> > Signed-off-by: Norbert Lange <norbert.lange@andritz.com>
> > ---
> >  package/libfuse/libfuse.mk   | 10 ++++++++--
> >  package/libfuse3/libfuse3.mk |  1 +
> >  2 files changed, 9 insertions(+), 2 deletions(-)
> >
> > diff --git a/package/libfuse/libfuse.mk b/package/libfuse/libfuse.mk
> > index e8a79a3166..cf7bb2a8e0 100644
> > --- a/package/libfuse/libfuse.mk
> > +++ b/package/libfuse/libfuse.mk
> > @@ -10,15 +10,21 @@ LIBFUSE_SITE = https://github.com/libfuse/libfuse/releases/download/fuse-$(LIBFU
> >  LIBFUSE_LICENSE = GPL-2.0, LGPL-2.1
> >  LIBFUSE_LICENSE_FILES = COPYING COPYING.LIB
> >  LIBFUSE_INSTALL_STAGING = YES
> > -LIBFUSE_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv)
> > +LIBFUSE_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(if $(BR2_PACKAGE_FUSE3),fuse3)
>
>  libfuse3, not fuse3.

Good catch

>
> >  LIBFUSE_CONF_OPTS = \
> >       --disable-example \
> >       --enable-lib \
> >       --enable-util
> >
> >  define LIBFUSE_INSTALL_TARGET_CMDS
> > -     cp -dpf $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/
> > +     $(if $(BR2_PACKAGE_FUSE3),, \
> > +             $(INSTALL) -D -m 0755 $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/ )
>
>  In the libfuse3 package it's called fusermount3, so what is the conflict?

buildroots libfuse package seems a bit dated/incomplete. It does not
install shared files,
there are config files, udev files and a service.
Might make sense to add the udev file so this is a bit of foreshadowing.

fusermount is covered below

>
> >       cp -dpf $(STAGING_DIR)/usr/lib/libfuse.so* $(TARGET_DIR)/usr/lib/
> >  endef
> >
> > +define LIBFUSE_PERMISSIONS
> > +     $(if $(BR2_PACKAGE_FUSE3),, \
> > +             /usr/bin/fusermount f 4755 0 0 - - - - -)
> > +endef
> > +
> >  $(eval $(autotools-package))
> > diff --git a/package/libfuse3/libfuse3.mk b/package/libfuse3/libfuse3.mk
> > index eecdb248d3..be3bf4c746 100644
> > --- a/package/libfuse3/libfuse3.mk
> > +++ b/package/libfuse3/libfuse3.mk
> > @@ -21,6 +21,7 @@ define LIBFUSE3_INSTALL_TARGET_CMDS
> >       $(if $(filter y,$(BR2_STATIC_LIBS)),,cp -dpf $(STAGING_DIR)/usr/lib/libfuse3.so* $(TARGET_DIR)/usr/lib/)
> >       mkdir -p $(TARGET_DIR)/lib/udev/rules.d
> >       $(INSTALL) -m 0644 $(STAGING_DIR)/lib/udev/rules.d/*-fuse3.rules $(TARGET_DIR)/lib/udev/rules.d
> > +     ln -sf fusermount3 $(TARGET_DIR)/usr/bin/fusermount
>
>  Ah, here it is :-)
>
>  Why do you need to make this symlink?

I dont need to make this link, but this helper tool *is backwards compatible*,
so it makes no sense to provide version.
And fusermount is the "interface" for end users/scripts, those
typically dont care
for which DSO the filesystem depends on.
(debian has the same solution)

Norbert

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

* [Buildroot] [PATCH 1/2] package/libfuse3: new package
  2019-03-10 19:32   ` Norbert Lange
@ 2019-03-11  8:46     ` Arnout Vandecappelle
  2019-03-11 11:59       ` Norbert Lange
  0 siblings, 1 reply; 9+ messages in thread
From: Arnout Vandecappelle @ 2019-03-11  8:46 UTC (permalink / raw)
  To: buildroot



On 10/03/2019 20:32, Norbert Lange wrote:
>>  Is there any reason not to use the normal install for target as well?
> Yes, I would have to `rm` all unused files. This was not welcome some time ago,

 TBH, we haven't decided (yet) if the best approach in general is to use
standard install and then rm, or to use custom install commands. *Most*
developers prefer to use the install + rm approach.

 I'm surprised, though, that there would be anything to remove. Remember that
anything in /usr/include, all man pages an all .a files in {/usr,}/lib are
automatically removed. It is rare that something else gets installed *and* that
it is not in fact needed on target.

 Regards,
 Arnout

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

* [Buildroot] [PATCH 2/2] package/libfuse: common files from libfuse3 are prefered
  2019-03-10 19:43     ` Norbert Lange
@ 2019-03-11  8:54       ` Arnout Vandecappelle
  0 siblings, 0 replies; 9+ messages in thread
From: Arnout Vandecappelle @ 2019-03-11  8:54 UTC (permalink / raw)
  To: buildroot



On 10/03/2019 20:43, Norbert Lange wrote:
> Am So., 10. M?rz 2019 um 16:20 Uhr schrieb Arnout Vandecappelle
> <arnout@mind.be>:
>>
>>  Hi Norbert,
>>
>> On 06/03/2019 17:30, Norbert Lange wrote:
>>> if both libfuse and libfuse3 are installed,
>>> make sure libfuse3 will be build first and
>>> use the auxiliary files from the newer package.
>>
>>  Which files are those?
> 
> Everything except the libfuse DSO itself, see
> https://github.com/libfuse/libfuse/blob/master/ChangeLog.rst#libfuse-300-2016-12-08

 Quoting that page:

e.g. /etc/fuse.conf, the udev and init scripts, and the mount.fuse(8) manpage

 Please mention these explicitly in the commit message. Indeed, our current
libfuse package doesn't install any of those.

>>  You could also verify if the packages that currently use libfuse can also use
>> libfuse3: curlftpfs e2fsprogs exfat gvfs libostree lua-flu ntfs-3g openvmtools
>> owfs sshfs unionfs xenomai. If many of them can also work with libfuse3, it
>> might be worth making a virtual package out of it.
> 
> They most certainly wont, V2 and V3 are not forward compatible.

 Absolutely not - it's like the qt4 to qt5 transition, or python2 to python3.
Many packages will take steps to support both options for some time.

[snip]
>>> +     ln -sf fusermount3 $(TARGET_DIR)/usr/bin/fusermount
>>
>>  Ah, here it is :-)
>>
>>  Why do you need to make this symlink?
> 
> I dont need to make this link, but this helper tool *is backwards compatible*,
> so it makes no sense to provide version.

 OK, understood. Could you add this explanation to the commit message?


 Regards,
 Arnout

> And fusermount is the "interface" for end users/scripts, those
> typically dont care
> for which DSO the filesystem depends on.
> (debian has the same solution)
> 
> Norbert
> 

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

* [Buildroot] [PATCH 1/2] package/libfuse3: new package
  2019-03-11  8:46     ` Arnout Vandecappelle
@ 2019-03-11 11:59       ` Norbert Lange
  0 siblings, 0 replies; 9+ messages in thread
From: Norbert Lange @ 2019-03-11 11:59 UTC (permalink / raw)
  To: buildroot

Am Mo., 11. M?rz 2019 um 09:46 Uhr schrieb Arnout Vandecappelle
<arnout@mind.be>:
>
>
>
> On 10/03/2019 20:32, Norbert Lange wrote:
> >>  Is there any reason not to use the normal install for target as well?
> > Yes, I would have to `rm` all unused files. This was not welcome some time ago,
>
>  TBH, we haven't decided (yet) if the best approach in general is to use
> standard install and then rm, or to use custom install commands. *Most*
> developers prefer to use the install + rm approach.
>
>  I'm surprised, though, that there would be anything to remove. Remember that
> anything in /usr/include, all man pages an all .a files in {/usr,}/lib are
> automatically removed. It is rare that something else gets installed *and* that
> it is not in fact needed on target.

for libfuse, there is for example an init script to load the correct
modules (not needed if those are kernel-static, I think with udev its
not needed too) and mount the fusectl
filesystem (i would rather have a line in fstab or inittab). IMHO its
a bad idea to add this by default, given that buildroot aims to be
minimal.

Just another thing that I consider now more important is that libfuse
right now will replace the common files from libfuse3 (staging
install),
the only sane thing for me would be to modify libfuse to stage-install
in a other/temporary directory and only copy over the files that are
unique to libfuse
(in the case the packages are co-installed).
ie. install (in the final location) + rm might affect other packages,
and thats not a theoretical thing with libfuse + libfuse3,
installing just the files you need is less likely to cause subtle
issues in the future (installing both is not the common case as well).
contrary if a file is missing, you will be fast to notice =)

Norbert

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

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-06 16:30 [Buildroot] [PATCH 1/2] package/libfuse3: new package Norbert Lange
2019-03-06 16:30 ` [Buildroot] [PATCH 2/2] package/libfuse: common files from libfuse3 are prefered Norbert Lange
2019-03-10 15:20   ` Arnout Vandecappelle
2019-03-10 19:43     ` Norbert Lange
2019-03-11  8:54       ` Arnout Vandecappelle
2019-03-10 15:35 ` [Buildroot] [PATCH 1/2] package/libfuse3: new package Arnout Vandecappelle
2019-03-10 19:32   ` Norbert Lange
2019-03-11  8:46     ` Arnout Vandecappelle
2019-03-11 11:59       ` Norbert Lange

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.