[pkg-go] You are not allowed to push code to this project

Anthony Fok foka at debian.org
Fri Jun 15 16:57:15 BST 2018


Hi Tong,

On Fri, Jun 15, 2018 at 7:04 AM, Tong Sun <pkgoyq.xpt at neverbox.com> wrote:
> Thanks for your help, Anthony.

You are welcome!

> On Fri, Jun 15, 2018 at 3:44 AM Anthony Fok  wrote:
>>
>> On Thu, Jun 14, 2018 at 9:49 PM, Tong Sun wrote:
>>
>> ...
>
>  Hmm... maybe you didn't *quite* do your homework after all...  :-/
>
>>  1. Didn't you read
>> https://people.debian.org/~stapelberg/2015/07/27/dh-make-golang.html,
>>      i.e., the first link under Documentation on the
>> https://go-team.pages.debian.net home page?
>
>
> Actually I did. Not once, not twice, but many times.

And you do not see a -dev appended to the source package name there, did you?

>>
>>  2. Don't you think someone would have fixed dh-make-golang,
>>      one of the most used tools for the Debian Go Team, a long time ago,
>>      if it were to make a silly mistake like that?
>>      你竟然未有证据,就质疑 dh-make-golang 搞错!?你有没有搞错!?
>>  3. With hundreds of Go libraries that are already packaged for Debian,
>>      didn't you try to look at the previous WNPP ITP requests, say,
>>      by googling: ITP golang, and you'd have seen that no one appends
>>      the -dev to the subject of the ITP message.
>> 这些基本求证的动作,不需要教了吧?下次请做足功课!
>
>
> Well, aren't you too harsh to new packers like me?

我故意的,尤其是对自己中国人 DM/DD,尤其是我亲自推荐过、advocate 过的成员,尤其是对熟人(一次生,两次熟,哈哈!)

再者,你也不是太新的打包者,如你 https://nm.debian.org/person/suntong 所说的,用了 Debian
18、19 年,也有四、五年的打包经验。我对你有很高的期望。

也许我说话语气有点狠,那是因为我要对 Debian 负责,我要对 *你* 负责。
但既然其他人都当 “红脸”,那总得有人当 “白脸” 吧!爱之深,责之切。

(哈哈,我好像把自己当成了家长……)

> Not seeing -dev appended
> to the subject of the ITP message on the first page doesn't imply that I
> won't find it on the second page. Not seeing it on the second page doesn't
> imply that I won't find it on the third page. How far ahead of pages that I
> have to flip though that I can be 100% percent sure that there are no -dev
> appended to the subject of the ITP message?

Well, here, aren't you being argumentative for the sake of being argumentative?

> Wouldn't a simple guideline help new packers from going through hassles like this?

I think this is the very first time in my 20+ years in Debian that I
have seen a new DM gotten confused by this, so, speaking on behalf of
the other team members who prepared the introductory Debian Go Team
documentation, who would have guessed?  We DDs are also ordinary
people, we can't foresee all possibility of what a newcomer might run
into.  More on that later...

 1. Source package name: follows the upstream name as far as possible,

     though with Debian Go packages, "[w]e derive Debian package names
from the import path
     by replacing all slashes with dashes and using a canonical
identifier instead of the hostname."[1]

       [1]: https://go-team.pages.debian.net/packaging.html#_naming_conventions_2

 2. Binary package of development library (binary package): Basically,
add -dev suffix.[2]

       [2]: https://www.debian.org/doc/debian-policy/#development-files

This is the naming convention that applies not just to the Debian Go
Team, but to the entire Debian project, so it is expected that a
newcomer would have known this already from reading the Debian New
Maintainers' Guide and the Debian Policy.

HOWEVER, after reading
https://go-team.pages.debian.net/packaging.html, especially [1] myself
just now, I see why you may have gotten confused.  The existing doc
continues:

    E.g., for github.com/stapelberg/godebiancontrol (which contains
"go" already),
    the resulting Debian package name is
