Dear debian-user Folks,

i am trying to build a binary debian package consisting of a python
script, shell scripts and a config file as daemon with either init.d or
systemd start.

The init.d script gets installed also the systemd file, but both are not
enabled.

I made a directory loqitmon-1.0 and in there are python script,
shellscripts and config file. 

In debian/control is:

Source: loqitmon
Section: base
Priority: optional
Maintainer: Konstantin Kletschke <konstantin.kletsc...@inside-m2m.de>
Build-Depends: debhelper (>=9.0.0), dh-virtualenv (>= 0.8)
Standards-Version: 4.5.1

Package: loqitmon
Architecture: any
Pre-Depends: dpkg (>= 1.16.1), python3, init-system-helpers (>= 1.51~)
Depends: ${misc:Depends}
Description: LoQiT monitoring daemon
 This daemon monitors /var/log/syslog for
 device removal of card reader and removal of
 display and restarts either the X server or
 the entire system accordingly
 Derived from https://github.com/yxiao168/logmonitor.git

In debian/rules is:

#!/usr/bin/make -f

DH_VERBOSE=1

%:
        dh $@
clean:
        @# Do nothing

build:
        @# Do nothing

binary:
        mkdir -p debian/loqitmon
        mkdir -p debian/loqitmon/usr/
        mkdir -p debian/loqitmon/usr/bin
        cp loqitmon.py debian/loqitmon/usr/bin/loqitmon
        mkdir -p debian/loqitmon/etc
        cp loqitmon.ini debian/loqitmon/etc
        cp loqitmonaction1 debian/loqitmon/usr/bin
        cp loqitmonaction2 debian/loqitmon/usr/bin
        cp loqitmonaction3 debian/loqitmon/usr/bin
        cp loqitmonstep1 debian/loqitmon/usr/bin
        cp loqitmonstep2 debian/loqitmon/usr/bin
        cp loqitmonstep3 debian/loqitmon/usr/bin
        dh_installinit
        dh_installsystemd
        dh_gencontrol
        dh_install
        dh_auto_install
        dh_builddeb

When I run 

# > debuild -b -us -uc

this is the output:

 dpkg-buildpackage -us -uc -ui -b
dpkg-buildpackage: info: source package loqitmon
dpkg-buildpackage: info: source version 1.0-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Konstantin Kletschke 
<konstantin.kletsc...@inside-m2m.de>
 dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
 fakeroot debian/rules clean
 debian/rules build
 fakeroot debian/rules binary
mkdir -p debian/loqitmon
mkdir -p debian/loqitmon/usr/
mkdir -p debian/loqitmon/usr/bin
cp loqitmon.py debian/loqitmon/usr/bin/loqitmon
mkdir -p debian/loqitmon/etc
cp loqitmon.ini debian/loqitmon/etc
cp loqitmonaction1 debian/loqitmon/usr/bin
cp loqitmonaction2 debian/loqitmon/usr/bin
cp loqitmonaction3 debian/loqitmon/usr/bin
cp loqitmonstep1 debian/loqitmon/usr/bin
cp loqitmonstep2 debian/loqitmon/usr/bin
cp loqitmonstep3 debian/loqitmon/usr/bin
dh_installinit
dh_installsystemd
dh_gencontrol
dpkg-gencontrol: warning: package loqitmon: substitution variable 
${misc:Pre-Depends} unused, but is defined
dh_install
dh_auto_install
dh_builddeb
dpkg-deb: building package 'loqitmon' in '../loqitmon_1.0-1_amd64.deb'.
 dpkg-genbuildinfo --build=binary -O../loqitmon_1.0-1_amd64.buildinfo
 dpkg-genchanges --build=binary -O../loqitmon_1.0-1_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)
Now running lintian loqitmon_1.0-1_amd64.changes ...
E: loqitmon changes: bad-distribution-in-changes-file unstable
E: loqitmon: file-in-etc-not-marked-as-conffile etc/init.d/loqitmon
E: loqitmon: file-in-etc-not-marked-as-conffile etc/loqitmon.ini
E: loqitmon: no-changelog usr/share/doc/loqitmon/changelog.Debian.gz 
(non-native package)
E: loqitmon: no-copyright-file
W: loqitmon: no-manual-page usr/bin/loqitmon
W: loqitmon: no-manual-page usr/bin/loqitmonaction1
W: loqitmon: no-manual-page usr/bin/loqitmonaction2
W: loqitmon: no-manual-page usr/bin/loqitmonaction3
W: loqitmon: no-manual-page usr/bin/loqitmonstep1
W: loqitmon: no-manual-page usr/bin/loqitmonstep2
W: loqitmon: no-manual-page usr/bin/loqitmonstep3
W: loqitmon: script-in-etc-init.d-not-registered-via-update-rc.d 
etc/init.d/loqitmon
W: loqitmon: unknown-section base
Finished running lintian.

The files
/etc/init.d/loqitmon
/lib/systemd/system/loqitmon.service

are in the package, but they are are not enabled.

I have the strange feeling the entire postinstall stuff is missing.
Is there a significant typo somewhere so obvious I am to stupid to see?

If there is a distribution like Mint Tessa for example, how does the
system decide which startmethod to choose, if init.d and systemd are
enabled successfully? I see a mix of init.d and systemd there regading
starting stuff.

Kind Regards
Konstantin


-- 
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

konstantin.kletsc...@inside-m2m.de
http://www.inside-m2m.de 

Geschäftsführung: Michael Emmert, Derek Uhlig
HRB: 111204, AG Hannover

Reply via email to