summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2018-03-19 07:11:36 -0400
committerTim Harder <radhermit@gentoo.org>2018-03-19 07:31:11 -0400
commitd30a5e26942969a14ee1266189d8769fdc07a0fe (patch)
treefd8507438c6c773e03f40976fc66835ce7de2b1d
parentdev-python/boto3: amd64 stable wrt bug #650598 (diff)
downloadgentoo-d30a5e26942969a14ee1266189d8769fdc07a0fe.tar.gz
gentoo-d30a5e26942969a14ee1266189d8769fdc07a0fe.tar.bz2
gentoo-d30a5e26942969a14ee1266189d8769fdc07a0fe.zip
sys-fs/fuse-common: initial import
-rw-r--r--sys-fs/fuse-common/Manifest1
-rw-r--r--sys-fs/fuse-common/files/fuse-fbsd.init23
-rw-r--r--sys-fs/fuse-common/files/fuse.init35
-rw-r--r--sys-fs/fuse-common/fuse-common-3.2.1.ebuild47
-rw-r--r--sys-fs/fuse-common/metadata.xml11
5 files changed, 117 insertions, 0 deletions
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="!<sys-fs/fuse-2.9.7-r1:0"
+
+S=${WORKDIR}/fuse-${PV}
+
+src_install() {
+ newsbin "${BUILD_DIR}"/util/mount.fuse3 mount.fuse
+ doman doc/mount.fuse.8
+
+ udev_newrules util/udev.rules 99-fuse.rules
+
+ if use kernel_linux ; then
+ newinitd "${FILESDIR}"/fuse.init fuse
+ elif use kernel_FreeBSD ; then
+ newinitd "${FILESDIR}"/fuse-fbsd.init fuse
+ else
+ die "We don't know what init code install for your kernel, please file a bug."
+ fi
+
+ dodir /etc
+ cat > "${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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">libfuse/libfuse</remote-id>
+ </upstream>
+</pkgmetadata>