Bug 198730 - [MAINTAINER] deskutils/treesheets: Update to v0.0.20150405
Summary: [MAINTAINER] deskutils/treesheets: Update to v0.0.20150405
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thomas Zander
URL:
Keywords: easy, needs-qa, patch
Depends on:
Blocks:
 
Reported: 2015-03-20 11:21 UTC by lightside
Modified: 2015-04-06 20:17 UTC (History)
1 user (show)

See Also:


Attachments
Proposed patch (since 380213 revision) (1.11 KB, patch)
2015-03-20 11:21 UTC, lightside
no flags Details | Diff
The poudriere testport log (FreeBSD 10 amd64) (34.08 KB, text/plain)
2015-03-20 12:12 UTC, lightside
no flags Details
Proposed patch (since 380213 revision) (1.36 KB, patch)
2015-03-21 06:57 UTC, lightside
no flags Details | Diff
Proposed patch (since 380213 revision) (1.21 KB, patch)
2015-03-26 14:44 UTC, lightside
no flags Details | Diff
Proposed patch (since 380213 revision) (1.64 KB, patch)
2015-03-26 21:04 UTC, lightside
no flags Details | Diff
Proposed patch (since 380213 revision) (1.61 KB, patch)
2015-03-26 23:05 UTC, lightside
no flags Details | Diff
Proposed patch (since 380213 revision) (2.08 KB, patch)
2015-04-01 18:59 UTC, lightside
no flags Details | Diff
Proposed patch (since 380213 revision) (2.44 KB, patch)
2015-04-06 16:29 UTC, lightside
no flags Details | Diff
The poudriere testport log (FreeBSD 10 amd64) (32.77 KB, text/plain)
2015-04-06 18:22 UTC, lightside
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description lightside 2015-03-20 11:21:01 UTC
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.
Comment 1 lightside 2015-03-20 12:12:41 UTC
Created attachment 154565 [details]
The poudriere testport log (FreeBSD 10 amd64)
Comment 2 lightside 2015-03-21 06:57:57 UTC
Created attachment 154614 [details]
Proposed patch (since 380213 revision)

Let's use GitHub API:
https://developer.github.com/v3/repos/contents/#get-archive-link
Comment 3 Thomas Zander freebsd_committer freebsd_triage 2015-03-21 12:05:50 UTC
(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.
Comment 4 lightside 2015-03-21 16:46:29 UTC
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}).
Comment 5 lightside 2015-03-21 16:48:55 UTC
(In reply to comment #4)
> at reviews D748

at review D748
Comment 6 lightside 2015-03-21 17:30:04 UTC
(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.
Comment 7 lightside 2015-03-26 14:44:42 UTC
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)
Comment 8 lightside 2015-03-26 21:04:14 UTC
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
Comment 9 lightside 2015-03-26 21:50:09 UTC
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.
Comment 10 lightside 2015-03-26 22:28:00 UTC
(In reply to comment #8)
> Use ${WRKSRC}/Makefile

${BUILD_WRKSRC}/Makefile, actually.
Comment 11 lightside 2015-03-26 23:05:19 UTC
Created attachment 154849 [details]
Proposed patch (since 380213 revision)
Comment 12 lightside 2015-04-01 18:59:55 UTC
Created attachment 155103 [details]
Proposed patch (since 380213 revision)

Removed extra whitespace from pkg-descr file.
Comment 13 lightside 2015-04-06 16:29:30 UTC
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
Comment 14 lightside 2015-04-06 18:22:09 UTC
Created attachment 155239 [details]
The poudriere testport log (FreeBSD 10 amd64)
Comment 15 commit-hook freebsd_committer freebsd_triage 2015-04-06 20:17:23 UTC
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