Is it possible to mix systemd and non-systemd in a rules file?
Alex Nelson
alex.nelson at editshare.com
Thu Nov 5 14:55:53 GMT 2020
Hmm, if I could have 2 rules files, I would have one saying "--with
systemd" and the other would not say "--with systemd".
I think you are asking so what?
Here is my rules file:
*#!/usr/bin/make -f# -*- makefile -*-# Uncomment this to turn on verbose
mode.export DH_VERBOSE=1%: dh $@ --with python3,systemd
--buildsystem=pybuild# Until debhelper compat 11, you need to explicitly
indicate there are no# SysV .init files. We are using compat 9 for
now.override_dh_installinit: dh_installinit -n
--name=package_twooverride_dh_systemd_enable: dh_systemd_enable
--name=package_twooverride_dh_systemd_start: dh_systemd_start
--restart-after-upgrade package_two*
setup.py finds the two packages (package_one and package_two).
After building, as expected, I get 2 debian packages.
I did not expect to see any references to systemd in package_one.
Before I starting hacking around, the rules line looked like this:
*dh $@ --with python3 --buildsystem=pybuild*
and generated no references to anything systemd in debian package_one.
After adding "systemd" to the Makefile line, my package one debian package
generates all kinds of unwanted systemd references.
For example, the debian package for my *package_one *has systemd references
to *package_two*.
Here is the postint that now lives in debian package_one:
*#!/bin/shset -e# Automatically added by dh_systemd_enable# This will only
remove masks created by d-s-h on package removal.deb-systemd-helper unmask
package_two.service >/dev/null || true# was-enabled defaults to true, so
new installations run enable.if deb-systemd-helper --quiet was-enabled
editshare-reindexer.service; then # Enables the unit on first installation,
creates new # symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable package_two.service >/dev/null || trueelse #
Update the statefile to add new symlinks (if any), which need to be #
cleaned up on purge. Also remove old symlinks. deb-systemd-helper
update-state editshare-reindexer.service >/dev/null || truefi# End
automatically added section# Automatically added by dh_systemd_startif [ -d
/run/systemd/system ]; then systemctl --system daemon-reload >/dev/null ||
true if [ -n "$2" ]; then _dh_action=try-restart else _dh_action=start fi
deb-systemd-invoke $_dh_action package_two.service >/dev/null || truefi#
End automatically added section*
Alex Nelson
Engineering Architect
3 Brook Street
Watertown, MA 02472
e: alex.nelson at editshare.com
m: +1 617 209 9814
w: www.editshare.com
On Thu, Nov 5, 2020 at 9:46 AM Michael Biebl <biebl at debian.org> wrote:
> Am 05.11.20 um 00:41 schrieb Alex Nelson:
> >
> > I tried the experiment, but the generated debian package for the
> > python module that doesn't need or want to know anything about systemd
> > now has (dh generated) references to systemd.
> >
>
> What exactly do you mean by that?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20201105/21d59580/attachment.html>
More information about the Pkg-systemd-maintainers
mailing list