commit:     7b7a94f2224ef18bf5cbe863d3aac94aaa38e804
Author:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Thu May 26 14:32:37 2016 +0000
Commit:     Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Thu May 26 14:32:37 2016 +0000
URL:        https://gitweb.gentoo.org/dev/dev-zero.git/commit/?id=7b7a94f2

sys-fs/fuse: add rev-bumped fuse including gold-linker patch

 sys-fs/fuse/Manifest                            |  3 +
 sys-fs/fuse/files/fuse-2.8.6-gold-linker.patch  | 60 +++++++++++++++++
 sys-fs/fuse/files/fuse-2.9.3-kernel-types.patch | 19 ++++++
 sys-fs/fuse/files/fuse-fbsd.init                | 23 +++++++
 sys-fs/fuse/files/fuse.init                     | 35 ++++++++++
 sys-fs/fuse/fuse-2.9.6-r1.ebuild                | 86 +++++++++++++++++++++++++
 sys-fs/fuse/metadata.xml                        | 12 ++++
 7 files changed, 238 insertions(+)

diff --git a/sys-fs/fuse/Manifest b/sys-fs/fuse/Manifest
new file mode 100644
index 0000000..e6ddabd
--- /dev/null
+++ b/sys-fs/fuse/Manifest
@@ -0,0 +1,3 @@
+DIST fuse-2.9.4.tar.gz 577282 SHA256 
6be9c0bff6af8c677414935f31699ea5a7f8f5f791cfa5205be02ea186b97ce1 SHA512 
055ec2a78793276102bc5a0afea9eebd18b151cf752d0985380ffbde1c554e9fb7bc3a43838618e3957b274aa06624303ea12f32c659365c4768dad887bb557d
 WHIRLPOOL 
6c866ba05be5a56e1b1d8793378c0c5c683375e9baad6de22344adaf5bb35021182b15783f59911259f98cb914ef4a1cb70be0cb9b5cd6625173b3b6454c32d7
+DIST fuse-2.9.5.tar.gz 565245 SHA256 
579f371cc5ffc1afca7057512bf7d52988a9ede57859a7c55e5b9f72435cdbb5 SHA512 
65a7355a2e6b872ab055181222e8fb5918c3ea7b93eee3350a812a1545b2c2bee1bfc163ce1e57776d1721151223c437cfb92c4b286e075e68d0eed742447413
 WHIRLPOOL 
7b6b69b2b58e200e7c1957c2bbe4b57da1a400cbc695114c89566dc57b523fd513698e3d9b0e7125521f9e53b5e17c0397601bdaebe8bafc1790c363fa2f55bb
+DIST fuse-2.9.6.tar.gz 640070 SHA256 
0cb48bbc7106632d15a0c6bb582496c9884b869e329428891fe075a9e916f16b SHA512 
275133b7c3b2b62341fe30ceb59a4cab277de01bc7e7987e3a3ae2d5ddae5d62c5ac2786a6ca399a0c6a948882e453f4897d2d629b93e7a9f37745a13c8c0cfa
 WHIRLPOOL 
9fb544365f5fcedb440ca81614c9c8e832dc6e43cf2d147624f50907e4b3cb1df0bfbe4f356e8ad182596718fd69665db040a331fd1ed188e103b3278dc05205

