View | Details | Raw Unified | Return to bug 205617 | Differences between
and this patch

Collapse All | Expand All

(-)b/sysutils/fusefs-unionfs/Makefile (-11 / +14 lines)
Lines 2-32 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	unionfs
4
PORTNAME=	unionfs
5
PORTVERSION=	0.26
5
PORTVERSION=	1.0
6
PORTREVISION=	1
6
DISTVERSIONPREFIX=	v
7
CATEGORIES=	sysutils
7
CATEGORIES=	sysutils
8
MASTER_SITES=	http://podgorny.cz/unionfs-fuse/releases/
9
PKGNAMEPREFIX=	fusefs-
8
PKGNAMEPREFIX=	fusefs-
10
DISTNAME=	unionfs-fuse-${PORTVERSION}
11
9
12
MAINTAINER=	ports@FreeBSD.org
10
MAINTAINER=	brendan+freebsd@bbqsrc.net
13
COMMENT=	FUSE based implementation of the well-known unionfs
11
COMMENT=	FUSE based implementation of the well-known unionfs
14
12
15
LICENSE=	BSD3CLAUSE
13
LICENSE=	BSD3CLAUSE
16
LICENSE_FILE=	${WRKSRC}/LICENSE
14
LICENSE_FILE=	${WRKSRC}/LICENSE
17
15
18
PLIST_FILES=	bin/unionfs \
16
USE_GITHUB=	yes
19
		man/man8/unionfs-fuse.8.gz
17
GH_ACCOUNT=	rpodgorny
18
GH_PROJECT=	unionfs-fuse
20
19
21
USES=		fuse cmake tar:xz
20
PLIST_FILES=	bin/unionfs \
21
		bin/unionfsctl \
22
		man/man8/unionfs.8.gz
22
23
23
CFLAGS+=	-I${LOCALBASE}/include
24
USES=		python:3.2+,test fuse cmake localbase
24
LDFLAGS+=	-L${LOCALBASE}/lib
25
25
26
post-patch:
26
post-patch:
27
	@${REINPLACE_CMD} "s,share/man,man,g" ${WRKSRC}/man/CMakeLists.txt
27
	@${REINPLACE_CMD} "s,share/man,man,g" ${WRKSRC}/man/CMakeLists.txt
28
28
29
do-test:
30
	@cd ${WRKSRC} && ${PYTHON_CMD} test.py
31
29
post-install:
32
post-install:
30
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
33
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
31
34
32
.include <bsd.port.mk>
35
.include <bsd.port.mk>
(-)b/sysutils/fusefs-unionfs/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (unionfs-fuse-0.26.tar.xz) = 8d5c9dcb51ecb9a9b03890e16d17e37d602b0c1f23ed6a9ddec2b0f719c9f662
1
SHA256 (rpodgorny-unionfs-fuse-v1.0_GH0.tar.gz) = 2ee80bd0634a61adb2159212e155d607a0a82ad659214ae6edb3530396cccc09
2
SIZE (unionfs-fuse-0.26.tar.xz) = 38600
2
SIZE (rpodgorny-unionfs-fuse-v1.0_GH0.tar.gz) = 48149
(-)b/sysutils/fusefs-unionfs/files/patch-CMakeLists.txt (-6 / +6 lines)
Lines 1-6 Link Here
1
--- ./CMakeLists.txt.orig	2012-09-11 00:06:32.000000000 +0200
1
--- CMakeLists.txt.orig	2015-01-14 10:08:20 UTC
2
+++ ./CMakeLists.txt	2013-07-24 16:54:01.550064323 +0200
2
+++ CMakeLists.txt
3
@@ -9,12 +9,6 @@
3
@@ -9,12 +9,6 @@ IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT
4
 	SET(CMAKE_BUILD_TYPE RelWithDebInfo)
4
 	SET(CMAKE_BUILD_TYPE RelWithDebInfo)
5
 ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
5
 ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
6
 
6
 
Lines 10-15 Link Here
10
-SET(CMAKE_C_FLAGS_RELEASE "-O2")
10
-SET(CMAKE_C_FLAGS_RELEASE "-O2")
11
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -DDEBUG")
11
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -DDEBUG")
12
-
12
-
13
 add_definitions(-D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26)
13
 if (UNIX AND APPLE)
14
 
14
   include_directories("/usr/local/include/osxfuse/fuse")
15
 option(WITH_XATTR "Enable support for extended attributes" OFF)
15
 endif()
