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

Muhammad Shakeel muhammad_shakeel at mentor.com
Mon Jul 15 11:42:21 UTC 2013


On 07/12/2013 09:32 PM, Burton, Ross wrote:
> On 11 July 2013 19:32, Saul  Wold <sgw at linux.intel.com> wrote:
 >>> We are seeing different checks for different recipes. Do you
 >>> guys think that it is possible to handle them in bbclass.
 >>>
 >> How different are they, there is the DISTRO_FEATURE check and then
 >> typically the service file or the init file is sed'ed and
 >> installed.
 >
 > My initial thoughts were to keep it simple and have a
 > do_install_append() that deleted the sysvinit or systemd files
 > depending on DISTRO_FEATURES, leaving installing the files themselves
 > (from upstream, from a file, whatever) up to the recipe because
 > that's where the complications are.

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.

Please let me know of your thoughts about installation part.

Best Regards,
Shakeel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20130715/42c11e90/attachment-0002.html>


More information about the Openembedded-core mailing list