Skip to contentSkip to conversation

package/libfuse3: allow building as a host package

PATCH Superseded Christian Stewart 3 participants 11 messages May 3, 2021 – May 11, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/libfuse3: allow building as a host package

Adds 1 patch to fix an install error when building as a host package.

Patch was submitted upstream:
https://github.com/libfuse/libfuse/pull/598

---
 ...er-fix-sysconf-dir-for-init.d-script.patch | 51 +++++++++++++++++++
 package/libfuse3/libfuse3.mk                  |  7 +++
 2 files changed, 58 insertions(+)
 create mode 100644 package/libfuse3/0001-install_helper-fix-sysconf-dir-for-init.d-script.patch
package/libfuse3/0001-install_helper-fix-sysconf-dir-for-init.d-script.patch new file +51 -0
new file mode 100644
index 0000000000..4599c55e78
@@ -0,0 +1,51 @@
+From cac00c154be5c8941d40b972bdcc0eb8bf209b93 Mon Sep 17 00:00:00 2001
+From: Christian Stewart <[email protected]>
+Date: Sun, 2 May 2021 19:04:50 -0700
+Subject: [PATCH] install_helper: fix sysconf dir for init.d script
+
+Fixes the following build error in Buildroot as a host package:
+
+Running custom install script 'install_helper.sh /host/etc /host/bin /host/lib/udev/rules.d false
++ sysconfdir=/host/etc
++ bindir=/host/bin
++ udevrulesdir=/host/lib/udev/rules.d
++ useroot=false
++ '[' -z '' ']'
++ DESTDIR=
++ install -D -m 644 /build/host-libfuse3-3.10.3/util/fuse.conf /host/etc/fuse.conf
++ false
++ install -D -m 644 /build/host-libfuse3-3.10.3/util/udev.rules /host/lib/udev/rules.d/99-fuse3.rules
++ install -D -m 755 /build/host-libfuse3-3.10.3/util/init_script /etc/init.d/fuse3
+install: cannot create regular file '/etc/init.d/fuse3': Permission denied
+FAILED: install script 'install_helper.sh /host/etc /host/bin /host/lib/udev/rules.d false' exit code 1, stopped
+FAILED: meson-install
+
+Signed-off-by: Christian Stewart <[email protected]>
+---
+ util/install_helper.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/util/install_helper.sh b/util/install_helper.sh
+index cb649a7..f4a6163 100755
+--- a/util/install_helper.sh
++++ b/util/install_helper.sh
+@@ -40,14 +40,14 @@ install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
+         "${DESTDIR}${udevrulesdir}/99-fuse3.rules"
+ 
+ install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \
+-        "${DESTDIR}/etc/init.d/fuse3"
++        "${DESTDIR}${sysconfdir}/init.d/fuse3"
+ 
+ 
+ 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
+ else
+     echo "== FURTHER ACTION REQUIRED =="
+-    echo "Make sure that your init system will start the ${DESTDIR}/etc/init.d/fuse3 init script"
++    echo "Make sure that your init system will start the ${DESTDIR}${sysconfdir}/init.d/fuse3 init script"
+ fi
+ 
+ 
+-- 
+2.31.1
+
package/libfuse3/libfuse3.mk +7 -0
index f805eda506..d4522fd063 100644
@@ -10,11 +10,17 @@ LIBFUSE3_LICENSE = LGPL-2.1
 LIBFUSE3_LICENSE_FILES = LICENSE
 LIBFUSE3_INSTALL_STAGING = YES
 LIBFUSE3_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+
 LIBFUSE3_CONF_OPTS = \
 	-Dexamples=false \
 	-Dudevrulesdir=/lib/udev/rules.d \
 	-Duseroot=false
 
+HOST_LIBFUSE3_CONF_OPTS = \
+	-Dexamples=false \
+	-Dudevrulesdir=$(HOST_DIR)/lib/udev/rules.d \
+	-Duseroot=false
+
 define LIBFUSE3_DEVICES
 	/dev/fuse  c  666  0  0  10  229  0  0  -
 endef
@@ -28,3 +34,4 @@ define LIBFUSE3_LINUX_CONFIG_FIXUPS
 endef
 
 $(eval $(meson-package))
+$(eval $(host-meson-package))
Signature · 1 line
2.31.1
#1 lore raw

