From owner-svn-ports-all@FreeBSD.ORG Tue Apr 22 16:53:18 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EA28CA; Tue, 22 Apr 2014 16:53:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EBF41FD2; Tue, 22 Apr 2014 16:53:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MGrIeV028137; Tue, 22 Apr 2014 16:53:18 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3MGrHkY028130; Tue, 22 Apr 2014 16:53:17 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201404221653.s3MGrHkY028130@svn.freebsd.org> From: Glen Barber Date: Tue, 22 Apr 2014 16:53:17 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r351863 - in head/sysutils: . vhdtool vhdtool/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2014 16:53:18 -0000 Author: gjb Date: Tue Apr 22 16:53:16 2014 New Revision: 351863 URL: http://svnweb.freebsd.org/changeset/ports/351863 QAT: https://qat.redports.org/buildarchive/r351863/ Log: Add sysutils/vhdtool, a utility to create VHD files from raw disk images. Reviewed by: bdrewery Sponsored by: The FreeBSD Foundation Added: head/sysutils/vhdtool/ head/sysutils/vhdtool/Makefile (contents, props changed) head/sysutils/vhdtool/distinfo (contents, props changed) head/sysutils/vhdtool/files/ head/sysutils/vhdtool/files/patch-Makefile (contents, props changed) head/sysutils/vhdtool/files/patch-vhdtool.c (contents, props changed) head/sysutils/vhdtool/pkg-descr (contents, props changed) Modified: head/sysutils/Makefile Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Tue Apr 22 16:38:29 2014 (r351862) +++ head/sysutils/Makefile Tue Apr 22 16:53:16 2014 (r351863) @@ -975,6 +975,7 @@ SUBDIR += vagrant SUBDIR += vbetool SUBDIR += vcp + SUBDIR += vhdtool SUBDIR += videogen SUBDIR += vii SUBDIR += vils Added: head/sysutils/vhdtool/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/vhdtool/Makefile Tue Apr 22 16:53:16 2014 (r351863) @@ -0,0 +1,32 @@ +# $FreeBSD$ + +PORTNAME= vhdtool +PORTVERSION= 0.1 +CATEGORIES= sysutils +MASTER_SITES= http://www.glenbarber.us/ports/${CATEGORIES}/${PORTNAME}/ \ + LOCAL/gjb/${PORTNAME} + +MAINTAINER= gjb@FreeBSD.org +COMMENT= Convert raw disk images to VHD files + +LICENSE= GPLv2 + +USE_LDCONFIG= yes +LIB_DEPENDS= libuuid.so:${PORTSDIR}/misc/e2fsprogs-libuuid +CFLAGS+= -I${LOCALBASE}/include \ + -L${LOCALBASE}/lib \ + -I${LOCALBASE}/lib \ + -luuid + +PLIST_FILES= bin/${PORTNAME} +PORTDOCS= README + +pre-install: + ${MKDIR} ${STAGEDIR}${PREFIX} + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} +.for D in ${PORTDOCS} + ${INSTALL_MAN} ${WRKSRC}/${D} ${STAGEDIR}${DOCSDIR} +.endfor + +.include Added: head/sysutils/vhdtool/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/vhdtool/distinfo Tue Apr 22 16:53:16 2014 (r351863) @@ -0,0 +1,2 @@ +SHA256 (vhdtool-0.1.tar.gz) = cf33bb358904da73a81da1ffa7fa254b620bf0bbbdf4ea36dd2758b5806852f9 +SIZE (vhdtool-0.1.tar.gz) = 6104 Added: head/sysutils/vhdtool/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/vhdtool/files/patch-Makefile Tue Apr 22 16:53:16 2014 (r351863) @@ -0,0 +1,23 @@ +diff --git a/Makefile b/Makefile +index 78abe03..9cde1f0 100644 +--- Makefile ++++ Makefile +@@ -1,14 +1,11 @@ +-CC := gcc +-CFLAGS := -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -g2 +-LDFLAGS := -luuid + + all: vhdtool + +-vhdtool: vhdtool.o +- $(CC) $^ $(LDFLAGS) -o $@ +- +-vhdtool.o: vhdtool.c ++vhdtool: ++ $(CC) $(CFLAGS) $(LDFLAGS) -o vhdtool vhdtool.c + + clean: + rm -f vhdtool vhdtool.o + ++install: ++ # Nope. Added: head/sysutils/vhdtool/files/patch-vhdtool.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/vhdtool/files/patch-vhdtool.c Tue Apr 22 16:53:16 2014 (r351863) @@ -0,0 +1,40 @@ +diff --git a/vhdtool.c b/vhdtool.c +index af4d0eb..04c54c1 100644 +--- vhdtool.c ++++ vhdtool.c +@@ -23,7 +23,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +@@ -34,6 +34,8 @@ + #include + #include + ++#define off64_t __int64_t ++ + #define COOKIE(x) (*(uint64_t *) x) + #define COOKIE32(x) (*(uint32_t *) x) + #define FOOTER_FEAT_RSVD (2) +@@ -152,7 +154,7 @@ int vhd_read(struct vhd *vhd, + void *buf, + size_t size) + { +- if (lseek64(vhd->fd, vhd->offset, SEEK_SET) != vhd->offset) { ++ if (lseek(vhd->fd, vhd->offset, SEEK_SET) != vhd->offset) { + fprintf(stderr, "Error: couldn't seek '%s': %s\n", + vhd->name, strerror(errno)); + return -1; +@@ -172,7 +174,7 @@ int vhd_write(struct vhd *vhd, + void *buf, + size_t size) + { +- if (lseek64(vhd->fd, vhd->offset, SEEK_SET) != vhd->offset) { ++ if (lseek(vhd->fd, vhd->offset, SEEK_SET) != vhd->offset) { + fprintf(stderr, "Error: couldn't seek '%s': %s\n", + vhd->name, strerror(errno)); + return -1; Added: head/sysutils/vhdtool/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/vhdtool/pkg-descr Tue Apr 22 16:53:16 2014 (r351863) @@ -0,0 +1,10 @@ +vmdktool converts raw filesystems to VMDK files and vice versa. + +VMDK files can be imported directly into most Virtual Machine servers +as guest filesystems. Automatic machine deployments into products +such as VMware's ESXi and VirtualBox requires the ability to construct +VMDK files as the initial filesystem images for the created guests. + +vmdktool is free. + +Contact the author with any questions or comments.