golang-github-stapelberg-godebiancontrol-dev.

Whoa!  Where did that "-dev" come from?  That is not what I expected to read!
No distinction is  made between the "source package name" and "binary
package name" (yes, the word "binary" has multiple meaning too), and
it goes on and say something about the name without "-dev" being
reserved for when Go supports compiled shared library in the distant
future...  Even I get confused too.

> I'm not challenging the authority of dh-make-golang. On contrary, I'm trying
> to be cautions, and trying to do my job well. This is why I want to read all
> the material before doing my job, so that I will not be accused of being too
> green to do anything.

Wait, that reminds me, maybe I _did_ get confused 2 or 3 years ago,
and had to look elsewhere for the answer.
In this case, I probably saw the name @stapelberg and eventually
figured out that Michael Stepelberg both wrote these docs _and_ wrote
dh-make-golang, so it was a case of
听其言而观其行, i.e. to hear/read what he says, but also observe what he
does.  Observe what he actually named his Go packages, and how he made
dh-make-golang work, and you'll see the truth.

Michael Stapelberg pioneered a lot of the work that allows the Go in
Debian to grow into a healthy ecosystem.  However, we are all only
human.  I suspect that, when Michael was busy trying to set the best
practices and creating packaging/naming conventions, and probably
assuming everybody knew, he failed to specifically clarify that "-dev"
is not supposed to be appended to the source package name.

世事确实不完美。尽信书不如无书,从多方面归纳、分析、总结,融会贯通吧。

> I don't think such kind of frustration is necessary for new packers. People
> are allowed to make mistakes, without being accused,

从错误中学习当然是应该,也是允许的。
至于 accuse 嘛,我并不觉得我在 accuse 你,反而是有点为你着急,
尤其是你在本月初和其他 DD 的对答……要知道,“DM” 并非 “新手” 的代名词。
我看到有好些其他的也是比较新的 DM,凭着自己的努力和自信,其能力和工作范畴
已经远远超越当了二十年 DD 的我。

你是新 DM,但能当得上 DM,就证明你已经有一定经验。所以,别老把自己当新手。

我过往印象中,不是所有 DD 都好脾气,这里 pkg-go 的 DD 们实在太 nice 了。
我想,与其你被别人说,不如由我这个“自己人”先说。  ;-)   不过我确实有点太过上心,
可能把你吓坏了,那我就到此为止,我后面不在当“家长”了。

朋友,勇敢往前冲吧! Be proactive, 发热发光,当明日的领袖。

> especially when there is not clear document to follow.

Good!  Keep that feeling, i.e., don't forget that frustration, 把愤怒变成动力, and

        BE THE SOLUTION!  Improve the documentation!

This is something that often only a "newbie" can do well.  So, please
fix the documentation right away once you've found the correct
answers, to help both yourself and the next new packager.

Alexandre Viau invited you to check out
https://salsa.debian.org/go-team/go-team.pages.debian.net and submit
Merge Requests (equivalent to Pull Requests on GitHub), so please find
time to do that.

In particular, please fix
https://go-team.pages.debian.net/packaging.html#_naming_conventions_2
so that it becomes a "simple guideline [that] help[s] new packers from
going through hassles like this".
I'll be watching and waiting for your contribution.  ;-)

>> The good news is: You can fix the bug title of
>> https://bugs.debian.org/901583
>> Start by reading https://www.debian.org/Bugs/server-control .
>> I'll leave that as an exercise for you.
>
> OK, I gave it a try and got this far:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901583
>
> Good enough?

Perfect!  Well done!

>> Well, normally, someone wanting to join the Debian Go Packaging Team
>> would visit https://salsa.debian.org/go-team and click on the
>> [Request Access] button right in the middle, and someone would have
>> approved your request within a day.
>
>
> Of all the material that I read, never had I see that before.

