temporarily fallback code for build
This commit is contained in:
parent
f80b8d189d
commit
d71b58a164
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,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
|
||||||
|
|
||||||
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
|
||||||
91
fuse.spec
91
fuse.spec
@ -1,21 +1,30 @@
|
|||||||
%global fuse2ver 2.9.9
|
%global fuse2ver 2.9.9
|
||||||
|
%global fuse3ver 3.9.2
|
||||||
|
|
||||||
Name: fuse
|
Name: fuse
|
||||||
Version: %{fuse2ver}
|
Version: %{fuse2ver}
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: User space File System of fuse2
|
Summary: User space File System of fuse2
|
||||||
License: GPL+ and LGPLv2+
|
License: GPL+ and LGPLv2+
|
||||||
URL: http://fuse.sf.net
|
URL: http://fuse.sf.net
|
||||||
|
#fuse2 sources
|
||||||
Source0: https://github.com/libfuse/libfuse/archive/%{name}-%{fuse2ver}.tar.gz
|
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
|
Patch0: 0000-fix-compile-error-because-of-ns-colliding.patch
|
||||||
Patch1: 0001-libfuse-Assign-NULL-to-old-to-avoid-free-it-twice-52.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
|
||||||
|
|
||||||
BuildRequires: libselinux-devel, pkgconfig, systemd-udev, meson, fdupes
|
BuildRequires: libselinux-devel, pkgconfig, systemd-udev, meson, fdupes
|
||||||
BuildRequires: autoconf, automake, libtool, gettext-devel, ninja-build
|
BuildRequires: autoconf, automake, libtool, gettext-devel, ninja-build
|
||||||
Requires: which, fuse-common
|
Requires: which
|
||||||
Recommends: %{name}-help = %{version}-%{release}
|
Recommends: %{name}-help = %{version}-%{release}
|
||||||
Conflicts: filesystem < 3
|
Conflicts: filesystem < 3
|
||||||
|
Provides: fuse-common
|
||||||
|
Obsoletes: fuse-common
|
||||||
Provides: %{name}-libs
|
Provides: %{name}-libs
|
||||||
Obsoletes: %{name}-libs
|
Obsoletes: %{name}-libs
|
||||||
|
|
||||||
@ -26,6 +35,19 @@ the fuse kernel module (maintained in the regular kernel repositories) and the
|
|||||||
libfuse userspace library (maintained in this repository). libfuse provides the
|
libfuse userspace library (maintained in this repository). libfuse provides the
|
||||||
reference implementation for communicating with the FUSE kernel module.
|
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
|
%package devel
|
||||||
Version: %{fuse2ver}
|
Version: %{fuse2ver}
|
||||||
@ -39,6 +61,18 @@ Conflicts: filesystem < 3
|
|||||||
This package contains all include files, libraries and configuration
|
This package contains all include files, libraries and configuration
|
||||||
files needed to develop programs that use the fuse2.
|
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
|
%package help
|
||||||
Summary: Including man files for fuse
|
Summary: Including man files for fuse
|
||||||
Requires: man
|
Requires: man
|
||||||
@ -47,14 +81,24 @@ Requires: man
|
|||||||
This contains man files for the using of fuse
|
This contains man files for the using of fuse
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -T -c -n fuse2and3 -a0
|
%setup -q -T -c -n fuse2and3 -a0 -a1
|
||||||
|
|
||||||
|
# fuse 2
|
||||||
pushd %{name}-%{fuse2ver}
|
pushd %{name}-%{fuse2ver}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
popd
|
||||||
|
|
||||||
|
# fuse 3
|
||||||
|
pushd %{name}-%{fuse3ver}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# fuse 2
|
||||||
pushd %{name}-%{fuse2ver}
|
pushd %{name}-%{fuse2ver}
|
||||||
export MOUNT_FUSE_PATH="%{_sbindir}"
|
export MOUNT_FUSE_PATH="%{_sbindir}"
|
||||||
export CFLAGS="%{optflags} -D_GNU_SOURCE"
|
export CFLAGS="%{optflags} -D_GNU_SOURCE"
|
||||||
@ -62,19 +106,41 @@ export CFLAGS="%{optflags} -D_GNU_SOURCE"
|
|||||||
%make_build
|
%make_build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# fuse 3
|
||||||
|
pushd %{name}-%{fuse3ver}
|
||||||
|
%meson
|
||||||
|
%meson_build
|
||||||
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
# fuse 2
|
||||||
pushd %{name}-%{fuse2ver}
|
pushd %{name}-%{fuse2ver}
|
||||||
%make_install
|
%make_install
|
||||||
popd
|
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}/%{_libdir}/*.a
|
||||||
rm -f %{buildroot}%{_sysconfdir}/init.d/fuse
|
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}%{_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
|
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 fuse -p /sbin/ldconfig
|
||||||
|
%post -n fuse3 -p /sbin/ldconfig
|
||||||
%postun -n fuse -p /sbin/ldconfig
|
%postun -n fuse -p /sbin/ldconfig
|
||||||
|
%postun -n fuse3 -p /sbin/ldconfig
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc fuse-%{fuse2ver}/{AUTHORS,ChangeLog,NEWS,README*}
|
%doc fuse-%{fuse2ver}/{AUTHORS,ChangeLog,NEWS,README*}
|
||||||
@ -84,6 +150,15 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
|||||||
%{_bindir}/ulockmgr_server
|
%{_bindir}/ulockmgr_server
|
||||||
%{_libdir}/libfuse.so.*
|
%{_libdir}/libfuse.so.*
|
||||||
%{_libdir}/libulockmgr.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
|
%files devel
|
||||||
%{_includedir}/fuse.h
|
%{_includedir}/fuse.h
|
||||||
@ -93,12 +168,20 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
|||||||
%{_libdir}/libulockmgr.so
|
%{_libdir}/libulockmgr.so
|
||||||
%{_libdir}/pkgconfig/fuse.pc
|
%{_libdir}/pkgconfig/fuse.pc
|
||||||
|
|
||||||
|
%files -n fuse3-devel
|
||||||
|
%{_includedir}/fuse3/
|
||||||
|
%{_libdir}/libfuse3.so
|
||||||
|
%{_libdir}/pkgconfig/fuse3.pc
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
- Sun May 23 2021 yanglongkang <yanglongkang@huawei.com> -3.9.2-5
|
||||||
|
- temporarily fallback code for build
|
||||||
|
|
||||||
- Sat May 22 2021 yanglongkang <yanglongkang@huawei.com> -3.9.2-4
|
- Sat May 22 2021 yanglongkang <yanglongkang@huawei.com> -3.9.2-4
|
||||||
- Separate fuse3 out into its own package
|
- Separate fuse3 out into its own package
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user