Martin-Éric Racine:
Hi Niels, ma 19.5.2025 klo 8.26 Niels Thykier ([email protected]) kirjoitti:[...]For what it is worth, I believe you can use `--name` with both scripts to use `<package>.<name>.<stem>`. I think the hardest part of this for `dh_installsystemd` is that is generate snippets as well, where `dh_installcron` does not. This is why `dh_installsystemd` cannot just glob all the units because you might deliberately want to call `dh_installsystemd` to have different rules for each unit.Using --name is a kludge.
I agree. I do not like `--name` either.
It requires separately naming the target package via an override in debian/rules and successive runs for each target.
Correct. I have this as one of my reasons for why I do not like it as well.However, given the design of `debhelper` there is no good way to avoid this pattern when the file name also triggers maintscript code to be added where the maintainer has choices to make for said maintscripts, which is the case for `dh_installsystemd`.
You and I might not like this particular aspect of the design, but it is the design choice of `debhelper` + its commands at this point. It has non-trivial consequences to change at this point.
Meanwhile, the syntax 'target.foo.helper' is supported by most other helpers but, for some reason, not this one. This is what's needed. Martin-Éric
This statement I disagree with. I am aware of 0 helpers provided by `debhelper` that automatically respond to that file-naming convention without the use of `--name` for installing d/pkg.$NAME.foo. The closest we have it `dh_installdocs` that uses `debian/pkg.doc-base.$SUFFIX` rather than `debian/pkg.$NAME.doc-base` for some historical reason (that is it uses a custom naming convention). But very importantly there are no maintscripts are needed for `doc-base` files and the code has specialized custom logic for `doc-base` files that cannot be generalized to other cases. In that sense, `dh_installdocs` is the odd one out.
As for `dh_installcron`, which you used as an example in your opening mail, then it does *not* support this either. What is "special" about `dh_installcron` is that it has a list of ~5 different stems containing "." in them. There is no smart globbing or logic for finding "foo.name.cron.hourly" and installing it into "foo" as "/etc/cron.hourly/name"... This only works when people use `--name`, which is meh.
Best regards, Niels
OpenPGP_signature.asc
Description: OpenPGP digital signature