diff --git a/sys-fs/fuse/files/fuse-2.8.6-gold-linker.patch 
b/sys-fs/fuse/files/fuse-2.8.6-gold-linker.patch
new file mode 100644
index 0000000..8ee97df
--- /dev/null
+++ b/sys-fs/fuse/files/fuse-2.8.6-gold-linker.patch
@@ -0,0 +1,60 @@
+Index: fuse-2.8.6/lib/fuse.c
+===================================================================
+--- fuse-2.8.6.orig/lib/fuse.c 2011-09-13 00:23:14.000000000 -0700
++++ fuse-2.8.6/lib/fuse.c      2011-10-19 09:20:27.537099939 -0700
+@@ -3947,11 +3947,11 @@
+                                     11);
+ }
+ 
+-FUSE_SYMVER(".symver fuse_exited,__fuse_exited@");
+-FUSE_SYMVER(".symver fuse_process_cmd,__fuse_process_cmd@");
+-FUSE_SYMVER(".symver fuse_read_cmd,__fuse_read_cmd@");
+-FUSE_SYMVER(".symver fuse_set_getcontext_func,__fuse_set_getcontext_func@");
+-FUSE_SYMVER(".symver fuse_new_compat2,fuse_new@");
++FUSE_SYMVER(".symver fuse_exited,__fuse_exited@FUSE_UNVERSIONED");
++FUSE_SYMVER(".symver fuse_process_cmd,__fuse_process_cmd@FUSE_UNVERSIONED");
++FUSE_SYMVER(".symver fuse_read_cmd,__fuse_read_cmd@FUSE_UNVERSIONED");
++FUSE_SYMVER(".symver 
fuse_set_getcontext_func,__fuse_set_getcontext_func@FUSE_UNVERSIONED");
++FUSE_SYMVER(".symver fuse_new_compat2,fuse_new@FUSE_UNVERSIONED");
+ FUSE_SYMVER(".symver fuse_new_compat22,fuse_new@FUSE_2.2");
+ 
+ #endif /* __FreeBSD__ */
+Index: fuse-2.8.6/lib/fuse_mt.c
+===================================================================
+--- fuse-2.8.6.orig/lib/fuse_mt.c      2011-09-13 00:23:14.000000000 -0700
++++ fuse-2.8.6/lib/fuse_mt.c   2011-10-19 09:20:27.537099939 -0700
+@@ -113,4 +113,4 @@
+       return fuse_session_loop_mt(fuse_get_session(f));
+ }
+ 
+-FUSE_SYMVER(".symver fuse_loop_mt_proc,__fuse_loop_mt@");
++FUSE_SYMVER(".symver fuse_loop_mt_proc,__fuse_loop_mt@FUSE_UNVERSIONED");
+Index: fuse-2.8.6/lib/fuse_versionscript
+===================================================================
+--- fuse-2.8.6.orig/lib/fuse_versionscript     2011-09-13 00:23:14.000000000 
-0700
++++ fuse-2.8.6/lib/fuse_versionscript  2011-10-19 09:20:27.541099939 -0700
+@@ -1,3 +1,6 @@
++FUSE_UNVERSIONED {
++};
++
+ FUSE_2.2 {
+       global:
+               fuse_destroy;
+Index: fuse-2.8.6/lib/helper.c
+===================================================================
+--- fuse-2.8.6.orig/lib/helper.c       2011-09-13 00:23:14.000000000 -0700
++++ fuse-2.8.6/lib/helper.c    2011-10-19 09:20:27.541099939 -0700
+@@ -409,10 +409,10 @@
+       return fuse_mount_compat22(mountpoint, NULL);
+ }
+ 
+-FUSE_SYMVER(".symver fuse_setup_compat2,__fuse_setup@");
++FUSE_SYMVER(".symver fuse_setup_compat2,__fuse_setup@FUSE_UNVERSIONED");
+ FUSE_SYMVER(".symver fuse_setup_compat22,fuse_setup@FUSE_2.2");
+-FUSE_SYMVER(".symver fuse_teardown,__fuse_teardown@");
+-FUSE_SYMVER(".symver fuse_main_compat2,fuse_main@");
++FUSE_SYMVER(".symver fuse_teardown,__fuse_teardown@FUSE_UNVERSIONED");
++FUSE_SYMVER(".symver fuse_main_compat2,fuse_main@FUSE_UNVERSIONED");
+ FUSE_SYMVER(".symver fuse_main_real_compat22,fuse_main_real@FUSE_2.2");
+ 
+ #endif /* __FreeBSD__ */

