fuse/fuse.spec

269 lines
7.1 KiB
RPMSpec
Raw Normal View History

2019-09-30 10:39:10 -04:00
%global fuse2ver 2.9.7
%global fuse3ver 3.2.3
Name: fuse
Version: %{fuse2ver}
Release: 22
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.gz
Source2: %{name}.conf
Patch1: fuse-3.0.0-More-parentheses.patch
Patch2: fuse-0001-More-parentheses.patch
Patch3: fuse-2.9.2-namespace-conflict-fix.patch
Patch4: fuse-3.2.1-no-dev.patch
Patch6000: CVE-2018-10906.patch
Patch6001: 0015-libfuse-fix-fs-cleanup.patch
Patch6002: 0032-fuse_opt_parse-fix-memory-leak.patch
Patch6003: 0530-fusermount-refuse-unknown-options.patch
Patch6004: 0531-fusermount-whitelist-known-good-filesystems-for-moun.patch
Patch6005: 0533-fusermount-Fix-memory-leaks.patch
Patch6006: 0545-Fix-invalid-free-of-memory-pointer-in-struct-fuse_bu.patch
Patch6007: 0546-Fix-memory-leak-of-FUSE-modules.patch
Patch9000: bugfix-increase-idle-thread.patch
Patch9001: bugfix-invalid-free-and-core.patch
Patch9002: bugfix-memory-leak-and-wild-ptr.patch
Patch9003: fuse-exit-when-got-EINVAL-error.patch
Patch9004: fix-fuse-crash-problem-when-rm-node.patch
BuildRequires: libselinux-devel, pkgconfig, systemd-udev, meson, fdupes
BuildRequires: autoconf, automake, libtool, gettext-devel, ninja-build
Requires: which
Conflicts: filesystem < 3
Provides: fuse-common
Obsoletes: fuse-common
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 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}
Summary: User space File System of fuse2 devel files
Obsoletes: %{name}-libs
Requires: pkgconfig
License: LGPLv2+
Conflicts: filesystem < 3
%description devel
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
%description help
This contains man files for the using of fuse
%prep
%setup -q -T -c -n fuse2and3 -a0 -a1
# fuse 2
pushd lib%{name}-%{name}-%{fuse2ver}
./makeconf.sh
%patch2 -p1
%patch3 -p1
popd
# fuse 3
pushd lib%{name}-%{name}-%{fuse3ver}
%patch1 -p1
%patch4 -p1
%patch6003 -p1
%patch6005 -p1
%patch6006 -p1
%patch6007 -p1
popd
%patch9000 -p1
%patch9001 -p1
%patch9002 -p1
%patch9003 -p1
%patch6000 -p1
%patch9004 -p1
%patch6001 -p1
%patch6002 -p1
%patch6004 -p1
%build
# fuse 2
pushd lib%{name}-%{name}-%{fuse2ver}
export MOUNT_FUSE_PATH="%{_sbindir}"
export CFLAGS="%{optflags} -D_GNU_SOURCE"
%configure --enable-lib
%make_build
popd
# fuse 3
pushd lib%{name}-%{name}-%{fuse3ver}
%meson
%meson_build
popd
%install
# fuse 2
pushd lib%{name}-%{name}-%{fuse2ver}
%make_install
popd
# fuse 3
pushd lib%{name}-%{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 libfuse-fuse-%{fuse2ver}/{AUTHORS,ChangeLog,NEWS,README*}
%license libfuse-fuse-%{fuse2ver}/COPYING
%{_sbindir}/mount.fuse
%attr(4755,root,root) %{_bindir}/fusermount
%{_bindir}/ulockmgr_server
%{_libdir}/libfuse.so.*
%{_libdir}/libulockmgr.so.*
%config(noreplace) %{_sysconfdir}/%{name}.conf
%files -n fuse3
%doc libfuse-fuse-%{fuse3ver}/{AUTHORS,ChangeLog*,README*}
%license libfuse-fuse-%{fuse3ver}/COPYING
%{_sbindir}/mount.fuse3
%attr(4755,root,root) %{_bindir}/fusermount3
%{_libdir}/libfuse3.so.*
%config(noreplace) %{_sysconfdir}/%{name}.conf
%files devel
%{_includedir}/fuse.h
%{_includedir}/ulockmgr.h
%{_includedir}/fuse
%{_libdir}/libfuse.so
%{_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
* 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