All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mdadm: install the systemd service through Makefile
@ 2019-05-16  2:41 Liwei Song
  2019-05-20 21:18 ` Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Liwei Song @ 2019-05-16  2:41 UTC (permalink / raw)
  To: oe-core

The original mdadm service may include variable like BINDIR,
It should use the real value of it, since the install method
"install-systemd" in Makefile can easily do such work, so don't
install it in bb file manually, use "make install-systemd" to
install all the service of mdadm.

Signed-off-by: Liwei Song <liwei.song@windriver.com>
---
 meta/recipes-extended/mdadm/mdadm_4.1.bb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index 4168ce4d0cb8..a4b9ef94799f 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -55,13 +55,15 @@ do_install() {
 do_install_append() {
         install -d ${D}/${sysconfdir}/
         install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
-        install -d ${D}/${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/mdmonitor.service ${D}/${systemd_unitdir}/system
-        install -m 644 ${S}/systemd/mdmon@.service ${D}/${systemd_unitdir}/system
         install -d ${D}/${sysconfdir}/init.d
         install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
 }
 
+do_install_append() {
+        oe_runmake install-systemd DESTDIR=${D}
+}
+
+
 do_compile_ptest() {
 	oe_runmake test
 }
@@ -88,3 +90,5 @@ RRECOMMENDS_${PN}-ptest += " \
     kernel-module-raid10 \
     kernel-module-raid456 \
 "
+
+FILES_${PN} += "/lib/systemd/*"
-- 
2.7.4



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

* Re: [PATCH] mdadm: install the systemd service through Makefile
  2019-05-16  2:41 [PATCH] mdadm: install the systemd service through Makefile Liwei Song
@ 2019-05-20 21:18 ` Khem Raj
  2019-05-21  2:21   ` Liwei Song
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2019-05-20 21:18 UTC (permalink / raw)
  To: Liwei Song, oe-core



On 5/15/19 7:41 PM, Liwei Song wrote:
> The original mdadm service may include variable like BINDIR,
> It should use the real value of it, since the install method
> "install-systemd" in Makefile can easily do such work, so don't
> install it in bb file manually, use "make install-systemd" to
> install all the service of mdadm.
> 
> Signed-off-by: Liwei Song <liwei.song@windriver.com>
> ---
>   meta/recipes-extended/mdadm/mdadm_4.1.bb | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
> index 4168ce4d0cb8..a4b9ef94799f 100644
> --- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
> +++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
> @@ -55,13 +55,15 @@ do_install() {
>   do_install_append() {
>           install -d ${D}/${sysconfdir}/
>           install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
> -        install -d ${D}/${systemd_unitdir}/system
> -        install -m 644 ${WORKDIR}/mdmonitor.service ${D}/${systemd_unitdir}/system
> -        install -m 644 ${S}/systemd/mdmon@.service ${D}/${systemd_unitdir}/system
>           install -d ${D}/${sysconfdir}/init.d
>           install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
>   }
>   
> +do_install_append() {
> +        oe_runmake install-systemd DESTDIR=${D}
> +}

perhaps this should be guarded with systemd being in DISTRO_FEATURES check.

> +
> +
>   do_compile_ptest() {
>   	oe_runmake test
>   }
> @@ -88,3 +90,5 @@ RRECOMMENDS_${PN}-ptest += " \
>       kernel-module-raid10 \
>       kernel-module-raid456 \
>   "
> +
> +FILES_${PN} += "/lib/systemd/*"
> 


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

* Re: [PATCH] mdadm: install the systemd service through Makefile
  2019-05-20 21:18 ` Khem Raj
@ 2019-05-21  2:21   ` Liwei Song
  2019-05-21  6:43     ` Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Liwei Song @ 2019-05-21  2:21 UTC (permalink / raw)
  To: Khem Raj, oe-core



