Date: Fri, 19 Jul 2013 19:44:22 GMT From: Pedro Giffuni <giffunip@tutopia.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/180662: sysutils/fusefs-libs: add birthtime support Message-ID: <201307191944.r6JJiMZg059395@oldred.freebsd.org> Resent-Message-ID: <201307191950.r6JJo0rB008341@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 180662 >Category: ports >Synopsis: sysutils/fusefs-libs: add birthtime support >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jul 19 19:50:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Pedro Giffuni >Release: 9.2-PRERELEASE >Organization: >Environment: FreeBSD pcbsd-1465 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #2 r253398M: Tue Jul 16 16:26:12 COT 2013 pfg@pcbsd-1465:/usr/obj/usr/src/sys/DELL amd64 >Description: FreeBSD 10 has added birthtime support to the fuse kernel module as was done for MacFUSE. The fusefs-libs port needs an update to use them. The attached patch has been submitted upstream but we will have to carry it until they accept it. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: fusefs-libs/Makefile =================================================================== --- fusefs-libs/Makefile (revision 323184) +++ fusefs-libs/Makefile (working copy) @@ -3,6 +3,7 @@ PORTNAME= fusefs PORTVERSION= 2.9.2 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= SF/fuse/fuse-2.X/${PORTVERSION} PKGNAMESUFFIX= -libs @@ -20,6 +21,12 @@ TXT_DOCS= how-fuse-works \ kernel.txt +.include <bsd.port.pre.mk> + +.if ${OSVERSION} >= 1000038 +EXTRA_PATCHES+= ${FILESDIR}/extrapatch-fuse-birthtime.diff +.endif + post-install: ${INSTALL_DATA} ${WRKSRC}/include/fuse_kernel.h ${PREFIX}/include/fuse @@ -34,4 +41,4 @@ ulockmgr_server.1 MAN8= mount.fuse.8 -.include <bsd.port.mk> +.include <bsd.port.post.mk> Index: fusefs-libs/files/extrapatch-fuse-birthtime.diff =================================================================== --- fusefs-libs/files/extrapatch-fuse-birthtime.diff (revision 0) +++ fusefs-libs/files/extrapatch-fuse-birthtime.diff (working copy) @@ -0,0 +1,60 @@ +--- include/fuse_kernel.h.orig 2013-07-19 12:31:33.000000000 -0500 ++++ include/fuse_kernel.h 2013-07-19 12:35:32.000000000 -0500 +@@ -134,16 +134,24 @@ + __u64 atime; + __u64 mtime; + __u64 ctime; ++#ifdef __FreeBSD__ ++ __u64 crtime; ++#endif + __u32 atimensec; + __u32 mtimensec; + __u32 ctimensec; ++#ifdef __FreeBSD__ ++ __u32 crtimensec; ++#endif + __u32 mode; + __u32 nlink; + __u32 uid; + __u32 gid; + __u32 rdev; + __u32 blksize; ++#ifndef __FreeBSD__ + __u32 padding; ++#endif + }; + + struct fuse_kstatfs { +--- lib/fuse_lowlevel.c.orig 2012-09-04 05:17:46.000000000 -0500 ++++ lib/fuse_lowlevel.c 2013-07-19 14:11:22.000000000 -0500 +@@ -67,9 +67,15 @@ + attr->atime = stbuf->st_atime; + attr->mtime = stbuf->st_mtime; + attr->ctime = stbuf->st_ctime; ++#ifdef __FreeBSD__ ++ attr->crtime = stbuf->st_birthtime; ++#endif + attr->atimensec = ST_ATIM_NSEC(stbuf); + attr->mtimensec = ST_MTIM_NSEC(stbuf); + attr->ctimensec = ST_CTIM_NSEC(stbuf); ++#ifdef __FreeBSD__ ++ attr->crtimensec= ST_CRTIM_NSEC(stbuf); ++#endif + } + + static void convert_attr(const struct fuse_setattr_in *attr, struct stat *stbuf) +--- lib/fuse_misc.h.orig 2013-07-19 14:14:59.000000000 -0500 ++++ lib/fuse_misc.h 2013-07-19 14:15:15.000000000 -0500 +@@ -41,8 +41,11 @@ + #define ST_MTIM_NSEC(stbuf) ((stbuf)->st_mtim.tv_nsec) + #define ST_ATIM_NSEC_SET(stbuf, val) (stbuf)->st_atim.tv_nsec = (val) + #define ST_MTIM_NSEC_SET(stbuf, val) (stbuf)->st_mtim.tv_nsec = (val) ++#ifdef __FreeBSD__ ++#define ST_CRTIM_NSEC(stbuf) ((stbuf)->st_birthtim.tv_nsec) ++#endif + #elif defined(HAVE_STRUCT_STAT_ST_ATIMESPEC) +-/* FreeBSD */ ++/* Older BSD ? */ + #define ST_ATIM_NSEC(stbuf) ((stbuf)->st_atimespec.tv_nsec) + #define ST_CTIM_NSEC(stbuf) ((stbuf)->st_ctimespec.tv_nsec) + #define ST_MTIM_NSEC(stbuf) ((stbuf)->st_mtimespec.tv_nsec) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307191944.r6JJiMZg059395>