I need help with git

Shane Ambler FreeBSD at ShaneWare.Biz
Wed Feb 6 10:01:37 UTC 2013


On 06/02/2013 00:27, Wesley Shields wrote:

> I don't know if we have a way to express this in the ports framework but
> you absolutely can grab a tarball of a repo at any specific commit on
> github even if it is not tagged.
>
> This is the URL to grab ironbee/libhtp at
> 234fd5bab1225e483ea263a5a15faebed0bd61b9:
>
> https://github.com/ironbee/libhtp/archive/234fd5bab1225e483ea263a5a15faebed0bd61b9.tar.gz
>

/usr/ports/Mk/bsd.sites.mk contains --

# GitHub files can also be obtained, without the commit hashes, by doing:
#
# MASTER_SITES= 
http://github.com/accountname/${PORTNAME}/archive/${PORTVERSION}.tar.gz?dummy=/
# FETCH_ARGS=	-Fpr

Where PORTVERSION would be expected to equal the tag name. I think that 
would mean not defining USE_GITHUB.

I haven't tested this yet - but it looks like PORTVERSION can be swapped 
for the long commit hash.

So you could probably use --

MASTER_SITES= 
http://github.com/${GH_ACCOUNT}/${GH_PROJECT}/archive/${GH_COMMIT}.tar.gz?dummy=/
DISTFILES=${GH_PROJECT}-${GH_COMMIT}.tar.gz
FETCH_ARGS= -Fpr
GH_ACCOUNT= ironbee
GH_PROJECT= libhtp
GH_COMMIT= 234fd5bab1225e483ea263a5a15faebed0bd61b9

Without USE_GITHUB you may need to add WRKSRC= 
${WRKDIR}/${GH_ACCOUNT}-${GH_COMMIT}

That could be the workaround for getting an untagged commit.



More information about the freebsd-ports mailing list