diff mbox series

[master,meta-oe,V2] fuse3: remove sysv init script and install fuse kernel module explictly

Message ID 20240523015510.1988259-1-changqing.li@windriver.com
State New
Headers show
Series [master,meta-oe,V2] fuse3: remove sysv init script and install fuse kernel module explictly | expand

Commit Message

Changqing Li May 23, 2024, 1:55 a.m. UTC
From: Changqing Li <changqing.li@windriver.com>

For systemd, there is not a fuse.service since systemd provides
sys-fs-fuse-connections.mount to mount the fuse control filesystem, so
instead, only fuse3.conf is added to modules-load.d to load the required
fuse kernel module.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta-oe/recipes-support/fuse/fuse3/fuse3.conf |  1 +
 meta-oe/recipes-support/fuse/fuse3_3.16.2.bb  | 15 +++++++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 meta-oe/recipes-support/fuse/fuse3/fuse3.conf

Comments

Khem Raj May 23, 2024, 1:56 a.m. UTC | #1
On Wed, May 22, 2024 at 6:55 PM Changqing Li via
lists.openembedded.org
<changqing.li=eng.windriver.com@lists.openembedded.org> wrote:
>
> From: Changqing Li <changqing.li@windriver.com>
>
> For systemd, there is not a fuse.service since systemd provides
> sys-fs-fuse-connections.mount to mount the fuse control filesystem, so
> instead, only fuse3.conf is added to modules-load.d to load the required
> fuse kernel module.
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>  meta-oe/recipes-support/fuse/fuse3/fuse3.conf |  1 +
>  meta-oe/recipes-support/fuse/fuse3_3.16.2.bb  | 15 +++++++++++++++
>  2 files changed, 16 insertions(+)
>  create mode 100644 meta-oe/recipes-support/fuse/fuse3/fuse3.conf
>
> diff --git a/meta-oe/recipes-support/fuse/fuse3/fuse3.conf b/meta-oe/recipes-support/fuse/fuse3/fuse3.conf
> new file mode 100644
> index 000000000..a517c488f
> --- /dev/null
> +++ b/meta-oe/recipes-support/fuse/fuse3/fuse3.conf
> @@ -0,0 +1 @@
> +fuse
> diff --git a/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb b/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb
> index 307544bf3..b799b2c6b 100644
> --- a/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb
> +++ b/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb
> @@ -27,6 +27,7 @@ inherit meson pkgconfig ptest
>
>  SRC_URI += " \
>      file://run-ptest \
> +    file://fuse3.conf \
>  "
>
>  RDEPENDS:${PN}-ptest += " \
> @@ -78,6 +79,20 @@ FILES:fuse3-utils = "${bindir} ${base_sbindir}"
>  DEBIAN_NOAUTONAME:fuse3-utils = "1"
>  DEBIAN_NOAUTONAME:${PN}-dbg = "1"
>
> +SYSTEMD_SERVICE:${PN} = ""
> +
>  do_install:append() {
>      rm -rf ${D}${base_prefix}/dev
> +
> +    # systemd class remove the sysv_initddir only if systemd_system_unitdir
> +    # contains anything, but it's not needed if sysvinit is not in DISTRO_FEATURES
> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
> +        rm -rf ${D}${sysconfdir}/init.d/
> +    fi
> +
> +    # Install systemd related configuration file
> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
> +        install -d ${D}${sysconfdir}/modules-load.d
> +        install -m 0644 ${WORKDIR}/fuse3.conf ${D}${sysconfdir}/modules-load.d

This should be UNPACKDIR instead of WORKDIR here.

> +    fi
>  }
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#110492): https://lists.openembedded.org/g/openembedded-devel/message/110492
> Mute This Topic: https://lists.openembedded.org/mt/106255586/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Changqing Li May 23, 2024, 2:07 a.m. UTC | #2
On 5/23/24 09:56, Khem Raj wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Wed, May 22, 2024 at 6:55 PM Changqing Li via
> lists.openembedded.org
> <changqing.li=eng.windriver.com@lists.openembedded.org>  wrote:
>> From: Changqing Li<changqing.li@windriver.com>
>>
>> For systemd, there is not a fuse.service since systemd provides
>> sys-fs-fuse-connections.mount to mount the fuse control filesystem, so
>> instead, only fuse3.conf is added to modules-load.d to load the required
>> fuse kernel module.
>>
>> Signed-off-by: Changqing Li<changqing.li@windriver.com>
>> ---
>>   meta-oe/recipes-support/fuse/fuse3/fuse3.conf |  1 +
>>   meta-oe/recipes-support/fuse/fuse3_3.16.2.bb  | 15 +++++++++++++++
>>   2 files changed, 16 insertions(+)
>>   create mode 100644 meta-oe/recipes-support/fuse/fuse3/fuse3.conf
>>
>> diff --git a/meta-oe/recipes-support/fuse/fuse3/fuse3.conf b/meta-oe/recipes-support/fuse/fuse3/fuse3.conf
>> new file mode 100644
>> index 000000000..a517c488f
>> --- /dev/null
>> +++ b/meta-oe/recipes-support/fuse/fuse3/fuse3.conf
>> @@ -0,0 +1 @@
>> +fuse
>> diff --git a/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb b/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb
>> index 307544bf3..b799b2c6b 100644
>> --- a/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb
>> +++ b/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb
>> @@ -27,6 +27,7 @@ inherit meson pkgconfig ptest
>>
>>   SRC_URI += " \
>>       file://run-ptest  \
>> +file://fuse3.conf  \
>>   "
>>
>>   RDEPENDS:${PN}-ptest += " \
>> @@ -78,6 +79,20 @@ FILES:fuse3-utils = "${bindir} ${base_sbindir}"
>>   DEBIAN_NOAUTONAME:fuse3-utils = "1"
>>   DEBIAN_NOAUTONAME:${PN}-dbg = "1"
>>
>> +SYSTEMD_SERVICE:${PN} = ""
>> +
>>   do_install:append() {
>>       rm -rf ${D}${base_prefix}/dev
>> +
>> +    # systemd class remove the sysv_initddir only if systemd_system_unitdir
>> +    # contains anything, but it's not needed if sysvinit is not in DISTRO_FEATURES
>> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
>> +        rm -rf ${D}${sysconfdir}/init.d/
>> +    fi
>> +
>> +    # Install systemd related configuration file
>> +    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
>> +        install -d ${D}${sysconfdir}/modules-load.d
>> +        install -m 0644 ${WORKDIR}/fuse3.conf ${D}${sysconfdir}/modules-load.d
> This should be UNPACKDIR instead of WORKDIR here.

Thanks. Will send a V3 and fix this.

Regards

Sandy

>
>> +    fi
>>   }
>> --
>> 2.25.1
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#110492):https://lists.openembedded.org/g/openembedded-devel/message/110492
>> Mute This Topic:https://lists.openembedded.org/mt/106255586/1997914
>> Group Owner:openembedded-devel+owner@lists.openembedded.org
>> Unsubscribe:https://lists.openembedded.org/g/openembedded-devel/unsub  [raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/fuse/fuse3/fuse3.conf b/meta-oe/recipes-support/fuse/fuse3/fuse3.conf
new file mode 100644
index 000000000..a517c488f
--- /dev/null
+++ b/meta-oe/recipes-support/fuse/fuse3/fuse3.conf
@@ -0,0 +1 @@ 
+fuse
diff --git a/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb b/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb
index 307544bf3..b799b2c6b 100644
--- a/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb
+++ b/meta-oe/recipes-support/fuse/fuse3_3.16.2.bb
@@ -27,6 +27,7 @@  inherit meson pkgconfig ptest
 
 SRC_URI += " \
     file://run-ptest \
+    file://fuse3.conf \
 "
 
 RDEPENDS:${PN}-ptest += " \
@@ -78,6 +79,20 @@  FILES:fuse3-utils = "${bindir} ${base_sbindir}"
 DEBIAN_NOAUTONAME:fuse3-utils = "1"
 DEBIAN_NOAUTONAME:${PN}-dbg = "1"
 
+SYSTEMD_SERVICE:${PN} = ""
+
 do_install:append() {
     rm -rf ${D}${base_prefix}/dev
+
+    # systemd class remove the sysv_initddir only if systemd_system_unitdir
+    # contains anything, but it's not needed if sysvinit is not in DISTRO_FEATURES
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
+        rm -rf ${D}${sysconfdir}/init.d/
+    fi
+
+    # Install systemd related configuration file
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/modules-load.d
+        install -m 0644 ${WORKDIR}/fuse3.conf ${D}${sysconfdir}/modules-load.d
+    fi
 }