Re: RFS: mwic 0.7.4-1

2018-03-17 Thread Paul Wise
On Sat, Mar 17, 2018 at 5:49 PM, Georg Faerber wrote:

> Thanks a lot; sure, see [1].

These things block the upload:

The copyright years are missing 2012, I'm not sure if the ftp-masters
would reject the package on that basis.

I require these things to be fixed before I would sponsor the package:

doc/mwic.1 and tests/coverage are generated files, they should be
removed from the upstream VCS and tarballs and be always built from
source. If upstream refuses, you should remove them in `debian/rules
clean` and very early in `debian/rules build` so that the package will
never depend on the existing upstream files.

Some things that you may want to improve at some point:

Please include the upstream signature in the source package. uscan
does the right thing these days, or you can rename it to
mwic_0.7.4.orig.tar.gz.asc and place it alongside the orig.tar.gz file
and rebuild the source package.

I like to wrap each of the fields in debian/watch on new lines.

I like to use these wrap-and-sort parameters:

wrap-and-sort --short-indent --wrap-always --sort-binary-packages
--trailing-comma

misc/mwic4po seems like it would be worth installing in the package?

Please add some upstream metadata:

https://wiki.debian.org/UpstreamMetadata

Output from automated checks is available at the very end of this email.

> Could you move the repo as well, or create a new one within the Python
> team?

I'll leave that to someone who knows how to do that, I haven't dealt
with salsa yet.

> Yeah, I've used this as well, but in this case it's not that helpful as
> it finds the code defining the error [2].

I'd guess this is the source of the line you quoted:

https://sources.debian.org/src/autopkgtest/5.1/runner/autopkgtest/?hl=144#L138

lintian

X: mwic source: upstream-metadata-file-is-missing

check-all-the-things

$ env PERL5OPT=-m-lib=. cme check dpkg
...
Warning in 'control source Build-Depends:0' value 'debhelper (>=
11~)': should be (>= 11) not (>= 11~) because compat is 11
Warning in 'control source Build-Depends:1' value 'python3 (>= 3.2)':
unnecessary greater-than versioned dependency: python3 (>= 3.2).
Debian has oldoldstable -> 3.2.3-6; oldstable -> 3.4.2-2;
oldstable-kfreebsd -> 3.4.2-2; stable -> 3.5.3-1; unstable -> 3.6.3-2;
testing -> 3.6.4-1; unstable -> 3.6.4-1;
Warning in 'control binary:mwic Depends:0' value 'python3 (>= 3.2)':
unnecessary greater-than versioned dependency: python3 (>= 3.2).
Debian has oldoldstable -> 3.2.3-6; oldstable -> 3.4.2-2;
oldstable-kfreebsd -> 3.4.2-2; stable -> 3.5.3-1; unstable -> 3.6.3-2;
testing -> 3.6.4-1; unstable -> 3.6.4-1;

$ doc8
Scanning...
Validating...
.../mwic-0.7.4/doc/manpage.rst:19: D001 Line too long
.../mwic-0.7.4/doc/manpage.rst:20: D001 Line too long
.../mwic-0.7.4/doc/manpage.rst:53: D001 Line too long

# You may want to file a bug on license-reconcile
# about these false positives re Expat vs MIT/X11
$ env PERL5OPT=-m-lib=. license-reconcile
...
License mismatch: File private/check-rst has license MIT/X11 (BSD
like) which does not match Expat. at
/usr/share/perl5/Debian/LicenseReconcile/App.pm line 222,  line
3.


# This command checks style. While a consistent style
# is a good idea, people who have different style
# preferences will want to ignore some of the output.
# Do not bother adding non-upstreamable patches for this.
$ find . -type f -iname '*.py' -exec pycodestyle --ignore W191 {} +


# This command checks style. While a consistent style
# is a good idea, people who have different style
# preferences will want to ignore some of the output.
# Do not bother adding non-upstreamable patches for this.
$ pydocstyle .


$ find . -type f -iname '*.py' -exec pylint3 --rcfile=/dev/null
--msg-template='{path}:{line}:{column}: [{category}:{symbol}] {obj}:
{msg}' --reports=n {} +


$ python3-bandit -r .


$ grep -nHriE 'fixme|todo|hack|xxx+|broken' .
./tests/multiword-t-he.txt:6:# FIXME:
./tests/test_extdict.py:121:t({'aasumes'}, {'assumes'})  # FIXME? 'assumes'
./tests/test_extdict.py:122:t({'Addtional'}, {'Additional'})  #
FIXME? 'addtional'
./tests/multiword-t-he.exp:17:FIXME:
./tests/multiword-t-he.exp:18:| # FIXME:
./private/run-pylint:32:log=$(mktemp -t pylint.XX)
./.pylintrc:5:fixme,

