Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #8582 > unrolled thread

Re: Bug#813096: ITP: logdata-anomaly-miner -- lightweight tool for log checking, log analysis

Started byFiedler Roman <Roman.Fiedler@ait.ac.at>
First post2016-06-09 14:50 +0200
Last post2016-06-09 16:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.debian.maint.python


Contents

  Re: Bug#813096: ITP: logdata-anomaly-miner -- lightweight tool for  log checking, log analysis Fiedler Roman <Roman.Fiedler@ait.ac.at> - 2016-06-09 14:50 +0200
    Re: Bug#813096: ITP: logdata-anomaly-miner -- lightweight tool for  log checking, log analysis Piotr Ożarowski <piotr@debian.org> - 2016-06-09 15:00 +0200
      AW: Bug#813096: ITP: logdata-anomaly-miner -- lightweight tool for  log checking, log analysis Fiedler Roman <Roman.Fiedler@ait.ac.at> - 2016-06-09 16:10 +0200

#8582 — Re: Bug#813096: ITP: logdata-anomaly-miner -- lightweight tool for log checking, log analysis

FromFiedler Roman <Roman.Fiedler@ait.ac.at>
Date2016-06-09 14:50 +0200
SubjectRe: Bug#813096: ITP: logdata-anomaly-miner -- lightweight tool for log checking, log analysis
Message-ID<rI7zj-6pj-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

> Von: Piotr Ożarowski [mailto:piotr@debian.org]
> 
> [Fiedler Roman, 2016-06-09]
> > > * install into /usr/lib/logdata-anomaly-miner/ and dh_python2 will pick
> > >   it up without any overrides, additional options, etc.
> >
> > So I guess, before that (where dh_python2 refused to operate at all),
> > using /usr/lib/aminer as a shorthand - as the package name is quite
> > long - was a bad idea.
> 
> NAME in /usr/lib/NAME is not used in Python¹. It's not module name, you
> cannot import it so Python module naming rules do not apply here.
> 
> [¹] at least in /usr/lib/NAME/foo scripts

OK, I understand. So for simplicity it seems to be best when NAME==[full-package-name], already changed in newest mentors upload.

> > As import names cannot contain a dash, is use of
> > "usr/lib/logdata-anomaly-miner/aminer" as module storage directory and
> > "aminer" as shorthand module name in imports OK?
> 
> if /usr/lib/logdata-anomaly-miner is the storage and
> /usr/lib/logdata-anomaly-miner/aminer is the module dir (with
> __init__.py file), then yes

Confirmed, that's exactly how it works now.

> > Still when building, lintian is unhappy with the output package:
> >
> > E: logdata-anomaly-miner: python-script-but-no-python-dep usr/lib/logdata-
> anomaly-miner/AMiner
> > E: logdata-anomaly-miner: python-script-but-no-python-dep usr/lib/logdata-
> anomaly-miner/AMinerRemoteControl
> 
> is AMiner and AMinerRemoteControl symlinked in /usr/bin/?
> (you can use debian/logdata-anomaly-miner.links to do that)

Currently they are not symlinked. I took the same approach as with e.g. /usr/lib/apt/methods/http or /usr/lib/eject/dmcrypt-get-device where those binaries are usually not intended to be called by user directly. Meanwhile this has changed, e.g. AMinerRemoteControl is more or less now OK for cmd-line use. So I would add the symlinks. Or would moving of the files be more Debianic?

> PS please don't CC me, I read debian-python@lists.debian.org

Sorry about that.

[toc] | [next] | [standalone]


#8583

FromPiotr Ożarowski <piotr@debian.org>
Date2016-06-09 15:00 +0200
Message-ID<rI7IZ-6uB-11@gated-at.bofh.it>
In reply to#8582
[Fiedler Roman, 2016-06-09]
> > is AMiner and AMinerRemoteControl symlinked in /usr/bin/?
> > (you can use debian/logdata-anomaly-miner.links to do that)
> 
> Currently they are not symlinked. I took the same approach as with
> e.g. /usr/lib/apt/methods/http or /usr/lib/eject/dmcrypt-get-device
> where those binaries are usually not intended to be called by user
> directly. Meanwhile this has changed, e.g. AMinerRemoteControl is more
> or less now OK for cmd-line use. So I would add the symlinks. Or would
> moving of the files be more Debianic?

dh_python2 doesn't add interpreter to Depends for scripts that are not
in $PATH. That's why lintian complains. You can:
* symlink them in /usr/bin/ (or any other appropriate path)
* drop executable bit from these scripts, if they're not meant to be
  executed...
  (IIRC lintian ignores shebangs in non-executable files)
* or if they're meant to be executed, but you don't want them to be
  available out of the box, add "python" to Suggests or Recommends
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

[toc] | [prev] | [next] | [standalone]


#8584 — AW: Bug#813096: ITP: logdata-anomaly-miner -- lightweight tool for log checking, log analysis

FromFiedler Roman <Roman.Fiedler@ait.ac.at>
Date2016-06-09 16:10 +0200
SubjectAW: Bug#813096: ITP: logdata-anomaly-miner -- lightweight tool for log checking, log analysis
Message-ID<rI8OK-7qM-9@gated-at.bofh.it>
In reply to#8583

[Multipart message — attachments visible in raw view] — view raw

> Von: Piotr Ożarowski [mailto:piotr@debian.org]
> 
> [Fiedler Roman, 2016-06-09]
> > > is AMiner and AMinerRemoteControl symlinked in /usr/bin/?
> > > (you can use debian/logdata-anomaly-miner.links to do that)
> >
> > Currently they are not symlinked. I took the same approach as with
> > e.g. /usr/lib/apt/methods/http or /usr/lib/eject/dmcrypt-get-device
> > where those binaries are usually not intended to be called by user
> > directly. Meanwhile this has changed, e.g. AMinerRemoteControl is more
> > or less now OK for cmd-line use. So I would add the symlinks. Or would
> > moving of the files be more Debianic?
> 
> dh_python2 doesn't add interpreter to Depends for scripts that are not
> in $PATH. That's why lintian complains. You can:
> * symlink them in /usr/bin/ (or any other appropriate path)

I did that, modification:

$ cat debian/logdata-anomaly-miner.links 
/usr/lib/logdata-anomaly-miner/AMiner /usr/bin/AMiner
/usr/lib/logdata-anomaly-miner/AMinerRemoteControl /usr/bin/AMinerRemoteControl

> * drop executable bit from these scripts, if they're not meant to be
>   execute....  (IIRC lintian ignores shebangs in non-executable files)

not an option

> * or if they're meant to be executed, but you don't want them to be
>   available out of the box, add "python" to Suggests or Recommends

There are some usecases for users to call them, so let's have them available also.

Still lintian will complain about this file, current header:

#!/usr/bin/python2 -BEsSt

But as patching that to 2.7 will make the warnings go away, from my point of view, that workaround is sufficient for me.

New package is uploaded.

Are there any other open points I shall address?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web