Thank you very much for your review! Find my comments inline.

> From: Gianfranco Costamagna [mailto:locutusofb...@debian.org]
> 
> control: owner -1 !
> control: tags -1 moreinfo
> 
> Hi, lets review:
> 
> 1) one single changelog entry and close the ITP bug

I see, for the initial inclusion, changelog shall not be the changelog of the 
software (features) but of the ITP fix itself. New log is:

logdata-anomaly-miner (0.0.2) unstable; urgency=low

  * Initial inclusion of logdata-anomaly-miner to Debian
    (Closes: #813096)

 -- Roman Fiedler <roman.fied...@ait.ac.at>  Wed,  1 Jun 2016 15:46:00 +0000

> 2) lintian

Strange, the debian-mentors did not show those and also running "lintian 
logdata-anomaly-miner_0.0.2_all.deb" locally does not yield all of those. 
Trying to fix anyway:

> W: logdata-anomaly-miner: readme-debian-contains-debmake-template

Deleted, no special notes required.

> E: logdata-anomaly-miner: description-starts-with-package-name

-Description: logdata-anomaly-miner allows to create log analysis
+Description: This tool allows to create log analysis pipelines

> W: logdata-anomaly-miner: description-starts-with-leading-spaces

Fixed, changed from 2 spaces to 1 space in continuation lines.

> W: logdata-anomaly-miner: extended-description-line-too-long

Could not reproduce, but hopefully gone with previous changes. It is the line

"Please report bugs at 
https://bugs.launchpad.net/logdata-anomaly-miner/+filebug";

which is now exactly 80 chars long, which should be OK according to the specs.

> W: logdata-anomaly-miner: spelling-error-in-description-synopsis allows to
> allows one to
> I: logdata-anomaly-miner: spelling-error-in-manpage
> usr/share/man/man1/AMinerRemoteControl.1.gz allows to allows one to

Fixed here and within various documentation elements.

> E: logdata-anomaly-miner: python-script-but-no-python-dep
> usr/lib/aminer/AMiner
> E: logdata-anomaly-miner: python-script-but-no-python-dep
> usr/lib/aminer/AMinerRemoteControl

Tried to follow the guidelines, seems that everything works but lintian is 
still complaining. Changes recommended from various forums:

--- a/source/debian/control
+++ b/source/debian/control
@@ -2,32 +2,34 @@ Source: logdata-anomaly-miner
 Section: misc
 Priority: extra
 Maintainer: Roman Fiedler <roman.fied...@ait.ac.at>
-Build-Depends: debhelper (>= 9.0.0), docbook-xsl, docbook-xml, xsltproc
+Build-Depends: debhelper (>= 9.0.0), dh-python, dh-systemd, docbook-xsl, 
docbook-xml,xsltproc
+XS-Python-Version: >=2.6
 Homepage: https://launchpad.net/logdata-anomaly-miner/
 Vcs-Git: https://git.launchpad.net/logdata-anomaly-miner
 Vcs-Browser: https://git.launchpad.net/logdata-anomaly-miner/tree/
 
 Package: logdata-anomaly-miner
 Architecture: all
-Depends: python2.6 | python2.7, python-tz, ${misc:Depends}
+Depends: ${python:Depends}, python2.6 | python2.7, python-tz, ${misc:Depends}
+XB-Python-Version: ${python:Versions}

--- a/source/debian/rules
+++ b/source/debian/rules
@@ -15,4 +15,5 @@ override_dh_auto_build:
        -o debian/ \
        http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl 
\
        debian/AMiner.1.xml debian/AMinerRemoteControl.1.xml
+       /usr/share/dh-python/dh_python2 -p logdata-anomaly-miner 
usr/lib/aminer/AMiner usr/lib/aminer/AMinerRemoteControl
        dh_auto_build


Any ideas would be appreciated. Otherwise I'll just add a workaround to get rid 
of the lintian error.

> W: logdata-anomaly-miner: maintainer-script-calls-systemctl prerm:30
> W: logdata-anomaly-miner: maintainer-script-calls-systemctl prerm:31

Gone by following changes .... (BUT read below):

--- a/source/debian/prerm
+++ b/source/debian/prerm
@@ -16,27 +16,19 @@ set -e
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+# IMPORTANT: This code will stop/deactivate systemd services,
+# so it has to be run BEFORE deleting the service users below.
+
+#DEBHELPER#
 
 case "$1" in
     remove)
