From 54a113e9da8c96b110f7ce6fdca8bf62435a6c06 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sun, 13 Aug 2017 10:30:04 +0200 Subject: [PATCH 1/1] - initial (fuse.conf common between libfuse and libfuse3) --- fuse.conf | 9 ++ kernel-misc-fuse-Makefile.am.patch | 28 ++++++ libfuse3.spec | 143 +++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+) create mode 100644 fuse.conf create mode 100644 kernel-misc-fuse-Makefile.am.patch create mode 100644 libfuse3.spec diff --git a/fuse.conf b/fuse.conf new file mode 100644 index 0000000..bdcb935 --- /dev/null +++ b/fuse.conf @@ -0,0 +1,9 @@ +# Set the maximum number of FUSE mounts allowed to non-root users. +# The default is 1000. +# +# mount_max = + + +# Allow non-root users to specify the 'allow_other' or 'allow_root' +# mount options. +# user_allow_other diff --git a/kernel-misc-fuse-Makefile.am.patch b/kernel-misc-fuse-Makefile.am.patch new file mode 100644 index 0000000..4bb9acb --- /dev/null +++ b/kernel-misc-fuse-Makefile.am.patch @@ -0,0 +1,28 @@ +--- fuse-3.1.1/util/Makefile.am~ 2017-08-13 10:11:40.000000000 +0200 ++++ fuse-3.1.1/util/Makefile.am 2017-08-13 10:12:53.514733029 +0200 +@@ -15,14 +15,6 @@ mount_util.c: $(top_srcdir)/lib/mount_ut + + mount_fuse3_SOURCES = mount.fuse.c + +-install-exec-hook: +- -chmod u+s $(DESTDIR)$(bindir)/fusermount3 +- @if test ! -e $(DESTDIR)/dev/fuse; then \ +- $(MKDIR_P) $(DESTDIR)/dev; \ +- echo "mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229 || true"; \ +- mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229 || true; \ +- fi +- + EXTRA_DIST = udev.rules init_script meson.build install_helper.sh + + MOUNT_FUSE_PATH = @MOUNT_FUSE_PATH@ +@@ -34,10 +26,6 @@ install-exec-local: + $(INSTALL_PROGRAM) $(builddir)/mount.fuse3 $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse3 + $(MKDIR_P) $(DESTDIR)$(INIT_D_PATH) + $(INSTALL_SCRIPT) $(srcdir)/init_script $(DESTDIR)$(INIT_D_PATH)/fuse3 +- @if test -x /usr/sbin/update-rc.d; then \ +- echo "/usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true"; \ +- /usr/sbin/update-rc.d fuse start 34 S . start 41 0 6 . || true; \ +- fi + + install-data-local: + $(MKDIR_P) $(DESTDIR)$(UDEV_RULES_PATH) diff --git a/libfuse3.spec b/libfuse3.spec new file mode 100644 index 0000000..edd81c6 --- /dev/null +++ b/libfuse3.spec @@ -0,0 +1,143 @@ +Summary: Filesystem in Userspace +Summary(pl.UTF-8): System plików w przestrzeni użytkownika +Name: libfuse3 +Version: 3.1.1 +Release: 1 +License: GPL v2 +Group: Applications/System +#Source0Download: https://github.com/libfuse/libfuse/releases +Source0: https://github.com/libfuse/libfuse/releases/download/fuse-%{version}/fuse-%{version}.tar.gz +# Source0-md5: 20b10f24b825062c1db9a21a35157f97 +Source1: fuse.conf +Patch0: kernel-misc-fuse-Makefile.am.patch +URL: https://github.com/libfuse/libfuse +BuildRequires: autoconf >= 2.60 +BuildRequires: automake +BuildRequires: libtool +BuildRequires: sed >= 4.0 +Requires(pre): /usr/bin/getgid +Requires(pre): /usr/sbin/groupadd +Suggests: mount >= 2.18 +Provides: group(fuse) +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +FUSE (Filesystem in Userspace) is a simple interface for userspace +programs to export a virtual filesystem to the Linux kernel. FUSE also +aims to provide a secure method for non privileged users to create and +mount their own filesystem implementations. + +This package contains a shared library. + +%description -l pl.UTF-8 +FUSE stanowi prosty interfejs dla programów działających w przestrzeni +użytkownika eksportujący wirtualny system plików do jądra Linuksa. +FUSE ma również na celu udostępnienie bezpiecznej metody tworzenia i +montowania własnych implementacji systemów plików przez zwykłych +(nieuprzywilejowanych) użytkowników. + +Ten pakiet zawiera bibliotekę współdzieloną. + +%package devel +Summary: Filesytem in Userspace - Development header files +Summary(pl.UTF-8): System plików w przestrzeni użytkownika - pliki nagłówkowe +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +Libfuse library header files. + +%description devel -l pl.UTF-8 +Pliki nagłówkowe biblioteki libfuse. + +%package static +Summary: Filesytem in Userspace - static library +Summary(pl.UTF-8): System plików w przestrzeni użytkownika - biblioteka statyczna +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +Static libfuse libraries. + +%description static -l pl.UTF-8 +Statyczna biblioteka libfuse. + +%prep +%setup -q -n fuse-%{version} +%patch0 -p1 + +sed -i '/FUSERMOUNT_PROG/s,fusermount3,%{_bindir}/fusermount3,' lib/mount.c + +# gold is missing base versioning +install -d ld-dir +[ ! -x /usr/bin/ld.bfd ] || ln -sf /usr/bin/ld.bfd ld-dir/ld + +%build +PATH=$(pwd)/ld-dir:$PATH +%{__libtoolize} +%{__aclocal} +%{__autoconf} +%{__autoheader} +%{__automake} +%configure \ + INIT_D_PATH=/etc/rc.d/init.d \ + --sbindir=/sbin \ + --disable-silent-rules \ + --enable-lib \ + --enable-util + +%{__make} + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{/%{_lib},%{_pkgconfigdir},%{_sysconfdir}} + +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +mv -f $RPM_BUILD_ROOT%{_libdir}/libfuse3.so.* $RPM_BUILD_ROOT/%{_lib} +%{__rm} $RPM_BUILD_ROOT%{_libdir}/libfuse3.so +ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib}; echo libfuse3.so.*.*) \ + $RPM_BUILD_ROOT%{_libdir}/libfuse3.so + +cp -p fuse3.pc $RPM_BUILD_ROOT%{_pkgconfigdir} +cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} + +mv $RPM_BUILD_ROOT%{_mandir}/man8/mount.fuse{,3}.8 + +# part of default udev rules nowdays +rm $RPM_BUILD_ROOT%{_libdir}/udev/rules.d/99-fuse3.rules + +# not needed +rm $RPM_BUILD_ROOT/etc/rc.d/init.d/fuse3 + +%clean +rm -rf $RPM_BUILD_ROOT + +%pre +%groupadd -g 84 fuse + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(644,root,root,755) +%doc README.md ChangeLog.rst AUTHORS doc/* +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fuse.conf +%attr(4755,root,root) %{_bindir}/fusermount3 +%attr(755,root,root) /sbin/mount.fuse3 +%attr(755,root,root) /%{_lib}/libfuse3.so.*.*.* +%attr(755,root,root) %ghost /%{_lib}/libfuse3.so.3 +%{_mandir}/man1/fusermount3.1* +%{_mandir}/man8/mount.fuse3.8* + +%files devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libfuse3.so +%{_libdir}/libfuse3.la +%{_includedir}/fuse3 +%{_pkgconfigdir}/fuse3.pc + +%files static +%defattr(644,root,root,755) +%{_libdir}/libfuse3.a -- 2.44.0