Date: Fri, 28 Feb 2014 16:25:08 -0600 From: Paul Schmehl <pschmehl_lists@tx.rr.com> To: Kozlov Sergey <kozlov.sergey.404@gmail.com>, FreeBSD Ports <freebsd-ports@freebsd.org> Subject: Re: Can't figure out github syntax Message-ID: <2A122E496A1FCF30CC09FA15@localhost> In-Reply-To: <B43BED350757CB051AF6DE0E@localhost> References: <02C492C82823BD9589D5077E@localhost> <5310FDD4.5030606@gmail.com> <B43BED350757CB051AF6DE0E@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
--On February 28, 2014 at 4:02:16 PM -0600 Paul Schmehl <pschmehl_lists@tx.rr.com> wrote: > --On February 28, 2014 at 11:21:24 PM +0200 Kozlov Sergey > <kozlov.sergey.404@gmail.com> 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 <bsd.port.mk> > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2A122E496A1FCF30CC09FA15>