On Sat, 14 Nov 2020 at 00:06:26 +0900, Norbert Preining wrote: > > OK, that makes sense. You should be able to achieve this with: > > > > dh_installsystemduser --no-enable > > Hmm, I have > override_dh_installinit: > dh_installinit --no-start --no-enable > > but the actual .service files are already installed by upstream's make > install. > > Is there a considerable difference?
dh_installsystemduser is for systemd user units in /usr/lib/systemd/user. It only acts on user units, and doesn't touch the system (pid 1) instance of systemd. In debhelper compat levels >= 11, systemd system units in /lib/systemd/system are handled by dh_installsystemd, which conversely only acts on *system* units, and doesn't touch the *user* instance of systemd. In debhelper compat levels < 10, systemd system units are handled by a mixture of dh_installinit, dh_systemd_enable and dh_systemd_start. I'd recommend using compat level 12 or later if you can - it'll be less confusing. It's OK (preferred, even) that the .service files come from upstream's make install: debhelper knows how to look for systemd units in debian/tmp after installation. If you add .target units, those are probably something to contribute upstream too: I don't see any reason why they should be Debian-specific. The --no-enable option to dh_installsystemduser is the equivalent of the options of the same name in dh_installinit and dh_installsystemd. There's no --no-start option for dh_installsystemduser, because dh_installsystemduser doesn't start services anyway. smcv