Hi Arne,
I sent the below reply but it was slow getting delivered and by the time it got to the ipfire server I had changed my list address to the new ipfire.org one so the mail got bounced back to me together with two of the sub patches I had sent earlier.
Regards,
Adolf.
On 13/01/2021 16:36, Adolf Belka wrote:
Hi Arne,
My apologies. The question about why it was not an addon came up with Michael when I had updated fuse and sshfs. I had searched in git for any references to fuse and only found it in sshfs, borgbackup, samba and openvmtools.
That was obviously wrong, so this whole patch set can be deleted.
How can you tell that fuse is needed for ntfs-3g. If I look at the lfs, dependencies are not mentioned for core programmes
Regards,
Adolf.
On 13/01/2021 16:23, Arne Fitzenreiter wrote:
fuse is a dependency of ntfs-3g read and so it is needed in the core system.
Arne
Am 2021-01-13 15:59, schrieb Adolf Belka:
- Convert the fuse package from core to addon
- Modify lfs to include package version number
- Create initscript that loads the fuse module when fuse is installed/started
and unloads the module when fuse is uninstalled/stopped
- Create install/uninstall/update scripts for fuse
- Move the rootfile from common to packages
- Update the rootfile
- Split meson/ninja build statements into individual steps
Signed-off-by: Adolf Belka ahb.ipfire@gmail.com
config/rootfiles/common/fuse | 38 ------------------ config/rootfiles/packages/fuse | 21 ++++++++++ lfs/fuse | 25 ++++++++++-- src/initscripts/packages/fuse | 70 ++++++++++++++++++++++++++++++++++ src/paks/fuse/install.sh | 27 +++++++++++++ src/paks/fuse/uninstall.sh | 27 +++++++++++++ src/paks/fuse/update.sh | 27 +++++++++++++ 7 files changed, 194 insertions(+), 41 deletions(-) delete mode 100644 config/rootfiles/common/fuse create mode 100644 config/rootfiles/packages/fuse create mode 100644 src/initscripts/packages/fuse create mode 100644 src/paks/fuse/install.sh create mode 100644 src/paks/fuse/uninstall.sh create mode 100644 src/paks/fuse/update.sh
diff --git a/config/rootfiles/common/fuse b/config/rootfiles/common/fuse deleted file mode 100644 index bae55b321..000000000 --- a/config/rootfiles/common/fuse +++ /dev/null @@ -1,38 +0,0 @@ -#etc/rc.d/init.d/fuse3 -#lib/udev/rules.d/99-fuse3.rules -etc/udev/rules.d/99-fuse3.rules -sbin/mount.fuse3 -usr/bin/fusermount3 -#usr/local/bin/fusermount3 -#usr/local/etc -#usr/local/etc/fuse.conf -#usr/local/include/fuse3 -#usr/local/include/fuse3/cuse_lowlevel.h -#usr/local/include/fuse3/fuse.h -#usr/local/include/fuse3/fuse_common.h -#usr/local/include/fuse3/fuse_log.h -#usr/local/include/fuse3/fuse_lowlevel.h -#usr/local/include/fuse3/fuse_opt.h -#usr/local/lib/libfuse3.so -#usr/local/lib/libfuse3.so.3 -#usr/local/lib/libfuse3.so.3.10.1 -#usr/local/lib/pkgconfig -#usr/local/lib/pkgconfig/fuse3.pc -#usr/local/sbin/mount.fuse3 -#usr/local/share/man/man1/fusermount3.1 -#usr/local/share/man/man8/mount.fuse3.8 -#etc/fuse.conf -#usr/include/fuse3 -#usr/include/fuse3/cuse_lowlevel.h -#usr/include/fuse3/fuse.h -#usr/include/fuse3/fuse_common.h -#usr/include/fuse3/fuse_log.h -#usr/include/fuse3/fuse_lowlevel.h -#usr/include/fuse3/fuse_opt.h -#usr/lib/libfuse3.so -usr/lib/libfuse3.so.3 -usr/lib/libfuse3.so.3.10.1 -#usr/lib/pkgconfig/fuse3.pc -#usr/sbin/mount.fuse3 -#usr/share/man/man1/fusermount3.1 -#usr/share/man/man8/mount.fuse3.8 diff --git a/config/rootfiles/packages/fuse b/config/rootfiles/packages/fuse new file mode 100644 index 000000000..917520bdf --- /dev/null +++ b/config/rootfiles/packages/fuse @@ -0,0 +1,21 @@ +#etc/fuse.conf +etc/rc.d/init.d/fuse +etc/rc.d/rc0.d/K35fuse +etc/rc.d/rc3.d/S65fuse +etc/rc.d/rc6.d/K35fuse +etc/udev/rules.d/99-fuse3.rules +sbin/mount.fuse3 +usr/bin/fusermount3 +#usr/include/fuse3 +#usr/include/fuse3/cuse_lowlevel.h +#usr/include/fuse3/fuse.h +#usr/include/fuse3/fuse_common.h +#usr/include/fuse3/fuse_log.h +#usr/include/fuse3/fuse_lowlevel.h +#usr/include/fuse3/fuse_opt.h +#usr/lib/libfuse3.so +usr/lib/libfuse3.so.3 +usr/lib/libfuse3.so.3.10.1 +#usr/lib/pkgconfig/fuse3.pc +#usr/share/man/man1/fusermount3.1 +#usr/share/man/man8/mount.fuse3.8 diff --git a/lfs/fuse b/lfs/fuse index 167612f68..c976bb4cd 100644 --- a/lfs/fuse +++ b/lfs/fuse @@ -31,6 +31,10 @@ DL_FILE = $(THISAPP).tar.xz DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) +PROG = fuse +PAK_VER = 1
+DEPS =
############################################################################### # Top-level Rules @@ -73,13 +77,28 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && meson --prefix=/usr builddir && cd builddir && ninja && ninja install + cd $(DIR_APP) && meson --prefix=/usr builddir/ + cd $(DIR_APP) && ninja -C builddir/ + cd $(DIR_APP) && ninja -C builddir/ install
- # Move mount.fuse3 to same location as mount.fuse was in previous version + # Move mount.fuse3 to same location as mount.fuse was previously mv -v /usr/sbin/mount.fuse3 /sbin
- # Move 99-fuse3 rules to same udev location as in previous version of fuse + # Move 99-fuse3 rules to same udev location as previously mv -v /lib/udev/rules.d/99-fuse3.rules /etc/udev/rules.d
+ # Remove initscript installed from source code as it loads the module but + # also defines and sets up the mount points that will be used by fuse. + rm /etc/init.d/fuse3
+ # Module loading extracted from source code initscript and made into an IPFire initscript + #install initscripts + $(call INSTALL_INITSCRIPT,fuse)
+ # create startlinks + ln -sf ../init.d/fuse /etc/rc.d/rc0.d/K35fuse + ln -sf ../init.d/fuse /etc/rc.d/rc3.d/S65fuse + ln -sf ../init.d/fuse /etc/rc.d/rc6.d/K35fuse
@rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/src/initscripts/packages/fuse b/src/initscripts/packages/fuse new file mode 100644 index 000000000..7127e1f87 --- /dev/null +++ b/src/initscripts/packages/fuse @@ -0,0 +1,70 @@ +#!/bin/sh +######################################################################## +# Begin $rc_base/init.d/fuse +# +# Description : Load and unload the fuse3 module +# +# Authors : Adolf Belka +# +# Version : 01.00 +# +# Notes : +# +########################################################################
+. /etc/sysconfig/rc +. ${rc_functions}
+case "${1}" in + start) + boot_mesg "Loading fuse module." + if ! grep -qw fuse /proc/filesystems; then + echo -n "Loading fuse module" + if ! modprobe fuse >/dev/null 2>&1; then + echo " failed!" + exit 1 + else + echo "." + fi + else + echo "fuse filesystem already available." + fi + ;;
+ stop) + boot_mesg "Unloading fuse module." + if grep -qw "^fuse" /proc/modules; then + echo -n "Unloading fuse module" + if ! rmmod fuse >/dev/null 2>&1; then + echo " failed!" + else + echo "." + fi + else + echo "fuse module not loaded." + fi + ;;
+ restart) + ${0} stop + sleep 1 + ${0} start + ;;
+ status) + echo -n "Checking if fuse module loaded." + if ! grep -qw fuse /proc/filesystems; then + echo " fuse module not loaded." + exit 3 + else + echo " ok." + fi + ;;
+ *) + echo "Usage: ${0} {start|stop|restart|status}" + exit 1 + ;; +esac
+# End $rc_base/init.d/fuse diff --git a/src/paks/fuse/install.sh b/src/paks/fuse/install.sh new file mode 100644 index 000000000..e6a5af92b --- /dev/null +++ b/src/paks/fuse/install.sh @@ -0,0 +1,27 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_files
+start_service --background ${NAME} diff --git a/src/paks/fuse/uninstall.sh b/src/paks/fuse/uninstall.sh new file mode 100644 index 000000000..dc37ea5b1 --- /dev/null +++ b/src/paks/fuse/uninstall.sh @@ -0,0 +1,27 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +stop_service ${NAME}
+remove_files diff --git a/src/paks/fuse/update.sh b/src/paks/fuse/update.sh new file mode 100644 index 000000000..99776659c --- /dev/null +++ b/src/paks/fuse/update.sh @@ -0,0 +1,27 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007-2020 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_backup_includes +./uninstall.sh +./install.sh