Bug#1007025: git-multimail 1.6.0 package review

2022-09-22 Thread Antoine Beaupré
On 2022-09-22 17:03:24, Bo YU wrote:
> Hi,
> On Tue, Sep 20, 2022 at 10:56:05AM -0400, Antoine Beaupré wrote:
>>> https://github.com/git-multimail/git-multimail/issues/221#issuecomment-1245009306
>>> (To avoid bring noisy for upstream, i just recorded it in a issue)
>>
>>I don't think pull requests are noisy... you should probably just submit
>>this as a PR upstream.
>
> Ok, got it. Will do.
> Sometime I mentioned the patch in the issue, the maintainer of upstream will
> pick it into if he think that is valuable.

Yeah, that's a reasonable assumption, but I find that maintainers often
process merge requests way more quickly and easily as they just need one
click to merge. :)

[...]

> I think the people found the issue also:
> https://github.com/git-multimail/git-multimail/issues/221#issuecomment-1252529169
>
> Certainly, lintian will give a kindly warning:
> W: git-multimail: script-with-language-extension [usr/bin/git_multimail.py]
>
> If I understand correctly, this is a bug as you said.
> The workround is still to use launcher file in d/ as in previous commit?

I think the simplest solution is not to rewrite the launcher, but to
rename it. So in debian/rules, you would simply do:

override_dh_auto_install:
dh_auto_install
mv debian/git-multimail/usr/bin/git_multimail.py 
debian/git-multimail/usr/bin/git-multimail

Also, get rid of the noop sections like:

override_dh_installdocs:
dh_installdocs

Cheers!

-- 
I prefer the tumult of liberty to the quiet of servitude.
- Thomas Jefferson



Bug#1007025: git-multimail 1.6.0 package review

2022-09-22 Thread Bo YU

Hi,
On Tue, Sep 20, 2022 at 10:56:05AM -0400, Antoine Beaupré wrote:

https://github.com/git-multimail/git-multimail/issues/221#issuecomment-1245009306
(To avoid bring noisy for upstream, i just recorded it in a issue)


I don't think pull requests are noisy... you should probably just submit
this as a PR upstream.


Ok, got it. Will do.
Sometime I mentioned the patch in the issue, the maintainer of upstream will
pick it into if he think that is valuable.


[...]


nfoview:
https://salsa.debian.org/python-team/packages/nfoview/-/blob/debian/master/debian/launcher/nfoview

The issue is that I installed git_multimail.py twice in fact it should
be under /usr/lib/python3 only as jcfp said. So i remove it in /usr/bin
by hand.

Now I have removed the launcher for git-multimail and it should work:)


Hm. This is weird. Why would you *not* want git-multimail under
/usr/bin? I understand the that git_multimail.py *module* should be in
/usr/lib/, but you should *also* have a launcher in /usr/bin/

I think, therefore, this is incorrect:

+override_dh_python3:
+   dh_python3
+   rm -f debian/git-multimail/usr/bin/git_multimail.py
+

First off, don't use `-f` there: we *do* want to fail if the file
doesn't exist, so that we can remove the override.


yeah, right.


Second, this looks wrong: `git-multimail` (the launcher) should be the
thing that's installed under /usr/bin, not `git_multimail.py` (the
module). If the module ends up in /usr/bin, then it's probably a bug
upstream that should be filed.

Could you clarify what happens with the package right now?


The issue is that, it really seems like a bug here.

First, I install git-multimail manual:

```
sudo python setup.py install

# log is below
...
creating /usr/local/lib/python3.10/dist-packages/git_multimail-1.5.0-py3.10.egg
Extracting git_multimail-1.5.0-py3.10.egg to 
/usr/local/lib/python3.10/dist-packages
Adding git-multimail 1.5.0 to easy-install.pth file
Installing git_multimail.py script to /usr/local/bin
...

vimer@dev:~/build/rfs/git-multimail$ which git_multimail.py
/usr/local/bin/git_multimail.py
```

It looks like you said. The git_multimail.py is placed in
/usr/local/bin/git_multimail.py (if from debian package, it will be
placed into /usr/bin/)

The content of git-multimail.deb is:

