sys-fs/fuse-common: initial import
authorTim Harder <radhermit@gentoo.org>
Mon, 19 Mar 2018 11:11:36 +0000 (07:11 -0400)
committerTim Harder <radhermit@gentoo.org>
Mon, 19 Mar 2018 11:31:11 +0000 (07:31 -0400)
sys-fs/fuse-common/Manifest [new file with mode: 0644]
sys-fs/fuse-common/files/fuse-fbsd.init [new file with mode: 0644]
sys-fs/fuse-common/files/fuse.init [new file with mode: 0644]
sys-fs/fuse-common/fuse-common-3.2.1.ebuild [new file with mode: 0644]
sys-fs/fuse-common/metadata.xml [new file with mode: 0644]

diff --git a/sys-fs/fuse-common/Manifest b/sys-fs/fuse-common/Manifest
new file mode 100644 (file)
index 0000000..4e93270
--- /dev/null
@@ -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 (file)
index 0000000..27d90cc
--- /dev/null
@@ -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 (file)
index 0000000..6c99929
--- /dev/null
@@ -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 (file)
index 0000000..8c95a00
--- /dev/null
@@ -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 (file)
index 0000000..b8fe5ae
--- /dev/null
@@ -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>