Bug 208502

Summary: www/gitlab-workhorse: fetch from MASTERSITE
Product: Ports & Packages Reporter: Torsten Zühlsdorff <ports>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Only Me CC: pi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch with update to 0.7.1
ports: maintainer-approval+
Fetching from gitlab pi: maintainer-approval+

Description Torsten Zühlsdorff 2016-04-04 10:45:32 UTC
Created attachment 168957 [details]
patch with update to 0.7.1

Hello,

attached a patch to bring www/gitlab-workhorse to its current version 0.7.1. This is also a prerequisite for the next update of www/gitlab.

Buildtests are done for 9.3, 10.0, 10.1, 10.2 and 10.3 amd64 and i386. Also a runtime test with www/gitlab was done. All is fine :)

Greetings,
Torsten
Comment 1 Dmitry Marakasov freebsd_committer freebsd_triage 2016-04-05 16:26:20 UTC
Why's there no corresponding tag for this version in upstream repo?

Also, is it not possible to download distfiles from gitlab instead of hosting them on a third-party site?
Comment 2 Torsten Zühlsdorff 2016-04-06 07:37:53 UTC
(In reply to Dmitry Marakasov from comment #1)

> Why's there no corresponding tag for this version in upstream repo?

There is:
https://gitlab.com/gitlab-org/gitlab-workhorse/tags?page=2

The project added the v prefix with release 0.7. Therefore it is not listed on page 1. 

> Also, is it not possible to download distfiles from gitlab instead 
> of hosting them on a third-party site?

It should be, but i did not figured out how. When downloading:
https://gitlab.com/gitlab-org/gitlab-workhorse/repository/archive.tar.gz?ref=v0.7.1

I got an archive named "gitlab-workhorse-v0.7.1-bb9806f226a519d493d3b0df1446488cce6d162c.tar.gz" (also the workdir is named like this). When creating the port i give up to fix this and keep this for later. I would be glad about any advise! :)
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2016-04-06 18:17:36 UTC
Committed, thanks.
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-04-06 18:18:04 UTC
A commit references this bug:

Author: pi
Date: Wed Apr  6 18:17:22 UTC 2016
New revision: 412636
URL: https://svnweb.freebsd.org/changeset/ports/412636

Log:
  www/gitlab-workhorse: 0.6.5 -> 0.7.1

  PR:		208502
  Submitted by:	ports@toco-domains.de (maintainer)

Changes:
  head/www/gitlab-workhorse/Makefile
  head/www/gitlab-workhorse/distinfo
Comment 5 Dmitry Marakasov freebsd_committer freebsd_triage 2016-04-06 19:46:20 UTC
(In reply to Torsten Zühlsdorff from comment #2)

> > Why's there no corresponding tag for this version in upstream repo?
> 
> There is:
> https://gitlab.com/gitlab-org/gitlab-workhorse/tags?page=2
>
> The project added the v prefix with release 0.7. Therefore it is not listed
> on page 1. 

Oh, ok.

> > Also, is it not possible to download distfiles from gitlab instead 
> > of hosting them on a third-party site?
> 
> It should be, but i did not figured out how. When downloading:
> https://gitlab.com/gitlab-org/gitlab-workhorse/repository/archive.tar.
> gz?ref=v0.7.1
> 
> I got an archive named
> "gitlab-workhorse-v0.7.1-bb9806f226a519d493d3b0df1446488cce6d162c.tar.gz"
> (also the workdir is named like this). When creating the port i give up to
> fix this and keep this for later. I would be glad about any advise! :)

See following patch.
Comment 6 Dmitry Marakasov freebsd_committer freebsd_triage 2016-04-06 19:49:43 UTC
Created attachment 169053 [details]
Fetching from gitlab

The patch it trivial: we fetch from gitlab directly, adding a dummy argument to specify local file name. Then, to fix ${WRKSRC} name, we just rename it. May also drop PKGNAMEPREFIX.
Comment 7 Kurt Jaeger freebsd_committer freebsd_triage 2016-04-06 20:05:17 UTC
Please proceed 8-}
Comment 8 Torsten Zühlsdorff 2016-04-07 12:26:53 UTC
(In reply to Dmitry Marakasov from comment #6)


> The patch it trivial: we fetch from gitlab directly, 
> adding a dummy argument to specify local file name. 
> Then, to fix ${WRKSRC} name, we just rename it. May also drop PKGNAMEPREFIX.

The patch looks fine, but i'm irritated about the changed size and checksum of the file. Is there any reason for?
Comment 9 Torsten Zühlsdorff 2016-04-08 10:46:09 UTC
I changed the title according to the open item left and removed the blocker, because the update is already done.
Comment 10 Dmitry Marakasov freebsd_committer freebsd_triage 2016-04-09 01:47:54 UTC
(In reply to Torsten Zühlsdorff from comment #8)

> > The patch it trivial: we fetch from gitlab directly, 
> > adding a dummy argument to specify local file name. 
> > Then, to fix ${WRKSRC} name, we just rename it. May also drop PKGNAMEPREFIX.
> 
> The patch looks fine, but i'm irritated about the changed size and checksum
> of the file. Is there any reason for?

The only change is directory name (now it contains commit hash). Seems there's no way to avoid it.
Comment 11 Torsten Zühlsdorff 2016-04-11 10:46:19 UTC
Comment on attachment 169053 [details]
Fetching from gitlab

I see. Thank you again - i approve the patch. :)

(And will port it to devel/gitlab-shell, too)
Comment 12 commit-hook freebsd_committer freebsd_triage 2016-04-11 20:19:14 UTC
A commit references this bug:

Author: amdmi3
Date: Mon Apr 11 20:18:18 UTC 2016
New revision: 413085
URL: https://svnweb.freebsd.org/changeset/ports/413085

Log:
  - Switch to fetching source from upstream gitlab site

  The only difference between distfiles is root directory name change (gitlab-workhorse-v0.7.1 -> gitlab-workhorse-v0.7.1-bb9806f226a519d493d3b0df1446488cce6d162c)

  PR:		208502
  Submitted by:	amdmi3
  Approved by:	ports@toco-domains.de (maintainer)

Changes:
  head/www/gitlab-workhorse/Makefile
  head/www/gitlab-workhorse/distinfo