jesseduffield / lazygit-debian

Debian package for lazygit
Other
14 stars 0 forks source link

Packaging github.com/gookit/color [#1052019] #33

Closed jmkim closed 12 months ago

jmkim commented 1 year ago

https://salsa.debian.org/go-team/packages/golang-github-gookit-color

afeedhshaji commented 1 year ago

Hi, I'm new to Debian packaging but would love to try it out on this go library. I'm assuming the steps here are to:

jmkim commented 1 year ago

Create the debian package files, etc. for this repo. I'm not sure where to place this repo though. (Salsa git?)

Normally it should be in https://salsa.debian.org/go-team/packages/PKG_NAME The repository in the team's namespace can be created by a command: dh-make-golang create-salsa-project PKG_NAME.

Note that if you are not DD, you CANNOT force-push, revert, remove branch, remove tag, or any kinds of setting about the repository.

Send an ITA and RFS

Suppose ITP and RFS you meant.

ITP could be filed with the command reportbug to the pseudo-package wnpp. You can find the ITP template for lazygit is here. Because of lazygit and its dependencies is team-maintained (Go Packaging team), please don't forget the X-Debbugs-CC: debian-go@lists.debian.org.

RFS could be sent mail directly to team mailing lists debian-go@lists.debian.org. You can find the RFS template for lazygit is here.

jmkim commented 1 year ago

I read the ITP mail from you @afeedhshaji, so I assigned you here \o/

ITP: https://bugs.debian.org/1052019

afeedhshaji commented 1 year ago

I have created the Salsa repo in the go-team org: https://salsa.debian.org/go-team/packages/golang-github-gookit-color. However I'm unable to push code to this repository. How do I get the permission to do it?

jmkim commented 1 year ago

@afeedhshaji, just after DebConf23, now I arrived Korea \o/

Did you join the go-team salsa? If not, you have to join here first.

  1. Click "Request Access" button, which is in go-team salsa main page.
  2. Mail to debian-go@lists.debian.org.
jmkim commented 1 year ago

Note that, if you are not a DD, you CANNOT force-push, revert, remove branch, remove tag, or any kinds of repo settings regarding to the repository.

As I am not DD, I cannot help those. For any of them, we have to ask debian-go@lists.debian.org.

Push very carefully \o/

afeedhshaji commented 1 year ago

..just after DebConf23, now I arrived Korea \o/

No worries. Hope you had a great time!

Thanks @jmkim. I did request for access in the repo and did not get access on it till now. Guess I needed to send the mail! 😓

afeedhshaji commented 1 year ago

Hello @jmkim ! I have pushed the code to https://salsa.debian.org/go-team/packages/golang-github-gookit-color. I had a few queries regarding the pkg.

  1. I had to disable tests since although the tests were running fine, the test runner seems to be exiting with a non-zero exit code.
  2. The .deb file was created and installed. But I'm not quite sure how folks normally "test" out go libraries in the Debian packagin world. I tested it out by copying the /usr/share/gocode/src/github.com/gookit/color (which I got after deb installing) to the GOPATH pkg ~/go/pkg/mod/github.com/gookit and ran it with a sample go program which seems to be working.
jmkim commented 1 year ago

QA1

  1. I had to disable tests since although the tests were running fine, the test runner seems to be exiting with a non-zero exit code.
=== RUN   TestUtilFuncs
    utils_test.go:21: 
            Error Trace:    /build/golang-github-gookit-color-1.5.4/_build/src/github.com/gookit/color/utils_test.go:21
            Error:          Received unexpected error:
                            open README.md: no such file or directory
            Test:           TestUtilFuncs
--- FAIL: TestUtilFuncs (0.00s)

One error occurred, which seems need README.md as a fixture.

I believe disable only this test (TestUtilFuncs) is better than entire test.

QA2

  1. The .deb file was created and installed. But I'm not quite sure how folks normally "test" out go libraries in the Debian packagin world. I tested it out by copying the /usr/share/gocode/src/github.com/gookit/color (which I got after deb installing) to the GOPATH pkg ~/go/pkg/mod/github.com/gookit and ran it with a sample go program which seems to be working.

In Debian, Go package will be built with dh-golang. So when we want to dig, we can refer the dh-golang code.

For the case above (README.md file thing), we can refer:

These do not have .md as an installed extension, so README.md will not be installed into /usr/share/gocode/src/.

If we want to force-install README.md, we can pass it into DH_GOLANG_INSTALL_EXTRA.

But I think this is not make sense, because the file will only used as test fixture. I agree to disable the test, as I commented in QA1.

jmkim commented 1 year ago

TL;DR: In QA1; I believe disable only this test (TestUtilFuncs) is better than entire test. \o/

afeedhshaji commented 1 year ago

Thanks for taking your time in addressing my queries, Jongmin! I have sent the RFS here: https://lists.debian.org/debian-go/2023/10/msg00005.html

jmkim commented 12 months ago

Now I am wrapping up, and I can see the package was uploaded. Thanks for your contribution \o/