Skip to contentSkip to conversation

possibly misleading SYSTEMD_SERVICE glossary entry

DISCUSSION Robert P. J. Day 1 participant 2 messages Jan 31, 2021

lore
Share & tools
lore
#0 lore raw

(the first in what might be a few SYSTEMD-related observations ...)

the explanation of SYSTEMD_SERVICE here:

http://docs.yoctoproject.org/ref-manual/variables.html#term-SYSTEMD_SERVICE

might give readers the wrong impression that they *must* define that variable in a systemd-based recipe. in fact, systemd.bbclass states:

# The list of packages that should have systemd packaging scripts added. For

# each entry, optionally have a SYSTEMD_SERVICE_[package] that lists the service
# files in this package.  If this variable isn't set, [package].service is used.

so the example given in the glossary for the connman recipe:

  SYSTEMD_SERVICE_${PN} = "connman.service"

would appear to be superfluous since the package name is "connman".

on the other hand, it would be useful to explain that one needs to
define that variable if the service name differs (there are numerous examples to show this) and, even more, that it is possible to define *multiple* services in a single recipe. ironically, the connman recipe is a good example of that very thing (even though, again, all of the following appear superfluous):

  SYSTEMD_SERVICE_${PN} = "connman.service"
  SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
  SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service"

is that too much to squeeze into a variable glossary entry?

rday

#1 lore raw
Quoted 27 lines · Robert P. J. Day

(the first in what might be a few SYSTEMD-related observations ...)

the explanation of SYSTEMD_SERVICE here:

http://docs.yoctoproject.org/ref-manual/variables.html#term-SYSTEMD_SERVICE

might give readers the wrong impression that they *must* define that variable in a systemd-based recipe. in fact, systemd.bbclass states:

# The list of packages that should have systemd packaging scripts added. For

# each entry, optionally have a SYSTEMD_SERVICE_[package] that lists the service
# files in this package.  If this variable isn't set, [package].service is used.

so the example given in the glossary for the connman recipe:

  SYSTEMD_SERVICE_${PN} = "connman.service"

would appear to be superfluous since the package name is "connman".

on the other hand, it would be useful to explain that one needs to
define that variable if the service name differs (there are numerous examples to show this) and, even more, that it is possible to define *multiple* services in a single recipe. ironically, the connman recipe is a good example of that very thing (even though, again, all of the following appear superfluous):

Quoted 5 lines
  SYSTEMD_SERVICE_${PN} = "connman.service"
  SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
  SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service"

is that too much to squeeze into a variable glossary entry?

it might also be worth explaining that a single package
SYSTEMD_SERVICE setting could reference multiple services, such as this from the recipes-connectivity/kea/kea_1.8.2.bb:

SYSTEMD_SERVICE_${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service"

again, while this is useful information, it might be pushing the
bounds of what can be encapsulated in a single glossary entry.

observations about SYSTEMD_AUTO_ENABLE coming shortly ...

rday