$ vulture .
lib/cli.py:54: Unused variable 'namespace'
lib/cli.py:54: Unused variable 'option_string'
lib/cli.py:187: Unused variable 'ch'
lib/cli.py:192: Unused variable 'ch'
lib/cli.py:310: Unused variable 'args'
lib/colors.py:32: Unused variable 'warn'
lib/colors.py:35: Unused variable 'unreverse'
tests/test_blackbox.py:35: Unused attribute 'maxDiff'
tests/test_blackbox.py:85: Unused attribute 'redundant'
tests/test_blackbox.py:90: Unused variable 'enabled'
tests/test_blackbox.py:101: Unused function 'loadTestsFromFile'
tests/test_blackbox.py:105: Unused function 'wantFunction'
tests/test_blackbox.py:115: Unused function '_test'

-- 
bye,
pabs

https://wiki.debian.org/PaulWise



Re: How to package my python module ?

2018-03-17 Thread Ben Finney
慕冬亮  writes:

> thanks for your tips.

(To participate in email discussions, please don't top-post. Instead,
learn to interleave your replies in response to the text to which you
are responding. See this article for more
.

This message I'm posting is an example of how to do that.)

> For now, I have submitted all the debian metadata files to [my Github
> repo](https://github.com/mudongliang/youdao-python).

The Debian Project has Git hosting for packaging work. You should
maintain your packaging files in a VCS repository at
. This will make it easier for other
Debian Project members to collaborate with you.

> […]
> Finally I got two files:
> youdao-python_1.1.0_all.deb, youdao-python_1.1.0_amd64.changes
>
> What should I do now?

Upload the Debian source package to the Mentors package repository, then
report an RFS (Request For Sponsor) bug report for the package. Read
 for how to do these.

-- 
 \   “… one of the main causes of the fall of the Roman Empire was |
  `\that, lacking zero, they had no way to indicate successful |
_o__)  termination of their C programs.” —Robert Firth |
Ben Finney



Re: How to package my python module ?

2018-03-17 Thread 慕冬亮
Hi all,

thanks for your tips.

First, I refer to [1] and all the previous materials in the mailing
list to generate all the debian metadata files. During this step,
some commands are very useful, including dch -i/-a.

For now, I have submitted all the debian metadata files to [my Github
repo](https://github.com/mudongliang/youdao-python).

Second, I use "debuild" to build and sign the deb package. But I got one error :

>  dpkg-buildpackage -rfakeroot -us -uc -ui
> dpkg-buildpackage: info: source package youdao-python
> dpkg-buildpackage: info: source version 1.1.0
> dpkg-buildpackage: info: source distribution UNRELEASED
> dpkg-buildpackage: info: source changed by Dongliang Mu 
> 
> dpkg-source --before-build youdao-python
> dpkg-buildpackage: info: host architecture amd64
> debian/rules clean
> dh clean --with python2,python3 --buildsystem=pybuild
>   dh_auto_clean -O--buildsystem=pybuild
> I: pybuild base:184: python2.7 setup.py clean
> running clean
> removing '/home/mdl/Repos/Github/youdao-python/.pybuild/pythonX.Y_2.7/build' 
> (and everything under it)
> 'build/bdist.linux-amd64' does not exist -- can't clean it
> 'build/scripts-2.7' does not exist -- can't clean it
>   dh_clean -O--buildsystem=pybuild
> dpkg-source -b youdao-python
> dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream 
> tarball found at ../youdao-python_1.1.0.orig.tar.{bz2,gz,lzma,xz}
> dpkg-buildpackage: error: dpkg-source -b youdao-python subprocess returned 
> exit status 25
> debuild: fatal error at line 1152:
> dpkg-buildpackage -rfakeroot -us -uc -ui failed

>From [2], I just used that answer and build the package successfully.
Finally I got two files:

youdao-python_1.1.0_all.deb, youdao-python_1.1.0_amd64.changes

Finally, I used "lintian" and "debc" to check the status of packaging:

youdao-python_1.1.0_all.deb
---
 new Debian package, version 2.0.
 size 4588 bytes: control archive=1048 bytes.
 380 bytes,11 lines  control
 819 bytes, 9 lines  md5sums
 163 bytes, 9 lines   *  postinst #!/bin/sh
 265 bytes,14 lines   *  prerm#!/bin/sh
 Package: youdao-python
 Version: 1.1.0
 Architecture: all
 Maintainer: Dongliang Mu 
 Installed-Size: 29
 Depends: python:any (<< 2.8), python:any (>= 2.7.5-5~)
 Section: misc
 Priority: optional
 Homepage: https://github.com/mudongliang/youdao-python
 Description: youdao dictionary implemented in python
   Simple Youdao Dictionary implemented by python module
drwxr-xr-x root/root 0 2018-03-17 13:20 ./
drwxr-xr-x root/root 0 2018-03-17 13:20 ./usr/
drwxr-xr-x root/root 0 2018-03-17 13:20 ./usr/bin/
-rwxr-xr-x root/root   397 2018-03-17 13:20 ./usr/bin/youdao
drwxr-xr-x root/root 0 2018-03-17 13:20 ./usr/lib/
drwxr-xr-x root/root 0 2018-03-17 13:20 ./usr/lib/python2.7/
drwxr-xr-x root/root 0 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/
drwxr-xr-x root/root 0 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple/
-rw-r--r-- root/root39 2018-03-16 00:49
./usr/lib/python2.7/dist-packages/youdao_simple/__init__.py
-rw-r--r-- root/root  3883 2018-03-16 01:02
./usr/lib/python2.7/dist-packages/youdao_simple/youdao.py
drwxr-xr-x root/root 0 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple-1.1.0.egg-info/
-rw-r--r-- root/root  3402 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple-1.1.0.egg-info/PKG-INFO
-rw-r--r-- root/root 1 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple-1.1.0.egg-info/dependency_links.txt
-rw-r--r-- root/root54 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple-1.1.0.egg-info/entry_points.txt
-rw-r--r-- root/root14 2018-03-17 13:20
./usr/lib/python2.7/dist-packages/youdao_simple-1.1.0.egg-info/top_level.txt
drwxr-xr-x root/root 0 2018-03-17 13:20 ./usr/share/
drwxr-xr-x root/root 0 2018-03-17 13:20 ./usr/share/doc/
drwxr-xr-x root/root 0 2018-03-17 13:20 ./usr/share/doc/youdao-python/
-rw-r--r-- root/root   160 2018-03-17 13:20
./usr/share/doc/youdao-python/changelog.gz
-rw-r--r-- root/root   471 2018-03-17 13:15
./usr/share/doc/youdao-python/copyright

What should I do now? If you find any issue in my procedure, please let me know.

[1] 
https://blog.packagecloud.io/debian/debuild/packaging/2015/06/08/buildling-deb-packages-with-debuild/
[2] 
https://askubuntu.com/questions/675154/dpkg-buildpackage-dpkg-source-no-upstream-tarball-found
--
My best regards to you.

 No System Is Safe!
 Dongliang Mu


On Sat, Mar 17, 2018 at 1:58 AM, Ben Finney  wrote:
> Georg Faerber  writes:
>
>> On 18-03-16 17:16:23, 慕冬亮 wrote:
>> > I need to find one sponsor to upload my package to the Debian
>> > software repository(for now I don't have the privilege);
>>
>> It 

Re: RFS: mwic 0.7.4-1

2018-03-17 Thread Georg Faerber
Hi Paul,

On 18-03-17 11:28:51, Paul Wise wrote:
> On Sat, Mar 17, 2018 at 5:29 AM, Georg Faerber wrote:
> > I'm searching a sponsor for the initial upload of mwic.
> 
> I'll be happy to sponsor this, but I will need you to upload the
> source package to mentors.d.n first.

Thanks a lot; sure, see [1].

Could you move the repo as well, or create a new one within the Python
team?

> > - Running autopkgtest gives "SKIP no tests in this package". I've
> >   searched the Internets regarding this, but didn't found anything
> >   useful. I appreciate input and feedback regarding this.
> 
> In general, codesearch.d.n is a better place to find error strings
> than web search engines.

Yeah, I've used this as well, but in this case it's not that helpful as
it finds the code defining the error [2].

> This is probably due to autodep8.

Hm.. the manpage reads: "If a known package type is detected, autodep8
exits with 0 and prints the suggested contents of debian/tests/control
to the standard output." Running it exits with 0 but there is no output.
Not sure how to proceed here.
Also, AFAIK, debian/tests/control is obsolete nowadays if debian/control
contains Testsuite:.

Thanks,
Georg


[1] https://mentors.debian.net/debian/pool/main/m/mwic/mwic_0.7.4-1.dsc
[2] https://codesearch.debian.net/search?q=SKIP+no+tests+in+this+package


signature.asc
Description: Digital signature