Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Aug 2006 16:53:00 +0600 (YEKST)
From:      Stanislav Sedov <ssedov@mbsd.msk.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/102271: [NEW PORT] sysutils/fusefs-sqlfs: SQLite backed FUSE file system
Message-ID:  <20060819105300.E287612027@fonon.realnet>
Resent-Message-ID: <200608191300.k7JD0VXG018467@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         102271
>Category:       ports
>Synopsis:       [NEW PORT] sysutils/fusefs-sqlfs: SQLite backed FUSE file system
>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:   Sat Aug 19 13:00:30 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Stanislav Sedov
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
MBSD labs, Inc.
>Environment:
System: FreeBSD fonon.realnet 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Wed Aug  2 21:44:37 MSD
>Description:
The sqlfs filesystem implements a POSIX style file system on top of an SQLite
database. It allows applications to have access to a full read/write
file system in a single file, complete with its own file hierarchy and name
space.  This is useful for applications which needs structured storage, such
as embedding documents within documents, or management of configuration
data or preferences.

Author:	Palmsource, Inc. An Access Company
WWW:	http://www.palmsource.com/opensource/

>How-To-Repeat:
>Fix:

--- fusefs-sqlfs-20060811.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	fusefs-sqlfs
#	fusefs-sqlfs/pkg-descr
#	fusefs-sqlfs/Makefile
#	fusefs-sqlfs/pkg-message
#	fusefs-sqlfs/distinfo
#	fusefs-sqlfs/files
#	fusefs-sqlfs/files/patch-fuse_main.c
#
echo c - fusefs-sqlfs
mkdir -p fusefs-sqlfs > /dev/null 2>&1
echo x - fusefs-sqlfs/pkg-descr
sed 's/^X//' >fusefs-sqlfs/pkg-descr << 'END-of-fusefs-sqlfs/pkg-descr'
XThe sqlfs filesystem implements a POSIX style file system on top of an SQLite
Xdatabase. It allows applications to have access to a full read/write
Xfile system in a single file, complete with its own file hierarchy and name
Xspace.  This is useful for applications which needs structured storage, such
Xas embedding documents within documents, or management of configuration
Xdata or preferences.
X
XAuthor:	Palmsource, Inc. An Access Company
XWWW:	http://www.palmsource.com/opensource/
END-of-fusefs-sqlfs/pkg-descr
echo x - fusefs-sqlfs/Makefile
sed 's/^X//' >fusefs-sqlfs/Makefile << 'END-of-fusefs-sqlfs/Makefile'
X# New ports collection makefile for:	fusefs-sqlfs
X# Date created:		2006-08-19
X# Whom:			Stanislav Sedov <ssedov@mbsd.msk.ru>
X#
X# $MBSDlabs$
X# $FreeBSD$
X#
X
XPORTNAME=	sqlfs
XPORTVERSION=	20060811
XCATEGORIES=	sysutils
XMASTER_SITES=	http://www.palmsource.com/opensource/downloads/
XPKGNAMEPREFIX=	fusefs-
XDISTNAME=	lib${PORTNAME}-${PORTVERSION}
X
XMAINTAINER=	ssedov@mbsd.msk.ru
XCOMMENT=	SQLite backed FUSE file system
X
XLIB_DEPENDS=	fuse.2:${PORTSDIR}/sysutils/fusefs-libs
XRUN_DEPENDS=	${LOCALBASE}/modules/fuse.ko:${PORTSDIR}/sysutils/fusefs-kmod
X
XUSE_SQLITE=	3
XWRKSRC=		${WRKDIR}/${PORTNAME}
X
X.if !defined(NOPORTDOCS)
XPORTDOCS=	README
X.endif
X
XPLIST_FILES=	bin/sqlfs
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 600000
XIGNORE=		depends on kernel module that requires FreeBSD 6 or later
X.endif
X
Xdo-build:
X	(cd ${WRKSRC} && ${CC} -DFUSE -DFUSE_USE_VERSION=25		\
X		-D_FILE_OFFSET_BITS=64 -D_REENTRANT ${CFLAGS}		\
X		-I${LOCALBASE}/include -I. -L${LOCALBASE}/lib		\
X		-lfuse -lsqlite${SQLITE_VER} ${PTHREAD_CFLAGS}		\
X		${PTHREAD_LIBS} sqlfs.c fuse_main.c -o sqlfs)
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/sqlfs ${TARGETDIR}/bin/
X
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}/
X	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/
X.endif
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-fusefs-sqlfs/Makefile
echo x - fusefs-sqlfs/pkg-message
sed 's/^X//' >fusefs-sqlfs/pkg-message << 'END-of-fusefs-sqlfs/pkg-message'
X==============================================================================
X
XNow sqlfs filesystem is installed.
XYou can mount it by issuing
X% sqlfs -o /path/to/sqlite/database /path/to/mountpoint
X
XAlternatively you can supply database name via SQLFS_DBNAME env variable
X
XFor additional information see supplied documentation.
X
X==============================================================================
END-of-fusefs-sqlfs/pkg-message
echo x - fusefs-sqlfs/distinfo
sed 's/^X//' >fusefs-sqlfs/distinfo << 'END-of-fusefs-sqlfs/distinfo'
XMD5 (libsqlfs-20060811.tar.gz) = e93480a033f235b0ed5ce11406c2189c
XSHA256 (libsqlfs-20060811.tar.gz) = ba193d2845cf53ee6452a86ecddbb0ad1b31e9f2e959ca6dc192823b59636adf
XSIZE (libsqlfs-20060811.tar.gz) = 311832
END-of-fusefs-sqlfs/distinfo
echo c - fusefs-sqlfs/files
mkdir -p fusefs-sqlfs/files > /dev/null 2>&1
echo x - fusefs-sqlfs/files/patch-fuse_main.c
sed 's/^X//' >fusefs-sqlfs/files/patch-fuse_main.c << 'END-of-fusefs-sqlfs/files/patch-fuse_main.c'
X--- fuse_main.c.orig	Sat Aug 12 01:46:18 2006
X+++ fuse_main.c	Sat Aug 19 16:18:02 2006
X@@ -17,12 +17,52 @@
X 
X *****************************************************************************/
X 
X+#include <stdlib.h>
X+#include <stdio.h>
X+#include <sysexits.h>
X #include "sqlfs.h"
X 
X+void usage() __dead2;
X+
X+void usage()
X+{
X+	fprintf(stderr, "Usage: %s -o dbname [-h]\n", getprogname());
X+
X+	exit(EX_USAGE);
X+}
X 
X int main(int argc, char **argv)
X {
X-    sqlfs_init("/tmp/fsdata");
X+	char c;
X+	int ret;
X+	char *dbname = NULL;
X+	
X+	while ((c = getopt(argc, argv, "o:h")) != -1)
X+		switch (c) {
X+		case 'o':
X+			dbname = optarg;
X+			break;
X+		case 'h':
X+			/* FALLTHROUGH */
X+		default:
X+			usage();
X+			/* NOTREACHED */
X+		}
X+		argc -= optind;
X+		argv += optind;
X+
X+	if (dbname == NULL)
X+		dbname = getenv("SQLFS_DBNAME");
X+
X+	if (dbname == NULL)
X+		usage();
X+	/* NOTREACHED */
X+
X+	ret = sqlfs_init(dbname);
X+	if (ret != 0)
X+		return ret;
X    
X-    return sqlfs_fuse_main(argc, argv);
X+	ret = sqlfs_fuse_main(argc, argv);
X+	
X+	return ret;
X }
END-of-fusefs-sqlfs/files/patch-fuse_main.c
exit
--- fusefs-sqlfs-20060811.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



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