fuse3 init
This commit is contained in:
parent
9e340585be
commit
20b60b8bec
32
0001-fix-chown-and-mknod-failed.patch
Normal file
32
0001-fix-chown-and-mknod-failed.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From ca0eb08b7f58a6ecffc1cb13b17a7fdc2f1cd7f2 Mon Sep 17 00:00:00 2001
|
||||
From: Shijie Luo <luoshijie1@huawei.com>
|
||||
Date: Sat, 11 Jan 2020 17:14:38 +0800
|
||||
Subject: [PATCH] fix chown and mknod failed
|
||||
|
||||
remove chown and mknod when user is root.
|
||||
Signed-off-by: Shijie Luo <luoshijie1@huawei.com>
|
||||
---
|
||||
util/install_helper.sh | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/util/install_helper.sh b/util/install_helper.sh
|
||||
index cb649a7..a948fcc 100755
|
||||
--- a/util/install_helper.sh
|
||||
+++ b/util/install_helper.sh
|
||||
@@ -27,13 +27,7 @@ install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \
|
||||
"${DESTDIR}${sysconfdir}/fuse.conf"
|
||||
|
||||
if $useroot; then
|
||||
- chown root:root "${DESTDIR}${bindir}/fusermount3"
|
||||
chmod u+s "${DESTDIR}${bindir}/fusermount3"
|
||||
-
|
||||
- if test ! -e "${DESTDIR}/dev/fuse"; then
|
||||
- mkdir -p "${DESTDIR}/dev"
|
||||
- mknod "${DESTDIR}/dev/fuse" -m 0666 c 10 229
|
||||
- fi
|
||||
fi
|
||||
|
||||
install -D -m 644 "${MESON_SOURCE_ROOT}/util/udev.rules" \
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
From d632df7ef5ede4d5a818a1bedbea8659113470b8 Mon Sep 17 00:00:00 2001
|
||||
From: winndows <winndows@163.com>
|
||||
Date: Wed, 1 Jul 2020 13:20:01 +0800
|
||||
Subject: [PATCH 1/2] libfuse: Assign NULL to "old" to avoid free it twice
|
||||
(#522)
|
||||
|
||||
Assign NULL to "old" at the first free(), to avoid the possible 2nd free() for it.
|
||||
|
||||
Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
|
||||
Co-authored-by: Liao Pingfang <liao.pingfang@zte.com.cn>
|
||||
---
|
||||
lib/modules/iconv.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/modules/iconv.c b/lib/modules/iconv.c
|
||||
index eb5edd8..3a4db7c 100644
|
||||
--- a/lib/modules/iconv.c
|
||||
+++ b/lib/modules/iconv.c
|
||||
@@ -705,6 +705,7 @@ static struct fuse_fs *iconv_new(struct fuse_args *args,
|
||||
if (old) {
|
||||
setlocale(LC_CTYPE, old);
|
||||
free(old);
|
||||
+ old = NULL;
|
||||
}
|
||||
|
||||
ic->next = next[0];
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
From bcb7659504c0b0ba6ab0fe0db930b686381da9ab Mon Sep 17 00:00:00 2001
|
||||
From: winndows <winndows@163.com>
|
||||
Date: Sat, 11 Jul 2020 02:58:07 +0800
|
||||
Subject: [PATCH 2/2] fuse_lowlevel: Move assert for se before dereferencing it
|
||||
with se->debug (#530)
|
||||
|
||||
Move assert for se before dereferencing it with se->debug.
|
||||
|
||||
Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
|
||||
|
||||
Co-authored-by: Liao Pingfang <liao.pingfang@zte.com.cn>
|
||||
---
|
||||
lib/fuse_lowlevel.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
|
||||
index 3dabbd5..7b72ee0 100644
|
||||
--- a/lib/fuse_lowlevel.c
|
||||
+++ b/lib/fuse_lowlevel.c
|
||||
@@ -167,6 +167,7 @@ static int fuse_send_msg(struct fuse_session *se, struct fuse_chan *ch,
|
||||
{
|
||||
struct fuse_out_header *out = iov[0].iov_base;
|
||||
|
||||
+ assert(se != NULL);
|
||||
out->len = iov_length(iov, count);
|
||||
if (se->debug) {
|
||||
if (out->unique == 0) {
|
||||
@@ -189,8 +190,6 @@ static int fuse_send_msg(struct fuse_session *se, struct fuse_chan *ch,
|
||||
int err = errno;
|
||||
|
||||
if (res == -1) {
|
||||
- assert(se != NULL);
|
||||
-
|
||||
/* ENOENT means the operation was interrupted */
|
||||
if (!fuse_session_exited(se) && err != ENOENT)
|
||||
perror("fuse: writing device");
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# fuse3
|
||||
|
||||
#### Description
|
||||
FUSE is an interface for userspace programs to export a filesystem to the Linuxkernel.
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
||||
# fuse3
|
||||
|
||||
#### 介绍
|
||||
FUSE is an interface for userspace programs to export a filesystem to the Linuxkernel.
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
BIN
fuse-3.9.2.tar.xz
Normal file
BIN
fuse-3.9.2.tar.xz
Normal file
Binary file not shown.
17
fuse.conf
Normal file
17
fuse.conf
Normal file
@ -0,0 +1,17 @@
|
||||
# The file /etc/fuse.conf allows for the following parameters:
|
||||
#
|
||||
# user_allow_other - Using the allow_other mount option works fine as root, in
|
||||
# order to have it work as user you need user_allow_other in /etc/fuse.conf as
|
||||
# well. (This option allows users to use the allow_other option.) You need
|
||||
# allow_other if you want users other than the owner to access a mounted fuse.
|
||||
# This option must appear on a line by itself. There is no value, just the
|
||||
# presence of the option.
|
||||
|
||||
#user_allow_other
|
||||
|
||||
|
||||
# mount_max = n - this option sets the maximum number of mounts.
|
||||
# Currently (2014) it must be typed exactly as shown
|
||||
# (with a single space before and after the equals sign).
|
||||
|
||||
#mount_max = 1000
|
||||
212
fuse3.spec
Normal file
212
fuse3.spec
Normal file
@ -0,0 +1,212 @@
|
||||
%global fuse3ver 3.9.2
|
||||
|
||||
Name: fuse3
|
||||
Version: %{fuse3ver}
|
||||
Release: 4
|
||||
Summary: User space File System of fuse3
|
||||
License: GPL+ and LGPLv2+
|
||||
URL: http://fuse.sf.net
|
||||
Source0: https://github.com/libfuse/libfuse/archive/fuse-%{fuse3ver}.tar.xz
|
||||
Source1: fuse.conf
|
||||
|
||||
Patch1: 0001-fix-chown-and-mknod-failed.patch
|
||||
Patch2: 0002-libfuse-Assign-NULL-to-old-to-avoid-free-it-twice-52.patch
|
||||
Patch3: 0003-fuse_lowlevel-Move-assert-for-se-before-dereferencin.patch
|
||||
|
||||
BuildRequires: libselinux-devel, pkgconfig, systemd-udev, meson, fdupes
|
||||
BuildRequires: autoconf, automake, libtool, gettext-devel, ninja-build
|
||||
Requires: which, fuse-common
|
||||
Recommends: %{name}-help = %{version}-%{release}
|
||||
Conflicts: filesystem < 3
|
||||
Provides: %{name}-libs
|
||||
Obsoletes: %{name}-libs
|
||||
|
||||
%description
|
||||
FUSE (Filesystem in Userspace) is an interface for userspace programs to export
|
||||
a filesystem to the Linux kernel. The FUSE project consists of two components:
|
||||
the fuse kernel module (maintained in the regular kernel repositories) and the
|
||||
libfuse userspace library (maintained in this repository). libfuse provides the
|
||||
reference implementation for communicating with the FUSE kernel module.
|
||||
|
||||
%package -n fuse-common
|
||||
Version: %{fuse3ver}
|
||||
Summary: Common files (fuse.conf) for File System in Userspace (FUSE) v2 and v3
|
||||
License: GPL+
|
||||
|
||||
%description -n fuse-common
|
||||
Common files (fuse.conf) for File System in Userspace (FUSE) v2 and v3
|
||||
|
||||
%package -n fuse3-devel
|
||||
Version: %{fuse3ver}
|
||||
Summary: User space File System of fuse3 devel files
|
||||
Obsoletes: %{name}3-libs
|
||||
Requires: pkgconfig
|
||||
License: LGPLv2+
|
||||
Conflicts: filesystem < 3
|
||||
|
||||
%description -n fuse3-devel
|
||||
This package contains all include files, libraries and configuration
|
||||
files needed to develop programs that use the fuse3.
|
||||
|
||||
%package help
|
||||
Summary: Including man files for fuse
|
||||
Requires: man
|
||||
|
||||
%description help
|
||||
This contains man files for the using of fuse
|
||||
|
||||
%prep
|
||||
%setup -q -T -c -n fuse3 -a0
|
||||
|
||||
pushd fuse-%{fuse3ver}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
popd
|
||||
|
||||
%build
|
||||
|
||||
pushd fuse-%{fuse3ver}
|
||||
%meson
|
||||
%meson_build
|
||||
popd
|
||||
|
||||
%install
|
||||
|
||||
pushd fuse-%{fuse3ver}
|
||||
export MESON_INSTALL_DESTDIR_PREFIX=%{buildroot}/usr
|
||||
%meson_install
|
||||
popd
|
||||
|
||||
chmod 0755 %{buildroot}/%{_bindir}/fusermount3
|
||||
|
||||
rm -f %{buildroot}/%{_libdir}/*.a
|
||||
rm -f %{buildroot}%{_sysconfdir}/init.d/fuse3
|
||||
rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
# Install config-file
|
||||
install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}
|
||||
|
||||
|
||||
%post -n fuse3 -p /sbin/ldconfig
|
||||
%postun -n fuse3 -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
|
||||
%files -n fuse3
|
||||
%doc fuse-%{fuse3ver}/{AUTHORS,ChangeLog*,README*}
|
||||
%license fuse-%{fuse3ver}/LICENSE fuse-%{fuse3ver}/*GPL2.txt
|
||||
%{_sbindir}/mount.fuse3
|
||||
%attr(4755,root,root) %{_bindir}/fusermount3
|
||||
%{_libdir}/libfuse3.so.*
|
||||
|
||||
%files -n fuse-common
|
||||
%config(noreplace) %{_sysconfdir}/fuse.conf
|
||||
|
||||
%files -n fuse3-devel
|
||||
%{_includedir}/fuse3/
|
||||
%{_libdir}/libfuse3.so
|
||||
%{_libdir}/pkgconfig/fuse3.pc
|
||||
|
||||
%files help
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man8/*
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat May 22 2021 yanglongkang <yanglongkang@huawei.com> -3.9.2-4
|
||||
- fuse3 init
|
||||
|
||||
* Thu Dec 17 2020 yanglongkang <yanglongkang@huawei.com> -3.9.2-3
|
||||
- set help package as install requires
|
||||
|
||||
* Mon Jul 13 2020 Zhiqiang Liu <liuzhiqiang26@huawei.com> -3.9.2-2
|
||||
- backport upstream bugfix patches
|
||||
|
||||
* Mon Jul 06 2020 Youming Zhang <zhangyouming4@huawei.com> -3.9.2-1
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update fuse3 from 3.9.0 to 3.9.2
|
||||
|
||||
* Tue Jun 30 2020 Zhiqiang Liu <liuzhiqiang26@huawei.com> - 2.9.9-1
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:renumber patches
|
||||
|
||||
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.9.9-0
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update fuse2 from 2.9.7 to 2.9.9,
|
||||
update fuse3 from 3.2.3 to 3.9.0
|
||||
|
||||
* Sat Dec 28 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.9.7-23
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:sync bugfix from community
|
||||
|
||||
* Wed Sep 4 2019 zoujing <zoujing13@huawei.com> - 2.9.7-22
|
||||
- Type:enhancemnet
|
||||
- ID:NA
|
||||
- SUG:restart
|
||||
- DESCi:openEuler Debranding
|
||||
|
||||
* Fri Aug 23 2019 zoujing <zoujing13@huawei.com> - 2.9.7-21
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:restart
|
||||
- DESC: remove sensitive information
|
||||
|
||||
* Thu Aug 22 2019 zoujing <zoujing13@huawei.com> - 2.9.7-20
|
||||
- Type: enhancement
|
||||
- ID:NA
|
||||
- SUG:restart
|
||||
- DESC:rename patch name
|
||||
|
||||
* Mon Aug 12 2019 huangzheng <huangzheng22@huawei.com> - 2.9.7-19
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:safety code review, delete sensitive information
|
||||
|
||||
* Tue Jul 23 2019 Shijie Luo <luoshijie1@huawei.com> - 2.9.7-18
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix fuse crash problem when rm node
|
||||
|
||||
* Fri Apr 19 2019 wangchan <wangchan9@huawei.com> - 2.9.7-17
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: bfuse-fix-fs-cleanup
|
||||
fuse_opt_parse(): fix memory leak
|
||||
fusermount: refuse unknown options
|
||||
fusermount: whitelist known-good filesystems for mountpoints
|
||||
fusermount: Fix memory leaks
|
||||
Fix invalid free of memory pointer in 'struct fuse_buf'
|
||||
Fix memory leak of FUSE modules
|
||||
|
||||
* Fri Mar 22 2019 yangjian<yangjian79@huawei.com> - 2.9.7-16
|
||||
- Type:cves
|
||||
- ID:CVE-2018-10906
|
||||
- SUG:NA
|
||||
- DESC:fix CVE-2018-10906
|
||||
|
||||
* Fri Jan 25 2019 liuqianya<liuqianya@huawei.com> - 2.9.7-15
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
DESC:increase idle thread
|
||||
invalid free and core
|
||||
memory leak and wild ptr
|
||||
fuse exit when got EINVAL error
|
||||
|
||||
* Wed Jul 18 2018 openEuler Buildteam <buildteam@openeuler.org> - 2.9.7-14
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user