diff --git a/sys-fs/fuse/files/fuse-2.9.3-kernel-types.patch 
b/sys-fs/fuse/files/fuse-2.9.3-kernel-types.patch
new file mode 100644
index 0000000..5065392
--- /dev/null
+++ b/sys-fs/fuse/files/fuse-2.9.3-kernel-types.patch
@@ -0,0 +1,19 @@
+this is a minimal version of:
+http://sourceforge.net/p/fuse/fuse/ci/6b02a7082ae4c560427ff95b51aa8930bb4a6e1f/
+
+--- a/include/fuse_kernel.h
++++ b/include/fuse_kernel.h
+@@ -88,12 +88,7 @@
+ #ifndef _LINUX_FUSE_H
+ #define _LINUX_FUSE_H
+ 
+-#include <sys/types.h>
+-#define __u64 uint64_t
+-#define __s64 int64_t
+-#define __u32 uint32_t
+-#define __s32 int32_t
+-#define __u16 uint16_t
++#include <linux/types.h>
+ 
+ /*
+  * Version negotiation:

diff --git a/sys-fs/fuse/files/fuse-fbsd.init b/sys-fs/fuse/files/fuse-fbsd.init
new file mode 100644
index 0000000..27d90cc
--- /dev/null
+++ b/sys-fs/fuse/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/files/fuse.init b/sys-fs/fuse/files/fuse.init
new file mode 100644
index 0000000..6c99929
--- /dev/null
+++ b/sys-fs/fuse/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/fuse-2.9.6-r1.ebuild b/sys-fs/fuse/fuse-2.9.6-r1.ebuild
new file mode 100644
index 0000000..6b3f542
--- /dev/null
+++ b/sys-fs/fuse/fuse-2.9.6-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool linux-info udev toolchain-funcs
+
+DESCRIPTION="An interface for filesystems implemented in userspace"
+HOMEPAGE="https://github.com/libfuse/libfuse";
+SRC_URI="https://github.com/libfuse/libfuse/releases/download/${P}/${P}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="examples kernel_linux kernel_FreeBSD static-libs"
+
+PDEPEND="kernel_FreeBSD? ( sys-fs/fuse4bsd )"
+DEPEND="virtual/pkgconfig"
+
+pkg_setup() {
+       if use kernel_linux ; then
+               if kernel_is lt 2 6 9 ; then
+                       die "Your kernel is too old."
+               fi
+               CONFIG_CHECK="~FUSE_FS"
+               FUSE_FS_WARNING="You need to have FUSE module built to use 
user-mode utils"
+               linux-info_pkg_setup
+       fi
+}
+
+src_prepare() {
+       epatch \
+               "${FILESDIR}"/${PN}-2.9.3-kernel-types.patch \
+               "${FILESDIR}"/${PN}-2.8.6-gold-linker.patch
+       # sandbox violation with mtab writability wrt #438250
+       # don't sed configure.in without eautoreconf because of maintainer mode
+       sed -i 's:umount --fake:true --fake:' configure || die
+       elibtoolize
+}
+
+src_configure() {
+       econf \
+               INIT_D_PATH="${EPREFIX}/etc/init.d" \
+               MOUNT_FUSE_PATH="${EPREFIX}/sbin" \
+               UDEV_RULES_PATH="${EPREFIX}/$(get_udevdir)/rules.d" \
+               $(use_enable static-libs static) \
+               --disable-example
+}
+
+src_install() {
+       default
+
+       dodoc AUTHORS ChangeLog README.md \
+               README.NFS NEWS doc/how-fuse-works doc/kernel.txt
+
+       if use examples ; then
+               docinto examples
+               dodoc example/*
+       fi
+
+       if use kernel_linux ; then
+               newinitd "${FILESDIR}"/fuse.init fuse
+       elif use kernel_FreeBSD ; then
+               insinto /usr/include/fuse
+               doins include/fuse_kernel.h
+               newinitd "${FILESDIR}"/fuse-fbsd.init fuse
+       else
+               die "We don't know what init code install for your kernel, 
please file a bug."
+       fi
+
+       prune_libtool_files
+       rm -rf "${D}"/dev
+
+       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/metadata.xml b/sys-fs/fuse/metadata.xml
new file mode 100644
index 0000000..4234371
--- /dev/null
+++ b/sys-fs/fuse/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person">
+    <email>radher...@gentoo.org</email>
+    <name>Tim Harder</name>
+  </maintainer>
+  <upstream>
+    <remote-id type="cpe">cpe:/a:fuse:fuse</remote-id>
+    <remote-id type="github">libfuse/libfuse</remote-id>
+  </upstream>
+</pkgmetadata>

Reply via email to