-# Stop all services and delete the users before removing the service.
-# As quite some users won't use the daemon, ignore errors due
-# to non-running service.
-    if test -d /usr/lib/upstart; then
-# Just stop, configuration file will be removed when package is
-# removed.
-        stop aminer || true
-    elif test -e /bin/systemctl; then
-        systemctl --quiet is-active aminer && systemctl stop aminer
-        systemctl --quiet is-enabled aminer && systemctl disable aminer
-    else
-        invoke-rc.d aminer stop || true
-    fi
-
 # Revert overrides, otherwise next dpkg install will fail.
     dpkg-statoverride --remove /etc/aminer
 
-
 # Delete user, will also delete group.
     userdel "aminer"
     ;;
@@ -53,9 +45,4 @@ case "$1" in
     ;;
 esac
 
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
 exit 0

--- a/source/debian/rules
+++ b/source/debian/rules
@@ -5,7 +5,7 @@
 # export DH_VERBOSE=1
 
 %:
-       dh $@
+       dh $@ --with=systemd
 
 override_dh_auto_build:
        xsltproc --nonet \


CAVEAT: Although lintian is happy, there are two issues with that change, that 
may/are problematic:

a) I moved the DEBHELPER in prerm BEFORE my code to delete the users. Is the 
DEBHELPER code really intended to be run before or may this cause other issues?

b) In postinst DEBHELPER will automatically activate the systemd unit. But this 
was not done INTENTIONALLY! Therefore documentation included a section, what to 
check/do before activating the service to avoid any risks. Are there means to 
get to that state also with the dh-systemd components?

 > 3) a pybuild system might make the packaging easier to maintain

Thanks for the hint. If I understand correctly, pybuild will only care about 
maintaining the dependencies to the python packages and which interpreter to 
use but it will NOT require the software to load from site-packages or to 
create/use pyc files, which is currently avoided due to security reasons?

If so, I would try to switch to pybuild with the next package.
 
> 4) d/docs <-- empty

According to Debian manual, this should be used to automatically include files 
from uppermost directory of the unpacked source. Currently there are no useful 
files at this location, all documentation is included directly from 
source/root/usr/share/doc/aminer/. Would following files be sufficient?

CHANGES: The content that was in changelog (see your note #1)
LICENSE: License copy
README: Just a reference to the documentation (I guess path should be in 
source-code layout, i.e. " source/root/usr/share/doc/aminer", not the final 
layout because the file is from the source tgz -- of course the file will then 
make no sense within the package because the path is wrong, but perhaps that is 
the expected behaviour with packaging)
 
> 5) debian/logdata-anomaly-miner.dirs

This was a workaround for a problem (build error), which seems to be fixed by 
restructuring of the build anyway. Removed.

> debian/logdata-anomaly-miner.install
> 
> why?

Current content is "root/* ." There is no compiling involved, so this copies 
just the plain files into the package. Is there something else to be used for 
this purpose?

> 6) watch: please ask on debian-mentors mail list or irc (OFTC/#debian-
> mentors)

See 10)

> 7) std-version is 3.9.8 now

Fixed

> 8) postinst has too much stuff
> abort-upgrade|abort-remove|abort-deconfigure)
> ;;
> 
> *)
> echo "postinst called with unknown argument \`$1'" >&2
> exit 1
> ;;
> 
> 
> ##DEBHELPER##
> should take care of that part

How should that work? In generated DEBHELPER code I do not see any commands 
that would create the users? If you mean the length of " 
abort-upgrade|abort-remove|abort-deconfigure": this is from dh-make, should 
that be changed?

> 9) prerm too, I think systemd already know to stop services during removal.

Switched to dh-systemd (see also 2-lintian changes to prerm)

> 10) debian/source/format -> quilt, not native
> 
> why do you have a native package? seems not something Debian specific

This was not really planned. The idea behind the package structure was to have 
only one repository to maintain to build the packages for both Debian/Ubuntu. 
Will the Debian/Ubuntu requirements be that different in the end, that 
maintaining a single code base for building is not possible anyway? In such 
scenario are those changes the best?

* Move the debian/ stuff in the upstream repository to debian-templates/ (not 
packaged)

* Create a downstream repository, e.g. at the "Debian collab platform", where 
the upstream source.tgz is loaded automatically and only the debian/ stuff is 
stored
 
Does that make sense?

> apt-get install check-all-the-things -t experimental
> 
> $ check-all-the-things
> 
> [...Snip]

This is not lost, will respond to it in next iteration (the native/non-native 
package decision seems to affect some of those issues anyway).

> out of time right now, if you can fix the above I'll do another trip.

Thank you for reviewing. I have uploaded a new intermediate version with the 
fixes done so far. Please note, the error is due to the pydepends question from 
above.

> Il Lunedì 18 Aprile 2016 20:15, Fiedler Roman <roman.fied...@ait.ac.at> ha
> scritto:
> [Snip unreplied part]

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to