commit:     18dc49f2ebbef778ce5032e2622edeb4afd39c95
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 20 16:22:50 2019 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Nov 20 16:25:02 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18dc49f2

sys-fs/fuse: pass -Duseroot=false to meson configure

This prevents the /dev/fuse device node from being created by the build
system.

It also prevents the suid bit from being set on fusermount3, so handle
that using fperms in the ebuild, and make it optional via a USE flag.

Closes: https://bugs.gentoo.org/700764
Package-Manager: Portage-2.3.79_p3, Repoman-2.3.18_p2
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-fs/fuse/fuse-3.8.0.ebuild | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sys-fs/fuse/fuse-3.8.0.ebuild b/sys-fs/fuse/fuse-3.8.0.ebuild
index 4aa4c87bdf3..44fefeee4ed 100644
--- a/sys-fs/fuse/fuse-3.8.0.ebuild
+++ b/sys-fs/fuse/fuse-3.8.0.ebuild
@@ -13,7 +13,7 @@ 
SRC_URI="https://github.com/libfuse/libfuse/releases/download/${P}/${P}.tar.xz";
 LICENSE="GPL-2 LGPL-2.1"
 SLOT="3"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86"
-IUSE="test"
+IUSE="+suid test"
 RESTRICT="!test? ( test )"
 
 BDEPEND="virtual/pkgconfig
@@ -44,6 +44,9 @@ src_prepare() {
 }
 
 multilib_src_configure() {
+       local emesonargs=(
+               -Duseroot=false
+       )
        meson_src_configure
 }
 
@@ -65,8 +68,8 @@ multilib_src_install_all() {
        # installed via fuse-common
        rm -r "${ED}"/{etc,$(get_udevdir)} || die
 
-       # handled by the device manager
-       rm -r "${D}"/dev || die
+       # useroot=false prevents the build system from doing this.
+       use suid && fperms u+s /usr/bin/fusermount3
 
        # manually install man pages to respect compression
        rm -r "${ED}"/usr/share/man || die

Reply via email to