[Midnightbsd-cvs] mports [21010] trunk/sysutils/fusefs-unionfs: unionfs 1.0 for fuse

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Feb 5 14:21:30 EST 2016


Revision: 21010
          http://svnweb.midnightbsd.org/mports/?rev=21010
Author:   laffer1
Date:     2016-02-05 14:21:30 -0500 (Fri, 05 Feb 2016)
Log Message:
-----------
unionfs 1.0 for fuse

Modified Paths:
--------------
    trunk/sysutils/fusefs-unionfs/Makefile
    trunk/sysutils/fusefs-unionfs/distinfo
    trunk/sysutils/fusefs-unionfs/pkg-descr

Added Paths:
-----------
    trunk/sysutils/fusefs-unionfs/files/patch-CMakeLists.txt
    trunk/sysutils/fusefs-unionfs/files/patch-src__unionfs.c
    trunk/sysutils/fusefs-unionfs/files/patch-src__usyslog.c
    trunk/sysutils/fusefs-unionfs/files/pkg-message.in

Removed Paths:
-------------
    trunk/sysutils/fusefs-unionfs/files/patch-unionfs.c

Modified: trunk/sysutils/fusefs-unionfs/Makefile
===================================================================
--- trunk/sysutils/fusefs-unionfs/Makefile	2016-02-05 19:18:54 UTC (rev 21009)
+++ trunk/sysutils/fusefs-unionfs/Makefile	2016-02-05 19:21:30 UTC (rev 21010)
@@ -1,30 +1,35 @@
 # $MidnightBSD$
 
 PORTNAME=	unionfs
-PORTVERSION=	0.20
+PORTVERSION=	1.0
+DISTVERSIONPREFIX=	v
 CATEGORIES=	sysutils
-MASTER_SITES=	http://podgorny.cz/unionfs-fuse/releases/
 PKGNAMEPREFIX=	fusefs-
-DISTNAME=	unionfs-fuse-${PORTVERSION}
 
 MAINTAINER=	ports at MidnightBSD.org
 COMMENT=	FUSE based implementation of the well-known unionfs
+
 LICENSE=	gpl2
 
-RUN_DEPENDS=	${LOCALBASE}/modules/fuse.ko:${PORTSDIR}/sysutils/fusefs-kmod
-BUILD_DEPENDS=	${LOCALBASE}/include/fuse.h:${PORTSDIR}/sysutils/fusefs-libs
+LICENSE=	bsd3
+LICENSE_FILE=	${WRKSRC}/LICENSE
 
-PLIST_FILES=	bin/unionfs
+USE_GITHUB=	yes
+GH_ACCOUNT=	rpodgorny
+GH_PROJECT=	unionfs-fuse
 
-USE_BZIP2=	yes
+SUB_FILES=	pkg-message
 
-do-build:
-	(cd ${WRKSRC} && \
-	 ${CC} ${CFLAGS} -I${LOCALBASE}/include/fuse \
-	 -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -U_POSIX_SYNCHRONIZED_IO \
-	 -o unionfs *.c -L${LOCALBASE}/lib ${PTHREAD_LIBS} -lfuse -lm)
+PLIST_FILES=	bin/unionfs \
+		bin/unionfsctl \
+		man/man8/unionfs.8.gz
 
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/unionfs ${TARGETDIR}/bin
+USES=		fuse cmake localbase
 
+post-patch:
+	@${REINPLACE_CMD} "s,share/man,man,g" ${WRKSRC}/man/CMakeLists.txt
+
+post-install:
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
+
 .include <bsd.port.mk>

