Created attachment 154563 [details] Proposed patch (since 380213 revision) Patch to update deskutils/treesheets port from 0.0.20150117 to 0.0.20150313 version. Look following link for changes: https://github.com/aardappel/treesheets/compare/0191b1f...7950f77 This also fixes warning after ports r381618 changes.
Created attachment 154565 [details] The poudriere testport log (FreeBSD 10 amd64)
Created attachment 154614 [details] Proposed patch (since 380213 revision) Let's use GitHub API: https://developer.github.com/v3/repos/contents/#get-archive-link
(In reply to lightside from comment #2) 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.
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}).
(In reply to comment #4) > at reviews D748 at review D748
(In reply to comment #4) > at reviews D748 at review D748 --- (In reply to comment #4) > 7 digit Git commit 7 digit/char Git commit (In reply to comment #4) > GH_TAGNAME=? ${PORTVERSION} GH_TAGNAME?= ${PORTVERSION} Sorry about some mistakes in comment #4. I think, the provided examples explains the correct usage of GitHub, with using its (public) API. Also, there is nothing wrong to use MASTER_SITES directly. The USE_GITHUB is just some helpers (with changing rules and suggestions), which is currently in wrong state, in my opinion.
Created attachment 154828 [details] Proposed patch (since 380213 revision) (In reply to comment #3) I think, there is a (general) misunderstanding about GitHub API (front-end) usage. But also there is a possible reviewer's abuse of conversion from (correct) MASTER_SITES to USE_GITHUB. Therefore, return to use USE_GITHUB with correct DISTNAME (where the current "_GH0" part is responsibility of other people; therefore, if it changed outside of the port, then recreate the distinfo file with "make makesum" command). The build results are the same as in attachment 154565 [details], but with different WRKSRC. % portlint -C looks fine. % make check-plist ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for items in pkg-plist which are not in STAGEDIR ===> No pkg-plist issues found (check-plist)
Created attachment 154847 [details] Proposed patch (since 380213 revision) The patch updated to 0.0.20150326 version. Look following link for changes: https://github.com/aardappel/treesheets/compare/0191b1f...3452863 - Use ${WRKSRC}/Makefile to build application
Overall, what Thomas Zander suggested is ok. I used USE_GITHUB before and adapted it to current state in ports framework. The words about conversion to USE_GITHUB and related "actions" are true, though. But there are other people responsible to this situation.
(In reply to comment #8) > Use ${WRKSRC}/Makefile ${BUILD_WRKSRC}/Makefile, actually.
Created attachment 154849 [details] Proposed patch (since 380213 revision)
Created attachment 155103 [details] Proposed patch (since 380213 revision) Removed extra whitespace from pkg-descr file.
Created attachment 155235 [details] Proposed patch (since 380213 revision) The patch updated to 0.0.20150405 version. Look following link for changes: https://github.com/aardappel/treesheets/compare/0191b1f...b994c63
Created attachment 155239 [details] The poudriere testport log (FreeBSD 10 amd64)
A commit references this bug: Author: riggs Date: Mon Apr 6 20:16:28 UTC 2015 New revision: 383479 URL: https://svnweb.freebsd.org/changeset/ports/383479 Log: - Update to version v0.0.20150405 - Use new GH* policy - Pet portlint PR: 198730 Submitted by: lightside@gmx.com (maintainer) Changes: head/deskutils/treesheets/Makefile head/deskutils/treesheets/distinfo head/deskutils/treesheets/pkg-descr