Separate fuse3 out into its own package
This commit is contained in:
parent
d7b580125d
commit
f80b8d189d
@ -1,32 +0,0 @@
|
||||
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
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
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
|
||||
|
||||
Binary file not shown.
17
fuse.conf
17
fuse.conf
@ -1,17 +0,0 @@
|
||||
# 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
|
||||
91
fuse.spec
91
fuse.spec
@ -1,30 +1,21 @@
|
||||
%global fuse2ver 2.9.9
|
||||
%global fuse3ver 3.9.2
|
||||
|
||||
Name: fuse
|
||||
Version: %{fuse2ver}
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: User space File System of fuse2
|
||||
License: GPL+ and LGPLv2+
|
||||
URL: http://fuse.sf.net
|
||||
#fuse2 sources
|
||||
Source0: https://github.com/libfuse/libfuse/archive/%{name}-%{fuse2ver}.tar.gz
|
||||
#fuse3 sources
|
||||
Source1: https://github.com/libfuse/libfuse/archive/%{name}-%{fuse3ver}.tar.xz
|
||||
Source2: %{name}.conf
|
||||
|
||||
Patch0: 0000-fix-compile-error-because-of-ns-colliding.patch
|
||||
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
|
||||
Patch1: 0001-libfuse-Assign-NULL-to-old-to-avoid-free-it-twice-52.patch
|
||||
|
||||
BuildRequires: libselinux-devel, pkgconfig, systemd-udev, meson, fdupes
|
||||
BuildRequires: autoconf, automake, libtool, gettext-devel, ninja-build
|
||||
Requires: which
|
||||
Requires: which, fuse-common
|
||||
Recommends: %{name}-help = %{version}-%{release}
|
||||
Conflicts: filesystem < 3
|
||||
Provides: fuse-common
|
||||
Obsoletes: fuse-common
|
||||
Provides: %{name}-libs
|
||||
Obsoletes: %{name}-libs
|
||||
|
||||
@ -35,19 +26,6 @@ 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 fuse3
|
||||
Version: %{fuse3ver}
|
||||
Summary: User space File System of fuse2
|
||||
Obsoletes: fuse-common
|
||||
Provides: fuse3-libs
|
||||
Obsoletes: fuse3-libs
|
||||
|
||||
%description -n fuse3
|
||||
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 devel
|
||||
Version: %{fuse2ver}
|
||||
@ -61,18 +39,6 @@ Conflicts: filesystem < 3
|
||||
This package contains all include files, libraries and configuration
|
||||
files needed to develop programs that use the fuse2.
|
||||
|
||||
%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
|
||||
@ -81,24 +47,14 @@ Requires: man
|
||||
This contains man files for the using of fuse
|
||||
|
||||
%prep
|
||||
%setup -q -T -c -n fuse2and3 -a0 -a1
|
||||
%setup -q -T -c -n fuse2and3 -a0
|
||||
|
||||
# fuse 2
|
||||
pushd %{name}-%{fuse2ver}
|
||||
%patch0 -p1
|
||||
%patch2 -p1
|
||||
popd
|
||||
|
||||
# fuse 3
|
||||
pushd %{name}-%{fuse3ver}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
popd
|
||||
|
||||
%build
|
||||
# fuse 2
|
||||
pushd %{name}-%{fuse2ver}
|
||||
export MOUNT_FUSE_PATH="%{_sbindir}"
|
||||
export CFLAGS="%{optflags} -D_GNU_SOURCE"
|
||||
@ -106,41 +62,19 @@ export CFLAGS="%{optflags} -D_GNU_SOURCE"
|
||||
%make_build
|
||||
popd
|
||||
|
||||
# fuse 3
|
||||
pushd %{name}-%{fuse3ver}
|
||||
%meson
|
||||
%meson_build
|
||||
popd
|
||||
|
||||
%install
|
||||
# fuse 2
|
||||
pushd %{name}-%{fuse2ver}
|
||||
%make_install
|
||||
popd
|
||||
|
||||
# fuse 3
|
||||
pushd %{name}-%{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/fuse
|
||||
rm -f %{buildroot}%{_sysconfdir}/init.d/fuse3
|
||||
rm -f %{buildroot}%{_sysconfdir}/udev/rules.d/99-fuse.rules
|
||||
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 %{SOURCE2} %{buildroot}%{_sysconfdir}
|
||||
|
||||
|
||||
%post -n fuse -p /sbin/ldconfig
|
||||
%post -n fuse3 -p /sbin/ldconfig
|
||||
%postun -n fuse -p /sbin/ldconfig
|
||||
%postun -n fuse3 -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%doc fuse-%{fuse2ver}/{AUTHORS,ChangeLog,NEWS,README*}
|
||||
@ -150,15 +84,6 @@ install -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}
|
||||
%{_bindir}/ulockmgr_server
|
||||
%{_libdir}/libfuse.so.*
|
||||
%{_libdir}/libulockmgr.so.*
|
||||
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||
|
||||
%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.*
|
||||
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||
|
||||
%files devel
|
||||
%{_includedir}/fuse.h
|
||||
@ -168,17 +93,15 @@ install -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}
|
||||
%{_libdir}/libulockmgr.so
|
||||
%{_libdir}/pkgconfig/fuse.pc
|
||||
|
||||
%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
|
||||
- Separate fuse3 out into its own package
|
||||
|
||||
* Thu Dec 17 2020 yanglongkang <yanglongkang@huawei.com> -3.9.2-3
|
||||
- set help package as install requires
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user