diff --git a/.fuse3.metadata b/.fuse3.metadata new file mode 100644 index 0000000..c8cad80 --- /dev/null +++ b/.fuse3.metadata @@ -0,0 +1 @@ +e11f1443582b971156ac3afe75e37297afb9bf25 SOURCES/fuse-3.6.1.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..72e7243 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/fuse-3.6.1.tar.gz diff --git a/SOURCES/fuse.conf b/SOURCES/fuse.conf new file mode 100644 index 0000000..cd4c6bd --- /dev/null +++ b/SOURCES/fuse.conf @@ -0,0 +1,2 @@ +# mount_max = 1000 +# user_allow_other diff --git a/SOURCES/fuse3-0001-no-chown-root.patch b/SOURCES/fuse3-0001-no-chown-root.patch new file mode 100644 index 0000000..dcaebf7 --- /dev/null +++ b/SOURCES/fuse3-0001-no-chown-root.patch @@ -0,0 +1,159 @@ +From 1c8caf9fd542da587aa91a0dd7cc79f20925ab12 Mon Sep 17 00:00:00 2001 +From: Dave Dykstra <2129743+DrDaveD@users.noreply.github.com> +Date: Fri, 24 May 2019 10:38:24 -0500 +Subject: [PATCH 1/3] skip install parts that require root when non-root + +--- + util/install_helper.sh | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/util/install_helper.sh b/util/install_helper.sh +index 688b2450..061b16b0 100755 +--- a/util/install_helper.sh ++++ b/util/install_helper.sh +@@ -22,16 +22,17 @@ else + DESTDIR="${DESTDIR%/}" + fi + +-chown root:root "${DESTDIR}${bindir}/fusermount3" +-chmod u+s "${DESTDIR}${bindir}/fusermount3" +- + install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \ + "${DESTDIR}${sysconfdir}/fuse.conf" + ++if [ `id -u` = 0 ]; 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 ++ 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" \ + +From 67ec3873e0eaddb5ebafed0f9f81f29e944e91ee Mon Sep 17 00:00:00 2001 +From: Dave Dykstra <2129743+DrDaveD@users.noreply.github.com> +Date: Wed, 3 Jul 2019 13:32:12 -0500 +Subject: [PATCH 2/3] add no-root configure option + +--- + meson_options.txt | 8 ++++++-- + util/install_helper.sh | 3 ++- + util/meson.build | 10 +++++++++- + 3 files changed, 17 insertions(+), 4 deletions(-) + +diff --git a/meson_options.txt b/meson_options.txt +index c08e38e4..c88b32d8 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -5,7 +5,11 @@ option('udevrulesdir', type : 'string', value : '', + description: 'Where to install udev rules (if empty, query pkg-config(1))') + + option('utils', type : 'boolean', value : true, +- description: 'Wheter or not to build and install helper programs') ++ description: 'Whether or not to build and install helper programs') + + option('examples', type : 'boolean', value : true, +- description: 'Wheter or not to build example programs') +\ No newline at end of file ++ description: 'Whether or not to build example programs') ++ ++option('no-root', type : 'boolean', value : false, ++ description: 'Install files without root permissions') ++ +diff --git a/util/install_helper.sh b/util/install_helper.sh +index 061b16b0..30f6227b 100755 +--- a/util/install_helper.sh ++++ b/util/install_helper.sh +@@ -9,6 +9,7 @@ set -e + sysconfdir="$1" + bindir="$2" + udevrulesdir="$3" ++useroot="$4" + + # Both sysconfdir and bindir are absolute paths (since they are joined + # with --prefix in meson.build), but need to be interpreted relative +@@ -25,7 +26,7 @@ fi + install -D -m 644 "${MESON_SOURCE_ROOT}/util/fuse.conf" \ + "${DESTDIR}${sysconfdir}/fuse.conf" + +-if [ `id -u` = 0 ]; then ++if $useroot; then + chown root:root "${DESTDIR}${bindir}/fusermount3" + chmod u+s "${DESTDIR}${bindir}/fusermount3" + +diff --git a/util/meson.build b/util/meson.build +index aa0e734a..d273ca8e 100644 +--- a/util/meson.build ++++ b/util/meson.build +@@ -20,9 +20,17 @@ if udevrulesdir == '' + udevrulesdir = join_paths(udev.get_pkgconfig_variable('udevdir'), 'rules.d') + endif + ++noroot = get_option('no-root') ++if noroot ++ useroot = 'false' ++else ++ useroot = 'true' ++endif ++ + meson.add_install_script('install_helper.sh', + join_paths(get_option('prefix'), get_option('sysconfdir')), + join_paths(get_option('prefix'), get_option('bindir')), +- udevrulesdir) ++ udevrulesdir, ++ useroot) + + + +From 12cf86c8a512a50766e088c3fcca532883ad1e5f Mon Sep 17 00:00:00 2001 +From: Dave Dykstra <2129743+DrDaveD@users.noreply.github.com> +Date: Wed, 3 Jul 2019 17:25:50 -0500 +Subject: [PATCH 3/3] make the option useroot instead of no-root + +--- + meson_options.txt | 4 ++-- + util/meson.build | 9 +-------- + 2 files changed, 3 insertions(+), 10 deletions(-) + +diff --git a/meson_options.txt b/meson_options.txt +index c88b32d8..e778254c 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -10,6 +10,6 @@ option('utils', type : 'boolean', value : true, + option('examples', type : 'boolean', value : true, + description: 'Whether or not to build example programs') + +-option('no-root', type : 'boolean', value : false, +- description: 'Install files without root permissions') ++option('useroot', type : 'boolean', value : true, ++ description: 'Set owner and setuid bits on installed file') + +diff --git a/util/meson.build b/util/meson.build +index d273ca8e..5c8f1b58 100644 +--- a/util/meson.build ++++ b/util/meson.build +@@ -20,17 +20,10 @@ if udevrulesdir == '' + udevrulesdir = join_paths(udev.get_pkgconfig_variable('udevdir'), 'rules.d') + endif + +-noroot = get_option('no-root') +-if noroot +- useroot = 'false' +-else +- useroot = 'true' +-endif +- + meson.add_install_script('install_helper.sh', + join_paths(get_option('prefix'), get_option('sysconfdir')), + join_paths(get_option('prefix'), get_option('bindir')), + udevrulesdir, +- useroot) ++ '@0@'.format(get_option('useroot'))) + + diff --git a/SPECS/fuse3.spec b/SPECS/fuse3.spec new file mode 100644 index 0000000..ec9e580 --- /dev/null +++ b/SPECS/fuse3.spec @@ -0,0 +1,143 @@ +Name: fuse3 +Version: 3.6.1 +Release: 4%{?dist} +Summary: File System in Userspace (FUSE) v3 utilities +License: GPL+ +URL: http://fuse.sf.net +Source0: https://github.com/libfuse/libfuse/archive/fuse-%{version}.tar.gz +Source1: fuse.conf + +# https://github.com/libfuse/libfuse/pull/421.patch +Patch1: fuse3-0001-no-chown-root.patch + +BuildRequires: which +Conflicts: filesystem < 3 +BuildRequires: libselinux-devel +BuildRequires: meson, ninja-build, gcc, gcc-c++ +Requires: %{_sysconfdir}/fuse.conf +# fuse-common 3.4.2-3 had the fuse & fuse3 man pages in it +Conflicts: fuse-common < 3.4.2-4 + +%description +With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains the FUSE v3 userspace tools to +mount a FUSE filesystem. + +%package libs +Summary: File System in Userspace (FUSE) v3 libraries +License: LGPLv2+ +Conflicts: filesystem < 3 + +%description libs +Devel With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains the FUSE v3 libraries. + +%package devel +Summary: File System in Userspace (FUSE) v3 devel files +Requires: %{name}-libs = %{version}-%{release} +Requires: pkgconfig +License: LGPLv2+ +Conflicts: filesystem < 3 + +%description devel +With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains development files (headers, +pgk-config) to develop FUSE v3 based applications/filesystems. + +%prep +%setup -q -n libfuse-fuse-%{version} + +%patch1 -p1 -b .no_chown_root + +%build +export LC_ALL=en_US.UTF-8 +%if ! 0%{?_vpath_srcdir:1} +%global _vpath_srcdir . +%endif +%if ! 0%{?_vpath_builddir:1} +%global _vpath_builddir build +%endif +%meson + +(cd %{_vpath_builddir} +meson configure -D examples=false +# don't have root for installation +meson configure -D useroot=false +ninja-build reconfigure +) +%meson_build + +%install +export MESON_INSTALL_DESTDIR_PREFIX=%{buildroot}/usr %meson_install +find %{buildroot} . +find %{buildroot} -type f -name "*.la" -exec rm -f {} ';' +# change from 4755 to 0755 to allow stripping -- fixed later in files +chmod 0755 %{buildroot}/%{_bindir}/fusermount3 + +# Get rid of static libs +rm -f %{buildroot}/%{_libdir}/*.a +# No need to create init-script +rm -f %{buildroot}%{_sysconfdir}/init.d/fuse3 + +# This is in the fuse package on el7 and there's no default on el6 +rm -f %{buildroot}%{_sysconfdir}/fuse.conf + +# Delete pointless udev rules, which do not belong in /usr/lib (brc#748204) +rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules + +%post -p /sbin/ldconfig libs +%postun -p /sbin/ldconfig libs + +%{!?_licensedir:%global license %%doc} + +%files +%license LICENSE GPL2.txt +%doc AUTHORS ChangeLog.rst README.md +%{_sbindir}/mount.fuse3 +%attr(4755,root,root) %{_bindir}/fusermount3 +%{_mandir}/man1/* +%{_mandir}/man8/* + +%files libs +%license LGPL2.txt +%{_libdir}/libfuse3.so.* + +%files devel +%{_libdir}/libfuse3.so +%{_libdir}/pkgconfig/fuse3.pc +%{_includedir}/fuse3/ + +%changelog +* Fri Oct 11 2019 Jindrich Novy - 3.6.1-4 +- remove RHEL6 and RHEL8+ specific stuff +- make setup quiet + +* Wed Jul 03 2019 Dave Dykstra - 3.6.1-3 +- Update to the final version of pr #421 + +* Wed Jul 03 2019 Dave Dykstra - 3.6.1-2 +- Update to newer version of pr #421 +- Disable building examples on el7 + +* Thu Jun 13 2019 Tom Callaway - 3.6.1-1 +- Update to 3.6.1 + +* Fri May 24 2019 Dave Dykstra - 3.5.0-1 +- Upgrade to upstream 3.5.0 + +* Sat May 04 2019 Dave Dykstra - 3.4.2-7 +- Fix building on el6 + +* Wed May 01 2019 Dave Dykstra - 3.4.2-6 +- Need Conflicts: fuse-common < 3.4.2-4, because <= 3.4.2-3 isn't quite + enough. + +* Wed May 01 2019 Dave Dykstra - 3.4.2-5 +- Update the Conflicts: fuse-common <= version to 3.4.2-3 + +* Wed May 01 2019 Dave Dykstra - 3.4.2-4 +- Bump release number in order to larger than a rebuild of fuse package + done before separation pull request was merged. + +* Mon Apr 08 2019 Dave Dykstra - 3.4.2-3 +- Separate out from fuse package