summaryrefslogtreecommitdiffstats
path: root/GETTING-STARTED-WITH-dh-debputy.md
diff options
context:
space:
mode:
Diffstat (limited to 'GETTING-STARTED-WITH-dh-debputy.md')
-rw-r--r--GETTING-STARTED-WITH-dh-debputy.md53
1 files changed, 49 insertions, 4 deletions
diff --git a/GETTING-STARTED-WITH-dh-debputy.md b/GETTING-STARTED-WITH-dh-debputy.md
index 227f6d7..ac0b034 100644
--- a/GETTING-STARTED-WITH-dh-debputy.md
+++ b/GETTING-STARTED-WITH-dh-debputy.md
@@ -169,13 +169,9 @@ commands. Other tools will have some form of support (often at least a commonly
* `dh_installemacsen` **(!)**
* `dh_installinfo`
* `dh_installinit`
- - Only default service mode (enable, standard restart) are supported. Any use of `--no-start`, etc.
- is unsupported
* `dh_installsysusers`
* `dh_installtmpfiles`
* `dh_installsystemd`
- - Only default service mode (enable, standard restart) are supported. Any use of `--no-start`, etc.
- is unsupported
* `dh_installsystemduser` **(!)**
* `dh_installmenu` **(!)**
* `dh_installmime`
@@ -316,6 +312,55 @@ _Remember to merge your manifest with previous steps rather than replacing it!_
`debputy migrate-from-dh` will merge its changes into existing manifests and can safely be re-run
after adding/writing this base manifest.
+### Covert your overrides for `dh_installsystemd`, `dh_installinit` (if any)
+
+If your package overrides any of the service related helpers, the following use-cases have a trivial
+known solution:
+
+ * Use of `--name`
+ * Use of `name.service` (etc.) with `dh_installsystemd`
+ * Use of `--no-start`, `--no-enable`, or similar options
+ * Any combination of the above.
+
+Dealing with `--name` is generally depends on "why" it is used. If it is about having the helper
+pick up `debian/pkg.NAME.service` (etc.), then the `--name` can be dropped. This is because `debputy`
+automatically resolves the `NAME` without this option.
+
+For uses that involve `--no-start`, `--no-enable`, etc., you will have to add a `services` section
+to the package manifest. As an example:
+
+ override_dh_installinit:
+ dh_installinit --name foo --no-start
+
+ override_dh_installsystemd:
+ dh_installsystemd foo.service --no-start
+
+Would become:
+
+ manifest-version: "0.1"
+ packages:
+ foo:
+ services:
+ - service: foo
+ enable-on-install: false
+
+If `sysvinit` and `systemd` should use different options, then you could do something like:
+
+
+ manifest-version: "0.1"
+ packages:
+ foo:
+ services:
+ # In systemd, the service is reloaded, but for sysvinit we use the "stop in preinst, upgrade than start"
+ # approach.
+ - service: foo
+ on-upgrade: reload
+ service-manager: systemd
+ - service: foo
+ on-upgrade: stop-then-start
+ service-manager: sysvinit
+
+
### Convert your overrides for `dh_gencontrol` (if any)
If the package uses an override to choose a custom version for a binary package, then it is possible in `debputy`