From d30a5e26942969a14ee1266189d8769fdc07a0fe Mon Sep 17 00:00:00 2001 From: Tim Harder Date: Mon, 19 Mar 2018 07:11:36 -0400 Subject: [PATCH] sys-fs/fuse-common: initial import --- sys-fs/fuse-common/Manifest | 1 + sys-fs/fuse-common/files/fuse-fbsd.init | 23 ++++++++++ sys-fs/fuse-common/files/fuse.init | 35 +++++++++++++++ sys-fs/fuse-common/fuse-common-3.2.1.ebuild | 47 +++++++++++++++++++++ sys-fs/fuse-common/metadata.xml | 11 +++++ 5 files changed, 117 insertions(+) create mode 100644 sys-fs/fuse-common/Manifest create mode 100644 sys-fs/fuse-common/files/fuse-fbsd.init create mode 100644 sys-fs/fuse-common/files/fuse.init create mode 100644 sys-fs/fuse-common/fuse-common-3.2.1.ebuild create mode 100644 sys-fs/fuse-common/metadata.xml diff --git a/sys-fs/fuse-common/Manifest b/sys-fs/fuse-common/Manifest new file mode 100644 index 000000000000..4e932706581b --- /dev/null +++ b/sys-fs/fuse-common/Manifest @@ -0,0 +1 @@ +DIST fuse-3.2.1.tar.xz 1042772 BLAKE2B fe7dccc3b791a3b549815f5015a993c29d9481742a88b0291a03b39b95c0acb709969bdc0f6fbea5a48d0bb97bc362ad351b719d77a4f9f630825308f3fb1913 SHA512 edf08711fa02c40b9d3507c99e0b1bfd7208edc1494888c4e2bad92b621eb5c43c4cb31474d2d3bb1edaaf9cd876f3407cdb00a1bdcf61a0b74c876d3707518e diff --git a/sys-fs/fuse-common/files/fuse-fbsd.init b/sys-fs/fuse-common/files/fuse-fbsd.init new file mode 100644 index 000000000000..27d90cc867f3 --- /dev/null +++ b/sys-fs/fuse-common/files/fuse-fbsd.init @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need localmount +} + +start() { + ebegin "Starting fuse" + if ! kldstat -q -m fuse; then + kldload fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module" + fi + eend ${?} +} + +stop() { + ebegin "Stopping fuse" + if kldstat -q -m fuse; then + kldunload fuse >/dev/null 2>&1 || eerror $? "Error unloading fuse module" + fi + eend ${?} +} diff --git a/sys-fs/fuse-common/files/fuse.init b/sys-fs/fuse-common/files/fuse.init new file mode 100644 index 000000000000..6c99929c2266 --- /dev/null +++ b/sys-fs/fuse-common/files/fuse.init @@ -0,0 +1,35 @@ +#!/sbin/openrc-run +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +MOUNTPOINT=/sys/fs/fuse/connections + +depend() { + need localmount +} + +start() { + + ebegin "Starting fuse" + if ! grep -qw fuse /proc/filesystems; then + modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module" + fi + if grep -qw fusectl /proc/filesystems && \ + ! grep -qw $MOUNTPOINT /proc/mounts; then + mount -t fusectl none $MOUNTPOINT >/dev/null 2>&1 || \ + eerror $? "Error mounting control filesystem" + fi + eend ${?} + +} + +stop() { + + ebegin "Stopping fuse" + if grep -qw $MOUNTPOINT /proc/mounts; then + umount $MOUNTPOINT >/dev/null 2>&1 || \ + eerror $? "Error unmounting control filesystem" + fi + eend ${?} + +} diff --git a/sys-fs/fuse-common/fuse-common-3.2.1.ebuild b/sys-fs/fuse-common/fuse-common-3.2.1.ebuild new file mode 100644 index 000000000000..8c95a00239d3 --- /dev/null +++ b/sys-fs/fuse-common/fuse-common-3.2.1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit meson udev + +DESCRIPTION="Common files for multiple slots of sys-fs/fuse" +HOMEPAGE="https://github.com/libfuse/libfuse" +SRC_URI="https://github.com/libfuse/libfuse/releases/download/fuse-${PV}/fuse-${PV}.tar.xz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" + +DEPEND="virtual/pkgconfig" +RDEPEND="! "${ED}"/etc/fuse.conf <<-EOF + # Set the maximum number of FUSE mounts allowed to non-root users. + # The default is 1000. + # + #mount_max = 1000 + + # Allow non-root users to specify the 'allow_other' or 'allow_root' + # mount options. + # + #user_allow_other + EOF +} diff --git a/sys-fs/fuse-common/metadata.xml b/sys-fs/fuse-common/metadata.xml new file mode 100644 index 000000000000..b8fe5aef6d9a --- /dev/null +++ b/sys-fs/fuse-common/metadata.xml @@ -0,0 +1,11 @@ + + + + + radhermit@gentoo.org + Tim Harder + + + libfuse/libfuse + + -- 2.26.2