PATCH 2/3 package/fuse-overlayfs: enable building as host package

---
 package/Config.in.host                   | 1 +
 package/fuse-overlayfs/Config.in.host    | 7 +++++++
 package/fuse-overlayfs/fuse-overlayfs.mk | 4 ++++
 3 files changed, 12 insertions(+)
 create mode 100644 package/fuse-overlayfs/Config.in.host
package/Config.in.host +1 -0
index ba6a68c728..0dbf63f2c8 100644
@@ -27,6 +27,7 @@ menu "Host utilities"
 	source "package/f2fs-tools/Config.in.host"
 	source "package/faketime/Config.in.host"
 	source "package/fatcat/Config.in.host"
+	source "package/fuse-overlayfs/Config.in.host"
 	source "package/fwup/Config.in.host"
 	source "package/genext2fs/Config.in.host"
 	source "package/genimage/Config.in.host"
package/fuse-overlayfs/Config.in.host new file +7 -0
new file mode 100644
index 0000000000..cf459a4a2a
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_FUSE_OVERLAYFS
+	bool "host fuse-overlayfs"
+	help
+	  FUSE-overlayfs is an implementation of overlay+shiftfs in
+	  FUSE, intended to be used for rootless containers.
+
+	  http://github.com/containers/fuse-overlayfs
\ No newline at end of file
package/fuse-overlayfs/fuse-overlayfs.mk +4 -0
index 707cacce03..36cbfc91fd 100644
@@ -12,4 +12,8 @@ FUSE_OVERLAYFS_LICENSE_FILES = COPYING
 FUSE_OVERLAYFS_AUTORECONF = YES
 FUSE_OVERLAYFS_DEPENDENCIES = libfuse3 host-pkgconf
 
+HOST_FUSE_OVERLAYFS_AUTORECONF = YES
+HOST_FUSE_OVERLAYFS_DEPENDENCIES = host-libfuse3 host-pkgconf
+
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.31.1
#2 lore raw

PATCH 2/3 package/fuse-overlayfs: enable building as host package

Christian, All,

On 2021-05-02 19:33 -0700, Christian Stewart spake thusly:

Quoted 26 lines
---
 package/Config.in.host                   | 1 +
 package/fuse-overlayfs/Config.in.host    | 7 +++++++
 package/fuse-overlayfs/fuse-overlayfs.mk | 4 ++++
 3 files changed, 12 insertions(+)
 create mode 100644 package/fuse-overlayfs/Config.in.host
package/Config.in.host +1 -0
index ba6a68c728..0dbf63f2c8 100644
@@ -27,6 +27,7 @@ menu "Host utilities"
 	source "package/f2fs-tools/Config.in.host"
 	source "package/faketime/Config.in.host"
 	source "package/fatcat/Config.in.host"
+	source "package/fuse-overlayfs/Config.in.host"
 	source "package/fwup/Config.in.host"
 	source "package/genext2fs/Config.in.host"
 	source "package/genimage/Config.in.host"
package/fuse-overlayfs/Config.in.host new file +0 -0
new file mode 100644
index 0000000000..cf459a4a2a

package/fuse-overlayfs/Config.in.host line 7

Quoted 8 lines
package/fuse-overlayfs/Config.in.host new file +7 -0
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_FUSE_OVERLAYFS
+	bool "host fuse-overlayfs"
+	help
+	  FUSE-overlayfs is an implementation of overlay+shiftfs in
+	  FUSE, intended to be used for rootless containers.
+
+	  http://github.com/containers/fuse-overlayfs
\ No newline at end of file

Be carefull that your editor properly terminates files with a \n

Vim is a good editor that generates properly formatted text files! ;-]

Regards,
Yann E. MORIN.

Quoted 20 lines
package/fuse-overlayfs/fuse-overlayfs.mk +4 -0
index 707cacce03..36cbfc91fd 100644
@@ -12,4 +12,8 @@ FUSE_OVERLAYFS_LICENSE_FILES = COPYING
 FUSE_OVERLAYFS_AUTORECONF = YES
 FUSE_OVERLAYFS_DEPENDENCIES = libfuse3 host-pkgconf
 
+HOST_FUSE_OVERLAYFS_AUTORECONF = YES
+HOST_FUSE_OVERLAYFS_DEPENDENCIES = host-libfuse3 host-pkgconf
+
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 6 lines
2.31.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 2/3 package/fuse-overlayfs: enable building as host package

