Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Oct 2007 21:18:00 -0300
From:      "Alejandro Pulver" <alepulver@FreeBSD.org>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/117516: [PATCH] sysutils/fusefs-kmod: allow using fuse filesystems in /etc/fstab
Message-ID:  <1193357880.21148@deimos.mars.bsd>
Resent-Message-ID: <200710260050.l9Q0o0bu081920@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         117516
>Category:       ports
>Synopsis:       [PATCH] sysutils/fusefs-kmod: allow using fuse filesystems in /etc/fstab
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 26 00:50:00 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Alejandro Pulver
>Release:        FreeBSD 6.2-RELEASE i386
>Organization:
>Environment:


System: FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007
    root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP



>Description:


- Bump PORTREVISION.
- Create pkg-message from SUB_FILES instead of using ${SED} to print.
- Add a note in pkg-message and clean up.
- Create a symlink of ${PREFIX}/sbin/mount_fusefs to /usr/sbin to allow mounting from /etc/fstab.
- Add "BEFORE: mountlate" to rc.d script.

This has been verified to work with sysutils/fusefs-ntfs (see changes to pkg-message in last commit).


>How-To-Repeat:





>Fix:


--- fusefs-kmod.diff begins here ---
Index: fusefs-kmod/Makefile
===================================================================
RCS file: /home/pcvs/ports/sysutils/fusefs-kmod/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- fusefs-kmod/Makefile	3 Oct 2007 05:05:22 -0000	1.14
+++ fusefs-kmod/Makefile	25 Oct 2007 23:33:00 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	fusefs
 DISTVERSION=	0.3.9-pre1
+PORTREVISION=	1
 CATEGORIES=	sysutils kld
 MASTER_SITES=	http://fuse4bsd.creo.hu/downloads/ \
 		http://am-productions.biz/docs/
@@ -65,6 +66,10 @@
 IGNORE=		requires the userland sources to be installed. Set SRC_BASE if it is not in /usr/src
 .endif
 
+.if !defined(WITH_AUTOSETUP)
+SUB_FILES=	pkg-message
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's/deplate.rb/deplate/g' \
 		${WRKSRC}/doc/Makefile
@@ -81,15 +86,14 @@
 	@${MKDIR} ${KMODDIR}
 
 post-install:
-.if (defined(WITH_AUTOSETUP) && !defined(BATCH) && !defined(PACKAGE_BUILDING)) \
-	|| (defined(WITH_AUTOSETUP) && defined(BATCH) && !defined(PACKAGE_BUILDING))
+	@${LN} -s ${PREFIX}/sbin/mount_fusefs /usr/sbin
+.if defined(WITH_AUTOSETUP) && !defined(PACKAGE_BUILDING)
 	@${SED} -e 's|@@PREFIX@@|${PREFIX}|g' \
 		${FILESDIR}/${SETUP} > ${WRKDIR}/${SETUP}
 	@${ECHO} "Modifying global startup config files and loading module...";
 	${SH} ${WRKDIR}/${SETUP}
 .else
-	@${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \
-		-e "s|%%MODULE_PATH%%|${MODULE_PATH}|g" ${PKGMESSAGE}
+	@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
 .endif
 
 .if !defined(NOPORTDOCS)
Index: fusefs-kmod/pkg-message
===================================================================
RCS file: fusefs-kmod/pkg-message
diff -N fusefs-kmod/pkg-message
--- fusefs-kmod/pkg-message	15 Feb 2007 09:31:27 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
-In order to automatically load the fuse module on startup, you need to
-set the following settings:
-
- - Add fusefs_enable="YES" to your /etc/rc.conf
-
-%%PREFIX%%/etc/rc.d/fusefs start will load the module for the first time
-after the installation.  Set "sysctl vfs.usermount=1" if you want to be able
-to mount fuse devices as an ordinary user.
Index: fusefs-kmod/pkg-plist
===================================================================
RCS file: /home/pcvs/ports/sysutils/fusefs-kmod/pkg-plist,v
retrieving revision 1.5
diff -u -r1.5 pkg-plist
--- fusefs-kmod/pkg-plist	13 Aug 2007 10:48:41 -0000	1.5
+++ fusefs-kmod/pkg-plist	25 Oct 2007 23:33:00 -0000
@@ -21,3 +21,5 @@
 %%PORTDOCS%%@dirrm %%DOCSDIR%%/kmod/html
 %%PORTDOCS%%@dirrm %%DOCSDIR%%/kmod
 @dirrmtry %%DOCSDIR%%
+@cwd /usr
+sbin/mount_fusefs
Index: fusefs-kmod/files/fusefs.in
===================================================================
RCS file: /home/pcvs/ports/sysutils/fusefs-kmod/files/fusefs.in,v
retrieving revision 1.3
diff -u -r1.3 fusefs.in
--- fusefs-kmod/files/fusefs.in	15 Feb 2007 09:31:28 -0000	1.3
+++ fusefs-kmod/files/fusefs.in	25 Oct 2007 23:33:00 -0000
@@ -4,6 +4,7 @@
 #
 # PROVIDE: fusefs
 # REQUIRE: sysctl
+# BEFORE: mountlate
 # KEYWORD: shutdown
 #
 # Add the following lines to /etc/rc.conf.local or /etc/rc.conf
Index: fusefs-kmod/files/pkg-message.in
===================================================================
RCS file: fusefs-kmod/files/pkg-message.in
diff -N fusefs-kmod/files/pkg-message.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ fusefs-kmod/files/pkg-message.in	25 Oct 2007 23:33:00 -0000
@@ -0,0 +1,15 @@
+==============================================================================
+
+In order to automatically load the fuse module on startup, you need to:
+
+ - Add fusefs_enable="YES" to your /etc/rc.conf.
+ - Run "%%PREFIX%%/etc/rc.d/fusefs start" (for the first time).
+
+Set "sysctl vfs.usermount=1" if you want to be able to mount fuse devices as
+an ordinary user.
+
+Now fuse filesystems (sysutils/fusefs-*) can be mounted at startup from
+/etc/fstab with the "late" parameter. This requires a symlink in /usr/sbin
+named "mount_<fstype>", which is not created by all the fusefs ports.
+
+==============================================================================
--- fusefs-kmod.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1193357880.21148>