Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 899698 - sys-fs/fuse-3.14.0 on Gentoo Prefix installs init script outside the prefix
Summary: sys-fs/fuse-3.14.0 on Gentoo Prefix installs init script outside the prefix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2023-03-05 18:14 UTC by Yuan Liao (Leo3418)
Modified: 2023-03-12 03:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,23.77 KB, text/x-log)
2023-03-05 18:14 UTC, Yuan Liao (Leo3418)
Details
[PATCH] sys-fs/fuse: Set init script dir in Meson options (sys-fs-fuse-Set-init-script-dir-in-Meson-options.patch,1.99 KB, patch)
2023-03-05 18:16 UTC, Yuan Liao (Leo3418)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuan Liao (Leo3418) 2023-03-05 18:14:59 UTC
Created attachment 856218 [details]
build.log

On Gentoo Prefix, the latest versions of sys-fs/fuse:3 ebuilds attempt to install the /etc/init.d/fuse3 script outside prefix:


    Running custom install script '/home/leo/gentoo/var/tmp/portage/sys-fs/fuse-3.14.0/work/fuse-3.14.0/util/install_helper.sh /home/leo/gentoo/etc /home/leo/gentoo/usr/bin /home/leo/gentoo/lib/udev/rules.d false /etc/init.d/'
    >>> Completed installing sys-fs/fuse-3.14.0 into /home/leo/gentoo/var/tmp/portage/sys-fs/fuse-3.14.0/image

     * Final size of build directory: 107184 KiB (104.6 MiB)
     * Final size of installed tree:     636 KiB

     * QA Notice: the following files are outside of the prefix:
     * /etc
     * /etc/init.d
     * /etc/init.d/fuse3
     * ERROR: sys-fs/fuse-3.14.0::gentoo failed:
     *   Aborting due to QA concerns: there are files installed outside the prefix
     * 
     * Call stack:
     *   misc-functions.sh, line 670:  Called install_qa_check
     *   misc-functions.sh, line 134:  Called source 'install_symlink_html_docs'
     *            05prefix, line 114:  Called install_qa_check_prefix
     *            05prefix, line  27:  Called die
     * The specific snippet of code:
     *   			die "Aborting due to QA concerns: there are files installed outside the prefix"


Both 3.14.0 and 3.12.0 can reproduce this issue.
Comment 1 Yuan Liao (Leo3418) 2023-03-05 18:16:45 UTC
Created attachment 856220 [details, diff]
[PATCH] sys-fs/fuse: Set init script dir in Meson options

Bug 796518 concerns the same issue for this package at an older version, and it was resolved by deleting the init script when EPREFIX is empty since the package did not support a custom init script destination at that time.  The 3.12.0 ebuild dropped the logic that would delete the init script on Prefix, which is why this issue has occurred again.

At the same time, the 3.12.0 upstream release happened to add a new 'initscriptdir' Meson option to support changing the init script path.  This means that the same issue can now be fixed by utilizing this new option -- if installing init scripts on Prefix makes sense at all.  I am attaching a patch that fixes the issue with this approach.
Comment 2 Mike Gilbert gentoo-dev 2023-03-12 02:57:14 UTC
On my system, sys-fs/fuse:3 does not install an init script at all.

I suspect there is a bug in the install helper script that is triggering on my system but somehow not on yours.

In any case, we definitely do not want to install the sysv-style init script that upstream provides.

The OpenRC init script is provided by sys-fs/fuse-common.
Comment 3 Mike Gilbert gentoo-dev 2023-03-12 03:15:41 UTC
Ah, the fuse ebuild deletes the init script after installation. That fails on prefix because the path is wrong.
Comment 4 Larry the Git Cow gentoo-dev 2023-03-12 03:21:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76f59c5570cf541ff06e8704c7844864f5f6a5db

commit 76f59c5570cf541ff06e8704c7844864f5f6a5db
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-03-12 03:20:21 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-03-12 03:20:21 +0000

    sys-fs/fuse: pass -Dinitscriptdir= to meson setup
    
    We don't want to install the sysv init script anyway, and this prevents
    it from being installed outside of EPREFIX.
    
    Closes: https://bugs.gentoo.org/899698
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-fs/fuse/fuse-3.12.0.ebuild    | 2 +-
 sys-fs/fuse/fuse-3.13.1-r1.ebuild | 2 +-
 sys-fs/fuse/fuse-3.14.0.ebuild    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)