<div dir="ltr"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div>Maybe I'm looking for a way in the Makefile to say</div><div><br></div><div>if doing package_two, then </div><div><br></div><div><b>override_dh_installinit:<br>        dh_installinit -n --name=package_two</b><br></div><div><b><br></b></div><div>else # don't override</div><div><b><br></b></div><div><b><br></b></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 5, 2020 at 9:55 AM Alex Nelson <<a href="mailto:alex.nelson@editshare.com">alex.nelson@editshare.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hmm, if I could have 2 rules files, I would have one saying "--with systemd" and the other would not say "--with systemd".<br>I think you are asking so what?<br><br>Here is my rules file:<div><br><b>#!/usr/bin/make -f<br># -*- makefile -*-<br><br># Uncomment this to turn on verbose mode.<br>export DH_VERBOSE=1<br><br>%:<br>        dh $@ --with python3,systemd --buildsystem=pybuild<br><br># Until debhelper compat 11, you need to explicitly indicate there are no<br># SysV .init files.  We are using compat 9 for now.<br>override_dh_installinit:<br>        dh_installinit -n --name=package_two<br><br>override_dh_systemd_enable:<br>        dh_systemd_enable --name=package_two<br><br>override_dh_systemd_start:<br>        dh_systemd_start --restart-after-upgrade package_two</b><br></div><div><b><br></b></div><div><b><br></b></div><div>setup.py finds the two packages (package_one and package_two).</div><div>After building, as expected, I get 2 debian packages.</div><div>I did not expect to see any references to systemd in package_one.</div><div>Before I starting hacking around, the rules line looked like this:</div><div><br></div><div><b>dh $@ --with python3 --buildsystem=pybuild<br></b></div><div><b><br></b></div><div>and generated no references to anything systemd in debian package_one.</div><div><br></div><div>After adding "systemd" to the Makefile line, my package one debian package generates all kinds of unwanted systemd references.</div><div>For example, the debian package for my <b>package_one </b>has systemd references to <b>package_two</b>.  </div><div><br></div><div>Here is the postint  that now lives in debian package_one:</div><div><br></div><div><b>#!/bin/sh<br>set -e<br># Automatically added by dh_systemd_enable<br># This will only remove masks created by d-s-h on package removal.<br>deb-systemd-helper unmask package_two.service >/dev/null || true<br><br># was-enabled defaults to true, so new installations run enable.<br>if deb-systemd-helper --quiet was-enabled editshare-reindexer.service; then<br> # Enables the unit on first installation, creates new<br> # symlinks on upgrades if the unit file has changed.<br>  deb-systemd-helper enable package_two.service >/dev/null || true<br>else<br>     # Update the statefile to add new symlinks (if any), which need to be<br> # cleaned up on purge. Also remove old symlinks.<br>      deb-systemd-helper update-state editshare-reindexer.service >/dev/null || true<br>fi<br># End automatically added section<br># Automatically added by dh_systemd_start<br>if [ -d /run/systemd/system ]; then<br>      systemctl --system daemon-reload >/dev/null || true<br>        if [ -n "$2" ]; then<br>                _dh_action=try-restart<br>        else<br>          _dh_action=start<br>      fi<br>    deb-systemd-invoke $_dh_action package_two.service >/dev/null || true<br>fi<br># End automatically added section</b><br></div><div><br></div><div><br></div><div><br></div></div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Alex Nelson<br></div><div dir="ltr">Engineering Architect</div><div dir="ltr">3 Brook Street</div><div dir="ltr">Watertown, MA 02472</div><div dir="ltr">e: <a href="mailto:alex.nelson@editshare.com" target="_blank">alex.nelson@editshare.com</a></div><div dir="ltr">m: +1 617 209 9814</div><div dir="ltr">w: <a href="http://www.editshare.com/" target="_blank">www.editshare.com</a></div></div></div></div></div></div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 5, 2020 at 9:46 AM Michael Biebl <<a href="mailto:biebl@debian.org" target="_blank">biebl@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am 05.11.20 um 00:41 schrieb Alex Nelson:<br>
> <br>
> I tried the experiment, but the generated debian package for the<br>
> python module that doesn't need or want to know anything about systemd<br>
> now has (dh generated) references to systemd.<br>
> <br>
<br>
What exactly do you mean by that?<br>
</blockquote></div>
</blockquote></div>