Hi Yann,

Quoted 6 lines · Yann E. MORIN

Be carefull that your editor properly terminates files with a \n

Vim is a good editor that generates properly formatted text files! ;-]

Regards,
Yann E. MORIN.

I regret to inform you that I switched over to emacs somewhere around 2016.

... but using vim bindings with "evil" mode and spacemacs and Buildroot/Gentoo + exwm :)

Best regards,
Christian

#4 lore raw

PATCH 3/3 package/genuinetools-img: new host and target package

In reply to Christian Stewart

Img is a standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder. It uses the moby-buildkit solver internally. The commands/UX mirror the Docker CLI for workflow compatibility.

Using the genuinetools- prefix due to the generic nature of the "img" name.

Adds both host and target variants. fuse-overlayfs can be used as an unprivileged and rootless overlay filesystem backend.

https://github.com/genuinetools/img

---
 package/Config.in                             |  1 +
 package/Config.in.host                        |  1 +
 package/genuinetools-img/Config.in            | 23 ++++++++++++++++
 package/genuinetools-img/Config.in.host       |  9 +++++++
 .../genuinetools-img/genuinetools-img.hash    |  3 +++
 package/genuinetools-img/genuinetools-img.mk  | 27 +++++++++++++++++++
 6 files changed, 64 insertions(+)
 create mode 100644 package/genuinetools-img/Config.in
 create mode 100644 package/genuinetools-img/Config.in.host
 create mode 100644 package/genuinetools-img/genuinetools-img.hash
 create mode 100644 package/genuinetools-img/genuinetools-img.mk
package/Config.in +1 -0
index 7ac10b9d42..f352f6b168 100644
@@ -2444,6 +2444,7 @@ menu "System tools"
 	source "package/emlog/Config.in"
 	source "package/ftop/Config.in"
 	source "package/getent/Config.in"
+	source "package/genuinetools-img/Config.in"
 	source "package/gkrellm/Config.in"
 	source "package/htop/Config.in"
 	source "package/ibm-sw-tpm2/Config.in"
package/Config.in.host +1 -0
index 0dbf63f2c8..391742856d 100644
@@ -32,6 +32,7 @@ menu "Host utilities"
 	source "package/genext2fs/Config.in.host"
 	source "package/genimage/Config.in.host"
 	source "package/genpart/Config.in.host"
+	source "package/genuinetools-img/Config.in.host"
 	source "package/gnupg/Config.in.host"
 	source "package/go/Config.in.host"
 	source "package/go-bootstrap/Config.in.host"
