Bug 1803302

Summary: Review Request: github-cli - The GitHub CLI
Product: [Fedora] Fedora Reporter: Joe Doss <joe>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dan.cermak, ego.cordatus, hobbes1069, jistone, maxwell, mikel, omajid, package-review, pasik, petersen, rmeggins, tadej.j, thomas.moschny, vitaly, zebob.m
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-06 09:25:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1803303, 1803309, 1803310, 1803311, 1803312, 1805482, 2009418, 2009419, 2009487, 2009494, 2009496, 2009498, 2009520, 2009526    
Bug Blocks:    

Comment 2 Robert-André Mauchin 🐧 2020-02-16 23:45:42 UTC
 - Not needed:

%global tag             v0.5.5
%global distprefix      %{nil}

- Install fails:

DEBUG util.py:584:  Error: 
DEBUG util.py:584:   Problem: conflicting requests
DEBUG util.py:584:    - nothing provides golang(github.com/AlecAivazis/survey/v2) needed by golang-github-cli-devel-0.5.5-1.fc33.noarch
DEBUG util.py:584:    - nothing provides golang(github.com/AlecAivazis/survey/v2/terminal) needed by golang-github-cli-devel-0.5.5-1.fc33.noarch

 Since we don't support modules fix it in prep with:

sed -i "s|github.com/AlecAivazis/survey/v2|github.com/AlecAivazis/survey|" $(find . -name "*.go")

Comment 3 Omair Majid 2020-02-17 19:13:30 UTC
Drive-by suggestion: Can you use SOURCE_DATE_EPOCH instead of $(date +%Y-%m-%d)? That would make this build more reproducible.