Modified: trunk/sysutils/fusefs-unionfs/distinfo
===================================================================
--- trunk/sysutils/fusefs-unionfs/distinfo	2016-02-05 19:18:54 UTC (rev 21009)
+++ trunk/sysutils/fusefs-unionfs/distinfo	2016-02-05 19:21:30 UTC (rev 21010)
@@ -1,4 +1,2 @@
-MD5 (unionfs-fuse-0.20.tar.bz2) = 5d4e1371b2e5ed1bf00eeed5a83ee078
-SHA256 (unionfs-fuse-0.20.tar.bz2) = c1963796132cb1b45571ff50aacbf4613ed1c02332127e3e26c4b2571e7f43a7
-RMD160 (unionfs-fuse-0.20.tar.bz2) = c81f681d9df61a1acf1cae2b4b4e511d41d4a786
-SIZE (unionfs-fuse-0.20.tar.bz2) = 22907
+SHA256 (unionfs-v1.0_GH0.tar.gz) = 2ee80bd0634a61adb2159212e155d607a0a82ad659214ae6edb3530396cccc09
+SIZE (unionfs-v1.0_GH0.tar.gz) = 48149

Added: trunk/sysutils/fusefs-unionfs/files/patch-CMakeLists.txt
===================================================================
--- trunk/sysutils/fusefs-unionfs/files/patch-CMakeLists.txt	                        (rev 0)
+++ trunk/sysutils/fusefs-unionfs/files/patch-CMakeLists.txt	2016-02-05 19:21:30 UTC (rev 21010)
@@ -0,0 +1,15 @@
+--- CMakeLists.txt.orig	2015-01-14 10:08:20 UTC
++++ CMakeLists.txt
+@@ -9,12 +9,6 @@ IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT
+ 	SET(CMAKE_BUILD_TYPE RelWithDebInfo)
+ ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
+ 
+-# Select flags.
+-SET(CMAKE_C_FLAGS "-pipe -W -Wall -DFORTIFY_SOURCE=2")
+-SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
+-SET(CMAKE_C_FLAGS_RELEASE "-O2")
+-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -DDEBUG")
+-
+ if (UNIX AND APPLE)
+   include_directories("/usr/local/include/osxfuse/fuse")
+ endif()


