mirror of https://gitee.com/openkylin/fuse.git
changed debian/source/format to native
This commit is contained in:
parent
6ff0dedbef
commit
a2bcbc235a
|
@ -1,21 +0,0 @@
|
|||
From: Bartosz Fenski <fenio@debian.org>
|
||||
Date: Fri, 13 May 2022 23:03:04 +0800
|
||||
Subject: Upstream build system should not run update-rc.d.
|
||||
|
||||
---
|
||||
util/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/Makefile.am b/util/Makefile.am
|
||||
index 059d5fc..4e96767 100644
|
||||
--- a/util/Makefile.am
|
||||
+++ b/util/Makefile.am
|
||||
@@ -41,7 +41,7 @@ install-exec-local:
|
||||
$(INSTALL_SCRIPT) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse
|
||||
@if test -x /usr/sbin/update-rc.d; then \
|
||||
echo "/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true"; \
|
||||
- /usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true; \
|
||||
+ #/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true; \
|
||||
fi
|
||||
|
||||
install-data-local:
|
|
@ -1,122 +0,0 @@
|
|||
From: Aurelien Jarno <aurel32@debian.org>
|
||||
Date: Fri, 13 May 2022 23:03:04 +0800
|
||||
Subject: GNU/kFreeBSD support
|
||||
|
||||
---
|
||||
include/fuse_common.h | 2 +-
|
||||
include/fuse_compat.h | 2 +-
|
||||
include/fuse_lowlevel_compat.h | 2 +-
|
||||
lib/fuse.c | 6 +++---
|
||||
lib/fuse_lowlevel.c | 2 +-
|
||||
lib/fuse_session.c | 2 +-
|
||||
lib/helper.c | 2 +-
|
||||
7 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/include/fuse_common.h b/include/fuse_common.h
|
||||
index a4d980d..1cc1158 100644
|
||||
--- a/include/fuse_common.h
|
||||
+++ b/include/fuse_common.h
|
||||
@@ -469,7 +469,7 @@ void fuse_remove_signal_handlers(struct fuse_session *se);
|
||||
* ----------------------------------------------------------- */
|
||||
|
||||
#if FUSE_USE_VERSION < 26
|
||||
-# ifdef __FreeBSD__
|
||||
+# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
# if FUSE_USE_VERSION < 25
|
||||
# error On FreeBSD API version 25 or greater must be used
|
||||
# endif
|
||||
diff --git a/include/fuse_compat.h b/include/fuse_compat.h
|
||||
index e7497a9..3dd5708 100644
|
||||
--- a/include/fuse_compat.h
|
||||
+++ b/include/fuse_compat.h
|
||||
@@ -65,7 +65,7 @@ struct fuse *fuse_setup_compat25(int argc, char *argv[],
|
||||
|
||||
void fuse_teardown_compat22(struct fuse *fuse, int fd, char *mountpoint);
|
||||
|
||||
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__NetBSD__)
|
||||
#include <sys/statfs.h>
|
||||
|
||||
struct fuse_operations_compat22 {
|
||||
diff --git a/include/fuse_lowlevel_compat.h b/include/fuse_lowlevel_compat.h
|
||||
index 8de220b..b32ccfa 100644
|
||||
--- a/include/fuse_lowlevel_compat.h
|
||||
+++ b/include/fuse_lowlevel_compat.h
|
||||
@@ -72,7 +72,7 @@ size_t fuse_dirent_size(size_t namelen);
|
||||
char *fuse_add_dirent(char *buf, const char *name, const struct stat *stbuf,
|
||||
off_t off);
|
||||
|
||||
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__NetBSD__)
|
||||
|
||||
#include <sys/statfs.h>
|
||||
|
||||
diff --git a/lib/fuse.c b/lib/fuse.c
|
||||
index d1d873a..885c9ce 100644
|
||||
--- a/lib/fuse.c
|
||||
+++ b/lib/fuse.c
|
||||
@@ -1522,7 +1522,7 @@ static inline void fuse_prepare_interrupt(struct fuse *f, fuse_req_t req,
|
||||
fuse_do_prepare_interrupt(req, d);
|
||||
}
|
||||
|
||||
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__NetBSD__)
|
||||
|
||||
static int fuse_compat_open(struct fuse_fs *fs, const char *path,
|
||||
struct fuse_file_info *fi)
|
||||
@@ -4729,7 +4729,7 @@ struct fuse *fuse_new_common(struct fuse_chan *ch, struct fuse_args *args,
|
||||
if (!f->conf.ac_attr_timeout_set)
|
||||
f->conf.ac_attr_timeout = f->conf.attr_timeout;
|
||||
|
||||
-#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
/*
|
||||
* In FreeBSD, we always use these settings as inode numbers
|
||||
* are needed to make getcwd(3) work.
|
||||
@@ -4898,7 +4898,7 @@ void fuse_register_module(struct fuse_module *mod)
|
||||
fuse_modules = mod;
|
||||
}
|
||||
|
||||
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__NetBSD__)
|
||||
|
||||
static struct fuse *fuse_new_common_compat(int fd, const char *opts,
|
||||
const struct fuse_operations *op,
|
||||
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
|
||||
index ff03c63..e6ed943 100644
|
||||
--- a/lib/fuse_lowlevel.c
|
||||
+++ b/lib/fuse_lowlevel.c
|
||||
@@ -2842,7 +2842,7 @@ int fuse_req_getgroups(fuse_req_t req, int size, gid_t list[])
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__NetBSD__)
|
||||
|
||||
static void fill_open_compat(struct fuse_open_out *arg,
|
||||
const struct fuse_file_info_compat *f)
|
||||
diff --git a/lib/fuse_session.c b/lib/fuse_session.c
|
||||
index 6e11068..953923c 100644
|
||||
--- a/lib/fuse_session.c
|
||||
+++ b/lib/fuse_session.c
|
||||
@@ -235,6 +235,6 @@ void fuse_chan_destroy(struct fuse_chan *ch)
|
||||
free(ch);
|
||||
}
|
||||
|
||||
-#ifndef __FreeBSD__
|
||||
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
|
||||
FUSE_SYMVER(".symver fuse_chan_new_compat24,fuse_chan_new@FUSE_2.4");
|
||||
#endif
|
||||
diff --git a/lib/helper.c b/lib/helper.c
|
||||
index 49d30f9..6743a0b 100644
|
||||
--- a/lib/helper.c
|
||||
+++ b/lib/helper.c
|
||||
@@ -398,7 +398,7 @@ int fuse_version(void)
|
||||
|
||||
#include "fuse_compat.h"
|
||||
|
||||
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__NetBSD__)
|
||||
|
||||
struct fuse *fuse_setup_compat22(int argc, char *argv[],
|
||||
const struct fuse_operations_compat22 *op,
|
|
@ -1,20 +0,0 @@
|
|||
From: Daniel Baumann <mail@daniel-baumann.ch>
|
||||
Date: Fri, 13 May 2022 23:03:04 +0800
|
||||
Subject: Don't exclude fioc.h from examples (Closes: #626522).
|
||||
|
||||
---
|
||||
example/Makefile.am | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/example/Makefile.am b/example/Makefile.am
|
||||
index 1c04057..fb91555 100644
|
||||
--- a/example/Makefile.am
|
||||
+++ b/example/Makefile.am
|
||||
@@ -1,7 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include -D_FILE_OFFSET_BITS=64 -D_REENTRANT
|
||||
-noinst_HEADERS = fioc.h
|
||||
noinst_PROGRAMS = fusexmp fusexmp_fh null hello hello_ll fioc fioclient \
|
||||
fsel fselclient cusexmp
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From: Daniel Baumann <mail@daniel-baumann.ch>
|
||||
Date: Fri, 13 May 2022 23:03:04 +0800
|
||||
Subject: Clarify manpage that fusermount is used for unmounting only these
|
||||
days
|
||||
|
||||
(Closes: #651556).
|
||||
---
|
||||
doc/fusermount.1 | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/doc/fusermount.1 b/doc/fusermount.1
|
||||
index 86998e2..44f32a3 100644
|
||||
--- a/doc/fusermount.1
|
||||
+++ b/doc/fusermount.1
|
||||
@@ -1,7 +1,7 @@
|
||||
.TH FUSERMOUNT 1 2011\-10\-23 2.8.6 "Filesystem in Userspace (FUSE)"
|
||||
|
||||
.SH NAME
|
||||
-\fBfusermount\fR \- mount and unmount FUSE filesystems
|
||||
+\fBfusermount\fR \- unmount FUSE filesystems
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBfusermount\fR [\fIOPTIONS\fR] \fIMOUNTPOINT\fR
|
||||
@@ -9,7 +9,7 @@
|
||||
.SH DESCRIPTION
|
||||
Filesystem in Userspace (FUSE) is a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. It also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations.
|
||||
.PP
|
||||
-\fBfusermount\fR is a program to mount and unmount FUSE filesystems.
|
||||
+\fBfusermount\fR is a program to unmount FUSE filesystems.
|
||||
|
||||
.SH OPTIONS
|
||||
.IP "\-h" 4
|
|
@ -1,163 +0,0 @@
|
|||
From: Fabrice Bauzac <fbauzac@amadeus.com>
|
||||
Date: Fri, 13 May 2022 23:03:04 +0800
|
||||
Subject: fuse.c (fuse_load_so_name): use dlsym() instead of
|
||||
|
||||
relying on ld.so constructor functions.
|
||||
---
|
||||
include/fuse.h | 11 +++-----
|
||||
lib/fuse.c | 82 ++++++++++++++++++++++++++++++++++++++++++++--------------
|
||||
2 files changed, 67 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/include/fuse.h b/include/fuse.h
|
||||
index 04ab31b..8d7de4b 100644
|
||||
--- a/include/fuse.h
|
||||
+++ b/include/fuse.h
|
||||
@@ -959,13 +959,10 @@ void fuse_register_module(struct fuse_module *mod);
|
||||
* For the parameters, see description of the fields in 'struct
|
||||
* fuse_module'
|
||||
*/
|
||||
-#define FUSE_REGISTER_MODULE(name_, factory_) \
|
||||
- static __attribute__((constructor)) void name_ ## _register(void) \
|
||||
- { \
|
||||
- static struct fuse_module mod = \
|
||||
- { #name_, factory_, NULL, NULL, 0 }; \
|
||||
- fuse_register_module(&mod); \
|
||||
- }
|
||||
+#define FUSE_REGISTER_MODULE(name_, factory_) \
|
||||
+ struct fuse_module fuse_fusemod_ ## name_ ## _module = { \
|
||||
+ #name_, factory_, NULL, NULL, 0 \
|
||||
+ };
|
||||
|
||||
|
||||
/* ----------------------------------------------------------- *
|
||||
diff --git a/lib/fuse.c b/lib/fuse.c
|
||||
index 885c9ce..fd38322 100644
|
||||
--- a/lib/fuse.c
|
||||
+++ b/lib/fuse.c
|
||||
@@ -219,41 +219,76 @@ struct fuse_context_i {
|
||||
fuse_req_t req;
|
||||
};
|
||||
|
||||
+/* Defined by FUSE_REGISTER_MODULE() in lib/modules/subdir.c and iconv.c. */
|
||||
+extern struct fuse_module fuse_fusemod_subdir_module;
|
||||
+extern struct fuse_module fuse_fusemod_iconv_module;
|
||||
+
|
||||
static pthread_key_t fuse_context_key;
|
||||
static pthread_mutex_t fuse_context_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static int fuse_context_ref;
|
||||
static struct fusemod_so *fuse_current_so;
|
||||
-static struct fuse_module *fuse_modules;
|
||||
+static struct fuse_module *fuse_modules = NULL;
|
||||
|
||||
-static int fuse_load_so_name(const char *soname)
|
||||
+static int fuse_load_so_name(const char *soname, const char *module_name)
|
||||
{
|
||||
struct fusemod_so *so;
|
||||
+ int ret = 0;
|
||||
|
||||
so = calloc(1, sizeof(struct fusemod_so));
|
||||
if (!so) {
|
||||
fprintf(stderr, "fuse: memory allocation failed\n");
|
||||
- return -1;
|
||||
+ ret = -1;
|
||||
+ goto end;
|
||||
}
|
||||
|
||||
fuse_current_so = so;
|
||||
- so->handle = dlopen(soname, RTLD_NOW);
|
||||
+
|
||||
+ so->handle = dlopen (soname, RTLD_NOW);
|
||||
+ if (so->handle == NULL) {
|
||||
+ fprintf (stderr, "fuse: dlopen() failed: %s\n", dlerror ());
|
||||
+ ret = -1;
|
||||
+ goto freeso_end;
|
||||
+ }
|
||||
+
|
||||
+ const size_t module_len = strlen (module_name);
|
||||
+ char *symbol = malloc (64 + module_len);
|
||||
+ if (symbol == NULL) {
|
||||
+ perror ("fuse");
|
||||
+ ret = -1;
|
||||
+ goto dlopen_end;
|
||||
+ }
|
||||
+
|
||||
+ sprintf (symbol, "fuse_fusemod_%s_module", module_name);
|
||||
+
|
||||
+ struct fuse_module *module;
|
||||
+ module = dlsym (so->handle, symbol);
|
||||
+ if (module != NULL) {
|
||||
+ fuse_register_module (module);
|
||||
+ }
|
||||
+
|
||||
fuse_current_so = NULL;
|
||||
- if (!so->handle) {
|
||||
- fprintf(stderr, "fuse: %s\n", dlerror());
|
||||
- goto err;
|
||||
- }
|
||||
+
|
||||
if (!so->ctr) {
|
||||
fprintf(stderr, "fuse: %s did not register any modules\n",
|
||||
soname);
|
||||
- goto err;
|
||||
- }
|
||||
- return 0;
|
||||
-
|
||||
-err:
|
||||
- if (so->handle)
|
||||
- dlclose(so->handle);
|
||||
- free(so);
|
||||
- return -1;
|
||||
+ ret = -1;
|
||||
+ goto freesym_end;
|
||||
+ }
|
||||
+
|
||||
+freesym_end:
|
||||
+ free (symbol);
|
||||
+dlopen_end:
|
||||
+ if (ret != 0) {
|
||||
+ /* dlclose() only on error, otherwise we won't have
|
||||
+ * access to the .so anymore. */
|
||||
+ if (dlclose (so->handle)) {
|
||||
+ fprintf (stderr, "fuse: dlclose() failed: %s\n", dlerror ());
|
||||
+ }
|
||||
+ }
|
||||
+freeso_end:
|
||||
+ free (so);
|
||||
+end:
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int fuse_load_so_module(const char *module)
|
||||
@@ -265,14 +300,14 @@ static int fuse_load_so_module(const char *module)
|
||||
return -1;
|
||||
}
|
||||
sprintf(soname, "libfusemod_%s.so", module);
|
||||
- res = fuse_load_so_name(soname);
|
||||
+ res = fuse_load_so_name(soname, module);
|
||||
free(soname);
|
||||
return res;
|
||||
}
|
||||
|
||||
static struct fuse_module *fuse_find_module(const char *module)
|
||||
{
|
||||
- struct fuse_module *m;
|
||||
+ struct fuse_module *m;
|
||||
for (m = fuse_modules; m; m = m->next) {
|
||||
if (strcmp(module, m->name) == 0) {
|
||||
m->ctr++;
|
||||
@@ -4672,6 +4707,15 @@ struct fuse *fuse_new_common(struct fuse_chan *ch, struct fuse_args *args,
|
||||
struct fuse_fs *fs;
|
||||
struct fuse_lowlevel_ops llop = fuse_path_ops;
|
||||
|
||||
+ /* Boolean: have the builtin modules already been registered? */
|
||||
+ static int builtin_modules_registered_p = 0;
|
||||
+ if (builtin_modules_registered_p == 0) {
|
||||
+ /* If not, register them. */
|
||||
+ fuse_register_module (&fuse_fusemod_subdir_module);
|
||||
+ fuse_register_module (&fuse_fusemod_iconv_module);
|
||||
+ builtin_modules_registered_p = 1;
|
||||
+ }
|
||||
+
|
||||
if (fuse_create_context_key() == -1)
|
||||
goto out;
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From: Riku Voipio <riku.voipio@linaro.org>
|
||||
Date: Fri, 13 May 2022 23:03:04 +0800
|
||||
Subject: fuse_kernel.h: clean includes
|
||||
|
||||
Use <linux/types.h> for linux and define types used for other operating systems
|
||||
using <stdint.h> types (Closes: #752081).
|
||||
---
|
||||
include/fuse_kernel.h | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
|
||||
index c632b58..9e02fe3 100644
|
||||
--- a/include/fuse_kernel.h
|
||||
+++ b/include/fuse_kernel.h
|
||||
@@ -88,12 +88,16 @@
|
||||
#ifndef _LINUX_FUSE_H
|
||||
#define _LINUX_FUSE_H
|
||||
|
||||
-#include <sys/types.h>
|
||||
+#ifdef __linux__
|
||||
+#include <linux/types.h>
|
||||
+#else
|
||||
+#include <stdint.h>
|
||||
#define __u64 uint64_t
|
||||
#define __s64 int64_t
|
||||
#define __u32 uint32_t
|
||||
#define __s32 int32_t
|
||||
#define __u16 uint16_t
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Version negotiation:
|
|
@ -1,33 +0,0 @@
|
|||
From: Robo Shimmer <roboshim@users.noreply.github.com>
|
||||
Date: Tue, 31 Jul 2018 16:20:56 +0200
|
||||
Subject: [PATCH] Add autofs to mountpoint file system whitelist
|
||||
|
||||
---
|
||||
ChangeLog | 1 +
|
||||
util/fusermount.c | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/ChangeLog b/ChangeLog
|
||||
index 13a369f..52a4573 100644
|
||||
--- a/ChangeLog
|
||||
+++ b/ChangeLog
|
||||
@@ -7,6 +7,7 @@ FUSE 2.9.9 (2019-01-04)
|
||||
* Fixed `readdir` bug when non-zero offsets are given to filler and the
|
||||
filesystem client, after reading a whole directory, re-reads it from a
|
||||
non-zero offset e. g. by calling `seekdir` followed by `readdir`.
|
||||
+* Allow fuse to be mounted into autofs folder hierarchy.
|
||||
|
||||
FUSE 2.9.8 (2018-07-24)
|
||||
=======================
|
||||
diff --git a/util/fusermount.c b/util/fusermount.c
|
||||
index 4b799d9..c141e25 100644
|
||||
--- a/util/fusermount.c
|
||||
+++ b/util/fusermount.c
|
||||
@@ -1051,6 +1051,7 @@ static int check_perm(const char **mntp, struct stat *stbuf, int *mountpoint_fd)
|
||||
0x24051905 /* UBIFS_SUPER_MAGIC */,
|
||||
0x58465342 /* XFS_SB_MAGIC */,
|
||||
0x2FC12FC1 /* ZFS_SUPER_MAGIC */,
|
||||
+ 0x00000187 /* AUTOFS */,
|
||||
};
|
||||
for (i = 0; i < sizeof(f_type_whitelist)/sizeof(f_type_whitelist[0]); i++) {
|
||||
if (f_type_whitelist[i] == fs_buf.f_type)
|
|
@ -1,20 +0,0 @@
|
|||
From: Benjamin Barenblat <bbaren@google.com>
|
||||
Date: Fri, 3 Aug 2018 11:22:37 -0400
|
||||
Subject: [PATCH] Add FAT to mountpoint file system whitelist
|
||||
|
||||
---
|
||||
util/fusermount.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/util/fusermount.c b/util/fusermount.c
|
||||
index c141e25..0bca761 100644
|
||||
--- a/util/fusermount.c
|
||||
+++ b/util/fusermount.c
|
||||
@@ -1033,6 +1033,7 @@ static int check_perm(const char **mntp, struct stat *stbuf, int *mountpoint_fd)
|
||||
0x9123683E /* BTRFS_SUPER_MAGIC */,
|
||||
0x00C36400 /* CEPH_SUPER_MAGIC */,
|
||||
0xFF534D42 /* CIFS_MAGIC_NUMBER */,
|
||||
+ 0X00004D44 /* MSDOS_SUPER_MAGIC */,
|
||||
0x0000F15F /* ECRYPTFS_SUPER_MAGIC */,
|
||||
0x0000EF53 /* EXT[234]_SUPER_MAGIC */,
|
||||
0xF2F52010 /* F2FS_SUPER_MAGIC */,
|
|
@ -1,8 +0,0 @@
|
|||
0001-initscript.patch
|
||||
0002-kfreebsd.patch
|
||||
0003-examples.patch
|
||||
0004-fusermount-manpage.patch
|
||||
0005-dlsym.patch
|
||||
0006-arm64.patch
|
||||
0007-Add_autofs_to_mountpoint_file_system_whitelist.patch
|
||||
0008-Add_FAT_to_mountpoint_file_system_whitelist.patch
|
|
@ -1 +1 @@
|
|||
3.0 (quilt)
|
||||
3.0 (native)
|
||||
|
|
Loading…
Reference in New Issue