On 05/21/2019 05:18 AM, Khem Raj wrote:
> 
> 
> On 5/15/19 7:41 PM, Liwei Song wrote:
>> The original mdadm service may include variable like BINDIR,
>> It should use the real value of it, since the install method
>> "install-systemd" in Makefile can easily do such work, so don't
>> install it in bb file manually, use "make install-systemd" to
>> install all the service of mdadm.
>>
>> Signed-off-by: Liwei Song <liwei.song@windriver.com>
>> ---
>>   meta/recipes-extended/mdadm/mdadm_4.1.bb | 10 +++++++---
>>   1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
>> index 4168ce4d0cb8..a4b9ef94799f 100644
>> --- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
>> +++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
>> @@ -55,13 +55,15 @@ do_install() {
>>   do_install_append() {
>>           install -d ${D}/${sysconfdir}/
>>           install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
>> -        install -d ${D}/${systemd_unitdir}/system
>> -        install -m 644 ${WORKDIR}/mdmonitor.service ${D}/${systemd_unitdir}/system
>> -        install -m 644 ${S}/systemd/mdmon@.service ${D}/${systemd_unitdir}/system
>>           install -d ${D}/${sysconfdir}/init.d
>>           install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
>>   }
>>   +do_install_append() {
>> +        oe_runmake install-systemd DESTDIR=${D}
>> +}
> 
> perhaps this should be guarded with systemd being in DISTRO_FEATURES check.

Hi Khem,

Do you mean all the service file need to be added to SYSTEMD_SERVICE_${PN} ?

Thanks,
Liwei.


> 
>> +
>> +
>>   do_compile_ptest() {
>>       oe_runmake test
>>   }
>> @@ -88,3 +90,5 @@ RRECOMMENDS_${PN}-ptest += " \
>>       kernel-module-raid10 \
>>       kernel-module-raid456 \
>>   "
>> +
>> +FILES_${PN} += "/lib/systemd/*"
>>
> 
> 


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

* Re: [PATCH] mdadm: install the systemd service through Makefile
  2019-05-21  2:21   ` Liwei Song
@ 2019-05-21  6:43     ` Khem Raj
  2019-05-21  7:52       ` Liwei Song
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2019-05-21  6:43 UTC (permalink / raw)
  To: Liwei Song; +Cc: oe-core

On Mon, May 20, 2019 at 7:21 PM Liwei Song <liwei.song@windriver.com> wrote:
>
>
>
> On 05/21/2019 05:18 AM, Khem Raj wrote:
> >
> >
> > On 5/15/19 7:41 PM, Liwei Song wrote:
> >> The original mdadm service may include variable like BINDIR,
> >> It should use the real value of it, since the install method
> >> "install-systemd" in Makefile can easily do such work, so don't
> >> install it in bb file manually, use "make install-systemd" to
> >> install all the service of mdadm.
> >>
> >> Signed-off-by: Liwei Song <liwei.song@windriver.com>
> >> ---
> >>   meta/recipes-extended/mdadm/mdadm_4.1.bb | 10 +++++++---
> >>   1 file changed, 7 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
> >> index 4168ce4d0cb8..a4b9ef94799f 100644
> >> --- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
> >> +++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
> >> @@ -55,13 +55,15 @@ do_install() {
> >>   do_install_append() {
> >>           install -d ${D}/${sysconfdir}/
> >>           install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
> >> -        install -d ${D}/${systemd_unitdir}/system
> >> -        install -m 644 ${WORKDIR}/mdmonitor.service ${D}/${systemd_unitdir}/system
> >> -        install -m 644 ${S}/systemd/mdmon@.service ${D}/${systemd_unitdir}/system
> >>           install -d ${D}/${sysconfdir}/init.d
> >>           install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
> >>   }
> >>   +do_install_append() {
> >> +        oe_runmake install-systemd DESTDIR=${D}
> >> +}
> >
> > perhaps this should be guarded with systemd being in DISTRO_FEATURES check.
>
> Hi Khem,
>
> Do you mean all the service file need to be added to SYSTEMD_SERVICE_${PN} ?
>

I mean to check for systemd in DISTRO_FEATURE like
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
...
else
...
fi

> Thanks,
> Liwei.
>
>
> >
> >> +
> >> +
> >>   do_compile_ptest() {
> >>       oe_runmake test
> >>   }
> >> @@ -88,3 +90,5 @@ RRECOMMENDS_${PN}-ptest += " \
> >>       kernel-module-raid10 \
> >>       kernel-module-raid456 \
> >>   "
> >> +
> >> +FILES_${PN} += "/lib/systemd/*"
> >>
> >
> >


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

* Re: [PATCH] mdadm: install the systemd service through Makefile
  2019-05-21  6:43     ` Khem Raj
@ 2019-05-21  7:52       ` Liwei Song
  0 siblings, 0 replies; 5+ messages in thread
From: Liwei Song @ 2019-05-21  7:52 UTC (permalink / raw)
  To: Khem Raj; +Cc: oe-core



On 05/21/2019 02:43 PM, Khem Raj wrote:
> On Mon, May 20, 2019 at 7:21 PM Liwei Song <liwei.song@windriver.com> wrote:
>>
>>
>>
>> On 05/21/2019 05:18 AM, Khem Raj wrote:
>>>
>>>
>>> On 5/15/19 7:41 PM, Liwei Song wrote:
>>>> The original mdadm service may include variable like BINDIR,
>>>> It should use the real value of it, since the install method
>>>> "install-systemd" in Makefile can easily do such work, so don't
>>>> install it in bb file manually, use "make install-systemd" to
>>>> install all the service of mdadm.
>>>>
>>>> Signed-off-by: Liwei Song <liwei.song@windriver.com>
>>>> ---
>>>>   meta/recipes-extended/mdadm/mdadm_4.1.bb | 10 +++++++---
>>>>   1 file changed, 7 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
>>>> index 4168ce4d0cb8..a4b9ef94799f 100644
>>>> --- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
>>>> +++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
>>>> @@ -55,13 +55,15 @@ do_install() {
>>>>   do_install_append() {
>>>>           install -d ${D}/${sysconfdir}/
>>>>           install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
>>>> -        install -d ${D}/${systemd_unitdir}/system
>>>> -        install -m 644 ${WORKDIR}/mdmonitor.service ${D}/${systemd_unitdir}/system
>>>> -        install -m 644 ${S}/systemd/mdmon@.service ${D}/${systemd_unitdir}/system
>>>>           install -d ${D}/${sysconfdir}/init.d
>>>>           install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
>>>>   }
>>>>   +do_install_append() {
>>>> +        oe_runmake install-systemd DESTDIR=${D}
>>>> +}
>>>
>>> perhaps this should be guarded with systemd being in DISTRO_FEATURES check.
>>
>> Hi Khem,
>>
>> Do you mean all the service file need to be added to SYSTEMD_SERVICE_${PN} ?
>>
> 
> I mean to check for systemd in DISTRO_FEATURE like
> if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
> ...
> else
> ...
> fi

Understand, thanks.

Liwei.


> 
>> Thanks,
>> Liwei.
>>
>>
>>>
>>>> +
>>>> +
>>>>   do_compile_ptest() {
>>>>       oe_runmake test
>>>>   }
>>>> @@ -88,3 +90,5 @@ RRECOMMENDS_${PN}-ptest += " \
>>>>       kernel-module-raid10 \
>>>>       kernel-module-raid456 \
>>>>   "
>>>> +
>>>> +FILES_${PN} += "/lib/systemd/*"
>>>>
>>>
>>>
> 
> 


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

end of thread, other threads:[~2019-05-21  7:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16  2:41 [PATCH] mdadm: install the systemd service through Makefile Liwei Song
2019-05-20 21:18 ` Khem Raj
2019-05-21  2:21   ` Liwei Song
2019-05-21  6:43     ` Khem Raj
2019-05-21  7:52       ` Liwei Song

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.