Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Apr 2014 18:48:52 +0000 (UTC)
From:      Alex Kozlov <ak@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r351236 - in head/sysutils/fusefs-afuse: . files
Message-ID:  <201404131848.s3DImqtZ083131@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ak
Date: Sun Apr 13 18:48:51 2014
New Revision: 351236
URL: http://svnweb.freebsd.org/changeset/ports/351236
QAT: https://qat.redports.org/buildarchive/r351236/

Log:
  - Update to 0.4.1
  - Support STAGEDIR
  - Take maintainership

Modified:
  head/sysutils/fusefs-afuse/Makefile
  head/sysutils/fusefs-afuse/distinfo
  head/sysutils/fusefs-afuse/files/patch-src_afuse.c
  head/sysutils/fusefs-afuse/pkg-descr

Modified: head/sysutils/fusefs-afuse/Makefile
==============================================================================
--- head/sysutils/fusefs-afuse/Makefile	Sun Apr 13 18:10:50 2014	(r351235)
+++ head/sysutils/fusefs-afuse/Makefile	Sun Apr 13 18:48:51 2014	(r351236)
@@ -2,12 +2,12 @@
 # $FreeBSD$
 
 PORTNAME=	afuse
-PORTVERSION=	0.2
+PORTVERSION=	0.4.1
 CATEGORIES=	sysutils
-MASTER_SITES=	SF
+MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
 PKGNAMEPREFIX=	fusefs-
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	ak@FreeBSD.org
 COMMENT=	File system automounting implemented in user-space using FUSE
 
 LICENSE=	GPLv2
@@ -15,21 +15,16 @@ LICENSE=	GPLv2
 USES=		fuse pkgconfig
 GNU_CONFIGURE=	yes
 
+SUB_FILES=	pkg-message
+
 PORTDOCS=	AUTHORS ChangeLog README
-PLIST_FILES=	bin/${PORTNAME}
-MAN1=		afuse.1
-OPTIONS_DEFINE=	DOCS
+PLIST_FILES=	bin/${PORTNAME} man/man1/afuse.1.gz
 
-NO_STAGE=	yes
-.include <bsd.port.options.mk>
+OPTIONS_DEFINE=	DOCS
 
 post-install:
-	${INSTALL_MAN} ${WRKSRC}/${MAN1} ${MAN1PREFIX}/man/man1
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}
-	@${CAT} ${PKGMESSAGE}
-SUB_FILES=	pkg-message
-.endif
+	${INSTALL_MAN} ${WRKSRC}/afuse.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>

Modified: head/sysutils/fusefs-afuse/distinfo
==============================================================================
--- head/sysutils/fusefs-afuse/distinfo	Sun Apr 13 18:10:50 2014	(r351235)
+++ head/sysutils/fusefs-afuse/distinfo	Sun Apr 13 18:48:51 2014	(r351236)
@@ -1,2 +1,2 @@
-SHA256 (afuse-0.2.tar.gz) = 92faa853bfeaa1446b80edbc6bb29a29f8dcf07149958be5eafc2da0679342d2
-SIZE (afuse-0.2.tar.gz) = 100568
+SHA256 (afuse-0.4.1.tar.gz) = c6e0555a65d42d3782e0734198bbebd22486386e29cb00047bc43c3eb726dca8
+SIZE (afuse-0.4.1.tar.gz) = 121957

Modified: head/sysutils/fusefs-afuse/files/patch-src_afuse.c
==============================================================================
--- head/sysutils/fusefs-afuse/files/patch-src_afuse.c	Sun Apr 13 18:10:50 2014	(r351235)
+++ head/sysutils/fusefs-afuse/files/patch-src_afuse.c	Sun Apr 13 18:48:51 2014	(r351236)
@@ -1,229 +1,10 @@
---- src/afuse.c.orig	2009-03-03 13:17:22.000000000 +0900
-+++ src/afuse.c	2009-03-03 13:17:27.000000000 +0900
-@@ -36,7 +36,6 @@
+Index: src/afuse.c
+@@ -29,7 +29,7 @@
  #include <string.h>
  #include <stddef.h>
  #include <unistd.h>
 -#include <alloca.h>
