1 |
commit: 7b7a94f2224ef18bf5cbe863d3aac94aaa38e804 |
2 |
Author: Tiziano Müller <dev-zero <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 26 14:32:37 2016 +0000 |
4 |
Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 26 14:32:37 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/dev/dev-zero.git/commit/?id=7b7a94f2 |
7 |
|
8 |
sys-fs/fuse: add rev-bumped fuse including gold-linker patch |
9 |
|
10 |
sys-fs/fuse/Manifest | 3 + |
11 |
sys-fs/fuse/files/fuse-2.8.6-gold-linker.patch | 60 +++++++++++++++++ |
12 |
sys-fs/fuse/files/fuse-2.9.3-kernel-types.patch | 19 ++++++ |
13 |
sys-fs/fuse/files/fuse-fbsd.init | 23 +++++++ |
14 |
sys-fs/fuse/files/fuse.init | 35 ++++++++++ |
15 |
sys-fs/fuse/fuse-2.9.6-r1.ebuild | 86 +++++++++++++++++++++++++ |
16 |
sys-fs/fuse/metadata.xml | 12 ++++ |
17 |
7 files changed, 238 insertions(+) |
18 |
|
19 |
diff --git a/sys-fs/fuse/Manifest b/sys-fs/fuse/Manifest |
20 |
new file mode 100644 |
21 |
index 0000000..e6ddabd |
22 |
--- /dev/null |
23 |
+++ b/sys-fs/fuse/Manifest |
24 |
@@ -0,0 +1,3 @@ |
25 |
+DIST fuse-2.9.4.tar.gz 577282 SHA256 6be9c0bff6af8c677414935f31699ea5a7f8f5f791cfa5205be02ea186b97ce1 SHA512 055ec2a78793276102bc5a0afea9eebd18b151cf752d0985380ffbde1c554e9fb7bc3a43838618e3957b274aa06624303ea12f32c659365c4768dad887bb557d WHIRLPOOL 6c866ba05be5a56e1b1d8793378c0c5c683375e9baad6de22344adaf5bb35021182b15783f59911259f98cb914ef4a1cb70be0cb9b5cd6625173b3b6454c32d7 |
26 |
+DIST fuse-2.9.5.tar.gz 565245 SHA256 579f371cc5ffc1afca7057512bf7d52988a9ede57859a7c55e5b9f72435cdbb5 SHA512 65a7355a2e6b872ab055181222e8fb5918c3ea7b93eee3350a812a1545b2c2bee1bfc163ce1e57776d1721151223c437cfb92c4b286e075e68d0eed742447413 WHIRLPOOL 7b6b69b2b58e200e7c1957c2bbe4b57da1a400cbc695114c89566dc57b523fd513698e3d9b0e7125521f9e53b5e17c0397601bdaebe8bafc1790c363fa2f55bb |
27 |
+DIST fuse-2.9.6.tar.gz 640070 SHA256 0cb48bbc7106632d15a0c6bb582496c9884b869e329428891fe075a9e916f16b SHA512 275133b7c3b2b62341fe30ceb59a4cab277de01bc7e7987e3a3ae2d5ddae5d62c5ac2786a6ca399a0c6a948882e453f4897d2d629b93e7a9f37745a13c8c0cfa WHIRLPOOL 9fb544365f5fcedb440ca81614c9c8e832dc6e43cf2d147624f50907e4b3cb1df0bfbe4f356e8ad182596718fd69665db040a331fd1ed188e103b3278dc05205 |
28 |
|
29 |
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 |
30 |
new file mode 100644 |
31 |
index 0000000..8ee97df |
32 |
--- /dev/null |
33 |
+++ b/sys-fs/fuse/files/fuse-2.8.6-gold-linker.patch |
34 |
@@ -0,0 +1,60 @@ |
35 |
+Index: fuse-2.8.6/lib/fuse.c |
36 |
+=================================================================== |
37 |
+--- fuse-2.8.6.orig/lib/fuse.c 2011-09-13 00:23:14.000000000 -0700 |
38 |
++++ fuse-2.8.6/lib/fuse.c 2011-10-19 09:20:27.537099939 -0700 |
39 |
+@@ -3947,11 +3947,11 @@ |
40 |
+ 11); |
41 |
+ } |
42 |
+ |
43 |
+-FUSE_SYMVER(".symver fuse_exited,__fuse_exited@"); |
44 |
+-FUSE_SYMVER(".symver fuse_process_cmd,__fuse_process_cmd@"); |
45 |
+-FUSE_SYMVER(".symver fuse_read_cmd,__fuse_read_cmd@"); |
46 |
+-FUSE_SYMVER(".symver fuse_set_getcontext_func,__fuse_set_getcontext_func@"); |
47 |
+-FUSE_SYMVER(".symver fuse_new_compat2,fuse_new@"); |
48 |
++FUSE_SYMVER(".symver fuse_exited,__fuse_exited@FUSE_UNVERSIONED"); |
49 |
++FUSE_SYMVER(".symver fuse_process_cmd,__fuse_process_cmd@FUSE_UNVERSIONED"); |
50 |
++FUSE_SYMVER(".symver fuse_read_cmd,__fuse_read_cmd@FUSE_UNVERSIONED"); |
51 |
++FUSE_SYMVER(".symver fuse_set_getcontext_func,__fuse_set_getcontext_func@FUSE_UNVERSIONED"); |
52 |
++FUSE_SYMVER(".symver fuse_new_compat2,fuse_new@FUSE_UNVERSIONED"); |
53 |
+ FUSE_SYMVER(".symver fuse_new_compat22,fuse_new@FUSE_2.2"); |
54 |
+ |
55 |
+ #endif /* __FreeBSD__ */ |
56 |
+Index: fuse-2.8.6/lib/fuse_mt.c |
57 |
+=================================================================== |
58 |
+--- fuse-2.8.6.orig/lib/fuse_mt.c 2011-09-13 00:23:14.000000000 -0700 |
59 |
++++ fuse-2.8.6/lib/fuse_mt.c 2011-10-19 09:20:27.537099939 -0700 |
60 |
+@@ -113,4 +113,4 @@ |
61 |
+ return fuse_session_loop_mt(fuse_get_session(f)); |
62 |
+ } |
63 |
+ |
64 |
+-FUSE_SYMVER(".symver fuse_loop_mt_proc,__fuse_loop_mt@"); |
65 |
++FUSE_SYMVER(".symver fuse_loop_mt_proc,__fuse_loop_mt@FUSE_UNVERSIONED"); |
66 |
+Index: fuse-2.8.6/lib/fuse_versionscript |
67 |
+=================================================================== |
68 |
+--- fuse-2.8.6.orig/lib/fuse_versionscript 2011-09-13 00:23:14.000000000 -0700 |
69 |
++++ fuse-2.8.6/lib/fuse_versionscript 2011-10-19 09:20:27.541099939 -0700 |
70 |
+@@ -1,3 +1,6 @@ |
71 |
++FUSE_UNVERSIONED { |
72 |
++}; |
73 |
++ |
74 |
+ FUSE_2.2 { |
75 |
+ global: |
76 |
+ fuse_destroy; |
77 |
+Index: fuse-2.8.6/lib/helper.c |
78 |
+=================================================================== |
79 |
+--- fuse-2.8.6.orig/lib/helper.c 2011-09-13 00:23:14.000000000 -0700 |
80 |
++++ fuse-2.8.6/lib/helper.c 2011-10-19 09:20:27.541099939 -0700 |
81 |
+@@ -409,10 +409,10 @@ |
82 |
+ return fuse_mount_compat22(mountpoint, NULL); |
83 |
+ } |
84 |
+ |
85 |
+-FUSE_SYMVER(".symver fuse_setup_compat2,__fuse_setup@"); |
86 |
++FUSE_SYMVER(".symver fuse_setup_compat2,__fuse_setup@FUSE_UNVERSIONED"); |
87 |
+ FUSE_SYMVER(".symver fuse_setup_compat22,fuse_setup@FUSE_2.2"); |
88 |
+-FUSE_SYMVER(".symver fuse_teardown,__fuse_teardown@"); |
89 |
+-FUSE_SYMVER(".symver fuse_main_compat2,fuse_main@"); |
90 |
++FUSE_SYMVER(".symver fuse_teardown,__fuse_teardown@FUSE_UNVERSIONED"); |
91 |
++FUSE_SYMVER(".symver fuse_main_compat2,fuse_main@FUSE_UNVERSIONED"); |
92 |
+ FUSE_SYMVER(".symver fuse_main_real_compat22,fuse_main_real@FUSE_2.2"); |
93 |
+ |
94 |
+ #endif /* __FreeBSD__ */ |
95 |
|
96 |
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 |
97 |
new file mode 100644 |
98 |
index 0000000..5065392 |
99 |
--- /dev/null |
100 |
+++ b/sys-fs/fuse/files/fuse-2.9.3-kernel-types.patch |
101 |
@@ -0,0 +1,19 @@ |
102 |
+this is a minimal version of: |
103 |
+http://sourceforge.net/p/fuse/fuse/ci/6b02a7082ae4c560427ff95b51aa8930bb4a6e1f/ |
104 |
+ |
105 |
+--- a/include/fuse_kernel.h |
106 |
++++ b/include/fuse_kernel.h |
107 |
+@@ -88,12 +88,7 @@ |
108 |
+ #ifndef _LINUX_FUSE_H |
109 |
+ #define _LINUX_FUSE_H |
110 |
+ |
111 |
+-#include <sys/types.h> |
112 |
+-#define __u64 uint64_t |
113 |
+-#define __s64 int64_t |
114 |
+-#define __u32 uint32_t |
115 |
+-#define __s32 int32_t |
116 |
+-#define __u16 uint16_t |
117 |
++#include <linux/types.h> |
118 |
+ |
119 |
+ /* |
120 |
+ * Version negotiation: |
121 |
|
122 |
diff --git a/sys-fs/fuse/files/fuse-fbsd.init b/sys-fs/fuse/files/fuse-fbsd.init |
123 |
new file mode 100644 |
124 |
index 0000000..27d90cc |
125 |
--- /dev/null |
126 |
+++ b/sys-fs/fuse/files/fuse-fbsd.init |
127 |
@@ -0,0 +1,23 @@ |
128 |
+#!/sbin/openrc-run |
129 |
+# Copyright 1999-2007 Gentoo Foundation |
130 |
+# Distributed under the terms of the GNU General Public License v2 |
131 |
+ |
132 |
+depend() { |
133 |
+ need localmount |
134 |
+} |
135 |
+ |
136 |
+start() { |
137 |
+ ebegin "Starting fuse" |
138 |
+ if ! kldstat -q -m fuse; then |
139 |
+ kldload fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module" |
140 |
+ fi |
141 |
+ eend ${?} |
142 |
+} |
143 |
+ |
144 |
+stop() { |
145 |
+ ebegin "Stopping fuse" |
146 |
+ if kldstat -q -m fuse; then |
147 |
+ kldunload fuse >/dev/null 2>&1 || eerror $? "Error unloading fuse module" |
148 |
+ fi |
149 |
+ eend ${?} |
150 |
+} |
151 |
|
152 |
diff --git a/sys-fs/fuse/files/fuse.init b/sys-fs/fuse/files/fuse.init |
153 |
new file mode 100644 |
154 |
index 0000000..6c99929 |
155 |
--- /dev/null |
156 |
+++ b/sys-fs/fuse/files/fuse.init |
157 |
@@ -0,0 +1,35 @@ |
158 |
+#!/sbin/openrc-run |
159 |
+# Copyright 1999-2007 Gentoo Foundation |
160 |
+# Distributed under the terms of the GNU General Public License v2 |
161 |
+ |
162 |
+MOUNTPOINT=/sys/fs/fuse/connections |
163 |
+ |
164 |
+depend() { |
165 |
+ need localmount |
166 |
+} |
167 |
+ |
168 |
+start() { |
169 |
+ |
170 |
+ ebegin "Starting fuse" |
171 |
+ if ! grep -qw fuse /proc/filesystems; then |
172 |
+ modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module" |
173 |
+ fi |
174 |
+ if grep -qw fusectl /proc/filesystems && \ |
175 |
+ ! grep -qw $MOUNTPOINT /proc/mounts; then |
176 |
+ mount -t fusectl none $MOUNTPOINT >/dev/null 2>&1 || \ |
177 |
+ eerror $? "Error mounting control filesystem" |
178 |
+ fi |
179 |
+ eend ${?} |
180 |
+ |
181 |
+} |
182 |
+ |
183 |
+stop() { |
184 |
+ |
185 |
+ ebegin "Stopping fuse" |
186 |
+ if grep -qw $MOUNTPOINT /proc/mounts; then |
187 |
+ umount $MOUNTPOINT >/dev/null 2>&1 || \ |
188 |
+ eerror $? "Error unmounting control filesystem" |
189 |
+ fi |
190 |
+ eend ${?} |
191 |
+ |
192 |
+} |
193 |
|
194 |
diff --git a/sys-fs/fuse/fuse-2.9.6-r1.ebuild b/sys-fs/fuse/fuse-2.9.6-r1.ebuild |
195 |
new file mode 100644 |
196 |
index 0000000..6b3f542 |
197 |
--- /dev/null |
198 |
+++ b/sys-fs/fuse/fuse-2.9.6-r1.ebuild |
199 |
@@ -0,0 +1,86 @@ |
200 |
+# Copyright 1999-2016 Gentoo Foundation |
201 |
+# Distributed under the terms of the GNU General Public License v2 |
202 |
+# $Id$ |
203 |
+ |
204 |
+EAPI=5 |
205 |
+inherit eutils libtool linux-info udev toolchain-funcs |
206 |
+ |
207 |
+DESCRIPTION="An interface for filesystems implemented in userspace" |
208 |
+HOMEPAGE="https://github.com/libfuse/libfuse" |
209 |
+SRC_URI="https://github.com/libfuse/libfuse/releases/download/${P}/${P}.tar.gz" |
210 |
+ |
211 |
+LICENSE="GPL-2" |
212 |
+SLOT="0" |
213 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" |
214 |
+IUSE="examples kernel_linux kernel_FreeBSD static-libs" |
215 |
+ |
216 |
+PDEPEND="kernel_FreeBSD? ( sys-fs/fuse4bsd )" |
217 |
+DEPEND="virtual/pkgconfig" |
218 |
+ |
219 |
+pkg_setup() { |
220 |
+ if use kernel_linux ; then |
221 |
+ if kernel_is lt 2 6 9 ; then |
222 |
+ die "Your kernel is too old." |
223 |
+ fi |
224 |
+ CONFIG_CHECK="~FUSE_FS" |
225 |
+ FUSE_FS_WARNING="You need to have FUSE module built to use user-mode utils" |
226 |
+ linux-info_pkg_setup |
227 |
+ fi |
228 |
+} |
229 |
+ |
230 |
+src_prepare() { |
231 |
+ epatch \ |
232 |
+ "${FILESDIR}"/${PN}-2.9.3-kernel-types.patch \ |
233 |
+ "${FILESDIR}"/${PN}-2.8.6-gold-linker.patch |
234 |
+ # sandbox violation with mtab writability wrt #438250 |
235 |
+ # don't sed configure.in without eautoreconf because of maintainer mode |
236 |
+ sed -i 's:umount --fake:true --fake:' configure || die |
237 |
+ elibtoolize |
238 |
+} |
239 |
+ |
240 |
+src_configure() { |
241 |
+ econf \ |
242 |
+ INIT_D_PATH="${EPREFIX}/etc/init.d" \ |
243 |
+ MOUNT_FUSE_PATH="${EPREFIX}/sbin" \ |
244 |
+ UDEV_RULES_PATH="${EPREFIX}/$(get_udevdir)/rules.d" \ |
245 |
+ $(use_enable static-libs static) \ |
246 |
+ --disable-example |
247 |
+} |
248 |
+ |
249 |
+src_install() { |
250 |
+ default |
251 |
+ |
252 |
+ dodoc AUTHORS ChangeLog README.md \ |
253 |
+ README.NFS NEWS doc/how-fuse-works doc/kernel.txt |
254 |
+ |
255 |
+ if use examples ; then |
256 |
+ docinto examples |
257 |
+ dodoc example/* |
258 |
+ fi |
259 |
+ |
260 |
+ if use kernel_linux ; then |
261 |
+ newinitd "${FILESDIR}"/fuse.init fuse |
262 |
+ elif use kernel_FreeBSD ; then |
263 |
+ insinto /usr/include/fuse |
264 |
+ doins include/fuse_kernel.h |
265 |
+ newinitd "${FILESDIR}"/fuse-fbsd.init fuse |
266 |
+ else |
267 |
+ die "We don't know what init code install for your kernel, please file a bug." |
268 |
+ fi |
269 |
+ |
270 |
+ prune_libtool_files |
271 |
+ rm -rf "${D}"/dev |
272 |
+ |
273 |
+ dodir /etc |
274 |
+ cat > "${ED}"/etc/fuse.conf <<-EOF |
275 |
+ # Set the maximum number of FUSE mounts allowed to non-root users. |
276 |
+ # The default is 1000. |
277 |
+ # |
278 |
+ #mount_max = 1000 |
279 |
+ |
280 |
+ # Allow non-root users to specify the 'allow_other' or 'allow_root' |
281 |
+ # mount options. |
282 |
+ # |
283 |
+ #user_allow_other |
284 |
+ EOF |
285 |
+} |
286 |
|
287 |
diff --git a/sys-fs/fuse/metadata.xml b/sys-fs/fuse/metadata.xml |
288 |
new file mode 100644 |
289 |
index 0000000..4234371 |
290 |
--- /dev/null |
291 |
+++ b/sys-fs/fuse/metadata.xml |
292 |
@@ -0,0 +1,12 @@ |
293 |
+<?xml version="1.0" encoding="UTF-8"?> |
294 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
295 |
+<pkgmetadata> |
296 |
+ <maintainer type="person"> |
297 |
+ <email>radhermit@g.o</email> |
298 |
+ <name>Tim Harder</name> |
299 |
+ </maintainer> |
300 |
+ <upstream> |
301 |
+ <remote-id type="cpe">cpe:/a:fuse:fuse</remote-id> |
302 |
+ <remote-id type="github">libfuse/libfuse</remote-id> |
303 |
+ </upstream> |
304 |
+</pkgmetadata> |