From owner-freebsd-ports@FreeBSD.ORG Wed Oct 3 17:41:32 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D30F9106564A for ; Wed, 3 Oct 2012 17:41:32 +0000 (UTC) (envelope-from prvs=616aba4b1=pschmehl_lists@tx.rr.com) Received: from ip-001.utdallas.edu (ip-001.utdallas.edu [129.110.20.107]) by mx1.freebsd.org (Postfix) with ESMTP id 9DAAF8FC08 for ; Wed, 3 Oct 2012 17:41:32 +0000 (UTC) X-Group: None X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmQIABF4bFCBbgogOmdsb2JhbABFrlOQOwEBAQEZgnMBAQQBOAJPCw44QxQGARKHfwYLt0CLI4VaYAOIWI4mkiGBRQ X-IronPort-AV: E=Sophos;i="4.80,528,1344229200"; d="scan'208";a="105283422" Received: from zxtm01.utdallas.edu (HELO [129.110.200.11]) ([129.110.10.32]) by ip-001.utdallas.edu with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Oct 2012 12:40:56 -0500 Date: Wed, 03 Oct 2012 12:40:54 -0500 From: Paul Schmehl To: Michael Gmelin , freebsd-ports@freebsd.org Message-ID: <979E79833BE5A8EA79E38E1B@localhost> In-Reply-To: <20121003132147.043c9a74@bsd64.grem.de> References: <6DE237A2D4133FBAED25FC26@localhost> <44626syfjv.fsf@be-well.ilk.org> <17F1F6096650E45134B198CD@localhost> <85CE784EEB463CD1C26E6C06@localhost> <20121002232812.442d2c20@bsd64.grem.de> <267E4790564988D2A545BF49@Pauls-MacBook-Pro.local> <20121003132147.043c9a74@bsd64.grem.de> X-Mailer: Mulberry/4.1.0a1 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline; size=3923 Cc: Subject: Re: How to check out ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 17:41:32 -0000 --On October 3, 2012 1:21:47 PM +0200 Michael Gmelin wrote: > > The file name is the result of the command "git describe" and is > therefore stable. It consists of three parts: > > tag - number of commits - commit hash > > This project uses tags for versioning (which makes sense), so this file > name tells you that you're dealing with version v2-1.10, there have > been no commits to the tree since this version (it's unaltered) and the > commit id is g2f5d496 (which is a short but unique version of the > original sha1). You can use this commit id to get exactly this version > from a git repository (git clone ...; git checkout g2f5d496). If > somebody commited to the repository, the number in the middle would > increase and the hash change - but this will not happen in this > scenario, since github creates the tarball by checking out the tag (git > clone ...; git checkout v2-1.10), so as long as the project owner > doesn't change the meaning of the tag (which he usually won't since he > would redefine what vesion v2-1.10 means) this file name is stable. > > That said, when you're fetching using the fetch command (this is > what ports uses) things look different anyway. Let's assume you're > fetching a tag (= a version) and not master (which is not a version, but > basically the current stable environment) and you're using the fetch > program to get it, then the resulting file name is NOT > firnsy-barnyard2-v2-1.10-0-g2f5d496.tar.gz but "v2-1.10". > > [dev@bsd64 /tmp]$ fetch > https://github.com/firnsy/barnyard2/tarball/v2-1.10 > v2-1.10 100% of 409 kB 414 kBps > ... > > Like Eitan pointed out, fortunately there are github supporting options > in bsd.ports.mk. So if you use the following settings you should be fine > (just tested this here and ended up creating an almost complete port > skeleton - I turned v2-1.10 into 2.1.10 in the process, since v2-1.10 > would not be supported by the ports system - so this installs as > barnyard2-2.1.10, which should be ok for future updates). > > Makefile: ># Whom: pschmehl_lists@tx.rr.com ># $FreeBSD:$ ># > > PORTNAME= barnyard2 > PORTVERSION= 2.1.10 > CATEGORIES= security > GH_ACCOUNT= firnsy > GH_PROJECT= barnyard2 > GH_TAGNAME= v2-1.10 > GH_COMMIT= 2f5d496 > USE_GITHUB= YES > GNU_CONFIGURE= yes > MAKE_JOBS_UNSAFE=YES > > MAINTAINER= pschmehl_lists@tx.rr.com > COMMENT= Barnyard2 is a dedicated spooler\ > for Snorts unified2 binary output format. > > pre-configure: > cd ${WRKSRC}; ${SH} autogen.sh > > .include > > distinfo: > SHA256 (barnyard2-2.1.10.tar.gz) = > 31d4e3745606489658bd411f74ffeb8a27573fdc08d0b51a6a71e1bf4dece8a2 SIZE > (barnyard2-2.1.10.tar.gz) = 419781 > > pkg-descr: > Barnyard2 is a dedicated spooler for Snort's > unified2 binary output format. > > https://github.com/firnsy/barnyard2/ > > pkg-plist: > bin/barnyard2 > etc/barnyard2.conf > > I attached the full port skeleton in a tarball, it might need some > checking, I just did the usual (make install, make reinstall, > pkg_create, pkg_delete). > > Maybe somebody could use this information to create a page about using > github in the porter's handbook (it won't be me :D)? > Thanks, Michael. You've been a huge help. I had earlier searched /usr/ports/Mk for any sign of github and found none. Your email made me realize my ports were out of date, a problem I need to fix. With your help I now have a distinfo file and am working on figuring out why it won't make. -- Paul Schmehl, Senior Infosec Analyst As if it wasn't already obvious, my opinions are my own and not those of my employer. ******************************************* "It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead." Thomas Jefferson "There are some ideas so wrong that only a very intelligent person could believe in them." George Orwell