```
  This package provides the Python 3 modules and the git-multimail script.

drwxr-xr-x root/root 0 2022-09-14 09:11 ./
drwxr-xr-x root/root 0 2022-09-14 09:11 ./usr/
drwxr-xr-x root/root 0 2022-09-14 09:11 ./usr/bin/
-rwxr-xr-x root/root161143 2022-09-14 09:11 ./usr/bin/git_multimail.py
drwxr-xr-x root/root 0 2022-09-14 09:11 ./usr/lib/
drwxr-xr-x root/root 0 2022-09-14 09:11 ./usr/lib/python3/
drwxr-xr-x root/root 0 2022-09-14 09:11 ./usr/lib/python3/dist-packages/
drwxr-xr-x root/root 0 2022-09-14 09:11 
./usr/lib/python3/dist-packages/git_multimail-1.6.0.egg-info/
-rw-r--r-- root/root 35851 2022-09-14 09:11 
./usr/lib/python3/dist-packages/git_multimail-1.6.0.egg-info/PKG-INFO
-rw-r--r-- root/root 1 2022-09-14 09:11 
./usr/lib/python3/dist-packages/git_multimail-1.6.0.egg-info/dependency_links.txt
-rw-r--r-- root/root14 2022-09-14 09:11 
./usr/lib/python3/dist-packages/git_multimail-1.6.0.egg-info/top_level.txt
-rw-r--r-- root/root161147 2022-07-21 07:30 
./usr/lib/python3/dist-packages/git_multimail.py
drwxr-xr-x root/root 0 2022-09-14 09:11 ./usr/share/
drwxr-xr-x root/root 0 2022-09-14 09:11 ./usr/share/doc/
drwxr-xr-x root/root 0 2022-09-14 09:11 ./usr/share/doc/git-multimail/
-rw-r--r-- root/root 11317 2022-07-21 07:30 
./usr/share/doc/git-multimail/README.rst.gz
-rw-r--r-- root/root   210 2022-09-14 09:11 
./usr/share/doc/git-multimail/changelog.Debian.gz
-rw-r--r-- root/root  1755 2022-09-14 09:11 
./usr/share/doc/git-multimail/copyright
```
I think the people found the issue also:
https://github.com/git-multimail/git-multimail/issues/221#issuecomment-1252529169

Certainly, lintian will give a kindly warning:
W: git-multimail: script-with-language-extension [usr/bin/git_multimail.py]

If I understand correctly, this is a bug as you said.
The workround is still to use launcher file in d/ as in previous commit?

Many thanks for your time to help me review it again :)

--
Regards,
--
  Bo YU



signature.asc
Description: PGP signature


Bug#1007025: git-multimail 1.6.0 package review

2022-09-20 Thread Antoine Beaupré
On 2022-09-18 11:10:24, Bo YU wrote:
> Hi,
> On Thu, Sep 15, 2022 at 05:32:33PM +0100, Antoine Beaupré wrote:
>>Hi!
>>
>>I've done a quick review of the 1.6.0 package on salsa as of commit
>>d5bd184a1cf73b752f80dea46d8080493a5e663b.

[...]

>>Also, I didn't quite follow the work on the test cases, but why did you
>>replace pep8 by pycodestyle in the patch in debian/patches? The patch
>>itself doesn't actually explain the *why* (it explains the "what" but we
>>typically want more than this...)
>
> This time i add dep3 header for the patch. It should be noted that
> despite this patch, it is still not helpful for upstream test cases.
> I have forwarded this for upstream:
> https://github.com/git-multimail/git-multimail/issues/221#issuecomment-1245009306
> (To avoid bring noisy for upstream, i just recorded it in a issue)

I don't think pull requests are noisy... you should probably just submit
this as a PR upstream.

[...]

>>I'm also surprised we need that launcher at all. Normally, the
>>`setup.py` wrapper has a scripts= stanza which should install the
>>upstream one, why do we do it differently?
>
> yeah. The reason why I use launcher here is bacause that @jcfp helped
> me to review it in the previous time:
>
> ```
> the (large) git_multimail.py file is installed twice, both as a
> public module under /usr/lib/python3 and as a script in /usr/bin;
> the latter could be replaced by a tiny launcher (take a look at the
> nfoview package if you need inspiration; your launcher would be even
> shorter because it doesn't need the sys.path manipulation)
> ```
> I am not sure if I understand jcfp's meaning correctly and I refer to
> nfoview:
> https://salsa.debian.org/python-team/packages/nfoview/-/blob/debian/master/debian/launcher/nfoview
>
> The issue is that I installed git_multimail.py twice in fact it should
> be under /usr/lib/python3 only as jcfp said. So i remove it in /usr/bin
> by hand.
>
> Now I have removed the launcher for git-multimail and it should work:)