Comment 4 Joe Doss 2020-02-20 21:23:29 UTC
(In reply to Omair Majid from comment #3)
> Drive-by suggestion: Can you use SOURCE_DATE_EPOCH instead of $(date
> +%Y-%m-%d)? That would make this build more reproducible.

Thanks for this Omair. Updated my spec to use SOURCE_DATE_EPOCH.


GitHub released 0.5.6 already with another dependency that has two other dependencies. https://bugzilla.redhat.com/show_bug.cgi?id=1805482 is one of them. I am having trouble building the other which I emailed Robert-André off BZ to figure out how to handle/package. I will update this BZ with the updated spec and srpm once that is sorted out.

Comment 5 Vitaly 2020-09-17 17:26:17 UTC
Version 1.0 was released. Any progress on this?

Comment 6 Joe Doss 2020-09-22 21:58:53 UTC
(In reply to Vitaly Zaitsev from comment #5)
> Version 1.0 was released. Any progress on this?


Now that 1.0 is out and hopefully the dependencies have stabilize so I can get this out the door. I will try and work on it over the next week or so.

Comment 7 Rich Megginson 2020-09-29 17:20:20 UTC
Note - this is a replacement for the `hub` command which is being deprecated

Comment 8 Joe Doss 2020-10-16 16:17:06 UTC
OK let's try this again. Here is the spec and srpm for GitHub CLI 1.1.0

Spec URL: https://download.copr.fedorainfracloud.org/results/jdoss/github-cli/fedora-33-x86_64/01709946-github-cli/github-cli.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/jdoss/github-cli/fedora-33-x86_64/01709946-github-cli/github-cli-1.1.0-1.fc33.src.rpm

Description: GitHub's official command line tool

Fedora Account System Username: jdoss


And the eleven dependency packages review requests:

golang-github-netflix-expect
https://bugzilla.redhat.com/show_bug.cgi?id=1803309

golang-github-hinshun-vt10x
https://bugzilla.redhat.com/show_bug.cgi?id=1803312

golang-github-alecaivazis-survey
https://bugzilla.redhat.com/show_bug.cgi?id=1803303

golang-github-muesli-reflow
https://bugzilla.redhat.com/show_bug.cgi?id=1888965

golang-github-muesli-termenv
https://bugzilla.redhat.com/show_bug.cgi?id=1888966

golang-github-charmbracelet-glamour 
https://bugzilla.redhat.com/show_bug.cgi?id=1888967

golang-github-henvic-httpretty
https://bugzilla.redhat.com/show_bug.cgi?id=1888968

golang-github-rivo-uniseg
https://bugzilla.redhat.com/show_bug.cgi?id=1888970

golang-github-cli-shurcool-graphql
https://bugzilla.redhat.com/show_bug.cgi?id=1888971

golang-github-shurcool-githubv4
https://bugzilla.redhat.com/show_bug.cgi?id=1888972

golang-github-enescakir-emoji
https://bugzilla.redhat.com/show_bug.cgi?id=1888974

Comment 9 Jens Petersen 2020-10-26 03:30:43 UTC
It might be good to add "Provides: gh = %{version}" or so,
to make this package more discoverable?
Upstream seems to favor the "gh" naming.

Comment 10 Tadej Janež 2021-06-17 18:59:34 UTC
Joe, thanks for all the work you spend on packaging GitHub CLI and its dependencies.

Where does this stand now? Are there any new dependencies in the latest version (1.11.0)? Are all dependencies packaged now?

Comment 11 Joe Doss 2021-06-21 17:02:45 UTC
Thanks Tadej, I am unsure on the dependencies for the current version. I have not had the free time to push this over the finish line because the dependencies of the upstream github-cli keeps changing and packaging golang is a deathmarch. If someone has the time and means to pick up my work here and get it out the door, I am all for handing over the maintainership of this package and all dependencies.

==

Comment 12 Mikel Olasagasti Uranga 2021-09-28 22:17:06 UTC
Hi Joe,

I've been able to build gh-2.0.0 in copr[1] and I'm testing it now in F34. All the specs are available in a GH repo[2], including some new deps required for 2.0.0 release.

- Should I continue with this BZ or is it better to close this one and also deps and then start again?
- There are some deps that are already created, like golang-github-muesli-reflow, golang-github-netflix-expect or golang-github-hinshun-vt10x that if you want you can add me as co-admin. My FAS is mikelo2.
- Should the name of the package be changed to `gh` as the official CLI?

[1] https://copr.fedorainfracloud.org/coprs/mikelo2/github-cli/
[2] https://github.com/mikelolasagasti/github-cli/

Comment 13 Joe Doss 2021-09-29 01:17:04 UTC
(In reply to Mikel Olasagasti Uranga from comment #12)
> Hi Joe,
> 
> I've been able to build gh-2.0.0 in copr[1] and I'm testing it now in F34.
> All the specs are available in a GH repo[2], including some new deps
> required for 2.0.0 release.

That is awesome Mikel!

> - Should I continue with this BZ or is it better to close this one and also
> deps and then start again?

That is up to you. Whatever is easiest for you.

> - There are some deps that are already created, like
> golang-github-muesli-reflow, golang-github-netflix-expect or
> golang-github-hinshun-vt10x that if you want you can add me as co-admin. My
> FAS is mikelo2.

Sure thing. What is the best way to do that?

> - Should the name of the package be changed to `gh` as the official CLI?

I think I left the package name to be github-cli so it was clear as to what it was but the CLI output was still gh. I think that is the best path here, but I couldn't get this out the door, so you do what you think is best. :)

Comment 14 Mikel Olasagasti Uranga 2021-09-30 13:38:53 UTC
(In reply to Joe Doss from comment #13)

> That is awesome Mikel!
> 
> > - Should I continue with this BZ or is it better to close this one and also
> > deps and then start again?
> 
> That is up to you. Whatever is easiest for you.

I think we can continue with this one unless we find a stopper.

> 
> > - There are some deps that are already created, like
> > golang-github-muesli-reflow, golang-github-netflix-expect or
> > golang-github-hinshun-vt10x that if you want you can add me as co-admin. My
> > FAS is mikelo2.
> 
> Sure thing. What is the best way to do that?

You'll need to add me on each of the projects by going to settings in the Package Source page.

For example:

https://src.fedoraproject.org/rpms/golang-github-muesli-reflow/settings#usersgroups-tab

Then add `mikelo2` as admin so I can push updates.
 
> > - Should the name of the package be changed to `gh` as the official CLI?
> 
> I think I left the package name to be github-cli so it was clear as to what
> it was but the CLI output was still gh. I think that is the best path here,
> but I couldn't get this out the door, so you do what you think is best. :)

I `gh` as upstream will be the best, but lets start with the deps first and decide later how to name this.

Comment 15 Joe Doss 2021-09-30 18:52:03 UTC
(In reply to Mikel Olasagasti Uranga from comment #14)

> I think we can continue with this one unless we find a stopper.

Great!

> You'll need to add me on each of the projects by going to settings in the
> Package Source page.
> 
> For example:
> 
> https://src.fedoraproject.org/rpms/golang-github-muesli-reflow/
> settings#usersgroups-tab
> 
> Then add `mikelo2` as admin so I can push updates.

OK this has been done for:

https://src.fedoraproject.org/rpms/golang-github-muesli-reflow
https://src.fedoraproject.org/rpms/golang-github-netflix-expect
https://src.fedoraproject.org/rpms/golang-github-hinshun-vt10x

Let me know if you need any more.

> I `gh` as upstream will be the best, but lets start with the deps first and
> decide later how to name this.

Sounds good!

Comment 16 Mikel Olasagasti Uranga 2021-09-30 19:32:12 UTC
Update:

golang-github-muesli-reflow -> updated to 0.3.0 in rawhide
golang-github-spf13-cobra -> https://src.fedoraproject.org/rpms/golang-github-spf13-cobra/pull-request/3
golang-github-shurcool-graphql.spec -> https://src.fedoraproject.org/rpms/golang-github-shurcool-graphql/pull-request/1
golang-github-cli-browser.spec           https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009418
golang-github-cli-oauth.spec             https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009419
golang-github-itchyny-flags.spec         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009496
golang-github-itchyny-gojq.spec          https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009498
golang-github-itchyny-timefmt.spec       https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009494
golang-github-yuin-goldmark-emoji.spec   https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009487


Joe, I think this BZ should be closed and new ones created so I can request git repos:

golang-github-alecaivazis-survey.spec    !https://bugzilla.redhat.com/show_bug.cgi?id=1803303
golang-github-charmbracelet-glamour.spec !https://bugzilla.redhat.com/show_bug.cgi?id=1888967

Comment 17 Joe Doss 2021-09-30 20:21:20 UTC
(In reply to Mikel Olasagasti Uranga from comment #16)
> Joe, I think this BZ should be closed and new ones created so I can request
> git repos:
> 
> golang-github-alecaivazis-survey.spec   
> !https://bugzilla.redhat.com/show_bug.cgi?id=1803303
> golang-github-charmbracelet-glamour.spec
> !https://bugzilla.redhat.com/show_bug.cgi?id=1888967

These have been closed.

Comment 18 Mikel Olasagasti Uranga 2021-10-04 09:22:31 UTC
Update:

golang-github-muesli-reflow -> updated to 0.3.0 in rawhide
golang-github-spf13-cobra -> merged https://src.fedoraproject.org/rpms/golang-github-spf13-cobra/pull-request/3
golang-github-shurcool-graphql.spec -> golang-github-cli-shurcool-graphql needs to be used and it's ready in Fedora with correct patches. Joe, can you add me as admin of golang-github-cli-shurcool-graphql?

golang-github-cli-browser.spec           https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009418
golang-github-cli-oauth.spec             https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009419
golang-github-itchyny-flags.spec         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009496
golang-github-itchyny-gojq.spec          https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009498
golang-github-itchyny-timefmt.spec       https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009494
golang-github-yuin-goldmark-emoji.spec   https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009487
golang-github-charmbracelet-glamour      https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009520
golang-github-alecaivazis-survey-2       https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2009526

Comment 19 Mikel Olasagasti Uranga 2021-12-06 09:25:07 UTC
Marking this one as CLOSED per request in https://bugzilla.redhat.com/show_bug.cgi?id=2010367#c1

Thanks for all the initial work Joe!

*** This bug has been marked as a duplicate of bug 2010367 ***

Comment 20 Mikel Olasagasti Uranga 2021-12-21 11:24:56 UTC
gh is available now for rawhide, f35 and f34: https://bodhi.fedoraproject.org/updates/?packages=gh

thanks Joe for your initial work!