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

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 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
index ef5ddf55db39..8ca42a89ddc5 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -57,11 +57,11 @@ 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
+        if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then
+               oe_runmake install-systemd DESTDIR=${D}
+        fi
 }
 
 do_compile_ptest() {
@@ -90,3 +90,5 @@ RRECOMMENDS_${PN}-ptest += " \
     kernel-module-raid10 \
     kernel-module-raid456 \
 "
+
+FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','/lib/systemd/*', '', d)}"
-- 
2.7.4



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

* Re: [PATCH v2] mdadm: install the systemd service through Makefile
  2019-05-21  8:54 [PATCH v2] mdadm: install the systemd service through Makefile Liwei Song
@ 2019-05-22  9:01 ` Liwei Song
  0 siblings, 0 replies; 2+ messages in thread
From: Liwei Song @ 2019-05-22  9:01 UTC (permalink / raw)
  To: oe-core, Khem Raj

Please ignore this one.

Because the v1 patch has been applied, so this one is not applicable now,
will send it together with another patch to cover the systemd related change.

Thanks,
Liwei.



On 05/21/2019 04:54 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 | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-extended/mdadm/mdadm_4.1.bb b/meta/recipes-extended/mdadm/mdadm_4.1.bb
> index ef5ddf55db39..8ca42a89ddc5 100644
> --- a/meta/recipes-extended/mdadm/mdadm_4.1.bb
> +++ b/meta/recipes-extended/mdadm/mdadm_4.1.bb
> @@ -57,11 +57,11 @@ 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
> +        if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then
> +               oe_runmake install-systemd DESTDIR=${D}
> +        fi
>  }
>  
>  do_compile_ptest() {
> @@ -90,3 +90,5 @@ RRECOMMENDS_${PN}-ptest += " \
>      kernel-module-raid10 \
>      kernel-module-raid456 \
>  "
> +
> +FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','/lib/systemd/*', '', d)}"
> 


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

end of thread, other threads:[~2019-05-22  9:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-21  8:54 [PATCH v2] mdadm: install the systemd service through Makefile Liwei Song
2019-05-22  9:01 ` 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.