Property changes on: trunk/sysutils/fusefs-unionfs/files/patch-CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/sysutils/fusefs-unionfs/files/patch-src__unionfs.c
===================================================================
--- trunk/sysutils/fusefs-unionfs/files/patch-src__unionfs.c	                        (rev 0)
+++ trunk/sysutils/fusefs-unionfs/files/patch-src__unionfs.c	2016-02-05 19:21:30 UTC (rev 21010)
@@ -0,0 +1,51 @@
+--- src/unionfs.c.orig	2015-01-14 10:08:20 UTC
++++ src/unionfs.c
+@@ -65,6 +65,13 @@
+ #include "conf.h"
+ #include "uioctl.h"
+ 
++// Patch pushed upstream: 
++// https://github.com/rpodgorny/unionfs-fuse/pull/40
++// Remove this as soon as pushed into a release.
++#ifdef IOCPARM_LEN
++#define _IOC_SIZE(nr) IOCPARM_LEN(nr)
++#endif
++
+ static struct fuse_opt unionfs_opts[] = {
+ 	FUSE_OPT_KEY("chroot=%s,", KEY_CHROOT),
+ 	FUSE_OPT_KEY("cow", KEY_COW),
+@@ -92,7 +99,12 @@ static int unionfs_chmod(const char *pat
+ 	char p[PATHLEN_MAX];
+ 	if (BUILD_PATH(p, uopt.branches[i].path, path)) RETURN(-ENAMETOOLONG);
+ 
++// Unsure of origin. Patch needs review.
++#if defined(__FreeBSD__) || defined(__MidnightBSD__)
++	int res = lchmod(p, mode);
++#else
+ 	int res = chmod(p, mode);
++#endif
+ 	if (res == -1) RETURN(-errno);
+ 
+ 	RETURN(0);
+@@ -671,6 +683,9 @@ static int unionfs_truncate(const char *
+ 	RETURN(0);
+ }
+ 
++// Patch pushed upstream: 
++// https://github.com/rpodgorny/unionfs-fuse/pull/39
++// Remove this as soon as pushed into a release.
+ static int unionfs_utimens(const char *path, const struct timespec ts[2]) {
+ 	DBG("%s\n", path);
+ 
+@@ -685,9 +700,9 @@ static int unionfs_utimens(const char *p
+ #else
+ 	struct timeval tv[2];
+ 	tv[0].tv_sec = ts[0].tv_sec;
+-	tv[0].tv_usec = ts[0].tv_nsec * 1000;
++	tv[0].tv_usec = ts[0].tv_nsec / 1000;
+ 	tv[1].tv_sec = ts[1].tv_sec;
+-	tv[1].tv_usec = ts[1].tv_nsec * 1000;
++	tv[1].tv_usec = ts[1].tv_nsec / 1000;
+ 	int res = utimes(p, tv);
+ #endif
+ 


Property changes on: trunk/sysutils/fusefs-unionfs/files/patch-src__unionfs.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/sysutils/fusefs-unionfs/files/patch-src__usyslog.c
===================================================================
--- trunk/sysutils/fusefs-unionfs/files/patch-src__usyslog.c	                        (rev 0)
+++ trunk/sysutils/fusefs-unionfs/files/patch-src__usyslog.c	2016-02-05 19:21:30 UTC (rev 21010)
@@ -0,0 +1,11 @@
+--- src/usyslog.c.orig	2015-01-14 10:08:20 UTC
++++ src/usyslog.c
+@@ -23,7 +23,7 @@
+ 
+ #if __APPLE__
+ #include <malloc/malloc.h>
+-#else
++#elif !defined(__FreeBSD__) && !defined(__MidnightBSD__)
+ #include <malloc.h>
+ #endif
+ 


Property changes on: trunk/sysutils/fusefs-unionfs/files/patch-src__usyslog.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Deleted: trunk/sysutils/fusefs-unionfs/files/patch-unionfs.c
===================================================================
--- trunk/sysutils/fusefs-unionfs/files/patch-unionfs.c	2016-02-05 19:18:54 UTC (rev 21009)
+++ trunk/sysutils/fusefs-unionfs/files/patch-unionfs.c	2016-02-05 19:21:30 UTC (rev 21010)
@@ -1,14 +0,0 @@
---- unionfs.c.orig	Tue Mar  6 10:40:41 2007
-+++ unionfs.c	Tue Mar  6 10:46:09 2007
-@@ -192,11 +192,7 @@
- 
- 	int res;
- 	if (isdatasync) {
--#ifdef _POSIX_SYNCHRONIZED_IO
--		res = fdatasync(fi->fh);
--#else
- 		res = fsync(fi->fh);
--#endif
- 	} else {
- 		res = fsync(fi->fh);
- 	}

Added: trunk/sysutils/fusefs-unionfs/files/pkg-message.in
===================================================================
--- trunk/sysutils/fusefs-unionfs/files/pkg-message.in	                        (rev 0)
+++ trunk/sysutils/fusefs-unionfs/files/pkg-message.in	2016-02-05 19:21:30 UTC (rev 21010)
@@ -0,0 +1,14 @@
+You will need to load the kernel module 'fuse' to use this package. To load
+this at boot time, add the following line to /boot/loader.conf:
+
+fuse_load="YES"
+
+If you want unprivileged users to be able to use unionfs, add the following
+line to /etc/sysctl.conf:
+
+vfs.usermount=1
+
+You can enable them immediately with:
+
+kldload fuse
+sysctl vfs.usermount=1


Property changes on: trunk/sysutils/fusefs-unionfs/files/pkg-message.in
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/sysutils/fusefs-unionfs/pkg-descr
===================================================================
--- trunk/sysutils/fusefs-unionfs/pkg-descr	2016-02-05 19:18:54 UTC (rev 21009)
+++ trunk/sysutils/fusefs-unionfs/pkg-descr	2016-02-05 19:21:30 UTC (rev 21010)
@@ -1,6 +1,4 @@
-This is my effort to create a unionfs filesystem implementation which
-is probably slower but way more flexible than the current in-kernel
-unionfs solution. Currently it's almost fully usable, the only problem
-is new file/directory creation which I will fix soon...
+This is an effort to create a unionfs filesystem implementation which is way
+more flexible than the current in-kernel unionfs solution.
 
-WWW:	http://podgorny.cz/moin/UnionFsFuse
+WWW: https://github.com/rpodgorny/unionfs-fuse



More information about the Midnightbsd-cvs mailing list