package/genuinetools-img/Config.in new file +23 -0
new file mode 100644
index 0000000000..eb4992db07
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_GENUINETOOLS_IMG
+	bool "genuinetools-img"
+	depends on BR2_USE_MMU # fuse-overlayfs libfuse3
+	depends on !BR2_STATIC_LIBS # fuse-overlayfs libfuse3
+	depends on BR2_TOOLCHAIN_HAS_THREADS # fuse-overlayfs libfuse3
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 # fuse-overlayfs
+	depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC
+	select BR2_PACKAGE_CGROUPFS_MOUNT if !BR2_PACKAGE_SYSTEMD # runtime dependency
+	select BR2_PACKAGE_FUSE_OVERLAYFS # runtime dependency
+	select BR2_PACKAGE_LIBFUSE3 # fuse-overlayfs
+	help
+	  Img is a standalone, daemon-less, unprivileged Dockerfile
+	  and OCI compatible container image builder.
+
+	  https://github.com/genuinetools/img
+
+comment "genuinetools-img needs a toolchain w/ threads, dynamic library, headers >= 3.15"
+	depends on BR2_USE_MMU
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
+		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
package/genuinetools-img/Config.in.host new file +9 -0
new file mode 100644
index 0000000000..bbef88acf6
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_HOST_GENUINETOOLS_IMG
+	bool "host genuinetools-img"
+	depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
+	select BR2_PACKAGE_HOST_FUSE_OVERLAYFS # runtime dependency
+	help
+	  Img is a standalone, daemon-less, unprivileged Dockerfile
+	  and OCI compatible container image builder.
+
+	  https://github.com/genuinetools/img
package/genuinetools-img/genuinetools-img.hash new file +3 -0
new file mode 100644
index 0000000000..097ad17d91
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  c6d805ab899db639fa08f0e33fe6673593be8336d288bb1cb4cb81a3229a916f  genuinetools-img-0.5.11.tar.gz
+sha256	c696614021eafe355c7fb0af3e724fc7fa8729a0c10c27cbed2505bf30a853ce  LICENSE
package/genuinetools-img/genuinetools-img.mk new file +27 -0
new file mode 100644
index 0000000000..08330d1113
@@ -0,0 +1,27 @@
+################################################################################
+#
+# genuinetools-img
+#
+################################################################################
+
+GENUINETOOLS_IMG_VERSION = 0.5.11
+GENUINETOOLS_IMG_SITE = $(call github,genuinetools,img,v$(GENUINETOOLS_IMG_VERSION))
+
+GENUINETOOLS_IMG_LICENSE = MIT
+GENUINETOOLS_IMG_LICENSE_FILES = LICENSE
+
+GENUINETOOLS_IMG_DEPENDENCIES = host-pkgconf
+GENUINETOOLS_IMG_GOMOD = github.com/genuinetools/img
+
+GENUINETOOLS_IMG_TAGS = cgo noembed
+GENUINETOOLS_IMG_LDFLAGS = \
+	-X $(GENUINETOOLS_IMG_GOMOD)/version.VERSION="$(GENUINETOOLS_IMG_VERSION)"
+
+HOST_GENUINETOOLS_IMG_TAGS = $(GENUINETOOLS_IMG_TAGS)
+HOST_GENUINETOOLS_IMG_LDFLAGS = $(GENUINETOOLS_IMG_LDFLAGS)
+
+HOST_GENUINETOOLS_IMG_BIN_NAME = genuinetools-img
+HOST_GENUINETOOLS_IMG_INSTALL_BINS = $(HOST_GENUINETOOLS_IMG_BIN_NAME)
+
+$(eval $(golang-package))
+$(eval $(host-golang-package))
Signature · 1 line
2.31.1
#5 lore raw

PATCH 3/3 package/genuinetools-img: new host and target package

All,

Quoted 11 lines · Christian Stewart

Img is a standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder. It uses the moby-buildkit solver internally. The commands/UX mirror the Docker CLI for workflow compatibility.

Using the genuinetools- prefix due to the generic nature of the "img" name.

Adds both host and target variants. fuse-overlayfs can be used as an unprivileged and rootless overlay filesystem backend.

https://github.com/genuinetools/img

The intent here is to eventually add some kind of "download" target to Buildroot for downloading & verifying container images as .tar.gz files from container registries using the genuinetools-img tool - it can "pull" and "save" using an unprivileged cache directory.

I'm not sure the best way to do this / if there is any appetite for adding a pkg helper for this, thoughts?

Best regards,
Christian Stewart

#6 lore raw

PATCH 3/3 package/genuinetools-img: new host and target package

Christian, All,

On 2021-05-02 19:45 -0700, Christian Stewart spake thusly:

Quoted 13 lines · Christian Stewart
Quoted 11 lines

Img is a standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder. It uses the moby-buildkit solver internally. The commands/UX mirror the Docker CLI for workflow compatibility.

Using the genuinetools- prefix due to the generic nature of the "img" name.

Adds both host and target variants. fuse-overlayfs can be used as an unprivileged and rootless overlay filesystem backend.

https://github.com/genuinetools/img

Quoted 7 lines

The intent here is to eventually add some kind of "download" target to Buildroot for downloading & verifying container images as .tar.gz files from container registries using the genuinetools-img tool - it can "pull" and "save" using an unprivileged cache directory.

I'm not sure the best way to do this / if there is any appetite for adding a pkg helper for this, thoughts?

Im not usre I understood that, but basically one would write:

    HELLO_WORLD_VERSION = 1.2.3
    HELLO_WORLD_SOURCE = hello-world:1.2.3
    HELLO_WORLD_SITE = dockerhub.com/u/hello

    $(eval $(oci-image-package))

And that would download the hello-world:1.2.3 image from dockerhub and install that as a OCI image in the target filesystem, so that at runtime one could do (on the CLI, in an init script, in a systemd unit, etc...):
docker run hello-world:1.2.3 /bin/hello-world

Something like that?

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 3/3 package/genuinetools-img: new host and target package