++//#include <alloca.h>
  #include <fcntl.h>
  #include <dirent.h>
  #include <errno.h>
-@@ -280,14 +280,19 @@
- }
- 
- 
--// !!FIXME!! allow escaping of %'s
- // Note: this method strips out quotes and applies them itself as should be appropriate
--char *expand_template(const char *template, const char *mount_point, const char *root_name)
-+bool run_template(const char *template, const char *mount_point, const char *root_name)
- {
- 	int len = 0;
-+	int nargs = 1;
- 	int i;
--	char *expanded_name;
--	char *expanded_name_start;
-+	char *buf;
-+	char *p;
-+	char **args;
-+	char **arg;
-+	bool quote = false;
-+	pid_t pid;
-+	int status;
- 
- 	// calculate length
- 	for(i = 0; template[i]; i++)
-@@ -295,53 +300,100 @@
- 			switch(template[i + 1])
- 			{
- 				case 'm':
--					len += strlen(mount_point) + 2;
-+					len += strlen(mount_point);
- 					i++;
- 					break;
- 				case 'r':
--					len += strlen(root_name) + 2;
-+					len += strlen(root_name);
-+					i++;
-+					break;
-+				case '%':
-+					len++;
- 					i++;
- 					break;
- 			}
--		} else if(template[i] != '"')
-+		} else if(template[i] == ' ' && !quote) {
-+			len++;
-+			nargs++;
-+		} else if(template[i] == '"')
-+			quote = !quote;
-+		else if(template[i] == '\\' && template[i + 1])
-+			len++, i++;
-+		else
- 			len++;
- 
--	expanded_name_start = expanded_name = my_malloc(len + 1);
-+	buf = my_malloc(len + 1);
-+	args = my_malloc((nargs + 1) * sizeof(*args));
-+
-+	p = buf;
-+	arg = args;
-+	*arg++ = p;
- 
- 	for(i = 0; template[i]; i++)
- 		if(template[i] == '%') {
--			int j = 0;
- 			switch(template[i + 1])
- 			{
- 				case 'm':
--					*expanded_name++ = '"';
--					while(mount_point[j])
--						*expanded_name++ = mount_point[j++];
--					*expanded_name++ = '"';
-+					strcpy(p, mount_point);
-+					p += strlen(mount_point);
- 					i++;
- 					break;
- 				case 'r':
--					*expanded_name++ = '"';
--					while(root_name[j])
--						*expanded_name++ = root_name[j++];
--					*expanded_name++ = '"';
-+					strcpy(p, root_name);
-+					p += strlen(root_name);
-+					i++;
-+					break;
-+				case '%':
-+					*p++ = '%';
- 					i++;
- 					break;
- 			}
--		} else if(template[i] != '"')
--			*expanded_name++ = template[i];
--
--	*expanded_name = '\0';
--
--	return expanded_name_start;
-+		} else if(template[i] == ' ' && !quote) {
-+			*p++ = '\0';
-+			*arg++ = p;
-+		} else if(template[i] == '"')
-+			quote = !quote;
-+		else if(template[i] == '\\' && template[i + 1])
-+			*p++ = template[++i];
-+		else
-+			*p++ = template[i];
-+
-+	*p = '\0';
-+	*arg = NULL;
-+
-+	pid = fork();
-+	if(pid == -1) {
-+		fprintf(stderr, "Failed to fork (%s)\n", strerror(errno));
-+		free(args);
-+		free(buf);
-+		return false;
-+	}
-+	if(pid == 0) {
-+		execvp(args[0], args);
-+		abort();
-+	}
-+	pid = waitpid(pid, &status, 0);
-+	if(pid == -1) {
-+		fprintf(stderr, "Failed to waitpid (%s)\n", strerror(errno));
-+		free(args);
-+		free(buf);
-+		return false;
-+	}
-+	if(!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
-+		fprintf(stderr, "Failed to invoke command: %s\n", args[0]);
-+		free(args);
-+		free(buf);
-+		return false;
-+	}
-+	free(args);
-+	free(buf);
-+	return true;
- }
- 
- mount_list_t *do_mount(const char *root_name)
- {
- 	char *mount_point;
--	char *mount_command;
- 	mount_list_t *mount;
--	int sysret;
- 
- 	fprintf(stderr, "Mounting: %s\n", root_name);
- 
-@@ -351,57 +403,33 @@
- 		return NULL;
- 	}
- 
--	mount_command = expand_template(user_options.mount_command_template,
--	                                mount_point, root_name);
--	sysret = system(mount_command);
--
--	fprintf(stderr, "sysret: %.8x\n", sysret);
--
--	if(sysret) {
--		fprintf(stderr, "Failed to invoke mount command: '%s' (%s)\n",
--			mount_command, sysret != -1 ?
--				"Error executing mount" :
--				strerror(errno));
--
-+	if(!run_template(user_options.mount_command_template,
-+			 mount_point, root_name)) {
- 		// remove the now unused directory
- 		if( rmdir(mount_point) == -1 )
- 			fprintf(stderr, "Failed to remove mount point dir: %s (%s)",
- 				mount_point, strerror(errno));
- 
--		free(mount_command);
- 		free(mount_point);
- 		return NULL;
- 	}
- 
- 	mount = add_mount(root_name, mount_point);
--
--	free(mount_command);
- 	return mount;
- }
- 
- int do_umount(mount_list_t *mount)
- {
--	char *unmount_command;
--	int sysret;
--
- 	fprintf(stderr, "Unmounting: %s\n", mount->root_name);
- 
--	unmount_command = expand_template(user_options.unmount_command_template,
--	                                  mount->mount_point, mount->root_name);
--	sysret = system(unmount_command);
--	if(sysret) {
--		fprintf(stderr, "Failed to invoke unmount command: '%s' (%s)\n",
--		        unmount_command, sysret != -1 ?
--			               "Error executing mount" :
--				       strerror(errno));
--		/* Still unmount anyway */
--	}
-+	run_template(user_options.unmount_command_template,
-+		     mount->mount_point, mount->root_name);
-+	/* Still unmount anyway */
- 
- 	if( rmdir(mount->mount_point) == -1 )
- 		fprintf(stderr, "Failed to remove mount point dir: %s (%s)",
- 				mount->mount_point, strerror(errno));
- 	remove_mount(mount);
--	free(unmount_command);
- 	return 1;
- }
- 
-@@ -1504,7 +1504,8 @@
- 	fuse_opt_add_arg(&args, "-s");
- 
- 	// Adjust user specified timeout from seconds to microseconds as required
--	user_options.auto_unmount_delay *= 1000000;
-+	if(user_options.auto_unmount_delay != UINT64_MAX)
-+	    user_options.auto_unmount_delay *= 1000000;
- 
- 	auto_unmount_ph_init(&auto_unmount_ph);
- 

Modified: head/sysutils/fusefs-afuse/pkg-descr
==============================================================================
--- head/sysutils/fusefs-afuse/pkg-descr	Sun Apr 13 18:10:50 2014	(r351235)
+++ head/sysutils/fusefs-afuse/pkg-descr	Sun Apr 13 18:48:51 2014	(r351236)
@@ -4,7 +4,7 @@ be expected by an automounter; that is i
 directories. If one of these virtual directories is accessed and is not
 already automounted, afuse will attempt to mount a filesystem onto that
 directory. If the mount succeeds the requested access proceeds as normal,
-otherwise it will fail with an error. 
+otherwise it will fail with an error.
 
 The advantage of using afuse over traditional automounters is that afuse
 is designed to run entirely in user-space by individual users. This way an



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