Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Mar 2015 16:46:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 198730] [MAINTAINER] deskutils/treesheets: Update to v0.0.20150313
Message-ID:  <bug-198730-13-xteQ24Q2HP@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-198730-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-198730-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198730

--- Comment #4 from lightside <lightside@gmx.com> ---
Hello, Thomas Zander.

(In reply to comment #3)
> The USE_GITHUB should abstract your manual settings of WRKSRC and download sites.
> If there is no release tarball, this is the recommended way to do it, see
>
> https://www.freebsd.org/doc/en/books/porters-handbook/book.html#makefile-master_sites-github-ex2
>
> Could you update your patch accordingly? Thanks in advance.

Please, don't make me wrong about correct usage of GitHub by pointing to
Porter's Handbook.
I used the USE_GITHUB before and know it's benefits. But after ports r381618
changes, instead of providing access to GitHub API, it started to use GitHub
internal methods, renaming distfile, etc., which is wrong, in my opinion. I
didn't participate at reviews D748, but I think, that it headed to a different
direction, than it started, i.e. instead of providing additional methods, it
started to annoy maintainers/users (with delayed warning message) about correct
methods, which works. So, I chose to use GitHub API instead of USE_GITHUB.

There are following public methods:
1.1 Get tar.gz archive:
MASTER_SITES=   
http://github.com/${GH_ACCOUNT}/${GH_PROJECT}/tarball/${GH_TAGNAME}?dummy=/
1.2. Get zip archive:
MASTER_SITES=   
http://github.com/${GH_ACCOUNT}/${GH_PROJECT}/zipball/${GH_TAGNAME}?dummy=/
USES+=    zip
where (for 1.1 and 1.2) GH_TAGNAME may be a branch/tag name or 7 digit Git
commit. In result you might get following WRKSRC:
WRKSRC=    ${WRKDIR}/${GH_ACCOUNT}-${GH_PROJECT}-${GH_COMMIT}
Therefore, it's:
GH_COMMIT=    a1b2c3d # mandatory
GH_TAGNAME?=    ${GH_COMMIT}
2. Get release archive:
MASTER_SITES=   
http://github.com/${GH_ACCOUNT}/${GH_PROJECT}/archive/${GH_TAGNAME}${EXTRACT_SUFX}?dummy=/
where EXTRACT_SUFX may be .tar.gz or .zip (as far as I know). In result you
might get following WRKSRC:
WRKSRC?=    ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME}
GH_TAGNAME=?    ${PORTVERSION}
The behavior of this method is different, than 1.1 and 1.2, because for some
tags it might give the same result for WRKSRC in place of GH_TAGNAME, while in
other situations, e.g. v${PORTVERSION} it might give ${PORTVERSION} instead of
GH_TAGNAME. The usage of 7 digit commit gives full hash commit in WRKSRC result
and might be not so useful, than 1.1 or 1.2 methods, for this case.

Some examples:
% curl -L -o treesheets-7950f77.tar.gz
http://github.com/aardappel/treesheets/tarball/7950f77
WRKSRC=    ${WRKDIR}/aardappel-treesheets-7950f77
% curl -L -o spyder-2.3.3.tar.gz
http://github.com/spyder-ide/spyder/archive/v2.3.3.tar.gz
WRKSRC=    ${WRKDIR}/spyder-2.3.3
% curl -L -o wxlauncher-0.9.5.tar.gz
http://github.com/wxLauncher/wxlauncher/archive/release-0.9.5.tar.gz
WRKSRC=    ${WRKDIR}/wxlauncher-release-0.9.5
% curl -L -o treesheets-7950f77full.tar.gz
http://github.com/aardappel/treesheets/archive/7950f77.tar.gz
WRKSRC=    ${WRKDIR}/treesheets-7950f7781414a3bdca1edeeeb3b5574bf54bdb2f

Therefore, "tarball" and "zipball" methods are useful in case of 7 digit Git
commit, which might be used for WRKSRC as is. And "archive" method is useful in
case of known tag/branch name, without the need to use Git commit, but WRKSRC
result might be different in some case(s) (e.g. v${PORTVERSION}).

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-198730-13-xteQ24Q2HP>