Hi Yann,

On Tue, May 4, 2021 at 1:31 PM Yann E. MORIN <[email protected]> wrote

Quoted 8 lines

Im not usre I understood that, but basically one would write:

    HELLO_WORLD_VERSION = 1.2.3
    HELLO_WORLD_SOURCE = hello-world:1.2.3
    HELLO_WORLD_SITE = dockerhub.com/u/hello

    $(eval $(oci-image-package))
Quoted 6 lines

And that would download the hello-world:1.2.3 image from dockerhub and install that as a OCI image in the target filesystem, so that at runtime one could do (on the CLI, in an init script, in a systemd unit, etc...):
docker run hello-world:1.2.3 /bin/hello-world

Something like that?

Yes, the "download" step would use host "img pull" to download the OCI image, and then "img save" to store it as a .tar.gz, (which we can then hash as a downloaded tar.gz file).

The .tar.gz can be loaded into Docker with "docker load < the-image.tar.gz"

The image-package helper could just download the image + save it (to images dir, optionally).

Best,
Christian

#8 lore raw

PATCH 3/3 package/genuinetools-img: new host and target package

Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Christian" == Christian Stewart <[email protected]> writes:

Hi Yann,
On Tue, May 4, 2021 at 1:31 PM Yann E. MORIN <[email protected]> wrote

Quoted 6 lines

Im not usre I understood that, but basically one would write:

HELLO_WORLD_VERSION = 1.2.3
HELLO_WORLD_SOURCE = hello-world:1.2.3
HELLO_WORLD_SITE = dockerhub.com/u/hello

Quoted 8 lines

$(eval $(oci-image-package))

And that would download the hello-world:1.2.3 image from dockerhub and install that as a OCI image in the target filesystem, so that at runtime one could do (on the CLI, in an init script, in a systemd unit, etc...):
docker run hello-world:1.2.3 /bin/hello-world

Something like that?

Quoted 8 lines

Yes, the "download" step would use host "img pull" to download the OCI image, and then "img save" to store it as a .tar.gz, (which we can then hash as a downloaded tar.gz file).

The .tar.gz can be loaded into Docker with "docker load < the-image.tar.gz"

The image-package helper could just download the image + save it (to images dir, optionally).

So you would end up with a tar file for each container image in the rootfs? Is that a desirable setup? Containers often share image layers, so a single tar.gz of N containers is normally quite a bit smaller and more efficient than N individual .tar.gz files.

What I do is basically just:
docker save -o docker.tar <container1> <container2> .. <containerN>

And then a single docker load at runtime.

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH 3/3 package/genuinetools-img: new host and target package

Peter, all,

Quoted 10 lines · Peter Korsgaard
Quoted 9 lines
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Christian" == Christian Stewart <[email protected]> writes:

$(eval $(oci-image-package))

Yes, the "download" step would use host "img pull" to download the OCI image, and then "img save" to store it as a .tar.gz, (which we can then hash as a downloaded tar.gz file).

The .tar.gz can be loaded into Docker with "docker load < the-image.tar.gz"

Quoted 7 lines
Quoted 2 lines

The image-package helper could just download the image + save it (to images dir, optionally).

So you would end up with a tar file for each container image in the rootfs? Is that a desirable setup? Containers often share image layers, so a single tar.gz of N containers is normally quite a bit smaller and more efficient than N individual .tar.gz files.

This could be one approach, but it really comes down to adding an easy way to request a "img pull" into buildroot cache (dl/ dir) w/ hashes checking. This then followed by "img save" from the same host package to store the .tar somewhere, as you've described.

Quoted 4 lines

What I do is basically just:
docker save -o docker.tar <container1> <container2> .. <containerN>

And then a single docker load at runtime.

This works. For my SkiffOS project I'm planning to store these in a separate partition and/or run a small Go program to generate the docker/ state tree ahead of time on persistent media with the images pre-loaded.

Best regards,
Christian Stewart

#10 lore raw

PATCH 1/3 package/libfuse3: allow building as a host package

In reply to Christian Stewart

Christian, All,

On 2021-05-02 19:33 -0700, Christian Stewart spake thusly:

Quoted 4 lines

Adds 1 patch to fix an install error when building as a host package.

Patch was submitted upstream:
https://github.com/libfuse/libfuse/pull/598

Upstream is basically rejecting this patch.

