From alepulver@FreeBSD.org  Fri Oct 26 00:44:23 2007
Return-Path: <alepulver@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9062116A419
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 26 Oct 2007 00:44:23 +0000 (UTC)
	(envelope-from alepulver@FreeBSD.org)
Received: from relay03.pair.com (relay03.pair.com [209.68.5.17])
	by mx1.freebsd.org (Postfix) with SMTP id 452F613C494
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 26 Oct 2007 00:44:23 +0000 (UTC)
	(envelope-from alepulver@FreeBSD.org)
Received: (qmail 97262 invoked from network); 26 Oct 2007 00:17:42 -0000
Received: from unknown (HELO deimos.mars.bsd) (unknown)
  by unknown with SMTP; 26 Oct 2007 00:17:42 -0000
Message-Id: <1193357880.21148@deimos.mars.bsd>
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: [PATCH] sysutils/fusefs-kmod: allow using fuse filesystems in /etc/fstab
X-Send-Pr-Version: gtk-send-pr 0.4.8 
X-GNATS-Notify: amistry@am-productions.biz

>Number:         117516
>Category:       ports
>Synopsis:       [PATCH] sysutils/fusefs-kmod: allow using fuse filesystems in /etc/fstab
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    alepulver
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 26 00:50:00 UTC 2007
>Closed-Date:    Tue Oct 30 03:10:43 UTC 2007
>Last-Modified:  Tue Oct 30 12:00:02 UTC 2007
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->alepulver 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Oct 26 00:50:09 UTC 2007 
Responsible-Changed-Why:  
Submitter has GNATS access (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117516 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Oct 26 00:50:12 UTC 2007 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117516 

From: Anish Mistry <amistry@am-productions.biz>
To: bug-followup@freebsd.org, alepulver@freebsd.org
Cc:  
Subject: Re: ports/117516: [PATCH] sysutils/fusefs-kmod: allow using fuse filesystems in /etc/fstab
Date: Thu, 25 Oct 2007 23:40:06 -0400

 --nextPart3930067.spg5dJMyhk
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 
 Looks fine.
 =2D-=20
 Anish Mistry
 amistry@am-productions.biz
 AM Productions http://am-productions.biz/
 
 --nextPart3930067.spg5dJMyhk
 Content-Type: application/pgp-signature; name=signature.asc 
 Content-Description: This is a digitally signed message part.
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.4 (FreeBSD)
 
 iD8DBQBHIWGfxqA5ziudZT0RAiA+AKC2K6tdwWjG5N7wiEeP11OGWNXaWQCfcIyv
 Mk8dYWzQ4rKQzf0PJAom1YU=
 =IRxr
 -----END PGP SIGNATURE-----
 
 --nextPart3930067.spg5dJMyhk--
State-Changed-From-To: feedback->closed 
State-Changed-By: alepulver 
State-Changed-When: Tue Oct 30 03:10:42 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117516 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/117516: commit references a PR
Date: Tue, 30 Oct 2007 11:59:57 +0000 (UTC)

 alepulver    2007-10-30 03:10:09 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/fusefs-kmod Makefile pkg-plist 
     sysutils/fusefs-kmod/files fusefs.in 
   Added files:
     sysutils/fusefs-kmod/files pkg-message.in 
   Removed files:
     sysutils/fusefs-kmod pkg-message 
   Log:
   - 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).
   
   PR:             ports/117516
   Submitted by:   alepulver (myself)
   Approved by:    Anish Mistry <amistry@am-productions.biz> (maintainer)
   
   Revision  Changes    Path
   1.15      +8 -4      ports/sysutils/fusefs-kmod/Makefile
   1.4       +2 -1      ports/sysutils/fusefs-kmod/files/fusefs.in
   1.1       +15 -0     ports/sysutils/fusefs-kmod/files/pkg-message.in (new)
   1.6       +0 -8      ports/sysutils/fusefs-kmod/pkg-message (dead)
   1.6       +2 -0      ports/sysutils/fusefs-kmod/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