Hm. This is weird. Why would you *not* want git-multimail under
/usr/bin? I understand the that git_multimail.py *module* should be in
/usr/lib/, but you should *also* have a launcher in /usr/bin/

I think, therefore, this is incorrect:

+override_dh_python3:
+   dh_python3
+   rm -f debian/git-multimail/usr/bin/git_multimail.py
+

First off, don't use `-f` there: we *do* want to fail if the file
doesn't exist, so that we can remove the override.

Second, this looks wrong: `git-multimail` (the launcher) should be the
thing that's installed under /usr/bin, not `git_multimail.py` (the
module). If the module ends up in /usr/bin, then it's probably a bug
upstream that should be filed.

Could you clarify what happens with the package right now?

[...]

>>Finally, one fundamental issue with this package is that, as you
>>correctly identified, it's unmaintained upstream. If we do ship it in
>>Debian, maybe we'd want to keep it out of stable until that is settled?
>
> Ok. I think so also. Fortunately, maintainer of upstream has a little
> response, but that's all.

Okay, so the right way to do this is to file a release-critical bug
against the package once it enters Debian.

>>I think that's what I have for now. I haven't double-checked the
>>upstream branch to see if it matches the upstream repo I have here, but
>>that would be my next step before uploading... just a formality to make
>>sure everything matches up.
>>
>>Thanks for working on this package!
>
> Thanks. This is the first package made by me with you all help.
>
> The new version for git-multimail is here:
> https://mentors.debian.net/package/git-multimail/
>
> Thanks again for your encouragement.:)

I hope that helps! :)

a.

-- 
Omnis enim ex infirmitate feritas est.
All cruelty springs from weakness.
 - Lucius Annaeus Seneca (58 AD)



Bug#1007025: git-multimail 1.6.0 package review

2022-09-17 Thread Bo YU

Hi,
On Thu, Sep 15, 2022 at 05:32:33PM +0100, Antoine Beaupré wrote:

Hi!

I've done a quick review of the 1.6.0 package on salsa as of commit
d5bd184a1cf73b752f80dea46d8080493a5e663b.

It looks like there's some leftover stuff in debian/copyright, i would
remove this:

modified   debian/copyright
@@ -2,8 +2,6 @@ Format: 
https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: git-multimail
Upstream-Contact: Matthieu Moy 
Source: https://github.com/git-multimail/git-multimail
-#
-# Please double check copyright with the licensecheck(1) command.

Files: *
Copyright: 2014-2022, Matthieu Moy 


Ok, removed comment here.



Also, I didn't quite follow the work on the test cases, but why did you
replace pep8 by pycodestyle in the patch in debian/patches? The patch
itself doesn't actually explain the *why* (it explains the "what" but we
typically want more than this...)


This time i add dep3 header for the patch. It should be noted that
despite this patch, it is still not helpful for upstream test cases.
I have forwarded this for upstream:
https://github.com/git-multimail/git-multimail/issues/221#issuecomment-1245009306
(To avoid bring noisy for upstream, i just recorded it in a issue)



It seems like you have README.rst both in debian/rules and
debian/docs. Either one of those should be sufficient, and you should
remove the other. Same with the launcher in
python3-git-multimail.install vs debian/rules.


There should be no duplicate file. I have droped they.


I'm also surprised we need that launcher at all. Normally, the
`setup.py` wrapper has a scripts= stanza which should install the
upstream one, why do we do it differently?


yeah. The reason why I use launcher here is bacause that @jcfp helped
me to review it in the previous time:

```
the (large) git_multimail.py file is installed twice, both as a
public module under /usr/lib/python3 and as a script in /usr/bin;
the latter could be replaced by a tiny launcher (take a look at the
nfoview package if you need inspiration; your launcher would be even
shorter because it doesn't need the sys.path manipulation)
```
I am not sure if I understand jcfp's meaning correctly and I refer to
nfoview:
https://salsa.debian.org/python-team/packages/nfoview/-/blob/debian/master/debian/launcher/nfoview