I have no idea what woiuld be the best course of action, but for our short-sighted goal might be to just patch-out the installation of the init script altogether. And maybe send a patch upstream with an option to disable it altogether.

In the meantime, I've marked this series as chamnges requested (I'll comment on the other patches, though).

Regards,
Yann E. MORIN.

Quoted 98 lines
---
 ...er-fix-sysconf-dir-for-init.d-script.patch | 51 +++++++++++++++++++
 package/libfuse3/libfuse3.mk                  |  7 +++
 2 files changed, 58 insertions(+)
 create mode 100644 package/libfuse3/0001-install_helper-fix-sysconf-dir-for-init.d-script.patch
package/libfuse3/0001-install_helper-fix-sysconf-dir-for-init.d-script.patch new file +51 -0
new file mode 100644
index 0000000000..4599c55e78
@@ -0,0 +1,51 @@
+From cac00c154be5c8941d40b972bdcc0eb8bf209b93 Mon Sep 17 00:00:00 2001
+From: Christian Stewart <[email protected]>
+Date: Sun, 2 May 2021 19:04:50 -0700
+Subject: [PATCH] install_helper: fix sysconf dir for init.d script
+
+Fixes the following build error in Buildroot as a host package:
+
+Running custom install script 'install_helper.sh /host/etc /host/bin /host/lib/udev/rules.d false
++ sysconfdir=/host/etc
++ bindir=/host/bin
++ udevrulesdir=/host/lib/udev/rules.d
++ useroot=false
++ '[' -z '' ']'
++ DESTDIR=
++ install -D -m 644 /build/host-libfuse3-3.10.3/util/fuse.conf /host/etc/fuse.conf
++ false
++ install -D -m 644 /build/host-libfuse3-3.10.3/util/udev.rules /host/lib/udev/rules.d/99-fuse3.rules
++ install -D -m 755 /build/host-libfuse3-3.10.3/util/init_script /etc/init.d/fuse3
+install: cannot create regular file '/etc/init.d/fuse3': Permission denied
+FAILED: install script 'install_helper.sh /host/etc /host/bin /host/lib/udev/rules.d false' exit code 1, stopped
+FAILED: meson-install
+
+Signed-off-by: Christian Stewart <[email protected]>
+---
+ util/install_helper.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/util/install_helper.sh b/util/install_helper.sh
+index cb649a7..f4a6163 100755
+--- a/util/install_helper.sh
++++ b/util/install_helper.sh
+@@ -40,14 +40,14 @@ install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
+         "${DESTDIR}${udevrulesdir}/99-fuse3.rules"
+ 
+ install -D -m 755 "${MESON_SOURCE_ROOT}/util/init_script" \
+-        "${DESTDIR}/etc/init.d/fuse3"
++        "${DESTDIR}${sysconfdir}/init.d/fuse3"
+ 
+ 
+ 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
+ else
+     echo "== FURTHER ACTION REQUIRED =="
+-    echo "Make sure that your init system will start the ${DESTDIR}/etc/init.d/fuse3 init script"
++    echo "Make sure that your init system will start the ${DESTDIR}${sysconfdir}/init.d/fuse3 init script"
+ fi
+ 
+ 
+-- 
+2.31.1
+
package/libfuse3/libfuse3.mk +7 -0
index f805eda506..d4522fd063 100644
@@ -10,11 +10,17 @@ LIBFUSE3_LICENSE = LGPL-2.1
 LIBFUSE3_LICENSE_FILES = LICENSE
 LIBFUSE3_INSTALL_STAGING = YES
 LIBFUSE3_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+
 LIBFUSE3_CONF_OPTS = \
 	-Dexamples=false \
 	-Dudevrulesdir=/lib/udev/rules.d \
 	-Duseroot=false
 
+HOST_LIBFUSE3_CONF_OPTS = \
+	-Dexamples=false \
+	-Dudevrulesdir=$(HOST_DIR)/lib/udev/rules.d \
+	-Duseroot=false
+
 define LIBFUSE3_DEVICES
 	/dev/fuse  c  666  0  0  10  229  0  0  -
 endef
@@ -28,3 +34,4 @@ define LIBFUSE3_LINUX_CONFIG_FIXUPS
 endef
 
 $(eval $(meson-package))
+$(eval $(host-meson-package))
Signature · 6 lines
2.31.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'