It is right there on the https://go-team.pages.debian.net/ page:

    If you want to join the the Debian Go Packaging Team, please head over
    to our [Salsa group page](https://salsa.debian.org/go-team/)
    and click the "Request Access" link.  You will need a Salsa
account for this.

Well, you can blame that the font is too small on that page.  I will
fix that today.

>> Nevertheless, to avoid going back and forth and wasting time, I went
>> ahead and added you manually.
>
> Thanks Anthony.

You are welcome!

    ... You may also send a mail to the team's mailing list to ask one
of the owners
    to accept your request.

so I am glad that you did that.

> I pushed it up, but didn't find the `debian/sid` branch on salsa.debian.org.
> what I'm missing?
>
> $ gbp push --verbose --debian-branch=debian/sid
> gbp:debug: ['git', 'rev-parse', '--show-cdup']
> gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
> gbp:debug: ['git', 'rev-parse', '--git-dir']
> gbp:debug: ['git', 'symbolic-ref', 'HEAD']
> gbp:debug: ['git', 'show-ref', 'refs/heads/debian/sid']
> gbp:debug: ['git', 'config', 'branch.debian/sid.remote']
> gbp:debug: ['git', 'tag', '-l', 'debian/0.0_git20151108.ce61ec4-1']
> gbp:debug: ['git', 'tag', '-l', 'upstream/0.0_git20151108.ce61ec4']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify',
> 'upstream/0.0_git20151108.ce61ec4^{commit}']
> gbp:debug: ['git', 'rev-parse', '--quiet', '--verify',
> 'refs/heads/upstream']
> gbp:info: Pushing upstream/0.0_git20151108.ce61ec4 to origin
> gbp:debug: ['git', 'push', 'origin', 'tag',
> 'upstream/0.0_git20151108.ce61ec4']
> gbp:info: Pushing refs/heads/upstream to origin:refs/heads/upstream
> gbp:debug: ['git', 'push', 'origin',
> 'refs/heads/upstream:refs/heads/upstream']

Answer: There is no debian/sid branch.  As of today, dh-make-golang
names it the "master" rather than "debian/sid", despite what the
2017-11 Workflow Changes document at
https://go-team.pages.debian.net/workflow-changes.html (hidden)
proposed.  There is a wish to "Adopt DEP-14 branch naming", i.e., to
move from "master" to "debian/sid", and some Debian Go team members
made that change manually, but most packages are still using the
"master" branch.

How do you tell?

 1. Run "git branch -a" and see if there is a "debian/sid" branch.

 2. Check debian/gbp.conf, and if it is using "debian/sid" branch, the lines

        [DEFAULT]
        ...
        debian-branch = debian/sid

        [buildpackage]
        dist = DEP14

     must be there.

Well, seeing how the "Workflow Changes" document is stagnant, and no
one has discussed it further on this mailing list for over six months,
and especially since dh-make-golang has not adopted DEP-14 branch
naming yet, and there seems to be a promise of automatic migration in
the future, well, I am not going to change my workflow now, so,
personally, I am still using whatever dh-make-golang creates for me
without renaming the default "master" branch or modifying
debian/gbp.conf.

My personal take on this: 多做多错,少做少错,不做不错。 (Yeah, I am lazy.)  The new
workflow has its benefits and merits, of course, but I like the old
workflow for its simplicity, and until dh-make-golang is actually
updated for the new workflow (听其言而观其行), well, I am not budging.  But
that's just me.  ;-)

Regardless of your choice of either "master" or "debian/sid", my
recommendation is to run the following commands:

    git push -u --all
    gbp push

And all your branches ("master" or "debian/sid","upstream",
"pristine-tar") will be pushed properly.  No need to push the branches
one-by-one.

"git push -u --all" needs to be run that one time only.  In the
future, just "gbp push" is sufficient.

"gbp push" does not seem to use --set-upstream-to to set the
remote-tracking branch properly.
Maybe I am missing something, but I ended up using "git push -u --all"
to fix that.

Hope this helps,

Anthony



More information about the Pkg-go-maintainers mailing list