All of lore.kernel.org
 help / color / mirror / Atom feed
* Missing service file
@ 2019-07-18 10:01 JH
  2019-07-18 10:19 ` Maciej Pijanowski
  0 siblings, 1 reply; 3+ messages in thread
From: JH @ 2019-07-18 10:01 UTC (permalink / raw)
  To: Yocto discussion list

Hi,

I set up a service file at following myapp.bb file, but that service
file was not installed to /lib/systemd/system. What could I be wrong
here?


SYSTEMD_SERVICE_${PN} = "${PN}.service"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
......
install -m 0644 ${S}/lib/systemd/system/${PN}.service
${D}/${systemd_system_unitdir}
}

Thank you.

Kind regards,

- jh


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Missing service file
  2019-07-18 10:01 Missing service file JH
@ 2019-07-18 10:19 ` Maciej Pijanowski
  2019-07-18 12:14   ` JH
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej Pijanowski @ 2019-07-18 10:19 UTC (permalink / raw)
  To: yocto


[-- Attachment #1.1: Type: text/plain, Size: 1031 bytes --]


On 18.07.2019 12:01, JH wrote:
> Hi,
>
> I set up a service file at following myapp.bb file, but that service
> file was not installed to /lib/systemd/system. What could I be wrong
> here?
Not installed means it's not in the final image on the target? Which
package gets installed into the
image? I guess the ${PN} package.

Have you inspected the recipe
work/YOUR_TARGET/RECIPE_NAME/RECIPE_VERSION/image dir?
Maybe it is present there, but not in the package you are installing
(check the content of the pacakges-split dir as well).

You may use the:

FILES_${PN} += "/lib/systemd/system/${PN}.service

to force packaging the file into the ${PN} package.
>
>
> SYSTEMD_SERVICE_${PN} = "${PN}.service"
> SYSTEMD_AUTO_ENABLE_${PN} = "enable"
>
> do_install() {
> ......
> install -m 0644 ${S}/lib/systemd/system/${PN}.service
> ${D}/${systemd_system_unitdir}
> }
>
> Thank you.
>
> Kind regards,
>
> - jh

-- 
Maciej Pijanowski
Embedded Systems Engineer
https://3mdeb.com | @3mdeb_com



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 817 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Missing service file
  2019-07-18 10:19 ` Maciej Pijanowski
@ 2019-07-18 12:14   ` JH
  0 siblings, 0 replies; 3+ messages in thread
From: JH @ 2019-07-18 12:14 UTC (permalink / raw)
  To: Maciej Pijanowski; +Cc: yocto

Thanks Maciej,

On 7/18/19, Maciej Pijanowski <maciej.pijanowski@3mdeb.com> wrote:
>
> On 18.07.2019 12:01, JH wrote:
>> Hi,
>>
>> I set up a service file at following myapp.bb file, but that service
>> file was not installed to /lib/systemd/system. What could I be wrong
>> here?
> Not installed means it's not in the final image on the target? Which
> package gets installed into the
> image? I guess the ${PN} package.

It is in the package build:
sysroot-destdir/lib/systemd/system/myapp.service
package/lib/systemd/system/myapp.service
image/lib/systemd/system/myapp.service

> Have you inspected the recipe
> work/YOUR_TARGET/RECIPE_NAME/RECIPE_VERSION/image dir?
> Maybe it is present there, but not in the package you are installing
> (check the coThanks Maciej,ntent of the pacakges-split dir as well).

All installed files are in pacakges-split dir except that service file.

> You may use the:
>
> FILES_${PN} += "/lib/systemd/system/${PN}.service
>
> to force packaging the file into the ${PN} package.

Hmm, that caused an error unparsed line

Thank you.

- jh


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-18 12:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-18 10:01 Missing service file JH
2019-07-18 10:19 ` Maciej Pijanowski
2019-07-18 12:14   ` JH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.