The issue is that I installed git_multimail.py twice in fact it should
be under /usr/lib/python3 only as jcfp said. So i remove it in /usr/bin
by hand.

Now I have removed the launcher for git-multimail and it should work:)


I would also name the binary package `git-multimail` instead of
`python3-git-multimail`, since we don't really care that much that the
thing is written in python, since it's not a library.


Got it. I mixed python module and library here.

(I paste and copy another mail in here:)


Finally, one fundamental issue with this package is that, as you
correctly identified, it's unmaintained upstream. If we do ship it in
Debian, maybe we'd want to keep it out of stable until that is settled?


Ok. I think so also. Fortunately, maintainer of upstream has a little
response, but that's all.


I think that's what I have for now. I haven't double-checked the
upstream branch to see if it matches the upstream repo I have here, but
that would be my next step before uploading... just a formality to make
sure everything matches up.

Thanks for working on this package!


Thanks. This is the first package made by me with you all help.

The new version for git-multimail is here:
https://mentors.debian.net/package/git-multimail/

Thanks again for your encouragement.:)

--
The greatest crimes in the world are not committed by people breaking
the rules but by people following the rules. It's people who follow
orders that drop bombs and massacre villages.
   - Banksy




--
Regards,
--
  Bo YU



signature.asc
Description: PGP signature


Bug#1007025: git-multimail 1.6.0 package review

2022-09-15 Thread Antoine Beaupré
On 2022-09-15 17:32:33, Antoine Beaupré wrote:
> Hi!
>
> I've done a quick review of the 1.6.0 package on salsa as of commit
> d5bd184a1cf73b752f80dea46d8080493a5e663b.

[...]

> Also, I didn't quite follow the work on the test cases, but why did you
> replace pep8 by pycodestyle in the patch in debian/patches? The patch
> itself doesn't actually explain the *why* (it explains the "what" but we
> typically want more than this...)

I have just found you have reported this upstream in:

https://github.com/git-multimail/git-multimail/issues/221

... which is great! Could you also open a PR against the repository and
link that in the patch?

You might want to review the patch tagging guidelines as well, as this
is the kind of things it answers:

https://dep-team.pages.debian.net/deps/dep3/

Finally, one fundamental issue with this package is that, as you
correctly identified, it's unmaintained upstream. If we do ship it in
Debian, maybe we'd want to keep it out of stable until that is settled?

a.
-- 
I've got to design so you can put it together out of garbage cans. In
part because that's what I started from, but mostly because I don’t
trust the industrial structure—they might decide to suppress us
weirdos and try to deny us the parts we need.
   - Lee Felsenstein



Bug#1007025: git-multimail 1.6.0 package review

2022-09-15 Thread Antoine Beaupré
Hi!

I've done a quick review of the 1.6.0 package on salsa as of commit
d5bd184a1cf73b752f80dea46d8080493a5e663b.

It looks like there's some leftover stuff in debian/copyright, i would
remove this:

modified   debian/copyright
@@ -2,8 +2,6 @@ Format: 
https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: git-multimail
 Upstream-Contact: Matthieu Moy 
 Source: https://github.com/git-multimail/git-multimail
-#
-# Please double check copyright with the licensecheck(1) command.
 
 Files: *
 Copyright: 2014-2022, Matthieu Moy 

Also, I didn't quite follow the work on the test cases, but why did you
replace pep8 by pycodestyle in the patch in debian/patches? The patch
itself doesn't actually explain the *why* (it explains the "what" but we
typically want more than this...)

It seems like you have README.rst both in debian/rules and
debian/docs. Either one of those should be sufficient, and you should
remove the other. Same with the launcher in
python3-git-multimail.install vs debian/rules.

I'm also surprised we need that launcher at all. Normally, the
`setup.py` wrapper has a scripts= stanza which should install the
upstream one, why do we do it differently?

I would also name the binary package `git-multimail` instead of
`python3-git-multimail`, since we don't really care that much that the
thing is written in python, since it's not a library.

I think that's what I have for now. I haven't double-checked the
upstream branch to see if it matches the upstream repo I have here, but
that would be my next step before uploading... just a formality to make
sure everything matches up.

Thanks for working on this package!
-- 
The greatest crimes in the world are not committed by people breaking
the rules but by people following the rules. It's people who follow
orders that drop bombs and massacre villages.
- Banksy


signature.asc
Description: PGP signature