[OE-core] [PATCH] [v2] openssh: Enabling with systemd

Burton, Ross ross.burton at intel.com
Wed Jul 17 12:27:28 UTC 2013


Hi,

On 15 July 2013 12:42, Muhammad Shakeel <muhammad_shakeel at mentor.com> wrote:
> We can also easily move 'sed' part to systemd class because we will only be
> looking for all the service files in ${systemd_unitdir}, irrespective of
> how these got installed.
>
> I gave a little thought to move the installation part into the class and
> there
> can be a solution but probably little complicated. The neatest solution
> would
> be to define an another variable say 'SYSTEMD_SERVICE_FILES_{PN}'
> which will hold the name of all the service files, need to be installed,
> along
> with their relative path from WORKDIR. We can check in systemd class that if
> ${systemd_unitdir} is not present, means upstream hasn't installed anything,
> then install whatever is in 'SYSTEMD_SERVICE_FILES_{PN}'.
>
> Other option is to reuse current 'SYSTEMD_SERVICE_${PN}' that lists the
> service
> files in the package but doesn't include the path of service files. If we do
> not
> want a new variable, which seems like a duplication, then we can add the
> path
> with the service files in this variable and tweak systemd class to handle
> this in
> current implementation. We will add the path only if service file to be
> installed is
> not present in WORKDIR but buried somewhere in the package source.

Installation of unit files will only be used in packages that don't
ship their own, which will be reducing over time as more upstream
packages integrate the files, so I don't think it's worthwhile writing
some complicated logic for a diminishing need.  I still think that
adding do_install_append() functions to systemd.bbclass and
update-rcd.bbclass to check the DISTRO_FEATURES and remove init
scripts as required would give us a lot more clarity in the recipes
without much "magic".

Ross



More information about the Openembedded-core mailing list