(-)b/sysutils/fusefs-unionfs/files/patch-src__unionfs.c (-27 / +17 lines)
Lines 1-6 Link Here
1
--- ./src/unionfs.c.orig	2012-09-11 00:06:32.000000000 +0200
1
--- src/unionfs.c.orig	2015-01-14 10:08:20 UTC
2
+++ ./src/unionfs.c	2013-07-24 16:54:01.555073796 +0200
2
+++ src/unionfs.c
3
@@ -83,7 +83,11 @@
3
@@ -92,7 +92,11 @@ static int unionfs_chmod(const char *pat
4
 	char p[PATHLEN_MAX];
4
 	char p[PATHLEN_MAX];
5
 	if (BUILD_PATH(p, uopt.branches[i].path, path)) RETURN(-ENAMETOOLONG);
5
 	if (BUILD_PATH(p, uopt.branches[i].path, path)) RETURN(-ENAMETOOLONG);
6
 
6
 
Lines 12-40 Link Here
12
 	if (res == -1) RETURN(-errno);
12
 	if (res == -1) RETURN(-errno);
13
 
13
 
14
 	RETURN(0);
14
 	RETURN(0);
15
@@ -190,7 +194,7 @@
15
@@ -287,6 +291,7 @@ static int unionfs_ioctl(const char *pat
16
 	DBG("%s\n", path);
16
 			return -EINVAL;
17
 		return 0;
18
 	}
19
+#ifndef __FreeBSD__
20
 	case UNIONFS_SET_DEBUG_FILE: {
21
 		char *debug_path = (char *) data;
17
 
22
 
18
 	if (uopt.stats_enabled && strcmp(path, STATS_FILENAME) == 0) {
23
@@ -295,6 +300,7 @@ static int unionfs_ioctl(const char *pat
19
-		memset(stbuf, 0, sizeof(stbuf));
24
 		debug_init();
20
+		memset(stbuf, 0, sizeof(*stbuf));
25
 		return 0;
21
 		stbuf->st_mode = S_IFREG | 0444;
26
 	}
22
 		stbuf->st_nlink = 1;
23
 		stbuf->st_size = STATS_SIZE;
24
@@ -663,7 +667,16 @@
25
 	char p[PATHLEN_MAX];
26
 	if (BUILD_PATH(p, uopt.branches[i].path, path)) RETURN(-ENAMETOOLONG);
27
 
28
+#ifdef __FreeBSD__
29
+	struct timeval tv[2];
30
+	tv[0].tv_sec = ts[0].tv_sec;
31
+	tv[0].tv_usec = ts[0].tv_nsec / 1000;
32
+	tv[1].tv_sec = ts[0].tv_sec;
33
+	tv[1].tv_usec = ts[0].tv_nsec / 1000;
34
+	int res = lutimes(p, tv);
35
+#else
36
 	int res = utimensat(0, p, ts, AT_SYMLINK_NOFOLLOW);
37
+#endif
27
+#endif
38
 
28
 	default:
39
 	if (res == -1) RETURN(-errno);
29
 		USYSLOG(LOG_ERR, "Unknown ioctl: %d", cmd);
40
 
30
 		return -EINVAL;
(-)a/sysutils/fusefs-unionfs/files/patch-src__usyslog.c (-12 lines)
Removed Link Here
1
--- ./src/usyslog.c.orig	2012-09-11 00:06:32.000000000 +0200
2
+++ ./src/usyslog.c	2013-07-24 16:56:29.401473882 +0200
3
@@ -20,7 +20,9 @@
4
 #include <string.h>
5
 #include <stdlib.h>
6
 #include <errno.h>
7
+#ifndef __FreeBSD__
8
 #include <malloc.h>
9
+#endif
10
 #include <pthread.h>
11
 #include <stdarg.h>
12
 
(-)b/sysutils/fusefs-unionfs/files/patch-src_usyslog.c (+11 lines)
Added Link Here
1
--- src/usyslog.c.orig	2015-01-14 10:08:20 UTC
2
+++ src/usyslog.c
3
@@ -23,7 +23,7 @@
4
 
5
 #if __APPLE__
6
 #include <malloc/malloc.h>
7
-#else
8
+#elif !defined(__FreeBSD__)
9
 #include <malloc.h>
10
 #endif
11
 
(-)b/sysutils/fusefs-unionfs/files/patch-test.py (+27 lines)
Added Link Here
1
--- test.py.orig	2015-01-14 10:08:20 UTC
2
+++ test.py
3
@@ -5,6 +5,7 @@ import subprocess
4
 import os
5
 import shutil
6
 import time
7
+import sys
8
 
9
 
10
 def call(cmd):
11
@@ -51,7 +52,7 @@ class Common:
12
 		# if it fails for someone, let's find the race and fix it!
13
 		#time.sleep(1)
14
 
15
-		call('fusermount -u union')
16
+		call('umount union')
17
 
18
 		for d in self._dirs:
19
 			shutil.rmtree(d)
20
@@ -238,6 +239,7 @@ class IOCTL_TestCase(Common, unittest.Te
21
 		call('src/unionfs rw1=rw:ro1=ro union')
22
 	#enddef
23
 
24
+	@unittest.skipUnless(sys.platform.startswith('linux'), "Linux-only ioctl")
25
 	def test_debug(self):
26
 		# TODO: this is not safe, use some temporary filename or something
27
 		if os.path.exists('/tmp/test_debug.log'):
(-)b/sysutils/fusefs-unionfs/pkg-descr (-5 / +3 lines)
Lines 1-6 Link Here
1
This is my effort to create a unionfs filesystem implementation which
1
This is an effort to create a unionfs filesystem implementation which is way
2
is probably slower but way more flexible than the current in-kernel
2
more flexible than the current in-kernel unionfs solution.
3
unionfs solution. Currently it's almost fully usable, the only problem
4
is new file/directory creation which I will fix soon...
5
3
6
WWW:	http://podgorny.cz/moin/UnionFsFuse
4
WWW: https://github.com/rpodgorny/unionfs-fuse

Return to bug 205617