From owner-freebsd-ports@FreeBSD.ORG Fri Feb 28 22:24:41 2014 Return-Path: Delivered-To: freebsd-ports@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 6A086442 for ; Fri, 28 Feb 2014 22:24:41 +0000 (UTC) Received: from ip-006.utdallas.edu (ip-006.utdallas.edu [129.110.182.16]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 133701FB0 for ; Fri, 28 Feb 2014 22:24:40 +0000 (UTC) X-Group: None X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArICABMMEVOBbgogV2dsb2JhbABZg0GJJKN5kGSDdYErAwEXBQYCCQcUKIIlAQEFOAIPKxULGC4hIhQGARIZh0wDEQ3EMA2HHReMP4FjOoMjgRQEiUqNA4MfizGJFB0 X-IPAS-Result: ArICABMMEVOBbgogV2dsb2JhbABZg0GJJKN5kGSDdYErAwEXBQYCCQcUKIIlAQEFOAIPKxULGC4hIhQGARIZh0wDEQ3EMA2HHReMP4FjOoMjgRQEiUqNA4MfizGJFB0 X-IronPort-AV: E=Sophos;i="4.97,564,1389765600"; d="scan'208";a="21779576" Received: from zxtm01.utdallas.edu (HELO utd71538.utdallas.edu) ([129.110.10.32]) by ip-006.utdallas.edu with ESMTP/TLS/DHE-RSA-AES256-SHA; 28 Feb 2014 16:24:38 -0600 Date: Fri, 28 Feb 2014 16:25:08 -0600 From: Paul Schmehl To: Kozlov Sergey , FreeBSD Ports Subject: Re: Can't figure out github syntax Message-ID: <2A122E496A1FCF30CC09FA15@localhost> In-Reply-To: References: <02C492C82823BD9589D5077E@localhost> <5310FDD4.5030606@gmail.com> 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=5059 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 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: Fri, 28 Feb 2014 22:24:41 -0000 --On February 28, 2014 at 4:02:16 PM -0600 Paul Schmehl wrote: > --On February 28, 2014 at 11:21:24 PM +0200 Kozlov Sergey > wrote: > >> On 28.02.2014 20:43, Paul Schmehl wrote: >>> I'm working on a new port that's fetched from github. >>> >>> This works: >>> >>> MASTER_SITES= >>> https://github.com/collectiveintel/cif-v1/releases/download/v1.0.2-FINA >>> L/ DISTNAME= libcif-v1.0.2-FINAL >>> >>> But I cannot for the life of me figure out how to convert that to the >>> more normal USE_GITHUB syntax. >>> >>> Is there a doc on the GITHUB syntax that explains it for dummies? >>> >> Hi! >> >> Check out the (/usr/ports)/Mk/bsd.sites.mk file, It's pretty well >> documented. > > i wish that were true. It might be for developers, but it's not for me. > >> >> I think the right combination of GH_ACCOUNT, GH_PROJECT, GH_TAGNAME and >> GH_COMMIT would do the trick. >> > > I would think so too, however... > > Here's my Makefile: > ># cat Makefile ># $FreeBSD$ > > PORTNAME= cif > PORTVERSION= 1.0.2 > MASTER_SITES= GH GHC > CATEGORIES= www perl5 > > MAINTAINER= pauls@utdallas.edu > COMMENT= Collective intelligence framework tool > > LICENSE= LGPL3 > > BUILD_DEPENDS= p5-Net-SSLeay>=1.43:${PORTSDIR}/security/p5-Net-SSLeay \ > p5-Config-Simple>=4.59:${PORTSDIR}/devel/p5-Config-Simple \ > > p5-DateTime-Format-DateParse>=0.05:${PORTSDIR}/devel/p5-DateTime-Format- > DateParse \ > > p5-Google-ProtocolBuffers>=0.08:${PORTSDIR}/devel/p5-Google-ProtocolBuff > ers \ > p5-Regexp-Common>=2.122:${PORTSDIR}/textproc/p5-Regexp-Common \ > p5-URI>=1.56:${PORTSDIR}/net/p5-URI \ > p5-LWP-Protocol-https>=6.02:${PORTSDIR}/www/p5-LWP-Protocol-https \ > p5-Digest-SHA1>=2.10:${PORTSDIR}/security/p5-Digest-SHA1 \ > p5-Net-Patricia>=1.16:${PORTSDIR}/net/p5-Net-Patricia \ > p5-Module-Pluggable>=3.8:${PORTSDIR}/devel/p5-Module-Pluggable \ > p5-Try-Tiny>=0.04:${PORTSDIR}/lang/p5-Try-Tiny \ > p5-MIME-Base64>=3.06:${PORTSDIR}/converters/p5-MIME-Base64 \ > p5-Iodef-Pb-Simple>=0.21:${PORTSDIR}/devel/p5-Iodef-Pb-Simple \ > > p5-Regexp-Common-net-CIDR>=0.02:${PORTSDIR}/textproc/p5-Regexp-Common-ne > t-CIDR \ > p5-Compress-Snappy>=0.18:${PORTSDIR}/archivers/p5-Compress-Snappy \ > p5-Log-Dispatch>=2.32:${PORTSDIR}/devel/p5-Log-Dispatch \ > p5-JSON-XS>=3.0.0:${PORTSDIR}/converters/p5-JSON-XS > > USE_GITHUB= yes > GH_ACCOUNT= collectiveintel > GH_PROJECT= cif-v1 > GH_TAGNAME= libcif-v${PORTVERSION}-FINAL > GH_COMMIT= d86ca6c > ># https://github.com/collectiveintel/cif-v1/releases/download/v1.0.2-FINAL ># /libcif-v1.0.2-FINAL.tar.gz > > HAS_CONFIGURE= yes > CONFIGURE_ARGS= --prefix=${STAGEDIR}/${PREFIX} > > .include > > The commented out url is what I want to pull down. The TAGNAME does not > do that. If I call the url MASTER_SITES it works fine, but that's > obviously not the right way to do it. > > I don't understand how to get these macros to do what I need. > > Attempting to fetch > https://codeload.github.com/collectiveintel/cif-v1/legacy.tar.gz/libcif-v > 1.0.2-FINAL?dummy=/cif-1.0.2.tar.gz > fetch: > https://codeload.github.com/collectiveintel/cif-v1/legacy.tar.gz/libcif-v > 1.0.2-FINAL?dummy=/cif-1.0.2.tar.gz: Not Found > => Attempting to fetch > http://codeload.github.com/collectiveintel/cif-v1/legacy.tar.gz/libcif-v1 > .0.2-FINAL?dummy=/cif-1.0.2.tar.gz > > Obviously it's not descending into the releases/download folder to find > the tarball. The question is, why isn't it, and how do I get it to do > that? So, I go to github, click on releases and click on tags. I find the tagname I want - v1.0.2-FINAL, which has the commit has of d86ca6c. I put that in my Makefile and run make makesum. The system pulls down the cif-v1.0.2-FINAL.tar.gz file. Not really what I want (I only want libcif-v1.0.2-FINAL.tar.gz), but OK, I can work around that. So I run make install, and what happens? can't cd to /usr/ports/www/cif/work/collectiveintel-cif-v1-d86ca6c: No such file or directory WTF??? So I ls work: ls work/ .extract_done.cif._usr_local .license-catalog.mk .license-report .license_done.cif._usr_local collectiveintel-cif-v1-ebd850d/ WTF?? Why is the commit hash different than the one I specified? I"ve run into this time and time again trying to build ports that use GITHUB. I HATE it. Drives me batty. It at least doubles the time it takes me to figure out how to get a damn port working. I've considered just saying fuck it, you put your software on github, I will no longer maintain the damn port. Why is this so frickin' hard to do? -- 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